@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #111111;
  --ink-2: #2b2a28;
  --muted: #7a786f;
  --line: #ebe9e2;
  --line-2: #e5e2d8;
  --accent: #1a3a2e;
  --accent-light: #23463a;
  --accent-soft: #e8efea;
  --gold: #b58a4a;
  --gold-dark: #8a6432;
  --green: #16794a;
  --red: #b03a3a;
  --chip: #f1efe7;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
  --transition-fast: 0.12s ease;
  --transition-med: 0.2s ease;
  --transition-slow: 0.35s ease;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.serif { font-family: 'Instrument Serif', serif; font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: 'Geist Mono', monospace; }

/* ==================== SHELL ==================== */
.shell {
  width: 1440px;
  margin: 0 auto;
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ==================== LOGIN ==================== */
.login-page {
  width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
}

.login-brand-name {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-brand-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 44px;
}

.login-title {
  font-family: 'Instrument Serif', serif;
  font-size: 32px;
  color: var(--ink);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 36px;
}

.user-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 460px;
  margin-bottom: 32px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-md);
}

.user-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.user-card .uc-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.user-card .uc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.user-card .uc-role {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.login-form {
  width: 460px;
}

.login-input-group {
  margin-bottom: 14px;
}

.login-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--transition-fast);
}

.login-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,58,46,0.08);
}

.login-btn {
  width: 100%;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background var(--transition-fast);
}

.login-btn:hover { background: #0f2a20; }
.login-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: 248px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 22px 16px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 22px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
}

.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: var(--muted); }

.fund-switch {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: default;
}

.fs-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a3a2e, #2f6b54);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-size: 16px;
  flex-shrink: 0;
}

.fs-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.fs-sub { font-size: 11px; color: var(--muted); }
.fs-caret { margin-left: auto; color: var(--muted); font-size: 14px; }

.section {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 14px 10px 6px;
  font-weight: 500;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 1px;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.nav-item:hover { background: rgba(0,0,0,0.03); }

.nav-item.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04);
}

.nav-item .nav-ic {
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}

.nav-item.active .nav-ic { color: var(--accent); }

