/* PMS Kovix — one hand-written stylesheet. No framework, no build step, no CDN.
   Colours, spacing and type come from the :root tokens; components use only tokens.
   The look is "ink and linen" (Slice 10); its reference is docs/design/look-2026-09-30/.
   tests/test_design_tokens.py checks the contrast of every token pair used for text. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter/InterVariable.2bf3d951bf9d.woff2") format("woff2");
}
/* The file holds weight 600 only. Never ask for another weight: the browser would fake it. */
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/literata/Literata-SemiBold.b5e650d53a50.ttf") format("truetype");
}

/* ---- Tokens ---------------------------------------------------------- */
:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Literata", Georgia, serif; /* the wordmark and the entrance heading only */

  --color-bg: #f6f1e8; /* linen */
  --color-surface: #fbf8f2; /* paper */
  --color-subtle: #e7e0d4; /* stone: plain chips, icon tiles, the calendar footer */
  --color-text: #1b2a4a; /* ink */
  --color-muted: #5c5a54;
  --color-border: #d4cbba; /* decorative rules and card edges */
  --color-field-border: #8f877a; /* inputs and ghost buttons: 3:1 against the surface */
  --color-primary: #1b2a4a;
  --color-primary-text: #ffffff;
  --color-focus: #c45c3e; /* terracotta ring */
  --color-accent: #c45c3e; /* terracotta where it is not text: today's rule, the active entry */
  --color-accent-text: #a8472b; /* terracotta when it is small text */
  --color-ok: #3f5e46;
  --color-ok-bg: #d7e4d8;
  --color-warn: #7a5406;
  --color-warn-bg: #f6e7c4;
  --color-bad: #9a2f2f;
  --color-bad-bg: #f4d6d4;
  --color-bad-text: #ffffff; /* text on a --color-bad button */

  --color-sidebar-bg: #1b2a4a;
  --color-sidebar-text: #c9c0b2;
  --color-sidebar-active: #2c3d63;
  --color-sidebar-active-text: #f6f1e8;

  --color-today: #f3e0d8; /* calendar: today's column */
  --color-weekend: #efe8dc;

  /* Calendar bars: the text on each is --stay-text. */
  --stay-confirmed: #1b2a4a;
  --stay-in-house: #5b7a62;
  --stay-checked-out: #6e6a62;
  --stay-text: #ffffff;

  /* Status chips: one text/background pair per status that exists. */
  --chip-confirmed-fg: #1b2a4a;
  --chip-confirmed-bg: #d8deea;
  --chip-in-house-fg: #3f5e46;
  --chip-in-house-bg: #d7e4d8;
  --chip-checked-out-fg: #58544d;
  --chip-checked-out-bg: #e4e0d8;
  --chip-cancelled-fg: #9a4a3c;
  --chip-cancelled-bg: #f3e4de;
  --hk-clean-fg: #3f5e46;
  --hk-clean-bg: #d7e4d8;
  --hk-dirty-fg: #9e4028;
  --hk-dirty-bg: #f3e0d8;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2.125rem; /* the public page's section headings */

  --sidebar-width: 240px;
  --topbar-height: 56px;
  --content-max: 1280px;
  --site-max: 1200px; /* the public page's column */
}

/* Dark mode follows the operating system; there is no toggle and nothing is stored. */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #161410;
    --color-surface: #1e1b16;
    --color-subtle: #2a261f;
    --color-text: #f4efe6;
    --color-muted: #b8b1a4;
    --color-border: #4a453b;
    --color-field-border: #8a8274;
    --color-primary: #d97a5e;
    --color-primary-text: #161410;
    --color-focus: #e08a70;
    --color-accent: #e08a70;
    --color-accent-text: #e08a70;
    --color-ok: #8fb396;
    --color-ok-bg: #1e2e22;
    --color-warn: #e0c070;
    --color-warn-bg: #3a3018;
    --color-bad: #e07a7a;
    --color-bad-bg: #3a1e1e;
    --color-bad-text: #161410;

    --color-sidebar-bg: #10151f;
    --color-sidebar-text: #c9c0b2;
    --color-sidebar-active: #1f2a40;
    --color-sidebar-active-text: #f4efe6;

    --color-today: #3a2620;
    --color-weekend: #221f19;

    --stay-confirmed: #34466e;
    --stay-in-house: #4f6f57;
    --stay-checked-out: #5f5b54;
    --stay-text: #ffffff;

    --chip-confirmed-fg: #a9b8d6;
    --chip-confirmed-bg: #243044;
    --chip-in-house-fg: #8fb396;
    --chip-in-house-bg: #1e2e22;
    --chip-checked-out-fg: #b5b0a6;
    --chip-checked-out-bg: #2a261f;
    --chip-cancelled-fg: #d48a7a;
    --chip-cancelled-bg: #3a221c;
    --hk-clean-fg: #8fb396;
    --hk-clean-bg: #1e2e22;
    --hk-dirty-fg: #e08a70;
    --hk-dirty-bg: #3a221c;
  }
}

