/* Layout: phone-first app shell — top bar + bottom tabs on phones, side-by-side tabs on desktop. */
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
/* Laguna: lagoon mist, deep lagoon ink, teal actions, editorial serif for headings and amounts. Green/amber/red only for rent status. */
:root {
  --bg: #EDF2F1; --surface: #FFFFFF; --surface-2: #F5F8F7; --ink: #0C2A2B; --muted: #5E7372; --line: #DCE5E3; --hair: #EBF0EF;
  --accent: #0F6B66; --accent-ink: #FFFFFF; --accent-soft: #DCEEEB;
  --ok: #0F8A4F; --ok-soft: #E1F4E8; --warn: #A15C00; --warn-soft: #FCEFD8; --bad: #C2372F; --bad-soft: #FBE6E3;
  --none: #5E7372; --none-soft: #E6EDEC;
  --shadow: 0 1px 1px rgba(12,42,43,.04), 0 10px 26px -16px rgba(12,42,43,.22);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1516; --surface: #122022; --surface-2: #172729; --ink: #E7F0EF; --muted: #93A8A6; --line: #223436; --hair: #1C2D2F;
    --accent: #5CC8BC; --accent-ink: #062120; --accent-soft: #14312F;
    --ok: #4CD68F; --ok-soft: #12301F; --warn: #F5BC55; --warn-soft: #33260C; --bad: #FF7A70; --bad-soft: #3A1614;
    --none: #A3B3B1; --none-soft: #1F2C2D;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0B1516; --surface: #122022; --surface-2: #172729; --ink: #E7F0EF; --muted: #93A8A6; --line: #223436; --hair: #1C2D2F;
    --accent: #5CC8BC; --accent-ink: #062120; --accent-soft: #14312F;
    --ok: #4CD68F; --ok-soft: #12301F; --warn: #F5BC55; --warn-soft: #33260C; --bad: #FF7A70; --bad-soft: #3A1614;
    --none: #A3B3B1; --none-soft: #1F2C2D;
    --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
}
.topbar-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: var(--bg); display: grid; place-items: center;
  font-weight: 900; font-size: 15px; flex: none; }