.nav-item .pill {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.nav-item .pill.gold { background: var(--gold); }

.side-foot {
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.side-foot-name { font-size: 13px; font-weight: 600; }
.side-foot-role { font-size: 11px; color: var(--muted); }

.logout-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.logout-btn:hover { color: var(--red); }

/* ==================== MAIN ==================== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ==================== TOPBAR ==================== */
.topbar {
  height: 64px;
  background: rgba(246,245,241,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.crumbs {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.crumbs .cur { color: var(--ink); font-weight: 500; }

.search-box {
  margin-left: 24px;
  flex: 1;
  max-width: 380px;
  position: relative;
}

.search-box input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 14px 0 38px;
  font-family: inherit;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,58,46,0.08);
}

.search-ic {
  position: absolute;
  left: 12px;
  top: 11px;
  color: var(--muted);
  display: flex;
}

.search-kbd {
  position: absolute;
  right: 10px;
  top: 9px;
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  background: var(--chip);
  color: var(--muted);
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-2);
  position: relative;
  transition: background var(--transition-fast);
}

.icon-btn:hover { background: #fbfaf6; }

.notif-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

/* ==================== BUTTONS ==================== */
.btn {
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:hover { background: #fbfaf6; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover { background: #0f2a20; }

.btn-gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

.btn-gold:hover { background: var(--gold-dark); }

.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-danger:hover { background: #8a2a2a; }

.btn-sm {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.mini {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.mini:hover { background: #fbfaf6; }
.mini.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.mini.dark:hover { background: #333; }

/* ==================== CONTENT ==================== */
.content { padding: 30px 32px 40px; }

/* ==================== HERO ==================== */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  gap: 32px;
}

.hero-left .eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow .live {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(22,121,74,0.18);
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22,121,74,0.18); }
  50% { box-shadow: 0 0 0 6px rgba(22,121,74,0.08); }
}

.hero-title {
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.hero-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
  max-width: 540px;
}

.hero-actions { display: flex; gap: 10px; }

/* ==================== FILTER STRIP ==================== */
.filter-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.fs-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.fs-chip:hover { border-color: var(--line-2); }

.fs-chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.fs-chip .caret {
  font-size: 9px;
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
}

.fs-sep {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 6px;
}

/* ==================== KPI STRIP ==================== */
.kpi-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 4px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  overflow: hidden;
}

.kpi {
  padding: 22px 24px;
  border-right: 1px solid var(--line);
  position: relative;
}

.kpi:last-child { border-right: none; }

.kpi.main {
  background: linear-gradient(135deg, #1a3a2e 0%, #23463a 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  border-right: none;
}

.kpi-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

.kpi.main .kpi-label { color: rgba(255,255,255,0.7); }

.kpi-value {
  font-family: 'Instrument Serif', serif;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 8px;
}

.kpi.main .kpi-value { font-size: 48px; }

.kpi-value .unit {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}

.kpi.main .kpi-value .unit { color: rgba(255,255,255,0.6); }

.kpi-meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 11.5px;
}

.delta.up { background: rgba(22,121,74,0.1); color: var(--green); }
.delta.up.on-dark { background: rgba(255,255,255,0.14); color: #aaeac8; }
.delta.down { background: rgba(176,58,58,0.1); color: var(--red); }

.kpi-meta .vs { color: var(--muted); }
.kpi.main .kpi-meta .vs { color: rgba(255,255,255,0.6); }

.kpi-spark {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 90px;
  height: 34px;
  opacity: 0.9;
}

/* ==================== CARDS ==================== */
.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px 14px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.card-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

.card-body { padding: 6px 24px 24px; }

/* ==================== SEGMENT CONTROL ==================== */
.seg {
  display: inline-flex;
  background: var(--chip);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.seg div {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.seg div:hover { color: var(--ink-2); }

.seg div.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ==================== CHART ==================== */
.chart { height: 280px; position: relative; }
.chart svg { width: 100%; height: 100%; }

.bench-bubble {
  position: absolute;
  right: 14px;
  top: 8px;
  background: var(--chip);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.bench-bubble .l {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.bench-bubble .v {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  color: var(--ink);
  margin-top: 2px;
}

.bench-bubble .d {
  font-size: 11.5px;
  color: var(--green);
  font-weight: 600;
  margin-top: 2px;
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-2);
  align-items: center;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  vertical-align: middle;
}

/* ==================== DONUT ==================== */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 6px;
}

.donut { width: 140px; height: 140px; flex-shrink: 0; }

.alloc-list { flex: 1; }

.alloc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
}

.alloc-sw {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
}

.alloc-name { flex: 1; color: var(--ink-2); }

.alloc-val {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
}

/* ==================== TABS ==================== */
.tabs-row {
  display: flex;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 12px 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.tab:hover { color: var(--ink-2); }

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.tab .count {
  background: var(--chip);
  color: var(--ink-2);
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.tab.active .count {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ==================== DOCUMENT ROW ==================== */
.doc-row {
  display: grid;
  grid-template-columns: 1fr 110px 130px 120px 150px;
  gap: 14px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  transition: background var(--transition-fast);
}

.doc-row:hover { background: #fbfaf6; }
.doc-row:last-child { border-bottom: none; }

.doc-info {
  display: flex;
  align-items: center;
  gap: 13px;
}

.doc-ic {
  width: 38px;
  height: 46px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid rgba(26,58,46,0.08);
}

.doc-ic.gold {
  background: rgba(181,138,74,0.12);
  color: var(--gold);
  border-color: rgba(181,138,74,0.18);
}

.doc-ic.dark {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.doc-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}

.doc-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.doc-period {
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 500;
}

.doc-size {
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  color: var(--muted);
}

/* ==================== TAGS ==================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.tag.new { background: var(--accent-soft); color: var(--accent); }
.tag.signed { background: rgba(181,138,74,0.12); color: var(--gold); }
.tag.viewed { background: var(--chip); color: var(--muted); }
.tag.pending { background: rgba(181,138,74,0.12); color: var(--gold); }
.tag.verified { background: var(--accent-soft); color: var(--accent); }
.tag.discrepancy { background: rgba(176,58,58,0.1); color: var(--red); }
.tag.approved { background: var(--accent-soft); color: var(--accent); }
.tag.distributed { background: var(--chip); color: var(--muted); }
.tag.draft { background: var(--chip); color: var(--muted); }
.tag.pending-approval { background: rgba(181,138,74,0.12); color: var(--gold); }

.tag .ddot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* ==================== TIMELINE ==================== */
.timeline-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}

.tl-ic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  z-index: 1;
  border: 1px solid var(--line);
}

.tl-ic.accent { background: var(--accent-soft); color: var(--accent); }
.tl-ic.gold { background: rgba(181,138,74,0.12); color: var(--gold); }

.tl-text { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.tl-text b { color: var(--ink); font-weight: 600; }

.tl-time {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-time .ipchip {
  font-family: 'Geist Mono', monospace;
  background: var(--chip);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
}

/* ==================== FOOTER ==================== */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}

.footer-links {
  display: flex;
  gap: 22px;
  align-items: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
}

.footer-links a:hover { color: var(--ink-2); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  color: var(--ink-2);
}

.status-pill .gdot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(22,121,74,0.18);
}

/* ==================== TOAST ==================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in 0.3s ease;
  max-width: 380px;
}

.toast.success { background: var(--accent); }
.toast.warning { background: var(--gold); }
.toast.error { background: var(--red); }

.toast-icon { display: flex; align-items: center; flex-shrink: 0; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-12px) scale(0.96); }
}

/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-bg-in 0.2s ease;
}

@keyframes modal-bg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0,0,0,0.15);
  animation: modal-in 0.25s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all var(--transition-fast);
}

.modal-close:hover { background: var(--chip); color: var(--ink); }

.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
}

/* ==================== DROPDOWN ==================== */
.dropdown-wrap { position: relative; display: inline-flex; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  min-width: 180px;
  padding: 4px;
  animation: dd-in 0.15s ease;
}

@keyframes dd-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item:hover { background: var(--chip); }
.dropdown-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }

/* ==================== TABLES (NAV Verification) ==================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table th.sortable:hover { color: var(--ink-2); }

.data-table th .sort-indicator {
  display: inline-flex;
  margin-left: 4px;
  vertical-align: middle;
}

.data-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fbfaf6; }

.data-table .mono-val {
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
}

.data-table .text-right { text-align: right; }

/* ==================== PAGE HEADER (NAV Verification) ==================== */
.page-header {
  margin-bottom: 28px;
}

.page-header .page-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-header .page-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.page-header .page-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* ==================== KPI ROW (smaller variant) ==================== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.kpi-sm {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.kpi-sm .kpi-label {
  font-size: 11px;
  margin-bottom: 6px;
}

.kpi-sm .kpi-val {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.kpi-sm .kpi-note {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* ==================== MODAL DETAIL ROWS ==================== */
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.detail-row:last-child { border-bottom: none; }

.detail-label { color: var(--muted); }

.detail-value {
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.detail-value.mono {
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

@keyframes donutDraw {
  from { stroke-dasharray: 0 100; }
}

.anim-fade-in { animation: fadeIn 0.4s ease both; }
.anim-fade-up { animation: fadeInUp 0.45s ease both; }
.anim-fade-scale { animation: fadeInScale 0.4s ease both; }

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* ==================== UTILITIES ==================== */
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.fw-600 { font-weight: 600; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-14 { gap: 14px; }
.ml-auto { margin-left: auto; }
