/* Operations: the screens that are not in the cataloguing shell. Loaded after app.css and uses its tokens. */

.content { max-width: 1320px; }
.narrow { max-width: 760px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sub-title { margin-top: 6px; color: var(--ink-2); font-family: var(--font-body); font-size: .9rem; }
.btn.is-disabled { opacity: .45; cursor: default; pointer-events: none; }
.btn { text-decoration: none; }
.topbar__new { min-height: 38px; padding: 0 14px; }

/* ---------- Car tag: the car's short number, written like a Dutch plate ---------- */

.car-tag {
    flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 7px;
    background: var(--amber); color: #1B1300; border-radius: 5px;
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--amber-ink) 70%, transparent);
    font-family: var(--font-display); font-weight: 700; font-size: .88rem; line-height: 1;
    font-variant-numeric: tabular-nums; letter-spacing: .06em; white-space: nowrap;
}
.car-tag--lg { height: 40px; padding: 0 12px; border-radius: 7px; font-size: 1.45rem; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--amber-ink) 70%, transparent); }

.car-thumb {
    flex: none; display: grid; place-items: center; overflow: hidden;
    background: var(--paper); color: var(--ink-3); border-radius: var(--r-sm);
}
.car-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Completeness ---------- */

.meter { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meter__track { width: 44px; height: 6px; border-radius: 3px; background: #E1E5EA; overflow: hidden; }
.meter__fill { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.meter--warn { color: var(--red); }
.meter--warn .meter__fill { background: var(--red); }

.status-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip--label { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px #C9CED7; }

/* ---------- Board ---------- */

.board-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 18px; }
.board-bar__tools { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.board-bar__tools .btn { padding: 0 10px; overflow: hidden; text-overflow: ellipsis; }
.board-bar__tools .board-bar__search, .board-bar__tools .board-bar__supplier { grid-column: 1 / -1; }
.board-bar__supplier select { flex: 1; min-width: 0; border: 0; outline: 0; background-color: transparent; padding: 10px 40px 10px 14px; }
.board-bar .field__control { min-height: 46px; }
.board-chips { margin-bottom: 16px; }
@media (min-width: 960px) {
    .board-bar { grid-template-columns: auto 1fr; align-items: center; gap: 24px; }
    .board-bar__tools { grid-template-columns: minmax(170px, 230px) minmax(180px, 1fr) auto auto; }
    .board-bar__tools .btn { padding: 0 18px; }
    .board-bar__tools .board-bar__search, .board-bar__tools .board-bar__supplier { grid-column: auto; }
}

.board { display: grid; gap: 12px; align-items: start; }
.column { background: #EEF0F4; border-radius: var(--r-lg); padding: 12px; display: grid; gap: 10px; min-width: 0; }
.column__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 4px; }
.column__name { font-size: 1rem; }
.column__count { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.column__cards { display: grid; gap: 8px; }
.column__more { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px; border-radius: var(--r-md); color: var(--green); font-weight: 600; font-size: .92rem; }
.column__more:hover { background: var(--surface); }
.column__more--quiet { color: var(--ink-3); font-weight: 500; }
/* An empty column stays on the board with its 0, folded so the full ones get the room. */
.column--empty { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.column--empty .column__name { color: var(--ink-3); font-weight: 500; }
@media (min-width: 960px) {
    /* Columns keep the order of the car's journey; the folded ones are narrow, the others share the room. */
    .board { display: flex; align-items: stretch; }
    .board > .column { flex: 1; align-content: start; }
    .board > .column--empty { flex: none; width: 64px; flex-direction: column; justify-content: flex-start; gap: 12px; min-height: 220px; padding: 14px 0; }
    .column--empty .column__name { writing-mode: vertical-rl; font-size: .92rem; }
}
.board-off { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; }
.board-off a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.board-off a:hover { color: var(--ink); }

.car-card { display: flex; gap: 12px; padding: 10px; background: var(--surface); border-radius: var(--r-md); border: 1px solid transparent; box-shadow: 0 1px 2px rgba(24,32,43,.08); min-width: 0; }
.car-card:hover { border-color: #C9CED7; }
.car-card__thumb { width: 64px; height: 64px; }
.car-card__body { display: grid; gap: 5px; min-width: 0; flex: 1; align-content: start; }
.car-card__title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.car-card__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.car-card__meta .chip { height: 22px; padding: 0 8px; font-size: .75rem; }
.car-card__foot { color: var(--ink-3); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card-grid .car-card { border-color: var(--line); box-shadow: none; }
.list-note { margin-top: 14px; font-size: .9rem; }

/* ---------- Car list ---------- */

.filters { display: grid; gap: 10px; margin-bottom: 18px; grid-template-columns: 1fr 1fr; align-items: center; }
.filters .search { grid-column: 1 / -1; }
.filters .field__control { min-height: 46px; }
.filters select { padding: 10px 40px 10px 14px; }
.filters .segmented { margin-bottom: 0; justify-self: start; }
@media (min-width: 1100px) { .filters { grid-template-columns: minmax(200px, 1.4fr) repeat(4, minmax(0, 1fr)) auto; } .filters .search { grid-column: auto; } }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.car-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.car-table th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: .82rem; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.car-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.car-table tbody tr { cursor: pointer; }
.car-table tbody tr:hover { background: var(--paper); }
.car-table tbody tr:last-child td { border-bottom: 0; }
.car-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.car-table td a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- Car page ---------- */

.car-head { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; margin-bottom: 18px; }
.car-head__thumb { width: 76px; height: 76px; border-radius: var(--r-md); }
.car-head__text { min-width: 0; display: grid; gap: 6px; }
.car-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 1.5rem; }
.car-head__meta { color: var(--ink-2); font-size: .92rem; overflow-wrap: anywhere; }
.car-head__meta a:hover { text-decoration: underline; }
.car-head__state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.car-head__actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.car-head__actions .btn { flex: 1; }
.mini-link { border: 0; background: none; padding: 2px 4px; color: var(--green); font-weight: 600; font-size: .88rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 800px) {
    .car-head { grid-template-columns: auto 1fr auto; }
    .car-head__thumb { width: 104px; height: 104px; }
    .car-head h1 { font-size: 1.9rem; }
    .car-head__actions { grid-column: auto; align-self: start; }
    .car-head__actions .btn { flex: none; }
}

.status-change { display: grid; gap: 10px; padding: 14px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.status-change .segmented { margin-bottom: 0; justify-self: start; }
.chips--wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }

/* minmax(0, …): the tab strip scrolls inside the column instead of widening the page. */
.car-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.car-main { min-width: 0; }
.car-side { order: -1; }
@media (min-width: 1100px) {
    .car-layout { grid-template-columns: minmax(0, 1fr) 330px; }
    .car-side { order: 0; position: sticky; top: 24px; }
}

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab { flex: none; border: 0; background: none; padding: 10px 12px; margin-bottom: -1px; border-bottom: 2.5px solid transparent; color: var(--ink-2); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs__tab:hover { color: var(--ink); }
.tabs__tab.is-on { color: var(--green); border-bottom-color: var(--green); }

.card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.card .card__foot .btn { justify-self: auto; }
.saved { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; font-size: .9rem; }
.kv-list { display: grid; gap: 0; margin: 0; }
.kv-list div { display: grid; grid-template-columns: minmax(110px, 32%) 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv-list dt { color: var(--ink-2); }
.kv-list dd { margin: 0; overflow-wrap: anywhere; }

.warn-list { display: grid; gap: 8px; }
.warn-list li { display: flex; align-items: center; gap: 8px; color: var(--red); font-weight: 500; }
.warn-list__issue { color: var(--amber-ink) !important; }

/* ---------- Checklist ---------- */

.checklist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 12px; }
.checklist__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checklist__head h2 { flex: 1; }
.checklist__fold { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink-2); cursor: pointer; }
.checklist.is-open .checklist__fold .icon { transform: rotate(90deg); }
.checklist__body { display: none; gap: 12px; }
.checklist.is-open .checklist__body { display: grid; }
@media (min-width: 1100px) {
    .checklist__fold { display: none; }
    .checklist__body { display: grid; }
}
.checklist__items { display: grid; }
.checklist__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist__item:last-child { border-bottom: 0; }
.checklist__name { min-width: 0; font-weight: 500; display: grid; }
.checklist__must { color: var(--ink-3); font-size: .74rem; font-weight: 500; }
.checklist__item--missing .checklist__must { color: var(--red); }
.checklist__legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .76rem; }
.checklist__legend span { display: inline-flex; align-items: center; gap: 4px; }
.state-toggle { flex: none; display: inline-flex; gap: 3px; padding: 3px; background: #EAECF0; border-radius: 10px; }
.state-toggle__btn { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-3); cursor: pointer; }
.state-toggle__btn:disabled { cursor: default; }
.state-toggle__btn:not(:disabled):hover { background: rgba(255,255,255,.7); }
.state-toggle__btn.is-on { background: var(--surface); box-shadow: 0 1px 3px rgba(24,32,43,.16); }
.state-toggle__btn--collected.is-on { color: var(--green); }
.state-toggle__btn--issue.is-on { color: #A86B00; }
.state-toggle__btn--missing.is-on { color: var(--red); }
.state-toggle__btn--na.is-on { color: var(--ink); }

/* ---------- Photo places and files ---------- */

.slots { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.slot {
    position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; align-content: center; gap: 6px; padding: 8px;
    border: 1.5px dashed #C3C9D3; border-radius: var(--r-md); background: var(--paper); color: var(--ink-3); text-align: center; overflow: hidden;
}
.slot:hover, .slot:focus-within { border-color: var(--green); color: var(--green); }
.slot__name { font-size: .8rem; font-weight: 600; line-height: 1.2; }
.slot__file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.slot--filled { border-style: solid; border-color: var(--line); padding: 0; }
.slot--filled img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot--filled .slot__name { position: absolute; inset: auto 0 0 0; padding: 14px 8px 6px; color: #fff; background: linear-gradient(transparent, rgba(24,32,43,.72)); text-align: left; }
.slot__remove { position: absolute; top: 6px; right: 6px; z-index: 2; }
.slot.is-busy { opacity: .55; pointer-events: none; }

.file-list { display: grid; }
.file-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.file-list li:last-child { border-bottom: 0; }
.file-list a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #C9CED7; overflow-wrap: anywhere; }
.file-list__meta { margin-left: auto; font-size: .82rem; color: var(--ink-3); }
.upload-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.upload-row .field__control { flex: 1; min-width: 200px; }
.upload-row .btn { cursor: pointer; }

.report { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.report summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; cursor: pointer; list-style: none; }
.report summary::-webkit-details-marker { display: none; }
.report__meta { margin-left: auto; color: var(--ink-3); font-size: .85rem; }
.report[open] summary { margin-bottom: 12px; }
.report__raw { margin-bottom: 12px; }
.value-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.value-table th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 6px 12px 6px 0; width: 40%; vertical-align: top; }
.value-table td { padding: 6px 0; overflow-wrap: anywhere; }
.value-table tr + tr th, .value-table tr + tr td { border-top: 1px solid var(--line); }

/* ---------- Findings and history ---------- */

.finding-list { display: grid; gap: 10px; }
.finding { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: start; }
.finding .icon { margin-top: 2px; color: var(--ink-3); }
.finding--missing .icon { color: var(--red); }
.finding--issue .icon { color: #A86B00; }
.finding__meta { grid-column: 2; color: var(--ink-3); font-size: .82rem; }

.timeline { display: grid; }
.timeline li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline__when { color: var(--ink-3); font-size: .82rem; font-variant-numeric: tabular-nums; }
.timeline__what { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.timeline__who { color: var(--ink-2); font-size: .85rem; }
.ai-mark-inline { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--ai-soft); color: var(--ai); font-weight: 600; font-size: .75rem; }
@media (min-width: 720px) {
    .timeline li { grid-template-columns: 150px 1fr auto; gap: 14px; align-items: center; }
}

/* ---------- Decision dialog ---------- */

.dialog-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; padding: 0; background: rgba(24,32,43,.45); }
.dialog { width: 100%; max-width: 520px; display: grid; gap: 14px; padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.dialog__facts { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--paper); border-radius: var(--r-md); color: var(--ink-2); }
.dialog__actions { display: flex; gap: 10px; justify-content: flex-end; }
.dialog__actions .btn { flex: 1; }
@media (min-width: 600px) {
    .dialog-backdrop { place-items: center; padding: 24px; }
    .dialog { border-radius: var(--r-lg); padding: 26px; }
    .dialog__actions .btn { flex: none; }
}

/* ---------- Suppliers, scan, login ---------- */

.supplier-list { display: grid; gap: 8px; }
.supplier-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink-3); }
.supplier-row:hover { border-color: #C9CED7; }
.supplier-row__body { flex: 1; min-width: 0; display: grid; color: var(--ink); overflow-wrap: anywhere; }
.supplier-row__body .muted { font-size: .88rem; }
.supplier-row__counts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; font-size: .88rem; }

.scan-btn { margin-top: 14px; width: 100%; max-width: 520px; }
.scan-hint { margin-top: 14px; }
.code-entry { margin-bottom: 4px; }
.section-title { margin-top: 24px; }

.login__lang { margin-top: 18px; }
.login__panel .btn--lg { margin-top: 6px; }
@media (min-width: 960px) {
    .login__art .login__plates { display: grid; gap: 22px; justify-items: center; }
    .login__art .car-tag--lg { height: 92px; padding: 0 30px; border-radius: 14px; font-size: 3.6rem; box-shadow: inset 0 0 0 4px rgba(27,19,0,.75); }
    .login__art .car-tag--lg:nth-child(1) { transform: rotate(-5deg) translateX(-40px); opacity: .6; }
    .login__art .car-tag--lg:nth-child(2) { transform: rotate(2deg) translateX(30px); }
    .login__art .car-tag--lg:nth-child(3) { transform: rotate(-3deg) translateX(-10px); opacity: .6; }
}

/* ---------- Menu: the stages under the board ---------- */

.rail__sub { display: grid; gap: 1px; margin: 0 0 6px 22px; padding-left: 12px; border-left: 1.5px solid var(--line); }
.rail__sublink { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: var(--r-sm); color: var(--ink-2); font-size: .93rem; font-weight: 500; }
a.rail__sublink:hover { background: var(--paper); color: var(--ink); }
.rail__sublink.active { background: var(--green-soft); color: var(--green); }
.rail__sublink.is-later { color: var(--ink-3); cursor: default; }
.rail__sublink small { font-size: .72rem; font-weight: 500; }

/* ---------- Pipeline: the whole route at a glance ---------- */

.pipeline-total { margin-bottom: 14px; }
.pipeline { display: grid; gap: 12px; }
.stage { display: grid; gap: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.stage__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.stage__head h2 { font-size: 1.15rem; }
.stage__head h2 a { display: inline-flex; align-items: center; gap: 4px; }
.stage__head h2 a:hover { color: var(--green); }
.stage__total { color: var(--ink-2); font-size: .9rem; font-variant-numeric: tabular-nums; }
/* The statuses in the order a car passes them; each step points at the next. */
.stage__flow { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.step { position: relative; display: grid; gap: 2px; height: 100%; padding: 10px 14px; background: var(--green-soft); color: var(--green); border-radius: var(--r-md); }
a.step:hover { box-shadow: inset 0 0 0 1.5px var(--green); }
.step strong { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.step span { font-size: .86rem; font-weight: 600; color: var(--ink); }
.step--zero { background: var(--paper); color: var(--ink-3); }
.step--zero span { color: var(--ink-2); font-weight: 500; }
.stage__out { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; }
.stage__out a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.stage__out a:hover { color: var(--ink); }
.stage--later { background: transparent; border-style: dashed; }
.stage--later h2, .stage--later .step span { color: var(--ink-3); }
.stage--later .step { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Car pictures: the whole photo, 4:3 ---------- */

.car-thumb { aspect-ratio: 4 / 3; height: auto; background: #EEF0F4; }
.car-thumb img { object-fit: contain; }
.car-card__thumb { width: 92px; height: auto; align-self: start; }
.car-head__thumb { width: 124px; height: auto; }
@media (min-width: 800px) { .car-head__thumb { width: 184px; height: auto; } }

/* ---------- Lot on the car ---------- */

.lot-block { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 4px; padding: 8px 12px; background: var(--paper); border-radius: var(--r-md); font-size: .92rem; justify-self: start; max-width: 100%; }
.lot-block__label { color: var(--ink-2); }
.lot-block__number { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.lot-block__title { color: var(--ink-2); overflow-wrap: anywhere; }
.lot-block__auction { font-weight: 600; }
.lot-block__links { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.lot-block__links a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.btn--quiet-danger { color: var(--red); }
.btn--quiet-danger:hover { border-color: var(--red); }
.mini-link--danger { color: var(--red); }
.tabs__count { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #EAECF0; color: var(--ink-2); font-size: .75rem; font-variant-numeric: tabular-nums; }

/* ---------- Checklist after the decision ---------- */

.checklist--frozen { background: var(--paper); }
.state-final { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.state-final--collected { color: var(--green); }
.state-final--issue { color: #A86B00; }
.state-final--missing { color: var(--red); }
.checklist__frozen { display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.checklist__auto { color: var(--ink-3); font-size: .74rem; font-weight: 500; }

/* ---------- Messages ---------- */

.thread { display: grid; gap: 12px; }
.thread__item { display: grid; gap: 4px; padding: 12px 14px; background: var(--paper); border-radius: var(--r-md); }
.thread__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--ink-3); font-size: .82rem; }
.thread__meta strong { color: var(--ink); font-size: .9rem; }
.thread__body { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 72ch; }
.thread__form { display: grid; gap: 10px; }
.thread__form textarea, .lot-form textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px 14px; resize: vertical; font: inherit; color: var(--ink); }

/* ---------- Supplier lookup, form and list ---------- */

.lookup { display: grid; gap: 8px; }
.lookup__chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--green-soft); border-radius: var(--r-md); }
.lookup__text { display: grid; min-width: 0; overflow-wrap: anywhere; }
.lookup__text .muted, .lookup__option .muted { font-size: .86rem; }
.lookup__list { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.lookup__list li + li { border-top: 1px solid var(--line); }
.lookup__option { display: grid; width: 100%; padding: 10px 14px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); overflow-wrap: anywhere; }
.lookup__option:hover, .lookup__option:focus-visible { background: var(--paper); }
.lookup__option--add { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 600; }
.lookup__none { padding: 10px 14px; font-size: .9rem; }
.lookup__add { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.supplier-form { display: grid; gap: 14px; }

.supplier-row { display: grid; gap: 0; padding: 0; align-items: stretch; }
.supplier-row__main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; }
a.supplier-row__body:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.supplier-row__where { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.supplier-row__where .chip { gap: 5px; }
.supplier-row__edit { padding: 16px; border-top: 1px solid var(--line); }

/* ---------- QR sticker ---------- */

.dialog--sticker { max-width: 460px; }
.sticker { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); color: #000; }
.sticker__qr svg { display: block; width: 100%; height: auto; }
.sticker__text { display: grid; gap: 4px; justify-items: start; min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.sticker__text strong { font-size: 1.05rem; }
@media print {
    /* Only the sticker goes to the printer. */
    body * { visibility: hidden !important; }
    .sticker, .sticker * { visibility: visible !important; }
    .sticker { position: fixed; left: 0; top: 0; width: 90mm; border: 0; }
    .no-print { display: none !important; }
}

/* The car's actions: the decision in buttons, the rest as small links under it. */
.car-head__actions { display: grid; gap: 8px; }
.car-head__decide { display: flex; gap: 8px; flex-wrap: wrap; }
.car-head__decide .btn { flex: 1; }
.car-head__more { display: flex; gap: 14px; flex-wrap: wrap; }
@media (min-width: 800px) {
    .car-head__decide .btn { flex: none; }
    .car-head__more { justify-content: flex-end; }
}
.tabs__tab { padding: 10px 9px; font-size: .96rem; }
