/* ================================================================
   Emprendedores USA · Finance — design system
   Mobile-first, light/dark, no external fonts or frameworks.
   ================================================================ */
:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --card-2: #f7f9fc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #4f46e5;
  --primary-2: #4338ca;
  --primary-soft: rgba(79, 70, 229, 0.1);
  --income: #059669;
  --income-soft: rgba(5, 150, 105, 0.11);
  --expense: #e11d48;
  --expense-soft: rgba(225, 29, 72, 0.1);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.12);
  --info: #2563eb;
  --chip: #edf0f7;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
  --radius: 14px;
  --radius-s: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e14;
    --card: #131822;
    --card-2: #19202e;
    --ink: #eef2f8;
    --muted: #8b95a7;
    --line: rgba(255, 255, 255, 0.08);
    --primary: #818cf8;
    --primary-2: #6366f1;
    --primary-soft: rgba(129, 140, 248, 0.14);
    --income: #34d399;
    --income-soft: rgba(52, 211, 153, 0.13);
    --expense: #fb7185;
    --expense-soft: rgba(251, 113, 133, 0.13);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.14);
    --info: #93c5fd;
    --chip: #1b2230;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.22);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- boot splash ---------- */
.boot-splash { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.boot-logo { width: 64px; height: 64px; border-radius: 16px; background: var(--primary); color: #fff; font-size: 34px; font-weight: 800; display: grid; place-items: center; }
.boot-name { font-weight: 800; font-size: 20px; }
.boot-sub { color: var(--muted); font-size: 13px; }

/* ---------- app shell ---------- */
.shell { min-height: 100dvh; }
.content { max-width: 1160px; margin: 0 auto; padding: 16px 14px 96px; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .content { padding: 28px 34px 48px; }
}

/* sidebar (desktop) */
.sidebar { display: none; }
@media (min-width: 900px) {
  .sidebar {
    display: flex; flex-direction: column; gap: 3px;
    position: sticky; top: 0; height: 100dvh;
    padding: 20px 14px; border-right: 1px solid var(--line);
    background: var(--card);
  }
  .side-brand { display: flex; gap: 11px; align-items: center; padding: 4px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
  .side-brand > div:last-child { min-width: 0; }
  .side-brand .logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 800; font-size: 18px; display: grid; place-items: center; flex: none; box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent); }
  .side-brand b { font-size: 14px; line-height: 1.25; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
  .side-brand span { font-size: 11.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-s);
    color: var(--muted); font-weight: 600; font-size: 13.5px;
    cursor: pointer; border: none; background: none; text-align: left; width: 100%;
    transition: background 0.12s, color 0.12s;
  }
  .nav-item:hover { background: var(--card-2); color: var(--ink); }
  .nav-item.active { background: var(--primary-soft); color: var(--primary); }
  .nav-item .count { margin-left: auto; }
  .side-foot { margin-top: auto; padding: 12px 8px 2px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
  .side-foot .who { flex: 1; min-width: 0; }
  .side-foot .who b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-foot .who span { font-size: 11.5px; color: var(--muted); }
}

/* mobile top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .topbar { display: none; } }
.topbar .logo { width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 16px; }
.topbar b { font-size: 15px; }
.topbar span { display: block; font-size: 10.5px; color: var(--muted); }
.topbar .spacer { flex: 1; }

/* bottom nav (mobile) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .bottom-nav { display: none; } }
.bnav-item { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding: 4px 0 0; border: none; background: none; color: var(--muted); font-size: 10.5px; font-weight: 600; cursor: pointer; position: relative; line-height: 1; }
.bnav-item.active { color: var(--primary); }
.bnav-item .fab { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; display: grid; place-items: center; margin-top: -18px; margin-bottom: 1px; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 42%, transparent); }
.bnav-item .count { position: absolute; top: 0; right: calc(50% - 20px); }

/* ---------- generic bits ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card + .card,
.card + .grid,
.grid + .card,
.grid + .grid,
.stats + .card,
.stats + .grid,
.stats + .banner,
.banner + .card,
.banner + .grid { margin-top: 16px; }
.grid > .card,
.grid > .card + .card { margin-top: 0; height: 100%; display: flex; flex-direction: column; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; margin-bottom: 14px; letter-spacing: -0.01em; }
.card-title .right { margin-left: auto; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 12px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin: 0 0 18px; flex-wrap: wrap; }
.page-head .title-group { min-width: 0; }
.page-head h1 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.page-head .sub { color: var(--muted); font-size: 13px; display: block; margin-top: 3px; }
.page-head .head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (min-width: 900px) { .page-head h1 { font-size: 25px; } }
.dash-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.dash-stack { display: flex; flex-direction: column; gap: 16px; }
.dash-stack > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.desktop-only { display: none; }
@media (min-width: 900px) { .desktop-only { display: inline-flex; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: var(--radius-s); border: 1px solid var(--line);
  background: var(--card); color: var(--ink);
  font-weight: 600; font-size: 14px; padding: 9px 14px; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
  text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--card-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-2); }
.btn.danger { color: var(--expense); border-color: color-mix(in srgb, var(--expense) 35%, var(--line)); }
.btn.danger:hover { background: var(--expense-soft); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--chip); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 8px; }
.btn.big { padding: 13px 18px; font-size: 15.5px; width: 100%; }

.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--card); outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.textarea { min-height: 76px; resize: vertical; }
.select { appearance: auto; }
.field { margin-bottom: 13px; }
.field > label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.03em; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.grid { display: grid; gap: 16px; align-items: stretch; }
@media (min-width: 720px) { .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.side { grid-template-columns: 2fr 1fr; } }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }

/* segmented control & range picker */
.seg { display: inline-flex; align-items: center; background: var(--chip); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; height: 38px; }
.seg button { border: none; background: none; height: 30px; padding: 0 13px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; transition: background 0.12s, color 0.12s; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.14); }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }
.seg .inc.active { color: var(--income); }
.seg .exp.active { color: var(--expense); }

