/*
 * Asili design system — African Script's colours: black, green, a little pink.
 *
 * Black is the ground and the ink. Green is the single working accent: navigation,
 * primary actions, anything the eye should land on. Pink is the flourish and stays one —
 * the brand mark and the business date, and little else. Spend it more widely and it
 * stops meaning anything.
 *
 * Semantic colour (ok / warning / danger) is kept separate from the brand accent, so
 * "this room is clean" and "this is the primary button" never read as the same thing.
 *
 * One token layer, used by every screen. Colours are defined once on :root and
 * redefined for dark mode — never hardcoded in a component rule, so a screen cannot
 * end up readable in one theme and not the other.
 *
 * System fonts throughout: a front desk screen must paint instantly on a slow
 * connection, and a webfont round-trip is the wrong place to spend that budget.
 */

:root {
  --paper:       #F7F7F4;
  --surface:     #FFFFFF;
  --surface-2:   #EFEFEB;
  --surface-3:   #E4E5DF;
  --ink:         #0B0D0B;
  --ink-2:       #464A46;
  --ink-3:       #7A807B;
  --rule:        #DDDED8;
  --rule-soft:   #E9EAE5;

  --accent:      #0E7C36;
  --accent-ink:  #FFFFFF;
  --accent-soft: #DDF1E2;
  --pink:       #C1256E;
  --pink-soft:  #FBE2EF;

  --ok:          #17693F;
  --warn:        #9A6516;
  --danger:      #A32B27;
  --ok-soft:     #DCEEE3;
  --warn-soft:   #F6E9D0;
  --danger-soft: #F6DDDB;

  --radius:      6px;
  --radius-sm:   4px;
  --shadow:      0 1px 2px rgba(11,13,11,.07), 0 8px 24px -18px rgba(11,13,11,.38);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --sidebar-w: 232px;
  --topbar-h:  56px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #080A08;
    --surface:     #111411;
    --surface-2:   #191D19;
    --surface-3:   #232823;
    --ink:         #ECEFEB;
    --ink-2:       #A4ACA5;
    --ink-3:       #737B74;
    --rule:        #262B26;
    --rule-soft:   #1C201C;

    --accent:      #35D960;
    --accent-ink:  #04140A;
    --accent-soft: #0E2C17;
    --pink:       #FF74B1;
    --pink-soft:  #331526;

    --ok:          #4ED97F;
    --warn:        #D6A44A;
    --danger:      #E4695F;
    --ok-soft:     #0F2B1A;
    --warn-soft:   #2C2412;
    --danger-soft: #321917;

    --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 24px -18px rgba(0,0,0,.85);
  }
}

:root[data-theme="dark"] {
  --paper:       #080A08;
  --surface:     #111411;
  --surface-2:   #191D19;
  --surface-3:   #232823;
  --ink:         #ECEFEB;
  --ink-2:       #A4ACA5;
  --ink-3:       #737B74;
  --rule:        #262B26;
  --rule-soft:   #1C201C;
  --accent:      #35D960;
  --accent-ink:  #04140A;
  --accent-soft: #0E2C17;
  --pink:       #FF74B1;
  --pink-soft:  #331526;
  --ok:          #4ED97F;
  --warn:        #D6A44A;
  --danger:      #E4695F;
  --ok-soft:     #0F2B1A;
  --warn-soft:   #2C2412;
  --danger-soft: #321917;
  --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 24px -18px rgba(0,0,0,.85);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; font-weight: 650; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p  { margin: 0 0 .9em; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

.mono   { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num    { font-variant-numeric: tabular-nums; }
.muted  { color: var(--ink-2); }
.subtle { color: var(--ink-3); }

.eyebrow {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}

/* ---------- app shell ---------- */

.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100%; }

.sidebar {
  background: var(--surface); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}

.brand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 14px 18px; border-bottom: 1px solid var(--rule-soft);
}
.brand-logo { display: block; height: 40px; width: auto; max-width: 100%; object-fit: contain; }
.brand .sub { font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; }

.nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.nav-group { margin-bottom: 18px; }
.nav-group > .eyebrow { padding: 0 8px 6px; display: block; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-size: 13.5px; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav a.disabled { opacity: .42; pointer-events: none; }
.nav a .tag {
  margin-left: auto; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3);
}

.sidebar-foot { padding: 12px 14px; border-top: 1px solid var(--rule-soft); font-size: 12px; color: var(--ink-3); }

/* ---------- topbar ---------- */

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; background: var(--surface);
  border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20;
}

