/* 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); }
.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: #D6CBB6; }
.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 #D6CBB6; 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: #DDD2BE; }
.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: #555B64; }
.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: #C9D9CC; }
.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 #ECE4D5; }
.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,#ECE7DF,#F4F0EA,#ECE7DF); 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 #D6CBB6; 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: #C7BBA4; 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: rgba(20,38,30,.45); 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 #D6CBB6; 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 #C7BBA4; 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); }
.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: rgba(245,239,227,.9); 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); }
.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: #4C5563; 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: #4C5563; 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: #4C5563; 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: #C3CDBF; 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 page section buttons: one row that scrolls sideways on a narrow screen */
.staff-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.staff-nav .btn { flex: 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(184,137,59,.55), var(--shadow-lift); } 100% { box-shadow: var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .arrival.fx-arrive { animation: none; } }
