:root {
  --primary: #087f5b;
  --primary-dark: #065f46;
  --primary-soft: #dff7ed;
  --secondary: #0f766e;
  --gold: #d4a72c;
  --gold-soft: #fff7d6;

  --background: #f3f7f6;
  --surface: #ffffff;
  --surface-soft: #f8fbfa;
  --sidebar: #073b32;
  --sidebar-dark: #052b25;

  --text: #17342e;
  --text-soft: #61736f;
  --border: #dce7e4;

  --success: #16805d;
  --warning: #b7791f;
  --danger: #c2413b;
  --info: #2563a6;

  --shadow-sm:
    0 8px 24px rgba(7, 59, 50, 0.07);

  --shadow-md:
    0 18px 48px rgba(7, 59, 50, 0.12);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --sidebar-width: 270px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      circle at top right,
      rgba(8, 127, 91, 0.08),
      transparent 34%
    ),
    var(--background);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.hidden {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.2;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

small {
  color: var(--text-soft);
}

code {
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns:
    minmax(360px, 0.95fr)
    minmax(440px, 1.05fr);
}

.login-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
  padding: clamp(40px, 8vw, 100px);
  color: #ffffff;
  background:
    linear-gradient(
      145deg,
      rgba(5, 43, 37, 0.98),
      rgba(8, 127, 91, 0.94)
    );
}

.login-brand::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -180px;
  top: -170px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.login-brand::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  left: -120px;
  bottom: -100px;
  background: rgba(212, 167, 44, 0.13);
  border-radius: 50%;
}

.login-brand > * {
  position: relative;
  z-index: 1;
}

.login-brand h1 {
  margin-bottom: 16px;
  color: #ffffff;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  letter-spacing: -0.055em;
}

.login-brand p {
  max-width: 580px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.03rem;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}

