/* R14 car rental – rental-res.css. Owner: RS – reservations, customers & availability board. Every class in this file starts with "cr-".
   Uses only the app's colour variables (light / dark / colour themes) and logical properties (RTL). Phone width: 360px. */

/* ------------------------------------------------------------------------------------------------ colour families
   --bc = the family colour; bars, legend keys and source tags mix it with the surface so dark mode keeps its contrast. */
.cr-st-hold { --bc: var(--amber-fg); }
.cr-st-confirmed { --bc: var(--primary); }
.cr-k-contract { --bc: var(--green-fg); }
.cr-k-workshop, .cr-k-oos { --bc: var(--red-fg); }
.cr-k-transfer { --bc: var(--blue-fg); }
.cr-so-direct, .cr-src-direct { --bc: var(--gray-fg); }
.cr-so-web, .cr-src-web { --bc: var(--primary); }
.cr-so-corp, .cr-src-corp { --bc: var(--series-1); }
.cr-so-agent, .cr-src-agent { --bc: var(--series-2); }
.cr-so-remote, .cr-src-remote { --bc: var(--blue-fg); }
/* the board: reservations by status (default) or by source; contracts and blocks keep their own colour */
.cr-by-status .cr-bar.cr-k-res.cr-st-hold { --bc: var(--amber-fg); }
.cr-by-status .cr-bar.cr-k-res.cr-st-confirmed { --bc: var(--primary); }
.cr-by-source .cr-bar.cr-k-res.cr-so-direct { --bc: var(--gray-fg); }
.cr-by-source .cr-bar.cr-k-res.cr-so-web { --bc: var(--primary); }
.cr-by-source .cr-bar.cr-k-res.cr-so-corp { --bc: var(--series-1); }
.cr-by-source .cr-bar.cr-k-res.cr-so-agent { --bc: var(--series-2); }
.cr-by-source .cr-bar.cr-k-res.cr-so-remote { --bc: var(--blue-fg); }
.cr-bar.cr-k-contract { --bc: var(--green-fg); }
.cr-bar.cr-k-contract.cr-ct-returned, .cr-bar.cr-k-contract.cr-ct-closed { --bc: var(--gray-fg); }
.cr-bar.cr-k-workshop, .cr-bar.cr-k-oos { --bc: var(--red-fg); }
.cr-bar.cr-k-transfer { --bc: var(--blue-fg); }

/* the booking source next to a status chip */
.cr-src {
    display: inline-flex; align-items: center; margin-inline-start: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
    white-space: nowrap; color: var(--bc); background: color-mix(in srgb, var(--bc) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bc) 30%, var(--surface));
}

/* ------------------------------------------------------------------------------------------------ small shared pieces */
.cr-money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cr-cur { font-size: .85em; color: var(--muted); }
.cr-mini { padding: 1px 6px; font-size: 10.5px; margin-inline-start: 6px; vertical-align: middle; }
.cr-pad { padding: 8px 12px; margin: 0; }
.cr-side-h { font-size: 13px; font-weight: 600; margin: 8px 0 4px; color: var(--muted); }
.cr-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.cr-inline .field { margin: 0; }
.cr-inline input[type="datetime-local"] { min-width: 0; flex: 1 1 170px; }
.cr-facts { display: grid; gap: 4px; }
.cr-facts > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border-bottom: 1px dotted var(--border); }
.cr-facts > div > span:first-child { color: var(--muted); }
.cr-facts > div > :last-child { text-align: end; }
.cr-checks { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 24px; margin: 4px 0; }
.cr-requests { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--amber-bg); color: var(--amber-fg); }
.cr-warn { color: var(--amber-fg); }
.cr-plate-big { font-size: 18px; letter-spacing: .5px; margin-inline-end: 8px; }

