/* ===========================================================================
   NexPay design system — one stylesheet for all four surfaces.
   Tokens first, components second. Light and dark both first-class.
   ======================================================================== */

:root {
  --ink-900: #0b1220;
  --ink-800: #121a2b;
  --ink-700: #1b2538;
  --ink-600: #2a3850;
  --ink-500: #475569;
  --ink-400: #64748b;
  --ink-300: #94a3b8;
  --ink-200: #cbd5e1;
  --ink-100: #e2e8f0;
  --ink-50:  #f4f7fb;
  --white:   #ffffff;

  --teal-700: #0f766e;
  --teal-600: #11867c;
  --teal-500: #14a195;
  --teal-100: #d3f3ef;

  --green-600: #15803d;
  --green-100: #dcfce7;
  --amber-600: #b45309;
  --amber-100: #fef3c7;
  --red-600:   #be123c;
  --red-100:   #ffe4e6;
  --blue-600:  #1d4ed8;
  --blue-100:  #dbeafe;
  --violet-600:#6d28d9;
  --violet-100:#ede9fe;

  --bg:          var(--ink-50);
  --bg-raised:   var(--white);
  --bg-sunken:   #eaeff6;
  --bg-hover:    #f0f4f9;
  --border:      var(--ink-100);
  --border-strong: var(--ink-200);
  --text:        var(--ink-900);
  --text-muted:  var(--ink-400);
  --text-subtle: var(--ink-500);
  --primary:     var(--teal-700);
  --primary-text:#ffffff;
  --primary-soft:var(--teal-100);
  --focus:       #0ea5a0;

  --shadow-sm: 0 1px 2px rgba(11,18,32,.06), 0 1px 3px rgba(11,18,32,.04);
  --shadow-md: 0 4px 12px rgba(11,18,32,.08), 0 1px 3px rgba(11,18,32,.04);
  --shadow-lg: 0 16px 40px rgba(11,18,32,.14);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #080d16;
    --bg-raised:   var(--ink-800);
    --bg-sunken:   #05090f;
    --bg-hover:    var(--ink-700);
    --border:      #222d44;
    --border-strong: var(--ink-600);
    --text:        #eef2f8;
    --text-muted:  var(--ink-300);
    --text-subtle: var(--ink-200);
    --primary:     var(--teal-500);
    --primary-text:#05221f;
    --primary-soft:#0c3b37;
    --green-100: #052e16; --green-600: #4ade80;
    --amber-100: #3a2606; --amber-600: #fbbf24;
    --red-100:   #3f0d1c; --red-600:   #fb7185;
    --blue-100:  #0c1f4a; --blue-600:  #93b4fd;
    --violet-100:#241152; --violet-600:#c4b5fd;
    --teal-100:  #0c3b37;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 4px 14px rgba(0,0,0,.45);
    --shadow-lg: 0 18px 44px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #080d16; --bg-raised: var(--ink-800); --bg-sunken: #05090f; --bg-hover: var(--ink-700);
  --border: #222d44; --border-strong: var(--ink-600);
  --text: #eef2f8; --text-muted: var(--ink-300); --text-subtle: var(--ink-200);
  --primary: var(--teal-500); --primary-text: #05221f; --primary-soft: #0c3b37;
  --green-100:#052e16; --green-600:#4ade80; --amber-100:#3a2606; --amber-600:#fbbf24;
  --red-100:#3f0d1c; --red-600:#fb7185; --blue-100:#0c1f4a; --blue-600:#93b4fd;
  --violet-100:#241152; --violet-600:#c4b5fd; --teal-100:#0c3b37;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.012em; line-height: 1.25; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; } h4 { font-size: .9rem; }
p { margin: 0 0 .75rem; }
code, pre, .mono { font-family: var(--mono); font-size: .86em; }
pre {
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .75rem .9rem; overflow: auto; margin: 0;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--primary-soft); }

/* ------------------------------------------------------------- layout ---- */
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-raised); border-right: 1px solid var(--border);
  padding: 1rem .75rem; display: flex; flex-direction: column; gap: .15rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.main { padding: 1.4rem 1.6rem 4rem; max-width: 1400px; min-width: 0; }
