/* RVS Lodge design system. Colours are tokens, so light and dark share every rule below. */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --bg: #f6f4ee;
  --bg-glow: #e9f1ec;
  --surface: #ffffff;
  --surface-2: #f3f1ea;
  --ink: #16292b;
  --muted: #566768;
  --line: #e3dfd4;
  --line-strong: #8d9692;
  --brand: #0f4c4f;
  --brand-strong: #0a3a3c;
  --brand-ink: #ffffff;
  --brand-soft: #e2efed;
  --accent: #c8923b;
  --free: #e1f4e7;
  --free-ink: #14532d;
  --free-dot: #22a35a;
  --busy: #fbefd9;
  --busy-ink: #734503;
  --busy-dot: #d98a1f;
  --late: #fbe3df;
  --late-ink: #8a1f11;
  --late-dot: #d9432e;
  --danger: #a32a18;
  --flag-bg: #fdf1ee;
  --shadow-sm: 0 1px 2px rgb(22 41 43 / .05), 0 1px 3px rgb(22 41 43 / .06);
  --shadow-md: 0 2px 4px rgb(22 41 43 / .04), 0 10px 24px -8px rgb(22 41 43 / .16);
  --shadow-lg: 0 18px 44px -14px rgb(10 58 60 / .38);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 64px;
  --tabs-h: 68px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1718;
    --bg-glow: #122526;
    --surface: #152224;
    --surface-2: #1b2b2d;
    --ink: #e9efef;
    --muted: #a4b3b4;
    --line: #27393b;
    --line-strong: #6e8082;
    --brand: #55bdb2;
    --brand-strong: #76d1c7;
    --brand-ink: #06201f;
    --brand-soft: #173a3a;
    --accent: #e0ad5c;
    --free: #12301f;
    --free-ink: #a9e6c0;
    --free-dot: #4ed08a;
    --busy: #38290d;
    --busy-ink: #f6d294;
    --busy-dot: #efaa45;
    --late: #3e1812;
    --late-ink: #f8b7ac;
    --late-dot: #f26b55;
    --danger: #f58d7c;
    --flag-bg: #2d1a16;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-md: 0 10px 24px -8px rgb(0 0 0 / .6);
    --shadow-lg: 0 18px 44px -14px rgb(0 0 0 / .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: radial-gradient(900px 480px at 85% -10%, var(--bg-glow), transparent 70%) no-repeat, var(--bg);
  font: 400 15.5px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
}
.i { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.22em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Page changes */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out .14s ease-in both; }
::view-transition-new(root) { animation: page-in .26s var(--ease) both; }
.topbar { view-transition-name: topbar; }
.tabs { view-transition-name: tabs; }
::view-transition-old(topbar), ::view-transition-new(topbar), ::view-transition-old(tabs), ::view-transition-new(tabs) { animation: none; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--late-dot) 55%, transparent); } 60% { box-shadow: 0 0 0 7px transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bar { 0% { transform: scaleX(0); } 60% { transform: scaleX(.72); } 100% { transform: scaleX(.92); } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(14px, -18px); } }
@keyframes sheet { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* Thin bar while the next page loads */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; background: var(--accent); transform-origin: left; transform: scaleX(0); pointer-events: none; }
html.navigating .progress { animation: bar 2.4s var(--ease) forwards; }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--header-h);
  padding: 10px max(20px, calc((100% - 1120px) / 2));
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; text-decoration: none; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: linear-gradient(140deg, #16686a, #0a3a3c); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14); }
.topnav { display: none; align-items: center; gap: 2px; }
.topnav a, .topnav button {
  display: inline-flex; align-items: center; gap: 7px; width: auto; min-height: 38px; margin: 0; padding: 7px 12px;
  color: var(--muted); background: none; border: 0; border-radius: 10px; font-family: inherit; font-size: .92rem; font-weight: 500; line-height: 1; text-decoration: none; cursor: pointer; box-shadow: none;
  transition: color .16s, background .16s;
}
.topnav a:hover, .topnav button:hover { color: var(--ink); background: var(--surface-2); transform: none; box-shadow: none; }
.topnav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.topnav form { margin: 0; }

/* Phone tab bar */
.tabs {
  position: fixed; inset: auto 0 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tabs form { margin: 0; display: grid; place-items: center; }
.tab, .tabs summary {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 2px; list-style: none;
  color: var(--muted); font-size: .7rem; font-weight: 600; text-decoration: none; border-radius: 12px; cursor: pointer; transition: color .16s, background .16s, transform .12s;
}
.tabs summary::-webkit-details-marker { display: none; }
.tab .i, .tabs summary .i { width: 22px; height: 22px; transition: transform .22s var(--ease); }
.tab[aria-current="page"] { color: var(--brand); }
.tab[aria-current="page"] .i { transform: translateY(-1px) scale(1.08); }
.tab:active, .tabs summary:active { transform: scale(.94); }
.fab {
  display: grid; place-items: center; width: 54px; height: 54px; min-height: 0; margin: -22px 0 0; padding: 0; border-radius: 18px;
  color: var(--brand-ink); background: linear-gradient(145deg, var(--brand), var(--brand-strong)); box-shadow: var(--shadow-lg);
}
.fab .i { width: 26px; height: 26px; }
.fab:hover { transform: none; }
.fab:active { transform: scale(.93); }
.fab-label { font-size: .7rem; font-weight: 600; color: var(--muted); margin-top: 3px; }
.sheet-menu[open]::before { content: ""; position: fixed; inset: 0; background: rgb(6 20 20 / .46); animation: fade .2s both; }
.sheet-panel {
  position: fixed; inset: auto 0 0; z-index: 2; padding: 10px 14px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); animation: sheet .28s var(--ease) both;
}
.sheet-panel::before { content: ""; display: block; width: 40px; height: 4px; margin: 2px auto 10px; background: var(--line); border-radius: 4px; }
.sheet-panel a, .sheet-panel button {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 50px; margin: 0; padding: 0 12px; color: var(--ink); background: none; border: 0; border-radius: 12px;
  font-family: inherit; font-size: 1rem; font-weight: 500; line-height: 1; text-decoration: none; box-shadow: none; text-align: left; cursor: pointer;
}
.sheet-panel a:hover, .sheet-panel button:hover { background: var(--surface-2); transform: none; box-shadow: none; }
.sheet-panel form { margin: 0; }

main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 22px 20px 40px; }
body.has-tabs main { padding-bottom: calc(var(--tabs-h) + 34px + env(safe-area-inset-bottom)); }
main > *, .rooms > *, .docs > * { animation: rise .42s var(--ease) both; }
main > *:nth-child(2) { animation-delay: .04s; }
main > *:nth-child(3) { animation-delay: .08s; }
main > *:nth-child(4) { animation-delay: .12s; }
main > *:nth-child(5) { animation-delay: .16s; }
main > *:nth-child(n+6) { animation-delay: .2s; }
.rooms > *:nth-child(2) { animation-delay: .03s; }
.rooms > *:nth-child(3) { animation-delay: .06s; }
.rooms > *:nth-child(4) { animation-delay: .09s; }
.rooms > *:nth-child(5) { animation-delay: .12s; }
.rooms > *:nth-child(n+6) { animation-delay: .15s; }

