/* R14 car rental – rental-setup.css. Owner: SU – setup, rates, reports & dashboard. Every class in this file starts with "cs-". */

/* ---------- shared bits */
.cs-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; text-align: center; color: var(--muted); }
.cs-empty h2 { margin: 0; font-size: 17px; color: var(--text); }
.cs-empty p { margin: 0; max-width: 560px; }
.cs-empty .icon { color: var(--primary); }
.cs-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--blue-bg); color: var(--blue-fg); margin-bottom: 16px; }
.cs-banner.warn { background: var(--amber-bg); color: var(--amber-fg); }
.cs-banner > .grow { flex: 1 1 260px; }
.cs-name { display: flex; flex-direction: column; gap: 2px; }
.cs-name .muted { font-size: 12px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.cs-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--sw, var(--muted)); vertical-align: -1px; margin-inline-end: 6px;
    border: 1px solid var(--border); }
.cs-form-note { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.cs-section-title { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.cs-dialog-body { max-height: min(70vh, 760px); overflow-y: auto; padding-inline-end: 4px; }
.cs-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.cs-inline .field { min-width: 120px; }
.cs-mono { font-family: var(--mono); }
.cs-code { font-family: var(--mono); font-weight: 600; letter-spacing: .04em; }
.cs-num { font-variant-numeric: tabular-nums; }
.cs-cur { font-size: 11px; color: var(--muted); margin-inline-start: 3px; }
.cs-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cs-filter-chips button { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit;
    font-size: 13px; cursor: pointer; }
.cs-filter-chips button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* set-up checklist */
.cs-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.cs-steps li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.cs-steps li a { font-weight: 600; }
.cs-steps .cs-step-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
    background: var(--gray-bg); color: var(--gray-fg); font-size: 12px; font-weight: 700; }
.cs-steps li.done .cs-step-mark { background: var(--green-bg); color: var(--green-fg); }
.cs-steps .small { display: block; }

/* weekday toggles & pick lists */
.cs-weekdays { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-weekdays button { min-width: 48px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font: inherit; font-size: 13px; cursor: pointer; }
.cs-weekdays button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.cs-picklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; padding: 8px 10px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); max-height: 180px; overflow-y: auto; }
.cs-picklist-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }

/* ---------- stations: opening hours editor */
.cs-hours { display: grid; grid-template-columns: minmax(90px, 120px) auto 1fr; gap: 6px 10px; align-items: center; }
.cs-hours .cs-day { font-weight: 600; }
.cs-hours .cs-periods { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cs-hours input[type="time"] { width: 110px; }
.cs-hours .cs-sep { color: var(--muted); }
.cs-hours-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cs-hours-text { font-size: 12px; color: var(--muted); }
.cs-open-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-fg); margin-inline-end: 5px; }
.cs-open-dot.on { background: var(--green-fg); }

/* ---------- vehicle groups: ACRISS builder */
.cs-acriss { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cs-acriss-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 4px; }
.cs-acriss-code .cs-letters { display: inline-flex; gap: 3px; }
.cs-acriss-code .cs-letters span { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 34px; border-radius: var(--radius-sm);
    background: var(--blue-bg); color: var(--blue-fg); font-family: var(--mono); font-weight: 700; font-size: 18px; }
.cs-acriss-code .cs-letters span.bad { background: var(--red-bg); color: var(--red-fg); }
.cs-acriss-desc { font-size: 13px; color: var(--muted); }
.cs-group-card { display: flex; flex-direction: column; gap: 2px; }
.cs-specs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.cs-specs span { display: inline-flex; align-items: center; gap: 3px; }
.cs-rates { display: flex; flex-direction: column; gap: 1px; font-size: 12px; text-align: end; }
.cs-rates strong { font-size: 13px; }

/* ---------- makes & models */
.cs-split { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 16px; align-items: start; }
.cs-make-list { list-style: none; margin: 0; padding: 0; }
.cs-make-list li { border-bottom: 1px solid var(--row-line); }
.cs-make-list button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 0; background: transparent;
    color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.cs-make-list button:hover, .cs-make-list button:focus-visible { background: var(--gray-bg); outline: none; }
.cs-make-list li.active button { background: var(--blue-bg); color: var(--blue-fg); font-weight: 600; }
.cs-make-list .cs-make-tools { display: inline-flex; gap: 2px; }

