/* =====================================================================================================================================
   R13 hotel – reservations, availability chart (tape chart), dashboard, guests and groups (slice RB). Prefix: hr-.
   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. */
.hr-st-hold { --bc: var(--amber-fg); }
.hr-st-tentative { --bc: var(--blue-fg); }
.hr-st-confirmed { --bc: var(--primary); }
.hr-st-checkedin { --bc: var(--green-fg); }
.hr-st-checkedout { --bc: var(--gray-fg); }
.hr-st-cancelled, .hr-st-noshow { --bc: var(--red-fg); }

.hr-by-source .hr-bar, .hr-key[class*="hr-so-"], .hr-src { --bc: var(--gray-fg); }
.hr-by-source .hr-so-direct, .hr-key.hr-so-direct, .hr-src-direct { --bc: var(--gray-fg); }
.hr-by-source .hr-so-web, .hr-key.hr-so-web, .hr-src-web { --bc: var(--primary); }
.hr-by-source .hr-so-bdc, .hr-key.hr-so-bdc, .hr-src-bdc { --bc: var(--blue-fg); }
.hr-by-source .hr-so-abnb, .hr-key.hr-so-abnb, .hr-src-abnb { --bc: var(--red-fg); }
.hr-by-source .hr-so-exp, .hr-key.hr-so-exp, .hr-src-exp { --bc: var(--amber-fg); }
.hr-by-source .hr-so-cm, .hr-key.hr-so-cm, .hr-src-cm { --bc: color-mix(in srgb, var(--blue-fg) 55%, var(--red-fg)); }
.hr-by-source .hr-so-grp, .hr-key.hr-so-grp, .hr-src-grp { --bc: var(--series-2); }
.hr-by-source .hr-so-corp, .hr-key.hr-so-corp, .hr-src-corp { --bc: var(--series-1); }
/* when coloured by status the status class wins over the source class */
.hr-by-status .hr-bar.hr-st-hold { --bc: var(--amber-fg); }
.hr-by-status .hr-bar.hr-st-tentative { --bc: var(--blue-fg); }
.hr-by-status .hr-bar.hr-st-confirmed { --bc: var(--primary); }
.hr-by-status .hr-bar.hr-st-checkedin { --bc: var(--green-fg); }
.hr-by-status .hr-bar.hr-st-checkedout { --bc: var(--gray-fg); }

/* the booking source next to a status chip */
.hr-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 */
.hr-mini { padding: 1px 6px; font-size: 10.5px; margin-inline-start: 6px; vertical-align: middle; }
.hr-pad { padding: 0 8px; margin: 0; }
.hr-side-h { font-size: 13px; font-weight: 600; margin: 4px 0 0; color: var(--muted); text-transform: none; }
.hr-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.hr-inline .field { margin: 0; }
.hr-inline input[type="date"] { min-width: 0; flex: 1 1 140px; }
.hr-facts { display: grid; gap: 4px; }
.hr-facts > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border-bottom: 1px dotted var(--border); }
.hr-facts > div > span:first-child { color: var(--muted); }
.hr-facts > div > :last-child { text-align: end; }
.hr-checks { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.hr-requests { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--amber-bg); color: var(--amber-fg); }