.login-card {
  width: min(100%, 440px);
  padding: 40px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(220, 231, 228, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.login-card h2 {
  margin-top: 6px;
  font-size: 1.7rem;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.brand-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--sidebar);
  background:
    linear-gradient(
      145deg,
      #f7da77,
      var(--gold)
    );
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  box-shadow:
    0 14px 28px rgba(3, 35, 29, 0.22);
  font-size: 2.1rem;
  font-weight: 900;
}

.brand-mark.small {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 1.25rem;
}

.login-provider-list {
  display: grid;
  gap: 12px;
}

.login-provider-list > div {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  min-width: 220px;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns:
    var(--sidebar-width)
    minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  color: #ffffff;
  background:
    linear-gradient(
      180deg,
      var(--sidebar),
      var(--sidebar-dark)
    );
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 28px;
}

.sidebar-brand strong {
  display: block;
  color: #ffffff;
  font-size: 1.18rem;
}

.sidebar-brand small {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: 0;
  border-radius: 12px;
  text-align: left;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-item span {
  width: 24px;
  font-size: 1.1rem;
  text-align: center;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--sidebar-dark);
  background:
    linear-gradient(
      135deg,
      #f4d466,
      var(--gold)
    );
  box-shadow:
    0 10px 24px rgba(212, 167, 44, 0.19);
  font-weight: 750;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 16px;
}

.provider-mini {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
}

.provider-mini strong {
  display: block;
  color: #ffffff;
}

.provider-mini small {
  display: block;
  color: rgba(255, 255, 255, 0.58);
}

.workspace {
  min-width: 0;
  padding: 0 30px 40px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 -30px 28px;
  padding: 20px 30px;
  background: rgba(243, 247, 246, 0.9);
  border-bottom: 1px solid rgba(220, 231, 228, 0.88);
  backdrop-filter: blur(16px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-box {
  min-width: 120px;
  text-align: right;
}

.user-box strong,
.user-box small {
  display: block;
}

.user-box small {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.page-view {
  max-width: 1500px;
  margin: 0 auto;
  animation: page-enter 220ms ease;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 235px;
  }

  .status-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .client-meta {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
  }

  .mobile-brand {
    display: flex;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 40;
    top: 0;
    width: 100%;
    height: auto;
    display: block;
    padding: 12px;
  }

  .sidebar-brand {
    padding: 0 4px 12px;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .nav-item {
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 7px 4px;
    font-size: 0.72rem;
    text-align: center;
  }

  .nav-item:hover {
    transform: none;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace {
    padding: 0 18px 28px;
  }

  .topbar {
    position: static;
    margin: 0 -18px 22px;
    padding: 18px;
  }

  .content-grid,
  .clients-layout {
    grid-template-columns: 1fr;
  }

  .info-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .login-panel {
    padding: 20px 14px;
  }

  .login-card {
    padding: 28px 22px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .user-box {
    display: none;
  }

  .hero-card {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .status-grid,
  .metric-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 112px;
    padding: 16px;
  }

  .metric-card strong {
    font-size: 1.6rem;
  }

  .panel {
    padding: 18px;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .client-card-main {
    flex-direction: column;
  }

  .client-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .sidebar-nav {
    grid-template-columns:
      repeat(4, minmax(72px, 1fr));
    overflow-x: auto;
  }

  .status-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 12px;
  }

  .topbar-actions .button {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 0.78rem;
  }

  .panel-heading {
    flex-direction: column;
  }

  .panel-heading .button {
    width: 100%;
  }
}

@media print {
  .sidebar,
  .topbar-actions,
  .button {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  .topbar {
    position: static;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
  }

  .panel,
  .status-card,
  .metric-card {
    box-shadow: none;
  }
}

/* WAFALINK_V2_COMPONENTS_FIX_V1 */

.eyebrow {
  display: inline-block;
  color: #f1cf5c;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--primary);
}

.muted-text {
  color: var(--text-soft);
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 750;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--secondary)
  );
}

.button.secondary {
  color: var(--primary-dark);
  background: #fff;
  border-color: var(--border);
}

.button.ghost {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.button.danger {
  color: #9b2c2c;
  background: #fff1f0;
  border-color: #f5cac7;
}

.button.small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.82rem;
}

.button.full {
  width: 100%;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  font-size: 0.84rem;
  font-weight: 750;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
}

.field input {
  min-height: 47px;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(8, 127, 91, 0.65);
  box-shadow: 0 0 0 4px rgba(8, 127, 91, 0.1);
}

.stack-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.form-meta {
  display: flex;
  justify-content: flex-end;
}

.notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 11px;
  font-size: 0.88rem;
}

.notice.info {
  color: #1e4c79;
  background: #eef7ff;
  border-color: #c9e3f7;
}

.notice.success {
  color: #176247;
  background: #ebfaf3;
  border-color: #bcebd6;
}

.notice.error {
  color: #9b2c2c;
  background: #fff1f0;
  border-color: #f6c7c3;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
  padding: 32px;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--sidebar),
    var(--primary)
  );
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -100px;
  top: -120px;
  border: 42px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card h2 {
  margin: 7px 0 12px;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.hero-card p {
  max-width: 650px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
}

.gateway-badge,
.provider-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 800;
}

.gateway-badge {
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.gateway-badge.online {
  color: #c9ffea;
}

.gateway-badge.warning {
  color: #ffe39a;
}

.provider-chip {
  padding: 7px 11px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 0.78rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.status-card,
.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.status-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--radius-md);
}

.status-card strong {
  margin: 11px 0 4px;
  color: var(--primary-dark);
  font-size: 1.22rem;
}

.card-label {
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--radius-md);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
}

.metric-card.pending::before {
  background: var(--warning);
}

.metric-card.processing::before {
  background: var(--info);
}

.metric-card.success::before {
  background: var(--success);
}

.metric-card.danger::before {
  background: var(--danger);
}

.metric-card.clients::before {
  background: var(--gold);
}

.metric-card > span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 750;
}

.metric-card strong {
  margin: 7px 0 3px;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
}

.panel {
  padding: 24px;
  border-radius: var(--radius-md);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-heading h2 {
  margin: 4px 0 0;
}

.content-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(300px, 0.55fr);
  gap: 22px;
  align-items: start;
}

.clients-layout {
  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(320px, 0.65fr);
}

.info-panel {
  position: sticky;
  top: 115px;
}

.steps {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: queue-step;
}

.steps li {
  position: relative;
  min-height: 70px;
  padding: 0 0 20px 48px;
  counter-increment: queue-step;
}

.steps li::before {
  content: counter(queue-step);
  position: absolute;
  width: 34px;
  height: 34px;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  font-weight: 800;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  width: 1px;
  left: 17px;
  top: 35px;
  bottom: 4px;
  background: var(--border);
}

.steps strong,
.steps span {
  display: block;
}

.steps span {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.wide-table {
  min-width: 950px;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fbfdfc;
}

.message-cell {
  max-width: 430px;
}

.message-cell > span,
.message-cell > small {
  display: block;
}

.empty-cell,
.empty-state {
  padding: 34px;
  color: var(--text-soft);
  text-align: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.status-pending {
  color: #8a5711;
  background: #fff6dc;
}

.status-processing {
  color: #1d578d;
  background: #eaf4ff;
}

.status-retrying {
  color: #875513;
  background: #fff1d3;
}

.status-sent {
  color: #176247;
  background: #ddf6e9;
}

.status-failed {
  color: #9b2c2c;
  background: #ffe7e5;
}

.status-muted {
  color: #5f6f6b;
  background: #eef2f1;
}

.error-text {
  display: block;
  margin-top: 5px;
  color: var(--danger) !important;
}

.client-list {
  display: grid;
  gap: 14px;
}

.client-card {
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.client-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.client-card h3 {
  margin: 10px 0 5px;
}

.client-card code {
  color: var(--primary-dark);
  font-size: 0.8rem;
  word-break: break-all;
}

.client-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 17px;
}

.client-meta > span {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.client-meta small,
.client-meta strong {
  display: block;
}

.api-key-panel {
  margin-top: 22px;
  padding: 17px;
  background: var(--gold-soft);
  border: 1px solid #eedb96;
  border-radius: 13px;
}

.api-key-panel code {
  display: block;
  max-height: 110px;
  overflow: auto;
  margin: 13px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #eadba3;
  border-radius: 9px;
  word-break: break-all;
}

@media (max-width: 1180px) {
  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .content-grid,
  .clients-layout {
    grid-template-columns: 1fr;
  }

  .info-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .hero-card {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .status-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel {
    padding: 18px;
  }

  .client-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .status-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }
}


/* WAFALINK_HISTORY_DELETE_V1 */
.history-panel-heading {
  gap: 1rem;
  align-items: flex-start;
}

.history-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.button.danger.outline {
  color: var(--danger);
  background: transparent;
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}

.button.danger.outline:hover {
  color: #fff;
  background: var(--danger);
}

.history-selection-bar,
.history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.history-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
}

.history-select-all input,
.selection-column input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--danger);
}

.selection-column {
  width: 68px;
  text-align: center;
}

.history-action-cell {
  width: 92px;
  white-space: nowrap;
}

.protected-label {
  color: var(--muted);
  font-weight: 700;
}

.history-pagination {
  justify-content: center;
}

.history-pagination span {
  min-width: 230px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 760px) {
  .history-panel-heading,
  .history-selection-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .history-heading-actions {
    justify-content: stretch;
  }

  .history-heading-actions .button {
    flex: 1 1 auto;
  }

  .history-pagination span {
    min-width: 0;
  }
}

/* WAFALINK_API_CLIENTS_V21 */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.modal-open {
  overflow: hidden;
}

.client-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.client-summary-card {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.client-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--info);
}

