:root {
  --navy: #0B1929; --navy-mid: #132338; --navy-light: #1a3050;
  --gold: #C9A84C; --gold-light: #e0c06a; --gold-dim: #9a7a34;
  --teal: #1D9E75; --teal-light: #25c492; --teal-dim: #156e52;
  --silver: #8FA8C0; --silver-light: #b8cfe0; --silver-dim: #607d96;
  --white: #F8FAFC; --surface: #111f30; --surface2: #162840;
  --border: rgba(143,168,192,.18); --border-gold: rgba(201,168,76,.25);
  --text: #e8f0f8; --text-dim: #8FA8C0; --text-muted: #506a84;
  --danger: #e05c5c; --warn: #d4953a;
  --r: 8px; --r-lg: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,.35);
  --transition: .18s ease;
}
* { box-sizing:border-box; margin:0; padding:0; }
body { font-family:'Barlow',sans-serif; background:var(--navy); color:var(--text); min-height:100vh; display:flex; flex-direction:column; }

/* TOPBAR */
.topbar { background:var(--navy-mid); border-bottom:1px solid var(--border-gold); padding:0 28px; height:58px; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:100; }
.logo { font-family:'Cormorant Garamond',serif; font-size:1.25rem; font-weight:600; color:var(--gold); letter-spacing:.04em; display:flex; align-items:center; gap:10px; cursor:pointer; }
.logo span { color:var(--silver); font-weight:300; font-size:1rem; }
.logo-dot { width:8px; height:8px; background:var(--teal); border-radius:50%; margin-left:2px; }
.topbar-right { display:flex; align-items:center; gap:20px; }
.org-badge { background:var(--surface2); border:1px solid var(--border); padding:4px 12px; border-radius:20px; font-size:.78rem; color:var(--silver); display:flex; align-items:center; gap:6px; }
.org-dot { width:7px; height:7px; background:var(--teal); border-radius:50%; }
.avatar { width:32px; height:32px; border-radius:50%; background:linear-gradient(135deg,var(--gold-dim),var(--gold)); display:flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:600; color:var(--navy); cursor:pointer; }

/* LAYOUT */
.layout { display:flex; flex:1; }

/* SIDEBAR */
.sidebar { width:220px; background:var(--navy-mid); border-right:1px solid var(--border); padding:24px 0; display:flex; flex-direction:column; gap:4px; flex-shrink:0; }
.nav-section { padding:0 16px 6px; font-size:.68rem; font-weight:600; color:var(--text-muted); letter-spacing:.1em; text-transform:uppercase; margin-top:16px; }
.nav-section:first-child { margin-top:0; }
.nav-item { margin:0 8px; padding:9px 14px; border-radius:var(--r); cursor:pointer; display:flex; align-items:center; gap:10px; font-size:.85rem; color:var(--silver); transition:var(--transition); position:relative; text-decoration:none; }
.nav-item:hover { background:var(--surface2); color:var(--text); }
.nav-item.active { background:linear-gradient(90deg,rgba(201,168,76,.12),rgba(201,168,76,.05)); color:var(--gold); border:1px solid var(--border-gold); }
.nav-item.active::before { content:''; position:absolute; left:0; top:20%; height:60%; width:3px; background:var(--gold); border-radius:0 3px 3px 0; }
.nav-icon { font-size:1rem; width:18px; text-align:center; }
.nav-badge { margin-left:auto; background:var(--teal); color:var(--white); font-size:.65rem; font-weight:600; padding:1px 7px; border-radius:10px; }
.nav-badge.warn { background:var(--warn); }

/* MAIN */
.main { flex:1; overflow-y:auto; padding:32px 36px; }

/* PAGE HEADER */
.page-hdr { margin-bottom:28px; }
.breadcrumb { font-size:.75rem; color:var(--text-muted); margin-bottom:8px; display:flex; align-items:center; gap:6px; }
.breadcrumb a { color:var(--silver-dim); cursor:pointer; text-decoration:none; }
.breadcrumb a:hover { color:var(--gold); }
.page-title { font-family:'Cormorant Garamond',serif; font-size:1.9rem; font-weight:600; color:var(--white); letter-spacing:.01em; }
.page-sub { font-size:.85rem; color:var(--text-dim); margin-top:4px; }

