/* Haze Retreats — Cleaner Dashboard. Styles transcribed 1:1 from the Claude
   Design CleanerScreen component (colors, type, radii, spacing preserved). */

:root {
  --bg: #F7F5F2;
  --ink: #2A2724;
  --ink-soft: #3B362F;
  --ink-mid: #5C564E;
  --ink-faint: #8A8378;
  --ink-ghost: #A89F92;
  --card-border: #E8E4DE;
  --card-border-lt: #EAE6DF;
  --hairline: #EFEBE5;
  --hairline-lt: #F4F1EC;
  --chip: #F2EEE8;
  --accent: #C76A3F;
  --accent-soft: #E0A874;
  --accent-bg: #F9EFE7;
  --red: #B3402E;
  --red-bg: #FBEDEA;
  --red-border: #F0D5CE;
  --paper: #FDF6F0;
  --dark: #2A2724;
  --darker: #211E1B;
  --skel: #E5E0D8;
  --skel-lt: #EDE9E2;
  --mono: 'Spline Sans Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  font-family: Figtree, system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; color: inherit; }

.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
}

.stack {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 16px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

[hidden] { display: none !important; }

/* ===== Top bar ===== */
.topbar { display: flex; align-items: center; justify-content: space-between; }
.brand {
  font-family: var(--mono);
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  color: var(--accent);
}
.today { font-size: 13px; font-weight: 600; color: var(--ink-faint); }

/* ===== Property switcher button (team) ===== */
.switcher-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; background: #FFFFFF; border: 1px solid var(--card-border);
  border-radius: 16px; padding: 14px 16px; cursor: pointer; text-align: left;
  min-height: 72px;
}
.switcher-btn:active { background: var(--chip); }
.prop-name { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.prop-meta { font-size: 13px; color: var(--ink-faint); font-weight: 500; }
.switcher-caret {
  width: 38px; height: 38px; border-radius: 50%; background: var(--chip);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 15px; color: var(--ink-mid);
}

/* ===== Static property header (backup / single property) ===== */
.static-header {
  display: flex; flex-direction: column; gap: 6px; background: #FFFFFF;
  border: 1px solid var(--card-border); border-radius: 16px; padding: 14px 16px;
}
.backup-tag {
  align-self: flex-start; font-family: var(--mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--accent); background: var(--accent-bg);
  border-radius: 6px; padding: 4px 8px;
}

/* ===== Door codes — the hero ===== */
.codes-card {
  background: var(--dark); border-radius: 20px; padding: 20px; cursor: pointer;
  display: flex; flex-direction: column; gap: 14px; border: 0; width: 100%;
  text-align: left; box-shadow: 0 12px 28px rgba(42, 39, 36, 0.16);
}
.codes-card:active { transform: scale(0.985); }
.codes-head { display: flex; justify-content: space-between; align-items: center; }
.codes-label {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; color: var(--accent-soft);
}
.codes-hint {
  font-size: 12px; color: rgba(247, 245, 242, 0.5); font-weight: 600;
  display: flex; gap: 6px; align-items: center;
}
.codes-hint span { font-size: 14px; }
.code-primary { display: flex; flex-direction: column; gap: 6px; }
.code-key {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(247, 245, 242, 0.55);
}
.code-val {
  font-family: var(--mono); font-size: 56px; font-weight: 700;
  letter-spacing: 0.06em; color: #F7F5F2; line-height: 1;
  overflow-wrap: anywhere;
}
.code-extras {
  display: flex; flex-direction: column;
  border-top: 1px solid rgba(247, 245, 242, 0.14); padding-top: 4px;
}
.code-extra {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 10px 0 2px;
}
.code-extra .xval {
  font-family: var(--mono); font-size: 30px; font-weight: 700;
  letter-spacing: 0.08em; color: #F7F5F2; line-height: 1;
}

/* ===== Schedule ===== */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 6px 2px 0;
}
.section-title { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.section-sub { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }
.sched { display: flex; flex-direction: column; gap: 10px; }

.sameday-banner {
  display: flex; gap: 10px; align-items: center; background: var(--red-bg);
  border: 1px solid var(--red-border); border-radius: 12px; padding: 10px 13px;
}
.bang {
  display: inline-flex; width: 17px; height: 17px; border-radius: 50%;
  background: var(--red); color: var(--paper); align-items: center;
  justify-content: center; font-weight: 800; font-size: 11px; flex-shrink: 0;
}
.sameday-banner .txt { font-size: 13px; font-weight: 700; color: var(--red); }

.stays { display: flex; flex-direction: column; gap: 10px; }
.stay { background: #FFFFFF; border: 1px solid var(--card-border); border-radius: 16px; overflow: hidden; }
.stay-flag {
  background: var(--red); color: var(--paper); padding: 9px 14px;
  display: flex; gap: 9px; align-items: center;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.03em;
}
.stay-flag .bang { background: rgba(255, 255, 255, 0.22); color: var(--paper); }
.stay-body { display: flex; gap: 14px; padding: 14px; }
.stay-date {
  width: 48px; flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding-top: 2px;
}
.stay-dow {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; color: var(--ink-faint);
}
.stay-day { font-size: 25px; font-weight: 800; line-height: 1; }
.today-pill {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--paper); background: var(--accent); border-radius: 5px;
  padding: 2px 5px; margin-top: 2px;
}
.stay-main {
  flex: 1; display: flex; flex-direction: column; gap: 5px;
  border-left: 1px solid var(--hairline); padding-left: 14px;
}
.stay-reason { font-size: 16px; font-weight: 700; line-height: 1.2; }
.stay-guests { font-size: 13.5px; color: var(--ink-mid); font-weight: 600; }
.stay-times { display: flex; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.time-chip {
  display: flex; gap: 6px; align-items: baseline; background: var(--chip);
  border-radius: 8px; padding: 5px 9px;
}
.time-chip .k {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--ink-faint);
}
.time-chip .v { font-size: 13px; font-weight: 700; color: var(--ink-soft); }

.empty-week {
  background: #FFFFFF; border: 1px dashed #DCD6CC; border-radius: 16px;
  padding: 28px 20px; display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center;
}
.empty-check {
  width: 40px; height: 40px; border-radius: 50%; background: var(--chip);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--ink-ghost);
}
.empty-title { font-size: 15.5px; font-weight: 700; color: var(--ink-soft); }
.empty-sub {
  font-size: 13px; font-weight: 500; color: var(--ink-faint);
  line-height: 1.45; max-width: 260px;
}

