/* OTPHUB PRO - Cyber Dark & Clean Modern Light Theme */
html {
  font-size: 16px;
  letter-spacing: -0.01em;
}

html:not(.dark) {
  color-scheme: light;
  background-color: #f8fafc;
}

html.dark {
  color-scheme: dark;
  background-color: #070a12;
}

/* ================= ADMIN OPERATIONS CENTER — PHASE 3 =================
   Desktop backoffice only. Compact desktop widths use readable cards while
   wide desktop widths retain the higher-density operational tables. */
@media (min-width: 1024px) {
  #admin-backoffice-container .admin-operations-view {
    max-width: 1500px;
    margin-inline: auto;
  }

  #admin-backoffice-container .admin-operations-header,
  #admin-backoffice-container .admin-operations-toolbar,
  #admin-backoffice-container .admin-operations-panel,
  #admin-backoffice-container .admin-orders-table-view,
  #admin-backoffice-container .admin-ticket-table-view {
    min-width: 0;
  }

  #admin-backoffice-container .admin-operations-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid rgba(56, 189, 248, .24);
    border-radius: 999px;
    background: rgba(14, 165, 233, .08);
    padding: .25rem .6rem;
    color: #7dd3fc;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  #admin-backoffice-container .admin-operations-eyebrow > span {
    width: .38rem;
    height: .38rem;
    border-radius: 999px;
    background: #38bdf8;
    box-shadow: 0 0 0 .18rem rgba(56, 189, 248, .12);
  }

  #admin-backoffice-container .admin-operations-kpi-grid > *,
  #admin-backoffice-container .admin-email-kpi-grid > *,
  #admin-backoffice-container .admin-ticket-kpi-grid > * {
    min-width: 0;
  }

  #admin-backoffice-container .admin-email-kpi-card {
    display: flex;
    min-height: 92px;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #263247;
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, .96), rgba(10, 16, 30, .96));
    padding: .85rem 1rem;
    box-shadow: 0 12px 28px rgba(2, 6, 23, .16);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  }

  #admin-backoffice-container button.admin-email-kpi-card:hover,
  #admin-backoffice-container button.ticket-kpi-card:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, .55);
    box-shadow: 0 15px 32px rgba(2, 6, 23, .22);
  }

  #admin-backoffice-container .admin-email-kpi-card span {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
  }

  #admin-backoffice-container .admin-email-kpi-card strong {
    margin-top: .2rem;
    color: #f8fafc;
    font: 900 1.45rem var(--font-mono);
  }

  #admin-backoffice-container .admin-email-kpi-card small,
  #admin-backoffice-container .ticket-kpi-card small {
    margin-top: .15rem;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
  }

  #admin-backoffice-container .admin-email-kpi-waiting {
    border-color: rgba(245, 158, 11, .32);
    background: linear-gradient(145deg, rgba(69, 39, 9, .46), rgba(15, 23, 42, .96));
  }

  #admin-backoffice-container .admin-email-kpi-waiting strong { color: #fbbf24; }

  #admin-backoffice-container .admin-email-kpi-success {
    border-color: rgba(16, 185, 129, .32);
    background: linear-gradient(145deg, rgba(5, 78, 59, .42), rgba(15, 23, 42, .96));
  }

  #admin-backoffice-container .admin-email-kpi-success strong { color: #34d399; }

  #admin-backoffice-container .ticket-kpi-card {
    cursor: pointer;
    text-align: left;
  }

  #admin-backoffice-container .ticket-kpi-card.is-active {
    outline: 2px solid rgba(56, 189, 248, .55);
    outline-offset: 2px;
  }

  #admin-backoffice-container .admin-ticket-header {
    grid-template-columns: minmax(0, 1fr);
  }

  #admin-backoffice-container .admin-ticket-toolbar select {
    min-width: 210px;
  }

  #admin-backoffice-container .admin-orders-card-list,
  #admin-backoffice-container .admin-emails-card-list,
  #admin-backoffice-container .admin-ticket-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
  }

  #admin-backoffice-container .admin-orders-card,
  #admin-backoffice-container .admin-email-activation-card {
    min-width: 0;
    border: 1px solid #273449;
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, .96), rgba(9, 15, 28, .98));
    padding: 1rem;
    box-shadow: 0 12px 28px rgba(2, 6, 23, .16);
  }

  #admin-backoffice-container .admin-orders-card__head,
  #admin-backoffice-container .admin-email-activation-card__head {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
  }

  #admin-backoffice-container .admin-orders-card__identity,
  #admin-backoffice-container .admin-email-activation-card__identity {
    min-width: 0;
  }

  #admin-backoffice-container .admin-orders-card__title,
  #admin-backoffice-container .admin-email-activation-card__title {
    overflow: hidden;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #admin-backoffice-container .admin-orders-card__meta,
  #admin-backoffice-container .admin-email-activation-card__meta {
    margin-top: .2rem;
    color: #94a3b8;
    font-size: 10px;
  }

  #admin-backoffice-container .admin-orders-card__grid,
  #admin-backoffice-container .admin-email-activation-card__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin-top: .75rem;
    border-top: 1px solid #253146;
    padding-top: .75rem;
  }

  #admin-backoffice-container .admin-orders-card__grid span,
  #admin-backoffice-container .admin-email-activation-card__grid span {
    display: block;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
  }

  #admin-backoffice-container .admin-orders-card__grid strong,
  #admin-backoffice-container .admin-email-activation-card__grid strong {
    display: block;
    overflow: hidden;
    margin-top: .15rem;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #admin-backoffice-container .admin-orders-card__actions,
  #admin-backoffice-container .admin-email-activation-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-top: .8rem;
  }

  #admin-backoffice-container .admin-operations-empty {
    grid-column: 1 / -1;
    border: 1px dashed #334155;
    border-radius: 1rem;
    background: rgba(15, 23, 42, .72);
    padding: 2rem 1rem;
    color: #94a3b8;
    text-align: center;
    font-size: 11px;
  }

  #admin-backoffice-container .admin-email-activation-dialog {
    width: min(1120px, calc(100vw - 2rem));
  }

  html:not(.dark) #admin-backoffice-container .admin-email-kpi-card,
  html:not(.dark) #admin-backoffice-container .admin-orders-card,
  html:not(.dark) #admin-backoffice-container .admin-email-activation-card,
  html:not(.dark) #admin-backoffice-container .admin-operations-empty {
    border-color: #dbe3ef;
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .055);
  }

  html:not(.dark) #admin-backoffice-container .admin-email-kpi-card strong,
  html:not(.dark) #admin-backoffice-container .admin-orders-card__title,
  html:not(.dark) #admin-backoffice-container .admin-email-activation-card__title,
  html:not(.dark) #admin-backoffice-container .admin-orders-card__grid strong,
  html:not(.dark) #admin-backoffice-container .admin-email-activation-card__grid strong {
    color: #0f172a;
  }

  html:not(.dark) #admin-backoffice-container .admin-email-kpi-waiting { border-color: #fde68a; background: #fffbeb; }
  html:not(.dark) #admin-backoffice-container .admin-email-kpi-success { border-color: #a7f3d0; background: #f0fdf4; }
  html:not(.dark) #admin-backoffice-container .admin-orders-card__grid,
  html:not(.dark) #admin-backoffice-container .admin-email-activation-card__grid { border-top-color: #e2e8f0; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  #admin-backoffice-container .admin-orders-table-view,
  #admin-backoffice-container .admin-emails-table-view,
  #admin-backoffice-container .admin-ticket-table-view {
    display: none;
  }

  #admin-backoffice-container .admin-operations-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #admin-backoffice-container .admin-email-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #admin-backoffice-container .admin-email-control-grid {
    grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
  }
}

@media (min-width: 1280px) {
  #admin-backoffice-container .admin-orders-card-list,
  #admin-backoffice-container .admin-emails-card-list,
  #admin-backoffice-container .admin-ticket-card-list {
    display: none;
  }

  #admin-backoffice-container .admin-orders-table-view,
  #admin-backoffice-container .admin-emails-table-view,
  #admin-backoffice-container .admin-ticket-table-view {
    display: block;
  }

  #admin-backoffice-container .admin-ticket-header {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 520px);
    align-items: center;
  }

  #admin-backoffice-container .admin-ticket-toolbar {
    grid-column: 1 / -1;
  }
}
/* ================= END ADMIN OPERATIONS CENTER — PHASE 3 ================= */

:root {
  --font-sans: 'Plus Jakarta Sans', 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --admin-header-height: 64px;
  --admin-content-gutter: clamp(1rem, 2vw, 2rem);
}

/* Admin views must fill the space beside the sidebar.  A max-width container
   combined with auto margins was pushing some tabs to the far right on wide
   screens, leaving a large empty area on the left. */
#admin-backoffice-container {
  width: 100%;
  min-width: 0;
  position: fixed;
  inset: 0;
  overflow: hidden;
}
#admin-backoffice-container .admin-sidebar {
  height: 100%;
  overflow: hidden;
}
#admin-backoffice-container .admin-topbar {
  flex: 0 0 var(--admin-header-height);
}
#admin-backoffice-container .admin-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
#admin-backoffice-container > .flex-1 {
  min-width: 0;
}
#admin-backoffice-container > .flex-1 > main {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  overflow-anchor: none;
  height: calc(100vh - var(--admin-header-height));
  max-height: calc(100vh - var(--admin-header-height));
}
#admin-backoffice-container .admin-tab-view {
  width: 100%;
  min-width: 0;
}
.hidden,
[hidden],
.admin-tab-view.hidden,
#admin-backoffice-container .admin-tab-view.hidden,
#admin-backoffice-container section.hidden,
.tab-view.hidden,
#storefront-container .tab-view.hidden {
  display: none !important;
}

/* Shared admin page chrome. */
#admin-backoffice-container > .flex-1 > main {
  padding: var(--admin-content-gutter);
  gap: 1.5rem;
}
#admin-backoffice-container .admin-tab-view > div:first-child:not(#admin-system-real-root) {
  min-height: 3.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem 1rem;
}
#admin-backoffice-container .admin-tab-view > div:first-child:not(#admin-system-real-root) h1,
#admin-backoffice-container .admin-tab-view > div:first-child:not(#admin-system-real-root) h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: -.02em;
}
#admin-backoffice-container .admin-tab-view > div:first-child:not(#admin-system-real-root) p {
  margin-top: .25rem;
  line-height: 1.4;
}
#admin-backoffice-container .admin-tab-view > div:first-child:not(#admin-system-real-root) > :last-child {
  flex-shrink: 0;
}

/* Header must stay single-line even when browser zoom makes the workspace
   narrower than the physical screen suggests. */
#admin-backoffice-container header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  height: var(--admin-header-height);
  min-height: var(--admin-header-height);
  padding-inline: var(--admin-content-gutter);
  overflow: hidden;
}
#admin-backoffice-container .admin-header-standard {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--admin-header-height);
  height: var(--admin-header-height);
  padding-inline: var(--admin-content-gutter);
  background: rgba(11, 13, 23, .96);
  border-bottom: 1px solid rgba(30, 41, 59, .85);
}
#admin-backoffice-container .admin-header-search {
  width: min(100%, 400px);
  max-width: 400px;
}
#admin-backoffice-container .admin-header-standard > :last-child {
  display: flex;
  align-items: center;
  gap: .5rem;
}
#admin-backoffice-container .admin-header-standard button,
#admin-backoffice-container .admin-header-standard #admin-header-provider-health {
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
}
#admin-backoffice-container header > :first-child { min-width: 0; }
#admin-backoffice-container header > :last-child {
  justify-self: end;
  margin-left: 0;
  height: 100%;
  align-items: center;
}
#admin-backoffice-container header > :last-child > button,
#admin-backoffice-container #admin-header-provider-health {
  min-height: 40px;
  white-space: nowrap;
}
@media (max-width: 1200px) {
  #admin-header-provider-health,
  #admin-global-search,
  #admin-switch-to-storefront-btn { display: none !important; }
}

/* ================= THEME BASE STYLES ================= */

/* Single-page login/register surface: warm gold premium treatment with a
   brighter highlight concentrated at the upper-right corner. */
.auth-main-panel {
  isolation: isolate;
  background:
    radial-gradient(circle at 100% 0%, #f3dfaa 0%, rgba(239, 208, 128, .24) 12%, rgba(250, 233, 178, .12) 28%, rgba(255, 250, 232, .05) 44%, transparent 62%),
    #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 28px 80px rgba(72, 48, 0, .12), 0 0 0 1px rgba(255, 255, 255, .95) inset, 16px -16px 58px rgba(180, 112, 0, .10);
  color: #1e293b;
}

.auth-main-panel::after {
  content: "";
  position: absolute;
  width: 15rem;
  height: 15rem;
  top: -7rem;
  right: -6rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 245, 200, .42) 0%, rgba(251, 191, 36, .14) 38%, transparent 72%);
  filter: blur(3px);
  pointer-events: none;
  z-index: -1;
}

.auth-main-panel label,
.auth-main-panel h2,
.auth-main-panel p,
.auth-main-panel span {
  color: #334155;
}

.auth-main-panel input {
  background: #ffffff !important;
  border-color: rgba(203, 169, 76, .48) !important;
  color: #0f172a !important;
  box-shadow: 0 8px 22px rgba(120, 72, 0, .08), 0 0 0 1px rgba(255, 255, 255, .75) inset;
}

.auth-main-panel input::placeholder { color: #94a3b8 !important; }
.auth-main-panel input:focus {
  border-color: rgba(217, 119, 6, .9) !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .16), 0 10px 24px rgba(120, 72, 0, .12);
}

.auth-main-panel .bg-slate-100,
.auth-main-panel .dark\:bg-slate-800\/80 {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
}

/* Logged-out storefront: keep the clean white treatment only when light mode
   is active so a saved dark preference is never repainted white after auth. */
