:root,
html[data-theme="light"] {
  --bg: #eef3f8;
  --bg-2: #e4ecf4;
  --surface: rgba(255, 255, 255, .72);
  --surface-2: rgba(255, 255, 255, .9);
  --sidebar-bg: rgba(255, 255, 255, .7);
  --input-bg: rgba(255, 255, 255, .88);
  --line: rgba(15, 40, 70, .1);
  --text: #122033;
  --muted: #5c6d82;
  --primary: #0f766e;
  --primary-2: #0d9488;
  --gold: #b45309;
  --danger: #e11d48;
  --warn: #d97706;
  --ok: #059669;
  --info: #0284c7;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(15, 40, 70, .08);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bottom-nav: 108px;
  --btn-fg: #fff;
  --glass: rgba(255, 255, 255, .58);
  --glass-border: rgba(255, 255, 255, .75);
  --nav-bg: rgba(255, 255, 255, .78);
  --overlay: rgba(15, 23, 42, .45);
  --credit: #047857;
  --debit: #be123c;
  --badge-ok-bg: rgba(5, 150, 105, .12);
  --badge-ok-fg: #047857;
  --badge-warn-bg: rgba(217, 119, 6, .12);
  --badge-warn-fg: #b45309;
  --badge-danger-bg: rgba(225, 29, 72, .12);
  --badge-danger-fg: #be123c;
  --badge-info-bg: rgba(2, 132, 199, .12);
  --badge-info-fg: #0369a1;
  --badge-muted-bg: rgba(15, 40, 70, .08);
  --badge-muted-fg: #5c6d82;
  --flash-error-bg: rgba(225, 29, 72, .1);
  --flash-error-fg: #9f1239;
  --flash-ok-bg: rgba(5, 150, 105, .1);
  --flash-ok-fg: #065f46;
  --flash-info-bg: rgba(2, 132, 199, .1);
  --flash-info-fg: #075985;
  --hero-tint: rgba(13, 148, 136, .08);
  --topbar-bg: rgba(238, 243, 248, .82);
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --bg-2: #0e1728;
  --surface: rgba(16, 28, 46, .72);
  --surface-2: rgba(18, 32, 52, .92);
  --sidebar-bg: rgba(8, 16, 30, .82);
  --input-bg: rgba(7, 16, 30, .9);
  --line: rgba(255, 255, 255, .1);
  --text: #e8eef6;
  --muted: #93a4bb;
  --primary: #14b8a6;
  --primary-2: #2dd4bf;
  --gold: #e0b44b;
  --danger: #fb7185;
  --warn: #fbbf24;
  --ok: #34d399;
  --info: #38bdf8;
  --shadow: 0 16px 48px rgba(0, 0, 0, .32);
  --btn-fg: #042f2e;
  --glass: rgba(16, 28, 46, .62);
  --glass-border: rgba(255, 255, 255, .1);
  --nav-bg: rgba(10, 18, 32, .82);
  --overlay: rgba(0, 0, 0, .58);
  --credit: #6ee7b7;
  --debit: #fda4af;
  --badge-ok-bg: rgba(16, 185, 129, .16);
  --badge-ok-fg: #6ee7b7;
  --badge-warn-bg: rgba(245, 158, 11, .16);
  --badge-warn-fg: #fcd34d;
  --badge-danger-bg: rgba(244, 63, 94, .16);
  --badge-danger-fg: #fda4af;
  --badge-info-bg: rgba(56, 189, 248, .16);
  --badge-info-fg: #7dd3fc;
  --badge-muted-bg: rgba(255, 255, 255, .08);
  --badge-muted-fg: #93a4bb;
  --flash-error-bg: rgba(244, 63, 94, .14);
  --flash-error-fg: #fecdd3;
  --flash-ok-bg: rgba(16, 185, 129, .14);
  --flash-ok-fg: #bbf7d0;
  --flash-info-bg: rgba(56, 189, 248, .14);
  --flash-info-fg: #bae6fd;
  --hero-tint: rgba(20, 184, 166, .16);
  --topbar-bg: rgba(11, 18, 32, .82);
}