.sched-error {
  background: #FFFFFF; border: 1px dashed #DCD6CC; border-radius: 16px;
  padding: 18px 20px; text-align: center; font-size: 13.5px; font-weight: 600;
  color: var(--ink-faint);
}

/* ===== Checklist ===== */
.checklist { display: flex; flex-direction: column; gap: 10px; }
.cl-group { background: #FFFFFF; border: 1px solid var(--card-border); border-radius: 16px; padding: 2px 16px 6px; }
.cl-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid transparent;
  width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0;
  cursor: pointer; text-align: left;
}
.cl-head:active { opacity: 0.6; }
.cl-group.open .cl-head { border-bottom-color: var(--hairline); padding-bottom: 9px; }
.cl-head-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cl-chevron {
  font-size: 16px; color: var(--ink-ghost); line-height: 1;
  transition: transform 0.18s ease; transform: translateY(-1px);
}
.cl-group.open .cl-chevron { transform: rotate(180deg); }
.cl-items { display: flex; flex-direction: column; }
.cl-room {
  font-size: 13px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink);
}
.cl-count { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ink-ghost); }
.cl-item {
  display: flex; gap: 11px; padding: 10.5px 0; border-bottom: 1px solid var(--hairline-lt);
  font-size: 14.5px; line-height: 1.4; font-weight: 500; color: var(--ink-soft);
  align-items: flex-start;
}
.cl-item:last-child { border-bottom: 0; }
.cl-dot {
  width: 6px; height: 6px; border-radius: 2px; background: var(--accent);
  margin-top: 7px; flex-shrink: 0;
}
.cl-note { font-size: 12px; font-weight: 500; color: var(--ink-ghost); text-align: center; padding: 4px 0 8px; }
.generic-tag {
  display: flex; gap: 10px; align-items: center; background: var(--accent-bg);
  border: 1px solid #F0DFCD; border-radius: 12px; padding: 10px 13px;
  font-size: 12.5px; font-weight: 600; color: var(--accent);
}

