/* CASPR — app-specific CSS (sits on top of colors_and_type.css + components.css) */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ====================================================================
   APP SHELL
   ==================================================================== */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.app-main  { flex: 1; }

/* Top nav — sereen, fixed look uit publieke site */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}
.topnav-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
}
@media (max-width: 1080px) {
  .topnav-inner { gap: 12px; padding: 12px 18px; }
  .topnav-brand .brand-meta .sub { display: none; }
  .topnav-user span:not(.avatar):not(.kbd) { display: none; }
}
@media (max-width: 760px) {
  .topnav-brand .brand-meta { display: none; }
  .topnav-links a { padding: 8px 10px; font-size: 13px; }
}
.topnav-brand { display: flex; align-items: center; gap: 10px; }
.topnav-brand img { height: 32px; width: auto; }
.topnav-brand .brand-meta { display: flex; flex-direction: column; line-height: 1.1; }
.topnav-brand .brand-meta .name { font-family: var(--font-display); font-weight: var(--fw-black); font-size: 14px; letter-spacing: var(--tracking-tight); white-space: nowrap; }
.topnav-brand .brand-meta .sub { font-size: 11px; color: var(--fg-subtle); letter-spacing: var(--tracking-wide); text-transform: uppercase; font-weight: 600; white-space: nowrap; }

.topnav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.topnav-links a {
  font-family: var(--font-ui); font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: var(--radius-pill);
  color: var(--fg-muted);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.topnav-links a:hover { background: var(--ink-50); color: var(--fg); }
.topnav-links a.is-active { background: var(--ink-1000); color: white; }

.topnav-right { display: flex; align-items: center; gap: 8px; }
.topnav-iconbtn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-muted);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.topnav-iconbtn:hover { background: var(--ink-50); color: var(--fg); }
.topnav-user {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px;
  border-radius: var(--radius-pill);
  background: var(--ink-50); cursor: pointer; border: none;
  font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--fg);
}
.topnav-user:hover { background: var(--ink-100); }
.topnav-user .avatar { width: 28px; height: 28px; font-size: 11px; border: none; }

/* Compact tag for environment / role on the brand block */
.env-pill {
  font-family: var(--font-mono); font-size: 10px; padding: 2px 6px;
  border-radius: var(--radius-xs); background: var(--ink-100); color: var(--fg-muted);
  letter-spacing: 0;
}

/* ====================================================================
   PAGE LAYOUT
   ==================================================================== */

.page-hero {
  background: linear-gradient(180deg, #F2F6F3 0%, #FAFAFB 100%);
  border-bottom: 1px solid var(--border-subtle);
}
.page-hero-inner {
  max-width: 1400px; margin: 0 auto; padding: 56px 28px 44px;
}
.page-hero .eyebrow {
  font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--fg-muted);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.page-hero .eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--fg-muted); display: inline-block; }
.page-hero h1 {
  font-size: clamp(36px, 4.5vw, 56px); line-height: 1.05;
  letter-spacing: var(--tracking-tight); font-weight: 800; max-width: 22ch;
  text-wrap: pretty;
}
.page-hero .lead { margin-top: 16px; max-width: 60ch; color: var(--fg-muted); font-size: 17px; line-height: 1.6; }
.page-hero .actions { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.page-hero .hero-acronym {
  margin-top: 32px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.page-hero .hero-acronym-rule { width: 18px; height: 1px; background: var(--fg-muted); display: inline-block; }
.page-hero .hero-acronym-key b { color: var(--brand-orange-700); font-weight: 700; }
.page-hero .hero-acronym-sep { color: var(--fg-subtle); }
.page-hero .hero-acronym-words { font-family: var(--font-body); font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--fg-muted); }
.page-hero .hero-acronym-words em { font-style: normal; color: var(--brand-orange-700); font-weight: 600; }

.page-body {
  max-width: 1400px; margin: 0 auto; padding: 36px 28px 96px;
}
.page-body--narrow { max-width: 980px; }

/* "section eyebrow" used at top of inner sections */
.section-eyebrow {
  font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--fg-muted);
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.section-eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--fg-muted); display: inline-block; }

/* ====================================================================
   FILTERS / TOOLBAR
   ==================================================================== */
.toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0; flex-wrap: wrap;
}
.toolbar .search {
  position: relative; flex: 1; min-width: 240px; max-width: 420px;
}
.toolbar .search input { padding-left: 38px; height: 40px; background: var(--bg); border-color: var(--border); }
.toolbar .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fg-subtle); pointer-events: none; }
.toolbar .spacer { flex: 1; }

.chipgroup { display: inline-flex; align-items: center; gap: 6px; padding: 4px; background: var(--ink-50); border-radius: var(--radius-pill); border: 1px solid var(--border-subtle); }
.chipgroup button {
  border: none; background: transparent; padding: 6px 12px;
  border-radius: var(--radius-pill); font-family: var(--font-ui); font-weight: 600; font-size: 13px;
  color: var(--fg-muted); cursor: pointer;
}
.chipgroup button:hover { color: var(--fg); }
.chipgroup button.is-on { background: white; color: var(--fg); box-shadow: var(--shadow-xs); }
.chipgroup button .count { color: var(--fg-subtle); margin-left: 4px; font-weight: 500; }
.chipgroup button.is-on .count { color: var(--fg-muted); }

/* ====================================================================
   PROJECT CARDS / LIST
   ==================================================================== */
.proj-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}
.proj-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  text-align: left;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.proj-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.proj-card .head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.proj-card .code { font-family: var(--font-mono); font-size: 12px; color: var(--fg-subtle); }
.proj-card h3 { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: var(--tracking-tight); line-height: 1.15; text-wrap: pretty; }
.proj-card .desc { color: var(--fg-muted); font-size: 14.5px; line-height: 1.55; }
.proj-card .meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--fg-muted); }
.proj-card .meta .sep { color: var(--ink-300); }
.proj-card .stats { display: flex; gap: 18px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.proj-card .stat { display: flex; flex-direction: column; gap: 2px; }
.proj-card .stat .n  { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.proj-card .stat .l  { font-size: 11px; color: var(--fg-subtle); text-transform: uppercase; letter-spacing: var(--tracking-caps); font-weight: 600; }

/* Status pill — left of the title */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px; border-radius: var(--radius-pill);
  font-family: var(--font-ui); font-weight: 600; font-size: 12px;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; box-shadow: none; }
.status-pill--actueel    { background: var(--brand-green-50);  color: var(--brand-green-700); }
.status-pill--actueel    .dot { background: var(--brand-green); }
.status-pill--gepauzeerd { background: var(--brand-yellow-50); color: var(--brand-yellow-700); }
.status-pill--gepauzeerd .dot { background: var(--brand-yellow); }
.status-pill--gearchiveerd { background: var(--ink-100); color: var(--fg-muted); }
.status-pill--gearchiveerd .dot { background: var(--ink-400); }

/* ====================================================================
   DETAIL LAYOUTS
   ==================================================================== */
.detail-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px;
  margin-top: 8px;
}
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.crumb { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-muted); font-size: 13px; font-family: var(--font-ui); font-weight: 500; margin-bottom: 16px; }
.crumb a { color: var(--fg-muted); }
.crumb a:hover { color: var(--fg); }
.crumb .sep { color: var(--ink-300); }
.crumb .current { color: var(--fg); }

.detail-title {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px;
}
.detail-title .h { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.detail-title h1 { font-size: 40px; line-height: 1.1; letter-spacing: var(--tracking-tight); }
.detail-title .meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.detail-section {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  margin-bottom: 18px;
}
.detail-section h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; letter-spacing: var(--tracking-snug); }
.detail-section .subhead { color: var(--fg-muted); font-size: 14px; margin-bottom: 18px; }
.detail-section .body { color: var(--fg); font-size: 15.5px; line-height: 1.7; }

/* "Define-list" used for the structured opdracht fields */
.def-list { display: grid; grid-template-columns: 200px 1fr; row-gap: 12px; column-gap: 16px; align-items: baseline; }
.def-list dt { font-size: 13px; font-weight: 600; color: var(--fg-muted); font-family: var(--font-ui); }
.def-list dd { font-size: 14.5px; color: var(--fg); margin: 0; }
@media (max-width: 720px) { .def-list { grid-template-columns: 1fr; } .def-list dt { color: var(--fg-subtle); } }

/* Inline pills */
.taglist { display: flex; gap: 6px; flex-wrap: wrap; }