html:not(.dark) body.auth-logged-out {
  background: #ffffff !important;
  color: #0f172a !important;
}
html:not(.dark) body.auth-logged-out #storefront-container,
html:not(.dark) body.auth-logged-out #storefront-container > header,
html:not(.dark) body.auth-logged-out #storefront-container > main {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html:not(.dark) body.auth-logged-out #storefront-container > header {
  box-shadow: 0 1px 10px rgba(15, 23, 42, .06);
}
html:not(.dark) body.auth-logged-out #storefront-container [class*="bg-slate-950"],
html:not(.dark) body.auth-logged-out #storefront-container [class*="bg-slate-900"],
html:not(.dark) body.auth-logged-out #storefront-container [class*="bg-slate-800"],
html:not(.dark) body.auth-logged-out #storefront-container [class*="bg-[#"] {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html:not(.dark) body.auth-logged-out #storefront-container [class*="text-white"],
html:not(.dark) body.auth-logged-out #storefront-container [class*="text-slate-100"],
html:not(.dark) body.auth-logged-out #storefront-container [class*="text-slate-200"] {
  color: #0f172a !important;
}
html:not(.dark) body.auth-logged-out #storefront-container [class*="text-slate-300"],
html:not(.dark) body.auth-logged-out #storefront-container [class*="text-slate-400"] {
  color: #64748b !important;
}
html:not(.dark) body.auth-logged-out #storefront-container [class*="border-slate-"] {
  border-color: #e2e8f0 !important;
}
/* Light Mode (Default) */
html:not(.dark) body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dark Mode */
html.dark body {
  font-family: var(--font-sans);
  background-color: #070a12;
  color: #f1f5f9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================= LIGHT MODE COMPONENT OVERRIDES ================= */
html:not(.dark) header {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html:not(.dark) aside,
html:not(.dark) main,
html:not(.dark) section,
html:not(.dark) .bg-\[\#0B0D17\],
html:not(.dark) .bg-\[\#0B0D17\]\/95,
html:not(.dark) .bg-\[\#0b1120\]\/90,
html:not(.dark) .bg-\[\#0F1123\]\/90,
html:not(.dark) .bg-\[\#0F1123\]\/80,
html:not(.dark) .bg-\[\#0b0d17\]\/90 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

html:not(.dark) .border-slate-800,
html:not(.dark) .border-slate-800\/80,
html:not(.dark) .border-slate-800\/90,
html:not(.dark) .border-slate-800\/60,
html:not(.dark) .border-slate-700,
html:not(.dark) .border-slate-700\/70,
html:not(.dark) .border-slate-700\/80,
html:not(.dark) .border-slate-700\/60 {
  border-color: #e2e8f0 !important;
}

html:not(.dark) .bg-slate-950,
html:not(.dark) .bg-slate-950\/90,
html:not(.dark) .bg-slate-950\/80,
html:not(.dark) .bg-slate-950\/70,
html:not(.dark) .bg-slate-900,
html:not(.dark) .bg-slate-900\/90,
html:not(.dark) .bg-slate-900\/80,
html:not(.dark) .bg-slate-900\/60,
html:not(.dark) .bg-slate-900\/50,
html:not(.dark) .bg-slate-900\/40,
html:not(.dark) .bg-slate-900\/30,
html:not(.dark) .bg-slate-900\/20 {
  background-color: #f8fafc !important;
}

html:not(.dark) .bg-slate-800,
html:not(.dark) .bg-slate-800\/90,
html:not(.dark) .bg-slate-800\/80,
html:not(.dark) .bg-slate-800\/70,
html:not(.dark) .bg-slate-800\/60,
html:not(.dark) .bg-slate-800\/50,
html:not(.dark) .bg-slate-800\/40,
html:not(.dark) .bg-slate-800\/30,
html:not(.dark) .bg-slate-800\/20 {
  background-color: #f1f5f9 !important;
}

html:not(.dark) .text-white,
html:not(.dark) .text-slate-100,
html:not(.dark) .text-slate-200 {
  color: #0f172a !important;
}

html:not(.dark) .text-slate-300,
html:not(.dark) .text-slate-400 {
  color: #475569 !important;
}

html:not(.dark) .text-slate-500 {
  color: #64748b !important;
}

html:not(.dark) .text-slate-600 {
  color: #94a3b8 !important;
}

html:not(.dark) input,
html:not(.dark) select,
html:not(.dark) textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
  color: #94a3b8 !important;
}

html:not(.dark) .glass-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
}

html:not(.dark) .glass-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) .glass-card:hover {
  border-color: #818cf8 !important;
  background: #f8fafc !important;
}

/* Gradients in Light Mode */
html:not(.dark) [class*="from-slate-900"],
html:not(.dark) [class*="from-slate-950"],
html:not(.dark) [class*="from-indigo-950"],
html:not(.dark) [class*="from-[#0"],
html:not(.dark) [class*="from-[#1"] {
  --tw-gradient-from: #f8fafc !important;
  --tw-gradient-to: #f1f5f9 !important;
  --tw-gradient-stops: #f8fafc, #f1f5f9 !important;
}

html:not(.dark) [class*="from-emerald-950"] {
  --tw-gradient-from: #ecfdf5 !important;
  --tw-gradient-to: #d1fae5 !important;
  --tw-gradient-stops: #ecfdf5, #d1fae5 !important;
}

html:not(.dark) [class*="bg-emerald-950"] {
  background-color: #ecfdf5 !important;
}

html:not(.dark) [class*="bg-rose-950"] {
  background-color: #fff1f2 !important;
}

html:not(.dark) [class*="bg-indigo-950"] {
  background-color: #eef2ff !important;
}

html:not(.dark) [class*="bg-amber-950"] {
  background-color: #fffbeb !important;
}

/* Selected Service/Country Item Style in Light Mode (Emerald & Slate Theme) */
.item-selectable {
  width: 100% !important;
  box-sizing: border-box !important;
}

html:not(.dark) .item-selectable {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

html:not(.dark) .item-selectable:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

html:not(.dark) .item-selectable.selected {
  background: #f0fdf4 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 1px #10b981, 0 2px 8px rgba(16, 185, 129, 0.12) !important;
}

html:not(.dark) #step1-collapsed-view {
  background: #f0fdf4 !important;
  border-color: #10b981 !important;
}

html:not(.dark) #step1-collapsed-view span,
html:not(.dark) #step1-collapsed-view h4,
html:not(.dark) #step1-collapsed-view h3 {
  color: #0f172a !important;
}

html:not(.dark) #left-steps-scroll-container {
  background-color: #ffffff !important;
}

html:not(.dark) .category-chip:not(.bg-indigo-600) {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}

html:not(.dark) .country-filter-pill:not(.bg-indigo-600) {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}

html:not(.dark) .admin-timeframe-btn:not(.bg-indigo-600) {
  color: #64748b !important;
}
html:not(.dark) .admin-timeframe-btn:not(.bg-indigo-600):hover {
  color: #0f172a !important;
}

html:not(.dark) .admin-nav-link:not(.active) {
  color: #475569 !important;
}
html:not(.dark) .admin-nav-link:not(.active):hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}
html:not(.dark) .admin-nav-link.active {
  background-color: #eef2ff !important;
  color: #4f46e5 !important;
}

/* Tables in Light Mode */
html:not(.dark) table {
  background-color: #ffffff !important;
}
html:not(.dark) th {
  background-color: #f8fafc !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}
html:not(.dark) td {
  border-color: #f1f5f9 !important;
  color: #1e293b !important;
}
html:not(.dark) tr:hover {
  background-color: rgba(241, 245, 249, 0.8) !important;
}

/* Modals & Drawers in Light Mode */
html:not(.dark) .modal-backdrop {
  background: rgba(15, 23, 42, 0.45) !important;
}
html:not(.dark) #auth-modal > div,
html:not(.dark) #topup-modal > div,
html:not(.dark) #member-drawer > div,
html:not(.dark) #admin-drawer-container > div {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Dropdown Menus in Light Mode */
html:not(.dark) #user-profile-dropdown,
html:not(.dark) .dropdown-action-menu {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
}

html:not(.dark) .dropdown-action-item {
  color: #334155 !important;
}
html:not(.dark) .dropdown-action-item:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Copy & Action Buttons in Light Mode */
html:not(.dark) .copy-intl-btn,
html:not(.dark) .copy-local-btn,
html:not(.dark) .cancel-order-btn,
html:not(.dark) .request-second-sms-btn {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

html:not(.dark) .copy-intl-btn:hover,
html:not(.dark) .copy-local-btn:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Countdown & OTP Badges in Light Mode */
html:not(.dark) .countdown-badge {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

html:not(.dark) .otp-display-badge {
  color: #059669 !important;
  text-shadow: none !important;
}

/* ================= DARK MODE COMPONENT STYLES ================= */
html.dark .glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

html.dark .glass-card {
  background: rgba(17, 24, 39, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark .glass-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(30, 41, 59, 0.75);
}

html.dark .item-selectable:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(99, 102, 241, 0.4);
}
html.dark .item-selectable.selected {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(124, 58, 237, 0.15) 100%);
  border-color: #6366f1;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

/* ================= SCROLLBARS ================= */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(100, 116, 139, 0.1);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #1e293b;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ================= ANIMATIONS & EFFECTS ================= */
@keyframes radarWave {
  0% { transform: scale(0.85); opacity: 0.9; }
  50% { transform: scale(1.4); opacity: 0.35; }
  100% { transform: scale(2.0); opacity: 0; }
}

.radar-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background-color: rgba(99, 102, 241, 0.35);
  animation: radarWave 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.otp-display-badge {
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-shadow: 0 0 25px rgba(52, 211, 153, 0.6), 0 0 50px rgba(16, 185, 129, 0.3);
  animation: otpPopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes otpPopIn {
  0% { transform: scale(0.85); opacity: 0; }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.header-nav-link.active {
  color: #059669 !important;
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  font-weight: 800;
}
html.dark .header-nav-link.active {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
}

/* Luxury Premium Brand Badge (High contrast for both Light & Dark modes) */
.badge-premium {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.5);
  user-select: none;
  transition: all 0.2s ease;
}

html.dark .badge-premium {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
}

/* Hide top navigation tabs, header controls & floating support button when unauthenticated/guest */
body.is-guest #header-main-nav,
body.is-guest #header-right-controls,
body.is-guest #floating-support-btn,
body.is-guest #header-guest-buttons,
body.is-guest #header-balance-capsule,
body.is-guest #user-profile-menu-btn,
body.is-guest #user-profile-dropdown {
  display: none !important;
}

#toast-container {
  pointer-events: none;
  z-index: 9999;
}
.toast-msg {
  pointer-events: auto;
  animation: slideToastIn 0.25s ease-out forwards;
}

/* Sound toggle feedback intentionally uses inverse contrast for quick visibility. */
html.dark .sound-theme-toast {
  background: #fff !important;
  color: #111827 !important;
  border-color: #111827 !important;
  box-shadow: 0 12px 30px rgba(255, 255, 255, .12) !important;
}
html.dark .sound-theme-toast * {
  color: #111827 !important;
}
html:not(.dark) .sound-theme-toast {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22) !important;
}
html:not(.dark) .sound-theme-toast * {
  color: #fff !important;
}

@keyframes slideToastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ================= LIVE OTP ORDER CARDS ================= */
.otp-live-panel {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px -22px rgba(15, 23, 42, .45);
  overflow: hidden;
}
.otp-live-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}
.otp-live-panel__eyebrow { display: flex; align-items: center; gap: 6px; color: #059669; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.otp-live-panel h2 { margin: 3px 0 0; color: #0f172a; font-size: 16px; font-weight: 800; }
.otp-live-panel h2 span { color: #64748b; font-size: 12px; font-weight: 600; }
.otp-status-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.otp-summary-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border: 1px solid #e2e8f0; border-radius: 999px; color: #64748b; background: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.otp-summary-chip b { font-family: var(--font-mono); color: #0f172a; }
.otp-summary-chip.waiting { border-color: #bae6fd; background: #f0f9ff; color: #0369a1; }
.otp-summary-chip.received { border-color: #bbf7d0; background: #f0fdf4; color: #047857; }
.otp-summary-chip.expired { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.otp-orders-scroll { display: grid; gap: 10px; max-height: min(58vh, 620px); overflow: auto; padding: 12px; }
.otp-order-card { display: grid; grid-template-columns: minmax(270px, 1.5fr) minmax(150px, .55fr) minmax(210px, 1fr) auto; align-items: center; gap: 14px; min-width: 0; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 2px 7px rgba(15,23,42,.035); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.otp-order-card:hover { border-color: #a7f3d0; box-shadow: 0 8px 22px -16px rgba(16,185,129,.45); transform: translateY(-1px); }
.otp-order-card__main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.otp-service-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 42px; height: 42px; padding: 9px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.otp-number-block { min-width: 0; }
.otp-service-country { display: flex; align-items: center; gap: 6px; min-width: 0; color: #64748b; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.otp-service-country__separator { color: #cbd5e1; }
.otp-phone-row { display: flex; align-items: center; gap: 7px; margin-top: 4px; min-width: 0; }
.otp-country-code { flex: 0 0 auto; color: #0f172a; font-family: var(--font-mono); font-size: 16px; font-weight: 800; letter-spacing: .035em; }
.otp-phone-number { overflow: hidden; color: #0f172a; font-family: var(--font-mono); font-size: 16px; font-weight: 800; letter-spacing: .035em; text-overflow: ellipsis; white-space: nowrap; }
.otp-phone-private { color: #64748b; font-size: 13px; font-weight: 800; }
.otp-number-actions--private { color: #94a3b8; }
.otp-phone-copy, .otp-copy-btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border: 0; cursor: pointer; }
.otp-phone-copy { width: 28px; height: 28px; border-radius: 8px; background: #ecfdf5; color: #059669; transition: background .15s ease, transform .15s ease; }
.otp-phone-copy:hover { background: #d1fae5; transform: scale(1.04); }
.otp-number-actions { display: flex; align-items: center; gap: 8px; margin-top: 5px; color: #94a3b8; font-size: 10px; font-weight: 700; }
.otp-copy-number-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border: 1px solid #dbeafe; border-radius: 7px; color: #2563eb; background: #f8fbff; cursor: pointer; font: inherit; white-space: nowrap; transition: all .15s ease; }
.otp-copy-number-btn:hover { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.otp-copy-number-btn--local { border-color: #bbf7d0; color: #047857; background: #f0fdf4; }
.otp-copy-number-btn--local:hover { border-color: #86efac; background: #dcfce7; color: #065f46; }
.otp-copy-number-btn,
.otp-copy-number-btn--local { border-color: #0f172a; background: #0f172a; color: #fff; }
.otp-copy-number-btn:hover,
.otp-copy-number-btn--local:hover { border-color: #000; background: #000; color: #fff; }
.otp-order-card__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 18px; }
.otp-meta-item { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; min-width: 0; min-height: 48px; }
.otp-meta-item > span:first-child { color: #94a3b8; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.otp-meta-item strong { color: #0f172a; font-family: var(--font-mono); font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.otp-timer { width: max-content; min-width: 68px; padding: 7px 0; border: 0; border-radius: 0; background: transparent; color: #0f172a; font-family: var(--font-mono); font-size: 15px; font-weight: 800; letter-spacing: .03em; line-height: 1; text-align: left; box-shadow: none; }
html:not(.dark) .otp-meta-item strong { color: #0f172a !important; opacity: 1 !important; }
html:not(.dark) .otp-timer { color: #0f172a !important; opacity: 1 !important; }
.otp-order-card__status { min-width: 0; }
.otp-state { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.otp-status-badge { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; padding: 5px 8px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.otp-status-dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; box-shadow: 0 0 0 4px currentColor; opacity: .2; animation: otpWaitingPulse 1.6s ease-in-out infinite; }
.otp-state--waiting .otp-status-badge { border-color: #bae6fd; background: #f0f9ff; color: #0369a1; }
.otp-state--received .otp-status-badge { border-color: #bbf7d0; background: #f0fdf4; color: #047857; }
.otp-state--expired .otp-status-badge { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.otp-state--cancelled .otp-status-badge { border-color: #e2e8f0; background: #f8fafc; color: #64748b; }
.otp-state__hint, .otp-state__message { overflow: hidden; color: #64748b; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.otp-state--waiting .otp-state__hint { display: inline-flex; align-items: center; gap: 4px; color: #0891b2; }
.otp-code-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.otp-code-row .otp-display-badge { color: #047857; font-size: 22px; line-height: 1; }
.otp-copy-btn { gap: 5px; padding: 7px 9px; border-radius: 9px; background: #059669; color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 3px 8px -4px rgba(5,150,105,.7); transition: background .15s ease, transform .15s ease; }
.otp-copy-btn:hover { background: #047857; transform: translateY(-1px); }
.otp-order-card__action { display: flex; justify-content: flex-end; }
.otp-cancel-btn, .otp-finish-btn, .otp-resend-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: 1px solid; border-radius: 9px; font-size: 11px; font-weight: 800; cursor: pointer; transition: all .15s ease; white-space: nowrap; }
.otp-cancel-btn { border-color: #fecdd3; background: #fff1f2; color: #be123c; }
.otp-cancel-btn:hover { border-color: #fda4af; background: #ffe4e6; }
.otp-cancel-btn:disabled { cursor: not-allowed; opacity: .6; filter: grayscale(.35); }
.otp-cancel-btn:disabled:hover { border-color: #fecdd3; background: #fff1f2; transform: none; }
.otp-finish-btn { border-color: #dbeafe; background: #f8fbff; color: #2563eb; }
.otp-finish-btn:hover { border-color: #bfdbfe; background: #eff6ff; }
.otp-resend-btn { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.otp-resend-btn:hover { border-color: #6ee7b7; background: #d1fae5; }
.otp-resend-btn:disabled { cursor: not-allowed; opacity: .58; filter: grayscale(.25); }
.otp-resend-btn:disabled:hover { border-color: #a7f3d0; background: #ecfdf5; transform: none; }
.otp-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1 1 auto;
  min-height: 480px;
  padding: 56px 28px;
  border: 2px dashed #cbd5e1;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.otp-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: #ecfdf5;
  color: #059669;
}
.otp-empty-state h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}
.otp-empty-state p {
  max-width: 480px;
  margin: 10px auto 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}
@keyframes otpWaitingPulse { 0%, 100% { opacity: .2; transform: scale(.85); } 50% { opacity: .42; transform: scale(1); } }

html.dark .otp-live-panel { border-color: rgba(148,163,184,.16); background: rgba(15,23,42,.78); box-shadow: 0 12px 28px -22px rgba(0,0,0,.8); }
html.dark .otp-live-panel__header { border-color: rgba(148,163,184,.12); background: rgba(15,23,42,.55); }
html.dark .otp-live-panel h2, html.dark .otp-phone-number, html.dark .otp-meta-item strong { color: #f8fafc; }
html.dark .otp-country-code { color: #f8fafc; }

/* Keep the profile menu at the far right on desktop while preserving the
   normal in-flow dropdown on touch/mobile layouts. */
@media (min-width: 640px) {
  #user-profile-dropdown {
    position: fixed;
    top: 76px;
    right: 14px;
    margin-top: 0;
  }
}

/* Desktop: each information group owns an equal visual column. */
@media (min-width: 1101px) {
  .otp-order-card {
    /* Keep PRICE and TIME REMAINING as two identical, fixed metric columns.
       This prevents the value from shifting when the surrounding content
       (status text or phone length) changes. */
    grid-template-columns: minmax(300px, 1fr) 120px 120px minmax(190px, 1fr) 140px;
    gap: 0;
    padding: 0 16px;
  }
  .otp-order-card__main { padding: 15px 14px 15px 0; }
  .otp-order-card__meta { display: contents; }
  .otp-meta-item,
  .otp-order-card__status,
  .otp-order-card__action {
    align-self: stretch;
    border-left: 1px solid #eef2f7;
  }
  .otp-meta-item {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px 14px;
  }
  .otp-meta-item strong,
  .otp-timer {
    width: 100%;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }
  .otp-order-card__status {
    display: flex;
    align-items: center;
    padding: 12px 16px;
  }
  .otp-order-card__action {
    align-items: center;
    padding-left: 14px;
  }
  .otp-order-card__action .otp-cancel-btn,
  .otp-order-card__action .otp-finish-btn,
  .otp-order-card__action .otp-resend-btn { width: 100%; }
  html.dark .otp-meta-item,
  html.dark .otp-order-card__status,
  html.dark .otp-order-card__action { border-left-color: rgba(148,163,184,.14); }
}
html.dark .otp-order-card { border-color: rgba(148,163,184,.14); background: rgba(15,23,42,.58); box-shadow: none; }
html.dark .otp-order-card:hover { border-color: rgba(52,211,153,.4); background: rgba(30,41,59,.66); }

/* Compact active-order list: keep each row content-sized instead of stretching
   to fill the whole viewport. */
#live-active-orders-section .otp-live-panel {
  min-height: 0 !important;
  height: auto !important;
}
#live-active-orders-section .otp-orders-scroll {
  flex: 0 1 auto !important;
  max-height: min(58vh, 620px) !important;
}
#live-active-orders-section .otp-order-card {
  min-height: 0 !important;
  align-items: center;
}
#live-active-orders-section .otp-order-card {
  grid-template-columns: minmax(0, 1fr) 240px minmax(220px, 1fr) 140px;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
#live-active-orders-section .otp-order-card__main,
#live-active-orders-section .otp-order-card__meta,
#live-active-orders-section .otp-order-card__status,
#live-active-orders-section .otp-order-card__action {
  min-height: 88px;
  padding: 14px 16px;
}
#live-active-orders-section .otp-order-card__meta,
#live-active-orders-section .otp-order-card__status,
#live-active-orders-section .otp-order-card__action {
  border-left: 1px solid #e2e8f0;
}
#live-active-orders-section .otp-order-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, 120px));
  justify-content: center;
  align-content: center;
  gap: 0;
  justify-items: center;
}
#live-active-orders-section .otp-meta-item {
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-align: center;
}
#live-active-orders-section .otp-meta-item strong,
#live-active-orders-section .otp-timer {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
#live-active-orders-section .otp-order-card__action {
  align-items: center;
}
html.dark #live-active-orders-section .otp-order-card__meta,
html.dark #live-active-orders-section .otp-order-card__status,
html.dark #live-active-orders-section .otp-order-card__action {
  border-left-color: rgba(148,163,184,.14);
}

@media (min-width: 768px) {
  #live-active-orders-section .otp-order-card__meta {
    justify-items: center;
  }
  #live-active-orders-section .otp-meta-item {
    align-items: center;
    text-align: center;
  }
  #live-active-orders-section .otp-order-card__status,
  #live-active-orders-section .otp-order-card__action {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #live-active-orders-section .otp-state {
    align-items: center;
    text-align: center;
  }
}

#live-active-orders-section .otp-order-card {
  background: linear-gradient(115deg, #ffffff 0%, #f8fbff 52%, #f0fdf9 100%);
  border-color: #cbd5e1;
}
#live-active-orders-section .otp-order-card:hover {
  border-color: #5eead4;
  background: linear-gradient(115deg, #ffffff 0%, #eff6ff 48%, #ecfdf5 100%);
  box-shadow: 0 10px 26px -18px rgba(14,165,233,.55), 0 8px 20px -18px rgba(16,185,129,.7);
}
#live-active-orders-section .otp-service-icon {
  background: linear-gradient(145deg, #eff6ff, #ecfeff 55%, #ecfdf5);
  border-color: #bfdbfe;
}
#live-active-orders-section .otp-timer {
  background: transparent;
  border: 0;
  box-shadow: none;
}
#live-active-orders-section .otp-state--waiting .otp-status-badge {
  background: linear-gradient(135deg, #e0f2fe, #ecfeff 58%, #dbeafe);
  border-color: #7dd3fc;
  color: #0369a1;
}

/* Dark storefront: high-contrast navy surface with readable columns. */
html.dark #live-active-orders-section .otp-live-panel {
  border-color: rgba(71, 85, 105, .72);
  background: linear-gradient(145deg, #0b1220 0%, #111827 52%, #0f1b2d 100%);
  box-shadow: 0 18px 42px -30px rgba(2, 6, 23, .95);
}
html.dark #live-active-orders-section .otp-live-panel__header {
  border-color: rgba(71, 85, 105, .52);
  background: rgba(15, 23, 42, .72);
}
html.dark #live-active-orders-section .otp-live-panel h2,
html.dark #live-active-orders-section .otp-phone-number,
html.dark #live-active-orders-section .otp-country-code,
html.dark #live-active-orders-section .otp-meta-item strong {
  color: #f8fafc !important;
}
html.dark #live-active-orders-section .otp-order-card {
  border-color: rgba(71, 85, 105, .72);
  background: linear-gradient(112deg, #111827 0%, #172033 54%, #102a2d 100%);
  box-shadow: 0 8px 22px -18px rgba(2, 6, 23, .95);
}
html.dark #live-active-orders-section .otp-order-card:hover {
  border-color: rgba(45, 212, 191, .72);
  background: linear-gradient(112deg, #172033 0%, #1e293b 54%, #123b3d 100%);
}
html.dark #live-active-orders-section .otp-service-icon {
  border-color: rgba(96, 165, 250, .45);
  background: linear-gradient(145deg, #172554, #164e63 58%, #064e3b);
}
html.dark #live-active-orders-section .otp-order-card__meta,
html.dark #live-active-orders-section .otp-order-card__status,
html.dark #live-active-orders-section .otp-order-card__action {
  border-left-color: rgba(100, 116, 139, .34);
}
html.dark #live-active-orders-section .otp-copy-number-btn {
  border-color: #020617;
  background: #020617;
  color: #fff;
}
html.dark #live-active-orders-section .otp-copy-number-btn--local {
  border-color: #020617;
  background: #020617;
  color: #fff;
}
html.dark #live-active-orders-section .otp-timer {
  border: 0;
  background: transparent;
  color: #f8fafc !important;
  box-shadow: none;
}
html.dark #live-active-orders-section .otp-state--waiting .otp-status-badge {
  border-color: rgba(56, 189, 248, .62);
  background: linear-gradient(135deg, rgba(14, 116, 144, .35), rgba(30, 64, 175, .34));
  color: #bae6fd;
}
html.dark #live-active-orders-section .otp-cancel-btn {
  border-color: rgba(251, 113, 133, .55);
  background: rgba(159, 18, 55, .22);
  color: #fecdd3;
}
html.dark #live-active-orders-section .otp-resend-btn {
  border-color: rgba(52, 211, 153, .55);
  background: rgba(6, 95, 70, .24);
  color: #a7f3d0;
}
html.dark .otp-service-icon { border-color: rgba(148,163,184,.15); background: rgba(30,41,59,.72); }
html.dark .otp-summary-chip { border-color: rgba(148,163,184,.16); background: rgba(15,23,42,.65); color: #94a3b8; }
html.dark .otp-summary-chip b { color: #f8fafc; }
html.dark .otp-empty-state { border-color: rgba(148,163,184,.25); background: rgba(15,23,42,.5); }
html.dark .otp-empty-state h3 { color: #f8fafc; }

/* The receiving workspace is a full-height work area on desktop, so a long
   order queue scrolls inside its own panel instead of leaving a blank column. */
@media (min-width: 701px) {
  #view-live:not(.hidden) { display: flex; flex-direction: column; min-height: calc(100vh - 106px); }
  #live-active-orders-section { display: flex; flex: 1 1 auto; min-height: 0; }
  /* Override the compact-list rules above on desktop.  The receiver should
     occupy the remaining viewport height; only its order list scrolls. */
  #live-active-orders-section .otp-live-panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: calc(100vh - 106px) !important;
  }
  #live-active-orders-section .otp-orders-scroll {
    flex: 1 1 auto !important;
    max-height: none !important;
    min-height: 0;
  }
}

@media (max-width: 1100px) {
  .otp-order-card { grid-template-columns: minmax(260px, 1fr) minmax(220px, .8fr) auto; }
  .otp-order-card__status { grid-column: 1 / span 2; }
}
@media (max-width: 700px) {
  .otp-live-panel__header { align-items: flex-start; flex-direction: column; padding: 14px; }
  .otp-status-summary { justify-content: flex-start; }
  .otp-orders-scroll { max-height: none; padding: 10px; }
  .otp-order-card { grid-template-columns: 1fr auto; gap: 12px; padding: 13px; }
  .otp-order-card__main { grid-column: 1 / -1; }
  .otp-order-card__meta { grid-column: 1; gap: 18px; }
  .otp-order-card__status { grid-column: 1; }
  .otp-order-card__action { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .otp-cancel-btn span, .otp-finish-btn span, .otp-resend-btn span { display: none; }
  .otp-cancel-btn, .otp-finish-btn, .otp-resend-btn { width: 36px; height: 36px; padding: 0; }
  .otp-code-row .otp-display-badge { font-size: 20px; }
}
#email-activation-view .bg-violet-600 {
  background-color: #0284c7 !important;
}

#email-activation-view .bg-violet-50 {
  background-color: #f0f9ff !important;
}

#email-activation-view .from-violet-600 {
  --tw-gradient-from: #0284c7 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(2 132 199 / 0) var(--tw-gradient-to-position) !important;
}

/* Dense receiver table: keep rows content-sized so several active numbers
   remain visible instead of stretching the first row to fill the viewport. */
#view-live:not(.hidden) {
  min-height: auto !important;
}
#live-active-orders-section {
  display: block !important;
  min-height: 0 !important;
}
#live-active-orders-section .otp-live-panel {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
}
#live-active-orders-section .otp-orders-scroll {
  display: grid !important;
  align-content: start !important;
  grid-auto-rows: max-content !important;
  flex: none !important;
  min-height: 0 !important;
  max-height: min(68vh, 720px) !important;
  overflow-y: auto !important;
}
#live-active-orders-section .otp-order-card {
  min-height: 0 !important;
  height: auto !important;
}

/* On the two-column desktop storefront, keep the receiver inside the remaining
   viewport height and let only the order rows scroll.  The grid alignment
   above still keeps every row content-sized instead of stretching it. */
@media (min-width: 1024px) {
  #storefront-container {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  #storefront-announcement-banner,
  #storefront-container > header {
    flex-shrink: 0;
  }

  #storefront-container > .flex-1 {
    min-height: 0;
  }

  #storefront-order-panel {
    align-self: stretch;
    height: auto;
    min-height: 0;
  }

  #storefront-main-content {
    min-height: 0;
  }

  #view-live:not(.hidden) {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    min-height: 0 !important;
  }

  #live-active-orders-section {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column;
    min-height: 0 !important;
  }

  #live-active-orders-section .otp-live-panel {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column;
    min-height: 0 !important;
    height: auto !important;
  }

  #live-active-orders-section .otp-orders-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
  }
}

#email-activation-view .to-indigo-600 {
  --tw-gradient-to: #2563eb var(--tw-gradient-to-position) !important;
}

#email-activation-view .text-violet-600,
#email-activation-view .text-violet-700 {
  color: #0369a1 !important;
}

