/* FinTrack design system — tokens lifted from the FinTrack.dc.html mockup. */
:root {
  --bg: #F6F7F9;
  --ink: #16181D;
  --muted: #5A626E;
  --muted2: #8A929E;
  --muted3: #9AA1AC;
  --line: #E9EBF0;
  --line2: #E1E4EA;
  --line3: #F2F3F6;
  --card: #fff;
  --indigo: #4F46E5;
  --indigo-hover: #4338CA;
  --indigo-soft: #EEF0FE;
  --indigo-soft2: #F4F5FE;
  --indigo-border: #E2E2FB;
  --green: #0E7C53;
  --green-soft: #E7F4EE;
  --red: #B23B30;
  --amber: #9A6A12;
  --amber-soft: #FBF1DC;
  --radius-card: 16px;
  --radius-input: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Geist, system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
::selection { background: #dfe0fb; }
input::placeholder { color: #B6BCC6; }
*::-webkit-scrollbar { height: 9px; width: 9px; }
*::-webkit-scrollbar-thumb { background: #D8DCE3; border-radius: 9px; }

.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.muted { color: var(--muted); }
.muted2 { color: var(--muted2); }
a { color: inherit; }

/* layout */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
header.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid #EAECEF;
}
.topbar .row { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em; padding: 16px 0; }
.brand .glyph { width: 26px; height: 26px; border-radius: 7px; background: var(--indigo); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
nav.tabs { display: flex; gap: 24px; overflow-x: auto; flex: 1; min-width: 0; }
nav.tabs a {
  appearance: none; border: none; background: none; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--muted); text-decoration: none;
  padding: 18px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
nav.tabs a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--indigo); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--indigo-soft); color: var(--indigo); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
main.page { max-width: 1180px; margin: 0 auto; padding: 26px 24px 70px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.card.pad { padding: 22px; }
.h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.sub { font-size: 13.5px; color: var(--muted2); margin-top: 3px; }
.section-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

/* buttons */
.btn { appearance: none; border: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; border-radius: var(--radius-input); padding: 10px 18px; }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-hover); }
.btn-ghost { background: #fff; border: 1px solid var(--line2); color: var(--muted); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 8px 15px; font-size: 13px; }

/* inputs */
label.field { font-size: 13px; font-weight: 500; color: var(--muted); display: flex; flex-direction: column; gap: 7px; }
.input, input.input, select.input {
  font: inherit; font-size: 14.5px; color: var(--ink); padding: 11px 13px;
  border: 1px solid var(--line2); border-radius: var(--radius-input); outline: none; width: 100%;
  background: #fff;
}
.input:focus, input.input:focus, select.input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79,70,229,0.13); }
.input.mono { text-align: right; }

/* table */
.tbl { overflow-x: auto; }
.tbl-head, .tbl-row { display: flex; align-items: center; gap: 14px; padding: 12px 22px; min-width: 780px; }
.tbl-head { background: #FAFBFC; border-bottom: 1px solid #EEF0F3; font-size: 11.5px; font-weight: 600; color: var(--muted3); text-transform: uppercase; letter-spacing: 0.05em; }
.tbl-row { border-bottom: 1px solid var(--line3); }
.tbl-row:last-child { border-bottom: none; }
.r { text-align: right; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* badges */
.badge { font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; }
.badge-stale { color: var(--amber); background: var(--amber-soft); }
.pill { font-size: 14px; font-weight: 600; padding: 3px 9px; border-radius: 7px; }

/* hero */
.hero-value { font-size: 52px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; margin-top: 6px; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted2); letter-spacing: 0.01em; }

/* period / segmented toggle */
.seg { display: flex; gap: 3px; background: #F2F3F7; padding: 3px; border-radius: 11px; }
.seg a { appearance: none; border: none; background: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted2); padding: 6px 12px; border-radius: 8px; text-decoration: none; }
.seg a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,0.08); }

/* grid helpers */
.cards { display: flex; flex-wrap: wrap; gap: 13px; }
.cards > .card { flex: 1 1 175px; padding: 15px 16px; }

/* draft / empty banners */
.banner { display: flex; align-items: center; gap: 13px; background: var(--indigo-soft2); border: 1px solid #DEDEFB; border-radius: 13px; padding: 13px 16px; margin-bottom: 16px; }
.banner .ic { width: 30px; height: 30px; border-radius: 8px; background: var(--indigo); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.empty { background: #fff; border: 1px dashed #D9DCE3; border-radius: var(--radius-card); padding: 56px 40px; text-align: center; }

/* auth split */
.split { display: flex; min-height: 100vh; }
.split .pane-art { flex: 1 1 46%; background: linear-gradient(160deg,#4F46E5 0%,#4338CA 55%,#3730A3 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.split .pane-form { flex: 1 1 54%; display: flex; align-items: center; justify-content: center; padding: 40px; min-width: 0; }
.glass { background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); border-radius: 16px; padding: 20px 22px; backdrop-filter: blur(4px); }

/* wizard */
.wizard { max-width: 680px; margin: 0 auto; padding: 38px 24px 80px; }
.step-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; border: 1.5px solid var(--line2); }
.step-dot.done { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.step-dot.active { background: var(--indigo-soft); color: var(--indigo); border-color: var(--indigo); }
.field-help { font-size: 12px; color: var(--muted3); }