.property-switch { display: flex; align-items: center; gap: 8px; }
.property-switch select {
  font: inherit; font-weight: 600; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 5px 10px; max-width: 260px;
}

.business-date {
  display: flex; align-items: baseline; gap: 7px;
  padding: 4px 10px; background: var(--pink-soft);
  border-radius: var(--radius-sm); font-size: 12px; color: var(--ink);
}
.business-date .lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
                      text-transform: uppercase; color: var(--pink); }
.business-date .val { font-family: var(--mono); font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.who { text-align: right; line-height: 1.25; }
.who .name { font-weight: 600; font-size: 13px; }
.who .role { font-size: 11px; color: var(--ink-3); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

/* ---------- content ---------- */

.content { padding: 26px 22px 60px; flex: 1; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { color: var(--ink-2); margin: 0; }

.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--rule-soft);
             display: flex; align-items: center; gap: 12px; }
.card-body { padding: 18px; }

.grid { display: grid; gap: 14px; }
.grid-tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.tile { background: var(--surface); border: 1px solid var(--rule);
        border-radius: var(--radius); padding: 16px 18px; }
.tile .k { display: block; margin-bottom: 8px; }
.tile .v { font-size: 24px; font-weight: 700; letter-spacing: -.02em;
           font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .n { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ---------- forms ---------- */

label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 8px 11px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft); }

.field { margin-bottom: 15px; }
.field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--accent); color: var(--accent-ink);
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { filter: brightness(.95); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--rule); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); filter: none; }
.btn-link { background: none; border: none; color: var(--accent); padding: 0; font-weight: 500; }

/* ---------- flashes + alerts ---------- */

.flashes { display: grid; gap: 8px; margin-bottom: 18px; }
.alert {
  padding: 11px 14px; border-radius: var(--radius-sm);
  border-left: 3px solid var(--ink-3); background: var(--surface-2); font-size: 13.5px;
}
.alert-success { border-left-color: var(--ok);     background: var(--ok-soft); }
.alert-warning { border-left-color: var(--warn);   background: var(--warn-soft); }
.alert-error   { border-left-color: var(--danger); background: var(--danger-soft); }

/* ---------- login ---------- */

.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 420px at 50% -14%, var(--accent-soft), transparent 60%),
    radial-gradient(620px 320px at 88% 106%, var(--pink-soft), transparent 64%),
    var(--paper);
}
.auth-card { width: 100%; max-width: 384px; }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-logo { display: block; margin: 0 auto; width: auto; height: auto; max-width: 260px; max-height: 110px; object-fit: contain; }
.auth-brand .sw { display: block; margin-top: 5px; font-size: 12.5px;
                  font-style: italic; color: var(--ink-3); }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--ink-3); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--rule); }
  .nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px; }
  .nav-group { margin: 0; display: flex; gap: 6px; }
  .nav-group > .eyebrow { display: none; }
  .nav a { white-space: nowrap; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }
  .content { padding: 18px 14px 48px; }
}

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

/* Visible to screen readers only. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Language switcher. */
.locale-switch { display: inline-flex; gap: 10px; align-items: center; font-size: 12px; }
.locale-switch a { color: var(--ink-3); }
.locale-switch a:hover { color: var(--accent); }
.locale-switch [aria-current="true"] { color: var(--ink); font-weight: 600; }

/* ---------- forms (Asili form theme) ---------- */

.form-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .field-wide { grid-column: 1 / -1; }

.field-invalid input, .field-invalid select, .field-invalid textarea { border-color: var(--danger); }
.field-errors { list-style: none; margin: 5px 0 0; padding: 0; color: var(--danger); font-size: 12px; }

.field-check { display: flex; align-items: flex-start; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); margin: 0; }
label.check input { width: auto; }

