/* SAFWAN — Apple-inspired UI */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.08);
  --line: rgba(0, 0, 0, 0.08);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --blue: #0071e3;
  --blue-press: #0062c4;
  --green: #28a745;
  --green-bg: rgba(52, 199, 89, 0.14);
  --green-fg: #1a7f37;
  --orange-bg: rgba(255, 159, 10, 0.16);
  --orange-fg: #b25000;
  --indigo-bg: rgba(88, 86, 214, 0.14);
  --indigo-fg: #4b47c4;
  --red: #ff3b30;
  --red-bg: rgba(255, 59, 48, 0.12);
  --red-fg: #d70015;
  --gray-bg: rgba(120, 120, 128, 0.14);
  --nav-bg: rgba(251, 251, 253, 0.72);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 1px rgba(0,0,0,.02);
  --shadow: 0 2px 6px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.18);
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --ease: cubic-bezier(.32,.72,0,1);
  /* -apple-system resolves only on Apple devices; everywhere else Inter (loaded from Google Fonts) gives the same clean look. */
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI Variable Text", "Segoe UI", "Hind Siliguri", system-ui, sans-serif;
  color-scheme: light;
}
/* Dark theme: follows the device (Auto) unless the person picks Light or Dark in the account menu. */
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #232325;
  --fill: rgba(120, 120, 128, 0.32);
  --fill-2: rgba(120, 120, 128, 0.2);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #8e8e93;
  --blue: #0a84ff;
  --blue-press: #3395ff;
  --green-fg: #30d158;
  --orange-fg: #ff9f0a;
  --indigo-fg: #7d7aff;
  --red-fg: #ff453a;
  --nav-bg: rgba(22, 22, 23, 0.72);
  --shadow: 0 2px 6px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #232325;
    --fill: rgba(120, 120, 128, 0.32);
    --fill-2: rgba(120, 120, 128, 0.2);
    --line: rgba(255, 255, 255, 0.1);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --blue: #0a84ff;
    --blue-press: #3395ff;
    --green-fg: #30d158;
    --orange-fg: #ff9f0a;
    --indigo-fg: #7d7aff;
    --red-fg: #ff453a;
    --nav-bg: rgba(22, 22, 23, 0.72);
    --shadow: 0 2px 6px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.tnum { font-variant-numeric: tabular-nums; }

/* ── Navigation ─────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 22px;
  height: 56px; display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(10,132,255,.35);
}
.brand small { font-weight: 500; color: var(--text-3); font-size: 13px; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: none; padding: 7px 14px; border-radius: 999px;
  font-size: 14px; color: var(--text-2); white-space: nowrap; transition: background .2s, color .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--fill); color: var(--text); font-weight: 500; }
.tab .count {
  background: var(--red); color: #fff; font-size: 11px; font-weight: 600;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; display: inline-grid; place-items: center;
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); transition: background .3s; }
.live-dot.on { background: #34c759; box-shadow: 0 0 0 3px rgba(52,199,89,.2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: linear-gradient(135deg, #8e8e93, #636366); color: #fff; font-weight: 600; font-size: 13px;
  display: grid; place-items: center;
}

/* ── Layout ─────────────────────────────── */
.page { max-width: 1120px; margin: 0 auto; padding: 36px 22px 80px; }
.view { animation: viewIn .45s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 4px; }
h1 { font-size: 34px; line-height: 1.12; letter-spacing: -0.022em; font-weight: 700; margin: 0; }
h2 { font-size: 21px; letter-spacing: -0.018em; font-weight: 600; margin: 0; }
h3 { font-size: 17px; font-weight: 600; margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 36px 0 14px; gap: 12px; flex-wrap: wrap; }

.card {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.card-pad { padding: 22px; }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 0;
  font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background .2s, transform .15s var(--ease), opacity .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-press); }