html.admin-ui {
  --bg: #07111f;
  --bg-2: #0c1a2e;
  --surface: rgba(16, 35, 59, .9);
  --surface-2: #163049;
  --sidebar-bg: rgba(7, 17, 31, .94);
  --input-bg: #071422;
  --line: rgba(255, 255, 255, .08);
  --text: #eef4fb;
  --muted: #93a4bb;
  --primary: #0f766e;
  --primary-2: #14b8a6;
  --gold: #c9a227;
  --danger: #f43f5e;
  --warn: #f59e0b;
  --ok: #10b981;
  --info: #38bdf8;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  --btn-fg: #fff;
  --glass: rgba(16, 35, 59, .85);
  --glass-border: rgba(255, 255, 255, .08);
  --nav-bg: rgba(8, 16, 28, .96);
  --overlay: rgba(0, 0, 0, .55);
  --credit: #6ee7b7;
  --debit: #fda4af;
  --badge-ok-bg: rgba(16, 185, 129, .15);
  --badge-ok-fg: #6ee7b7;
  --badge-warn-bg: rgba(245, 158, 11, .15);
  --badge-warn-fg: #fcd34d;
  --badge-danger-bg: rgba(244, 63, 94, .15);
  --badge-danger-fg: #fda4af;
  --badge-info-bg: rgba(56, 189, 248, .15);
  --badge-info-fg: #7dd3fc;
  --badge-muted-bg: rgba(255, 255, 255, .08);
  --badge-muted-fg: #93a4bb;
  --flash-error-bg: rgba(244, 63, 94, .12);
  --flash-error-fg: #fecdd3;
  --flash-ok-bg: rgba(16, 185, 129, .12);
  --flash-ok-fg: #bbf7d0;
  --flash-info-bg: rgba(56, 189, 248, .12);
  --flash-info-fg: #bae6fd;
  --hero-tint: rgba(15, 118, 110, .28);
  --topbar-bg: #07111f;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}
body {
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 8% -8%, var(--hero-tint), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(180, 83, 9, .06), transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100%;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}
html.admin-ui body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(20, 184, 166, .16), transparent 50%),
    radial-gradient(900px 500px at 100% 0%, rgba(201, 162, 39, .12), transparent 45%),
    var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { letter-spacing: -.02em; margin: 0 0 .4rem; overflow-wrap: anywhere; }
p { margin: 0 0 1rem; color: var(--muted); overflow-wrap: anywhere; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; color: #000; padding: .5rem 1rem; z-index: 9; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 1rem; }

.btn, button.btn, input[type=submit].btn {
  appearance: none; cursor: pointer;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--primary-2) 46%, var(--primary)) 0%,
      var(--primary) 62%,
      color-mix(in srgb, var(--primary) 86%, #041614) 100%);
  color: var(--btn-fg); font-weight: 700; letter-spacing: .02em;
  border: 1px solid color-mix(in srgb, var(--primary) 58%, #062824);
  border-radius: 999px; padding: .85rem 1.2rem; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 22%, transparent),
    0 6px 14px color-mix(in srgb, var(--primary) 24%, transparent);
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
  max-width: 100%;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn:active { transform: translateY(1px); filter: brightness(.97); }
.btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary-2) 75%, #fff);
  outline-offset: 2px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }
.btn.btn-ghost {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.btn-ghost:hover {
  filter: none;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
}
.btn.btn-gold {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--gold) 58%, #fff6d6) 0%,
      var(--gold) 100%);
  color: #fff;
  border-color: color-mix(in srgb, var(--gold) 58%, #5b3b08);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 28%, transparent),
    0 6px 14px color-mix(in srgb, var(--gold) 22%, transparent);
}
.btn.btn-danger {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--danger) 58%, #fff) 0%,
      var(--danger) 100%);
  color: #fff;
  border-color: color-mix(in srgb, var(--danger) 55%, #7f1d1d);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 24%, transparent),
    0 6px 14px color-mix(in srgb, var(--danger) 22%, transparent);
}
.btn-sm { padding: .5rem .95rem; font-size: .85rem; width: auto; min-height: 2.15rem; }
.btn-block { width: 100%; }

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  min-width: 0;
}
.card h3 { font-size: 1rem; }
.label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .35rem; font-weight: 600; }
.input, select, textarea {
  width: 100%; max-width: 100%;
  background: var(--input-bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px;
  padding: .85rem 1rem; font: inherit; font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
.input:focus, select:focus, textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent);
  border-color: transparent;
}
.help { font-size: .8rem; color: var(--muted); margin-top: .3rem; overflow-wrap: anywhere; }
.form-grid { display: grid; gap: .9rem; min-width: 0; }
.switch { display: flex; align-items: center; gap: .6rem; }