.choice-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  padding: 5px 11px; border: 1px solid var(--rule); border-radius: 20px;
  background: var(--surface); font-size: 12.5px; font-weight: 500;
  color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip input { width: auto; margin: 0; }
.chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px;
                padding-top: 18px; border-top: 1px solid var(--rule-soft); }

/* ---------- data tables ---------- */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600; white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge-ok      { background: var(--ok-soft);     color: var(--ok); }
.badge-warn    { background: var(--warn-soft);   color: var(--warn); }
.badge-danger  { background: var(--danger-soft); color: var(--danger); }
.badge-accent  { background: var(--accent-soft); color: var(--accent); }
.badge-muted   { background: var(--surface-3);   color: var(--ink-3); }
.badge-pink    { background: var(--pink-soft);   color: var(--pink); }

.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty p { max-width: 46ch; margin: 0 auto 16px; }

.head-actions { margin-left: auto; display: flex; gap: 8px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1 1 auto; }

.status-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.status-strip .s {
  display: flex; align-items: baseline; gap: 7px; padding: 7px 12px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm);
}
.status-strip .s b { font-size: 15px; font-variant-numeric: tabular-nums; }
.status-strip .s span { font-size: 12px; color: var(--ink-3); }

.inline-form { display: inline; }
.status-select { font: inherit; font-size: 12px; padding: 3px 7px; width: auto; }

/* "or" divider on the login card. */
.or-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px;
              color: var(--ink-3); font-size: 11.5px; text-transform: uppercase;
              letter-spacing: .1em; font-family: var(--mono); }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* Price grid cells — narrow, right-aligned, tabular. */
.grid-cell {
  width: 108px; text-align: right; padding: 6px 9px; font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.grid-cell:disabled { background: var(--surface-2); color: var(--ink-3); }

/* ---------- cancellation ladder ---------- */

/* Each rung is one row: notice, charge type, amount, and a way to drop it. The amount
   column keeps its width when hidden so the rows below do not jump as types change. */
.rungs { display: grid; gap: 10px; }
.rung {
  display: grid; gap: 12px; align-items: start;
  grid-template-columns: minmax(90px, 130px) minmax(140px, 1fr) minmax(120px, 180px) auto;
  padding: 12px; border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm); background: var(--surface-2);
}
.rung-field label { font-size: 11.5px; }
.rung-field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.rung > button { align-self: center; margin-top: 10px; }

@media (max-width: 640px) {
  .rung { grid-template-columns: 1fr 1fr; }
  .rung > button { grid-column: 2; justify-self: end; }
}

.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.card-head > .btn-sm { margin-left: auto; }

/* ---------- detail lists and filter rows ---------- */

/* Label-above-value pairs. Used wherever a record is read rather than edited. */
.detail-grid { display: grid; gap: 14px 22px; margin: 0 0 14px;
               grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.detail-grid dt { font-size: 11.5px; font-weight: 600; color: var(--ink-3);
                  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.detail-grid dd { margin: 0; font-size: 14px; }

.filter-row { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; }
.filter-row .field { margin-bottom: 0; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pager-links { display: flex; gap: 8px; }

/* A line the register has since corrected. Struck rather than hidden — the book keeps
   every line, and an inspector is meant to see the correction. */
tr.superseded td { color: var(--ink-3); }
tr.superseded td:nth-child(2) strong { text-decoration: line-through; }

/* A wrapping row of small actions — agent shortcuts, filter chips. */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Forms that sit inside a table cell — the waitlist's book/offer/decline actions. */
.inline-form { display: inline-flex; align-items: center; gap: 6px; }
.inline-form select { width: auto; padding: 5px 8px; font-size: 12.5px; }
.row-actions { display: flex; gap: 12px; margin-top: 6px; font-size: 12.5px; }

/* ---------- booking chart ---------- */

/* One grid shared by every row: a label column, then one equal column per night. The
   nights are a custom property so the template sets it once and nothing hard-codes a
   width. min-width keeps a three-week view readable rather than squeezing columns to
   nothing; the wrapper scrolls instead. */
.chart-scroll { overflow-x: auto; }
.chart { --chart-label: 108px; --chart-col: 40px; min-width: 100%; }

.chart-row {
  display: grid;
  grid-template-columns: var(--chart-label) repeat(var(--chart-nights), minmax(var(--chart-col), 1fr));
  position: relative;
}

.chart-label {
  padding: 6px 10px; font-size: 12.5px; line-height: 1.25;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule-soft);
  background: var(--surface); position: sticky; left: 0; z-index: 2;
  display: flex; align-items: center; gap: 6px;
}
.chart-label .subtle { font-size: 11px; }

.chart-cell {
  border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft);
  min-height: 30px; font-variant-numeric: tabular-nums;
}

.chart-head .chart-cell, .chart-head .chart-label { border-bottom: 1px solid var(--rule); }
.chart-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5px 2px; font-size: 11px; line-height: 1.15;
}
.chart-date .dow { color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-size: 9.5px; }
.chart-date .dom { font-weight: 700; font-size: 13px; }
.chart-date .mon { color: var(--ink-3); font-size: 9.5px; }
.chart-date.is-weekend { background: var(--surface-2); }
/* The property's business date, not the browser's — marked in the brand's pink so it
   reads as "you are here" rather than as a warning. */