#email-activation-view .text-violet-300 {
  color: #7dd3fc !important;
}

#email-activation-view .border-violet-200 {
  border-color: #bae6fd !important;
}

#email-activation-view .border-violet-900\/60 {
  border-color: rgb(7 89 133 / 0.6) !important;
}

/* Email Activation customer workspace: compact SaaS layout without changing
   the existing event handlers or purchase flow. */
#email-activation-view {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
}

#email-activation-view > div {
  align-items: start;
  gap: 1.25rem;
  grid-template-columns: minmax(360px, .72fr) minmax(0, 1.28fr) !important;
}

#email-activation-view > div > section {
  border-radius: 1.25rem;
  box-shadow: 0 14px 36px rgb(15 23 42 / 0.07);
}

#email-activation-view > div > section:first-child {
  position: sticky;
  top: 1.25rem;
  border-color: #dbeafe !important;
  background: linear-gradient(145deg, #f8fcff 0%, #eff8ff 100%) !important;
  padding: 1.5rem !important;
}

#email-activation-view > div > section:last-child {
  background: #ffffff !important;
  border: 1px solid #dbeafe !important;
  padding: 1.5rem !important;
}

#email-activation-view > div > section:last-child > div:first-child {
  padding-bottom: .9rem;
  border-bottom: 1px solid #e0f2fe;
}

#email-activation-view article {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  padding: 1.15rem !important;
}

#email-activation-view h3 {
  letter-spacing: -0.02em;
}

#email-activation-view input,
#email-activation-view select {
  min-height: 2.85rem;
  border-radius: 0.85rem;
  border-color: #bfdbfe;
  transition: border-color .18s ease, box-shadow .18s ease;
}

#email-activation-view input:focus,
#email-activation-view select:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgb(14 165 233 / 0.14);
  outline: none;
}

#email-activation-view #email-purchase-btn,
#email-activation-view #email-site-start-form button {
  min-height: 3rem;
  border-radius: 0.85rem;
  font-size: .9rem;
  letter-spacing: -0.01em;
  transition: transform .18s ease, box-shadow .18s ease;
}

#email-activation-view #email-purchase-btn:not(:disabled):hover,
#email-activation-view #email-site-start-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgb(2 132 199 / 0.2);
}

#email-activation-view [data-email-cancel],
#email-activation-view [data-email-reorder] {
  border-radius: .7rem;
  min-height: 2.35rem;
}

#email-activation-view [data-email-cancel] {
  background: #fff1f2;
}

#email-activation-view [data-email-reorder] {
  background: #eff6ff;
}
.email-domain-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.email-domain-option {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  width: 100%;
  padding: .7rem .75rem;
  border: 1px solid #dbeafe;
  border-radius: .85rem;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.email-domain-option:hover:not(:disabled) {
  border-color: #38bdf8;
  background: #f0f9ff;
  box-shadow: 0 5px 14px rgb(14 165 233 / .12);
  transform: translateY(-1px);
}
.email-domain-option.is-selected {
  border-color: #0284c7;
  background: linear-gradient(135deg, #e0f2fe, #eff6ff);
  box-shadow: 0 0 0 2px rgb(14 165 233 / .16), 0 6px 16px rgb(14 165 233 / .1);
}
.email-domain-option:disabled {
  cursor: not-allowed;
  opacity: .52;
}
.email-domain-option__name {
  width: 100%;
  overflow: hidden;
  font-size: .78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-domain-option__details {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  color: #64748b;
  font-size: .65rem;
  line-height: 1.2;
}
.email-domain-option__details b {
  color: #0369a1;
  font-family: var(--font-mono);
  font-size: .75rem;
}
.email-domain-options-empty {
  grid-column: 1 / -1;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: .85rem;
  color: #64748b;
  font-size: .75rem;
  text-align: center;
}
html.dark .email-domain-option {
  border-color: #23456d;
  background: #0b1527;
  color: #f8fafc;
}
html.dark .email-domain-option:hover:not(:disabled) { border-color: #38bdf8; background: #10233d; }
html.dark .email-domain-option.is-selected { border-color: #38bdf8; background: linear-gradient(135deg, #12304c, #14274a); }
html.dark .email-domain-option__details { color: #94a3b8; }
html.dark .email-domain-option__details b { color: #7dd3fc; }
@media (max-width: 420px) {
  .email-domain-options { grid-template-columns: 1fr; }
}

#email-activation-view article {
  border-radius: 1rem;
  border-color: #dbeafe !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

#email-activation-view article:hover {
  border-color: #93c5fd !important;
  box-shadow: 0 10px 26px rgb(30 64 175 / 0.08);
  transform: translateY(-1px);
}

#email-activation-view article [class*="bg-slate-50"] {
  background: #f8fbff !important;
  border: 1px solid #e0f2fe;
}

@media (max-width: 1440px) {
  :where(html[data-mobile-document="true"]) #email-activation-view > div > section:first-child {
    position: static;
  }
}

@media (max-width: 640px) {
  #email-activation-view > div {
    gap: .9rem;
  }

  #email-activation-view > div > section {
    padding: 1rem !important;
  }

  #email-activation-view > div {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #email-activation-view article {
    padding: .9rem !important;
  }
}

/* Dark theme for the redesigned customer Email Activation screen.
   The view is rendered from JavaScript, so these scoped rules keep the
   contrast consistent even when Tailwind's CDN cannot see dynamic classes. */
html.dark #email-activation-view > div > section:first-child,
html.dark #email-activation-view > div > section:last-child {
  color: #e2e8f0 !important;
  border-color: #1e3a5f !important;
  background: linear-gradient(145deg, #101a2e 0%, #0b1222 100%) !important;
  box-shadow: 0 18px 42px rgb(2 8 23 / 0.35) !important;
}

html.dark #email-activation-view article {
  color: #dbeafe !important;
  border-color: #23456d !important;
  background: linear-gradient(180deg, #111c31 0%, #0d1729 100%) !important;
  box-shadow: 0 10px 24px rgb(2 8 23 / 0.24) !important;
}

html.dark #email-activation-view article [class*="bg-slate-50"],
html.dark #email-activation-view [class*="bg-violet-50"] {
  color: #cbd5e1 !important;
  background: #0b1527 !important;
  border-color: #1e4165 !important;
}

html.dark #email-activation-view h2,
html.dark #email-activation-view h3,
html.dark #email-activation-view label,
html.dark #email-activation-view .text-slate-900,
html.dark #email-activation-view .text-slate-700,
html.dark #email-activation-view .text-slate-600 {
  color: #f8fafc !important;
}

html.dark #email-activation-view .text-slate-500,
html.dark #email-activation-view .text-slate-400 {
  color: #94a3b8 !important;
}

html.dark #email-activation-view input,
html.dark #email-activation-view select {
  color: #f8fafc !important;
  background: #070f1e !important;
  border-color: #31577f !important;
}

html.dark #email-activation-view #email-purchase-btn,
html.dark #email-activation-view #email-site-start-form button {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgb(14 165 233 / 0.22);
}

html.dark #email-activation-view .bg-violet-600 {
  background: #0284c7 !important;
}

html.dark #email-activation-view [data-email-cancel] {
  background: rgb(127 29 29 / 0.25) !important;
  color: #fda4af !important;
}

html.dark #email-activation-view [data-email-reorder] {
  background: rgb(30 64 175 / 0.22) !important;
  color: #93c5fd !important;
}

/* ================= ADMIN LIGHT MODE =================
   Admin markup is rendered both statically and dynamically, so keep the
   light theme correction scoped to the backoffice. This prevents dark-mode
   utility classes used by the admin templates from producing gray panels and
   low-contrast text when the global theme is light. */
html:not(.dark) #admin-backoffice-container {
  background: #f8fafc !important;
  color: #0f172a !important;
}

html:not(.dark) #admin-backoffice-container .admin-sidebar,
html:not(.dark) #admin-backoffice-container .admin-topbar,
html:not(.dark) #admin-backoffice-container .admin-content,
html:not(.dark) #admin-backoffice-container main {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

html:not(.dark) #admin-backoffice-container [class*="bg-[#0"],
html:not(.dark) #admin-backoffice-container [class*="bg-[#1"],
html:not(.dark) #admin-backoffice-container [class*="bg-slate-950"],
html:not(.dark) #admin-backoffice-container [class*="bg-slate-900"],
html:not(.dark) #admin-backoffice-container [class*="bg-slate-850"],
html:not(.dark) #admin-backoffice-container [class*="bg-slate-800"] {
  background-color: #ffffff !important;
}

html:not(.dark) #admin-backoffice-container [class*="bg-slate-700"],
html:not(.dark) #admin-backoffice-container [class*="bg-slate-600"] {
  background-color: #f1f5f9 !important;
}

html:not(.dark) #admin-backoffice-container [class*="border-slate-9"],
html:not(.dark) #admin-backoffice-container [class*="border-slate-8"],
html:not(.dark) #admin-backoffice-container [class*="border-slate-7"],
html:not(.dark) #admin-backoffice-container [class*="border-slate-6"] {
  border-color: #e2e8f0 !important;
}

html:not(.dark) #admin-backoffice-container [class*="text-white"],
html:not(.dark) #admin-backoffice-container [class*="text-slate-100"],
html:not(.dark) #admin-backoffice-container [class*="text-slate-200"] {
  color: #0f172a !important;
}

html:not(.dark) #admin-backoffice-container [class*="text-slate-300"],
html:not(.dark) #admin-backoffice-container [class*="text-slate-400"] {
  color: #475569 !important;
}

html:not(.dark) #admin-backoffice-container [class*="text-slate-500"] {
  color: #64748b !important;
}

html:not(.dark) #admin-backoffice-container input,
html:not(.dark) #admin-backoffice-container select,
html:not(.dark) #admin-backoffice-container textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html:not(.dark) #admin-backoffice-container table thead,
html:not(.dark) #admin-backoffice-container th {
  background-color: #f8fafc !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}

html:not(.dark) #admin-backoffice-container td,
html:not(.dark) #admin-backoffice-container tr {
  border-color: #e2e8f0 !important;
}

/* Keep colored action buttons readable after the neutral text conversion. */
html:not(.dark) #admin-backoffice-container button[class*="bg-indigo"],
html:not(.dark) #admin-backoffice-container button[class*="bg-sky"],
html:not(.dark) #admin-backoffice-container button[class*="bg-emerald"],
html:not(.dark) #admin-backoffice-container button[class*="bg-teal"],
html:not(.dark) #admin-backoffice-container button[class*="bg-blue"],
html:not(.dark) #admin-backoffice-container button[class*="bg-purple"],
html:not(.dark) #admin-backoffice-container button[class*="bg-pink"],
html:not(.dark) #admin-backoffice-container button[class*="bg-rose"] {
  color: #ffffff !important;
}

html:not(.dark) #admin-backoffice-container .admin-nav-link:not(.active) {
  color: #475569 !important;
}

html:not(.dark) #admin-backoffice-container .admin-nav-link.active {
  color: #4338ca !important;
  background: linear-gradient(90deg, #eef2ff, #f5f3ff) !important;
  border-color: #c7d2fe !important;
}

/* Keep the Email Activation modal columns balanced and readable. */
#admin-email-activations-modal table {
  table-layout: fixed;
  min-width: 900px;
}
#admin-email-activations-modal th,
#admin-email-activations-modal td {
  vertical-align: middle;
}
#admin-email-activations-modal th:nth-child(1),
#admin-email-activations-modal td:nth-child(1) { width: 38%; }
#admin-email-activations-modal th:nth-child(2),
#admin-email-activations-modal td:nth-child(2) { width: 20%; }
#admin-email-activations-modal th:nth-child(3),
#admin-email-activations-modal td:nth-child(3) { width: 14%; }
#admin-email-activations-modal th:nth-child(4),
#admin-email-activations-modal td:nth-child(4) { width: 18%; }
#admin-email-activations-modal th:nth-child(5),
#admin-email-activations-modal td:nth-child(5) { width: 10%; }
#admin-email-activations-modal td:first-child > div:first-child {
  overflow-wrap: anywhere;
}
/* Universal Theme Toggle Button: Identical styling across Storefront & Admin */
html:not(.dark) .theme-toggle-btn,
body:not(.dark) .theme-toggle-btn,
html:not(.dark) #admin-backoffice-container .theme-toggle-btn,
#admin-backoffice-container .admin-header-standard .theme-toggle-btn {
  background-color: #090d16 !important;
  color: #ffffff !important;
  border: 1.5px solid #1e293b !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border-radius: 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

html:not(.dark) .theme-toggle-btn:hover,
html:not(.dark) #admin-backoffice-container .theme-toggle-btn:hover,
#admin-backoffice-container .admin-header-standard .theme-toggle-btn:hover {
  background-color: #000000 !important;
  border-color: #334155 !important;
}

html:not(.dark) .theme-toggle-btn .theme-label,
html:not(.dark) #admin-backoffice-container .theme-toggle-btn .theme-label,
#admin-backoffice-container .admin-header-standard .theme-toggle-btn .theme-label {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  display: inline !important;
}

html:not(.dark) .theme-toggle-btn [data-lucide="moon"],
html:not(.dark) .theme-toggle-btn svg,
html:not(.dark) #admin-backoffice-container .theme-toggle-btn svg,
#admin-backoffice-container .admin-header-standard .theme-toggle-btn svg {
  color: #818cf8 !important;
}

/* Dark Mode Active */
html.dark .theme-toggle-btn,
body.dark .theme-toggle-btn,
html.dark #admin-backoffice-container .theme-toggle-btn,
html.dark #admin-backoffice-container .admin-header-standard .theme-toggle-btn {
  background-color: #ffffff !important;
  color: #090d16 !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.25) !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border-radius: 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

html.dark .theme-toggle-btn:hover,
html.dark #admin-backoffice-container .theme-toggle-btn:hover,
html.dark #admin-backoffice-container .admin-header-standard .theme-toggle-btn:hover {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html.dark .theme-toggle-btn .theme-label,
html.dark #admin-backoffice-container .theme-toggle-btn .theme-label,
html.dark #admin-backoffice-container .admin-header-standard .theme-toggle-btn .theme-label {
  color: #090d16 !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  display: inline !important;
}

html.dark .theme-toggle-btn [data-lucide="sun"],
html.dark .theme-toggle-btn svg,
html.dark #admin-backoffice-container .theme-toggle-btn svg,
html.dark #admin-backoffice-container .admin-header-standard .theme-toggle-btn svg {
  color: #f59e0b !important;
}

/* Wallet top-up: compact glass treatment to match the KAI OTP storefront. */
.wallet-topup-modern {
  background: radial-gradient(circle at 90% 0%, rgba(16,185,129,.12), transparent 35%),
              linear-gradient(135deg, rgba(255,255,255,.98), rgba(240,253,250,.92));
}
html.dark .wallet-topup-modern {
  background: radial-gradient(circle at 90% 0%, rgba(16,185,129,.16), transparent 36%),
              linear-gradient(135deg, rgba(15,23,42,.96), rgba(12,31,42,.98));
  border-color: rgba(52,211,153,.35) !important;
}
.wallet-qr-card {
  background: rgba(248,250,252,.78) !important;
  border-color: rgba(148,163,184,.28) !important;
}
html.dark .wallet-qr-card {
  background: rgba(2,6,23,.48) !important;
  border-color: rgba(71,85,105,.62) !important;
}
.wallet-qr-card #inline-topup-qr-box {
  box-shadow: 0 16px 34px rgba(15,23,42,.16);
  border-radius: 1.25rem;
}
.wallet-payment-status { letter-spacing: -.01em; }
.wallet-steps-card { backdrop-filter: blur(10px); }


/* Strong visual refresh for the top-up module. */
#wallet-inline-topup-panel.wallet-topup-modern {
  color: #e2e8f0 !important;
  background: linear-gradient(135deg, #0b1220 0%, #111b31 58%, #0b2b2c 100%) !important;
  border: 1px solid rgba(52,211,153,.32) !important;
  box-shadow: 0 24px 70px rgba(2,6,23,.22) !important;
}
#wallet-inline-topup-panel.wallet-topup-modern h3,
#wallet-inline-topup-panel.wallet-topup-modern h4,
#wallet-inline-topup-panel.wallet-topup-modern p,
#wallet-inline-topup-panel.wallet-topup-modern span { color: inherit; }
#wallet-inline-topup-panel.wallet-topup-modern h3 { letter-spacing: -.02em; }
#wallet-inline-topup-panel.wallet-topup-modern .wallet-qr-card {
  background: linear-gradient(145deg, rgba(30,41,59,.96), rgba(15,23,42,.86)) !important;
  border: 1px solid rgba(100,116,139,.34) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.05) !important;
}
#wallet-inline-topup-panel.wallet-topup-modern #inline-topup-qr-box {
  padding: 14px !important;
  border: 5px solid #fff !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.35) !important;
}
#wallet-inline-topup-panel.wallet-topup-modern .wallet-steps-card {
  background: linear-gradient(145deg, rgba(16,185,129,.16), rgba(15,23,42,.54)) !important;
  border-color: rgba(52,211,153,.35) !important;
}
#wallet-inline-topup-panel.wallet-topup-modern .wallet-payment-status {
  background: linear-gradient(90deg, #10b981, #14b8a6) !important;
  box-shadow: 0 12px 28px rgba(16,185,129,.2) !important;
}

