/* Shared styles for the Sellora Pay merchant dashboard and the Sellora Tech admin panel. */
:root {
  /* Sellora Tech palette (selloratech.xyz): blue #0062E0, ink #07080A, paper #F4F2EE / #FBFAF8, slate #8E97A4 */
  --bg: #f4f2ee; --surface: #ffffff; --surface-2: #fbfaf8; --text: #07080a; --text-2: #4a4f58; --muted: #8e97a4;
  --line: #e4e1da; --line-2: #eeebe5; --ink: #07080a;
  --font-display: "Inter Tight", "Inter", "Noto Sans Bengali", system-ui, sans-serif; --font-wm: "Michroma", "Inter Tight", sans-serif;
  --brand: #0062e0; --brand-600: #0052c2; --brand-700: #0043a0; --brand-50: #eaf3ff; --brand-100: #d4e7ff;
  --ok: #079455; --ok-bg: #e9f9ef; --warn: #c4590a; --warn-bg: #fff6e6; --bad: #d92d20; --bad-bg: #fff0ee; --info: #3567e6; --info-bg: #eef3ff;
  --bkash: #e2136e; --nagad: #f15a24; --rocket: #8c3494; --upay: #0a58ca; --bank: #475467;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05); --shadow: 0 1px 3px rgba(16,24,40,.06), 0 6px 16px -6px rgba(16,24,40,.08);
  --shadow-lg: 0 24px 48px -12px rgba(16,24,40,.25);
  --radius: 14px; --sidebar: 248px;
  --font: "Inter", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07080a; --surface: #13161c; --surface-2: #0e1015; --text: #f4f2ee; --text-2: #b9bec8; --muted: #8e97a4;
    --line: #252932; --line-2: #1b1e25; --brand-50: #0b1d3a; --brand-100: #10305e;
    --ok-bg: #0f2a1d; --warn-bg: #2d1f0c; --bad-bg: #2f1513; --info-bg: #142039; --bank: #9aa6b2;
    --shadow-sm: none; --shadow: 0 1px 0 rgba(255,255,255,.02); --shadow-lg: 0 24px 48px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #07080a; --surface: #13161c; --surface-2: #0e1015; --text: #f4f2ee; --text-2: #b9bec8; --muted: #8e97a4;
  --line: #252932; --line-2: #1b1e25; --brand-50: #0b1d3a; --brand-100: #10305e;
  --ok-bg: #0f2a1d; --warn-bg: #2d1f0c; --bad-bg: #2f1513; --info-bg: #142039; --bank: #9aa6b2;
  --shadow-sm: none; --shadow: 0 1px 0 rgba(255,255,255,.02); --shadow-lg: 0 24px 48px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); } .t2 { color: var(--text-2); }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid transparent; font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); } .btn-ghost:hover { background: var(--line-2); color: var(--text); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: var(--line); } .btn-danger:hover { background: var(--bad-bg); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; } .btn-sm svg.i { width: 15px; height: 15px; }
.btn-icon { width: 34px; padding: 0; } .btn-icon.btn-sm { width: 30px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field small { display: block; color: var(--muted); margin-top: 5px; font-size: 12px; }
.input, textarea.input, select.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--text); font: 14px var(--font); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; font: 13px/1.5 var(--mono); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.input-group { position: relative; } .input-group svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.input-group .input { padding-left: 34px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--line-2); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.paid, .badge.parsed, .badge.online { background: var(--ok-bg); color: var(--ok); }
.badge.pending { background: var(--warn-bg); color: var(--warn); }
.badge.ignored, .badge.unpaid { background: var(--line-2); color: var(--text-2); }
.badge.expired, .badge.untrusted_sender, .badge.offline { background: var(--bad-bg); color: var(--bad); }
.badge.online::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 0%, transparent); } }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; border-radius: 8px; background: var(--brand-50); color: var(--brand-700);
  font-size: 12.5px; font-weight: 600; border: 1px solid var(--brand-100); }