/* ====================================================================
   OPMERKINGEN PANEL (sticky right)
   ==================================================================== */
.notes-panel {
  position: sticky; top: 88px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-height: calc(100vh - 120px);
  display: flex; flex-direction: column;
}
.notes-panel .head {
  padding: 18px 20px; border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
}
.notes-panel .head h3 { font-size: 16px; font-weight: 700; }
.notes-panel .head .count { font-size: 12px; color: var(--fg-subtle); font-family: var(--font-mono); }

.notes-list {
  flex: 1; overflow-y: auto; padding: 12px 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.note {
  display: flex; gap: 12px;
}
.note .avatar { width: 28px; height: 28px; font-size: 11px; border: none; }
.note-body { flex: 1; min-width: 0; }
.note-meta { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.note-meta .author { font-weight: 600; color: var(--fg); font-family: var(--font-ui); font-size: 13px; }
.note-meta .time { color: var(--fg-subtle); }
.note-meta .edited { color: var(--fg-subtle); font-style: italic; }
.note-text { font-size: 14px; color: var(--fg); margin-top: 4px; line-height: 1.55; white-space: pre-wrap; }
.note-actions { display: flex; gap: 8px; margin-top: 6px; }
.note-actions button { background: none; border: none; color: var(--fg-subtle); font-size: 12px; cursor: pointer; padding: 0; }
.note-actions button:hover { color: var(--fg); text-decoration: underline; }

.notes-empty { padding: 32px 20px; text-align: center; color: var(--fg-subtle); font-size: 14px; }

.notes-input {
  padding: 14px 16px; border-top: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 10px;
  background: var(--ink-50);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.notes-input textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 10px 12px; font-family: var(--font-body); font-size: 14px;
  resize: vertical; min-height: 64px; background: var(--bg);
  outline: none; transition: border-color var(--dur-fast) var(--ease-out);
}
.notes-input textarea:focus { border-color: var(--ink-700); box-shadow: 0 0 0 3px var(--ink-100); }
.notes-input .row { display: flex; align-items: center; justify-content: space-between; }
.notes-input .hint { font-size: 11px; color: var(--fg-subtle); }

/* ====================================================================
   TABLE
   ==================================================================== */
.zcs-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-family: var(--font-ui); font-size: 14px;
}
.zcs-table thead th {
  text-align: left; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: var(--tracking-caps);
  color: var(--fg-subtle); padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: transparent;
}
.zcs-table tbody td { padding: 16px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.zcs-table tbody tr:hover td { background: var(--ink-50); cursor: pointer; }
.zcs-table tbody tr:last-child td { border-bottom: none; }
.zcs-table .col-tight { width: 1%; white-space: nowrap; }
.zcs-table .col-mono  { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-muted); }
.zcs-table .row-title { font-weight: 600; color: var(--fg); }
.zcs-table .row-sub { font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }

/* ====================================================================
   STAKEHOLDER / INZET CARDS
   ==================================================================== */
.entity-list { display: flex; flex-direction: column; }
.entity-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border-subtle);
}
.entity-row:last-child { border-bottom: none; }
.entity-row .avatar { width: 36px; height: 36px; font-size: 13px; }
.entity-row .info { flex: 1; min-width: 0; }
.entity-row .info .name { font-weight: 600; font-family: var(--font-ui); font-size: 14.5px; }
.entity-row .info .meta { font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }
.entity-row .right { display: flex; align-items: center; gap: 8px; }

/* Days-of-week chip */
.dow-chips { display: inline-flex; gap: 4px; }
.dow-chips .chip {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: var(--ink-100); color: var(--ink-400);
}
.dow-chips .chip.on { background: var(--brand-green-50); color: var(--brand-green-700); }

/* ====================================================================
   LOGIN
   ==================================================================== */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
