/* 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 -------------------------------------------------------- */
.topbar::before, .site-nav::before { content: ""; display: block; height: 3px; background: var(--accent); }
.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) ------------------------------------------------ */
.fx-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 90; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--red)); pointer-events: none; }
.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-progress, .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="forest"]:not([data-theme="dark"]) { --bg:#E4F8EE; --paper:#F8FFFB; --sand:#CDF0DD; --line:#BCE6D0; --line-tint:#BCE6D0; --border:#98D2B5; --ink:#0F2C20; --navy-deep:#0B3B2A; --muted:#466B5B; --text-soft:#335548; --brand:#0A7A50; --brand-dark:#086A45; --brand-mid:#12A06C; --brand-soft:#D3F5E4; --info:#086A45; --info-soft:#D3F5E4; --accent:#FFB627; --accent-ink:#8A5A00; --fx-rgb:10,122,80; --accent-rgb:255,182,39; --focus: 0 0 0 3px rgba(10,122,80,.3); }
:root[data-theme="dark"][data-palette="forest"] { --bg:#0A1F17; --paper:#113024; --sand:#183D2E; --line:#245241; --line-tint:#245241; --border:#3B7560; --ink:#E2F6EC; --navy-deep:#F0FCF6; --muted:#9CC7B3; --text-soft:#BFE0CF; --brand:#0B8258; --brand-dark:#0B744F; --brand-mid:#14A673; --brand-soft:#15392B; --info:#5EE0AD; --info-soft:#15392B; --accent:#FFC247; --accent-ink:#FFD47F; --fx-link:#5EE0AD; --fx-deep:#0F5A40; --fx-rgb:20,166,115; --accent-rgb:255,194,71; --focus: 0 0 0 3px rgba(20,166,115,.45); }
:root[data-palette="ocean"]:not([data-theme="dark"]) { --bg:#E2F2FF; --paper:#F7FCFF; --sand:#CBE6FB; --line:#BADCF6; --line-tint:#BADCF6; --border:#92C5EC; --ink:#0D2A42; --navy-deep:#0A3558; --muted:#466A86; --text-soft:#315470; --brand:#0969B8; --brand-dark:#075A9E; --brand-mid:#1C8BE0; --brand-soft:#D6EDFF; --info:#075A9E; --info-soft:#D6EDFF; --accent:#14C8C8; --accent-ink:#0A6E6E; --fx-rgb:9,105,184; --accent-rgb:20,200,200; --focus: 0 0 0 3px rgba(9,105,184,.3); }
:root[data-theme="dark"][data-palette="ocean"] { --bg:#0A1A2C; --paper:#102740; --sand:#17334F; --line:#244866; --line-tint:#244866; --border:#3F6E96; --ink:#E3F1FF; --navy-deep:#F1F8FF; --muted:#9FBFDC; --text-soft:#C0D9EF; --brand:#0F76CC; --brand-dark:#0C63AC; --brand-mid:#2090E8; --brand-soft:#143452; --info:#6CC4FF; --info-soft:#143452; --accent:#2CD3D3; --accent-ink:#7FE8E8; --fx-link:#6CC4FF; --fx-deep:#0F4C80; --fx-rgb:32,144,232; --accent-rgb:44,211,211; --focus: 0 0 0 3px rgba(32,144,232,.45); }
:root[data-palette="lavender"]:not([data-theme="dark"]) { --bg:#F2EBFF; --paper:#FCFAFF; --sand:#E4D7FB; --line:#D9CAF6; --line-tint:#D9CAF6; --border:#BFA8EA; --ink:#2A1A4D; --navy-deep:#351C6B; --muted:#65558A; --text-soft:#4F3F70; --brand:#7A45E0; --brand-dark:#5F2FBF; --brand-mid:#9160F0; --brand-soft:#ECE1FF; --info:#5F2FBF; --info-soft:#ECE1FF; --accent:#F56CC4; --accent-ink:#AB2580; --fx-rgb:122,69,224; --accent-rgb:245,108,196; --focus: 0 0 0 3px rgba(122,69,224,.3); }
:root[data-theme="dark"][data-palette="lavender"] { --bg:#17102E; --paper:#221845; --sand:#2D2156; --line:#40316F; --line-tint:#40316F; --border:#6550A0; --ink:#F0E9FF; --navy-deep:#F8F4FF; --muted:#B9ABDD; --text-soft:#D2C7EE; --brand:#7C4DE0; --brand-dark:#693BC9; --brand-mid:#9668F2; --brand-soft:#30225C; --info:#C4A8FF; --info-soft:#30225C; --accent:#FF7FCF; --accent-ink:#FFB0E2; --fx-link:#C4A8FF; --fx-deep:#4A2C96; --fx-rgb:150,104,242; --accent-rgb:255,127,207; --focus: 0 0 0 3px rgba(150,104,242,.45); }
:root[data-palette="sunset"]:not([data-theme="dark"]) { --bg:#FFF0E4; --paper:#FFFBF7; --sand:#FFDFCA; --line:#FBD2B7; --line-tint:#FBD2B7; --border:#F0B38C; --ink:#3D1A0C; --navy-deep:#5A2008; --muted:#7F5A48; --text-soft:#674232; --brand:#C73A12; --brand-dark:#A93010; --brand-mid:#EA5A2B; --brand-soft:#FFE5D7; --info:#A93010; --info-soft:#FFE5D7; --accent:#FFB81C; --accent-ink:#8F5400; --fx-rgb:199,58,18; --accent-rgb:255,184,28; --focus: 0 0 0 3px rgba(199,58,18,.3); }
:root[data-theme="dark"][data-palette="sunset"] { --bg:#231008; --paper:#34190D; --sand:#442213; --line:#5C311D; --line-tint:#5C311D; --border:#8A5235; --ink:#FFEDE3; --navy-deep:#FFF6F0; --muted:#DDB39E; --text-soft:#EFCDBC; --brand:#D03E14; --brand-dark:#B83A15; --brand-mid:#EE5F30; --brand-soft:#4A2414; --info:#FFA77E; --info-soft:#4A2414; --accent:#FFC233; --accent-ink:#FFD67A; --fx-link:#FFA77E; --fx-deep:#8A3010; --fx-rgb:238,95,48; --accent-rgb:255,194,51; --focus: 0 0 0 3px rgba(238,95,48,.45); }
:root[data-palette="rose"]:not([data-theme="dark"]) { --bg:#FFEDF4; --paper:#FFFAFC; --sand:#FFDBE9; --line:#F9CBDE; --line-tint:#F9CBDE; --border:#EFA5C5; --ink:#3F0F26; --navy-deep:#5E1238; --muted:#815268; --text-soft:#693C51; --brand:#CF216D; --brand-dark:#A8175A; --brand-mid:#E9408A; --brand-soft:#FFE0ED; --info:#A8175A; --info-soft:#FFE0ED; --accent:#FF8A5C; --accent-ink:#AD3F17; --fx-rgb:207,33,109; --accent-rgb:255,138,92; --focus: 0 0 0 3px rgba(207,33,109,.3); }
:root[data-theme="dark"][data-palette="rose"] { --bg:#240B18; --paper:#351126; --sand:#451832; --line:#5F2444; --line-tint:#5F2444; --border:#8F4168; --ink:#FFE9F2; --navy-deep:#FFF5F9; --muted:#DCA9C0; --text-soft:#EFC6D8; --brand:#CF216D; --brand-dark:#B51C5E; --brand-mid:#EC478E; --brand-soft:#4C1833; --info:#FF95C2; --info-soft:#4C1833; --accent:#FFA070; --accent-ink:#FFC4A3; --fx-link:#FF95C2; --fx-deep:#8C1A4C; --fx-rgb:236,71,142; --accent-rgb:255,160,112; --focus: 0 0 0 3px rgba(236,71,142,.45); }
:root[data-palette="slate"]:not([data-theme="dark"]) { --bg:#E9F0F6; --paper:#FAFCFE; --sand:#D8E4EE; --line:#CBDAE6; --line-tint:#CBDAE6; --border:#A5BED2; --ink:#18293A; --navy-deep:#1C3650; --muted:#546A7E; --text-soft:#3E5468; --brand:#3D6685; --brand-dark:#2E506A; --brand-mid:#4D7DA1; --brand-soft:#DDEAF3; --info:#2E506A; --info-soft:#DDEAF3; --accent:#22C3D6; --accent-ink:#0A7080; --fx-rgb:61,102,133; --accent-rgb:34,195,214; --focus: 0 0 0 3px rgba(61,102,133,.3); }
:root[data-theme="dark"][data-palette="slate"] { --bg:#0F1720; --paper:#18232F; --sand:#202E3D; --line:#2F4254; --line-tint:#2F4254; --border:#4D6880; --ink:#E6EEF5; --navy-deep:#F3F7FB; --muted:#A5B8C9; --text-soft:#C5D3E0; --brand:#3F7096; --brand-dark:#355F80; --brand-mid:#4F86B0; --brand-soft:#233445; --info:#7FD4E8; --info-soft:#233445; --accent:#3BD0E3; --accent-ink:#8BE6F2; --fx-link:#7FD4E8; --fx-deep:#2A4A64; --fx-rgb:79,134,176; --accent-rgb:59,208,227; --focus: 0 0 0 3px rgba(79,134,176,.45); }

: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),.18), transparent 70%),
  radial-gradient(700px 500px at 5% calc(30% - var(--fx-y, 0) * .15px), rgba(var(--fx-rgb),.14), 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(3, 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 2px rgba(255,255,255,.35); }
.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-progress, :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; } }