/* segmented buttons (14 / 30 days, earlier / today / later, find / new guest) */
.hr-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.hr-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;
}
.hr-seg button + button { border-inline-start: 1px solid var(--border); }
.hr-seg button:hover { background: var(--row-line); }
.hr-seg button.on { background: var(--primary); color: #fff; font-weight: 600; }
.hr-seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* active filter chips (from dashboard links) */
.hr-active-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.hr-chip-x { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; margin-inline-start: 2px; display: inline-flex; line-height: 1; }
.hr-chip-x:hover { opacity: .7; }
.hr-list-sum { padding: 4px 8px 8px; margin: 0; text-align: end; }

/* ------------------------------------------------------------------------------------------------ dashboard */
a.hr-kpi-link { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.hr-kpi-link:hover { border-color: var(--primary); box-shadow: 0 2px 10px color-mix(in srgb, var(--primary) 12%, transparent); }
a.hr-kpi-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hr-kpi-of { font-size: 16px; color: var(--muted); font-weight: 500; }
.hr-mtd { margin-top: 4px; }
.hr-mtd .kpi { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--radius-sm); background: var(--row-line); }
.hr-mtd .kpi-value { font-size: 20px; }

.hr-attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hr-attention li + li { border-top: 1px solid var(--row-line); }
.hr-attention a { display: flex; align-items: center; gap: 10px; padding: 9px 4px; color: var(--text); text-decoration: none; border-radius: var(--radius-sm); }
.hr-attention a:hover { background: var(--row-line); }
.hr-attention a > span { flex: 1 1 auto; }
.hr-attention a > .chip { min-width: 34px; justify-content: center; }
.hr-attention a > svg { color: var(--muted); flex: none; }
.hr-allclear { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--green-bg); color: var(--green-fg); }

/* occupancy strip (HtlOccupancyStrip) */
.hr-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; }
.hr-strip-day {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: var(--radius-sm); text-decoration: none;
    color: var(--text); font-size: 11.5px; min-width: 0;
}
.hr-strip-day:hover { background: var(--row-line); }
.hr-strip-day:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.hr-strip-day.hr-weekend { background: color-mix(in srgb, var(--gray-bg) 60%, transparent); }
.hr-strip-pct { font-family: var(--mono); font-weight: 600; font-size: 11px; }
.hr-strip-bar { position: relative; width: 70%; max-width: 26px; height: 80px; border-radius: 4px; background: var(--row-line); overflow: hidden; display: block; }
.hr-strip-bar > span { position: absolute; inset-inline: 0; inset-block-end: 0; display: block; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 2px; }
.hr-strip-low .hr-strip-bar > span { background: color-mix(in srgb, var(--primary) 55%, var(--surface)); }
.hr-strip-high .hr-strip-bar > span { background: var(--green-fg); }
.hr-strip-bad .hr-strip-bar > span { background: var(--red-fg); }
.hr-strip-date { text-align: center; color: var(--muted); line-height: 1.25; }
.hr-strip-free { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.hr-strip-free.neg { color: var(--red-fg); font-weight: 700; }

/* ------------------------------------------------------------------------------------------------ timeline (HtlTimeline) */
.hr-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.hr-timeline li { position: relative; display: flex; gap: 12px; padding: 0 0 14px; }
.hr-timeline li::before { content: ""; position: absolute; inset-inline-start: 5px; inset-block: 14px 0; width: 2px; background: var(--row-line); }
.hr-timeline li:last-child::before { display: none; }
.hr-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; }
.hr-tl-good .hr-tl-dot { background: var(--green-fg); }
.hr-tl-bad .hr-tl-dot { background: var(--red-fg); }
.hr-tl-info .hr-tl-dot { background: var(--blue-fg); }
.hr-tl-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.hr-tl-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }

/* ------------------------------------------------------------------------------------------------ availability chart page */
.hr-legend { flex-wrap: wrap; gap: 6px 14px; }
.hr-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); }
.hr-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));
}
.hr-key.hr-st-hold i { background-image: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--bc) 25%, transparent) 4px 6px); }
.hr-key.hr-st-tentative i { border: 1px dashed var(--bc); border-inline-start-width: 3px; }
.hr-key-ooo 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); }
.hr-key-now i { width: 3px; border: 0; background: var(--red-fg); }

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

/* ------------------------------------------------------------------------------------------------ the tape chart (HtlTapeChart)
   Rows: label column (sticky) + day columns of width --day. Bars sit in .hr-lane at --s (first column) for --n nights. */
