:root {
  color-scheme: light;
  --navy: #08213f;
  --blue: #1265d6;
  --ink: #112c4c;
  --muted: #62768e;
  --line: #dbe5ef;
  --surface: #ffffff;
  --canvas: #f3f6fa;
  --green: #0a9b62;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button, a { font: inherit; }

.appShell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 25px 18px;
  background: linear-gradient(180deg, #0a2648, #071b34);
  color: white;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 4px 25px; border-bottom: 1px solid #ffffff20; }
.brandMark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #1c75df, #0bc183); font-size: 24px; font-weight: 900; }
.brand b, .brand small { display: block; }
.brand b { font-size: 20px; letter-spacing: .4px; }
.brand small { margin-top: 2px; color: #a9bdd3; font-size: 11px; }
.navLabel { margin: 27px 8px 12px; color: #829ab5; font-size: 10px; letter-spacing: 1.25px; }
.sidebar nav { display: grid; gap: 7px; }
.navItem { display: flex; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 8px; background: transparent; color: #dfeafa; text-align: left; cursor: pointer; }
.navItem:hover, .navItem:focus-visible, .navItem.isActive { background: #1765d0; color: white; outline: none; }
.navItem span { width: 19px; text-align: center; }
.boundaryCard { position: absolute; right: 18px; bottom: 22px; left: 18px; display: flex; gap: 10px; padding: 13px; border: 1px solid #ffffff20; border-radius: 9px; background: #ffffff0b; }
.boundaryCard i { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: #18cf87; box-shadow: 0 0 0 5px #18cf8720; }
.boundaryCard b, .boundaryCard small { display: block; }
.boundaryCard b { font-size: 12px; }
.boundaryCard small { margin-top: 3px; color: #9db1c7; font-size: 10px; }

main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 88px; padding: 18px 34px; border-bottom: 1px solid #d9e3ed; background: #fffffff2; backdrop-filter: blur(14px); }
.topbar h1 { margin: 3px 0 0; font-size: 25px; letter-spacing: -.45px; }
.eyebrow { margin: 0; color: #64809e; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.topActions { display: flex; align-items: center; gap: 12px; }
.candidateBadge { padding: 7px 10px; border-radius: 20px; background: #fff2d9; color: #915b00; font-size: 10px; font-weight: 850; letter-spacing: .7px; }
.iconButton { width: 37px; height: 37px; border: 1px solid #cdd9e5; border-radius: 50%; background: white; color: #24496f; font-weight: 850; cursor: pointer; }

.workspace { flex: 1; padding: 28px 34px; }
.view { display: none; }
.view.isVisible { display: block; animation: reveal .25s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 31px 34px; border: 1px solid #cfe0f1; border-radius: 14px; background: radial-gradient(circle at 80% 20%, #dff9ef, transparent 28%), linear-gradient(135deg, #eaf4ff, #fff); box-shadow: 0 9px 28px #173b6410; }
.statusPill { display: inline-block; padding: 6px 9px; border-radius: 6px; background: #d9f5e9; color: #087548; font-size: 10px; font-weight: 850; letter-spacing: .8px; }
.hero h2 { max-width: 680px; margin: 14px 0 8px; font-size: clamp(25px, 3vw, 38px); line-height: 1.12; letter-spacing: -1.1px; }
.hero p { max-width: 700px; margin: 0; color: var(--muted); line-height: 1.6; }
.primaryAction { flex: 0 0 auto; padding: 13px 16px; border-radius: 8px; background: #0e62ca; color: white; font-size: 12px; font-weight: 750; text-decoration: none; box-shadow: 0 8px 18px #0e62ca30; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.metrics article { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.metrics span, .metrics b, .metrics small { display: block; }
.metrics span { color: #667d95; font-size: 10px; font-weight: 700; }
.metrics b { margin-top: 9px; color: #0a8656; font-size: 20px; }
.metrics small { margin-top: 5px; color: #76899d; font-size: 10px; line-height: 1.4; }

.sectionBlock { margin-top: 20px; padding: 27px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 5px 19px #173b640b; }
.sectionHeading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.sectionHeading h2 { margin: 5px 0 0; font-size: 24px; }
.sectionHeading > span { color: #71859a; font-size: 11px; }
.departmentGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.departmentCard { --accent: #1765d0; position: relative; min-height: 190px; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 9px; background: #fff; }
.departmentCard.purple { --accent: #8055e7; }
.departmentCard.blue { --accent: #1685ff; }
.departmentCard.green { --accent: #0da25c; }
.departmentCard.violet { --accent: #7652d6; }
.departmentCard.orange { --accent: #ff6b16; }
.departmentCard.teal { --accent: #138f88; }
.departmentIcon { color: var(--accent); font-size: 28px; }
.departmentCard h3 { margin: 15px 0 8px; font-size: 15px; }
.departmentCard p { margin: 0; color: #62768d; font-size: 12px; line-height: 1.55; }
.departmentCard small { position: absolute; right: 20px; bottom: 17px; left: 20px; padding-top: 12px; border-top: 1px solid #e7edf3; color: #74879b; font-size: 10px; }

.flow { display: grid; grid-template-columns: repeat(9, auto); align-items: center; gap: 11px; overflow-x: auto; padding-bottom: 9px; }
.flow article { min-width: 168px; min-height: 155px; padding: 17px; border: 1px solid #dce6ef; border-radius: 10px; background: #f8fbfe; }
.flow article b { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #1468d5; color: white; font-size: 11px; }
.flow article strong, .flow article span { display: block; }
.flow article strong { margin-top: 18px; font-size: 13px; }
.flow article span { margin-top: 7px; color: #697e93; font-size: 11px; line-height: 1.45; }
.flow > i { color: #1b73d3; font-style: normal; font-size: 19px; }
.notice { margin-top: 21px; padding: 15px 17px; border-left: 4px solid #f6a800; border-radius: 7px; background: #fff8e8; color: #70531c; font-size: 12px; line-height: 1.5; }

.gateList { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: gates; }
.gateList li { counter-increment: gates; position: relative; padding: 17px 18px 17px 58px; border: 1px solid #dce5ee; border-radius: 9px; background: #f8fafc; }
.gateList li::before { content: counter(gates); position: absolute; top: 15px; left: 17px; display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #c5d2df; border-radius: 50%; background: white; color: #6a7d91; font-size: 11px; font-weight: 800; }
.gateList li.complete { border-color: #b6e6d1; background: #f0fbf7; }
.gateList li.complete::before { content: "✓"; border-color: #14a36a; background: #14a36a; color: white; }
.gateList li.active { border-color: #7fb3f0; background: #eff6ff; box-shadow: inset 4px 0 #1768d3; }
.gateList li b, .gateList li span { display: block; }
.gateList li b { font-size: 13px; }
.gateList li span { margin-top: 4px; color: #6c8095; font-size: 11px; }

.assuranceGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.assuranceGrid article { padding: 20px; border: 1px solid #d8e7df; border-radius: 9px; background: #f5fcf8; }
.assuranceGrid span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #0fa267; color: white; font-weight: 900; }
.assuranceGrid b { display: block; margin-top: 14px; font-size: 13px; }
.assuranceGrid p { margin: 6px 0 0; color: #6c8093; font-size: 11px; }

footer { display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 45px; color: #728599; font-size: 10px; }
footer i { width: 4px; height: 4px; border-radius: 50%; background: #11a56b; }

dialog { width: min(460px, calc(100vw - 34px)); padding: 27px; border: 1px solid #cfdae5; border-radius: 12px; color: var(--ink); box-shadow: 0 25px 70px #0a203e50; }
dialog::backdrop { background: #07182d99; backdrop-filter: blur(4px); }
dialog h2 { margin: 7px 0 10px; }
dialog p:not(.eyebrow) { color: #61758c; line-height: 1.6; }
.dialogClose { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: #63788e; font-size: 24px; cursor: pointer; }
.secondaryAction { padding: 10px 14px; border: 0; border-radius: 7px; background: #0c63cc; color: white; font-weight: 700; cursor: pointer; }

@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .departmentGrid, .assuranceGrid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .appShell { grid-template-columns: 1fr; }
  .sidebar { position: static; width: 100%; height: auto; padding: 16px; }
  .brand { padding-bottom: 14px; }
  .navLabel, .boundaryCard { display: none; }
  .sidebar nav { grid-template-columns: repeat(4, 1fr); margin-top: 13px; }
  .navItem { justify-content: center; padding: 10px 7px; font-size: 11px; }
  .navItem span { display: none; }
  .topbar { top: 0; min-height: 74px; padding: 14px 18px; }
  .topbar h1 { font-size: 19px; }
  .candidateBadge { display: none; }
  .workspace { padding: 17px; }
  .hero { display: block; padding: 23px; }
  .primaryAction { display: inline-block; margin-top: 20px; }
  .metrics, .departmentGrid, .assuranceGrid { grid-template-columns: 1fr; }
  .sectionBlock { padding: 20px; }
  .sectionHeading { display: block; }
  .sectionHeading > span { display: block; margin-top: 7px; }
}