.chart-date.is-today { box-shadow: inset 0 -3px 0 var(--pink); }

.chart-strip .chart-label { background: var(--surface-2); }
.chart-count {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-2);
}
.chart-count.is-full { background: var(--warn-soft); color: var(--warn); }
.chart-count.is-oversold { background: var(--danger-soft); color: var(--danger); }

.chart-room .chart-night { cursor: crosshair; }
.chart-room .chart-night.is-selected { background: var(--accent-soft); }
.chart-room.is-drop-target .chart-night { background: var(--accent-soft); }

/* Bars sit in the same grid as the night cells, one row up in the stacking order. */
.chart-bar {
  grid-row: 1; align-self: center; margin: 3px 2px; z-index: 1;
  display: flex; align-items: center; padding: 0 7px; min-height: 24px;
  border-radius: var(--radius-sm); font-size: 11.5px; font-weight: 600;
  color: var(--accent-ink); background: var(--accent);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  cursor: grab; touch-action: none; user-select: none;
}
.chart-bar:hover { text-decoration: none; filter: brightness(1.06); }
.chart-bar.is-dragging { opacity: .55; cursor: grabbing; }
/* A stay running past the window's edge is cut square there, so it reads as continuing
   rather than as ending on the last column. */
.chart-bar.clipped-start { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.chart-bar.clipped-end { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.chart-bar .bar-text { overflow: hidden; text-overflow: ellipsis; }

.chart-bar.state-option     { background: var(--warn);   color: #fff; }
.chart-bar.state-confirmed  { background: var(--accent); color: var(--accent-ink); }
.chart-bar.state-in_house   { background: var(--pink);   color: #fff; }
.chart-bar.state-checked_out{ background: var(--surface-3); color: var(--ink-2); }

.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 12.5px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.legend-item .swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.swatch.state-option     { background: var(--warn); }
.swatch.state-confirmed  { background: var(--accent); }
.swatch.state-in_house   { background: var(--pink); }
.swatch.state-checked_out{ background: var(--surface-3); }
.legend-hint { margin-left: auto; color: var(--ink-3); }
.legend-hint.is-error { color: var(--danger); }

/* A credit on a folio — a payment, a rebate, a reversal — reads as money coming back. */
td.is-credit { color: var(--ok); }
tr.is-reversal td { background: var(--surface-2); }

/* A till that does not balance. Shouted about wherever it appears — over is as much a
   problem as short, so both get the same treatment. */
.is-variance { color: var(--danger); }

/* A room's checklist, folded away on the board.
   Collapsed by default because a floor of forty rooms with eight lines each is three
   hundred lines of text, and a board nobody can scan is a board nobody reads. The dot on
   the summary is the only thing that has to be visible from across the room: it means a
   required line is still outstanding. */
.checklist { margin-top: 6px; }
.checklist > summary { cursor: pointer; font-size: 12px; color: var(--ink-3); }
.checklist > summary:hover { color: var(--ink-2); }
.checklist[open] > summary { margin-bottom: 6px; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.check-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* The tick is the button. A checkbox plus a save is a form filled in at the end from
   memory by somebody holding a cloth in the other hand. */
.check-list .btn-link { text-align: left; font-size: 12.5px; }

/* The till. Two columns on a desk, stacked on the phone a waiter actually carries —
   and the bill goes first when stacked, because that is what a guest asks about. */
.pos-layout { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .pos-layout { grid-template-columns: 1fr 1fr; } }

/* One tap adds an item. The quantity sits before the name so a thumb reaches it first. */
.menu-row { display: flex; align-items: center; gap: 10px; padding: 7px 0;
            border-bottom: 1px solid var(--rule); }
.menu-row input[type="number"] { width: 56px; padding: 5px 6px; font-size: 13px; }
.menu-row .menu-name { flex: 1; text-align: left; font-size: 14px; }
.menu-row:last-child { border-bottom: 0; }

/* A voided line stays on the ticket, struck through: a guest reading the bill can see
   what came off, which is the difference between a correction and a disappearance. */
.struck { text-decoration: line-through; }

/* A whole tile that is a link. */
.tile-link { display: block; text-decoration: none; color: inherit; }
.tile-link:hover { border-color: var(--accent); }

/* ---- the public booking page ------------------------------------------------------
   Deliberately not the admin shell: no sidebar, no chrome that hints at what is behind
   the login. A stranger should see a hotel's booking page, not a corner of somebody's
   back office. The property's own colour arrives as --accent from the template. */
.public-page { background: var(--surface-2); }
.public-inner { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.public-head { background: var(--surface); border-bottom: 1px solid var(--rule); padding: 18px 0; margin-bottom: 28px; }
.public-brand { font-size: 18px; font-weight: 700; text-decoration: none; color: var(--ink); }
.public-logo { display: block; width: auto; height: auto; max-height: 52px; max-width: 240px; object-fit: contain; }

/* ---------- branding ---------- */

.brand-uploads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.brand-preview {
  display: grid; place-items: center; min-height: 104px; margin-bottom: 10px; padding: 14px;
  background: #FFFFFF; border: 1px solid var(--rule); border-radius: var(--radius);
}
.brand-preview img { max-width: 100%; max-height: 84px; object-fit: contain; }
.brand-preview-favicon img { width: 64px; height: 64px; }
.brand-actions { margin-top: 8px; }
.brand-remove { margin-top: 8px; }
.brand-section { margin-top: 28px; }
.brand-section > h2 { margin: 0 0 2px; font-size: 16px; }
.brand-section > p { margin: 0 0 12px; }

/* A logo drawn for white paper — African Script's black Africa among them — disappears on a dark page. */
@media (prefers-color-scheme: dark) {
  .brand-logo, .auth-logo, .public-logo { background: #FFFFFF; padding: 5px 9px; border-radius: var(--radius); }
}
.public-intro { color: var(--ink-2); max-width: 60ch; }
.public-search { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; }

.public-options { display: grid; gap: 14px; }
.public-option { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
                 padding: 18px; display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.public-option-body { flex: 1 1 260px; }
.public-option-body h2 { margin: 0 0 4px; font-size: 16px; }
.public-option-price { text-align: right; margin-left: auto; }
.public-total { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }

/* Shown only when stock is genuinely short. "3 left" on every row is the oldest trick on
   a booking site, and guests recognise it. */
.public-scarce { color: var(--warn); font-size: 12.5px; margin: 6px 0 0; }

.public-summary { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
                  padding: 18px; display: flex; justify-content: space-between; gap: 18px;
                  align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.public-reference { font-size: 20px; font-family: var(--mono, monospace); }
.public-empty { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
                padding: 32px; text-align: center; }
.public-foot { display: flex; gap: 14px; justify-content: space-between;
               padding-top: 28px; padding-bottom: 28px; font-size: 12.5px; }

/* The deposit on the booked page — set apart, because it is the one thing still to do. */
.public-deposit { margin: 18px 0; padding: 14px 16px; border: 1px solid var(--rule-soft); border-radius: 8px; }
.public-pay { display: grid; gap: 8px; max-width: 360px; margin-top: 10px; }
.public-pay input[type="tel"] { font-size: 1.05rem; }
