:root{
  --bg:#f6f8fb;
  --surface:#ffffff;
  --surface-2:#f9fbff;
  --text:#162033;
  --muted:#667085;
  --line:#e4e7ec;
  --primary:#1a73e8;
  --primary-weak:#e8f0fe;
  --green:#15803d;
  --green-weak:#e8f8ee;
  --amber:#b45309;
  --amber-weak:#fff7e8;
  --red:#b42318;
  --red-weak:#fff1f0;
  --shadow:0 1px 2px rgba(16,24,40,.06),0 10px 18px rgba(16,24,40,.04);
  --radius:18px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-size:16px;line-height:1.45}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
body{min-height:100vh}
.app{display:grid;grid-template-columns:260px 1fr;grid-template-rows:72px 1fr;min-height:100vh}
.topbar{grid-column:1/-1;height:72px;background:rgba(255,255,255,.86);backdrop-filter: blur(8px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:5}
.brand{display:flex;align-items:center;gap:14px;font-size:20px;font-weight:700;letter-spacing:.01em}
.brand small{display:block;font-size:12px;font-weight:600;color:var(--muted);letter-spacing:.06em;text-transform:uppercase}
.brand .logo{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#dbeafe,#ffffff);display:grid;place-items:center;border:1px solid var(--line)}
.menu{font-size:22px;color:var(--muted)}
.top-actions{display:flex;align-items:center;gap:18px;color:var(--muted)}
.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#9bb8e8;color:#fff;font-weight:700;font-size:14px}
.sidebar{background:#fff;border-right:1px solid var(--line);padding:20px 18px 24px}
.nav{display:flex;flex-direction:column;gap:4px}
.nav a{display:flex;align-items:center;gap:12px;padding:14px 14px;border-radius:14px;color:#334155;font-weight:500}
.nav a:hover{background:#f7f9fc;text-decoration:none}
.nav a.active{background:var(--primary-weak);color:var(--primary);font-weight:700}
.help{margin-top:24px;padding:18px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,#fff,#fbfdff)}
.help p{margin:.4rem 0 1rem;color:var(--muted)}
.main{padding:28px;max-width:1280px}
.page-head{display:flex;align-items:flex-start;gap:16px;justify-content:space-between;margin-bottom:22px}
.grow{flex:1}
.title{margin:0;font-size:40px;line-height:1.08;letter-spacing:-.02em}
.subtitle{margin:8px 0 0;color:var(--muted);font-size:18px}
.kicker{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:700}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px}
.card + .card{margin-top:18px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.card-head h2,.card-head h3,.card h2,.card h3{margin:0}
.grid{display:grid;gap:18px}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.metric{padding:20px;border-radius:18px;border:1px solid var(--line);background:#fff}
.metric .num{font-size:42px;font-weight:700;line-height:1}
.metric .label{font-weight:700;margin-bottom:10px}
.metric.green{background:#fcfffd;border-color:#d7f0de}
.metric.amber{background:#fffdf8;border-color:#f6e2b7}
.metric.red{background:#fffafa;border-color:#f4cccc}
.list{display:flex;flex-direction:column}
.list-row{display:grid;grid-template-columns:minmax(0,1.5fr) 140px minmax(170px,.9fr);gap:16px;align-items:center;padding:18px 0;border-top:1px solid var(--line)}
.list-row:first-child{border-top:0;padding-top:4px}
.small{font-size:13px}
.muted{color:var(--muted)}
.eyebrow{font-size:13px;font-weight:700}
.status{display:inline-flex;align-items:center;justify-content:center;min-width:92px;padding:8px 12px;border-radius:999px;font-size:14px;font-weight:700}
.status.ready{background:var(--primary-weak);color:var(--primary)}
.status.submitted{background:#eff6ff;color:#2563eb}
.status.assessed{background:#e9fbfb;color:#0f766e}
.status.approved{background:var(--green-weak);color:var(--green)}
.status.decided{background:#eefbf2;color:#15803d}
.status.closed{background:#f2f4f7;color:#475467}
.status.draft{background:#f8fafc;color:#64748b}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1px solid #d0d5dd;background:#fff;color:#111827;border-radius:14px;padding:12px 18px;font-weight:700;cursor:pointer;box-shadow:0 1px 1px rgba(0,0,0,.02)}
.btn:hover{text-decoration:none;filter:brightness(.99)}
.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}
.btn.soft{background:var(--primary-weak);border-color:transparent;color:var(--primary)}
.btn.ghost{background:transparent}
.btn.block{width:100%}
.notice{margin-top:18px;padding:16px 18px;border-radius:14px;background:#f3f7fe;border:1px solid #dbe7fe}
.notice.success{background:#f1fbf4;border-color:#d8f3df}
.notice.warn{background:#fff8ed;border-color:#fde7c2}
.progress{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-top:8px}
.step{text-align:center;position:relative}
.step:before{content:"";position:absolute;top:19px;left:-50%;right:50%;height:2px;background:#d9dee8;z-index:0}
.step:first-child:before{display:none}
.step.done:before,.step.current:before{background:var(--primary)}
.dot{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;border:2px solid #d9dee8;margin:0 auto 8px;background:#fff;font-weight:700;position:relative;z-index:1}
.step.done .dot,.step.current .dot{border-color:var(--primary);background:var(--primary);color:#fff}
.wizard{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:18px}
.wstep{display:flex;align-items:center;gap:12px;padding:14px 16px;background:#fff;border:1px solid var(--line);border-radius:14px;color:#475467;font-weight:600}
.wstep .num{width:30px;height:30px;border-radius:999px;background:#eef2f6;display:grid;place-items:center;font-size:14px;font-weight:700}
.wstep.active{border-color:#bfd5fb;background:#f7faff;color:#0f172a}
.wstep.active .num{background:var(--primary);color:#fff}
.wstep.done .num{background:#e8f8ee;color:#15803d}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.field{display:flex;flex-direction:column;gap:8px}
.field.full{grid-column:1/-1}
label{font-size:14px;font-weight:700;color:#344054}
input,select,textarea{width:100%;border:1px solid #d0d5dd;border-radius:14px;padding:13px 14px;font:inherit;color:inherit;background:#fff}
textarea{min-height:120px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:0;border-color:#99baf4;box-shadow:0 0 0 4px rgba(26,115,232,.12)}
.check-options{display:grid;gap:12px}
.check-options label,.doc-row .left label,.checklist-item{display:flex;align-items:flex-start;gap:12px;color:#344054}
input[type=checkbox], input[type=radio]{width:18px;height:18px;margin-top:2px}
.split-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:18px}
.split-actions.right{justify-content:flex-end}
.doc-list,.checklist{display:grid;gap:12px}
.doc-row,.checklist-item{padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff}
.doc-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.doc-row .left{display:flex;flex-direction:column;gap:8px}
.pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;padding:6px 10px;background:#f2f4f7;border-radius:999px;color:#475467}
.review-table{display:grid;gap:0;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.review-row{display:grid;grid-template-columns:220px 1fr;padding:14px 18px;border-top:1px solid var(--line);background:#fff}
.review-row:first-child{border-top:0}
.review-label{font-weight:700;color:#344054}
.table-actions{display:flex;gap:8px;flex-wrap:wrap}
.upload-box{padding:24px;border:2px dashed #bfd5fb;border-radius:16px;background:#f8fbff;text-align:center;color:var(--muted)}
.toast{position:fixed;right:24px;bottom:24px;background:#101828;color:#fff;padding:14px 18px;border-radius:14px;box-shadow:var(--shadow);display:none;z-index:30;max-width:320px}
.toast.show{display:block}
.empty-state{text-align:center;padding:32px 24px}
.hero{padding:28px;border-radius:26px;background:linear-gradient(135deg,#ffffff,#f7fbff);border:1px solid var(--line)}
.hero h2{margin:0 0 8px;font-size:26px}
.footer-note{margin-top:18px;text-align:center;color:var(--muted);font-size:13px}
.timeline{display:grid;gap:14px}
.timeline-item{display:grid;grid-template-columns:24px 1fr;gap:12px}
.timeline-item .bullet{width:24px;height:24px;border-radius:50%;background:#eef2f6;display:grid;place-items:center;font-size:13px;color:var(--primary);font-weight:700;border:1px solid #d9dee8}
.timeline-item.done .bullet{background:#e8f0fe;border-color:#bfd5fb}
.stage-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;border-radius:18px;background:#f7fbff;border:1px solid #dbe7fe}
.callout{padding:18px;border-radius:16px;background:#fbfcfe;border:1px solid var(--line)}
.inline-list{display:flex;flex-wrap:wrap;gap:8px}
.inline-list .pill{background:#eef2ff;color:#364152}
@media (max-width:1100px){
  .app{grid-template-columns:1fr}
  .sidebar{display:none}
  .main{padding:20px}
  .metrics,.grid.two,.grid.three{grid-template-columns:1fr}
  .wizard{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
  .review-row{grid-template-columns:1fr;gap:6px}
  .list-row{grid-template-columns:1fr;gap:8px}
  .progress{grid-template-columns:repeat(3,1fr)}
}
.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.metric-card .metric{font-size:42px;font-weight:700;line-height:1.05;margin:8px 0}
.metric-card.blue{background:#f8fbff;border-color:#d7e6ff}
.metric-card.green{background:#f6fff8;border-color:#d7f0de}
.metric-card.amber{background:#fffdf7;border-color:#f3e4ba}
.metric-card.red{background:#fff8f8;border-color:#f0cccc}
.stagebar{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:10px}
.stagebar span{height:12px;border-radius:999px;background:#dbeafe}
.stagebar span:nth-child(1){background:#2563eb}.stagebar span:nth-child(2){background:#3b82f6}.stagebar span:nth-child(3){background:#14b8a6}.stagebar span:nth-child(4){background:#22c55e}.stagebar span:nth-child(5){background:#f59e0b}.stagebar span:nth-child(6){background:#cbd5e1}
.review-grid{display:grid;grid-template-columns:1.25fr 1.25fr .9fr;gap:18px;margin-top:18px}
.kv{display:grid;grid-template-columns:150px 1fr;gap:10px 16px;align-items:start}
.vote-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.vote{padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff;text-align:center;font-size:18px}
.docs{display:grid;gap:10px}
.doc{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:14px;background:#fff}
.doc-icon{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:#f5f7fb;color:#475467;font-size:14px}
.timeline-dot{width:24px;height:24px;border-radius:50%;background:#eef2f6;display:grid;place-items:center;color:var(--primary);font-size:12px;font-weight:700;border:1px solid #d9dee8}
@media (max-width:1100px){.grid.four,.review-grid{grid-template-columns:1fr}.kv{grid-template-columns:1fr}}

.status.clarification{background:var(--amber-weak);color:var(--amber)}
.status.denied{background:var(--red-weak);color:var(--red)}