/* ---- Reset and base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-4); }
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
p { margin: 0 0 var(--space-4); }
a { color: var(--color-primary); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

.sprite { display: none; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; }
.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;
}
.skip-link {
  position: absolute; left: var(--space-2); top: -3rem; z-index: 10;
  padding: var(--space-2) var(--space-3); background: var(--color-surface);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-2); }

/* The grid mark and the "PMS Kovix" wordmark: in the sidebar corner and on the entrance. */
.brand {
  display: flex; align-items: center; gap: var(--space-2);
  color: var(--color-sidebar-active-text); text-decoration: none;
}
.brand__mark { width: 1.625rem; height: 1.625rem; flex: none; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); }

/* ---- Application shell ---------------------------------------------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: var(--topbar-height) 1fr;
  grid-template-areas: "brand topbar" "sidebar content";
  min-height: 100vh;
}
.shell > .brand {
  grid-area: brand;
  padding: 0 var(--space-5);
  background: var(--color-sidebar-bg);
}
.topbar {
  grid-area: topbar;
  display: flex; align-items: center; gap: var(--space-4);
  padding: 0 var(--space-5);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
/* Two classes, so it wins over .btn's own display further down. */
.topbar .topbar__toggle { display: none; }
.topbar__date { color: var(--color-muted); font-size: var(--text-sm); }
.topbar__user { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }
.topbar__user form { margin: 0; }
.topbar__email { color: var(--color-muted); font-size: var(--text-sm); }

.sidebar {
  grid-area: sidebar;
  background: var(--color-sidebar-bg);
  padding: var(--space-4) var(--space-3);
}
.sidebar__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.sidebar__link {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 2.75rem; padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-sidebar-text); text-decoration: none;
}
.sidebar__link:hover { background: var(--color-sidebar-active); color: var(--color-sidebar-active-text); }
.sidebar__link[aria-current="page"] {
  background: var(--color-sidebar-active); color: var(--color-sidebar-active-text);
  font-weight: 600; box-shadow: inset 3px 0 0 var(--color-accent);
}

.content {
  grid-area: content;
  width: 100%; max-width: var(--content-max);
  min-width: 0; /* a wide table scrolls inside .table-wrap instead of widening the page */
  padding: var(--space-6) var(--space-5);
}

/* Phone: one ink bar (mark, Log out, menu button); the menu opens below it. */
@media (max-width: 767px) {
  .shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: var(--topbar-height) auto 1fr;
    grid-template-areas: "brand topbar" "sidebar sidebar" "content content";
  }
  .shell > .brand { padding: 0 var(--space-4); }
  .topbar {
    gap: var(--space-2); padding: 0 var(--space-3) 0 0;
    background: var(--color-sidebar-bg); color: var(--color-sidebar-active-text);
    border-bottom: 0;
  }
  .topbar .topbar__toggle { display: inline-flex; order: 2; border-color: var(--color-sidebar-text); }
  .topbar__date, .topbar__email { display: none; }
  .topbar .btn--secondary {
    background: transparent; color: var(--color-sidebar-active-text);
    border-color: var(--color-sidebar-text);
  }
  .sidebar { display: none; }
  .sidebar.is-open { display: block; }
  .content { padding: var(--space-5) var(--space-4); }
}

