/* ============================================================
   Front desk. Laid out like the desk itself: one strip of tabs
   across the top, the filters you reach for on the left, and the
   rooms filling the rest of the surface.
   ============================================================ */

:root {
  /* Chrome: deep teal rather than indigo, so warm accents have somewhere to sit */
  --brand: #10756a;
  --brand-deep: #0b5c53;
  --brand-dark: #14312f;
  --brand-tint: #e4f2ef;

  /* The warm side: guest avatars, the brand mark, section rules */
  --warm: #d97706;
  --warm-deep: #b45309;
  --warm-tint: #fdf0dc;

  /* One colour per room status, far enough apart in hue to read across a room.
     Free rooms fill solid; the rest carry a coloured strip over a tinted body. */
  --st-free: #10756a;  --st-free-tint: #e4f2ef;
  --st-occ:  #4a7828;  --st-occ-tint:  #edf4e2;
  --st-res:  #b05108;  --st-res-tint:  #fdf0dc;
  --st-out:  #5e6d82;  --st-out-tint:  #eef1f5;
  --st-rep:  #b91c1c;  --st-rep-tint:  #fbe9e9;

  --canvas: #eff1ee;
  --surface: #ffffff;
  --surface-2: #f8f9f7;
  --line: #dfe3ec;
  --line-soft: #edf0f6;

  --text: #1a2033;
  --text-2: #5a6480;
  --text-3: #8d96ad;

  --green: #2e8b6a;
  --green-tint: #e3f3ed;
  --amber: #b5811f;
  --amber-tint: #fdf1dc;
  --red: #b4413c;
  --red-tint: #fbe8e6;
  --slate: #6b7794;
  --slate-tint: #eaedf3;

  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(26, 32, 51, .06), 0 4px 14px -6px rgba(26, 32, 51, .16);
  --shadow-lg: 0 24px 60px -18px rgba(26, 32, 51, .45);

  --rail: 212px;
  --filters: 206px;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--sans);
  color: var(--text);
  background: var(--canvas);
  font-size: 14.5px;
  -webkit-text-size-adjust: 100%;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------------- background photo ----------------
   The image sits on a fixed layer behind everything, with a wash over it.
   Cards, toolbars and tables keep their solid surfaces, so the photo shows
   through the gaps rather than under the text. */
#backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: var(--bg-dim, .88);
}

body.has-backdrop .main,
body.has-backdrop .pane,
body.has-backdrop .body { background: transparent; }
body.has-backdrop #app { position: relative; z-index: 1; }

/* Over a photo the chrome needs a touch more separation from what is behind. */
body.has-backdrop .card,
body.has-backdrop .topbar,
body.has-backdrop .toolbar,
body.has-backdrop .filters { box-shadow: 0 1px 3px rgba(26, 32, 51, .1), 0 8px 24px -10px rgba(26, 32, 51, .28); }

/* ---------------- sign in ---------------- */
#login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  background:
    radial-gradient(1000px 480px at 50% -12%, #4b57c9 0%, transparent 72%),
    var(--brand-dark);
  background-size: cover;
  background-position: center;
}

/* With a photo set, the gradient becomes a scrim over it so the card reads. */
#login.has-photo {
  background:
    linear-gradient(180deg, rgba(20, 25, 60, .62) 0%, rgba(20, 25, 60, .78) 100%),
    var(--login-photo) center / cover no-repeat,
    var(--brand-dark);
}
#login.has-photo .login-card { box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .75); }

.login-card {
  width: 100%;
  max-width: 372px;
  background: var(--surface);
  border-radius: 12px;
  padding: 32px 28px 26px;
  box-shadow: 0 30px 70px -18px rgba(0, 0, 0, .6);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand img { max-height: 60px; max-width: 200px; object-fit: contain; }
.login-brand h1 { font-size: 20px; margin: 12px 0 4px; letter-spacing: -.01em; }
.login-brand p { margin: 0; color: var(--text-3); font-size: 13px; }

/* ---------------- shell ---------------- */
#app { display: none; min-height: 100vh; }
#app.on { display: block; }

/* the navigation rail: everything the person can reach, always in view */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  background: var(--brand-dark);
  color: #c3c9e8;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: width .14s ease;
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 52px;
  flex: none;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  overflow: hidden;
}
.rail-brand .mark {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--warm);
  color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: -.02em;
}
.rail-brand .logo { height: 28px; max-width: 104px; object-fit: contain; flex: none; }
.rail-brand .txt { min-width: 0; }
.rail-brand strong { display: block; color: #fff; font-size: 13px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-brand span { font-size: 9.5px; color: #7e88b8; letter-spacing: .09em; text-transform: uppercase; }

.rail-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 8px 18px; }
.rail-nav::-webkit-scrollbar { width: 6px; }
.rail-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 3px; }