.brand-name { font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tab { border: 0; background: none; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; gap: 7px; }
.tab svg { width: 18px; height: 18px; }
.tab[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.menu-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; display: grid; place-items: center; flex: none; }
main { max-width: 1120px; margin: 0 auto; padding: 20px 16px 110px; }
@media (max-width: 760px) {
  .tabs { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 6px calc(env(safe-area-inset-bottom, 0px) + 6px); justify-content: space-around; z-index: 10; }
  .tab { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; flex: 1; align-items: center; }
  .tab svg { width: 22px; height: 22px; }
  .topbar-in .menu-btn { margin-left: auto; }
}

/* ---------- type ---------- */
h1 { font-size: 26px; line-height: 1.15; font-weight: 800; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; }
h3 { font-size: 17px; font-weight: 700; margin: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { padding: 14px 16px; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 4px; }
.stat-note { font-size: 13px; color: var(--muted); }
.stat.bad .stat-value { color: var(--bad); }
.stat.warn .stat-value { color: var(--warn); }
button.stat { text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
button.stat:hover { border-color: var(--accent); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--muted); }
a.row, button.row { color: inherit; text-decoration: none; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; font: inherit; }
a.row:hover, button.row:hover { background: var(--surface-2); }
.row.alert { background: var(--bad-soft); }
.time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; width: 64px; flex: none; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: var(--muted); flex: none; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-expiring { background: var(--warn-soft); color: var(--warn); }
.pill-expired { background: var(--bad-soft); color: var(--bad); }
.pill-none, .pill-inactive { background: var(--none-soft); color: var(--none); }
.badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: 10px 14px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; min-height: 42px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: none; }
.btn.small { padding: 6px 10px; min-height: 34px; font-size: 13px; }
.btn.wa { color: var(--ok); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
textarea.input { min-height: 72px; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.form { display: grid; gap: 14px; }
.form-2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.search { position: relative; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-left: 38px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 9px 12px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; width: max-content; }
.stepper button { width: 48px; height: 48px; border: 0; background: var(--surface-2); font-size: 22px; cursor: pointer; }
.stepper input { width: 64px; height: 48px; border: 0; text-align: center; font-size: 20px; font-weight: 700; background: var(--surface); }
.summary { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; }
.summary b { font-variant-numeric: tabular-nums; }

/* ---------- modal ---------- */
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); max-height: calc(100dvh - 24px); }
dialog.modal.wide { width: min(760px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(8,10,14,.55); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.modal-body { padding: 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 18px 18px; flex-wrap: wrap; }
.x { border: 0; background: none; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 22px; color: var(--muted); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 100; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--bad); color: #fff; }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); padding: 24px; }
.auth-card h1 { margin: 14px 0 4px; }
.demo-band { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 8px 16px; font-weight: 600; font-size: 13px; }
.demo-band button { background: none; border: 0; color: inherit; text-decoration: underline; font-weight: 700; cursor: pointer; }

/* ---------- bars (reports) ---------- */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 3px; height: 140px; padding: 0 2px; }
.bar { background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bar.dim { background: var(--accent-soft); }
.bar-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; font-size: 11px; color: var(--muted); text-align: center; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv b { font-variant-numeric: tabular-nums; }
.big-total { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- products ---------- */
.products { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.product { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.product-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.product-price { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stock { font-size: 13px; font-weight: 600; color: var(--muted); }
.stock.low { color: var(--bad); }

/* ---------- kiosk ---------- */
.kiosk { position: fixed; inset: 0; background: #0B0D10; color: #F3F5F8; display: grid; grid-template-rows: auto 1fr; overflow: auto;
  padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 0px); color-scheme: dark; }
.kiosk-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 8px; gap: 12px; }
.kiosk-gym { font-weight: 800; font-stretch: 115%; font-size: clamp(18px, 3vw, 26px); }
.kiosk-clock { font-variant-numeric: tabular-nums; color: #98A1AC; font-size: clamp(16px, 2.4vw, 22px); }
.kiosk-exit { background: none; border: 1px solid #2A3038; color: #98A1AC; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.kiosk-main { display: grid; place-items: center; padding-bottom: 24px; }
.kiosk-pad { width: min(440px, 100%); display: grid; gap: 18px; text-align: center; }
.kiosk-prompt { font-size: clamp(22px, 4vw, 32px); font-weight: 700; text-wrap: balance; }
.kiosk-display { font-size: clamp(34px, 7vw, 54px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .04em; min-height: 1.3em;
  border-bottom: 3px solid #2A3038; padding-bottom: 6px; }
.kiosk-display .ph { color: #3A414B; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key { background: #171B21; border: 1px solid #262C34; color: #F3F5F8; border-radius: 16px; font-size: clamp(26px, 5vw, 34px); font-weight: 700;
  height: clamp(64px, 11vh, 86px); cursor: pointer; touch-action: manipulation; }
.key:active { background: #232932; }
.key.go { background: #2747D8; border-color: #2747D8; font-size: 20px; }
.key.soft { font-size: 18px; color: #98A1AC; }
.kiosk-result { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; z-index: 5; }
.kiosk-result.ok { background: #0E7A45; } .kiosk-result.expiring { background: #B07000; } .kiosk-result.expired, .kiosk-result.not_found { background: #B02A25; }
.kiosk-result .icon { width: clamp(88px, 16vw, 140px); height: clamp(88px, 16vw, 140px); margin: 0 auto 18px; }
.kiosk-result h1 { font-size: clamp(36px, 7vw, 64px); color: #fff; }
.kiosk-result p { font-size: clamp(20px, 3.4vw, 30px); color: rgba(255,255,255,.92); margin: 12px 0 0; text-wrap: balance; }
@media (prefers-reduced-motion: no-preference) { .kiosk-result { animation: pop .18s ease-out; } @keyframes pop { from { opacity: 0; transform: scale(.98); } } }

.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.kiosk-clock { white-space: nowrap; }
@media (max-width: 600px) { #k-full { display: none; } .kiosk-top { padding: 12px 4px; } }

/* ---------- tables (inventory) ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table .neg { color: var(--bad); font-weight: 700; }

/* ---------- rental extras ---------- */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
.month { border-radius: 10px; padding: 8px; font-size: 12px; font-weight: 700; text-align: center; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.month small { display: block; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.month.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.month.expiring { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.month.expired { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.qr svg { width: 100%; height: auto; display: block; }
.qr { background: #fff; padding: 12px; border-radius: 12px; width: min(260px, 100%); margin: 0 auto; }
.linkbox { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.group-title { margin: 18px 0 8px; }
.split { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.bars2 { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; align-items: end; height: 130px; }
.bar2 { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar2 .exp { position: absolute; bottom: 0; left: 18%; right: 18%; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 6px 6px 0 0; }
.bar2 .got { position: relative; width: 64%; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 2px; }
@media print {
  body { background: #fff; }
  .no-print, .topbar, .tabs, .demo-band, #toast { display: none !important; }
  main { padding: 0; max-width: none; }
  .print-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12mm; }
  .print-card { break-inside: avoid; border: 1px solid #999 !important; box-shadow: none !important; }
}

.mark svg { width: 18px; height: 18px; }
.portal { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 24px; }
.portal .btn.wa { background: var(--surface); }
.wrap .row-title { white-space: normal; }
@media (max-width: 480px) { .wrap .row { flex-wrap: wrap; } .wrap .row-main { flex-basis: 100%; } }
button.month { cursor: pointer; font: inherit; }
button.month:hover { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- photos, checklists, statement ---------- */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; cursor: pointer; }
.checklist { display: grid; gap: 8px; }
.check-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.check-row.bad { border-color: var(--warn); background: var(--warn-soft); }
.check-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.check-head .seg button { padding: 6px 12px; }
@media print { .statement { box-shadow: none !important; border: 0 !important; } .statement .table { min-width: 0 !important; } }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; gap: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: start; display: block; }
.listing-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }

/* ---------- Laguna details ---------- */
body { font-weight: 500; letter-spacing: -.005em; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; letter-spacing: -.01em; line-height: 1.02; }
h2 { font-size: 13px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink); }
.topbar { background: var(--bg); border-bottom-color: transparent; }
.mark { background: var(--accent); color: var(--accent-ink); border-radius: 50%; font-weight: 800; }
.brand-name { font-weight: 800; letter-spacing: -.02em; }
.tab { border-radius: 999px; }
.tab[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 760px) {
  .tabs { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .tab { color: color-mix(in srgb, var(--muted) 75%, var(--bg)); }
  .tab[aria-current="page"] { background: none; color: var(--accent); }
}
.card { border-color: transparent; }
:root[data-theme="dark"] .card { border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card { border-color: var(--line); } }
.card-head { padding: 16px 18px; }
.stat { padding: 18px 20px; }
.stat-label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
.stat-value { font-family: var(--serif); font-weight: 400; font-size: 48px; letter-spacing: -.01em; line-height: 1; margin-top: 8px; }
.big-total { font-family: var(--serif); font-weight: 400; font-size: 46px; letter-spacing: -.01em; line-height: 1.05; }
.btn { border-radius: 999px; font-weight: 700; }
.pill { padding: 4px 10px; }
.badge { text-transform: none; letter-spacing: 0; border-radius: 999px; font-size: 12px; }
.row { padding: 14px 18px; border-bottom-color: var(--hair); }
.row-title { font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg { border-radius: 999px; border-color: transparent; background: color-mix(in srgb, var(--accent) 10%, var(--bg)); padding: 3px; }
.seg button { border-radius: 999px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(12,42,43,.14); }
.input, select.input, textarea.input { border-radius: 14px; background: var(--surface-2); }
.input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
dialog.modal { border-radius: 24px; }
.table th { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.toast { border-radius: 999px; }

/* ---------- calendario ---------- */
:root { --repair: #6D4FC2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --repair: #B59CFF; } }
:root[data-theme="dark"] { --repair: #B59CFF; }
.pill svg { width: 13px; height: 13px; }
.cal-wrap { display: grid; gap: 14px; align-items: start; }
@media (min-width: 900px) { .cal-wrap { grid-template-columns: minmax(380px, 460px) 1fr; } .cal-card { position: sticky; top: 76px; } }
.cal-card { padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-family: var(--serif); font-size: 26px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 0 4px; }
.cal-cell { aspect-ratio: 1 / 1.05; border: 1px solid transparent; background: var(--surface-2); border-radius: 10px; padding: 4px 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; color: inherit; font: inherit; min-width: 0; }
.cal-cell.out { background: none; cursor: default; }
.cal-cell.has { background: var(--surface); border-color: var(--line); }
.cal-cell.today { border: 2px solid var(--accent); }
.cal-cell.today .cal-n { color: var(--accent); }
.cal-cell.sel { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cal-cell.sel .cal-n { color: var(--bg); }
.cal-n { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.cal-dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; min-height: 7px; align-items: center; }
.cal-dots b { font-size: 9px; color: var(--muted); }
.cal-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.t-ok { --c: var(--ok); } .t-warn { --c: var(--warn); } .t-bad { --c: var(--bad); } .t-repair { --c: var(--repair); } .t-info { --c: var(--accent); } .t-muted { --c: var(--muted); }
.cal-dot.t-ok, .cal-dot.t-warn, .cal-dot.t-bad, .cal-dot.t-repair, .cal-dot.t-info, .cal-dot.t-muted { background: var(--c); }
.cal-day { margin-bottom: 10px; }
.cal-day.is-today { border-color: var(--accent); }
.cal-day .card-head { padding: 10px 14px; }
.cal-day .card-head .small::first-letter { text-transform: uppercase; }
.cal-item { width: 100%; text-align: left; border: 0; background: none; font: inherit; cursor: pointer; align-items: flex-start; }
.cal-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent); }
.cal-ic svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .tab span { font-size: 10px; } .tab { padding: 6px 1px; } }

/* ---------- plan banner ---------- */
.plan-band { max-width: 1120px; margin: 12px auto 0; padding: 10px 14px; border-radius: 14px; font-size: 14px; width: calc(100% - 32px); box-sizing: border-box; }
.plan-band.warn { background: var(--warn-soft); color: var(--warn); }
.plan-band.bad { background: var(--bad-soft); color: var(--bad); }
.plan-band a { font-weight: 800; color: inherit; white-space: nowrap; }

/* ---------- guided tour ---------- */
.tour { position: fixed; inset: 0; z-index: 100; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(6, 24, 25, .62); transition: all .25s ease; pointer-events: none; }
.tour.center .tour-hole { box-shadow: 0 0 0 9999px rgba(6, 24, 25, .62); }
.tour-card { position: fixed; width: min(340px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: 18px; padding: 14px 16px 16px;
  box-shadow: 0 18px 50px -12px rgba(0,0,0,.45); }
.tour-card h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; margin: 4px 0 6px; }
.tour-card p { margin: 0 0 12px; color: var(--muted); }
.tour-top { display: flex; justify-content: space-between; align-items: center; }
.tour-skip { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 0 6px 10px; }
.tour-skip:hover { color: var(--ink); }
.tour-dots { display: flex; gap: 5px; margin-bottom: 12px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s; }
.tour-dots i.on { width: 18px; background: var(--accent); }
.tour-btns { display: flex; justify-content: space-between; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-dots i { transition: none; } }