/* Light mode must keep the original white wallet surface. */
html:not(.dark) #wallet-inline-topup-panel.wallet-topup-modern {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: rgba(16,185,129,.28) !important;
  box-shadow: 0 10px 30px rgba(15,23,42,.08) !important;
}
html:not(.dark) #wallet-inline-topup-panel.wallet-topup-modern .wallet-qr-card {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
html:not(.dark) #wallet-inline-topup-panel.wallet-topup-modern .wallet-steps-card {
  background: rgba(16,185,129,.05) !important;
  border-color: rgba(16,185,129,.24) !important;
}
html:not(.dark) #wallet-inline-topup-panel.wallet-topup-modern .wallet-steps-card > div > span:last-child,
html:not(.dark) #wallet-inline-topup-panel.wallet-topup-modern .wallet-qr-card > p {
  color: #334155 !important;
}
html:not(.dark) #wallet-inline-topup-panel.wallet-topup-modern .wallet-steps-card h4 {
  color: #0f172a !important;
}
/* Admin email controls use the light dashboard surface consistently. */
#admin-tab-emails > div.grid > section:first-child,
#admin-tab-emails > div.grid > section:nth-child(2) {
  background: #ffffff !important;
  border-color: #dbe4ef !important;
  color: #0f172a;
}
#admin-tab-emails > div.grid > section h3 { color: #0f172a !important; }
#admin-tab-emails > div.grid > section p,
#admin-tab-emails > div.grid > section label { color: #475569 !important; }
#admin-tab-emails > div.grid > section input,
#admin-tab-emails > div.grid > section .bg-slate-950 { background: #ffffff !important; color: #0f172a !important; border-color: #cbd5e1 !important; }
#admin-tab-emails > div.grid > section .text-white { color: #0f172a !important; }

/* ================= ADMIN UX SYSTEM =================
   One visual language for every backoffice tab. The markup contains legacy
   utility classes from the original dark console, so these scoped rules make
   the light admin workspace consistent without changing the storefront. */
html:not(.dark) #admin-backoffice-container {
  background: #f6f8fc !important;
}

html:not(.dark) #admin-backoffice-container .admin-sidebar {
  background: #ffffff !important;
  border-right-color: #e5eaf2 !important;
  box-shadow: 8px 0 28px rgba(15, 23, 42, .035);
}

html:not(.dark) #admin-backoffice-container .admin-topbar {
  background: rgba(255, 255, 255, .94) !important;
  border-bottom-color: #e5eaf2 !important;
  box-shadow: 0 1px 12px rgba(15, 23, 42, .04);
}

html:not(.dark) #admin-backoffice-container .admin-topbar input,
html:not(.dark) #admin-backoffice-container .admin-topbar button:not(.theme-toggle-btn),
html:not(.dark) #admin-backoffice-container .admin-sidebar button {
  border-color: #dbe3ef !important;
}

html:not(.dark) #admin-backoffice-container .admin-sidebar .text-white,
html:not(.dark) #admin-backoffice-container .admin-topbar .text-white:not(.theme-toggle-btn):not(.theme-label) {
  color: #0f172a !important;
}

html:not(.dark) #admin-backoffice-container .admin-nav {
  padding-top: .9rem;
}

html:not(.dark) #admin-backoffice-container .admin-nav-section-label {
  margin: 1.15rem .7rem .35rem;
  color: #94a3b8 !important;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

html:not(.dark) #admin-backoffice-container .admin-nav-section-label:first-child {
  margin-top: .1rem;
}

html:not(.dark) #admin-backoffice-container .admin-nav-link {
  min-height: 42px;
  color: #64748b !important;
  border-color: transparent !important;
}

html:not(.dark) #admin-backoffice-container .admin-nav-link:hover {
  background: #f8fafc !important;
  color: #1e293b !important;
}

html:not(.dark) #admin-backoffice-container .admin-nav-link.active {
  background: linear-gradient(90deg, #eef2ff, #f5f3ff) !important;
  color: #4338ca !important;
  border-color: #c7d2fe !important;
  box-shadow: 0 5px 14px rgba(79, 70, 229, .08);
}

html:not(.dark) #admin-backoffice-container .admin-content {
  background: #f6f8fc !important;
}

html:not(.dark) #admin-backoffice-container .admin-tab-view > div,
html:not(.dark) #admin-backoffice-container .admin-tab-view > section,
html:not(.dark) #admin-backoffice-container .admin-tab-view details,
html:not(.dark) #admin-backoffice-container .admin-tab-view article {
  border-radius: 1rem;
}

html:not(.dark) #admin-backoffice-container .admin-tab-view h1,
html:not(.dark) #admin-backoffice-container .admin-tab-view h2,
html:not(.dark) #admin-backoffice-container .admin-tab-view h3 {
  color: #0f172a !important;
}

html:not(.dark) #admin-backoffice-container .admin-tab-view p,
html:not(.dark) #admin-backoffice-container .admin-tab-view label,
html:not(.dark) #admin-backoffice-container .admin-tab-view span {
  --admin-muted: #64748b;
}

html:not(.dark) #admin-backoffice-container .admin-tab-view [class*="bg-gradient-to"]:not(button):not(a),
html:not(.dark) #admin-backoffice-container .admin-tab-view [class*="bg-[#0"]:not(button):not(a),
html:not(.dark) #admin-backoffice-container .admin-tab-view [class*="bg-[#1"]:not(button):not(a),
html:not(.dark) #admin-backoffice-container .admin-tab-view [class*="bg-slate-950"]:not(button):not(a),
html:not(.dark) #admin-backoffice-container .admin-tab-view [class*="bg-slate-900"]:not(button):not(a) {
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

html:not(.dark) #admin-backoffice-container .admin-tab-view [class*="border-slate-8"],
html:not(.dark) #admin-backoffice-container .admin-tab-view [class*="border-slate-7"] {
  border-color: #e2e8f0 !important;
}

html:not(.dark) #admin-backoffice-container .admin-tab-view table tbody tr:hover {
  background: #f8fafc !important;
}

html:not(.dark) #admin-backoffice-container .admin-tab-view input::placeholder,
html:not(.dark) #admin-backoffice-container .admin-topbar input::placeholder {
  color: #94a3b8 !important;
}

@media (max-width: 860px) {
  #admin-backoffice-container .admin-sidebar { width: 4.75rem !important; }
  #admin-backoffice-container .admin-sidebar .sidebar-text,
  #admin-backoffice-container .admin-sidebar .sidebar-brand-text { display: none !important; }
  #admin-backoffice-container .admin-sidebar nav { padding-inline: .65rem; }
  #admin-backoffice-container .admin-nav-link { justify-content: center; padding-inline: .65rem; }
  #admin-backoffice-container .admin-nav-section-label { display: none !important; }
  #admin-backoffice-container .admin-sidebar .admin-nav-link i { margin: 0; }
  #admin-backoffice-container .admin-content { padding: 1rem !important; }
}

@media (max-width: 560px) {
  #admin-backoffice-container .admin-topbar { padding-inline: 1rem !important; }
  #admin-backoffice-container .admin-header-standard > :last-child { gap: .25rem; }
  #admin-backoffice-container .admin-content { padding: .75rem !important; }
  #admin-backoffice-container .admin-tab-view { gap: 1rem !important; }
}