.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .15rem .55rem; font-size: .75rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.badge-ok { background: var(--badge-ok-bg); color: var(--badge-ok-fg); }
.badge-warn { background: var(--badge-warn-bg); color: var(--badge-warn-fg); }
.badge-danger { background: var(--badge-danger-bg); color: var(--badge-danger-fg); }
.badge-info { background: var(--badge-info-bg); color: var(--badge-info-fg); }
.badge-muted { background: var(--badge-muted-bg); color: var(--badge-muted-fg); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.admin-pay-item {
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.admin-pay-item:last-child { border-bottom: 0; }
.admin-pay-actions { margin-top: .55rem; min-width: 0; }
.admin-pay-actions .label { margin-bottom: .25rem; }
.admin-pay-buttons {
  margin-top: .45rem;
  flex-wrap: wrap;
  gap: .4rem;
}
.admin-pay-buttons .btn { flex: 0 0 auto; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.panel-head h2 { margin: 0; }
.table-cards td[data-label="Update"],
.table-cards td[data-label="Action"] {
  display: block;
  width: 100%;
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .75rem .6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
td { overflow-wrap: anywhere; }
.amount-credit { color: var(--credit); font-variant-numeric: tabular-nums; }
.amount-debit { color: var(--debit); font-variant-numeric: tabular-nums; }

.flash { border-radius: 14px; padding: .85rem 1rem; margin: 0 0 1rem; overflow-wrap: anywhere; }
.flash-ok-border { border: 1px solid color-mix(in srgb, var(--ok) 45%, var(--line)); }
.flash-error { background: var(--flash-error-bg); color: var(--flash-error-fg); border: 1px solid color-mix(in srgb, var(--flash-error-fg) 25%, transparent); }
.flash-success { background: var(--flash-ok-bg); color: var(--flash-ok-fg); border: 1px solid color-mix(in srgb, var(--flash-ok-fg) 25%, transparent); }
.flash-info { background: var(--flash-info-bg); color: var(--flash-info-fg); }
.flash-warn { background: var(--flash-error-bg); color: var(--flash-error-fg); }

.wd-alert {
  background: var(--flash-error-bg);
  color: var(--flash-error-fg);
  border: 1px solid color-mix(in srgb, var(--flash-error-fg) 28%, transparent);
  border-radius: 16px;
  padding: .95rem 1rem;
  margin: 0 0 1rem;
  display: grid;
  gap: .7rem;
}
.wd-alert-custom { margin: 0; font-weight: 600; }
.wd-alert-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  padding: .35rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--flash-error-fg) 16%, transparent);
}
.wd-alert-row:last-of-type { border-bottom: 0; }
.wd-alert-row > span {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  opacity: .85;
  min-width: 7rem;
}
.wd-alert-amt { text-align: right; display: grid; gap: .15rem; }
.wd-alert-amt strong {
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}
.wd-alert-etb { font-size: .8rem; opacity: .85; }
.wd-alert-status { margin: 0; font-size: .92rem; }
.wd-alert-status.muted { opacity: .85; }
.wd-alert-action { margin: .15rem 0 0; }
.wd-alert-action .btn { width: 100%; max-width: 16rem; }
@media (max-width: 560px) {
  .wd-alert { padding: .85rem .85rem; gap: .55rem; }
  .wd-alert-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
  }
  .wd-alert-amt { text-align: left; }
  .wd-alert-row > span { min-width: 0; }
}
.fee-breakdown-quiet {
  background: var(--surface);
}

.method-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem;
}
.method-card {
  display: flex; flex-direction: column; gap: .25rem;
  border: 1px solid var(--line); border-radius: 16px; padding: .85rem .8rem;
  background: var(--surface); cursor: pointer; min-width: 0;
}
.method-card input { position: absolute; opacity: 0; pointer-events: none; }
.method-card:has(input:checked), .method-card:has(input:focus-visible) {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}
.method-details { border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1rem; background: var(--surface); }
.detail-list { margin: 0; display: grid; gap: .45rem; }
.detail-list > div { display: grid; grid-template-columns: 120px 1fr; gap: .5rem; }
.detail-list dt { color: var(--muted); font-size: .78rem; font-weight: 700; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }

