
/* ═══════════════════════════════════════════════════════
   WhiteOak.IO — Platform Design System v6
   10-Pass Investor-Grade Polish
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700&family=JetBrains+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

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

/* ─── PASS 1: DESIGN TOKENS ─────────────────────────── */
:root {
  /* Green brand */
  --green:      #059669;
  --green-dk:   #047857;
  --green-lt:   #10b981;
  --green-bg:   rgba(5,150,105,.07);
  --green-bdr:  rgba(5,150,105,.18);
  --accent:     #059669;
  --adim:       rgba(5,150,105,.08);
  --aglow:      rgba(5,150,105,.18);
  --dkgrn:      #047857;
  --dkgreen:    #047857;

  /* Semantic colors */
  --red:        #dc2626;
  --red-bg:     rgba(220,38,38,.07);
  --rdim:       rgba(220,38,38,.07);
  --amber:      #d97706;
  --amber-bg:   rgba(217,119,6,.07);
  --ydim:       rgba(217,119,6,.08);
  --yellow:     #d97706;
  --blue:       #2563eb;
  --blue-bg:    rgba(37,99,235,.07);
  --bdim:       rgba(37,99,235,.07);
  --purple:     #7c3aed;
  --pdim:       rgba(124,58,237,.07);

  /* Sidebar — clean white */
  --sb-bg:      #ffffff;
  --sb-bg2:     #f8fafc;
  --sb-line:    rgba(15,23,42,.07);
  --sb-text:    #64748b;
  --sb-text2:   #94a3b8;
  --sb-act:     rgba(5,150,105,.08);
  --hdr:        #0f172a;
  --navy:       #0f172a;

  /* App surfaces */
  --bg:         #f5f7fb;
  --bg1:        #ffffff;
  --bg2:        #eef2f8;
  --bg3:        #e8edf4;
  --bg4:        #dce3ed;
  --white:      #ffffff;

  /* Borders */
  --line:       rgba(15,23,42,.06);
  --line2:      rgba(15,23,42,.10);
  --line3:      rgba(15,23,42,.16);
  --ln:         rgba(15,23,42,.06);
  --ln2:        rgba(15,23,42,.10);

  /* Text */
  --text:       #0f172a;
  --text2:      #475569;
  --text3:      #94a3b8;
  --t2:         #475569;
  --t3:         #94a3b8;
  --t4:         #cbd5e1;

  /* Topbar */
  --tb-bg:      #0f172a;
  --tb-line:    rgba(5,150,105,.3);

  /* ─── PASS 2: TYPOGRAPHY ───────────────────────────── */
  /* Inter — clean, professional, investor-grade */
  --ui:    'Inter', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', 'IBM Plex Mono', 'Courier New', monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  --f:     'Inter', system-ui, sans-serif;
  --m:     'JetBrains Mono', 'IBM Plex Mono', 'Courier New', monospace;
  --s:     'Instrument Serif', Georgia, serif;

  /* Layout */
  --sw:  240px;
  --th:  52px;
  --r:   5px;
  --r2:  8px;
  --r3:  12px;

  /* Shadows — subtle, professional */
  --sh0:    0 1px 2px rgba(0,0,0,.04);
  --sh1:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --sh2:    0 4px 12px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
  --sh3:    0 10px 32px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
  --sh-sm:  0 1px 3px rgba(0,0,0,.06);
  --sh-md:  0 4px 12px rgba(0,0,0,.06);
  --sh-lg:  0 10px 32px rgba(0,0,0,.08);
}

/* ─── PASS 3: RESET & BASE ──────────────────────────── */
html, body {
  height: 100%;
  font-family: var(--ui);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  letter-spacing: -.012em;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

body { display: flex; height: 100vh; overflow: hidden; }

/* ─── PASS 4: SIDEBAR ───────────────────────────────── */
#sidebar {
  width: var(--sw);
  min-width: var(--sw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--sb-bg);
  overflow: hidden;
  flex-shrink: 0;
  z-index: 20;
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 8px rgba(15,23,42,.06);
}

/* Logo */
.sb-logo {
  padding: 20px 18px 18px;
  border-bottom: 2px solid var(--sb-line);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background .12s;
  background: linear-gradient(135deg, rgba(5,150,105,.04) 0%, transparent 100%);
}
.sb-logo:hover { background: rgba(5,150,105,.06); }
.sb-wordmark { display: flex; flex-direction: column; gap: 4px; }
.sb-wm-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.5px;
  line-height: 1;
  font-style: normal;
}
.sb-wm-name em { color: var(--green); font-style: italic; }
.sb-wm-tag {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green-dk);
  font-weight: 600;
  opacity: .7;
}

/* Clock */
.sb-clock {
  padding: 9px 16px;
  border-bottom: 1px solid var(--sb-line);
  flex-shrink: 0;
}
.clock-hms {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: .03em;
  line-height: 1;
}
.clk-hms { display: inline-block; }
.mc { font-family: var(--mono); font-size: 7.5px; color: #64748b; margin-left: 4px; letter-spacing: .08em; font-weight: 500; }
.clock-date {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 3px;
  display: block;
  font-weight: 500;
}
.clock-status { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green);
  animation: pulse 3s infinite;
}
.live-lbl { font-family: var(--mono); font-size: 7px; color: var(--green-dk); letter-spacing: .06em; font-weight: 600; }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(5,150,105,.3); }
  50%      { box-shadow: 0 0 0 3px rgba(5,150,105,.06); }
}

/* Org strip */
.sb-org {
  padding: 8px 16px;
  border-bottom: 1px solid var(--sb-line);
  flex-shrink: 0;
}
.sb-org-name { font-size: 11px; font-weight: 700; color: #0f172a; line-height: 1.3; letter-spacing: -.01em; }
.sb-org-fy { font-family: var(--mono); font-size: 7.5px; color: #64748b; margin-top: 2px; letter-spacing: .03em; font-weight: 500; }

/* Nav */
.sb-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0 8px;
}
.sb-nav::-webkit-scrollbar { width: 2px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.06); }

.sn-sec {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #475569;
  font-weight: 600;
  padding: 12px 16px 4px;
  user-select: none;
}

.sn-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  transition: background .1s, color .1s;
  user-select: none;
  position: relative;
  letter-spacing: -.01em;
  border-radius: 6px;
  margin: 0 6px;
  overflow: hidden;
}
.sn-item:hover { background: rgba(5,150,105,.07); color: #0f172a; font-weight: 600; }
.sn-item.active {
  background: rgba(5,150,105,.09);
  color: #065f46;
  font-weight: 700;
  border-radius: 6px;
}
.sn-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 5px; bottom: 5px;
  width: 2px;
  background: var(--green);
  border-radius: 0 2px 2px 0;
}
.sn-ic { font-size: 11px; opacity: .5; width: 14px; text-align: center; flex-shrink: 0; font-style: normal; }
.sn-item.active .sn-ic { opacity: 1; color: #047857; }
.sn-lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.sn-ct {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  background: var(--red);
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  min-width: 16px;
  text-align: center;
  line-height: 8px;
  flex-shrink: 0;
}

/* AI btn */
.sb-ai-btn {
  margin: 8px 12px 12px;
  padding: 8px 12px;
  background: rgba(5,150,105,.07);
  border: 1px solid rgba(5,150,105,.2);
  border-radius: var(--r);
  color: var(--green-dk);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s;
  flex-shrink: 0;
  width: calc(100% - 24px);
}
.sb-ai-btn:hover { background: rgba(5,150,105,.12); }

/* ─── PASS 5: SHELL & TOPBAR ────────────────────────── */
#shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f5f7fb;
}
#main { flex: 1; overflow-y: auto; overflow-x: hidden; }

#topbar {
  height: var(--th);
  min-height: var(--th);
  background: #0f172a;
  border-bottom: 2px solid rgba(5,150,105,.4);
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
  flex-shrink: 0;
  z-index: 10;
}

.tb-title {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  color: #0f172a;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.15px;
}
.tb-sub { font-family: var(--mono); font-size: 7.5px; color: var(--text3); letter-spacing: .08em; text-transform: uppercase; margin-top: 1px; }
.tb-right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }

.tb-dist-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
  font-family: var(--ui); font-size: 11px; font-weight: 500;
  padding: 4px 10px; border-radius: var(--r); cursor: pointer;
  transition: all .15s; white-space: nowrap; letter-spacing: -.01em;
}
.tb-dist-btn:hover { background: var(--bg3); border-color: var(--line3); }
.tb-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

.tb-alert-btn {
  position: relative; background: none; border: none;
  color: var(--text3); font-size: 14px; padding: 4px 6px;
  border-radius: var(--r); transition: all .15s; cursor: pointer; line-height: 1;
}
.tb-alert-btn:hover { background: var(--bg2); color: var(--text); }
.tb-badge {
  position: absolute; top: 1px; right: 1px;
  background: var(--red); color: #fff; font-family: var(--mono);
  font-size: 7px; font-weight: 700; min-width: 13px; height: 13px;
  border-radius: 7px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
}

.tb-search-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg2); border: 1px solid var(--line2);
  color: var(--text2); font-family: var(--ui); font-size: 11px;
  padding: 4px 10px; border-radius: var(--r); cursor: pointer; transition: all .15s;
}
.tb-search-btn:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.9); }
#gsearch-btn { cursor: pointer; }

.tb-user {
  display: flex; align-items: center; gap: 7px; padding: 4px 9px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r); cursor: pointer; transition: background .15s;
}
.tb-user:hover { background: rgba(255,255,255,.12); }
.tb-avatar {
  width: 22px; height: 22px; border-radius: 50%; background: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 9px; color: #fff; flex-shrink: 0;
  font-family: var(--mono); letter-spacing: 0;
}
.tb-uname { font-size: 11px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.tb-role  { font-family: var(--mono); font-size: 7.5px; color: rgba(255,255,255,.35); }
.tb-bc    { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tb-org   { font-size: 10.5px; color: var(--text2); font-weight: 500; }
.tb-sep   { color: var(--text3); margin: 0 5px; font-size: 10px; }
.tb-mod   { font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: -.01em; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-btn   { background: none; border: none; color: var(--text3); cursor: pointer; padding: 4px 6px; border-radius: var(--r); font-size: 13px; transition: all .15s; }
.tb-btn:hover { background: var(--bg2); color: var(--text); }

/* ─── PASS 6: MODULE PAGES & KPI CARDS ─────────────── */
.rpage {
  background: #f5f7fb;
  min-height: calc(100vh - var(--th));
  padding: 16px 16px 28px;
}
.rtop {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line2);
}
.rtitle {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  font-style: italic;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -.3px;
}
.rsub { font-size: 11px; color: var(--text2); margin-top: 5px; line-height: 1.55; letter-spacing: -.005em; }
.rbadge {
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--green-bg);
  color: var(--green-dk);
  border: 1px solid var(--green-bdr);
  padding: 3px 9px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.macts { display: flex; gap: 6px; flex-shrink: 0; align-items: flex-start; flex-wrap: wrap; }

/* KPI cards */
.krow   { display: grid; gap: 10px; margin-bottom: 16px; }
.krow-4 { grid-template-columns: repeat(4,1fr); }
.krow-5 { grid-template-columns: repeat(5,1fr); }
.krow-3 { grid-template-columns: repeat(3,1fr); }

.kcard {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.08);
  border-top: 2.5px solid var(--kc, var(--green));
  padding: 12px 15px;
  border-radius: var(--r);
  box-shadow: var(--sh1);
  transition: box-shadow .15s, transform .15s;
  position: relative;
  overflow: visible;
  min-width: 0;
}
.kcard:hover { box-shadow: var(--sh2); transform: translateY(-1px); }

.klabel {
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 7px;
}
.kval {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin-bottom: 5px;
  letter-spacing: -.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ksub { font-size: 10px; color: var(--text3); line-height: 1.4; letter-spacing: -.005em; }
.kval-green { color: var(--green); }
.kval-red   { color: var(--red); }
.kval-amber { color: var(--amber); }

/* KPI accent-top shortcuts */
.kc-green { --kc: var(--green); }
.kc-red   { --kc: var(--red); }
.kc-amber { --kc: var(--amber); }
.kc-blue  { --kc: var(--blue); }
.kc-gray  { --kc: var(--text3); }

/* ─── PASS 7: TABLES ────────────────────────────────── */
.tbl-wrap {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  margin-bottom: 14px;
}
.tbl-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg1);
}
.tbl-title { font-size: 12.5px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th {
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text3);
  background: #f8fafc;
  padding: 8px 13px;
  text-align: left;
  border-bottom: 1px solid rgba(15,23,42,.09);
  white-space: nowrap;
  user-select: none;
}
thead th.r { text-align: right; }
thead th.c { text-align: center; }
tbody td {
  padding: 8px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
  letter-spacing: -.005em;
}
tbody td.r    { text-align: right; }
tbody td.c    { text-align: center; }
tbody td.mono { font-family: var(--mono); font-size: 12px; }
tbody td.dim  { color: var(--text2); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(5,150,105,.03); }

/* ─── PASS 8: BUTTONS & BADGES ──────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--r);
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  white-space: nowrap;
  user-select: none;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.btn.bg    { background: var(--green); color: #fff; border-color: var(--green); }
.btn.bg:hover { background: var(--green-dk); border-color: var(--green-dk); box-shadow: 0 1px 4px rgba(5,150,105,.3); }
.btn.bp    { background: var(--bg1); color: var(--text); border-color: var(--line2); }
.btn.bp:hover { background: var(--bg2); border-color: var(--line3); }
.btn.sec   { background: var(--bg1); color: var(--text); border-color: var(--line2); }
.btn.sec:hover { background: var(--bg2); border-color: var(--line3); }
.btn.ghost { background: transparent; color: var(--text2); border-color: var(--line2); }
.btn.ghost:hover { background: var(--bg2); color: var(--text); }
.btn.danger{ background: var(--red-bg); color: var(--red); border-color: rgba(220,38,38,.18); }
.btn.danger:hover { background: rgba(220,38,38,.12); }
.btn.sm    { padding: 4px 9px; font-size: 11.5px; }
.btn.xs    { padding: 2px 7px; font-size: 10.5px; border-radius: 4px; }
.btn.bsm   { padding: 5px 10px; font-size: 11.5px; }

/* Status Badges */
.badge, .b-g, .b-a, .b-r, .b-d, .b-b {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 8px;
}
.badge.g, .b-g, .b-approved { background: rgba(5,150,105,.08); color: var(--green-dk); border: 1px solid rgba(5,150,105,.15); }
.badge.a, .b-a, .b-pending  { background: rgba(217,119,6,.08); color: var(--amber); border: 1px solid rgba(217,119,6,.15); }
.badge.r, .b-r, .b-flag     { background: rgba(220,38,38,.08); color: var(--red); border: 1px solid rgba(220,38,38,.15); }
.badge.d, .b-d              { background: var(--bg2); color: var(--text2); border: 1px solid var(--line2); }
.badge.b, .b-b, .b-info     { background: rgba(37,99,235,.08); color: var(--blue); border: 1px solid rgba(37,99,235,.15); }
.b-complete                  { background: rgba(5,150,105,.08); color: var(--green-dk); border: 1px solid rgba(5,150,105,.15); }

/* ─── PASS 9: OVERLAYS, MODALS, TOASTS ──────────────── */
#modal-ov {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,.55); z-index: 800;
  align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
#modal-ov.open { display: flex; }
#modal-box {
  background: var(--bg1); border-radius: var(--r2); box-shadow: var(--sh3);
  min-width: 480px; max-width: 760px; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line2);
}
.mhd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: var(--bg2); flex-shrink: 0;
}
.mhd-t { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: -.02em; }
.mhd-x {
  background: none; border: none; font-size: 16px; color: var(--text3);
  cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: all .15s; line-height: 1;
}
.mhd-x:hover { background: var(--bg3); color: var(--text); }
.mbd { flex: 1; overflow-y: auto; padding: 18px; font-size: 13px; color: var(--text); line-height: 1.6; }

#notif {
  display: none; position: fixed; top: var(--th); right: 0;
  width: 336px; height: calc(100vh - var(--th));
  background: var(--bg1); border-left: 1px solid var(--line2);
  z-index: 400; flex-direction: column; box-shadow: var(--sh3);
}
#notif.open { display: flex; }
.notif-hdr {
  padding: 12px 15px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2); flex-shrink: 0;
}
.notif-body { flex: 1; overflow-y: auto; padding: 10px; }

#gsearch-ov {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,.5); z-index: 900;
  align-items: flex-start; justify-content: center;
  padding-top: 80px; backdrop-filter: blur(3px);
}
#gsearch-ov.open { display: flex; }
#gsearch-box {
  background: var(--bg1); border-radius: var(--r2); box-shadow: var(--sh3);
  width: 560px; overflow: hidden; border: 1px solid var(--line2);
}
#gsearch-inp {
  width: 100%; padding: 14px 16px; font-family: var(--ui); font-size: 14px;
  border: none; outline: none; background: transparent; color: var(--text);
  border-bottom: 1px solid var(--line); letter-spacing: -.01em;
}
#gsearch-results { max-height: 360px; overflow-y: auto; }
.gs-footer {
  display: flex; justify-content: space-between; padding: 7px 14px;
  font-family: var(--mono); font-size: 8.5px; color: var(--text3);
  border-top: 1px solid var(--line); background: var(--bg2);
}
.gs-result-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 14px;
  cursor: pointer; border-bottom: 1px solid var(--line); font-size: 12.5px;
  transition: background .1s;
}
.gs-result-item:hover { background: var(--bg2); }
.gs-result-item:last-child { border-bottom: none; }
.gs-title { font-size: 12.5px; font-weight: 500; color: var(--text); letter-spacing: -.01em; }
.gs-sub   { font-size: 11px; color: var(--text2); margin-top: 1px; }
.gs-val   { font-family: var(--mono); font-size: 12px; color: var(--text2); }
.gs-ic    { font-size: 15px; width: 22px; text-align: center; flex-shrink: 0; }
.gs-main  { flex: 1; min-width: 0; }

#toasts {
  position: fixed; bottom: 18px; right: 18px; z-index: 9000;
  display: flex; flex-direction: column; gap: 7px; pointer-events: none;
}
.toast {
  background: #0f172a; color: rgba(255,255,255,.9);
  padding: 10px 15px; border-radius: var(--r);
  font-size: 12.5px; font-weight: 450;
  display: flex; align-items: center; gap: 10px;
  max-width: 340px; box-shadow: var(--sh3);
  border-left: 3px solid var(--green);
  animation: toast-in .18s ease; pointer-events: all;
  letter-spacing: -.01em;
}
.toast.e { border-left-color: var(--red); }
.toast.w { border-left-color: var(--amber); }
.toast.i { border-left-color: var(--blue); }
@keyframes toast-in { from { opacity:0; transform: translateY(5px); } to { opacity:1; transform: none; } }

/* ─── PASS 10: MODULE CLASSES, UTILITIES & POLISH ───── */

/* Module fade */
.mfade { animation: mfadein .16s ease; }
@keyframes mfadein { from { opacity:0; transform:translateY(3px); } to { opacity:1; transform:none; } }

/* Strip/tabs */
.mstrip { display:flex; align-items:center; margin-bottom:14px; border-bottom:1px solid var(--line2); gap:0; }
.mstrip.mb12 { margin-bottom:12px; }
.mstrip-label { font-family:var(--mono); font-size:7.5px; font-weight:600; letter-spacing:.13em; text-transform:uppercase; color:var(--text3); padding:0 12px 9px 0; white-space:nowrap; }
.ftabs { display:flex; gap:0; flex:1; overflow-x:auto; }
.ftab {
  font-family:var(--mono); font-size:8.5px; font-weight:600; letter-spacing:.09em; text-transform:uppercase;
  color:var(--text3); background:none; border:none; border-bottom:2px solid transparent;
  padding:8px 12px; cursor:pointer; transition:all .12s; white-space:nowrap; flex-shrink:0;
}
.ftab:hover { color:var(--text2); }
.ftab.active, .ftab[data-active="true"] { color:var(--green); border-bottom-color:var(--green); }

/* Priority items */
.pri-item {
  display:flex; align-items:flex-start; gap:11px; padding:10px 13px;
  background:var(--bg1); border-radius:var(--r); border:1px solid var(--line);
  margin-bottom:7px; box-shadow:var(--sh0);
}
.pri-item:last-child { margin-bottom:0; }

/* Module header */
.mtitle { font-family:var(--serif); font-size:19px; font-weight:400; font-style:italic; color:var(--text); letter-spacing:-.2px; }
.msub   { font-size:11px; color:var(--text2); margin-top:4px; line-height:1.5; letter-spacing:-.005em; }
.mhdr   { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:18px; padding-bottom:14px; border-bottom:1px solid var(--line2); }

/* Generic card */
.card { background:var(--bg1); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--sh1); overflow:hidden; }
.card-hdr { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid var(--line); }
.card-title { font-size:12.5px; font-weight:600; color:var(--text); letter-spacing:-.01em; }
.card-body  { padding:14px; }

