:root {
  --navy: #0B2D5B; --navy-2: #143C72; --orange: #E8650A; --ground: #F4F8FD; --card: #FFFFFF;
  --ink: #0B2D5B; --ink-2: #2F4566; --muted: #4A5D78; --line: #E6EAF0; --line-2: #C9D3E0;
  --good: #1F7A5C; --good-bg: #D9F3EA; --bad: #B3261E; --bad-bg: #FDECEA; --warn: #8A3B00; --warn-bg: #FFE6D9; --info: #0B4A80; --info-bg: #DDEFFC;
  --radius: 16px;
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif; color: var(--ink); background: var(--ground);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.45; }
h1, h2 { font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 21px; font-weight: 800; }
a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.top { background: var(--navy); color: #fff; padding: 12px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.brand { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 19px; }
.brand span { color: #FFC857; font-weight: 600; }
.top nav { display: flex; gap: 6px; flex-wrap: wrap; }
.top nav a { color: #D5DEEC; text-decoration: none; padding: 8px 14px; border-radius: 10px; font-weight: 600; }
.top nav a[aria-current="page"] { background: var(--navy-2); color: #fff; font-weight: 700; }
.who { margin-left: auto; font-size: 14px; color: #D5DEEC; }

.alerts { padding: 10px 28px 0; display: grid; gap: 6px; }
.alert { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.alert.page { background: var(--bad-bg); color: var(--bad); }
.alert.ticket, .alert.info { background: var(--warn-bg); color: var(--warn); }

.main { padding: 20px 28px 40px; }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.panel { background: var(--card); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.queue { flex: 3 1 560px; }
.case, .placeholder { flex: 2 1 420px; }
.case { border: 2px solid var(--navy); }
.placeholder { align-items: center; justify-content: center; min-height: 240px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.pill.on { background: var(--navy); border-color: var(--navy); color: #fff; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table caption { text-align: left; font-weight: 700; padding-bottom: 8px; }
.table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px; }
.table td { border-top: 1px solid var(--line); padding: 12px 8px; vertical-align: top; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #F8FAFD; }
.table tr.selected { background: var(--ground); }
.case-link { font-weight: 700; text-decoration: none; display: block; }
.sub { display: block; font-size: 14px; color: var(--muted); }
.overdue { color: var(--bad); font-weight: 700; }

.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; margin-left: 4px; }
.chip:first-child { margin-left: 0; }
.prio-urgent { background: var(--bad); color: #fff; }
.prio-high { background: var(--warn-bg); color: var(--warn); }
.prio-normal { background: var(--info-bg); color: var(--info); }
.prio-low { background: var(--line); color: var(--muted); }
[class*="state-"] { background: var(--line); color: var(--ink-2); }
.chip.state-active { background: var(--good-bg); color: var(--good); }
.chip.state-pilot_active { background: var(--info-bg); color: var(--info); }
.chip.state-suspended, .chip.state-revoked { background: var(--bad-bg); color: var(--bad); }

.case-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.instructions { padding: 12px 14px; border-radius: 12px; background: var(--ground); color: var(--ink-2); font-size: 15px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 16px; }
.fact dt { font-size: 13px; color: var(--muted); }
.fact dd { margin: 0; font-weight: 700; }

.decision { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.decision fieldset { border: 0; padding: 0; margin: 0; }
.decision legend { font-weight: 800; margin-bottom: 8px; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); font-weight: 700; cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option.on.good { background: var(--good); border-color: var(--good); color: #fff; }
.option.on.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.option.on.neutral { background: var(--navy); border-color: var(--navy); color: #fff; }
.option:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 700; font-size: 14px; }
.field-hint { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea { padding: 10px 12px; border: 1px solid #A9B5C6; border-radius: 10px; background: #fff; min-height: 44px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; min-height: 44px; }
.check input { width: 20px; height: 20px; }
.evidence { display: flex; align-items: center; gap: 10px; justify-content: center; min-height: 48px; padding: 10px 12px; border: 1.5px dashed #A9B5C6; border-radius: 12px; background: #fff; font-weight: 700; cursor: pointer; }
.evidence.ok { border-style: solid; border-color: var(--good); justify-content: space-between; color: var(--good); cursor: default; flex-wrap: wrap; }
.assessment { border: 1.5px solid var(--warn-bg); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }

.btn { min-height: 44px; padding: 10px 20px; border-radius: 999px; font-weight: 800; cursor: pointer; border: 1.5px solid var(--navy); background: #fff; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:disabled { background: #9AA8BC; border-color: #9AA8BC; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--navy); }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn.link, .link { border: 0; background: none; text-decoration: underline; font-weight: 700; cursor: pointer; padding: 6px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.error { background: var(--bad-bg); color: var(--bad); padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.error ul { margin: 6px 0 0; padding-left: 18px; }
.decided { background: var(--good-bg); padding: 12px 14px; border-radius: 12px; }
.decided p { margin: 6px 0 0; }
.history summary { cursor: pointer; font-weight: 700; }
.history ol { margin: 8px 0 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.inline-form { display: grid; gap: 8px; min-width: 260px; }
.inline-form.wide { min-width: 320px; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, monospace; font-size: 13px; }