.hr-tape-scroll { overflow: auto; max-height: calc(100vh - 230px); min-height: 280px; position: relative; overscroll-behavior: contain; }
.hr-tape { --day: 46px; --label: 150px; --rowh: 34px; width: max-content; min-width: 100%; font-size: 12.5px; position: relative; }
.hr-tape.hr-wide { --day: 36px; }
.hr-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--row-line); min-height: var(--rowh); }
.hr-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;
}
.hr-days { display: grid; grid-template-columns: repeat(var(--days), var(--day)); }
.hr-head { position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--border); }
.hr-head .hr-label { z-index: 5; }
.hr-corner { font-weight: 600; color: var(--muted); font-size: 12px; }
.hr-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;
}
.hr-dayhead strong { font-size: 13px; font-family: var(--mono); }
.hr-dow { color: var(--muted); font-size: 10.5px; }
.hr-mon { position: absolute; inset-block-start: 1px; inset-inline-start: 3px; font-size: 9.5px; color: var(--primary); font-weight: 600; text-transform: uppercase; }
.hr-dayhead.hr-weekend, .hr-free.hr-weekend { background: color-mix(in srgb, var(--gray-bg) 70%, transparent); }
.hr-dayhead.hr-today { background: var(--red-bg); color: var(--red-fg); }
.hr-dayhead.hr-today .hr-dow { color: inherit; }
.hr-dayhead.hr-past, .hr-free.hr-past { opacity: .6; }

/* unit type row: name + rooms still free per night */
.hr-typerow { background: var(--gray-bg); }
.hr-typerow .hr-label { background: var(--gray-bg); font-size: 12.5px; }
.hr-typename { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hr-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);
}
.hr-free.zero { color: var(--muted); font-weight: 500; }
.hr-free.neg { color: var(--red-fg); background: var(--red-bg); }

/* room rows */
.hr-unitcode { font-weight: 600; }
.hr-floor { font-size: 11px; margin-inline-start: auto; }
.hr-hk { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: var(--gray-bg); color: var(--gray-fg); }
.hr-hk-clean { background: var(--green-bg); color: var(--green-fg); }
.hr-hk-dirty { background: var(--amber-bg); color: var(--amber-fg); }
.hr-hk-inspected { background: var(--blue-bg); color: var(--blue-fg); }
.hr-hk-outoforder { background: var(--red-bg); color: var(--red-fg); }

.hr-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"] .hr-lane { background-image: linear-gradient(to left, var(--row-line) 1px, transparent 1px); background-position: right top; }
.hr-wkd, .hr-now, .hr-ooo { position: absolute; inset-block: 0; inset-inline-start: calc(var(--s) * var(--day)); }
.hr-wkd { width: var(--day); background: color-mix(in srgb, var(--gray-bg) 55%, transparent); pointer-events: none; }
.hr-now { width: var(--day); background: color-mix(in srgb, var(--red-bg) 45%, transparent); border-inline-start: 2px solid var(--red-fg); pointer-events: none; z-index: 2; }
.hr-ooo {
    width: calc(var(--n) * var(--day)); z-index: 1; display: flex; align-items: center; padding-inline: 6px; overflow: hidden; white-space: nowrap;
    font-size: 10.5px; font-weight: 600; color: var(--red-fg); text-overflow: ellipsis;
    background: repeating-linear-gradient(135deg, var(--red-bg) 0 6px, color-mix(in srgb, var(--red-fg) 22%, var(--surface)) 6px 9px);
}

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