/* Panel */
.panel { background:#ffffff; border:1px solid rgba(15,23,42,.08); border-radius:var(--r); overflow:hidden; box-shadow:0 1px 3px rgba(15,23,42,.06); }
.ph    { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid var(--line); }
.pt    { font-size:12.5px; font-weight:600; color:var(--text); letter-spacing:-.01em; }
.ps    { font-size:11px; color:var(--text2); }
.pbody { padding:14px; }
.rbody { padding:14px; flex:1; overflow-y:auto; }

/* Typography helpers */
.bold  { font-weight:600; }
.mono  { font-family:var(--mono); }
.note  { font-size:11px; color:var(--text3); padding:9px 13px; background:var(--bg2); border-radius:var(--r); border-left:2.5px solid var(--line3); margin-top:11px; line-height:1.6; }
.meta  { font-size:11px; color:var(--text2); letter-spacing:-.005em; }
.lbl   { font-family:var(--mono); font-size:7.5px; font-weight:600; letter-spacing:.13em; text-transform:uppercase; color:var(--text3); }
.lbl6  { font-family:var(--mono); font-size:6.5px; font-weight:600; letter-spacing:.16em; text-transform:uppercase; color:var(--text3); }

/* Grid helpers */
.g2  { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.g3  { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.g4  { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.g5  { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; }
.g1  { display:grid; grid-template-columns:1fr; gap:12px; }
.g23 { display:grid; grid-template-columns:2fr 3fr; gap:14px; }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.flex-c  { display:flex; align-items:center; }
.flex-b  { display:flex; align-items:center; justify-content:space-between; }
.flex-1  { flex:1; min-width:0; }
.fi { flex:1; min-width:0; }
.gap4  { gap:4px; }
.gap8  { gap:8px; }
.gap12 { gap:12px; }
.fbet  { display:flex; align-items:center; justify-content:space-between; }

/* Spacing */
.mb4  { margin-bottom:4px !important; }
.mb8  { margin-bottom:8px !important; }
.mb10 { margin-bottom:10px !important; }
.mb12 { margin-bottom:12px !important; }
.mb16 { margin-bottom:16px !important; }
.mb20 { margin-bottom:20px !important; }
.mb24 { margin-bottom:24px !important; }
.mt4  { margin-top:4px !important; }
.mt8  { margin-top:8px !important; }
.mt12 { margin-top:12px !important; }
.mt16 { margin-top:16px !important; }
.mt2  { margin-top:2px !important; }
.pbs  { padding-bottom:10px; }
.p4   { padding:4px; }
.pf   { padding:14px; }
.pb   { padding-bottom:12px; }
.dl   { border-bottom:1px solid var(--line); }

/* Text helpers */
.tr  { text-align:right; }
.tc  { text-align:center; }
.tac { text-align:center; }
.tar { text-align:right; }
.ala { text-align:left; }
.ald { text-align:left; }
.ale { text-align:left; }
.altp { padding-left:14px; }
.fw6  { font-weight:600; }
.fw5  { font-weight:500; }
.clamp1 { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.upper  { text-transform:uppercase; }
.tw   { white-space:nowrap; }
.twf  { white-space:normal; }
.clg  { color:var(--green); }
.clr  { color:var(--red); }
.cl2  { color:var(--text2); }
.cl3  { color:var(--text3); }
.dim  { color:var(--text2); }
.dimmer { color:var(--text3); }
.green { color:var(--green); }
.red   { color:var(--red); }
.amber { color:var(--amber); }
.ok    { color:var(--green); }
.brd   { color:var(--red); }
.y     { color:var(--amber); }
.bold  { font-weight:600; }
.bhl   { font-weight:700; color:var(--text); }
.bok   { background:rgba(5,150,105,.08); color:var(--green-dk); border:1px solid rgba(5,150,105,.14); border-radius:3px; padding:2px 6px; font-size:9px; font-family:var(--mono); font-weight:600; }
.bxs   { box-shadow:var(--sh1); }
.cur   { cursor:pointer; }
.f1    { flex:1; }
.fr4   { border-radius:4px; }
.fr6   { border-radius:6px; }
.fr8   { border-radius:8px; }
.mla   { margin-left:auto; }
.on    { color:var(--green); }
.pn    { background:var(--red-bg); color:var(--red); }
.py    { background:var(--green-bg); color:var(--green-dk); }
.csl   { font-size:10.5px; color:var(--text2); }
.csv   { font-family:var(--mono); font-size:12px; }
.cmp-row { display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid var(--line); font-size:12px; }
.cmp-row:last-child { border-bottom:none; }
.edk  { font-family:var(--mono); font-size:9.5px; color:var(--text3); }
.evc  { font-size:12px; color:var(--text); }
.evl  { font-size:10.5px; color:var(--text2); }

/* Font size scale */
.sz10  { font-size:10px; }
.sz11  { font-size:11px; }
.sz115 { font-size:11.5px; }
.sz12  { font-size:12px; }
.sz125 { font-size:12.5px; }
.h12   { font-size:10px !important; font-weight:600; }
.h125  { font-size:12.5px; font-weight:600; }
.h13   { font-size:13px; font-weight:600; }
.meta-sub  { font-size:10px; color:var(--text3); }
.meta-sub2 { font-size:9.5px; color:var(--text3); }
.meta11    { font-size:11px; }
.meta9     { font-size:9px; font-family:var(--mono); }
.mc-dim    { color:var(--text3); }
.mc-sub    { font-size:10px; color:var(--text2); }
.mc10      { font-family:var(--mono); font-size:10px; }
.fmeta     { font-size:10.5px; color:var(--text2); }
.fname     { font-size:12.5px; font-weight:600; color:var(--text); letter-spacing:-.01em; }
.fc12      { font-family:var(--mono); font-size:12px; }
.f10       { font-size:10px; }
.fs        { font-size:11px; }
.fsb       { font-size:11px; font-weight:600; }
.fsh       { font-size:11px; font-weight:400; color:var(--text2); }
.fn        { font-weight:400; }
.fw        { font-weight:500; }

/* Fcard */
.fcard { background:var(--bg1); border:1px solid var(--line); border-radius:var(--r); padding:13px; box-shadow:var(--sh1); }

/* Status bars */
.risk-banner { display:flex; align-items:center; gap:11px; padding:11px 14px; border-radius:var(--r); border-left:3.5px solid var(--red); background:rgba(220,38,38,.04); margin-bottom:14px; font-size:12.5px; }
.risk-pulse  { animation:pulse 2s infinite; }
.ro-banner   { padding:11px 14px; border-radius:var(--r); border-left:3px solid var(--line3); background:var(--bg2); margin-bottom:12px; font-size:12px; line-height:1.6; }
.status-body  { font-size:12px; color:var(--text); line-height:1.7; }
.status-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.status-ok    { border-left-color:var(--green); background:rgba(5,150,105,.03); }
.status-warn  { border-left-color:var(--amber); background:rgba(217,119,6,.03); }
.status-title-ok   { color:var(--green-dk); font-weight:600; font-size:12.5px; margin-bottom:5px; }
.status-title-warn { color:var(--amber); font-weight:600; font-size:12.5px; margin-bottom:5px; }

/* Audit log */
.audit-box  { border:1px solid var(--line); border-radius:var(--r); overflow:hidden; margin-bottom:14px; box-shadow:var(--sh0); }
.audit-hdr  { background:var(--bg2); padding:8px 13px; border-bottom:1px solid var(--line); font-family:var(--mono); font-size:7.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--text3); }
.arow { display:flex; border-bottom:1px solid var(--line); font-size:11.5px; }
.arow:last-child { border-bottom:none; }
.ats  { font-family:var(--mono); font-size:9.5px; color:var(--text3); padding:7px 11px; width:68px; flex-shrink:0; background:var(--bg2); border-right:1px solid var(--line); }
.aact { font-family:var(--mono); font-size:9.5px; color:var(--green); padding:7px 10px; width:80px; flex-shrink:0; border-right:1px solid var(--line); }
.adsc { font-size:11.5px; color:var(--text); padding:7px 12px; flex:1; line-height:1.5; letter-spacing:-.005em; }
.ahsh { font-family:var(--mono); font-size:8px; color:var(--text3); padding:7px 9px; width:42px; border-left:1px solid var(--line); flex-shrink:0; }
.ala  { font-family:var(--mono); font-size:9px; color:var(--text2); padding:7px 9px; flex-shrink:0; }
.ald  { font-size:11px; padding:7px 12px; flex:1; letter-spacing:-.005em; }
.ale  { font-family:var(--mono); font-size:9.5px; padding:7px 9px; }

/* Notifications */
.notif-item { display:flex; gap:9px; padding:9px 11px; border-bottom:1px solid var(--line); font-size:12px; cursor:pointer; transition:background .1s; }
.notif-item:hover { background:var(--bg2); }
.notif-item:last-child { border-bottom:none; }
.ni-m { font-size:13px; flex-shrink:0; margin-top:1px; }
.ni-t { font-size:12.5px; font-weight:500; color:var(--text); letter-spacing:-.01em; }
.ni-d { font-size:10px; color:var(--text3); margin-top:1px; font-family:var(--mono); }

/* KPI variants */
.kpi4 { display:grid; grid-template-columns:repeat(4,1fr); gap:0; border:1px solid var(--line); border-radius:var(--r); overflow:hidden; margin-bottom:12px; }
.kv18 { font-family:var(--mono); font-size:18px; font-weight:600; color:var(--text); line-height:1; letter-spacing:-.02em; }
.kdelta { font-size:10px; color:var(--text3); line-height:1.35; margin-top:3px; }
.ktip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--sb-bg);
  color: rgba(255,255,255,.85);
  font-size: 10.5px;
  line-height: 1.45;
  padding: 7px 10px;
  border-radius: var(--r);
  z-index: 100;
  box-shadow: var(--sh2);
  pointer-events: none;
  white-space: normal;
}
.kcard:hover .ktip { display: block; }
.klbl   { font-family:var(--mono); font-size:7.5px; font-weight:600; letter-spacing:.13em; text-transform:uppercase; color:var(--text3); margin-bottom:7px; display:block; }
.kc     { padding:12px 14px; border-right:1px solid var(--line); background:var(--bg1); }
.kc:last-child { border-right:none; }
.kv     { font-family:var(--mono); font-size:20px; font-weight:600; color:var(--text); line-height:1; margin-bottom:3px; letter-spacing:-.02em; }
.kl     { font-size:11px; color:var(--text2); margin-bottom:2px; }
.ks     { font-size:10px; color:var(--text3); }
.ckv    { font-family:var(--mono); font-size:20px; font-weight:600; color:var(--green); line-height:1; margin-bottom:4px; letter-spacing:-.02em; }
.ckl    { font-size:11px; font-weight:600; color:rgba(255,255,255,.7); margin-bottom:2px; }
.cks    { font-family:var(--mono); font-size:8.5px; color:rgba(255,255,255,.3); }

/* Grant cards */
.gcard   { background:var(--bg1); border:1px solid var(--line); border-radius:var(--r); padding:13px 15px; margin-bottom:9px; box-shadow:var(--sh0); }
.gc      { background:var(--bg1); border:1px solid var(--line); border-radius:var(--r); padding:13px 15px; margin-bottom:9px; }
.gc-top  { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:9px; }
.gc-name { font-size:12.5px; font-weight:600; color:var(--text); letter-spacing:-.01em; }
.gc-award{ font-size:11px; color:var(--text2); }
.gc-bar  { height:4px; background:var(--bg3); border-radius:2px; margin-bottom:9px; overflow:hidden; }
.gc-bar-fill { height:100%; border-radius:2px; }
.gc-stats { display:grid; grid-template-columns:repeat(4,1fr); font-size:10.5px; color:var(--text2); gap:7px; }
.gc-stats div { line-height:1.5; }
.gc-stats strong { display:block; font-size:12px; font-weight:600; color:var(--text); }
.gname  { font-size:12.5px; font-weight:600; color:var(--text); letter-spacing:-.01em; }
.gmeta  { font-size:10.5px; color:var(--text2); }

/* Reserve cards */
.res-card    { display:flex; align-items:center; justify-content:space-between; padding:9px 13px; border:1px solid var(--line); border-radius:var(--r); margin-bottom:7px; background:var(--bg1); }
.res-name    { font-size:12.5px; font-weight:600; color:var(--text); letter-spacing:-.01em; }
.res-purpose { font-size:10.5px; color:var(--text2); margin-top:2px; }
.res-bal     { font-family:var(--mono); font-size:15px; font-weight:600; color:var(--text); text-align:right; letter-spacing:-.02em; }
.res-bal-label { font-size:10px; color:var(--text3); text-align:right; }

/* Cert */
.cert-box   { background:var(--bg2); border:1px solid var(--line); border-left:3px solid var(--green); border-radius:var(--r); padding:14px; margin-bottom:12px; }
.cert-top   { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:10px; }
.cert-body  { font-size:12px; color:var(--text); line-height:1.75; }
.cert-row   { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--line); font-size:12px; }
.cert-sigs  { display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; margin-top:12px; }
.cert-sig   { text-align:center; }
.cert       { padding:11px 14px; border:1px solid var(--line); border-radius:var(--r); background:var(--bg1); }

/* Capital */
.capcard  { background:var(--bg1); border:1px solid var(--line); border-radius:var(--r); padding:13px 15px; margin-bottom:9px; box-shadow:var(--sh0); }
.capname  { font-size:12.5px; font-weight:600; color:var(--text); letter-spacing:-.01em; }
.captype  { font-family:var(--mono); font-size:8px; color:var(--text3); letter-spacing:.09em; text-transform:uppercase; }
.capstats { display:flex; gap:14px; margin-top:9px; font-size:11px; color:var(--text2); }

/* Detail/breakdown */
.bd-card   { background:var(--bg1); border:1px solid var(--line); border-radius:var(--r); padding:13px 15px; }
.exp-row   { display:flex; align-items:center; gap:9px; padding:7px 0; border-bottom:1px solid var(--line); }
.exp-row:last-child { border-bottom:none; }
.exp-inner { flex:1; min-width:0; }
.enc-sel   { font-size:11.5px; color:var(--text2); cursor:pointer; }
.exc-cb    { cursor:pointer; }
.ev-arr    { color:var(--text3); font-size:13px; }

/* Tree */
.tree      { border:1px solid var(--line); border-radius:var(--r); overflow:hidden; background:var(--bg1); }
.tree-hdr  { display:flex; align-items:center; gap:9px; padding:8px 13px; background:var(--bg2); border-bottom:1px solid var(--line); font-family:var(--mono); font-size:7.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--text3); }
.tree-item { display:flex; align-items:center; gap:9px; padding:7px 13px; border-bottom:1px solid var(--line); font-size:12px; cursor:pointer; transition:background .1s; }
.tree-item:hover  { background:var(--bg2); }
.tree-item.active { background:rgba(5,150,105,.05); }
.tree-item:last-child { border-bottom:none; }

/* Import */
.imp-dz { border:2px dashed var(--line2); border-radius:var(--r); padding:28px 22px; text-align:center; cursor:pointer; transition:all .2s; color:var(--text2); }
.imp-dz:hover { border-color:var(--green); background:rgba(5,150,105,.02); }

/* Charts */
.ld-metrics { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:12px; }
.ldm        { flex:1; min-width:110px; padding:9px 13px; background:var(--bg1); border:1px solid var(--line); border-radius:var(--r); }
.ldm-l      { font-family:var(--mono); font-size:7.5px; letter-spacing:.11em; text-transform:uppercase; color:var(--text3); margin-bottom:4px; }
.ldm-v      { font-family:var(--mono); font-size:17px; font-weight:600; color:var(--text); line-height:1; letter-spacing:-.02em; }
.ldm-d      { font-size:10px; color:var(--text3); margin-top:3px; }
.spk-bar    { display:flex; align-items:flex-end; gap:2px; height:30px; }
.spk-row    { display:flex; align-items:center; gap:8px; }
.sri        { display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid var(--line); font-size:12px; }
.sri:last-child { border-bottom:none; }

