/*
 * dackhotell.css — what admin/shared/css/page.css lacks for the tire hotel's panel pages (admin/dackhotell/; round 41, owner-notes 77b(2)):
 * the counter's computer first (a big screen, the rail at the side), still fine on a tablet (the rail a row of tabs, the chosen
 * set a drawer). Colours from page.css's tokens and its colour classes; logical properties, so Arabic mirrors; no rule here is
 * set from a script but by a class or an attribute.
 */

/* ---- the page on its own (hantera.html has no shell): the panel's box model, background and font ---- */
.dh-body, .dh-body *, .dh-body *::before, .dh-body *::after { box-sizing: border-box; }
.dh-body { margin: 0; min-height: 100vh; background: var(--bg-main, var(--bg)); color: var(--pg-text); font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.pg-page.dh-wide { max-width: 1680px; }
/* the hidden attribute wins over every display this file sets (a rail button, a row of buttons, a choice in a segment) */
[class*="dh-"][hidden], .dh-seg label[hidden] { display: none !important; }
.dh-muted { color: var(--pg-muted); }
.dh-strong { font-weight: 800; color: var(--pg-text); }
.dh-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dh-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }
.dh-plate { display: inline-block; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--pg-line-hi); background: var(--pg-inner); font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.dh-stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dh-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dh-row.end { justify-content: flex-end; }
.dh-gap { margin-block-start: 14px; }
.dh-h3 { margin: 0 0 10px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--pg-muted); }
.dh-list-plain { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 4px; }

