/* ==========================================================================================
   HOTELLIX template - owner and admin panel styles, on top of the design system
   (ds/tokens, ds/components, ds/bo-shell) and Bootstrap 5. Tokens only, logical properties.
   Sections: 1 shell base · 2 data table · 3 layout helpers · 4 dashboard · 5 calendar ·
             6 room board · 7 timeline · 8 task board · 9 photos · 10 staff and HR · 11 misc
   ========================================================================================== */

/* ---------------------------------------------------------------- 1. shell base (structure the shell CSS expects) */
body { background: var(--ds-canvas); }
#page-topbar .navbar-header { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand-box { display: flex; align-items: center; }
#page-topbar .header-item { display: inline-flex; align-items: center; justify-content: center; gap: var(--ds-sp-2); border: 0; background: transparent; box-shadow: none; }
#page-topbar .ds-theme svg { inline-size: 20px; block-size: 20px; }
:root:not([data-theme="dark"]) .ds-theme-sun, :root[data-theme="dark"] .ds-theme-moon { display: none; }
.cf-avatar { display: inline-grid; place-items: center; }
.vertical-menu { overflow-y: auto; overscroll-behavior: contain; }
.vertical-collpsed .vertical-menu { overflow: visible; }
#side-menu, #side-menu ul { list-style: none; margin: 0; padding: 0; }
#side-menu .sub-menu { display: none; }
#side-menu .sub-menu.mm-show { display: block; }
#sidebar-menu .mm-active > .has-arrow::after { transform: rotate(180deg); }
#sidebar-menu ul li a i { font-size: var(--ds-icon-lg, 20px); flex: none; }
.footer { position: absolute; inset-block-end: 0; inset-inline: var(--bo-side) 0; display: flex; align-items: center; min-block-size: var(--bo-footer-h, 48px); padding-inline: var(--ds-gutter); border-block-start: 1px solid var(--ds-border); font-size: var(--ds-fs-12); color: var(--ds-text-muted); }
.footer > .container-fluid { inline-size: 100%; }
.page-title-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-sp-3); margin-block-end: var(--ds-sp-5); }
.page-title-box h4 { margin: 0; }
.ht-scrim { display: none; }
@media (max-width: 767.98px) { .ht-bo-tabbar { display: flex; } }
.ht-bo-tabbar > * { flex: 1 1 0; display: grid; justify-items: center; align-content: center; gap: 2px; border: 0; background: transparent; color: var(--ds-text-muted); font-size: 11px; font-weight: var(--ds-w-medium); text-decoration: none; }
.ht-bo-tabbar i { font-size: 22px; }
.ht-bo-tabbar .is-on { color: var(--ds-accent); }
@media (max-width: 767.98px) { .ds-owner .page-content { padding-block-end: calc(var(--ds-bo-tabbar-h, 56px) + var(--bo-footer-h, 48px) + var(--ds-sp-8)); } .ds-owner .footer { inset-block-end: var(--ds-bo-tabbar-h, 56px); } }
.ds-ow-switch__item { display: flex; align-items: center; gap: var(--ds-sp-3); inline-size: 100%; border: 0; text-align: start; }

@media (max-width: 575.98px) {
  .ds-kpi__value { font-size: 20px; overflow-wrap: normal; word-break: keep-all; }
  /* the name may shrink (the --ow-name-min floor let it spill 40 px past its button, under the bell badge) */
  .ds-ow-switch { flex: 1 1 auto; }
  .ds-topbar-start { flex: 1 1 auto; min-inline-size: 0; }
  .ds-ow-switch__text { min-inline-size: 0; max-inline-size: 140px; overflow: hidden; }
  /* small tables in cards (bills, price lines): tighter cells, and the final amount column never breaks inside an amount */
  .ds-card .table-responsive > .table > :not(caption) > * > * { padding-inline: var(--ds-sp-2); }
  .ds-card .table-responsive > .table > :not(caption) > * > :first-child { padding-inline-start: var(--ds-sp-4); }
  .ds-card .table-responsive > .table > :not(caption) > * > :last-child { padding-inline-end: var(--ds-sp-4); }
  .ds-card .table-responsive > .table :is(td, th).text-end:last-child { white-space: nowrap; }
  .ds-ow-switch__name, .ds-ow-switch__meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ds-ow-switch__caret { display: none; }
}