/* ---- Entrance (logged-out pages) ------------------------------------ */
.entrance {
  display: grid; place-items: center;
  min-height: 100vh; padding: var(--space-4);
}
.entrance__card {
  width: 100%; max-width: 26rem;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.entrance__brand { color: var(--color-text); margin-bottom: var(--space-5); }
.entrance h1 { font-family: var(--font-display); font-weight: 600; }
.entrance__submit { width: 100%; }

/* ---- Components ------------------------------------------------------ */
.card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* Primary is ink; --secondary is the "ghost" button on paper; --danger is brick. */
.btn, .entrance__card button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 2.75rem; padding: var(--space-2) var(--space-4);
  font: inherit; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--color-primary); color: var(--color-primary-text);
}
a.btn { text-decoration: none; }
.btn--secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-field-border); }
.btn--danger { background: var(--color-bad); color: var(--color-bad-text); }
.btn--icon { min-height: 2.75rem; padding: var(--space-2); background: transparent; color: inherit; }

.table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
.table th, .table td { padding: var(--space-3); border-bottom: 1px solid var(--color-border); text-align: left; }
.table th { font-size: var(--text-sm); color: var(--color-muted); font-weight: 600; }
.table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table caption { padding: var(--space-3); text-align: left; font-weight: 600; }
.table tbody th { color: var(--color-text); font-size: var(--text-md); }
/* Narrow screens: the table scrolls sideways inside its frame; the page itself never does. */
.table-wrap {
  /* position: the screen-reader labels inside buttons (.visually-hidden, position: absolute)
     stay inside this frame; without it they escape it and widen the whole page. */
  position: relative;
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.table-wrap .table th, .table-wrap .table td { white-space: nowrap; }
/* A long column heading ("Expected at check-out") may wrap, so the column is only as wide as
   its values and the table fits its frame at 1280 px. */
.table-wrap .table thead th { white-space: normal; vertical-align: bottom; }
.table-wrap:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.summary { color: var(--color-muted); margin: 0 0 var(--space-4); }

/* A chip always carries its word; the colour and the icon only repeat it. */
.chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 0 var(--space-2);
  font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
  border-radius: 999px;
  background: var(--color-subtle); color: var(--color-text);
}
.chip__icon { width: 0.875rem; height: 0.875rem; flex: none; }
.chip--ok { background: var(--color-ok-bg); color: var(--color-ok); }
.chip--warn { background: var(--color-warn-bg); color: var(--color-warn); }
.chip--bad { background: var(--color-bad-bg); color: var(--color-bad); }
/* Reservation status: the class is the status value itself (templates/_status_chip.html). */
.chip--confirmed { background: var(--chip-confirmed-bg); color: var(--chip-confirmed-fg); }
.chip--checked_in { background: var(--chip-in-house-bg); color: var(--chip-in-house-fg); }
.chip--checked_out { background: var(--chip-checked-out-bg); color: var(--chip-checked-out-fg); }
.chip--cancelled, .chip--no_show {
  background: var(--chip-cancelled-bg); color: var(--chip-cancelled-fg);
}
/* Housekeeping state (templates/_housekeeping_chip.html). */
.chip--clean { background: var(--hk-clean-bg); color: var(--hk-clean-fg); }
.chip--dirty { background: var(--hk-dirty-bg); color: var(--hk-dirty-fg); }

/* Counts at the top of the front desk and the housekeeping board. */
.tiles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3);
  list-style: none; margin: 0 0 var(--space-5); padding: 0;
}
@media (min-width: 768px) {
  .tiles--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-3); align-items: center;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.tile__icon {
  grid-row: span 2;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--color-subtle); color: var(--color-text);
}
.tile__icon--confirmed { background: var(--chip-confirmed-bg); color: var(--chip-confirmed-fg); }
.tile__icon--warn { background: var(--color-warn-bg); color: var(--color-warn); }
.tile__icon--in-house { background: var(--chip-in-house-bg); color: var(--chip-in-house-fg); }
.tile__count { font-size: 1.75rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile__label { font-size: var(--text-sm); color: var(--color-muted); }
.tile--dirty { background: var(--hk-dirty-bg); color: var(--hk-dirty-fg); border-color: transparent; }
.tile--clean { background: var(--hk-clean-bg); color: var(--hk-clean-fg); border-color: transparent; }
.tile--dirty .tile__icon, .tile--clean .tile__icon { background: transparent; color: inherit; }
.tile--dirty .tile__label, .tile--clean .tile__label { color: inherit; font-weight: 600; }

/* Form fields: our own markup and allauth's default elements (label + input inside <p>). */
label { display: block; font-weight: 600; margin-bottom: var(--space-1); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="tel"], input[type="search"], select, textarea {
  width: 100%; min-height: 2.75rem;
  padding: var(--space-2) var(--space-3);
  font: inherit; color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-md);
}
::placeholder { color: var(--color-muted); opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--color-primary); }
input[type="checkbox"] + label { display: inline; font-weight: 400; margin-left: var(--space-2); }
.errorlist { color: var(--color-bad); padding-left: var(--space-4); margin: 0 0 var(--space-2); }