.rail-group {
  padding: 0 10px;
  margin: 13px 0 5px;
  color: #6e78a8;
  white-space: nowrap;
  overflow: hidden;
}
.rail-nav > .rail-group:first-child { margin-top: 2px; }

.rail-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: none;
  border-radius: 6px;
  color: #c3c9e8;
  cursor: pointer;
  text-align: left;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.rail-link:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.rail-link.active { background: var(--brand); color: #fff; font-weight: 600; }
.rail-link .ico { width: 18px; flex: none; text-align: center; font-size: 14px; opacity: .9; }
.rail-link .txt { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.rail-link .tally {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
}
.rail-link.active .tally { background: rgba(255, 255, 255, .28); }

.rail-foot {
  flex: none;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
}
.rail-foot .avatar {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--warm);
  color: #3b2309;
  font-size: 11px; font-weight: 800;
}
.rail-foot .txt { min-width: 0; flex: 1; }
.rail-foot strong { display: block; color: #fff; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-foot span { font-size: 10.5px; color: #7e88b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.rail-foot button {
  flex: none;
  background: none; border: 0; color: #7e88b8;
  cursor: pointer; font-size: 15px; padding: 5px 6px; border-radius: 5px;
}
.rail-foot button:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* collapsed to icons, for when the filter panel needs the room */
.rail.tight { width: 58px; }
.rail.tight .rail-brand { justify-content: center; padding: 0; }
.rail.tight .rail-brand .txt,
.rail.tight .rail-group,
.rail.tight .rail-link .txt,
.rail.tight .rail-foot .txt { display: none; }
.rail.tight .rail-link { justify-content: center; padding: 9px 0; }
.rail.tight .rail-link .tally {
  position: absolute; top: 3px; right: 6px;
  padding: 0 5px; font-size: 9.5px;
}
.rail.tight .rail-foot { justify-content: center; flex-wrap: wrap; gap: 4px; }

.main { margin-left: var(--rail); min-height: 100vh; display: flex; flex-direction: column; transition: margin .14s ease; }
.main.tight { margin-left: 58px; }

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 52px;
  flex: none;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-size: 15.5px; font-weight: 650; }
.topbar .sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.topbar .spacer { flex: 1; }
.topbar .today { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.iconbtn {
  width: 30px; height: 30px; flex: none;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text-2);
  line-height: 1;
}
.iconbtn:hover { border-color: var(--brand); color: var(--brand); }
.burger { display: none; }

/* the working surface */
.work { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex: none;
  flex-wrap: wrap;
}
.toolbar .spacer { flex: 1; }
.toolbar h2 { margin: 0; font-size: 15px; font-weight: 650; }
.toolbar .sub { font-size: 12px; color: var(--text-3); }

.datenav { display: flex; align-items: center; gap: 4px; }
.datenav .date {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 5px 4px;
}
.datenav .date .ico { color: var(--brand); }
.stepper {
  width: 26px; height: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1;
  color: var(--text-2);
}
.stepper:hover { border-color: var(--brand); color: var(--brand); }

.search {
  position: relative;
  min-width: 190px;
  flex: 0 1 300px;
}
.search input {
  width: 100%;
  padding: 7px 30px 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  outline: none;
}
.search input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-tint); }
.search .ico { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }

.body { flex: 1; display: flex; min-height: 0; }

/* left filter rail */
.filters {
  width: var(--filters);
  flex: none;
  background: var(--surface);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 14px 0 30px;
}
.filter-group { padding: 0 14px; margin-bottom: 18px; }
.filter-group > .eyebrow {
  color: var(--brand-dark); margin-bottom: 8px; display: block;
  border-bottom: 2px solid var(--warm-tint); padding-bottom: 5px;
}

/* A colour chip beside each filter, matching the card it selects. */
.filter-row .swatch {
  width: 9px; height: 9px; border-radius: 2px; flex: none;
  background: var(--st-out);
}
.filter-row .swatch.available { background: var(--st-free); }
.filter-row .swatch.occupied { background: var(--st-occ); }
.filter-row .swatch.reserved { background: var(--st-res); }
.filter-row .swatch.checked_out { background: var(--st-out); }
.filter-row .swatch.clean { background: var(--st-occ); }
.filter-row .swatch.not_clean { background: var(--st-rep); }
.filter-row .swatch.in_progress { background: var(--st-res); }
.filter-row .swatch.cleaned { background: var(--warm); }
.filter-row .swatch.repair { background: var(--st-rep); }

