/* =============================================================
   HotelSuite ERP - design system
   Palette borrowed from hotel interiors: deep green lacquer rail,
   warm paper canvas, brass used only where money is shown.
   ============================================================= */
:root{
  --rail:#0E211C; --rail-2:#16302a; --rail-text:#9FB5AE; --rail-active:#E8F0ED;
  --canvas:#F6F7F5; --surface:#FFFFFF; --surface-2:#FBFBF9;
  --ink:#16221E; --ink-2:#4C5A55; --ink-3:#7C8A85;
  --line:#E2E7E4; --line-2:#EEF1EF;
  --brand:#1F6F5C; --brand-soft:#E7F1ED; --brand-dark:#164F42;
  --brass:#A87A32; --brass-soft:#F6EFE2;
  --danger:#B4372F; --danger-soft:#FBEAE8;
  --warn:#9A6B12; --warn-soft:#FBF1DE;
  --ok:#1F6F5C; --ok-soft:#E7F1ED;
  --info:#2B5C88; --info-soft:#E8F0F7;
  --r-sm:6px; --r:10px; --r-lg:14px;
  --shadow:0 1px 2px rgba(20,34,30,.06), 0 8px 24px -12px rgba(20,34,30,.18);
  --rail-w:248px;
  --fs-12:.75rem; --fs-13:.8125rem; --fs-14:.875rem; --fs-16:1rem; --fs-20:1.25rem; --fs-26:1.625rem; --fs-32:2rem;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--canvas);color:var(--ink);
  font-family:ui-sans-serif,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:var(--fs-14);line-height:1.5;
}
h1,h2,h3,h4{margin:0;font-weight:640;letter-spacing:-.012em;color:var(--ink)}
h1{font-size:var(--fs-26)} h2{font-size:var(--fs-20)} h3{font-size:var(--fs-16)}
p{margin:0 0 .75rem}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
table{border-collapse:collapse;width:100%}
.num,td.num,.kpi__value,.money{font-variant-numeric:tabular-nums}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:4px}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ---------- shell ---------- */
.shell{display:flex;min-height:100vh}
.rail{
  width:var(--rail-w);flex:0 0 var(--rail-w);background:var(--rail);color:var(--rail-text);
  display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:60;
  transition:width .18s ease;
}
.rail__brand{display:flex;align-items:center;gap:.625rem;padding:1.1rem 1.25rem;border-bottom:1px solid rgba(255,255,255,.07)}
.rail__mark{width:30px;height:30px;border-radius:8px;background:linear-gradient(150deg,var(--brand),#2E8F76);
  display:grid;place-items:center;color:#fff;font-weight:700;font-size:.8rem;flex:0 0 auto}
.rail__name{color:#fff;font-weight:640;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.rail__org{display:block;font-size:var(--fs-12);color:var(--rail-text);font-weight:400;overflow:hidden;text-overflow:ellipsis}
.rail__nav{flex:1;overflow-y:auto;padding:.5rem .625rem 2rem}
.rail__nav::-webkit-scrollbar{width:6px}
.rail__nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);border-radius:3px}
.rail__heading{padding:1rem .625rem .375rem;font-size:var(--fs-12);color:#6E8780;letter-spacing:.02em}
.rail__link{
  display:flex;align-items:center;gap:.625rem;padding:.5rem .625rem;border-radius:var(--r-sm);
  color:var(--rail-text);font-size:var(--fs-14);white-space:nowrap;margin-bottom:1px;
}
.rail__link:hover{background:var(--rail-2);color:var(--rail-active);text-decoration:none}
.rail__link.is-active{background:var(--rail-2);color:#fff;box-shadow:inset 2px 0 0 var(--brand)}
.rail__link svg{flex:0 0 18px;width:18px;height:18px;opacity:.85}
.rail__link.is-soon{opacity:.45;cursor:not-allowed}
.rail__soon{margin-left:auto;font-size:10px;padding:1px 5px;border-radius:999px;background:rgba(255,255,255,.09);color:#C3D4CE}
.rail__foot{padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.07);font-size:var(--fs-12)}

.main{flex:1;min-width:0;margin-left:var(--rail-w)}
body.rail-collapsed .rail{width:68px;flex-basis:68px}
body.rail-collapsed .rail__name,body.rail-collapsed .rail__link span,
body.rail-collapsed .rail__heading,body.rail-collapsed .rail__soon,body.rail-collapsed .rail__foot{display:none}
body.rail-collapsed .rail__link{justify-content:center}
body.rail-collapsed .main{margin-left:68px}

/* ---------- topbar ---------- */
.topbar{
  position:sticky;top:0;z-index:50;background:rgba(255,255,255,.92);backdrop-filter:saturate(140%) blur(8px);
  border-bottom:1px solid var(--line);display:flex;align-items:center;gap:.75rem;padding:.625rem 1.25rem;
}
.iconbtn{
  width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--line);background:var(--surface);
  border-radius:var(--r-sm);color:var(--ink-2);cursor:pointer;flex:0 0 auto;position:relative;
}
.iconbtn:hover{background:var(--surface-2);color:var(--ink)}
.search{position:relative;flex:1;max-width:460px}
.search input[type=search]{
  width:100%;height:36px;padding:0 .75rem 0 2.1rem;border:1px solid var(--line);border-radius:var(--r-sm);
  background:var(--surface);font-size:var(--fs-14);color:var(--ink);
}
.search svg{position:absolute;left:.6rem;top:9px;width:18px;height:18px;color:var(--ink-3)}
.search__results{
  position:absolute;top:42px;left:0;right:0;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);box-shadow:var(--shadow);max-height:60vh;overflow:auto;display:none;z-index:70;
}
.search__results.is-open{display:block}
.search__group{padding:.4rem .75rem;font-size:var(--fs-12);color:var(--ink-3);background:var(--surface-2);
  border-bottom:1px solid var(--line-2)}
.search__item{display:block;padding:.55rem .75rem;border-bottom:1px solid var(--line-2);color:var(--ink)}
.search__item:hover{background:var(--brand-soft);text-decoration:none}
.search__item small{display:block;color:var(--ink-3)}
.topbar__spacer{flex:1}

.hotelpick{position:relative}
.hotelpick__btn{
  display:flex;align-items:center;gap:.5rem;height:36px;padding:0 .7rem;border:1px solid var(--line);
  background:var(--surface);border-radius:var(--r-sm);cursor:pointer;font-size:var(--fs-14);color:var(--ink);max-width:230px
}
.hotelpick__btn b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dot{width:7px;height:7px;border-radius:50%;background:var(--brand);flex:0 0 auto}

.dropdown{
  position:absolute;right:0;top:44px;min-width:260px;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);box-shadow:var(--shadow);padding:.375rem;display:none;z-index:70;
}
.dropdown.is-open{display:block}
.dropdown--wide{min-width:340px;max-height:70vh;overflow:auto}
.dropdown__item{display:flex;align-items:center;gap:.5rem;width:100%;text-align:left;padding:.5rem .625rem;
  border:0;background:none;border-radius:var(--r-sm);color:var(--ink);font-size:var(--fs-14);cursor:pointer}
.dropdown__item:hover{background:var(--surface-2);text-decoration:none}
.dropdown__item.is-active{background:var(--brand-soft);color:var(--brand-dark);font-weight:600}
.dropdown__sep{height:1px;background:var(--line-2);margin:.375rem 0}
.dropdown__head{padding:.5rem .625rem;font-size:var(--fs-12);color:var(--ink-3)}

