:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --line: #d8e0ea;
  --text: #16202a;
  --muted: #5f6f82;
  --accent: #1d6ef2;
  --accent-soft: #eaf2ff;
  --ok: #16803c;
  --warn: #b86a00;
  --shadow: 0 18px 40px rgba(22, 32, 42, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.shell,
.login-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.hero, .card, .login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.hero h1, .spotlight h2 { margin: 6px 0 10px; }
.eyebrow, .label {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.muted { color: var(--muted); }
.hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.login-card {
  width: min(460px, 100%);
  padding: 28px;
}
.grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}
.top-grid { grid-template-columns: 1.25fr .75fr; }
.mid-grid { grid-template-columns: 1fr 1fr; }
.card { padding: 24px; }
.full-span { grid-column: 1 / -1; }
.spotlight {
  background: linear-gradient(135deg, #1d6ef2, #5e97ff);
  color: white;
}
.spotlight .muted, .spotlight .label, .spotlight .deadline { color: rgba(255,255,255,.84); }
.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.metric {
  padding: 14px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.metric strong { display: block; font-size: 28px; margin-top: 6px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}
.pill.subtle {
  background: #f2f5f8;
  color: var(--muted);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 { margin: 0; }
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
}
.facts div {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fafc;
}
.facts dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.facts dd {
  margin: 0;
  font-weight: 600;
}
.doc-list, .notes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.doc-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
}
.doc-state {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .06em;
}
.doc-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}
.doc-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.state-ready_for_review, .state-approved, .state-draft_ready { color: var(--ok); }
.state-in_progress { color: var(--warn); }
.notes li {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.stack-form {
  display: grid;
  gap: 14px;
}
.stack-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}
.stack-form input,
.stack-form select,
.stack-form textarea {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  background: #fbfdff;
}
.stack-form textarea {
  min-height: 120px;
  resize: vertical;
}
.stack-form button,
.ghost-button {
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.stack-form button {
  border: 0;
  background: var(--accent);
  color: white;
}
.ghost-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
}
.ghost-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.inline-form { align-content: start; }
.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.step-chip {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.step-chip.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #b7ceff;
}
.form-step { display: block; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.form-grid .full-span {
  grid-column: 1 / -1;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}
.feedback {
  min-height: 24px;
  margin: 0;
}
@media (max-width: 860px) {
  .hero, .section-head, .doc-item { flex-direction: column; align-items: flex-start; }
  .top-grid, .mid-grid, .metrics, .facts, .form-grid { grid-template-columns: 1fr; }
  .hero-side { align-items: flex-start; }
  .doc-actions { justify-items: start; }
  .form-actions { justify-content: flex-start; }
}