.filter-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}
.filter-row input { width: 15px; height: 15px; accent-color: var(--brand); flex: none; margin: 0; cursor: pointer; }
.filter-row .lbl { flex: 1; }
.filter-row .cnt { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.filter-row:hover .lbl { color: var(--brand); }

.pane { flex: 1; overflow-y: auto; padding: 16px 18px 60px; min-width: 0; }

/* Shown only where the filter rail collapses off-screen. */
.only-narrow { display: none; }
.pane.plain { background: var(--canvas); }

/* ---------------- signature: the room board ---------------- */
.group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 10px;
}
.group-head h3 {
  margin: 0; font-size: 14px; font-weight: 700; color: var(--brand-dark);
  letter-spacing: .01em;
  border-bottom: 2px solid var(--warm);
  padding-bottom: 3px;
}
.group-head .rule { flex: 1; height: 1px; background: var(--line); }
.group-head .meta { font-size: 12px; color: var(--text-3); }
.group + .group { margin-top: 22px; }

.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }

.room {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform .11s ease, box-shadow .11s ease;
}
.room:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.room:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.room .top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-soft);
}
.room .rno { font-size: 13px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.room .rst { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--text-3); }

.room .mid {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 11px;
  flex: 1;
}
.room .badge {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px;
  background: var(--warm);
  color: #fff;
}
.room .guest { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.room .foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.room .foot span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.room .foot .warn { color: var(--red); }
.room .foot .ok { color: var(--green); }
.room .foot .busy { color: var(--amber); }

/* Each status owns a colour: a solid strip across the top and a tinted body,
   so the board reads as a patchwork from across the room while guest names
   still sit on something close to white. Free rooms fill solid, because those
   are what the front desk is scanning for. */
.room::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--st-out);
  z-index: 2;
}