.messages { list-style: none; padding: 0; margin: 0 0 var(--space-4); }
.messages__item {
  padding: var(--space-2) var(--space-3); margin-bottom: var(--space-2);
  border-radius: var(--radius-md); background: var(--color-subtle);
}
.messages__item--success { background: var(--color-ok-bg); color: var(--color-ok); }
.messages__item--warning { background: var(--color-warn-bg); color: var(--color-warn); }
.messages__item--error { background: var(--color-bad-bg); color: var(--color-bad); }

/* ---- Page layouts ---------------------------------------------------- */
/* A page title with its main action (e.g. "New guest") on the same line. */
.page-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-4);
}
.page-header h1 { margin: 0; }
.page-header__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* "Upcoming | All" above a list: plain links, the current one marked. */
.view-switch { display: flex; gap: var(--space-4); margin-bottom: var(--space-3); }
.view-switch [aria-current="page"] { font-weight: 600; text-decoration: none; color: var(--color-text); }

/* Two dates and a button on one line; stacked below 768 px. */
.date-search { margin-bottom: var(--space-4); }
.date-search__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); }
.date-search__row .form__field { flex: 1 1 12rem; margin-bottom: 0; }
.date-search__row .date-search__submit { flex: 0 0 auto; }

.search { max-width: 32rem; margin-bottom: var(--space-4); }
.search__row { display: flex; gap: var(--space-2); }

/* One column of fields at every width; the card keeps lines readable on wide screens. */
.form { max-width: 40rem; }
.form__field { margin-bottom: var(--space-4); }
.form__required { font-weight: 400; color: var(--color-muted); }
.form__hint { margin: 0 0 var(--space-1); font-size: var(--text-sm); color: var(--color-muted); }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
textarea { min-height: 6rem; resize: vertical; }
[aria-invalid="true"] { border-color: var(--color-bad); }

.error-summary {
  margin-bottom: var(--space-5); padding: var(--space-3) var(--space-4);
  background: var(--color-bad-bg); color: var(--color-bad);
  border: 1px solid var(--color-bad); border-radius: var(--radius-md);
}
.error-summary h2 { font-size: var(--text-md); margin-bottom: var(--space-2); }
.error-summary ul { margin: 0; padding-left: var(--space-5); }
.error-summary a { color: inherit; }

.pager { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-4); }

/* Front desk: one section per kind of work; small forms for the buttons in a table row. */
.desk-section { margin-bottom: var(--space-5); }
.desk-section h2 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.row-actions form, .page-header__actions form { margin: 0; }
/* The front-desk table fits its frame at 1280 px (Slice 8): the "still checked in" note may
   wrap; dates, chips and buttons stay on one line. Below 768 px it scrolls in .table-wrap. */
.table-wrap .desk-table .desk-table__note { white-space: normal; display: inline-block; max-width: 16rem; }
.desk-table .chip { margin-left: var(--space-1); vertical-align: middle; }

/* Housekeeping board (Slice 8), phone first: one card per room, one column below 768 px, a
   grid of cards above. No table, so nothing scrolls sideways. A card is positioned so the
   screen-reader text in its button stays inside it (the Slice 7 lesson). */
