/* RV Resort Template styles.
   To rebrand, change --accent, --accent-ink and --cta below (and the two font names). */
:root {
  --bg: #f6f1e8;
  --surface: #ffffff;
  --surface-2: #ece4d6;
  --ink: #15202b;
  --muted: #5d6673;
  --line: #ddd3c3;
  --accent: #b3471c;
  --accent-ink: #ffffff;
  --cta: #f2a900;
  --cta-ink: #1a1200;
  --night: #15202b;
  --night-2: #1f2f40;
  --ok: #2c7a4b;
  --warn: #a8700f;
  --bad: #b3402e;
  --shadow: 0 1px 2px rgba(20, 33, 30, .06), 0 8px 24px rgba(20, 33, 30, .06);
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f171f; --surface: #182330; --surface-2: #22303f; --ink: #f1ebe0; --muted: #a7b0bb; --line: #2e3d4d;
    --accent: #f08a5d; --accent-ink: #1a0d06; --cta: #f5b733; --cta-ink: #1a1200; --night: #0b1118; --night-2: #182330;
    --ok: #5cc185; --warn: #e0b04a; --bad: #ef8d7c; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f171f; --surface: #182330; --surface-2: #22303f; --ink: #f1ebe0; --muted: #a7b0bb; --line: #2e3d4d;
  --accent: #f08a5d; --accent-ink: #1a0d06; --cta: #f5b733; --cta-ink: #1a1200; --night: #0b1118; --night-2: #182330;
  --ok: #5cc185; --warn: #e0b04a; --bad: #ef8d7c; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 650; }
p { margin: 0; }
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.hide { display: none !important; }

.demo-bar {
  background: var(--ink); color: var(--bg); font-size: .85rem; text-align: center; padding: 8px 12px;
  margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
}
.demo-bar a { color: inherit; }

/* header */
.topbar { background: var(--night); color: #fff; margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.35rem; text-decoration: none; color: #fff; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--cta); display: inline-grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; stroke: var(--cta-ink) !important; }
.nav { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.nav a { color: rgba(255,255,255,.82); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--cta); }
.topbar .btn.cta { min-height: 38px; padding: 7px 14px; }

/* buttons and inputs */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 650; padding: 10px 16px; border-radius: 10px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
}
.btn:hover { border-color: var(--accent); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.cta { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); font-weight: 750; box-shadow: 0 6px 18px rgba(242,169,0,.35); }
.btn.cta:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn.ghost:hover { border-color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 34px; padding: 5px 11px; font-size: .875rem; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: grid; gap: 5px; font-size: .82rem; font-weight: 650; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; min-height: 42px; width: 100%; min-width: 0;
}
textarea { min-height: 84px; resize: vertical; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fields.two { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); font-size: .92rem; }
.check input { width: auto; min-height: 0; }

/* panels and cards */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.panel.amen { display: flex; gap: 12px; align-items: flex-start; }
.panel.amen .ic { width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); display: grid; place-items: center; font-weight: 800; flex: none; }
.panel.flat { box-shadow: none; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: var(--surface-2); color: var(--ink); white-space: nowrap;
}
.pill.ok { background: color-mix(in srgb, var(--ok) 18%, var(--surface)); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 20%, var(--surface)); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--bad) 16%, var(--surface)); color: var(--bad); }
.pill.info { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.notice { border-left: 4px solid var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); padding: 10px 14px; border-radius: 8px; font-size: .92rem; }
.notice.bad { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.notice.ok { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }

/* tables */
.tablebox { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--surface-2); }
tfoot td { font-weight: 700; background: var(--surface-2); }