.room.available {
  background: var(--st-free);
  border-color: var(--st-free);
}
.room.available::before { background: rgba(255, 255, 255, .5); }
.room.available .top { border-bottom-color: rgba(255, 255, 255, .2); }
.room.available .rno, .room.available .guest { color: #fff; }
.room.available .rst { color: rgba(255, 255, 255, .78); }
.room.available .badge { background: rgba(255, 255, 255, .22); color: #fff; }
.room.available .foot {
  background: rgba(0, 0, 0, .15);
  border-top-color: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .85);
}
.room.available .foot .warn { color: #ffd0cb; }
.room.available .foot .ok { color: #d6f0c9; }
.room.available .foot .busy { color: #ffe6b8; }
.room.available:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

.room.occupied { background: var(--st-occ-tint); border-color: #d6e4c4; }
.room.occupied::before { background: var(--st-occ); }
.room.occupied .badge { background: var(--st-occ); color: #fff; }
.room.occupied .rst { color: var(--st-occ); }
.room.occupied .foot { background: rgba(74, 120, 40, .07); }

.room.reserved { background: var(--st-res-tint); border-color: #f0dcbb; }
.room.reserved::before { background: var(--st-res); }
.room.reserved .badge { background: var(--st-res); color: #fff; }
.room.reserved .rst { color: var(--st-res); }
.room.reserved .foot { background: rgba(176, 81, 8, .07); }

.room.checked_out { background: var(--st-out-tint); border-color: #dbe1e9; }
.room.checked_out::before { background: var(--st-out); }
.room.checked_out .badge { background: var(--st-out); color: #fff; }
.room.checked_out .rst { color: var(--st-out); }

/* A room out of service overrides everything: red strip and a red edge. */
.room.repair, .room.available.repair { background: var(--st-rep-tint); border-color: #eec9c9; }
.room.repair::before { background: var(--st-rep); }
.room.repair .rno, .room.repair .guest { color: var(--text); }
.room.repair .rst { color: var(--st-rep); }
.room.repair .badge { background: var(--st-rep); color: #fff; }
.room.repair .foot { background: rgba(185, 28, 28, .06); color: var(--text-2); }

/* ---------------- schedule grid ---------------- */
.sched { overflow: auto; max-height: calc(100vh - 190px); }
.sched table { border-collapse: collapse; width: 100%; min-width: 700px; }
.sched th, .sched td { border: 1px solid var(--line-soft); padding: 0; }
.sched thead th {
  background: var(--surface-2);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-3);
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
.sched thead th.weekend { background: var(--brand-tint); color: var(--brand); }
.sched thead th.rowhead { z-index: 4; }
.sched th.rowhead {
  text-align: left;
  padding: 8px 10px;
  background: var(--surface);
  position: sticky; left: 0; z-index: 3;
  min-width: 112px;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 600;
}
.sched td.cell { height: 34px; position: relative; background: var(--surface); }
.sched td.cell.weekend { background: #fafbff; }
.sched .stay {
  position: absolute;
  inset: 4px 2px;
  border-radius: 4px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  z-index: 1;
}
.sched .stay.checked_in { background: var(--st-occ); }
.sched .stay.reserved { background: var(--st-res); }
.sched .stay.checked_out { background: var(--st-out); }
.sched .stay:hover { filter: brightness(1.1); }

/* ---------------- generic pieces ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 650; }
.card-head .spacer { flex: 1; }
.card-body { padding: 15px; }
.card-body.flush { padding: 0; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.stat { padding: 14px 15px; }
.stat .v { font-size: 25px; font-weight: 650; letter-spacing: -.02em; margin-top: 5px; font-variant-numeric: tabular-nums; }
.stat .foot { font-size: 11.5px; color: var(--text-2); margin-top: 3px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: #c9cfdd; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary, .btn.brass { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover, .btn.brass:hover { background: var(--brand-deep); }
.btn.danger { color: var(--red); border-color: #eccbc8; }
.btn.danger:hover { background: var(--red-tint); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.wide { width: 100%; justify-content: center; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--slate-tint); }

.field { margin-bottom: 13px; }
.field > label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.input, select.input, textarea.input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
textarea.input { min-height: 70px; resize: vertical; }
.hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check input { width: 15px; height: 15px; accent-color: var(--brand); }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-size: 10px; letter-spacing: .11em; text-transform: uppercase;
  color: var(--text-3); font-weight: 700; padding: 9px 13px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  position: sticky; top: 0;
}
table.data td { padding: 10px 13px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover { background: var(--brand-tint); }
table.data td.right, table.data th.right { text-align: right; font-variant-numeric: tabular-nums; }

.empty { padding: 42px 20px; text-align: center; color: var(--text-3); }
.empty strong { display: block; color: var(--text-2); margin-bottom: 6px; font-size: 14px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 650;
  background: var(--slate-tint); color: var(--text-2);
  white-space: nowrap;
}
.pill.good { background: var(--st-occ-tint); color: var(--st-occ); }
.pill.warn { background: var(--st-res-tint); color: var(--st-res); }
.pill.bad { background: var(--st-rep-tint); color: var(--st-rep); }
.pill.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

/* point of sale */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.pos-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 12.5px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 9px; }
.tile {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  padding: 11px 10px; cursor: pointer; text-align: left; min-height: 76px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.tile:hover { border-color: var(--brand); background: var(--brand-tint); }
.tile:disabled { opacity: .45; cursor: not-allowed; }
.tile b { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.tile .p { font-size: 12.5px; color: var(--brand); font-weight: 700; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 10.5px; color: var(--text-3); }

.ticket { position: sticky; top: 0; }
.ticket-lines { max-height: 42vh; overflow-y: auto; }
.tline { display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-bottom: 1px solid var(--line-soft); }
.tline .nm { flex: 1; min-width: 0; font-size: 12.5px; }
.tline .nm small { display: block; color: var(--text-3); font-size: 10.5px; }
.tline .amt { font-variant-numeric: tabular-nums; font-size: 12.5px; width: 74px; text-align: right; }
.qty { display: flex; align-items: center; gap: 2px; }
.qty button { width: 23px; height: 23px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; line-height: 1; }
.qty span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-size: 12.5px; }

.totals { padding: 11px 13px; border-top: 1px solid var(--line); font-size: 12.5px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 17px; font-weight: 700; padding-top: 8px; margin-top: 5px; border-top: 1px solid var(--line); }

/* folio ledger */
.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger th { font-size: 10px; letter-spacing: .11em; text-transform: uppercase; color: var(--text-3); text-align: left; padding: 8px 0; border-bottom: 1px solid var(--text); }
.ledger td { padding: 9px 0; border-bottom: 1px dotted var(--line); font-variant-numeric: tabular-nums; }
.ledger td.right, .ledger th.right { text-align: right; }
.ledger tr.total td { border-top: 2px solid var(--text); border-bottom: 0; font-weight: 700; font-size: 15px; padding-top: 12px; }
.ledger tr.credit td { color: var(--green); }

/* modal */
.scrim {
  position: fixed; inset: 0;
  background: rgba(26, 32, 51, .52);
  display: grid; place-items: center;
  padding: 20px; z-index: 90;
  animation: fade .12s ease;
}
.modal {
  background: var(--surface); border-radius: 10px;
  width: 100%; max-width: 520px; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: rise .14s ease;
}
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 15.5px; }
.modal-head button { margin-left: auto; background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--text-3); }
.modal-body { padding: 17px; overflow-y: auto; }
.modal-foot { display: flex; gap: 9px; justify-content: flex-end; padding: 13px 17px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 10px 10px; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* dropdown menu off the user chip */
.menu {
  position: fixed;
  z-index: 95;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 5px;
  min-width: 214px;
}
.menu .mi {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px;
  border: 0; background: none; border-radius: var(--radius-sm);
  cursor: pointer; text-align: left; font-size: 13px;
}
.menu .mi:hover { background: var(--brand-tint); color: var(--brand); }
.menu .mi .ico { width: 16px; text-align: center; opacity: .8; }
.menu .sep { height: 1px; background: var(--line); margin: 5px 0; }
.menu .cap { padding: 8px 10px 4px; }

/* toast */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--brand-dark); color: #fff;
  padding: 10px 14px; border-radius: 7px;
  font-size: 13px; max-width: 330px;
  box-shadow: var(--shadow); animation: rise .14s ease;
}
.toast.bad { background: var(--red); }
.toast.good { background: var(--green); }

/* bar chart */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 136px; }
.bars .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; min-width: 4px; }
.bars .seg { border-radius: 1px; }
.bars .seg.rooms { background: var(--brand); }
.bars .seg.restaurant { background: var(--warm); }
.bars .seg.bar { background: var(--st-occ); }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 5px 16px; }

/* image preview tiles on the settings screen */
.img-drop {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 0;
  overflow: hidden;
  min-height: 132px;
  display: grid;
  place-items: center;
  text-align: center;
}
.img-drop.filled { padding: 0; border-style: solid; }
.img-drop img { display: block; width: 100%; height: 132px; object-fit: cover; }
.img-drop .none { color: var(--text-3); font-size: 12.5px; padding: 26px 14px; }

/* org chart */
.org { list-style: none; margin: 0; padding: 0; }
.org ul { list-style: none; margin: 0; padding-left: 22px; position: relative; }
.org ul::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 18px; width: 1px; background: var(--line); }
.org li { position: relative; padding: 4px 0; }
.org ul > li::before { content: ''; position: absolute; left: -14px; top: 20px; width: 11px; height: 1px; background: var(--line); }
.org .node { display: flex; align-items: center; gap: 9px; padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.org .node strong { font-size: 13px; }
.org .node .meta { color: var(--text-3); font-size: 11.5px; margin-left: auto; text-align: right; }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .pos { grid-template-columns: 1fr; }
  .ticket { position: static; }
  .g4, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .rail { transform: translateX(-100%); transition: transform .16s ease; box-shadow: var(--shadow-lg); }
  .rail.open { transform: none; }
  .rail.tight { width: var(--rail); }
  .rail.tight .rail-brand { justify-content: flex-start; padding: 0 14px; }
  .rail.tight .rail-brand .txt,
  .rail.tight .rail-group,
  .rail.tight .rail-link .txt,
  .rail.tight .rail-foot .txt { display: block; }
  .rail.tight .rail-link { justify-content: flex-start; padding: 8px 10px; }
  .rail.tight .rail-foot { justify-content: flex-start; flex-wrap: nowrap; }
  .main, .main.tight { margin-left: 0; }
  .burger { display: inline-block; }
  .filters {
    position: fixed; inset: 0 auto 0 0; z-index: 60;
    width: 250px; transform: translateX(-100%);
    transition: transform .18s ease; box-shadow: var(--shadow-lg);
  }
  .filters.open { transform: none; }
  .only-narrow { display: inline-flex; }
  .pane { padding: 12px 12px 60px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .rooms { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .titlebar .name, .titlebar .today { display: none; }
  table.data th:nth-child(n+4), table.data td:nth-child(n+4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* print */
@media print {
  .rail, .topbar, .toolbar, .filters, .no-print, #toasts { display: none !important; }
  .pane { overflow: visible; padding: 0; }
  .main { margin-left: 0; }
  .scrim { position: static; background: none; padding: 0; display: block; }
  .modal { max-width: none; box-shadow: none; max-height: none; }
  .modal-head button, .modal-foot { display: none !important; }
  body { background: #fff; }
}