/* ---------------------------------------------------------------- 2. data table */
.ht-card-table { padding: 0; overflow: visible; }
.ht-table-bar { padding: var(--ds-sp-3) var(--ds-sp-4); border-block-end: 1px solid var(--ds-border); }
.ht-table-search { flex: 1 1 220px; max-inline-size: 360px; }
.ht-table-filter { inline-size: auto; min-inline-size: 150px; flex: 0 1 auto; }
.ht-table-wrap { margin: 0; }
.ht-table-wrap table { margin: 0; }
.ht-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: nowrap; }
.ht-sort i { opacity: .45; font-size: 12px; }
.ht-sort.is-on i { opacity: 1; color: var(--ds-accent); }
.text-end .ht-sort { flex-direction: row-reverse; }
.ht-row-link { cursor: pointer; }
.ht-colmenu { min-inline-size: 220px; max-block-size: 60vh; overflow-y: auto; }
.ht-colmenu .ds-check-row { display: flex; gap: var(--ds-sp-2); cursor: pointer; }
.ds-pager { padding: var(--ds-sp-3) var(--ds-sp-4); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-sp-3); }
.ds-pager .pagination { margin: 0; flex-wrap: wrap; }
.ht-pagesize { display: inline-flex; align-items: center; gap: var(--ds-sp-2); font-size: var(--ds-fs-12); color: var(--ds-text-muted); margin: 0; }
.ht-pagesize select { inline-size: auto; }
.ds-kebab { border: 0; background: transparent; inline-size: 36px; block-size: 36px; border-radius: var(--ds-r-sm, 8px); color: var(--ds-text-muted); }
.ds-kebab:hover, .ds-kebab[aria-expanded="true"] { background: var(--ds-hover); color: var(--ds-text-strong); }
.ds-ref { font-variant-numeric: tabular-nums; font-weight: var(--ds-w-medium); white-space: nowrap; }

/* ---------------------------------------------------------------- 3. layout helpers */
.ht-kpis { margin-block-end: var(--ds-sp-5); }
.ht-kpis:empty { display: none; }
.ht-grid { display: grid; gap: var(--ds-sp-4); grid-template-columns: minmax(0, 1fr); margin-block-end: var(--ds-sp-4); }
@media (min-width: 992px) { .ht-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ht-grid--21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .ht-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ht-panel { display: flex; flex-direction: column; min-inline-size: 0; }
.ht-panel > .ds-card__head { margin-block-end: var(--ds-sp-3); }
.ht-panel h2, .ht-panel h3 { font-size: var(--ds-fs-16, 16px); margin: 0; }
.ht-panel > .table-responsive { margin-inline: calc(var(--ds-sp-4) * -1); }
.ht-chart { position: relative; block-size: 280px; }
.ht-chart--sm { block-size: 220px; }
.ht-staff-tabs { margin-block-end: var(--ds-sp-5); }
.ht-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ht-list > li { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-sp-3); padding-block: var(--ds-sp-3); border-block-end: 1px solid var(--ds-border); }
.ht-list > li:last-child { border-block-end: 0; }
.ht-bar { display: block; block-size: 8px; border-radius: 999px; background: var(--ds-sunken); overflow: hidden; min-inline-size: 80px; flex: 1 1 auto; }
.ht-bar > i { display: block; block-size: 100%; inline-size: var(--w, 0%); border-radius: inherit; background: var(--ds-accent); }
/* label + bar + amount rows ("Top hotels", "Team by department"): the amount never shrinks; on phones the label gives way
   (ellipsis) and the bar gets narrower, so the amount stays inside the card */