/* segmented buttons (14 / 30 days, earlier / today / later, vehicles / groups, find / new driver) */
.cr-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.cr-seg button {
    font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--text); padding: 7px 12px; cursor: pointer; display: inline-flex;
    align-items: center; gap: 4px; min-height: 36px;
}
.cr-seg button + button { border-inline-start: 1px solid var(--border); }
.cr-seg button:hover { background: var(--row-line); }
.cr-seg button.on { background: var(--primary); color: #fff; font-weight: 600; }
.cr-seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.cr-kind { margin-bottom: 8px; }

/* quick filters and active filter chips */
.cr-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-quick .chip { cursor: pointer; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 12.5px; min-height: 30px; }
.cr-quick .chip:hover { border-color: var(--primary); }
.cr-quick .chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.cr-active-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-chip-x { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; margin-inline-start: 2px; display: inline-flex; line-height: 1; }
.cr-chip-x:hover { opacity: .7; }
.cr-list-sum { padding: 4px 8px 8px; margin: 0; text-align: end; }
.cr-merge-btns { white-space: nowrap; }
.cr-merge-btns > * + * { margin-inline-start: 6px; }

/* ------------------------------------------------------------------------------------------------ timeline (CarTimeline) */
.cr-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.cr-timeline li { position: relative; display: flex; gap: 12px; padding: 0 0 14px; }
.cr-timeline li::before { content: ""; position: absolute; inset-inline-start: 5px; inset-block: 14px 0; width: 2px; background: var(--row-line); }
.cr-timeline li:last-child::before { display: none; }
.cr-tl-dot { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--gray-fg); box-shadow: 0 0 0 3px var(--surface); position: relative; z-index: 1; }
.cr-tl-good .cr-tl-dot { background: var(--green-fg); }
.cr-tl-bad .cr-tl-dot { background: var(--red-fg); }
.cr-tl-info .cr-tl-dot { background: var(--blue-fg); }
.cr-tl-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.cr-tl-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }

/* ------------------------------------------------------------------------------------------------ availability board page */
.cr-legend { flex-wrap: wrap; gap: 6px 14px; }
.cr-section .cr-legend, section > .cr-legend { padding: 8px 12px; }
.cr-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); }
.cr-key i {
    display: inline-block; width: 18px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--bc, var(--gray-fg)) 22%, var(--surface));
    border-inline-start: 3px solid var(--bc, var(--gray-fg));
}
.cr-key.cr-st-hold i { background-image: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--bc) 25%, transparent) 4px 6px); }
.cr-key.cr-k-workshop i { border: 0; background: repeating-linear-gradient(135deg, var(--red-bg) 0 4px, color-mix(in srgb, var(--red-fg) 35%, var(--surface)) 4px 6px); }
.cr-key-now i { width: 3px; border: 0; background: var(--red-fg); }
.cr-key.cr-heat-good i { border: 0; background: var(--green-bg); }
.cr-key.cr-heat-low i { border: 0; background: var(--amber-bg); }
.cr-key.cr-heat-zero i { border: 0; background: var(--gray-bg); }
.cr-key.cr-heat-neg i { border: 0; background: var(--red-bg); }

.cr-board-layout { flex-wrap: wrap; }
.cr-board-card { padding: 0; overflow: hidden; flex-basis: 640px; }
.cr-board-side { position: sticky; top: 12px; }
.cr-board-note { padding: 8px 12px; margin: 0; border-top: 1px solid var(--row-line); }
.cr-tips { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 6px; }

/* groups × days counts */
.cr-heat th[scope="row"] { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; min-width: 130px; text-align: start; }
.cr-heat thead th { font-size: 11.5px; line-height: 1.2; white-space: nowrap; }
.cr-heat th.cr-weekend, .cr-heat td.cr-weekend { box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--gray-bg) 45%, transparent); }
.cr-heat th.cr-today { color: var(--red-fg); }
.cr-heat .cr-past { opacity: .6; }
.cr-heat-cell { font-family: var(--mono); font-weight: 600; padding: 0 !important; min-width: 38px; }
.cr-heat-cell > a, .cr-heat-cell > span { display: block; padding: 8px 4px; color: inherit; text-decoration: none; text-align: center; }
.cr-heat-cell > a:hover { box-shadow: inset 0 0 0 2px var(--primary); }
.cr-heat-cell > a:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
td.cr-heat-good { background: var(--green-bg); color: var(--green-fg); }
td.cr-heat-low { background: var(--amber-bg); color: var(--amber-fg); }
td.cr-heat-zero { background: var(--gray-bg); color: var(--muted); }
td.cr-heat-neg { background: var(--red-bg); color: var(--red-fg); }

/* ------------------------------------------------------------------------------------------------ the Gantt (CarBoardChart)
   Rows: label column (sticky) + day columns of width --day. Bars sit in .cr-lane at --s (days from the first column, fractions = hours) for --n days. */