/* CARDS */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:24px; }
.card-gold { border-color:var(--border-gold); }

/* STATS ROW */
.stats { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:28px; }
.stat { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:20px; position:relative; overflow:hidden; }
.stat::after { content:''; position:absolute; top:0; left:0; right:0; height:3px; background:var(--gold); opacity:.5; }
.stat.teal::after { background:var(--teal); }
.stat.warn::after { background:var(--warn); }
.stat.danger::after { background:var(--danger); }
.stat-val { font-family:'Cormorant Garamond',serif; font-size:2.1rem; font-weight:600; color:var(--white); line-height:1; }
.stat-label { font-size:.75rem; color:var(--text-muted); margin-top:6px; text-transform:uppercase; letter-spacing:.06em; }
.stat-delta { font-size:.75rem; color:var(--teal); margin-top:4px; }
.stat-delta.neg { color:var(--danger); }

/* MODULE CARDS */
.modules { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-bottom:32px; }
.module-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:28px; cursor:pointer; transition:var(--transition); position:relative; overflow:hidden; text-decoration:none; display:block; }
.module-card:hover { border-color:var(--gold); transform:translateY(-2px); box-shadow:0 8px 32px rgba(0,0,0,.4); }
.module-card::before { content:''; position:absolute; bottom:0; left:0; right:0; height:3px; opacity:0; transition:var(--transition); }
.module-card.gold-mod::before { background:var(--gold); }
.module-card.teal-mod::before { background:var(--teal); }
.module-card.silver-mod::before { background:var(--silver); }
.module-card:hover::before { opacity:1; }
.mod-icon { font-size:2rem; margin-bottom:16px; }
.mod-title { font-family:'Cormorant Garamond',serif; font-size:1.35rem; font-weight:600; color:var(--white); margin-bottom:8px; }
.mod-desc { font-size:.82rem; color:var(--text-dim); line-height:1.6; }
.mod-count { margin-top:16px; display:flex; gap:12px; flex-wrap:wrap; }
.mod-pill { background:var(--surface2); border:1px solid var(--border); padding:3px 10px; border-radius:12px; font-size:.72rem; color:var(--silver); }
.mod-arrow { position:absolute; top:24px; right:24px; color:var(--text-muted); font-size:1rem; }

/* TABLE */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
thead tr { border-bottom:1px solid var(--border-gold); }
th { padding:10px 14px; text-align:left; font-size:.72rem; font-weight:600; color:var(--gold); letter-spacing:.08em; text-transform:uppercase; }
td { padding:12px 14px; font-size:.84rem; color:var(--text); border-bottom:1px solid var(--border); }
tr:last-child td { border-bottom:none; }
tr:hover td { background:rgba(255,255,255,.02); }
.clickable-row { cursor:pointer; }