/* ===== Overlays ===== */
.overlay { position: fixed; inset: 0; z-index: 40; }
.overlay-scrim { position: absolute; inset: 0; background: rgba(42, 39, 36, 0.45); border: 0; width: 100%; }
.switch-panel {
  position: relative; margin: 96px 14px 0; background: #FFFFFF; border-radius: 20px;
  padding: 6px; box-shadow: 0 24px 60px rgba(42, 39, 36, 0.3);
  display: flex; flex-direction: column; max-height: calc(100vh - 130px); overflow: auto;
  max-width: 492px; margin-left: auto; margin-right: auto;
}
@media (max-width: 519px) { .switch-panel { margin-left: 14px; margin-right: 14px; } }
.switch-title {
  padding: 14px 14px 8px; font-family: var(--mono); font-size: 10.5px;
  font-weight: 700; letter-spacing: 0.16em; color: var(--ink-faint);
}
.switch-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-radius: 14px; cursor: pointer; min-height: 48px; border: 0;
  background: transparent; width: 100%; text-align: left;
}
.switch-row:hover { background: var(--bg); }
.switch-row:active { background: var(--chip); }
.switch-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.switch-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.switch-meta-row { display: flex; align-items: center; gap: 8px; }
.switch-meta { font-size: 12.5px; color: var(--ink-faint); font-weight: 500; }
.switch-sameday {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--red); background: var(--red-bg); border-radius: 5px;
  padding: 2px 6px; white-space: nowrap;
}
.switch-active {
  width: 26px; height: 26px; border-radius: 50%; background: var(--dark);
  color: #F7F5F2; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}

/* ===== Door mode — fullscreen codes ===== */
.door {
  position: fixed; inset: 0; z-index: 50; background: var(--darker);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 44px; cursor: pointer; padding: 60px 24px; border: 0; width: 100%;
}
.door-head { text-align: center; display: flex; flex-direction: column; gap: 7px; align-items: center; }
.door-label {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; color: var(--accent-soft);
}
.door-prop { font-size: 19px; font-weight: 700; color: rgba(247, 245, 242, 0.85); }
.door-codes { display: flex; flex-direction: column; gap: 38px; align-items: center; overflow: auto; scrollbar-width: none; max-height: 60vh; }
.door-codes::-webkit-scrollbar { display: none; }
.door-code { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.door-code .k {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(247, 245, 242, 0.55);
}
.door-code .v {
  font-family: var(--mono); font-size: 68px; font-weight: 700;
  letter-spacing: 0.06em; color: #F7F5F2; line-height: 1;
  overflow-wrap: anywhere; text-align: center;
}
.door-close { font-size: 13px; color: rgba(247, 245, 242, 0.4); font-weight: 600; }

/* ===== Loading skeleton (mirrors the loaded layout) ===== */
@keyframes hazePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.sk { border-radius: 6px; background: var(--skel); animation: hazePulse 1.6s ease-in-out infinite; }
.sk.lt { background: var(--skel-lt); }
.sk-card {
  display: flex; flex-direction: column; gap: 8px; background: #FFFFFF;
  border: 1px solid var(--card-border-lt); border-radius: 16px; padding: 16px;
}
.sk-dark { background: var(--dark); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.sk-dark .sk { background: rgba(247, 245, 242, 0.16); }
.sk-row { display: flex; justify-content: space-between; align-items: center; }
.sk-stay {
  height: 104px; border-radius: 16px; background: #FFFFFF;
  border: 1px solid var(--card-border-lt); padding: 14px; display: flex; gap: 14px;
}
.sk-stay-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-fill { flex: 1; min-height: 160px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--card-border-lt); animation: hazePulse 1.6s ease-in-out infinite; }

/* ===== Login ===== */
.login-stack {
  min-height: 100vh; min-height: 100dvh; padding: 0 24px;
  display: flex; flex-direction: column; justify-content: center; gap: 26px;
  max-width: 420px; margin: 0 auto;
}
.login-head { display: flex; flex-direction: column; gap: 10px; }
.login-title { font-size: 28px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.15; margin: 0; }
.login-sub { font-size: 14px; font-weight: 500; color: var(--ink-mid); line-height: 1.5; margin: 0; }
.login-card {
  background: #FFFFFF; border: 1px solid var(--card-border); border-radius: 20px;
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint);
}
.field input {
  font-family: inherit; font-size: 17px; font-weight: 600; color: var(--ink);
  background: var(--bg); border: 1px solid var(--card-border); border-radius: 12px;
  padding: 13px 14px; width: 100%; outline: none;
}
.field input:focus { border-color: var(--accent); }
.field input.mono { font-family: var(--mono); letter-spacing: 0.12em; }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { padding-right: 50px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; color: var(--ink-faint); padding: 0;
}
.pw-toggle:active { color: var(--ink); }
.eye { display: inline-flex; }
.eye-off { display: none; }
.pw-toggle.revealed .eye-on { display: none; }
.pw-toggle.revealed .eye-off { display: inline-flex; }
.login-error {
  display: flex; gap: 10px; align-items: center; background: var(--red-bg);
  border: 1px solid var(--red-border); border-radius: 12px; padding: 10px 13px;
  font-size: 13px; font-weight: 700; color: var(--red);
}
.login-btn {
  background: var(--dark); color: #F7F5F2; border: 0; border-radius: 14px;
  padding: 15px; font-size: 16px; font-weight: 700; cursor: pointer;
}
.login-btn:active { transform: scale(0.985); }
.login-btn[disabled] { opacity: 0.55; }
.login-alt {
  background: none; border: 0; font-size: 13.5px; font-weight: 600;
  color: var(--ink-faint); cursor: pointer; padding: 6px; text-decoration: underline;
  text-underline-offset: 3px; text-align: center;
}

/* ===== Footer ===== */
.foot {
  display: flex; justify-content: center; gap: 18px; align-items: center;
  padding: 8px 0 0;
}
.foot button {
  background: none; border: 0; font-size: 12px; font-weight: 600;
  color: var(--ink-ghost); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}
