/* Screen-specific styles. Each ticket adds its block here. */

/* ---------- start ---------- */
.start { display: flex; flex-direction: column; gap: var(--s32); padding-top: var(--s48); max-width: 960px; }
.start-intro { max-width: 640px; }
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s16); }
.start-card { display: flex; flex-direction: column; gap: 6px; color: var(--deep); }
.start-card:hover { border-color: var(--blue); color: var(--deep); }
@media (max-width: 480px) {
  .start { padding: var(--s24) var(--s16); }
  .topbar { padding: 0 var(--s16); }
}

/* ---------- sign-in ---------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: var(--s16); }
.login-top { width: 100%; max-width: 960px; display: flex; align-items: center; gap: var(--s12); }
.login-card { width: 100%; max-width: 440px; margin: var(--s32) 0; padding: var(--s24); display: flex; flex-direction: column; gap: var(--s20); }
.login-brand { display: flex; align-items: center; gap: var(--s12); }
.login-brand .logo { height: 54px; width: auto; margin: -6px; }
.account { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s8); align-items: center; width: 100%; text-align: left;
  padding: 10px 14px; border: var(--border); border-radius: var(--radius); background: #fff; color: var(--deep); cursor: pointer; }
.account:hover { border-color: var(--blue); }
.account .meta { grid-column: 1 / -1; }

/* ---------- office frame ---------- */
.brand-link { display: block; }
.demo-time { white-space: nowrap; }
.office-nav { display: flex; gap: 4px; padding: 0 var(--s24); background: #fff; border-bottom: var(--border); overflow-x: auto; }
.office-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px; color: var(--grey-text); font-weight: 500;
  border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.office-nav a:hover { color: var(--deep); }
.office-nav a[aria-current="page"] { color: var(--deep); border-bottom-color: var(--green); }
/* AI mode has three more sections: keep them all in view on a laptop. */
@media (max-width: 1240px) { .office-nav { padding: 0 var(--s12); gap: 0; } .office-nav a { padding: 12px 9px; } }
.nav-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--lav); color: var(--blue);
  font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.office-page { display: flex; flex-direction: column; gap: var(--s20); }
@media (max-width: 1100px) { .demo-time { display: none; } }

/* ---------- daily overview (K1) ---------- */
.ov-top { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s16); flex-wrap: wrap; }
.segmented { display: inline-flex; border: var(--border); border-radius: var(--radius-chip); overflow: hidden; background: #fff; }
.segmented a { padding: 7px 16px; color: var(--blue); font-weight: 500; }
.segmented a[aria-pressed="true"] { background: var(--blue); color: #fff; }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--s16); align-items: start; }
.ov-card { padding: var(--s16) var(--s16) var(--s8); min-width: 0; }
.ov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s12); }
.ov-head .section-title { margin-bottom: var(--s8); }
.ov-count { min-width: 30px; height: 30px; padding: 0 9px; border-radius: 15px; background: #F0F0F0; color: var(--grey-text);
  font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.ov-count.warn { background: var(--warn-chip); color: var(--deep); }
.ov-count.danger { background: var(--danger); color: #fff; }
.ov-count.blue { background: var(--lav); color: var(--blue); }
.ov-count.green { background: var(--green); color: var(--deep); }
.ov-list { list-style: none; margin: 0; padding: 0; }
.ov-list li + li { border-top: 1px solid var(--line-soft); }
.ov-row { display: flex; align-items: center; gap: var(--s12); padding: 10px 0; color: var(--deep); }
.ov-row:hover { color: var(--deep); background: #F7FAFF; }
.ov-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ov-main b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-main .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-aside { flex: none; }
.ov-empty { padding: 6px 0 12px; }
.band-NO_PLAN { background: var(--danger); color: #fff; }
.band-DARK { background: var(--danger-wash); color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger); }
.band-WAIT { background: var(--warn-chip); color: var(--deep); }
.band-SORTED { background: var(--green); color: var(--deep); }
@media (max-width: 480px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } .office-nav { padding: 0 var(--s8); } }
@media (max-width: 720px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .topbar .divider, .topbar > .stack.tight { display: none; }
  .user-chip { padding-left: 0; border-left: 0; }
}

/* ---------- shared: table, panels, forms ---------- */
.block { display: block; }
.filters { gap: 8px; }
.filters .filter-chip b { font-weight: 600; opacity: .75; }
.trips-search { min-width: 280px; }
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: var(--fs-meta); font-weight: 600; color: var(--grey); padding: 12px 14px; border-bottom: var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--deep); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #F7FAFF; }
.panel { border-color: var(--blue); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s12); }
.form-grid .wide { grid-column: 1 / -1; }
.field textarea { min-height: 0; resize: vertical; font-family: inherit; }
.edit-stop { border: var(--border); border-radius: var(--radius); padding: var(--s12) var(--s16) var(--s16); margin: 0; }
.edit-stop legend { padding: 0 6px; font-weight: 600; color: var(--deep); }
.kv { margin: 0; display: grid; gap: 10px; }
.kv div { display: grid; grid-template-columns: 150px 1fr; gap: var(--s12); }
.kv dt { color: var(--grey); font-size: var(--fs-meta); }
.kv dd { margin: 0; }

