:root {
  --navy: #1b365d; 
  --navy-dark: #12243e;
  --sky: #0084C8;
  --orange: #E21F26; 
  --orange-soft: #FBE3E4; 
  --red-deep: #B4151B;
  --green: #2E7D5B; 
  --green-soft: #E7F2EC; 
  --green-deep: #1A4A36;
  --bg: #EEF4F0; 
  --ink: #16283B; 
  --muted: #65778A; 
  --line: #CFE0D6; 
  --r: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; } 
button, select { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

/* Sidebar Rail */
.rail { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { padding: 22px 22px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand .mark { width: 38px; height: 38px; border-radius: 9px; background: #fff; display: grid; place-items: center; font-weight: 800; color: var(--navy); font-size: 13px; }
.brand strong { display: block; font-size: 15px; font-weight: 700; }
.brand span { display: block; font-size: 11.5px; opacity: .7; }

.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav .group { font-size: 11px; color: rgba(255,255,255,.5); padding: 14px 12px 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,.82); font-weight: 500; font-size: 13.5px; transition: all .15s; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: #fff; color: var(--navy); font-weight: 700; }
.nav a .pill { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--orange); color: #fff; border-radius: 99px; padding: 2px 7px; }

.sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px 26px; border-left: 1px solid rgba(255,255,255,.18); padding-left: 10px; }
.sub a { padding: 6px 10px; font-size: 12.5px; color: rgba(255,255,255,.7); border-radius: 6px; }
.sub a.on { color: #fff; background: rgba(255,255,255,.12); font-weight: 600; }

.rail-foot { padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.15); font-size: 12px; color: rgba(255,255,255,.7); }
.rail-foot b { color: #fff; display: block; font-weight: 600; }

/* Main Content Styles */
.main { padding: 0 32px 40px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 0 14px; position: sticky; top: 0; background: var(--bg); z-index: 5; flex-wrap: wrap; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.crumb b { color: var(--red-deep); font-weight: 600; }
.topbar h1 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; color: var(--navy); }
.topbar h1 .badge { width: 30px; height: 30px; border-radius: 8px; background: var(--orange); display: grid; place-items: center; }
.topbar h1 .badge svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; }

.ctl { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.sel { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; min-width: 150px; }
.sel label { font-size: 10.5px; color: var(--navy); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sel select { border: 0; background: transparent; font-weight: 700; font-size: 13px; color: var(--navy); outline: 0; padding: 0; }

.toggle { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.toggle button { border: 0; background: transparent; padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.toggle button.on { background: var(--navy); color: #fff; }

.btn { border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 700; font-size: 13px; color: #fff; background: var(--navy); transition: opacity 0.2s; }
.btn:hover { opacity: 0.9; }
.btn.o { background: var(--orange); }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }

/* Vision Strip */
.vmm { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 0; background: linear-gradient(120deg, var(--red-deep) 0%, var(--orange) 34%, var(--navy) 100%); color: #fff; border-radius: var(--r); margin-bottom: 18px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.vmm > div { padding: 16px 20px; }
.vmm .video { background: rgba(0,0,0,.28); display: flex; align-items: center; gap: 12px; min-width: 220px; }
.vmm .play { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.vmm .play svg { width: 16px; height: 16px; fill: var(--orange); margin-left: 2px; }
.vmm .video b { display: block; font-size: 13px; }
.vmm .video span { font-size: 11.5px; opacity: .8; }
.vmm h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; font-weight: 700; margin-bottom: 4px; }
.vmm p { font-size: 12.5px; line-height: 1.4; }
.vmm > div + div { border-left: 1px solid rgba(255,255,255,.15); }

/* KPIs Grid */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 24px; }
.k { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--navy); border-radius: var(--r); padding: 16px 18px; position: relative; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.k:nth-child(4), .k:nth-child(6) { border-top-color: var(--orange); }
.k .lbl { font-size: 12px; color: var(--muted); font-weight: 500; }
.k .val { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: 6px; color: var(--navy); }
.k:nth-child(4) .val, .k:nth-child(6) .val { color: var(--orange); }
.k .val small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.k .d { font-size: 11.5px; margin-top: 6px; font-weight: 600; }
.k .d.g { color: var(--green); } .k .d.o { color: var(--orange); } .k .d.m { color: var(--muted); font-weight: 500; }
.k .bar { height: 6px; background: #E3EDE7; border-radius: 99px; margin-top: 10px; overflow: hidden; }
.k .bar i { display: block; height: 100%; border-radius: 99px; background: var(--navy); }
.k .bar i.o { background: var(--orange); }

.sec { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; }
.sec h2 { font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: var(--navy); }
.sec span { font-size: 12.5px; color: var(--muted); }

/* Tiles & Tools */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.tile { --m: var(--navy); --m-soft: rgba(27, 54, 93, 0.08); background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; position: relative; min-height: 200px; overflow: hidden; transition: all .15s; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--m); }
.tile:hover { border-color: var(--m); box-shadow: 0 8px 24px rgba(27, 54, 93, 0.1); }
.tile.o { --m: var(--orange); --m-soft: var(--orange-soft); }
.tile .icon { width: 44px; height: 44px; border-radius: 11px; background: var(--m-soft); display: grid; place-items: center; }
.tile .icon svg { width: 22px; height: 22px; stroke: var(--m); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; color: var(--navy); }
.tile.o h3 { color: var(--red-deep); }
.tile p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.tile .pending { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; color: #fff; background: var(--orange); border-radius: 99px; padding: 3px 8px; }
.tile .stat { margin-top: auto; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tile .stat b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--m); }
.tile .stat span { font-size: 12px; color: var(--muted); }
.tile .go { font-size: 12.5px; font-weight: 700; color: var(--m); }

.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.tool { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; align-items: center; gap: 12px; transition: all .15s; }
.tool:hover { border-color: var(--navy); }
.tool .icon { width: 38px; height: 38px; border-radius: 10px; background: var(--green-soft); display: grid; place-items: center; flex: none; }
.tool .icon svg { width: 19px; height: 19px; stroke: var(--navy); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool b { display: block; font-size: 13px; font-weight: 700; color: var(--navy); }
.tool span { font-size: 11.5px; color: var(--muted); }
.tool .n { margin-left: auto; font-size: 11px; font-weight: 700; color: #fff; background: var(--orange); border-radius: 99px; padding: 3px 8px; }

/* Panels & Card Elements */
.row2 { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 18px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.card .card-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; gap: 10px; }
.card h2 { font-size: 15px; font-weight: 700; color: var(--navy); }
.card .card-h a { font-size: 12.5px; font-weight: 600; color: var(--navy); white-space: nowrap; }
.card .card-h p { font-size: 12px; color: var(--muted); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; font-weight: 700; color: var(--navy); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding: 0 8px 8px 0; border-bottom: 2px solid var(--navy); white-space: nowrap; }
td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num { font-weight: 700; text-align: right; white-space: nowrap; }
td.kra { font-weight: 700; color: var(--navy); }

.tag { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.tag.g { background: var(--green-soft); color: var(--green); }
.tag.a { background: var(--orange-soft); color: var(--red-deep); }
.tag.r { background: var(--orange-soft); color: var(--orange); }

.tbl-foot { display: flex; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.tbl-foot b { color: var(--ink); }

/* AI analytics box */
.ai { background: linear-gradient(160deg, #FFF1F1, #fff 40%, #F3F8F5); border: 1px solid #F4B9BB; border-radius: var(--r); padding: 20px 22px; margin-bottom: 18px; }
.ai-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ai-h h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--navy); }
.ai-h h2 i { width: 24px; height: 24px; border-radius: 7px; background: var(--orange); display: grid; place-items: center; }
.ai-h h2 i svg { width: 14px; height: 14px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ai-h .meta { font-size: 12px; color: var(--muted); }
.ai-h .conf { margin-left: auto; font-size: 11.5px; font-weight: 600; color: #fff; background: var(--navy); border-radius: 99px; padding: 4px 10px; }

.ai-grid { display: grid; grid-template-columns: 1.05fr 1.2fr 1.4fr; gap: 16px; }
.ai-box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.ai-box h3 { font-size: 12px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }

.scorebox { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.scorebox svg.ring { width: 84px; height: 84px; }
.scorebox .grade { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--navy); }
.scorebox .grade small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.scorebox .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.bench { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.bench div { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.bench .bar { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bench .bar i { display: block; height: 100%; border-radius: 99px; background: #C9D3DD; }
.bench .me .bar i { background: var(--green); }
.bench .me { color: var(--ink); font-weight: 700; }
.bench b { text-align: right; }

.trend { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.trend .lbl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.trend .lbl b { color: var(--green); }
.trend svg { width: 100%; height: 58px; }

.kra-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.kra-list li { display: grid; grid-template-columns: 1fr 44px; gap: 10px; align-items: center; font-size: 12px; }
.kra-list .n { display: flex; justify-content: space-between; margin-bottom: 4px; }
.kra-list .n span:last-child { color: var(--muted); font-size: 11.5px; }
.kra-list .bar { height: 7px; background: var(--bg); border-radius: 99px; overflow: hidden; position: relative; }
.kra-list .bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.kra-list .bar i.a { background: #F0705F; }
.kra-list .bar i.r { background: var(--orange); }
.kra-list .bar em { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--navy); left: var(--t); }
.kra-list b { font-weight: 800; text-align: right; }
.kra-list b.r { color: var(--orange); }

.fx { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fx .l { font-size: 11.5px; color: var(--muted); }
.fx .v { font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; color: var(--navy); }
.fx .v.o { color: var(--orange); }
.fx .v small { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.acts { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.acts li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: start; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12.5px; line-height: 1.35; }
.acts li.hi { border-color: #F4B9BB; background: #FFF6F6; }
.acts .p { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--navy); }
.acts li.hi .p { background: var(--orange); }
.acts .why { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.acts .do { font-size: 11.5px; font-weight: 700; color: var(--navy); white-space: nowrap; border: 1px solid var(--navy); border-radius: 6px; padding: 4px 8px; background: #fff; }
.acts li.hi .do { color: var(--orange); border-color: var(--orange); }

.ask { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.ask .box { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #F4B9BB; border-radius: 10px; padding: 8px 8px 8px 14px; }
.ask .box svg { width: 16px; height: 16px; stroke: var(--orange); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ask input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 13px; background: transparent; color: var(--ink); }
.ask .box button { border: 0; border-radius: 7px; background: var(--orange); color: #fff; font-weight: 700; font-size: 12.5px; padding: 8px 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips span { font-size: 11.5px; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; cursor: pointer; transition: all 0.1s; }
.chips span:hover { border-color: var(--orange); color: var(--orange); }
.ai-foot { font-size: 11px; color: var(--muted); margin-top: 10px; }

/* Institutional KPI focus list */
.kfocus { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.kfocus li { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 12px; padding: 6px 0; border-bottom: 1px solid #E3EDE7; }
.kfocus b { font-weight: 700; white-space: nowrap; }
.kfocus small { color: var(--muted); display: block; font-size: 11px; }
.kfocus .up { color: var(--green); } .kfocus .dn { color: var(--orange); }

/* Responsive break points */
@media (max-width: 1300px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .tiles, .tools { grid-template-columns: 1fr 1fr; }
  .vmm { grid-template-columns: 1fr 1fr; }
  .vmm > div + div { border-left: 0; }
  .ai-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: relative; height: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav .group, .sub { display: none; }
  .main { padding: 0 16px 32px; }
  .tiles, .tools, .row2, .row3, .kpis, .vmm, .kfocus { grid-template-columns: 1fr; }
  .ctl { margin-left: 0; }
}