/* ---------- one-way fee matrix */
.cs-matrix-wrap { overflow: auto; max-height: calc(100vh - 300px); border-top: 1px solid var(--border); }
table.cs-matrix { border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.cs-matrix th, table.cs-matrix td { border-bottom: 1px solid var(--row-line); border-inline-end: 1px solid var(--row-line); padding: 4px 6px; text-align: center; }
table.cs-matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); font-weight: 600; min-width: 96px; }
table.cs-matrix .cs-rowhead { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surface); text-align: start; min-width: 150px; font-weight: 600; }
table.cs-matrix thead .cs-rowhead { z-index: 3; }
table.cs-matrix td.same { background: var(--gray-bg); color: var(--muted); }
table.cs-matrix input { width: 88px; text-align: end; font-family: var(--mono); padding: 4px 6px; }
table.cs-matrix input.inherited { color: var(--muted); font-style: italic; }
table.cs-matrix td.changed input { box-shadow: inset 0 0 0 2px var(--amber-fg); }

/* ---------- rate calendar */
.cs-cal-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 12px; }
.cs-cal-toolbar .field { margin: 0; }
.cs-cal-nav { display: inline-flex; align-items: center; gap: 4px; }
.cs-cal-month { min-width: 150px; text-align: center; font-weight: 600; }
.cs-cal-wrap { overflow: auto; max-height: calc(100vh - 260px); min-height: 240px; border-top: 1px solid var(--border); }
table.cs-cal { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
table.cs-cal th, table.cs-cal td { border-bottom: 1px solid var(--row-line); border-inline-end: 1px solid var(--row-line); padding: 0; text-align: center; white-space: nowrap; }
table.cs-cal thead th { position: sticky; top: 0; z-index: 3; background: var(--surface); padding: 4px 2px; font-weight: 600; }
table.cs-cal thead tr.cs-season-row th { top: 38px; padding: 0; height: 16px; }
table.cs-cal .cs-rowhead { position: sticky; inset-inline-start: 0; z-index: 2; background: var(--surface); text-align: start; padding: 4px 10px; min-width: 180px;
    max-width: 240px; white-space: normal; }
table.cs-cal thead .cs-rowhead { z-index: 4; }
.cs-day { min-width: 60px; line-height: 1.2; }
.cs-day .cs-dow { display: block; font-size: 10px; font-weight: 500; color: var(--muted); }
.cs-day.we { background: var(--gray-bg) !important; }
.cs-day.today { box-shadow: inset 0 -3px 0 var(--primary); }
.cs-season { display: block; height: 100%; min-height: 14px; background: var(--sw, transparent); opacity: .55; }
.cs-group-row th.cs-rowhead { background: var(--gray-bg); }
.cs-group-row th.cs-rowhead strong { display: block; }
.cs-group-row td { background: var(--gray-bg); font-family: var(--mono); font-size: 12px; padding: 3px 2px; }
.cs-free.full { color: var(--amber-fg); background: var(--amber-bg) !important; font-weight: 700; }
.cs-free.over { color: var(--red-fg); background: var(--red-bg) !important; font-weight: 700; }
.cs-cellbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 100%; min-height: 40px; padding: 3px 2px; border: 0;
    background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.cs-cellbtn:hover:not(:disabled), .cs-cellbtn:focus-visible { background: var(--blue-bg); outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.cs-cellbtn:disabled { cursor: default; opacity: .55; }
.cs-cellbtn .cs-price { font-family: var(--mono); font-weight: 600; font-size: 12px; }
.cs-cellbtn.own { background: var(--blue-bg); }
.cs-cellbtn.own .cs-price { color: var(--blue-fg); }
.cs-cellbtn.inherit { background: var(--green-bg); }
.cs-cellbtn.stop { background: var(--red-bg); }
.cs-cellbtn.stop .cs-price { color: var(--red-fg); text-decoration: line-through; }
.cs-marks { display: flex; gap: 2px; justify-content: center; min-height: 12px; }
.cs-mark { font-size: 9px; line-height: 12px; padding: 0 3px; border-radius: 3px; background: var(--gray-bg); color: var(--gray-fg); font-weight: 700; }
.cs-mark.min, .cs-mark.ctp { background: var(--amber-bg); color: var(--amber-fg); }
.cs-mark.stop { background: var(--red-fg); color: #fff; }
.cs-plan-row th.cs-rowhead { font-weight: 400; }
.cs-plan-row td { font-family: var(--mono); color: var(--muted); padding: 4px 2px; }
.cs-plan-row td.stop { color: var(--red-fg); text-decoration: line-through; }
.cs-plan-head { display: flex; align-items: center; gap: 6px; }
.cs-plan-head .mono { font-weight: 600; }
.cs-plan-head .cs-derived { font-size: 10px; color: var(--muted); }
.cs-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 10px 14px; font-size: 12px; color: var(--muted); }
.cs-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cs-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--border); }
.cs-legend i.own { background: var(--blue-bg); } .cs-legend i.inherit { background: var(--green-bg); } .cs-legend i.stop { background: var(--red-bg); }
.cs-legend i.full { background: var(--amber-bg); }
.cs-cell-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 12px; }
.cs-cell-head strong { font-size: 15px; }