.badge-count{position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;
  background:var(--danger);color:#fff;font-size:10px;display:grid;place-items:center;font-weight:600}

.avatar{width:32px;height:32px;border-radius:50%;background:var(--brand-soft);color:var(--brand-dark);
  display:grid;place-items:center;font-weight:650;font-size:var(--fs-13)}

/* ---------- page ---------- */
.page{padding:1.5rem 1.25rem 3rem;max-width:1520px;margin:0 auto}
.page__head{display:flex;align-items:flex-end;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem}
.page__head p{color:var(--ink-2);margin:.25rem 0 0}
.page__actions{margin-left:auto;display:flex;gap:.5rem;flex-wrap:wrap}
.crumb{font-size:var(--fs-13);color:var(--ink-3);margin-bottom:.35rem}
.crumb a{color:var(--ink-3)}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.45rem;height:36px;padding:0 .9rem;
  border-radius:var(--r-sm);border:1px solid var(--line);background:var(--surface);color:var(--ink);
  font-size:var(--fs-14);font-weight:550;cursor:pointer;white-space:nowrap;
}
.btn:hover{background:var(--surface-2);text-decoration:none}
.btn--primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn--primary:hover{background:var(--brand-dark);border-color:var(--brand-dark);color:#fff}
.btn--danger{background:var(--danger);border-color:var(--danger);color:#fff}
.btn--danger:hover{background:#93291f;color:#fff}
.btn--ghost{background:transparent;border-color:transparent;color:var(--ink-2)}
.btn--ghost:hover{background:var(--line-2)}
.btn--sm{height:30px;padding:0 .65rem;font-size:var(--fs-13)}
.btn[disabled],.btn.is-loading{opacity:.6;pointer-events:none}
.btn svg{width:16px;height:16px}

/* ---------- cards ---------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.card__head{display:flex;align-items:center;gap:.75rem;padding:.85rem 1rem;border-bottom:1px solid var(--line-2)}
.card__head h3{font-size:var(--fs-14);font-weight:640}
.card__head .btn{margin-left:auto}
.card__body{padding:1rem}
.card__body--flush{padding:0}
.card__foot{padding:.65rem 1rem;border-top:1px solid var(--line-2);font-size:var(--fs-13);color:var(--ink-2)}

/* ---------- KPI ---------- */
.kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:.75rem;margin-bottom:1rem}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:.85rem .95rem;display:block;color:inherit}
.kpi:hover{text-decoration:none;border-color:#CFD8D4}
.kpi__label{font-size:var(--fs-12);color:var(--ink-3);display:flex;align-items:center;gap:.35rem}
.kpi__value{font-size:var(--fs-26);font-weight:650;letter-spacing:-.02em;margin-top:.2rem;line-height:1.15}
.kpi__meta{font-size:var(--fs-12);color:var(--ink-2);margin-top:.15rem}
.kpi--money .kpi__value{color:var(--brass)}
.kpi--alert .kpi__value{color:var(--danger)}
.picker__more{margin-left:auto}
.picker__item{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap}
.picker__item small{flex-basis:100%}

/* The guest window: one guest, four sections, opened over whatever the desk was doing. */
.gw{max-width:980px;width:100%;display:flex;flex-direction:column;max-height:88vh}
.gw__head{display:flex;align-items:flex-start;gap:.75rem;padding:1rem 1.1rem .6rem;border-bottom:1px solid var(--line)}
.gw__head h3{margin:0}
.gw__head .btn{margin-left:auto}
.gw__tabs{display:flex;gap:.25rem;padding:0 1.1rem;border-bottom:1px solid var(--line);flex-wrap:wrap}
.gw__tabs button{padding:.5rem .8rem;border:1px solid transparent;border-bottom:0;background:none;cursor:pointer;
                 font:inherit;font-size:var(--fs-13);font-weight:600;color:var(--ink-2);border-radius:8px 8px 0 0;margin-bottom:-1px}
.gw__tabs button:hover{background:var(--surface-2)}
.gw__tabs button.is-active{background:var(--surface);border-color:var(--line);color:var(--brand-ink)}
.gw__body{padding:1rem 1.1rem;overflow:auto;flex:1 1 auto;min-height:12rem}
.gw__loading{color:var(--ink-3);font-size:var(--fs-13)}
.gw__kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:.6rem;margin-bottom:.9rem}
.gw__kpis div{border:1px solid var(--line);border-radius:var(--r-sm);padding:.5rem .7rem;background:var(--surface-2)}
.gw__kpis b{display:block;font-size:var(--fs-18);letter-spacing:-.01em}
.gw__kpis small{color:var(--ink-3);font-size:var(--fs-12)}
.gw__standing{margin-bottom:.9rem}
@media (max-width:640px){ .gw__kpis{grid-template-columns:repeat(2,1fr)} }

/* A guest who has stayed here before wears a star beside their name. */
.star{color:var(--brass);font-size:.95em;line-height:1;cursor:help}

/* Separate bills: the proposed bills side by side before they are generated. */
.billsplit{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1rem;align-items:start}
.billsplit .card{margin:0}
.bill--done{opacity:.75}
.bill--done .card__head{background:var(--ok-soft)}

/* Booking form: the business-source block set apart from the stay details above it. */
.resform__block{border:1px solid var(--line);border-radius:var(--r-sm);padding:.35rem .9rem .8rem;margin:.25rem 0 .75rem}
.resform__block legend{padding:0 .35rem;font-size:var(--fs-12);font-weight:600;color:var(--ink-3)}
.resform__row{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:.75rem}
.resform__row .field{margin:0;min-width:0}
.resform__row .field__hint{display:block;margin:.2rem 0 0;font-size:var(--fs-12);color:var(--ink-3)}

/* The note marker on the front desk lists: a chip that opens in place to show what it marks. */
.notepop{display:inline-block;margin-right:.35rem}
/* Giving <details> its own display stops the browser hiding the closed panel by itself, so say it here. */
.notepop:not([open]) > .notepop__body{display:none}
.notepop > summary{cursor:pointer;list-style:none;user-select:none}
.notepop > summary::-webkit-details-marker{display:none}
.notepop > summary:hover{border-color:var(--info);color:var(--info)}
.notepop > summary:focus-visible{outline:2px solid var(--info);outline-offset:2px}
.notepop__caret{width:0;height:0;margin-left:.1rem;border:3px solid transparent;border-top-color:currentColor;transform:translateY(1px)}
.notepop[open] > summary .notepop__caret{transform:rotate(180deg) translateY(2px)}
.notepop__body{margin:.4rem 0 .2rem;padding:.5rem .6rem;border:1px solid var(--info);border-left-width:3px;
               border-radius:var(--r-sm);background:var(--info-soft);font-size:var(--fs-13);white-space:normal;
               max-width:min(34rem,70vw)}   /* on a phone it must not stretch the table */
.notepop__note + .notepop__note{margin-top:.45rem;padding-top:.45rem;border-top:1px solid var(--line)}
.notepop__more{display:inline-block;margin-top:.45rem;font-size:var(--fs-12)}
@media print{ .notepop:not([open]) > .notepop__body{display:block} .notepop__caret{display:none} }

/* A booking can carry several notes, one row per department that needs telling. */
.noterow{display:flex;gap:.5rem;align-items:center;margin-bottom:.4rem}
.noterow input{flex:1 1 auto;min-width:0}
.noterow select{flex:0 0 190px}
.qr__noterow{display:flex;gap:.5rem;align-items:center;width:100%}
.qr__noterow input{flex:1 1 auto;min-width:0}
.qr__noterow select{flex:0 0 170px}
.qr__addnote{font-size:var(--fs-12);display:inline-flex;align-items:center;gap:.25rem}
.qr__foreign{margin:.25rem 0 0;padding:.3rem .55rem;border-radius:var(--r-sm);background:var(--warn-soft);
             color:var(--warn);font-size:var(--fs-12);font-weight:600}
.qr__foreign[hidden]{display:none}
@media (max-width:640px){ .noterow{flex-wrap:wrap} .noterow select{flex:1 1 100%} }

/* Desk notes sent to a department: tagged everywhere, and lit up for the department they are for. */
.chip--dept{display:inline-flex;align-items:center;gap:.25rem;padding:.05rem .45rem;margin-right:.35rem;
            border-radius:999px;background:var(--info-soft);color:var(--info);font-size:var(--fs-12);font-weight:600}
.note--mine > td{background:var(--info-soft);box-shadow:inset 3px 0 0 var(--info)}
.gr--note > td{background:var(--info-soft)}
.gr--note > td:first-child{box-shadow:inset 3px 0 0 var(--info)}

/* Quick reservation: the source block, set apart from the money and the note above it. */
.qr__block{border:1px solid var(--line);border-radius:var(--r-sm);padding:.35rem .8rem .7rem;margin:0 0 .25rem}
.qr__block legend{padding:0 .35rem;font-size:var(--fs-12);font-weight:600;color:var(--ink-3)}
.qr__block .qr__row{margin:0}

/* Calendar filter: the optional end date and the note when a long range is trimmed. */
.field__hint{font-weight:400;color:var(--ink-3)}
.filters__note{flex-basis:100%;margin:.25rem 0 0;font-size:var(--fs-12);color:var(--ink-3)}

/* A blocked member of staff: the bar stays in view and every control that would change
   something is visibly dead. The refusal itself is enforced on the server, not here. */
.ro__bar{position:sticky;top:0;z-index:5;margin-bottom:1rem}
.is-readonly .btn--primary,.is-readonly .btn--danger,.is-readonly .btn--ok,.is-readonly .btn--warn,
.is-readonly button[type="submit"],.is-readonly [data-post],.is-readonly [data-guard] button[type="submit"]{
  opacity:.45;cursor:not-allowed;filter:grayscale(1)}
.is-readonly form input,.is-readonly form select,.is-readonly form textarea{background:var(--surface-2)}

/* Front desk: the cards are links that open the list below, each in that list's colour. */
.kpi--arrivals{--kpi-tone:var(--danger)}      /* red */
.kpi--inhouse{--kpi-tone:var(--ok)}           /* green */
.kpi--departures{--kpi-tone:#C66A1C}          /* orange */
.kpi--unassigned{--kpi-tone:var(--info)}      /* blue */
.kpi--arrivals .kpi__value,.kpi--inhouse .kpi__value,
.kpi--departures .kpi__value,.kpi--unassigned .kpi__value{color:var(--kpi-tone)}
.kpi--foreign{--kpi-tone:var(--brass)}        /* foreign guests in house: a reminder, not an alarm */
.kpi--foreign .kpi__value{color:var(--kpi-tone)}
a.kpi{cursor:pointer;transition:border-color .12s ease,box-shadow .12s ease}
a.kpi:hover{border-color:var(--kpi-tone,#CFD8D4)}
a.kpi:focus-visible{outline:2px solid var(--kpi-tone,var(--brand));outline-offset:2px}
.kpi.is-active{border-color:var(--kpi-tone,var(--brand));box-shadow:inset 0 3px 0 var(--kpi-tone,var(--brand))}
.kpi.is-active .kpi__label{color:var(--ink-2);font-weight:600}
@media print{ .kpi.is-active{box-shadow:none} }

.kpi--head{background:linear-gradient(160deg,#123B32,#0E211C);border-color:#123B32}
.kpi--head .kpi__label{color:#9FB5AE}
.kpi--head .kpi__value{color:#fff}
.kpi--head .kpi__meta{color:#B8CCC5}

/* ---------- tables ---------- */
.tablewrap{overflow-x:auto}
.table{font-size:var(--fs-13);min-width:100%}
.table th{
  text-align:left;font-weight:600;color:var(--ink-3);font-size:var(--fs-12);
  padding:.55rem .75rem;border-bottom:1px solid var(--line);background:var(--surface-2);white-space:nowrap;
}
.table td{padding:.6rem .75rem;border-bottom:1px solid var(--line-2);vertical-align:middle}
.table tbody tr:hover{background:var(--surface-2)}
.table td.num,.table th.num{text-align:right}
.table--sticky th{position:sticky;top:0;z-index:2}
.table a{font-weight:550}
.t-muted{color:var(--ink-3)}
.t-right{text-align:right}

.badge{display:inline-block;padding:.15rem .5rem;border-radius:999px;font-size:var(--fs-12);font-weight:550;line-height:1.45}
.badge--ok{background:var(--ok-soft);color:var(--ok)}
.badge--info{background:var(--info-soft);color:var(--info)}
.badge--warn{background:var(--warn-soft);color:var(--warn)}
.badge--danger{background:var(--danger-soft);color:var(--danger)}
.badge--muted{background:var(--line-2);color:var(--ink-2)}
.badge--brass{background:var(--brass-soft);color:var(--brass)}

/* ---------- forms ---------- */
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem}
.field{display:flex;flex-direction:column;gap:.3rem}
.field--full{grid-column:1/-1}
.field label{font-size:var(--fs-13);color:var(--ink-2);font-weight:550}
.field .hint{font-size:var(--fs-12);color:var(--ink-3)}
.field__err{font-size:var(--fs-12);color:var(--danger)}
.field__err:empty{display:none}
.pinhint{font-size:var(--fs-12);color:var(--ink-3);line-height:1.35}
.pinhint:empty{display:none}
.pinhint.is-ok{color:var(--ok)}
.pinhint.is-bad{color:var(--danger)}
.pinhint__use{background:none;border:0;padding:0;font:inherit;color:var(--brand);text-decoration:underline;cursor:pointer}
input[type=text],input[type=email],input[type=password],input[type=number],input[type=date],
input[type=time],input[type=search],input[type=tel],select,textarea{
  width:100%;min-height:36px;padding:.4rem .6rem;border:1px solid var(--line);border-radius:var(--r-sm);
  background:var(--surface);color:var(--ink);font:inherit;font-size:var(--fs-14);
}
textarea{min-height:90px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--brand);outline:none;box-shadow:0 0 0 3px var(--brand-soft)}
input[disabled],select[disabled]{background:var(--line-2);color:var(--ink-3)}
.checkline{display:flex;align-items:center;gap:.5rem;font-size:var(--fs-14);color:var(--ink-2)}
.checkline input{width:16px;height:16px;min-height:0;accent-color:var(--brand)}
fieldset{border:1px solid var(--line);border-radius:var(--r);padding:1rem;margin:0 0 1rem}
legend{font-size:var(--fs-13);font-weight:640;padding:0 .4rem;color:var(--ink-2)}
.form-actions{display:flex;gap:.5rem;justify-content:flex-end;padding-top:.5rem}

/* filter bar */
.filters{display:flex;flex-wrap:wrap;gap:.5rem;align-items:flex-end;margin-bottom:1rem}
.filters .field{min-width:150px}
.chipbar{display:flex;gap:.35rem;flex-wrap:wrap}
.chip{padding:.3rem .7rem;border-radius:999px;border:1px solid var(--line);background:var(--surface);
  font-size:var(--fs-13);color:var(--ink-2);cursor:pointer}
.chip:hover{background:var(--surface-2);text-decoration:none}
.chip.is-active{background:var(--ink);border-color:var(--ink);color:#fff}

/* ---------- grid helpers ---------- */
.grid{display:grid;gap:1rem}
.grid--2{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
.grid--3{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.split{display:grid;grid-template-columns:2fr 1fr;gap:1rem}
@media (max-width:1100px){.split{grid-template-columns:1fr}}
.stack{display:flex;flex-direction:column;gap:1rem}
.row{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}

/* ---------- charts ---------- */
.chartbox{position:relative;width:100%;height:260px}
.chartbox canvas{width:100%;height:100%;display:block}
.legend{display:flex;gap:1rem;flex-wrap:wrap;font-size:var(--fs-12);color:var(--ink-2);margin-top:.5rem}
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:.35rem}

/* ---------- states ---------- */
.empty{padding:2.25rem 1rem;text-align:center;color:var(--ink-3)}
.empty h4{color:var(--ink-2);margin-bottom:.35rem}
.skeleton{background:linear-gradient(90deg,var(--line-2),#F6F7F5,var(--line-2));background-size:200% 100%;
  animation:sk 1.2s linear infinite;border-radius:var(--r-sm);height:14px}
@keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* ---------- toast ---------- */
.toasts{position:fixed;right:1rem;bottom:1rem;z-index:200;display:flex;flex-direction:column;gap:.5rem;max-width:360px}
.toast{background:var(--ink);color:#fff;padding:.7rem .9rem;border-radius:var(--r);box-shadow:var(--shadow);
  font-size:var(--fs-14);display:flex;gap:.5rem;align-items:flex-start}
.toast--success{background:var(--brand-dark)}
.toast--danger{background:var(--danger)}
.toast--warning{background:var(--warn)}
.toast button{margin-left:auto;background:none;border:0;color:inherit;opacity:.7;cursor:pointer}

/* ---------- modal ---------- */
.modal{position:fixed;inset:0;background:rgba(14,33,28,.5);display:none;z-index:150;
  align-items:center;justify-content:center;padding:1rem}
.modal.is-open{display:flex}
.modal__box{background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow);width:100%;max-width:440px;overflow:hidden}
.modal__head{padding:1rem 1.1rem .25rem}
.modal__body{padding:.5rem 1.1rem 1rem;color:var(--ink-2)}
.modal__foot{display:flex;gap:.5rem;justify-content:flex-end;padding:.85rem 1.1rem;background:var(--surface-2);
  border-top:1px solid var(--line-2)}

/* ---------- auth ---------- */
.auth{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr}
.auth__aside{background:linear-gradient(170deg,#0E211C 30%,#16302a);color:#DDE7E3;padding:3rem;
  display:flex;flex-direction:column;justify-content:space-between}
.auth__aside h2{color:#fff;font-size:1.9rem;max-width:16ch;line-height:1.25}
.auth__aside p{color:#A9BEB8;max-width:44ch}
.auth__stats{display:flex;gap:2rem;flex-wrap:wrap}
.auth__stat b{display:block;color:#fff;font-size:1.35rem}
.auth__stat span{font-size:var(--fs-12);color:#8FA9A2}
.auth__panel{display:grid;place-items:center;padding:2rem;background:var(--surface);overflow-y:auto}
.auth__form{width:100%;max-width:360px}
.auth__form h1{margin-bottom:.35rem}
.auth__form .field{margin-bottom:.85rem}
@media (max-width:900px){.auth{grid-template-columns:1fr}.auth__aside{display:none}}

/* ---------- alerts ---------- */
.alert{padding:.7rem .9rem;border-radius:var(--r-sm);font-size:var(--fs-14);margin-bottom:.75rem;border:1px solid transparent}
.alert--success{background:var(--ok-soft);color:var(--brand-dark);border-color:#CBE3DA}
.alert--danger{background:var(--danger-soft);color:var(--danger);border-color:#F2CFCB}
.alert--warning{background:var(--warn-soft);color:var(--warn);border-color:#EEDCB6}
.alert--info{background:var(--info-soft);color:var(--info);border-color:#CFE0EE}

/* ---------- pagination ---------- */
.pager{display:flex;gap:.3rem;align-items:center;justify-content:flex-end;padding:.75rem 1rem}
.pager a,.pager span{padding:.3rem .6rem;border-radius:var(--r-sm);border:1px solid var(--line);
  font-size:var(--fs-13);color:var(--ink-2);background:var(--surface)}
.pager .is-current{background:var(--ink);border-color:var(--ink);color:#fff}

/* ---------- permission matrix ---------- */
.matrix{width:100%;font-size:var(--fs-13)}
.matrix th{text-align:center;padding:.5rem}
.matrix th:first-child{text-align:left}
.matrix td{text-align:center;padding:.4rem .5rem;border-bottom:1px solid var(--line-2)}
.matrix td:first-child{text-align:left;font-weight:550}
.matrix input{width:16px;height:16px;accent-color:var(--brand)}
.matrix td.matrix__other{text-align:left;white-space:nowrap}
.matrix__other .checkline{display:inline-flex;align-items:center;gap:.3rem;margin-right:.6rem;font-weight:400}

/* ---------- mobile ---------- */
.rail__scrim{display:none}
@media (max-width:960px){
  .rail{transform:translateX(-100%);transition:transform .2s ease;width:260px;flex-basis:260px}
  body.rail-open .rail{transform:none}
  body.rail-open .rail__scrim{display:block;position:fixed;inset:0;background:rgba(14,33,28,.45);z-index:55}
  .main{margin-left:0}
  body.rail-collapsed .main{margin-left:0}
  .page{padding:1rem .75rem 3rem}
  .search{max-width:none}
  .hotelpick__btn b{max-width:90px}
  .form-grid{grid-template-columns:1fr}
}
@media (max-width:600px){
  .kpis{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
  .kpi__value{font-size:var(--fs-20)}
  .page__actions{width:100%}
}

/* ---------- print ---------- */
@media print{
  .rail,.topbar,.page__actions,.filters,.btn,.pager,.toasts{display:none!important}
  .main{margin:0}
  .card{box-shadow:none;border-color:#ccc;break-inside:avoid}
  body{background:#fff}
  .page{padding:0;max-width:none}
  a[href]::after{content:""}
}

/* ==========================================================================
   Phase 2 — rooms, calendar, front desk, folio
   ========================================================================== */

/* --- room grid ----------------------------------------------------------- */
.roomgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: .6rem;
}
.roomtile {
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink-3);
  border-radius: 10px;
  padding: .6rem .7rem;
  background: var(--surface);
  display: flex; flex-direction: column; gap: .15rem;
  min-height: 108px;
}
.roomtile__top { display: flex; align-items: center; justify-content: space-between; }
.roomtile__top b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.roomtile__type { font-size: var(--fs-12); color: var(--ink-2); }
.roomtile__guest { font-size: var(--fs-13); font-weight: 600; margin-top: .15rem; }
.roomtile__meta { font-size: var(--fs-12); color: var(--ink-3); }
.roomtile__foot {
  margin-top: auto; display: flex; gap: .5rem; align-items: center;
  font-size: var(--fs-12); padding-top: .35rem;
}
.roomtile--available    { border-left-color: var(--ok); }
.roomtile--occupied     { border-left-color: var(--brand); background: var(--surface-2); }
.roomtile--reserved     { border-left-color: var(--warn); }
.roomtile--blocked      { border-left-color: var(--ink-3); }
.roomtile--out_of_order,
.roomtile--out_of_service { border-left-color: var(--danger); background: #FDF3F2; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--ink-3); }
.dot--clean     { background: var(--ok); }
.dot--dirty     { background: var(--danger); }
.dot--cleaning  { background: var(--warn); }
.dot--inspected { background: var(--brand); }

.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--brand); font: inherit; font-size: var(--fs-12); text-decoration: underline;
}
.linkish:hover { color: var(--brand-ink); }

/* --- tape chart (reservation calendar) ----------------------------------- */
.tape { overflow-x: auto; }
.tape table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.tape th, .tape td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-soft); }
.tape thead th {
  position: sticky; top: 0; z-index: 3; background: var(--surface-2);
  font-size: var(--fs-12); font-weight: 600; color: var(--ink-2);
  padding: .35rem .3rem; text-align: center; white-space: nowrap; min-width: 46px;
}
.tape thead th.is-weekend { background: #EFEFEA; }
.tape thead th.is-today { background: var(--brand); color: #fff; }
.tape .tape__room {
  position: sticky; left: 0; z-index: 2; background: var(--surface);
  min-width: 150px; padding: .35rem .6rem; text-align: left; font-weight: 600;
}
.tape thead .tape__room { z-index: 4; background: var(--surface-2); }
.tape .tape__room small { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--fs-12); }
.tape td.cell { height: 38px; padding: 0; position: relative; }
.tape td.cell.is-weekend { background: #FAFAF7; }
.tape td.cell.is-blocked { background: repeating-linear-gradient(45deg, #F1EEE9, #F1EEE9 4px, #E6E2DB 4px, #E6E2DB 8px); }
.stay {
  position: absolute; inset: 3px 2px; border-radius: 6px;
  font-size: var(--fs-12); line-height: 1.5; padding: 0 .4rem;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: #fff; background: var(--brand); text-decoration: none; display: block;
}
.stay:hover { filter: brightness(1.08); color: #fff; }
.stay--reserved   { background: #C0392B; }
.stay--tentative  { background: #2563B0; }
.stay--checked_in { background: #1E7B4F; }
.stay--checked_out{ background: #CBD1CE; color: #16221E; }
.stay--checked_out:hover { color: #16221E; }
.stay--due        { box-shadow: inset 0 0 0 2px var(--brass); }
.tape-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: var(--fs-12); color: var(--ink-2); }
.tape-legend span::before {
  content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 3px;
  margin-right: .35rem; vertical-align: -1px; background: var(--brand);
}
.tape-legend span::before { background: #1E7B4F; }
.tape-legend .lg-reserved::before { background: #C0392B; }
.tape-legend .lg-tentative::before { background: #2563B0; }
.tape-legend .lg-out::before      { background: #CBD1CE; }
.tape-legend .lg-block::before    { background: #E6E2DB; }

/* --- booking form room lines --------------------------------------------- */
.linerow {
  display: grid; gap: .5rem; align-items: end;
  grid-template-columns: 2fr 2fr 80px 80px 1.2fr 40px;
  padding: .6rem 0; border-bottom: 1px dashed var(--line);
}
.linerow:last-of-type { border-bottom: 0; }
.linerow .field { margin: 0; }
@media (max-width: 800px) { .linerow { grid-template-columns: 1fr 1fr; } }

.quote { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.quote div { min-width: 110px; }
.quote .kpi__value { font-size: 1.15rem; }

/* --- guest picker --------------------------------------------------------- */
.picker { position: relative; }
.picker__results {
  position: absolute; z-index: 20; top: 100%; left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 300px; overflow: auto; display: none;
}
.picker__results.is-open { display: block; }
.picker__item { padding: .5rem .75rem; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.picker__item:hover, .picker__item.is-active { background: var(--surface-2); }
.picker__item small { display: block; color: var(--ink-3); font-size: var(--fs-12); }
.chosen {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}

/* --- tabs ----------------------------------------------------------------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a {
  padding: .55rem .9rem; border-radius: 8px 8px 0 0; color: var(--ink-2);
  text-decoration: none; font-size: var(--fs-13); font-weight: 600; border: 1px solid transparent;
  border-bottom: 0; margin-bottom: -1px;
}
.tabs a:hover { background: var(--surface-2); }
.tabs a.is-active { background: var(--surface); border-color: var(--line); color: var(--brand-ink); }
.tabs .count { color: var(--ink-3); font-weight: 400; }

/* --- printable documents --------------------------------------------------- */
.doc {
  max-width: 820px; margin: 1.5rem auto; background: #fff; color: #111;
  padding: 2.2rem 2.4rem; border: 1px solid var(--line); border-radius: 12px;
}
.doc__head { display: flex; justify-content: space-between; gap: 2rem; border-bottom: 2px solid #111; padding-bottom: 1rem; }
.doc__head h1 { font-size: 1.4rem; margin: 0; }
.doc__meta { text-align: right; font-size: var(--fs-13); }
.doc h2 { font-size: 1rem; margin: 1.5rem 0 .5rem; text-transform: uppercase; letter-spacing: .04em; }
.doc table { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.doc th, .doc td { padding: .45rem .5rem; border-bottom: 1px solid #E3E3DE; text-align: left; }
.doc th { background: #F4F4F0; font-weight: 600; }
.doc td.num, .doc th.num { text-align: right; font-variant-numeric: tabular-nums; }
.doc__totals { margin-left: auto; width: 320px; }
.doc__totals tr:last-child td { border-top: 2px solid #111; font-weight: 700; font-size: 1rem; }
.doc__foot { margin-top: 2rem; font-size: var(--fs-12); color: #555; border-top: 1px solid #E3E3DE; padding-top: .75rem; }
.doc__sign { display: flex; justify-content: space-between; margin-top: 3rem; font-size: var(--fs-12); }
.doc__sign div { border-top: 1px solid #111; padding-top: .35rem; width: 200px; text-align: center; }
/* The provisional bill has to be unmistakable on paper, so it is marked with ink, not colour. */
.doc__stamp { display: inline-block; border: 2px solid #111; padding: .1rem .4rem; font-weight: 700; letter-spacing: .06em; }
/* The check-with-the-guest strip: a few facts side by side, each with its own quiet label. */
.verify { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .75rem 1.25rem; }
.verify > div > span.t-muted { display: block; font-size: var(--fs-12); }
.verify > div > b { font-size: var(--fs-15); }
.doc__note { margin-top: 1rem; border: 1px solid #111; border-left-width: 4px; padding: .6rem .75rem; font-size: var(--fs-13); }
.printbar { max-width: 820px; margin: 1rem auto 0; display: flex; gap: .5rem; justify-content: flex-end; }

@media print {
  .printbar, .toasts { display: none !important; }
  .doc { border: 0; margin: 0; max-width: none; padding: 0; }
  body { background: #fff; }
}

/* ==========================================================================
   Phase 3 — housekeeping board, maintenance
   ========================================================================== */

.board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: .75rem; align-items: start; }
@media (max-width: 1200px) { .board { grid-template-columns: repeat(3, minmax(210px, 1fr)); } }
@media (max-width: 760px)  { .board { grid-template-columns: 1fr; } }

.board__col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .6rem; }
.board__head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-12); font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-2); padding: .1rem .2rem .5rem;
}
.board__head .n {
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: .05rem .45rem; font-size: var(--fs-12); letter-spacing: 0;
}
.board__empty { font-size: var(--fs-12); color: var(--ink-3); padding: .75rem .3rem; text-align: center; }

.task {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ink-3);
  border-radius: 9px; padding: .55rem .6rem; margin-bottom: .5rem;
}
.task--urgent   { border-left-color: var(--danger); }
.task--high     { border-left-color: var(--warn); }
.task--normal   { border-left-color: var(--brand); }
.task--low      { border-left-color: var(--ink-3); }
.task__top { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; }
.task__room { font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; }
.task__type { font-size: var(--fs-12); color: var(--ink-2); }
.task__meta { font-size: var(--fs-12); color: var(--ink-3); margin-top: .15rem; }
.task__actions { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.task__actions form { display: inline; }
.task select { font-size: var(--fs-12); padding: .2rem .3rem; width: 100%; margin-top: .35rem; }

.chip--prio { font-size: var(--fs-12); padding: .05rem .4rem; border-radius: 999px; border: 1px solid var(--line); }
.chip--urgent, .chip--critical { background: #FDECEA; border-color: #F3C4BE; color: #8C2F22; }
.chip--high   { background: #FDF3E2; border-color: #EBD4A6; color: #7A5314; }
.chip--medium, .chip--normal { background: var(--surface-2); }
.chip--low    { color: var(--ink-3); }

/* ==========================================================================
   Phase 4 — point of sale, kitchen display
   ========================================================================== */

.pos { display: grid; grid-template-columns: 1fr 360px; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .pos { grid-template-columns: 1fr; } }

.menugrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.menutile {
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: .55rem .6rem; text-align: left; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: .15rem; min-height: 84px;
}
.menutile:hover { border-color: var(--brand); background: var(--surface-2); }
.menutile:disabled { opacity: .45; cursor: not-allowed; }
.menutile__name { font-weight: 600; font-size: var(--fs-13); line-height: 1.3; }
.menutile__price { margin-top: auto; font-variant-numeric: tabular-nums; color: var(--brass); font-weight: 600; }
.menutile__meta { font-size: var(--fs-12); color: var(--ink-3); }
.veg, .nonveg {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px;
  border: 1.5px solid var(--ok); position: relative;
}
.nonveg { border-color: #A33; }
.veg::after, .nonveg::after {
  content: ''; position: absolute; inset: 2px; border-radius: 50%; background: var(--ok);
}
.nonveg::after { background: #A33; }

.cart { }
.cartline {
  display: grid; grid-template-columns: 1fr auto; gap: .3rem .5rem;
  padding: .45rem 0; border-bottom: 1px solid var(--line-soft);
}
.cartline__name { font-size: var(--fs-13); font-weight: 600; }
.cartline__meta { font-size: var(--fs-12); color: var(--ink-3); }
.cartline__amt { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.cartline--cancelled { opacity: .45; text-decoration: line-through; }
.cartline__qty { display: flex; gap: .2rem; align-items: center; margin-top: .2rem; }
.cartline__qty button {
  width: 24px; height: 24px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 6px; cursor: pointer; font: inherit; line-height: 1;
}
.cartline__qty button:hover { border-color: var(--brand); }
.carttotals { font-variant-numeric: tabular-nums; }
.carttotals tr td:last-child { text-align: right; }
.carttotals tr:last-child { font-weight: 700; font-size: 1.05rem; }

.tablemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: .6rem; }
.tabletile {
  border: 1px solid var(--line); border-top: 4px solid var(--ok); border-radius: 10px;
  background: var(--surface); padding: .6rem; text-align: center; min-height: 96px;
  display: flex; flex-direction: column; gap: .15rem; align-items: center; justify-content: center;
}
/* Free is green, a table with a bill running is red (12 Nov 2026 meeting). */
.tabletile--occupied { border-top-color: #B42318; background: #FBF1F0; }
.tabletile--reserved { border-top-color: var(--warn); }
.tabletile--blocked  { border-top-color: var(--ink-3); opacity: .6; }
.tabletile__no { font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tabletile__meta { font-size: var(--fs-12); color: var(--ink-3); }

/* Open a table by typing its number, and the whole floor folded away under it. */
.posopen { display: flex; gap: .5rem; align-items: center; }
.posopen input { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 650; }
.posmap summary { cursor: pointer; font-size: var(--fs-13); font-weight: 600; color: var(--ink-2); }
.posmap summary:hover { color: var(--ink); }

.kotboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; align-items: start; }
@media (max-width: 900px) { .kotboard { grid-template-columns: 1fr; } }
.kotcard {
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--brand);
  border-radius: 10px; padding: .6rem .7rem; margin-bottom: .6rem;
}
.kotcard--late { border-left-color: var(--danger); }
.kotcard__head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.kotcard__no { font-weight: 700; font-variant-numeric: tabular-nums; }
.kotcard__where { font-size: var(--fs-12); color: var(--ink-2); }
.kotcard__age { font-size: var(--fs-12); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.kotcard ul { list-style: none; margin: .45rem 0 0; padding: 0; }
.kotcard li {
  display: flex; justify-content: space-between; gap: .5rem;
  padding: .2rem 0; font-size: var(--fs-14); border-bottom: 1px dashed var(--line-soft);
}
.kotcard li:last-child { border-bottom: 0; }
.kotcard li .q { font-weight: 700; font-variant-numeric: tabular-nums; }
.kotcard li small { display: block; color: var(--ink-3); font-size: var(--fs-12); }
.kotcard li.is-done { opacity: .5; text-decoration: line-through; }
.kotcard__actions { display: flex; gap: .35rem; margin-top: .5rem; flex-wrap: wrap; }
.kotcard__actions form { display: inline; }

.ticket { max-width: 320px; margin: 1rem auto; background: #fff; color: #111;
  padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 8px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; }
/* The second kitchen copy starts on its own slip (two tickets come out of the printer: steward and chef). */
.ticket--next { border-top: 2px dashed #999; padding-top: .8rem; break-before: page; page-break-before: always; }
.ticket h1 { font-size: 15px; margin: 0 0 .2rem; text-align: center; }
.ticket .c { text-align: center; }
.ticket hr { border: 0; border-top: 1px dashed #999; margin: .5rem 0; }
.ticket table { width: 100%; border-collapse: collapse; }
.ticket td { padding: .12rem 0; vertical-align: top; }
.ticket td.r { text-align: right; white-space: nowrap; }
@media print { .ticket { border: 0; margin: 0; max-width: none; } }

/* ------------------------------------------------------------------ *
 * Demo sign-in panel (login page only, and only while demo.enabled)
 * ------------------------------------------------------------------ */
.auth__note {
  margin-top: 2rem;
  padding: 1rem 1.1rem;
  border-left: 2px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.05);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.auth__note b { color: #fff; font-size: var(--fs-13); }
.auth__note p { margin: .4rem 0 0; font-size: var(--fs-13); line-height: 1.6; }

.auth__form--wide { max-width: 440px; }

.demo {
  margin-top: 1.75rem;
  padding: 1rem 1.1rem 1.1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.demo__title {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .9rem;
}
.demo__title span { font-size: var(--fs-14); font-weight: 600; color: var(--ink); }
.demo__title small { font-size: var(--fs-12); color: var(--ink-3); }

.demo__row {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
}
.demo__row .field { margin: 0; min-width: 0; }
.demo__row .field label {
  display: block;
  margin-bottom: .2rem;
  font-size: var(--fs-12);
  color: var(--ink-3);
}
.demo__row .field select { width: 100%; }
.demo__row .btn { flex: 0 0 auto; height: 38px; }

.demo__note {
  margin: .35rem 0 0;
  min-height: 1.1em;
  font-size: var(--fs-12);
  color: var(--ink-3);
}

.demo__sep {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 1rem 0 .85rem;
  color: var(--ink-3);
  font-size: var(--fs-12);
}
.demo__sep::before,
.demo__sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.demo__warn {
  margin: 1rem 0 0;
  padding: .6rem .7rem;
  background: var(--warn-soft);
  border-radius: var(--r-sm);
  font-size: var(--fs-12);
  line-height: 1.55;
  color: var(--ink-2);
}
.demo__warn code {
  background: rgba(0,0,0,.06);
  padding: .05rem .25rem;
  border-radius: 3px;
}

@media (max-width: 620px) {
  .demo__row { flex-wrap: wrap; }
  .demo__row .field { flex: 1 1 100%; }
  .demo__row .btn { width: 100%; }
}

/* =====================================================================
   Upgrade phase 1 · housekeeping colours, day lock, approvals, room move
   Dirty = red · Cleaning = yellow · Clean / inspected = green
   ===================================================================== */
:root {
  --hk-dirty: #C0392B;    --hk-dirty-soft: #FBE3E0;
  --hk-cleaning: #B8860B; --hk-cleaning-soft: #FFF3C4;
  --hk-clean: #1E7B4F;    --hk-clean-soft: #DFF3E7;
  --hk-ooo: #5B6770;      --hk-ooo-soft: #E9ECEE;
}
.hk { display:inline-flex; align-items:center; gap:.3rem; padding:.12rem .5rem; border-radius:999px;
      font-size:var(--fs-12); font-weight:600; line-height:1.5; white-space:nowrap; }
.hk::before { content:''; width:7px; height:7px; border-radius:50%; background:currentColor; }
.hk--dirty     { background:var(--hk-dirty-soft);    color:var(--hk-dirty); }
.hk--cleaning  { background:var(--hk-cleaning-soft); color:var(--hk-cleaning); }
.hk--clean,
.hk--inspected { background:var(--hk-clean-soft);    color:var(--hk-clean); }

.dot--clean     { background: var(--hk-clean); }
.dot--inspected { background: var(--hk-clean); box-shadow: 0 0 0 2px var(--hk-clean-soft); }
.dot--dirty     { background: var(--hk-dirty); }
.dot--cleaning  { background: var(--hk-cleaning); }

/* room grid: the tile is tinted by housekeeping status */
.roomtile.hkbg--dirty    { background: var(--hk-dirty-soft); }
.roomtile.hkbg--cleaning { background: var(--hk-cleaning-soft); }

.hk-legend { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; font-size:var(--fs-12); color:var(--ink-2); margin:0 0 .75rem; }

/* housekeeping colour board */
.hkboard { display:grid; grid-template-columns:repeat(auto-fill, minmax(132px, 1fr)); gap:.6rem; }
.hkroom { border-radius:10px; padding:.6rem .7rem; border:1px solid transparent; display:flex; flex-direction:column;
          gap:.1rem; min-height:92px; color:var(--ink); }
.hkroom b { font-size:1.15rem; font-variant-numeric:tabular-nums; }
.hkroom small { font-size:var(--fs-12); color:var(--ink-2); }
.hkroom__state { font-size:var(--fs-12); font-weight:700; margin-top:auto; }
.hkroom--dirty     { background:var(--hk-dirty-soft);    border-color:#F0B8B1; }
.hkroom--dirty .hkroom__state { color:var(--hk-dirty); }
.hkroom--cleaning  { background:var(--hk-cleaning-soft); border-color:#EED477; }
.hkroom--cleaning .hkroom__state { color:var(--hk-cleaning); }
.hkroom--clean,
.hkroom--inspected { background:var(--hk-clean-soft);    border-color:#B5DEC6; }
.hkroom--clean .hkroom__state,
.hkroom--inspected .hkroom__state { color:var(--hk-clean); }
.hkroom--ooo       { background:var(--hk-ooo-soft);      border-color:#CDD3D7; }
.hkroom--ooo .hkroom__state { color:var(--hk-ooo); }
.hkroom__flag { font-size:10px; font-weight:700; border-radius:4px; padding:0 .3rem; background:var(--surface);
                color:var(--ink-2); align-self:flex-start; }

/* closed day marker on folio lines and elsewhere */
.lockchip { display:inline-flex; align-items:center; gap:.25rem; font-size:var(--fs-12); color:var(--info);
            background:var(--info-soft); border-radius:999px; padding:.05rem .45rem; white-space:nowrap; }
.pendingchip { display:inline-flex; font-size:var(--fs-12); color:var(--warn); background:var(--warn-soft);
               border-radius:999px; padding:.05rem .45rem; white-space:nowrap; font-weight:600; }

.rail__count { margin-left:auto; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--danger);
               color:#fff; font-size:10px; font-weight:700; display:inline-grid; place-items:center; }

.seg { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.seg label { display:flex; align-items:center; gap:.3rem; padding:.35rem .6rem; font-size:var(--fs-13); cursor:pointer; margin:0; }
.seg label + label { border-left:1px solid var(--line); }
.seg input { margin:0; }
.table td.num, .table th.num { white-space: nowrap; }
.table td.desc-cell { min-width: 190px; }
/* grid children must be allowed to shrink, or a wide table pushes the side column off screen */
.split > *, .stack > * { min-width: 0; }

/* =====================================================================
   Upgrade phase 5 · text size, department menu, org chart
   ===================================================================== */
html[data-font="large"]  { font-size: 112.5%; }
html[data-font="xlarge"] { font-size: 125%; }
.fontpick { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.fontpick button { background:var(--surface); border:0; padding:.3rem .5rem; cursor:pointer; color:var(--ink-2); line-height:1; }
.fontpick button + button { border-left:1px solid var(--line); }
.fontpick button.is-active { background:var(--brand); color:#fff; }
.rail__more { margin-top:.35rem; }
.rail__more > summary { list-style:none; cursor:pointer; }
.rail__more > summary::-webkit-details-marker { display:none; }
.rail__more[open] > summary { opacity:.8; }
.orgnode { padding:.4rem .6rem; border-left:3px solid var(--brand); background:var(--surface-2); border-radius:6px; margin-bottom:.35rem; }

/* Right-hand column that stays in view while the form scrolls.
   The whole column sticks (not one card inside it), so cards never slide over each other,
   and it sits below the sticky top bar. */
@media (min-width:1101px){
  .aside-sticky{
    position:sticky; top:calc(var(--topbar-h, 64px) + 1rem); align-self:start;
    max-height:calc(100vh - var(--topbar-h, 64px) - 2rem); overflow-y:auto; overscroll-behavior:contain;
    padding-right:2px;
  }
}

/* Booking form: ID upload row under each guest */
.idrow { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; margin:.45rem 0 .2rem; }
.idrow select { width:auto; min-width:120px; padding:.3rem .5rem; }
.idrow > .t-muted { flex:1 1 180px; font-size:var(--fs-12); }
.filebtn { position:relative; display:inline-flex; align-items:center; gap:.3rem; border:1px dashed var(--line); border-radius:8px;
  padding:.3rem .6rem; font-size:var(--fs-12); cursor:pointer; background:var(--surface); white-space:nowrap; }
.filebtn input[type=file] { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.filebtn.is-set { border-style:solid; border-color:var(--brand); color:var(--brand); font-weight:600; }
.extraguest { border-top:1px solid var(--line); padding-top:.5rem; margin-top:.5rem; }
.extraguest:first-child { border-top:0; margin-top:0; padding-top:0; }

/* Guest ID uploads and document thumbnails */
.idupload { margin-top:.9rem; padding-top:.8rem; border-top:1px solid var(--line); }
.docthumbs { display:grid; grid-template-columns:repeat(auto-fill, minmax(110px, 1fr)); gap:.5rem; margin-top:.6rem; }
.docthumb { display:flex; flex-direction:column; gap:.25rem; border:1px solid var(--line); border-radius:8px; padding:.35rem; background:var(--surface); color:var(--ink); text-decoration:none; }
.docthumb img { width:100%; height:80px; object-fit:cover; border-radius:6px; background:var(--surface-2); }
.docthumb__pdf { height:80px; display:flex; align-items:center; justify-content:center; border-radius:6px; background:var(--surface-2); font-weight:700; color:var(--ink-2); }
.docthumb small { font-size:var(--fs-12); color:var(--ink-2); line-height:1.2; }
.docthumb:hover { border-color:var(--brand); }
.idupload .hint { display:block; font-size:var(--fs-12); color:var(--ink-2); margin-top:.3rem; }

/* Filter bar check boxes: same height as the inputs and buttons beside them */
.filtercheck { display:inline-flex; align-items:center; gap:.45rem; min-height:36px; padding:0 .75rem;
  border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface);
  font-size:var(--fs-14); color:var(--ink-2); cursor:pointer; white-space:nowrap; user-select:none; }
.filtercheck input { width:16px; height:16px; min-height:0; margin:0; accent-color:var(--brand); }
.filtercheck:hover { background:var(--surface-2); }
.filtercheck:has(input:checked) { border-color:var(--brand); color:var(--brand); font-weight:600; }
.filters > .btn { min-height:36px; }

/* Help & FAQs */
.help { display:grid; grid-template-columns:270px 1fr; gap:1rem; align-items:start; }
@media (max-width:1000px){ .help { grid-template-columns:1fr; } .help-toc { position:static !important; max-height:none !important; } }
.help-toc { position:sticky; top:calc(var(--topbar-h, 64px) + 1rem); max-height:calc(100vh - var(--topbar-h, 64px) - 2rem); overflow-y:auto;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:.75rem; }
.help-search { position:relative; }
.help-search svg { position:absolute; left:.6rem; top:50%; transform:translateY(-50%); color:var(--ink-3, #888); }
.help-search input { padding-left:2rem; }
.help-count { font-size:var(--fs-12); margin:.35rem 0; min-height:1em; }
.help-toc__list { display:flex; flex-direction:column; gap:1px; }
.help-toc__list a { display:block; padding:.25rem .45rem; border-radius:6px; color:var(--ink-2); font-size:var(--fs-13); text-decoration:none; line-height:1.3; }
.help-toc__list a:hover { background:var(--surface-2); color:var(--ink); }
.help-toc__l2 { font-weight:650; color:var(--ink) !important; margin-top:.5rem; }
.help-toc__l3 { padding-left:1rem !important; }
.help-lang { display:inline-flex; gap:.25rem; }
.help-doc { font-size:var(--fs-14); line-height:1.6; color:var(--ink); max-width:100%; }
.help-doc h2 { font-size:1.35rem; margin:1.6rem 0 .6rem; padding-top:.6rem; border-top:1px solid var(--line); scroll-margin-top:calc(var(--topbar-h, 64px) + 1rem); }
.help-doc .help-sec:first-child h2, .help-doc .help-intro + .help-h2 h2 { border-top:0; margin-top:.4rem; }
.help-doc h3 { font-size:1.05rem; margin:1.2rem 0 .45rem; scroll-margin-top:calc(var(--topbar-h, 64px) + 1rem); }
.help-doc p { margin:.4rem 0 .6rem; }
.help-doc ol, .help-doc ul { margin:.3rem 0 .8rem 1.3rem; padding:0; }
.help-doc li { margin:.2rem 0; }
.help-doc code { background:var(--surface-2); padding:.05rem .3rem; border-radius:4px; font-size:.92em; }
.help-doc .tablewrap { margin:.5rem 0 1rem; border:1px solid var(--line); border-radius:var(--r-sm); overflow-x:auto; }
.help-doc table td, .help-doc table th { vertical-align:top; font-size:var(--fs-13); }
.help-doc tr.is-mine td { background:var(--hk-clean-soft, #e7f6ee); font-weight:600; }
.help-doc mark.help-hit { background:#ffe58a; color:inherit; padding:0 1px; border-radius:2px; }
.flow { display:flex; flex-direction:column; gap:.4rem; margin:.5rem 0 1rem; padding:.75rem; background:var(--surface-2); border-radius:var(--r-sm); }
.flow__row { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; }
.flow__node { display:inline-block; background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:.15rem .6rem; font-size:var(--fs-13); }
.flow__node--from { border-color:var(--brand); color:var(--brand); font-weight:600; }
.flow__arrow { color:var(--ink-2); }
.flow__if { font-size:var(--fs-12); color:var(--ink-2); font-style:italic; }
.flow__to { display:inline-flex; flex-wrap:wrap; gap:.3rem; }
.help-role { margin-bottom:1rem; }
@media print { .help-toc, .help-role, .page__actions { display:none !important; } .help { display:block; } .help-doc[hidden] { display:none !important; } }

/* ==========================================================================
   Room operations: the drop-down in the side menu, and the list page
   ========================================================================== */
.rail__group > summary { list-style:none; cursor:pointer; user-select:none; }
.rail__group > summary::-webkit-details-marker { display:none; }
.rail__group > summary.is-current { color:#fff; }
.rail__caret {
  margin-left:auto; width:7px; height:7px; flex:0 0 7px; opacity:.7;
  border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
  transform:translateY(-2px) rotate(45deg); transition:transform .15s ease;
}
.rail__group[open] > summary .rail__caret { transform:translateY(2px) rotate(225deg); }
.rail__sub { padding:.1rem 0 .45rem; }
.rail__subhead {
  padding:.6rem .625rem .2rem 2.35rem; font-size:10.5px; font-weight:600; letter-spacing:.06em;
  text-transform:uppercase; color:#6E8780;
}
.rail__sublink {
  display:flex; align-items:center; gap:.5rem; padding:.32rem .625rem .32rem 2.35rem; margin-bottom:1px;
  border-radius:var(--r-sm); color:var(--rail-text); font-size:var(--fs-13); line-height:1.3;
}
.rail__sublink span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rail__sublink:hover { background:var(--rail-2); color:var(--rail-active); text-decoration:none; }
.rail__sublink.is-active { background:var(--rail-2); color:#fff; box-shadow:inset 2px 0 0 var(--brand); }
.rail__n {
  flex:0 0 auto; min-width:18px; height:18px; padding:0 5px; border-radius:9px; display:inline-grid; place-items:center;
  font-size:10.5px; font-weight:700; font-style:normal; font-variant-numeric:tabular-nums;
  background:rgba(255,255,255,.1); color:#C3D4CE;
}
.rail__n--alert { background:var(--danger); color:#fff; }
.rail__n--info  { background:#2B5C88; color:#fff; }
body.rail-collapsed .rail__sub, body.rail-collapsed .rail__caret { display:none; }

.ops__chips { margin:-.35rem 0 1rem; }
.ops__table td.ops__acts, .ops__table th.ops__acts { white-space:nowrap; text-align:right; }
.ops__table th.ops__acts, .ops__table td.ops__acts {   /* row buttons stay in view when the table scrolls sideways */
  position:sticky; right:0; z-index:1; background:var(--surface); box-shadow:-10px 0 10px -10px rgba(20,34,30,.25);
}
.ops__table thead th.ops__acts { background:var(--surface-2); }
.ops__table tbody tr:hover td.ops__acts { background:var(--surface-2); }
.ops__table td.ops__nw, .ops__table td .badge, .ops__table .ops__nwi { white-space:nowrap; }
.ops__acts .btn + .btn { margin-left:.3rem; }
.ops__table tfoot td { font-weight:650; background:var(--surface-2); border-top:1px solid var(--line); }
.ops__foot { padding:.6rem 1rem; font-size:var(--fs-12); color:var(--ink-3); border-top:1px solid var(--line-2); }
.ops__sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.t-danger { color:var(--danger); }
.t-warn   { color:var(--warn); }
.printonly { display:none; }
.ops__table .ops__tick { display:none; }   /* a box to tick by hand: on the printout only */
input[aria-invalid="true"] { border-color:var(--danger); box-shadow:0 0 0 3px var(--danger-soft); }
@media print {
  .ops .ops__chips, .ops .ops__acts { display:none !important; }
  .ops .printonly { display:block; margin-bottom:.75rem; font-size:var(--fs-13); }
  .ops__table { font-size:10px; }
  .ops .tablewrap { overflow:visible; }   /* on paper nothing scrolls: every column has to be there */
  .ops__table th, .ops__table td { padding:.3rem .35rem; }
  .ops__table th { white-space:normal; }
  .ops__table .badge { border:1px solid currentColor; }
  .ops__table .ops__tick { display:table-cell; width:3.2rem; text-align:center; }
  .ops__box { display:inline-block; width:12px; height:12px; border:1px solid #000; }
}

/* ==========================================================================
   Management dashboard (Front desk)
   ========================================================================== */
.mgd { display:grid; gap:1rem; margin-bottom:1rem; align-items:start; }
.mgd > * { min-width:0; }
.mgd--top { grid-template-columns:repeat(3, minmax(0,1fr)) minmax(0,1.25fr); }
.mgd--two { grid-template-columns:repeat(2, minmax(0,1fr)); }
.mgd--one { grid-template-columns:minmax(0,1fr); }
.mgd__kpi { height:100%; display:flex; flex-direction:column; justify-content:space-between; }
.mgd__kpi .kpi__value { font-size:var(--fs-32); margin:.6rem 0; }
.mgd__kpi .kpi__meta { display:flex; flex-wrap:wrap; gap:.35rem; align-items:center; }
.mgd__head { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }
.mgd__note { font-size:var(--fs-12); }
.mgd__push { margin-left:auto; }
.mgd__foot { font-size:var(--fs-12); margin:-.4rem 0 1rem; }
.card__body .mgd__foot { margin:.5rem 0 0; }
.mgd__mini td, .mgd__mini th { padding:.42rem .75rem; }
.mgd__total td { font-weight:650; background:var(--surface-2); }
.mgd__tax tr:first-child td { border-top:2px solid var(--line); }
.mgd__today td { background:var(--brand-soft); }
.mgd__todaycol { color:var(--brand-dark) !important; }
.mgd__ason { display:flex; align-items:center; gap:.4rem; margin-left:auto; font-size:var(--fs-12); color:var(--ink-3); white-space:nowrap; }
.mgd__ason input { height:30px; font-size:var(--fs-13); }
.mgd__check { margin:0; font-size:var(--fs-13); }
.mgtabs { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.mgtabs button { background:var(--surface); border:0; padding:.3rem .65rem; font:inherit; font-size:var(--fs-13); color:var(--ink-2); cursor:pointer; }
.mgtabs button + button { border-left:1px solid var(--line); }
.mgtabs button:hover { background:var(--surface-2); }
.mgtabs button.is-active { background:var(--ink); color:#fff; }
@media (max-width:1180px) {
  .mgd--top { grid-template-columns:repeat(3, minmax(0,1fr)); }
  .mgd--top .mgd__house { grid-column:1 / -1; }
  .mgd--two { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:640px) { .mgd--top { grid-template-columns:minmax(0,1fr); } }

/* Hover tip for bar charts (charts.js) */
.charttip {
  position:fixed; z-index:200; display:none; pointer-events:none; min-width:150px; max-width:280px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-sm); box-shadow:var(--shadow);
  padding:.45rem .6rem; font-size:var(--fs-12); color:var(--ink-2);
}
.charttip strong { display:block; color:var(--ink); font-size:var(--fs-13); margin-bottom:.2rem; }
.charttip span { display:flex; align-items:center; gap:.4rem; line-height:1.7; }
.charttip span i { width:9px; height:9px; border-radius:2px; flex:0 0 9px; }
.charttip span b { margin-left:auto; padding-left:.75rem; color:var(--ink); font-variant-numeric:tabular-nums; }
.charttip__total { border-top:1px solid var(--line-2); margin-top:.15rem; padding-top:.1rem; }
@media print {
  .mgtabs, .mgd__ason, .mgd__check, .charttip { display:none !important; }
  .mgd--top { grid-template-columns:repeat(4, minmax(0,1fr)); }
  /* On paper the revenue analysis is the day, the month and the year so far, one under another: the tabs that pick
     one of them on screen are not printed, so all three tables are (PRB-419). The cards go one under another too:
     side by side, half a sheet was too narrow for a table and its last column ran out of the card. */
  .mgd--two { grid-template-columns:minmax(0,1fr); }
  .mgd table[data-panel="revenue"][hidden] { display:table !important; }
  .mgd .card { break-inside:auto; }
  .mgd__printed, .mgd__chartnote { display:block; font-size:var(--fs-12); color:#444; margin:.15rem 0 .5rem; }
}

/* ==========================================================================
   Reservation calendar: front desk view (Hotelogix-style chart), Room legends, House status
   ========================================================================== */
.cal__views { margin-bottom:1rem; }
.mgtabs a { padding:.3rem .75rem; font-size:var(--fs-13); color:var(--ink-2); background:var(--surface); }
.mgtabs a + a { border-left:1px solid var(--line); }
.mgtabs a:hover { background:var(--surface-2); text-decoration:none; }
.mgtabs a.is-active { background:var(--ink); color:#fff; }
.fd__hint { font-size:var(--fs-12); color:var(--ink-3); margin:.5rem 0 0; }
.fd__chart { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); overflow:auto;
             max-height:calc(100vh - 230px); min-height:320px; }
.fd__inner { position:relative; }
/* Each summary row starts with its name in a column of its own (--lab), kept in view when the chart scrolls
   sideways; the lanes of bars start after it, so a bar's left/width percentages still match the day columns. */
.fd__row { display:grid; grid-template-columns:var(--lab, 0px) repeat(var(--days), minmax(0, 1fr)); }
.fd__chart .fd__row > .fd__lab { position:sticky; left:0; z-index:2; display:flex; align-items:center; height:auto; padding:0 .45rem;
                      background:var(--surface-2); color:var(--ink-2); border:0; border-right:1px solid var(--line);
                      font-size:11px; font-weight:650; text-align:left; white-space:nowrap; overflow:hidden; cursor:default; }
.fd__head { position:sticky; top:0; z-index:3; background:var(--surface); }
.fd__avail div { background:#1D3557; color:#fff; text-align:center; font-size:var(--fs-12); font-weight:600; padding:.15rem 0;
                 border-right:1px solid rgba(255,255,255,.15); font-variant-numeric:tabular-nums; }
/* Rooms left to sell (top row and the Available row underneath): some, none, or overbooked. */
.fd__row .is-ok   { background:#1F7A4D; color:#fff; }
.fd__row .is-full { background:#E3B23C; color:#2B2100; }
.fd__row .is-over { background:#B42318; color:#fff; }
.fd__days div { text-align:center; padding:.3rem 0; border-right:1px solid var(--line); border-bottom:1px solid var(--line);
                background:var(--surface-2); font-size:var(--fs-12); color:var(--ink-2); line-height:1.2; }
.fd__days b { font-size:var(--fs-14); color:var(--ink); }
.fd__days .is-weekend { background:#F3EEE4; }
.fd__days .is-today { background:var(--info); color:#fff; }
.fd__days .is-today b { color:#fff; }
.fd__reserve { position:relative; border-bottom:1px solid var(--line); cursor:crosshair; user-select:none; }
.fd__reserve div { height:24px; border-right:1px dashed var(--line); background:repeating-linear-gradient(135deg, #F6F7F5 0 6px, #EEF1EF 6px 12px); }
.fd__reserve div.is-past { background:var(--surface-2); cursor:not-allowed; }
.fd__reserve div.is-picked { background:var(--brand-soft); box-shadow:inset 0 0 0 1px var(--brand); }
.fd__reserve-hint { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); font-size:var(--fs-12); font-weight:600;
                    color:var(--ink-3); pointer-events:none; white-space:nowrap; }
.fd__lanes { position:relative; margin-left:var(--lab, 0px); }
.fd__grid { position:absolute; inset:0; grid-template-columns:repeat(var(--days), minmax(0, 1fr)); }
.fd__grid div { border-right:1px solid var(--line-2); }
.fd__grid .is-weekend { background:#FBF9F4; }
.fd__grid .is-today { background:#EEF4FA; }
.fd__empty { position:absolute; inset:0; display:grid; place-items:center; color:var(--ink-3); font-size:var(--fs-13); }
.fd__foot { position:sticky; bottom:0; z-index:3; background:var(--surface); }
.fd__foot .fd__sum div { background:#1D3557; color:#fff; text-align:center; font-size:11.5px; font-weight:600; line-height:1.3;
                         padding:.2rem 0; border-right:1px solid rgba(255,255,255,.15); border-top:1px solid rgba(255,255,255,.12);
                         font-variant-numeric:tabular-nums; white-space:nowrap; }
.fd__foot .fd__sum div.is-today { background:#2B5C88; }
.fd__foot .fd__sum--left div.is-ok { background:#1F7A4D; }
.fd__foot .fd__sum--left div.is-full { background:#E3B23C; color:#2B2100; }
.fd__foot .fd__sum--left div.is-over { background:#B42318; }
.fd__foot .fd__sum--left div.is-today { box-shadow:inset 0 3px 0 rgba(255,255,255,.55); }
/* A month or more: narrow day columns, the weekday under the date, smaller bar text. */
.fd__inner--narrow .fd__days div { padding:.2rem 0; line-height:1.15; }
.fd__inner--narrow .fd__days span { display:block; font-size:10px; }
.fd__inner--narrow .fd__days b { font-size:var(--fs-13); }
.fd__inner--narrow .fd__avail div, .fd__inner--narrow .fd__foot .fd__sum div { font-size:11px; }
.fd__inner--narrow .fdbar { padding:0 .3rem; font-size:11px; gap:.2rem; }
.fd__inner--narrow .fdbar__room { font-size:10px; padding:1px 3px; }

.fdbar { position:absolute; height:22px; display:flex; align-items:center; gap:.3rem; padding:0 .45rem; border-radius:4px;
         color:#fff; font-size:12px; font-weight:550; line-height:1; white-space:nowrap; overflow:hidden; z-index:1;
         box-sizing:border-box; text-decoration:none; }
.fdbar:hover { text-decoration:none; color:#fff; filter:brightness(1.08); z-index:2; }
.fdbar__t { overflow:hidden; text-overflow:ellipsis; }
.fdbar__g { flex:0 0 auto; font-size:11px; opacity:.95; }
.fdbar__room { flex:0 0 auto; margin-left:auto; font-size:10.5px; font-weight:700; padding:1px 5px; border-radius:3px;
               background:rgba(255,255,255,.92); color:#16221E; }
.fdbar__vip + .fdbar__room { margin-left:.25rem; }
.fdbar__vip { flex:0 0 auto; margin-left:auto; font-size:9.5px; font-weight:700; padding:1px 4px; border-radius:3px; background:rgba(255,255,255,.25); }
.fdbar--reserved    { background:#C0392B; }
.fdbar--tentative   { background:#2563B0; }
.fdbar--checked_in  { background:#1E7B4F; }
.fdbar--overstay    { background:#1E7B4F; box-shadow:inset -5px 0 0 #C0392B; }
.fdbar--checked_out { background:#CBD1CE; color:#16221E; }
.fdbar--checked_out:hover { color:#16221E; }
.fdbar--dnr         { background:repeating-linear-gradient(135deg, #E9B44C 0 6px, #DCA236 6px 12px); color:#3D2A05; }
.fdbar--dnr:hover   { color:#3D2A05; }
.fdbar.is-unassigned { border:1.5px dashed rgba(255,255,255,.95); }
.fdbar.is-due { border-bottom:3px solid #E5B23C; }
.fdbar.is-cut-l { border-top-left-radius:0; border-bottom-left-radius:0; }
.fdbar.is-cut-r { border-top-right-radius:0; border-bottom-right-radius:0; }

/* Room legends drop-down in the side menu */
.rail__legend { list-style:none; margin:0; padding:.25rem .625rem .55rem 2.35rem; display:flex; flex-direction:column; gap:.4rem;
                font-size:var(--fs-12); color:var(--rail-text); }
.rail__legend li { display:flex; align-items:center; gap:.55rem; line-height:1.3; }
.rail__swatch { flex:0 0 26px; height:15px; border-radius:3px; display:inline-grid; place-items:center;
                font-style:normal; font-size:10px; font-weight:700; color:#fff; }
.rail__swatch.is-dashed { border:1.5px dashed #fff; }
.rail__swatch.is-due { box-shadow:inset 0 -3px 0 #E5B23C; }
body.rail-collapsed .rail__legend { display:none; }
.rail__legend b { color:#E3ECE8; font-weight:600; }
.rail__hk { position:relative; }
.rail__hk::after { content:''; position:absolute; left:50%; top:50%; width:7px; height:7px; margin:-3.5px 0 0 -3.5px; border-radius:50%; }
.rail__hk--dirty     { background:var(--hk-dirty-soft); }     .rail__hk--dirty::after     { background:var(--hk-dirty); }
.rail__hk--cleaning  { background:var(--hk-cleaning-soft); }  .rail__hk--cleaning::after  { background:var(--hk-cleaning); }
.rail__hk--clean     { background:var(--hk-clean-soft); }     .rail__hk--clean::after     { background:var(--hk-clean); }
.rail__hk--inspected { background:var(--hk-clean-soft); }     .rail__hk--inspected::after { background:var(--hk-clean); box-shadow:0 0 0 2px #fff; }
.rail__hk--ooo       { background:var(--hk-ooo-soft); }       .rail__hk--ooo::after       { background:var(--hk-ooo); }
.rail__hk--dnd       { background:#ECE7F7; }                  .rail__hk--dnd::after       { background:#4E3A8F; }
.rail__flag { background:#fff; color:var(--ink-2); font-size:8.5px; letter-spacing:.02em; }

/* House status page */
.hs { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); gap:1rem; align-items:start; }
.hs > * { min-width:0; }
.hs__table { font-size:var(--fs-13); }
.hs__table td, .hs__table th { padding:.38rem .7rem; }
.hs__sub th { padding-bottom:0; font-size:11px; text-transform:uppercase; letter-spacing:.04em; border-bottom:0; }
.hs__group { text-align:center; border-bottom:1px solid var(--line) !important; }
@media (max-width:1100px) { .hs { grid-template-columns:minmax(0,1fr); } }
@media print {
  .fd__reserve { display:none !important; }
  .fd__chart { max-height:none; overflow:visible; }
  .cal__views { display:none !important; }
  .hs { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); }
}

/* Tariff chart */
.tc__head { display:flex; align-items:flex-start; gap:1rem; }
.tc__meta { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; margin-top:.3rem; font-size:var(--fs-12); }
.tc__corp { margin-left:auto; font-size:var(--fs-13); font-weight:650; color:var(--info); white-space:nowrap; }
.tc__table th.tc__group { text-align:center; color:var(--ink); font-size:var(--fs-13); border-bottom:1px solid var(--line); }
.tc__table td { vertical-align:top; }
.tc__table td.num b { font-size:var(--fs-14); color:var(--info); font-variant-numeric:tabular-nums; }
.tc__occ { font-size:var(--fs-12); color:var(--ink-2); line-height:1.5; white-space:nowrap; }
.tc__child { font-size:var(--fs-12); color:var(--info); opacity:.85; white-space:nowrap; }
@media print { .tc { break-inside:avoid; } }

/* Add quick reservation (calendar) */
.qr [hidden] { display:none !important; }   /* .field / .qr__row set display, which would beat the hidden attribute */
.modal__box.qr { max-width:860px; width:calc(100% - 2rem); max-height:calc(100vh - 2rem); overflow:auto; }
.qr__head { display:flex; align-items:center; padding:.8rem 1.1rem; background:var(--ink); color:#fff; }
.qr__head h3 { color:#fff; }
.qr__close { margin-left:auto; background:none; border:0; color:#fff; font-size:1.5rem; line-height:1; cursor:pointer; }
.qr__body { padding:1rem 1.1rem .25rem; display:flex; flex-direction:column; gap:.85rem; }
.qr__row { display:flex; flex-wrap:wrap; gap:.6rem; align-items:flex-end; }
.qr__row > .field { flex:1 1 110px; min-width:0; }
.qr__row > .field.qr__wide { flex:2 1 170px; }
.qr__row > .field.qr__narrow { flex:0 1 80px; }
.qr__price { margin-left:auto; text-align:right; min-width:200px; }
.qr__price b { display:block; font-size:var(--fs-20); color:var(--brand-dark); font-variant-numeric:tabular-nums; }
.qr__price small { font-size:var(--fs-12); color:var(--ink-3); }
.qr__guest { border:1px solid var(--line); border-radius:var(--r); padding:.7rem; background:var(--surface-2); display:flex; flex-direction:column; gap:.6rem; }
.qr__find { position:relative; }
.qr__results { display:flex; flex-direction:column; gap:2px; margin-top:.3rem; max-height:180px; overflow:auto; }
.qr__results button { display:flex; justify-content:space-between; gap:.75rem; text-align:left; background:var(--surface); border:1px solid var(--line);
                      border-radius:var(--r-sm); padding:.4rem .6rem; cursor:pointer; font:inherit; font-size:var(--fs-13); }
.qr__results button:hover { border-color:var(--brand); background:var(--brand-soft); }
.qr__results small, .qr__chosen small { color:var(--ink-3); margin-left:.5rem; }
.qr__none { font-size:var(--fs-12); color:var(--ink-3); padding:.3rem .2rem; }
/* A search result: the name button picks the guest, History only looks them up.
   Its own class — .qr__row above is the quick-reservation form's field row. */
.qr__result { display:flex; gap:2px; align-items:stretch; }
.qr__result > button[data-i] { flex:1; min-width:0; }
.qr__chosen { display:flex; align-items:center; justify-content:space-between; gap:.75rem; background:var(--surface);
              border:1px solid var(--brand); border-radius:var(--r-sm); padding:.45rem .6rem; font-size:var(--fs-13); }
.qr__msg { margin:0; padding:.55rem .7rem; border-radius:var(--r-sm); background:var(--danger-soft); color:var(--danger); font-size:var(--fs-13); }
.qr__foot { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; padding:.85rem 1.1rem; background:var(--surface-2); border-top:1px solid var(--line); }
.qr__foot a { margin-right:auto; font-size:var(--fs-13); }
.qr__foot .btn[value="temp"] { background:#2563B0; border-color:#2563B0; color:#fff; }
.qr__foot .btn--ok { background:var(--surface); border-color:#1E7B4F; color:#1E7B4F; }
.qr__foot .btn[disabled] { opacity:.45; cursor:not-allowed; }

/* ---------- report centre (Hotelogix-style report menu) ---------- */
/* The groups live in the side menu (partials/rail-reportgroup.php); "All reports" is a searchable catalogue. */
.rpt > * { min-width:0; }   /* a wide report scrolls inside its card, never the page */
.rpt__find { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; margin-bottom:1rem; }
.rpt__find input { width:min(360px, 100%); }
.rpt__none { font-size:var(--fs-13); color:var(--ink-3); margin:0 0 1rem; }
.rpt__none[hidden] { display:none; }
.rpt__catalogue { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:1rem; align-items:start; margin-bottom:1rem; }
.rpt__card[hidden] { display:none; }
.rpt__card h3 { display:flex; align-items:center; gap:.4rem; }
.rpt__list { list-style:none; margin:0; padding:.6rem .95rem .9rem; display:grid; gap:.35rem; font-size:var(--fs-13); }
.rpt__list li[hidden] { display:none; }
.rpt__list .badge { font-size:10px; padding:0 .35rem; }
.rpt__see { display:block; font-size:var(--fs-12); }
.rpt__aka { margin:-.35rem 0 .6rem; font-size:var(--fs-12); color:var(--ink-3); }
.rpt__note { font-size:var(--fs-12); color:var(--ink-3); max-width:90ch; }
.rpt__rules { margin:.25rem 0 0; padding-left:1.1rem; display:grid; gap:.4rem; font-size:var(--fs-14); }
.rpt__strong td { font-weight:700; background:var(--surface-2); }
.rpt__table td.num, .rpt__table th.num, .rpt__table .ops__nw { white-space:nowrap; }
/* A report of eleven columns or more (the MIS report has thirteen): tighter cells and headings that may take two
   lines, so the whole sheet is on a laptop's screen without scrolling sideways. */
.rpt__table--wide { font-size:var(--fs-12); }
.rpt__table--wide th, .rpt__table--wide td { padding:.5rem .4rem; }
.rpt__table--wide th:first-child, .rpt__table--wide td:first-child { padding-left:.75rem; }
.rpt__table--wide th:last-child, .rpt__table--wide td:last-child { padding-right:.75rem; }
.rpt__table--wide th.num, .rpt__table--wide th { white-space:normal; vertical-align:bottom; }
/* report names in the side menu wrap rather than being cut off */
.rail__sublink--report > span { white-space:normal; }
.rail__sublink.is-pending, .rail__sublink.is-locked { color:#6E8780; cursor:default; }
.rail__sublink.is-pending:hover, .rail__sublink.is-locked:hover { background:none; color:#6E8780; }
.rail__tag { flex:0 0 auto; font-style:normal; font-size:9.5px; font-weight:600; letter-spacing:.02em; text-transform:uppercase;
             padding:1px 5px; border-radius:8px; background:rgba(255,255,255,.07); color:#8FA59E; }
@media print {
  .rpt__aka, .rpt .chipbar, .rpt__find, .rpt__catalogue { display:none !important; }
  .rpt .printonly { display:block; margin-bottom:.75rem; font-size:var(--fs-13); }
  .rpt__table { font-size:11px; }
  .rpt__table .badge { border:1px solid currentColor; }
}

/* Housekeeping room status (housekeeping/rooms). Availability uses the front desk calendar's colours. */
.hkst { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:1rem; align-items:start; }
.hkst > * { min-width:0; }
.hkst__side { display:flex; flex-direction:column; gap:1rem; }
.hkst__bulk { display:flex; flex-wrap:wrap; gap:.6rem; align-items:flex-end; padding:.75rem .9rem;
              background:var(--surface-2); border-bottom:1px solid var(--line); }
.hkst__bulk .field { min-width:190px; margin:0; }
.hkst__gap { width:.75rem; }
.hkst__sel { font-size:var(--fs-12); color:var(--ink-2); margin-left:auto; align-self:center; }
.hkst__note { margin:.75rem .9rem 0; }
.hkst__table td { padding:.45rem .65rem; }
.hkst__check { width:38px; text-align:center; }
.hkst__check input { width:16px; height:16px; cursor:pointer; }
.hkst__table tr.is-selected, .hkst__table tr.is-selected:hover { background:var(--info-soft); }
.hkst__status { white-space:nowrap; }
.hkst__sub { margin-top:.15rem; font-size:var(--fs-12); }
.hkst__remark { min-width:160px; max-width:260px; }
.hkst__who { white-space:nowrap; }
.hkst__icon { border:0; background:transparent; color:var(--ink-3); cursor:pointer; padding:.2rem; margin-left:.15rem;
              border-radius:6px; vertical-align:middle; line-height:0; }
.hkst__icon:hover, .hkst__icon:focus-visible { color:var(--brand); background:var(--brand-soft); }
button.hk { border:0; cursor:pointer; font-family:inherit; }
button.hk:hover, button.hk:focus-visible { text-decoration:underline; outline-offset:2px; }
.hk--repair { background:#EFE6D8; color:#7A5A26; }
/* Do not disturb: a room status the desk sets, purple so it is never read as dirty or clean */
.hk--dnd    { background:#ECE7F7; color:#4E3A8F; }

/* Housekeeping jobs: the job's own buttons, kept apart from the room's status chip */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.hkjob__actions { display:flex; flex-wrap:wrap; gap:.35rem; align-items:center; }
.hkjob__form { display:inline; margin:0; }
.hkjob__verify { display:inline-flex; gap:.3rem; align-items:center; margin:0; }
.hkjob__verify select { font-size:var(--fs-12); padding:.2rem .45rem; min-height:0; width:auto; }
.hkjob__who { font-size:var(--fs-12); color:var(--ink-3); line-height:1.45; }
.hkjob__who b { color:var(--ink-2); font-weight:600; }
.hkjob__pair { display:flex; flex-wrap:wrap; gap:.3rem; align-items:center; }
.hkjob__tag { font-size:10px; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-3); font-weight:700; }
.hk--ooo { background:var(--hk-ooo-soft); color:var(--hk-ooo); }
/* Housekeeping dashboard: every room as a small chip in its official status, to look at only */
.hkdash__rooms { display:flex; flex-wrap:wrap; gap:.35rem; }
.hkdash__room { min-width:3.4rem; justify-content:center; }
.hkdash__room.is-dnd { box-shadow:inset 0 0 0 2px #4E3A8F; }
/* Front desk: housekeeping progress counters */
.fdhk { display:flex; flex-wrap:wrap; gap:.5rem; }
.fdhk__n { display:flex; flex-direction:column; min-width:8.5rem; padding:.5rem .75rem; border:1px solid var(--line);
           border-radius:10px; color:inherit; background:var(--surface); }
.fdhk__n b { font-size:1.25rem; line-height:1.2; }
.fdhk__n span { font-size:var(--fs-12); color:var(--ink-3); }
.fdhk__n.is-due { border-color:#E0B64C; background:#FFF8E6; }
.fdhk__n:hover, .fdhk__n:focus-visible { border-color:var(--brand); }
.hkav { display:inline-block; padding:.12rem .55rem; border-radius:999px; font-size:var(--fs-12); font-weight:600;
        line-height:1.5; white-space:nowrap; }
.hkav--vacant      { color:var(--ink-2); border:1px solid var(--line); }
.hkav--arrival     { background:#C0392B; color:#fff; }
.hkav--checked_in  { background:#DFF3E7; color:#1E7B4F; box-shadow:inset 0 0 0 1px #1E7B4F; }
.hkav--occupied    { background:#1E7B4F; color:#fff; }
.hkav--departure   { background:#1E7B4F; color:#fff; box-shadow:inset -6px 0 0 #C0392B; padding-right:.85rem; }
.hkav--checked_out { background:#CBD1CE; color:#16221E; }
.hkav--dnr         { background:repeating-linear-gradient(135deg, #E9B44C 0 6px, #DCA236 6px 12px); color:#3D2A05; }
.hkst__counts { list-style:none; margin:0; padding:.35rem .7rem .6rem; font-size:var(--fs-13); }
.hkst__counts li { display:flex; justify-content:space-between; align-items:center; gap:.5rem; padding:.3rem 0;
                   border-top:1px solid var(--line-2); }
.hkst__counts a { display:flex; align-items:center; gap:.4rem; color:inherit; font-weight:500; }
.hkst__moves { display:flex; flex-direction:column; gap:.9rem; }
.hkmove { display:flex; align-items:center; gap:.8rem; font-size:var(--fs-13); }
.hkring { --c:var(--ok); flex:0 0 64px; width:64px; height:64px; border-radius:50%; display:grid; place-items:center;
          background:conic-gradient(var(--c) calc(var(--p) * 1%), var(--line-2) 0); }
.hkring--out { --c:#C66A1C; }
.hkring span { width:50px; height:50px; border-radius:50%; background:var(--surface); display:flex; flex-direction:column;
               align-items:center; justify-content:center; line-height:1.05; }
.hkring b { font-size:1.05rem; }
.hkring small { font-size:10px; color:var(--ink-3); }
.hkst__links { display:flex; flex-direction:column; gap:.55rem; font-size:var(--fs-13); }
.hkst__links a { display:flex; align-items:center; gap:.45rem; }
.hkst__choices { display:flex; flex-direction:column; gap:.4rem; }
.hkst__choice { display:flex; align-items:center; gap:.6rem; padding:.45rem .6rem; border:1px solid var(--line);
                border-radius:8px; cursor:pointer; }
.hkst__choice:has(input:checked) { border-color:var(--brand); background:var(--brand-soft); }
@media (max-width:1500px) {
  .hkst { grid-template-columns:minmax(0,1fr); }
  .hkst__side { order:-1; display:grid; grid-template-columns:repeat(auto-fit, minmax(250px, 1fr)); align-items:start; }
}
@media (max-width:640px) {
  .hkst__side { order:1; }                 /* on a phone the room list comes first */
  .hkst__bulk .field { min-width:0; flex:1 1 100%; }
  .hkst__sel { margin-left:0; }
  .hkst__gap { display:none; }
}
@media print {
  .hkst { grid-template-columns:minmax(0,1fr); }
  .hkst__bulk, .hkst__note, .hkst__check, .hkst__icon, .hkst__links, .hkst__side, #hk-trail { display:none !important; }
  .hkst__table { font-size:11px; }
  .hkst__table .hk, .hkst__table .hkav, .hkst__table .badge { border:1px solid currentColor; }
}

/* Reservations list (reservations/index.php). Short values stay on one line and take only the width they
   need; guest, source and company share what is left, and the whole row opens the booking. Where even that
   does not fit, app.js (data-fit-cards) adds .is-cards and each booking becomes a card with labelled fields,
   so the list never needs a sideways scroll, whatever the screen, the side menu or the A+ / A++ size. */
.restable-wrap{container:restable / inline-size;overflow-x:auto}
.restable th,.restable td{padding:.6rem .45rem}
.restable th:first-child,.restable td:first-child{padding-left:1rem}
.restable th:last-child,.restable td:last-child{padding-right:1rem}
.restable td{white-space:nowrap}
.restable .t-muted{font-size:var(--fs-12)}
.restable .c-fit,.restable .c-book{width:1%}
.restable .c-book b,.restable .c-book .t-muted,.restable .badge{white-space:nowrap}
.restable .c-book .badge{margin-left:.2rem}
.restable .c-guest,.restable .c-text,.restable .c-rooms,.restable .c-pax .t-muted{white-space:normal}
.restable .nw{white-space:nowrap}
.restable .c-guest{min-width:7rem}
.restable .c-text{min-width:5.5rem}
.restable .c-rooms{min-width:5rem}
.restable .c-badges > div{margin-top:.2rem}
.restable .c-act{display:flex;flex-direction:column;gap:.3rem;margin-top:.4rem}
.restable tbody tr[data-href]{cursor:pointer}
.restable tbody tr[data-href]:hover{background:var(--brand-soft)}
.restable tbody tr[data-href]:hover .c-book > a b{text-decoration:underline}
.restable tfoot th{background:var(--surface-2);color:var(--ink);font-size:var(--fs-13);font-weight:600;
  border-top:1px solid var(--line);border-bottom:0}

.restable-wrap.is-cards{overflow-x:visible}
.is-cards .restable,.is-cards .restable tbody,.is-cards .restable tfoot{display:block;min-width:0}
.is-cards .restable thead{display:none}
.is-cards .restable td,.is-cards .restable th{display:block;width:auto;min-width:0;border:0;white-space:normal}
.is-cards .restable td,.is-cards .restable th,.is-cards .restable td:first-child,.is-cards .restable th:first-child,
.is-cards .restable td:last-child,.is-cards .restable th:last-child{padding:0}
.is-cards .restable td,.is-cards .restable th,.is-cards .restable td.num,.is-cards .restable th.num{text-align:left}
.is-cards .restable [data-label]::before{content:attr(data-label);display:block;margin-bottom:.1rem;
  font-size:var(--fs-12);font-weight:500;color:var(--ink-3)}
.is-cards .restable .c-stay,.is-cards .restable .c-badges,.is-cards .restable .c-book .t-muted{white-space:nowrap}
/* Every card has the same shape: two columns on a phone, four on a tablet, seven on a laptop. */
.is-cards .restable tbody tr{display:grid;gap:.65rem 1rem;padding:.9rem 1rem;border-bottom:1px solid var(--line-2);
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-areas:"book badge" "guest guest" "stay stay" "hotel pax" "rooms src" "co co" "total adv" "bal act"}
@container restable (min-width:36rem){
  .is-cards .restable tbody tr{grid-template-columns:repeat(4,minmax(0,1fr));
    grid-template-areas:"book book book badge" "guest guest hotel pax" "stay stay rooms rooms" "src src co co" "total adv bal act"}
}
@container restable (min-width:56rem){
  .is-cards .restable tbody tr{grid-template-columns:repeat(7,minmax(0,1fr));
    grid-template-areas:"book book book book book book badge" "guest guest hotel stay stay pax rooms" "src src co total adv bal act"}
}
.is-cards .restable .c-book{grid-area:book;display:flex;flex-wrap:wrap;align-items:center;gap:.15rem .55rem;font-size:var(--fs-14)}
.is-cards .restable .c-status{display:contents}
.is-cards .restable .c-badges{grid-area:badge;justify-self:end;text-align:right}
.is-cards .restable .c-guest{grid-area:guest}
.is-cards .restable .c-hotel{grid-area:hotel}
.is-cards .restable .c-stay{grid-area:stay}
.is-cards .restable .c-pax{grid-area:pax}
.is-cards .restable .c-rooms{grid-area:rooms}
.is-cards .restable .c-src{grid-area:src}
.is-cards .restable .c-co{grid-area:co}
.is-cards .restable .c-total{grid-area:total}
.is-cards .restable .c-adv{grid-area:adv}
.is-cards .restable .c-bal{grid-area:bal}
.is-cards .restable .c-act{grid-area:act;justify-self:end;align-self:end;flex-direction:row;flex-wrap:wrap;
  justify-content:flex-end;gap:.4rem;margin-top:0}
.is-cards .restable .restable__empty{display:block;padding:0}
.is-cards .restable tfoot tr{display:grid;grid-template-columns:repeat(auto-fill,minmax(7rem,1fr));gap:.5rem 1rem;
  padding:.9rem 1rem;background:var(--surface-2);border-top:1px solid var(--line)}
.is-cards .restable tfoot th{background:none;border:0}
.is-cards .restable tfoot th:empty{display:none}
.is-cards .restable .c-sum{grid-column:1 / -1}

/* Banquet calendar (banquets/calendar.php): a row a day, a column a venue, and in each cell the venue's
   sessions — breakfast, lunch, dinner — booked or free. Colours as on the old month list: yellow held,
   green confirmed, blue completed, grey an enquiry that holds nothing. */
.bqcal__legend{display:flex;flex-wrap:wrap;gap:.35rem 1.1rem;margin:0 0 .75rem;font-size:var(--fs-12);color:var(--ink-2)}
.bqcal__legend span{display:inline-flex;align-items:center;gap:.4rem}
.bqcal__key{display:inline-block;width:.85rem;height:.85rem;border-radius:3px;border:1px solid var(--line)}
.bqcal__card{display:inline-block;max-width:100%;vertical-align:top}   /* the card hugs its venues: one hall is not stretched across the page */
.bqcal{width:auto;min-width:0}
.bqcal td,.bqcal th{vertical-align:top}
.bqcal td,.bqcal th{width:15rem;min-width:13rem;padding:.35rem .45rem}
.bqcal__none{color:var(--ink-3);font-size:var(--fs-12);padding-left:.45rem}
/* The calendar scrolls inside its own card, so the venue names and the dates stay in view like a sheet's headings. */
.bqcal__card .tablewrap{max-height:calc(100vh - 13.5rem);min-height:18rem;overflow:auto}
.bqcal thead th{position:sticky;top:0;z-index:2;background:var(--surface-2)}
.bqcal thead th.bqcal__date{z-index:3;background:var(--surface-2)}
.bqcal tr[id]{scroll-margin-top:3.5rem}
.bqcal .bqcal__date{position:sticky;left:0;z-index:1;min-width:4.75rem;width:4.75rem;background:var(--surface);white-space:nowrap}
.bqcal tr.is-today td{background:var(--surface-2)}
.bqcal tr.is-today .bqcal__date{box-shadow:inset 3px 0 0 var(--brand)}
.bqcal__s{display:flex;align-items:baseline;gap:.4rem;padding:.2rem .45rem;margin-bottom:.2rem;border-radius:var(--r-sm);
  border:1px solid transparent;font-size:var(--fs-12);line-height:1.35;color:var(--ink);text-decoration:none}
.bqcal__s b{flex:0 0 var(--bq-name,4.4rem);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}   /* --bq-name: room for the hotel's longest session name */
.bqcal__s span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bqcal__s--free{border:1px dashed var(--line);background:var(--surface);color:var(--ink-3)}
.bqcal__s--free b{font-weight:500}
a.bqcal__s--free:hover{border-style:solid;border-color:var(--brand);color:var(--brand);text-decoration:none}
.bqcal__s--free.is-past{border-color:transparent}
.bqcal__s--tentative{background:var(--hk-cleaning-soft)}
.bqcal__s--confirmed{background:var(--hk-clean-soft)}
.bqcal__s--completed{background:var(--info-soft)}
a.bqcal__s:not(.bqcal__s--free):hover{border-color:var(--ink-3);text-decoration:none}
.bqcal__s--day{min-height:4.4rem;align-items:center}
.bqcal__ask{display:block;padding:.1rem .45rem;margin:0 0 .2rem;border-radius:var(--r-sm);background:var(--line-2);
  font-size:var(--fs-12);color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}
.bqcal__key.bqcal__ask{padding:0;margin:0}
.bqcal tr.is-focus td{box-shadow:inset 0 2px 0 var(--brand),inset 0 -2px 0 var(--brand)}   /* the day asked for with "Go to date" */
/* One venue: the month as a grid, seven days a row (Monday first), each day holding that venue's sessions.
   On a narrow screen the grid becomes a list of days, date on the left as in the table above. */
.bqmonth{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-radius:var(--r);overflow:hidden}
.bqmonth > *{border-right:1px solid var(--line-2);border-bottom:1px solid var(--line-2);min-width:0}
.bqmonth > :nth-child(7n){border-right:0}
.bqmonth__dow{padding:.4rem .5rem;font-size:var(--fs-12);font-weight:600;color:var(--ink-2);background:var(--surface-2)}
.bqmonth__pad{background:var(--surface-2);opacity:.55}
.bqmonth__day{min-height:6.75rem;padding:.3rem .35rem .15rem;scroll-margin-top:4rem}
.bqmonth__num{margin-bottom:.25rem;padding-left:.15rem;font-size:var(--fs-13)}
.bqmonth__num span{display:none;color:var(--ink-3);font-size:var(--fs-12)}   /* the weekday: only once the grid is a list */
.bqmonth__day.is-past .bqmonth__num{color:var(--ink-3)}
.bqmonth__day.is-today{background:var(--surface-2);box-shadow:inset 0 3px 0 var(--brand)}
.bqmonth__day.is-focus{box-shadow:inset 0 0 0 2px var(--brand)}
/* A day is narrow: a booked session puts the event under the session's name, on up to two lines. */
.bqmonth .bqcal__s:not(.bqcal__s--free){flex-direction:column;align-items:stretch;gap:0}
.bqmonth .bqcal__s:not(.bqcal__s--free) b{flex:0 0 auto}
.bqmonth .bqcal__s:not(.bqcal__s--free) span{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
@media (max-width:860px){
  .bqmonth{grid-template-columns:minmax(0,1fr)}
  .bqmonth > *{border-right:0}
  .bqmonth__dow,.bqmonth__pad{display:none}
  .bqmonth__day{min-height:0;display:grid;grid-template-columns:4.25rem minmax(0,1fr);gap:0 .5rem;padding:.45rem .5rem .3rem}
  .bqmonth__num{margin:0;padding-top:.15rem}
  .bqmonth__num span{display:inline}
  .bqmonth .bqcal__s:not(.bqcal__s--free){flex-direction:row;align-items:baseline;gap:.4rem}   /* room again: one line, as in the table */
  .bqmonth .bqcal__s:not(.bqcal__s--free) b{flex:0 0 var(--bq-name,4.4rem)}
  .bqmonth .bqcal__s:not(.bqcal__s--free) span{display:block;white-space:nowrap}
}
/* The dishes of a menu package (banquets/packages.php): course, dish, remove — one row a dish. */
.bqitems{display:flex;flex-direction:column;gap:.35rem;margin-bottom:.45rem}
.bqitems__row{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr) auto;gap:.35rem;align-items:center}
.bqitems__row input{padding-left:.5rem;padding-right:.5rem;font-size:var(--fs-13);text-overflow:ellipsis}   /* "Rice and breads" fits in the side card */
.bqitems__row .btn{min-width:2rem;font-size:1.1rem;line-height:1}
@media print{ .bqcal .bqcal__date{position:static} .bqcal__s--free{border-style:solid} .bqmonth__day{min-height:5rem} }

/* Ticker at the foot of every screen: notes sent to all departments (partials/ticker.php). Sticky inside .main, so it
   follows the side menu's width and never covers the end of a page. It stops under the mouse or keyboard focus. */
.ticker{position:sticky;bottom:0;z-index:40;display:flex;align-items:center;gap:.6rem;height:34px;padding:0 .75rem 0 0;
  background:#1D3557;color:#fff;font-size:var(--fs-13);box-shadow:0 -2px 8px rgba(16,24,40,.18)}
.ticker__tag{flex:0 0 auto;display:inline-flex;align-items:center;gap:.35rem;height:100%;padding:0 .75rem;background:#B42318;
  font-weight:700;font-size:var(--fs-12);letter-spacing:.02em;text-transform:uppercase;white-space:nowrap}
.ticker__track{flex:1;min-width:0;overflow:hidden}
.ticker__run{display:inline-block;padding-left:100%;white-space:nowrap;animation:ticker-run var(--ticker-s,30s) linear infinite}
.ticker:hover .ticker__run,.ticker:focus-within .ticker__run{animation-play-state:paused}
.ticker__item{display:inline-block;margin-right:3rem;color:#fff}
.ticker__item b{color:#FFE29A;font-weight:650}
a.ticker__item:hover,a.ticker__item:focus{color:#fff;text-decoration:underline}
@keyframes ticker-run{from{transform:translateX(0)}to{transform:translateX(-100%)}}
@media (max-width:640px){.ticker__tag > span{display:none}.ticker{font-size:var(--fs-12)}}
/* Less motion asked for: the notes stand still and the line scrolls sideways by hand. */
@media (prefers-reduced-motion:reduce){.ticker__run{padding-left:0}.ticker__track{overflow-x:auto}}
@media print{.ticker{display:none!important}}

/* Ready to serve: the line the POS screens show when the kitchen marks a ticket ready (partials/kot-ready-alert.php). */
.kotalert{display:flex;align-items:center;gap:.6rem;margin:0 0 1rem;padding:.5rem .75rem;border-radius:var(--r-sm);
  background:#E8F4EE;border:1px solid #1F7A4D;color:#10351F;font-size:var(--fs-13);font-weight:600}
.kotalert[hidden]{display:none}   /* the class would otherwise beat the browser's own rule for [hidden] */
.kotalert__tag{display:inline-flex;align-items:center;gap:.35rem;flex:0 0 auto;color:#1F7A4D;text-transform:uppercase;
  font-size:var(--fs-12);letter-spacing:.02em}
.kotalert__text{flex:1;min-width:0}
.kotalert__mute,.kotalert__close{flex:0 0 auto;background:none;border:1px solid transparent;border-radius:var(--r-sm);
  color:#10351F;font:inherit;font-size:var(--fs-12);cursor:pointer;padding:.1rem .4rem}
.kotalert__mute:hover,.kotalert__close:hover{border-color:#1F7A4D}
.kotalert__close{font-size:1.1rem;line-height:1}
@media print{.kotalert{display:none!important}}

/* Roles: access by section (roles/index.php, roles/form.php; phase 28). The list opens a role from anywhere on its row.
   The form has one row a section of the menu with its level; the tick boxes of "Advanced" sit in a <details>, whose
   closed state is written out because .card sets its own display. */
.rolelist__name .badge{margin-left:.3rem}
@media (max-width:640px){
  .levels-head{flex-direction:column;align-items:flex-start;gap:.2rem}
  .levels-head > span{margin-left:0 !important}
}
.rolefacts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.75rem 1.25rem}
.rolefacts > div{display:flex;flex-direction:column;gap:.1rem}
.rolefacts .t-muted{font-size:var(--fs-12)}
.levels__row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(9.5rem,11rem);gap:.3rem 1rem;align-items:center;
  padding:.6rem 1rem;border-bottom:1px solid var(--line-2)}
.levels__row:last-child{border-bottom:0}
.levels__what{display:flex;flex-direction:column;min-width:0}
.levels__what .t-muted,.levels__now{font-size:var(--fs-12)}
.levels__now{white-space:nowrap}
.levels__loss{color:var(--danger);white-space:normal}
.levels__pick select{width:100%}
@media (max-width:640px){
  /* On a phone: the section and what is in it across the top; under it the count on the left and the choice on the right. */
  .levels__row{grid-template-columns:minmax(0,1fr) minmax(8.5rem,10rem)}
  .levels__what{grid-column:1 / -1}
  .levels__now{grid-column:1;grid-row:2;white-space:normal}
  .levels__pick{grid-column:2;grid-row:2}
}
details.adv > summary{cursor:pointer;list-style:none}
details.adv > summary::-webkit-details-marker{display:none}
details.adv > summary h3::before{content:"\25B8";display:inline-block;width:1.1em;color:var(--ink-3)}
details.adv[open] > summary h3::before{content:"\25BE"}
details.adv:not([open]) > summary{border-bottom:0}
details.adv:not([open]) > :not(summary){display:none}
.matrix input[data-diff]{outline:2px solid var(--warn);outline-offset:2px;border-radius:3px}

/* Staff (employees/index.php, employees/form.php; phase 28): the row opens the member of staff; "Suggest one" and
   the other in-text buttons look like the links beside them. */
.stafflist__name{min-width:9rem}
button.linkish{background:none;border:0;padding:0;font:inherit;cursor:pointer}

/* Lists that open from the row and become cards when they do not fit (Staff, Roles; phase 28). The switch is the
   Reservations list's own (data-fit-cards in app.js adds .is-cards to the box); the card is one plain shape: the first
   cell across the top, the others under it in two columns with their column's name, the buttons at the end. */
.cardlist-wrap{overflow-x:auto}
.cardlist td{vertical-align:top}
.cardlist th:not(:first-child),.cardlist td:not(.c-main){width:1%;white-space:nowrap}
.cardlist tbody tr[data-href]{cursor:pointer}
.cardlist tbody tr[data-href]:hover{background:var(--brand-soft)}
.cardlist-wrap.is-cards{overflow-x:visible}
.is-cards .cardlist,.is-cards .cardlist tbody{display:block;min-width:0}
.is-cards .cardlist thead{display:none}
.is-cards .cardlist tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem 1rem;padding:.85rem 1rem;
  border-bottom:1px solid var(--line-2)}
.is-cards .cardlist td,.is-cards .cardlist td.num,.is-cards .cardlist td:first-child,.is-cards .cardlist td:last-child{
  display:block;width:auto;min-width:0;padding:0;border:0;white-space:normal;text-align:left}
.is-cards .cardlist tbody tr{position:relative}
.is-cards .cardlist td.c-main{grid-column:1 / -1;padding-right:5.5rem}
.is-cards .cardlist td.c-act{position:absolute;top:.8rem;right:1rem;display:flex;gap:.4rem}
.is-cards .cardlist td[data-label]::before{content:attr(data-label);display:block;margin-bottom:.1rem;
  font-size:var(--fs-12);font-weight:500;color:var(--ink-3)}
.is-cards .cardlist td[colspan]{grid-column:1 / -1}

/* Indent and issue lines: item, quantity, and the button that takes the line off. */
.indentlines{display:flex;flex-direction:column;gap:.4rem;margin-bottom:.5rem}
.indentlines__row{display:grid;grid-template-columns:minmax(0,1fr) 8rem auto;gap:.4rem;align-items:center}
.indentlines__row input{text-align:right}
@media (max-width:640px){.indentlines__row{grid-template-columns:minmax(0,1fr) 5.5rem auto}}

/* Hotel status (frontdesk/hotel-status.php; phase 30): one column a night, one row a room type; the first column stays
   put while the nights scroll sideways. The figure is the rooms still free: green, amber when under a third, red at none. */
.hstat__wrap{overflow-x:auto}
.hstat{min-width:max-content}
.hstat th,.hstat td{padding:.35rem .45rem;text-align:center;white-space:nowrap}
.hstat thead th span{display:block;font-size:var(--fs-12);font-weight:400;color:var(--ink-3)}
.hstat thead th b{display:block;font-size:var(--fs-14, 1rem)}
.hstat .hstat__type{position:sticky;left:0;z-index:1;background:var(--surface);text-align:left;min-width:11rem;border-right:1px solid var(--line-2)}
.hstat tfoot th,.hstat tfoot td{background:var(--surface-2);font-weight:600}
.hstat tfoot .hstat__type{background:var(--surface-2)}
.hstat .hstat__we{background:var(--surface-2)}
.hstat .hstat__today{box-shadow:inset 2px 0 0 var(--brand),inset -2px 0 0 var(--brand)}
.hstat td.hstat--ok{color:#1F7A4D}
.hstat td.hstat--low{background:rgba(214,158,46,.16);color:#8A5A00}
.hstat td.hstat--full{background:rgba(197,48,48,.14);color:#A32020}
.hstat__key{display:inline-block;width:.7rem;height:.7rem;border-radius:2px;vertical-align:middle;margin:0 .15rem 0 .5rem}
.hstat__key.hstat--ok{background:#1F7A4D}
.hstat__key.hstat--low{background:#D69E2E}
.hstat__key.hstat--full{background:#C53030}

/* The bar at the top on a phone (OPEN-39): at 375 px it was 23 px wider than the screen, so every page could be pushed
   sideways and the avatar was cut. The search box may now shrink, the gaps are tighter, the hotel's name gives way,
   and the three text-size buttons move into the menu under the avatar. */
.dropdown__font{display:none}
@media (max-width:560px){
  .topbar{gap:.4rem;padding:.5rem .6rem}
  .topbar__spacer{display:none}
  .topbar .search{min-width:0;flex:1 1 3rem}
  .topbar .search input[type=search]{min-width:0}
  .topbar > .fontpick{display:none}
  .hotelpick__btn{padding:0 .5rem;gap:.35rem;max-width:150px}
  .hotelpick__btn b{max-width:74px}
  .dropdown__font{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.5rem .75rem;font-size:var(--fs-13);color:var(--ink-2)}
  .topbar .dropdown{max-width:calc(100vw - 1.2rem)}
  .topbar .dropdown--wide{position:fixed;left:.6rem;right:.6rem;top:52px;min-width:0}
}

/* Department dashboards (dashboard/department.php, partials/boardnav.php; 15 Nov 2026): the row of dashboards to
   move between, the two headings, and charts and lists two to a row where there is room for two. */
.boardnav{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin:-.35rem 0 1rem}
.boardnav__label{font-size:var(--fs-12);font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-3)}
.board__h{font-size:var(--fs-13);font-weight:640;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-3);margin:1.1rem 0 .6rem}
.board__note{font-size:var(--fs-12)}
.board__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start}
.board__grid > .card{min-width:0}
.board__grid .card__head{flex-wrap:wrap;row-gap:.25rem}
@media (max-width:1100px){.board__grid{grid-template-columns:minmax(0,1fr)}}


/* Check-in register › Guest register (frontdesk/register.php; phase 31): the name stays on one line, the address and
   the journey may wrap, every other column is as wide as what it holds. On paper it is always a table, whatever the
   width of the screen it was printed from (a narrow screen shows it as cards), and nothing scrolls. Foreign guests
   prints through the same rules. */
.reg td.c-main{width:1%;white-space:nowrap}
.reg__no{color:var(--ink-3);font-variant-numeric:tabular-nums;margin-right:.15rem}
.cardlist td.reg__wrap{white-space:normal}
.cardlist td.reg__addr{width:auto;min-width:9.5rem}
.is-cards .cardlist td.reg__wrap,.is-cards .reg td.c-main{min-width:0}
@media print{
  .ops .cardlist-wrap,.ops .cardlist-wrap.is-cards{overflow:visible}
  .ops .card{break-inside:auto}
  .ops__table tr{break-inside:avoid}
  .ops .is-cards .cardlist{display:table;width:100%}
  .ops .is-cards .cardlist thead{display:table-header-group}
  .ops .is-cards .cardlist tbody{display:table-row-group}
  .ops .is-cards .cardlist tbody tr{display:table-row;padding:0;border:0;position:static}
  .ops .is-cards .cardlist td,.ops .is-cards .cardlist td.num,.ops .is-cards .cardlist td:first-child,
  .ops .is-cards .cardlist td:last-child,.ops .is-cards .cardlist td.c-main{display:table-cell;padding:.3rem .35rem;
    border-bottom:1px solid #ddd;width:auto}
  .ops .is-cards .cardlist td.num{text-align:right}
  .ops .is-cards .cardlist td[data-label]::before{content:none;display:none}
  /* On paper the address takes the room that is left; names, dates and numbers stay on one line. */
  .ops .reg td.c-main,.ops .is-cards .reg td.c-main{min-width:0;width:1%;white-space:nowrap}
  .ops .reg td:not(.reg__wrap),.ops .is-cards .reg td:not(.reg__wrap){white-space:nowrap}
  .ops .reg td.reg__addr,.ops .is-cards .reg td.reg__addr{width:36%;min-width:0;white-space:normal}
}