/* ---------- trip detail ---------- */
.trip-top { align-items: flex-start; }
.trip-top .row { gap: 8px; }
.trip-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s16); align-items: start; }
@media (max-width: 960px) { .trip-grid { grid-template-columns: minmax(0, 1fr); } .kv div { grid-template-columns: 1fr; gap: 2px; } }
.stops { list-style: none; margin: 0; padding: 0; }
.stop { display: grid; grid-template-columns: 22px 1fr; gap: var(--s12); position: relative; padding-bottom: var(--s20); }
.stop:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.stop-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--blue); background: #fff; margin-top: 3px; position: relative; z-index: 1; }
.stop-status-DEPARTED .stop-dot, .stop-status-WORK_DONE .stop-dot { background: var(--blue); }
.stop-REST .stop-dot { border-color: var(--secured); }
.stop-REST.stop-status-RESERVED .stop-dot { background: var(--green); border-color: var(--green); }
.stop-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stop-head { gap: 6px; }
.stop-kind { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--grey); text-transform: uppercase; }
.site { margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; padding: 10px 12px; background: var(--lav-soft); border-radius: var(--radius); }
.site dt { font-size: 11px; color: var(--grey); }
.site dd { margin: 0; font-size: 13px; }
.versions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s12); }
.versions > li { border: var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.steps-mini { list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--deep); display: grid; gap: 2px; }
.steps-mini li.pending { color: var(--warn); }
.changes { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--danger); }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 24px; bottom: 24px; z-index: 50; max-width: min(520px, calc(100vw - 48px)); display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: #fff; border: 2px solid var(--blue); border-radius: var(--radius); color: var(--deep); font-weight: 500; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.toast-error { border-color: var(--danger); color: var(--danger); }
.toast-error .toast-dot { background: var(--danger); }