.btn-secondary { background: var(--fill); color: var(--text); }
.btn-secondary:hover { background: var(--fill-2); }
.btn-tinted { background: rgba(0,113,227,.1); color: var(--blue); }
.btn-success { background: #34c759; color: #fff; }
.btn-success:hover { background: #2fb350; }
.btn-danger-tinted { background: var(--red-bg); color: var(--red-fg); }
.btn-plain { background: none; color: var(--blue); padding: 0 10px; }
.btn-lg { height: 52px; font-size: 17px; padding: 0 28px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-sm { height: 32px; font-size: 13px; padding: 0 14px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--fill);
  display: inline-grid; place-items: center; color: var(--text-2); transition: background .2s, transform .15s;
}
.icon-btn:hover { background: var(--fill-2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.btn svg, .icon-btn svg { width: 16px; height: 16px; flex: none; }

/* ── Forms ─────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field > label { font-size: 13px; font-weight: 500; color: var(--text-2); padding-left: 2px; }
.input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 12px;
  border: 1px solid transparent; background: var(--fill-2); outline: none;
  font-size: 17px; transition: background .2s, border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; min-height: 80px; padding: 12px 16px; resize: vertical; font-size: 15px; }
.input:focus { background: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,113,227,.15); }
.input::placeholder { color: var(--text-3); }
.input.invalid { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255,59,48,.12); }
.hint { font-size: 12px; color: var(--text-3); padding-left: 2px; }
.hint.err { color: var(--red-fg); }

.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative;
  background: var(--fill-2); border-radius: 12px; padding: 3px; gap: 0;
}
.segmented button {
  position: relative; z-index: 1; border: 0; background: none; height: 42px; border-radius: 9px;
  font-size: 15px; font-weight: 500; color: var(--text-2); transition: color .25s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.segmented button.active { color: var(--text); }
.segmented svg { width: 18px; height: 18px; flex: none; }
svg { max-width: 100%; }
.segmented button:disabled { opacity: .35; cursor: not-allowed; }
.segmented .thumb {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; border-radius: 9px;
  background: var(--surface); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04);
  transition: transform .35s var(--ease), width .35s var(--ease);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmented .thumb { background: #636366; } }
:root[data-theme="dark"] .segmented .thumb { background: #636366; }
.segmented.small button { height: 30px; font-size: 13px; padding: 0 12px; }

.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: var(--fill); transition: background .25s;
  cursor: pointer;
}
.switch span::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.08);
  transition: transform .3s var(--ease);
}
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(20px); }

/* ── Operator logo ─────────────────────────────── */
.op-logo {
  --s: 44px; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .26); flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 700; overflow: hidden;
  font-size: calc(var(--s) * .36); letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.op-logo.img { background: #fff; }
.op-logo img { width: 100%; height: 100%; object-fit: contain; padding: 7%; }

/* Operator picker */
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.op-tile {
  position: relative; border: 0; background: var(--surface); border-radius: var(--r-lg);
  padding: 20px 10px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.op-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.op-tile .op-logo { --s: 56px; }
.op-tile .name { font-size: 14px; font-weight: 500; }
.op-tile.selected { box-shadow: var(--shadow), inset 0 0 0 2px var(--op, var(--blue)); }
.op-tile .tick {
  position: absolute; top: 9px; right: 9px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--op, var(--blue)); color: #fff; display: grid; place-items: center;
  transform: scale(0); transition: transform .35s var(--ease);
}
.op-tile.selected .tick { transform: scale(1); }
.op-tile .tick svg { width: 12px; height: 12px; }

/* ── Stats ─────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 20px 22px; }
.stat .label { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.stat .label i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.stat .value { font-size: 32px; font-weight: 700; letter-spacing: -0.025em; margin-top: 6px; line-height: 1.1; }
.stat .sub { font-size: 13px; color: var(--text-3); margin-top: 4px; }

/* ── Request list ─────────────────────────────── */
.list { overflow: hidden; }
.row {
  /* Fixed widths for type, status and amount so every row lines up, whatever the text length */
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 96px 118px 104px; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background .2s;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--fill-2); }
.row.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0% { background: rgba(52,199,89,.22); } 100% { background: transparent; } }
.row.enter { animation: rowIn .5s var(--ease); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.row .title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.row .meta { font-size: 13px; color: var(--text-2); }
.row .amount { font-weight: 600; font-size: 17px; text-align: right; }
.row > :nth-child(5) { justify-self: end; text-align: right; }
.row .col-type { justify-self: start; }
.row .col-status-wide { justify-self: start; }
.row .meta { overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 56px 20px; text-align: center; color: var(--text-2); }
.empty .big { font-size: 40px; margin-bottom: 6px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.pending { background: var(--orange-bg); color: var(--orange-fg); }
.pill.pending i { animation: pulse 1.4s infinite; }
.pill.processing { background: var(--indigo-bg); color: var(--indigo-fg); }
.pill.processing i { animation: pulse 1s infinite; }
.pill.completed { background: var(--green-bg); color: var(--green-fg); }
.pill.rejected { background: var(--red-bg); color: var(--red-fg); }
.pill.cancelled { background: var(--gray-bg); color: var(--text-2); }
@keyframes pulse { 50% { opacity: .3; } }
.tag {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 6px; background: var(--fill-2); color: var(--text-2);
}
.tag.agent { background: rgba(255,149,0,.14); color: var(--orange-fg); }

/* ── New transfer ─────────────────────────────── */
.transfer { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.step { margin-bottom: 28px; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.amount-input { position: relative; }
.amount-input .cur { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 600; color: var(--text-3); }
.amount-input .input { height: 68px; font-size: 32px; font-weight: 700; padding-left: 48px; letter-spacing: -0.02em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  border: 0; background: var(--fill-2); height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; transition: background .2s, transform .15s;
}
.chip:hover { background: var(--fill); }
.chip:active { transform: scale(.95); }
.number-input .input { font-size: 22px; height: 58px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

.summary { position: sticky; top: 80px; padding: 24px; }
.summary-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.summary-hero .op-logo { --s: 64px; }
.summary-amount { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; }
.kv span:first-child { color: var(--text-2); }
.kv span:last-child { font-weight: 500; text-align: right; word-break: break-word; }

/* ── Sheet / modal ─────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.32);
  display: grid; place-items: center; padding: 20px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .25s ease;
}
.overlay.closing { animation: fadeOut .2s ease forwards; }
.sheet {
  width: 100%; max-width: 440px; max-height: calc(100vh - 40px); overflow: auto;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  animation: sheetIn .45s var(--ease);
}
.overlay.closing .sheet { animation: sheetOut .2s ease forwards; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 6px; }
.sheet-body { padding: 14px 24px 24px; }
.sheet-foot { display: flex; gap: 10px; padding: 0 24px 24px; }
.sheet-foot .btn { flex: 1; height: 48px; border-radius: 14px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(12px) scale(.98); } }

/* Success check */
.success-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 34px 24px 12px; }
.check {
  width: 84px; height: 84px; border-radius: 50%; background: #34c759; display: grid; place-items: center;
  animation: pop .6s var(--ease); box-shadow: 0 10px 30px rgba(52,199,89,.35); margin-bottom: 18px;
}
.check.blue { background: var(--blue); box-shadow: 0 10px 30px rgba(0,113,227,.35); }
.check svg { width: 42px; height: 42px; }
.check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .45s .25s ease forwards; }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Timeline */
.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-3); box-shadow: 0 0 0 3px var(--surface); }
.timeline li.ok::after { background: #34c759; }
.timeline li.warn::after { background: #ff9f0a; }
.timeline li.info::after { background: #5856d6; }
.timeline li.bad::after { background: var(--red); }
.timeline small { display: block; color: var(--text-3); font-size: 12px; }

/* Toasts */
.toasts { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  background: rgba(30,30,32,.88); color: #fff; padding: 12px 18px 12px 14px; border-radius: 16px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; font-weight: 500;
  animation: toastIn .5s var(--ease);
}
.toast.out { animation: toastOut .3s ease forwards; }
.toast .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #34c759; }
.toast .ic.err { background: var(--red); }
.toast .ic.info { background: var(--blue); }
.toast .ic svg { width: 14px; height: 14px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* Menu */
.menu {
  position: absolute; right: 0; top: 44px; min-width: 220px; background: var(--surface);
  border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px;
  animation: sheetIn .3s var(--ease); z-index: 60;
}
.menu .who { padding: 10px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who b { display: block; }
.menu .who small { color: var(--text-3); text-transform: capitalize; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.menu button:hover { background: var(--fill-2); }
.menu button.danger { color: var(--red-fg); }
.menu-theme { padding: 6px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; gap: 8px; }
.menu-theme > span { font-size: 12px; color: var(--text-3); font-weight: 500; }
.menu .menu-theme .segmented button { display: flex; width: auto; text-align: center; padding: 0 8px; border-radius: 9px; }
.menu .menu-theme .segmented button:hover { background: none; }

/* Operators admin */
.op-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.op-card { padding: 18px; display: flex; align-items: center; gap: 14px; transition: opacity .25s; }
.op-card.off { opacity: .55; }
.op-card .info { flex: 1; min-width: 0; }
.op-card .info b { display: block; font-size: 16px; }
.op-card .info small { color: var(--text-3); }
.logo-drop {
  display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 14px; background: var(--fill-2);
  border: 1.5px dashed transparent; transition: border-color .2s, background .2s;
}
.logo-drop.drag { border-color: var(--blue); background: rgba(0,113,227,.06); }
.logo-drop .op-logo { --s: 64px; }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); transition: transform .2s; }
.swatch.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.swatch:hover { transform: scale(1.1); }
input[type=color] { width: 32px; height: 32px; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }

/* Team */
.user-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-row .avatar { width: 40px; height: 40px; font-size: 15px; }
.user-row .info { flex: 1; min-width: 0; }
.user-row .info b { display: block; }
.user-row .info small { color: var(--text-3); }

/* ── Moderator queue ─────────────────────────────── */
.queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.qcard { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s; }
.qcard.enter { animation: qIn .6s var(--ease); }
@keyframes qIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.qcard.leave { animation: qOut .45s var(--ease) forwards; }
@keyframes qOut { to { opacity: 0; transform: scale(.94); } }
.qcard.mine { box-shadow: var(--shadow), inset 0 0 0 2px #5856d6; }
.qcard .band { height: 5px; background: var(--op); }
.qcard .qbody { padding: 20px 22px 18px; flex: 1; }
.qcard .qtop { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.qcard .qtop .op-logo { --s: 46px; }
.qcard .qtop .who { flex: 1; min-width: 0; }
.qcard .qtop .who b { display: block; font-size: 16px; }
.qcard .qtop .who small { color: var(--text-3); font-size: 12px; }
.qnum {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--fill-2); border-radius: 14px; padding: 12px 12px 12px 16px; margin-bottom: 12px;
}
.qnum .n { font-size: 24px; font-weight: 600; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.qnum .lbl { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.qamt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.qamt .a { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.qnote { margin-top: 12px; font-size: 13px; color: var(--text-2); background: var(--fill-2); border-radius: 10px; padding: 9px 12px; }
.qactions { display: flex; gap: 8px; padding: 0 22px 20px; }
.qactions .btn { flex: 1; height: 46px; border-radius: 13px; }
.copy-btn.copied { background: #34c759; color: #fff; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 600px at 10% -10%, rgba(10,132,255,.14), transparent 60%),
  radial-gradient(900px 500px at 110% 110%, rgba(94,92,230,.14), transparent 60%), var(--bg); }
.login { width: 100%; max-width: 400px; padding: 40px 34px 32px; border-radius: var(--r-xl); animation: sheetIn .6s var(--ease); }
.login .brand-mark { width: 60px; height: 60px; border-radius: 17px; font-size: 28px; margin: 0 auto 18px; }
.login h1 { text-align: center; font-size: 28px; }
.login p.sub { text-align: center; color: var(--text-2); margin: 6px 0 28px; }

/* Spinner */
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Profile photos ─────────────────────────────── */
.avatar { overflow: hidden; flex: none; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600; }
.avatar.has-img { background: var(--fill) !important; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-drop { position: relative; display: inline-block; cursor: pointer; border-radius: 50%; margin-top: 6px; transition: transform .2s var(--ease); }
.photo-drop:hover { transform: scale(1.03); }
.photo-drop.drag { box-shadow: 0 0 0 4px rgba(0,113,227,.35); }
.photo-cam {
  position: absolute; right: 4px; bottom: 4px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 4px var(--surface);
}
.photo-cam svg { width: 16px; height: 16px; }

/* ── Day groups (Today / Yesterday / …) ─────────────────────────────── */
.day-group + .day-group { margin-top: 22px; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px 10px; }
.day-head h3 { font-size: 17px; }
.day-head span { font-size: 13px; }

/* ── Services & packages ─────────────────────────────── */
.tag.prepaid { background: rgba(0,113,227,.1); color: var(--blue); }
.tag.postpaid { background: var(--indigo-bg); color: var(--indigo-fg); }
.tag.svc-recharge { background: rgba(0,113,227,.1); color: var(--blue); }
.tag.svc-internet { background: rgba(48,176,199,.14); color: #1b8aa0; }
.service-seg { max-width: 520px; margin-bottom: 26px; }
.service-seg button { height: 46px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pkg {
  border: 0; background: var(--fill-2); border-radius: 14px; padding: 14px; text-align: left;
  display: flex; flex-direction: column; gap: 2px; transition: box-shadow .2s, background .2s, transform .15s;
}
.pkg:hover { background: var(--fill); }
.pkg:active { transform: scale(.98); }
.pkg b { font-size: 16px; }
.pkg small { color: var(--text-3); font-size: 12px; min-height: 16px; }
.pkg span { font-weight: 600; margin-top: 6px; color: var(--blue); }
.pkg.selected { background: var(--surface); box-shadow: inset 0 0 0 2px var(--blue), var(--shadow-sm); }
.pkg-custom { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 16px; }
.amount-input.small .input { height: 48px; font-size: 20px; padding-left: 36px; }
.amount-input.small .cur { font-size: 18px; left: 15px; }
.pk-row, .ledger-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pk-row:last-child, .ledger-row:last-child { border-bottom: 0; }
.ledger-row .plus { color: var(--green-fg); }
.ledger-row.undone b:first-child, .ledger-row.undone .amt { color: var(--text-3); }
.ledger-row.undone .amt { text-decoration: line-through; }
.ledger-row .btn-plain { padding: 0 8px; height: 28px; color: var(--red-fg); }
.svc-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--fill-2); display: inline-grid; place-items: center; color: var(--text-2); }
.svc-ic svg { width: 15px; height: 15px; }
.mobile-status { display: none; }

/* ── Reports ─────────────────────────────── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.custom-range { display: flex; gap: 8px; align-items: center; }
.custom-range .input { height: 36px; font-size: 14px; width: 150px; border-radius: 10px; padding: 0 10px; }
.chart { position: relative; margin-top: 14px; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--text-3); stroke-opacity: .5; stroke-width: 1; }
.chart .tick { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--blue); transition: opacity .15s; }
.chart .hit { fill: transparent; cursor: default; }
.chart svg:hover .bar { opacity: .45; }
.chart g.on .bar { opacity: 1; }
.chart .tip {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none; z-index: 2;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px;
  padding: 8px 12px; display: flex; flex-direction: column; align-items: center; white-space: nowrap;
}
.chart .tip small { color: var(--text-2); font-size: 12px; }
.chart .tip b { font-size: 16px; }
.tbl { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.tbl th { text-align: left; color: var(--text-2); font-weight: 500; font-size: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tbl th:not(:first-child), .tbl td:not(:first-child) { text-align: right; }
.report-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.brk { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.brk-main { flex: 1; min-width: 0; }
.brk-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.brk-bar { height: 6px; border-radius: 3px; background: var(--fill-2); margin: 6px 0 3px; overflow: hidden; }
.brk-bar i { display: block; height: 100%; border-radius: 3px; background: var(--blue); }
.brk small { color: var(--text-3); font-size: 12px; }

/* ── Moderator balance ─────────────────────────────── */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.mod-card { padding: 18px; }
.mod-top { display: flex; align-items: center; gap: 12px; }
.mod-bal { display: flex; flex-direction: column; margin: 16px 0 14px; padding: 14px 16px; border-radius: 14px; background: var(--fill-2); }
.mod-bal span:nth-child(2) { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.mod-bal .low { color: var(--red-fg); }
.mod-actions { display: flex; gap: 8px; }
.mod-actions .btn { flex: 1; }

/* ── Super admin: admin cards ─────────────────────────────── */
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.adm-card { padding: 18px; transition: opacity .2s; }
.adm-card.off { opacity: .6; }
.adm-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 12px; }
.adm-nums div { padding: 12px; border-radius: 14px; background: var(--fill-2); min-width: 0; }
.adm-nums small { display: block; font-size: 12px; color: var(--text-3); }
.adm-nums b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-nums em { display: block; font-style: normal; font-size: 12px; color: var(--text-2); }
.adm-meta { font-size: 13px; color: var(--text-3); margin: 0 0 14px; }
.adm-meta b { color: var(--orange-fg, #c93400); font-weight: 600; }
.brand-mark.super { background: linear-gradient(135deg, #1d1d1f, #5e5ce6); }
.bal-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--fill); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.bal-pill svg { width: 15px; height: 15px; color: var(--text-2); }
.bal-pill.low { background: var(--red-bg); color: var(--red-fg); }
.bal-pill.low svg { color: currentColor; }
/* "Turn on notifications" reminder at the top of the moderator queue */
.push-banner {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--red), var(--shadow-sm);
}
.push-banner.blocked { box-shadow: inset 4px 0 0 #ff9f0a, var(--shadow-sm); }
.push-banner .pb-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--red-bg); color: var(--red-fg); display: grid; place-items: center; flex: none; }
.push-banner.blocked .pb-ic { background: var(--orange-bg); color: var(--orange-fg); }
.push-banner .pb-ic svg { width: 20px; height: 20px; }
.push-banner .pb-text { flex: 1; min-width: 0; }
.push-banner b { display: block; font-size: 15px; }
.push-banner small { display: block; color: var(--text-2); font-size: 13px; line-height: 1.4; }
.push-banner .btn { flex: none; }

/* Account-type banner on moderator cards: solid colour so Personal vs Agent can't be missed */
.qtype {
  --tc: #0071e3;
  display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--tc); color: #fff;
}
.qtype.t-personal { --tc: #0071e3; }
.qtype.t-agent { --tc: #e8590c; }
.qtype.t-prepaid { --tc: #0b8f9c; }
.qtype.t-postpaid { --tc: #5856d6; }
.qtype .qt-ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; }
.qtype .qt-ic svg { width: 20px; height: 20px; }
.qtype b { display: block; font-size: 20px; font-weight: 800; letter-spacing: .06em; line-height: 1.15; }
.qtype small { display: block; font-size: 13px; opacity: .92; font-weight: 500; }
.qtype.in-sheet { margin: 0 0 16px; }
.sb-type { font-weight: 700; }
.sb-type.t-personal { color: #0071e3; } .sb-type.t-agent { color: #e8590c; }
.sb-type.t-prepaid { color: #0b8f9c; } .sb-type.t-postpaid { color: #5856d6; }
.qnum.t-personal { box-shadow: inset 0 0 0 2px rgba(0,113,227,.55); }
.qnum.t-agent { box-shadow: inset 0 0 0 2px rgba(232,89,12,.6); }
.qnum.t-prepaid { box-shadow: inset 0 0 0 2px rgba(11,143,156,.55); }
.qnum.t-postpaid { box-shadow: inset 0 0 0 2px rgba(88,86,214,.55); }
.qnum.t-personal .lbl { color: #0071e3; } .qnum.t-agent .lbl { color: #e8590c; }
.qnum.t-prepaid .lbl { color: #0b8f9c; } .qnum.t-postpaid .lbl { color: #5856d6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .qnum.t-personal .lbl { color: #4da3ff; } :root:not([data-theme="light"]) .qnum.t-agent .lbl { color: #ff8a3d; }
  :root:not([data-theme="light"]) .qnum.t-prepaid .lbl { color: #3fc7d4; } :root:not([data-theme="light"]) .qnum.t-postpaid .lbl { color: #8e8cff; }
}
:root[data-theme="dark"] .qnum.t-personal .lbl { color: #4da3ff; } :root[data-theme="dark"] .qnum.t-agent .lbl { color: #ff8a3d; }
:root[data-theme="dark"] .qnum.t-prepaid .lbl { color: #3fc7d4; } :root[data-theme="dark"] .qnum.t-postpaid .lbl { color: #8e8cff; }
.qwarn { margin-top: 10px; font-size: 13px; color: var(--red-fg); background: var(--red-bg); border-radius: 10px; padding: 8px 12px; font-weight: 500; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 920px) {
  .brand span { display: none; }
  .transfer { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .page { padding: 24px 16px 80px; }
  .nav-inner { padding: 0 16px; gap: 12px; }
  .brand span { display: none; }
  h1 { font-size: 28px; }
  .row { grid-template-columns: 40px 1fr auto; gap: 12px; padding: 12px 16px; }
  .row .col-type, .row .col-status-wide { display: none; }
  .section-title > div { width: 100%; }
  .section-title .segmented.small { width: 100%; }
  .section-title .segmented.small button { padding: 0 4px; font-size: 12px; }
  .section-title #search { width: 100% !important; }
  .mobile-status { display: block; }
  .filters .segmented.small { width: 100%; }
  .filters .segmented.small button { padding: 0 4px; font-size: 12px; }
  .custom-range { width: 100%; }
  .custom-range .input { flex: 1; width: auto; }
  .service-seg button { font-size: 13px; gap: 5px; }
  .pkg-custom { grid-template-columns: 1fr; }
  .bal-pill span { display: none; }
  .row .op-logo { --s: 40px; }
  .stat .value { font-size: 26px; }
  .queue { grid-template-columns: 1fr; }
  .overlay { align-items: end; padding: 0; }
  .sheet { border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92vh; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
  @keyframes sheetOut { to { transform: translateY(100%); } }
}
/* ── Phone app layer ─────────────────────────────── */
html { -webkit-tap-highlight-color: transparent; }
button, a, input, textarea, .row, .op-tile, .chip, .pkg, .swatch { touch-action: manipulation; }
.nav { padding-top: env(safe-area-inset-top, 0px); }
.nav-title { display: none; }
.tabbar { display: none; }
.send-bar { display: none; }

/* Touch screens: no hover jumps, give press feedback instead. */
@media (hover: none) {
  .op-tile:hover { transform: none; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
  .op-tile.selected:hover { box-shadow: var(--shadow), inset 0 0 0 2px var(--op, var(--blue)); }
  .row:hover { background: transparent; }
  .photo-drop:hover, .swatch:hover { transform: none; }
  .op-tile:active { transform: scale(.96); }
  .row:active { background: var(--fill-2); }
  .pkg:active, .chip:active { transform: scale(.95); }
}

@media (max-width: 640px) {
  /* Top bar: app icon, page title (appears when you scroll), quick actions */
  .nav .tabs, .nav .bal-pill { display: none; }
  .nav-inner { height: 52px; gap: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .nav-title { display: block; flex: 1; min-width: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em;
    opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.scrolled .nav-title { opacity: 1; transform: none; }
  .nav .avatar { width: 34px; height: 34px; }

  /* Bottom tab bar, like a native app */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--nav-bg); border-top: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 6px max(6px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-right, 0px));
  }
  .tabbar button {
    flex: 1; min-width: 0; border: 0; background: none; min-height: 50px; padding: 4px 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10.5px; font-weight: 500; color: var(--text-3); transition: color .2s;
  }
  .tabbar button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar svg { width: 25px; height: 25px; transition: transform .2s var(--ease); }
  .tabbar button:active svg { transform: scale(.86); }
  .tabbar button.active { color: var(--blue); }
  .tabbar button.low { color: var(--red-fg); }
  .tabbar .tb-ic { position: relative; display: inline-grid; }
  .tabbar .count {
    position: absolute; top: -5px; right: -11px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; display: grid; place-items: center;
    box-shadow: 0 0 0 2px var(--bg);
  }

  /* Page spacing clears the tab bar and the phone's rounded corners */
  .page { padding: 18px max(16px, env(safe-area-inset-left, 0px)) calc(96px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
  .page:has(.send-bar) { padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px)); }
  .page-head { margin-bottom: 18px; }
  .has-tabbar .page-head > a.btn[href="#send"] { display: none; }
  .toasts { top: calc(60px + env(safe-area-inset-top, 0px)); }

  /* Bigger touch targets */
  .icon-btn { width: 40px; height: 40px; }
  .chip { height: 40px; padding: 0 16px; font-size: 15px; }
  .btn-sm { height: 38px; font-size: 14px; }
  .segmented.small button { height: 36px; }
  .copy-btn { min-width: 44px; min-height: 44px; }

  /* 16px+ in every field so iPhone doesn't zoom in when typing */
  textarea.input, .custom-range .input, .input[style*="font-size:14px"], .input[style*="font-size:15px"] { font-size: 16px !important; }

  /* Bottom sheets: grab handle, swipe down to close, clear of the home bar */
  .sheet { max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .sheet::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--fill); margin: 8px auto -4px; }
  .sheet-head { padding: 14px 20px 4px; }
  .sheet-body { padding: 12px 20px 20px; }
  .sheet-foot { padding: 0 20px 18px; }

  /* New Transfer: compact operator grid, summary becomes the sticky Send bar */
  .op-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
  .op-tile { padding: 14px 6px 12px; gap: 8px; border-radius: 16px; }
  .op-tile .op-logo { --s: 46px; }
  .op-tile .name { font-size: 13px; }
  .step { margin-bottom: 22px; }
  .summary { display: none; }
  .send-bar {
    display: flex; align-items: center; gap: 12px; position: fixed; z-index: 55;
    left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px));
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    padding: 10px 10px 10px 12px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    animation: sheetIn .4s var(--ease);
  }
  .sb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .sb-info b { font-size: 20px; letter-spacing: -0.02em; }
  .sb-info small { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .send-bar .btn { height: 46px; border-radius: 13px; padding: 0 20px; font-size: 16px; }

  /* Moderator queue cards: full width, thumb-sized actions */
  .qcard .qbody { padding: 18px 18px 16px; }
  .qactions { padding: 0 18px 18px; }
  .qactions .btn { height: 50px; font-size: 16px; }
  .qamt .a { font-size: 32px; }
}

/* ── Desktop & tablet: menu on the left side ─────────────────────────────
   The phone's bottom tab bar becomes a left sidebar (same buttons, same icons). */
@media (min-width: 641px) {
  .has-tabbar .nav-inner { max-width: none; }
  .has-tabbar .nav .tabs { display: none; }
  .has-tabbar .nav-right { margin-left: auto; }
  .has-tabbar .tabbar {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; z-index: 45; left: 0; bottom: 0; top: calc(57px + env(safe-area-inset-top, 0px)); width: 236px;
    padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto;
  }
  .has-tabbar .tabbar button {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 14px;
    border: 0; border-radius: 12px; background: none; color: var(--text-2);
    font-size: 15px; font-weight: 500; text-align: left; transition: background .15s, color .15s;
  }
  .has-tabbar .tabbar button:hover { background: var(--fill-2); color: var(--text); }
  .has-tabbar .tabbar button.active { background: rgba(0, 113, 227, .1); color: var(--blue); font-weight: 600; }
  .has-tabbar .tabbar button.low { color: var(--red-fg); }
  .has-tabbar .tabbar svg { width: 22px; height: 22px; flex: none; }
  .has-tabbar .tabbar .tb-ic { position: relative; display: inline-grid; }
  .has-tabbar .tabbar .count {
    position: absolute; top: -6px; right: -10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface);
  }
  .has-tabbar .page { max-width: none; margin: 0 0 0 236px; padding: 32px 36px 80px; }
  .has-tabbar .page > .view { max-width: 1180px; margin: 0 auto; }
  .has-tabbar .toasts { left: calc(50% + 118px); }

  /* Dashboard → Latest transfers: bigger, bolder title, filters and search so they catch the eye */
  .lt-head h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
  .lt-head .segmented.small { padding: 4px; border-radius: 14px; }
  .lt-head .segmented.small button { height: 40px; font-size: 15px; font-weight: 600; padding: 0 18px; color: var(--text-2); }
  .lt-head .segmented.small button.active { color: var(--text); }
  .lt-head #search { height: 46px !important; font-size: 15px !important; font-weight: 500; width: 280px !important; padding: 0 18px; }
}
/* Narrow desktop / tablet: a slim icon rail instead of the full sidebar */
@media (min-width: 641px) and (max-width: 1023px) {
  .has-tabbar .tabbar { width: 88px; padding: 14px 8px; }
  .has-tabbar .tabbar button { flex-direction: column; justify-content: center; gap: 4px; padding: 10px 4px; font-size: 11.5px; text-align: center; }
  .has-tabbar .page { margin-left: 88px; padding: 28px 24px 80px; }
  .has-tabbar .toasts { left: calc(50% + 44px); }
  .lt-head #search { width: 100% !important; }
}

/* Dashboard → quick send: tap an operator to start a transfer with it */
.quick { margin: 0 0 8px; }
.quick-group + .quick-group { margin-top: 16px; }
.quick-group h3 { font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; }
.quick .op-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.quick .op-tile { padding: 14px 8px 12px; gap: 8px; }
.quick .op-tile .op-logo { --s: 48px; }
.quick .op-tile .name { font-size: 13.5px; }
.quick .op-tile small { font-size: 11.5px; color: var(--text-3); margin-top: -4px; }
/* Operator tile: name, and how much went out through it today */
.qt-info { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.qt-info .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.qt-today { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.qt-today b { font-size: 15px; font-weight: 700; color: var(--green-fg); }
.qt-today b.zero { color: var(--text-3); font-weight: 600; }
.qt-today small { font-size: 11.5px; color: var(--text-3); margin: 0 !important; }
/* Desktop/tablet: tiles stretch across the full width; logo on the left, name + today's amount on its right */
@media (min-width: 641px) {
  .quick .op-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
  .quick .op-tile { flex-direction: row; align-items: center; justify-content: flex-start; padding: 18px 18px; gap: 16px; border-radius: 18px; text-align: left; }
  .quick .op-tile .op-logo { --s: 64px; flex: none; }
  .quick .qt-info { align-items: flex-start; gap: 6px; flex: 1; }
  .quick .op-tile .name { font-size: 16px; font-weight: 600; }
  .quick .qt-today { align-items: flex-start; }
  .quick .qt-today b { font-size: 20px; letter-spacing: -0.01em; }
  .quick .qt-today small { font-size: 12.5px; }
}

/* Transfer rows: when and from which number the moderator sent it */
.row .meta.sent { color: var(--green-fg); font-weight: 500; margin-top: 2px; }

/* Super admin → admin card: the admin's security PIN */
.adm-pin { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--fill-2); font-size: 14px; min-height: 44px; }
.adm-pin > span { color: var(--text-2); flex: 1; }
.adm-pin [data-pinval] { font-size: 17px; letter-spacing: .12em; }

/* PIN / authenticator code boxes */
.code-input { font-size: 24px !important; letter-spacing: .4em; text-align: center; font-weight: 600; }
.pin-sum { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--fill-2); margin-bottom: 18px; }
.pin-sum b { font-size: 20px; display: block; }

/* Devices & security, new-device approval */
.dev-list { overflow: hidden; }
.dev-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dev-row:last-child { border-bottom: 0; }
.dev-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--fill-2); display: grid; place-items: center; color: var(--text-2); flex: none; }
.dev-ic svg { width: 20px; height: 20px; }
.qr-box { width: 216px; height: 216px; margin: 0 auto; padding: 8px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.qr-box svg { width: 100%; height: 100%; display: block; }
.wait-line { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: 14px; background: var(--fill-2); font-weight: 500; color: var(--text-2); }
.spinner.dark { border-color: var(--fill); border-top-color: var(--blue); }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; margin: 0 0 14px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