@media (max-width: 900px) { .login-page { grid-template-columns: 1fr; } .login-art { display: none; } }
.login-art {
  background: linear-gradient(180deg, #F7F9F6 0%, #EEF3EE 100%);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px;
}
.login-art::before {
  content: ""; position: absolute; inset: 0;
  background-image: url('assets/hero-background-light.png');
  background-size: cover; background-position: center; opacity: 0.55;
}
.login-art > * { position: relative; z-index: 1; }
.login-art-brand { display: flex; align-items: center; gap: 12px; }
.login-art-brand img { height: 36px; }
.login-art .claim {
  font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1.05;
  letter-spacing: var(--tracking-tight); color: var(--fg); max-width: 14ch;
  text-wrap: pretty;
}
.login-art .claim .accent { color: var(--brand-orange-700); }
.login-art .claim .initial { color: var(--brand-orange-700); }
.login-art .acronym-hint {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.login-art .acronym-hint-rule { width: 18px; height: 1px; background: var(--fg-muted); display: inline-block; }
.login-art .acronym-hint-letters b { color: var(--brand-orange-700); font-weight: 700; }
.login-art .footer { font-size: 13px; color: var(--fg-muted); display: flex; gap: 18px; }

.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 420px; }
.login-card .eyebrow { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); letter-spacing: var(--tracking-wide); text-transform: uppercase; margin-bottom: 12px; }
.login-card h1 { font-size: 36px; line-height: 1.1; letter-spacing: var(--tracking-tight); margin-bottom: 8px; }
.login-card p.lead { color: var(--fg-muted); font-size: 15px; margin-bottom: 28px; line-height: 1.55; }
.login-card .field { margin-bottom: 16px; }
.login-card .field label { display: block; font-size: 13px; font-weight: 600; font-family: var(--font-ui); margin-bottom: 6px; }
.login-card .field .hint { font-size: 12px; color: var(--fg-subtle); margin-top: 6px; }
.login-card .row { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 20px; }
.login-card .row a { font-size: 13px; color: var(--fg-muted); }
.login-card .btn { width: 100%; height: 48px; border-radius: 10px; font-size: 15px; }
.login-card .error {
  margin-top: 14px; padding: 10px 14px; border-radius: var(--radius-md);
  background: var(--danger-bg); color: var(--danger); font-size: 13px;
}
.login-card .seed-tip {
  margin-top: 26px; padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--ink-50); font-size: 12.5px; color: var(--fg-muted);
}
.login-card .seed-tip strong { color: var(--fg); font-family: var(--font-mono); font-size: 12px; background: white; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }

/* ====================================================================
   WIZARD
   ==================================================================== */
.wizard-shell {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 36px;
}
@media (max-width: 900px) { .wizard-shell { grid-template-columns: 1fr; } }
.wizard-steps { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 88px; align-self: start; }
.wizard-step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 12px; border-radius: var(--radius-md);
  background: transparent; border: none; text-align: left; cursor: pointer;
  width: 100%;
}
.wizard-step:hover { background: var(--ink-50); }
.wizard-step.is-active { background: var(--ink-1000); color: white; }
.wizard-step.is-active .num { background: white; color: var(--ink-1000); }
.wizard-step.is-active .label { color: white; }
.wizard-step.is-active .desc { color: rgba(255,255,255,0.65); }
.wizard-step .num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink-100); color: var(--fg);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.wizard-step.done .num { background: var(--brand-green); color: var(--ink-1000); }
.wizard-step .label { font-family: var(--font-ui); font-weight: 600; font-size: 14.5px; color: var(--fg); }
.wizard-step .desc  { font-size: 12px; color: var(--fg-subtle); margin-top: 2px; }

.wizard-progress { height: 4px; background: var(--ink-100); border-radius: 999px; overflow: hidden; margin-bottom: 28px; }
.wizard-progress > div { height: 100%; background: var(--ink-1000); transition: width var(--dur-base) var(--ease-out); }

.wizard-section { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.wizard-section h2 { font-size: 24px; font-weight: 700; letter-spacing: var(--tracking-snug); }
.wizard-section > .subhead { color: var(--fg-muted); margin-top: 6px; margin-bottom: 24px; font-size: 14.5px; }
.wizard-section .field { margin-bottom: 18px; }
.wizard-section .field label { display: block; font-size: 13px; font-weight: 600; font-family: var(--font-ui); margin-bottom: 6px; }
.wizard-section .field .req { color: var(--brand-orange-700); }
.wizard-section .field .opt { font-family: var(--font-mono); font-size: 10px; color: var(--fg-subtle); margin-left: 4px; letter-spacing: var(--tracking-wide); text-transform: uppercase; }
.wizard-section textarea.input { height: auto; padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.55; }
.wizard-section .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .wizard-section .field-row { grid-template-columns: 1fr; } }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }

/* Radio-pill (used a lot in the public form) */
.pill-radio { display: flex; gap: 10px; flex-wrap: wrap; }
.pill-radio label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg); cursor: pointer; font-size: 14px;
  font-family: var(--font-ui); font-weight: 500;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.pill-radio label:hover { border-color: var(--ink-400); }
.pill-radio input { accent-color: var(--ink-1000); }
.pill-radio label.is-on { border-color: var(--ink-1000); background: var(--ink-50); }

/* Info card (the green explainer in the form) */
.info-card {
  background: var(--brand-green-50);
  border: 1px solid #C7DEB8;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.info-card h4 { font-size: 13px; font-weight: 700; font-family: var(--font-ui); margin: 12px 0 4px; color: var(--brand-green-700); letter-spacing: 0; }
.info-card h4:first-child { margin-top: 0; }
.info-card p { font-size: 13px; line-height: 1.5; color: var(--ink-800); margin: 0; }
.info-card .lead { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--brand-green-700); }

/* ====================================================================
   AUDIT DRAWER
   ==================================================================== */
.audit-overlay { position: fixed; inset: 0; background: rgba(20, 22, 30, 0.4); z-index: 100; opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out); }
.audit-overlay.is-open { opacity: 1; pointer-events: auto; }
.audit-drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: min(560px, 100vw); background: var(--bg);
  z-index: 101; transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-xl);
}
.audit-drawer.is-open { transform: translateX(0); }
.audit-drawer .head { padding: 22px 26px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }
.audit-drawer .head h2 { font-size: 22px; }
.audit-drawer .head .sub { font-size: 13px; color: var(--fg-muted); margin-top: 4px; }
.audit-drawer .filter { padding: 12px 26px; border-bottom: 1px solid var(--border-subtle); display: flex; gap: 8px; flex-wrap: wrap; }
.audit-drawer .list { flex: 1; overflow-y: auto; padding: 8px 26px 26px; }
.audit-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.audit-item:last-child { border-bottom: none; }
.audit-item .when { font-family: var(--font-mono); font-size: 11px; color: var(--fg-subtle); width: 84px; flex-shrink: 0; padding-top: 2px; }
.audit-item .body { flex: 1; min-width: 0; }
.audit-item .who { font-size: 13px; }
.audit-item .who strong { font-weight: 600; }
.audit-item .summary { font-size: 14px; color: var(--fg); margin-top: 4px; line-height: 1.5; }
.audit-item .prev { font-size: 12px; color: var(--fg-subtle); margin-top: 4px; font-family: var(--font-mono); }

/* ====================================================================
   FOOTER
   ==================================================================== */
.app-footer {
  background: var(--ink-1000); color: var(--fg-inverse);
  padding: 28px 28px 22px;
  margin-top: auto;
}
.app-footer-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 12px; color: rgba(255,255,255,0.6); }
.app-footer-inner .brand { display: flex; align-items: center; gap: 12px; }
.app-footer-inner .brand .name { font-family: var(--font-display); font-weight: 800; color: white; letter-spacing: var(--tracking-tight); font-size: 13px; }
.app-footer-inner a { color: rgba(255,255,255,0.6); }
.app-footer-inner a:hover { color: white; }
.app-footer .sep { color: rgba(255,255,255,0.3); margin: 0 12px; }
.app-footer .version { color: rgba(255,255,255,0.5); font-size: 11px; letter-spacing: 0.02em; }
.app-footer .version code { font-family: var(--font-mono); color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: var(--radius-xs); margin-left: 4px; font-size: 11px; }

/* ====================================================================
   UPDATE BANNER (version watchdog)
   ==================================================================== */
#__caspr-update-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 9999;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px;
  background: var(--ink-1000); color: var(--fg-inverse);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-ui); font-size: 13px;
  animation: caspr-banner-in 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