/* ---------- driver (V1, V2) ---------- */
.driver-body { padding-bottom: 96px; }
.d-hello { display: flex; flex-direction: column; gap: 2px; }
.d-card { display: flex; flex-direction: column; gap: 8px; }
.d-head { justify-content: space-between; gap: 8px; }
.d-big { margin: 0; font-size: 28px; line-height: 32px; font-weight: 600; color: var(--deep); }
.d-request { display: flex; flex-direction: column; gap: 4px; color: var(--deep); border-color: var(--blue); }
.d-request.danger { border-color: var(--danger); background: var(--danger-wash); }
.d-cta { color: var(--blue); font-weight: 600; }
.d-trip { display: flex; flex-direction: column; gap: 4px; color: var(--deep); }
.d-trip:hover, .d-request:hover { color: var(--deep); }
.warn-info { background: var(--warn-wash); color: var(--warn); }
.d-confirm { display: flex; flex-direction: column; gap: 8px; border-color: var(--blue); }
.d-confirm.changed-card { border-color: var(--danger); }
.d-stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s12); }
.d-stop { display: flex; flex-direction: column; gap: 4px; padding: var(--s16); background: #fff; border: var(--border); border-radius: var(--radius); }
.d-stop.next { border-color: var(--blue); }
.d-stop.done { opacity: .7; }
.d-action { height: 56px; font-size: 16px; margin-top: 6px; }
.changed { background: var(--warn-chip) !important; color: var(--deep) !important; border-radius: 6px; padding: 2px 6px; }
.site .changed { padding: 4px 6px; }
.driver .toast { top: 76px; bottom: auto; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 448px; }

/* ---------- issues ---------- */
.small-chip { padding: 4px 10px; font-size: 12px; }
.grow { flex: 1 1 auto; min-width: 0; width: auto; }
.photo-mock { display: inline-flex; padding: 6px 10px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--grey); font-size: 12px; }
.type-picker { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.type-picker legend { margin-bottom: 8px; }
.type-option { display: inline-flex; align-items: center; padding: 10px 14px; border: var(--border); border-radius: var(--radius-chip); background: #fff; color: var(--blue); font-weight: 500; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-option.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.type-option:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--deep); }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }

/* ---------- Tonight Board ---------- */
.tonight { display: flex; flex-direction: column; gap: var(--s12); scroll-margin-top: 16px; }
.tb-top { display: flex; align-items: flex-end; gap: var(--s16); flex-wrap: wrap; }
.tb-top > .stack { flex: 1 1 260px; }
.tb-top .section-title { margin: 0; }
.tb-coverage { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border: var(--border); border-radius: var(--radius); background: #fff; }
.tb-coverage b { font-size: 13px; }
.tb-bars { display: flex; gap: 3px; }
.tb-bars i { width: 8px; height: 13px; border-radius: 2px; background: var(--blue); }
.tb-bars .bar-STALE { opacity: .5; }
.tb-bars .bar-FROZEN { background: #B8D4FB; }
.tb-bars .bar-NO_SIGNAL { background: repeating-linear-gradient(45deg, var(--danger) 0 1.5px, var(--danger-wash) 1.5px 4px); }
.tb-bars .bar-UNKNOWN { background: #fff; border: 1.5px dashed var(--grey); }
.tb-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s16); align-items: start; }
.tb-split.with-panel { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
@media (max-width: 1100px) { .tb-split.with-panel { grid-template-columns: minmax(0, 1fr); } }
.tb-board { padding: 0; overflow: hidden; }
.tb-band { display: flex; align-items: center; gap: 9px; padding: 8px 16px; font-size: 12.5px; }
.tb-band em { font-style: normal; font-size: 11.5px; opacity: .85; margin-left: auto; text-align: right; }
.tb-band-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.tb-band-NO_PLAN, .tb-band-DARK { background: var(--danger-wash); color: var(--danger); }
.tb-band-WAIT { background: var(--warn-wash); color: var(--warn); }
.tb-band-SORTED { background: var(--good-wash); color: var(--good); }
.tb-row { display: grid; grid-template-columns: 22px minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, .6fr) minmax(0, .8fr) minmax(0, 1.1fr); gap: 12px; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid var(--line-soft); border-left: 4px solid transparent; color: var(--deep); }
.tb-row:hover { background: #F3F8FF; color: var(--deep); }
.tb-row.on { background: var(--line); border-left-color: var(--blue); }
.tb-cell { display: flex; flex-direction: column; min-width: 0; }
.tb-cell b { font-size: 13.5px; font-weight: 600; }
.tb-cell s, .tb-cell u { text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-cell s { font-size: 11.5px; color: var(--grey); }
.tb-cell u { font-size: 13px; font-weight: 500; color: var(--blue); }
.tb-cell u.stale { text-decoration: underline dashed var(--grey); text-underline-offset: 3px; }
.tb-cell .chip { align-self: flex-start; margin-bottom: 3px; }
.age-NO_SIGNAL { color: var(--danger) !important; font-weight: 500; }
.age-STALE { color: var(--warn) !important; }
.age-FROZEN { color: var(--blue) !important; }
.tb-foot { padding: 12px 16px; margin: 0; }
@media (max-width: 760px) {
  .tb-row { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr); row-gap: 6px; }
  .tb-shift, .tb-trip { display: none; }
  .tb-row > .tb-cell:last-child { grid-column: 2 / 4; }
}
.chip-noplan { background: var(--danger); color: #fff; }
.chip-dark { background: var(--danger-wash); color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger); }
.chip-wait { background: var(--warn-chip); color: var(--deep); }
.chip-sorted { background: var(--green); color: var(--deep); }

/* glyphs: shape + colour */
.glyph { display: inline-block; width: 13px; height: 13px; vertical-align: middle; flex: none; }
.glyph-noplan { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 12px solid var(--danger); }
.glyph-nosignal { border: 2px solid var(--danger); background: repeating-linear-gradient(45deg, var(--danger) 0 1.5px, #fff 1.5px 4.5px); }
.glyph-unknown { border: 2px dashed var(--grey); background: #fff; }
.glyph-waiting { border-radius: 50%; border: 2px solid var(--warn); background: linear-gradient(90deg, var(--warn) 50%, #fff 50%); }
.glyph-secured { border-radius: 50%; background: var(--secured); }
.glyph-offduty { border-radius: 50%; border: 2px solid var(--blue); background: #fff; }

/* truck panel (K2) */
.tb-panel { display: flex; flex-direction: column; gap: var(--s16); position: sticky; top: 16px; }
.tb-panel-head { align-items: flex-start; }
.tb-panel .title { font-size: 18px; }
.tb-trip-card { display: flex; flex-direction: column; gap: 2px; color: var(--deep); padding: 12px 14px; }
.shift-track { position: relative; height: 7px; border-radius: 4px; background: var(--line); }
.shift-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--blue); }
.shift-track i.late { background: var(--warn); }
.shift-track u { position: absolute; left: 85.7%; top: -3px; bottom: -3px; width: 2px; background: var(--warn); }
.shift-scale { display: flex; justify-content: space-between; }

/* ---------- fleet map ---------- */
.tb-side { display: flex; flex-direction: column; gap: var(--s16); min-width: 0; }
.tb-side .tb-panel { position: static; }
.tb-map { display: flex; flex-direction: column; gap: 10px; padding: var(--s12); }
.map-head { gap: 8px; }
.map-head .section-title { margin: 0; }
.map-controls { gap: 6px; }
.map-svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.map-svg a { cursor: pointer; }
.map-svg a:focus-visible circle:first-of-type { stroke: var(--blue); stroke-width: 2; }
.map-city { font-family: var(--font); font-size: 9px; fill: #A09E9E; }
.map-label { font-family: var(--font); font-size: 9.5px; font-weight: 600; fill: var(--deep); paint-order: stroke; stroke: #F5F9FF; stroke-width: 3px; }
.map-label.on { fill: var(--blue); }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 11px; color: var(--grey); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.halo-sample { width: 18px; height: 18px; border: 1.5px dashed var(--blue); border-radius: 50%; flex: none; }

/* ---------- rest stop (K4, V3) ---------- */
.rest-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s12); }
.rest-facts .card { display: flex; flex-direction: column; gap: 3px; }
.rest-facts b { font-size: 16px; color: var(--deep); }
.rest-options { display: flex; flex-direction: column; gap: var(--s12); }
.rest-option { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr); gap: 6px var(--s16); align-items: center; color: var(--deep); }
.rest-option:hover { border-color: var(--blue); color: var(--deep); }
.rest-option.on { border-color: var(--blue); background: var(--line); }
.rest-option > .meta { grid-column: 1 / -1; }
.rest-option.bad > .meta { color: var(--danger); }
.rest-name { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rest-option.bad > .meta.plain { color: var(--grey); }
.ai-option-actions { grid-column: 1 / -1; gap: var(--s8); align-items: center; flex-wrap: wrap; }
.ai-booking { display: flex; flex-direction: column; gap: var(--s8); margin-bottom: var(--s16); }
.ai-booking p { margin: 0; }
.ai-booking .row { gap: var(--s8); align-items: center; flex-wrap: wrap; }
.rest-metrics { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rest-metrics dt { font-size: 11px; color: var(--grey); }
.rest-metrics dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.rest-metrics dd.late { color: var(--danger); }
.rest-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s12); }
.rest-line li { display: flex; flex-direction: column; gap: 3px; padding-top: 10px; border-top: 3px solid var(--line); }
.rest-line li.rest-new { border-top-color: var(--green); }
.rest-line li.late { border-top-color: var(--danger); }
@media (max-width: 720px) { .rest-option { grid-template-columns: 1fr; } .rest-line { grid-template-columns: 1fr; } }

/* ---------- paperwork: driver V4 and office K5 (DEMO-13) ---------- */
.cmr { display: block; border: 2px solid var(--line); border-radius: 6px; background: #FBFAF6; }
.cmr-thumb { width: 64px; height: auto; flex: none; }
.cmr-large { width: 100%; max-width: 240px; height: auto; }
.d-photos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s12); }
.d-photo { display: flex; gap: var(--s12); align-items: flex-start; }
.d-photo .ov-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.d-photo[data-upload="FAILED"] .cmr { border-color: var(--danger); border-style: dashed; }
.d-photo[data-upload="QUEUED"] .cmr, .d-photo[data-upload="UPLOADING"] .cmr { opacity: .7; border-style: dashed; }
.d-sim { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 2px dashed var(--line); border-radius: var(--radius); }
.d-sim .demo-badge { align-self: flex-start; }
.d-viewfinder { display: flex; justify-content: center; padding: var(--s16); background: #1F2A44; border-radius: var(--radius); }
.d-viewfinder .cmr-large { max-width: 220px; border-color: #fff; }
.paper-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s16); }
.paper-photo { display: flex; flex-direction: column; gap: 6px; }
.paper-photo.returned .cmr { border-color: var(--danger); border-style: dashed; }

/* ---------- deadlines calendar (DEMO-14) ---------- */
.dl-calendar { gap: 0; padding: 0; }
.dl-week { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--s12); align-items: center; padding: 10px var(--s16); border-bottom: 1px solid var(--line-soft); min-height: 44px; }
.dl-week:last-child { border-bottom: 0; }
.dl-week.current { background: var(--lav-soft); box-shadow: inset 4px 0 0 var(--blue); }
.dl-week-items { gap: 8px; flex-wrap: wrap; }
.dl-week-items .chip { white-space: normal; }
@media (max-width: 720px) { .dl-week { grid-template-columns: 1fr; } }

/* ---------- mode choice (AIDEMO-02) ---------- */
.mode-card { text-align: left; font: inherit; cursor: pointer; background: var(--card); }
.mode-card.on { border-color: var(--blue); background: var(--line); }

/* ---------- AI work overview (AIDEMO-03) ---------- */
.auto-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s16); margin-bottom: var(--s16); }
.auto-cat { display: flex; flex-direction: column; gap: 6px; color: var(--deep); }
.auto-cat:hover { border-color: var(--blue); color: var(--deep); }
.auto-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.auto-count { font-size: 22px; line-height: 1; }
.auto-note { grid-column: 1 / -1; margin: 0; display: flex; align-items: center; gap: 8px; }
.decision-card { border-color: var(--danger); }
.chip.actor-service { background: var(--good-wash); color: var(--good); }
.chip.actor-partner { background: var(--warn-wash); color: var(--warn); }
.chip.actor-person { background: var(--lav); color: var(--blue); }
.chip.actor-system { background: #F0F0F0; color: var(--grey-text); }
@media (max-width: 900px) { .auto-strip { grid-template-columns: minmax(0, 1fr); } }

/* ---------- incoming orders (AIDEMO-04) ---------- */
.intake-load .row { align-items: flex-end; flex-wrap: wrap; }
.intake-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s16); align-items: start; }
@media (max-width: 960px) { .intake-grid { grid-template-columns: minmax(0, 1fr); } }
.intake-doc { display: flex; flex-direction: column; gap: 8px; padding-bottom: var(--s12); border-bottom: 1px solid var(--line-soft); }
.intake-doc:last-of-type { border-bottom: 0; }
.intake-doc header { gap: 8px; flex-wrap: wrap; }
.intake-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--deep); }
.intake-lines li { padding: 4px 8px; border-left: 3px solid transparent; border-radius: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.intake-lines li.hit { background: var(--warn-wash); border-left-color: var(--warn); font-weight: 500; }
.intake-lines li.alt { background: var(--line-soft); border-left-color: var(--grey); }
.intake-lines li.untrusted { border-left-color: var(--danger); background: var(--danger-wash); }
.intake-fields { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.intake-field { border: 2px solid transparent; border-radius: var(--radius); padding: 4px 6px; display: flex; flex-direction: column; gap: 6px; }
.intake-field.on { border-color: var(--line); background: #F7FAFF; }
.intake-field-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--deep); }
.intake-field-row .ov-main { display: flex; flex-direction: column; min-width: 0; }
.intake-correct { flex-wrap: wrap; align-items: flex-end; }
.intake-field-row .ov-main b, .intake-field-row .ov-main .meta { white-space: normal; overflow: visible; text-overflow: clip; }

/* ---------- instruction summary (AIDEMO-05) ---------- */
.summary-changes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.summary-changes li { padding: 6px 10px; border-radius: var(--radius); background: var(--warn-wash); border-left: 3px solid var(--warn); color: var(--deep); }
.summary-card .kv div.changed dd { font-weight: 600; background: var(--warn-wash); border-radius: 4px; padding: 0 4px; }

/* ---------- voice report (AIDEMO-06) ---------- */
.voice-quote { margin: 0; padding: 10px 12px; border-left: 3px solid var(--blue); background: var(--lav-soft); border-radius: 4px; color: var(--deep); font-style: italic; }

/* ---------- AI parking options (AIDEMO-08) ---------- */
.ai-option .rest-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ai-verdict { display: flex; gap: 6px; align-items: baseline; }
.ai-option.bad .ai-verdict { color: var(--danger); }
@media (max-width: 720px) { .ai-option .rest-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* AI document check (AIDEMO-10) */
.ai-check { padding: var(--s12); border: 2px solid var(--line); border-radius: 8px; }
.ai-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ai-check-list li[data-present=""] { color: var(--danger); }

/* Company policy (AIDEMO-11) */
.policy-levels { margin: 0; padding: var(--s12); border: 2px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: var(--s8); min-width: 0; }
.policy-levels legend { padding: 0 var(--s4); font-weight: 600; color: var(--deep); }
.policy-levels .check { align-items: flex-start; }

/* Work summary (AIDEMO-12) */
.worksum-group { display: flex; flex-direction: column; gap: var(--s8); margin-bottom: var(--s16); }
.worksum-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s12); }
.worksum-card { display: flex; justify-content: space-between; align-items: center; gap: var(--s8); color: var(--deep); }
.worksum-card:hover { border-color: var(--blue); color: var(--deep); }
.worksum-card.on { border-color: var(--blue); background: var(--line); }
.worksum-head { font-weight: 500; }

/* Parking map (AIDEMO-18) */
.pmap { display: flex; flex-direction: column; gap: 10px; }
.pmap-key { font-family: var(--font); font-size: 11px; font-weight: 600; pointer-events: none; }
.pmap-sign { font-family: var(--font); font-size: 12px; font-weight: 700; pointer-events: none; }
.pmap-svg a:focus-visible .pmap-hit { stroke: var(--blue); stroke-width: 2.5; }
.rest-option.picked { border-color: var(--blue); }
.rest-option a.meta.pmap-link, .rest-option.bad a.meta.pmap-link { align-self: flex-start; white-space: nowrap; color: var(--blue); }
/* Decline on the phone (AIDEMO-26): a quiet second choice under "Je confirme". */
.d-decline > summary { list-style: none; margin-top: var(--s8); }
.d-decline > summary::-webkit-details-marker { display: none; }
.d-decline[open] > summary { margin-bottom: var(--s8); }