.hk-board {
  display: grid; grid-template-columns: 1fr; gap: var(--space-3);
  list-style: none; margin: 0; padding: 0;
}
@media (min-width: 768px) {
  .hk-board { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
}
.hk-room {
  position: relative; display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4); min-width: 0;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.hk-room--dirty { border-left: 6px solid var(--color-accent); }
.hk-room__title { font-size: var(--text-lg); margin: 0; }
.hk-room__type { font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
.hk-room__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
.hk-room__occupancy { font-weight: 600; }
.hk-room__facts {
  display: grid; grid-template-columns: max-content 1fr; gap: var(--space-1) var(--space-3);
  margin: 0; font-size: var(--text-sm);
}
.hk-room__facts dt { color: var(--color-muted); }
.hk-room__facts dd { margin: 0; overflow-wrap: anywhere; }
.hk-room form { margin: auto 0 0; }
.hk-room__button { width: 100%; min-height: 2.75rem; }
/* The one large button a housekeeper presses most: sage, like a clean room. */
.hk-room--dirty .hk-room__button {
  min-height: 3.25rem; background: var(--stay-in-house); color: var(--stay-text);
}

/* Planning calendar (Slice 6): rooms × 14 nights. Fixed column widths, so a one-night stay
   and a free night are the same width; the room column stays visible while the table scrolls
   sideways inside .table-wrap. A stay is a bar that fills its cell (the cell's colspan gives
   its length); its status is a word and an icon as well as a colour. */
.cal-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-4);
}
.cal-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cal-nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: var(--space-2) var(--space-4);
  font-weight: 600; text-decoration: none; color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-md);
}
.cal-jump { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2); }
.cal-jump label { margin: 0; align-self: center; }
.cal-jump input[type="date"] { width: auto; }