/* ---- the rail beside the work, a row of tabs on a tablet ---- */
.dh-app { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
.dh-rail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 20px; background: var(--pg-surface); border: 1px solid var(--pg-line); box-shadow: var(--pg-lift); }
.dh-rail-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--pg-muted); font: inherit; font-size: 15px; font-weight: 800; text-align: start; cursor: pointer; text-decoration: none; }
.dh-rail-btn svg { width: 20px; height: 20px; flex: none; }
.dh-rail-btn:hover { color: var(--pg-text); background: rgba(99, 102, 241, .08); }
.dh-rail-btn[aria-current="page"] { color: var(--pg-text); background: rgba(99, 102, 241, .16); box-shadow: inset 3px 0 0 #6366f1; }
[dir="rtl"] .dh-rail-btn[aria-current="page"] { box-shadow: inset -3px 0 0 #6366f1; }
.dh-rail-btn .pg-count { margin-inline-start: auto; padding: 1px 8px; border-radius: 999px; font-size: 13px; background: rgba(245, 158, 11, .18); color: var(--orange); }
.dh-rail-foot { margin-block-start: 8px; padding: 12px 10px 4px; border-block-start: 1px solid var(--pg-line); display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--pg-muted); }
.dh-view { min-width: 0; }
@media (max-width: 1100px) {
  .dh-app { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .dh-rail { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 6px; border-radius: 16px; }
  .dh-rail::-webkit-scrollbar { display: none; }
  .dh-rail-btn { width: auto; flex: 0 0 auto; min-height: 42px; }
  .dh-rail-btn[aria-current="page"], [dir="rtl"] .dh-rail-btn[aria-current="page"] { box-shadow: inset 0 -3px 0 #6366f1; }
  .dh-rail-foot { display: none; }
}

/* ---- the capacity bar: an SVG whose rect's width is the used share ---- */
.dh-bar { display: block; width: 100%; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(148, 163, 184, .2); }
.dh-bar svg { display: block; width: 100%; height: 100%; }
.dh-bar rect { fill: #10b981; }
.dh-bar.warn rect { fill: #f59e0b; }
.dh-bar.full rect { fill: #ef4444; }
.dh-bar.thin { height: 6px; }
.dh-cap { display: flex; flex-direction: column; gap: 6px; min-width: 120px; }
.dh-cap-line { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--pg-muted); font-variant-numeric: tabular-nums; }

/* ---- a dense table: the counter's list ---- */
.pg-table.dense th { padding: 9px 12px !important; }
.pg-table.dense td { padding: 8px 12px !important; }
.pg-table tr.dh-pick { cursor: pointer; }
.pg-table tr.dh-pick:focus-visible td { outline: 2px solid #6366f1; outline-offset: -2px; }
.pg-table tr.is-on td { background: rgba(99, 102, 241, .14) !important; }
.pg-table td.dh-end, .pg-table th.dh-end { text-align: end !important; }

/* ---- the list beside the chosen set; a drawer from the side below 1280 px ---- */
.dh-split { display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 18px; align-items: start; }
.dh-split > .pg-card { margin: 0; }
.dh-detail { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.dh-detail-close { display: none; }
.dh-backdrop { display: none; }
@media (max-width: 1280px) {
  .dh-split { grid-template-columns: minmax(0, 1fr); }
  .dh-detail { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 1101; width: min(520px, 100vw); max-height: none; margin: 0; border-radius: 0; display: none; background: var(--card); box-shadow: -20px 0 50px rgba(0, 0, 0, .6); }
  [data-theme="light"] .dh-detail { background: #fff; box-shadow: -20px 0 50px rgba(15, 23, 42, .18); }
  .dh-detail.open { display: block; }
  .dh-detail-close { display: inline-flex; }
  .dh-backdrop.open { display: block; position: fixed; inset: 0; z-index: 1100; background: rgba(2, 6, 23, .55); }
}

/* ---- the four tread depths on a car seen from above, front up; the tab order fl, fr, rl, rr ---- */
.dh-treads { display: grid; grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr); grid-template-areas: "fl car fr" "rl car rr"; gap: 18px 20px; align-items: center; max-width: 560px; }
.dh-tread { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--pg-muted); }
.dh-tread.fl { grid-area: fl; align-items: flex-end; text-align: end; }
.dh-tread.fr { grid-area: fr; }
.dh-tread.rl { grid-area: rl; align-items: flex-end; text-align: end; }
.dh-tread.rr { grid-area: rr; }
.dh-mm { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: 15px; }
.dh-mm input { width: 92px; min-height: 52px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--pg-line-hi); background: var(--pg-field); color: var(--pg-text); font: inherit; font-size: 24px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.dh-mm input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .22); }
.dh-mm input.low { border-color: rgba(239, 68, 68, .75); box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); }
.dh-mm input.ok { border-color: rgba(16, 185, 129, .6); }
.dh-mm input.bad { border-color: #f59e0b; }
.dh-car { grid-area: car; width: 112px; height: 210px; }
.dh-car .body { fill: var(--pg-inner); stroke: var(--pg-line-hi); stroke-width: 2; }
.dh-car .glass { fill: rgba(99, 102, 241, .18); stroke: var(--pg-line-hi); stroke-width: 1.5; }
.dh-car .wheel { fill: #475569; transition: fill .2s ease; }
.dh-car .wheel.low { fill: #ef4444; }
.dh-car .wheel.ok { fill: #10b981; }
.dh-car .front { fill: var(--pg-muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.dh-law { margin: 8px 0 0; font-size: 14px; color: var(--pg-muted); }
@media (max-width: 640px) {
  .dh-treads { grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); gap: 12px; }
  .dh-car { width: 84px; height: 160px; }
  .dh-mm input { width: 76px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .dh-car .wheel { transition: none; } }

/* the same picture small, for a protocol in a list: four figures around a car */
.dh-mini { display: grid; grid-template-columns: auto 34px auto; grid-template-areas: "fl car fr" "rl car rr"; gap: 2px 10px; align-items: center; justify-content: start; font-size: 14px; }
.dh-mini > .fl { grid-area: fl; text-align: end; } .dh-mini > .fr { grid-area: fr; } .dh-mini > .rl { grid-area: rl; text-align: end; } .dh-mini > .rr { grid-area: rr; }
.dh-mini > svg { grid-area: car; width: 34px; height: 56px; }
.dh-mini .low { color: #fb7185; font-weight: 800; } .dh-mini .ok { color: var(--accent); font-weight: 700; }
[data-theme="light"] .dh-mini .low { color: #be123c; } [data-theme="light"] .dh-mini .ok { color: #047857; }

/* ---- a form in sections: the intake's and the swap's ---- */
.dh-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 0 14px; }
.dh-form-grid .wide { grid-column: 1 / -1; }
.dh-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--pg-inner); border: 1px solid var(--pg-line); }
.dh-seg label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: 9px; font-size: 14px; font-weight: 800; color: var(--pg-muted); cursor: pointer; text-transform: none; letter-spacing: 0; }
.dh-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.dh-seg label:has(input:checked) { background: var(--pg-surface); color: var(--pg-text); box-shadow: 0 2px 8px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .08); }
.dh-seg label:has(input:focus-visible) { outline: 2px solid #6366f1; outline-offset: 1px; }
.dh-step { display: flex; align-items: center; gap: 10px; }
.dh-step-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; flex: none; font-size: 14px; font-weight: 900; color: var(--primary); background: rgba(99, 102, 241, .16); border: 1px solid rgba(99, 102, 241, .35); }
.dh-big { font-size: 18px !important; font-weight: 800; letter-spacing: .04em; }
.dh-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 20px; border-block-start: 1px solid var(--pg-line); background: var(--pg-inner); }
.dh-foot .pg-form-msg { flex: 1 1 260px; margin-inline-end: auto; }
.dh-hint-list { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }

/* the server's price for the chosen rent: its lines and its sum, never added up in the page */
.dh-quote { padding: 12px 14px; border-radius: 14px; background: var(--pg-inner); border: 1px solid var(--pg-line); font-size: 14px; }
.dh-quote-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.dh-quote-sum { display: flex; justify-content: space-between; gap: 12px; margin-block-start: 6px; padding-block-start: 8px; border-block-start: 1px solid var(--pg-line); font-size: 16px; font-weight: 900; }

/* ---- the swap's scan field: big, focused, for a USB or handheld scanner's code + Enter ---- */
.dh-scan { display: flex; flex-wrap: wrap; gap: 10px; }
.dh-scan input { flex: 1 1 320px; min-height: 68px; padding: 10px 18px; border-radius: 16px; border: 2px solid rgba(99, 102, 241, .55); background: var(--pg-field); color: var(--pg-text); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 28px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.dh-scan input:focus { outline: none; border-color: #818cf8; box-shadow: 0 0 0 4px rgba(99, 102, 241, .25); }
.dh-scan .pg-btn { min-height: 68px; padding-inline: 22px; font-size: 16px; }
.dh-video { display: block; width: 100%; max-height: 340px; margin-block-start: 12px; border-radius: 16px; background: #000; object-fit: cover; }
.dh-found { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.dh-found > .pg-item.out { border-color: rgba(16, 185, 129, .45); }
.dh-found > .pg-item.in { border-color: rgba(59, 130, 246, .45); }
.dh-arrow { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.dh-arrow.out { color: var(--accent); } .dh-arrow.in { color: #60a5fa; }

/* ---- the walk-in's code to hand over, and the done card ---- */
.dh-code { display: inline-block; padding: 10px 18px; border-radius: 14px; border: 2px dashed rgba(99, 102, 241, .55); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 34px; font-weight: 800; letter-spacing: .14em; color: var(--pg-text); user-select: all; }
.dh-done { border-color: rgba(16, 185, 129, .45); }
.dh-done .pg-card-title { color: var(--accent); }
[data-theme="light"] .dh-done .pg-card-title { color: #047857; }

/* ---- photos: thumbnails, the add button and the big view ---- */
.dh-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.dh-photo { width: 92px; height: 92px; padding: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--pg-line); background: var(--pg-inner); cursor: zoom-in; }
.dh-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dh-photo img.missing { visibility: hidden; }
.dh-file { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.dh-big-photo { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 12px; }

/* ---- a protocol and a rent in the chosen set ---- */
.dh-proto { display: flex; flex-direction: column; gap: 8px; }
.dh-proto-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---- settings: the price grid, the add-ons, the rack places ---- */
.dh-grid-table input { width: 100%; min-width: 88px; min-height: 38px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--pg-line-hi); background: var(--pg-field); color: var(--pg-text); font: inherit; font-size: 15px; font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; }
.dh-grid-table input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .22); }
.dh-grid-table input.changed { border-color: #f59e0b; }
.dh-grid-table th[scope="row"] { color: var(--pg-text) !important; font-size: 14px !important; letter-spacing: 0 !important; }
.dh-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.dh-place { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--pg-inner); border: 1px solid var(--pg-line); }
.dh-place.used { border-color: rgba(59, 130, 246, .45); }
.dh-place.off { opacity: .6; }
.dh-place-label { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.dh-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- the business chooser ---- */
.dh-choose { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; padding: 16px 20px; }
.dh-choose .pg-item { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--pg-text); }
.dh-choose .pg-item:hover { border-color: rgba(99, 102, 241, .5); }

@media print { .dh-rail, .pg-head, .dh-backdrop { display: none !important; } }

/* ---- two cards side by side (the overview's lists); a folded card whose head opens it ---- */
.dh-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 18px; align-items: start; }
.dh-two > .pg-card { margin: 0; }
details.pg-card > summary { list-style: none; cursor: pointer; }
details.pg-card > summary::-webkit-details-marker { display: none; }
details.pg-card:not([open]) > summary { border-block-end: 0; }
.dh-studs { justify-content: flex-end; }
.dh-mini svg .mini-body { fill: var(--pg-inner); stroke: var(--pg-line-hi); stroke-width: 2; }