.sidebar .notif-panel { left: 12px; right: auto; }
.notif-count[hidden] { display: none !important; }
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: min(380px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15,40,70,.16); z-index: 70;
  overflow-x: hidden; overflow-y: auto;
}
.notif-panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .75rem .9rem; border-bottom: 1px solid var(--line);
  min-width: 0;
}
.notif-panel-head strong { min-width: 0; overflow-wrap: anywhere; }
.notif-panel-head a { flex-shrink: 0; }
.notif-panel-item {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .75rem .9rem; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--line);
  min-width: 0; max-width: 100%; box-sizing: border-box;
}
.notif-panel-item:last-child { border-bottom: 0; }
.notif-panel-item.is-unread { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.notif-panel-item:hover { text-decoration: none; background: color-mix(in srgb, var(--primary) 10%, transparent); }
.notif-panel-item strong,
.notif-panel-msg {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  min-width: 0;
}
.notif-panel-msg { margin: .1rem 0 0; }
.notif-panel-msg.is-clamped { max-height: 4.8em; overflow: hidden; }
[data-notif-expand].is-expanded .notif-panel-msg { max-height: none; overflow: visible; }
.notif-expand-btn {
  align-self: flex-start;
  margin-top: .2rem;
  border: 0; background: none; padding: 0;
  color: var(--primary); font-weight: 700; font-size: .78rem; cursor: pointer;
}
.notif-panel-open { font-size: .78rem; font-weight: 700; color: var(--primary); }
.notif-item { display: block; margin-bottom: .7rem; color: inherit; text-decoration: none; }
.notif-item:hover { text-decoration: none; }
.notif-item.is-unread { box-shadow: inset 3px 0 0 var(--primary); }
.notif-item.is-read { opacity: .72; }
.notif-item-msg { overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; margin: .35rem 0 0; }
.notif-body { white-space: pre-wrap; margin: .8rem 0; overflow-wrap: anywhere; word-break: break-word; }
.notif-image { max-width: 100%; border-radius: 14px; display: block; }
.otp-code { font-size: 1.05rem; letter-spacing: .12em; font-weight: 800; }
.user-pick { display: grid; gap: .35rem; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: .6rem; }

@media (max-width: 640px) {
  .detail-list > div { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .notif-panel {
    position: fixed; left: 12px; right: 12px; top: auto;
    bottom: calc(var(--bottom-nav, 84px) + 12px);
    width: auto; max-width: none; max-height: 60vh; overflow: auto;
  }
}

.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem;
  padding: 2.5rem 0 1.5rem; align-items: center;
}
.hero-copy h1,
.home-hero-copy h1 {
  font-size: clamp(1.85rem, 6vw, 3.2rem);
  line-height: 1.12;
  margin: .6rem 0;
}
.home-kicker {
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  font-weight: 500;
  color: var(--muted);
  margin: 0;
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px; flex: 0 0 auto;
  background: var(--primary);
  color: var(--btn-fg);
  display: grid; place-items: center; font-weight: 800;
}
.brand-mark-img {
  width: 40px; height: 40px; border-radius: 12px;
  object-fit: cover; flex: 0 0 auto; display: block;
}
.brand-logo-img {
  height: 40px; width: auto; max-width: min(220px, 52vw);
  object-fit: contain; display: block;
}
.brand-lockup { display: flex; align-items: center; gap: .7rem; min-width: 0; color: inherit; }
.brand-lockup-link { text-decoration: none; color: inherit; min-width: 0; }
.brand-lockup-link:hover { text-decoration: none; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tagline {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  line-height: 1.25;
  max-width: min(22rem, 58vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html[data-theme="dark"] .brand-logo-for-light,
html.admin-ui .brand-logo-for-light { display: none; }
html:not([data-theme="dark"]):not(.admin-ui) .brand-logo-for-dark { display: none; }
.brand-mode-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.brand-mode-fieldset > .label { margin-bottom: .35rem; }
.brand-mode-grid { display: grid; gap: .7rem; }
.brand-mode-card {
  display: flex; flex-direction: column; gap: .45rem;
  padding: .85rem; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); cursor: pointer; min-width: 0;
}
.brand-mode-card:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
.brand-mode-card-head { display: flex; align-items: center; gap: .55rem; }
.brand-mode-preview {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem .65rem; border-radius: 12px; min-height: 52px;
  background: #0b1b2b; color: #f4f7fb;
}
.brand-mode-preview .brand-tagline { color: #93a4bb; max-width: 11rem; }
.brand-mode-preview .brand-logo-img { height: 32px; max-width: 150px; }
.brand-mode-preview .brand-copy strong { font-size: .92rem; }
.brand-asset-previews { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.brand-asset-frame {
  display: grid; place-items: center;
  min-height: 64px; min-width: 64px;
  padding: .55rem .8rem; border-radius: 14px; border: 1px solid var(--line);
}
.brand-asset-frame.is-light { background: #f4f7fb; }
.brand-asset-frame.is-dark { background: #0b1b2b; }
.brand-asset-frame .brand-logo-img { height: 40px; max-width: 180px; }
@media (min-width: 860px) {
  .brand-mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--topbar-bg);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.site-header .topbar { position: relative; z-index: 2; }
.site-nav {
  display: flex; gap: 1.15rem; align-items: center; justify-content: center;
  flex-wrap: nowrap; min-width: 0;
}
.site-nav a {
  color: var(--muted); font-weight: 650; text-decoration: none; font-size: .9rem;
  white-space: nowrap; padding: .4rem 0;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--text); text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; }
.btn-login { box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 26%, transparent); }
.nav-toggle,
.nav-close {
  width: 44px; height: 44px; padding: 0; margin: 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  color: var(--text); cursor: pointer; place-items: center; flex: 0 0 auto;
}
.nav-toggle { display: none; }
.nav-close {
  display: grid; font-size: 1.7rem; line-height: 1; font-weight: 400;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 16px; height: 2px; border-radius: 99px; background: currentColor;
  position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
html.nav-open .nav-toggle-bars { background: transparent; }
html.nav-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
html.nav-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }
.site-menu {
  position: fixed; inset: 0; z-index: 80;
  display: flex; justify-content: flex-end;
  visibility: hidden; pointer-events: none;
  overflow: hidden;
}
.site-menu-backdrop {
  appearance: none; position: absolute; inset: 0; border: 0; padding: 0;
  background: rgba(15, 23, 42, .45); opacity: 0; cursor: pointer;
  transition: opacity .22s ease;
}
.site-menu-panel {
  position: relative;
  width: min(22rem, 88vw);
  height: 100%; height: 100dvh;
  max-height: 100dvh;
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(15, 40, 70, .16);
  display: flex; flex-direction: column;
  padding: calc(.85rem + env(safe-area-inset-top, 0px)) 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(100%);
  transition: transform .26s ease;
  overflow: hidden;
}
.site-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; margin: 0 0 1rem; flex: 0 0 auto;
}
.site-menu-brand { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.site-menu-brand strong { font-size: 1.05rem; }
.site-menu-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; min-height: 0; }
.site-menu-group { margin: 0; }
.site-menu-group + .site-menu-group {
  margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--line);
}
.site-menu-heading {
  margin: 0 0 .4rem; font-size: .72rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.site-menu-nav { display: grid; gap: .45rem; }
.site-menu-nav a {
  display: flex; align-items: center; min-height: 48px;
  padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 16px;
  color: var(--text); font-weight: 700; font-size: 1.05rem; text-decoration: none;
  background: var(--surface);
}
.site-menu-nav a.is-active {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}
.site-menu-actions {
  display: grid; gap: .7rem; margin-top: .9rem; padding-top: .9rem;
  border-top: 1px solid var(--line); flex: 0 0 auto;
}
.site-menu-actions .theme-toggle { width: 100%; justify-content: center; min-height: 44px; }
.site-menu-actions .theme-toggle-text { display: inline !important; }
.site-menu-actions .btn-login { min-height: 48px; font-size: 1.05rem; }
.site-menu-actions .lang-sheet-list {
  display: grid; gap: .35rem; margin: 0;
}
.site-menu-actions .lang-sheet-list .small { font-weight: 700; }
.site-menu-actions .lang-sheet-list .side-link,
.site-menu-actions .lang-sheet-list button {
  width: 100%;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  padding: .7rem .9rem;
  border-radius: 12px;
  cursor: pointer;
  min-height: 44px;
}
.site-menu-actions .lang-sheet-list .side-link.active,
.site-menu-actions .lang-sheet-list button.active {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary);
}
html.nav-open .site-menu { visibility: visible; pointer-events: auto; }
html.nav-open .site-menu-backdrop { opacity: 1; }
html.nav-open .site-menu-panel { transform: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.topbar {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 1.1rem;
  padding: 1rem 0;
}
.topbar .row { min-width: 0; }
.login-card { padding: 1.5rem; max-width: 440px; }
.auth-page { display: grid; justify-items: center; padding: 2.4rem 0 3rem; }
.auth-forgot { margin: -.35rem 0 .15rem; text-align: right; }
.auth-forgot a { font-size: .9rem; font-weight: 700; }
.auth-page .login-card { width: min(440px, 100%); }
.partners { padding: 0 0 1.2rem; overflow: hidden; max-width: 100%; }
.partners-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.partner-card {
  min-height: 0; width: 196px; flex: 0 0 196px;
  display: flex; flex-direction: column; justify-content: center;
  text-align: center; text-decoration: none; color: inherit; padding: .75rem .9rem;
}
.partner-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.partner-logo {
  height: 84px; display: grid; place-items: center;
  background: #fff; border-radius: 14px; padding: .45rem .6rem;
  border: 1px solid rgba(15, 40, 70, .06);
  overflow: hidden;
}
.partner-logo img {
  max-height: 64px; max-width: 100%; width: auto; height: auto;
  object-fit: contain; object-position: center;
}
.partner-fallback {
  width: 48px; height: 48px; border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
}
.partner-marquee {
  max-width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent);
}
.partner-marquee-viewport { overflow: hidden; width: 100%; max-width: 100%; }
.partner-marquee-track {
  display: flex; width: max-content; align-items: stretch;
  animation: partner-marquee-right 72s linear infinite;
  will-change: transform;
}
.partner-marquee.is-js-marquee .partner-marquee-track { animation: none; }
.partner-marquee-set { display: flex; gap: 1rem; padding-right: 1rem; }
@media (hover: hover) and (pointer: fine) {
  .partner-marquee:hover .partner-marquee-track { animation-play-state: paused; }
}
@keyframes partner-marquee-right {
  from { transform: translate3d(-50%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}
.home-partner-hint { margin: 0 0 .85rem; }
.home-banner {
  margin: 1rem 0 0;
  padding: .75rem 1rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  font-weight: 700;
}
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(17.5rem, 24rem);
  grid-template-areas:
    "copy login"
    "partners partners";
  gap: 2rem 2.4rem;
  align-items: center;
  text-align: left;
  padding: 3.4rem 0 2.2rem;
  max-width: 64rem;
  margin: 0 auto;
}
.home-hero-copy { grid-area: copy; min-width: 0; }
.home-eyebrow {
  margin: 0 0 .45rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
}
.home-hero-copy h1 { margin-bottom: .7rem; }
.home-hero > .login-card {
  grid-area: login;
  width: 100%;
  max-width: none;
  justify-self: stretch;
}
.home-hero .login-card > h1 {
  font-size: 1.55rem;
  margin: 0 0 .4rem;
}
.home-hero > .partners {
  grid-area: partners;
  padding-top: .2rem;
}
.home-hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.35rem 0 0; justify-content: center; }
.home-hero-photo { margin-top: 1.2rem; }
.home-hero-photo img { width: 100%; border-radius: 18px; object-fit: cover; max-height: 220px; }
.page-hero { padding: 2.4rem 0 1.2rem; max-width: 40rem; }
.page-lead { font-size: 1.05rem; margin: 0; }
.page-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; padding: 2.2rem 0 2.4rem; }
.faq-list { display: grid; gap: .75rem; }
.faq-item { padding: 0; }
.faq-item summary {
  list-style: none; cursor: pointer; font-weight: 700; padding: 1rem 1.1rem;
  min-height: 48px; display: flex; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { padding: 0 1.1rem 1rem; margin: 0; }
.home-section { padding: 1.6rem 0 0; }
.home-section-head { max-width: 40rem; margin: 0 auto 1.15rem; text-align: center; }
.home-section-head h2 { font-size: clamp(1.35rem, 3.2vw, 1.85rem); }
.home-card-grid { display: grid; gap: 1rem; }
.home-card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-card-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-feature-card, .home-quiet-card, .home-step-card { display: flex; flex-direction: column; gap: .35rem; }
.home-feature-card .btn, .home-feature-card .btn-ghost { margin-top: auto; align-self: flex-start; }
.home-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.home-step-num {
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); font-weight: 800; font-size: .9rem;
}
.home-method-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.home-method-card { min-height: 108px; }
.home-cta { padding-bottom: 1.5rem; }
.home-cta-card { display: flex; gap: 1.2rem; align-items: center; }
.home-cta-image { width: 120px; height: 120px; object-fit: cover; border-radius: 16px; flex: 0 0 auto; }
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0 1.8rem; color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; }
.footer-copy { margin-top: 1.2rem; }
html[data-theme="dark"] .partner-logo { background: #f8fafc; }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.app-content { min-width: 0; display: flex; flex-direction: column; }
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 1.1rem .8rem 2rem; position: sticky; top: 0; height: 100vh; height: 100dvh;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: auto;
}
.side-link {
  display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem;
  border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600;
}
.side-link:hover, .side-link.active { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--text); text-decoration: none; }
.main { padding: 1.2rem 1.3rem 2rem; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.1rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat .k { color: var(--muted); font-size: .8rem; }
.stat .v { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.balance-hero { padding: 1.4rem; }
.balance-hero .usd { font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 800; margin: .2rem 0; word-break: break-word; }
.actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.action {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .35rem; padding: 1rem .5rem; text-decoration: none; color: var(--text);
  min-height: 92px; text-align: center; font-weight: 600;
}
.action:hover { text-decoration: none; border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.icon-bubble {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary);
}

.app-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--topbar-bg);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.app-topbar .brand-lockup { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.app-topbar .brand-lockup strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-topbar-actions { display: flex; align-items: center; gap: .45rem; flex: 0 0 auto; }

.theme-toggle {
  appearance: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); border-radius: 999px;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .7rem; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700;
  box-shadow: none;
}
.guest-ui .topbar-actions .theme-toggle {
  min-width: 44px; min-height: 44px; justify-content: center; flex: 0 0 auto;
}
.theme-toggle:hover { filter: none; text-decoration: none; border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.theme-toggle-icon { width: 18px; height: 18px; display: grid; place-items: center; }
.theme-toggle-icon svg { width: 18px; height: 18px; }
html[data-theme="light"] .theme-toggle-icon-sun,
html[data-theme="dark"] .theme-toggle-icon-moon { display: none; }

.lang-wrap { position: relative; flex: 0 0 auto; z-index: 90; }
.lang-toggle {
  appearance: none;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; margin: 0;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex: 0 0 auto; touch-action: manipulation;
}
.lang-toggle svg { width: 18px; height: 18px; display: block; pointer-events: none; }
.lang-toggle:hover,
.lang-toggle[aria-expanded="true"] { filter: none; text-decoration: none; border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); color: var(--primary); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 12.5rem;
  z-index: 120;
  padding: .35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 40, 70, .16);
  display: grid;
  gap: .2rem;
  transform-origin: top right;
  animation: lang-pop .14s ease-out;
}
.lang-menu[hidden] { display: none; }
@keyframes lang-pop {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.lang-option {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  padding: .55rem .7rem;
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
}
.lang-option:hover,
.lang-option.is-active { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }
html.lang-switching { cursor: wait; }
html.lang-switching body { opacity: .88; transition: opacity .12s ease; pointer-events: none; }
.lang-sheet-list { margin: .4rem 0 .75rem; }
html[lang="am"], html[lang="ti"] {
  font-family: "Noto Sans Ethiopic", "Nyala", "Abyssinica SIL", "Kefa", system-ui, sans-serif;
}

.sidebar-theme { margin: 1rem .2rem 0; }
.sidebar-theme .theme-toggle { width: 100%; justify-content: center; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--text); background: var(--surface); border: 1px solid var(--line);
  position: relative; text-decoration: none;
}
.icon-btn:hover { text-decoration: none; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; justify-content: center; }