.calendar { table-layout: fixed; width: 78rem; }
.calendar__room-col { width: 8rem; }
.calendar__night-col { width: 5rem; }
.table-wrap .calendar th, .table-wrap .calendar td {
  padding: var(--space-1); border-left: 1px solid var(--color-border); vertical-align: middle;
}
.table-wrap .calendar thead th {
  font-size: var(--text-sm); text-transform: none; letter-spacing: 0;
  white-space: nowrap; vertical-align: middle;
}
.calendar .calendar__room {
  position: sticky; left: 0; z-index: 1;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface); border-left: 0; border-right: 1px solid var(--color-border);
  white-space: normal;
}
.calendar__room-name { display: block; font-weight: 600; color: var(--color-text); }
.calendar__note { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
.calendar__note--warn { color: var(--color-warn); font-weight: 600; }
/* Cells in a framed table do not wrap (.table-wrap .table th), and that rule outranks
   .calendar .calendar__room. A note such as "Overdue: Nováková" is wider than the room column,
   so the note itself wraps; a very long name may break inside the word. */
.table-wrap .calendar .calendar__note { white-space: normal; overflow-wrap: anywhere; }
.calendar__night { text-align: center; font-weight: 600; border-top: 3px solid transparent; }
.calendar__month { display: block; color: var(--color-text); }
.calendar__day { display: block; }
.calendar__today {
  display: block;
  color: var(--color-accent-text); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.calendar__night--weekend, .calendar__free--weekend { background: var(--color-weekend); }
.calendar .calendar__night--today {
  background: var(--color-today); color: var(--color-text);
  border-top-color: var(--color-accent);
}
.calendar__free--today { background: var(--color-today); }
.calendar__book {
  display: block; padding: var(--space-2) 0;
  text-align: center; font-size: var(--text-sm); color: var(--color-muted); text-decoration: none;
}
.calendar__book:hover { color: var(--color-text); text-decoration: underline; }

.calendar__stay-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-2);
  align-content: center; min-height: 2.75rem;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md); text-decoration: none; color: var(--stay-text);
}
.calendar__icon { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 1rem; height: 1rem; }
.calendar__name, .calendar__status, .calendar__clip {
  grid-column: 2;
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.calendar__name { font-weight: 600; line-height: 1.25; }
.calendar__status, .calendar__clip { font-size: 0.75rem; line-height: 1.25; }
.calendar__stay--confirmed .calendar__stay-link { background: var(--stay-confirmed); }
.calendar__stay--in-house .calendar__stay-link { background: var(--stay-in-house); }
.calendar__stay--checked-out .calendar__stay-link { background: var(--stay-checked-out); }
/* A one-night stay (colspan 1) is 5rem wide: no icon column, a smaller name so that it can be
   read in full, and the "from ..." / "until ..." line hidden from sight only. It stays in the
   link's text for screen readers. */
.calendar__stay[colspan="1"] .calendar__stay-link { display: block; padding: var(--space-1); }
.calendar__stay[colspan="1"] .calendar__name { font-size: 0.8125rem; }
.calendar__stay[colspan="1"] .calendar__clip {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.calendar tfoot th, .calendar tfoot td {
  border-top: 2px solid var(--color-field-border); border-bottom: 0;
  background: var(--color-subtle); color: var(--color-text);
}
.calendar tfoot .calendar__room { background: var(--color-subtle); }
.calendar__total { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* What the three bar colours mean, in words, under the calendar. */
.cal-legend {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5);
  list-style: none; margin: var(--space-4) 0; padding: 0;
  font-size: var(--text-sm); color: var(--color-muted);
}
.cal-legend li { display: flex; align-items: center; gap: var(--space-2); }
.cal-legend__swatch {
  display: grid; place-items: center; width: 2rem; height: 1.25rem;
  border-radius: var(--radius-sm); color: var(--stay-text);
}
.cal-legend__swatch .icon { width: 0.875rem; height: 0.875rem; }
.cal-legend__swatch--confirmed { background: var(--stay-confirmed); }
.cal-legend__swatch--in-house { background: var(--stay-in-house); }
.cal-legend__swatch--checked-out { background: var(--stay-checked-out); }

/* Label/value pairs; one column below 768 px. */
.details {
  display: grid; grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-5); margin: 0;
}
.details dt { font-weight: 600; color: var(--color-muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dd { margin-bottom: var(--space-3); }
}

/* Demo folio (Slice 7). The banner is plain text in a bordered box: it must be read, not
   decorated. Money columns use tabular figures (.num) so the decimals line up. */
.demo-banner {
  padding: var(--space-2) var(--space-3); margin-bottom: var(--space-4);
  background: var(--color-warn-bg); color: var(--color-warn);
  border: 1px solid var(--color-warn); border-radius: var(--radius-md); font-weight: 600;
}
/* The folio fits the page at desktop width: text columns may wrap; dates and amounts
   (.folio__keep, .num) never break. Below 768 px the table scrolls inside .table-wrap. */
.table-wrap .folio th, .table-wrap .folio td { white-space: normal; }
.table-wrap .folio .num, .table-wrap .folio .folio__keep { white-space: nowrap; }
.folio .btn { white-space: nowrap; }
.folio__expected td, .folio__expected th { font-style: italic; color: var(--color-muted); }
.folio__totals { margin: var(--space-4) 0 var(--space-5); }
.folio__totals .num { font-variant-numeric: tabular-nums; }
.quick-picks { margin-bottom: var(--space-4); }
.quick-picks h2 { font-size: var(--text-md); margin-bottom: var(--space-2); }
.quick-picks__list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-2); padding: 0; }
.form__fieldset { border: 0; margin: 0 0 var(--space-4); padding: 0; }
.form__fieldset legend { font-weight: 600; margin-bottom: var(--space-1); padding: 0; }
.form__radio { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-1); }
.form__radio label { display: inline; font-weight: 400; margin: 0; }

/* ---- Public home page (Slice 11) ------------------------------------- */
/* Not the application shell: one column, no sidebar, no script. Literata for its headings.
   The reference is docs/design/look-2026-09-30/mockup/Home-*.html, translated into classes. */