/* stay bars */
.hr-bar {
    --bc: var(--primary);
    position: absolute; z-index: 3; inset-block: 4px; inset-inline-start: calc(var(--s) * var(--day) + 2px); width: calc(var(--n) * var(--day) - 4px);
    display: flex; align-items: center; gap: 6px; padding: 0 10px 0 7px; margin: 0; min-width: 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;
}
.hr-bar:hover { background: color-mix(in srgb, var(--bc) 30%, var(--surface)); }
.hr-bar:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; z-index: 6; }
.hr-bar[data-lock] { cursor: pointer; }
.hr-bar-text { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.hr-bar-meta { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 0; }
.hr-st-hold.hr-bar, .hr-by-source .hr-bar.hr-st-hold {
    background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--amber-fg) 14%, transparent) 6px 9px);
}
.hr-bar.hr-st-tentative { border-style: dashed; border-inline-start-style: solid; }
.hr-bar.hr-st-checkedout { opacity: .75; }
.hr-bar.hr-clip-s { border-start-start-radius: 0; border-end-start-radius: 0; inset-inline-start: calc(var(--s) * var(--day)); width: calc(var(--n) * var(--day) - 2px); }
.hr-bar.hr-clip-e { border-start-end-radius: 0; border-end-end-radius: 0; width: calc(var(--n) * var(--day) - 2px); }
.hr-bar.hr-clip-s.hr-clip-e { width: calc(var(--n) * var(--day)); }
.hr-bar.hr-clash { box-shadow: 0 0 0 2px var(--red-fg); }
.hr-bar.hr-selected { box-shadow: 0 0 0 2px var(--text), 0 2px 8px rgba(0, 0, 0, .18); z-index: 5; }
.hr-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;
}
.hr-bar:hover .hr-handle, .hr-bar:focus-visible .hr-handle, .hr-bar.hr-selected .hr-handle { opacity: 1; }

/* drag & drop states (hotel-chart.js) */
.hr-is-dragging, .hr-is-dragging * { cursor: grabbing !important; user-select: none; }
.hr-bar.hr-dragging { opacity: .45; }
.hr-handle:active, .hr-is-dragging .hr-handle { cursor: ew-resize !important; }
/* the copy that follows the pointer: positioned by hotel-chart.js with inline left / top / width / height */
.hr-bar.hr-ghost, .hr-bar.hr-ghost.hr-clip-s {
    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"] .hr-bar.hr-ghost { transform: rotate(1deg); }
.hr-lane.hr-drop-ok { background-color: color-mix(in srgb, var(--green-bg) 75%, transparent); box-shadow: inset 0 0 0 2px var(--green-fg); }
.hr-lane.hr-drop-bad { background-color: color-mix(in srgb, var(--red-bg) 60%, transparent); cursor: not-allowed; }

/* ------------------------------------------------------------------------------------------------ reservation screen */
.hr-totals { display: flex; flex-direction: column; gap: 2px; }
.hr-totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.hr-totals .num { font-family: var(--mono); }
.hr-total { border-top: 1px solid var(--border); font-weight: 700; padding-top: 6px !important; }
.hr-paylist, .hr-msglist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hr-paylist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--border); }
.hr-paylist li > span:first-child { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.hr-msglist li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px dotted var(--border); overflow-wrap: anywhere; }
.hr-msglist li:last-child, .hr-paylist li:last-child { border-bottom: 0; }
tr.hr-released td { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
tr.hr-released td .chip { text-decoration: none; }
.hr-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;
}
.hr-unitpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; max-height: 50vh; overflow: auto; padding: 2px; }
.hr-unitbtn {
    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;
}
.hr-unitbtn:hover { border-color: var(--primary); }
.hr-unitbtn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.hr-unitbtn.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.hr-unitbtn strong { font-size: 15px; }

