/* Techsania — shared styles. Mobile-first, calm hotel style, accessible. */
/* Heading lettering (Fraunces, free Open Font License), saved in the project so no outside service is needed. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("/assets/fonts/fraunces.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/fonts/fraunces-italic.woff2") format("woff2"); }

:root {
  --red: #B4382B;
  --red-dark: #8F2C21;
  --red-soft: #F9EDE8;
  --brand: #1F4D3A;
  --brand-dark: #143528;
  --brand-mid: #2A6049;
  --brand-soft: #E6EEE7;
  --accent: #B8893B;
  --accent-ink: #8A6424;
  --navy-deep: #14261E;
  --ink: #1B2620;
  --muted: #66695E;
  --line: #E3D9C7;
  --line-tint: #E3D9C7;
  --paper: #FFFDF8;
  --bg: #F5EFE3;
  --sand: #ECE3D2;
  --ok: #2F6B3F;
  --ok-soft: #EAF2E6;
  --warn: #8A5A12;
  --warn-soft: #FAF2E0;
  --info: #1F4D3A;
  --info-soft: #E6EEE7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(27,38,32,.05);
  --shadow-lift: 0 1px 2px rgba(27,38,32,.05), 0 8px 24px rgba(27,38,32,.07);
  --focus: 0 0 0 3px rgba(31,77,58,.3);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
}
h1, h2, h3 { line-height: 1.2; margin: 0; color: var(--navy-deep); }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-weight: 700; letter-spacing: -0.01em; }
a { color: var(--brand); }
a.btn { text-decoration: none; }
img { max-width: 100%; }

/* Layout -------------------------------------------------------------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 16px; }
.wrap-wide { max-width: 1040px; }
.grow { flex: 1; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.wrap-gap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* Brand header -------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
/* On wide pages (the staff dashboard) the header lines up with the content below it. */
body:has(.wrap-wide) .topbar .wrap, body:has(.wrap-wide) .demo-banner .wrap { max-width: 1040px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 25px; line-height: 1; letter-spacing: -0.02em; color: var(--navy-deep); text-decoration: none; white-space: nowrap; }
.brand span { font-style: italic; font-weight: 500; color: var(--accent-ink); }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding-inline-start: 12px; border-inline-start: 1px solid var(--line); }

/* Demo banner --------------------------------------------------------- */
.demo-banner { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid #EADBB8; font-size: 13px; font-weight: 600; }
.demo-banner .wrap { padding-top: 8px; padding-bottom: 8px; display: flex; gap: 10px; align-items: center; justify-content: center; text-align: center; }

/* Cards --------------------------------------------------------------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card h2 { font-size: 22px; }
.card h3 { font-size: 16px; }
.card-tight { padding: 14px; }

/* Buttons ------------------------------------------------------------- */
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  font-family: inherit; font-size: 17px; font-weight: 650;
  padding: 14px 18px; border-radius: var(--radius-sm);
  min-height: 52px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary, .btn.btn-primary, a.btn.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--paper); color: var(--navy-deep); border-color: var(--border); }