.site h1, .site h2 { font-family: var(--font-display); font-weight: 600; }
.site h3 { font-size: 1.125rem; font-weight: 700; margin: 0 0 var(--space-2); }
.site__inner {
  max-width: var(--site-max); margin: 0 auto;
  padding-left: var(--space-5); padding-right: var(--space-5);
}

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  padding-top: var(--space-5); padding-bottom: var(--space-5);
}
.site-header__brand { color: var(--color-text); }
.site-header__brand .brand__name { font-size: var(--text-xl); }
.site-nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-6); }
.site-nav a {
  padding: var(--space-2) 0;
  color: var(--color-muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
}
.site-nav a:hover { color: var(--color-text); text-decoration: underline; }
.site-header__actions { display: flex; align-items: center; gap: var(--space-3); }
/* CS | EN: two plain links; the current language is a marked span. */
.lang-switch {
  display: flex; list-style: none; margin: 0; padding: 0; overflow: hidden;
  border: 1px solid var(--color-field-border); border-radius: var(--radius-md);
}
.lang-switch__item {
  display: block; padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem; font-weight: 600; text-decoration: none;
  color: var(--color-text); background: var(--color-surface);
}
.lang-switch__item[aria-current] {
  font-weight: 700; background: var(--color-primary); color: var(--color-primary-text);
}
.lang-switch__item:focus-visible { outline-offset: -3px; }

.hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6) 4rem;
  padding-top: 3rem; padding-bottom: 4.5rem;
}
.hero__text { flex: 1 1 30rem; min-width: 0; }
.hero__tagline {
  margin: 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-accent-text);
}
.hero__headline {
  font-size: clamp(2.125rem, 5.2vw, 3.875rem); line-height: 1.08; letter-spacing: -0.015em;
  margin: var(--space-3) 0 0;
}
.hero__headline::after {
  content: ""; display: block; width: 4.5rem; height: 3px; margin: 1.75rem 0;
  background: var(--color-accent);
}
.hero__lead { max-width: 36rem; margin: 0; font-size: 1.1875rem; line-height: 1.55; color: var(--color-muted); }
.hero__points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: var(--space-2); }
.hero__points li { display: flex; align-items: center; gap: var(--space-2); }
.hero__points .icon { color: var(--color-ok); }
.hero__note {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin: 1.75rem 0 0; padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill); background: var(--color-subtle);
  color: var(--color-muted); font-size: 0.8125rem; font-weight: 600;
}
.hero__note .icon { width: 1rem; height: 1rem; color: var(--color-accent-text); }

/* The login card: the fields of the allauth login form, posted to the allauth login view. */
.login-card {
  flex: 0 1 26rem; min-width: 0;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.login-card__heading {
  display: flex; align-items: center; gap: var(--space-2);
  margin: 0; font-size: var(--text-xl);
}
.login-card__heading .icon { color: var(--color-accent-text); }
.login-card__intro { margin: var(--space-2) 0 var(--space-5); font-size: 0.9375rem; color: var(--color-muted); }
.login-card__submit { width: 100%; }
.login-card__help {
  margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm); color: var(--color-muted);
}
.login-card__help p { margin: 0 0 var(--space-1); }
.login-card__help strong { color: var(--color-text); }
.login-card__help a { font-weight: 600; }

.site-section { padding-top: var(--space-5); padding-bottom: 4.5rem; }
.site-section h2, .contact-band h2 { font-size: var(--text-2xl); line-height: 1.2; margin: 0; }
.site-section__lead {
  max-width: 44rem; margin: var(--space-3) 0 0;
  font-size: 1.0625rem; line-height: 1.55; color: var(--color-muted);
}

/* The planner drawing: a grid of 1 room column and 7 nights; stays lie over the night cells.
   On a narrow screen it scrolls inside its own frame, never the page. */