/* Ticket workspace cards and customer conversation history. */
.ticket-kpi-card {
  display: flex;
  min-height: 74px;
  flex-direction: column;
  justify-content: center;
  gap: .25rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: .75rem 1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.ticket-kpi-card span { color: #64748b; font-size: 10px; font-weight: 700; }
.ticket-kpi-card strong { color: #0f172a; font: 800 1.35rem var(--font-mono); }
.ticket-kpi-pending { border-color: #fecdd3; background: #fff7f8; }
.ticket-kpi-pending strong { color: #e11d48; }
.ticket-kpi-progress { border-color: #fde68a; background: #fffbeb; }
.ticket-kpi-progress strong { color: #d97706; }
.ticket-kpi-resolved { border-color: #a7f3d0; background: #f0fdf4; }
.ticket-kpi-resolved strong { color: #059669; }

.ticket-dashboard-banner { box-shadow: 0 8px 22px rgba(14, 165, 233, .06); }
.ticket-dashboard-card {
  min-height: 190px;
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  border-radius: 1.1rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ticket-dashboard-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15, 23, 42, .08); }
.ticket-status-pending { border-left-color: #fb7185; }
.ticket-status-progress { border-left-color: #f59e0b; }
.ticket-status-resolved { border-left-color: #10b981; }
.ticket-status-muted { border-left-color: #94a3b8; }
.ticket-status-pill { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .28rem .55rem; font-size: 10px; font-weight: 800; }
.ticket-status-pending .ticket-status-pill { color: #be123c; background: #fff1f2; }
.ticket-status-progress .ticket-status-pill { color: #b45309; background: #fffbeb; }
.ticket-status-resolved .ticket-status-pill { color: #047857; background: #ecfdf5; }
.ticket-status-muted .ticket-status-pill { color: #475569; background: #f1f5f9; }
.ticket-card-image { border: 1px solid #dbeafe; border-radius: .8rem; overflow: hidden; }
.ticket-card-action { display: inline-flex; align-items: center; gap: .3rem; border-radius: .7rem; background: #eff6ff; color: #2563eb; padding: .45rem .65rem; font-size: 10px; font-weight: 800; }
.ticket-card-action:hover { background: #dbeafe; }
.ticket-empty-state { border: 1px dashed #cbd5e1; border-radius: 1rem; background: #fff; padding: 2rem; text-align: center; color: #64748b; font-size: 12px; }
.ticket-empty-state span { display: block; margin-top: .3rem; color: #94a3b8; font-size: 10px; }

.order-kpi-card { min-height: 82px; border: 1px solid #e2e8f0; border-radius: 1rem; background: #fff; padding: .8rem 1rem; box-shadow: 0 8px 22px rgba(15, 23, 42, .04); }
.order-kpi-card span { display: block; color: #64748b; font-size: 10px; font-weight: 700; }
.order-kpi-card strong { display: block; margin-top: .35rem; color: #0f172a; font: 800 1.25rem var(--font-mono); }
.order-kpi-waiting { border-color: #fde68a; background: #fffbeb; }
.order-kpi-waiting strong { color: #b45309; }
.order-kpi-success { border-color: #a7f3d0; background: #f0fdf4; }
.order-kpi-success strong { color: #059669; }
.order-kpi-risk { border-color: #fecdd3; background: #fff7f8; }
.order-kpi-risk strong { color: #e11d48; }
.order-kpi-profit { border-color: #bfdbfe; background: #eff6ff; }
.order-kpi-profit strong { color: #2563eb; }

/* Dark-mode counterpart for the newly added Ticket and Orders dashboard UI. */
html.dark .ticket-kpi-card,
html.dark .ticket-dashboard-card,
html.dark .order-kpi-card,
html.dark .ticket-empty-state {
  border-color: #334155;
  background: #0f172a;
  box-shadow: 0 10px 28px rgba(2, 6, 23, .25);
}
html.dark .ticket-kpi-card span,
html.dark .order-kpi-card span,
html.dark .ticket-empty-state,
html.dark .ticket-dashboard-card .text-slate-400,
html.dark .order-kpi-card span { color: #94a3b8; }
html.dark .ticket-kpi-card strong,
html.dark .order-kpi-card strong,
html.dark .ticket-dashboard-card h3 { color: #f8fafc; }
html.dark .ticket-kpi-pending { border-color: #881337; background: #2a0d18; }
html.dark .ticket-kpi-progress { border-color: #854d0e; background: #2a1b08; }
html.dark .ticket-kpi-resolved { border-color: #065f46; background: #062a22; }
html.dark .order-kpi-waiting { border-color: #854d0e; background: #2a1b08; }
html.dark .order-kpi-success { border-color: #065f46; background: #062a22; }
html.dark .order-kpi-risk { border-color: #881337; background: #2a0d18; }
html.dark .order-kpi-profit { border-color: #1e40af; background: #0b1d3d; }
html.dark .ticket-dashboard-banner { border-color: #1e3a5f; background: linear-gradient(90deg, #10243a, #0f172a, #0b2b26); }
html.dark .ticket-dashboard-banner p { color: #e2e8f0; }
html.dark .ticket-dashboard-card .bg-slate-50 { background: #111c2f !important; }
html.dark .ticket-dashboard-card .text-slate-700,
html.dark .ticket-dashboard-card .text-slate-600 { color: #cbd5e1 !important; }
html.dark .ticket-card-action { background: #172554; color: #93c5fd; }
html.dark .ticket-empty-state span { color: #64748b; }
html.dark #admin-orders-alert-strip { border-color: #854d0e; background: #2a1b08; color: #fde68a; }

html.dark #support-modal > .glass-panel {
  border-color: #334155 !important;
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5), 0 0 0 6px rgba(15, 23, 42, .35) !important;
}
html.dark #support-modal > .glass-panel > div:first-of-type { border-bottom-color: #273449; }
html.dark #support-modal h3,
html.dark #support-modal label { color: #f1f5f9 !important; }
html.dark #support-modal select,
html.dark #support-modal input[type="text"],
html.dark #support-modal textarea { background: #0b1220 !important; border-color: #334155 !important; color: #e2e8f0 !important; }
html.dark #support-view-tabs { border-color: #334155; background: #0b1220; }
html.dark #support-view-tabs button { color: #94a3b8; }
html.dark #support-view-tabs button.bg-white { background: #1e293b !important; color: #6ee7b7 !important; }
html.dark #customer-ticket-history { border-color: #1e3a5f !important; background: #0b1728 !important; }
html.dark #customer-ticket-history-list > div { border-color: #334155 !important; background: #111c2f !important; }
html.dark #customer-ticket-history-list .text-slate-700,
html.dark #customer-ticket-history-list .text-slate-800 { color: #e2e8f0 !important; }
html.dark #customer-ticket-history-list .border-slate-100 { border-color: #273449 !important; }
html.dark #ticket-image-dropzone { border-color: #475569 !important; background: #0b1220 !important; }
html.dark #ticket-image-dropzone:hover { background: #062a22 !important; border-color: #34d399 !important; }

#customer-ticket-history-list [data-ticket-toggle] {
  white-space: nowrap;
}

/* Customer support modal: calm help-centre layout with clearer hierarchy. */
#support-modal {
  background: rgba(15, 23, 42, .68) !important;
  padding: 1rem !important;
}
#support-modal > .glass-panel {
  max-width: 34rem !important;
  border: 1px solid rgba(255, 255, 255, .72) !important;
  border-radius: 1.6rem !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28), 0 0 0 6px rgba(255, 255, 255, .12) !important;
  padding: 1.35rem !important;
}
#support-modal > .glass-panel > div:first-of-type {
  margin-bottom: 1rem !important;
  padding: .25rem .25rem .9rem;
  border-bottom: 1px solid #edf2f7;
}
#support-modal > .glass-panel > div:first-of-type > div:first-child {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 1rem;
  background: #e8fbf5 !important;
  color: #059669 !important;
  border-color: #b8f0df !important;
}
#support-modal h3 {
  font-size: 1rem !important;
  letter-spacing: -.02em;
  color: #0f172a !important;
}
#support-view-tabs {
  position: relative;
  overflow: hidden;
}
#support-view-tabs::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(16, 185, 129, .05), transparent 55%, rgba(14, 165, 233, .05));
}
#support-view-tabs button {
  position: relative;
  min-height: 2.2rem;
  transition: all .2s ease;
}
#support-modal form > .grid {
  gap: .7rem !important;
}
#support-modal label {
  color: #334155 !important;
  font-size: 10px !important;
  letter-spacing: .01em;
}
#support-modal select,
#support-modal input[type="text"],
#support-modal textarea {
  border-color: #d5dfeb !important;
  background: #ffffff !important;
  border-radius: .9rem !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .025) inset;
}
#support-modal textarea {
  min-height: 6.2rem;
  line-height: 1.6;
}
#customer-ticket-history {
  border-color: #dbeafe !important;
  background: #f7fbff !important;
  border-radius: 1.1rem !important;
  padding: .7rem !important;
}
#customer-ticket-history-list {
  max-height: 10.5rem !important;
  padding-right: .15rem;
}
#customer-ticket-history-list > div {
  border-color: #dbe7f3 !important;
  border-radius: .9rem !important;
  box-shadow: 0 4px 12px rgba(30, 64, 175, .035);
}
#ticket-image-dropzone {
  min-height: 7.2rem;
  display: grid;
  place-items: center;
  border-color: #cbd8e8 !important;
  background: #f8fbff !important;
  border-radius: 1.1rem !important;
}
#ticket-image-dropzone:hover {
  background: #f0fdf9 !important;
  border-color: #34d399 !important;
}
#ticket-submit-btn {
  min-height: 2.85rem;
  border-radius: .95rem !important;
  background: linear-gradient(135deg, #059669, #0f9f83) !important;
  box-shadow: 0 10px 22px rgba(5, 150, 105, .2) !important;
}
#ticket-submit-btn:hover { filter: brightness(1.05); }
@media (max-width: 520px) {
  #support-modal { align-items: flex-end !important; padding: .5rem !important; }
  #support-modal > .glass-panel { max-height: 94vh !important; padding: 1rem !important; border-radius: 1.35rem !important; }
}

/* ================= MOBILE-FIRST STOREFRONT =================
   These rules provide one predictable touch layout across every customer view.
   They intentionally use existing IDs/classes so current JavaScript handlers
   and desktop presentation remain unchanged. */
.mobile-bottom-nav { display: none; }

@media (max-width: 767px) {
  html { font-size: 16px; }
  body.is-authenticated #storefront-container { padding-bottom: 5.65rem; }
  body.is-guest #mobile-bottom-nav { display: none !important; }

  #storefront-container > header {
    height: 4.25rem !important;
    min-height: 4.25rem;
    padding-inline: 1rem !important;
  }
  #header-brand-logo { gap: .6rem !important; max-width: calc(100% - 8.75rem); }
  #header-brand-logo > div:first-child { width: 2.55rem !important; height: 2.55rem !important; border-radius: .9rem !important; font-size: 1.35rem !important; }
  #header-brand-logo h1 { font-size: 1.2rem !important; }
  #header-brand-logo p { display: none; }
  #header-right-controls { gap: .35rem !important; }
  #header-right-controls > [role="group"],
  #sound-toggle-btn,
  #header-balance-capsule,
  #storefront-back-to-admin-btn { display: none !important; }
  #header-right-controls .theme-toggle-btn { padding: .55rem !important; border-radius: .8rem !important; }
  #header-user-section > button { padding: .2rem !important; background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
  #header-user-section > button > i { display: none; }
  #header-user-section > button > div:first-child { width: 2.35rem !important; height: 2.35rem !important; border-radius: .8rem !important; }
  #user-profile-dropdown { position: fixed !important; top: 4.75rem !important; left: .75rem !important; right: .75rem !important; width: auto !important; max-width: none !important; margin: 0 !important; }

  #toast-container { top: 4.8rem; right: .75rem; left: .75rem; width: auto; max-width: none; }
  #storefront-announcement-banner { position: static !important; padding-inline: .75rem; font-size: 11px; }
  #storefront-announcement-banner > div { justify-content: flex-start; text-align: left; }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 40;
    right: .65rem;
    bottom: max(.65rem, env(safe-area-inset-bottom));
    left: .65rem;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 4.4rem;
    padding: .35rem;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 1.3rem;
    background: rgba(15, 23, 42, .95);
    box-shadow: 0 14px 38px rgba(2, 6, 23, .32);
    backdrop-filter: blur(18px);
  }
  .mobile-bottom-nav .header-nav-link {
    display: flex;
    min-width: 0;
    min-height: 3.55rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .22rem;
    padding: .3rem;
    border-radius: 1rem;
    color: #aab8cd;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
  }
  .mobile-bottom-nav .header-nav-link span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-bottom-nav .header-nav-link.active { color: #fff; background: linear-gradient(135deg, #059669, #0d9488); box-shadow: 0 6px 14px rgba(5, 150, 105, .25); }
  html:not(.dark) .mobile-bottom-nav { background: rgba(255, 255, 255, .96); border-color: #dbe4ef; box-shadow: 0 12px 30px rgba(15, 23, 42, .14); }
  html:not(.dark) .mobile-bottom-nav .header-nav-link { color: #64748b; }
  html:not(.dark) .mobile-bottom-nav .header-nav-link.active { color: #fff; }

  /* Every customer page gets a safe readable gutter; dynamic layouts keep
     their grid but cannot overflow because their children may shrink. */
  #storefront-container main { padding: 1rem !important; }
  #storefront-container main > *,
  #storefront-container .tab-view,
  #storefront-container .tab-view > * { min-width: 0; }
  #storefront-container .glass-panel { border-radius: 1.15rem; }
  #storefront-container .tab-view { gap: 1rem !important; }
  #storefront-container .tab-view > div > h2 { font-size: 1.35rem !important; line-height: 1.3; }
  #storefront-container input,
  #storefront-container select,
  #storefront-container textarea { min-height: 2.75rem; font-size: 16px !important; }
  #storefront-container button { min-height: 2.5rem; }

  /* Tables retain all data with contained horizontal scrolling; essential
     columns stay readable before users need to swipe. */
  #deposit-history-table-body,
  #history-table-body { font-size: 12px; }
  #view-wallet .overflow-x-auto > table { min-width: 34rem; }
  #view-history .overflow-x-auto > table { min-width: 43rem; }
  #view-history .overflow-x-auto,
  #view-wallet .overflow-x-auto { -webkit-overflow-scrolling: touch; }
  #history-pagination-bar,
  #deposit-pagination-bar { align-items: stretch !important; }
  #history-pagination-bar > div,
  #deposit-pagination-bar > div { justify-content: space-between; width: 100%; }
  #history-pagination-bar button,
  #deposit-pagination-bar button { flex: 1 1 0; justify-content: center; }

  /* Modal panels become bottom sheets/full-height workspaces when needed. */
  .modal-overlay { align-items: flex-end !important; padding: .5rem !important; }
  .modal-overlay > div,
  #admin-adjust-credit-modal > div,
  #admin-audit-log-modal > div,
  #admin-reply-ticket-modal > div {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100dvh - 1rem) !important;
    overflow-y: auto !important;
    border-radius: 1.3rem !important;
  }
  #topup-modal > div { padding: 1rem !important; }
  #deposit-detail-modal > div { padding: 1rem !important; }
  #floating-contact-container { right: 1rem; bottom: 5.85rem; }
}

/* Admin must remain operable at phone widths: the compact icon rail preserves
   every destination while the content gets the remaining width. */
@media (max-width: 640px) {
  :root { --admin-header-height: 3.9rem; --admin-content-gutter: .75rem; }
  #admin-backoffice-container .admin-sidebar { width: 3.7rem !important; }
  #admin-backoffice-container .admin-sidebar .sidebar-text,
  #admin-backoffice-container .admin-sidebar .sidebar-brand-text,
  #admin-backoffice-container .admin-sidebar-toggle-icon,
  #admin-backoffice-container #admin-sidebar-toggle,
  #admin-backoffice-container .admin-sidebar > div:last-child > div { display: none !important; }
  #admin-backoffice-container .admin-sidebar nav { padding: .45rem !important; }
  #admin-backoffice-container .admin-nav-link { min-height: 2.75rem; justify-content: center; padding-inline: .4rem !important; border-radius: .85rem !important; }
  #admin-backoffice-container .admin-nav-link i { margin: 0 !important; }
  #admin-backoffice-container .admin-sidebar > div:first-child > div:first-child { height: 3.9rem; justify-content: center; padding: .45rem !important; }
  #admin-backoffice-container .admin-sidebar > div:first-child > div:first-child > div > div:first-child { width: 2.25rem !important; height: 2.25rem !important; font-size: 1.2rem !important; border-radius: .75rem !important; }
  #admin-backoffice-container .admin-sidebar > div:last-child { padding: .45rem !important; border-top: 0; }
  #admin-backoffice-container #admin-logout-btn { min-height: 2.6rem; justify-content: center; padding-inline: .4rem !important; border-color: transparent; }
  #admin-backoffice-container .admin-topbar { padding-inline: .75rem !important; }
  #admin-backoffice-container .admin-topbar [role="group"],
  #admin-backoffice-container .admin-topbar .theme-label,
  #admin-backoffice-container .admin-topbar .border-l > div:last-child { display: none !important; }
  #admin-backoffice-container .admin-content { padding: .75rem !important; gap: 1rem !important; }
  #admin-backoffice-container .admin-tab-view { gap: 1rem !important; }
  #admin-backoffice-container .admin-tab-view > div:first-child:not(#admin-system-real-root) > :last-child { width: 100%; }
  #admin-backoffice-container .admin-tab-view .overflow-x-auto > table { min-width: 38rem; }
  #admin-backoffice-container input,
  #admin-backoffice-container select,
  #admin-backoffice-container textarea { min-height: 2.65rem; font-size: 16px !important; }
  #admin-backoffice-container .grid { min-width: 0; }
}

/* Order picker primitives: true grid columns prevent long option labels from
   pushing the price outside the card at any viewport size. */
.mobile-header-wallet-button,
.mobile-profile-preferences,
.order-panel-mobile-title,
.order-mode-mobile-label,
.order-panel-faq,
.mobile-order-progress { display: none; }

.service-picker-card,
.country-picker-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
}
.service-picker-main,
.country-picker-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .75rem;
}
.service-picker-copy,
.country-picker-copy { min-width: 0; }
.service-picker-name {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.service-picker-stock {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-variant-numeric: proportional-nums;
}
.service-picker-price,
.country-picker-price { min-width: 5.4rem; }

.country-picker-card.allocation-cooldown {
  opacity: .72;
  filter: saturate(.72);
}

.country-picker-card.allocation-cooldown:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

/* Short desktop windows previously left the country list with almost no
   height because the checkout footer and an empty favorites panel consumed
   the fixed sidebar. Keep the controls compact while preserving a scrollable
   country list at common 1280x720 laptop dimensions. */
@media (min-width: 1025px) and (max-height: 800px) {
  #storefront-order-panel .order-panel-header {
    padding: .6rem .75rem !important;
  }

  #storefront-order-panel .order-panel-header > div:first-child {
    margin-bottom: .4rem !important;
  }

  #left-steps-scroll-container {
    gap: .35rem !important;
    padding: .55rem .75rem !important;
  }

  #step1-collapsed-view {
    margin-bottom: .35rem !important;
    padding: .55rem .7rem !important;
  }

  #step1-selected-icon {
    width: 2.35rem !important;
    height: 2.35rem !important;
    border-radius: .8rem !important;
  }

  #step2-country-section {
    gap: .35rem !important;
    padding-top: .35rem !important;
  }

  #step2-country-section > div:first-child {
    gap: .35rem !important;
    margin-bottom: .25rem !important;
  }

  #left-search-country {
    padding-top: .45rem !important;
    padding-bottom: .45rem !important;
  }

  #country-sort-pills {
    padding-bottom: .15rem !important;
  }

  #order-checkout-footer {
    display: grid;
    grid-template-areas: "summary summary" "quantity buy";
    grid-template-columns: minmax(0, 1fr) 8.75rem;
    gap: .5rem !important;
    padding: .6rem .75rem !important;
  }

  #order-checkout-footer > div:first-child { grid-area: summary; }

  #summary-qty-container {
    grid-area: quantity;
    min-height: 2.65rem;
    padding: .3rem .6rem !important;
  }

  #summary-qty-container > span { font-size: .75rem !important; }

  #qty-minus-btn,
  #qty-plus-btn,
  #order-quantity-input {
    width: 2.15rem !important;
    height: 2.15rem !important;
    min-height: 2.15rem !important;
    border-radius: .7rem !important;
  }

  #instant-buy-btn {
    grid-area: buy;
    width: 100% !important;
    min-height: 2.65rem !important;
    padding: .55rem .65rem !important;
    font-size: .78rem !important;
  }
}

@media (max-width: 767px) {
  /* Logged-in mobile header: logo, wallet, avatar. Less-used preferences live
     inside the profile sheet instead of competing for the top row. */
  #header-right-controls > .theme-toggle-btn { display: none !important; }
  .mobile-header-wallet-button {
    display: inline-flex;
    width: auto;
    min-width: 6.5rem;
    height: 2.7rem;
    min-height: 2.7rem !important;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    padding: .3rem .45rem .3rem .7rem;
    border: 1px solid rgba(52, 211, 153, .38);
    border-radius: .8rem;
    background: rgba(16, 185, 129, .16);
    color: #6ee7b7;
  }
  html:not(.dark) .mobile-header-wallet-button { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
  .mobile-header-wallet-copy { display: grid; min-width: 0; text-align: left; line-height: 1.05; }
  .mobile-header-wallet-label { color: #64748b; font-size: 9px; font-weight: 800; }
  html.dark .mobile-header-wallet-label { color: #94a3b8; }
  #mobile-header-balance-amount { max-width: 6.5rem; overflow: hidden; color: #047857; font-size: 13px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
  #mobile-header-balance-amount[data-level="warning"] { color: #d97706; }
  #mobile-header-balance-amount[data-level="low"] { color: #e11d48; }
  html.dark #mobile-header-balance-amount { color: #6ee7b7; }
  html.dark #mobile-header-balance-amount[data-level="warning"] { color: #fbbf24; }
  html.dark #mobile-header-balance-amount[data-level="low"] { color: #fb7185; }
  .mobile-header-wallet-plus { display: grid; width: 1.55rem; height: 1.55rem; flex: 0 0 auto; place-items: center; border-radius: .52rem; background: #059669; color: #fff; font-size: 17px; font-weight: 900; line-height: 1; }
  .mobile-profile-preferences {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid #e2e8f0;
  }
  html.dark .mobile-profile-preferences { border-bottom-color: #1e293b; }
  .mobile-profile-languages:not(.language-dropdown) { display: flex; gap: .35rem; }
  .mobile-profile-languages:not(.language-dropdown) button {
    display: grid;
    width: 2.75rem;
    height: 2.5rem;
    min-height: 2.5rem !important;
    place-items: center;
    border: 1px solid #dbe4ef;
    border-radius: .75rem;
    background: #f8fafc;
  }
  html.dark .mobile-profile-languages:not(.language-dropdown) button { border-color: #334155; background: #0f172a; }
  .mobile-profile-languages:not(.language-dropdown) img { width: 1.5rem; height: 1rem; border-radius: 2px; object-fit: cover; }
  .mobile-profile-theme {
    display: inline-flex !important;
    min-height: 2.5rem !important;
    align-items: center;
    gap: .45rem;
    padding: .55rem .75rem !important;
    border-radius: .75rem !important;
    font-size: .75rem !important;
  }

  #storefront-order-panel {
    width: 100% !important;
    min-height: calc(100dvh - 9.9rem);
    border-right: 0 !important;
    overflow: visible;
  }
  #storefront-order-panel.mobile-tab-hidden { display: none !important; }
  #storefront-order-panel.mobile-has-checkout { padding-bottom: 12.75rem; }
  #left-steps-scroll-container { overflow: visible !important; padding: .75rem !important; }
  #left-services-list,
  #left-countries-list { overflow: visible !important; padding-right: 0 !important; }
  .order-panel-header { padding: .75rem !important; }
  .order-panel-header > div:first-child { margin-bottom: .65rem !important; }
  .order-panel-desktop-title,
  .order-mode-desktop-label { display: none; }
  .order-panel-mobile-title,
  .order-mode-mobile-label { display: inline; }
  .order-panel-faq {
    display: inline-flex;
    min-height: 2.25rem !important;
    align-items: center;
    gap: .35rem;
    padding: .4rem .65rem;
    border: 1px solid #dbe4ef;
    border-radius: .7rem;
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
  }
  html.dark .order-panel-faq { border-color: #334155; background: #111827; color: #cbd5e1; }
  .order-mode-switch { gap: .35rem !important; padding: .25rem !important; }
  .order-mode-switch button { min-height: 2.55rem !important; padding: .45rem .6rem !important; font-size: 12px !important; }

  #step1-service-section > div:first-child,
  #step2-country-section > div:first-child { gap: .65rem; margin-bottom: .65rem !important; }
  #left-search-service,
  #left-search-country { height: 2.75rem; padding-block: .55rem !important; }

  .service-picker-card,
  .country-picker-card {
    grid-template-columns: minmax(0, 1fr) 4.65rem;
    gap: .5rem;
    min-height: 4.1rem;
    padding: .58rem .65rem !important;
    border-radius: 1rem !important;
  }
  .service-picker-main,
  .country-picker-main { gap: .6rem; }
  .service-picker-icon { width: 2.35rem !important; height: 2.35rem !important; padding: .48rem !important; border-radius: .72rem !important; }
  .service-picker-name { font-size: 12.5px !important; line-height: 1.25 !important; }
  .service-picker-stock { margin-top: .2rem !important; color: #64748b !important; font-size: 10px !important; line-height: 1.2; }
  html.dark .service-picker-stock { color: #94a3b8 !important; }
  .service-picker-price,
  .country-picker-price { width: 4.65rem; min-width: 4.65rem; }
  .service-picker-price-value,
  .country-picker-price > span:first-child { font-size: 12px !important; white-space: nowrap; }
  .service-price-prefix,
  .service-picker-price-caption { display: none !important; }
  .country-picker-price > span:last-child { overflow: hidden; font-size: 9px !important; text-overflow: ellipsis; white-space: nowrap; }

  /* Native-app checkout dock. It is mounted only after both service and
     country are selected, so the initial browsing screen stays uncluttered. */
  #order-checkout-footer { display: none; }
  #order-checkout-footer.mobile-checkout-visible {
    position: fixed;
    z-index: 35;
    right: 0;
    bottom: calc(5.35rem + env(safe-area-inset-bottom));
    left: 0;
    display: block;
    padding: .7rem .85rem !important;
    border-top: 1px solid #dbe4ef;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: 0 -12px 30px rgba(15, 23, 42, .12);
    backdrop-filter: blur(18px);
  }
  html.dark #order-checkout-footer.mobile-checkout-visible { border-top-color: #273449; background: rgba(15, 23, 42, .97) !important; }
  #order-checkout-footer.mobile-checkout-visible > div:first-child { gap: .65rem; }
  #order-checkout-footer.mobile-checkout-visible > div:first-child > div:first-child { min-width: 0; }
  #order-checkout-footer.mobile-checkout-visible > div:first-child > div:first-child > span:first-child,
  #order-checkout-footer.mobile-checkout-visible > div:first-child > div:last-child > span:first-child { display: none; }
  #order-checkout-footer.mobile-checkout-visible #summary-service-name,
  #order-checkout-footer.mobile-checkout-visible #summary-country-name { display: block; max-width: 11rem; overflow: hidden; font-size: 12px !important; text-overflow: ellipsis; white-space: nowrap; }
  #order-checkout-footer.mobile-checkout-visible #summary-service-name { font-size: 13px !important; }
  #order-checkout-footer.mobile-checkout-visible #summary-price-display { font-size: 1.35rem !important; white-space: nowrap; }
  #order-checkout-footer.mobile-checkout-visible #summary-qty-container { min-height: 2.65rem; padding: .35rem .5rem !important; border-radius: .85rem !important; }
  #order-checkout-footer.mobile-checkout-visible #summary-qty-container > span { font-size: 12px !important; }
  #order-checkout-footer.mobile-checkout-visible #summary-qty-container > div { gap: .35rem !important; }
  #order-checkout-footer.mobile-checkout-visible #qty-minus-btn,
  #order-checkout-footer.mobile-checkout-visible #qty-plus-btn { width: 2.25rem !important; height: 2.25rem !important; min-height: 2.25rem !important; border-radius: .7rem !important; font-size: 1rem !important; }
  #order-checkout-footer.mobile-checkout-visible #order-quantity-input { width: 2.8rem !important; min-height: 2.25rem !important; padding-block: .25rem !important; border-radius: .7rem !important; font-size: 14px !important; }
  #order-checkout-footer.mobile-checkout-visible #instant-buy-btn { min-height: 2.85rem !important; padding-block: .65rem !important; border-radius: .9rem !important; font-size: 14px !important; }

  /* Remaining destinations behave like independent mobile screens. */
  #view-wallet,
  #view-history,
  #view-emails,
  #view-guide { width: 100%; max-width: none; margin: 0; }
  #view-wallet > div:first-child p,
  #view-history > div:first-child p { display: none; }
  #view-wallet > .grid,
  #view-history > .grid { gap: .65rem !important; }
  #view-wallet > .grid .glass-panel,
  #view-history > .grid .glass-panel { min-height: 7rem; padding: 1rem !important; border-radius: 1rem !important; }
  #view-wallet > .grid [class*="text-3xl"],
  #view-history > .grid [class*="text-3xl"] { font-size: 1.65rem !important; }
  #wallet-inline-topup-panel { padding: 1rem !important; border-radius: 1.15rem !important; gap: 1rem !important; }
  #wallet-inline-topup-panel > div:first-child { padding-bottom: .75rem !important; }
  #wallet-inline-topup-panel > div:first-child h3 { font-size: 14px !important; }
  #wallet-inline-topup-panel > div:first-child p { display: none; }
  #tab-topup-promptpay,
  #tab-topup-truemoney { min-width: 0; padding-inline: .45rem !important; font-size: 10px !important; line-height: 1.25; }
  #content-topup-promptpay,
  #content-topup-truemoney { gap: .8rem !important; }
  #content-topup-promptpay > div,
  #content-topup-truemoney > div { padding: 1rem !important; border-radius: 1rem !important; }

  #floating-facebook-btn,
  #floating-line-btn { display: none !important; }
  #floating-contact-container { right: .85rem !important; bottom: 5.8rem !important; }
  #floating-support-btn {
    width: 2.8rem;
    height: 2.8rem;
    min-height: 2.8rem !important;
    justify-content: center;
    padding: 0 !important;
    border-radius: .95rem !important;
  }
  #floating-support-btn > span { display: none !important; }
}

@media (max-width: 350px) {
  #storefront-container main { padding: .65rem !important; }
  #header-brand-logo { max-width: calc(100% - 6.4rem); }
  #header-brand-logo h1 { font-size: 1.05rem !important; }
  .service-picker-card,
  .country-picker-card { grid-template-columns: minmax(0, 1fr) 4.25rem; }
  .service-picker-price,
  .country-picker-price { width: 4.25rem; min-width: 4.25rem; }
}

/* ================= MOBILE UX PASS: ACTIVE OTP, HISTORY, WALLET & AUTH =================
   The storefront remains a desktop grid above 768px. Below that breakpoint,
   information is grouped into touch-sized cards so no important value depends
   on a wide table or a horizontal desktop row. */
@media (max-width: 767px) {
  /* Active OTP: phone first, status second, secondary action last. */
  #view-live:not(.hidden) { min-height: 0 !important; }
  #live-active-orders-section { min-width: 0; }
  #live-active-orders-section .otp-live-panel { border-radius: 1.15rem; }
  #live-active-orders-section .otp-live-panel__header {
    display: block;
    padding: .85rem .9rem;
  }
  #live-active-orders-section .otp-live-panel__eyebrow { font-size: 10px; }
  #live-active-orders-section .otp-live-panel h2 { font-size: 15px; }
  #live-active-orders-section .otp-status-summary {
    justify-content: flex-start;
    gap: .35rem;
    margin-top: .65rem;
  }
  #live-active-orders-section .otp-summary-chip { padding: .35rem .55rem; font-size: 10px; }
  #live-active-orders-section .otp-orders-scroll { padding: .65rem; gap: .65rem; }
  #live-active-orders-section .otp-order-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.75rem;
    grid-template-rows: auto auto auto;
    gap: .65rem;
    min-width: 0;
    padding: .75rem;
    border-radius: 1rem;
  }
  #live-active-orders-section .otp-order-card__main {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 0;
    padding: 0;
    gap: .65rem;
  }
  #live-active-orders-section .otp-service-icon {
    width: 2.6rem;
    height: 2.6rem;
    padding: .5rem;
    border-radius: .8rem;
  }
  #live-active-orders-section .otp-service-country { font-size: 10px; }
  #live-active-orders-section .otp-country-code,
  #live-active-orders-section .otp-phone-number { font-size: 15px; }
  #live-active-orders-section .otp-number-actions { gap: .4rem; margin-top: .45rem; }
  #live-active-orders-section .otp-copy-number-btn {
    width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    justify-content: center;
    padding: 0;
    border-radius: .75rem;
  }
  #live-active-orders-section .otp-copy-number-btn span { display: none; }
  #live-active-orders-section .otp-order-card__meta {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    min-height: 0;
    padding: .1rem 0 0;
    border-left: 0;
  }
  #live-active-orders-section .otp-meta-item {
    min-height: 0;
    align-items: flex-start;
    gap: .2rem;
  }
  #live-active-orders-section .otp-meta-item > span:first-child { font-size: 9px; }
  #live-active-orders-section .otp-meta-item strong,
  #live-active-orders-section .otp-timer {
    min-width: 0;
    padding: 0;
    font-size: 13px;
    text-align: left;
  }
  #live-active-orders-section .otp-order-card__action {
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0;
    border-left: 0;
  }
  #live-active-orders-section .otp-cancel-btn,
  #live-active-orders-section .otp-finish-btn,
  #live-active-orders-section .otp-resend-btn {
    width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border-radius: .8rem;
  }
  #live-active-orders-section .otp-cancel-btn span,
  #live-active-orders-section .otp-finish-btn span,
  #live-active-orders-section .otp-resend-btn span { display: none; }
  #live-active-orders-section .otp-order-card__status {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 0;
    padding: .65rem 0 0;
    border-top: 1px solid #e2e8f0;
    border-left: 0;
  }
  #live-active-orders-section .otp-state { gap: .45rem; }
  #live-active-orders-section .otp-status-badge { font-size: 10px; }
  #live-active-orders-section .otp-state__hint,
  #live-active-orders-section .otp-state__message {
    max-width: 100%;
    font-size: 10px;
    white-space: normal;
    line-height: 1.45;
  }
  #live-active-orders-section .otp-code-row { width: 100%; justify-content: space-between; }
  #live-active-orders-section .otp-code-row .otp-display-badge { font-size: 24px; }
  #live-active-orders-section .otp-copy-btn {
    min-height: 2.75rem;
    padding: .55rem .7rem;
    border-radius: .75rem;
  }
  #live-active-orders-section .otp-copy-btn span { display: none; }
  html.dark #live-active-orders-section .otp-order-card__status { border-top-color: rgba(100, 116, 139, .34); }

  /* History: transform the data table into labelled, scannable cards. */
  #view-history > div:nth-child(4) > div:first-child { gap: .5rem; }
  #view-history > div:nth-child(4) > div:first-child select { width: 100%; }
  #view-history > div:nth-child(4) > div:nth-child(2) {
    align-items: stretch !important;
    flex-direction: column;
    gap: .65rem;
  }
  #view-history > div:nth-child(4) > div:nth-child(2) > div:first-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
  }
  #view-history > div:nth-child(4) > div:nth-child(2) > div:first-child > span:first-child { grid-column: 1 / -1; }
  #view-history > div:nth-child(4) > div:nth-child(2) > div:first-child > span:nth-of-type(2) { display: none; }
  #view-history > div:nth-child(4) > div:nth-child(2) > div:first-child input,
  #view-history > div:nth-child(4) > div:nth-child(2) > div:first-child button { width: 100%; min-width: 0; }
  #view-history > div:nth-child(4) > div:nth-child(2) > div:first-child button { grid-column: 1 / -1; }
  #history-date-presets { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #history-date-presets button { min-width: 0; padding-inline: .25rem; }
  #view-history > div:nth-child(5) { padding: .75rem !important; }
  #view-history > div:nth-child(5) .overflow-x-auto,
  #view-wallet .overflow-x-auto { overflow: visible !important; }
  #view-history > div:nth-child(5) table,
  #view-wallet .overflow-x-auto > table { display: block; min-width: 0 !important; width: 100%; }
  #view-history > div:nth-child(5) thead,
  #view-wallet .overflow-x-auto > table thead { display: none; }
  #history-table-body,
  #deposit-history-table-body { display: grid; gap: .65rem; }
  #history-table-body tr,
  #deposit-history-table-body tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    min-width: 0;
    padding: .8rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
  }
  #history-table-body td,
  #deposit-history-table-body td {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: .22rem;
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
    overflow-wrap: anywhere;
  }
  #history-table-body td::before,
  #deposit-history-table-body td::before {
    content: attr(data-label);
    display: block;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
  }
  #history-table-body td:nth-child(1),
  #history-table-body td:nth-child(2),
  #history-table-body td:nth-child(7),
  #deposit-history-table-body td:nth-child(1),
  #deposit-history-table-body td:nth-child(5) { grid-column: 1 / -1; }
  #history-table-body td:nth-child(5) { align-items: flex-start; }
  #history-table-body td:nth-child(5) .history-copy-otp { min-height: 2.75rem; padding: .55rem .7rem; }
  #history-table-body td:nth-child(6) span,
  #deposit-history-table-body td:nth-child(2) span { text-align: left !important; }
  #deposit-history-table-body td:nth-child(5) button { margin: 0; min-height: 2.75rem; }
  html.dark #history-table-body tr,
  html.dark #deposit-history-table-body tr { border-color: rgba(148, 163, 184, .16); background: rgba(15, 23, 42, .68); }

  /* Wallet: put the primary top-up task directly below the page title. */
  #view-wallet { display: flex !important; flex-direction: column; }
  #view-wallet > div:first-child { order: 0; }
  #wallet-inline-topup-panel { order: 1; }
  #view-wallet > .grid { order: 2; }
  #view-wallet > .glass-panel:last-child { order: 3; }
  #view-wallet > .glass-panel:last-child { padding: 1rem !important; border-radius: 1.15rem !important; }
  #view-wallet > .glass-panel:last-child .flex.items-center.justify-between { gap: .5rem; }

  /* Auth forms: a calm, single-column mobile sheet with 16px inputs. */
  .auth-main-panel {
    max-width: none !important;
    margin: 0 !important;
    padding: 1rem !important;
    border-radius: 1.25rem !important;
    gap: 1rem !important;
  }
  .auth-main-panel > .text-center { gap: .45rem !important; }
  .auth-main-panel .egg-icon-element { width: 4rem !important; height: 4rem !important; border-radius: 1.15rem !important; font-size: 2rem !important; }
  .auth-main-panel h2 { font-size: 1.25rem !important; line-height: 1.3; }
  .auth-main-panel form { gap: .75rem !important; }
  .auth-main-panel input { min-height: 3.25rem !important; font-size: 16px !important; }
  .auth-main-panel form > button,
  .auth-main-panel > div > button { min-height: 3.1rem !important; }
  .auth-trust-highlights { display: none !important; }
  #auth-modal { align-items: flex-end !important; padding: .5rem !important; }
  #auth-modal > div { max-height: calc(100dvh - 1rem) !important; padding: 1rem !important; border-radius: 1.25rem !important; overflow-y: auto; }
  #auth-modal input { min-height: 3rem; font-size: 16px !important; }
  #auth-modal form button { min-height: 3rem; }
}