.btn-secondary:hover { background: var(--sand); }
/* The highlighted tab (a secondary button marked primary) must stay blue and readable, even under the mouse. */
.btn.btn-secondary.btn-primary, .btn.btn-secondary.btn-primary:hover { background: var(--brand); color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; color: var(--brand); min-height: 44px; padding: 10px 12px; }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-danger { background: var(--paper); color: var(--red); border-color: #E4B3AD; }
.btn-danger:hover { background: var(--red-soft); }
.btn-auto { width: auto; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 15px; width: auto; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { width: auto; flex: 1; min-width: 140px; }

/* Forms --------------------------------------------------------------- */
.field { display: block; margin-top: 16px; }
.field:first-child { margin-top: 0; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.input, .select, .textarea {
  width: 100%; font-family: inherit; font-size: 17px; color: var(--ink);
  padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--red); }
.textarea { min-height: 90px; resize: vertical; }
.field-error { color: var(--red); font-size: 13px; margin-top: 6px; font-weight: 600; }
.checkrow { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; }
.checkrow input[type="checkbox"] { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.code-input { letter-spacing: 8px; text-align: center; font-size: 26px; font-weight: 700; }

/* Progress steps ------------------------------------------------------ */
.progress { display: flex; gap: 4px; margin: 6px 0 4px; }
.progress .seg { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.progress .seg.done { background: var(--brand); }
.progress .seg.active { background: var(--accent); }
.step-label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* Status pills -------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; border: 1px solid transparent; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.pill-grey { background: var(--sand); color: var(--text-soft); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-red { background: var(--red-soft); color: var(--red); }

/* Banners ------------------------------------------------------------- */
.banner { border-radius: var(--radius-sm); padding: 14px 16px; font-size: 15px; border: 1px solid; }
.banner-info { background: var(--info-soft); color: var(--info); border-color: var(--line); }
.banner-ok { background: var(--ok-soft); color: var(--ok); border-color: #C3DFCF; }
.banner-warn { background: var(--warn-soft); color: var(--warn); border-color: #EADBB8; }
.banner-error { background: var(--red-soft); color: var(--red-dark); border-color: #E4B3AD; }
.banner strong { display: block; margin-bottom: 2px; }

/* Definition rows ----------------------------------------------------- */
.dl { display: grid; grid-template-columns: 1fr auto; gap: 0; }
.dl dt, .dl dd { padding: 10px 0; border-bottom: 1px solid var(--line); }
.dl dd { padding-left: 16px; }
[dir="rtl"] .dl dd { padding-left: 0; padding-right: 16px; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: none; }
.dl dt { color: var(--muted); font-size: 15px; }
.dl dd { margin: 0; font-weight: 600; text-align: right; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* Loading skeletons --------------------------------------------------- */
.skeleton { background: linear-gradient(90deg,var(--sand),var(--paper),var(--sand)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; }
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.sk-line { height: 14px; margin: 8px 0; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; } .sk-line.w80 { width: 80%; }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 99px; animation: spin .7s linear infinite; }
.spinner-ink { border-color: rgba(27,38,32,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state --------------------------------------------------------- */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 8px; }

/* Staff table / list -------------------------------------------------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; flex: 1; min-width: 180px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-family: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--paper); color: var(--ink); cursor: pointer; }
.chip.active { background: var(--navy-deep); color: #fff; border-color: var(--navy-deep); }

.arrival { display: block; width: 100%; text-align: start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.arrival + .arrival { margin-top: 10px; }
.arrival:hover { border-color: var(--border); box-shadow: var(--shadow-lift); }
.arrival:focus-visible { outline: none; box-shadow: var(--focus); }
.arrival .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.arrival .name { font-weight: 700; font-size: 17px; }
.arrival .ref { color: var(--muted); font-size: 13px; }
.arrival .statuses { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* Modal / drawer ------------------------------------------------------ */
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--navy-deep) 45%, transparent); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet { background: var(--paper); width: 100%; max-width: 680px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 20px; }
.sheet h2 { font-size: 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; position: sticky; top: -20px; background: var(--paper); padding: 6px 0; }
.icon-btn { background: var(--sand); border: none; width: 40px; height: 40px; border-radius: 99px; font-size: 20px; cursor: pointer; line-height: 1; color: var(--ink); }
@media (min-width: 640px) { .overlay { align-items: center; } .sheet { border-radius: 16px; } }

/* Toast --------------------------------------------------------------- */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; z-index: 80; pointer-events: none; }
.toast { background: var(--navy-deep); color: #fff; padding: 12px 18px; border-radius: 99px; font-weight: 600; font-size: 15px; box-shadow: var(--shadow-lift); max-width: 92%; }
.toast.err { background: var(--red-dark); }

/* Simulated/label tag ------------------------------------------------- */
.sim-tag { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); background: var(--warn-soft); border: 1px solid #EADBB8; padding: 2px 8px; border-radius: 6px; }

/* Big code / key ------------------------------------------------------ */
.keybox { text-align: center; padding: 22px; background: var(--navy-deep); color: #fff; border-radius: var(--radius); }
.keybox .num { font-family: var(--serif); font-size: 46px; font-weight: 600; letter-spacing: 6px; }
.roombox { text-align: center; padding: 20px; background: var(--ok-soft); border: 1px solid #C3DFCF; border-radius: var(--radius); }
.roombox .num { font-family: var(--serif); font-size: 44px; font-weight: 600; color: var(--ok); }

/* Phone key ----------------------------------------------------------- */
.keycard { text-align: center; padding: 22px 18px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 12px; }
.keycard .label { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.keycard .num { font-family: var(--serif); font-size: 52px; font-weight: 600; color: var(--navy-deep); line-height: 1; }
.btn-open { min-height: 76px; font-size: 22px; font-weight: 700; border-radius: var(--radius); color: #fff; background: var(--brand); }
.btn-open:hover { background: var(--brand-dark); }
.door-status { min-height: 24px; font-weight: 700; font-size: 16px; }
.door-status.ok { color: var(--ok); }
.door-status.err { color: var(--red-dark); }
.key-until { color: var(--muted); font-size: 15px; }

/* Hotel setup page ---------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; align-items: end; }
.form-grid .form-wide { grid-column: 1 / -1; }
.form-grid .field { margin-top: 0; }
.setup-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--paper); }
.setup-row + .setup-row { margin-top: 8px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* Guest languages: picker + right-to-left pages ------------------------ */
.lang-select { margin-inline-start: auto; flex: none; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--navy-deep); padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--paper); cursor: pointer; }
.lang-select:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
/* Our own file button: the real one is hidden but still reachable by keyboard. */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-pick { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--paper); }
.file-pick .btn { display: inline-flex; flex: none; margin: 0; font-size: 15px; }
.file-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-input:focus-visible + .file-pick .btn { box-shadow: var(--focus); }
[dir="rtl"] .dl dd { text-align: left; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }

footer.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 28px 16px; }

/* ===== Landing page ==================================================== */
.hero { text-align: center; padding: 36px 0 10px; }
.hero h1 { font-size: clamp(40px, 11vw, 72px); line-height: 0; }
.hero h1 span { color: var(--accent-ink); }
.hero h1 img { display: block; margin: 0 auto; }
.hero p { color: var(--muted); font-size: 19px; margin-top: 14px; }

.site { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .5s ease-out both; animation-delay: var(--d, 0s); }

.site-nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-nav .site { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav-brand { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1; letter-spacing: -0.02em; color: var(--navy-deep); text-decoration: none; margin-inline-end: auto; }
.nav-brand span { font-style: italic; font-weight: 500; color: var(--accent-ink); }
.nav-link { color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; padding: 8px 2px; }
.nav-link:hover { color: var(--brand); }
.site-nav .btn { width: auto; min-height: 42px; padding: 8px 18px; font-size: 15px; }

.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 104px; text-align: center; }
.hero-grid .lead { margin-left: auto; margin-right: auto; }
.hero-grid .cta-row { justify-content: center; }
.hero-copy .logo-lg { display: block; width: 112px; height: auto; margin: 0 0 24px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.hero-copy h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -0.02em; font-weight: 600; margin: 0; color: var(--navy-deep); }
.hero-copy h1 em { font-style: italic; font-weight: 500; color: var(--brand); }
.lead { font-size: 19px; line-height: 1.6; color: var(--text-soft); margin: 22px 0 0; max-width: 500px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.cta-row .btn { width: auto; min-height: 54px; padding: 14px 22px; font-size: 16px; }
.cta-note { margin-top: 18px; font-size: 14px; color: var(--muted); }

.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone-wrap::before { content: ""; position: absolute; left: 8%; right: 8%; top: 10%; bottom: 0; background: var(--sand); border-radius: 28px; z-index: 0; }
.phone { position: relative; z-index: 1; width: 320px; border-radius: 42px; padding: 10px; background: var(--navy-deep); box-shadow: 0 30px 60px -28px rgba(20,38,30,.5); }
.phone img { display: block; width: 100%; height: 520px; object-fit: cover; object-position: top; border-radius: 32px; background: #fff; }

.section { padding-top: 88px; padding-bottom: 88px; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.08; color: var(--navy-deep); }
.section-head p { color: var(--text-soft); font-size: 18px; margin: 14px 0 0; }
.band { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; border-top: 1px solid var(--line); }
.step { position: relative; padding: 28px 24px 8px 0; }
.step + .step { padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s, decimal-leading-zero); display: block; font-family: var(--serif); font-size: 40px; font-weight: 500; color: var(--accent-ink); line-height: 1; margin-bottom: 18px; }
.step h3 { font-size: 19px; }
.step p { margin: 8px 0 0; color: var(--text-soft); font-size: 16px; line-height: 1.55; }

.staff-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; background: var(--navy-deep); color: #fff; border-radius: 20px; padding: 56px 52px; }
.staff-panel > * { position: relative; z-index: 1; }
.staff-panel h2 { color: #fff; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; }
.staff-panel p { color: rgba(255,255,255,.84); font-size: 18px; margin: 14px 0 28px; }
.staff-panel .btn { width: auto; background: #fff; color: var(--navy-deep); }
.staff-panel .btn:hover { background: var(--sand); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; }
.ticks li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-weight: 600; font-size: 16px; }
.ticks li:first-child { border-top: 1px solid rgba(255,255,255,.14); }
.ticks li::before { content: "\2713"; flex: none; color: var(--accent); font-weight: 900; font-size: 16px; }

.demo-wrap { max-width: 720px; margin: 0 auto; }
.demo-wrap .card { padding: 28px; }
.site-foot { border-top: 1px solid var(--line); padding: 36px 0 44px; background: var(--paper); }
.site-foot .site { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.site-foot img { height: 56px; width: auto; }
.site-foot p { margin: 0; color: var(--muted); font-size: 14px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; padding-bottom: 56px; text-align: center; }
  .hero-copy .logo-lg { margin-left: auto; margin-right: auto; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { border-inline-start: none; padding-inline-start: 0; }
  .staff-panel { grid-template-columns: 1fr; padding: 40px 24px; gap: 32px; }
  .nav-link { display: none; }
  .section { padding-top: 64px; padding-bottom: 64px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 24px 0; border-inline-start: none; }
  .step + .step { border-top: 1px solid var(--line); }
  .cta-row .btn { width: 100%; }
  .phone { width: 272px; } .phone img { height: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .arrival { transition: none; }
  .reveal { animation: none; }
}

/* Gold touches -------------------------------------------------------- */
.step-label { color: var(--accent-ink); }
.section-head h2::after, .staff-panel h2::after { content: ""; display: block; width: 56px; height: 2px; background: var(--accent); margin: 18px auto 0; }
.staff-panel h2::after { margin-left: 0; }
.site-foot { border-top: 2px solid var(--accent); }

/* Small-screen fixes -------------------------------------------------- */
/* A header drawn inside the page column (the payment page) still runs edge to edge. */
.wrap > .topbar { margin: -16px -16px 16px; }
.wrap > .topbar .wrap { padding-left: 16px; padding-right: 16px; }
/* Short buttons beside text (for example "Pay £50.00") stay on one line. */
.row-between > .btn { white-space: nowrap; flex: none; }
@media (max-width: 480px) {
  .brand-sub { text-transform: none; letter-spacing: 0; line-height: 1.3; }
}

/* Rooms tab ------------------------------------------------------------ */
.room-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.room-summary div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.room-summary b { display: block; font-size: 26px; line-height: 1.1; }
.room-summary span { font-size: 13px; color: var(--muted); }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 14px; }
.room-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.room-card .room-no { font-size: 24px; font-weight: 800; }
.room-card .btn { margin-top: 6px; align-self: flex-start; }
.room-card .btn-ghost { padding-left: 0; padding-right: 0; }
.room-out_of_service { background: var(--red-soft); }
.av-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.av-count { text-align: end; }
.room-urgent { border-color: var(--warn); background: var(--warn-soft); }
.room-card select.select { font-size: 14px; padding-left: 10px; padding-right: 8px; }

/* Shifts tab ----------------------------------------------------------- */
.rota-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.rota { border-collapse: collapse; width: 100%; min-width: 860px; }
.rota th, .rota td { border-bottom: 1px solid var(--line); padding: 8px; vertical-align: top; text-align: left; font-size: 13px; }
.rota thead th { font-weight: 700; background: var(--sand); white-space: nowrap; }
.rota tbody th { font-weight: 700; min-width: 120px; }
.rota th small, .rota td small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.rota-today { background: var(--warn-soft); }
.rota-me th { background: var(--info-soft); }
.rota-hours { font-weight: 700; text-align: right; }
.shift-chip { display: block; width: 100%; text-align: left; background: var(--info-soft); color: var(--info); border: 0; border-radius: 8px; padding: 6px 8px; margin-bottom: 4px; font: inherit; font-weight: 700; font-size: 12px; }
button.shift-chip { cursor: pointer; }
.shift-add { border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 8px; width: 100%; padding: 2px 0; cursor: pointer; font-size: 14px; }
[data-tab], #logout { white-space: nowrap; }

/* Visual polish (fx.js) ------------------------------------------------ */
.topbar, .nav { transition: box-shadow .25s ease, background-color .25s ease; }
.topbar.fx-stuck, .nav.fx-stuck { box-shadow: 0 6px 24px rgba(27,38,32,.12); }
body { background-image: radial-gradient(900px 500px at 85% calc(-10% - var(--fx-y, 0) * .08px), rgba(184,137,59,.14), transparent 70%),
  radial-gradient(700px 500px at 5% calc(30% - var(--fx-y, 0) * .15px), rgba(31,77,58,.10), transparent 70%); background-attachment: fixed; }

.fx-reveal { opacity: 0; transform: translateY(22px) scale(.985); transition: opacity .6s cubic-bezier(.2,.7,.2,1) var(--fx-d, 0ms), transform .6s cubic-bezier(.2,.7,.2,1) var(--fx-d, 0ms); }
.fx-reveal.fx-in { opacity: 1; transform: none; }
@media (hover: hover) { .card.fx-in:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); } }

.btn, .btn-open { position: relative; transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(27,38,32,.16); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(.96); }
.fx-ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .25; transform: scale(0); pointer-events: none; animation: fx-rip .65s ease-out forwards; }
@keyframes fx-rip { to { transform: scale(1); opacity: 0; } }

.fx-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.fx-confetti i { position: absolute; border-radius: 2px; opacity: 0; animation: fx-burst 1.5s cubic-bezier(.15,.7,.3,1) forwards; }
@keyframes fx-burst {
  0% { opacity: 1; transform: translate(0,0) rotate(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 260px)) rotate(var(--r)); }
}
.fx-pop { animation: fx-pop .6s cubic-bezier(.2,1.4,.4,1); }
@keyframes fx-pop { 0% { transform: scale(.9); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
.toast { animation: fx-toast .35s cubic-bezier(.2,1.3,.4,1); }
@keyframes fx-toast { from { transform: translateY(20px) scale(.9); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .fx-reveal { opacity: 1; transform: none; transition: none; }
  .fx-confetti { display: none; }
  .btn, .toast, .fx-pop { animation: none; transition: none; }
}

/* Check-in steps fill in, drawn tick, door-card flip, error shake (fx.js) */
.progress .seg { position: relative; overflow: hidden; }
.progress .seg.done::after, .progress .seg.active::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; transform-origin: 0 50%; animation: fx-fill .7s cubic-bezier(.3,.7,.2,1) both; }
.progress .seg:nth-child(2)::after { animation-delay: .12s; } .progress .seg:nth-child(3)::after { animation-delay: .24s; }
.progress .seg:nth-child(4)::after { animation-delay: .36s; } .progress .seg:nth-child(5)::after { animation-delay: .48s; }
.progress .seg.active::after { animation-name: fx-fill, fx-pulse; animation-duration: .7s, 1.8s; animation-iteration-count: 1, infinite; animation-delay: .1s, .9s; }
@keyframes fx-fill { from { transform: scaleX(0); } }
@keyframes fx-pulse { 50% { opacity: .55; } }

.fx-tick { width: 34px; height: 34px; float: inline-start; margin-inline-end: 12px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-tick circle { stroke-dasharray: 63; stroke-dashoffset: 63; animation: fx-draw .6s ease-out .1s forwards; }
.fx-tick path { stroke-dasharray: 18; stroke-dashoffset: 18; animation: fx-draw .4s ease-out .6s forwards; }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }

.keybox, .keycard { animation: fx-flip .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: 50% 50%; }
@keyframes fx-flip { from { transform: perspective(700px) rotateX(-90deg); opacity: 0; } 60% { opacity: 1; } to { transform: perspective(700px) rotateX(0); } }

.fx-shake { animation: fx-shake .5s cubic-bezier(.36,.07,.19,.97); }
.input.fx-shake, input.fx-shake { border-color: var(--red); box-shadow: 0 0 0 3px rgba(180,56,43,.2); }
@keyframes fx-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
@media (prefers-reduced-motion: reduce) {
  .progress .seg::after, .fx-tick circle, .fx-tick path, .keybox, .keycard, .fx-shake { animation: none !important; stroke-dashoffset: 0; }
}
.progress .seg:nth-child(6)::after { animation-delay: .6s; }
.sheet-head { z-index: 5; }
.fx-host { position: relative; }
.fx-clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }


/* Staff alerts (fx.js): a new arrival slides in and glows once */
.arrival.fx-arrive { animation: fx-arrive .7s cubic-bezier(.2,1.2,.4,1), fx-glow 2.2s ease-out; }
@keyframes fx-arrive { from { transform: translateX(-40px); opacity: 0; } }
@keyframes fx-glow { 0%, 30% { box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.55), var(--shadow-lift); } 100% { box-shadow: var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .arrival.fx-arrive { animation: none; } }

/* Dark mode: follows the device unless the guest picks one with the moon button (fx.js) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #2F7A58; --brand-dark: #276648; --brand-mid: #3E8A68; --brand-soft: #1F3329;
  --accent: #D4A64E; --accent-ink: #D9B36A;
  --navy-deep: #EAF0E7; --ink: #E4E9E1; --muted: #A3AA9E;
  --line: #34413A; --line-tint: #34413A; --paper: #1B2520; --bg: #121915; --sand: #26312B;
  --ok: #7CC99A; --ok-soft: #1D3226; --warn: #E3B76B; --warn-soft: #3A2F18;
  --info: #8CCBAA; --info-soft: #1F3329; --red: #EE8B7E; --red-dark: #F4A79C; --red-soft: #3D2320;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lift: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --focus: 0 0 0 3px rgba(124,201,154,.4);
}
:root[data-theme="dark"] a { color: #8CD1AD; }
:root[data-theme="dark"] a.btn-primary, :root[data-theme="dark"] .btn-primary { color: #fff; }
:root[data-theme="dark"] .btn-ghost { color: #8CD1AD; }
:root[data-theme="dark"] .btn-danger { color: var(--red); border-color: #6A3A34; }
:root[data-theme="dark"] .btn-secondary, :root[data-theme="dark"] .chip, :root[data-theme="dark"] .lang-select { border-color: var(--border); }
:root[data-theme="dark"] .input, :root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: #121915; color: var(--ink); border-color: var(--border); }
:root[data-theme="dark"] .progress .seg { background: #34413A; }
:root[data-theme="dark"] .pill-grey { color: var(--text-soft); }
:root[data-theme="dark"] .banner-info { border-color: var(--line); }
:root[data-theme="dark"] .banner-ok, :root[data-theme="dark"] .roombox { border-color: #2C5039; }
:root[data-theme="dark"] .banner-warn, :root[data-theme="dark"] .demo-banner { border-color: #594824; }
:root[data-theme="dark"] .banner-error { border-color: #6A3A34; }
:root[data-theme="dark"] .dl dt, :root[data-theme="dark"] .dl dd { border-bottom-color: var(--line); }
:root[data-theme="dark"] .skeleton { background: linear-gradient(90deg,var(--sand),var(--paper),var(--sand)); background-size: 200% 100%; }
:root[data-theme="dark"] .overlay { background: rgba(0,0,0,.6); }
:root[data-theme="dark"] .site-nav { background: rgba(18,25,21,.88); }
:root[data-theme="dark"] .lead, :root[data-theme="dark"] .section-head p, :root[data-theme="dark"] .step p { color: var(--text-soft); }
:root[data-theme="dark"] .arrival:hover, :root[data-theme="dark"] .file-pick { border-color: var(--border); }
/* Panels that are dark green in light mode stay dark green, with light text */
:root[data-theme="dark"] .keybox, :root[data-theme="dark"] .toast, :root[data-theme="dark"] .staff-panel,
:root[data-theme="dark"] .phone, :root[data-theme="dark"] .chip.active { background: #22382D; color: #fff; border-color: #22382D; }
:root[data-theme="dark"] .staff-panel h2 { color: #fff; }
:root[data-theme="dark"] .toast.err { background: #7A2B22; }
:root[data-theme="dark"] .staff-panel .btn { background: #fff; color: var(--fx-deep); }
:root[data-theme="dark"] .btn-open { background: var(--brand); color: #fff; }
:root[data-theme="dark"] .topbar.fx-stuck, :root[data-theme="dark"] .nav.fx-stuck { box-shadow: 0 6px 24px rgba(0,0,0,.5); }
:root[data-theme="dark"] body { background-image: radial-gradient(900px 500px at 85% calc(-10% - var(--fx-y, 0) * .08px), rgba(212,166,78,.08), transparent 70%),
  radial-gradient(700px 500px at 5% calc(30% - var(--fx-y, 0) * .15px), rgba(62,138,104,.10), transparent 70%); }

.fx-theme { position: fixed; right: 16px; bottom: 16px; z-index: 70; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); color: var(--navy-deep); box-shadow: var(--shadow-lift); cursor: pointer; display: grid; place-items: center; }
.fx-theme svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s cubic-bezier(.2,1.3,.4,1); }
.fx-theme:active svg { transform: rotate(180deg) scale(.8); }
:root[data-theme="dark"] h1 em, :root[data-theme="dark"] h2 em { color: #7CC99A; }

/* Softer, calmer palettes (later rules win over the ones above) */
:root { --bg: #F2EDE2; --paper: #FBF8F1; --ink: #2B3530; --navy-deep: #22302A; --muted: #6E7168; --line: #E6DECF; --line-tint: #E6DECF;
  --brand: #2C5C48; --brand-dark: #214A39; --brand-mid: #35725A; --sand: #EAE2D1; --accent: #BC9348;
  --shadow-lift: 0 1px 2px rgba(27,38,32,.04), 0 10px 28px rgba(27,38,32,.06); }
:root[data-theme="dark"] {
  --bg: #1B201D; --paper: #242A26; --sand: #2C332F; --line: #373F39; --line-tint: #373F39;
  --ink: #D5DAD0; --navy-deep: #DDE3D8; --muted: #9AA195;
  --brand: #3C7358; --brand-dark: #33634B; --brand-mid: #4A8466; --brand-soft: #25322B;
  --accent: #C9A65F; --accent-ink: #CDAE72;
  --ok: #8CC6A2; --ok-soft: #233229; --warn: #D9B87A; --warn-soft: #35301F; --info: #96C7AE; --info-soft: #25322B;
  --red: #DE9186; --red-dark: #E6A89F; --red-soft: #38272A;
}
:root[data-theme="dark"] a, :root[data-theme="dark"] .btn-ghost { color: #98CBB0; }
:root[data-theme="dark"] .input, :root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: #1B201D; border-color: var(--border); }
:root[data-theme="dark"] .keybox, :root[data-theme="dark"] .toast, :root[data-theme="dark"] .staff-panel,
:root[data-theme="dark"] .phone, :root[data-theme="dark"] .chip.active { background: #2A3A31; border-color: #2A3A31; }
:root[data-theme="dark"] .toast.err { background: #6E3B35; }
:root[data-theme="dark"] .skeleton { background: linear-gradient(90deg,var(--sand),var(--paper),var(--sand)); background-size: 200% 100%; }
:root[data-theme="dark"] .site-nav { background: rgba(27,32,29,.88); }
:root[data-theme="dark"] h1 em, :root[data-theme="dark"] h2 em { color: #8CC6A2; }
:root[data-theme="dark"] .staff-panel .btn { background: #fff; color: var(--fx-deep); }
:root[data-theme="dark"] .overlay { background: rgba(10,14,12,.6); }

/* Dashboard tab ---------------------------------------------------------- */
.dash-attn h3, .dash-card h3 { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; }
.dash-item { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); padding: 10px 0; font: inherit; color: inherit; cursor: pointer; }
.dash-item .dash-go { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.dash-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.dash-urgent .dash-dot { background: var(--red); }
.dash-warning .dash-dot { background: var(--warn); }
.dash-info .dash-dot { background: var(--info); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin-top: 14px; }
.dash-card { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.dash-big { font-size: 40px; font-weight: 800; line-height: 1; }
.dash-big .dash-of { font-size: 16px; font-weight: 600; color: var(--muted); }
.dash-bar { height: 10px; border-radius: 99px; background: var(--sand); overflow: hidden; }
.dash-bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .6s ease; }
.dash-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; }
.dash-stats b { display: block; font-size: 20px; line-height: 1.1; }
.dash-list { display: grid; gap: 4px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 4px; }

/* Colour themes and settings panel (fx.js) ---------------------------- */
:root { --fx-rgb: 44,92,72; --accent-rgb: 188,147,72; --fx-link: var(--brand); --fx-deep: var(--navy-deep); --border: #D6CBB6; --text-soft: #4C5563; }
:root[data-theme="dark"] { --fx-link: #98CBB0; --fx-deep: #2A3A31; --fx-rgb: 74,132,102; }
:root[data-palette="white"]:not([data-theme="dark"]) { --bg:#FFFFFF; --paper:#FFFFFF; --sand:#F5F6F7; --line:#ECEEF0; --line-tint:#ECEEF0; --border:#DCDFE3; --ink:#22262B; --navy-deep:#2A2F35; --muted:#6B7178; --text-soft:#4F555C; --brand:#5B6670; --brand-dark:#4C565F; --brand-mid:#76818B; --brand-soft:#F1F3F5; --info:#4C565F; --info-soft:#F1F3F5; --accent:#D9C9A3; --accent-ink:#7A6A45; --fx-rgb:91,102,112; --accent-rgb:217,201,163; --focus: 0 0 0 3px rgba(91,102,112,.25); }
:root[data-theme="dark"][data-palette="white"] { --bg:#16181B; --paper:#1E2124; --sand:#25292D; --line:#33383D; --line-tint:#33383D; --border:#4A5056; --ink:#ECEEF0; --navy-deep:#F4F6F5; --muted:#A8AEB4; --text-soft:#C9CDD1; --brand:#5F6B76; --brand-dark:#55606A; --brand-mid:#75818C; --brand-soft:#262B30; --info:#B9C3CC; --info-soft:#262B30; --accent:#D9C9A3; --accent-ink:#E8DCC0; --fx-link:#B9C3CC; --fx-deep:#3A4148; --fx-rgb:120,130,140; --accent-rgb:217,201,163; --focus: 0 0 0 3px rgba(120,130,140,.35); }
:root[data-palette="forest"]:not([data-theme="dark"]) { --bg:#F3F8F5; --paper:#FCFEFD; --sand:#E8F1EC; --line:#DDE9E2; --line-tint:#DDE9E2; --border:#C7D9CF; --ink:#1F3329; --navy-deep:#24392E; --muted:#5F7569; --text-soft:#465A4F; --brand:#5A8270; --brand-dark:#4C7061; --brand-mid:#7A9E8D; --brand-soft:#EAF3EE; --info:#4C7061; --info-soft:#EAF3EE; --accent:#E6D3A8; --accent-ink:#7D6838; --fx-rgb:90,130,112; --accent-rgb:230,211,168; --focus: 0 0 0 3px rgba(90,130,112,.25); }
:root[data-theme="dark"][data-palette="forest"] { --bg:#141C18; --paper:#1B2520; --sand:#212D27; --line:#2E3D35; --line-tint:#2E3D35; --border:#46594E; --ink:#E6EEEA; --navy-deep:#F4F6F5; --muted:#A3B5AB; --text-soft:#C4D2CA; --brand:#557A69; --brand-dark:#4B6C5D; --brand-mid:#6E9180; --brand-soft:#22302A; --info:#A8C9B8; --info-soft:#22302A; --accent:#D9C69B; --accent-ink:#E8DAB8; --fx-link:#A8C9B8; --fx-deep:#2C4038; --fx-rgb:100,140,122; --accent-rgb:217,198,155; --focus: 0 0 0 3px rgba(100,140,122,.35); }
:root[data-palette="ocean"]:not([data-theme="dark"]) { --bg:#F3F7FA; --paper:#FCFDFE; --sand:#E7EFF5; --line:#DCE7EF; --line-tint:#DCE7EF; --border:#C5D6E3; --ink:#1E2E3B; --navy-deep:#233645; --muted:#5E7282; --text-soft:#455867; --brand:#5A7D98; --brand-dark:#4C6C85; --brand-mid:#7B9AB1; --brand-soft:#EAF1F7; --info:#4C6C85; --info-soft:#EAF1F7; --accent:#BFDCDC; --accent-ink:#3F6E6E; --fx-rgb:90,125,152; --accent-rgb:191,220,220; --focus: 0 0 0 3px rgba(90,125,152,.25); }
:root[data-theme="dark"][data-palette="ocean"] { --bg:#131A21; --paper:#1A232C; --sand:#202B35; --line:#2D3A47; --line-tint:#2D3A47; --border:#45576A; --ink:#E5EDF3; --navy-deep:#F4F6F5; --muted:#A2B3C1; --text-soft:#C3D1DC; --brand:#557590; --brand-dark:#4B677F; --brand-mid:#6E8DA6; --brand-soft:#212D38; --info:#A9C3D8; --info-soft:#212D38; --accent:#A8CFCF; --accent-ink:#C8E2E2; --fx-link:#A9C3D8; --fx-deep:#2B3D4E; --fx-rgb:100,135,165; --accent-rgb:168,207,207; --focus: 0 0 0 3px rgba(100,135,165,.35); }
:root[data-palette="lavender"]:not([data-theme="dark"]) { --bg:#F7F5FA; --paper:#FDFCFE; --sand:#EEEAF4; --line:#E5E0EE; --line-tint:#E5E0EE; --border:#D3CBE1; --ink:#2A2438; --navy-deep:#302941; --muted:#6E6782; --text-soft:#554E68; --brand:#7C6F9E; --brand-dark:#6A5E8A; --brand-mid:#9A8FB8; --brand-soft:#F0EDF6; --info:#6A5E8A; --info-soft:#F0EDF6; --accent:#E6C6D7; --accent-ink:#7D4C66; --fx-rgb:124,111,158; --accent-rgb:230,198,215; --focus: 0 0 0 3px rgba(124,111,158,.25); }
:root[data-theme="dark"][data-palette="lavender"] { --bg:#18161E; --paper:#201D28; --sand:#272331; --line:#363042; --line-tint:#363042; --border:#504861; --ink:#ECE9F2; --navy-deep:#F4F6F5; --muted:#AFA8C0; --text-soft:#CDC8DA; --brand:#74679A; --brand-dark:#665A88; --brand-mid:#8B7FB0; --brand-soft:#2A2536; --info:#C3B9DD; --info-soft:#2A2536; --accent:#D9B5C8; --accent-ink:#E9D1DE; --fx-link:#C3B9DD; --fx-deep:#3A3350; --fx-rgb:130,118,170; --accent-rgb:217,181,200; --focus: 0 0 0 3px rgba(130,118,170,.35); }
:root[data-palette="sunset"]:not([data-theme="dark"]) { --bg:#FBF6F3; --paper:#FEFCFB; --sand:#F4EBE5; --line:#EDE1D9; --line-tint:#EDE1D9; --border:#E0CFC3; --ink:#3A2A22; --navy-deep:#422F26; --muted:#7F6B60; --text-soft:#655247; --brand:#A97B66; --brand-dark:#946B58; --brand-mid:#C29683; --brand-soft:#F6EEE9; --info:#946B58; --info-soft:#F6EEE9; --accent:#EBD4A6; --accent-ink:#7F6430; --fx-rgb:169,123,102; --accent-rgb:235,212,166; --focus: 0 0 0 3px rgba(169,123,102,.25); }
:root[data-theme="dark"][data-palette="sunset"] { --bg:#1D1714; --paper:#261E1A; --sand:#2E2520; --line:#3F332C; --line-tint:#3F332C; --border:#5C4C42; --ink:#F1EAE5; --navy-deep:#F4F6F5; --muted:#BDAEA4; --text-soft:#D8CCC4; --brand:#9A6F5B; --brand-dark:#875F4D; --brand-mid:#B48A76; --brand-soft:#33281F; --info:#DDB8A6; --info-soft:#33281F; --accent:#DCC294; --accent-ink:#EAD7B2; --fx-link:#DDB8A6; --fx-deep:#4A382E; --fx-rgb:170,128,108; --accent-rgb:220,194,148; --focus: 0 0 0 3px rgba(170,128,108,.35); }
:root[data-palette="rose"]:not([data-theme="dark"]) { --bg:#FBF5F7; --paper:#FEFCFD; --sand:#F4EAEE; --line:#EDE0E6; --line-tint:#EDE0E6; --border:#E0CCD5; --ink:#3A2530; --navy-deep:#432A37; --muted:#7F6672; --text-soft:#654D59; --brand:#A3707F; --brand-dark:#8E606E; --brand-mid:#BF8F9D; --brand-soft:#F6EDF1; --info:#8E606E; --info-soft:#F6EDF1; --accent:#EFCDB8; --accent-ink:#80513A; --fx-rgb:163,112,127; --accent-rgb:239,205,184; --focus: 0 0 0 3px rgba(163,112,127,.25); }
:root[data-theme="dark"][data-palette="rose"] { --bg:#1D1519; --paper:#261C21; --sand:#2E2228; --line:#3F3037; --line-tint:#3F3037; --border:#5C4752; --ink:#F1E8EC; --navy-deep:#F4F6F5; --muted:#BDA9B2; --text-soft:#D8C8CF; --brand:#946573; --brand-dark:#825865; --brand-mid:#B0838F; --brand-soft:#33242B; --info:#DDB5C1; --info-soft:#33242B; --accent:#DDB8A3; --accent-ink:#EBD3C5; --fx-link:#DDB5C1; --fx-deep:#4A3039; --fx-rgb:165,115,130; --accent-rgb:221,184,163; --focus: 0 0 0 3px rgba(165,115,130,.35); }
:root[data-palette="slate"]:not([data-theme="dark"]) { --bg:#F4F6F8; --paper:#FCFDFD; --sand:#EAEEF1; --line:#E0E5EA; --line-tint:#E0E5EA; --border:#CBD3DB; --ink:#232B33; --navy-deep:#29323C; --muted:#66717C; --text-soft:#4D5863; --brand:#64788A; --brand-dark:#566878; --brand-mid:#8395A5; --brand-soft:#EDF1F4; --info:#566878; --info-soft:#EDF1F4; --accent:#C3DCE0; --accent-ink:#406A70; --fx-rgb:100,120,138; --accent-rgb:195,220,224; --focus: 0 0 0 3px rgba(100,120,138,.25); }
:root[data-theme="dark"][data-palette="slate"] { --bg:#15191D; --paper:#1C2126; --sand:#22282E; --line:#30373E; --line-tint:#30373E; --border:#4A535C; --ink:#E8ECEF; --navy-deep:#F4F6F5; --muted:#A9B2BA; --text-soft:#C9D0D6; --brand:#5E7184; --brand-dark:#536374; --brand-mid:#7A8DA0; --brand-soft:#242A31; --info:#B3C3D1; --info-soft:#242A31; --accent:#AECFD4; --accent-ink:#CDE2E5; --fx-link:#B3C3D1; --fx-deep:#323C47; --fx-rgb:110,128,145; --accent-rgb:174,207,212; --focus: 0 0 0 3px rgba(110,128,145,.35); }

:root[data-theme="dark"] a, :root[data-theme="dark"] .btn-ghost, :root[data-theme="dark"] h1 em, :root[data-theme="dark"] h2 em { color: var(--fx-link); }
:root[data-theme="dark"] a.btn-primary, :root[data-theme="dark"] .btn-primary { color: #fff; }
:root[data-theme="dark"] .keybox, :root[data-theme="dark"] .toast, :root[data-theme="dark"] .staff-panel,
:root[data-theme="dark"] .phone, :root[data-theme="dark"] .chip.active { background: var(--fx-deep); border-color: var(--fx-deep); color: #fff; }
:root[data-theme="dark"] .toast.err { background: #6E3B35; }
:root[data-theme="dark"] .input, :root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: var(--bg); }
:root[data-theme="dark"] .site-nav { background: color-mix(in srgb, var(--bg) 88%, transparent); }
:root[data-theme="dark"] .progress .seg { background: var(--line); }
body, :root[data-theme="dark"] body { background-image: radial-gradient(900px 500px at 85% calc(-10% - var(--fx-y, 0) * .08px), rgba(var(--accent-rgb),.08), transparent 70%),
  radial-gradient(700px 500px at 5% calc(30% - var(--fx-y, 0) * .15px), rgba(var(--fx-rgb),.06), transparent 70%); }

.fx-panel { position: fixed; right: 16px; bottom: 72px; z-index: 71; width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 96px); overflow: auto;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lift); padding: 16px; animation: fx-toast .3s cubic-bezier(.2,1.2,.4,1); }
.fx-panel[hidden] { display: none; }
.fx-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 18px; font-family: var(--serif); }
.fx-x { border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.fx-sec { margin-top: 14px; }
.fx-lab { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.fx-seg { display: flex; background: var(--sand); border-radius: 10px; padding: 3px; gap: 2px; }
.fx-seg button { flex: 1; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 4px; border-radius: 8px; cursor: pointer; position: relative; overflow: hidden; transition: background-color .2s, color .2s, box-shadow .2s; }
.fx-seg button[aria-checked="true"] { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.fx-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fx-swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: transparent; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; position: relative; overflow: hidden; transition: border-color .2s, transform .15s; }
.fx-swatch span { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.fx-swatch[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.fx-switch { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 15px; cursor: pointer; }
.fx-switch input { position: absolute; opacity: 0; pointer-events: none; }
.fx-switch i { width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background-color .2s; }
.fx-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s cubic-bezier(.2,1.3,.4,1); }
.fx-switch input:checked + i { background: var(--brand); }
.fx-switch input:checked + i::after { transform: translateX(18px); }
.fx-switch input:focus-visible + i, .fx-seg button:focus-visible, .fx-swatch:focus-visible, .fx-x:focus-visible { outline: none; box-shadow: var(--focus); }
.fx-reset { margin-top: 14px; width: 100%; }

/* Animations switched off in settings */
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after { animation: none !important; transition: none !important; }
:root[data-motion="off"] .fx-reveal { opacity: 1; transform: none; }
:root[data-motion="off"] .fx-confetti { display: none; }
.fx-reset { border: 0; background: transparent; color: var(--fx-link); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.fx-panel-head > span { display: flex; align-items: center; gap: 2px; }
.fx-panel-head { position: sticky; top: -16px; background: var(--paper); padding-top: 2px; z-index: 1; }

/* Notifications: the bell and its list ------------------------------------ */
.bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-size: 18px; cursor: pointer; }
.bell-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.bell-badge[hidden] { display: none; }
.note { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); padding: 12px 6px; font: inherit; color: inherit; cursor: pointer; }
.note .dash-dot { margin-top: 6px; }
.note-urgent .dash-dot { background: var(--red); }
.note-warning .dash-dot { background: var(--warn); }
.note-info .dash-dot { background: var(--info); }
.note-new { background: var(--info-soft); }
.note-text { display: grid; gap: 2px; }

/* Finance tab ------------------------------------------------------------ */
.fin-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.fin-sides .card + .card { margin-top: 0; }
.fin-cat { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
.fin-list { padding: 4px 16px; }
.fin-row { display: grid; grid-template-columns: 130px 1fr auto 70px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.fin-row:first-child { border-top: 0; }
.fin-amount { font-weight: 700; white-space: nowrap; }
.fin-in { color: var(--ok); }
.fin-voided .fin-what b:first-child, .fin-voided .fin-amount { text-decoration: line-through; color: var(--muted); }
@media (max-width: 640px) { .fin-row { grid-template-columns: 1fr auto; } .fin-date { grid-column: 1 / -1; } }

/* Logo */
.brand, .nav-brand { display: inline-flex; align-items: center; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; margin-inline-end: 9px; flex: none; }
.login-logo { display: block; width: 150px; height: 150px; margin: 4px auto 6px; }

/* Staff page menu: a section switch with a sliding highlight, then page tabs with a sliding underline */
.staff-nav { position: relative; display: inline-flex; gap: 2px; max-width: 100%; padding: 4px; margin-bottom: 8px; background: var(--sand); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.staff-nav::-webkit-scrollbar, .staff-pages::-webkit-scrollbar { display: none; }
.seg-btn { position: relative; z-index: 1; flex: none; min-height: 38px; padding: 7px 18px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: color .18s ease; }
.seg-btn:hover, .seg-btn.on { color: var(--ink); }
.seg-marker { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 9px; background: var(--paper); box-shadow: 0 1px 3px rgba(27,38,32,.14); }
.staff-nav.ready .seg-marker, .staff-pages.ready .page-marker { transition: transform .24s cubic-bezier(.3,.7,.2,1), width .24s cubic-bezier(.3,.7,.2,1); }
.staff-subnav { display: grid; grid-template-rows: 0fr; margin-bottom: 16px; transition: grid-template-rows .2s ease; }
.staff-subnav.open { grid-template-rows: 1fr; }
.staff-pages { position: relative; display: flex; gap: 24px; min-height: 0; padding: 0 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--line); }
.page-tab { flex: none; padding: 8px 0 10px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color .18s ease; }
.page-tab:hover, .page-tab.on { color: var(--ink); }
.page-marker { position: absolute; left: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.seg-btn:focus-visible, .page-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
#tab .fx-reveal { opacity: 1; transform: none; transition: none; }
#tab.tab-in { animation: tab-in .16s ease-out; }
@keyframes tab-in { from { opacity: 0; transform: translateY(3px); } }
@media (max-width: 480px) { .seg-btn { padding: 7px 10px; font-size: 14px; } .staff-pages { gap: 18px; } }
@media (prefers-reduced-motion: reduce) { .staff-nav.ready .seg-marker, .staff-pages.ready .page-marker, .staff-subnav { transition: none; } #tab.tab-in { animation: none; } }

/* Reports tab. Chart colours were checked for colour blindness and contrast on every light and dark theme. */
:root { --chart-1: #2a78d6; --chart-2: #eb6834; }
:root[data-theme="dark"] { --chart-1: #3987e5; --chart-2: #d95926; }
.rep-chart { margin-top: 14px; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.rep-grid .card + .card { margin-top: 0; }
.rep-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 15px; }
.chart { position: relative; }
.chart svg { display: block; max-width: 100%; touch-action: pan-y; }
.chart svg:focus { outline: none; }
.chart svg:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
@media (max-width: 480px) { #repBody .room-summary { grid-template-columns: 1fr 1fr; } }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-text { fill: var(--muted); font-size: 12px; }
.chart-end { fill: var(--ink); font-size: 13px; font-weight: 700; }
.chart-cross { stroke: var(--muted); stroke-width: 1; }
.chart-band { fill: var(--line); opacity: .45; }
.chart-tip { position: absolute; z-index: 5; min-width: 140px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); box-shadow: 0 4px 16px rgba(27,38,32,.16); font-size: 13px; pointer-events: none; }
.chart-tip[hidden] { display: none; }
.chart-tip-title { color: var(--muted); margin-bottom: 4px; white-space: nowrap; }
.chart-tip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-tip-row i { flex: none; width: 12px; height: 2px; border-radius: 2px; }
.chart-tip-row span { color: var(--muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.chart-scroll { max-height: 260px; overflow: auto; margin-top: 8px; }
.chart-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.chart-table th, .chart-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }

/* Calm light mode: no dark slabs, softer text ------------------------- */
:root:not([data-theme="dark"]) { --ink: color-mix(in srgb, var(--navy-deep) 82%, var(--bg)); }
:root:not([data-theme="dark"]) h1, :root:not([data-theme="dark"]) h2, :root:not([data-theme="dark"]) h3 { color: color-mix(in srgb, var(--navy-deep) 88%, var(--bg)); }
:root:not([data-theme="dark"]) .staff-panel,
:root:not([data-theme="dark"]) .keybox { background: var(--brand-soft); color: var(--ink); border: 1px solid var(--line); }
:root:not([data-theme="dark"]) .staff-panel h2 { color: var(--ink); }
:root:not([data-theme="dark"]) .staff-panel p { color: var(--text-soft); }
:root:not([data-theme="dark"]) .staff-panel .btn { background: var(--brand); color: #fff; }
:root:not([data-theme="dark"]) .staff-panel .btn:hover { background: var(--brand-dark); }
:root:not([data-theme="dark"]) .ticks li, :root:not([data-theme="dark"]) .ticks li:first-child { border-color: var(--line); }
:root:not([data-theme="dark"]) .phone { background: var(--sand); border: 1px solid var(--border); box-shadow: 0 24px 50px -30px rgba(0,0,0,.18); }
:root:not([data-theme="dark"]) .toast { background: var(--paper); color: var(--ink); border: 1px solid var(--border); }
:root:not([data-theme="dark"]) .toast.err { background: var(--red-soft); color: var(--red-dark); border-color: #E8C9C1; }
:root:not([data-theme="dark"]) .chip.active { background: var(--brand-soft); color: var(--ink); border-color: var(--brand); }