:root[data-theme="dark"] .chip { color: #8cc2ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip { color: #8cc2ff; } }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 2px; display: grid; opacity: .7; } .chip button:hover { opacity: 1; }
.chip svg.i { width: 13px; height: 13px; }

/* method avatar */
.mth { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; font-weight: 800; font-size: 11px; flex: none; letter-spacing: -.3px; }
.mth.lg { width: 38px; height: 38px; border-radius: 11px; font-size: 14px; }
.mth.logo { background: #fff; border: 1px solid var(--line); padding: 2px; overflow: hidden; width: 44px; }
.mth.logo.lg { width: 64px; }
.preset .mth.logo { width: 44px; }
.mth.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mth.bkash { background: var(--bkash); } .mth.nagad { background: var(--nagad); } .mth.rocket { background: var(--rocket); }
.mth.upay { background: var(--upay); } .mth.bank { background: var(--bank); } .mth.none { background: var(--line); color: var(--muted); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand { position: relative; overflow: hidden; padding: 48px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  background: #07080a; border-right: 1px solid #1b1e25; }
.auth-brand::after { content: none; }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.8px; margin: 0 0 14px; max-width: 460px; }
.auth-brand p { opacity: .85; max-width: 440px; font-size: 15px; margin: 0; }
.auth-feats { display: grid; gap: 12px; margin-top: 30px; max-width: 440px; }
.auth-feat { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 12px 14px; backdrop-filter: blur(6px); }
.auth-feat svg.i { color: #bfdcff; }
.auth-panel { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { font-size: 24px; letter-spacing: -.5px; margin: 26px 0 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--line-2); border-radius: 11px; padding: 4px; margin: 22px 0; }
.seg button { border: 0; background: none; height: 34px; border-radius: 8px; font: 600 13.5px var(--font); color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.form-err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 10px; }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.4px; color: inherit; }
.logo img { width: 32px; height: 32px; border-radius: 9px;  }
.logo b { font-weight: 800; color: var(--brand); }
.wm { display: grid; justify-items: center; line-height: 1; gap: 5px; }
.wm-name { font: 400 16px/1 var(--font-wm); letter-spacing: .06em; color: var(--text); } .wm-name i { font-style: normal; color: var(--brand); }
.wm-sub { font: 700 8.5px/1 var(--font-display); letter-spacing: .62em; padding-left: .62em; color: var(--muted); }
h1, h2, h3, .stat .val, .modal-h h3 { font-family: var(--font-display); }
.auth-brand .wm-name { color: #fff; } .auth-brand .wm-sub { color: rgba(255,255,255,.6); }
.by-company { display: flex; align-items: center; gap: 10px; font-size: 12.5px; opacity: .8; } .by-company img { width: 22px; height: 22px; border-radius: 6px; } .auth-brand .logo b { color: #bfdcff; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; }
.sidebar .logo { padding: 2px 8px 18px; }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--text-2); font-weight: 550; text-decoration: none; }
.nav a:hover { background: var(--line-2); color: var(--text); }
.nav a.on { background: var(--brand-50); color: var(--brand-700); }
:root[data-theme="dark"] .nav a.on { color: #8cc2ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav a.on { color: #8cc2ff; } }
.nav a .count { margin-left: auto; background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.side-foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.phone-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.phone-card .row1 { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.phone-card small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--brand); flex: none; }
.me .who { min-width: 0; flex: 1; } .me .who b, .me .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who small { color: var(--muted); font-size: 12px; }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 19px; letter-spacing: -.4px; margin: 0; }
.topbar .grow { flex: 1; }
.menu-btn { display: none; }
.content { padding: 8px 28px 48px; max-width: 1280px; }
.page-sub { color: var(--text-2); margin: -2px 0 20px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-h h3 { margin: 0; font-size: 15px; letter-spacing: -.2px; } .card-h p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.card-h .grow { flex: 1; }
.card-b { padding: 20px; }
.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, 1fr); } .g-2 { grid-template-columns: 1fr 1fr; } .g-32 { grid-template-columns: 1.6fr 1fr; }
.stack { display: grid; gap: 18px; }

/* ---------- billing ---------- */
.sub-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; margin: 0 0 18px; border: 1px solid var(--line); font-size: 13.5px; color: var(--text); }
.sub-banner .grow { flex: 1; min-width: 0; } .sub-banner svg.i { width: 18px; height: 18px; flex: none; }
.sub-banner.info { background: var(--brand-50); border-color: var(--brand-100); } .sub-banner.info svg.i { color: var(--brand); }
.sub-banner.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); } .sub-banner.warn svg.i { color: var(--warn); }
.sub-banner.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 30%, transparent); } .sub-banner.bad svg.i { color: var(--bad); }
.plan-hero { padding: 22px; }
.plan-top { display: flex; align-items: center; gap: 10px; } .plan-top h3 { margin: 0; font-size: 16px; }
.plan-price { font: 750 36px/1.1 var(--font-display); letter-spacing: -1px; margin: 14px 0 4px; }
.plan-price small { font: 500 14px var(--font); color: var(--muted); letter-spacing: 0; }
.plan-until { color: var(--text-2); margin: 0; }
.meter { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: 14px; }
.meter > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.meter.warn > i { background: var(--warn); } .meter.bad > i { background: var(--bad); }
.feat-list { list-style: none; padding: 18px 0 0; margin: 18px 0 0; display: grid; gap: 9px; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-2); }
.feat-list li { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); }
.feat-list svg.i { width: 16px; height: 16px; color: var(--ok); flex: none; }
.months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.months button { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 6px; cursor: pointer; font: 650 13.5px var(--font); color: var(--text); display: grid; gap: 3px; justify-items: center; }
.months button small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.months button:hover { border-color: var(--brand-100); }
.months button.on { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.renew-total { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 14px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.renew-total b { font: 750 26px var(--font-display); letter-spacing: -.6px; }
.pay-with { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; } .timeline li:last-child::before { display: none; }
.timeline .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--text-2); }
.timeline .dot svg.i { width: 15px; height: 15px; }
.timeline li.now .dot { background: var(--brand); color: #fff; } .timeline li.now.bad .dot { background: var(--bad); } .timeline li.now.warn .dot { background: var(--warn); }
.timeline b { display: block; font-size: 13.5px; margin-top: 4px; } .timeline small { color: var(--muted); font-size: 12.5px; }
.badge.trial, .badge.open { background: var(--brand-50); color: var(--brand); }
.badge.active { background: var(--ok-bg); color: var(--ok); } .badge.grace { background: var(--warn-bg); color: var(--warn); }
.badge.paused { background: var(--bad-bg); color: var(--bad); } .badge.exempt { background: var(--line-2); color: var(--text-2); }
.who-cell b { display: block; } .who-cell small { display: block; color: var(--muted); font-size: 12px; }
.staff-tag { display: inline-block; margin-left: 6px; font: 700 10px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--brand); background: var(--brand-50); padding: 2px 6px; border-radius: 5px; vertical-align: 1px; }
.admin-sec { padding: 14px 0; border-top: 1px solid var(--line-2); } .admin-sec:first-child { border-top: 0; padding-top: 4px; }
.admin-sec h4 { margin: 0 0 10px; font: 700 13px var(--font-display); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 4px 0; } .kv-row span { color: var(--muted); }
.row2 { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.suspend-note { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 10px; }
.badge.suspended { background: var(--bad-bg); color: var(--bad); }
.nav a .count.info { background: var(--brand-50); color: var(--brand); } .nav a .count.bad { background: var(--bad-bg); color: var(--bad); }
@media (max-width: 640px) { .months { grid-template-columns: 1fr 1fr; } .feat-list { grid-template-columns: 1fr; } .sub-banner { flex-wrap: wrap; } }

.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .lbl { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 550; }
.stat .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.stat .ico svg.i { width: 16px; height: 16px; }
.stat .ico.warn { background: var(--warn-bg); color: var(--warn); } .stat .ico.ok { background: var(--ok-bg); color: var(--ok); } .stat .ico.info { background: var(--info-bg); color: var(--info); }
.stat .val { font-size: 27px; font-weight: 750; letter-spacing: -.8px; margin-top: 12px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* chart */
.chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; align-items: end; height: 200px; padding: 8px 4px 0; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 46px; border-radius: 8px 8px 4px 4px; background: var(--brand); min-height: 4px; position: relative; transition: height .5s cubic-bezier(.2,.8,.2,1); }
.bar.zero { background: var(--line-2); }
.bar .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.bar-col small { color: var(--muted); font-size: 11.5px; font-weight: 550; }

/* checklist */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.check:last-child { border-bottom: 0; padding-bottom: 0; } .check:first-child { padding-top: 0; }
.check .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); flex: none; color: transparent; }
.check.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; } .check .dot svg.i { width: 14px; height: 14px; stroke-width: 3; }
.check b { display: block; font-size: 13.5px; } .check.done b { color: var(--muted); text-decoration: line-through; }
.check small { color: var(--muted); font-size: 12.5px; }
.progress { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.progress > div { height: 100%; background: var(--brand); border-radius: 999px; transition: width .5s; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; } tbody tr:hover { background: var(--surface-2); }
td.num { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-2 { display: flex; align-items: center; gap: 10px; } .cell-2 small { display: block; color: var(--muted); font-size: 12px; }
.err-line { color: var(--bad); font-size: 12px; margin-top: 3px; max-width: 280px; }
.sms-body { max-width: 420px; color: var(--text-2); font-size: 12.5px; white-space: pre-wrap; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.sms-body.open { -webkit-line-clamp: unset; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .em-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--line-2); display: grid; place-items: center; margin: 0 auto 12px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 4px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.tabs { display: inline-flex; gap: 2px; background: var(--line-2); padding: 3px; border-radius: 10px; }
.tabs button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 7px; font: 600 12.5px var(--font); color: var(--text-2); cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.toolbar .grow { flex: 1; } .toolbar .input-group { width: 260px; } .toolbar .input { height: 36px; }

/* keys */
.keybox { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 5px 5px 5px 12px; }
.keybox code { flex: 1; font: 13px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
pre.code { margin: 0; background: #0b1220; color: #d7e2ec; border-radius: 12px; padding: 16px 18px; overflow-x: auto; font: 12.5px/1.65 var(--mono); }
pre.code .c { color: #6b7d8f; } pre.code .s { color: #7ee2b8; } pre.code .k { color: #7cc4ff; }

/* settings */
.pay-row { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; margin-bottom: 14px; }
.pay-row .field { margin: 0; }
.pay-row { align-items: start; } .pay-row .mth.lg { margin-top: 24px; }
.pay-inline { display: flex; gap: 10px; align-items: center; } .pay-inline .input { flex: 1; min-width: 0; }
.pay-inline .tabs { flex: none; } .pay-row small b { color: var(--text-2); }
@media (max-width: 640px) { .pay-inline { flex-direction: column; align-items: stretch; } .pay-inline .tabs { display: grid; grid-template-columns: repeat(3, 1fr); } }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 42px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tag-input input { flex: 1; min-width: 140px; border: 0; outline: none; background: none; font: 14px var(--font); color: var(--text); padding: 4px 6px; }
.tag-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.save-bar { display: flex; justify-content: flex-end; gap: 10px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

/* simulator */
.phone { width: 100%; max-width: 330px; margin: 0 auto; border-radius: 34px; padding: 12px; background: #111827; box-shadow: var(--shadow-lg); }
.phone-screen { border-radius: 24px; background: #f2f4f7; min-height: 420px; max-height: 560px; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.phone-top { display: flex; justify-content: center; margin-bottom: 6px; } .phone-top span { width: 90px; height: 22px; border-radius: 999px; background: #111827; margin-top: -10px; }
.bubble { background: #fff; color: #111827; border-radius: 16px 16px 16px 4px; padding: 10px 12px; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; box-shadow: 0 1px 2px rgba(0,0,0,.06); max-width: 92%; animation: pop .25s ease-out; }
.bubble .from { font-weight: 700; font-size: 11.5px; color: #0062e0; margin-bottom: 3px; display: flex; justify-content: space-between; gap: 8px; }
.bubble .from span { color: #98a2b3; font-weight: 500; }
.bubble-res { font-size: 11.5px; font-weight: 600; padding-left: 4px; }
.bubble-res.ok { color: #079455; } .bubble-res.bad { color: #d92d20; } .bubble-res.warn { color: #c4590a; }
@keyframes pop { from { transform: translateY(6px) scale(.97); opacity: 0; } }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.preset { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; font: 600 13px var(--font); color: var(--text); }
.preset:hover { border-color: var(--brand); background: var(--brand-50); }

/* modal */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(9,14,20,.5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: 100%; max-width: 460px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: rise .2s cubic-bezier(.2,.8,.2,1); }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 20px 22px 6px; } .modal-h h3 { margin: 0; font-size: 17px; flex: 1; }
.modal-b { padding: 12px 22px 8px; } .modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.success-link { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--brand-50); border: 1px solid var(--brand-100); }
.success-link code { flex: 1; font: 12.5px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 14px; border-radius: 12px; background: #101828; color: #fff; box-shadow: var(--shadow-lg); font-weight: 550; font-size: 13.5px; animation: rise .2s; }
.toast .ti { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.12); flex: none; }
.toast.ok .ti { background: #079455; } .toast.bad .ti { background: #d92d20; }
.toast .ti svg.i { width: 15px; height: 15px; }

/* responsive */
@media (max-width: 1100px) { .g-4 { grid-template-columns: 1fr 1fr; } .g-32 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; } .auth-brand { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: var(--sidebar); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
  .menu-btn { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .g-2 { grid-template-columns: 1fr; } .preset-grid { grid-template-columns: 1fr; }
  .toolbar .input-group { width: 100%; }
  td, th { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 520px) { .g-4 { grid-template-columns: 1fr; } }