.client-summary-card.active::before {
  background: var(--success);
}

.client-summary-card.used::before {
  background: var(--gold);
}

.client-summary-card.failed::before {
  background: var(--danger);
}

.client-summary-card span,
.client-summary-card strong,
.client-summary-card small {
  display: block;
}

.client-summary-card span {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.client-summary-card strong {
  margin: 7px 0 4px;
  font-size: 2rem;
  line-height: 1;
}

.client-management-panel {
  overflow: hidden;
}

.client-panel-heading {
  align-items: flex-start;
}

.panel-subtitle {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.client-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 220px;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.client-search-field input,
.client-filter-field select,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}

.client-search-field input:focus,
.client-filter-field select:focus,
.field select:focus {
  border-color: rgba(8, 127, 91, 0.58);
  box-shadow: 0 0 0 3px rgba(8, 127, 91, 0.1);
}

.client-filter-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
}

.client-filter-field > span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.client-table {
  min-width: 980px;
}

.client-table th,
.client-table td {
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: middle;
}

.client-table tbody tr:hover {
  background: #f8fcfa;
}

.client-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.client-app-cell,
.client-provider-cell,
.client-message-count {
  display: flex;
}

.client-app-cell,
.client-message-count {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.client-app-cell strong {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-app-cell code {
  color: var(--text-soft);
  font-size: 0.76rem;
}

.client-provider-cell {
  align-items: center;
  gap: 9px;
}

.client-provider-cell strong,
.client-provider-cell small {
  display: block;
}

.client-provider-cell small,
.client-message-count small {
  margin-top: 2px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.provider-inline-status {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(194, 65, 59, 0.1);
}

.provider-inline-status.active {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(22, 128, 93, 0.1);
}

.client-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.client-pagination span {
  min-width: 210px;
  color: var(--text-soft);
  text-align: center;
  font-size: 0.84rem;
  font-weight: 750;
}

.modal-backdrop {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 28px;
  background: rgba(5, 43, 37, 0.68);
  backdrop-filter: blur(5px);
}

.modal-card {
  width: min(100%, 620px);
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 26px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(4, 36, 31, 0.3);
}

.client-detail-modal {
  width: min(100%, 860px);
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.modal-heading h2 {
  margin: 4px 0 0;
}

.modal-close {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  color: var(--text-soft);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1.55rem;
  line-height: 1;
}

.field > small {
  margin-top: -3px;
  font-size: 0.76rem;
}

.field input[readonly] {
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 750;
}

.client-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.client-detail-grid > div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.client-detail-grid > div:nth-child(3n) {
  border-right: 0;
}

.client-detail-grid > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.client-detail-grid small,
.client-detail-grid strong,
.client-detail-grid code {
  display: block;
}

.client-detail-grid strong,
.client-detail-grid code {
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.client-detail-stats > div {
  padding: 15px;
  text-align: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.client-detail-stats strong,
.client-detail-stats span {
  display: block;
}

.client-detail-stats strong {
  color: var(--primary-dark);
  font-size: 1.3rem;
}

.client-detail-stats span {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.client-test-form {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.client-section-title h3 {
  margin: 4px 0 14px;
}

.client-test-fields {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 0.62fr);
  gap: 13px;
  margin-bottom: 13px;
}

.client-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 16px;
  background: #fff9f8;
  border: 1px solid #f3d5d1;
  border-radius: 13px;
}

.client-danger-zone strong,
.client-danger-zone small {
  display: block;
}

.client-danger-zone small {
  margin-top: 3px;
}

.client-danger-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

@media (max-width: 1100px) {
  .client-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-toolbar {
    grid-template-columns: 1fr 180px;
  }

  .client-search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .client-summary-grid,
  .client-detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-toolbar,
  .client-test-fields {
    grid-template-columns: 1fr;
  }

  .client-search-field {
    grid-column: auto;
  }

  .client-filter-field {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .client-detail-grid {
    grid-template-columns: 1fr;
  }

  .client-detail-grid > div,
  .client-detail-grid > div:nth-child(3n),
  .client-detail-grid > div:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .client-detail-grid > div:last-child {
    border-bottom: 0;
  }

  .client-danger-zone,
  .client-danger-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .client-pagination span {
    min-width: 0;
  }
}

@media (max-width: 460px) {
  .client-summary-grid {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    align-items: start;
    padding: 12px;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
    padding: 19px;
    border-radius: 16px;
  }
}

/* WAFALINK_WHACENTER_ONLY_UI */
.provider-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.provider-summary-card {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.provider-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--info);
}

.provider-summary-card.online::before {
  background: var(--success);
}

.provider-summary-card.degraded::before {
  background: var(--warning);
}

.provider-summary-card.offline::before {
  background: var(--danger);
}

.provider-summary-card span,
.provider-summary-card strong,
.provider-summary-card small {
  display: block;
}

.provider-summary-card span {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.provider-summary-card strong {
  margin: 7px 0 4px;
  font-size: 2rem;
  line-height: 1;
}

.provider-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: 20px;
  align-items: start;
}

/* WAFALINK_PROVIDER_HEALTH_V1 */
.dashboard-provider-health-panel {
  margin-bottom: 20px;
}

.dashboard-provider-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.provider-health-loading {
  grid-column: 1 / -1;
  padding: 24px;
  color: var(--text-soft);
  text-align: center;
  background: var(--surface-soft);
  border: 1px dashed var(--border);
  border-radius: 14px;
}

.dashboard-provider-health-card {
  position: relative;
  min-width: 0;
  padding: 17px;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.dashboard-provider-health-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--text-soft);
}

.dashboard-provider-health-card.online::before {
  background: var(--success);
}

.dashboard-provider-health-card.degraded::before {
  background: var(--warning);
}

.dashboard-provider-health-card.offline::before {
  background: var(--danger);
}

.dashboard-provider-health-head,
.dashboard-provider-health-metrics,
.provider-health-name,
.provider-health-status,
.provider-health-volume,
.provider-health-activity {
  display: flex;
}

.dashboard-provider-health-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-provider-health-head > div,
.provider-health-name,
.provider-health-status,
.provider-health-volume,
.provider-health-activity {
  min-width: 0;
}

.dashboard-provider-health-head strong,
.dashboard-provider-health-head small,
.provider-health-name strong,
.provider-health-name small,
.provider-health-status small,
.provider-health-volume strong,
.provider-health-volume small,
.provider-health-activity strong,
.provider-health-activity small {
  display: block;
}

.dashboard-provider-health-head strong {
  margin-bottom: 3px;
  font-size: 0.96rem;
}

.dashboard-provider-health-head small,
.dashboard-provider-health-footer,
.provider-health-name small,
.provider-health-status small,
.provider-health-volume small,
.provider-health-activity small,
.provider-health-checked-at {
  color: var(--text-soft);
  font-size: 0.75rem;
}

.dashboard-provider-health-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 15px 0 12px;
}

.dashboard-provider-health-metrics > div {
  min-width: 0;
  padding: 9px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.dashboard-provider-health-metrics strong,
.dashboard-provider-health-metrics small {
  display: block;
}

.dashboard-provider-health-metrics strong {
  margin-bottom: 2px;
  font-size: 0.9rem;
}

.dashboard-provider-health-metrics small {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.health-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px currentColor;
  opacity: 0.9;
}

.health-badge.online {
  color: #087f5b;
  background: #e8fff6;
}

.health-badge.degraded {
  color: #9a6700;
  background: #fff5d6;
}

.health-badge.offline {
  color: #b42318;
  background: #fff0ee;
}

.provider-health-panel {
  margin-bottom: 20px;
  overflow: hidden;
}

.provider-health-checked-at {
  align-self: center;
  white-space: nowrap;
}

.provider-health-table {
  min-width: 1280px;
}

.provider-health-table th,
.provider-health-table td {
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: middle;
}

.provider-health-name,
.provider-health-status,
.provider-health-volume,
.provider-health-activity {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.provider-health-name code {
  color: var(--primary-dark);
  font-size: 0.72rem;
}

.provider-health-volume strong {
  font-size: 0.84rem;
}

.provider-health-status .health-badge {
  margin-bottom: 3px;
}

.provider-health-rate {
  font-size: 1rem;
  font-weight: 900;
}

.provider-health-rate.good {
  color: var(--success);
}

.provider-health-rate.warning {
  color: #9a6700;
}

.provider-health-rate.danger {
  color: var(--danger);
}

.provider-health-check-button {
  min-width: 114px;
}

.provider-panel-heading {
  align-items: flex-start;
}

.provider-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.provider-form-full {
  grid-column: 1 / -1;
}

.provider-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}

.provider-test-form {
  margin-top: 0;
}

.provider-test-form .field textarea {
  min-height: 132px;
}

.provider-list-panel {
  margin-top: 20px;
  overflow: hidden;
}

.provider-table {
  min-width: 1040px;
}

.provider-table th,
.provider-table td {
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: middle;
}

.provider-name-cell,
.provider-token-cell {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.provider-name-cell strong,
.provider-name-cell small,
.provider-token-cell code,
.provider-token-cell small {
  display: block;
}

.provider-token-cell code,
.provider-table td > code {
  color: var(--primary-dark);
  font-size: 0.78rem;
}

.provider-token-cell small {
  font-size: 0.72rem;
}

.provider-url {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .provider-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .provider-content-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-provider-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sidebar-nav {
    grid-template-columns: repeat(5, minmax(112px, 1fr));
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
}

@media (max-width: 680px) {
  .dashboard-provider-health-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-provider-health-card {
    padding: 15px;
  }

  .provider-form-grid {
    grid-template-columns: 1fr;
  }

  .provider-form-full {
    grid-column: auto;
  }

  .provider-form-actions .button {
    flex: 1 1 180px;
  }
}

@media (max-width: 460px) {
  .provider-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* WAFALINK_MOBILE_COMPACT_V1 */

@media (max-width: 680px) {

  .sidebar {
    padding: 10px 8px 8px;
  }

  .sidebar-brand {
    padding: 0 4px 9px;
  }

  .sidebar-brand .brand-mark.small {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  .sidebar-nav {
    grid-template-columns:
      repeat(4, minmax(0, 1fr)) !important;
    gap: 4px;
    overflow: visible !important;
  }

  .nav-item {
    min-width: 0 !important;
    min-height: 52px;
    padding: 6px 2px;
    gap: 2px;
    font-size: 0.66rem;
    line-height: 1.15;
    text-align: center;
  }

  .nav-item span {
    font-size: 1rem;
  }

  .workspace {
    padding: 0 10px 24px;
  }

  .topbar {
    margin: 0 -10px 14px;
    padding: 12px 14px;
    min-height: 58px;
    align-items: center;
  }

  .topbar h1 {
    font-size: 1.2rem;
  }

  .topbar .eyebrow {
    font-size: 0.58rem;
  }

  .topbar-actions {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .topbar-actions .button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .hero-card {
    min-height: 0;
    margin-bottom: 14px;
    padding: 18px;
    gap: 12px;
    border-radius: 16px;
  }

  .hero-card h2 {
    margin: 4px 0 7px;
    font-size: 1.2rem;
  }

  .hero-card p {
    font-size: 0.78rem;
  }

  .gateway-badge {
    padding: 8px 11px;
    font-size: 0.72rem;
  }

  .status-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .status-card {
    min-width: 0;
    min-height: 105px;
    padding: 14px;
  }

  .status-card strong {
    font-size: 0.9rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .status-card small {
    font-size: 0.67rem;
  }

  .metric-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .metric-card {
    min-width: 0;
    min-height: 102px;
    padding: 14px;
  }

  .metric-card.clients {
    grid-column: 1 / -1;
  }

  .metric-card strong {
    font-size: 1.55rem;
  }

  .metric-card > span,
  .metric-card small {
    font-size: 0.7rem;
  }

  .panel {
    padding: 14px;
    border-radius: 16px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 430px) {

  .sidebar-nav {
    grid-template-columns:
      repeat(4, minmax(0, 1fr)) !important;
    overflow-x: visible !important;
  }

  .nav-item {
    min-width: 0 !important;
    font-size: 0.6rem;
  }

  .status-grid,
  .metric-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;
  }

  .metric-card.clients {
    grid-column: 1 / -1;
  }
}


/* =========================================================
   WAFALINK_MOBILE_BOTTOM_NAV_V1
   ========================================================= */

@media (max-width: 900px) {

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed !important;
    top: auto !important;
    right: 0;
    bottom: 0;
    left: 0;

    width: 100% !important;
    height: auto !important;

    z-index: 1000;

    padding:
      6px
      8px
      calc(6px + env(safe-area-inset-bottom));

    border-top: 1px solid rgba(255, 255, 255, 0.12);

    box-shadow:
      0 -8px 28px rgba(0, 0, 0, 0.14);
  }

  .sidebar-brand,
  .sidebar-footer {
    display: none !important;
  }

  .sidebar-nav {
    display: grid !important;

    grid-template-columns:
      repeat(4, minmax(0, 1fr)) !important;

    gap: 4px;

    width: 100%;

    overflow: visible !important;
  }

  .nav-item {
    min-width: 0 !important;
    min-height: 54px !important;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 2px;

    padding: 5px 2px !important;

    border-radius: 12px;

    font-size: 0.62rem !important;
    line-height: 1.15;

    text-align: center;
    white-space: normal;
  }

  .nav-item span {
    display: block;

    font-size: 1.05rem;
    line-height: 1;
  }

  .nav-item.active {
    transform: none;
  }

  .workspace {
    padding-bottom:
      calc(92px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 430px) {

  .sidebar {
    padding-left: 6px;
    padding-right: 6px;
  }

  .sidebar-nav {
    grid-template-columns:
      repeat(4, minmax(0, 1fr)) !important;

    overflow: visible !important;
  }

  .nav-item {
    min-width: 0 !important;
    min-height: 52px !important;

    padding: 4px 1px !important;

    font-size: 0.58rem !important;
  }

  .nav-item span {
    font-size: 1rem;
  }
}


/* =========================================================
   WAFALINK_MOBILE_BOTTOM_NAV_V2_SOFT_DOCK
   ========================================================= */

@media (max-width: 900px) {

  .sidebar {
    position: fixed !important;
    top: auto !important;
    left: 10px !important;
    right: 10px !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;

    width: auto !important;
    height: auto !important;

    padding: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 24px !important;

    background:
      linear-gradient(
        135deg,
        rgba(4, 72, 58, 0.98),
        rgba(2, 89, 67, 0.96)
      ) !important;

    box-shadow:
      0 14px 36px rgba(0, 0, 0, 0.20),
      0 4px 12px rgba(0, 0, 0, 0.10) !important;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    overflow: hidden;
    z-index: 1000 !important;
  }

  .sidebar-brand,
  .sidebar-footer {
    display: none !important;
  }

  .sidebar-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100%;
    overflow: visible !important;
  }

  .nav-item {
    min-width: 0 !important;
    min-height: 58px !important;
    padding: 8px 4px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;

    border-radius: 16px !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.82) !important;

    font-size: 0.72rem !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: normal !important;

    transition:
      background 0.2s ease,
      color 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.2s ease !important;
  }

  .nav-item span {
    display: block !important;
    font-size: 1.1rem !important;
    line-height: 1 !important;
    margin-bottom: 1px;
  }

  .nav-item:hover {
    transform: none !important;
    background: rgba(255, 255, 255, 0.06) !important;
  }

  .nav-item.active {
    color: #17372d !important;
    background:
      linear-gradient(
        180deg,
        #f4d56b 0%,
        #e0bb45 100%
      ) !important;

    box-shadow:
      0 8px 18px rgba(0, 0, 0, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;

    transform: translateY(-1px) !important;
  }

  .nav-item.active span {
    color: #17372d !important;
  }

  .workspace {
    padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 430px) {

  .sidebar {
    left: 8px !important;
    right: 8px !important;
    bottom: max(6px, env(safe-area-inset-bottom)) !important;

    padding: 7px !important;
    border-radius: 22px !important;
  }

  .sidebar-nav {
    gap: 5px !important;
  }

  .nav-item {
    min-height: 54px !important;
    padding: 7px 2px !important;
    font-size: 0.66rem !important;
    border-radius: 14px !important;
  }

  .nav-item span {
    font-size: 1rem !important;
  }

  .workspace {
    padding-bottom: calc(102px + env(safe-area-inset-bottom)) !important;
  }
}