@media (max-width: 480px) {
  #live-active-orders-section .otp-order-card { padding: .7rem; }
  #live-active-orders-section .otp-service-icon { width: 2.4rem; height: 2.4rem; }
  #live-active-orders-section .otp-country-code,
  #live-active-orders-section .otp-phone-number { font-size: 14px; }
  #live-active-orders-section .otp-copy-number-btn,
  #live-active-orders-section .otp-cancel-btn,
  #live-active-orders-section .otp-finish-btn,
  #live-active-orders-section .otp-resend-btn { width: 2.65rem; height: 2.65rem; min-height: 2.65rem; }
  #live-active-orders-section .otp-code-row .otp-display-badge { font-size: 22px; }
  #history-table-body tr,
  #deposit-history-table-body tr { gap: .55rem; padding: .7rem; }
}

/* Tablet header: keep every destination available while replacing the wide
   text navigation with familiar icon targets. */
@media (min-width: 768px) and (max-width: 1100px) {
  #storefront-container > header { padding-inline: 1rem !important; }
  #header-brand-logo { min-width: 0; flex: 0 1 auto; gap: .65rem !important; }
  #header-brand-logo p { display: none; }
  #header-brand-logo h1 { font-size: 1.45rem !important; }
  #header-main-nav { min-width: 0; flex: 0 1 auto; gap: .15rem !important; }
  #header-main-nav .header-nav-link { min-width: 2.6rem; padding: .6rem !important; justify-content: center; gap: 0 !important; }
  #header-main-nav .header-nav-link > span:not(#nav-active-count-badge) { display: none; }
  #header-right-controls { min-width: 0; flex: 0 0 auto; gap: .35rem !important; }
  #header-right-controls > [role="group"] { display: none !important; }
  #header-right-controls .theme-toggle-btn .theme-label { display: none !important; }
  #storefront-back-to-admin-btn { width: 2.55rem; min-height: 2.55rem; justify-content: center; padding: .5rem !important; }
  #storefront-back-to-admin-btn span { display: none; }
  #header-balance-capsule { padding: .25rem !important; }
  #header-balance-capsule > div { padding-inline: .5rem !important; }
  #header-balance-capsule > div > span:first-child,
  #header-balance-capsule button span { display: none; }
  #header-balance-capsule button { padding: .6rem !important; }
  #user-profile-menu-btn { gap: .4rem !important; padding: .35rem !important; }
  #user-profile-menu-btn > div:nth-child(2) { display: none !important; }
}

/* Wide desktop header: prevent long admin/member controls from pushing the
   header past the viewport at common laptop and desktop widths. */
@media (min-width: 1101px) and (max-width: 1799px) {
  #header-right-controls { gap: .35rem !important; min-width: 0; }
  #header-right-controls > [role="group"] button { width: 2rem; }
  #header-right-controls .theme-toggle-btn .theme-label { display: none !important; }
  #user-profile-menu-btn { max-width: 10rem; gap: .35rem !important; padding: .35rem !important; }
  #user-profile-menu-btn > div:nth-child(2) { min-width: 0; padding-right: .15rem !important; }
  #header-user-name,
  #header-user-role { max-width: 6.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Compact laptop header: preserve the member name while collapsing secondary
   controls and navigation labels before they can push the profile off-screen. */
@media (min-width: 1101px) and (max-width: 1799px) {
  #storefront-container > header { padding-inline: 1rem !important; }
  #header-brand-logo { min-width: 0; flex: 0 1 auto; gap: .65rem !important; }
  #header-brand-logo p { display: none; }
  #header-brand-logo h1 { font-size: 1.4rem !important; }
  #header-main-nav { min-width: 0; flex: 0 1 auto; gap: .15rem !important; }
  #header-main-nav .header-nav-link {
    min-width: 2.55rem;
    padding: .6rem !important;
    justify-content: center;
    gap: 0 !important;
  }
  #header-main-nav .header-nav-link > span:not(#nav-active-count-badge) { display: none; }
  #header-right-controls > [role="group"] { display: none !important; }
  #header-balance-capsule { padding: .25rem !important; }
  #header-balance-capsule > div { padding-inline: .55rem !important; }
  #header-balance-capsule > div > span:first-child,
  #header-balance-capsule button span { display: none; }
  #header-balance-capsule button { padding: .6rem !important; }
}

/* Personal Top 3 shortcuts: exact service + country pairs. */
.frequent-purchases-section {
  flex: 0 0 auto;
}

.frequent-purchases-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.frequent-purchase-item {
  min-width: 0;
}

.frequent-purchase-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 7px 25px 7px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
}

.frequent-purchase-btn:hover {
  border-color: #10b981;
  background: #ecfdf5;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.12);
}

.frequent-purchase-btn:active {
  transform: scale(0.98);
}

.frequent-purchase-btn:focus-visible {
  outline: 3px solid rgba(16, 185, 129, 0.32);
  outline-offset: 2px;
  border-color: #059669;
}

.frequent-purchase-btn[aria-pressed="true"] {
  border-color: #059669;
  background: #d1fae5;
  box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.22);
}

.frequent-purchase-service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
}

.frequent-purchase-service-icon > svg,
.frequent-purchase-service-icon > i {
  width: 17px;
  height: 17px;
}

.frequent-purchase-copy {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.frequent-purchase-service-name,
.frequent-purchase-country > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frequent-purchase-service-name {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.frequent-purchase-country {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.frequent-purchase-flag {
  flex: 0 0 auto;
  width: 16px;
  height: 11px;
  border-radius: 2px;
  object-fit: cover;
}

span.frequent-purchase-flag {
  width: auto;
  height: auto;
  font-size: 13px;
  line-height: 1;
}

.frequent-purchase-count {
  position: absolute;
  top: 5px;
  right: 6px;
  color: #059669;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

html.dark .frequent-purchase-btn {
  border-color: #334155;
  color: #e2e8f0;
  background: #0f172a;
  box-shadow: none;
}

html.dark .frequent-purchase-btn:hover,
html.dark .frequent-purchase-btn[aria-pressed="true"] {
  border-color: #10b981;
  background: rgba(6, 78, 59, 0.6);
}

html.dark .frequent-purchase-service-icon {
  border-color: #334155;
  background: #1e293b;
}

html.dark .frequent-purchase-country {
  color: #94a3b8;
}

html.dark .frequent-purchase-count {
  color: #34d399;
}

@media (max-width: 640px) {
  .frequent-purchases-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 1px 1px 4px;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
  }

  .frequent-purchase-item {
    flex: 0 0 min(44vw, 168px);
    scroll-snap-align: start;
  }

  .frequent-purchase-btn {
    min-height: 46px;
  }
}

@media (min-width: 1025px) and (max-height: 800px) {
  .frequent-purchases-section {
    padding: 7px 12px !important;
  }

  .frequent-purchases-section > div:first-child {
    margin-bottom: 5px !important;
  }

  .frequent-purchase-btn {
    min-height: 42px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

/* ========================================================================== 
   MULTI-NUMBER IN-SCREEN COMMAND CENTER & QUICK BUY STYLES
   ========================================================================== */

.otp-quick-reorder-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: thin;
}
html.dark .otp-quick-reorder-bar {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.12);
}
.otp-quick-reorder-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
}
html.dark .otp-quick-reorder-label {
  color: #94a3b8;
}
.otp-quick-chips-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
}
.otp-quick-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}
html.dark .otp-quick-chip-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}
.otp-quick-chip-btn:hover {
  border-color: #10b981;
  color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px -2px rgba(16, 185, 129, 0.25);
}
html.dark .otp-quick-chip-btn:hover {
  border-color: #34d399;
  color: #34d399;
}
.otp-quick-chip-price {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #059669;
  font-size: 10px;
}
html.dark .otp-quick-chip-price {
  color: #34d399;
}

/* Global Action Buttons in Header */
.otp-global-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}
html.dark .otp-global-action-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
.otp-global-action-btn:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}
.otp-global-action-btn.quick-buy-btn {
  background: #059669;
  border-color: #047857;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}
.otp-global-action-btn.quick-buy-btn:hover {
  background: #047857;
}

/* Reorder Buttons in Card */
.otp-reorder-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  color: #047857;
  background: #f0fdf4;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.otp-reorder-btn:hover {
  border-color: #86efac;
  background: #dcfce7;
  transform: translateY(-1px);
}
html.dark .otp-reorder-btn {
  background: rgba(6, 78, 59, 0.4);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}
.otp-reorder-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  color: #047857;
  background: #f0fdf4;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.otp-reorder-action-btn:hover {
  border-color: #86efac;
  background: #dcfce7;
}
html.dark .otp-reorder-action-btn {
  background: rgba(6, 78, 59, 0.4);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

/* Mobile Floating Add Number Bar */
.otp-mobile-floating-buy-bar {
  display: none;
  padding: 12px;
  background: linear-gradient(to top, rgba(255,255,255,1) 70%, rgba(255,255,255,0));
  position: sticky;
  bottom: 0;
  z-index: 10;
}
html.dark .otp-mobile-floating-buy-bar {
  background: linear-gradient(to top, rgba(15,23,42,1) 70%, rgba(15,23,42,0));
}
.otp-mobile-add-number-btn {
  width: 100%;
  padding: 13px;
  border-radius: 16px;
  background: linear-gradient(to right, #059669, #0d9488);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}
.otp-mobile-add-number-btn:active {
  transform: scale(0.98);
}
@media (max-width: 768px) {
  .otp-mobile-floating-buy-bar {
    display: block;
  }
}

/* Responsive OTP receiver: tablet widths need a stacked card.  The old
   desktop table kept four wide columns until 700px, so the phone, status and
   actions collided as soon as the viewport became narrower than the panel. */
@media (min-width: 701px) and (max-width: 1100px) {
  #live-active-orders-section .otp-order-card {
    grid-template-columns: minmax(0, 1fr) minmax(170px, .8fr);
    grid-template-rows: auto auto auto;
    gap: 0;
  }
  #live-active-orders-section .otp-order-card__main {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
    border-bottom: 1px solid #e2e8f0;
  }
  #live-active-orders-section .otp-order-card__meta {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    border-left: 0;
  }
  #live-active-orders-section .otp-order-card__status {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }
  #live-active-orders-section .otp-order-card__action {
    grid-column: 1 / -1;
    grid-row: 3;
    min-width: 0;
    border-top: 1px solid #e2e8f0;
    border-left: 0;
  }
  html.dark #live-active-orders-section .otp-order-card__main,
  html.dark #live-active-orders-section .otp-order-card__action { border-color: rgba(100, 116, 139, .34); }
  #live-active-orders-section .otp-order-card__action > div { justify-content: flex-end; }
}

@media (max-width: 700px) {
  #live-active-orders-section .otp-order-card,
  #live-active-orders-section .otp-order-card__main,
  #live-active-orders-section .otp-number-block,
  #live-active-orders-section .otp-phone-row,
  #live-active-orders-section .otp-number-actions { min-width: 0; }
  #live-active-orders-section .otp-number-actions { flex-wrap: wrap; }
  #live-active-orders-section .otp-service-country > span,
  #live-active-orders-section .otp-phone-number { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* The shared `.hidden` rule is intentionally important, so the Tailwind
   `md:flex` utility cannot reveal the authenticated desktop navigation by
   itself.  Restore the OTP/Email tab bar at desktop widths while keeping the
   compact bottom navigation for phones. */
@media (min-width: 768px) {
  body.is-authenticated #storefront-container > header #header-main-nav {
    display: flex !important;
  }
}
@media (max-width: 767px) {
  #storefront-container > header #header-main-nav {
    display: none !important;
  }
}

/* Keep the live-order title, copy action and status summary together on one
   header row.  The tools may wrap only on narrow screens so the desktop
   header stays compact without introducing horizontal overflow on mobile. */
.otp-live-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.otp-live-header-title { min-width: 0; }
.otp-live-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.otp-live-header-tools .otp-status-summary {
  flex: 0 0 auto;
  margin-top: 0;
}
@media (max-width: 767px) {
  #live-active-orders-section .otp-live-header-row {
    align-items: flex-start;
    flex-direction: column;
  }
  #live-active-orders-section .otp-live-header-tools {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   FINAL RESPONSIVE SAFETY NET
   Keep the page inside the viewport at desktop, tablet and phone widths.
   OTP cards become a true vertical stack below the wide desktop layout so
   long phone numbers, status text and actions never compete for one row.
   ========================================================================== */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html,
  body { overflow-x: hidden; }
}

/* The `.hidden` utility is intentionally important in this project, so the
   `hidden sm:block` classes on the profile name need an explicit responsive
   override. Keep the full identity visible where the header has room. */
@media (min-width: 768px) {
  #user-profile-menu-btn > div:nth-child(2) {
    display: block !important;
    min-width: 0;
    max-width: 8.5rem;
  }

  #header-user-name {
    display: block !important;
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  #user-profile-menu-btn > div:nth-child(2) {
    padding-right: .25rem;
  }

  #header-user-role { display: none !important; }
  #header-user-name { max-width: 5.5rem; font-size: 11px !important; }
}

@media (max-width: 767px) {
  #user-profile-menu-btn > div:nth-child(2) { display: none !important; }
}

#storefront-container,
#storefront-container > header,
#storefront-container > main,
#storefront-container > main > *,
#storefront-container > main .tab-view,
#storefront-order-panel,
#live-active-orders-section,
#live-active-orders-section .otp-live-panel,
#live-active-orders-section .otp-orders-scroll,
#live-active-orders-section .otp-order-card {
  min-width: 0;
  max-width: 100%;
}

#storefront-container > header {
  /* Profile dropdowns are positioned below the header. Clipping the header
     would make a successful click look like it did nothing. Page-level
     overflow protection below still prevents horizontal scrolling. */
  overflow: visible;
}

#header-brand-logo,
#header-main-nav,
#header-right-controls {
  min-width: 0;
}

#header-brand-logo {
  flex: 0 1 auto;
}

#header-main-nav {
  flex: 1 1 auto;
  justify-content: center;
  overflow: hidden;
}

#header-main-nav .header-nav-link {
  min-width: 0;
  max-width: 100%;
}

#header-right-controls {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  max-width: 100%;
}