.cr-gantt-scroll { overflow: auto; max-height: calc(100vh - 240px); min-height: 280px; position: relative; overscroll-behavior: contain; }
.cr-gantt { --day: 46px; --label: 170px; --rowh: 34px; width: max-content; min-width: 100%; font-size: 12.5px; position: relative; }
.cr-gantt.cr-wide { --day: 36px; }
.cr-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--row-line); min-height: var(--rowh); }
.cr-label {
    flex: 0 0 var(--label); width: var(--label); position: sticky; inset-inline-start: 0; z-index: 3; background: var(--surface);
    border-inline-end: 1px solid var(--border); padding: 4px 8px; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden;
}
.cr-days { display: grid; grid-template-columns: repeat(var(--days), var(--day)); }
.cr-head { position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--border); }
.cr-head .cr-label { z-index: 5; }
.cr-corner { font-weight: 600; color: var(--muted); font-size: 12px; }
.cr-dayhead {
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 0; line-height: 1.15; position: relative;
    border-inline-start: 1px solid var(--row-line); font-size: 11.5px;
}
.cr-dayhead strong { font-size: 13px; font-family: var(--mono); }
.cr-dow { color: var(--muted); font-size: 10.5px; }
.cr-mon { position: absolute; inset-block-start: 1px; inset-inline-start: 3px; font-size: 9.5px; color: var(--primary); font-weight: 600; text-transform: uppercase; }
.cr-dayhead.cr-weekend, .cr-free.cr-weekend { background: color-mix(in srgb, var(--gray-bg) 70%, transparent); }
.cr-dayhead.cr-today { background: var(--red-bg); color: var(--red-fg); }
.cr-dayhead.cr-today .cr-dow { color: inherit; }
.cr-dayhead.cr-past, .cr-free.cr-past { opacity: .6; }

/* group row: code, name and cars still free per day */
.cr-grouprow { background: var(--gray-bg); }
.cr-grouprow .cr-label { background: var(--gray-bg); }
.cr-groupname { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cr-free {
    display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--green-fg);
    border-inline-start: 1px solid var(--row-line);
}
.cr-free.zero { color: var(--muted); font-weight: 500; }
.cr-free.neg { color: var(--red-fg); background: var(--red-bg); }

