/* ==========================================================================
   StayBook Booking Engine — Coorg homestay demo
   Palette "Estate Morning": parchment cream, forest green, moss,
   roasted coffee and a terracotta roof-tile accent.
   Type: Fraunces (display serif) + Nunito Sans (interface)
   1. Tokens  2. Base  3. Layout & sidebar  4. Top bar  5. Primitives
   6. Rooms view  7. Booking view  8. Owner desk  9. Dialog & overlays
   10. Responsive
   ========================================================================== */

/* ------------------------------ 1. Tokens ------------------------------ */
:root {
  --cream: #F5EFE3;
  --paper: #FFFCF6;
  --sand: #EDE4D3;
  --ink: #1F2A22;
  --muted: #5A6156;
  --faint: #7C8276;
  --line: #E2D8C5;
  --line-2: #EEE7DA;

  --forest: #24493A;
  --forest-2: #2F5E4A;
  --forest-ink: #E9F0E4;
  --moss: #8AA66B;
  --moss-soft: #E3EBD8;
  --coffee: #6B4429;
  --terra: #B04F27;
  --terra-soft: #F7E3D6;
  --gold: #E3A857;

  --ok: #2E6B4C;
  --ok-bg: #E1EEE3;
  --warn: #8A5A10;
  --warn-bg: #FBEBCB;
  --bad: #A23B2A;
  --bad-bg: #F8E1DB;
  --info: #31597A;
  --info-bg: #E1EBF3;

  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(31, 42, 34, .05), 0 14px 34px -22px rgba(31, 42, 34, .35);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side-w: 256px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ------------------------------- 2. Base ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2.5px solid var(--terra); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--forest); color: #fff; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--forest); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* ------------------------- 3. Layout & sidebar ------------------------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; }
#main { padding: 22px 30px 44px; outline: none; }

.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px;
  padding: 22px 16px 18px;
  background: var(--paper);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.brand__txt { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.05; display: flex; flex-direction: column; color: var(--forest); }
.brand__txt small { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 3px; }