/* printable confirmation letter */
.hr-confirm { font-size: 12px; color: #000; }
.hr-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; }
.hr-confirm-head h1 { font-size: 20px; margin: 0 0 4px; }
.hr-confirm-title { text-align: end; }
.hr-confirm-title h2 { font-size: 16px; margin: 0 0 4px; }
.hr-confirm .doc-facts { margin: 12px 0; }
.hr-confirm-terms { margin-top: 14px; border-top: 1px solid #999; padding-top: 8px; white-space: pre-line; }
.hr-confirm-terms h3 { font-size: 12px; margin: 0 0 4px; }

/* ------------------------------------------------------------------------------------------------ new reservation wizard */
.hr-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: none; }
.hr-steps li { flex: 1 1 140px; }
.hr-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;
}
.hr-steps button:disabled { cursor: default; opacity: .65; }
.hr-steps li.on button { border-color: var(--primary); color: var(--text); font-weight: 600; box-shadow: inset 0 -3px 0 var(--primary); }
.hr-steps li.done button { color: var(--text); }
.hr-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);
}
.hr-steps li.on .hr-step-no { background: var(--primary); color: #fff; }
.hr-steps li.done .hr-step-no { background: var(--green-bg); color: var(--green-fg); }

.hr-type-offer { padding: 14px 12px; border-bottom: 1px solid var(--row-line); display: flex; flex-direction: column; gap: 10px; }
.hr-type-offer:last-child { border-bottom: 0; }
.hr-type-offer.hr-full { background: color-mix(in srgb, var(--red-bg) 25%, transparent); }
.hr-type-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hr-quotes { display: flex; flex-direction: column; gap: 6px; }
.hr-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);
}
.hr-quote:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.hr-quote.off { opacity: .7; background: var(--row-line); }
.hr-quote-name, .hr-quote-price { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hr-quote-price { align-items: flex-end; text-align: end; }
.hr-quote-price strong { font-size: 16px; }

.hr-cart { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hr-cart li {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px dotted var(--border);
}
.hr-cart li .num { font-family: var(--mono); font-weight: 600; }
.hr-cart-qty { display: inline-flex; align-items: center; gap: 4px; }
.hr-cart-qty input { width: 64px; }
.hr-agreed { grid-column: 1 / -1; min-width: 0 !important; }
.hr-guesthits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.hr-guesthits 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;
}
.hr-guesthits button:hover { border-color: var(--primary); }
.hr-guesthits button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.hr-guesthits 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)); }

/* ------------------------------------------------------------------------------------------------ guests & groups */
.hr-merge-btns { white-space: nowrap; }
.hr-merge-btns > * + * { margin-inline-start: 6px; }
.hr-blocks th[scope="row"] { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; min-width: 110px; text-align: start; }
.hr-blocks th.hr-weekend { background: color-mix(in srgb, var(--gray-bg) 70%, transparent); }
.hr-blocks td { vertical-align: top; }
.hr-block-in { width: 58px; text-align: center; font-family: var(--mono); padding: 4px; }
.hr-price-in { width: 104px; font-family: var(--mono); padding: 4px 6px; }
.hr-paste summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 13px; }
.hr-paste[open] { display: flex; flex-direction: column; gap: 8px; }
.hr-paste textarea { width: 100%; font-family: var(--mono); font-size: 12px; }

/* ------------------------------------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
    .hr-chart-side { position: static; }
}
@media (max-width: 760px) {
    .hr-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 8px; }
    .hr-strip-bar { height: 56px; }
    .hr-tape { --day: 38px; --label: 92px; --rowh: 32px; font-size: 12px; }
    .hr-tape.hr-wide { --day: 32px; }
    .hr-typename, .hr-floor { display: none; }
    .hr-tape-scroll { max-height: 70vh; }
    .hr-bar { padding-inline: 5px 8px; }
    .hr-bar-meta { display: none; }
    .hr-quote { grid-template-columns: minmax(0, 1fr) auto; }
    .hr-quote > .btn, .hr-quote > .neg { grid-column: 1 / -1; justify-self: start; }
    .hr-confirm-head { flex-direction: column; }
    .hr-confirm-title { text-align: start; }
    .hr-steps li { flex-basis: calc(50% - 6px); }
    .filters .field.compact { min-width: 0; flex: 1 1 140px; }
    .hr-chart-filters .hr-seg button { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    a.hr-kpi-link, .hr-ghost { transition: none; transform: none; }
}
@media print {
    .hr-tape-scroll { max-height: none; overflow: visible; }
    .hr-confirm { display: block; }
    .hr-confirm .doc-facts div { border-bottom-color: #bbb; }
}