.brand { display: flex; align-items: center; gap: .55rem; padding: .3rem .55rem 1rem; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .82rem;
}
.brand-name { font-weight: 700; letter-spacing: -.02em; }
.brand-sub { font-size: .66rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .09em; }

.navlink {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .46rem .6rem; border-radius: var(--radius-sm);
  color: var(--text-subtle); font-size: .875rem; font-weight: 500;
  border: 0; background: none; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
}
.navlink:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.navlink[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.navgroup { font-size: .66rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-muted); padding: .9rem .6rem .3rem; font-weight: 700; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.page-title { display: flex; flex-direction: column; gap: .18rem; }
.page-title small { color: var(--text-muted); font-size: .8rem; }

/* -------------------------------------------------------------- cards ---- */
.card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .85rem 1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.card-body { padding: 1rem; }
.card-body.tight { padding: .6rem 1rem; }

.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack.tight { gap: .5rem; }

/* --------------------------------------------------------------- stats --- */
.stat { padding: .9rem 1rem; }
.stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 700; }
.stat-value { font-size: 1.45rem; font-weight: 680; letter-spacing: -.02em; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.stat-value.sm { font-size: 1.1rem; }
.stat-sub { font-size: .76rem; color: var(--text-muted); margin-top: .15rem; }

/* ------------------------------------------------------------- badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .14rem .48rem; border-radius: 999px;
  font-size: .72rem; font-weight: 650; letter-spacing: .01em;
  background: var(--bg-sunken); color: var(--text-subtle); white-space: nowrap;
}
.badge.ok    { background: var(--green-100); color: var(--green-600); }
.badge.warn  { background: var(--amber-100); color: var(--amber-600); }
.badge.bad   { background: var(--red-100);   color: var(--red-600); }
.badge.info  { background: var(--blue-100);  color: var(--blue-600); }
.badge.muted { background: var(--bg-sunken); color: var(--text-muted); }
.badge.accent{ background: var(--violet-100); color: var(--violet-600); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }

/* ------------------------------------------------------------ controls --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .48rem .85rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-raised); color: var(--text);
  font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer;
  transition: background .12s, border-color .12s, transform .04s;
}
.btn:hover { background: var(--bg-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { background: var(--red-600); border-color: var(--red-600); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg-hover); }
.btn.sm { padding: .3rem .55rem; font-size: .78rem; }
.btn.lg { padding: .7rem 1.2rem; font-size: .95rem; width: 100%; }

label { display: block; font-size: .78rem; font-weight: 650; color: var(--text-subtle); margin-bottom: .28rem; }
input, select, textarea {
  width: 100%; padding: .5rem .65rem; font: inherit; font-size: .88rem;
  background: var(--bg-raised); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: var(--focus); }
input::placeholder { color: var(--text-muted); }
input[type="checkbox"], input[type="radio"] { width: auto; }
.field { margin-bottom: .8rem; }
.field-hint { font-size: .74rem; color: var(--text-muted); margin-top: .25rem; }
.field-error { font-size: .76rem; color: var(--red-600); margin-top: .25rem; }
fieldset { border: 0; margin: 0; padding: 0; }

/* -------------------------------------------------------------- tables --- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th {
  text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); font-weight: 700; padding: .5rem .75rem;
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--bg-raised);
  position: sticky; top: 0;
}
td { padding: .55rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.clickable { cursor: pointer; }

/* --------------------------------------------------------------- misc ---- */
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.small { font-size: .8rem; }
.xs { font-size: .72rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.tnum { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18ch; }
.hidden { display: none !important; }
.spacer { flex: 1 1 auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }

.empty { padding: 2.2rem 1rem; text-align: center; color: var(--text-muted); font-size: .88rem; }
.spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--border-strong); border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.notice {
  padding: .65rem .85rem; border-radius: var(--radius-sm); font-size: .84rem;
  border: 1px solid var(--border); background: var(--bg-sunken);
}
.notice.ok   { background: var(--green-100); border-color: transparent; color: var(--green-600); }
.notice.warn { background: var(--amber-100); border-color: transparent; color: var(--amber-600); }
.notice.bad  { background: var(--red-100);   border-color: transparent; color: var(--red-600); }
.notice.info { background: var(--blue-100);  border-color: transparent; color: var(--blue-600); }

/* ------------------------------------------------------------- toasts ---- */
#toasts {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  display: flex; flex-direction: column; gap: .5rem; max-width: 380px;
}
.toast {
  background: var(--bg-raised); border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm); padding: .6rem .8rem; box-shadow: var(--shadow-lg);
  font-size: .85rem; animation: slidein .18s ease-out;
}
.toast.bad { border-left-color: var(--red-600); }
.toast.ok  { border-left-color: var(--green-600); }
.toast.warn{ border-left-color: var(--amber-600); }
@keyframes slidein { from { opacity: 0; transform: translateX(14px); } }