h1 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); font-weight: 700; line-height: 1.2; letter-spacing: -.022em; margin: 4px 0 16px; }
h2 { font-size: 1rem; font-weight: 650; letter-spacing: -.008em; margin: 26px 0 10px; }
a { color: var(--brand); text-underline-offset: 2px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: .9rem; }
.page-sub { color: var(--muted); margin: -10px 0 18px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.card > :last-child { margin-bottom: 0; }

/* Buttons */
button, .linkbutton {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 14px; padding: 0 18px;
  color: var(--brand-ink); background: var(--brand); border: 1px solid transparent; border-radius: 12px; font-family: inherit; font-size: .98rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform .14s var(--ease), box-shadow .18s, background .18s, opacity .18s;
}
button:hover, .linkbutton:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
button:active, .linkbutton:active { transform: translateY(0) scale(.985); box-shadow: none; }
button.secondary, .linkbutton { color: var(--brand); background: var(--surface); border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); }
button.danger { color: var(--danger); background: var(--surface); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
button.big { min-height: 56px; font-size: 1.04rem; background: linear-gradient(145deg, var(--brand), var(--brand-strong)); box-shadow: var(--shadow-md); margin-bottom: 8px; }
button:disabled { cursor: progress; opacity: .72; transform: none; box-shadow: none; }
button.is-loading:disabled { color: transparent; }
button.is-loading:disabled::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--brand-ink) 35%, transparent); border-top-color: var(--brand-ink); animation: spin .7s linear infinite;
}
button.secondary.is-loading:disabled::after, button.danger.is-loading:disabled::after { border-color: var(--line); border-top-color: var(--brand); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 80%, transparent); outline-offset: 2px; }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 12px; font: inherit; transition: border-color .16s, box-shadow .16s;
}
input:hover, select:hover, textarea:hover { border-color: var(--brand); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
textarea { min-height: 88px; resize: vertical; }
input[type=file] { padding: 8px; border-style: dashed; background: var(--surface-2); color: var(--muted); cursor: pointer; }
input[type=file]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; color: var(--brand); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; font-family: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.row, .row3 { display: grid; gap: 12px; }
.row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.row3 { grid-template-columns: repeat(3, 1fr); }
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.modes label { margin: 0; font-weight: 500; }
.modes input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.modes span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
  text-transform: uppercase; letter-spacing: .03em; font-size: .86rem; font-weight: 600; cursor: pointer; transition: background .16s, color .16s, border-color .16s, transform .12s;
}
.modes span:active { transform: scale(.97); }
.modes input:checked + span { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
.modes input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 80%, transparent); outline-offset: 2px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 10px 0; cursor: pointer; }
label.check input { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--brand); }
details summary { cursor: pointer; font-weight: 600; padding: 6px 0; color: var(--brand); }
details[open] > :not(summary) { animation: rise .24s var(--ease) both; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child > td, tr:last-child > th { border-bottom: 0; }
th { font-size: .78rem; font-weight: 600; color: var(--muted); }
tbody tr { transition: background .14s; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.scroll td:first-child { white-space: nowrap; }
.owing { color: var(--danger); }
.struck { color: var(--muted); text-decoration: line-through; }

/* Numbers */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 14px; }
.facts:has(> :nth-child(4)) { grid-template-columns: repeat(2, 1fr); }
.facts > div { min-width: 0; }
.facts .i { display: block; width: 20px; height: 20px; margin-bottom: 8px; color: var(--brand); }
.facts b { display: block; font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.facts span { display: block; margin-top: 4px; font-size: .78rem; line-height: 1.3; color: var(--muted); }

/* Status */
.tag { display: inline-flex; align-items: center; padding: 3px 10px; font-size: .74rem; font-weight: 600; letter-spacing: .01em; color: var(--muted); background: var(--surface-2); border-radius: 99px; vertical-align: middle; text-transform: capitalize; }
.tag.active, .tag.ok { color: var(--free-ink); background: var(--free); }
.tag.void { color: var(--late-ink); background: var(--late); }
.tag.ok { animation: pop .34s var(--ease) both; }
.error { padding: 12px 14px; margin-bottom: 12px; color: var(--late-ink); background: var(--late); border-radius: 12px; font-weight: 500; animation: rise .28s var(--ease) both; }
.flag { position: relative; padding: 11px 14px; margin: 10px 0; color: var(--ink); background: var(--flag-bg); border: 1px solid color-mix(in srgb, var(--late-dot) 30%, var(--line)); border-left: 4px solid var(--late-dot); border-radius: 10px; font-size: .94rem; }
.clear { color: var(--free-ink); font-weight: 500; }
.nodata { color: var(--muted); font-style: italic; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-size: .92rem; }
.pager a { text-decoration: none; font-weight: 500; }
.emailtext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; max-height: 420px; overflow-y: auto; }
.secretkey { font: 600 1.05rem ui-monospace, Consolas, monospace; overflow-wrap: anywhere; background: var(--surface-2); padding: 12px; border-radius: 10px; }

/* Room board */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.page-head h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions form { margin: 0; }
.actions button, .actions .linkbutton { width: auto; margin: 0; }
/* On phones the tab bar and its More sheet already hold these. */
.page-head .actions { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 2px; font-size: .84rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.free { background: var(--free-dot); }
.dot.busy { background: var(--busy-dot); }
.dot.late { background: var(--late-dot); animation: pulse 2s ease-out infinite; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.rooms form { margin: 0; display: grid; }
.room {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1px; width: 100%; min-height: 112px; margin: 0; padding: 14px; overflow: hidden;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); font-weight: 400; text-align: left; text-decoration: none; overflow-wrap: anywhere;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.room::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--status); }
.room:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--status); }
.room:active { transform: scale(.98); }
.room strong { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.room small { font-size: .84rem; color: var(--muted); }
.room .status { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; color: var(--status-ink); font-weight: 600; font-size: .8rem; }
.room.free { --status: var(--free-dot); --status-ink: var(--free-ink); }
.room.busy { --status: var(--busy-dot); --status-ink: var(--busy-ink); }
.room.late { --status: var(--late-dot); --status-ink: var(--late-ink); }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .i { width: 34px; height: 34px; margin-bottom: 10px; color: var(--brand); }

/* Check-in steps */
.stepper { display: flex; align-items: center; margin: 2px 0 20px; padding: 0; list-style: none; }
.stepper li { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; font-size: .82rem; font-weight: 600; color: var(--muted); }
.stepper li:last-child { flex: none; }
.stepper li::after { content: ""; flex: 1; height: 2px; margin: 0 8px; background: var(--line); border-radius: 2px; transition: background .3s; }
.stepper li:last-child::after { display: none; }
.stepper b { display: grid; place-items: center; width: 28px; height: 28px; flex: none; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%; font-size: .8rem; }
.stepper .now { color: var(--ink); }
.stepper .now b { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.stepper .done b { color: #fff; background: var(--free-dot); border-color: var(--free-dot); animation: pop .34s var(--ease) both; }
.stepper .done::after { background: var(--free-dot); }
.stepper .label { display: none; }
.step h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 0; }
.step.done { border-color: color-mix(in srgb, var(--free-dot) 45%, var(--line)); }
.step.locked { opacity: .58; }
.preview { display: block; max-width: 100%; max-height: 340px; margin: 10px 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; animation: fade .4s both; }
.review { display: grid; gap: 16px; margin-top: 14px; }
.papers h2:first-child { margin-top: 0; }
.papers .preview { max-height: none; width: 100%; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.docs .card { margin: 0; overflow-wrap: anywhere; }

/* Login */
body.auth { display: grid; }
body.auth main { display: grid; align-items: center; justify-items: center; max-width: none; min-height: 100dvh; padding: 24px 18px; overflow: hidden; position: relative; }
.auth-bg { position: fixed; inset: 0; z-index: -1; background: linear-gradient(150deg, #0a3a3c, #0f5a5c 55%, #17494d); }
.auth-bg::before, .auth-bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(50px); animation: float 11s ease-in-out infinite; }
.auth-bg::before { width: 340px; height: 340px; top: -90px; right: -60px; background: rgb(200 146 59 / .34); }
.auth-bg::after { width: 300px; height: 300px; bottom: -80px; left: -60px; background: rgb(85 189 178 / .28); animation-delay: -5s; }
.auth-card { width: 100%; max-width: 410px; padding: 28px 24px; background: var(--surface); border-radius: 22px; box-shadow: 0 30px 70px -24px rgb(0 0 0 / .55); }
.auth-card .brand { margin: 0 0 20px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card .card { padding: 0; margin: 0; border: 0; box-shadow: none; background: none; }

/* Printed registration form */
.sheet { color: #000; background: #fff; padding: 24px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.sheet header { text-align: center; border-bottom: 2px solid #000; padding-bottom: 8px; }
.sheet header h1 { margin: 0; font-size: 24px; color: #000; }
.sheet header p { margin: 2px 0 0; font-size: 15px; }
.sheet section { border: 1px solid #000; padding: 8px 14px 14px; margin-top: 14px; }
.sheet h2 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #000; }
.sheet .line { border-bottom: 1px solid #000; min-height: 52px; display: flex; align-items: flex-start; padding-top: 3px; }
.sheet .line span, .sheet .sign span { font-size: 11px; }
.sheet .line.short { max-width: 50%; }
.sheet .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sheet .sign { border: 1px solid #000; min-height: 66px; padding: 3px 6px; margin-top: 8px; }
.sheet .declare { margin: 10px 0 0; font-size: 12px; }
.sheet .pay { display: flex; gap: 28px; align-items: center; margin-top: 14px; font-size: 14px; }
.sheet .box { display: inline-block; width: 15px; height: 15px; border: 1px solid #000; vertical-align: -2px; margin-right: 3px; }
.sheet .notice { font-size: 10.5px; margin: 10px 0 0; }


/* Logo */
.logo { display: block; flex: none; }
.auth-card .brand { font-size: 1.2rem; }

/* Small additions */
.linkbutton.compact { width: auto; min-height: 40px; margin: 0; padding: 0 14px; font-size: .9rem; }
.iconbutton { width: 34px; min-height: 34px; height: 34px; margin: 0; padding: 0; color: var(--muted); background: var(--surface-2); border-radius: 50%; }
.iconbutton:hover { color: var(--danger); background: var(--late); transform: none; box-shadow: none; }
.iconbutton .i { width: 16px; height: 16px; }
.pills { display: flex; gap: 8px; margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.pills a { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 38px; padding: 0 15px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; font-size: .9rem; font-weight: 600; text-decoration: none; transition: background .16s, color .16s; }
.pills a[aria-current="page"] { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
.pills span { padding: 0 7px; font-size: .74rem; line-height: 18px; color: var(--ink); background: var(--surface-2); border-radius: 99px; }

/* Calendar */
.cal { padding: 14px; }
.cal-head { margin-bottom: 10px; }
.cal-head a { display: grid; place-items: center; width: 38px; height: 38px; color: var(--brand); background: var(--surface-2); border-radius: 50%; }
.cal-head strong { font-size: 1.05rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-names span { padding: 4px 0; text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); }
.cal-day { display: flex; flex-direction: column; gap: 3px; min-height: 58px; padding: 6px 3px; color: var(--ink); text-align: center; text-decoration: none; border: 1px solid transparent; border-radius: 10px; transition: background .14s, border-color .14s, transform .12s; }
.cal-day:hover { background: var(--surface-2); }
.cal-day:active { transform: scale(.96); }
.cal-day b { font-size: .9rem; font-weight: 600; line-height: 1.3; }
.cal-day.other { opacity: .38; }
.cal-day.today b { display: inline-block; width: 24px; margin: 0 auto; color: var(--brand-ink); background: var(--brand); border-radius: 50%; }
.cal-day.chosen { background: var(--brand-soft); border-color: var(--brand); }
.cal-marks { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.mark { display: inline-block; min-width: 16px; padding: 0 3px; font-size: .68rem; font-style: normal; font-weight: 700; line-height: 16px; text-align: center; border-radius: 5px; }
.mark.arrive { color: var(--free-ink); background: var(--free); }
.mark.stay { color: var(--busy-ink); background: var(--busy); }
.mark.gone { color: var(--late-ink); background: var(--late); }
.cal-legend { margin-top: 12px; font-size: .78rem; }
.group-title { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: .86rem; font-weight: 650; }
.group-title:first-child { margin-top: 0; }
.dot.other { background: var(--line-strong); }
.cal-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.cal-entry:last-child { border-bottom: 0; }
.cal-entry strong { display: block; font-weight: 600; }
.cal-entry small { color: var(--muted); }
.cal-dates { flex: none; color: var(--muted); font-size: .8rem; text-align: right; }
@media (min-width: 760px) {
  .cal-day { min-height: 76px; padding: 8px 6px; }
}

/* Live alert */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 24px); z-index: 70; display: flex; align-items: center; gap: 12px; width: min(92vw, 420px); padding: 14px 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--accent); border-radius: 16px; box-shadow: var(--shadow-lg); text-decoration: none; transform: translateX(-50%); animation: toast-in .4s var(--ease) both; }
.toast .i { width: 24px; height: 24px; color: var(--accent); }
.toast strong { display: block; }
.toast small { color: var(--muted); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 18px); } }
@media (min-width: 760px) { .toast { bottom: 24px; } }

@media (min-width: 760px) {
  .topnav { display: flex; }
  .page-head .actions { display: flex; }
  .facts:has(> :nth-child(4)) { grid-template-columns: repeat(4, 1fr); }
  .tabs { display: none; }
  body.has-tabs main { padding-bottom: 48px; }
  .stepper .label { display: inline; }
}
@media (min-width: 960px) {
  .review { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .papers { position: sticky; top: calc(var(--header-h) + 14px); max-height: calc(100vh - var(--header-h) - 28px); overflow-y: auto; }
}

@media (max-width: 480px) {
  table { font-size: .86rem; }
  th, td { padding-right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}

@page { size: A4; margin: 12mm; }
@media print {
  .no-print, .topbar, .tabs, .progress { display: none !important; }
  html, body { background: #fff !important; color-scheme: light; }
  body.has-tabs main, main { max-width: none; padding: 0; }
  main > * { animation: none !important; }
  .sheet { border: 0; padding: 0; }
}

/* Chart colours: validated for colour blindness in both themes. */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --tip: #16292b; --tip-ink: #ffffff; }
@media (prefers-color-scheme: dark) { :root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --tip: #e9efef; --tip-ink: #10201f; } }
.chart { margin: 0 0 14px; }
.chart figcaption strong { display: block; font-size: .96rem; font-weight: 650; }
.chart figcaption .muted { margin: 2px 0 6px; font-size: .82rem; }
.chart svg { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-1); opacity: .1; }
.chart .end { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover { fill: var(--muted); fill-opacity: .1; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; }
.chart-table { margin-top: 8px; font-size: .86rem; }
.chart-table summary { font-size: .84rem; font-weight: 500; }
.hbars { display: grid; gap: 10px; margin-top: 10px; }
.hbar { display: grid; grid-template-columns: minmax(84px, 34%) 1fr auto; align-items: center; gap: 10px; font-size: .86rem; }
.hbar-label { color: var(--ink); overflow-wrap: anywhere; }
.hbar-track { height: 14px; }
.hbar-track i { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; animation: grow .6s var(--ease) both; transform-origin: left; }
.hbar-value { color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes grow { from { transform: scaleX(0); } }
.tip { position: fixed; z-index: 80; max-width: 260px; padding: 7px 10px; color: var(--tip-ink); background: var(--tip); border-radius: 8px; font-size: .8rem; line-height: 1.35; pointer-events: none; box-shadow: var(--shadow-md); }
.chart-grid { display: grid; gap: 14px; }
.chart-grid .chart { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.kpi span { display: block; color: var(--muted); font-size: .8rem; }
.kpi b { display: block; margin-top: 4px; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: .76rem; }
.today-lists { display: grid; gap: 14px; margin-bottom: 14px; }
.today-lists .card { margin: 0; }
.today-lists .cal-entry:first-of-type { margin-top: 6px; }

/* Room chart */
.tape-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.tape { display: grid; min-width: max-content; font-size: .8rem; }
.tape-row { display: grid; grid-template-columns: 76px repeat(14, minmax(58px, 1fr)); min-height: 42px; border-bottom: 1px solid var(--line); }
.tape-row:last-child { border-bottom: 0; }
.tape-head { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-weight: 600; }
.tape-cell { grid-row: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 1px solid var(--line); color: var(--muted); text-align: center; text-decoration: none; line-height: 1.2; }
.tape-cell.today { background: var(--brand-soft); color: var(--ink); }
a.tape-cell:hover { background: var(--free); color: var(--free-ink); }
.tape-room { position: sticky; left: 0; z-index: 1; grid-column: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: center; padding: 4px 8px; background: var(--surface); font-weight: 650; line-height: 1.2; }
.tape-room small { font-weight: 400; font-size: .68rem; color: var(--muted); }
.tape-head .tape-room { background: var(--surface-2); }
.tape-bar { grid-row: 1; z-index: 1; align-self: center; margin: 4px 2px; padding: 6px 8px; overflow: hidden; color: var(--busy-ink); background: var(--busy); border-radius: 8px; font-weight: 600; font-size: .76rem; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
.tape-bar.booking { color: var(--free-ink); background: var(--free); }
.tape-avail { background: var(--surface-2); }
.tape-avail .bad { color: var(--danger); font-weight: 700; }
.navmore { position: relative; }
.navmore summary { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 12px; color: var(--muted); font-size: .92rem; font-weight: 500; list-style: none; border-radius: 10px; cursor: pointer; }
.navmore summary::-webkit-details-marker { display: none; }
.navmore-panel { position: absolute; right: 0; top: 44px; z-index: 50; min-width: 230px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.navmore-panel a { display: flex; width: 100%; padding: 10px; }
.sheet-panel { max-height: 80%; overflow-y: auto; overscroll-behavior: contain; }
.rooms-heading { grid-column: 1 / -1; margin: 6px 0 -2px; font-size: .86rem; font-weight: 650; color: var(--muted); }
.room.out { --status: var(--line-strong); --status-ink: var(--muted); opacity: .75; }
.cleaner-tabs { grid-template-columns: 1fr 1fr; }
.tabbutton { width: 100%; min-height: 52px; margin: 0; background: none; border: 0; box-shadow: none; color: var(--muted); font-size: .7rem; }
.tabbutton:hover { box-shadow: none; transform: none; }
.hk-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.hk-card:last-child { border-bottom: 0; }
.hk-card strong { font-size: 1.15rem; }
.hk-card form { margin: 0; }
.hk-card button { width: auto; margin: 0; }
.invoice { color: #000; background: #fff; padding: 26px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.invoice h1 { margin: 0; font-size: 22px; color: #000; }
.invoice th, .invoice td { color: #000; border-color: #bbb; }
.invoice .inv-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #000; padding-bottom: 12px; margin-bottom: 14px; }
.invoice .inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
@media (min-width: 760px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .chart-grid, .today-lists { grid-template-columns: 1fr 1fr; }
}
@media print { .invoice { border: 0; padding: 0; } }

.hk-issue { padding: 10px 0; border-bottom: 1px solid var(--line); }
.hk-issue:last-child { border-bottom: 0; }
.hk-issue ul { margin: 8px 0; padding-left: 20px; }
button.compact-button { width: auto; min-height: 36px; margin: 0; padding: 4px 12px; font-size: .84rem; }
.chart .nodata { margin: 10px 0 2px; color: var(--muted); font-size: .9rem; }
@media print { .tabs, .topbar, .no-print { display: none !important; } }

.sheet-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px; align-content: start; }
.sheet-panel::before { grid-column: 1 / -1; }
.sheet-panel a, .sheet-panel button { gap: 10px; padding: 0 8px; font-size: .92rem; line-height: 1.2; }
.confirmed { display: flex; align-items: center; gap: 10px; color: var(--free-ink); background: var(--free); border-color: var(--free-dot); }
.invoice .inv-title { margin: 0 0 12px; font-size: 16px; text-align: center; color: #000; }
.invoice .inv-sign { margin-top: 26px; text-align: right; }
.invoice table { width: 100%; min-width: 0; table-layout: auto; font-size: 13px; }
.invoice th, .invoice td { padding: 6px 4px; white-space: normal; }
.invoice td:nth-child(2):not(.num) { white-space: nowrap; }
.invoice .num { white-space: nowrap; }
@media (max-width: 480px) { .invoice { padding: 14px; font-size: 13px; } .invoice table { font-size: 12px; } }