.range-picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-toolbar .range-picker { margin-bottom: 0; }
.range-picker .select,
.range-picker .input { height: 38px; padding: 0 12px; font-size: 13.5px; font-weight: 600; width: auto; }

/* badges & chips */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 2.5px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.badge.income { background: var(--income-soft); color: var(--income); }
.badge.expense { background: var(--expense-soft); color: var(--expense); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--primary-soft); color: var(--primary); }
.badge.count { background: var(--warn-soft); color: var(--warn); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.chip.sm { padding: 4px 10px; font-size: 12px; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 780px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } .stats .wide { grid-column: span 2; } }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between; min-height: 112px;
  transition: border-color 0.14s, transform 0.14s;
}
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); transform: translateY(-1px); }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .k { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--chip); color: var(--muted); display: grid; place-items: center; flex: none; }
.stat.pos .stat-icon, .stat.income .stat-icon { background: var(--income-soft); color: var(--income); }
.stat.neg .stat-icon, .stat.expense .stat-icon { background: var(--expense-soft); color: var(--expense); }
.stat.warn .stat-icon { background: var(--warn-soft); color: var(--warn); }
.stat .v { font-size: 24px; font-weight: 800; margin-top: 8px; letter-spacing: -0.025em; line-height: 1.15; }
@media (min-width: 780px) { .stat .v { font-size: 27px; } }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.pos .v { color: var(--income); }
.stat.neg .v { color: var(--expense); }
.stat.warn .v { color: var(--warn); }

/* chart empty & legend */
.chart-wrap { position: relative; }
.chart-empty-pill {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted);
  font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  pointer-events: none; white-space: nowrap;
}
.legend-inline { display: inline-flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: middle; }
.cat-empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 28px 12px; color: var(--muted); font-size: 13px; border: 1px dashed var(--line); border-radius: var(--radius-s); background: color-mix(in srgb, var(--card-2) 55%, transparent); }