.planner {
  margin-top: 1.75rem; overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.planner__grid { min-width: 47.5rem; }
.planner__row {
  display: grid; grid-template-columns: 9.375rem repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--color-border);
}
.planner__row--head { border-top: 0; }
.planner__room { grid-column: 1; grid-row: 1; padding: var(--space-2) var(--space-3); }
.planner__number { display: block; font-weight: 700; font-size: 0.9375rem; }
.planner__type { display: block; font-size: 0.8125rem; color: var(--color-muted); }
.planner__night {
  padding: var(--space-2) var(--space-1); text-align: center;
  font-size: 0.8125rem; font-weight: 600; color: var(--color-muted);
  border-top: 3px solid transparent;
}
.planner__night--weekend, .planner__cell--weekend { background: var(--color-weekend); }
.planner__night--today {
  background: var(--color-today); color: var(--color-text);
  border-top-color: var(--color-accent);
}
.planner__today { display: block; font-size: 0.6875rem; color: var(--color-accent-text); }
.planner__cell { grid-row: 1; min-height: 3.625rem; border-left: 1px solid var(--color-border); }
.planner__cell--today { background: var(--color-today); }
/* Each night cell names its column, so a stay lying over it does not push it aside. */
.planner__cell:nth-child(2) { grid-column: 2; }
.planner__cell:nth-child(3) { grid-column: 3; }
.planner__cell:nth-child(4) { grid-column: 4; }
.planner__cell:nth-child(5) { grid-column: 5; }
.planner__cell:nth-child(6) { grid-column: 6; }
.planner__cell:nth-child(7) { grid-column: 7; }
.planner__cell:nth-child(8) { grid-column: 8; }
.planner__stay {
  grid-row: 1; z-index: 1; align-self: center;
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 2.5rem; margin: 0 3px; padding: 0 var(--space-2);
  border-radius: var(--radius-md); color: var(--stay-text);
  overflow: hidden; white-space: nowrap;
}
.planner__stay .icon { width: 1rem; height: 1rem; }
.planner__name { font-weight: 600; font-size: var(--text-sm); }
.planner__status { font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; }
.planner__stay--confirmed { background: var(--stay-confirmed); }
.planner__stay--in-house { background: var(--stay-in-house); }
.planner__stay--c2 { grid-column-start: 2; }
.planner__stay--c3 { grid-column-start: 3; }
.planner__stay--c4 { grid-column-start: 4; }
.planner__stay--c7 { grid-column-start: 7; }
.planner__stay--s1 { grid-column-end: span 1; }
.planner__stay--s2 { grid-column-end: span 2; }
.planner__stay--s3 { grid-column-end: span 3; }
.planner__stay--s4 { grid-column-end: span 4; }

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: var(--space-5); margin-top: 1.75rem;
}
.feature-grid--wide { grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr)); }
.feature {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.feature__icon {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md); background: var(--color-subtle);
}
.feature p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--color-muted); }
/* What the demo does not do yet. */
.not-yet {
  display: flex; align-items: flex-start; gap: var(--space-3);
  margin-top: var(--space-5); padding: var(--space-5);
  border-radius: var(--radius-lg); background: var(--color-subtle);
}
.not-yet .icon { margin-top: 2px; color: var(--color-warn); }
.not-yet p { margin: 0; font-size: 0.9375rem; line-height: 1.55; }

.steps {
  list-style: none; padding: 0; margin: 1.75rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr)); gap: 1.75rem;
}
.steps__item { display: flex; align-items: flex-start; gap: var(--space-4); }
.steps__number {
  flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 2px solid var(--color-accent); border-radius: var(--radius-pill);
  color: var(--color-accent-text);
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg);
}
.steps__item h3 { margin-top: var(--space-2); }
.steps__item p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--color-muted); }

/* The contact band takes the ink colours of the sidebar, in light and in dark. */
.contact-band { background: var(--color-sidebar-bg); color: var(--color-sidebar-text); }
.contact-band__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.75rem; padding-top: 4rem; padding-bottom: 4rem;
}
.contact-band__text { flex: 1 1 26rem; min-width: 0; }
.contact-band h2 { color: var(--color-sidebar-active-text); }
.contact-band p { max-width: 36rem; margin: var(--space-3) 0 0; font-size: 1.0625rem; line-height: 1.55; }
.contact-band__mail {
  display: inline-flex; align-items: center; gap: var(--space-3);
  min-height: 3.5rem; padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-sidebar-active-text); color: var(--color-sidebar-bg);
  font-weight: 700; font-size: 1.125rem; text-decoration: none;
}

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5);
  padding-top: 1.75rem; padding-bottom: 2.5rem;
  font-size: var(--text-sm); color: var(--color-muted);
}
.site-footer p { margin: 0; }
.site-footer__operator { flex-basis: 100%; }

/* Print folio: only the page content, in black on white; links print as plain text. */
@media print {
  .topbar, .sidebar, .shell > .brand, .skip-link, .messages, .no-print { display: none; }
  .shell { display: block; min-height: 0; }
  body { background: #ffffff; color: #000000; }
  .content { padding: 0; max-width: none; }
  .table-wrap { overflow: visible; border: 0; }
  .table, .table th, .table td { color: #000000; background: #ffffff; }
  .chip { background: #ffffff; color: #000000; padding: 0; }
  .demo-banner { background: #ffffff; color: #000000; border-color: #000000; }
  a { color: inherit; text-decoration: none; }
}