/* -------------------------------------------------------------- modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,9,15,.55); z-index: 50;
  display: grid; place-items: center; padding: 1rem; backdrop-filter: blur(2px);
}
.modal {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: min(620px, 100%); max-height: 88vh; overflow: auto;
}
.modal-head { padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.modal-body { padding: 1.15rem; }
.modal-foot { padding: .85rem 1.15rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; }

/* --------------------------------------------------------------- tabs ---- */
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tab {
  padding: .5rem .8rem; border: 0; background: none; cursor: pointer; font: inherit;
  font-size: .86rem; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }

/* ----------------------------------------------------------- key/value --- */
.kv { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: .4rem .9rem; font-size: .85rem; }
.kv dt { color: var(--text-muted); font-weight: 600; }
.kv dd { margin: 0; word-break: break-word; }

/* -------------------------------------------------------------- bars ----- */
.bar { height: 6px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.bar.bad > span { background: var(--red-600); }
.bar.warn > span { background: var(--amber-600); }

/* ---------------------------------------------------------- timeline ----- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 1rem .9rem; font-size: .85rem; }
.timeline li::before {
  content: ''; position: absolute; left: -1.46rem; top: .35rem;
  width: 9px; height: 9px; border-radius: 50%; background: var(--primary);
  border: 2px solid var(--bg-raised);
}
.timeline li.bad::before  { background: var(--red-600); }
.timeline li.warn::before { background: var(--amber-600); }
.timeline li.muted::before{ background: var(--border-strong); }

/* ------------------------------------------------------ centered auth ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: min(400px, 100%); }
.auth-card .card-body { padding: 1.5rem; }

/* ----------------------------------------------------- phone frame (app) -- */
.phone-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; background: var(--bg-sunken); }
.phone {
  width: min(400px, 100%); height: min(840px, calc(100vh - 3rem));
  background: var(--bg-raised); border-radius: 30px; border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; position: relative;
}
.phone-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: .55rem 1.1rem .3rem; font-size: .7rem; color: var(--text-muted); font-weight: 600;
}
.phone-screen { flex: 1 1 auto; overflow-y: auto; padding: .5rem 1.1rem 1rem; }
.phone-nav {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .2rem;
  border-top: 1px solid var(--border); padding: .4rem .5rem .6rem; background: var(--bg-raised);
}
.phone-nav button {
  border: 0; background: none; cursor: pointer; font: inherit; font-size: .66rem; font-weight: 650;
  color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: .18rem;
  padding: .3rem .1rem; border-radius: var(--radius-sm);
}
.phone-nav button[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.phone-nav .ico { font-size: 1.05rem; line-height: 1; }

.balance-card {
  background: linear-gradient(135deg, var(--teal-700), #0a5f58);
  color: #fff; border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; margin: .4rem 0 1rem;
}
.balance-card .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; opacity: .8; font-weight: 700; }
.balance-card .amount { font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; margin: .2rem 0 .1rem; font-variant-numeric: tabular-nums; }
.balance-card .meta { font-size: .74rem; opacity: .82; }

.tile-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1rem; }
.tile {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised);
  padding: .65rem .35rem; text-align: center; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
}
.tile:hover { background: var(--bg-hover); }
.tile .ico { font-size: 1.25rem; }
.tile .lbl { font-size: .67rem; font-weight: 650; color: var(--text-subtle); }