.bottom-nav {
  display: none;
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  background: var(--nav-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: .4rem .3rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  box-shadow: 0 10px 30px rgba(15, 40, 70, .12);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
}
.bottom-nav a {
  color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .45rem .15rem .35rem;
  min-width: 0; border-radius: 16px;
  position: relative;
}
.bottom-nav a span.label {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.bottom-nav svg { width: 22px; height: 22px; flex: 0 0 auto; }
.bottom-nav a.active {
  color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent);
  text-decoration: none;
}
.bottom-nav a.active::before {
  content: "";
  position: absolute; top: 4px; width: 14px; height: 3px; border-radius: 99px;
  background: var(--primary);
}
.bottom-nav a:hover { color: var(--primary); text-decoration: none; }

.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.pager { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; }
.pager a, .pager span { padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; }
.confirm-overlay {
  position: fixed; inset: 0; background: var(--overlay); display: none; place-items: center; z-index: 200; padding: 1rem;
}
.confirm-overlay.show { display: grid; }
.confirm-overlay p[data-confirm-msg] { white-space: pre-line; margin: 0 0 1rem; }
.fee-breakdown {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .85rem 1rem;
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  display: grid;
  gap: .45rem;
}
.fee-line { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.fee-line.fee-receive { color: var(--text); }
.fee-line.fee-total { font-size: 1.05rem; padding-top: .35rem; border-top: 1px solid var(--line); }
.fee-breakdown [data-fee-warn]:not([hidden]) { color: var(--flash-error-fg, #b42318); margin: 0; }
.confirm-actions { display: flex; gap: .75rem; }
.confirm-actions .btn { flex: 1; width: auto; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.chart b { display: block; width: 100%; border-radius: 6px 6px 0 0; background: var(--primary); }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: .85rem; background: var(--surface); }
.chip.active { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--text); border-color: transparent; }

.desktop-only {}
.mobile-only { display: none; }

html.admin-ui .sidebar { display: block; }
html.admin-ui .bottom-nav, html.admin-ui .app-topbar { display: none !important; }
html.admin-ui .app-shell { grid-template-columns: 250px minmax(0, 1fr); }

@media (max-width: 1100px) {
  .guest-ui .site-nav,
  .guest-ui .guest-desktop { display: none; }
  .guest-ui .nav-toggle { display: grid; }
  .guest-ui .topbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: .55rem; flex-wrap: nowrap;
  }
  .guest-ui .topbar-actions { justify-self: end; flex-shrink: 0; }
  .guest-ui .topbar-actions .theme-toggle {
    width: 44px; height: 44px; padding: 0; border-radius: 12px;
  }
  .guest-ui .topbar-actions .lang-toggle {
    width: 44px; height: 44px; border-radius: 12px;
  }
  .guest-ui .brand-logo-img { max-width: min(160px, 40vw); height: 34px; }
  .guest-ui .brand-copy strong { max-width: 42vw; }
  .guest-ui .brand-tagline { display: none; }
  html.nav-open, html.nav-open body { overflow: hidden; }
}
@media (min-width: 1101px) {
  .guest-ui .site-menu { display: none !important; visibility: hidden !important; }
}
@media (max-width: 640px) {
  .guest-ui .site-menu-panel {
    width: 100%; max-width: none; border-left: 0; box-shadow: none;
    transform: translateY(12px);
  }
  html.nav-open .guest-ui .site-menu-panel,
  html.nav-open .site-menu-panel { transform: none; }
  .partner-marquee {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent);
  }
}
@media (max-width: 980px) {
  .hero, .footer-grid, .partners-grid, .home-card-grid-4, .home-card-grid-2, .home-steps { grid-template-columns: 1fr 1fr; }
  .home-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "login"
      "partners"
      "copy";
    padding: 1.15rem 0 1.6rem;
    gap: 1.15rem;
    align-items: stretch;
  }
  .home-hero > .login-card {
    max-width: 440px;
    width: min(440px, 100%);
    margin-inline: auto;
    justify-self: center;
    order: 0;
  }
  .home-hero-copy {
    justify-self: stretch;
    text-align: center;
    padding: 1.25rem 1.15rem 1.4rem;
    border-radius: 22px;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, transparent), color-mix(in srgb, var(--glass) 86%, transparent));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
  }
  .home-hero-copy h1 {
    font-size: clamp(1.4rem, 6.4vw, 1.9rem);
    margin: 0 0 .4rem;
  }
  .home-hero-copy .home-kicker { margin: 0; }
  .home-hero > .partners {
    padding: 0;
  }
  .guest-home .partners .home-section-head {
    text-align: center;
    margin: 0 auto .75rem;
  }
  .guest-home .partner-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent);
  }
  .guest-home .partner-marquee-viewport {
    overflow: hidden;
  }
  .guest-home .partner-marquee-track {
    display: flex;
    width: max-content;
    flex-wrap: nowrap;
    animation: partner-marquee-right 72s linear infinite;
  }
  .guest-home .partner-marquee-set {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: .7rem;
    padding-right: .7rem;
    width: max-content;
  }
  .guest-home .partner-card {
    width: 168px;
    flex: 0 0 168px;
    min-width: 168px;
    max-width: 168px;
  }
  .home-card-grid-3 { grid-template-columns: 1fr 1fr; }
  .partner-card { width: 168px; flex-basis: 168px; }
  .partner-logo { height: 72px; }
  .partner-logo img { max-height: 52px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .user-ui .app-shell { grid-template-columns: 1fr; }
  .user-ui .sidebar { display: none; }
  .user-ui .bottom-nav { display: grid; }
  .user-ui .app-topbar { display: flex; }
  .user-ui .app-shell { padding-bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom, 0px)); }
  .user-ui .main { padding: 1rem 1rem 1.5rem; }
  .user-ui .main::after {
    content: "";
    display: block;
    height: .25rem;
  }
  .desktop-only { display: none; }
  .mobile-only { display: block; }
  .app-topbar .theme-toggle-text,
  .guest-ui .theme-toggle-text { display: none; }
}
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; padding: 2.4rem 0 1.4rem; gap: 1.25rem; }
  .home-hero { padding: 1rem 0 1.35rem; gap: 1rem; }
  .home-hero-actions { justify-content: flex-start; }
  .home-hero-actions .btn { width: 100%; }
  .home-section-head { text-align: left; margin-left: 0; margin-right: 0; }
  .login-card { order: 1; }
  .home-card-grid-2, .home-card-grid-3, .home-card-grid-4, .home-steps, .partners-grid, .footer-grid { grid-template-columns: 1fr; }
  .home-cta-card { flex-direction: column; align-items: flex-start; }
  .partner-card { width: 148px; flex: 0 0 148px; min-width: 148px; max-width: 148px; }
  .guest-home .partner-card {
    width: 148px;
    flex: 0 0 148px;
    min-width: 148px;
    max-width: 148px;
  }
  .partner-logo { height: 64px; padding: .3rem .4rem; }
  .partner-logo img { max-height: 44px; }
  .topbar { padding: .85rem 0; }
  .stats { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .actions { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
  .action { min-height: 78px; padding: .65rem .15rem; font-size: .72rem; }
  .icon-bubble { width: 34px; height: 34px; border-radius: 10px; }
  .partners-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .form-grid > .btn:not(.btn-sm):not(.btn-ghost) { width: 100%; }
  .stat .v { font-size: 1.05rem; }
  .filters { gap: .4rem; }
  .chip { font-size: .78rem; }
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr {
    padding: .85rem 0;
    border-bottom: 1px solid var(--line);
  }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td {
    display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem;
    border: 0; padding: .18rem 0; white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }
  .table-cards td[data-label="Update"],
  .table-cards td[data-label="Action"] {
    flex-direction: column;
    align-items: stretch;
  }
  .table-cards td::before {
    content: attr(data-label);
    color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    flex: 0 0 34%;
    text-align: left;
  }
  .table-cards .badge { flex-shrink: 0; white-space: nowrap; }
  .table-cards td.num {
    font-variant-numeric: tabular-nums;
    overflow-wrap: normal;
    word-break: keep-all;
  }
  .confirm-actions { flex-direction: column; }
  .confirm-actions .btn { width: 100%; }
  html.admin-ui .app-shell { grid-template-columns: 1fr; }
  html.admin-ui .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (min-width: 1280px) {
  .guest-home .container { width: min(1120px, calc(100% - 2rem)); }
  .partner-card { width: 196px; flex-basis: 196px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .partner-card { transition: none; }
  .partner-marquee-track {
    animation: none;
    transform: none;
    will-change: auto;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }
  .partner-marquee-set { flex-wrap: wrap; justify-content: center; padding-right: 0; }
  .partner-marquee-set[aria-hidden="true"],
  .partner-card-fill { display: none; }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after,
  .site-menu-backdrop,
  .site-menu-panel { transition: none; }
}
