
  :root {
    --bg: #f7f6f1;
    --bg-elev: #ffffff;
    --bg-panel: #ffffff;
    --ink: #0f1115;
    --ink-soft: #4b5057;
    --ink-mute: #8b8f97;
    --line: rgba(15,17,21,0.08);
    --line-strong: rgba(15,17,21,0.14);
    --brand: #ffcb08;
    --brand-deep: #f5b800;
    --brand-soft: #fff4c2;
    --brand-tint: #fffaeb;
    --ink-on-brand: #0f1115;
    --positive: #16a34a;
    --positive-soft: #dcfce7;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --info: #2563eb;
    --info-soft: #dbeafe;
    --shadow-sm: 0 1px 2px rgba(15,17,21,0.04), 0 1px 1px rgba(15,17,21,0.03);
    --shadow-md: 0 2px 6px rgba(15,17,21,0.04), 0 8px 24px -8px rgba(15,17,21,0.08);
    --shadow-lg: 0 24px 60px -20px rgba(15,17,21,0.18), 0 8px 24px -12px rgba(15,17,21,0.10);
    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 8px;
  }
  body.dark {
    --bg: #0c0e12;
    --bg-elev: #14171d;
    --bg-panel: #171b22;
    --ink: #f5f5f3;
    --ink-soft: #c3c6cc;
    --ink-mute: #828790;
    --line: rgba(255,255,255,0.08);
    --line-strong: rgba(255,255,255,0.14);
    --brand-tint: rgba(255,203,8,0.08);
    --brand-soft: rgba(255,203,8,0.18);
    --ink-on-brand: #0f1115;
    --positive-soft: rgba(34,197,94,0.16);
    --danger-soft: rgba(239,68,68,0.16);
    --info-soft: rgba(59,130,246,0.16);
    --shadow-md: 0 2px 6px rgba(0,0,0,0.3), 0 8px 24px -8px rgba(0,0,0,0.4);
    --shadow-lg: 0 24px 60px -20px rgba(0,0,0,0.6);
  }
  * { box-sizing: border-box; }
  html, body { margin:0; padding:0; }
  body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01", "cv11";
    min-height: 100vh;
    transition: background 200ms ease, color 200ms ease;
  }
  button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
  a { color: inherit; text-decoration: none; }
  .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: "tnum"; }
  .tabular { font-variant-numeric: tabular-nums; }

  /* ---------- LAYOUT ---------- */
  .app {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
  }
  .app > div { min-width: 0; }
  @media (max-width: 960px) {
    .app { grid-template-columns: 1fr; }
  }

  /* ---------- SIDEBAR ---------- */
  .sidebar {
    background: var(--bg-elev);
    border-right: 1px solid var(--line);
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: background 200ms ease, border-color 200ms ease;
  }
  @media (max-width: 960px) { .sidebar { display: none; } }
  .brand-row {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 14px;
    border-bottom: 1px solid var(--line);
  }
  .brand-wordmark {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1;
  }
  .brand-wordmark .net { color: var(--brand); }
  .brand-pill {
    margin-left: auto;
    font-size: 10px;
    padding: 4px 8px;
    background: var(--brand-tint);
    color: var(--ink-soft);
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  .nav-section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
    padding: 0 10px;
    margin-bottom: 6px;
    font-weight: 600;
  }
  .nav-list { display: flex; flex-direction: column; gap: 2px; }
  .nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
    position: relative;
  }
  .nav-item:hover { background: var(--brand-tint); color: var(--ink); }
  .nav-item.active {
    background: var(--ink);
    color: #fff;
  }
  body.dark .nav-item.active { background: var(--brand); color: var(--ink-on-brand); }
  .nav-item.active svg { color: var(--brand); }
  body.dark .nav-item.active svg { color: var(--ink-on-brand); }
  .nav-item svg { flex-shrink: 0; width: 18px; height: 18px; }
  .nav-item .badge {
    margin-left: auto;
    font-size: 10px;
    background: var(--brand);
    color: var(--ink-on-brand);
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 700;
  }
  .nav-item.active .badge { background: var(--brand); color: var(--ink-on-brand); }

  .sidebar-footer {
    margin-top: auto;
    padding: 14px;
    background: linear-gradient(140deg, var(--brand-tint), transparent);
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  .sidebar-footer .label { font-size: 11px; color: var(--ink-mute); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
  .sidebar-footer .title { font-size: 14px; font-weight: 700; margin-top: 4px; line-height: 1.3; }
  .sidebar-footer .desc { font-size: 12px; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; }
  .sidebar-footer .cta {
    margin-top: 10px;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  body.dark .sidebar-footer .cta { background: var(--brand); color: var(--ink-on-brand); }

  /* ---------- MAIN ---------- */
  .main {
    padding: 22px 32px 60px;
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
  }
  @media (max-width: 720px) { .main { padding: 18px 16px 100px; } }

  .topbar {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 24px;
  }
  .search {
    flex: 1;
    max-width: 480px;
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    padding: 10px 14px;
    border-radius: 12px;
    transition: border-color 160ms ease, background 200ms ease;
  }
  .search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255,203,8,0.15); }
  .search input {
    border: none; background: none; outline: none;
    flex: 1; font-size: 14px; color: var(--ink); font-family: inherit;
  }
  .search input::placeholder { color: var(--ink-mute); }
  .search .kbd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 2px 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink-mute);
  }
  .topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .icon-btn {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    position: relative;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  }
  .icon-btn:hover { background: var(--brand-tint); color: var(--ink); }
  .icon-btn .dot {
    position: absolute; top: 8px; right: 8px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--brand);
    border: 2px solid var(--bg-elev);
  }
  .user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
  }
  .user-chip .av {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: var(--ink-on-brand);
    font-weight: 800;
    font-size: 13px;
    display: grid; place-items: center;
  }
  .user-chip .name { font-size: 13px; font-weight: 600; }

  /* ---------- HERO ---------- */
  .hero {
    background: linear-gradient(135deg, var(--ink) 0%, #1a1d24 100%);
    color: #fff;
    border-radius: 24px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
  }
  body.dark .hero { background: linear-gradient(135deg, #1f242c 0%, #14171d 100%); border: 1px solid var(--line); }
  .hero::before {
    content: "";
    position: absolute;
    inset: -50% -10% auto auto;
    width: 60%; height: 200%;
    background: radial-gradient(closest-side, rgba(255,203,8,0.22), transparent 70%);
    pointer-events: none;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
  }
  .hero-grid > * { min-width: 0; }
  @media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; gap: 18px; } .hero { padding: 22px; } }
  .hero-greet { font-size: 13px; color: rgba(255,255,255,0.65); font-weight: 500; }
  .hero-name {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 4px 0 14px;
    line-height: 1.15;
  }
  .hero-name span { color: var(--brand); }
  .hero-stats {
    display: flex; gap: 18px; flex-wrap: wrap;
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,0.10);
    border-bottom: 1px solid rgba(255,255,255,0.10);
    margin: 6px 0 16px;
  }
  .hero-stat { display: flex; flex-direction: column; gap: 4px; }
  .hero-stat .k { font-size: 11px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
  .hero-stat .v { font-size: 16px; font-weight: 700; }
  .hero-stat .v .unit { font-size: 12px; color: rgba(255,255,255,0.55); margin-left: 2px; font-weight: 500; }
  .hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .btn-pri {
    background: var(--brand); color: var(--ink-on-brand);
    padding: 12px 18px; border-radius: 12px;
    font-weight: 700; font-size: 14px;
    display: inline-flex; align-items: center; gap: 8px;
    transition: transform 120ms ease, box-shadow 160ms ease;
  }
  .btn-pri:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(255,203,8,0.5); }
  .btn-ghost-dark {
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600; font-size: 14px;
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid rgba(255,255,255,0.10);
    transition: background 160ms ease;
  }
  .btn-ghost-dark:hover { background: rgba(255,255,255,0.14); }

  /* invoice card inside hero */
  .due-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    padding: 18px;
    backdrop-filter: blur(8px);
    display: flex; flex-direction: column;
    gap: 12px;
  }
  .due-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
  .due-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); font-weight: 700; }
  .due-amount { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-top: 2px; }
  .due-amount .cur { font-size: 18px; color: rgba(255,255,255,0.55); margin-left: 4px; font-weight: 600; vertical-align: top; }
  .due-meta { font-size: 12px; color: rgba(255,255,255,0.65); display: flex; gap: 14px; flex-wrap: wrap; }
  .due-meta .pill { background: rgba(255,255,255,0.10); padding: 4px 10px; border-radius: 999px; font-weight: 500; }
  .due-meta .pill.warn { background: rgba(255,203,8,0.22); color: var(--brand); }
  .due-cta-row { display: flex; gap: 8px; }
  .due-cta { flex: 1; }

  /* ---------- GRID SECTIONS ---------- */
  .section-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin: 28px 0 14px;
  }
  .section-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
  .section-sub { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
  .section-link { font-size: 13px; color: var(--ink-soft); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
  .section-link:hover { color: var(--ink); }

  .row-cards { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
  .row-cards > * { min-width: 0; }
  @media (max-width: 960px) { .row-cards { grid-template-columns: 1fr; } }

  .panel {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    transition: background 200ms ease, border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  }
  .panel:hover { box-shadow: var(--shadow-md); }

  /* Connection panel */
  .conn-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
  .conn-status {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    background: var(--positive-soft);
    color: var(--positive);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
  }
  .conn-status .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--positive);
    box-shadow: 0 0 0 0 rgba(22,163,74,0.6);
    animation: pulse 2s infinite;
  }
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.5); }
    70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
    100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
  }
  .conn-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
  .conn-sub { font-size: 12px; color: var(--ink-mute); }

  .speed-block { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
  .speed-cell {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    display: flex; flex-direction: column; gap: 6px;
    position: relative;
    overflow: hidden;
  }
  .speed-cell::before {
    content: "";
    position: absolute;
    inset: auto -10% -50% auto;
    width: 60%; height: 100%;
    background: radial-gradient(closest-side, var(--brand-tint), transparent 70%);
    pointer-events: none;
  }
  .speed-cell .label { font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; display: flex; align-items: center; gap: 6px; }
  .speed-cell .val { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
  .speed-cell .val .unit { font-size: 12px; color: var(--ink-mute); margin-left: 4px; font-weight: 500; }
  .speed-bar { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 4px; }
  .speed-bar > div { height: 100%; background: var(--brand); border-radius: 999px; transition: width 600ms ease; }

  .usage-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
  .usage-title { font-size: 13px; font-weight: 600; }
  .usage-num { font-size: 13px; color: var(--ink-mute); }
  .usage-num b { color: var(--ink); font-weight: 700; }
  .usage-track { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
  .usage-track > div {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--brand-deep));
    border-radius: 999px;
    transition: width 800ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Quick actions */
  .actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .action {
    display: flex; align-items: center; gap: 12px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
    text-align: left;
    width: 100%;
  }
  .action:hover { border-color: var(--brand); background: var(--brand-tint); transform: translateY(-1px); }
  .action .ic {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    display: grid; place-items: center;
    color: var(--ink);
    flex-shrink: 0;
    transition: background 160ms ease, color 160ms ease;
  }
  .action:hover .ic { background: var(--brand); color: var(--ink-on-brand); border-color: transparent; }
  .action .lab { font-size: 13px; font-weight: 600; line-height: 1.2; }
  .action .sub { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }

  /* Invoice table */
  .table-wrap { overflow-x: auto; }
  table.inv {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  table.inv th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-mute);
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
  }
  table.inv td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
  }
  table.inv tr:last-child td { border-bottom: none; }
  table.inv tr:hover td { background: var(--brand-tint); }
  .inv-no { font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
  .inv-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
  .status-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
  }
  .status-tag.open { background: var(--danger-soft); color: var(--danger); }
  .status-tag.paid { background: var(--positive-soft); color: var(--positive); }
  .status-tag.due { background: var(--brand-tint); color: var(--brand-deep); }
  body.dark .status-tag.due { color: var(--brand); }
  .row-act-btn {
    background: var(--bg);
    border: 1px solid var(--line);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    transition: all 160ms ease;
  }
  .row-act-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
  .row-act-btn.pri { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); }
  .row-act-btn.pri:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--ink-on-brand); }

  /* Tickets */
  .ticket {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 14px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    transition: border-color 160ms ease;
  }
  .ticket + .ticket { margin-top: 8px; }
  .ticket:hover { border-color: var(--brand); }
  .ticket .ic {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    display: grid; place-items: center;
    flex-shrink: 0;
  }
  .ticket .body { flex: 1; min-width: 0; }
  .ticket .title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .ticket .t { font-size: 13px; font-weight: 600; }
  .ticket .id { font-size: 11px; color: var(--ink-mute); font-family: 'JetBrains Mono', monospace; }
  .ticket .desc { font-size: 12px; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ticket .meta { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
  .ticket .meta .time { font-size: 11px; color: var(--ink-mute); }
  .priority {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .priority.low { background: var(--info-soft); color: var(--info); }
  .priority.med { background: var(--brand-tint); color: var(--brand-deep); }
  body.dark .priority.med { color: var(--brand); }
  .priority.hi { background: var(--danger-soft); color: var(--danger); }

  /* Usage chart */
  .chart-wrap { height: 180px; margin-top: 8px; position: relative; }
  .chart-legend { display: flex; gap: 16px; margin-top: 12px; }
  .chart-legend .leg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
  .chart-legend .leg .swatch { width: 10px; height: 10px; border-radius: 3px; }

  /* Tips card */
  .tip {
    background: linear-gradient(135deg, var(--brand-tint) 0%, transparent 80%);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    display: flex; gap: 16px; align-items: center;
  }
  body.dark .tip { background: linear-gradient(135deg, rgba(255,203,8,0.10) 0%, transparent 80%); }
  .tip .illust {
    width: 80px; height: 80px;
    flex-shrink: 0;
    border-radius: 16px;
    background: var(--brand);
    display: grid; place-items: center;
    color: var(--ink-on-brand);
  }
  .tip .body { flex: 1; }
  .tip .lab { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-mute); font-weight: 700; }
  .tip h3 { font-size: 16px; font-weight: 700; margin: 4px 0; letter-spacing: -0.01em; }
  .tip p { font-size: 13px; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.45; }
  .tip-cta { font-size: 13px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 4px; }
  .tip-cta:hover { color: var(--brand-deep); }

  /* Mobile nav */
  .mob-top {
    display: none;
    padding: 14px 16px;
    align-items: center;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
  }
  .mob-top .brand-wordmark { font-size: 18px; }
  .mob-top .icon-btn { width: 36px; height: 36px; margin-left: auto; }
  .mob-bottom {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg-elev);
    border-top: 1px solid var(--line);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0));
    justify-content: space-around;
    z-index: 50;
  }
  .mob-bottom .item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 6px 10px;
    font-size: 10px;
    color: var(--ink-mute);
    font-weight: 600;
    border-radius: 10px;
    min-width: 56px;
  }
  .mob-bottom .item.active { color: var(--ink); }
  .mob-bottom .item.active .dot-ind { background: var(--brand); }
  .mob-bottom .dot-ind { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
  .mob-bottom .fab {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--brand);
    color: var(--ink-on-brand);
    margin-top: -22px;
    display: grid; place-items: center;
    box-shadow: 0 12px 24px -8px rgba(255,203,8,0.5);
  }
  @media (max-width: 960px) {
    .mob-top { display: flex; }
    .mob-bottom { display: flex; }
    .app { grid-template-columns: 1fr; }
    .main { padding-bottom: 100px; }
    .hero { padding: 22px; }
    .hero-name { font-size: 24px; }
    .due-amount { font-size: 32px; }
  }

  /* Enter animations */
  @keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .rise { animation: rise 460ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .rise.d1 { animation-delay: 60ms; }
  .rise.d2 { animation-delay: 120ms; }
  .rise.d3 { animation-delay: 180ms; }
  .rise.d4 { animation-delay: 240ms; }
  .rise.d5 { animation-delay: 300ms; }



/* ===== PAGE-LEVEL EXTENSIONS ===== */
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.page-head .left { display:flex; flex-direction:column; gap:6px; min-width:0; }
.page-head .crumb { font-size:12px; color:var(--ink-mute); font-weight:500; display:flex; align-items:center; gap:6px; }
.page-head h1 { font-size:28px; font-weight:800; letter-spacing:-0.02em; margin:0; line-height:1.15; }
.page-head .sub { font-size:13px; color:var(--ink-soft); margin-top:2px; }
.page-head .right { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
@media (max-width: 600px) { .page-head h1 { font-size:22px; } }

.btn { display:inline-flex; align-items:center; gap:8px; padding:10px 16px; border-radius:12px; font-weight:600; font-size:13px; cursor:pointer; transition:all 160ms ease; border:1px solid var(--line); background:var(--bg-elev); color:var(--ink); }
.btn:hover { border-color: var(--brand); }
.btn.pri { background: var(--brand); color: var(--ink-on-brand); border-color: var(--brand); }
.btn.pri:hover { background: var(--brand-deep); border-color: var(--brand-deep); transform:translateY(-1px); box-shadow:0 8px 20px -10px rgba(255,203,8,0.5); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { background: #000; }
.btn.ghost { background: transparent; }

/* Form fields */
.field { display:flex; flex-direction:column; gap:6px; }
.field label { font-size:12px; font-weight:600; color:var(--ink-soft); }
.field .req { color: var(--danger); margin-left:2px; }
.field .hint { font-size:11px; color:var(--ink-mute); }
.input, .select, .textarea {
  width:100%; padding:11px 14px; border-radius:12px;
  background: var(--bg); border:1px solid var(--line);
  color: var(--ink); font: inherit; font-size:14px;
  outline: none; transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255,203,8,0.15); background: var(--bg-elev); }
.input::placeholder { color: var(--ink-mute); }
.input.with-ic { padding-left: 40px; }
.input-wrap { position: relative; }
.input-wrap > svg { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--ink-mute); pointer-events:none; }
.textarea { min-height: 100px; resize: vertical; font-family: inherit; }
.form-grid { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* Stat tiles */
.stat-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap:12px; }
.stat {
  background: var(--bg-panel); border:1px solid var(--line); border-radius:14px;
  padding:16px; display:flex; flex-direction:column; gap:8px;
  transition: border-color 160ms ease;
}
.stat:hover { border-color: var(--brand); }
.stat .lab { font-size:11px; color:var(--ink-mute); text-transform:uppercase; letter-spacing:0.06em; font-weight:700; display:flex; align-items:center; gap:6px; }
.stat .val { font-size:24px; font-weight:800; letter-spacing:-0.02em; }
.stat .delta { font-size:11px; color: var(--ink-mute); }
.stat .delta.up { color: var(--positive); }
.stat .delta.down { color: var(--danger); }
.stat .ic { width:32px; height:32px; border-radius:9px; background:var(--brand-tint); color:var(--brand-deep); display:grid; place-items:center; margin-left:auto; }
body.dark .stat .ic { color: var(--brand); }

/* Tabs */
.tabs { display:flex; gap:4px; padding:4px; background:var(--bg-elev); border:1px solid var(--line); border-radius:12px; align-self:flex-start; flex-wrap:wrap; }
.tab { padding:8px 14px; border-radius:9px; font-size:13px; font-weight:600; color:var(--ink-soft); cursor:pointer; transition:all 160ms ease; white-space:nowrap; }
.tab:hover { color:var(--ink); }
.tab.active { background: var(--ink); color:#fff; }
body.dark .tab.active { background: var(--brand); color: var(--ink-on-brand); }

/* Auth (login) layout */
.auth { min-height:100vh; display:grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } }
.auth-form-wrap { display:flex; align-items:center; justify-content:center; padding:40px 24px; }
.auth-form { width:100%; max-width:420px; display:flex; flex-direction:column; gap:18px; }
.auth-form .brand-wordmark { font-size:32px; }
.auth-form h2 { font-size:30px; font-weight:800; letter-spacing:-0.02em; margin:0; line-height:1.15; }
.auth-form .lead { font-size:14px; color:var(--ink-soft); }
.auth-illust {
  background: linear-gradient(135deg, var(--ink) 0%, #1a1d24 100%);
  color: #fff;
  position: relative; overflow: hidden;
  padding: 48px; display:flex; flex-direction:column; justify-content:space-between;
}
.auth-illust::before { content:""; position:absolute; inset:auto -20% -40% auto; width:80%; height:80%; background: radial-gradient(closest-side, rgba(255,203,8,0.30), transparent 70%); }
.auth-illust .quote { font-size:24px; font-weight:700; letter-spacing:-0.01em; line-height:1.3; position:relative; z-index:1; max-width:520px; }
.auth-illust .quote span { color: var(--brand); }
.auth-illust .features { display:flex; flex-direction:column; gap:14px; position:relative; z-index:1; }
.auth-illust .feat { display:flex; gap:14px; align-items:flex-start; }
.auth-illust .feat .feat-ic { width:42px; height:42px; border-radius:12px; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.1); display:grid; place-items:center; color:var(--brand); flex-shrink:0; }
.auth-illust .feat .feat-t { font-size:14px; font-weight:700; }
.auth-illust .feat .feat-d { font-size:12px; color:rgba(255,255,255,0.65); margin-top:2px; line-height:1.4; }

/* Empty state */
.empty {
  padding: 40px 20px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:10px;
}
.empty .empty-ic { width:64px; height:64px; border-radius:18px; background:var(--brand-tint); color:var(--brand-deep); display:grid; place-items:center; }
body.dark .empty .empty-ic { color: var(--brand); }
.empty h4 { font-size:16px; font-weight:700; margin:0; }
.empty p { font-size:13px; color:var(--ink-mute); max-width:340px; margin:0; }

/* Service/tariff card */
.tariff-card {
  background: var(--bg-panel); border:1px solid var(--line); border-radius:20px;
  padding: 24px; position: relative; overflow:hidden;
}
.tariff-card .pkg-row { display:flex; align-items:center; gap:14px; }
.tariff-card .pkg-logo { width:56px; height:56px; border-radius:16px; background:var(--brand); color:var(--ink-on-brand); display:grid; place-items:center; }
.tariff-card .pkg-name { font-size:22px; font-weight:800; letter-spacing:-0.01em; }
.tariff-card .pkg-sub { font-size:13px; color:var(--ink-mute); margin-top:2px; }
.tariff-card .feature-list { display:grid; grid-template-columns: 1fr 1fr; gap:10px 24px; margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
@media (max-width: 600px) { .tariff-card .feature-list { grid-template-columns: 1fr; } }
.tariff-card .feat { display:flex; align-items:flex-start; gap:10px; font-size:13px; }
.tariff-card .feat-ic-sm { width:22px; height:22px; border-radius:7px; background:var(--positive-soft); color:var(--positive); display:grid; place-items:center; flex-shrink:0; margin-top:1px; }

/* Speedometer / gauge */
.gauge { display:flex; flex-direction:column; align-items:center; gap:12px; }
.gauge svg { display:block; }

/* Big number readout */
.bignum { font-size:64px; font-weight:800; letter-spacing:-0.03em; line-height:1; font-variant-numeric: tabular-nums; }
.bignum .unit { font-size:18px; color: var(--ink-mute); margin-left:6px; font-weight:600; vertical-align:top; }
@media (max-width: 600px) { .bignum { font-size:48px; } }

/* Address / search input large */
.search-lg {
  display:flex; align-items:center; gap:12px;
  background: var(--bg-elev); border:1px solid var(--line);
  padding: 16px 20px; border-radius: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.search-lg:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255,203,8,0.15); }
.search-lg input { flex:1; border:none; background:none; outline:none; font: inherit; font-size:16px; color:var(--ink); }
.search-lg input::placeholder { color: var(--ink-mute); }

/* Drop zone */
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: 20px;
  padding: 40px 24px; text-align:center;
  background: var(--bg-elev);
  display:flex; flex-direction:column; align-items:center; gap:10px;
  cursor: pointer; transition: all 200ms ease;
}
.dropzone:hover { border-color: var(--brand); background: var(--brand-tint); }
.dropzone .dz-ic { width:56px; height:56px; border-radius:16px; background:var(--brand-tint); color:var(--brand-deep); display:grid; place-items:center; }
body.dark .dropzone .dz-ic { color: var(--brand); }
.dropzone h4 { font-size:16px; font-weight:700; margin:6px 0 0; }
.dropzone p { font-size:13px; color:var(--ink-mute); max-width:380px; margin:0; }

/* File item */
.file-row {
  display:flex; align-items:center; gap:12px;
  padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--bg);
}
.file-row .f-ic { width:36px; height:36px; border-radius:10px; background:var(--bg-elev); border:1px solid var(--line); display:grid; place-items:center; flex-shrink:0; color:var(--ink-soft); }
.file-row .f-name { font-size:13px; font-weight:600; }
.file-row .f-meta { font-size:11px; color:var(--ink-mute); }
.file-row .f-act { margin-left:auto; display:flex; gap:6px; }