/* vehicle rows */
.cr-plate { font-weight: 600; white-space: nowrap; }
.cr-model { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cr-stcode { font-size: 10.5px; margin-inline-start: auto; font-family: var(--mono); }
.cr-vst { font-size: 9.5px; font-weight: 700; padding: 1px 4px; border-radius: 4px; background: var(--gray-bg); color: var(--gray-fg); white-space: nowrap; }
.cr-vst-available { background: var(--green-bg); color: var(--green-fg); }
.cr-vst-reserved, .cr-vst-intransfer { background: var(--blue-bg); color: var(--blue-fg); }
.cr-vst-onrent { background: var(--amber-bg); color: var(--amber-fg); }
.cr-vst-inservice, .cr-vst-outofservice { background: var(--red-bg); color: var(--red-fg); }

.cr-lane {
    position: relative; width: calc(var(--days) * var(--day)); flex: none; min-height: var(--rowh);
    background-image: linear-gradient(to right, var(--row-line) 1px, transparent 1px); background-size: var(--day) 100%;
}
[dir="rtl"] .cr-lane { background-image: linear-gradient(to left, var(--row-line) 1px, transparent 1px); background-position: right top; }
.cr-wkd, .cr-now { position: absolute; inset-block: 0; inset-inline-start: calc(var(--s) * var(--day)); }
.cr-wkd { width: var(--day); background: color-mix(in srgb, var(--gray-bg) 55%, transparent); pointer-events: none; }
.cr-now { width: 0; border-inline-start: 2px solid var(--red-fg); pointer-events: none; z-index: 2; }

/* the not-assigned lane of a group */
.cr-unassigned-row .cr-label { background: color-mix(in srgb, var(--amber-bg) 50%, var(--surface)); }
.cr-unassigned-label { color: var(--amber-fg); font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.cr-lane-unassigned { background-color: color-mix(in srgb, var(--amber-bg) 30%, transparent); }

/* bars */
.cr-bar {
    --bc: var(--primary);
    position: absolute; z-index: 3; inset-block: 4px; inset-inline-start: calc(var(--s) * var(--day) + 1px); width: calc(var(--n) * var(--day) - 2px); min-width: 8px;
    display: flex; align-items: center; gap: 6px; padding: 0 10px 0 6px; margin: 0; overflow: hidden;
    font: inherit; font-size: 12px; text-align: start; color: var(--text); cursor: grab; touch-action: manipulation; user-select: none;
    background: color-mix(in srgb, var(--bc) 20%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bc) 45%, var(--surface));
    border-inline-start: 4px solid var(--bc); border-radius: 6px;
}
.cr-bar:hover { background-color: color-mix(in srgb, var(--bc) 30%, var(--surface)); }
.cr-bar:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; z-index: 6; }
.cr-bar[data-lock] { cursor: pointer; }
.cr-bar-text { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.cr-bar-meta { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 0; }
.cr-bar.cr-st-hold { background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--amber-fg) 14%, transparent) 6px 9px); }
.cr-bar.cr-k-workshop, .cr-bar.cr-k-oos {
    border-style: solid; color: var(--red-fg);
    background: repeating-linear-gradient(135deg, var(--red-bg) 0 6px, color-mix(in srgb, var(--red-fg) 18%, var(--surface)) 6px 9px);
}
.cr-bar.cr-k-transfer { border-style: dashed; border-inline-start-style: solid; }
.cr-bar.cr-ct-returned, .cr-bar.cr-ct-closed { opacity: .7; }
.cr-bar.cr-late { box-shadow: inset 0 -3px 0 var(--red-fg); }
.cr-bar.cr-clip-s { border-start-start-radius: 0; border-end-start-radius: 0; }
.cr-bar.cr-clip-e { border-start-end-radius: 0; border-end-end-radius: 0; }
.cr-bar.cr-clash { box-shadow: 0 0 0 2px var(--red-fg); }
.cr-bar.cr-selected { box-shadow: 0 0 0 2px var(--text), 0 2px 8px rgba(0, 0, 0, .18); z-index: 5; }
.cr-handle {
    position: absolute; inset-block: 0; inset-inline-end: 0; width: 10px; cursor: ew-resize; touch-action: none;
    background: linear-gradient(to right, transparent 3px, color-mix(in srgb, var(--bc) 60%, transparent) 3px 4px, transparent 4px 6px, color-mix(in srgb, var(--bc) 60%, transparent) 6px 7px, transparent 7px);
    opacity: .55;
}
.cr-bar:hover .cr-handle, .cr-bar:focus-visible .cr-handle, .cr-bar.cr-selected .cr-handle { opacity: 1; }

/* drag & drop states (rental-chart.js) */
.cr-is-dragging, .cr-is-dragging * { cursor: grabbing !important; user-select: none; }
.cr-bar.cr-dragging { opacity: .45; }
.cr-handle:active, .cr-is-dragging .cr-handle { cursor: ew-resize !important; }
/* the copy that follows the pointer: positioned by rental-chart.js with inline left / top / width / height */
.cr-bar.cr-ghost {
    position: fixed; inset-inline-start: auto; inset-inline-end: auto; inset-block-end: auto; z-index: 1000; pointer-events: none; opacity: .92; margin: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22); transform: rotate(-1deg); font-size: 12px;
}
[dir="rtl"] .cr-bar.cr-ghost { transform: rotate(1deg); }
.cr-lane.cr-drop-ok { background-color: color-mix(in srgb, var(--green-bg) 75%, transparent); box-shadow: inset 0 0 0 2px var(--green-fg); }
.cr-lane.cr-drop-bad { background-color: color-mix(in srgb, var(--red-bg) 60%, transparent); cursor: not-allowed; }