.prop { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--cream); border: 1px solid var(--line-2); }
.prop__art { width: 52px; height: 52px; flex: none; border-radius: 12px; }
.prop__name { font-family: var(--serif); font-weight: 600; font-size: 15px; line-height: 1.2; }
.prop__loc { font-size: 12.5px; color: var(--muted); }
.prop__rate { font-size: 12.5px; font-weight: 700; color: var(--coffee); }
.prop__rate span:first-child { color: var(--gold); }
.prop__muted { font-weight: 400; color: var(--faint); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__label { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 12px 10px 6px; }
.nav__label:first-child { padding-top: 0; }
.nav__link { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.nav__link:hover { background: var(--cream); color: var(--ink); }
.nav__link[aria-current="page"] { background: var(--forest); color: #fff; }
.nav__count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; font-size: 11.5px; background: var(--terra); color: #fff; }
.nav__count:empty { display: none; }

.side__card { margin-top: auto; padding: 14px; border-radius: 16px; background: var(--forest); color: var(--forest-ink); display: grid; gap: 4px; }
.side__card-title { font-family: var(--serif); font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.side__card a { display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.side__card a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.side__card a:focus-visible { outline-color: var(--gold); }
.side__foot { padding: 0 6px; font-size: 12px; color: var(--faint); }

/* ------------------------------ 4. Top bar ----------------------------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 30px;
  background: rgba(245, 239, 227, .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.mode { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.mode__btn { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--muted); transition: background .2s, color .2s; }
.mode__btn:hover { color: var(--ink); }
.mode__btn[aria-current="true"] { background: var(--forest); color: #fff; }
.top__title { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -.015em; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--coffee); background: var(--terra-soft); border: 1px dashed #DDA889; }
.top__end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top__date { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------------------------- 5. Primitives ---------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 800; font-size: 14px; white-space: nowrap; transition: background .2s, border-color .2s, transform .2s, color .2s; }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--forest); color: #fff; }
.btn--primary:hover { background: var(--forest-2); }
.btn--line { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn--line:hover { border-color: #CDBFA6; }
.btn--soft { background: var(--moss-soft); color: var(--forest); }
.btn--soft:hover { background: #D6E2C7; }
.btn--ghost { background: none; color: var(--muted); }
.btn--ghost:hover { color: var(--ink); background: var(--cream); }
.btn--wa { background: #1F7A4D; color: #fff; }
.btn--wa:hover { background: #18663F; }
.btn--danger { background: none; border-color: #E6C2B8; color: var(--bad); }
.btn--danger:hover { background: var(--bad-bg); }
.btn .ico { width: 16px; height: 16px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; color: var(--ink); }
.icon-btn:hover:not(:disabled) { border-color: #CDBFA6; }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel__title { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.panel__sub { font-size: 13px; color: var(--muted); }

.field { display: grid; gap: 5px; min-width: 0; }
.field label, .quick__field label { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.opt { font-weight: 600; color: var(--faint); }
.field input, .field select, .field textarea, .quick input, .quick select, .select, .search input {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); background: #fff; font-size: 14px;
}
.field textarea { resize: vertical; min-height: 64px; }
.field select, .quick select, .select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%235A6156' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; }
.field input:focus, .field select:focus, .field textarea:focus, .quick input:focus, .quick select:focus, .select:focus, .search input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(36, 73, 58, .16); }
[aria-invalid="true"] { border-color: var(--bad) !important; }
.err { font-size: 12.5px; color: var(--bad); font-weight: 600; }
.err:empty { display: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phone { display: flex; align-items: stretch; }
.phone span { display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--line); border-right: 0; border-radius: 11px 0 0 11px; background: var(--cream); font-weight: 700; font-size: 14px; color: var(--muted); }
.phone input { border-radius: 0 11px 11px 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--upcoming { color: var(--info); background: var(--info-bg); }
.pill--arriving { color: var(--warn); background: var(--warn-bg); }
.pill--inhouse, .pill--departing { color: var(--ok); background: var(--ok-bg); }
.pill--completed { color: var(--muted); background: var(--line-2); }
.pill--cancelled { color: var(--bad); background: var(--bad-bg); }

/* ----------------------------- 6. Rooms view --------------------------- */
.hero { position: relative; overflow: hidden; border-radius: 24px; min-height: 300px; display: flex; align-items: flex-start; background: linear-gradient(180deg, #F3E4CB, #E6E9D6); box-shadow: var(--shadow); }
.hero__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__inner { position: relative; max-width: 660px; padding: 34px 38px 92px; }
.hero__eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--coffee); }
.hero__title { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 46px); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; color: var(--forest); margin: 8px 0 10px; }
.hero__lede { font-size: 15.5px; color: #33402F; max-width: 470px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero__facts li { padding: 5px 12px; border-radius: 999px; background: rgba(255, 252, 246, .82); font-size: 12.5px; font-weight: 700; color: var(--forest); border: 1px solid rgba(36, 73, 58, .12); }

.quick {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.3fr .8fr .8fr auto; gap: 12px; align-items: end;
  margin: -58px 26px 26px; padding: 16px 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 22px 44px -26px rgba(31, 42, 34, .45);
}
.quick__field { display: grid; gap: 5px; min-width: 0; }
.quick .btn { min-height: 42px; }
.quick__msg { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--forest); }
.quick__msg:empty { display: none; }

.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.room { display: flex; flex-direction: column; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s; }
.room:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -26px rgba(31, 42, 34, .45); }
.room--cta { background: radial-gradient(120% 80% at 100% 0%, #E3EBD8, transparent 60%), var(--paper); border-style: dashed; border-color: #C9BBA0; }
.room--cta .room__body { justify-content: flex-end; padding-top: 26px; }
.room--cta:hover { transform: none; }
.room__media { position: relative; aspect-ratio: 40 / 23; background: var(--sand); }
.room__media img { width: 100%; height: 100%; object-fit: cover; }
.room__tag { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 252, 246, .9); font-size: 12px; font-weight: 800; color: var(--forest); }
.room__avail { position: absolute; right: 12px; top: 12px; }
.room__body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.room__name { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.room__blurb { font-size: 14px; color: var(--muted); }
.room__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 700; color: var(--coffee); }
.room__facts li { display: inline-flex; align-items: center; gap: 6px; }
.room__facts .ico { width: 15px; height: 15px; }
.room__amen { display: flex; flex-wrap: wrap; gap: 6px; }
.room__amen li { padding: 3px 9px; border-radius: 8px; background: var(--cream); font-size: 12px; font-weight: 600; color: var(--muted); }
.room__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-2); }
.room__rate b { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--forest); }
.room__rate { font-size: 13px; color: var(--muted); line-height: 1.25; }
.room__rate small { display: block; font-size: 12px; color: var(--faint); }
.room__status { font-size: 13px; font-weight: 700; }
.room__status--ok { color: var(--ok); }
.room__status--no { color: var(--bad); }
.room__status:empty { display: none; }

/* ---------------------------- 7. Booking view -------------------------- */
.book { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.room-pick legend { font-size: 12.5px; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.room-pick__list { display: flex; flex-wrap: wrap; gap: 8px; }
.rp { position: relative; }
.rp input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rp label { display: flex; flex-direction: column; padding: 8px 13px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 800; line-height: 1.25; transition: border-color .2s, background .2s; cursor: pointer; }
.rp label small { font-weight: 600; color: var(--muted); font-size: 12px; }
.rp input:checked + label { border-color: var(--forest); background: var(--forest); color: #fff; }
.rp input:checked + label small { color: var(--forest-ink); }
.rp input:focus-visible + label { outline: 2.5px solid var(--terra); outline-offset: 2px; }
.rp:hover label { border-color: #CDBFA6; }

.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 12px; }
.cal-head__title { font-family: var(--serif); font-size: 18px; font-weight: 600; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(var(--months, 1), minmax(0, 1fr)); gap: 26px; }
.month__name { font-family: var(--serif); font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--forest); }
.cal[style*="--months:1"] .month__name { display: none; }
.wk, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wk span { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 4px 0; }
.day {
  position: relative; aspect-ratio: 1 / .92; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 11px; border: 1px solid var(--line-2); background: #fff; padding: 2px;
  font-weight: 800; font-size: 14.5px; color: var(--ink); transition: background .15s, border-color .15s, color .15s;
}
.day small { font-size: 10.5px; font-weight: 700; color: var(--ok); line-height: 1.1; white-space: nowrap; }
.day:hover:not(:disabled) { border-color: var(--forest); }
.day:disabled { cursor: not-allowed; }
.day--blank { border: 0; background: none; }
.day--past { color: #B5B7AE; background: transparent; border-color: transparent; }
.day--past small { display: none; }
.day--booked { color: #8B6E5A; background: repeating-linear-gradient(-45deg, #F3E5D8 0 6px, #EBD7C5 6px 12px); border-color: #E7D2C0; }
.day--booked small { color: #8B6E5A; }
.day--out { background: #fff; border-style: dashed; border-color: var(--terra); }
.day--out small { color: var(--terra); }
.day--today { box-shadow: inset 0 0 0 2px var(--gold); }
.day--range, .day--hover { background: var(--moss-soft); border-color: #CFDCBE; }
.day--start, .day--end { background: var(--forest); border-color: var(--forest); color: #fff; }
.day--start small, .day--end small { color: var(--forest-ink); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cal-legend li { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); background: #fff; }
.sw--booked { background: repeating-linear-gradient(-45deg, #F3E5D8 0 3px, #E2C9B4 3px 6px); border-color: #E7D2C0; }
.sw--sel { background: var(--forest); border-color: var(--forest); }
.sw--today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal-hint { margin-top: 10px; font-size: 13px; color: var(--muted); }

.summary { position: sticky; top: 88px; }
.summary__title { font-family: var(--serif); font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.sum-room { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.sum-room img { width: 76px; height: 54px; border-radius: 10px; object-fit: cover; flex: none; }
.sum-room b { font-family: var(--serif); font-size: 16px; font-weight: 600; display: block; line-height: 1.2; }
.sum-room span { font-size: 12.5px; color: var(--muted); }
.sum-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.sum-dates div { background: #fff; padding: 9px 12px; }
.sum-dates dt { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.sum-dates dd { margin: 2px 0 0; font-weight: 800; font-size: 14px; }
.sum-dates dd small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.price { display: grid; gap: 7px; margin-bottom: 16px; font-size: 14px; }
.price div { display: flex; justify-content: space-between; gap: 10px; }
.price dt { color: var(--muted); }
.price dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.price .price__total { padding-top: 10px; border-top: 1px dashed var(--line); font-size: 16px; }
.price .price__total dt { color: var(--ink); font-weight: 800; }
.price .price__total dd { font-family: var(--serif); font-size: 22px; color: var(--forest); }
.sum-empty { display: flex; gap: 12px; align-items: flex-start; padding: 14px; margin: 14px 0 16px; border-radius: 14px; background: var(--cream); font-size: 14px; color: var(--muted); }
.sum-empty .ico { color: var(--forest); margin-top: 2px; }
.sum-empty b { color: var(--ink); display: block; }
.bform { display: grid; gap: 12px; }
.bform__note { font-size: 12px; color: var(--faint); text-align: center; }

/* ----------------------------- 8. Owner desk --------------------------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 16px 18px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.kpi__label { font-size: 13px; font-weight: 700; color: var(--muted); }
.kpi__value { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: 4px 0; color: var(--forest); }
.kpi__note { font-size: 12.5px; color: var(--faint); }
.kpi__bar { height: 6px; border-radius: 6px; background: var(--line-2); margin-top: 10px; overflow: hidden; }
.kpi__bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--moss), var(--forest)); }

.owner-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; margin-bottom: 20px; }
.today { scroll-margin-top: 90px; outline: none; }
.today__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.today__h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.today__h b { margin-left: auto; min-width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; background: var(--cream); color: var(--ink); font-size: 12.5px; }
.moves { display: grid; gap: 8px; }
.move { padding: 11px 12px; border-radius: 13px; border: 1px solid var(--line-2); background: #fff; display: grid; gap: 6px; }
.move__top { display: flex; align-items: center; gap: 10px; }
.av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--c, var(--forest)); }
.move__name { font-weight: 800; font-size: 14px; line-height: 1.2; }
.move__meta { font-size: 12.5px; color: var(--muted); }
.move .btn { justify-self: start; }
.move__done { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--ok); }
.move__done .ico { width: 16px; height: 16px; }
.moves .none { padding: 14px; border-radius: 13px; border: 1px dashed var(--line); font-size: 13.5px; color: var(--muted); text-align: center; }
.inhouse { margin-top: 16px; padding: 12px 14px; border-radius: 13px; background: var(--moss-soft); font-size: 13.5px; color: var(--forest); font-weight: 700; }

.occ__big { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--forest); line-height: 1; }
.occ__big small { display: block; font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--muted); text-align: right; margin-top: 4px; }
.occ-chart { min-height: 210px; }
.occ-chart svg { display: block; overflow: visible; }
.occ-chart .gl { stroke: var(--line-2); }
.occ-chart .ax { font-size: 11px; font-weight: 700; fill: var(--faint); font-family: var(--sans); }
.occ-chart .wkend { fill: #F4EEE2; }
.ob { cursor: pointer; outline: none; }
.ob rect.v { transition: opacity .2s; }
.ob:hover rect.v, .ob:focus rect.v { opacity: .8; }
.ob:focus-visible rect.hit { stroke: var(--terra); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) {
  .ob rect.v { transform-box: fill-box; transform-origin: 50% 100%; animation: rise .6s var(--ease) both; }
}
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.room-perf { display: grid; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.room-perf li { display: grid; grid-template-columns: minmax(0, 1fr) 2fr 44px; align-items: center; gap: 12px; font-size: 13px; }
.room-perf b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-bar { height: 8px; border-radius: 8px; background: var(--line-2); overflow: hidden; }
.rp-bar span { display: block; height: 100%; border-radius: 8px; background: var(--c); }
.room-perf em { font-style: normal; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

.panel__head--tools { align-items: center; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.search { position: relative; display: block; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search input { padding-left: 34px; width: 240px; }
.select { width: auto; }
.table-wrap { position: relative; overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 0 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #FBF7EE; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-id { font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.t-sub { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.t-guest { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.t-guest b { display: block; font-weight: 800; line-height: 1.25; }
.t-stay { white-space: nowrap; font-weight: 700; }
.table .btn--sm { padding: 6px 10px; font-size: 12.5px; }
.empty { padding: 28px 0 10px; text-align: center; color: var(--muted); }
.table-more { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }

.mob-credit { display: none; }

/* ------------------------ 9. Dialog & overlays ------------------------- */
.dlg { border: 0; padding: 0; border-radius: 22px; width: min(460px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(31, 42, 34, .6); }
.dlg::backdrop { background: rgba(31, 42, 34, .45); }
.dlg__body { padding: 26px 26px 22px; display: grid; gap: 14px; }
.dlg__tick { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.dlg__tick .ico { width: 24px; height: 24px; stroke-width: 2.4; }
.dlg__title { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.dlg dl { display: grid; gap: 6px; font-size: 14px; padding: 14px; border-radius: 14px; background: var(--cream); }
.dlg dl div { display: flex; justify-content: space-between; gap: 12px; }
.dlg dt { color: var(--muted); }
.dlg dd { margin: 0; font-weight: 800; text-align: right; }
.dlg__actions { display: grid; gap: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .dlg[open] { animation: pop .35s var(--ease); }
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.tip { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; max-width: 240px; padding: 10px 12px; border-radius: 12px; background: var(--forest); color: var(--forest-ink); font-size: 12.5px; line-height: 1.45; box-shadow: 0 16px 36px -14px rgba(31, 42, 34, .55); opacity: 0; transition: opacity .15s; }
.tip.is-on { opacity: 1; }
.tip b { color: #fff; }
.tip ul { margin-top: 4px; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 70; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 16px 36px -12px rgba(31, 42, 34, .5); transition: opacity .25s, transform .25s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------- 10. Responsive --------------------------- */
@media (max-width: 1260px) {
  .book { grid-template-columns: minmax(0, 1fr) 340px; }
  .owner-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .book { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .quick { grid-template-columns: 1fr 1fr 1fr; }
  .quick .btn { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .app { display: block; }
  body { padding-bottom: 76px; }
  .side {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 40; height: auto;
    flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); overflow: visible;
    border-right: 0; border-top: 1px solid var(--line); box-shadow: 0 -12px 30px -18px rgba(31, 42, 34, .4);
  }
  .brand, .prop, .side__card, .side__foot, .nav__label { display: none; }
  .nav { flex-direction: row; width: 100%; gap: 4px; }
  .nav__link { position: relative; flex: 1; flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 11.5px; text-align: center; min-width: 0; }
  .nav__link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav__count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 10.5px; }
  .top { padding: 12px 16px; gap: 10px; }
  .top__title { font-size: 21px; }
  .top__end { margin-left: 0; width: 100%; justify-content: space-between; }
  #main { padding: 16px 16px 30px; }
  .mob-credit { display: block; text-align: center; font-size: 12.5px; color: var(--faint); margin-top: 24px; }
  .today { scroll-margin-top: 140px; }
}
@media (max-width: 640px) {
  .top { position: relative; }
  .mode { display: none; }
  .hero { border-radius: 18px; min-height: 0; flex-direction: column; align-items: stretch; }
  .hero__art { position: relative; inset: auto; height: 130px; order: 2; }
  .hero__inner { padding: 22px 20px 4px; }
  .hero__lede { font-size: 14.5px; }
  .quick { margin: 14px 0 20px; grid-template-columns: 1fr 1fr; }
  .quick__field:first-child { grid-column: 1 / -1; }
  .rooms { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 16px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .kpis { gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi__value { font-size: 24px; }
  .today__cols { grid-template-columns: minmax(0, 1fr); }
  .tools { width: 100%; }
  .search { flex: 1 1 100%; }
  .search input { width: 100%; }
  .select { flex: 1; }
  .hide-sm { display: none; }
  .day { min-height: 40px; font-size: 13.5px; }
  .day small { font-size: 9.5px; }
  .wk, .days { gap: 3px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .top__date { display: none; }
  .t-guest { min-width: 0; }
  .t-guest .av { display: none; }
  /* Bookings table becomes stacked cards */
  .table-wrap { overflow: visible; margin: 0; padding: 0; }
  .table thead { display: none; }
  .table, .table tbody { display: block; }
  .table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
  .table td { display: block; padding: 0; border: 0; min-width: 0; }
  .table td:nth-child(2) { grid-column: 1; grid-row: 1; }
  .table td:nth-child(7) { grid-column: 2; grid-row: 1; justify-self: end; }
  .table td:nth-child(4) { grid-column: 1; grid-row: 2; }
  .table td:nth-child(5) { grid-column: 2; grid-row: 2; }
  .table td:nth-child(1) { grid-column: 1; grid-row: 3; display: flex; gap: 8px; align-items: baseline; }
  .table td:nth-child(8) { grid-column: 2; grid-row: 3; justify-self: end; }
  .table td:nth-child(8):empty { display: none; }
  .table td.hide-sm, .table td.hide-md { display: none; }
  .t-sub { white-space: normal; }
}
@media (max-width: 1000px) {
  .hide-md { display: none; }
}
@media (max-width: 380px) {
  .day small { display: none; }
  .day { aspect-ratio: 1; min-height: 36px; }
}