/* ---------- reports & dashboard */
a.cs-kpi-link { color: inherit; text-decoration: none; }
a.cs-kpi-link:hover .kpi-value, a.cs-kpi-link:focus-visible .kpi-value { color: var(--primary); }
.cs-kpi-of { font-size: 15px; color: var(--muted); font-weight: 500; }
.cs-delta { font-size: 12px; font-weight: 600; }
.cs-delta.up { color: var(--green-fg); } .cs-delta.down { color: var(--red-fg); }
.cs-meter { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--gray-bg); vertical-align: middle; margin-inline-end: 6px; overflow: hidden; }
.cs-meter > span { display: block; height: 100%; background: var(--series-1); }
.cs-meter.warn > span { background: var(--amber-fg); } .cs-meter.bad > span { background: var(--red-fg); }
table.grid tr.cs-total td, table.grid tr.cs-total th { font-weight: 700; border-top: 2px solid var(--border); }
.cs-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.cs-card-pad { padding: 12px 16px 0; }
.cs-kpis-gap { margin-top: 16px; }
.cs-attention { list-style: none; margin: 0; padding: 0; }
.cs-attention li { border-bottom: 1px solid var(--row-line); }
.cs-attention li:last-child { border-bottom: 0; }
.cs-attention a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; color: var(--text); text-decoration: none; }
.cs-attention a:hover span.grow, .cs-attention a:focus-visible span.grow { color: var(--primary); }
.cs-attention .grow { flex: 1; min-width: 0; }
.cs-allclear { display: flex; align-items: center; gap: 8px; color: var(--green-fg); margin: 4px 0; }
.cs-late { color: var(--red-fg); font-weight: 600; }
.cs-move-time { font-family: var(--mono); font-weight: 600; }

/* 14-day availability strip */
.cs-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; align-items: end; }
.cs-strip a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text); text-decoration: none; font-size: 11px; min-width: 0; }
.cs-strip .cs-bar { position: relative; width: 100%; max-width: 34px; height: 84px; border-radius: 4px; background: var(--gray-bg); overflow: hidden; }
.cs-strip .cs-bar > span { position: absolute; inset-inline: 0; bottom: 0; background: var(--series-1); }
.cs-strip .cs-bar.full > span { background: var(--amber-fg); }
.cs-strip .cs-bar.over > span { background: var(--red-fg); }
.cs-strip .cs-dow { color: var(--muted); }
.cs-strip .cs-free { font-family: var(--mono); font-weight: 600; }
.cs-strip .cs-free.over { color: var(--red-fg); }
.cs-strip a.today .cs-dow { color: var(--primary); font-weight: 700; }

/* settings: set-up shortcuts & numbering */
.cs-setup-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 8px; }
.cs-setup-links a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); text-decoration: none; background: var(--surface); }
.cs-setup-links a:hover, .cs-setup-links a:focus-visible { border-color: var(--primary); }
.cs-setup-links .grow { flex: 1; min-width: 0; }
.cs-setup-warn { margin: 12px 0 0; padding-inline-start: 20px; color: var(--amber-fg); }
.cs-setup-warn a { color: inherit; }
table.cs-series input { width: 110px; font-family: var(--mono); text-transform: uppercase; }

@media print {
    .cs-cal-wrap, .cs-matrix-wrap { max-height: none; overflow: visible; }
    .cs-no-print { display: none !important; }
}
@media (max-width: 900px) {
    .cs-split { grid-template-columns: 1fr; }
    .cs-acriss { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    table.cs-cal .cs-rowhead { min-width: 110px; max-width: 130px; padding: 4px 6px; }
    .cs-day { min-width: 54px; }
    .cs-cal-wrap { max-height: calc(100vh - 200px); }
    .cs-cal-month { min-width: 110px; }
    .cs-hours { grid-template-columns: 1fr auto; }
    .cs-hours .cs-periods { grid-column: 1 / -1; }
    .cs-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 10px; }
    table.cs-matrix .cs-rowhead { min-width: 110px; }
}