/* Board packet inline styles */
.doc        { max-width:816px; margin:0 auto; }
.sec-head   { display:flex; align-items:flex-start; gap:12px; margin-bottom:20px; padding-bottom:14px; border-bottom:1px solid var(--line2); }
.sec-num-col{ display:flex; flex-direction:column; align-items:center; flex-shrink:0; }
.sec-label-line { font-family:var(--mono); font-size:7.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--green); display:block; margin-bottom:4px; }
.sec-title-block { flex:1; }
.sec-title  { font-size:17px; font-weight:600; color:var(--text); letter-spacing:-.02em; }
.sec-sub    { font-size:11px; color:var(--text2); margin-top:4px; line-height:1.5; }
.section-page { padding:30px 44px; background:#fff; }
.sig-page   { padding:30px 44px; background:#fff; }
.exec-box   { background:#f9fdfb; border:1px solid rgba(5,150,105,.13); border-left:3.5px solid var(--green); border-radius:var(--r); padding:18px 22px; margin-bottom:14px; }
.insight    { border:1px solid rgba(5,150,105,.13); border-radius:var(--r); padding:16px 20px; background:#f9fdfb; margin-bottom:12px; border-top:2.5px solid var(--green); }
.insight-hdr{ display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.insight-title { font-size:10.5px; font-weight:700; color:var(--text); text-transform:uppercase; letter-spacing:.07em; }
.insight-ts { font-size:9px; color:var(--text3); margin-left:auto; font-family:var(--mono); }
.irow   { display:flex; gap:9px; align-items:flex-start; margin-bottom:7px; }
.irow:last-child { margin-bottom:0; }
.idot   { width:5px; height:5px; border-radius:50%; flex-shrink:0; margin-top:7px; }
.itext  { font-size:12.5px; color:var(--text); line-height:1.7; letter-spacing:-.005em; }
.dtbl   { width:100%; border-collapse:collapse; font-size:12px; margin-bottom:12px; }
.dtbl th{ background:#0f172a; color:rgba(255,255,255,.8); font-family:var(--mono); font-size:7.5px; letter-spacing:.1em; text-transform:uppercase; padding:8px 11px; text-align:left; border-bottom:2px solid var(--green); }
.dtbl th.r { text-align:right; }
.dtbl td{ padding:7px 11px; border-bottom:1px solid #e5e9ef; color:#111; }
.dtbl td.r { text-align:right; }
.dtbl td.mono { font-family:var(--mono); font-size:11px; }
.dtbl tr:nth-child(even) td { background:#f8fafc; }
.dtbl tr.total td { font-weight:700; background:#0f172a !important; color:#fff !important; font-family:var(--mono); }
.cf-table   { width:100%; border-collapse:collapse; font-size:11.5px; margin-bottom:12px; }
.cf-table th{ background:#0f172a; color:rgba(255,255,255,.8); font-family:var(--mono); font-size:7.5px; letter-spacing:.1em; text-transform:uppercase; padding:7px 11px; text-align:left; border-bottom:2px solid var(--green); }
.cf-table td{ padding:6px 11px; border-bottom:1px solid #e5e9ef; }
.cf-table tr.total td { font-weight:700; background:#0f172a !important; color:#fff !important; font-family:var(--mono); }
.run-hdr    { background:#0f172a; padding:9px 36px; display:flex; justify-content:space-between; align-items:center; border-bottom:2px solid var(--green); }
.run-left   { display:flex; align-items:center; gap:9px; }
.run-logo-mark { font-family:Georgia,serif; font-size:13.5px; font-weight:700; color:#fff; }
.run-tagline{ font-family:var(--mono); font-size:6.5px; color:rgba(5,150,105,.45); letter-spacing:.14em; text-transform:uppercase; margin-top:2px; }
.run-right  { text-align:right; }
.run-section{ font-size:10.5px; font-weight:600; color:rgba(255,255,255,.7); }
.run-page   { font-family:var(--mono); font-size:8px; color:rgba(255,255,255,.28); margin-top:2px; }
.toc-body   { padding:36px 44px; background:#fff; }
.toc-title  { font-family:Georgia,serif; font-size:20px; font-weight:700; color:#111; margin-bottom:20px; padding-bottom:10px; border-bottom:2px solid #e5e9ef; }
.toc-row    { display:flex; align-items:center; padding:7px 0; border-bottom:1px solid #e5e9ef; }
.toc-num    { font-family:var(--mono); font-size:10px; font-weight:600; color:var(--green); width:24px; flex-shrink:0; }
.toc-name   { font-size:12px; color:#111; flex:1; }
.toc-dots   { flex:1; border-bottom:1px dotted #ccc; margin:0 11px; position:relative; top:-3px; }
.toc-pg     { font-family:var(--mono); font-size:10px; color:#999; width:17px; text-align:right; }
.toc-cert   { background:#f0faf5; border-left:3px solid var(--green); padding:10px 14px; margin-top:18px; font-size:11px; color:#555; line-height:1.7; }
.page-break { page-break-after:always; height:0; overflow:hidden; }
.no-print   { }
.print-btn  { position:fixed; bottom:18px; right:18px; background:var(--green); color:#fff; border:none; padding:9px 18px; border-radius:var(--r); font-size:12px; font-weight:600; cursor:pointer; box-shadow:var(--sh2); }
.wm         { text-align:center; color:var(--text3); font-size:10px; margin-top:20px; }
.rwm        { opacity:.4; }
.wo-logomark{ font-family:Georgia,serif; font-weight:700; }

/* Section indicators */
.section-hdr { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; margin-top:18px; }
.section-hdr:first-child { margin-top:0; }
.section-title { font-size:12.5px; font-weight:600; color:var(--text); letter-spacing:-.01em; }

/* Dash grid */
.dash-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:11px; margin-bottom:14px; }
.dash-card { background:#ffffff; border:1px solid rgba(15,23,42,.08); border-radius:var(--r); padding:13px 15px; box-shadow:0 1px 3px rgba(15,23,42,.06); }
.dash-card-title { font-family:var(--mono); font-size:7.5px; font-weight:600; letter-spacing:.13em; text-transform:uppercase; color:var(--text3); margin-bottom:9px; padding-bottom:7px; border-bottom:1px solid var(--line); }

/* Progress bar */
.prog-bar { height:5px; background:var(--bg3); border-radius:3px; overflow:hidden; margin-top:6px; }
.prog-fill { height:100%; border-radius:2px; transition:width .4s ease; }

/* Skeleton */
.skeleton { background:linear-gradient(90deg,var(--bg2) 25%,var(--bg3) 50%,var(--bg2) 75%); background-size:200% 100%; animation:shimmer 1.4s infinite; border-radius:3px; }
@keyframes shimmer { from { background-position:200% 0; } to { background-position:-200% 0; } }

/* Misc */
.pm-item { display:flex; align-items:center; gap:9px; padding:7px 0; border-bottom:1px solid var(--line); font-size:12px; }
.pm-item:last-child { border-bottom:none; }
.ind { cursor:pointer; padding:5px 10px; border-radius:var(--r); font-size:11.5px; transition:background .1s; }
.ind.active { background:rgba(5,150,105,.09); color:var(--green-dk); font-weight:600; }

/* Variance table (preserved) */
.vt-td    { padding:8px 13px; border-bottom:1px solid var(--line); }
.vt-code  { font-family:var(--mono); font-size:9px; color:var(--text3); margin-right:7px; }
.vt-name  { font-size:12.5px; font-weight:500; color:var(--text); letter-spacing:-.01em; }
.vt-fund  { font-size:10px; font-weight:600; color:var(--text2); }
.vt-num   { font-family:var(--mono); font-size:12px; color:var(--text2); text-align:right; }
.vt-act   { font-family:var(--mono); font-size:12.5px; font-weight:600; color:var(--text); text-align:right; }
.vt-var-pos   { font-family:var(--mono); font-size:12px; font-weight:600; color:var(--red); text-align:right; }
.vt-var-neg   { font-family:var(--mono); font-size:12px; font-weight:600; color:var(--text2); text-align:right; }
.vt-proj-over { font-family:var(--mono); font-size:12px; color:var(--red); text-align:right; }
.vt-proj-ok   { font-family:var(--mono); font-size:12px; color:var(--text2); text-align:right; }
.vt-badge-over-crit { font-size:9px; font-weight:700; padding:2px 6px; border-radius:3px; background:var(--red-bg); color:var(--red); white-space:nowrap; font-family:var(--mono); letter-spacing:.04em; }
.vt-badge-over-high { font-size:9px; font-weight:700; padding:2px 6px; border-radius:3px; background:var(--amber-bg); color:var(--amber); white-space:nowrap; font-family:var(--mono); letter-spacing:.04em; }
.vt-badge-under     { font-size:9px; font-weight:700; padding:2px 6px; border-radius:3px; background:var(--bg2); color:var(--text2); white-space:nowrap; font-family:var(--mono); }
.vt-badge-ok        { font-size:9px; font-weight:700; padding:2px 6px; border-radius:3px; background:var(--green-bg); color:var(--green-dk); white-space:nowrap; font-family:var(--mono); }

/* Scrollbar */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--line3); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--text3); }

/* Focus */
*:focus-visible { outline:2px solid var(--green); outline-offset:2px; }

/* Responsive */
@media(max-width:900px) {
  #menu-btn { display:block !important; }
  #sidebar  { display:none; position:fixed; z-index:100; height:100%; }
  #sidebar.open { display:flex; }
}

/* Print */
@media print {
  #sidebar,#topbar,#notif,#toasts,.macts,.tb-right,.btn,button { display:none!important; }
  body,html { background:#fff!important; color:#000!important; overflow:visible!important; }
  #main { padding:0!important; overflow:visible!important; }
  .rpage { border:none!important; background:#fff!important; max-width:100%!important; }
  .rtop  { background:#f5f5f5!important; }
  * { color-adjust:exact!important; -webkit-print-color-adjust:exact!important; }
}


/* ══════════════════════════════════════════════════════
   PASS 1-5: Invoice Validation, Exceptions, Board Packet
   Investor-grade module-specific polish
   ══════════════════════════════════════════════════════ */

/* ── PASS 1: Invoice Validation chrome ── */
.inv-page    { background:var(--bg); }
.inv-krow    { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:12px; }
.inv-kcard   {
  background:var(--bg1); border:1px solid var(--line);
  border-top:2.5px solid var(--kc,var(--green));
  padding:13px 15px; border-radius:var(--r); box-shadow:var(--sh1);
}
.inv-kcard .klabel { font-family:var(--mono); font-size:7.5px; font-weight:600; letter-spacing:.13em; text-transform:uppercase; color:var(--text3); margin-bottom:6px; }
.inv-kcard .kval   { font-family:var(--mono); font-size:21px; font-weight:600; color:var(--text); line-height:1; letter-spacing:-.03em; }
.inv-kcard .ksub   { font-size:10px; color:var(--text3); margin-top:4px; }

/* Invoice row badge states */
.inv-row-flag   td { background:rgba(220,38,38,.025) !important; }
.inv-row-approve td { background:rgba(5,150,105,.02) !important; }
.inv-row-pending td { background:rgba(217,119,6,.02) !important; }

/* Validation badge */
.val-ok   { display:inline-flex; align-items:center; gap:4px; font-family:var(--mono); font-size:8.5px; font-weight:600; color:var(--green-dk); background:rgba(5,150,105,.08); border:1px solid rgba(5,150,105,.14); padding:2px 7px; border-radius:3px; white-space:nowrap; }
.val-warn { display:inline-flex; align-items:center; gap:4px; font-family:var(--mono); font-size:8.5px; font-weight:600; color:var(--red); background:rgba(220,38,38,.08); border:1px solid rgba(220,38,38,.14); padding:2px 7px; border-radius:3px; white-space:nowrap; }
.val-med  { display:inline-flex; align-items:center; gap:4px; font-family:var(--mono); font-size:8.5px; font-weight:600; color:var(--amber); background:rgba(217,119,6,.08); border:1px solid rgba(217,119,6,.14); padding:2px 7px; border-radius:3px; white-space:nowrap; }
.val-pill { display:inline-flex; align-items:center; gap:3px; font-size:10px; font-weight:500; padding:1px 6px; border-radius:3px; }

/* Search row */
.inv-search-row { display:flex; align-items:center; gap:8px; padding:8px 0 12px; }
.inv-search-input {
  flex:1; max-width:300px; padding:7px 12px 7px 30px;
  border:1px solid var(--line2); border-radius:var(--r);
  font-size:12.5px; font-family:var(--ui); color:var(--text);
  background:var(--bg1); outline:none; transition:border-color .15s;
  letter-spacing:-.005em;
}
.inv-search-input:focus { border-color:var(--green); box-shadow:0 0 0 2px rgba(5,150,105,.08); }

/* Selection bar */
.inv-sel-bar {
  display:flex; align-items:center; gap:8px; padding:8px 14px;
  background:rgba(37,99,235,.06); border:1px solid rgba(37,99,235,.14);
  border-radius:var(--r); margin-bottom:10px;
  font-size:12px; font-weight:600; color:var(--blue);
}

/* Stale data banner */
.stale-banner {
  display:flex; align-items:center; gap:10px; padding:9px 14px;
  background:rgba(217,119,6,.07); border:1px solid rgba(217,119,6,.18);
  border-left:3px solid var(--amber); border-radius:var(--r);
  font-size:11.5px; color:var(--amber); margin-bottom:12px;
}

/* Read-only notice */
.readonly-notice {
  margin-top:12px; padding:9px 13px;
  background:var(--bg2); border:1px solid var(--line);
  border-radius:var(--r); font-size:11px; color:var(--text3);
  line-height:1.6;
}

/* ── PASS 2: Exceptions & Audit Log chrome ── */
.exc-header {
  display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:18px;
}
.exc-kcard {
  background:var(--bg1); border:1px solid var(--line);
  border-top:2.5px solid var(--ec,var(--text3));
  padding:13px 15px; border-radius:var(--r); box-shadow:var(--sh1);
}
.exc-kcard.crit { --ec: var(--red); }
.exc-kcard.high { --ec: var(--amber); }
.exc-kcard.med  { --ec: var(--blue); }
.exc-kcard.ok   { --ec: var(--green); }

/* Risk severity row highlight */
.risk-row-crit td { border-left:3px solid var(--red) !important; }
.risk-row-high td:first-child { border-left:3px solid var(--amber) !important; }

/* Severity pill */
.sev-crit { font-family:var(--mono); font-size:10.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--red); background:rgba(220,38,38,.09); border:1px solid rgba(220,38,38,.16); padding:2px 7px; border-radius:3px; }
.sev-high { font-family:var(--mono); font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--amber); background:rgba(217,119,6,.09); border:1px solid rgba(217,119,6,.16); padding:2px 7px; border-radius:3px; }
.sev-med  { font-family:var(--mono); font-size:8.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--blue); background:rgba(37,99,235,.09); border:1px solid rgba(37,99,235,.16); padding:2px 7px; border-radius:3px; }
.sev-low  { font-family:var(--mono); font-size:8.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--text3); background:var(--bg2); border:1px solid var(--line2); padding:2px 7px; border-radius:3px; }

/* Exception row */
.exc-row { transition:background .1s; cursor:pointer; }
.exc-row:hover td { background:rgba(5,150,105,.025) !important; }

/* Evidence score panel */
.evs-panel {
  background:var(--bg1); border:1px solid var(--line);
  border-radius:var(--r); padding:16px; box-shadow:var(--sh1); margin-bottom:12px;
}
.evs-score {
  font-family:var(--mono); font-size:36px; font-weight:600;
  line-height:1; letter-spacing:-.03em; margin-bottom:4px;
}
.evs-label { font-family:var(--mono); font-size:7.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--text3); margin-bottom:12px; }

/* Audit log row */
.al-row {
  display:grid;
  grid-template-columns: 70px 80px 1fr 44px;
  border-bottom:1px solid var(--line);
  font-size:11.5px; align-items:stretch;
}
.al-row:last-child { border-bottom:none; }
.al-row:hover { background:rgba(5,150,105,.02); }
.al-ts   { font-family:var(--mono); font-size:9px; color:var(--text3); padding:7px 10px; background:var(--bg2); border-right:1px solid var(--line); display:flex; align-items:flex-start; }
.al-act  { font-family:var(--mono); font-size:9px; font-weight:600; color:var(--green); padding:7px 9px; border-right:1px solid var(--line); display:flex; align-items:flex-start; text-transform:uppercase; letter-spacing:.04em; }
.al-desc { font-size:11.5px; color:var(--text); padding:7px 12px; flex:1; line-height:1.5; letter-spacing:-.005em; }
.al-hash { font-family:var(--mono); font-size:8px; color:var(--text3); padding:7px 8px; border-left:1px solid var(--line); display:flex; align-items:flex-start; }

/* Intelligence summary rows */

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



/* ── PASS 3: Board Packet chrome ── */
.bp-hero {
  background:linear-gradient(135deg, var(--sb-bg) 0%, #0d2a1e 100%);
  border-radius:var(--r2); padding:28px 32px; margin-bottom:20px;
  position:relative; overflow:hidden;
}
.bp-hero::before {
  content:''; position:absolute; inset:0;
  background:radial-gradient(ellipse 80% 60% at 100% 0%, rgba(5,150,105,.12) 0%, transparent 65%);
  pointer-events:none;
}
.bp-hero-title  { font-family:var(--serif); font-size:24px; font-weight:400; font-style:italic; color:#fff; letter-spacing:-.3px; margin-bottom:4px; position:relative; z-index:1; }
.bp-hero-sub    { font-size:12px; color:rgba(255,255,255,.45); position:relative; z-index:1; font-family:var(--mono); letter-spacing:.04em; }
.bp-hero-acts   { display:flex; gap:8px; margin-top:20px; position:relative; z-index:1; flex-wrap:wrap; }

.bp-gen-btn {
  display:inline-flex; align-items:center; gap:10px;
  padding:13px 28px; background:var(--green); color:#fff;
  border:none; border-radius:var(--r); font-size:13.5px; font-weight:600;
  cursor:pointer; transition:all .2s; letter-spacing:-.01em;
  box-shadow:0 4px 14px rgba(5,150,105,.3);
}
.bp-gen-btn:hover { background:var(--green-dk); box-shadow:0 6px 20px rgba(5,150,105,.4); transform:translateY(-1px); }

/* Board packet feature cards */
.bp-feat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:24px; }
.bp-feat-card {
  background:var(--bg1); border:1px solid var(--line); border-radius:var(--r);
  padding:14px 13px; text-align:left; box-shadow:var(--sh0);
  border-top:2px solid var(--green);
}
.bp-feat-icon  { font-size:18px; margin-bottom:8px; }
.bp-feat-title { font-size:11.5px; font-weight:600; color:var(--text); margin-bottom:3px; letter-spacing:-.01em; }
.bp-feat-desc  { font-size:10.5px; color:var(--text3); line-height:1.5; }

/* Generated packet meta bar */
.bp-meta-bar {
  display:flex; align-items:center; gap:10px; padding:11px 16px;
  background:var(--bg1); border:1px solid var(--line); border-radius:var(--r);
  margin-bottom:14px; box-shadow:var(--sh0);
}
.bp-meta-dot { width:8px; height:8px; border-radius:50%; background:var(--green); flex-shrink:0; box-shadow:0 0 0 3px rgba(5,150,105,.15); }
.bp-meta-label { font-size:13px; font-weight:600; color:var(--text); letter-spacing:-.01em; }
.bp-meta-ts    { font-family:var(--mono); font-size:10.5px; color:var(--text3); }

/* Packet section tabs */
.bp-tabs {
  display:flex; gap:2px; background:var(--bg2); border:1px solid var(--line);
  border-radius:var(--r); padding:3px; margin-bottom:16px; width:fit-content;
}
.bp-tab {
  font-size:11.5px; font-weight:500; color:var(--text2);
  background:none; border:none; padding:6px 14px; border-radius:4px;
  cursor:pointer; transition:all .15s; white-space:nowrap; letter-spacing:-.01em;
}
.bp-tab:hover { color:var(--text); background:rgba(255,255,255,.6); }
.bp-tab.active { background:var(--bg1); color:var(--text); box-shadow:var(--sh0); font-weight:600; }

/* ── PASS 4: Shared table chrome ── */
.mod-table-wrap {
  background:var(--bg1); border:1px solid var(--line);
  border-radius:var(--r); overflow:hidden; box-shadow:var(--sh1);
}
.mod-table-wrap table thead th {
  background:var(--bg2);
  font-family:var(--mono); font-size:7.5px; font-weight:600;
  letter-spacing:.12em; text-transform:uppercase; color:var(--text3);
  padding:8px 13px; border-bottom:1px solid var(--line2);
}
.mod-table-wrap table tbody td { padding:8px 13px; border-bottom:1px solid var(--line); }
.mod-table-wrap table tbody tr:last-child td { border-bottom:none; }
.mod-table-wrap table tbody tr:hover td { background:rgba(5,150,105,.025); }

/* ── PASS 5: Module page headers ── */
.mod-hdr {
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:14px; margin-bottom:18px; padding-bottom:14px;
  border-bottom:1px solid var(--line2);
}
.mod-hdr-left { flex:1; min-width:0; }
.mod-title {
  font-family:var(--serif); font-size:20px; font-weight:400; font-style:italic;
  color:var(--text); line-height:1.2; letter-spacing:-.2px;
}
.mod-sub { font-size:11px; color:var(--text2); margin-top:5px; line-height:1.55; letter-spacing:-.005em; }
.mod-badge {
  font-family:var(--mono); font-size:7.5px; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase;
  background:var(--green-bg); color:var(--green-dk);
  border:1px solid var(--green-bdr); padding:3px 9px; border-radius:3px;
  white-space:nowrap; flex-shrink:0; align-self:flex-start; margin-top:2px;
}
.mod-badge.red    { background:var(--red-bg); color:var(--red); border-color:rgba(220,38,38,.18); }
.mod-badge.amber  { background:var(--amber-bg); color:var(--amber); border-color:rgba(217,119,6,.18); }

/* Donut chart label */
.donut-wrap { display:flex; flex-direction:column; align-items:center; padding:16px 0 10px; }
.donut-score { font-family:var(--mono); font-size:28px; font-weight:600; color:var(--text); letter-spacing:-.03em; margin-top:-64px; }
.donut-label { font-family:var(--mono); font-size:7.5px; letter-spacing:.13em; text-transform:uppercase; color:var(--text3); margin-top:2px; }

/* ── Invoice stat bar — compact horizontal strip ── */
.inv-statbar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0 4px;
  margin-bottom: 12px;
  box-shadow: var(--sh0);
  overflow-x: auto;
  flex-wrap: nowrap;
}
.inv-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 16px;
  gap: 1px;
  flex-shrink: 0;
}
.inv-stat-val {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.03em;
}
.inv-stat-lbl {
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap;
}
.inv-stat-div {
  width: 1px;
  height: 28px;
  background: var(--line2);
  flex-shrink: 0;
}


/* ════════════════════════════════════════════════════════
   Exceptions & Audit Log — 5-Pass Investor Polish
   ════════════════════════════════════════════════════════ */

/* PASS 1: Page hero strip */
.exc-hero {
  background: linear-gradient(155deg, #060f1e 0%, #0a2818 50%, #060f1e 100%) !important;
  border-radius: var(--r2); padding: 14px 20px; margin-bottom: 14px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.exc-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 100% 0%, rgba(220,38,38,.08) 0%, transparent 60%),
              radial-gradient(ellipse 50% 60% at 0% 100%, rgba(5,150,105,.06) 0%, transparent 55%);
  pointer-events: none;
}
.exc-hero-left { position: relative; z-index: 1; flex: 1; min-width: 0; }
.exc-hero-title { font-family: var(--ui); font-size: 14px; font-weight: 800; font-style: normal; color: #fff; letter-spacing: -.3px; margin-bottom: 2px; }
.exc-hero-sub   { font-family: var(--mono); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.3); }
.exc-hero-stats { display: flex; gap: 24px; margin-top: 10px; position: relative; z-index: 1; flex-wrap: nowrap; align-items: flex-start; }
.exc-hero-stat  { }
.exc-hero-val   { font-family: var(--mono); font-size: 18px; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.exc-hero-val.red   { color: var(--red); }
.exc-hero-val.amber { color: var(--amber); }
.exc-hero-val.green { color: var(--green); }
.exc-hero-lbl   { font-family: var(--mono); font-size: 7px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.28); margin-top: 2px; }
.exc-hero-right { display: flex; gap: 7px; position: relative; z-index: 1; flex-shrink: 0; align-self: flex-start; }

/* PASS 2: Live finding chips */
.exc-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.exc-chip {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
  background: var(--bg1); border: 1px solid var(--line); border-radius: var(--r);
  border-left: 3px solid var(--chip-col, var(--line)); cursor: pointer;
  transition: box-shadow .15s, transform .12s; box-shadow: var(--sh0);

}
.exc-chip:hover { box-shadow: var(--sh2); transform: translateY(-1px); }
.exc-chip.crit { --chip-col: var(--red); }
.exc-chip.high { --chip-col: var(--amber); }
.exc-chip-sev  { font-family: var(--mono); font-size: 7px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--chip-col); flex-shrink: 0; margin-top: 2px; white-space: nowrap; }
.exc-chip-body { flex: 1; min-width: 0; overflow: hidden; }
.exc-chip-name { font-size: 11px; font-weight: 600; color: var(--text); letter-spacing: -.01em; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
.exc-chip-desc { font-size: 10px; color: var(--text3); margin-top: 2px; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 100%; }
.exc-all-clear {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: rgba(5,150,105,.06); border: 1px solid rgba(5,150,105,.15);
  border-radius: var(--r); margin-bottom: 16px; font-size: 12.5px;
  font-weight: 500; color: var(--green-dk);
}

/* PASS 3: Sev summary bar */
.exc-sev-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: var(--bg1); border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 14px; box-shadow: var(--sh0); flex-wrap: wrap;
}
.exc-sev-pill {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 10px; white-space: nowrap;
}
.exc-sev-pill.high  { background: var(--red-bg); border: 1px solid rgba(220,38,38,.2); color: var(--red); }
.exc-sev-pill.med   { background: var(--amber-bg); border: 1px solid rgba(217,119,6,.2); color: var(--amber); }
.exc-sev-pill.low   { background: var(--blue-bg); border: 1px solid rgba(37,99,235,.18); color: var(--blue); }
.exc-sev-pill.res   { background: var(--green-bg); border: 1px solid var(--green-bdr); color: var(--green-dk); }
.exc-sev-meta { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--text3); }

/* PASS 4: Exception table rows */

.exc-tr-expand td { padding: 4px 13px 10px; font-size: 11px; color: var(--text2); line-height: 1.5; letter-spacing: -.005em; text-align: left; }
.exc-tr-expand .exc-action { color: var(--green); margin-top: 3px; font-weight: 600; font-size: 11px; }
.exc-src-live   { font-family: var(--mono); font-size: 8px; font-weight: 700; color: var(--purple); background: var(--pdim); padding: 2px 6px; border-radius: 3px; letter-spacing: .04em; text-transform: uppercase; }
.exc-src-manual { font-family: var(--mono); font-size: 8px; color: var(--text3); background: var(--bg3); padding: 2px 6px; border-radius: 3px; text-transform: uppercase; }
.exc-search-row { display: flex; align-items: center; gap: 8px; padding: 10px 0 12px; }
.exc-search-inp {
  flex: 1; padding: 7px 12px; border: 1px solid var(--line2); border-radius: var(--r);
  font-size: 12.5px; font-family: var(--ui); color: var(--text); background: var(--bg1);
  outline: none; transition: border-color .15s; letter-spacing: -.005em;
}
.exc-search-inp:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(5,150,105,.08); }

/* PASS 5: Right sidebar panels */
.exc-sidebar { display: flex; flex-direction: column; gap: 8px; }

/* Trend sparkbars */
.exc-trend-bars { display: flex; gap: 5px; align-items: flex-end; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.exc-trend-week { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.exc-trend-bar-wrap { display: flex; gap: 2px; align-items: flex-end; }
.exc-trend-opened { width: 9px; background: rgba(220,38,38,.2); border-radius: 2px 2px 0 0; }
.exc-trend-resolved { width: 9px; background: rgba(5,150,105,.2); border-radius: 2px 2px 0 0; }
.exc-trend-lbl { font-family: var(--mono); font-size: 7.5px; color: var(--text3); }
.exc-trend-legend { display: flex; gap: 10px; padding: 6px 14px 10px; font-family: var(--mono); font-size: 8.5px; color: var(--text3); border-bottom: 1px solid var(--line); }
.exc-trend-legend span { display: flex; align-items: center; gap: 4px; }

/* Evidence donut wrapper */





/* Audit log panel */



/* Full Pack button */
.btn-fullpack {
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 12px; border-radius:var(--r);
  background:var(--sb-bg); color:#fff;
  border:1px solid rgba(255,255,255,.15);
  font-family:var(--ui); font-size:12px; font-weight:500;
  cursor:pointer; transition:all .15s; white-space:nowrap;
  letter-spacing:-.01em;
}
.btn-fullpack:hover { background:#1e3a5f; border-color:rgba(255,255,255,.25); }

/* ── Exceptions module layout ── */
.exc-layout {
  display: block;
  margin-bottom: 14px;
}
.exc-table-wrap { width: 100%; margin-bottom: 14px; }
.exc-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Evidence panel — compact */





/* Audit log — full width, scrollable */
.exc-alog-wrap {
  max-height: 320px;
  overflow-y: auto;
}
.exc-alog-empty {
  padding: 20px;
  text-align: center;
  color: var(--text3);
  font-size: 12px;
}

/* Exception table container */
.exc-table-wrap {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh1);
  overflow-x: auto;
}

/* Intelligence row compact */
.intel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.intel-row:last-child { border-bottom: none; }
.intel-label { font-size: 11px; color: var(--text2); letter-spacing: -.005em; }
.intel-val   { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: -.03em; }

/* ── Evidence panel — clean, readable, no overlap ── */
.exc-ev-panel {
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.exc-ev-panel svg {
  display: block;
  flex-shrink: 0;
}
.exc-ev-score-num {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  margin-top: 8px;
}
.exc-ev-pct {
  font-size: 16px;
  font-weight: 400;
  opacity: .7;
}
.exc-ev-label {
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 5px;
}
.exc-ev-divider {
  width: 32px;
  height: 1px;
  background: var(--line2);
  margin: 8px 0;
}
.exc-ev-sub {
  font-size: 10.5px;
  color: var(--text3);
  text-align: center;
  line-height: 1.5;
}

/* ── Encumbrance fund summary cards ── */
.enc-fund-card {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  box-shadow: var(--sh0);
  min-width: 0;
  overflow: hidden;
}
.enc-fund-id {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 5px;
}
.enc-fund-val {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  letter-spacing: -.02em;
}
.enc-fund-meta {
  font-size: 11px;
  color: var(--text2);
  line-height: 1.4;
}
.enc-fund-stale {
  color: var(--red);
  font-weight: 700;
}

/* White sidebar scrollbar */
#sidebar .sb-nav::-webkit-scrollbar { width: 3px; }
#sidebar .sb-nav::-webkit-scrollbar-thumb { background: rgba(15,23,42,.1); border-radius: 2px; }
#sidebar .sb-nav::-webkit-scrollbar-thumb:hover { background: rgba(15,23,42,.14); }

/* Topbar separator dot */
.tb-sep-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  flex-shrink: 0;
}

/* Tighter mono numbers everywhere */
td.mono, .mono-num {
  font-feature-settings: 'tnum' 1;
  letter-spacing: -.02em;
}

/* ── Budget Overview (m0) ── */
.m0-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line2);
  flex-wrap: wrap;
}
.m0-district {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  letter-spacing: -.4px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.m0-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text2);
  flex-wrap: wrap;
}
.m0-meta-chip {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  background: var(--bg2);
  border: 1px solid var(--line2);
  padding: 2px 8px;
  border-radius: 3px;
  color: var(--text2);
  letter-spacing: .04em;
}
.m0-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text3);
  flex-shrink: 0;
}
.m0-hs-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
}
.m0-hs-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Utilization card */
.m0-util-card {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--sh1);
}
.m0-util-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.m0-util-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}
.m0-util-period {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text3);
  margin-left: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.m0-util-pace {
  font-size: 11px;
  color: var(--text3);
}
.m0-bar-track {
  position: relative;
  height: 8px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.m0-bar-exp {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  border-radius: 4px;
  transition: width .4s;
}
.m0-bar-enc {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--amber);
  opacity: .55;
}
.m0-bar-marker {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 12px;
  background: var(--text);
  opacity: .3;
  border-radius: 1px;
}
.m0-bar-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text2);
  flex-wrap: wrap;
  align-items: center;
}
.m0-leg-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}

/* Main grid */
.m0-main-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Sidebar */
.m0-sidebar { display: flex; flex-direction: column; gap: 12px; }

/* Action items */
.m0-action-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background .1s;
}
.m0-action-item:hover { background: rgba(5,150,105,.03); }
.m0-action-item:last-child { border-bottom: none; }
.m0-action-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Health score */
.m0-health {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg2);
}
.m0-health-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}
.m0-health-label {
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text3);
}
.m0-health-score {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
}
.m0-health-bar {
  height: 5px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
}

/* Data feeds */
.m0-feed-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}
.m0-feed-row:last-child { border-bottom: none; }
.m0-feed-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.m0-feed-name { flex: 1; font-weight: 500; color: var(--text); }
.m0-feed-rows { font-family: var(--mono); font-size: 9.5px; color: var(--text3); }
.m0-feed-status { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Quick nav */
.m0-quicknav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
}
.m0-qnav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
  font-family: var(--ui);
  text-align: left;
  width: 100%;
  letter-spacing: -.01em;
}
.m0-qnav-btn:hover {
  background: var(--bg1);
  border-color: var(--green-bdr);
  color: var(--green-dk);
  box-shadow: var(--sh1);
}

/* ── Module loading skeleton ── */
.mod-skeleton {
  padding: 22px 24px;
  animation: mfadein .15s ease;
}
.mod-sk-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line2);
}
.mod-sk-kpis {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.mod-sk-kpi {
  height: 80px;
  border-radius: var(--r);
}
.mod-sk-body {
  display: flex;
  gap: 14px;
}

/* Supabase loading bar */
@keyframes sb-load {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
#sb-loading-ind {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green) 0%, #2563eb 50%, var(--green) 100%);
  background-size: 200% 100%;
  animation: sb-load 1s linear infinite;
  z-index: 100;
}

/* ── Module header aliases ── */
.mod-title { font-family:var(--serif); font-size:20px; font-weight:400; font-style:italic; color:var(--text); letter-spacing:-.2px; line-height:1.2; }
.mod-sub   { font-size:11px; color:var(--text2); margin-top:5px; line-height:1.55; letter-spacing:-.005em; }
.mod-hdr   { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:18px; padding-bottom:14px; border-bottom:1px solid var(--line2); }
.mod-hdr-left { flex:1; min-width:0; }

/* ── Polish Pass — consistent panel/card headers ── */
.ph {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.pt {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}
.ps {
  font-size: 11px;
  color: var(--text2);
}

/* ftab active state uses .active class (not .on) */
.ftab.active {
  color: var(--green);
  border-bottom-color: var(--green);
}
/* Keep .on as alias for backwards compat */
.ftab.on {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* Tighter rpage padding */
.rpage {
  background: var(--bg);
  min-height: calc(100vh - var(--th));
  padding: 18px 20px 28px;
}

/* Cleaner panel */
.panel {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh1);
}
.pbody, .pb {
  padding: 12px 14px;
}

/* Better tbl-wrap spacing */
.tbl-wrap {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh1);
  margin-bottom: 14px;
}
.tbl-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg1);
}
.tbl-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}

/* macts spacing */
.macts {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* krow margin helpers */
.mb14 { margin-bottom: 14px !important; }
.mb16 { margin-bottom: 16px !important; }
.mb20 { margin-bottom: 20px !important; }

/* Smoother hover on all rows */
tbody tr { transition: background .08s; }

/* Better empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text3);
}
.empty-state-icon { font-size: 36px; margin-bottom: 12px; opacity: .4; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state-sub { font-size: 12.5px; color: var(--text2); max-width: 360px; margin: 0 auto 20px; line-height: 1.6; }

/* Notification panel polish */
.notif-item {
  display: flex;
  flex-direction: column;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  cursor: pointer;
  transition: background .1s;
  border-left: 2.5px solid transparent;
}
.notif-item:hover { background: var(--bg2); }
.notif-item:last-child { border-bottom: none; }
.ni-t {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
  line-height: 1.3;
}
.ni-d {
  font-size: 10.5px;
  color: var(--text3);
  line-height: 1.4;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 52px 24px;
}
.empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: .35;
}
.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -.01em;
}
.empty-sub {
  font-size: 12.5px;
  color: var(--text2);
  max-width: 360px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* Topbar district button */
#district-btn {
  font-family: var(--ui);
  letter-spacing: -.01em;
}

/* Smoother district dropdown */
#district-menu {
  animation: mfadein .12s ease;
}

/* Better scrollbar in notif panel */
#notif .notif-body::-webkit-scrollbar { width: 3px; }
#notif .notif-body::-webkit-scrollbar-thumb { background: var(--line3); border-radius: 2px; }

/* ============================================
   INVESTOR-GRADE POLISH — Session 14
   ============================================ */

/* Base transitions everywhere */
*, *::before, *::after {
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

/* Topbar — taller, cleaner */
#topbar {
  height: 52px !important;
  padding: 0 24px !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  background: #0f172a !important;
  border-bottom: 1px solid rgba(16,185,129,0.25) !important;
  box-shadow: 0 1px 12px rgba(0,0,0,0.3) !important;
}
#topbar-district { font-size: 13px !important; font-weight: 600 !important; color: #f8fafc !important; letter-spacing: 0.01em; }
#topbar-sub { font-size: 11px !important; color: rgba(255,255,255,0.45) !important; font-weight: 400 !important; }

/* Sidebar — premium */
#sidebar {
  background: #ffffff !important;
  border-right: 1px solid #f1f5f9 !important;
  box-shadow: 2px 0 16px rgba(0,0,0,0.04) !important;
  width: 240px !important;
}
#sidebar .logo-area { padding: 20px 20px 12px !important; border-bottom: 1px solid #f1f5f9 !important; margin-bottom: 8px !important; }
#sidebar .logo-area .logo-text { font-size: 17px !important; font-weight: 800 !important; color: #0f172a !important; letter-spacing: -0.02em; }
#sidebar .logo-area .logo-sub { font-size: 9px !important; color: #94a3b8 !important; font-weight: 600 !important; letter-spacing: 0.12em !important; text-transform: uppercase !important; }
#sidebar .clock { font-size: 18px !important; font-weight: 700 !important; color: #0f172a !important; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
#sidebar .clock-date { font-size: 10px !important; color: #94a3b8 !important; font-weight: 500 !important; }
#sidebar .district-name { font-size: 12.5px !important; font-weight: 700 !important; color: #0f172a !important; line-height: 1.3 !important; }
#sidebar .district-fy { font-size: 10.5px !important; color: #64748b !important; font-weight: 500 !important; }

/* Nav section labels */
#sidebar .nav-section-label {
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  color: #cbd5e1 !important;
  text-transform: uppercase !important;
  padding: 16px 20px 4px !important;
}

/* Nav items */
#sidebar .nav-item {
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  padding: 8px 20px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #475569 !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  gap: 8px !important;
}
#sidebar .nav-item:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}
#sidebar .nav-item.active {
  background: linear-gradient(90deg, rgba(16,185,129,0.08) 0%, transparent 100%) !important;
  color: #059669 !important;
  font-weight: 600 !important;
  border-left: 2px solid #10b981 !important;
}
#sidebar .badge {
  margin-left: auto !important;
  background: #ef4444 !important;
  color: white !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  padding: 1px 6px !important;
  border-radius: 10px !important;
  min-width: 18px !important;
  text-align: center !important;
}

/* Main content area */
#main-content, .main-content, [id*="view"], .view {
  background: #f8fafc !important;
}

/* Page hero/banner headers */
.page-banner, .view-header, .module-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  padding: 28px 32px 24px !important;
  border-bottom: 1px solid rgba(16,185,129,0.2) !important;
}
.page-banner h1, .view-header h1, .module-header h1 {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 16px !important;
}

/* KPI stat cards in banner */
.stat-card, .kpi-card, .banner-stat {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 10px !important;
  padding: 14px 18px !important;
  backdrop-filter: blur(8px) !important;
}
.stat-card .stat-value, .kpi-card .stat-value {
  font-size: 28px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.03em !important;
}
.stat-card .stat-label, .kpi-card .stat-label {
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  opacity: 0.6 !important;
  margin-top: 3px !important;
}

/* Alert / exception cards */
.alert-card, .exception-card, .finding-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 16px 18px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
  transition: box-shadow 0.18s ease, transform 0.18s ease !important;
}
.alert-card:hover, .exception-card:hover, .finding-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
  transform: translateY(-1px) !important;
}

/* Priority summary cards (Critical 1 / High 18 / Medium 3) */
.priority-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 20px 24px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
}
.priority-card .priority-count {
  font-size: 36px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.04em !important;
}
.priority-card .priority-label {
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  margin-top: 4px !important;
}
.priority-card .priority-sub {
  font-size: 11px !important;
  color: #94a3b8 !important;
  margin-top: 2px !important;
}