#header-right-controls > *,
#header-main-nav .header-nav-link,
#header-balance-capsule,
#user-profile-menu-btn {
  min-width: 0;
}

#header-balance-capsule > div,
#header-balance-amount,
#mobile-header-balance-amount {
  flex: 0 0 auto;
  white-space: nowrap;
}

#header-brand-logo h1,
#header-brand-logo p,
#header-main-nav .header-nav-link span,
#header-balance-capsule span,
#user-profile-menu-btn span {
  overflow-wrap: anywhere;
}

/* Make the service/country list scrollbar easy to grab. The global scrollbar
   is intentionally slim, but these are primary navigation controls and need
   a larger hit area on mouse and touch devices. */
#left-services-list,
#left-countries-list {
  scrollbar-width: auto;
  scrollbar-color: #94a3b8 transparent;
}

#left-services-list::-webkit-scrollbar,
#left-countries-list::-webkit-scrollbar {
  width: 10px;
}

#left-services-list::-webkit-scrollbar-track,
#left-countries-list::-webkit-scrollbar-track {
  border-radius: 9999px;
  background: rgba(148, 163, 184, .14);
}

#left-services-list::-webkit-scrollbar-thumb,
#left-countries-list::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 2px solid transparent;
  border-radius: 9999px;
  background: #94a3b8;
  background-clip: padding-box;
}

#left-services-list::-webkit-scrollbar-thumb:hover,
#left-countries-list::-webkit-scrollbar-thumb:hover {
  background: #64748b;
  background-clip: padding-box;
}

/* The mobile layout scrolls the page itself, so its native scrollbar also
   needs a usable grab area instead of the 5px decorative default. */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 10px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 9999px;
  background: #94a3b8;
  background-clip: padding-box;
}

html.dark #left-services-list,
html.dark #left-countries-list {
  scrollbar-color: #64748b transparent;
}

html.dark #left-services-list::-webkit-scrollbar-track,
html.dark #left-countries-list::-webkit-scrollbar-track {
  background: rgba(51, 65, 85, .38);
}

html.dark #left-services-list::-webkit-scrollbar-thumb,
html.dark #left-countries-list::-webkit-scrollbar-thumb {
  background: #64748b;
  background-clip: padding-box;
}

#live-active-orders-section .otp-live-header-row,
#live-active-orders-section .otp-live-header-title,
#live-active-orders-section .otp-live-header-tools,
#live-active-orders-section .otp-order-card__main,
#live-active-orders-section .otp-number-block,
#live-active-orders-section .otp-order-card__meta,
#live-active-orders-section .otp-order-card__status,
#live-active-orders-section .otp-order-card__action {
  min-width: 0;
  max-width: 100%;
}

#live-active-orders-section .otp-phone-number,
#live-active-orders-section .otp-service-country,
#live-active-orders-section .otp-service-country > span,
#live-active-orders-section .otp-state__hint,
#live-active-orders-section .otp-state__message {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* A compact header row at tablet widths gives the title and summary their
   own line before the card list begins. */
@media (min-width: 768px) and (max-width: 1100px) {
  #live-active-orders-section .otp-live-header-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  #live-active-orders-section .otp-live-header-title {
    flex: 1 1 12rem;
  }

  #live-active-orders-section .otp-live-header-tools {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* One column is deliberately used from tablet down. This prevents the
     fixed desktop metadata/status columns from squeezing the phone row. */
  #live-active-orders-section .otp-order-card {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 0;
    overflow: visible;
  }

  #live-active-orders-section .otp-order-card__main,
  #live-active-orders-section .otp-order-card__meta,
  #live-active-orders-section .otp-order-card__status,
  #live-active-orders-section .otp-order-card__action {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100%;
    border-left: 0 !important;
  }

  #live-active-orders-section .otp-order-card__main {
    padding: .8rem 0;
    border-bottom: 1px solid #e2e8f0;
  }

  #live-active-orders-section .otp-order-card__meta {
    padding: .7rem 0;
    border-bottom: 1px solid #e2e8f0;
  }

  #live-active-orders-section .otp-order-card__status {
    padding: .7rem 0;
    border-top: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  #live-active-orders-section .otp-order-card__action {
    padding: .7rem 0 0;
    justify-content: stretch;
  }

  #live-active-orders-section .otp-order-card__action > div {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  #live-active-orders-section .otp-cancel-btn,
  #live-active-orders-section .otp-finish-btn,
  #live-active-orders-section .otp-resend-btn {
    flex: 1 1 12rem;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html.dark #live-active-orders-section .otp-order-card__main,
  html.dark #live-active-orders-section .otp-order-card__meta,
  html.dark #live-active-orders-section .otp-order-card__status {
    border-color: rgba(100, 116, 139, .34);
  }
}

/* Phone cards use the same vertical order, with readable action labels and
   no icon-only controls that can be mistaken for clipped text. */
@media (max-width: 767px) {
  #storefront-container > header {
    overflow: visible;
  }

  #header-brand-logo {
    flex: 1 1 auto;
    min-width: 0;
  }

  #header-right-controls {
    flex: 0 0 auto;
  }

  #live-active-orders-section .otp-order-card {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 0;
    overflow: visible;
  }

  #live-active-orders-section .otp-order-card__main,
  #live-active-orders-section .otp-order-card__meta,
  #live-active-orders-section .otp-order-card__status,
  #live-active-orders-section .otp-order-card__action {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100%;
    border-left: 0 !important;
  }

  #live-active-orders-section .otp-order-card__main {
    padding-bottom: .7rem;
    border-bottom: 1px solid #e2e8f0;
  }

  #live-active-orders-section .otp-order-card__meta {
    padding: .7rem 0;
    border-bottom: 1px solid #e2e8f0;
  }

  #live-active-orders-section .otp-order-card__status {
    padding: .7rem 0;
    border-top: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  #live-active-orders-section .otp-order-card__action {
    padding: .7rem 0 0;
    justify-content: stretch;
  }

  #live-active-orders-section .otp-order-card__action > div {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  #live-active-orders-section .otp-cancel-btn,
  #live-active-orders-section .otp-finish-btn,
  #live-active-orders-section .otp-resend-btn {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #live-active-orders-section .otp-cancel-btn span,
  #live-active-orders-section .otp-finish-btn span,
  #live-active-orders-section .otp-resend-btn span {
    display: inline;
  }

  html.dark #live-active-orders-section .otp-order-card__main,
  html.dark #live-active-orders-section .otp-order-card__meta,
  html.dark #live-active-orders-section .otp-order-card__status {
    border-color: rgba(100, 116, 139, .34);
  }
}
/* Phase 18: keep only the latest OTP on the true visual centreline. */
#live-active-orders-section .otp-state--received {
  width: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#live-active-orders-section .otp-state--received .otp-code-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0;
}

#live-active-orders-section .otp-state--received .otp-display-badge {
  grid-column: 2;
  justify-self: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: .18em;
  transform: translateX(.09em);
}

#live-active-orders-section .otp-state--received .otp-copy-btn {
  grid-column: 3;
  justify-self: start;
  margin-left: .55rem;
}

@media (min-width: 1101px) {
  #live-active-orders-section .otp-order-card {
    grid-template-columns: minmax(240px, 1fr) 240px minmax(280px, 1fr) 140px;
  }

  #live-active-orders-section .otp-order-card__status {
    justify-content: center;
    padding-inline: 1.15rem;
    text-align: center;
  }
}

@media (max-width: 767px) {
  #live-active-orders-section .otp-state--received .otp-code-row {
    max-width: 22rem;
  }
}

/* Additional SMS messages reuse the fixed four-line received card. */
@media (min-width: 1101px) {
  #live-active-orders-section .otp-order-card {
    box-sizing: border-box;
    height: 100px !important;
    min-height: 100px !important;
  }

  #live-active-orders-section .otp-order-card__meta {
    padding: 0;
  }

  #live-active-orders-section .otp-meta-item {
    box-sizing: border-box;
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: 28px 29px 13px 13px;
    align-content: center;
    justify-items: center;
    gap: 2px;
    padding: 4px 14px;
  }

  #live-active-orders-section .otp-meta-item > span:first-child {
    align-self: center;
    line-height: 20px;
  }

  #live-active-orders-section .otp-meta-item > strong,
  #live-active-orders-section .otp-meta-item > .otp-timer {
    align-self: center;
    height: 29px;
    line-height: 29px;
  }

  #live-active-orders-section .otp-meta-item > .otp-timer {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #live-active-orders-section .otp-order-card__main,
  #live-active-orders-section .otp-order-card__meta,
  #live-active-orders-section .otp-order-card__status,
  #live-active-orders-section .otp-order-card__action {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
  }

  #live-active-orders-section .otp-order-card--received .otp-order-card__status {
    padding: 4px 12px;
    overflow: hidden;
  }

  #live-active-orders-section .otp-state--received {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: 28px 29px 13px 13px;
    align-content: center;
    justify-items: center;
    gap: 2px;
    overflow: hidden;
  }

  #live-active-orders-section .otp-state--received.otp-state--message-empty {
    grid-template-rows: 28px 29px 13px 13px;
  }

  #live-active-orders-section .otp-state--message-empty .otp-received-message {
    height: 0;
  }

  #live-active-orders-section .otp-state--received > .otp-status-badge {
    min-height: 20px;
    box-sizing: border-box;
    padding: 2px 7px;
    font-size: 10px;
    line-height: 1;
  }

  #live-active-orders-section .otp-state--received > .otp-received-count-badge {
    display: none;
  }

  #live-active-orders-section .otp-state--received > .otp-status-badge svg {
    width: 11px;
    height: 11px;
  }

  #live-active-orders-section .otp-state--received .otp-code-row {
    grid-row: 2;
    height: 29px;
  }

  #live-active-orders-section .otp-state--received .otp-copy-btn {
    box-sizing: border-box;
    min-height: 26px;
    height: 26px;
    padding-block: 5px;
    line-height: 1;
    white-space: nowrap;
  }

  #live-active-orders-section .otp-state--received .otp-copy-btn > span {
    white-space: nowrap;
  }

  #live-active-orders-section .otp-received-message,
  #live-active-orders-section .otp-received-footer {
    display: block;
    width: 100%;
    min-width: 0;
    height: 13px;
    overflow: hidden;
    color: #0f766e;
    font-size: 10px;
    font-weight: 700;
    line-height: 13px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #live-active-orders-section .otp-received-message {
    grid-row: 3;
    color: #64748b;
  }

  #live-active-orders-section .otp-received-footer {
    grid-row: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  #live-active-orders-section .otp-received-footer > svg {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
  }

  #live-active-orders-section .otp-received-footer > span {
    display: block !important;
    min-width: 0;
    overflow: hidden;
    color: inherit !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #live-active-orders-section .otp-received-footer > .otp-received-footer__desktop {
    display: block !important;
  }

  #live-active-orders-section .otp-received-footer > .otp-received-footer__mobile {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  #live-active-orders-section .otp-order-card--waiting .otp-state,
  #live-active-orders-section .otp-order-card--received .otp-state {
    min-height: 1.75rem;
    justify-content: center;
  }

  #live-active-orders-section .otp-order-card--received .otp-copy-btn {
    width: 1.75rem;
    height: 1.75rem;
    min-width: 1.75rem;
    min-height: 1.75rem;
    padding: 0;
  }

  #live-active-orders-section .otp-order-card--received .otp-copy-btn span {
    display: none;
  }
}

html.dark #live-active-orders-section .otp-received-footer {
  color: #5eead4;
}

html.dark #live-active-orders-section .otp-received-message {
  color: #94a3b8;
}

/* ================= ADMIN DESKTOP COMMAND CENTER =================
   Phase Web Admin 1-2 is deliberately scoped to the backoffice at desktop
   widths. Customer pages and mobile.html keep their existing layout. */
@media (min-width: 1024px) {
  #admin-backoffice-container {
    --admin-header-height: 72px;
    --admin-content-gutter: clamp(1.25rem, 2vw, 2rem);
    background: #070b14;
  }

  #admin-backoffice-container #admin-sidebar:not(.w-20) {
    width: 15.5rem !important;
  }

  #admin-backoffice-container #admin-sidebar.w-20 {
    width: 4.75rem !important;
  }

  #admin-backoffice-container #admin-sidebar > div:first-child > div:first-child {
    position: relative;
  }

  #admin-backoffice-container #admin-sidebar.w-20 > div:first-child > div:first-child {
    justify-content: center;
    padding-inline: .6rem;
  }

  #admin-backoffice-container #admin-sidebar.w-20 #admin-sidebar-toggle {
    position: absolute;
    top: .3rem;
    right: .3rem;
    padding: .2rem;
    border-color: rgba(51, 65, 85, .65);
    background: rgba(15, 23, 42, .92);
  }

  #admin-backoffice-container .admin-sidebar > div:first-child {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
  }

  #admin-backoffice-container .admin-nav {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: .9rem .75rem 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, .45) transparent;
  }

  #admin-backoffice-container .admin-nav-section-label {
    margin: 1rem .65rem .35rem;
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  #admin-backoffice-container .admin-nav-section-label:first-child {
    margin-top: .15rem;
  }

  #admin-backoffice-container .admin-nav-link {
    min-height: 42px;
    border-radius: .85rem !important;
  }

  #admin-backoffice-container .admin-nav-link.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, .24), rgba(124, 58, 237, .12)) !important;
    border-color: rgba(99, 102, 241, .38) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .18);
  }

  #admin-backoffice-container .admin-header-standard {
    overflow: visible;
    background: rgba(7, 11, 20, .94);
    box-shadow: 0 10px 28px rgba(2, 6, 23, .16);
  }

  #admin-backoffice-container .admin-header-primary {
    width: 100%;
  }

  #admin-backoffice-container .admin-current-page {
    width: clamp(9.5rem, 13vw, 12.5rem);
    padding-right: 1rem;
    border-right: 1px solid rgba(51, 65, 85, .7);
  }

  #admin-backoffice-container .admin-topbar-action:disabled {
    cursor: wait;
    opacity: .7;
  }

  #admin-backoffice-container .admin-content {
    background:
      radial-gradient(circle at 88% -5%, rgba(79, 70, 229, .09), transparent 26rem),
      #070b14;
  }

  #admin-backoffice-container #admin-tab-overview {
    max-width: 1500px;
    margin-inline: auto;
  }

  #admin-backoffice-container .admin-dashboard-panel,
  #admin-backoffice-container .admin-kpi-card,
  #admin-backoffice-container .admin-dashboard-report {
    min-width: 0;
    box-shadow: 0 14px 34px rgba(2, 6, 23, .14);
  }

  #admin-backoffice-container .admin-kpi-card {
    position: relative;
    overflow: hidden;
  }

  #admin-backoffice-container .admin-kpi-card::after {
    content: "";
    position: absolute;
    inset: auto -2rem -3rem auto;
    width: 7rem;
    height: 7rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(99, 102, 241, .10), transparent 68%);
    pointer-events: none;
  }

  #admin-backoffice-container .admin-kpi-card-profit::after {
    background: radial-gradient(circle, rgba(16, 185, 129, .14), transparent 68%);
  }

  #admin-backoffice-container .admin-action-card {
    min-height: 118px;
  }

  #admin-backoffice-container .admin-dashboard-primary-grid > *,
  #admin-backoffice-container .admin-dashboard-secondary-grid > * {
    min-width: 0;
  }

  #admin-backoffice-container .admin-urgent-banner {
    box-shadow: 0 12px 28px rgba(244, 63, 94, .08);
  }

  #admin-backoffice-container .admin-dashboard-report summary::-webkit-details-marker {
    display: none;
  }

  #admin-backoffice-container .admin-dashboard-report[open] summary svg {
    transform: rotate(180deg);
  }

  #admin-backoffice-container .admin-dashboard-report summary svg {
    transition: transform .2s ease;
  }

  html:not(.dark) #admin-backoffice-container .admin-content {
    background:
      radial-gradient(circle at 88% -5%, rgba(99, 102, 241, .08), transparent 25rem),
      #f5f7fb !important;
  }

  html:not(.dark) #admin-backoffice-container .admin-current-page {
    border-right-color: #e2e8f0;
  }

  html:not(.dark) #admin-backoffice-container .admin-dashboard-panel,
  html:not(.dark) #admin-backoffice-container .admin-kpi-card,
  html:not(.dark) #admin-backoffice-container .admin-dashboard-report {
    background: rgba(255, 255, 255, .96) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
  }

  html:not(.dark) #admin-backoffice-container .admin-action-card {
    background: #f8fafc !important;
  }
}

/* Phase 3 cascade guard: the shared admin page-header rule above intentionally
   uses flex; Support Operations needs a grid because it has title, channel
   switch and filters as three distinct work areas. */
@media (min-width: 1024px) {
  #admin-backoffice-container .admin-tab-view > .admin-ticket-header:first-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch;
  }
}

@media (min-width: 1280px) {
  #admin-backoffice-container .admin-tab-view > .admin-ticket-header:first-child {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 520px) !important;
    align-items: center;
  }

  #admin-backoffice-container .admin-ticket-header > .admin-ticket-toolbar {
    grid-column: 1 / -1;
  }
}

/* OTP purchase leaderboard. Every selector is scoped to the additive
   leaderboard surface so storefront purchase and account layouts stay intact. */
.leaderboard-view {
  --leaderboard-accent: #0ea5e9;
  --leaderboard-accent-strong: #0369a1;
  --leaderboard-amber: #f59e0b;
  --leaderboard-border: #dbe4ee;
  --leaderboard-card: rgba(255, 255, 255, .96);
  --leaderboard-muted: #64748b;
  --leaderboard-surface: #f8fafc;
  --leaderboard-text: #0f172a;
  display: grid;
  width: min(100%, 76rem);
  min-width: 0;
  margin: 0 auto;
  gap: 1rem;
  color: var(--leaderboard-text);
}

html.dark .leaderboard-view {
  --leaderboard-accent: #38bdf8;
  --leaderboard-accent-strong: #7dd3fc;
  --leaderboard-border: rgba(71, 85, 105, .72);
  --leaderboard-card: rgba(15, 23, 42, .92);
  --leaderboard-muted: #94a3b8;
  --leaderboard-surface: rgba(15, 23, 42, .68);
  --leaderboard-text: #f8fafc;
}

.leaderboard-header {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  overflow: hidden;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--leaderboard-border);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 92% 0, rgba(245, 158, 11, .18), transparent 17rem),
    linear-gradient(135deg, rgba(14, 165, 233, .08), transparent 55%),
    var(--leaderboard-card);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .07);
}

html.dark .leaderboard-header {
  background:
    radial-gradient(circle at 92% 0, rgba(245, 158, 11, .14), transparent 17rem),
    linear-gradient(135deg, rgba(14, 165, 233, .11), transparent 55%),
    var(--leaderboard-card);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .24);
}

.leaderboard-heading-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.leaderboard-eyebrow {
  display: block;
  margin-bottom: .35rem;
  color: var(--leaderboard-accent-strong);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.leaderboard-heading-copy h2 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .65rem;
  margin: 0;
  color: var(--leaderboard-text);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  font-weight: 900;
  line-height: 1.2;
}

.leaderboard-heading-copy h2 svg {
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  color: var(--leaderboard-amber);
  filter: drop-shadow(0 4px 8px rgba(245, 158, 11, .25));
}

.leaderboard-heading-copy p {
  max-width: 45rem;
  margin: .55rem 0 0;
  color: var(--leaderboard-muted);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.65;
}

.leaderboard-period-button:focus-visible,
.leaderboard-account-shortcut:focus-visible {
  outline: 3px solid rgba(14, 165, 233, .3);
  outline-offset: 2px;
}

.leaderboard-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding: .65rem;
  border: 1px solid var(--leaderboard-border);
  border-radius: 1.15rem;
  background: var(--leaderboard-card);
}

