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

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #f6f5f1;
  color: #1a1a1f;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
a { color: inherit; text-decoration: none; }

/* ---------- App shell ---------- */
.app {
  width: 1440px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  background: #f6f5f1;
  min-height: 100vh;
  position: relative;
}
.app::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(120, 100, 220, 0.08), transparent 60%),
    radial-gradient(700px 400px at -10% 60%, rgba(60, 140, 200, 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  z-index: 5;
}
.side-card {
  height: 100%;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(20,20,30,0.06);
  border-radius: 20px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 12px 40px -20px rgba(40,40,80,.18);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 14px;
  border-bottom: 1px solid rgba(20,20,30,0.06);
}
.brand-logo {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(140deg,#1a1a2e 0%, #2a2a4a 100%);
  display: flex; align-items: center; justify-content: center;
  color: #f4d27a; font-weight: 700; font-size: 13px;
  font-family: 'Instrument Serif', serif;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
.brand-name { font-weight: 600; font-size: 13.5px; color: #1a1a1f; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: #8a8a92; }

.nav-group { padding: 14px 4px 6px; }
.nav-group-label { font-size: 10.5px; color: #a4a4ac; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; padding: 0 8px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px; color: #4a4a55;
  margin-bottom: 1px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}
.nav-item:hover { background: rgba(20,20,30,0.04); color: #1a1a1f; }
.nav-item.active {
  background: linear-gradient(180deg, #1a1a2e, #25253f);
  color: #f1f1f5;
  box-shadow: 0 4px 14px -6px rgba(20,20,40,.4);
}
.nav-item .ic { width: 16px; height: 16px; opacity: .8; display: inline-block; flex-shrink: 0; }
.nav-item .badge { margin-left: auto; font-size: 10.5px; padding: 1px 7px; border-radius: 99px; background: rgba(20,20,30,0.06); color: #4a4a55; font-weight: 500; }
.nav-item.active .badge { background: rgba(244, 210, 122, 0.2); color: #f4d27a; }

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(20,20,30,0.06);
  padding-top: 12px;
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg,#f4d27a,#d8a14a);
  color: #1a1a2e; font-weight: 600; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px -2px rgba(216,161,74,.4);
}
.user-name { font-size: 12.5px; font-weight: 600; }
.user-role { font-size: 11px; color: #8a8a92; }
.user-menu-icon { margin-left: auto; color: #a4a4ac; font-size: 14px; cursor: pointer; }

/* ---------- Main column ---------- */
.main {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  padding: 18px 24px 32px 8px;
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 18px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(20,20,30,0.06);
  border-radius: 16px;
  margin-bottom: 18px;
  position: sticky; top: 18px;
  z-index: 4;
  box-shadow: 0 6px 20px -12px rgba(40,40,80,.12);
}
.crumbs { font-size: 12.5px; color: #8a8a92; display: flex; align-items: center; gap: 6px; }
.crumbs .now { color: #1a1a1f; font-weight: 500; }
.search {
  margin-left: 16px;
  flex: 1; max-width: 360px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(20,20,30,0.04); border-radius: 10px;
  padding: 7px 12px; font-size: 12.5px; color: #8a8a92;
}
.search .kbd { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; background: rgba(255,255,255,.7); border: 1px solid rgba(20,20,30,0.06); padding: 2px 6px; border-radius: 5px; color: #6a6a72; }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-pill { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; color: #4a4a55; cursor: pointer; position: relative; background: transparent; border: 0; font-size: 14px; }
.icon-pill:hover { background: rgba(20,20,30,0.05); }
.dot-red { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #e85d3c; box-shadow: 0 0 0 2px rgba(255,255,255,0.8); }
.divider-v { width: 1px; height: 22px; background: rgba(20,20,30,0.08); margin: 0 4px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(800px 280px at 80% -20%, rgba(244, 210, 122, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.55));
  border: 1px solid rgba(20,20,30,0.06);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 26px 28px;
  margin-bottom: 18px;
  box-shadow: 0 10px 40px -22px rgba(40,40,80,.18);
  position: relative;
  overflow: hidden;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; color: #6a6a72; font-weight: 500;
  background: rgba(20,20,30,0.04);
  padding: 4px 10px; border-radius: 99px;
  margin-bottom: 14px;
}
.eyebrow .live { width: 6px; height: 6px; border-radius: 50%; background: #2fa37a; box-shadow: 0 0 0 4px rgba(47,163,122,.15); }
.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 38px;
  letter-spacing: -0.015em;
  color: #1a1a1f;
  margin: 0 0 6px;
  line-height: 1.1;
}
.hero h1 em { font-style: italic; color: #5a5a8a; }
.hero p { color: #6a6a72; margin: 0; font-size: 14px; max-width: 640px; }
.hero-actions { position: absolute; top: 26px; right: 28px; display: flex; gap: 8px; align-items: center; }

/* ---------- Buttons ---------- */
.btn { font-family: inherit; font-size: 12.5px; font-weight: 500; padding: 9px 14px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; text-decoration: none; }
.btn-ghost { background: rgba(255,255,255,0.6); border-color: rgba(20,20,30,0.08); color: #1a1a1f; backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,0.9); }
.btn-dark { background: linear-gradient(180deg,#1a1a2e,#25253f); color: #f1f1f5; box-shadow: 0 6px 18px -8px rgba(20,20,40,.5); }
.btn-dark:hover { filter: brightness(1.1); }
.btn-danger { background: linear-gradient(180deg,#c4421f,#e85d3c); color: #fff; box-shadow: 0 6px 18px -8px rgba(196,66,31,.45); }
.btn-success { background: linear-gradient(180deg,#1f7a58,#2fa37a); color: #fff; box-shadow: 0 6px 18px -8px rgba(31,122,88,.45); }

/* ---------- Filters ---------- */
.filters-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px dashed rgba(20,20,30,0.08);
}
.fchip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(255,255,255,0.7); border: 1px solid rgba(20,20,30,0.06);
  font-size: 12px; color: #4a4a55; cursor: pointer;
}
.fchip strong { color: #1a1a1f; font-weight: 500; }
.fchip:hover { background: #fff; }
.fchip.add { background: transparent; border-style: dashed; color: #8a8a92; }
.seg { margin-left: auto; display: inline-flex; background: rgba(20,20,30,0.05); border-radius: 99px; padding: 3px; }
.seg button { font-family: inherit; border: 0; background: transparent; padding: 5px 12px; border-radius: 99px; font-size: 11.5px; color: #6a6a72; cursor: pointer; }
.seg button.on { background: #fff; color: #1a1a1f; font-weight: 500; box-shadow: 0 2px 6px -2px rgba(0,0,0,.1); }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpis-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.tile {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(20,20,30,0.06);
  border-radius: 18px;
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px -10px rgba(40,40,80,.15);
}
.tile.dark {
  background: linear-gradient(160deg, #1a1a2e 0%, #2a2a4a 100%);
  color: #f1f1f5;
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 18px 40px -18px rgba(20,20,40,.5);
}
.tile-label { font-size: 11.5px; color: #6a6a72; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.tile.dark .tile-label { color: #b8b8cc; }
.tile-value {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 38px;
  letter-spacing: -0.02em;
  margin-top: 10px;
  line-height: 1;
}
.tile.dark .tile-value { color: #fff; }
.tile-value sup { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500; color: #8a8a92; margin-left: 4px; vertical-align: top; }
.tile-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11.5px; }
.pill { padding: 2px 8px; border-radius: 99px; font-weight: 500; font-size: 11px; }
.pill-up-bad { background: rgba(232, 93, 60, 0.12); color: #c4421f; }
.pill-down-good { background: rgba(47, 163, 122, 0.14); color: #1f7a58; }
.pill-flat { background: rgba(20,20,30,0.06); color: #4a4a55; }
.pill-gold { background: rgba(244, 210, 122, 0.18); color: #8a6a1a; }
.tile.dark .pill-gold { background: rgba(244, 210, 122, 0.18); color: #f4d27a; }
.tile-spark { width: 100%; height: 30px; margin-top: 12px; }
.muted { color: #8a8a92; }
.tile.dark .muted { color: #a4a4b8; }

/* ---------- Grids ---------- */
.grid-12 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 18px; }
.grid-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.grid-21 { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; margin-bottom: 18px; }

/* ---------- Panel ---------- */
.panel {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(20,20,30,0.06);
  border-radius: 20px;
  box-shadow: 0 8px 30px -16px rgba(40,40,80,.18);
  overflow: hidden;
  margin-bottom: 18px;
}
.panel-head { padding: 18px 22px 0; display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.panel-title { font-size: 15px; font-weight: 600; color: #1a1a1f; letter-spacing: -0.01em; }
.panel-sub { font-size: 12px; color: #8a8a92; margin-top: 3px; }
.panel-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.panel-body { padding: 16px 22px 22px; }

.legend { display: flex; gap: 16px; font-size: 11.5px; color: #6a6a72; margin: 6px 0 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* ---------- Drivers list ---------- */
.driver { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(20,20,30,0.06); align-items: center; }
.driver:last-child { border-bottom: 0; padding-bottom: 0; }
.driver:first-child { padding-top: 6px; }
.driver-h { font-size: 13.5px; font-weight: 500; color: #1a1a1f; }
.driver-m { font-size: 11.5px; color: #8a8a92; margin-top: 2px; }
.dbar { height: 5px; background: rgba(20,20,30,0.06); border-radius: 99px; margin-top: 9px; width: 240px; max-width: 100%; overflow: hidden; }
.dbar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg,#1a1a2e,#5a5a8a); }
.dbar-fill.gold { background: linear-gradient(90deg,#d8a14a,#f4d27a); }
.dbar-fill.red { background: linear-gradient(90deg,#c4421f,#e85d3c); }
.dbar-fill.green { background: linear-gradient(90deg,#1f7a58,#2fa37a); }
.driver-amt { text-align: right; }
.driver-amt b { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 20px; color: #1a1a1f; letter-spacing: -0.01em; }
.driver-amt small { display: block; color: #8a8a92; font-size: 11px; margin-top: 2px; }

/* ---------- Scenario / Outcome ---------- */
.scen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.field-label { font-size: 11.5px; color: #6a6a72; font-weight: 500; display: flex; justify-content: space-between; }
.field-label b { font-weight: 600; color: #1a1a1f; font-family: 'JetBrains Mono', monospace; }
.range { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 99px; background: rgba(20,20,30,0.08); margin-top: 12px; outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #1a1a2e; border: 3px solid #fff; box-shadow: 0 2px 8px -2px rgba(20,20,40,.5); cursor: pointer; }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #1a1a2e; border: 3px solid #fff; cursor: pointer; }
.range-meta { font-size: 11px; color: #a4a4ac; margin-top: 6px; display: flex; justify-content: space-between; }

.outcome {
  margin-top: 22px;
  background: linear-gradient(160deg, #1a1a2e 0%, #2e2e52 100%);
  color: #f1f1f5;
  border-radius: 16px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.outcome::after {
  content: '';
  position: absolute; right: -40px; top: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(closest-side, rgba(244,210,122,0.25), transparent);
}
.out-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; color: #c8c8d8; }
.out-row b { color: #fff; font-weight: 500; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; }
.out-total { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 10px; padding-top: 12px; font-size: 14px; }
.out-total .gold { color: #f4d27a; font-family: 'Instrument Serif', serif; font-size: 22px; font-weight: 400; }

/* ---------- Tables ---------- */
.dept-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.dept-tbl th { text-align: left; font-weight: 500; color: #8a8a92; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 14px 18px; border-bottom: 1px solid rgba(20,20,30,0.06); }
.dept-tbl td { padding: 16px 18px; border-bottom: 1px solid rgba(20,20,30,0.04); color: #1a1a1f; vertical-align: middle; }
.dept-tbl tbody tr:last-child td { border-bottom: 0; }
.dept-tbl tbody tr { cursor: pointer; }
.dept-tbl tbody tr:hover td { background: rgba(20,20,30,0.02); }
.dept-name { display: flex; align-items: center; gap: 12px; }
.d-icon { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg,#eef0f6,#dadeec); display: flex; align-items: center; justify-content: center; font-weight: 600; color: #5a5a8a; font-size: 12px; flex-shrink: 0; }
.d-name-h { font-weight: 500; }
.d-name-s { font-size: 11px; color: #8a8a92; margin-top: 1px; }

/* ---------- Tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 500; }
.tag-r { background: rgba(232, 93, 60, 0.12); color: #c4421f; }
.tag-a { background: rgba(217, 161, 74, 0.16); color: #8a5a14; }
.tag-g { background: rgba(47, 163, 122, 0.14); color: #1f7a58; }
.tag-n { background: rgba(20,20,30,0.06); color: #4a4a55; }
.tag-b { background: rgba(60,140,200,0.14); color: #1f6a8a; }
.tag-p { background: rgba(120,100,220,0.14); color: #4a3aaa; }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-r { background: #e85d3c; } .dot-a { background: #d9a14a; } .dot-g { background: #2fa37a; }
.dot-b { background: #3c8cc8; } .dot-p { background: #7864dc; }

/* ---------- Footer ---------- */
footer.foot {
  margin-top: 14px;
  padding: 16px 22px;
  font-size: 11.5px;
  color: #8a8a92;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.foot-left { display: flex; gap: 14px; align-items: center; }
.foot-left .live { width: 6px; height: 6px; border-radius: 50%; background: #2fa37a; box-shadow: 0 0 0 4px rgba(47,163,122,.15); display: inline-block; }

/* ---------- Approvals queue / Alert list ---------- */
.qlist { display: flex; flex-direction: column; }
.qrow {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(20,20,30,0.05);
  cursor: pointer;
  transition: background .15s;
}
.qrow:last-child { border-bottom: 0; }
.qrow:hover { background: rgba(20,20,30,0.02); }
.qrow.selected { background: rgba(244,210,122,0.08); }
.qrow .pri-bar { width: 4px; height: 36px; border-radius: 4px; }
.qrow .pri-bar.r { background: #e85d3c; }
.qrow .pri-bar.a { background: #d9a14a; }
.qrow .pri-bar.g { background: #2fa37a; }
.qrow .pri-bar.b { background: #3c8cc8; }
.qrow .qmain { min-width: 0; }
.qrow .qtitle { font-size: 13.5px; font-weight: 500; color: #1a1a1f; }
.qrow .qsub { font-size: 11.5px; color: #8a8a92; margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.qrow .qhours { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #1a1a1f; min-width: 68px; text-align: right; }
.qrow .qcost { font-family: 'Instrument Serif', serif; font-size: 18px; color: #1a1a1f; min-width: 72px; text-align: right; letter-spacing: -0.01em; }

/* ---------- Login screen ---------- */
.login-shell {
  min-height: 100vh;
  background: #f6f5f1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 24px;
}
.login-shell::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(120, 100, 220, 0.18), transparent 60%),
    radial-gradient(700px 500px at 90% 40%, rgba(244, 210, 122, 0.18), transparent 60%),
    radial-gradient(700px 500px at 30% 110%, rgba(60, 140, 200, 0.14), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 480px; max-width: 100%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(20,20,30,0.06);
  border-radius: 24px;
  padding: 36px 36px 28px;
  box-shadow: 0 30px 80px -30px rgba(40,40,80,.3);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-brand .brand-logo { width: 44px; height: 44px; border-radius: 12px; font-size: 18px; }
.login-card h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.015em;
  margin: 16px 0 4px;
  line-height: 1.15;
}
.login-card h1 em { font-style: italic; color: #5a5a8a; }
.login-card .lead { color: #6a6a72; font-size: 13.5px; margin: 0 0 22px; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.role-btn {
  border: 1px solid rgba(20,20,30,0.08);
  background: rgba(255,255,255,0.7);
  border-radius: 14px;
  padding: 14px 14px;
  text-align: left;
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.role-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -16px rgba(40,40,80,.25); border-color: rgba(20,20,30,0.16); }
.role-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#1a1a2e 0%, #2a2a4a 100%);
  color: #f4d27a;
  font-family: 'Instrument Serif', serif;
  font-size: 14px;
  flex-shrink: 0;
}
.role-name { font-weight: 600; font-size: 13.5px; }
.role-sub { font-size: 11.5px; color: #8a8a92; margin-top: 1px; }
.sso-row {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(20,20,30,0.08);
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: #8a8a92;
}
.sso-row .live { width: 6px; height: 6px; border-radius: 50%; background: #2fa37a; box-shadow: 0 0 0 4px rgba(47,163,122,.15); }
.fineprint { font-size: 11px; color: #a4a4ac; margin-top: 18px; line-height: 1.6; }

/* ---------- Investigation evidence ---------- */
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ev-block {
  border: 1px solid rgba(20,20,30,0.06);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.6);
}
.ev-h { font-size: 12px; font-weight: 600; color: #1a1a1f; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ev-row { font-size: 12.5px; color: #4a4a55; padding: 6px 0; border-bottom: 1px dashed rgba(20,20,30,0.06); display: flex; justify-content: space-between; gap: 12px; }
.ev-row:last-child { border-bottom: 0; }
.ev-row .k { color: #8a8a92; }
.ev-row .v { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: #1a1a1f; text-align: right; }

/* ---------- Notes / timeline ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: rgba(20,20,30,0.08); border-radius: 2px; }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-item::before { content: ''; position: absolute; left: -19px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: #1a1a2e; box-shadow: 0 0 0 3px #fff; }
.tl-item.gold::before { background: #f4d27a; }
.tl-item.green::before { background: #2fa37a; }
.tl-item.red::before { background: #e85d3c; }
.tl-when { font-size: 11px; color: #8a8a92; font-family: 'JetBrains Mono', monospace; }
.tl-what { font-size: 13px; color: #1a1a1f; margin-top: 2px; }
.tl-who { font-size: 11.5px; color: #6a6a72; margin-top: 2px; }

/* ---------- Switch & rule editor ---------- */
.sw { position: relative; display: inline-block; width: 36px; height: 20px; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw .slider { position: absolute; cursor: pointer; inset: 0; background: rgba(20,20,30,0.15); border-radius: 99px; transition: .2s; }
.sw .slider::before { position: absolute; content: ''; height: 16px; width: 16px; left: 2px; top: 2px; background: white; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sw input:checked + .slider { background: #1a1a2e; }
.sw input:checked + .slider::before { transform: translateX(16px); }

.rule-row {
  border: 1px solid rgba(20,20,30,0.06);
  border-radius: 14px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.6);
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}
.rule-h { display: flex; align-items: center; gap: 10px; }
.rule-h .rule-id { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #8a8a92; background: rgba(20,20,30,0.05); padding: 2px 7px; border-radius: 6px; }
.rule-h .rule-title { font-weight: 600; font-size: 13.5px; }
.rule-desc { font-size: 12.5px; color: #6a6a72; margin-top: 4px; }
.rule-meta { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.rule-meta .kv { font-size: 11.5px; color: #8a8a92; }
.rule-meta .kv b { color: #1a1a1f; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500; margin-left: 4px; }

/* ---------- Numeric input ---------- */
.num-input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  width: 80px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(20,20,30,0.1);
  background: #fff;
  color: #1a1a1f;
}

/* ---------- Stats line ---------- */
.stat-line { display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap; }
.stat-line .sv { font-family: 'Instrument Serif', serif; font-size: 32px; line-height: 1; letter-spacing: -0.02em; }
.stat-line .sl { font-size: 11.5px; color: #6a6a72; margin-left: 4px; }

/* ---------- Heatmap ---------- */
.heatmap { display: grid; grid-template-columns: 80px repeat(12, 1fr); gap: 2px; font-size: 10px; }
.heatmap .hm-label { font-size: 11px; color: #6a6a72; padding: 4px 6px; }
.heatmap .hm-cell { aspect-ratio: 1.4 / 1; border-radius: 4px; cursor: pointer; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a2e; color: #fff;
  padding: 12px 18px; border-radius: 12px;
  font-size: 13px; opacity: 0; pointer-events: none;
  transition: all .25s ease;
  box-shadow: 0 12px 40px -12px rgba(0,0,0,.4);
  z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive collapse ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-12, .grid-eq, .grid-21 { grid-template-columns: 1fr; }
  .scen-grid { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar { display: none; }
  .main { padding: 12px; }
  .kpis { grid-template-columns: 1fr; }
  .role-pick { grid-template-columns: 1fr; }
  .topbar { position: static; flex-wrap: wrap; }
  .search { max-width: 100%; }
}