/* Chat / ticket thread */
.thread { display:flex; flex-direction:column; gap:14px; }
.msg { display:flex; gap:10px; align-items:flex-start; }
.msg.me { flex-direction: row-reverse; }
.msg .av-sm { width:30px; height:30px; border-radius:50%; background:var(--bg); border:1px solid var(--line); display:grid; place-items:center; font-size:11px; font-weight:700; color:var(--ink-soft); flex-shrink:0; }
.msg.me .av-sm { background:var(--brand); color:var(--ink-on-brand); border-color:transparent; }
.msg .bubble { max-width:70%; padding:10px 14px; border-radius:14px; background:var(--bg); border:1px solid var(--line); font-size:13px; line-height:1.5; }
.msg.me .bubble { background: var(--ink); color:#fff; border-color:transparent; border-bottom-right-radius:4px; }
.msg:not(.me) .bubble { border-bottom-left-radius:4px; }
body.dark .msg.me .bubble { background: var(--brand); color: var(--ink-on-brand); }
.msg .meta { font-size:10px; color:var(--ink-mute); margin-top:4px; }

/* Misc */
.kv-list { display:flex; flex-direction:column; }
.kv-list .kv { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid var(--line); gap:14px; }
.kv-list .kv:last-child { border-bottom:none; }
.kv-list .kv .k { font-size:12px; color:var(--ink-mute); font-weight:500; }
.kv-list .kv .v { font-size:13px; font-weight:600; text-align:right; }
.kv-list .kv .v.mono { font-family:'JetBrains Mono',monospace; font-size:12px; }

.tag { display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:600; background:var(--bg); border:1px solid var(--line); }


/* Responsive 2-column splits (so inline columns don't break mobile) */
.split { display: grid; gap: 16px; }
.split > * { min-width: 0; }
.split-aside     { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); }
.split-aside-sm  { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
.split-aside-l   { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.split-aside-xl  { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.split-side-left { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
@media (max-width: 960px) {
  .split-aside, .split-aside-sm, .split-aside-l, .split-aside-xl, .split-side-left {
    grid-template-columns: 1fr !important;
  }
}


/* Mobile topbar fixes */
@media (max-width: 720px) {
  .topbar { gap: 8px; }
  .topbar .search { max-width: none; padding: 9px 12px; font-size: 13px; }
  .topbar .search .kbd { display: none; }
  .topbar-actions { gap: 6px; }
  .user-chip .name { display: none; }
  .user-chip { padding: 4px; }
}
@media (max-width: 480px) {
  .topbar .search { display: none; }
  .topbar-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
}


/* Mobile dashboard fixes */
@media (max-width: 720px) {
  /* Tables: prevent cells from crushing; let wrap scroll horizontally */
  table.inv th, table.inv td { white-space: nowrap; padding: 12px 8px; }
  table.inv td:first-child, table.inv th:first-child { padding-left: 4px; }
  .inv-no { font-size: 11px; }

  /* Ticket card: stack title + id; smaller text */
  .ticket .title-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .ticket .id { font-size: 10px; }
  .ticket .desc { white-space: normal; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

  /* Hero: tighter */
  .hero-grid { gap: 14px; }
  .hero-stats { gap: 12px; padding: 12px 0; margin: 4px 0 12px; }
  .hero-stat .v { font-size: 14px; }

  /* Stat tiles: smaller numbers */
  .stat .val { font-size: 20px; }

  /* Quick actions: stay 2-col but allow wrap on mid */
  .actions-grid { gap: 8px; }
  .action { padding: 12px; }
  .action .ic { width: 34px; height: 34px; }

  /* Speed cells smaller */
  .speed-cell .val { font-size: 22px; }

  /* Section heads tighter */
  .section-head { margin: 18px 0 10px; }

  /* Page head: stack action buttons under heading */
  .page-head .right { width: 100%; }
}

/* Prevent overflow at any width */
.panel { max-width: 100%; }
.table-wrap { -webkit-overflow-scrolling: touch; }