/* transaction rows */
.txn-list { display: flex; flex-direction: column; }
.txn {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
  padding: 11px 4px; border-bottom: 1px solid var(--line); align-items: center;
}
.txn:last-child { border-bottom: none; }
.txn .vendor { font-weight: 650; font-size: 14.5px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; min-width: 0; }
.txn .vendor .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.txn .meta { font-size: 12.5px; color: var(--muted); grid-column: 1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.txn .amount { text-align: right; font-weight: 750; font-size: 15px; }
.txn .amount.income { color: var(--income); }
.txn .amount.expense { color: var(--expense); }
.txn .amount .cur { font-size: 11px; color: var(--muted); font-weight: 600; }
.txn .actions { grid-column: 2; grid-row: 1; display: none; gap: 2px; }
.txn:hover .actions { display: flex; }
.txn .actions button { border: none; background: none; color: var(--muted); cursor: pointer; padding: 5px; border-radius: 7px; }
.txn .actions button:hover { background: var(--chip); color: var(--ink); }
@media (min-width: 720px) {
  .txn { grid-template-columns: 92px 1fr 150px 110px 90px; }
  .txn .date { grid-column: 1; grid-row: 1; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .txn .vendor { grid-column: 2; grid-row: 1; }
  .txn .cat { grid-column: 3; grid-row: 1; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .txn .meta { grid-column: 2; grid-row: 2; }
  .txn .amount { grid-column: 4; grid-row: 1; }
  .txn .actions { grid-column: 5; grid-row: 1; display: flex; justify-content: flex-end; }
}
.txn-link-att { font-size: 11px; color: var(--info); }

/* category bars */
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar-row .t { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 4px; gap: 8px; }
.hbar-row .t .n { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-row .t .a { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar { height: 7px; border-radius: 99px; background: var(--chip); overflow: hidden; }
.hbar > div { height: 100%; border-radius: 99px; }
.hbar.income > div { background: var(--income); }
.hbar.expense > div { background: var(--expense); }

/* modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(10, 12, 18, 0.55); z-index: 90; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 640px) { .modal-overlay { align-items: center; padding: 20px; } }
.modal { background: var(--card); border-radius: 18px 18px 0 0; width: 100%; max-width: 620px; max-height: 92dvh; overflow-y: auto; padding: 18px; animation: slide-up 0.18s ease-out; }
@media (min-width: 640px) { .modal { border-radius: var(--radius); animation: pop 0.16s ease-out; } }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-head h3 { font-size: 17px; }
.modal-head .x { margin-left: auto; }
@keyframes slide-up { from { transform: translateY(30px); opacity: 0.6; } }
@keyframes pop { from { transform: scale(0.97); opacity: 0.6; } }

/* toasts */
.toast-host { position: fixed; bottom: calc(74px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
@media (min-width: 900px) { .toast-host { bottom: 24px; } }
.toast { background: var(--ink); color: var(--bg); padding: 11px 15px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,0.35); animation: pop 0.15s ease-out; display: flex; gap: 8px; align-items: center; }
.toast.err { background: var(--expense); color: #fff; }
.toast.ok { background: var(--income); color: #fff; }

/* misc */
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--chip); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 6px; }
.errbox { background: var(--expense-soft); color: var(--expense); border-radius: var(--radius-s); padding: 10px 13px; font-size: 13.5px; font-weight: 600; margin: 10px 0; }
.okbox { background: var(--income-soft); color: var(--income); border-radius: var(--radius-s); padding: 10px 13px; font-size: 13.5px; font-weight: 600; margin: 10px 0; }
.warnbox { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-s); padding: 10px 13px; font-size: 13.5px; font-weight: 600; margin: 10px 0; }

.amount-input-wrap { position: relative; }
.amount-input-wrap .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); font-size: 19px; }
.amount-input { font-size: 24px; font-weight: 800; padding: 12px 12px 12px 38px; font-variant-numeric: tabular-nums; }

/* login */
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 18px; background: radial-gradient(1200px 600px at 20% -10%, color-mix(in srgb, var(--primary) 16%, var(--bg)), var(--bg)); }
.login-card { width: 100%; max-width: 390px; }
.login-brand { text-align: center; margin-bottom: 18px; }
.login-brand .logo { width: 62px; height: 62px; border-radius: 16px; background: var(--primary); color: #fff; font-size: 30px; font-weight: 800; display: grid; place-items: center; margin: 0 auto 10px; }

/* wizard / steps */
.stepper { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 6px 11px; border-radius: 999px; background: var(--chip); }
.step.active { background: var(--primary-soft); color: var(--primary); }
.step.done { background: var(--income-soft); color: var(--income); }

.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 34px 16px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color 0.15s; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.dropzone .big { font-size: 30px; margin-bottom: 4px; }

table.plain { width: 100%; border-collapse: collapse; font-size: 13px; }
table.plain th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.plain td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain tr:last-child td { border-bottom: none; }
table.plain .r { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }

.pl-section { margin-top: 16px; }
.pl-section h3 { font-size: 15px; margin-bottom: 8px; display: flex; justify-content: space-between; }
.pl-row { display: flex; justify-content: space-between; padding: 6.5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; gap: 10px; }
.pl-row .amt { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.pl-total { display: flex; justify-content: space-between; padding: 9px 0 0; font-weight: 800; font-size: 15px; }
.pl-net { display: flex; justify-content: space-between; padding: 13px 0 0; margin-top: 8px; border-top: 2px solid var(--ink); font-weight: 800; font-size: 19px; }

.kbd { font-family: var(--mono); font-size: 12px; background: var(--chip); padding: 2px 7px; border-radius: 6px; }
.mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--primary); flex: none; }

.ai-answer { white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.chat-list { display: flex; flex-direction: column; gap: 12px; }
.chat-q { font-weight: 700; font-size: 14px; color: var(--primary); display: flex; gap: 8px; align-items: center; }
.chat-card { background: var(--card-2); border-radius: var(--radius-s); padding: 12px 14px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; padding-bottom: 0; }
.tabs button { border: none; background: none; padding: 9px 13px; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

.kw-edit { font-size: 12.5px; }
.att-preview { max-width: 100%; max-height: 340px; border-radius: var(--radius-s); border: 1px solid var(--line); }
.banner { display: flex; gap: 9px; align-items: center; padding: 10px 14px; border-radius: var(--radius-s); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
