:root {
  color-scheme: dark;
  --bg: #0e111b;
  --paper: #141925;
  --surface: #1d2635;
  --surface-hover: #202b3c;
  --line: rgba(255, 255, 255, .105);
  --text: rgba(255, 255, 255, .88);
  --muted: rgba(255, 255, 255, .58);
  --faint: rgba(255, 255, 255, .38);
  --primary: #2d7ff0;
  --bright-blue: #2ab4e5;
  --success: #1da573;
  --warning: #f9a806;
  --error: #d81e12;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 15px; font-weight: 500; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid rgba(114,170,246,.9); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: grid; grid-template: 62px 1fr / 250px minmax(0, 1fr); }
.topbar { grid-column: 1 / -1; position: sticky; z-index: 20; top: 0; height: 62px; display: grid; grid-template-columns: 320px minmax(300px, 640px) 1fr; align-items: center; gap: 24px; padding: 0 18px 0 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-brand, .top-actions, .brand { display: flex; align-items: center; }
.topbar-brand { gap: 11px; min-width: 0; }
.menu-button { width: 36px; height: 36px; display: grid; place-items: center; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 8px; font-size: 18px; cursor: pointer; transition: border-color .15s, background .15s; }
.menu-button:hover { border-color: rgba(114,170,246,.42); background: rgba(255,255,255,.045); }
.brand { gap: 9px; min-width: 0; }
.brand img { width: 24px; height: 27px; object-fit: contain; }
.brand strong { font-size: 19px; color: var(--text); letter-spacing: -.03em; }
.brand span { margin-left: 4px; padding-left: 13px; border-left: 1px solid var(--line); color: var(--muted); }
.command-search { justify-self: center; width: min(100%, 640px); height: 40px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); color: var(--muted); }
.command-search input { min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 500; }
.command-search kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--faint); background: rgba(0,0,0,.12); font-size: 10px; }
.top-actions { justify-content: flex-end; gap: 9px; min-width: 0; }
.model-badge { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 9px; border: 1px solid rgba(42,180,229,.3); border-radius: 6px; color: #8dd8f2; background: rgba(42,180,229,.08); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.refresh-button { width: 35px; height: 35px; border: 0; color: var(--text); background: transparent; border-radius: 50%; font-size: 24px; cursor: pointer; }
.refresh-button:hover { background: rgba(255,255,255,.06); }
.refresh-button:disabled { cursor: wait; opacity: .65; }
.top-actions .refresh-button { display: none; }
.refresh-icon { display: inline-block; }
.running .refresh-icon { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #a9b4c3; background: #222a39; font-size: 12px; }
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }

.sidebar { position: sticky; top: 62px; height: calc(100vh - 62px); display: flex; flex-direction: column; padding: 16px 10px 13px 0; background: var(--paper); border-right: 1px solid var(--line); }
.sidebar nav { display: grid; gap: 3px; }
.nav-group { display: grid; gap: 3px; }
.nav-heading, .nav-item { min-height: 40px; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; padding: 0 13px 0 18px; color: var(--muted); border: 0; border-left: 3px solid transparent; background: transparent; text-align: left; font-size: 14px; }
.nav-heading { margin-top: 2px; color: var(--text); font-weight: 650; }
.nav-heading b { font-size: 11px; color: var(--faint); }
.nav-item { width: 100%; cursor: pointer; border-radius: 0 7px 7px 0; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.045); }
.nav-item.active { color: #82b4f8; border-left-color: var(--primary); background: rgba(255,255,255,.08); font-weight: 650; }
.nav-group .nav-item { padding-left: 27px; }
.nav-group .nav-item span { width: 20px; color: inherit; font-weight: 700; }
.sidebar-foot { margin-top: auto; padding: 14px 12px 0 18px; border-top: 1px solid var(--line); }
.evaluator-state { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.evaluator-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(29,165,115,.12); }
.evaluator-state.running i { background: var(--warning); box-shadow: 0 0 0 4px rgba(249,168,6,.12); }
.evaluator-state.failed i { background: var(--error); box-shadow: 0 0 0 4px rgba(216,30,18,.12); }
.evaluator-state span { display: grid; gap: 2px; }
.evaluator-state strong { font-size: 11px; }
.evaluator-state small { color: var(--faint); font-size: 10px; }
.sidebar-foot button { padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.sidebar-foot button:hover { color: var(--text); }
.nav-backdrop { display: none; }
.content { grid-column: 2; }
.app-shell.nav-closed { grid-template-columns: 0 minmax(0, 1fr); }
.app-shell.nav-closed .sidebar { display: none; }
.app-shell.nav-closed .content { grid-column: 1 / -1; }

.content { min-width: 0; padding: 36px 40px 80px; }
.page-head { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 44px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.page-title { min-width: 0; }
.page-kicker { display: block; margin-bottom: 8px; color: #75aef8; font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.page-head h1 { margin: 0 0 7px; font-size: 25px; line-height: 1.2; letter-spacing: -.025em; }
.page-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.headline-stats { display: grid; grid-template-columns: repeat(4, minmax(92px, 1fr)); min-width: 500px; }
.headline-stats article { min-height: 58px; padding: 4px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.headline-stats strong { font-size: 24px; line-height: 1; color: var(--bright-blue); letter-spacing: -.04em; }
.headline-stats article:nth-child(2) strong { color: var(--success); }
.headline-stats article:nth-child(3) strong { color: #75aef8; }
.headline-stats article:nth-child(4) strong { color: var(--text); font-size: 17px; }
.headline-stats span { margin-top: 6px; color: var(--faint); font-size: 9px; white-space: nowrap; }

.filter-shelf { margin-top: 24px; display: grid; grid-template-columns: minmax(390px, .82fr) minmax(600px, 1.18fr); overflow: hidden; background: #182130; border: 1px solid rgba(255,255,255,.075); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.1); }
.toolbar-section { min-width: 0; padding: 17px 20px 18px; }
.evaluator-toolbar { border-left: 1px solid var(--line); background: rgba(255,255,255,.018); }
.toolbar-heading { min-width: 0; display: flex; align-items: baseline; gap: 8px; margin-bottom: 11px; }
.toolbar-heading strong { color: #d9e1ed; font-size: 11px; }
.toolbar-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 9px; }
.toolbar-controls { min-width: 0; display: flex; align-items: flex-end; gap: 10px; }
.source-control { flex: 1 1 180px; min-width: 170px; display: grid; gap: 6px; }
.source-control > span, .select-control > span { color: var(--faint); font-size: 8px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.segmented { height: 40px; display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0,0,0,.16); }
.segmented .filter { flex: 1 1 auto; min-width: 48px; padding: 0 11px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; transition: color .12s, background .12s; }
.segmented .filter:hover { color: var(--text); }
.segmented .filter.active { color: #e8f2ff; background: rgba(114,170,246,.14); box-shadow: inset 0 0 0 1px rgba(114,170,246,.12); }
.select-control { flex: 1 1 185px; min-width: 160px; display: grid; gap: 6px; }
.select-control.scan-control { flex-basis: 175px; }
.select-control select { width: 100%; height: 40px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: var(--text); background: #192231; font-size: 10px; }
.select-control select:focus { border-color: rgba(45,127,240,.65); box-shadow: 0 0 0 2px rgba(45,127,240,.12); }
.select-control select:disabled { opacity: .6; }
.continuous-control { flex: 1 1 185px; min-width: 175px; height: 40px; display: flex; align-items: center; gap: 9px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: rgba(0,0,0,.11); cursor: pointer; }
.continuous-control input { margin: 0; accent-color: var(--primary); }
.continuous-control span { min-width: 0; display: grid; gap: 2px; }
.continuous-control b { color: var(--text); font-size: 9px; }
.continuous-control small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 8px; }
.continuous-control:has(input:disabled) { opacity: .55; cursor: default; }
.run-button { flex: 0 0 auto; height: 40px; padding: 0 16px; border: 0; border-radius: 7px; color: white; background: var(--primary); font-size: 10px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(45,127,240,.18); white-space: nowrap; }
.run-button:hover { background: #3a8af7; }
.run-button:disabled { opacity: .65; cursor: wait; }
.run-button .refresh-icon { margin-right: 6px; }
.run-button.stop-button { background: #a34840; box-shadow: 0 4px 12px rgba(216,30,18,.15); }
.run-button.stop-button:hover { background: #b65349; }

.status-banner { margin: 18px 0 0; padding: 13px 16px; border: 1px solid; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.status-banner.running { color: #9ccef2; border-color: rgba(42,180,229,.28); background: rgba(42,180,229,.08); }
.status-banner.error { color: #efaaa2; border-color: rgba(216,30,18,.3); background: rgba(216,30,18,.08); white-space: pre-wrap; }
.engine-progress { margin-top: 14px; padding: 16px 18px 14px; border: 1px solid rgba(45,127,240,.25); border-radius: 10px; background: linear-gradient(130deg, rgba(45,127,240,.09), rgba(42,180,229,.025)); }
.progress-head, .progress-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.progress-head > div { min-width: 0; display: flex; align-items: center; gap: 8px; }
.progress-head strong { color: #dce9fb; font-size: 12px; }
.progress-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #85b7f9; font-size: 10px; }
.progress-head b { color: #8fd7f2; font-size: 13px; font-variant-numeric: tabular-nums; }
.engine-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bright-blue); box-shadow: 0 0 0 5px rgba(42,180,229,.1); animation: engine-pulse 1.8s ease-in-out infinite; }
@keyframes engine-pulse { 50% { opacity: .45; transform: scale(.86); } }
.progress-track { height: 7px; margin: 13px 0 10px; overflow: hidden; border-radius: 7px; background: rgba(0,0,0,.28); }
.progress-track i { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--bright-blue)); box-shadow: 0 0 14px rgba(42,180,229,.32); transition: width .7s ease; }
.progress-foot { color: var(--faint); font-size: 9px; }
.progress-foot span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-foot span:last-child { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.queue { margin-top: 30px; }
.queue-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.queue-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.queue-heading p { margin: 5px 0 0; color: var(--faint); font-size: 10px; }
.queue-heading > span { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.03); font-size: 9px; font-variant-numeric: tabular-nums; }
.table-head, .ticket-card { display: grid; grid-template-columns: 56px minmax(360px, 1fr) minmax(130px, .24fr) 92px 108px; column-gap: 14px; align-items: center; }
.table-head { position: sticky; z-index: 8; top: 62px; min-height: 40px; padding: 0 17px; color: var(--faint); border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: rgba(12,16,25,.96); backdrop-filter: blur(10px); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .075em; }
.ticket-list { border: 1px solid var(--line); border-radius: 0 0 8px 8px; overflow: hidden; box-shadow: 0 12px 34px rgba(0,0,0,.08); }
.ticket-card { min-height: 114px; padding: 15px 17px; border-bottom: 1px solid var(--line); background: var(--paper); transition: background .12s, box-shadow .12s; }
.ticket-card:last-child { border-bottom: 0; }
.ticket-card:hover { background: var(--surface-hover); box-shadow: inset 3px 0 0 rgba(114,170,246,.52); }
.rank strong { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #9bc3fb; background: rgba(45,127,240,.12); font-size: 12px; font-variant-numeric: tabular-nums; }
.ticket-main { min-width: 0; padding: 3px 18px 3px 0; }
.ticket-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--faint); font-size: 9px; }
.ticket-meta a { color: #72aaf6; }
.ticket-meta a:hover { text-decoration: underline; }
.source { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.source i { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 4px; color: white; font-style: normal; font-size: 9px; font-weight: 700; }
.source-jira i { background: #1665d8; }
.source-linear i { background: #6654d9; }
.mirror-pill { padding: 3px 6px; border: 1px solid rgba(42,180,229,.23); border-radius: 10px; color: #8edaf2; background: rgba(42,180,229,.07); }
.opened-at { padding-left: 1px; color: var(--faint); }
.ticket-main h3 { margin: 8px 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #eef2f8; font-size: 15px; letter-spacing: -.012em; }
.ticket-main p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: rgba(255,255,255,.62); font-size: 11px; line-height: 1.5; }
.surface { min-width: 0; display: flex; align-items: flex-start; flex-direction: column; gap: 7px; padding-right: 12px; }
.surface strong { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; color: #82b4f8; font-size: 10px; }
.surface span { padding: 4px 7px; border-radius: 4px; color: var(--muted); background: rgba(255,255,255,.05); font-size: 8px; text-transform: capitalize; }
.score { display: grid; justify-items: start; gap: 4px; }
.score > div { display: flex; align-items: baseline; gap: 2px; }
.score strong { color: #75aef8; font-size: 23px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.score span { color: var(--faint); font-size: 8px; }
.score em { padding: 3px 6px; border-radius: 9px; background: rgba(255,255,255,.045); font-style: normal; font-size: 8px; text-transform: capitalize; white-space: nowrap; }
.score-excellent strong { color: #56c5ef; }
.score-good strong { color: #67c79f; }
.score-medium strong { color: #e9b646; }
.confidence-high { color: #65d0a6; }
.confidence-medium { color: #e9b646; }
.confidence-low { color: #ec786c; }
.row-action { display: flex; justify-content: flex-end; }
.prompt-button { height: 34px; padding: 0 10px; border: 1px solid rgba(114,170,246,.16); border-radius: 6px; background: rgba(45,127,240,.055); color: #8bb8f6; font-size: 10px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.prompt-button span { margin-left: 4px; }
.prompt-button:hover { color: white; border-color: rgba(114,170,246,.32); background: rgba(45,127,240,.13); }
.empty-state { padding: 82px 20px; border: 1px solid var(--line); border-radius: 0 0 8px 8px; text-align: center; color: var(--muted); background: var(--paper); }
.empty-state > span { font-size: 30px; color: #667487; }
.empty-state h3 { margin: 14px 0 6px; color: var(--text); }
.empty-state p { margin: 0; font-size: 12px; }
.method { max-width: 850px; margin-top: 54px; padding-top: 22px; border-top: 1px solid var(--line); }
.method h2 { margin: 0 0 8px; font-size: 16px; }
.method p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.detail-drawer { width: min(620px, 94vw); max-width: none; height: 100vh; max-height: none; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--paper); color: var(--text); box-shadow: -20px 0 60px rgba(0,0,0,.42); }
.detail-drawer[open] { display: grid; grid-template-rows: auto 1fr auto; animation: drawer-in .18s ease-out; }
@keyframes drawer-in { from { transform: translateX(30px); opacity: .7; } }
.detail-drawer::backdrop { background: rgba(3,6,12,.64); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 26px 28px 22px; border-bottom: 1px solid var(--line); }
.dialog-head > div { min-width: 0; }
.dialog-source { color: var(--bright-blue); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.dialog-head h2 { margin: 10px 0 8px; font-size: 20px; line-height: 1.3; }
.dialog-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.close-button { flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: transparent; font-size: 22px; cursor: pointer; }
.close-button:hover { color: white; }
.dialog-body { min-height: 0; overflow: auto; padding: 22px 28px; }
.brief-stats { display: flex; gap: 8px; margin-bottom: 26px; }
.brief-stats span { padding: 6px 9px; border-radius: 14px; color: var(--muted); background: rgba(255,255,255,.06); font-size: 10px; text-transform: capitalize; }
.brief-stats b { color: var(--warning); }
.dialog-body h3 { margin: 0 0 10px; font-size: 12px; }
.metadata-section { margin: 0 0 26px; padding: 17px 18px 18px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.metadata-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.metadata-heading h3 { margin: 0; }
.tracker-records { margin: -2px 0 17px; padding: 12px; border: 1px solid rgba(42,180,229,.2); border-radius: 7px; background: rgba(42,180,229,.045); }
.tracker-records:empty { display: none; }
.tracker-records > span { display: block; margin-bottom: 8px; color: #8edaf2; font-size: 8px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.tracker-records > div { display: grid; gap: 6px; }
.tracker-records a { min-width: 0; display: grid; grid-template-columns: 18px auto 1fr auto; align-items: center; gap: 7px; padding: 6px 7px; border-radius: 5px; color: var(--muted); background: rgba(0,0,0,.12); }
.tracker-records a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.tracker-records i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; color: white; font-size: 9px; font-style: normal; font-weight: 700; }
.tracker-records i.source-jira { background: #1665d8; }
.tracker-records i.source-linear { background: #6654d9; }
.tracker-records b { color: #c9dcf7; font-size: 10px; }
.tracker-records small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 9px; }
.tracker-records em { color: #72aaf6; font-size: 10px; font-style: normal; }
.grooming-pill { flex: 0 0 auto; padding: 5px 8px; border: 1px solid; border-radius: 12px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.grooming-groomed { color: #69d4a9; border-color: rgba(29,165,115,.35); background: rgba(29,165,115,.1); }
.grooming-reviewed { color: #8bc1ff; border-color: rgba(45,127,240,.38); background: rgba(45,127,240,.11); }
.grooming-needs_grooming { color: #f0bb54; border-color: rgba(249,168,6,.35); background: rgba(249,168,6,.1); }
.grooming-unknown { color: var(--muted); border-color: var(--line); background: rgba(255,255,255,.04); }
.metadata-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.metadata-grid > div { min-width: 0; display: grid; gap: 4px; }
.metadata-grid span { color: var(--faint); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.metadata-grid strong { overflow-wrap: anywhere; color: #d7dce5; font-size: 11px; font-weight: 550; line-height: 1.45; }
.grooming-evidence { margin: 17px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.55; }
.metadata-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.metadata-labels:empty { display: none; }
.metadata-labels span { padding: 4px 7px; border-radius: 4px; color: #9bc3fb; background: rgba(45,127,240,.1); font-size: 9px; }
.delivery-section { margin: 0 0 26px; padding: 17px 18px 18px; border: 1px solid rgba(45,127,240,.24); border-radius: 9px; background: linear-gradient(135deg, rgba(45,127,240,.08), rgba(42,180,229,.025)); }
.delivery-section .metadata-heading { margin-bottom: 16px; }
.human-review-pill { flex: 0 0 auto; padding: 5px 8px; border: 1px solid rgba(42,180,229,.35); border-radius: 12px; color: #8edaf2; background: rgba(42,180,229,.09); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.delivery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.delivery-grid > div { min-width: 0; display: grid; gap: 4px; }
.delivery-grid .wide { grid-column: 1 / -1; }
.delivery-grid span { color: var(--faint); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.delivery-grid strong, .delivery-grid code { overflow-wrap: anywhere; color: #d7dce5; font-size: 11px; font-weight: 550; line-height: 1.45; }
.delivery-grid code { color: #91bdf8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.lifecycle { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.lifecycle span, .lifecycle b { padding: 5px 8px; border-radius: 12px; font-size: 9px; }
.lifecycle span { color: #9bc3fb; background: rgba(45,127,240,.12); }
.lifecycle b { color: #69d4a9; background: rgba(29,165,115,.11); }
.lifecycle i { color: var(--faint); font-size: 10px; font-style: normal; }
.delivery-section > p { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.dialog-body pre { margin: 0; padding: 18px; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 8px; color: #c6ccd6; background: #0c1019; font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.dialog-actions { min-height: 70px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 28px; border-top: 1px solid var(--line); }
.dialog-actions span { color: #56c49c; font-size: 10px; }

.login-body { display: grid; place-items: center; background: linear-gradient(120deg, #58b9e9, #273aa0); color-scheme: light; }
.login-wrap { width: min(545px, calc(100vw - 32px)); }
.login-brand { display: flex; justify-content: center; align-items: center; gap: 13px; margin-bottom: 28px; color: white; }
.login-brand img { width: 58px; height: 62px; filter: brightness(0) invert(1); }
.login-brand span { font-size: 55px; font-weight: 400; letter-spacing: -.055em; }
.login-card { padding: 42px 48px 36px; border-radius: 8px; background: white; box-shadow: 0 12px 30px rgba(14,29,69,.28); color: #171a20; }
.login-kicker { margin: 0 0 8px; color: var(--primary); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.login-card h1 { margin: 0 0 10px; font-size: 24px; }
.login-copy { margin: 0 0 26px; color: #636973; font-size: 12px; line-height: 1.55; }
.login-card label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; }
.login-card input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #cbd1dc; border-radius: 5px; outline: 0; background: #fff; color: #151820; }
.login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(45,127,240,.14); }
.login-card button { width: 100%; height: 42px; margin-top: 14px; border: 0; border-radius: 5px; background: #457fe8; color: white; font-size: 12px; font-weight: 700; text-transform: uppercase; cursor: pointer; }
.login-card button:hover { background: #2d6fdc; }
.login-error { margin: -10px 0 14px; color: var(--error); font-size: 11px; }

@media (max-width: 1320px) {
  .filter-shelf { grid-template-columns: 1fr; }
  .evaluator-toolbar { border-top: 1px solid var(--line); border-left: 0; }
}
@media (max-width: 1100px) {
  .topbar { grid-template-columns: 260px minmax(240px, 1fr) auto; }
  .user-name, .model-badge { display: none; }
  .headline-stats { min-width: 380px; }
  .table-head, .ticket-card { grid-template-columns: 48px minmax(300px, 1fr) 82px 102px; }
  .table-head span:nth-child(3), .surface { display: none; }
}
@media (max-width: 800px) {
  .app-shell { grid-template: 58px 1fr / 1fr; }
  .topbar { height: 58px; grid-template-columns: auto 1fr auto; padding-right: 10px; }
  .content { grid-column: 1; }
  .sidebar { display: none; }
  .app-shell.nav-open .sidebar { position: fixed; z-index: 30; top: 58px; bottom: 0; left: 0; width: 250px; height: auto; display: flex; box-shadow: 20px 0 45px rgba(0,0,0,.36); }
  .app-shell.nav-open .nav-backdrop { position: fixed; z-index: 29; inset: 58px 0 0; display: block; border: 0; background: rgba(3,6,12,.58); }
  .topbar-brand .brand span, .command-search kbd { display: none; }
  .command-search { height: 36px; }
  .content { padding: 24px 18px 60px; }
  .page-head { display: block; }
  .headline-stats { min-width: 0; margin-top: 22px; }
  .headline-stats article:first-child { border-left: 0; }
  .filter-shelf { border-radius: 10px; }
  .toolbar-section { padding: 15px; }
  .toolbar-controls { flex-wrap: wrap; }
  .view-toolbar .source-control, .view-toolbar .select-control { flex: 1 1 calc(50% - 5px); }
  .evaluator-toolbar .select-control, .continuous-control { flex: 1 1 calc(50% - 5px); }
  .filter-shelf .run-button { margin-left: auto; }
  .table-head { display: none; }
  .ticket-list { border-radius: 8px; }
  .ticket-card { grid-template-columns: 42px minmax(0, 1fr) 74px; row-gap: 12px; }
  .surface { grid-column: 2; }
  .score { grid-column: 3; grid-row: 1; }
  .row-action { grid-column: 3; grid-row: 2; }
  .ticket-main h3 { white-space: normal; }
  .login-wrap { width: min(470px, calc(100vw - 28px)); }
  .login-card { padding: 34px 28px 30px; }
}
@media (max-width: 520px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .menu-button, .avatar { display: none; }
  .topbar-brand { gap: 0; }
  .brand strong { font-size: 17px; }
  .command-search { margin-left: 4px; }
  .content { padding-inline: 13px; }
  .page-head { padding-bottom: 20px; }
  .page-kicker { margin-bottom: 6px; }
  .headline-stats { grid-template-columns: repeat(2, 1fr); }
  .headline-stats article:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .headline-stats article:nth-child(4) { border-top: 1px solid var(--line); padding-top: 12px; }
  .toolbar-heading { display: grid; gap: 3px; }
  .view-toolbar .source-control, .view-toolbar .select-control, .evaluator-toolbar .select-control, .continuous-control { flex: 1 1 100%; }
  .continuous-control { min-width: 0; }
  .run-button { padding-inline: 11px; font-size: 11px; }
  .ticket-card { grid-template-columns: 34px 1fr 62px; padding-inline: 10px; }
  .ticket-main { padding-right: 4px; }
  .surface { display: none; }
  .row-action { grid-column: 2 / 4; }
  .prompt-button { width: 100%; text-align: right; }
  .detail-drawer { width: 100vw; }
  .dialog-head, .dialog-body, .dialog-actions { padding-left: 20px; padding-right: 20px; }
  .metadata-grid { grid-template-columns: 1fr; }
  .delivery-grid { grid-template-columns: 1fr; }
  .delivery-grid .wide { grid-column: 1; }
  .login-brand img { width: 48px; height: 52px; }
  .login-brand span { font-size: 46px; }
}