/* guest site */
.hero-wrap { position: relative; color: #fff; margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding: 0 max(16px, env(safe-area-inset-left, 0px)); background: var(--night-2) center / cover no-repeat; isolation: isolate; }
.hero-wrap::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,16,24,.88) 0%, rgba(10,16,24,.62) 55%, rgba(10,16,24,.35) 100%), linear-gradient(180deg, rgba(10,16,24,.2), rgba(10,16,24,.55)); }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px); gap: 40px; align-items: center; padding: 64px 0 72px; max-width: 1120px; margin: 0 auto; }
.hero-copy { display: grid; gap: 18px; }
.hero-copy h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 800; letter-spacing: -.02em; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero-copy .muted { color: rgba(255,255,255,.86); font-size: 1.1rem; max-width: 52ch; }
.hero-copy .eyebrow { font-size: .8rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--cta); }
.hero-art { display: none; }
.hero-perks { display: flex; gap: 8px 22px; flex-wrap: wrap; font-weight: 650; font-size: .92rem; color: rgba(255,255,255,.9); padding: 0; margin: 4px 0 0; list-style: none; }
.hero-perks li::before { content: "✓ "; color: var(--cta); font-weight: 800; }
.bookbox { display: grid; gap: 14px; color: var(--ink); box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.bookbox h2 { font-size: 1.35rem; }
.section { padding: 56px 0; display: grid; gap: 24px; }
.section > .head { display: grid; gap: 8px; max-width: 680px; }
.section > .head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.02em; }
.section + .section { border-top: 1px solid var(--line); }
.strip { color: var(--ink); background: var(--surface); border-bottom: 1px solid var(--line); margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.strip-in { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; }
.strip-in > div { padding: 18px 20px 18px 0; display: grid; gap: 2px; }
.strip-in strong { font-family: var(--display); font-size: 1.15rem; }
.strip-in span { font-size: .88rem; color: var(--muted); }
.type-card { display: grid; gap: 12px; align-content: start; }
.type-card .price { font-family: var(--display); font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.type-card h3 { font-size: 1.3rem; }
.type-card.off { opacity: .6; }
.list { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.footer { background: var(--night); color: rgba(255,255,255,.78); margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding: 36px max(16px, env(safe-area-inset-left, 0px)) 44px; display: grid; gap: 14px; font-size: .92rem; }
.footer > * { max-width: 1120px; margin: 0 auto; width: 100%; }
.footer strong { color: #fff; font-family: var(--display); font-size: 1.1rem; }
.footer a { color: var(--cta); }
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); max-height: calc(100vh - 24px); }
dialog::backdrop { background: rgba(10, 16, 14, .55); }
.dlg { padding: 22px; display: grid; gap: 14px; }
.summary { display: grid; gap: 4px; font-size: .92rem; }
.summary > div { display: flex; justify-content: space-between; gap: 12px; }
.summary .tot { font-weight: 800; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-size: 1rem; }

/* staff apps */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tab { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; font: inherit; font-weight: 650; padding: 10px 12px; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; }
.kpi .v { font-family: var(--display); font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .78rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 90px minmax(0, 1fr) 96px; gap: 10px; align-items: center; font-size: .9rem; }
.bar .track { background: var(--surface-2); border-radius: 6px; height: 14px; overflow: hidden; }
.bar .fill { background: var(--accent); height: 100%; border-radius: 6px; }

/* tape chart */
.tape { min-width: 900px; font-size: .78rem; table-layout: fixed; }
.tape th, .tape td { padding: 0; border: 1px solid var(--line); height: 30px; text-align: center; }
.tape th { font-size: .7rem; letter-spacing: 0; }
.tape th.site, .tape td.site { width: 96px; text-align: left; padding: 0 8px; position: sticky; left: 0; background: var(--surface-2); z-index: 1; font-weight: 700; }
.tape th.today { background: var(--accent); color: var(--accent-ink); }
.tape td.cell { background: var(--surface); }
.tape td.sep td { background: var(--surface-2); }
.tape button { all: unset; box-sizing: border-box; display: block; width: 100%; height: 100%; line-height: 28px; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-weight: 650; }
.tape td.r-confirmed button { background: color-mix(in srgb, var(--accent) 26%, var(--surface)); }
.tape td.r-checked-in button { background: var(--accent); color: var(--accent-ink); }
.tape td.r-checked-out button { background: var(--surface-2); color: var(--muted); }
.tape button:focus-visible { outline: 3px solid var(--cta); outline-offset: -3px; }

.csvbox { font: .8rem/1.4 ui-monospace, Menlo, Consolas, monospace; min-height: 220px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 40px 0 48px; }
  .footer { padding-top: 28px; }
  .bar { grid-template-columns: 70px minmax(0, 1fr) 84px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: border-color .15s, background-color .15s; }
}

/* demo password screen */
html.locked body > *:not(#gate) { display: none !important; }
#gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 0; }
.gate-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; width: min(380px, 100%); display: grid; gap: 14px; box-shadow: var(--shadow); }
.gate-card h1 { font-size: 1.6rem; }

/* overview page */
.ov-hero { padding: 36px 0 24px; display: grid; gap: 14px; max-width: 760px; }
.ov-tag { display: inline-block; align-self: start; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.ov-card { display: grid; gap: 12px; align-content: start; }
.ov-card .btn { justify-self: start; }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ov-table td:first-child { font-weight: 650; width: 34%; }

.hero-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.gallery { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; display: block; background: var(--surface-2); box-shadow: var(--shadow); }
.staff { border-top: 1px solid var(--line); margin-top: 12px; }

/* separate pages: show only this page's sections */
body[data-page] .hero, body[data-page] .section { display: none !important; }
body[data-page="home"] #book, body[data-page="home"] #results, body[data-page="home"] #gallery,
body[data-page="rates"] #rates, body[data-page="amenities"] #amenities, body[data-page="amenities"] #policies,
body[data-page="booking"] #manage, body[data-page="staff"] #staff { display: block !important; }
body[data-page="home"] #book { display: grid !important; }
body:not([data-page="home"]) .hero-wrap, body:not([data-page="home"]) .strip { display: none; }
body[data-page="staff"] .section.staff { padding-top: 40px; }
body[data-page="home"] #results[hidden], body[data-page="home"] #gallery[hidden] { display: none !important; }

/* resort map */
.mapwrap { overflow-x: auto; }
.sitemap { width: 100%; min-width: 640px; display: block; font-family: var(--body); }
.m-ground { fill: color-mix(in srgb, var(--surface-2) 70%, var(--bg)); }
.m-road { fill: color-mix(in srgb, var(--ink) 22%, var(--surface-2)); }
.m-dash { stroke: var(--surface); stroke-width: 3; stroke-dasharray: 18 14; }
.m-label { font-size: 13px; font-weight: 700; fill: var(--muted); letter-spacing: .02em; }
.m-site rect { stroke-width: 1.5; }
.m-site text { font-size: 14px; font-weight: 700; pointer-events: none; }
.m-site.free rect { fill: #d9f2e1; stroke: #2c7a4b; cursor: pointer; }
.m-site.free text { fill: #1d5a35; }
.m-site.free:hover rect, .m-site.free:focus-visible rect { fill: var(--cta); stroke: #a06f00; }
.m-site.free:focus-visible { outline: none; }
.m-site.taken rect { fill: color-mix(in srgb, var(--ink) 14%, var(--surface-2)); stroke: color-mix(in srgb, var(--ink) 30%, var(--surface-2)); }
.m-site.taken text { fill: var(--muted); }
.m-site.nofit rect { fill: var(--surface); stroke: var(--line); stroke-dasharray: 4 3; }
.m-site.nofit text { fill: var(--line); }
.m-pool { fill: #bfe3f7; stroke: #2b7fb0; stroke-width: 2; }
.m-poolt { font-size: 15px; font-weight: 800; fill: #15506f; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
.lg::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1.5px solid; }
.lg.free::before { background: #d9f2e1; border-color: #2c7a4b; }
.lg.taken::before { background: color-mix(in srgb, var(--ink) 14%, var(--surface-2)); border-color: color-mix(in srgb, var(--ink) 30%, var(--surface-2)); }
.lg.nofit::before { background: var(--surface); border-color: var(--line); border-style: dashed; }

/* extras step */
.incl { font-size: .95rem; }
.xtras { display: grid; gap: 8px; }
.xtra { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 500; font-size: .95rem; cursor: pointer; }
.xtra:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.xtra input { width: 18px; height: 18px; min-height: 0; margin: 0; }
.xtra .price { text-align: right; font-weight: 700; }
.dlg h3 { margin-top: 4px; }