/* ------------------------------------------------------------------------------------------------ reservation screen */
.cr-totals { display: flex; flex-direction: column; gap: 2px; }
.cr-totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.cr-totals .num { font-family: var(--mono); white-space: nowrap; }
.cr-total { border-top: 1px solid var(--border); font-weight: 700; padding-top: 6px !important; }
.cr-paylist, .cr-msglist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cr-paylist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--border); }
.cr-paylist li > span:first-child { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.cr-msglist li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px dotted var(--border); overflow-wrap: anywhere; }
.cr-msglist li:last-child, .cr-paylist li:last-child { border-bottom: 0; }
.cr-preview {
    display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--row-line);
    min-height: 42px; margin-top: 4px;
}
.cr-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-bottom: 8px; }
.cr-option {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); cursor: pointer; margin: 0;
}
.cr-option.check { justify-content: flex-start; }
.cr-option > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-option input[type="number"] { width: 64px; flex: none; }
.cr-option:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.cr-option-desc { display: block; }
.cr-carpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 55vh; overflow: auto; padding: 2px; }
.cr-carbtn {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: start;
}
.cr-carbtn:hover { border-color: var(--primary); }
.cr-carbtn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.cr-carbtn.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.cr-carbtn strong { font-size: 15px; }
.cr-carbtn-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* printable confirmation letter */
.cr-confirm { font-size: 12px; color: #000; }
.cr-confirm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 14px; }
.cr-confirm-head h1 { font-size: 20px; margin: 0 0 4px; }
.cr-confirm-title { text-align: end; }
.cr-confirm-title h2 { font-size: 16px; margin: 0 0 4px; }
.cr-confirm .doc-facts { margin: 12px 0; }
.cr-confirm-terms { margin-top: 14px; border-top: 1px solid #999; padding-top: 8px; white-space: pre-line; }
.cr-confirm-terms h3 { font-size: 12px; margin: 0 0 4px; }

/* ------------------------------------------------------------------------------------------------ new reservation wizard */
.cr-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.cr-steps li { flex: 1 1 130px; }
.cr-steps button {
    width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: start;
}
.cr-steps button:disabled { cursor: default; opacity: .65; }
.cr-steps li.on button { border-color: var(--primary); color: var(--text); font-weight: 600; box-shadow: inset 0 -3px 0 var(--primary); }
.cr-steps li.done button { color: var(--text); }
.cr-step-no {
    flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
    background: var(--gray-bg); color: var(--gray-fg);
}
.cr-steps li.on .cr-step-no { background: var(--primary); color: #fff; }
.cr-steps li.done .cr-step-no { background: var(--green-bg); color: var(--green-fg); }

.cr-offer { padding: 14px 12px; border-bottom: 1px solid var(--row-line); display: flex; flex-direction: column; gap: 10px; }
.cr-offer.cr-full { background: color-mix(in srgb, var(--red-bg) 25%, transparent); }
.cr-offer.cr-wanted { box-shadow: inset 4px 0 0 var(--primary); }
[dir="rtl"] .cr-offer.cr-wanted { box-shadow: inset -4px 0 0 var(--primary); }
.cr-offer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cr-quotes { display: flex; flex-direction: column; gap: 6px; }
.cr-quote {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 16px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.cr-quote:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.cr-quote.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cr-quote.off { opacity: .7; background: var(--row-line); }
.cr-quote-name, .cr-quote-price { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-quote-price { align-items: flex-end; text-align: end; }
.cr-quote-price strong { font-size: 16px; }

.cr-hits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 440px; overflow: auto; }
.cr-hits button {
    width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; font: inherit; color: var(--text); text-align: start;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
}
.cr-hits button:hover { border-color: var(--primary); }
.cr-hits button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.cr-hits button.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }

/* ------------------------------------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
    .cr-board-side { position: static; }
}
@media (max-width: 760px) {
    .cr-gantt { --day: 38px; --label: 104px; --rowh: 32px; font-size: 12px; }
    .cr-gantt.cr-wide { --day: 32px; }
    .cr-groupname, .cr-model, .cr-stcode { display: none; }
    .cr-gantt-scroll { max-height: 70vh; }
    .cr-bar { padding-inline: 5px 8px; }
    .cr-bar-meta { display: none; }
    .cr-quote { grid-template-columns: minmax(0, 1fr) auto; }
    .cr-quote > .btn, .cr-quote > .neg { grid-column: 1 / -1; justify-self: start; }
    .cr-confirm-head { flex-direction: column; }
    .cr-confirm-title { text-align: start; }
    .cr-steps li { flex-basis: calc(50% - 6px); }
    .cr-board-filters .field.compact { min-width: 0; flex: 1 1 140px; }
    .cr-board-filters .cr-seg button { padding-inline: 10px; }
    .cr-options, .cr-carpick { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .cr-ghost { transform: none; }
}
@media print {
    .cr-gantt-scroll { max-height: none; overflow: visible; }
    .cr-confirm { display: block; }
    .cr-confirm .doc-facts div { border-bottom-color: #bbb; }
}