/* Tabs */
.tab-bar, .tab-nav { border-bottom: 1px solid #e2e8f0 !important; }
.tab, .tab-item {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 10px 0 !important;
  color: #94a3b8 !important;
  border-bottom: 2px solid transparent !important;
  cursor: pointer !important;
}
.tab.active, .tab-item.active {
  color: #059669 !important;
  border-bottom-color: #10b981 !important;
}

/* Buttons */
button, .btn {
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
}
.btn-primary, button.primary {
  background: #10b981 !important;
  color: white !important;
  border: none !important;
  padding: 8px 16px !important;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3) !important;
}
.btn-primary:hover, button.primary:hover {
  background: #059669 !important;
  box-shadow: 0 4px 12px rgba(16,185,129,0.4) !important;
  transform: translateY(-1px) !important;
}

/* Search inputs */
input[type=text], input[type=search], .search-input {
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  padding: 8px 14px !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  outline: none !important;
}
input[type=text]:focus, input[type=search]:focus, .search-input:focus {
  border-color: #10b981 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1) !important;
}

/* Tables */
table { border-collapse: collapse !important; width: 100% !important; }
thead th {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  padding: 10px 16px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
}
tbody tr {
  border-bottom: 1px solid #f1f5f9 !important;
  transition: background 0.12s ease !important;
}
tbody tr:hover { background: #f8fafc !important; }
tbody td { padding: 11px 16px !important; font-size: 12.5px !important; color: #334155 !important; }

/* Data feeds active pill */
.data-feeds-badge, [class*="feeds"] {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #10b981 !important;
}

/* Scrollbar polish */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* Data cells — number formatting */
.num, .amount, .currency {
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" !important;
}


/* ============================================================
   INVESTOR-GRADE POLISH v2 — WhiteOak.IO Session 14
   Targets real class names from the platform
   ============================================================ */

/* --- Global transitions for fluidity --- */
.sn-item, .kpi4 > div, table tr, button, input, .card, .inv-row, .exc-card {
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease !important;
}

/* --- Sidebar refinements --- */
#sidebar {
  background: #fff !important;
  border-right: 1px solid #f1f5f9 !important;
  box-shadow: 1px 0 0 #f1f5f9, 4px 0 24px rgba(0,0,0,0.03) !important;
}
.sb-wm-name {
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: #0f172a !important;
}
.sb-wm-tag {
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
}
.clk-hms {
  font-size: 19px !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: #0f172a !important;
  font-variant-numeric: tabular-nums !important;
}
.mc { font-size: 10px !important; color: #94a3b8 !important; font-weight: 600 !important; }
.clk-date { font-size: 10px !important; color: #64748b !important; font-weight: 500 !important; }
.live-dot { background: #10b981 !important; width: 6px !important; height: 6px !important; border-radius: 50% !important; display: inline-block !important; margin-right: 5px !important; box-shadow: 0 0 0 2px rgba(16,185,129,0.2) !important; }
.live-lbl { font-size: 10px !important; color: #10b981 !important; font-weight: 600 !important; }
.sb-org-name { font-size: 12.5px !important; font-weight: 700 !important; color: #0f172a !important; line-height: 1.35 !important; }
.sb-org-fy { font-size: 10.5px !important; color: #64748b !important; font-weight: 500 !important; }

/* Nav section labels */
.sn-sec {
  font-size: 8px !important;
  letter-spacing: 0.14em !important;
  color: #cbd5e1 !important;
  padding: 14px 18px 5px !important;
  font-weight: 700 !important;
}
/* Nav items */
.sn-item {
  padding: 7px 18px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #475569 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  border-left: 2px solid transparent !important;
}
.sn-item:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-left-color: #e2e8f0 !important;
}
.sn-item.active, .sn-item[data-active="true"] {
  background: linear-gradient(90deg, rgba(16,185,129,0.07) 0%, transparent 100%) !important;
  color: #059669 !important;
  font-weight: 600 !important;
  border-left-color: #10b981 !important;
}
/* Badge numbers on nav */
.sn-badge {
  margin-left: auto !important;
  background: #fee2e2 !important;
  color: #dc2626 !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  padding: 1px 6px !important;
  border-radius: 10px !important;
  min-width: 18px !important;
  text-align: center !important;
}

/* --- Topbar --- */
#topbar {
  background: #0f172a !important;
  border-bottom: 1px solid rgba(16,185,129,0.2) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2), 0 2px 12px rgba(0,0,0,0.15) !important;
  min-height: 48px !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
}
.tb-district { font-size: 13px !important; font-weight: 700 !important; color: #f8fafc !important; letter-spacing: 0.01em !important; }
.tb-sub { font-size: 10.5px !important; color: rgba(255,255,255,0.4) !important; }
.tb-btn {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 7px !important;
  color: rgba(255,255,255,0.7) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 5px 12px !important;
  cursor: pointer !important;
}
.tb-btn:hover {
  background: rgba(255,255,255,0.14) !important;
  color: #fff !important;
}

/* --- Main content --- */
#main { background: #f8fafc !important; }

/* --- KPI grid cards (the 4-up stats) --- */
.kpi4 {
  border: none !important;
  border-radius: 12px !important;
  overflow: visible !important;
  gap: 12px !important;
  grid-template-columns: repeat(4, 1fr) !important;
  margin-bottom: 16px !important;
}
.kpi4 > div {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}
.kpi4 > div:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
  transform: translateY(-1px) !important;
  border-color: #d1fae5 !important;
}
.kv18 {
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  line-height: 1 !important;
}
.kdelta { font-size: 10px !important; font-weight: 600 !important; }
.klabel {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  margin-top: 5px !important;
}

/* --- Module headers --- */
.mod-hdr {
  padding: 0 0 14px !important;
  margin-bottom: 16px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}
.mod-hdr h2, .mod-hdr .mod-title {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
}
.mod-hdr .mod-sub {
  font-size: 11.5px !important;
  color: #64748b !important;
  font-weight: 500 !important;
  margin-top: 2px !important;
}

/* --- Tables --- */
table { border-collapse: collapse !important; width: 100% !important; }
thead th {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  padding: 9px 14px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  white-space: nowrap !important;
}
tbody tr {
  border-bottom: 1px solid #f8fafc !important;
}
tbody tr:hover { background: #f0fdf9 !important; }
tbody td {
  padding: 10px 14px !important;
  font-size: 12.5px !important;
  color: #334155 !important;
  font-variant-numeric: tabular-nums !important;
}

/* --- Buttons --- */
.btn-sm, button.sm {
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 5px 12px !important;
  cursor: pointer !important;
  border: none !important;
}
button[onclick*="genPacket"], .gen-btn {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 9px 20px !important;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3) !important;
  cursor: pointer !important;
}

/* --- Search inputs --- */
input[type=text], input[type=search], #gsearch-inp {
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  background: #f8fafc !important;
  color: #0f172a !important;
}
input:focus {
  border-color: #10b981 !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12) !important;
  outline: none !important;
}

/* --- Exception / audit cards --- */
.exc-card, .exc-item, .finding-item {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 14px 18px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  margin-bottom: 10px !important;
}
.exc-card:hover, .exc-item:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.07) !important;
  transform: translateY(-1px) !important;
}

/* --- Status badges --- */
.badge-approved, .status-approved { background: #dcfce7 !important; color: #15803d !important; border-radius: 6px !important; padding: 2px 8px !important; font-size: 10px !important; font-weight: 700 !important; }
.badge-pending, .status-pending { background: #fef9c3 !important; color: #a16207 !important; border-radius: 6px !important; padding: 2px 8px !important; font-size: 10px !important; font-weight: 700 !important; }
.badge-flagged, .status-flagged { background: #fee2e2 !important; color: #dc2626 !important; border-radius: 6px !important; padding: 2px 8px !important; font-size: 10px !important; font-weight: 700 !important; }

/* --- Scrollbars --- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* --- Cards in views --- */
.card, [class*="-card"] {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
}

/* --- Alert banner cards (the horizontal scrolling ones) --- */
.alert-item, .alert-banner-card {
  border-radius: 10px !important;
  padding: 14px 18px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

/* --- Progress / utilization bars --- */
.prog-bar, .util-bar, progress {
  border-radius: 4px !important;
  height: 5px !important;
  overflow: hidden !important;
}
.prog-fill, .util-fill {
  border-radius: 4px !important;
  transition: width 0.6s ease !important;
}

/* --- Tabs --- */
.tab-bar, .tabs {
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex !important;
  gap: 0 !important;
}
.tab-btn, .tab {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 9px 16px !important;
  color: #94a3b8 !important;
  border-bottom: 2px solid transparent !important;
  cursor: pointer !important;
  transition: color 0.15s, border-color 0.15s !important;
  background: none !important;
  border-top: none !important; border-left: none !important; border-right: none !important;
}
.tab-btn:hover, .tab:hover { color: #475569 !important; }
.tab-btn.active, .tab.active, .tab-btn[data-active] { color: #059669 !important; border-bottom-color: #10b981 !important; }

/* --- Toast notifications --- */
#toasts { gap: 8px !important; }
.toast {
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 10px 16px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
  backdrop-filter: blur(8px) !important;
}

/* --- number formatting --- */
.mono, .amount, .currency, .num {
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" !important;
}

/* ── Banner / Header readability fixes ── */
/* Board Packet header */
.bp-hdr, .packet-hdr, [class*="bp-hdr"] {
  background: #0f172a !important;
}
.bp-hdr *, .packet-hdr * { color: #f8fafc !important; }

/* Exceptions & Audit Readiness banner */
.exc-banner, .audit-banner, .view-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}
.exc-banner h1, .audit-banner h1, .view-banner h1,
.exc-banner h2, .audit-banner h2, .view-banner h2 { color: #ffffff !important; }
.exc-banner .sub, .audit-banner .sub, .view-banner .sub,
.exc-banner p, .audit-banner p, .view-banner p { color: rgba(255,255,255,0.6) !important; }

/* Generic dark banner — ensure all text is white */
.mod-banner { background: #0f172a !important; }
.mod-banner * { color: rgba(255,255,255,0.85) !important; }
.mod-banner h1, .mod-banner h2, .mod-banner .title { color: #ffffff !important; font-weight: 700 !important; }
.mod-banner .kv, .mod-banner .stat-val { color: #ffffff !important; }
.mod-banner .klabel, .mod-banner .stat-lbl { color: rgba(255,255,255,0.5) !important; }

/* KPI numbers in dark banners — make them pop */
.kpi4 .kv18 { color: var(--text) !important; }
[style*="background:#0f172a"] .kv18,
[style*="background: #0f172a"] .kv18,
[style*="background:#1e293b"] .kv18 { color: #ffffff !important; }
[style*="background:#0f172a"] .klabel,
[style*="background:#1e293b"] .klabel { color: rgba(255,255,255,0.5) !important; }

/* Board Packet cards — dark bg with readable text */
.bp-card {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
  padding: 16px 20px !important;
}
.bp-card * { color: rgba(255,255,255,0.85) !important; }
.bp-card h3, .bp-card .bp-title { color: #ffffff !important; font-weight: 700 !important; }
.bp-card .bp-sub { color: rgba(255,255,255,0.55) !important; font-size: 11px !important; }

/* ── Sidebar font compression ── */
/* Logo area */
.sb-wm-name { font-size: 14px !important; font-weight: 800 !important; letter-spacing: -0.02em !important; }
.sb-wm-tag  { font-size: 7.5px !important; letter-spacing: 0.14em !important; color: #94a3b8 !important; }

/* Clock — smaller */
.clk-hms { font-size: 16px !important; font-weight: 700 !important; letter-spacing: -0.02em !important; }
.mc       { font-size: 9px !important; color: #94a3b8 !important; }
.clk-date { font-size: 9.5px !important; color: #64748b !important; }

/* Org name */
.sb-org-name { font-size: 11.5px !important; font-weight: 700 !important; line-height: 1.3 !important; }
.sb-org-fy   { font-size: 9.5px !important; color: #64748b !important; }

/* Nav section labels */
.sn-sec { font-size: 7.5px !important; letter-spacing: 0.14em !important; padding: 12px 16px 3px !important; color: #c0c9d8 !important; }

/* Nav items — tighter */
.sn-item { padding: 5px 16px !important; font-size: 12px !important; }
.sn-item .sn-lbl { font-size: 12px !important; }

/* Sidebar sections — less space between them */
#sidebar .sb-clock  { padding: 8px 16px 6px !important; }
#sidebar .sb-org    { padding: 8px 16px 8px !important; border-bottom: 1px solid #f1f5f9; }
#sidebar .sb-logo   { padding: 14px 16px 12px !important; border-bottom: 1px solid #f1f5f9; }

/* Live dot smaller */
.live-dot { width: 5px !important; height: 5px !important; }
.live-lbl { font-size: 9.5px !important; }

/* ── TOPBAR GRADIENT — matches login screen DNA ── */
#topbar {
  background:
    linear-gradient(155deg, #060f1e 0%, #0a2818 50%, #060f1e 100%) !important;
  position: relative !important;
  overflow: vidden !important;
  border-bottom: 1px solid rgba(10,158,92,0.2) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3), 0 2px 20px rgba(0,0,0,0.25) !important;
  min-height: 50px !important;
}

/* Radial glow layers — same as login */
#topbar::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    radial-gradient(ellipse 50% 120% at 100% 50%, rgba(10,158,92,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 30% 120% at 0% 50%, rgba(10,60,140,0.2) 0%, transparent 55%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* Subtle grid overlay — same as login */
#topbar::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background-image:
    linear-gradient(rgba(10,158,92,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,158,92,0.04) 1px, transparent 1px) !important;
  background-size: 32px 32px !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* All topbar children above the pseudo-elements */
#topbar > * { position: relative !important; z-index: 1 !important; }
#topbar button { position: relative !important; z-index: 1 !important; }

/* Topbar text colors on the gradient bg */
.tb-org {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: 0.01em !important;
}
.tb-mod {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: rgba(255,255,255,0.75) !important;
  letter-spacing: 0.01em !important;
}
.tb-sep {
  width: 1px !important;
  height: 16px !important;
  background: rgba(255,255,255,0.15) !important;
  margin: 0 12px !important;
  display: inline-block !important;
  vertical-align: middle !important;
}
#topbar [style*="color:var(--text"] { color: rgba(255,255,255,0.6) !important; }
#district-btn { color: #fff !important; }
#district-btn span { color: rgba(255,255,255,.85) !important; }
#topbar [style*="color:var(--green"] { color: #34d399 !important; }

/* Ask AI button on gradient bg */
#topbar button[onclick*="openAIChat"] {
  background: rgba(10,158,92,0.15) !important;
  border: 1px solid rgba(10,158,92,0.35) !important;
  color: #34d399 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  padding: 5px 13px !important;
  letter-spacing: 0.02em !important;
  backdrop-filter: blur(4px) !important;
}
#topbar button[onclick*="openAIChat"]:hover {
  background: rgba(10,158,92,0.25) !important;
  border-color: rgba(10,158,92,0.5) !important;
  color: #6ee7b7 !important;
}

/* Other topbar icon buttons */
#topbar button:not([onclick*="openAIChat"]):not([id="menu-btn"]) {
  color: rgba(255,255,255,0.6) !important;
}
#topbar button:not([onclick*="openAIChat"]):not([id="menu-btn"]):hover {
  color: rgba(255,255,255,0.9) !important;
  background: rgba(255,255,255,0.08) !important;
  border-radius: 6px !important;
}

/* District/org name below BUSD label */
#topbar span[title] { color: rgba(255,255,255,0.45) !important; }

/* Notification badge */
#topbar .notif-badge, #topbar [class*="badge"] {
  background: #ef4444 !important;
  color: white !important;
  border-radius: 10px !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  padding: 1px 5px !important;
}

/* ── Banner readability ── */
.mod-banner, .view-banner { background: #0f172a !important; }
.mod-banner *, .view-banner * { color: rgba(255,255,255,0.85) !important; }
.mod-banner h1, .mod-banner h2, .mod-banner .title,
.view-banner h1, .view-banner h2 { color: #ffffff !important; font-weight: 700 !important; }
.mod-banner .kv18, .view-banner .kv18 { color: #ffffff !important; font-size: 28px !important; font-weight: 800 !important; }
.mod-banner .klabel, .view-banner .klabel { color: rgba(255,255,255,0.5) !important; font-size: 9px !important; letter-spacing: 0.1em !important; text-transform: uppercase !important; }
/* Exceptions & Board Packet dark headers - force white text on any dark bg */
[style*="background:#0f172a"] *, [style*="background: #0f172a"] *,
[style*="background:#1e293b"] *, [style*="background: #1e293b"] *,
[style*="background:linear-gradient"] .kv18,
[style*="background: linear-gradient"] .kv18 { color: rgba(255,255,255,0.9) !important; }
[style*="background:#0f172a"] .klabel,
[style*="background:#1e293b"] .klabel { color: rgba(255,255,255,0.45) !important; }
/* Board Packet section cards */
.bp-card, .sect-card {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
}
.bp-card *, .sect-card * { color: rgba(255,255,255,0.85) !important; }
.bp-card h3, .sect-card h3 { color: #fff !important; font-weight: 700 !important; }

/* WhiteOak Polish v4 */
#topbar{background:linear-gradient(155deg,#060f1e 0%,#0a2818 50%,#060f1e 100%)!important;border-bottom:1px solid rgba(10,158,92,.2)!important;box-shadow:0 2px 20px rgba(0,0,0,.25)!important;}
.tb-org{color:#fff!important;font-weight:700!important;}
.tb-mod{color:rgba(255,255,255,.75)!important;}
.sb-wm-name{font-size:14px!important;font-weight:800!important;}
.clk-hms{font-size:16px!important;font-weight:700!important;}
.mc,.clk-date{font-size:9.5px!important;}
.sb-org-name{font-size:11.5px!important;font-weight:700!important;}
.sn-sec{font-size:7.5px!important;padding:12px 16px 3px!important;color:#c0c9d8!important;}
.sn-item{padding:5px 16px!important;font-size:12px!important;}
.kpi4{gap:10px!important;border:none!important;overflow:visible!important;}
.kpi4>div{border-radius:10px!important;box-shadow:0 1px 4px rgba(0,0,0,.04)!important;}
::-webkit-scrollbar{width:5px;}
::-webkit-scrollbar-thumb{background:#e2e8f0;border-radius:4px;}

/* ============================================================
   INVESTOR POLISH v3 — Full Pass
   ============================================================ */

/* ── TOPBAR: single-row gradient, clean & professional ── */
#topbar {
  background: linear-gradient(155deg, #060f1e 0%, #0a2818 50%, #060f1e 100%) !important;
  border-bottom: 1px solid rgba(10,158,92,0.22) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3), 0 2px 16px rgba(0,0,0,0.2) !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  position: relative !important;
  overflow: hidden !important;
}
#topbar::before {
  content: '' !important;
  position: absolute !important; inset: 0 !important;
  background:
    radial-gradient(ellipse 40% 120% at 100% 50%, rgba(10,158,92,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 25% 120% at 0% 50%, rgba(10,60,140,0.18) 0%, transparent 55%) !important;
  pointer-events: none !important; z-index: 0 !important;
}
#topbar::after {
  content: '' !important; position: absolute !important; inset: 0 !important;
  background-image:
    linear-gradient(rgba(10,158,92,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,158,92,0.035) 1px, transparent 1px) !important;
  background-size: 28px 28px !important;
  pointer-events: none !important; z-index: 0 !important;
}
#topbar > * { position: relative !important; z-index: 1 !important; }

/* Topbar breadcrumb text */
.tb-bc { gap: 0 !important; flex-direction: row !important; align-items: center !important; }
.tb-org { font-size: 11.5px !important; font-weight: 700 !important; color: rgba(255,255,255,0.55) !important; white-space: nowrap !important; }
.tb-sep { width: 1px !important; height: 12px !important; background: rgba(255,255,255,0.18) !important; margin: 0 10px !important; display: inline-block !important; flex-shrink: 0 !important; }
.tb-mod { font-size: 12.5px !important; font-weight: 700 !important; color: #ffffff !important; letter-spacing: -0.01em !important; }

/* Topbar buttons */
.tb-btn { color: rgba(255,255,255,0.55) !important; border-radius: 6px !important; }
.tb-btn:hover { background: rgba(255,255,255,0.1) !important; color: #fff !important; }

/* Ask AI button */
#topbar button[onclick*="openAIChat"],
#topbar button[onclick*="aiChat"] {
  background: rgba(10,158,92,0.14) !important;
  border: 1px solid rgba(10,158,92,0.32) !important;
  color: #34d399 !important;
  font-size: 11px !important; font-weight: 700 !important;
  border-radius: 6px !important; padding: 4px 12px !important;
}
#topbar button[onclick*="openAIChat"]:hover,
#topbar button[onclick*="aiChat"]:hover {
  background: rgba(10,158,92,0.24) !important;
  color: #6ee7b7 !important;
}
#topbar [style*="color:var(--text"] { color: rgba(255,255,255,0.55) !important; }
#topbar [style*="color:var(--green"] { color: #34d399 !important; }
#topbar span[style*="font-size:9px"] { color: rgba(255,255,255,0.35) !important; }

/* ── SECOND BAR: the module title bar (.mhd) ── */
.mhd {
  padding: 10px 18px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
}
.mhd-t {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
  font-family: var(--ui) !important;
  font-style: normal !important;
}
/* The italic serif district title in content area */
.tb-title {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
}

/* ── SIDEBAR: tighter, more compressed ── */
#sidebar { width: 220px !important; min-width: 220px !important; }

/* Logo area */
.sb-logo { padding: 12px 14px 10px !important; border-bottom: 1px solid #f1f5f9 !important; }
.sb-wm-name { font-size: 14px !important; font-weight: 800 !important; letter-spacing: -0.03em !important; color: #0f172a !important; }
.sb-wm-tag { font-size: 7px !important; letter-spacing: 0.14em !important; color: #94a3b8 !important; font-weight: 700 !important; text-transform: uppercase !important; }

/* Clock */
.sb-clock { padding: 8px 14px 6px !important; }
.clk-hms { font-size: 15px !important; font-weight: 700 !important; letter-spacing: -0.03em !important; color: #0f172a !important; font-variant-numeric: tabular-nums !important; }
.mc { font-size: 8.5px !important; color: #94a3b8 !important; font-weight: 600 !important; }
.clk-date { font-size: 9px !important; color: #64748b !important; font-weight: 500 !important; }
.live-dot { width: 5px !important; height: 5px !important; border-radius: 50% !important; }
.live-lbl { font-size: 9px !important; color: #10b981 !important; font-weight: 600 !important; }

/* Org name */
.sb-org { padding: 6px 14px 8px !important; border-bottom: 1px solid #f1f5f9 !important; }
.sb-org-name { font-size: 11px !important; font-weight: 700 !important; color: #0f172a !important; line-height: 1.3 !important; }
.sb-org-fy { font-size: 9.5px !important; color: #64748b !important; font-weight: 500 !important; }

/* Nav section labels */
.sn-sec {
  font-size: 7px !important; letter-spacing: 0.14em !important;
  color: #c8d3e0 !important; padding: 10px 14px 3px !important;
  font-weight: 700 !important; text-transform: uppercase !important;
}
/* Nav items — tight */
.sn-item {
  padding: 5px 14px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: #475569 !important;
  border-left: 2px solid transparent !important;
  gap: 7px !important;
}
.sn-item:hover { background: #f8fafc !important; color: #0f172a !important; border-left-color: #e2e8f0 !important; }
.sn-item.active {
  background: linear-gradient(90deg, rgba(16,185,129,0.07) 0%, transparent 100%) !important;
  color: #059669 !important; font-weight: 600 !important;
  border-left-color: #10b981 !important;
}
.sn-lbl { font-size: 11.5px !important; }
.sn-ic { font-size: 12px !important; width: 14px !important; text-align: center !important; }

/* Nav badge */
.sn-ct, .sn-badge {
  margin-left: auto !important; background: #fee2e2 !important;
  color: #dc2626 !important; font-size: 9px !important;
  font-weight: 800 !important; padding: 1px 5px !important;
  border-radius: 8px !important; min-width: 16px !important; text-align: center !important;
}

/* ── KPI CARDS: top colored border per status ── */
.kpi4 {
  gap: 10px !important; border: none !important;
  grid-template-columns: repeat(4,1fr) !important;
  margin-bottom: 14px !important;
}
.kpi4 > div {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 14px 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  border-top-width: 3px !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
.kpi4 > div:hover { transform: translateY(-1px) !important; box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important; }
.kpi4 > div:nth-child(1) { border-top-color: #10b981 !important; }
.kpi4 > div:nth-child(2) { border-top-color: #3b82f6 !important; }
.kpi4 > div:nth-child(3) { border-top-color: #f59e0b !important; }
.kpi4 > div:nth-child(4) { border-top-color: #8b5cf6 !important; }
.kv18 { font-size: 22px !important; font-weight: 800 !important; letter-spacing: -0.04em !important; line-height: 1 !important; }
.klabel { font-size: 9px !important; font-weight: 700 !important; letter-spacing: 0.09em !important; text-transform: uppercase !important; color: #94a3b8 !important; margin-top: 4px !important; }

/* ── TABLES: tighter rows ── */
thead th {
  font-size: 9px !important; font-weight: 700 !important;
  letter-spacing: 0.1em !important; text-transform: uppercase !important;
  color: #94a3b8 !important; padding: 8px 12px !important;
  border-bottom: 1px solid #e2e8f0 !important; background: #f8fafc !important;
}
tbody td { padding: 8px 12px !important; font-size: 12px !important; color: #334155 !important; }
tbody tr { border-bottom: 1px solid #f8fafc !important; }
tbody tr:hover { background: #f0fdf9 !important; }

/* ── PROGRESS BARS: thin & refined ── */
.util-bar, .prog-bar, [class*="prog-"] {
  height: 4px !important; border-radius: 4px !important; overflow: hidden !important;
}
.budget-bar, [style*="height:8px"], [style*="height: 8px"] {
  height: 5px !important; border-radius: 3px !important;
}

/* ── MODULE CONTENT: tighter padding ── */
#main > div { padding: 16px 20px !important; }
.mod-hdr { padding-bottom: 10px !important; margin-bottom: 14px !important; border-bottom: 1px solid #f1f5f9 !important; }
.mod-hdr h2, .mod-hdr .mod-title { font-size: 15px !important; font-weight: 700 !important; letter-spacing: -0.02em !important; color: #0f172a !important; }

/* ── SECTION HEADERS inside modules ── */
.section-hdr, h3 { font-size: 11px !important; font-weight: 700 !important; letter-spacing: 0.06em !important; text-transform: uppercase !important; color: #64748b !important; margin-bottom: 8px !important; }

/* ── INPUTS & SEARCH ── */
input[type=text], input[type=search], select {
  border: 1px solid #e2e8f0 !important; border-radius: 7px !important;
  font-size: 12px !important; padding: 6px 12px !important;
  background: #f8fafc !important; color: #0f172a !important;
}
input:focus, select:focus {
  border-color: #10b981 !important; background: #fff !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1) !important; outline: none !important;
}

/* ── BUTTONS ── */
button.btn-sm, .action-btn {
  border-radius: 7px !important; font-size: 11px !important;
  font-weight: 600 !important; padding: 5px 12px !important;
}

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* ── TRANSITIONS everywhere ── */
.sn-item, .kpi4 > div, tbody tr, button, input, select {
  transition: all 0.15s ease !important;
}

/* ── STATUS BADGES ── */
.status-badge, [class*="st-"], .inv-st {
  font-size: 10px !important; font-weight: 700 !important;
  padding: 2px 7px !important; border-radius: 6px !important;
  letter-spacing: 0.04em !important; text-transform: uppercase !important;
}

/* ── TOASTS ── */
.toast {
  border-radius: 9px !important; font-size: 11.5px !important;
  font-weight: 600 !important; padding: 9px 14px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

/* ── NUMBER FORMATTING ── */
.mono, .amount, .currency, .kv18, .clk-hms {
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" !important;
}

/* ── FIX: .mhd second bar — make it clean white, not dark ── */
.mhd {
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 8px 20px !important;
}
.mhd-t {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
  font-style: normal !important;
  font-family: inherit !important;
}
.mhd-sub, .mhd .sub {
  font-size: 10px !important;
  color: #64748b !important;
}

/* ── FIX: Topbar — single clean row, all text white ── */
.tb-bc {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0 !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.tb-org {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: rgba(255,255,255,0.5) !important;
  white-space: nowrap !important;
  letter-spacing: 0.01em !important;
}
.tb-sep {
  display: inline-block !important;
  width: 1px !important; height: 12px !important;
  background: rgba(255,255,255,0.2) !important;
  margin: 0 10px !important; flex-shrink: 0 !important;
}
.tb-mod {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
}
/* Hide the small org subtitle if it renders as second line */
.tb-bc > span[style*="font-size:9px"],
.tb-bc > div > span[style*="font-size:9px"] {
  display: none !important;
}

/* ── FIX: Italic serif page title — make it clean sans-serif ── */
.tb-title, .pg-title, h1.page-title {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
}

/* ============================================================
   TOPBAR + MODULE HEADER FINAL FIX
   ============================================================ */

/* ── Topbar: single clean gradient row ── */
#topbar {
  height: 46px !important;
  min-height: 46px !important;
  background: linear-gradient(155deg, #060f1e 0%, #0a2818 50%, #060f1e 100%) !important;
  border-bottom: 1px solid rgba(10,158,92,0.2) !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25) !important;
}
/* Kill the second dark bar appearance - make .mhd light and minimal */
.mhd {
  background: #ffffff !important;
  padding: 8px 20px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  min-height: 0 !important;
  height: auto !important;
}
.mhd-t {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #475569 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  font-family: var(--ui) !important;
  font-style: normal !important;
}
.mhd-x { display: none !important; }

/* ── Module hero title: replace big italic serif ── */
.m0-hero, .mod-hero, [class*="-hero"] {
  padding: 16px 20px 12px !important;
}
/* The big italic district name heading */
.tb-title {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
}
/* The subtitle row under the district name */
.pg-meta, .view-meta, .mod-meta {
  font-size: 11px !important;
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

/* ── Topbar text refinement ── */
.tb-org {
  font-size: 11px !important;
  color: rgba(255,255,255,0.5) !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
}
.tb-mod {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
}
.tb-sep {
  width: 1px !important; height: 14px !important;
  background: rgba(255,255,255,0.15) !important;
  display: inline-block !important;
  margin: 0 12px !important;
  flex-shrink: 0 !important;
}
/* Topbar right side items */
.tb-right { margin-left: auto !important; display: flex !important; align-items: center !important; gap: 6px !important; }
.tb-btn { color: rgba(255,255,255,0.5) !important; font-size: 13px !important; padding: 4px 6px !important; border-radius: 5px !important; }
.tb-btn:hover { background: rgba(255,255,255,0.1) !important; color: #fff !important; }

/* ── Budget Utilization bar: thinner ── */
.budget-bar-wrap, [class*="util-wrap"] { height: 6px !important; border-radius: 3px !important; overflow: hidden !important; background: #f1f5f9 !important; }
.budget-bar-fill, [class*="util-fill"] { height: 6px !important; border-radius: 3px !important; }

/* ── Fund detail table header ── */
.fund-hdr, .section-label {
  font-size: 10px !important; font-weight: 700 !important;
  letter-spacing: 0.08em !important; text-transform: uppercase !important;
  color: #94a3b8 !important; margin-bottom: 10px !important;
}

/* ── At Risk badge ── */
.risk-badge, [class*="risk-"] {
  font-size: 9.5px !important; font-weight: 700 !important;
  padding: 2px 8px !important; border-radius: 6px !important;
}

/* ============================================================
   INVESTOR GRADE POLISH v4 — 20-POINT FULL PASS
   ============================================================ */

/* ── 1. TOPBAR: collapse to true single row, gradient ── */
#topbar {
  height: 44px !important; min-height: 44px !important;
  background: linear-gradient(155deg,#060f1e 0%,#0a2818 50%,#060f1e 100%) !important;
  border-bottom: 1px solid rgba(10,158,92,.2) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,.25) !important;
  display: flex !important; align-items: center !important;
  padding: 0 18px !important; gap: 0 !important;
}
/* Kill the second dark bar */
.mhd {
  background: #fff !important; padding: 7px 20px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  min-height: 0 !important;
}
.mhd-t {
  font-size: 11px !important; font-weight: 700 !important;
  color: #64748b !important; text-transform: uppercase !important;
  letter-spacing: .07em !important; font-style: normal !important;
  font-family: var(--ui) !important;
}

/* ── 2. TOPBAR TEXT: proper contrast on gradient ── */
.tb-org { font-size: 10px !important; font-weight: 700 !important; color: rgba(255,255,255,.45) !important; text-transform: uppercase !important; letter-spacing: .06em !important; white-space: nowrap !important; }
.tb-sep { width: 1px !important; height: 12px !important; background: rgba(255,255,255,.15) !important; margin: 0 10px !important; flex-shrink: 0 !important; }
.tb-mod { font-size: 12.5px !important; font-weight: 700 !important; color: #fff !important; letter-spacing: -.01em !important; }
#topbar .tb-btn { color: rgba(255,255,255,.5) !important; border-radius: 5px !important; }
#topbar .tb-btn:hover { background: rgba(255,255,255,.1) !important; color: #fff !important; }
#topbar [style*="color:var(--text"] { color: rgba(255,255,255,.5) !important; }
#topbar span[style*="9px"] { color: rgba(255,255,255,.35) !important; }

/* ── 3. MODULE PAGE TITLE: remove big italic serif ── */
.tb-title {
  font-family: var(--ui) !important; font-style: normal !important;
  font-size: 16px !important; font-weight: 700 !important;
  color: #0f172a !important; letter-spacing: -.02em !important;
}
/* The subtitle line under module title */
.tb-sub, .pg-sub { font-size: 11px !important; color: #64748b !important; font-style: normal !important; font-family: var(--ui) !important; }

/* ── 4. SIDEBAR: tighter, more refined ── */
#sidebar { width: 218px !important; min-width: 218px !important; }
.sb-logo { padding: 12px 14px 10px !important; border-bottom: 1px solid #f1f5f9 !important; }
.sb-wm-name { font-size: 14px !important; font-weight: 800 !important; letter-spacing: -.03em !important; color: #0f172a !important; }
.sb-wm-tag { font-size: 7px !important; color: #94a3b8 !important; font-weight: 700 !important; letter-spacing: .14em !important; text-transform: uppercase !important; }
.sb-clock { padding: 8px 14px 5px !important; }
.clk-hms { font-size: 15px !important; font-weight: 700 !important; letter-spacing: -.03em !important; color: #0f172a !important; font-variant-numeric: tabular-nums !important; }
.mc { font-size: 8.5px !important; color: #94a3b8 !important; }
.clk-date { font-size: 9px !important; color: #64748b !important; }
.sb-org { padding: 5px 14px 7px !important; border-bottom: 1px solid #f1f5f9 !important; }
.sb-org-name { font-size: 11px !important; font-weight: 700 !important; color: #0f172a !important; line-height: 1.3 !important; }
.sb-org-fy { font-size: 9.5px !important; color: #64748b !important; }
.live-dot { width: 5px !important; height: 5px !important; }
.live-lbl { font-size: 9px !important; }

/* ── 5. NAV: tighter items, cleaner active state ── */
.sn-sec { font-size: 7px !important; letter-spacing: .14em !important; color: #c8d3e0 !important; padding: 10px 14px 2px !important; font-weight: 700 !important; }
.sn-item { padding: 5px 14px !important; font-size: 11.5px !important; font-weight: 500 !important; color: #475569 !important; border-left: 2px solid transparent !important; gap: 7px !important; border-radius: 0 !important; }
.sn-item:hover { background: #f8fafc !important; color: #0f172a !important; border-left-color: #e2e8f0 !important; }
.sn-item.active { background: linear-gradient(90deg,rgba(16,185,129,.07),transparent) !important; color: #059669 !important; font-weight: 600 !important; border-left-color: #10b981 !important; }
.sn-lbl { font-size: 11.5px !important; }
.sn-ct { margin-left: auto !important; background: #fee2e2 !important; color: #dc2626 !important; font-size: 9px !important; font-weight: 800 !important; padding: 1px 5px !important; border-radius: 8px !important; }

/* ── 6. KPI CARDS: colored top borders, hover lift ── */
.kpi4 { gap: 10px !important; border: none !important; margin-bottom: 14px !important; }
.kpi4 > div { background: #fff !important; border: 1px solid #e8edf3 !important; border-radius: 10px !important; padding: 14px 16px !important; box-shadow: 0 1px 4px rgba(0,0,0,.04) !important; border-top-width: 3px !important; }
.kpi4 > div:hover { transform: translateY(-2px) !important; box-shadow: 0 6px 18px rgba(0,0,0,.08) !important; }
.kpi4 > div:nth-child(1) { border-top-color: #10b981 !important; }
.kpi4 > div:nth-child(2) { border-top-color: #3b82f6 !important; }
.kpi4 > div:nth-child(3) { border-top-color: #f59e0b !important; }
.kpi4 > div:nth-child(4) { border-top-color: #8b5cf6 !important; }
.kpi4 > div:nth-child(5) { border-top-color: #ef4444 !important; }
.kv18 { font-size: 22px !important; font-weight: 800 !important; letter-spacing: -.04em !important; line-height: 1 !important; font-variant-numeric: tabular-nums !important; }
.klabel { font-size: 9px !important; font-weight: 700 !important; letter-spacing: .09em !important; text-transform: uppercase !important; color: #94a3b8 !important; margin-top: 5px !important; }
.kdelta { font-size: 10px !important; font-weight: 600 !important; }

/* ── 7. BANNER ALERTS: better contrast, refined ── */
.feed-warn, [class*="warn-bar"], .stale-bar {
  background: #fffbeb !important; border: 1px solid #fde68a !important;
  border-radius: 8px !important; padding: 10px 14px !important;
  font-size: 12px !important; color: #92400e !important;
  margin-bottom: 10px !important;
}
.feed-err, [class*="err-bar"] {
  background: #fef2f2 !important; border: 1px solid #fecaca !important;
  border-radius: 8px !important; padding: 10px 14px !important;
  font-size: 12px !important; color: #991b1b !important;
  margin-bottom: 10px !important;
}

/* ── 8. TABS: clean underline style ── */
.tab-bar, [class*="tab-row"], .view-tabs {
  display: flex !important; border-bottom: 1px solid #e2e8f0 !important;
  gap: 0 !important; margin-bottom: 14px !important;
}
.tab, .tab-btn, [class*="-tab"] {
  font-size: 10.5px !important; font-weight: 700 !important;
  letter-spacing: .07em !important; text-transform: uppercase !important;
  padding: 8px 14px !important; color: #94a3b8 !important;
  border-bottom: 2px solid transparent !important;
  background: none !important; border-top: none !important;
  border-left: none !important; border-right: none !important;
  cursor: pointer !important;
}
.tab:hover, .tab-btn:hover { color: #475569 !important; }
.tab.active, .tab-btn.active, [class*="-tab"].active { color: #059669 !important; border-bottom-color: #10b981 !important; }

/* ── 9. TABLES: tight, clean ── */
table { border-collapse: collapse !important; width: 100% !important; }
thead th { font-size: 9px !important; font-weight: 700 !important; letter-spacing: .1em !important; text-transform: uppercase !important; color: #94a3b8 !important; padding: 8px 12px !important; border-bottom: 1px solid #e2e8f0 !important; background: #f8fafc !important; white-space: nowrap !important; }
tbody td { padding: 9px 12px !important; font-size: 12px !important; color: #334155 !important; font-variant-numeric: tabular-nums !important; border-bottom: 1px solid #f8fafc !important; }
tbody tr:hover { background: #f0fdf9 !important; }
tbody tr:last-child td { border-bottom: none !important; }

/* ── 10. RULE / FILTER CHIPS ── */
.rule-chip, .filter-chip, [class*="-chip"] {
  display: inline-flex !important; align-items: center !important;
  background: #f1f5f9 !important; border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important; padding: 3px 9px !important;
  font-size: 10.5px !important; font-weight: 700 !important;
  color: #475569 !important; cursor: pointer !important;
  transition: all .15s ease !important;
}
.rule-chip:hover, .filter-chip:hover { background: #e8edf3 !important; color: #0f172a !important; }

/* ── 11. STAT ROW (15 | 15 | $1.04M) ── */
.stat-row, .inv-stats, [class*="stat-row"] {
  display: flex !important; gap: 0 !important;
  border: 1px solid #e2e8f0 !important; border-radius: 10px !important;
  overflow: hidden !important; margin-bottom: 14px !important;
  background: #fff !important;
}
.stat-row > *, .inv-stats > * {
  flex: 1 !important; padding: 12px 16px !important;
  border-right: 1px solid #f1f5f9 !important;
}
.stat-row > *:last-child, .inv-stats > *:last-child { border-right: none !important; }

/* ── 12. PROGRESS BAR: thin & elegant ── */
[style*="height:8px"], [style*="height: 8px"], .prog-track {
  height: 5px !important; border-radius: 4px !important; overflow: hidden !important;
}
[style*="height:6px"], .prog-bar { height: 5px !important; border-radius: 4px !important; }

/* ── 13. CONTENT AREA: tighter padding ── */
.rpage { padding: 18px 22px !important; }
.section-page { padding: 14px 0 !important; }
.mod-hdr { padding-bottom: 10px !important; margin-bottom: 14px !important; border-bottom: 1px solid #f1f5f9 !important; }

/* ── 14. SECTION LABELS ── */
.sec-label, .section-label, [class*="sec-hdr"] {
  font-size: 9.5px !important; font-weight: 700 !important;
  letter-spacing: .1em !important; text-transform: uppercase !important;
  color: #94a3b8 !important; margin-bottom: 8px !important;
}

/* ── 15. BUTTONS: refined ── */
button, .btn {
  font-family: var(--ui) !important; font-weight: 600 !important;
  cursor: pointer !important; transition: all .15s ease !important;
}
.btn-primary, button[class*="primary"], button[class*="gen-"] {
  background: linear-gradient(135deg,#10b981,#059669) !important;
  color: #fff !important; border: none !important;
  border-radius: 8px !important; font-size: 12px !important;
  font-weight: 700 !important; padding: 8px 18px !important;
  box-shadow: 0 2px 8px rgba(16,185,129,.3) !important;
}
.btn-primary:hover { box-shadow: 0 4px 14px rgba(16,185,129,.4) !important; transform: translateY(-1px) !important; }

/* ── 16. INPUTS & SEARCH ── */
input[type=text], input[type=search], select, textarea {
  border: 1px solid #e2e8f0 !important; border-radius: 7px !important;
  font-size: 12px !important; background: #f8fafc !important;
  color: #0f172a !important; font-family: var(--ui) !important;
}
input:focus, select:focus, textarea:focus {
  border-color: #10b981 !important; background: #fff !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,.1) !important; outline: none !important;
}

/* ── 17. STATUS BADGES ── */
.st-app, .status-approved, [class*="approved"] { background: #dcfce7 !important; color: #15803d !important; border-radius: 6px !important; padding: 2px 7px !important; font-size: 9.5px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: .04em !important; }
.st-pend, .status-pending, [class*="pending"] { background: #fef9c3 !important; color: #a16207 !important; border-radius: 6px !important; padding: 2px 7px !important; font-size: 9.5px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: .04em !important; }
.st-flag, .status-flagged, [class*="flagged"], [class*="flag"] { background: #fee2e2 !important; color: #dc2626 !important; border-radius: 6px !important; padding: 2px 7px !important; font-size: 9.5px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: .04em !important; }

/* ── 18. CARDS: consistent rounding & shadow ── */
.card, [class*="-card"], [class*="card-"] {
  background: #fff !important; border: 1px solid #e8edf3 !important;
  border-radius: 10px !important; box-shadow: 0 1px 4px rgba(0,0,0,.04) !important;
  transition: box-shadow .15s ease, transform .15s ease !important;
}
.card:hover, [class*="-card"]:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07) !important; }

/* ── 19. SCROLLBARS ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* ── 20. TRANSITIONS: everything fluid ── */
*, *::before, *::after { box-sizing: border-box !important; }
.sn-item, .kpi4 > div, tbody tr, button, input, select, .card, [class*="-card"], .tab, .tab-btn {
  transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease, border-color .15s ease !important;
}

/* ── BONUS: Toast & misc ── */
.toast { border-radius: 9px !important; font-size: 11.5px !important; font-weight: 600 !important; padding: 9px 14px !important; box-shadow: 0 4px 20px rgba(0,0,0,.15) !important; }
.mono, .kv18, .clk-hms, [class*="amount"], [class*="currency"] { font-variant-numeric: tabular-nums !important; font-feature-settings: "tnum" !important; }

/* ============================================================
   MODULE LAYOUT FIXES — Session 14
   ============================================================ */

/* ── krow: make cards go HORIZONTAL across the screen ── */
.krow {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
  width: 100% !important;
}
.kcard {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-top: 3px solid var(--kc, var(--green)) !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
  transition: transform .15s, box-shadow .15s !important;
  min-width: 0 !important;
}
.kcard:hover { transform: translateY(-1px) !important; box-shadow: 0 4px 12px rgba(0,0,0,.08) !important; }
.klbl { font-size: 9px !important; font-weight: 700 !important; letter-spacing: .1em !important; text-transform: uppercase !important; color: #94a3b8 !important; margin-bottom: 5px !important; }
.kval { font-size: 20px !important; font-weight: 800 !important; letter-spacing: -.03em !important; line-height: 1 !important; font-variant-numeric: tabular-nums !important; }
.kdelta { font-size: 10.5px !important; color: #64748b !important; margin-top: 3px !important; }

/* ── Encumbrance Ledger fund cards ── */
.enc-fund-card {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9px !important;
  padding: 10px 14px !important;
  font-size: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
}

/* ── Stale feed banners: small, green gradient ── */
.feed-warn, [style*="border-left:3px solid var(--yellow)"],
[style*="border-left: 3px solid var(--yellow)"] {
  padding: 6px 12px !important;
  background: linear-gradient(135deg, rgba(5,150,105,.06), rgba(5,150,105,.02)) !important;
  border: 1px solid rgba(5,150,105,.2) !important;
  border-left: 3px solid rgba(5,150,105,.5) !important;
  border-radius: 6px !important;
  font-size: 10.5px !important;
  margin-bottom: 8px !important;
}

/* ── Board packet hero text: black bold ── */
.bp-hero-st {
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 14px !important;
}
.bp-hero-sub {
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 10px !important;
  letter-spacing: .1em !important;
}

/* ── Exceptions banner: move to bottom — hide at top, show at bottom via CSS ── */
/* Make the stale warn banner at top of invoice validation smaller */
.mfade > [style*="border-left"][style*="yellow"],
.mfade > [style*="background:#fff"][style*="yellow"] {
  font-size: 10.5px !important;
  padding: 6px 12px !important;
  margin-bottom: 8px !important;
  order: 999 !important;
}

/* ── Users & Permissions role cards ── */
.role-card, [class*="role-card"] {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9px !important;
  padding: 10px 14px !important;
  font-size: 12px !important;
}

/* ── Budget Overview: Data Feeds + Quick Access 2-col grid ── */
.m0-sidebar .panel {
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
  margin-bottom: 10px !important;
}

/* ── Module title: clean sans-serif everywhere ── */
.mtitle {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -.02em !important;
}
.msub {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-size: 11px !important;
  color: #64748b !important;
  font-weight: 400 !important;
  margin-top: 2px !important;
}

/* ── Encumbrance Ledger: gradient green background on status badge ── */
.enc-status-ok {
  background: linear-gradient(135deg, rgba(5,150,105,.1), rgba(5,150,105,.05)) !important;
  color: #059669 !important;
  border: 1px solid rgba(5,150,105,.25) !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

/* ============================================================
   TARGETED FIXES — Invoice Validation + Exceptions
   ============================================================ */

/* ── 1. Stale banners: push to bottom, small ── */
.stale-section {
  margin-top: auto !important;
  order: 999 !important;
  font-size: 10px !important;
}
.stale-banner {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 10px !important;
  background: linear-gradient(135deg, rgba(5,150,105,.06), transparent) !important;
  border: 1px solid rgba(5,150,105,.18) !important;
  border-radius: 6px !important;
  font-size: 10px !important;
  color: #475569 !important;
  margin-bottom: 6px !important;
}
/* The top syn banner (Stale feeds: ...) */
.stale-section > div[style*="ydim"],
.stale-section > div[style*="yellow"] {
  font-size: 10px !important;
  padding: 5px 10px !important;
  margin-bottom: 4px !important;
}

/* ── 2. Invoice Validation: clean up filter row ── */
.mstrip { overflow: hidden !important; }
.mstrip .mstrip-btn {
  font-size: 10.5px !important;
  padding: 4px 10px !important;
  border-radius: 5px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

/* ── 3. Quick Access buttons: 3-col grid, no overflow ── */
.m0-quicknav {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  padding: 4px 0 !important;
}
.m0-qnav-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 8px 4px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  text-align: center !important;
  line-height: 1.2 !important;
  transition: all .15s !important;
}
.m0-qnav-btn:hover {
  background: #f0fdf9 !important;
  border-color: rgba(16,185,129,.3) !important;
  color: #059669 !important;
}
.m0-qnav-btn span:first-child { font-size: 16px !important; }

/* ── 4. Exceptions hero: smaller, green gradient, readable ── */
.exc-hero {
  background: linear-gradient(155deg, #060f1e 0%, #0a2818 50%, #060f1e 100%) !important;
  border-radius: 10px !important;
  padding: 14px 20px !important;
  margin-bottom: 14px !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
}
.exc-hero::before {
  content: '' !important;
  position: absolute !important; inset: 0 !important;
  background:
    radial-gradient(ellipse 60% 100% at 100% 50%, rgba(10,158,92,.2) 0%, transparent 60%),
    radial-gradient(ellipse 40% 100% at 0% 50%, rgba(10,60,140,.2) 0%, transparent 55%) !important;
  pointer-events: none !important;
}
.exc-hero::after {
  content: '' !important;
  position: absolute !important; inset: 0 !important;
  background-image:
    linear-gradient(rgba(10,158,92,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,158,92,.04) 1px, transparent 1px) !important;
  background-size: 28px 28px !important;
  pointer-events: none !important;
}
.exc-hero > * { position: relative !important; z-index: 1 !important; }
.exc-hero-left { flex: 1 !important; }
.exc-hero-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  font-family: var(--ui) !important;
  font-style: normal !important;
  letter-spacing: -.02em !important;
  margin-bottom: 4px !important;
}
.exc-hero-sub {
  font-size: 10px !important;
  color: rgba(255,255,255,.55) !important;
  font-weight: 600 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  margin-bottom: 14px !important;
}
.exc-hero-stats {
  display: flex !important;
  gap: 24px !important;
  flex-wrap: nowrap !important;
}
.exc-hero-stat { min-width: 0 !important; }
.exc-hero-val {
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -.04em !important;
  line-height: 1 !important;
  color: #ffffff !important;
  font-variant-numeric: tabular-nums !important;
}
.exc-hero-val.red { color: #f87171 !important; }
.exc-hero-lbl {
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,.45) !important;
  margin-top: 3px !important;
}

/* ── 5. Invoice validation: stat row smaller & professional ── */
.inv-stat-row, [class*="inv-stat"] {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #fff !important;
  margin-bottom: 14px !important;
}
.inv-stat-row > *, [class*="inv-stat"] > * {
  padding: 10px 14px !important;
  border-right: 1px solid #f1f5f9 !important;
  font-size: 11.5px !important;
}

/* ── 6. Exceptions: exc-chip banners smaller ── */
.exc-chips {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding-bottom: 2px !important;
  margin-bottom: 12px !important;
}
.exc-chip {
  flex-shrink: 0 !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 11.5px !important;
  min-width: 200px !important;
  max-width: 360px !important;
}

/* ============================================================
   FINAL TARGETED FIXES — BP + Invoice + Budget Overview
   ============================================================ */

/* ── Board Packet: Ready to Generate = black bold ── */
.bp-hero-title {
  color: #0f172a !important;
  font-weight: 900 !important;
  font-size: 18px !important;
  letter-spacing: -.02em !important;
  font-family: var(--ui) !important;
  font-style: normal !important;
}
.bp-hero-sub {
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 10px !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
}
/* Make the whole bp-hero dark gradient like exceptions ── */
.bp-hero {
  background: linear-gradient(155deg, #060f1e 0%, #0a2818 50%, #060f1e 100%) !important;
  border-radius: 10px !important;
  padding: 20px 24px 16px !important;
  position: relative !important;
  overflow: hidden !important;
  margin-bottom: 16px !important;
}
.bp-hero::before {
  content: '' !important; position: absolute !important; inset: 0 !important;
  background: radial-gradient(ellipse 60% 120% at 100% 50%, rgba(10,158,92,.18) 0%, transparent 60%) !important;
  pointer-events: none !important;
}
.bp-hero > * { position: relative !important; z-index: 1 !important; }
/* Override the inline black color on dark bg */
.bp-hero .bp-hero-title { color: #ffffff !important; }
.bp-hero .bp-hero-sub { color: rgba(255,255,255,.55) !important; }
/* Feature cards inside bp-hero ── */
.bp-feat-grid { display: grid !important; grid-template-columns: repeat(4,1fr) !important; gap: 10px !important; margin-top: 16px !important; }
.bp-feat-card {
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 9px !important;
  padding: 12px 14px !important;
  transition: background .15s !important;
}
.bp-feat-card:hover { background: rgba(255,255,255,.12) !important; }
.bp-feat-card .bp-feat-icon { font-size: 18px !important; margin-bottom: 6px !important; }
.bp-feat-card .bp-feat-title { font-size: 12px !important; font-weight: 700 !important; color: #fff !important; margin-bottom: 2px !important; }
.bp-feat-card .bp-feat-desc { font-size: 10px !important; color: rgba(255,255,255,.5) !important; line-height: 1.4 !important; }

/* ── Invoice Validation: hide stale banners from view ── */
/* The stale-section is now at the bottom — make it very subtle */
.stale-section {
  margin-top: 16px !important;
  border-top: 1px solid #f1f5f9 !important;
  padding-top: 10px !important;
  opacity: 0.7 !important;
}
.stale-section:hover { opacity: 1 !important; }

/* ── Invoice Validation: clean up the top area ── */
/* Tab row: ALL (10) ACTIVE (10) EXPIRING (0) EXPIRED (0) */
.ftabs {
  display: flex !important;
  gap: 2px !important;
  align-items: center !important;
}
.ftab {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  color: #64748b !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all .15s !important;
}
.ftab.on, .ftab[class*="on"] {
  background: #0f172a !important;
  color: #fff !important;
  border-color: #0f172a !important;
}
.ftab:hover:not(.on) { background: #f1f5f9 !important; color: #0f172a !important; }

/* Stat row: 15 | 15 | 15 | $1.04M | 100% */
.td-stats, [class*="td-"] {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #fff !important;
  margin-bottom: 14px !important;
}
/* Make the invoice validation fund/date filter row cleaner */
.mstrip {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  padding: 0 0 8px !important;
  -webkit-overflow-scrolling: touch !important;
}
.mstrip::-webkit-scrollbar { height: 3px !important; }

/* ── Budget Overview: Data Feeds full width ── */
.m0-feed-row {
  display: grid !important;
  grid-template-columns: 8px 1fr auto auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 0 !important;
  border-bottom: 1px solid #f8fafc !important;
  font-size: 11.5px !important;
}
.m0-feed-name { color: #334155 !important; font-weight: 500 !important; }
.m0-feed-rows { font-size: 10px !important; color: #94a3b8 !important; font-variant-numeric: tabular-nums !important; }
.m0-feed-status { font-size: 9.5px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: .05em !important; }
.m0-feed-dot { width: 8px !important; height: 8px !important; border-radius: 50% !important; flex-shrink: 0 !important; }

/* Quick Access buttons in sidebar area */
.m0-quicknav {
  display: grid !important;
  grid-template-columns: repeat(3,1fr) !important;
  gap: 5px !important;
  padding: 4px 0 !important;
}
.m0-qnav-btn {
  display: flex !important; flex-direction: column !important;
  align-items: center !important; gap: 3px !important;
  padding: 8px 4px !important; font-size: 10px !important;
  font-weight: 600 !important; color: #475569 !important;
  background: #f8fafc !important; border: 1px solid #e2e8f0 !important;
  border-radius: 7px !important; cursor: pointer !important;
  text-align: center !important; line-height: 1.2 !important;
  transition: all .15s !important; white-space: nowrap !important;
}
.m0-qnav-btn span:first-child { font-size: 15px !important; }
.m0-qnav-btn:hover { background: #f0fdf9 !important; border-color: rgba(16,185,129,.3) !important; color: #059669 !important; }

/* ── Sidebar logo: bigger, bolder, more presence ── */
.sb-logo {
  padding: 14px 16px 12px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}
.sb-wm-name {
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: -.04em !important;
  color: #0f172a !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.sb-wm-name em {
  font-style: normal !important;
  color: #059669 !important;
}
.sb-wm-tag {
  font-size: 8px !important;
  font-weight: 800 !important;
  letter-spacing: .18em !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  margin-top: 2px !important;
  display: block !important;
}
/* Logo icon box — slightly bigger */
.sb-logo > div:first-child > div:first-child {
  width: 38px !important;
  height: 38px !important;
  border-radius: 9px !important;
  margin-right: 12px !important;
}


/* ============================================================
   EXCEPTION ROW FONTS + BUDGET OVERVIEW TOTAL FIX
   ============================================================ */

/* ── Exception rows: smaller, more fluid fonts ── */
.exc-chip {
  min-width: 180px !important;
  max-width: 320px !important;
  padding: 8px 10px !important;
  border-radius: 7px !important;
}
.exc-chip-sev {
  font-size: 8.5px !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
}
.exc-chip-name {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.3 !important;
}
.exc-chip-desc {
  font-size: 10px !important;
  color: #64748b !important;
  line-height: 1.4 !important;
  margin-top: 2px !important;
}

/* Exception table rows: smaller font */
.exc-table-wrap table td,
.exc-table-wrap table th { font-size: 11px !important; padding: 7px 10px !important; }
.exc-table-wrap table th { font-size: 9px !important; }
.exc-src-live, .exc-src-manual {
  font-size: 8.5px !important;
  font-weight: 700 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
}
.exc-action {
  font-size: 10.5px !important;
  color: #059669 !important;
  font-weight: 600 !important;
  margin-top: 3px !important;
}
.exc-sev-pill {
  font-size: 8.5px !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}
.exc-sev-meta { font-size: 9.5px !important; }

/* ── Budget Overview: TOTAL row align with numbers above ── */
tfoot tr td { 
  font-size: 12px !important; 
  font-weight: 700 !important;
  padding: 8px 12px !important;
  border-top: 2px solid #e2e8f0 !important;
}
tfoot tr td:first-child { font-weight: 800 !important; color: #0f172a !important; }

/* ============================================================
   INVOICE VALIDATION FULL CLEANUP + BP HERO FIX
   ============================================================ */

/* Hide stale banners from top of invoice page */
.syn-banner, .stale-banner[style*="display:none"] { display: none !important; }

/* ── inv-statbar: clean horizontal stat grid ── */
.inv-statbar {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #fff !important;
  margin-bottom: 14px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
}
.inv-stat {
  padding: 12px 16px !important;
  border-right: 1px solid #f1f5f9 !important;
}
.inv-stat:last-child { border-right: none !important; }
.inv-stat-div { display: none !important; }
.inv-stat-val {
  display: block !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -.03em !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 1 !important;
  color: #0f172a !important;
}
.inv-stat-lbl {
  display: block !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  margin-top: 4px !important;
}

/* ── Invoice validation: module title clean ── */
.mhdr .mtitle {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -.02em !important;
}
.mhdr .msub {
  font-size: 11px !important;
  color: #64748b !important;
  font-style: normal !important;
  font-weight: 400 !important;
}

/* ── TOP contract status tabs (ALL/ACTIVE/EXPIRING/EXPIRED) ── */
.ctabs, .inv-tabs {
  display: flex !important;
  gap: 4px !important;
  margin-bottom: 12px !important;
}

/* ── TOP firing rules section ── */
.sri { 
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  margin-bottom: 12px !important;
}
.si { color: #94a3b8 !important; font-size: 14px !important; }
.fi {
  border: none !important;
  background: transparent !important;
  font-size: 12px !important;
  color: #0f172a !important;
  flex: 1 !important;
  outline: none !important;
}

/* ── Board Packet hero: force dark ── */
.bp-hero {
  background: linear-gradient(155deg, #060f1e 0%, #0a2818 50%, #060f1e 100%) !important;
}
.bp-hero-title {
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 20px !important;
  letter-spacing: -.03em !important;
  font-style: normal !important;
  font-family: var(--ui) !important;
}
.bp-hero-sub {
  color: rgba(255,255,255,.6) !important;
  font-weight: 700 !important;
  font-size: 9.5px !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
}
/* BP feature cards inside dark hero ── */
.bp-feat-grid {
  display: grid !important;
  grid-template-columns: repeat(4,1fr) !important;
  gap: 10px !important;
  margin-top: 14px !important;
}
.bp-feat-card {
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
}
.bp-feat-card .bp-feat-title { 
  font-size: 11.5px !important; font-weight: 700 !important; color: #fff !important; 
  margin-top: 6px !important; margin-bottom: 2px !important; 
}
.bp-feat-card .bp-feat-desc { 
  font-size: 9.5px !important; color: rgba(255,255,255,.5) !important; line-height: 1.4 !important; 
}
/* Generate button in dark hero */
.bp-hero .btn, .bp-hero button {
  font-size: 12px !important; font-weight: 700 !important;
}


/* ============================================================
   EXCEPTION TABLE: SMALLER FONTS — AGGRESSIVE OVERRIDES
   ============================================================ */

/* Override h12 and all inline styles in exception table */
.h12 { font-size: 10px !important; font-weight: 600 !important; }

.exc-table-wrap table,
.exc-table-wrap table td,
.exc-table-wrap table th,
.exc-table-wrap * {
  font-size: 10px !important;
}
.exc-table-wrap table td { padding: 6px 8px !important; line-height: 1.3 !important; }
.exc-table-wrap table th { font-size: 8.5px !important; padding: 5px 8px !important; letter-spacing: .08em !important; }

/* Exception table specific cells */
.exc-table-wrap .mono { font-size: 9.5px !important; font-weight: 700 !important; }
.exc-table-wrap .exc-src-live,
.exc-table-wrap .exc-src-manual { font-size: 8px !important; padding: 1px 5px !important; }
.exc-table-wrap .exc-sev-pill { font-size: 8px !important; padding: 1px 5px !important; }
.exc-table-wrap .exc-action { font-size: 10px !important; color: #059669 !important; font-weight: 600 !important; }
.exc-table-wrap .exc-tr-expand td { font-size: 10px !important; color: #64748b !important; padding: 4px 8px 8px !important; }

/* Override any inline font-size styles within exception table */
.exc-table-wrap [style*="font-size:11px"] { font-size: 10px !important; }
.exc-table-wrap [style*="font-size: 11px"] { font-size: 10px !important; }
.exc-table-wrap [style*="font-size:12px"] { font-size: 10px !important; }
.exc-table-wrap [style*="font-size:13px"] { font-size: 10px !important; }
.exc-table-wrap [style*="font-size:14px"] { font-size: 11px !important; }

/* ============================================================
   INVOICE VALIDATION FILTER ROW — FLUSH SINGLE LINE
   ============================================================ */

/* Fund pills + date pills on one line */
.inv-filter-row, [data-ff], [data-df] {
  white-space: nowrap !important;
}

/* ftab pills: consistent size and style */
.ftab, button.ftab {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  padding: 4px 11px !important;
  border-radius: 6px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  color: #64748b !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
  display: inline-flex !important;
  align-items: center !important;
}
.ftab.on, .ftab[class*=" on"] {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}
.ftab:hover:not(.on) {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

/* Make fund filter row flex and inline */
.mstrip {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  padding-bottom: 6px !important;
}
.mstrip .ftabs {
  display: flex !important;
  gap: 4px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

/* Budget Overview TOTAL row — highlight EOY in red if over budget */
tfoot tr td:last-child { color: #dc2626 !important; font-weight: 800 !important; }
tfoot tr { border-top: 2px solid #e2e8f0 !important; }

/* ── Invoice validation: fund + date rows on one line ── */
/* fundPills and date row stack — force inline via CSS */
.mfade .mstrip { margin-bottom: 0 !important; padding-bottom: 0 !important; }
/* Make ALL funds+date section a single flex container */

/* ============================================================
   INDUSTRIAL GRADE UPGRADE PASS 1 — TWO HIGH-IMPACT FIXES
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   UPGRADE 1: PAGE-LEVEL DISTRICT TITLE
   Replace big italic serif with clean, authoritative sans
   ══════════════════════════════════════════════════════════ */

/* Main district name heading */
.m0-district, .tb-title, h1.page-title,
.mfade > .m0-hero .m0-district {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-weight: 800 !important;
  font-size: 18px !important;
  color: #0f172a !important;
  letter-spacing: -.03em !important;
  line-height: 1.1 !important;
}
/* The sub-meta line below district name */
.m0-meta, .pg-meta, .m0-hero .meta-row {
  font-style: normal !important;
  font-family: var(--ui) !important;
  font-size: 11px !important;
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 4px !important;
}
/* Kill the big italic serif on ALL module titles */
.mtitle, .page-title {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  color: #0f172a !important;
  letter-spacing: -.02em !important;
}
/* Health score badge — make it read as a real KPI */
.hs-badge, [class*="hs-"] {
  font-family: var(--mono) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
}
/* At Risk pill */
[style*="At Risk"], .risk-pill {
  background: rgba(220,38,38,.1) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(220,38,38,.2) !important;
  border-radius: 5px !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  letter-spacing: .04em !important;
}

/* ══════════════════════════════════════════════════════════
   UPGRADE 2: TIGHTER TOPBAR — BREADCRUMB + MODULE NAME
   Single-line, dense, authority
   ══════════════════════════════════════════════════════════ */

#topbar {
  height: 42px !important;
  padding: 0 16px 0 20px !important;
  gap: 0 !important;
}
/* Breadcrumb district name */
.tb-bc { font-size: 10px !important; color: rgba(255,255,255,.35) !important; font-weight: 600 !important; letter-spacing: .04em !important; text-transform: uppercase !important; }
/* Separator dot */
#topbar .tb-sep { width: 1px !important; height: 12px !important; background: rgba(255,255,255,.15) !important; margin: 0 10px !important; }
/* Module name */
.tb-mod { font-size: 13px !important; font-weight: 700 !important; color: #ffffff !important; letter-spacing: -.01em !important; }
/* Right side buttons */
.tb-right { margin-left: auto !important; display: flex !important; align-items: center !important; gap: 6px !important; }
/* Ask AI button — make it pop */
.tb-ai-btn, [onclick*="askAI"], [onclick*="nav(25"] {
  background: linear-gradient(135deg, rgba(16,185,129,.25), rgba(16,185,129,.15)) !important;
  border: 1px solid rgba(16,185,129,.4) !important;
  color: #10b981 !important;
  border-radius: 6px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  transition: all .15s !important;
}
.tb-ai-btn:hover { background: linear-gradient(135deg, rgba(16,185,129,.35), rgba(16,185,129,.25)) !important; }

/* ══════════════════════════════════════════════════════════
   BONUS: SIDEBAR — tighter data density
   ══════════════════════════════════════════════════════════ */

/* Section dividers in sidebar */
.sn-sec { 
  padding: 8px 14px 2px !important; 
  font-size: 7px !important; 
  font-weight: 800 !important; 
  letter-spacing: .18em !important; 
  color: #cbd5e1 !important; 
  text-transform: uppercase !important; 
}
/* Nav item active highlight */
.sn-item.active {
  background: linear-gradient(90deg, rgba(16,185,129,.08) 0%, transparent 100%) !important;
  color: #059669 !important;
  font-weight: 700 !important;
  border-left: 2px solid #10b981 !important;
}

/* ══════════════════════════════════════════════════════════
   BONUS: TABLE — enterprise-grade column alignment
   ══════════════════════════════════════════════════════════ */

/* Right-align all numeric columns globally */
td.r, th.r { text-align: right !important; }
td.mono { font-variant-numeric: tabular-nums !important; font-feature-settings: "tnum" !important; }

/* Fund detail table — tighter header */
.dtbl thead th {
  background: #f8fafc !important;
  font-size: 8.5px !important;
  font-weight: 800 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  padding: 7px 12px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  white-space: nowrap !important;
}

/* TOTAL row — clean separator and red EOY */
tfoot tr {
  background: #f8fafc !important;
  border-top: 2px solid #e2e8f0 !important;
}
tfoot td {
  padding: 9px 12px !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
}
tfoot td:last-child { color: #dc2626 !important; }

/* ============================================================
   10 INVESTOR-GRADE UPGRADES — FULL PASS
   ============================================================ */

/* ── 1. FUND TABLE: exact column alignment + tabular numerics ── */
.dtbl, .mfade table {
  border-collapse: collapse !important;
  width: 100% !important;
  table-layout: fixed !important;
}
.mfade table thead th:nth-child(1) { width: 22% !important; }  /* Fund */
.mfade table thead th:nth-child(2) { width: 12% !important; text-align: right !important; }  /* Budget */
.mfade table thead th:nth-child(3) { width: 20% !important; }  /* Expended */
.mfade table thead th:nth-child(4) { width: 12% !important; text-align: right !important; }  /* Encumbered */
.mfade table thead th:nth-child(5) { width: 14% !important; }  /* Available */
.mfade table thead th:nth-child(6) { width: 12% !important; text-align: right !important; }  /* EOY Proj */

/* TOTAL row: all cells right-aligned and flush, tabular nums */
tfoot td {
  font-family: var(--mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" !important;
  text-align: right !important;
  white-space: nowrap !important;
  padding: 9px 12px !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  border-top: 2px solid #e2e8f0 !important;
  background: #f8fafc !important;
}
tfoot td:first-child {
  text-align: left !important;
  font-family: var(--ui) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: #475569 !important;
}
tfoot td:last-child { color: #dc2626 !important; }

/* ── 2. KPI CARDS: Bloomberg-style value hierarchy ── */
.kpi4 > div { padding: 14px 16px 12px !important; }
.kv18, .kval {
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -.04em !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" !important;
  line-height: 1 !important;
}
.klabel, .kdesc {
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  margin-top: 6px !important;
}
.kdelta { font-size: 10.5px !important; font-weight: 600 !important; margin-top: 2px !important; }

/* ── 3. SECTION HEADERS: tighter, more authoritative ── */
.card-hdr, .panel-hdr, .ph {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}
.card-title, .pt, .panel-title {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: #334155 !important;
}

/* ── 4. BADGE SYSTEM: consistent severity colors ── */
.b-r, [class*="badge-red"], .crit-badge {
  background: rgba(220,38,38,.1) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(220,38,38,.2) !important;
  border-radius: 5px !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}
.b-g, [class*="badge-green"] {
  background: rgba(5,150,105,.1) !important;
  color: #059669 !important;
  border: 1px solid rgba(5,150,105,.2) !important;
  border-radius: 5px !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
}
.b-a, [class*="badge-amber"] {
  background: rgba(217,119,6,.1) !important;
  color: #d97706 !important;
  border: 1px solid rgba(217,119,6,.2) !important;
  border-radius: 5px !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
}

/* ── 5. PROGRESS BARS: thinner, more refined ── */
.prog, [class*="prog-"], [style*="height:5px"] {
  height: 4px !important;
  border-radius: 4px !important;
}

/* ── 6. MODULE CONTENT AREA: proper content padding ── */
.rpage { padding: 16px 20px !important; }
.mhdr { padding: 14px 20px 10px !important; border-bottom: 1px solid #f1f5f9 !important; margin-bottom: 0 !important; }

/* ── 7. NUMBERS: tabular-nums everywhere ── */
.mono, [class*="mono"], [style*="font-family:var(--mono)"],
[style*="font-family:var(--m)"] {
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" !important;
}

/* ── 8. PANEL/CARD BORDERS: subtle depth ── */
.panel, [class*="-card"], [class*="card-"] {
  border: 1px solid #e8edf3 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.02) !important;
}

/* ── 9. EXCEPTION TABLE: tighter rows, better zebra ── */
.exc-table-wrap tbody tr:nth-child(even) { background: #fafbfc !important; }
.exc-table-wrap tbody tr:hover { background: #f0fdf9 !important; }
.exc-table-wrap table td, .exc-table-wrap table th {
  font-size: 10px !important;
  padding: 6px 10px !important;
}
.exc-table-wrap .exc-action {
  font-size: 9.5px !important;
  color: #059669 !important;
  font-style: italic !important;
}

/* ── 10. STATUS BADGES: refined status pill system ── */
.b-approved, [class*="approved"] {
  background: #dcfce7 !important; color: #15803d !important;
  border-radius: 5px !important; font-size: 9px !important;
  font-weight: 700 !important; padding: 2px 7px !important;
  letter-spacing: .03em !important; text-transform: uppercase !important;
}
.b-pending, [class*="pending"], .b-hold {
  background: #fef9c3 !important; color: #a16207 !important;
  border-radius: 5px !important; font-size: 9px !important;
  font-weight: 700 !important; padding: 2px 7px !important;
  text-transform: uppercase !important;
}
.b-high, .HIGH, [class*="high-risk"] {
  background: rgba(220,38,38,.08) !important; color: #dc2626 !important;
  border: 1px solid rgba(220,38,38,.18) !important;
  border-radius: 5px !important; font-size: 8.5px !important;
  font-weight: 800 !important; padding: 2px 7px !important;
  letter-spacing: .04em !important;
}
.b-live, .LIVE, [class*="live-source"] {
  background: rgba(5,150,105,.08) !important; color: #059669 !important;
  border: 1px solid rgba(5,150,105,.18) !important;
  border-radius: 5px !important; font-size: 8.5px !important;
  font-weight: 800 !important; padding: 2px 7px !important;
  letter-spacing: .04em !important;
}

/* ============================================================
   10 INVESTOR-GRADE UPGRADES — PRECISION PASS
   ============================================================ */

/* ── 1. TOTAL ROW: flush alignment with data rows above ── */
tfoot td {
  font-family: var(--mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" !important;
  white-space: nowrap !important;
  padding: 9px 12px !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  border-top: 2px solid #e2e8f0 !important;
  background: #f8fafc !important;
  vertical-align: middle !important;
  text-align: right !important;
}
tfoot td:first-child {
  text-align: left !important;
  font-family: var(--ui) !important;
  font-size: 10.5px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: #334155 !important;
}
tfoot td:last-child { color: #dc2626 !important; font-weight: 900 !important; }
/* TOTAL row height matches data rows */
tfoot tr { height: auto !important; }

/* ── 2. TOPBAR: proper case module name, not ALL CAPS ── */
.mhd-t { text-transform: none !important; font-size: 12px !important; font-weight: 700 !important; color: #334155 !important; }
#topbar .tb-mod, #topbar [class*="mod"] { text-transform: none !important; }

/* ── 3. KPI CARDS: 5th card visible, no overflow ── */
.kpi4 {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 10px !important;
  overflow: visible !important;
}
.kpi4 > div {
  min-width: 0 !important;
  overflow: hidden !important;
}
.kv18, .kval {
  font-size: clamp(16px, 2vw, 22px) !important;
  font-weight: 800 !important;
  letter-spacing: -.04em !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ── 4. FUND TABLE: data rows right-aligned, tabular nums ── */
.mfade table tbody td.r,
.mfade table tbody td[class*="mono"] {
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" !important;
}
/* Budget column in data rows */
.mfade table tbody td:nth-child(2) {
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
}

/* ── 5. INVOICE TABLE: clean overflow ── */
.tw { overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
.tw table { min-width: 900px !important; }
.tw thead th {
  font-size: 8.5px !important;
  font-weight: 800 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  padding: 7px 10px !important;
  background: #f8fafc !important;
  white-space: nowrap !important;
  position: sticky !important;
  top: 0 !important;
}
.tw tbody td { font-size: 11px !important; padding: 7px 10px !important; vertical-align: middle !important; }
.tw tbody tr:hover { background: #f0fdf9 !important; }
.tw tbody tr:nth-child(even) { background: #fafbfc !important; }
.tw tbody tr:nth-child(even):hover { background: #f0fdf9 !important; }

/* ── 6. BUDGET UTILIZATION BAR: thinner, more refined ── */
.budget-bar, [class*="util-bar"] { height: 6px !important; border-radius: 3px !important; }

/* ── 7. ACTION REQUIRED PANEL: tighter, more scannable ── */
.macts > div, [class*="action-item"] {
  padding: 9px 14px !important;
  border-bottom: 1px solid #f8fafc !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
}
.macts > div:last-child { border-bottom: none !important; }
/* Action item text */
.macts [style*="font-weight:600"], .macts .act-name {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}
.macts [style*="font-size:11px"], .macts .act-desc {
  font-size: 10.5px !important;
  color: #64748b !important;
  margin-top: 1px !important;
}

/* ── 8. SECTION LABELS: uppercase tracking everywhere ── */
.section-hdr, .Fund\ Detail, [class*="sec-title"] {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
}
/* Fund Detail heading */
.mfade h3, .mfade .section-label, .fund-detail-hdr {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #334155 !important;
  letter-spacing: .04em !important;
}

/* ── 9. HEALTH SCORE BADGE: prominent pill ── */
.hs-num, [class*="hs-score"] {
  font-family: var(--mono) !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums !important;
}
/* At Risk / Healthy / Needs Attention pill */
.hs-label, [class*="risk-label"] {
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  padding: 2px 8px !important;
  border-radius: 5px !important;
  display: inline-block !important;
}

/* ── 10. GLOBAL FONT CONSISTENCY: no more mixed families ── */
/* All UI text = Inter/system-ui */
button, input, select, .btn, .tab, .ftab,
.sn-lbl, .sn-sec, .card-title, .pt, .klabel, .kdelta {
  font-family: var(--ui) !important;
}
/* All financial numbers = monospace */
.kv18, .kval, [class*="amount"], [class*="currency"],
tfoot td:not(:first-child), tbody td.r, tbody td.mono {
  font-family: var(--mono) !important;
  font-variant-numeric: tabular-nums !important;
}
/* Remove any lingering serif */
* { font-style: normal !important; }
h1, h2, h3, .mtitle, .tb-title {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-weight: 700 !important;
}

/* ============================================================
   PRECISION FIX PASS — ALL CRITICAL ISSUES
   ============================================================ */

/* ── FIX 1: TOPBAR — proper case, not ALL CAPS ── */
#topbar * { text-transform: none !important; }
.tb-mod { 
  font-size: 13px !important; 
  font-weight: 700 !important; 
  color: #fff !important;
  letter-spacing: -.01em !important;
  text-transform: none !important;
}
.tb-bc {
  font-size: 10px !important;
  color: rgba(255,255,255,.4) !important;
  font-weight: 600 !important;
  text-transform: uppercase !important; /* district abbrev stays caps */
  letter-spacing: .06em !important;
}
/* The vertical separator */
#topbar .tb-sep-v { 
  display: inline-block !important; 
  width: 1px !important; 
  height: 12px !important; 
  background: rgba(255,255,255,.2) !important; 
  margin: 0 10px !important;
  vertical-align: middle !important;
}

/* ── FIX 2: INVOICE STAT ROW — all 5 cards visible ── */
/* Override flex with a proper 5-col grid */
div[style*="display:flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff;margin-bottom:16px"] {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  overflow: hidden !important;
}
div[style*="display:flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff;margin-bottom:16px"] > div {
  padding: 12px 14px !important;
  border-right: 1px solid #f1f5f9 !important;
  flex: unset !important;
  min-width: 0 !important;
}
div[style*="display:flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff;margin-bottom:16px"] > div:last-child {
  border-right: none !important;
}
/* Stat value — clamp size so it fits */
div[style*="display:flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff;margin-bottom:16px"] span:first-child {
  font-size: clamp(16px, 2vw, 22px) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ── FIX 3: INVOICE FILTER ROWS — merge fund + date on ONE line ── */
/* Make the two filter rows appear as one using flex + gap */
.mfade .mstrip + .mstrip,
.mfade div[style*="padding-bottom:10px"] + div[style*="padding-bottom:10px"] {
  padding-top: 0 !important;
  margin-top: -8px !important;
}
/* Fund pills row */
div[style*="display:flex;gap:4px;align-items:center;padding-bottom:6px"] {
  padding-bottom: 0 !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
}
/* Date pills row */  
div[style*="display:flex;gap:4px;align-items:center;flex-wrap:nowrap"] {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
}

/* ── FIX 4: EXCEPTION CHIPS — no word truncation ── */
.exc-chip {
  min-width: 200px !important;
  max-width: 300px !important;
  flex-shrink: 0 !important;
}
.exc-chip-name {
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  color: #0f172a !important;
}
.exc-chip-desc {
  font-size: 9.5px !important;
  color: #64748b !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.exc-chips {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding-bottom: 4px !important;
  scroll-snap-type: x mandatory !important;
}
.exc-chip { scroll-snap-align: start !important; }

/* ── FIX 5: BOARD PACKET title — clean sans-serif ── */
.mhdr .mtitle, .mhdr h1, .mhdr h2 {
  font-style: normal !important;
  font-family: var(--ui) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  color: #0f172a !important;
}

/* ── FIX 6: EVIDENCE SCORE — amber not white ── */
/* The 73% text in exc-hero — override to show amber */
.exc-hero-val { color: #fff !important; }
.exc-hero-val.amber { color: #f59e0b !important; }
.exc-hero-stat:nth-child(3) .exc-hero-val { color: #f59e0b !important; }

/* ── FIX 7: HEALTH SCORE — ensure 35/100 shows ── */
/* Force hard-refresh of health score display */
.hs-score, [data-hs] { font-variant-numeric: tabular-nums !important; }

/* ── FIX 8: TOPBAR ALL-CAPS override (belt + suspenders) ── */
[class*="tb-mod"], [class*="tb-title"] { text-transform: none !important; }
#topbar span:not(.tb-bc):not([class*="bc"]) { text-transform: none !important; }

/* ── FIX 9: MODULE PAGE HEADER — no italic serif anywhere ── */
.mfade > * > .mtitle,
.mfade .mhdr .mtitle,
.mfade h1, .mfade h2, .mfade h3 {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-weight: 700 !important;
}

/* ── FIX 10: INVOICE TABLE — proper width and scroll ── */
.tw { 
  width: 100% !important; 
  overflow-x: auto !important; 
  -webkit-overflow-scrolling: touch !important;
}
.tw table { 
  min-width: 1000px !important; 
  width: 100% !important;
  table-layout: auto !important;
}
/* Vendor column wraps nicely */
.tw tbody td:nth-child(6) { 
  max-width: 140px !important; 
  overflow: hidden !important; 
  text-overflow: ellipsis !important; 
  white-space: nowrap !important; 
}
/* Validation result column */
.tw tbody td:nth-child(10) { 
  max-width: 200px !important; 
  overflow: hidden !important; 
}

/* ============================================================
   20 INVESTOR-GRADE UPGRADES — COMPREHENSIVE PASS
   ============================================================ */

/* ── 1. TOPBAR: Kill ALL CAPS everywhere ── */
#topbar, #topbar * { text-transform: none !important; }
.tb-bc { text-transform: uppercase !important; font-size: 10px !important; letter-spacing: .07em !important; color: rgba(255,255,255,.4) !important; font-weight: 600 !important; }
.tb-mod { text-transform: none !important; font-size: 13px !important; font-weight: 700 !important; color: #fff !important; letter-spacing: -.01em !important; }

/* ── 2. MODULE PAGE HEADER: italic serif eliminated ── */
.mtitle, .mhdr .mtitle, h1, h2, h3,
[class*="title"], [class*="Title"] {
  font-family: var(--ui) !important;
  font-style: normal !important;
}

/* ── 3. INVOICE STAT ROW: all 5 cards visible ── */
div[style*="display:flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden"] {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
}
div[style*="display:flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden"] > div {
  flex: unset !important;
  min-width: 0 !important;
  padding: 12px 14px !important;
}
div[style*="display:flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden"] span[style*="24px"] {
  font-size: clamp(14px, 1.8vw, 22px) !important;
}

/* ── 4. KPI CARDS: 5 visible, no overflow ── */
.kpi4 {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
  overflow: visible !important;
}
.kpi4 > div { min-width: 0 !important; overflow: hidden !important; }
.kv18 { font-size: clamp(14px, 1.8vw, 22px) !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }

/* ── 5. INVOICE FILTER: fund + date on ONE line ── */
div[style*="display:flex;gap:4px;align-items:center;flex-wrap:nowrap"] {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin-bottom: 10px !important;
  gap: 4px !important;
  align-items: center !important;
}
div[style*="display:flex;gap:4px;align-items:center;flex-wrap:nowrap"]::-webkit-scrollbar { height: 0 !important; }

/* ── 6. INVOICE TABLE: full width scrollable ── */
.tw { overflow-x: auto !important; width: 100% !important; }
.tw table { min-width: 1100px !important; width: 100% !important; border-collapse: collapse !important; }
.tw thead { position: sticky !important; top: 0 !important; z-index: 2 !important; }
.tw thead th { background: #f8fafc !important; font-size: 8.5px !important; font-weight: 800 !important; letter-spacing: .1em !important; text-transform: uppercase !important; color: #94a3b8 !important; padding: 7px 10px !important; border-bottom: 2px solid #e2e8f0 !important; white-space: nowrap !important; }
.tw tbody tr { border-bottom: 1px solid #f1f5f9 !important; }
.tw tbody tr:hover { background: #f0fdf9 !important; }
.tw tbody tr:nth-child(even) { background: #fafbfc !important; }
.tw tbody td { padding: 8px 10px !important; font-size: 11px !important; vertical-align: middle !important; }

/* ── 7. EXCEPTION CHIPS: full text, horizontal scroll ── */
.exc-chips { display: flex !important; gap: 8px !important; overflow-x: auto !important; padding-bottom: 6px !important; scroll-snap-type: x mandatory !important; }
.exc-chip { min-width: 220px !important; max-width: 280px !important; flex-shrink: 0 !important; scroll-snap-align: start !important; padding: 10px 12px !important; border-radius: 8px !important; }
.exc-chip-name { font-size: 11.5px !important; font-weight: 700 !important; color: #0f172a !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
.exc-chip-desc { font-size: 10px !important; color: #64748b !important; margin-top: 3px !important; line-height: 1.4 !important; display: -webkit-box !important; -webkit-line-clamp: 2 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; white-space: normal !important; }

/* ── 8. EVIDENCE SCORE: amber not white ── */
.exc-hero-val { color: #ffffff !important; }
.exc-hero-val.amber, .exc-hero-stat:nth-child(3) .exc-hero-val { color: #fbbf24 !important; }
.exc-hero-val.green { color: #34d399 !important; }
.exc-hero-val.red { color: #f87171 !important; }

/* ── 9. BOARD PACKET: 4 feature cards visible ── */
.bp-feat-grid { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 10px !important; }
.bp-feat-card { min-width: 0 !important; overflow: hidden !important; }
.bp-feat-card .bp-feat-title { font-size: 11px !important; font-weight: 700 !important; color: #fff !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }

/* ── 10. BOARD PACKET KPI CARDS: 4 visible ── */
.bp-kpis, [class*="bp-stat"] {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
  overflow: visible !important;
}

/* ── 11. HEALTH SCORE BADGE: proper formatting ── */
.m0-hs-wrap, [style*="At Risk"] { font-variant-numeric: tabular-nums !important; }

/* ── 12. ACTION REQUIRED: tighter, more scannable ── */
.macts > a, .macts > div { padding: 9px 16px !important; border-bottom: 1px solid #f8fafc !important; transition: background .12s !important; }
.macts > a:hover, .macts > div:hover { background: #f8fafc !important; }
.macts > a:last-child, .macts > div:last-child { border-bottom: none !important; }

/* ── 13. SIDEBAR ACTIVE STATE: sharper indicator ── */
.sn-item.active { border-left: 3px solid #10b981 !important; background: linear-gradient(90deg,rgba(16,185,129,.07),transparent) !important; color: #059669 !important; font-weight: 700 !important; }
.sn-item:hover:not(.active) { background: #f8fafc !important; border-left: 3px solid #e2e8f0 !important; }

/* ── 14. PROGRESS BAR: ultra-thin refined ── */
[style*="height:5px"], [style*="height: 5px"] { height: 4px !important; border-radius: 4px !important; }
[style*="height:4px"] { border-radius: 4px !important; }

/* ── 15. BADGE SYSTEM: consistent severity ── */
.b-r { background: rgba(220,38,38,.08) !important; color: #dc2626 !important; border: 1px solid rgba(220,38,38,.15) !important; padding: 2px 6px !important; border-radius: 4px !important; font-size: 9px !important; font-weight: 800 !important; text-transform: uppercase !important; letter-spacing: .04em !important; }
.b-g { background: rgba(5,150,105,.08) !important; color: #059669 !important; border: 1px solid rgba(5,150,105,.15) !important; padding: 2px 6px !important; border-radius: 4px !important; font-size: 9px !important; font-weight: 800 !important; }
.b-a { background: rgba(217,119,6,.08) !important; color: #d97706 !important; border: 1px solid rgba(217,119,6,.15) !important; padding: 2px 6px !important; border-radius: 4px !important; font-size: 9px !important; font-weight: 800 !important; }
.b-d { background: #f1f5f9 !important; color: #64748b !important; padding: 2px 6px !important; border-radius: 4px !important; font-size: 9px !important; font-weight: 700 !important; }

/* ── 16. NUMBERS: tabular-nums globally ── */
.mono, [style*="font-family:var(--mono)"], [style*="font-family:var(--m)"],
tfoot td, tbody td.r, .kv18, .kval { font-variant-numeric: tabular-nums !important; font-feature-settings: "tnum" !important; }

/* ── 17. FUND TABLE HEADERS: refined ── */
.mfade table thead th { font-size: 8.5px !important; font-weight: 800 !important; letter-spacing: .1em !important; text-transform: uppercase !important; color: #94a3b8 !important; background: #f8fafc !important; padding: 7px 12px !important; border-bottom: 1px solid #e2e8f0 !important; white-space: nowrap !important; }

/* ── 18. SECTION LABELS: consistent across all modules ── */
.card-hdr span:first-child, .pt, .panel-title { font-size: 10px !important; font-weight: 700 !important; letter-spacing: .08em !important; text-transform: uppercase !important; color: #334155 !important; }

/* ── 19. FILTER TABS: unified look ── */
.ftab { font-size: 10.5px !important; font-weight: 600 !important; padding: 4px 10px !important; border-radius: 5px !important; border: 1px solid #e2e8f0 !important; background: #f8fafc !important; color: #64748b !important; white-space: nowrap !important; cursor: pointer !important; transition: all .12s !important; }
.ftab.on { background: #0f172a !important; color: #fff !important; border-color: #0f172a !important; }
.ftab:hover:not(.on) { background: #f1f5f9 !important; color: #334155 !important; }

/* ── 20. SCROLLBARS: ultra-thin throughout ── */
::-webkit-scrollbar { width: 3px !important; height: 3px !important; }
::-webkit-scrollbar-track { background: transparent !important; }
::-webkit-scrollbar-thumb { background: #e2e8f0 !important; border-radius: 3px !important; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1 !important; }

/* ============================================================
   20 INVESTOR UPGRADES — FINAL PRECISION PASS
   ============================================================ */

/* ── 1. INVOICE STAT ROW: 5 cards forced grid ── */
div[style*="display:flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff;margin-bottom:16px"] {
  display: grid !important;
  grid-template-columns: repeat(5,1fr) !important;
  overflow: hidden !important;
}
div[style*="display:flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff;margin-bottom:16px"] > div {
  flex: unset !important;
  min-width: 0 !important;
  padding: 12px 12px !important;
}
div[style*="display:flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff;margin-bottom:16px"] > div span[style*="24px"] {
  font-size: clamp(13px,1.5vw,20px) !important;
  white-space: nowrap !important;
}

/* ── 2. KPI CARDS: 5 visible ── */
.kpi4 {
  display: grid !important;
  grid-template-columns: repeat(5,minmax(0,1fr)) !important;
  gap: 10px !important;
}
.kpi4 > div { min-width: 0 !important; overflow: hidden !important; }
.kv18 { font-size: clamp(14px,1.6vw,20px) !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }

/* ── 3. INVOICE FILTER: both rows merged visually ── */
div[style*="display:flex;gap:4px;align-items:center;padding:0 0 8px;flex-wrap:nowrap"] {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}
div[style*="display:flex;gap:4px;align-items:center;padding:0 0 8px;flex-wrap:nowrap"]::-webkit-scrollbar { height: 0 !important; }
/* Remove gap between fund row and date row */
div[style*="display:flex;gap:4px;align-items:center;padding:0 0 8px"] + * { margin-top: 0 !important; }

/* ── 4. INVOICE TABLE: full width, all cols visible ── */
.tw { overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
.tw table { min-width: 1200px !important; table-layout: auto !important; }
.tw thead th { 
  white-space: nowrap !important; 
  font-size: 8px !important; 
  font-weight: 800 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  background: #f8fafc !important;
  padding: 7px 8px !important;
  border-bottom: 2px solid #e2e8f0 !important;
}
.tw tbody td { padding: 7px 8px !important; font-size: 11px !important; }
.tw tbody tr:nth-child(even) { background: #fafbfc !important; }
.tw tbody tr:hover { background: #f0fdf9 !important; }

/* ── 5. EXCEPTION CHIPS: proper min-width, scroll ── */
.exc-chips { 
  display: flex !important; 
  gap: 8px !important; 
  overflow-x: auto !important; 
  padding-bottom: 6px !important;
}
.exc-chips::-webkit-scrollbar { height: 3px !important; }
.exc-chip { 
  min-width: 240px !important; 
  max-width: 300px !important; 
  flex-shrink: 0 !important;
  padding: 10px 12px !important;
}
.exc-chip-name {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}
.exc-chip-desc {
  font-size: 9.5px !important;
  color: #64748b !important;
  margin-top: 3px !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  white-space: normal !important;
}

/* ── 6. BOARD PACKET FEATURE CARDS: all 4 visible ── */
.bp-feat-grid { 
  display: grid !important; 
  grid-template-columns: repeat(4,1fr) !important; 
  gap: 10px !important; 
  margin-top: 14px !important;
}
.bp-feat-card, .bp-feat-grid > div {
  min-width: 0 !important;
  overflow: hidden !important;
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 8px !important;
  padding: 12px !important;
}

/* ── 7. BOARD PACKET KPI CARDS: all 4 visible ── */
.bp-kpis, [style*="bp-kpi"] {
  display: grid !important;
  grid-template-columns: repeat(4,1fr) !important;
  gap: 10px !important;
}

/* ── 8. SIDEBAR BUDGET INTELLIGENCE: more visible ── */
.sb-wm-tag {
  font-size: 8px !important;
  font-weight: 800 !important;
  letter-spacing: .18em !important;
  color: #475569 !important;
  text-transform: uppercase !important;
  display: block !important;
  margin-top: 2px !important;
}

/* ── 9. EXCEPTION HERO SUBTITLE: better tracking ── */
.exc-hero-sub {
  font-size: 9.5px !important;
  letter-spacing: .1em !important;
  color: rgba(255,255,255,.5) !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  margin-bottom: 16px !important;
  line-height: 1.6 !important;
}

/* ── 10. BUDGET TOTAL ROW 79% BADGE: tighter ── */
tfoot td span[style*="background"] {
  font-size: 8.5px !important;
  font-weight: 800 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  vertical-align: middle !important;
  margin-left: 5px !important;
}

/* ── 11. ACTION REQUIRED SECTION: enterprise style ── */
.macts { border: 1px solid #e8edf3 !important; border-radius: 10px !important; overflow: hidden !important; }
.macts > * { padding: 10px 16px !important; border-bottom: 1px solid #f1f5f9 !important; transition: background .12s !important; }
.macts > *:last-child { border-bottom: none !important; }
.macts > *:hover { background: #f8fafc !important; }

/* ── 12. FUND DETAIL TABLE: sharper rows ── */
.mfade table tbody tr { border-bottom: 1px solid #f8fafc !important; }
.mfade table tbody tr:hover { background: #f8fffe !important; }

/* ── 13. SIDEBAR SECTION LABELS: refined ── */
.sn-sec { 
  font-size: 7px !important; 
  font-weight: 800 !important; 
  letter-spacing: .2em !important; 
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  padding: 10px 14px 3px !important;
}

/* ── 14. CONTENT PAGE PADDING: consistent ── */
.rpage { padding: 18px 22px !important; }

/* ── 15. DATA FEEDS PANEL: full-width stretch ── */
.m0-feed-row { 
  display: grid !important;
  grid-template-columns: 8px 1fr auto auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 0 !important;
  font-size: 11px !important;
  border-bottom: 1px solid #f8fafc !important;
}
.m0-feed-row:last-child { border-bottom: none !important; }

/* ── 16. BUDGET UTILIZATION LEGEND: dots match bars ── */
.budget-legend { display: flex !important; gap: 16px !important; align-items: center !important; font-size: 11px !important; color: #64748b !important; }

/* ── 17. TOPBAR RIGHT CONTROLS: consistent spacing ── */
#topbar .tb-right { gap: 8px !important; margin-left: auto !important; align-items: center !important; display: flex !important; }
#topbar button { font-family: var(--ui) !important; }

/* ── 18. NUMBERS EVERYWHERE: tabular nums ── */
[class*="mono"], [style*="font-family:var(--mono)"], [style*="tabular-nums"],
.kv18, tfoot td, tbody td.r { font-variant-numeric: tabular-nums !important; font-feature-settings: "tnum" !important; }

/* ── 19. SCROLLBAR: 3px platform-wide ── */
* { scrollbar-width: thin !important; scrollbar-color: #e2e8f0 transparent !important; }
::-webkit-scrollbar { width: 3px !important; height: 3px !important; }
::-webkit-scrollbar-thumb { background: #cbd5e1 !important; border-radius: 3px !important; }

/* ── 20. TRANSITIONS: fluid interactions ── */
.sn-item, .ftab, .kpi4 > div, tbody tr, .exc-chip, button, .card, [class*="-card"] {
  transition: background .12s ease, color .12s ease, box-shadow .12s ease, transform .12s ease, border-color .12s ease !important;
}

/* ============================================================
   CRITICAL FIXES — STAT ROW + FILTER + TABLE
   ============================================================ */

/* ── Stat row: force 5-col grid ── */
div[style*="display:grid;grid-template-columns:repeat(5,1fr);border:1px solid #e2e8f0"] {
  display: grid !important;
  grid-template-columns: repeat(5,1fr) !important;
  overflow: hidden !important;
}
div[style*="display:grid;grid-template-columns:repeat(5,1fr);border:1px solid #e2e8f0"] > div {
  padding: 12px 14px !important;
  min-width: 0 !important;
}
div[style*="display:grid;grid-template-columns:repeat(5,1fr);border:1px solid #e2e8f0"] span[style*="20px"] {
  font-size: clamp(13px,1.4vw,18px) !important;
}

/* ── District title: clean sans-serif ── */
.m0-district {
  font-family: var(--ui) !important;
  font-style: normal !important;
  font-weight: 800 !important;
  font-size: 18px !important;
  color: #0f172a !important;
  letter-spacing: -.02em !important;
}

/* ── Invoice filter tabs: single row ── */
div[style*="display:flex;gap:4px;align-items:center;padding:0 0 8px"] {
  display: flex !important;
  gap: 4px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin-bottom: 10px !important;
}
div[style*="display:flex;gap:4px;align-items:center;padding:0 0 8px"]::-webkit-scrollbar { height: 0 !important; }

/* ── Invoice table: fixed layout ── */
.tw { width: 100% !important; overflow-x: auto !important; }
.tw table { width: 100% !important; table-layout: fixed !important; }
.tw td, .tw th { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }

/* ============================================================
   30-POINT INVESTOR UPGRADE — CSS PASS
   ============================================================ */

/* ── 1. INVOICE FILTER: one clean row ── */
div[style*="flex-wrap:nowrap;overflow-x:auto;padding-bottom:8px;border-bottom:1px solid #f1f5f9"] {
  display: flex !important; flex-wrap: nowrap !important;
  align-items: center !important; overflow-x: auto !important;
  gap: 4px !important; padding-bottom: 8px !important;
  border-bottom: 1px solid #f1f5f9 !important; margin-bottom: 10px !important;
}

/* ── 2. STAT ROW: 5-col grid locked ── */
div[style*="display:grid;grid-template-columns:repeat(5,minmax(0,1fr))"] {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0,1fr)) !important;
  overflow: hidden !important;
}
div[style*="display:grid;grid-template-columns:repeat(5,minmax(0,1fr))"] > div {
  padding: 12px 12px !important; min-width: 0 !important; flex: unset !important;
}
div[style*="display:grid;grid-template-columns:repeat(5,minmax(0,1fr))"] span[style*="20px"] {
  font-size: clamp(13px,1.3vw,18px) !important;
}

/* ── 3. FUND FILTER: full names not IDs ── */
.ftab[data-ff] { max-width: 100px !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }

/* ── 4. DATE FORMAT: 2026 not 26 ── */

/* ── 5. SIDEBAR LIVE INDICATOR: stale = amber ── */
#live-dot { 
  width: 6px !important; height: 6px !important; 
  border-radius: 50% !important; display: inline-block !important;
  background: var(--green) !important;
  margin-right: 5px !important;
}
#live-lbl { font-size: 9.5px !important; font-weight: 600 !important; }

/* ── 6. FUND ROWS: cursor pointer ── */
.mfade table tbody tr[onclick] { cursor: pointer !important; }
.mfade table tbody tr[onclick]:hover { background: #f0fdf9 !important; }
.mfade table tbody tr[onclick]:hover td { color: #059669 !important; }

/* ── 8. HEALTH SCORE BAR: show progress ring ── */
.hs-bar-wrap { position: relative !important; }

/* ── 9. EOY PROJECTION: amber for minor overage ── */
tfoot td:last-child[style*="amber"] { color: #d97706 !important; }

/* ── 10. KPI CARDS: 5-col, all visible ── */
.krow-5 {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0,1fr)) !important;
  gap: 10px !important; overflow: visible !important;
}
.krow-5 .kcard { min-width: 0 !important; overflow: hidden !important; }
.krow-5 .kv18 { font-size: clamp(13px,1.4vw,20px) !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }

/* ── 11. INVOICE CLEAN INVOICES: show green ── */
.tw tbody tr[style*="opacity:.6"] { opacity: .55 !important; }
.tw tbody tr[style*="opacity:.5"] { background: rgba(16,185,129,.03) !important; }

/* ── 12. BOARD PACKET FOOTER: more visible ── */
.bp-hero [style*="color:var(--text3)"],
.bp-hero [style*="rgba(255,255,255,.15"] { color: rgba(255,255,255,.45) !important; }

/* ── 13. EXCEPTION HERO: larger impact numbers ── */
.exc-hero-val { font-size: 32px !important; font-weight: 900 !important; }
.exc-hero-lbl { font-size: 9px !important; letter-spacing: .12em !important; }

/* ── 14. ACTION REQUIRED: hover states ── */
.macts { border-radius: 10px !important; overflow: hidden !important; }
.macts > a, .macts > div {
  cursor: pointer !important; 
  padding: 10px 16px !important;
  border-bottom: 1px solid #f8fafc !important;
  transition: background .12s !important;
}
.macts > a:hover, .macts > div:hover { background: #f0fdf9 !important; }

/* ── 15. MONTHS REMAINING: dynamic (done in JS) ── */

/* ── 16. BUDGET UTILIZATION: segment colors ── */
/* Encumbered = amber, Available = light green tint */

/* ── 17. TOTAL 79% BADGE: green since under pace ── */
tfoot td:nth-child(3) span { background: rgba(5,150,105,.1) !important; color: #059669 !important; }

/* ── 18. ENCUMBRANCE KROW: horizontal ── */
.krow { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)) !important; gap: 10px !important; }

/* ── 19. SIDEBAR YEC READINESS ── */
.sn-item[onclick*="nav(1)"] .sn-lbl::after { content: ' 84%' !important; color: #94a3b8 !important; font-size: 9px !important; }

/* ── 20. CONTRACTS BADGE: amber not red for 30d+ ── */

/* ── 21. BOARD PACKET: 4 feature cards ── */
.bp-feat-grid { 
  display: grid !important; 
  grid-template-columns: repeat(4,1fr) !important; 
  gap: 10px !important; 
}
.bp-feat-grid > * { min-width: 0 !important; overflow: hidden !important; }

/* ── 22. EXCEPTION CHIPS: horizontal with scroll ── */
.exc-chips { display: flex !important; gap: 8px !important; overflow-x: auto !important; }
.exc-chip { min-width: 220px !important; max-width: 280px !important; flex-shrink: 0 !important; }
.exc-chip-name { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; font-weight: 700 !important; color: #0f172a !important; }

/* ── 23. FIND INVOICES ROW: table-layout fixed ── */
.tw table { table-layout: fixed !important; width: 100% !important; }
.tw td, .tw th { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }

/* ── 24. GRANTS AT-RISK CARD: amber pulse ── */
.kcard[style*="--kc:var(--red)"] { animation: pulse-red 2s ease infinite !important; }
@keyframes pulse-red { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.15); } 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); } }

/* ── 25. POLICY ENGINE: rule cards horizontal ── */

/* ── 26. INVOICE TABLE COLUMNS: proper widths ── */
.tw th:nth-child(1), .tw td:nth-child(1) { width: 24px !important; }
.tw th:nth-child(2), .tw td:nth-child(2) { width: 24px !important; }
.tw th:nth-child(3), .tw td:nth-child(3) { width: 38px !important; text-align: center !important; }
.tw th:nth-child(4), .tw td:nth-child(4) { width: 38px !important; }
.tw th:nth-child(5), .tw td:nth-child(5) { width: 72px !important; }
.tw th:nth-child(6), .tw td:nth-child(6) { width: 150px !important; }
.tw th:nth-child(7), .tw td:nth-child(7) { width: 85px !important; text-align: right !important; }
.tw th:nth-child(8), .tw td:nth-child(8) { width: 80px !important; }
.tw th:nth-child(9), .tw td:nth-child(9) { width: 85px !important; }
.tw th:nth-child(10), .tw td:nth-child(10) { width: auto !important; }
.tw th:nth-child(11), .tw td:nth-child(11) { width: 75px !important; }

/* ── 27. FINDINGS BADGES: refined ── */
.b-r { background: rgba(220,38,38,.08) !important; color: #dc2626 !important; border: 1px solid rgba(220,38,38,.15) !important; padding: 2px 7px !important; border-radius: 4px !important; font-size: 9px !important; font-weight: 800 !important; text-transform: uppercase !important; letter-spacing: .04em !important; }
.b-a { background: rgba(217,119,6,.08) !important; color: #d97706 !important; border: 1px solid rgba(217,119,6,.15) !important; padding: 2px 7px !important; border-radius: 4px !important; font-size: 9px !important; font-weight: 800 !important; }
.b-g { background: rgba(5,150,105,.08) !important; color: #059669 !important; border: 1px solid rgba(5,150,105,.15) !important; padding: 2px 7px !important; border-radius: 4px !important; font-size: 9px !important; font-weight: 800 !important; }

/* ── 28. LIVE / HIGH / OPEN BADGES: consistent ── */
span[style*="LIVE"], .exc-src-live { background: rgba(5,150,105,.08) !important; color: #059669 !important; border: 1px solid rgba(5,150,105,.15) !important; border-radius: 4px !important; font-size: 8px !important; font-weight: 800 !important; padding: 1px 5px !important; letter-spacing: .04em !important; }
.exc-sev-pill.high, span[style*="HIGH"] { background: rgba(220,38,38,.08) !important; color: #dc2626 !important; border: 1px solid rgba(220,38,38,.15) !important; border-radius: 4px !important; font-size: 8px !important; font-weight: 800 !important; padding: 1px 5px !important; }

/* ── 29. GLOBAL TRANSITIONS ── */
.sn-item, .ftab, button, .kcard, [class*="-card"], tbody tr { transition: all .12s ease !important; }

/* ── 30. SCROLLBAR THIN EVERYWHERE ── */
* { scrollbar-width: thin !important; scrollbar-color: #e2e8f0 transparent !important; }
::-webkit-scrollbar { width: 3px !important; height: 3px !important; }
::-webkit-scrollbar-thumb { background: #cbd5e1 !important; border-radius: 3px !important; }

/* ══════════════════════════════════════════════════════════
   BUG FIXES: DISTRICT DROPDOWN + LOGIN PAGE
   ══════════════════════════════════════════════════════════ */

/* BUG 1: District dropdown was clipped by topbar overflow:hidden */
#topbar { overflow: visible !important; }
#district-wrap { overflow: visible !important; z-index: 1000 !important; }
#district-wrap > div { overflow: visible !important; }
/* The actual dropdown panel */
#district-wrap button + div,
#district-wrap > div > div:last-child {
  z-index: 9999 !important;
  overflow: auto !important;
  max-height: 400px !important;
}

/* BUG 2: Login page text invisible (white on white) */
.li-input-el {
  color: #0f172a !important;
  background: #f8fafc !important;
  caret-color: #059669 !important;
  -webkit-text-fill-color: #0f172a !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 9px 12px !important;
  font-size: 13px !important;
  font-family: var(--ui) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: border-color .15s, box-shadow .15s !important;
}
.li-input-el:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,.12) !important;
  background: #fff !important;
}
.li-input-el::placeholder { color: #94a3b8 !important; }
/* Autofill fix */
.li-input-el:-webkit-autofill,
.li-input-el:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a !important;
  -webkit-box-shadow: 0 0 0 1000px #f8fafc inset !important;
}
/* Login label */
.li-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-bottom: 5px !important;
  display: block !important;
  font-family: var(--ui) !important;
  letter-spacing: .02em !important;
}
/* Login select */
.li-input-el[tagName="SELECT"], select.li-input-el {
  color: #0f172a !important;
  background: #f8fafc !important;
  -webkit-text-fill-color: #0f172a !important;
}

/* ══ AI CHAT PANEL UPGRADES ══ */

/* AI quick buttons */
.ai-qb {
  font-size: 10px !important;
  padding: 4px 9px !important;
  border: 1px solid rgba(16,185,129,.25) !important;
  border-radius: 5px !important;
  background: rgba(16,185,129,.06) !important;
  color: #059669 !important;
  cursor: pointer !important;
  font-family: var(--ui) !important;
  font-weight: 600 !important;
  transition: all .12s !important;
  white-space: nowrap !important;
}
.ai-qb:hover {
  background: rgba(16,185,129,.12) !important;
  border-color: rgba(16,185,129,.4) !important;
}
/* AI input */
#ai-input, #wo-ai-input {
  color: #0f172a !important;
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  padding: 8px 12px !important;
  caret-color: #10b981 !important;
  -webkit-text-fill-color: #0f172a !important;
}
#ai-input:focus, #wo-ai-input:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,.1) !important;
  outline: none !important;
}
/* ══ TOPBAR OVERFLOW FIX (belt+suspenders) ══ */
#topbar { overflow: visible !important; }
#district-wrap { overflow: visible !important; z-index: 1000 !important; }
/* ══ UTIL BAR LEGEND ══ */
/* Available segment - green tint */

/* ══ FINAL UPGRADE PASS ══ */
#topbar { overflow: visible !important; }
#district-wrap { overflow: visible !important; z-index: 500 !important; }
#district-btn + div { z-index: 9999 !important; overflow-y: auto !important; max-height: 420px !important; box-shadow: 0 12px 40px rgba(0,0,0,.2) !important; }
.li-input-el { color: #0f172a !important; background: #f8fafc !important; caret-color: #059669 !important; -webkit-text-fill-color: #0f172a !important; border: 1.5px solid #e2e8f0 !important; border-radius: 8px !important; padding: 10px 13px !important; font-size: 13px !important; width: 100% !important; box-sizing: border-box !important; outline: none !important; }
.li-input-el:focus { border-color: #10b981 !important; box-shadow: 0 0 0 3px rgba(16,185,129,.12) !important; }
.li-input-el::placeholder { color: #94a3b8 !important; opacity: 1 !important; }
.li-input-el:-webkit-autofill, .li-input-el:-webkit-autofill:focus { -webkit-text-fill-color: #0f172a !important; -webkit-box-shadow: 0 0 0 1000px #f8fafc inset !important; }
.li-label { display: block !important; font-size: 11px !important; font-weight: 600 !important; color: #475569 !important; margin-bottom: 5px !important; }
select.li-input-el option { color: #0f172a !important; background: #fff !important; }
.ftab[data-ff] { max-width: none !important; white-space: nowrap !important; }
.bp-feat-grid { display: grid !important; grid-template-columns: repeat(4,1fr) !important; gap: 10px !important; overflow: visible !important; }
.gcard.AT-RISK { animation: gcard-pulse 2.5s ease infinite !important; border: 1px solid rgba(220,38,38,.3) !important; }
@keyframes gcard-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.12); } 50% { box-shadow: 0 0 0 5px rgba(220,38,38,0); } }

/* === P07-total-row === */

tfoot td:nth-child(3) span {
  display: inline-block !important;
  margin-left: 7px !important;
  vertical-align: middle !important;
}
/* === P10-util-bar-avail === */

/* Available segment — green tint */
[style*="Available"] ~ div[style*="background:#e"],
.budget-avail-seg { background: rgba(16,185,129,.15) !important; }
/* === P14-sidebar === */

.sn-sec { font-size:7.5px !important; font-weight:800 !important; letter-spacing:.2em !important; color:#64748b !important; text-transform:uppercase !important; padding:10px 14px 3px !important; }
.sn-item.active { background:linear-gradient(90deg,rgba(16,185,129,.1),transparent) !important; border-left:3px solid #10b981 !important; }
.sn-item.active .sn-lbl { color:#059669 !important; font-weight:700 !important; }
.sn-item:hover:not(.active) { background:rgba(0,0,0,.04) !important; }
.sn-ct { font-size:9px !important; font-weight:700 !important; padding:1px 6px !important; border-radius:10px !important; min-width:18px !important; text-align:center !important; }
.sb-org-name { font-size:11px !important; font-weight:700 !important; }
.sb-org-fy { font-size:9px !important; color:#64748b !important; }
/* === P15-kpi-typography === */

.kv18 { font-size:clamp(14px,1.8vw,22px) !important; font-weight:900 !important; letter-spacing:-.04em !important; font-variant-numeric:tabular-nums !important; }
.kcard { transition:transform .12s,box-shadow .12s !important; }
.kcard:hover { transform:translateY(-1px) !important; box-shadow:0 4px 12px rgba(0,0,0,.08) !important; }
/* === P17-exc-rows === */

.exc-table-wrap table td { padding:8px 10px !important; font-size:10.5px !important; line-height:1.5 !important; vertical-align:middle !important; }
.exc-table-wrap table th { font-size:8.5px !important; font-weight:800 !important; letter-spacing:.1em !important; text-transform:uppercase !important; color:#94a3b8 !important; padding:7px 10px !important; background:#f8fafc !important; }
.exc-table-wrap tbody tr:hover { background:#f0fdf9 !important; }
.exc-table-wrap tbody tr:nth-child(even) { background:#fafbfc !important; }
/* === P18-bp-hero === */

[style*="AI-COMPILED"] { color:rgba(255,255,255,.65) !important; font-size:10px !important; letter-spacing:.12em !important; }
[style*="SHA-256"] { color:rgba(255,255,255,.5) !important; }
/* === P19-action-chevrons === */

.m0-action-item { display:flex !important; align-items:flex-start !important; gap:10px !important; padding:10px 16px !important; border-bottom:1px solid #f8fafc !important; cursor:pointer !important; transition:background .12s !important; }
.m0-action-item:hover { background:#f8fffe !important; }
.m0-action-item:last-child { border-bottom:none !important; }
/* === P20-topbar-weight === */

.tb-mod { font-size:13px !important; font-weight:700 !important; color:#fff !important; text-transform:none !important; }
.tb-bc { font-size:9.5px !important; font-weight:700 !important; letter-spacing:.08em !important; color:rgba(255,255,255,.45) !important; text-transform:uppercase !important; }
/* === P21-sev-pills === */

.exc-sev-pill { display:inline-flex !important; align-items:center !important; justify-content:center !important; min-width:65px !important; padding:2px 7px !important; border-radius:4px !important; font-size:8.5px !important; font-weight:800 !important; letter-spacing:.06em !important; text-transform:uppercase !important; }
/* === P22-progress-bars === */

[style*="height:5px"][style*="background:var(--bg3)"] { background:#e2e8f0 !important; border-radius:4px !important; }
[style*="height:4px"][style*="background:var(--bg3)"] { background:#e2e8f0 !important; border-radius:4px !important; }
/* === P26-ai-modal === */

/* AI chat modal */
#ai-modal input { color:#0f172a !important; background:#f8fafc !important; }
#ai-modal input:focus { border-color:#10b981 !important; box-shadow:0 0 0 3px rgba(16,185,129,.12) !important; outline:none !important; }
#ai-msgs > div { max-width:85% !important; }
/* === P29-ai-float-btn === */

/* Floating AI button */
#ai-float-btn { position:fixed !important; bottom:24px !important; right:24px !important; z-index:999 !important; background:linear-gradient(135deg,#059669,#047857) !important; color:#fff !important; border:none !important; border-radius:50px !important; padding:10px 18px !important; font-size:12px !important; font-weight:700 !important; cursor:pointer !important; box-shadow:0 4px 16px rgba(5,150,105,.35) !important; display:flex !important; align-items:center !important; gap:6px !important; transition:transform .15s,box-shadow .15s !important; }
#ai-float-btn:hover { transform:translateY(-2px) !important; box-shadow:0 8px 24px rgba(5,150,105,.45) !important; }
/* === P38-global === */

/* Global polish */
* { scrollbar-width:thin !important; scrollbar-color:#e2e8f0 transparent !important; }
::-webkit-scrollbar { width:3px !important; height:3px !important; }
::-webkit-scrollbar-thumb { background:#cbd5e1 !important; border-radius:3px !important; }
.btn { font-family:var(--ui) !important; font-size:11px !important; font-weight:600 !important; border-radius:7px !important; cursor:pointer !important; transition:all .12s !important; }
.ftab,.bxs { font-size:10.5px !important; font-weight:600 !important; white-space:nowrap !important; transition:all .12s !important; }
.mono,[style*="font-family:var(--mono)"] { font-variant-numeric:tabular-nums !important; font-feature-settings:"tnum" !important; }
button:focus-visible,input:focus-visible { outline:2px solid #10b981 !important; outline-offset:2px !important; }
/* === P39-drill-down === */

.dd-table thead th,.drill-table thead th { font-size:8.5px !important; font-weight:800 !important; letter-spacing:.1em !important; text-transform:uppercase !important; color:#94a3b8 !important; background:#f8fafc !important; border-bottom:2px solid #e2e8f0 !important; }
.dd-table tbody tr:hover,.drill-table tbody tr:hover { background:#f8fffe !important; }
/* P16 tooltip */
[title]{cursor:help;}

@keyframes pulse-dot { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.3);opacity:.7} }

.tbl-wrap table tbody tr { transition: background .12s; }
.tbl-wrap table tbody tr:hover { background: var(--bg2) !important; cursor: pointer; }

.tbl-wrap table thead th,
.twf table thead th,
.tw table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg1);
  box-shadow: 0 1px 0 var(--line);
}

/* ── Sticky table headers ── */
.tbl-wrap { overflow: auto; }
.tbl-wrap table thead th,
.tw table thead th,
table.dtbl thead th {
  position: sticky; top: 0; z-index: 4;
  background: var(--bg1);
  box-shadow: 0 1px 0 var(--line2);
}


/* ── Print / Board Packet ── */
@media print {
  #sidebar, #topbar, #ai-float-btn, .macts, .bp-tabs, .stale-banner { display: none !important; }
  #main, #main-content { margin: 0 !important; padding: 0 !important; }
  .mfade { padding: 0 !important; }
  .panel { break-inside: avoid; page-break-inside: avoid; border: 0.5px solid #ccc !important; }
  .tbl-wrap { max-height: none !important; overflow: visible !important; }
  table thead th { position: static !important; }
  h1, .mtitle { font-size: 18px !important; }
  @page { margin: 1.5cm; }
  .bp-section { page-break-before: always; }
  body::before {
    content: 'WhiteOak.IO  ·  Budget Intelligence  ·  Confidential';
    display: block; font-size: 9px; color: #888; text-align: center;
    border-bottom: 0.5px solid #ccc; padding-bottom: 4px; margin-bottom: 12px;
  }
}

/* ── Command Palette ── */
#cmd-palette { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9999; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
#cmd-modal { background: var(--bg1); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,.28); width: 100%; max-width: 560px; overflow: hidden; }
#cmd-input { width: 100%; padding: 16px 18px; font-size: 15px; border: none; outline: none; background: transparent; border-bottom: 1px solid var(--line); color: var(--text); font-family: var(--ui); }
#cmd-list { max-height: 360px; overflow-y: auto; padding: 6px 0; }
.cmd-group-hdr { padding: 6px 14px 3px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); }
.cmd-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; cursor: pointer; border-radius: 6px; margin: 0 6px; transition: background .1s; }
.cmd-row:hover, .cmd-row.active { background: var(--bg2); }
.cmd-row-label { font-size: 13px; font-weight: 500; color: var(--text); }
.cmd-row-kbd { font-size: 10px; font-weight: 600; background: var(--bg3); padding: 2px 6px; border-radius: 4px; color: var(--text3); }
.cmd-footer { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 10px; color: var(--text3); display: flex; gap: 12px; }

/* ── Notification panel ── */
.notif-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .1s; }
.notif-item:hover { background: var(--bg2); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.notif-title { font-size: 12px; font-weight: 600; color: var(--text); }
.notif-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }
.notif-time { font-size: 10px; color: var(--text3); margin-top: 3px; }

/* ── Exception comments ── */
.exc-comment-thread { background: var(--bg2); border-top: 1px solid var(--line); padding: 10px 14px; }
.exc-comment { display: flex; gap: 8px; margin-bottom: 8px; }
.exc-comment-av { width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.exc-comment-body { flex: 1; background: var(--bg1); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 11px; }
.exc-comment-meta { font-size: 10px; color: var(--text3); margin-bottom: 2px; }
.exc-comment-text { color: var(--text2); }
.exc-comment-input { width: 100%; padding: 7px 10px; border: 1px solid var(--line2); border-radius: 6px; font-size: 12px; background: var(--bg1); color: var(--text); font-family: var(--ui); outline: none; resize: none; }

/* ── Vendor detail ── */
.vendor-detail-panel { position: fixed; right: 0; top: 0; bottom: 0; width: 420px; background: var(--bg1); border-left: 1px solid var(--line2); box-shadow: -8px 0 32px rgba(0,0,0,.12); z-index: 500; overflow-y: auto; transition: transform .2s; }
.vendor-detail-panel.hidden { transform: translateX(420px); }

/* ── Inline expanded rows ── */
.inv-expand { background: var(--bg2); border-top: 1px solid var(--line); }
.inline-edit-row { padding: 10px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-edit-row input, .inline-edit-row select { font-size: 12px; padding: 4px 8px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg1); color: var(--text); }

.m0-main-grid .tbl-wrap { max-height: none; overflow: visible; }

/* ── Module hero header (Budget Overview + Invoice Validation) ── */
.module-hero {
  background: linear-gradient(155deg, #060f1e 0%, #0a2818 50%, #060f1e 100%);
  border-radius: var(--r2);
  padding: 22px 26px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.module-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(5,150,105,.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 0% 100%, rgba(26,107,181,.08) 0%, transparent 55%);
  pointer-events: none;
}
.module-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.module-hero .m0-district,
.module-hero .m0-district * { color: #fff !important; }
.module-hero .m0-meta { color: rgba(255,255,255,.55) !important; }
.module-hero .m0-meta-chip { background: rgba(255,255,255,.1) !important; color: rgba(255,255,255,.7) !important; border-color: rgba(255,255,255,.15) !important; }
.module-hero .m0-meta-dot { background: rgba(255,255,255,.2) !important; }
.module-hero .m0-meta span { color: rgba(255,255,255,.55) !important; }
.module-hero .m0-hs-pill { background: rgba(255,255,255,.08) !important; }
.module-hero .mhdr { background: transparent !important; border: none !important; padding: 0 !important; margin: 0 !important; }
.module-hero .mtitle { color: #fff !important; font-size: 20px !important; }
.module-hero .msub { color: rgba(255,255,255,.45) !important; }
.module-hero .macts .btn { background: rgba(255,255,255,.1) !important; border-color: rgba(255,255,255,.2) !important; color: rgba(255,255,255,.8) !important; }
.module-hero .macts .btn.bp,
.module-hero .macts .btn.bg { background: rgba(5,150,105,.25) !important; border-color: rgba(5,150,105,.4) !important; color: #6ee7b7 !important; }

/* Exception table compact td */
.exc-table-wrap td { padding: 7px 10px; }
.exc-table-wrap th { padding: 6px 10px; font-size: 9px; }

/* Invoice table compact */
.tw table td, .tw table th { padding: 6px 8px; }
.tw table th { font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }

.exc-layout { width: 100%; }
.exc-chips { width: 100%; }
.exc-table-wrap { text-align: left !important; }
.exc-table-wrap td, .exc-table-wrap th { text-align: left !important; }
.exc-table-wrap td.tac, .exc-table-wrap th.tac { text-align: center !important; }

.exc-table-wrap tbody tr.exc-tr-expand td > div { text-align: left !important; }
.exc-table-wrap tbody tr.exc-tr-expand td { text-align: left !important; vertical-align: top; }

.exc-table-wrap table { text-align: left; }
.exc-table-wrap td { text-align: left !important; }
.exc-table-wrap th { text-align: left !important; }
.exc-table-wrap td.tac, .exc-table-wrap th.tac { text-align: center !important; }

.exc-chip { display: flex !important; flex-direction: column !important; gap: 2px !important; overflow: hidden !important; min-width: 0 !important; }
.exc-chip-sev { flex-shrink: 0 !important; display: block !important; }
.exc-chip-name { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; font-size: 11.5px !important; font-weight: 700 !important; display: block !important; }
.exc-chip-desc { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; display: block !important; }
.exc-chip-body { display: none; }

/* ── Exc chip clean override (new stacked layout) ── */
.exc-chip { display: flex !important; flex-direction: column !important; gap: 2px !important; padding: 8px 10px !important; overflow: hidden !important; min-width: 0 !important; }
.exc-chip .exc-chip-sev { display: block !important; font-family: var(--mono); font-size: 7px !important; font-weight: 700 !important; letter-spacing: .1em; text-transform: uppercase; color: var(--chip-col); margin-bottom: 2px; }
.exc-chip .exc-chip-name { display: block !important; font-size: 11.5px !important; font-weight: 700 !important; color: var(--text) !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
.exc-chip .exc-chip-desc { display: block !important; font-size: 10px !important; color: var(--text3) !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; margin-top: 1px; }
.exc-chip .exc-chip-body { display: none !important; }

/* ── Exc hero compact ── */
.exc-hero { max-height: 120px !important; overflow: hidden; }
.exc-hero-stats { flex-wrap: nowrap !important; gap: 16px !important; }
.exc-hero-val { font-size: 16px !important; }
.exc-hero-stat { flex-shrink: 1; min-width: 60px; }

.exc-tr-expand td[colspan] { text-align: left !important; padding: 5px 10px 10px 12px !important; }
.exc-tr-expand td[colspan] div { text-align: left !important; }

/* ── AI typing indicator ── */
.ai-typing { display: inline-flex; gap: 4px; align-items: center; padding: 2px 0; }
.ai-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); opacity: .3;
  animation: ai-pulse 1.2s ease-in-out infinite;
  display: inline-block;
}
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ai-pulse {
  0%, 80%, 100% { opacity: .3; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1.1); }
}








/* Overlay */


/* Quick chips — horizontal scroll row */
.ai-qb {
  font-size: 10.5px !important;
  font-weight: 500 !important;
  padding: 5px 10px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  background: #fff !important;
  cursor: pointer !important;
  color: #475569 !important;
  white-space: nowrap !important;
  transition: all .15s !important;
  flex-shrink: 0 !important;
}
.ai-qb:hover {
  background: #f0fdf4 !important;
  border-color: rgba(10,158,92,.3) !important;
  color: #0A9E5C !important;
}

/* Message bubbles */
.ai-msg-user {
  background: #0A9E5C !important;
  color: #fff !important;
  border-radius: 12px 12px 3px 12px !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  margin-left: 32px !important;
  box-shadow: 0 2px 8px rgba(10,158,92,.2) !important;
}
.ai-msg-bot {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 3px 12px 12px 12px !important;
  padding: 12px 15px !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
  margin-right: 8px !important;
}
.ai-msg-bot-label {
  font-size: 9px;
  font-weight: 700;
  color: #0A9E5C;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* Scrollbar hidden on chips */


/* Typing indicator */
.ai-typing { display: inline-flex; gap: 3px; align-items: center; padding: 4px 2px; }
.ai-typing span { width: 6px; height: 6px; border-radius: 50%; background: #0A9E5C; display: inline-block; animation: ai-bounce .9s ease-in-out infinite; }
.ai-typing span:nth-child(2) { animation-delay: .15s; }
.ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }




/* Messages area must grow to fill space */







/* ══ WhiteOakAI Chat Panel ══ */
#ai-chat-modal {
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 20px !important;
  backdrop-filter: blur(3px);
}
#ai-chat-modal > div {
  display: flex !important;
  flex-direction: column !important;
  width: min(500px, calc(100vw - 40px)) !important;
  height: min(680px, calc(100vh - 80px)) !important;
  border-radius: 14px !important;
  box-shadow: 0 32px 96px rgba(0,0,0,.32) !important;
  overflow: hidden !important;
  background: #fff !important;
}
#ai-messages {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  background: #f8fafc !important;
}