.leaderboard-period-tabs {
  display: inline-grid;
  min-width: min(100%, 18rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .3rem;
  padding: .25rem;
  border-radius: .9rem;
  background: rgba(148, 163, 184, .14);
}

.leaderboard-period-button {
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .5rem .75rem;
  border: 1px solid transparent;
  border-radius: .72rem;
  background: transparent;
  color: var(--leaderboard-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 800;
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.leaderboard-period-button svg {
  width: .95rem;
  height: .95rem;
}

.leaderboard-period-button.is-active {
  border-color: rgba(14, 165, 233, .24);
  background: var(--leaderboard-card);
  color: var(--leaderboard-accent-strong);
  box-shadow: 0 3px 12px rgba(15, 23, 42, .08);
}

.leaderboard-privacy-note {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  margin: 0;
  color: var(--leaderboard-muted);
  font-size: .65rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: right;
}

.leaderboard-privacy-note svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: #10b981;
}

.leaderboard-content {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.leaderboard-section-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-inline: .15rem;
}

.leaderboard-section-meta > div {
  min-width: 0;
}

.leaderboard-section-meta span,
.leaderboard-section-meta strong {
  display: block;
}

.leaderboard-section-meta span {
  color: var(--leaderboard-accent-strong);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.leaderboard-section-meta strong {
  margin-top: .1rem;
  color: var(--leaderboard-text);
  font-size: 1rem;
  font-weight: 900;
}

.leaderboard-section-meta time {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .35rem;
  color: var(--leaderboard-muted);
  font-size: .63rem;
  font-weight: 700;
}

.leaderboard-section-meta time svg {
  width: .9rem;
  height: .9rem;
}

.leaderboard-self-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 2.75rem minmax(0, 1fr) minmax(8.5rem, auto);
  align-items: center;
  gap: .8rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(14, 165, 233, .35);
  border-radius: 1.1rem;
  background: linear-gradient(110deg, rgba(14, 165, 233, .12), rgba(16, 185, 129, .07));
  box-shadow: inset 3px 0 0 var(--leaderboard-accent);
}

.leaderboard-self-icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: .85rem;
  background: rgba(14, 165, 233, .15);
  color: var(--leaderboard-accent-strong);
}

.leaderboard-self-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.leaderboard-self-copy,
.leaderboard-self-amount {
  min-width: 0;
}

.leaderboard-self-copy small,
.leaderboard-self-amount small {
  display: block;
  color: var(--leaderboard-muted);
  font-size: .6rem;
  font-weight: 750;
}

.leaderboard-self-copy strong {
  display: inline-block;
  margin: .12rem .45rem 0 0;
  color: var(--leaderboard-text);
  font-size: .92rem;
  font-weight: 900;
}

.leaderboard-self-copy > span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--leaderboard-muted);
  font-size: .7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.leaderboard-self-amount {
  justify-self: end;
  text-align: right;
}

.leaderboard-self-amount strong {
  display: block;
  margin-top: .12rem;
  color: var(--leaderboard-accent-strong);
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
}

.leaderboard-self-unranked {
  border-color: var(--leaderboard-border);
  background: var(--leaderboard-card);
  box-shadow: inset 3px 0 0 #94a3b8;
}

.leaderboard-podium-section,
.leaderboard-list-section {
  display: grid;
  min-width: 0;
  gap: .65rem;
}

.leaderboard-podium-section h3,
.leaderboard-list-section h3 {
  margin: 0;
  color: var(--leaderboard-muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.leaderboard-podium-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: .75rem;
}

.leaderboard-podium-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 12.5rem;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 1.1rem .8rem;
  border: 1px solid var(--leaderboard-border);
  border-radius: 1.25rem;
  background: var(--leaderboard-card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  text-align: center;
}

.leaderboard-podium-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: .23rem;
  background: #94a3b8;
  content: "";
}

.leaderboard-podium-rank-1 {
  min-height: 13.8rem;
  order: 2;
  border-color: rgba(245, 158, 11, .42);
  background:
    radial-gradient(circle at 50% 0, rgba(245, 158, 11, .18), transparent 9rem),
    var(--leaderboard-card);
}

.leaderboard-podium-rank-1::before {
  background: linear-gradient(90deg, #f59e0b, #facc15);
}

.leaderboard-podium-rank-2 {
  order: 1;
}

.leaderboard-podium-rank-2::before {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.leaderboard-podium-rank-3 {
  order: 3;
}

.leaderboard-podium-rank-3::before {
  background: linear-gradient(90deg, #b45309, #d97706);
}

.leaderboard-podium-medal {
  font-size: 1.7rem;
  line-height: 1;
  filter: drop-shadow(0 4px 7px rgba(15, 23, 42, .14));
}

.leaderboard-rank-label {
  margin-top: .4rem;
  color: var(--leaderboard-muted);
  font-size: .6rem;
  font-weight: 850;
}

.leaderboard-avatar,
.leaderboard-list-avatar {
  display: grid;
  place-items: center;
  border: 1px solid rgba(14, 165, 233, .24);
  background: linear-gradient(135deg, rgba(14, 165, 233, .16), rgba(99, 102, 241, .13));
  color: var(--leaderboard-accent-strong);
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-avatar {
  width: 3rem;
  height: 3rem;
  margin-top: .55rem;
  border-radius: 1rem;
  font-size: 1rem;
}

.leaderboard-alias-line {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin-top: .55rem;
}

.leaderboard-alias-line strong {
  overflow: hidden;
  color: var(--leaderboard-text);
  font-size: .82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-you-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: .15rem .38rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, .14);
  color: #059669;
  font-size: .54rem;
  font-weight: 900;
}

html.dark .leaderboard-you-badge {
  color: #6ee7b7;
}

.leaderboard-amount-label {
  margin-top: .6rem;
  color: var(--leaderboard-muted);
  font-size: .55rem;
  font-weight: 700;
}

.leaderboard-amount {
  margin-top: .15rem;
  color: var(--leaderboard-text);
  font-family: "JetBrains Mono", monospace;
  font-size: .9rem;
  font-weight: 900;
  white-space: nowrap;
}

.leaderboard-is-current {
  border-color: rgba(16, 185, 129, .48);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .09), 0 12px 30px rgba(15, 23, 42, .07);
}

.leaderboard-list {
  display: grid;
  min-width: 0;
  gap: .5rem;
}

.leaderboard-list-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 2.25rem 2.5rem minmax(0, 1fr) minmax(9.5rem, auto);
  align-items: center;
  gap: .7rem;
  padding: .7rem .85rem;
  border: 1px solid var(--leaderboard-border);
  border-radius: 1rem;
  background: var(--leaderboard-card);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.leaderboard-list-row:hover {
  border-color: rgba(14, 165, 233, .34);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
  transform: translateY(-1px);
}

.leaderboard-list-rank {
  color: var(--leaderboard-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: .86rem;
  font-weight: 900;
  text-align: center;
}

.leaderboard-list-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .8rem;
  font-size: .78rem;
}

.leaderboard-list-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .45rem;
}

.leaderboard-list-identity strong {
  min-width: 0;
  overflow: hidden;
  color: var(--leaderboard-text);
  font-size: .76rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-list-amount {
  min-width: 0;
  justify-self: end;
  text-align: right;
}

.leaderboard-list-amount small,
.leaderboard-list-amount b {
  display: block;
}

.leaderboard-list-amount small {
  color: var(--leaderboard-muted);
  font-size: .54rem;
  font-weight: 700;
}

.leaderboard-list-amount b {
  margin-top: .12rem;
  color: var(--leaderboard-text);
  font-family: "JetBrains Mono", monospace;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}

.leaderboard-loading-state,
.leaderboard-login-state,
.leaderboard-error-state,
.leaderboard-empty-state {
  display: grid;
  min-height: 19rem;
  place-items: center;
  align-content: center;
  padding: 2rem;
  border: 1px solid var(--leaderboard-border);
  border-radius: 1.35rem;
  background: var(--leaderboard-card);
  text-align: center;
}

.leaderboard-loading-heading {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--leaderboard-muted);
  font-size: .72rem;
  font-weight: 800;
}

.leaderboard-loading-heading svg {
  width: 1rem;
  height: 1rem;
  animation: leaderboard-spin .8s linear infinite;
}

.leaderboard-skeleton-grid {
  display: grid;
  width: min(100%, 48rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin-top: 1.25rem;
}

.leaderboard-skeleton-card,
.leaderboard-skeleton-row {
  display: block;
  border-radius: 1rem;
  background: linear-gradient(90deg, rgba(148, 163, 184, .12), rgba(148, 163, 184, .28), rgba(148, 163, 184, .12));
  background-size: 220% 100%;
  animation: leaderboard-pulse 1.4s ease infinite;
}

.leaderboard-skeleton-card {
  height: 8rem;
}

.leaderboard-skeleton-row {
  width: min(100%, 48rem);
  height: 3.35rem;
  margin-top: .65rem;
}

.leaderboard-error-state > svg,
.leaderboard-login-state > svg,
.leaderboard-empty-state > svg {
  width: 3rem;
  height: 3rem;
  padding: .7rem;
  border-radius: 1rem;
  background: rgba(14, 165, 233, .1);
  color: var(--leaderboard-accent-strong);
}

.leaderboard-error-state h3,
.leaderboard-login-state h3,
.leaderboard-empty-state h3 {
  margin: .8rem 0 0;
  color: var(--leaderboard-text);
  font-size: 1rem;
  font-weight: 900;
}

.leaderboard-error-state p,
.leaderboard-login-state p,
.leaderboard-empty-state p {
  max-width: 30rem;
  margin: .35rem 0 0;
  color: var(--leaderboard-muted);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.6;
}

.leaderboard-login-state button {
  min-height: 2.5rem;
  margin-top: 1rem;
  padding: .6rem 1rem;
  border-radius: .8rem;
  background: var(--leaderboard-accent-strong);
  color: #fff;
  font-size: .7rem;
  font-weight: 850;
}

html.dark .leaderboard-login-state button {
  background: #0284c7;
}

.leaderboard-inline-error {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .5rem;
  padding: .65rem .8rem;
  border: 1px solid rgba(245, 158, 11, .36);
  border-radius: .85rem;
  background: rgba(245, 158, 11, .09);
  color: #92400e;
  font-size: .65rem;
  font-weight: 700;
}

html.dark .leaderboard-inline-error {
  color: #fcd34d;
}

.leaderboard-inline-error svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.leaderboard-inline-error span {
  min-width: 0;
  flex: 1;
}

.leaderboard-account-shortcut {
  grid-column: 1 / -1;
  overflow: hidden;
}

.leaderboard-account-shortcut > svg:last-child {
  margin-left: auto;
}

@keyframes leaderboard-spin {
  to { transform: rotate(360deg); }
}

@keyframes leaderboard-pulse {
  0% { background-position: 180% 0; }
  100% { background-position: -40% 0; }
}

@media (max-width: 767px) {
  .leaderboard-view {
    gap: .75rem;
    padding-bottom: calc(.75rem + env(safe-area-inset-bottom));
  }

  .leaderboard-header {
    align-items: stretch;
    flex-direction: column;
    gap: .85rem;
    padding: 1rem;
    border-radius: 1.15rem;
  }

  .leaderboard-heading-copy h2 {
    align-items: flex-start;
    font-size: 1.18rem;
  }

  .leaderboard-heading-copy h2 svg {
    width: 1.35rem;
    height: 1.35rem;
  }

  .leaderboard-heading-copy p {
    font-size: .68rem;
    line-height: 1.55;
  }

  .leaderboard-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: .55rem;
  }

  .leaderboard-period-tabs {
    width: 100%;
  }

  .leaderboard-privacy-note {
    justify-content: flex-start;
    padding: .15rem .15rem 0;
    font-size: .58rem;
    text-align: left;
  }

  .leaderboard-section-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
  }

  .leaderboard-self-card {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: .65rem;
    padding: .75rem;
  }

  .leaderboard-self-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .leaderboard-self-amount {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .leaderboard-podium-grid {
    grid-template-columns: 1fr;
    gap: .55rem;
  }

  .leaderboard-podium-card,
  .leaderboard-podium-rank-1 {
    min-height: 0;
    align-items: center;
    display: grid;
    grid-template-columns: 1.75rem 2.65rem minmax(0, 1fr) auto;
    gap: .55rem;
    padding: .75rem;
    text-align: left;
  }

  .leaderboard-podium-rank-1 { order: 1; }
  .leaderboard-podium-rank-2 { order: 2; }
  .leaderboard-podium-rank-3 { order: 3; }

  .leaderboard-podium-medal {
    grid-column: 1;
    grid-row: 1;
    font-size: 1.35rem;
    text-align: center;
  }

  .leaderboard-rank-label {
    display: none;
  }

  .leaderboard-avatar {
    width: 2.65rem;
    height: 2.65rem;
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .leaderboard-alias-line {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-start;
    margin: 0;
  }

  .leaderboard-amount-label {
    display: none;
  }

  .leaderboard-amount {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    margin: 0;
    font-size: .76rem;
  }

  .leaderboard-list-row {
    grid-template-columns: 1.75rem 2.25rem minmax(0, 1fr) auto;
    gap: .5rem;
    padding: .75rem;
  }

  .leaderboard-list-rank {
    grid-column: 1;
    grid-row: 1;
  }

  .leaderboard-list-avatar {
    width: 2.25rem;
    height: 2.25rem;
    grid-column: 2;
    grid-row: 1;
  }

  .leaderboard-list-identity {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-start;
    text-align: left;
  }

  .leaderboard-list-identity strong {
    font-size: .82rem;
  }

  .leaderboard-list-amount {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    text-align: right;
  }

  .leaderboard-list-amount b {
    margin-top: 0;
    font-size: .76rem;
  }

  .leaderboard-list-amount small {
    display: none;
  }

  .leaderboard-podium-card,
  .leaderboard-list-row {
    min-height: 4.4rem;
    grid-template-rows: auto;
    gap: .35rem .55rem;
    border-radius: 1.25rem;
  }

  .leaderboard-loading-state,
  .leaderboard-login-state,
  .leaderboard-error-state,
  .leaderboard-empty-state {
    min-height: 15rem;
    padding: 1.25rem;
    border-radius: 1.1rem;
  }

  .leaderboard-skeleton-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-skeleton-card:nth-child(n + 2) {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1440px) {
  :where(html[data-mobile-document="true"]) .leaderboard-header {
    padding: 1.1rem 1.2rem;
  }

  :where(html[data-mobile-document="true"]) .leaderboard-podium-card {
    padding-inline: .6rem;
  }

  :where(html[data-mobile-document="true"]) .leaderboard-amount {
    font-size: .78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leaderboard-list-row,
  .leaderboard-skeleton-card,
  .leaderboard-skeleton-row {
    animation: none;
    transition: none;
  }
}

/* Desktop OTP codes are their own copy controls; no separate copy button. */
@media (min-width: 1025px) {
  #live-active-orders-section .otp-display-copy-target {
    appearance: none;
    margin: 0;
    border: 0;
    border-radius: .45rem;
    background: transparent;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s ease;
  }

  #live-active-orders-section .otp-code-row .otp-display-copy-target {
    padding: .16rem .3rem;
  }

  #live-active-orders-section .otp-desktop-previous-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 13px;
    max-height: 13px;
    padding: 0 .3rem;
    overflow: hidden;
    color: #0f766e;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    line-height: 13px;
    letter-spacing: .12em;
    text-overflow: ellipsis;
    transform: translateX(.06em);
    white-space: nowrap;
  }

  #live-active-orders-section .otp-display-copy-target:hover {
    background: rgba(5, 150, 105, .1);
    color: #047857 !important;
  }

  #live-active-orders-section .otp-display-copy-target:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .14);
  }

  #live-active-orders-section .otp-desktop-previous-copy:focus-visible {
    outline-offset: -2px;
    box-shadow: inset 0 0 0 1px #10b981;
  }

  #live-active-orders-section .otp-display-copy-target:active {
    opacity: .68;
  }

  html.dark #live-active-orders-section .otp-display-copy-target:hover {
    background: rgba(52, 211, 153, .12);
    color: #6ee7b7 !important;
  }

  html.dark #live-active-orders-section .otp-desktop-previous-copy {
    color: #6ee7b7;
  }
}

/* Keep the latest OTP and automatic-receive footer fixed; use the line between them for the prior OTP. */
@media (min-width: 1101px) {
  #live-active-orders-section .otp-state--has-desktop-previous > .otp-desktop-previous-copy {
    grid-row: 3;
    align-self: center;
    justify-self: center;
  }

  #live-active-orders-section .otp-state--has-desktop-previous > .otp-received-message {
    display: none;
  }
}

/* Customer top-up channels: desktop column; keep mobile cards compact. */
#deposit-history-table-body .deposit-history-channel-badge {
  display: inline-flex;
  padding: .28rem .6rem;
  border: 1px solid #cbd5e1;
  border-radius: .55rem;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
html.dark #deposit-history-table-body .deposit-history-channel-badge {
  border-color: #334155;
  background: #0f172a;
  color: #cbd5e1;
}
@media (max-width: 1440px) {
  :where(html[data-mobile-document="true"]) #deposit-history-table-body .deposit-history-channel { display: none !important; }
}

.promptpay-qr-warning {
  padding: 12px 14px;
  border: 1px solid #f59e0b;
  border-left-width: 4px;
  border-radius: 12px;
  background: #fffbeb;
  color: #78350f;
  text-align: left;
  font-size: 13px;
  line-height: 1.7;
}
.promptpay-qr-warning > strong { display: block; font-size: 14px; margin-bottom: 4px; }
.promptpay-qr-warning a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.promptpay-qr-warning a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
.promptpay-qr-warning > span { display: block; margin-top: 5px; font-weight: 600; }
html.dark .promptpay-qr-warning { background: #291d0b; color: #fde68a; border-color: #b45309; }

/* Keep desktop destinations readable as the window narrows. Mobile uses its own nav. */
@media (min-width: 768px) and (max-width: 1799px) {
  html:not([data-mobile-document="true"]) body.is-authenticated:not(.mobile-app-page):not(.social-desktop-active) #storefront-container > header {
    gap: .75rem;
  }
  html:not([data-mobile-document="true"]) body:not(.mobile-app-page) #header-main-nav {
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: .125rem !important;
    overflow: visible;
  }
  html:not([data-mobile-document="true"]) body:not(.mobile-app-page) #header-main-nav .header-nav-link {
    flex: 0 0 auto;
    min-height: 34px;
    padding: .4rem .5rem !important;
    gap: .35rem !important;
    font-size: .75rem;
    white-space: nowrap;
  }
  html:not([data-mobile-document="true"]) body:not(.mobile-app-page) #header-main-nav .header-nav-link > span:not(#nav-active-count-badge) {
    display: inline;
    overflow-wrap: normal;
    white-space: nowrap;
  }
}
@media (min-width: 768px) and (max-width: 1100px) {
  html:not([data-mobile-document="true"]) body.is-authenticated:not(.mobile-app-page):not(.social-desktop-active) #storefront-container > header {
    flex-wrap: wrap;
    height: auto !important;
    min-height: 80px;
    padding-block: .5rem;
    row-gap: .25rem;
  }
  html:not([data-mobile-document="true"]) body:not(.mobile-app-page) #header-main-nav {
    order: 3;
    flex-basis: 100%;
  }
}

/* Otp-egg wordmark shared by the desktop and mobile order header. */
#header-brand-logo :is(.otp-brand-name,.social-brand-name){font-family:"Segoe UI",Arial,sans-serif;font-weight:800;letter-spacing:-.045em}
#header-brand-logo :is(.otp-brand-name,.social-brand-name) .otp-brand-accent{color:#eaa600!important}
html.dark #header-brand-logo :is(.otp-brand-name,.social-brand-name) .otp-brand-accent{color:#ffc72c!important}

#header-brand-logo .social-brand-name{color:inherit!important}

#header-brand-logo .social-brand-name .social-brand-label{color:#00876b!important}
html.dark #header-brand-logo .social-brand-name .social-brand-label{color:#36d4a7!important}
/* Any other original SMS has its own row without changing OTP success. */
#live-active-orders-section .otp-order-card.otp-order-card--has-sms {
  height: auto !important;
  max-height: none !important;
}
#live-active-orders-section .otp-order-sms {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  line-height: 1.6;
}
#live-active-orders-section .otp-order-sms__title { color: #0369a1; font-weight: 800; }
#live-active-orders-section .otp-order-sms__hint { margin: 3px 0 6px; color: #64748b; }
#live-active-orders-section .otp-order-sms__messages {
  max-height: 10rem;
  overflow: auto;
}
#live-active-orders-section .otp-order-sms__text {
  margin: 6px 0 0;
  padding: 4px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  user-select: text;
  unicode-bidi: plaintext;
}
#live-active-orders-section .otp-order-sms__text + .otp-order-sms__text { padding-top: 8px; border-top: 1px solid #e2e8f0; }
html.dark #live-active-orders-section .otp-order-sms { border-color: #334155; background: #0f172a; color: #e2e8f0; }
html.dark #live-active-orders-section .otp-order-sms__title { color: #7dd3fc; }
html.dark #live-active-orders-section .otp-order-sms__hint { color: #94a3b8; }
html.dark #live-active-orders-section .otp-order-sms__text + .otp-order-sms__text { border-color: #334155; }
@media (min-width: 1101px) {
  #live-active-orders-section .otp-order-card.otp-order-card--has-sms { grid-template-rows: 100px auto; }
}