/* BADGES */
.badge { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:12px; font-size:.72rem; font-weight:500; }
.badge::before { content:''; width:6px; height:6px; border-radius:50%; }
.badge-green { background:rgba(29,158,117,.15); color:#25c492; border:1px solid rgba(29,158,117,.3); }
.badge-green::before { background:#25c492; }
.badge-gold { background:rgba(201,168,76,.12); color:var(--gold-light); border:1px solid rgba(201,168,76,.25); }
.badge-gold::before { background:var(--gold); }
.badge-red { background:rgba(224,92,92,.12); color:#f08080; border:1px solid rgba(224,92,92,.25); }
.badge-red::before { background:#e05c5c; }
.badge-gray { background:rgba(143,168,192,.1); color:var(--silver); border:1px solid var(--border); }
.badge-gray::before { background:var(--silver-dim); }
.badge-blue { background:rgba(143,168,192,.15); color:var(--silver-light); border:1px solid rgba(143,168,192,.3); }
.badge-blue::before { background:var(--silver); }

/* RISK SCORE */
.risk-bar { display:flex; align-items:center; gap:8px; }
.risk-track { flex:1; height:5px; background:var(--surface2); border-radius:3px; overflow:hidden; }
.risk-fill { height:100%; border-radius:3px; }
.risk-fill.low { background:var(--teal); }
.risk-fill.med { background:var(--warn); }
.risk-fill.high { background:var(--danger); }
.risk-num { font-size:.78rem; font-weight:600; min-width:28px; }
.risk-num.low { color:var(--teal); }
.risk-num.med { color:var(--warn); }
.risk-num.high { color:var(--danger); }

/* BUTTONS */
.btn { display:inline-flex; align-items:center; gap:7px; padding:8px 18px; border-radius:var(--r); font-family:'Barlow',sans-serif; font-size:.84rem; font-weight:500; cursor:pointer; transition:var(--transition); border:none; text-decoration:none; }
.btn-gold { background:var(--gold); color:var(--navy); }
.btn-gold:hover { background:var(--gold-light); }
.btn-teal { background:var(--teal); color:#fff; }
.btn-teal:hover { background:var(--teal-light); }
.btn-outline { background:transparent; color:var(--silver); border:1px solid var(--border); }
.btn-outline:hover { border-color:var(--silver); color:var(--text); }
.btn-ghost { background:transparent; color:var(--text-dim); padding:6px 10px; }
.btn-ghost:hover { color:var(--gold); }
.btn-sm { padding:5px 12px; font-size:.78rem; }
.btn-danger { background:rgba(224,92,92,.15); color:#f08080; border:1px solid rgba(224,92,92,.25); }
.btn-danger:hover { background:rgba(224,92,92,.25); }

/* TOOLBAR */
.toolbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; gap:12px; flex-wrap:wrap; }
.toolbar-left { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.search-wrap { position:relative; }
.search-box { background:var(--surface); border:1px solid var(--border); border-radius:var(--r); padding:7px 14px 7px 36px; font-size:.84rem; color:var(--text); font-family:'Barlow',sans-serif; width:240px; }
.search-icon { position:absolute; left:11px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:.85rem; pointer-events:none; }
.search-box:focus { outline:none; border-color:var(--gold-dim); }
.search-box::placeholder { color:var(--text-muted); }
.filter-select { background:var(--surface); border:1px solid var(--border); border-radius:var(--r); padding:7px 12px; font-size:.82rem; color:var(--silver); font-family:'Barlow',sans-serif; cursor:pointer; }
.filter-select:focus { outline:none; }

/* FORM */
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.form-full { grid-column:1/-1; }
.field { display:flex; flex-direction:column; gap:6px; }
.field label { font-size:.78rem; font-weight:500; color:var(--silver); letter-spacing:.03em; text-transform:uppercase; }
.field input, .field select, .field textarea { background:var(--surface2); border:1px solid var(--border); border-radius:var(--r); padding:9px 13px; font-size:.85rem; color:var(--text); font-family:'Barlow',sans-serif; transition:var(--transition); }
.field input:focus, .field select:focus, .field textarea:focus { outline:none; border-color:var(--gold-dim); background:var(--surface); }
.field input::placeholder, .field textarea::placeholder { color:var(--text-muted); }
.field textarea { resize:vertical; min-height:90px; }
.field select option { background:var(--navy-mid); }
.field-hint { font-size:.74rem; color:var(--text-muted); margin-top:2px; }
.form-section { margin-bottom:28px; }
.form-section-title { font-family:'Cormorant Garamond',serif; font-size:1.1rem; font-weight:600; color:var(--gold); margin-bottom:16px; padding-bottom:8px; border-bottom:1px solid var(--border-gold); }

/* DETAIL PANELS */
.detail-grid { display:grid; grid-template-columns:2fr 1fr; gap:24px; }
.detail-row { display:flex; justify-content:space-between; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--border); }
.detail-row:last-child { border-bottom:none; }
.detail-key { font-size:.78rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.06em; }
.detail-val { font-size:.85rem; color:var(--text); text-align:right; }
.score-ring { width:80px; height:80px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-direction:column; border:3px solid var(--teal); }
.score-ring.med { border-color:var(--warn); }
.score-ring.high { border-color:var(--danger); }
.score-num { font-family:'Cormorant Garamond',serif; font-size:1.6rem; font-weight:700; }
.score-label { font-size:.62rem; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); }

/* TABS */
.tabs { display:flex; gap:0; border-bottom:1px solid var(--border); margin-bottom:24px; }
.tab { padding:10px 20px; font-size:.84rem; color:var(--text-muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; transition:var(--transition); }
.tab:hover { color:var(--silver); }
.tab.active { color:var(--gold); border-bottom-color:var(--gold); }

/* ALERT */
.alert { padding:12px 16px; border-radius:var(--r); font-size:.83rem; margin-bottom:20px; display:flex; align-items:center; gap:10px; }
.alert-warn { background:rgba(212,149,58,.1); border:1px solid rgba(212,149,58,.3); color:#e0aa55; }
.alert-info { background:rgba(29,158,117,.08); border:1px solid rgba(29,158,117,.25); color:var(--teal-light); }

/* STEPPER */
.stepper { display:flex; align-items:center; gap:0; margin-bottom:32px; }
.step { display:flex; align-items:center; gap:10px; }
.step-num { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:600; flex-shrink:0; }
.step-num.done { background:var(--teal); color:#fff; }
.step-num.active { background:var(--gold); color:var(--navy); }
.step-num.todo { background:var(--surface2); border:1px solid var(--border); color:var(--text-muted); }
.step-label { font-size:.78rem; color:var(--text-dim); white-space:nowrap; }
.step-label.active { color:var(--gold); font-weight:500; }
.step-line { flex:1; height:1px; background:var(--border); margin:0 12px; min-width:20px; }

/* TAG */
.tag { display:inline-block; padding:2px 8px; border-radius:4px; font-size:.72rem; background:var(--surface2); border:1px solid var(--border); color:var(--silver); margin:2px; }

/* UTILITIES */
.flex { display:flex; }
.items-center { align-items:center; }
.justify-between { justify-content:space-between; }
.gap-2 { gap:8px; }
.gap-3 { gap:12px; }
.mt-1 { margin-top:4px; } .mt-2 { margin-top:8px; } .mt-3 { margin-top:16px; } .mt-4 { margin-top:24px; } .mt-6 { margin-top:32px; }
.mb-2 { margin-bottom:8px; } .mb-3 { margin-bottom:16px; } .mb-4 { margin-bottom:24px; }
.text-gold { color:var(--gold); } .text-teal { color:var(--teal); } .text-muted { color:var(--text-muted); } .text-dim { color:var(--text-dim); }
.text-sm { font-size:.8rem; } .text-xs { font-size:.72rem; }
.font-serif { font-family:'Cormorant Garamond',serif; }
.hidden { display:none !important; }
.divider { height:1px; background:var(--border); margin:20px 0; }

/* EMPTY STATE */
.empty { text-align:center; padding:60px 20px; }
.empty-icon { font-size:2.5rem; margin-bottom:12px; opacity:.4; }
.empty-title { font-size:1rem; color:var(--text-dim); margin-bottom:6px; }
.empty-sub { font-size:.82rem; color:var(--text-muted); }

/* ACTIONS */
.actions { display:flex; gap:6px; align-items:center; }

/* TOAST */
.toast { position:fixed; bottom:24px; right:24px; background:var(--teal); color:#fff; padding:12px 20px; border-radius:var(--r); font-size:.84rem; box-shadow:var(--shadow); z-index:999; transition:.3s ease; transform:translateY(0); display:flex; align-items:center; gap:8px; }
.toast.hidden { transform:translateY(80px); opacity:0; }

/* SCROLLBAR */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:var(--navy-mid); }
::-webkit-scrollbar-thumb { background:var(--navy-light); border-radius:3px; }