.list-item {
  display: flex; align-items: center; gap: .7rem; padding: .6rem 0;
  border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: .78rem;
}
.list-main { flex: 1 1 auto; min-width: 0; }
.list-title { font-size: .86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-sub { font-size: .74rem; color: var(--text-muted); }
.list-amount { font-size: .88rem; font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --------------------------------------------------------- QR + checkout -- */
.qr-frame {
  width: 190px; height: 190px; margin: 0 auto; background: #fff; padding: 10px;
  border-radius: var(--radius); border: 1px solid var(--border-strong);
}
.qr-frame svg { display: block; width: 100%; height: 100%; }

.checkout-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.checkout { width: min(440px, 100%); }
.pay-summary {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1rem 1.15rem; border-bottom: 1px solid var(--border);
}
.pay-summary .amount { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.method-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin-bottom: 1rem; }
.method-tab {
  border: 1px solid var(--border-strong); background: var(--bg-raised); border-radius: var(--radius-sm);
  padding: .5rem .3rem; cursor: pointer; font: inherit; font-size: .76rem; font-weight: 650; color: var(--text-subtle);
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
}
.method-tab[aria-selected="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.card-row { display: grid; grid-template-columns: 1fr 90px; gap: .6rem; }
.secure-note {
  display: flex; align-items: center; gap: .4rem; justify-content: center;
  font-size: .72rem; color: var(--text-muted); margin-top: .9rem;
}

/* -------------------------------------------------------------- landing -- */
.hero { max-width: 1100px; margin: 0 auto; padding: 3.5rem 1.25rem 2rem; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -.03em; }
.hero p.lede { font-size: 1.05rem; color: var(--text-subtle); max-width: 60ch; margin-top: .8rem; }
.surface-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); margin-top: 2rem; }
.surface-card {
  display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); color: inherit;
}
.surface-card:hover { box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-1px); }
.surface-card .ico { font-size: 1.5rem; }
.surface-card h3 { font-size: .98rem; }
.surface-card p { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* --------------------------------------------------------------- mobile -- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; flex-direction: row; overflow-x: auto;
    border-right: 0; border-bottom: 1px solid var(--border); padding: .5rem;
  }
  .brand, .navgroup { display: none; }
  .navlink { width: auto; white-space: nowrap; }
  .main { padding: 1rem 16px 3rem; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: .15rem .5rem; }
  .kv dt { margin-top: .5rem; }
  .phone { height: auto; min-height: 70vh; border-radius: 20px; }
  .tile-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero { padding: 2rem 16px 1.5rem; }
  .card-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------- push notification preview ---
   A rough likeness of a notification shade, so an operator sees roughly what
   lands on the handset — including the truncation a long title gets. */
.push-preview {
  background: linear-gradient(140deg, #1f2937, #0b1220);
  border-radius: 18px; padding: 1rem; display: flex; flex-direction: column; gap: .6rem;
}
.push-preview .pp-time { color: rgba(255,255,255,.72); font-size: .72rem; letter-spacing: .04em; text-align: center; }
.push-card {
  background: rgba(255,255,255,.94); color: #111827; border-radius: 14px;
  padding: .7rem .8rem; display: flex; flex-direction: column; gap: .35rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.push-card .pp-app { display: flex; align-items: center; gap: .4rem; font-size: .68rem; color: #4b5563; text-transform: uppercase; letter-spacing: .06em; }
.push-card .pp-icon { width: 16px; height: 16px; border-radius: 4px; background: var(--teal-600); color: #fff; font-size: .6rem; display: grid; place-items: center; }
.push-card .pp-title { font-weight: 650; font-size: .88rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; }
.push-card .pp-body { font-size: .8rem; line-height: 1.35; color: #374151; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; }
.push-card .pp-image { width: 100%; max-height: 120px; object-fit: cover; border-radius: 8px; background: #e5e7eb; }
.push-card .pp-image-missing { font-size: .7rem; color: #9ca3af; border: 1px dashed #d1d5db; border-radius: 8px; padding: .8rem; text-align: center; }
.audience-meter { display: flex; flex-direction: column; gap: .3rem; }
.audience-meter .am-bar { height: 8px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; }
.audience-meter .am-fill { height: 100%; background: var(--green-600); }