.ht-list > li > :is(b, .ds-num):last-child { flex: none; }
@media (max-width: 575.98px) {
  .ht-list > li:has(> .ht-bar) > span:first-child { min-inline-size: 0 !important; flex: 1 1 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ht-list > li > .ht-bar { min-inline-size: 48px; }
}
/* identity cell of list tables (photo + name): keeps room for the name; the table scrolls sideways instead of
   squeezing the name to one letter */
.ht-table-wrap td .ds-ident { min-inline-size: 12rem; }
/* phones: a stacked table (.ds-table-stack) shows each row as a card: label on the left, value on the right */
@media (max-width: 767.98px) {
  .ds-bo .ds-table-stack > tbody { padding: var(--ds-sp-3); }
  .ds-bo .ds-card .table-responsive > .table.ds-table-stack > tbody > tr > td, .ds-bo .ds-table-stack > tbody > tr > td { padding-inline: 0; }
  .ds-bo .ds-table-stack > tbody > tr > td:not(:has(> .btn-group, > .btn, > form, > .d-flex > .btn)) { flex-wrap: wrap; justify-content: flex-end; align-items: center; column-gap: var(--ds-sp-2); }
  .ds-bo .ds-table-stack > tbody > tr > td[data-label]:not(:has(> .btn-group, > .btn, > form, > .d-flex > .btn))::before { margin-inline-end: auto; }
  .ds-bo .ds-table-stack > tbody > tr > td .ds-ident { min-inline-size: 0; }
  .ds-bo .ds-table-stack > tbody > tr > td.ds-col-actions { position: static; }
  .ds-bo .ds-table-stack > tbody > tr > td.ds-col-actions .ds-kebab { margin-inline-end: calc(var(--ds-sp-3) * -1); }
}
/* the pinned row-actions column needs its own background, or the cells scrolling under it show through
   (Bootstrap's .table > :not(caption) > * > * resets every cell to transparent and wins over .ds-col-actions) */
.table > tbody > tr > .ds-col-actions { background-color: var(--ds-surface); }
/* an open row menu must sit above the pinned cells of the rows below it */
@media (min-width: 768px) { .table > tbody > tr > .ds-col-actions:has(.dropdown-menu.show) { z-index: var(--ds-z-sticky-local); } }
/* phones: menus inside the page open above the bottom tab bar and scroll inside the space between the two bars */
@media (max-width: 767.98px) {
  .ds-bo .page-content .dropdown-menu {
    z-index: calc(var(--ds-z-bo-tabbar) + 1);
    max-block-size: calc(100vh - var(--ds-topbar-h, 56px) - var(--ds-bo-tabbar-h, 56px) - var(--ds-sp-8));
    max-block-size: calc(100dvh - var(--ds-topbar-h, 56px) - var(--ds-bo-tabbar-h, 56px) - var(--ds-sp-8));
    overflow-y: auto; overscroll-behavior: contain;
  }
}
.ht-legend { display: flex; flex-wrap: wrap; gap: var(--ds-sp-2) var(--ds-sp-4); font-size: var(--ds-fs-12); color: var(--ds-text-muted); }
.ht-legend i { display: inline-block; inline-size: 12px; block-size: 12px; border-radius: 3px; margin-inline-end: 4px; vertical-align: -1px; }

/* ---------------------------------------------------------------- 4. dashboard */
.ht-needs { display: grid; gap: var(--ds-sp-3); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-block-end: var(--ds-sp-5); }
.ht-need { display: flex; align-items: center; gap: var(--ds-sp-3); padding: var(--ds-sp-3) var(--ds-sp-4); border-radius: var(--ds-r-md, 8px); border: 1px solid var(--ds-border); background: var(--ds-surface); color: var(--ds-text); text-decoration: none; }
.ht-need:hover { border-color: var(--ds-accent); color: var(--ds-text-strong); }
.ht-need__ic { flex: none; inline-size: 40px; block-size: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ds-warning-bg, #FFF7E6); color: var(--ds-warning-fg, #8A5B00); font-size: 20px; }
.ht-need.is-zero .ht-need__ic { background: var(--ds-success-bg, #E8F6EE); color: var(--ds-success-fg, #1E6B43); }
.ht-need__text { flex: 1 1 auto; min-inline-size: 0; display: grid; }
.ht-need__text small { color: var(--ds-text-muted); }
.ht-need__n { font-size: 22px; font-weight: var(--ds-w-bold); color: var(--ds-text-strong); font-variant-numeric: tabular-nums; }
/* tablet and desktop: narrower stacked tiles (icon and count on top, the text below), so all five "today" tiles fit on
   one row on desktop (four columns left the fifth alone on a second row) and no label has to wrap */
@media (min-width: 768px) {
  .ht-needs { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .ht-need { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ic n" "text text"; align-items: center; row-gap: var(--ds-sp-2); }
  .ht-need__ic { grid-area: ic; }
  .ht-need__n { grid-area: n; justify-self: end; line-height: 1; }
  .ht-need__text { grid-area: text; }
}
.ht-occ { inline-size: 100%; border-collapse: separate; border-spacing: 3px; font-size: var(--ds-fs-12); }
/* a matrix, not a data table: it stays inside the card padding (panel tables bleed to the card edge with -16px) */
.table-responsive:has(> .ht-occ) { margin-inline: calc(-1 * 3px); }
.ht-occ th { font-weight: var(--ds-w-medium); color: var(--ds-text-muted); text-align: center; white-space: nowrap; padding: 2px; }
.ht-occ th[scope="row"] { text-align: start; color: var(--ds-text); max-inline-size: 150px; overflow: hidden; text-overflow: ellipsis; }
.ht-occ td { text-align: center; padding: 6px 2px; border-radius: 6px; font-variant-numeric: tabular-nums; min-inline-size: 34px; background: var(--ds-sunken); color: var(--ds-text); }
.ht-occ td[data-l="1"] { background: color-mix(in srgb, var(--ds-accent) 16%, var(--ds-surface)); }
.ht-occ td[data-l="2"] { background: color-mix(in srgb, var(--ds-accent) 34%, var(--ds-surface)); }
.ht-occ td[data-l="3"] { background: color-mix(in srgb, var(--ds-accent) 60%, var(--ds-surface)); color: #fff; }
.ht-occ td[data-l="4"] { background: var(--ds-accent); color: var(--ds-on-accent, #fff); font-weight: var(--ds-w-semibold); }

/* ---------------------------------------------------------------- 5. month calendar */
.ht-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--ds-border); border-radius: var(--ds-r-md, 8px); overflow: hidden; background: var(--ds-border); gap: 1px; }
.ht-month__dow { background: var(--ds-sunken); padding: var(--ds-sp-2); text-align: center; font-size: var(--ds-fs-12); font-weight: var(--ds-w-semibold); color: var(--ds-text-muted); }
.ht-month__day { background: var(--ds-surface); min-block-size: 104px; padding: 6px; display: grid; align-content: start; gap: 3px; border: 0; text-align: start; font: inherit; color: inherit; min-inline-size: 0; }
.ht-month__day.is-out { background: var(--ds-sunken); color: var(--ds-text-muted); }
.ht-month__day.is-today .ht-month__num { background: var(--ds-accent); color: var(--ds-on-accent, #fff); }
.ht-month__day.is-on { box-shadow: inset 0 0 0 2px var(--ds-accent); }
.ht-month__num { inline-size: 24px; block-size: 24px; border-radius: 50%; display: grid; place-items: center; font-size: var(--ds-fs-12); font-weight: var(--ds-w-semibold); }
.ht-ev { display: block; padding: 1px 6px; border-radius: 4px; font-size: 11px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--ds-accent-soft); color: var(--ds-accent); }
.ht-ev--checked_in { background: var(--ds-success-bg, #E8F6EE); color: var(--ds-success-fg, #1E6B43); }
.ht-ev--pending { background: var(--ds-warning-bg, #FFF7E6); color: var(--ds-warning-fg, #8A5B00); }
.ht-ev--checked_out { background: var(--ds-sunken); color: var(--ds-text-muted); }
.ht-ev-more { font-size: 11px; color: var(--ds-text-muted); }
@media (max-width: 767.98px) { .ht-month__day { min-block-size: 64px; } .ht-ev { display: none; } .ht-ev-more { display: none; } .ht-month__day[data-n]:not([data-n="0"])::after { content: attr(data-n); justify-self: start; padding: 0 6px; border-radius: 999px; background: var(--ds-accent-soft); color: var(--ds-accent); font-size: 11px; } }

/* ---------------------------------------------------------------- 6. room board */
.ht-floor { margin-block-end: var(--ds-sp-5); }
.ht-floor h3 { font-size: var(--ds-fs-14); color: var(--ds-text-muted); margin-block-end: var(--ds-sp-2); }
.ht-units { display: grid; gap: var(--ds-sp-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ht-unit { position: relative; display: grid; gap: 4px; padding: var(--ds-sp-3); border-radius: var(--ds-r-md, 8px); border: 1px solid var(--ds-border); border-inline-start: 4px solid var(--u, var(--ds-border)); background: var(--ds-surface); text-align: start; min-block-size: 116px; align-content: start; }
.ht-unit[data-status="clean"] { --u: var(--ds-success-solid, #2E8B57); }
.ht-unit[data-status="dirty"] { --u: var(--ds-warning-solid, #D99A00); }
.ht-unit[data-status="occupied"] { --u: var(--ds-accent); }
.ht-unit[data-status="inspect"] { --u: #7A6FD0; }
.ht-unit[data-status="out_of_order"] { --u: var(--ds-danger-solid, #C0392B); background: var(--ds-sunken); }
.ht-unit.is-over { outline: 2px dashed var(--ds-accent); outline-offset: 2px; background: var(--ds-accent-soft); }
.ht-unit__no { font-size: 20px; font-weight: var(--ds-w-bold); color: var(--ds-text-strong); line-height: 1; }
.ht-unit__type, .ht-unit__guest { font-size: var(--ds-fs-12); color: var(--ds-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-unit__guest { color: var(--ds-text); font-weight: var(--ds-w-medium); }
.ht-unit .dropdown { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; }
.ht-queue { display: grid; gap: var(--ds-sp-2); }
.ht-qitem { display: flex; align-items: center; gap: var(--ds-sp-3); padding: var(--ds-sp-2) var(--ds-sp-3); border-radius: var(--ds-r-md, 8px); border: 1px dashed var(--ds-border-strong, var(--ds-border)); background: var(--ds-surface); cursor: grab; }
.ht-qitem:active { cursor: grabbing; }
.ht-qitem.is-drag { opacity: .5; }
.ht-qitem > i { color: var(--ds-text-muted); }
.ht-qitem > span { flex: 1 1 auto; min-inline-size: 0; display: grid; }
.ht-qitem small { color: var(--ds-text-muted); }

/* ---------------------------------------------------------------- 7. timeline (rooms x days, draggable bars) */
.ht-tl { --col: 46px; --rowh: 44px; --side: 148px; overflow: auto; border: 1px solid var(--ds-border); border-radius: var(--ds-r-md, 8px); background: var(--ds-surface); max-block-size: 70vh; }
.ht-tl__in { position: relative; inline-size: max-content; min-inline-size: 100%; }
.ht-tl__head, .ht-tl__row { display: flex; }
.ht-tl__head { position: sticky; inset-block-start: 0; z-index: 3; background: var(--ds-sunken); }
.ht-tl__side { flex: none; inline-size: var(--side); position: sticky; inset-inline-start: 0; z-index: 2; background: var(--ds-surface); border-inline-end: 1px solid var(--ds-border); border-block-end: 1px solid var(--ds-border); padding: 0 var(--ds-sp-3); display: grid; align-content: center; min-block-size: var(--rowh); font-size: var(--ds-fs-12); }
.ht-tl__side { block-size: var(--rowh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-tl__head .ht-tl__side { background: var(--ds-sunken); z-index: 4; font-weight: var(--ds-w-semibold); }
.ht-tl__side b { font-size: var(--ds-fs-14); color: var(--ds-text-strong); }
.ht-tl__day { flex: none; inline-size: var(--col); text-align: center; font-size: 11px; line-height: 14px; padding-block: 6px; color: var(--ds-text-muted); border-inline-end: 1px solid var(--ds-border); border-block-end: 1px solid var(--ds-border); }
.ht-tl__day b { display: block; font-size: var(--ds-fs-14); color: var(--ds-text-strong); }
.ht-tl__day.is-today { background: var(--ds-accent-soft); }
.ht-tl__day.is-weekend { background: color-mix(in srgb, var(--ds-sunken) 60%, var(--ds-surface)); }
.ht-tl__track { position: relative; flex: none; display: flex; block-size: var(--rowh); border-block-end: 1px solid var(--ds-border); }
.ht-tl__cell { flex: none; inline-size: var(--col); border-inline-end: 1px solid var(--ds-border); }
.ht-tl__cell.is-today { background: var(--ds-accent-soft); }
.ht-tl__cell.is-over { background: color-mix(in srgb, var(--ds-accent) 22%, var(--ds-surface)); }
.ht-tl__bar { position: absolute; inset-block: 6px; inset-inline-start: calc(var(--s) * var(--col) + var(--col) / 2); inline-size: calc(var(--n) * var(--col) - 4px); display: flex; align-items: center; gap: 4px; padding-inline: 8px; border-radius: 6px; border: 0; background: var(--ds-accent); color: var(--ds-on-accent, #fff); font-size: var(--ds-fs-12); font-weight: var(--ds-w-medium); white-space: nowrap; overflow: hidden; cursor: grab; z-index: 1; text-align: start; }
.ht-tl__bar--checked_in { background: var(--ds-success-solid, #2E8B57); }
.ht-tl__bar--pending { background: var(--ds-warning-solid, #D99A00); color: #1b1b1b; }
.ht-tl__bar--checked_out { background: var(--ds-slate-400, #7D8791); }
.ht-tl__bar.is-drag { opacity: .45; }
.ht-tl__bar.is-flash { animation: ht-flash 1s ease-out; }
@keyframes ht-flash { from { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ds-accent) 40%, transparent); } to { box-shadow: 0 0 0 0 transparent; } }

/* ---------------------------------------------------------------- 8. task board */
.ht-kanban { display: grid; gap: var(--ds-sp-4); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 992px) { .ht-kanban { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ht-kcol { border-radius: var(--ds-r-md, 8px); background: var(--ds-sunken); padding: var(--ds-sp-3); min-block-size: 160px; }
.ht-kcol.is-over { outline: 2px dashed var(--ds-accent); outline-offset: 2px; }
.ht-kcol__head { display: flex; align-items: center; justify-content: space-between; margin-block-end: var(--ds-sp-3); font-weight: var(--ds-w-semibold); color: var(--ds-text-strong); }
.ht-kcol__list { display: grid; gap: var(--ds-sp-2); min-block-size: 60px; }
.ht-task { display: grid; gap: 6px; padding: var(--ds-sp-3); border-radius: var(--ds-r-md, 8px); border: 1px solid var(--ds-border); background: var(--ds-surface); cursor: grab; }
.ht-task.is-drag { opacity: .5; }
.ht-task__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ds-sp-2); }
.ht-task__title { font-weight: var(--ds-w-medium); color: var(--ds-text-strong); }
.ht-task__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-sp-2); font-size: var(--ds-fs-12); color: var(--ds-text-muted); }

/* ---------------------------------------------------------------- 9. photos */
.ht-photo-grid { display: grid; gap: var(--ds-sp-3); grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.ht-photo { position: relative; border-radius: var(--ds-r-md, 8px); overflow: hidden; border: 1px solid var(--ds-border); background: var(--ds-sunken); cursor: grab; }
.ht-photo img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ht-photo.is-drag { opacity: .4; }
.ht-photo.is-over { outline: 2px dashed var(--ds-accent); outline-offset: 2px; }
.ht-photo__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-sp-2); padding: 6px 8px; background: var(--ds-surface); font-size: var(--ds-fs-12); }
.ht-photo__cover { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; }
.ht-drop { display: grid; place-items: center; gap: var(--ds-sp-2); padding: var(--ds-sp-6); border: 2px dashed var(--ds-border-strong, var(--ds-border)); border-radius: var(--ds-r-md, 8px); color: var(--ds-text-muted); text-align: center; margin-block-end: var(--ds-sp-4); }
.ht-drop.is-over { border-color: var(--ds-accent); background: var(--ds-accent-soft); }

/* ---------------------------------------------------------------- 10. staff and HR */
.ht-roster, .ht-attm { inline-size: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--ds-fs-12); }
.ht-roster th, .ht-roster td, .ht-attm th, .ht-attm td { padding: 4px; border-block-end: 1px solid var(--ds-border); text-align: center; white-space: nowrap; }
.ht-roster th:first-child, .ht-roster td:first-child, .ht-attm th:first-child, .ht-attm td:first-child { position: sticky; inset-inline-start: 0; background: var(--ds-surface); text-align: start; z-index: 1; padding-inline: var(--ds-sp-3); }
/* the sticky name column keeps whole names readable ("Ale…" at 104 px); the days scroll beside it, with a hairline as the edge */
.ht-roster td:first-child, .ht-attm td:first-child { min-inline-size: 150px; box-shadow: inset -1px 0 0 var(--ds-border); }
[dir="rtl"] :is(.ht-roster, .ht-attm) td:first-child { box-shadow: inset 1px 0 0 var(--ds-border); }
.ht-shift { inline-size: 100%; min-inline-size: 76px; min-block-size: 36px; border-radius: 6px; border: 1px solid transparent; background: var(--ds-sunken); color: var(--ds-text-muted); font: inherit; font-weight: var(--ds-w-medium); }
.ht-shift:hover { border-color: var(--ds-accent); }
.ht-shift[data-s="Morning"] { background: #FFF2CC; color: #6B4600; }
.ht-shift[data-s="Evening"] { background: #DCE9F9; color: #17406F; }
.ht-shift[data-s="Night"] { background: #E4DEF5; color: #3F2E7A; }
[data-theme="dark"] .ht-shift[data-s="Morning"] { background: #4A3C10; color: #F6D68E; }
[data-theme="dark"] .ht-shift[data-s="Evening"] { background: #16324F; color: #A9CDF2; }
[data-theme="dark"] .ht-shift[data-s="Night"] { background: #2E2552; color: #CBBDF2; }
.ht-attm td { inline-size: 28px; min-inline-size: 28px; padding: 3px; }
.ht-attm td > span { display: grid; place-items: center; inline-size: 24px; block-size: 24px; border-radius: 5px; font-weight: var(--ds-w-semibold); margin: auto; }
.ht-a-present { background: var(--ds-success-bg, #E8F6EE); color: var(--ds-success-fg, #1E6B43); }
.ht-a-late { background: var(--ds-warning-bg, #FFF7E6); color: var(--ds-warning-fg, #8A5B00); }
.ht-a-absent { background: var(--ds-danger-bg, #FDECEA); color: var(--ds-danger-fg, #A8281C); }
.ht-a-leave { background: var(--ds-accent-soft); color: var(--ds-accent); }
.ht-payslip { max-inline-size: 760px; margin-inline: auto; }
.ht-payslip__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ds-sp-4); padding-block-end: var(--ds-sp-4); border-block-end: 2px solid var(--ds-border); margin-block-end: var(--ds-sp-4); }
.ht-payslip__net { display: flex; justify-content: space-between; align-items: center; padding: var(--ds-sp-4); border-radius: var(--ds-r-md, 8px); background: var(--ds-accent-soft); font-size: 18px; font-weight: var(--ds-w-bold); color: var(--ds-text-strong); margin-block-start: var(--ds-sp-4); }
.ht-awards { display: grid; gap: var(--ds-sp-3); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ht-award { display: grid; justify-items: center; gap: 4px; padding: var(--ds-sp-4); border-radius: var(--ds-r-md, 8px); border: 1px solid var(--ds-border); background: var(--ds-surface); text-align: center; }
.ht-award > i { font-size: 32px; color: #C9A227; }
.ht-profile { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-sp-4); }
.ht-profile__av { inline-size: 64px; block-size: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ds-accent-soft); color: var(--ds-accent); font-size: 22px; font-weight: var(--ds-w-bold); }

/* ---------------------------------------------------------------- 11. misc: permissions matrix, documents, log, settings */
.ht-perms th, .ht-perms td { text-align: center; }
.ht-perms th:first-child, .ht-perms td:first-child { text-align: start; }
.ht-doc { display: grid; place-items: center; gap: var(--ds-sp-2); padding: var(--ds-sp-6); border-radius: var(--ds-r-md, 8px); background: var(--ds-sunken); color: var(--ds-text-muted); min-block-size: 220px; text-align: center; }
.ht-doc > i { font-size: 48px; }
.ht-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ds-sp-3); }
.ht-timeline li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: var(--ds-sp-3); }
.ht-timeline li::before { content: ""; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--ds-accent); margin-block-start: 6px; }
.ht-timeline small { color: var(--ds-text-muted); display: block; }
.ht-settings { display: grid; gap: var(--ds-sp-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .ht-settings { grid-template-columns: 220px minmax(0, 1fr); } }
.ht-settings__nav { display: flex; gap: 2px; overflow-x: auto; }
@media (min-width: 992px) { .ht-settings__nav { display: grid; align-content: start; } }
.ht-settings__nav button { display: flex; align-items: center; gap: var(--ds-sp-2); padding: var(--ds-sp-2) var(--ds-sp-3); border: 0; border-radius: var(--ds-r-sm, 8px); background: transparent; color: var(--ds-text); text-align: start; white-space: nowrap; font: inherit; }
.ht-settings__nav button[aria-selected="true"] { background: var(--ds-accent-soft); color: var(--ds-accent); font-weight: var(--ds-w-semibold); }
@media print { .ds-bo-tabbar, .page-title-right, .ht-staff-tabs { display: none !important; } .main-content { margin: 0 !important; } .page-content { padding: 0 !important; } }

/* Package demos (built by tools/build-packages.js): the Hotel Owner Panel package has no guest website,
   so the "View on site" buttons that the scripts add are hidden there. */
[data-package="owner-panel"] a[href^="../hotel.html"], [data-package="owner-panel"] a[href^="../policy.html"] { display: none !important; }