#__caspr-update-banner .dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--brand-green);
  box-shadow: 0 0 0 4px rgba(156, 199, 138, 0.18);
}
#__caspr-update-banner .msg { color: rgba(255,255,255,0.88); }
#__caspr-update-banner .msg code {
  font-family: var(--font-mono); font-size: 12px;
  background: rgba(255,255,255,0.10); color: white;
  padding: 1px 6px; border-radius: var(--radius-xs); margin-left: 2px;
}
#__caspr-update-banner button {
  font: inherit; cursor: pointer; border: 0;
  transition: background 200ms cubic-bezier(0.65, 0, 0.35, 1);
}
#__caspr-update-banner .reload {
  background: white; color: var(--ink-1000);
  font-weight: 600; padding: 6px 12px;
  border-radius: var(--radius-pill);
}
#__caspr-update-banner .reload:hover { background: var(--ink-100); }
#__caspr-update-banner .close {
  background: transparent; color: rgba(255,255,255,0.55);
  width: 24px; height: 24px; border-radius: 999px;
  font-size: 16px; line-height: 1; display: grid; place-items: center;
}
#__caspr-update-banner .close:hover { background: rgba(255,255,255,0.10); color: white; }
@keyframes caspr-banner-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  #__caspr-update-banner { animation: none; }
}

/* ====================================================================
   MISC HELPERS
   ==================================================================== */
.empty-state {
  text-align: center; padding: 64px 24px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--ink-50); color: var(--fg-muted);
}
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--fg); margin-bottom: 6px; }
.empty-state p { font-size: 14px; max-width: 40ch; margin: 0 auto; }

.history-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--fg-subtle); cursor: pointer;
  background: none; border: none; padding: 4px 6px; border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-weight: 500;
}
.history-link:hover { color: var(--fg-muted); background: var(--ink-50); }

.kbd {
  font-family: var(--font-mono); font-size: 11px;
  padding: 1px 6px; border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 4px; background: var(--bg);
  color: var(--fg-muted);
}

/* Document item */
.doc-item {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.doc-item .icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--brand-blue-50); color: var(--brand-blue-700);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-item .icon.pdf { background: var(--brand-orange-50); color: var(--brand-orange-700); }
.doc-item .icon.img { background: var(--brand-pink-50); color: var(--brand-pink-700); }
.doc-item .icon.xls { background: var(--brand-green-50); color: var(--brand-green-700); }
.doc-item .info { flex: 1; min-width: 0; }
.doc-item .info .n { font-weight: 600; font-family: var(--font-ui); font-size: 14px; }
.doc-item .info .m { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }

/* Big stat numbers (used on overviews, dashboard) */
.bigstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.bigstat { padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.bigstat .n { font-family: var(--font-display); font-weight: 800; font-size: 44px; letter-spacing: var(--tracking-tight); line-height: 1; }
.bigstat .l { font-size: 12px; color: var(--fg-subtle); text-transform: uppercase; letter-spacing: var(--tracking-caps); font-weight: 600; margin-top: 10px; }
.bigstat .delta { font-size: 12px; color: var(--fg-muted); margin-top: 6px; }

/* Page transition (subtle) — base state is fully visible so print/PDF/no-anim see content */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fadeIn 220ms var(--ease-out); }
}
@keyframes fadeIn { from { transform: translateY(6px); } to { transform: none; } }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(20, 22, 30, 0.4); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--bg); border-radius: var(--radius-xl); width: min(560px, 100%); max-height: 88vh; overflow: auto; box-shadow: var(--shadow-xl); }
.modal .head { padding: 22px 28px 6px; }
.modal .head h2 { font-size: 22px; font-weight: 700; }
.modal .head .sub { font-size: 14px; color: var(--fg-muted); margin-top: 6px; }
.modal .body { padding: 20px 28px; }
.modal .foot { padding: 16px 28px 24px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border-subtle); margin-top: 8px; }

/* Inline-flex helpers used in JSX (avoid bare-element gaps) */
.hstack { display: flex; align-items: center; }
.hstack-2 { gap: 8px; }
.hstack-3 { gap: 12px; }
.hstack-4 { gap: 16px; }
.vstack { display: flex; flex-direction: column; }
.vstack-2 { gap: 8px; }
.vstack-3 { gap: 12px; }
.vstack-4 { gap: 16px; }
.vstack-6 { gap: 24px; }
.grow { flex: 1; }

/* ZCS-branded check svg used in info bullets */
.bullet { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; font-size: 14px; line-height: 1.55; }
.bullet svg { color: var(--brand-green-700); margin-top: 3px; flex-shrink: 0; }
