/* =====================================================================
   DG Book Pro — base, shell and components. Built only from tokens.css.
   Sections: base · icons · shell · page header · buttons · cards · pills ·
   forms · tables · lists · feedback · overview · detail · agenda ·
   timeline calendar · maintenance · auth · responsive.
   ===================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-base)/1.5 var(--font-body); -webkit-font-smoothing: antialiased; letter-spacing: -0.006em; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-2xl); line-height: 1.2; }
h2 { font-size: var(--fs-lg); line-height: 1.3; }
h3 { font-size: var(--ui-fs-sub); line-height: 1.35; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: color-mix(in oklab, var(--svc) 22%, transparent); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Icons ---------- */
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { background: var(--nav-bg); color: var(--nav-ink); border-right: 1px solid var(--nav-line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding: 18px 12px 12px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; padding: 2px 10px; text-decoration: none; min-height: 32px; }
.brand-mark { display: flex; align-items: baseline; gap: 6px; font-family: "Montserrat", var(--font-body); letter-spacing: -.01em; }
.brand-mark b { font-weight: 800; font-size: 22px; color: var(--brand-mark); }
.brand-mark span { font-weight: 500; font-size: 15px; color: var(--ink-3); letter-spacing: .02em; }
.brand img { max-height: 36px; width: auto; }
.ws { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--r-input); background: var(--bg); border: 1px solid var(--nav-line); color: var(--ink); text-decoration: none; }
.ws b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws small { display: block; color: var(--ink-3); font-size: var(--fs-xs); }
.nav { display: grid; gap: 14px; }
.nav-sec { display: grid; gap: 2px; }
.nav-sec > .lbl { font-size: var(--fs-xs); color: var(--nav-ink-2); padding: 0 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--nav-ink); font-size: var(--ui-fs-nav); min-height: 36px; }
.nav a:hover { background: var(--nav-hover); color: var(--ink); }
.nav a[aria-current="page"] { background: color-mix(in oklab, var(--plat-ink) 9%, var(--surface)); color: var(--ink); font-weight: 600; }
.nav a > .i { color: var(--nav-ink-2); }
.nav a .count { margin-left: auto; font-size: var(--fs-xs); padding: 0 7px; border-radius: var(--r-pill); background: var(--bg); border: 1px solid var(--nav-line); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.vgroup { border-radius: 10px; padding: 6px; background: color-mix(in oklab, var(--v) 5%, var(--surface)); border: 1px solid color-mix(in oklab, var(--v) 20%, var(--surface)); display: grid; gap: 2px; }
.vgroup .vhead { display: flex; align-items: center; gap: 9px; padding: 4px 6px 6px; font-weight: 600; color: var(--ink); }
.vgroup .vhead .tile { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in oklab, var(--v) 85%, black); color: #fff; }
.vgroup .vhead .tile svg { width: 15px; height: 15px; }
.vgroup a { position: relative; padding-left: 16px; }
.vgroup a::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: color-mix(in oklab, var(--v) 35%, transparent); }
.vgroup a[aria-current="page"] { background: color-mix(in oklab, var(--v) 16%, var(--surface)); color: var(--v-ink); }
.vgroup a[aria-current="page"]::before { background: var(--v); }
.vgroup a .count { background: color-mix(in oklab, var(--v) 16%, var(--surface)); border-color: transparent; color: var(--v-ink); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--nav-line); }
.side-foot span { min-width: 0; }
.side-foot b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot small { display: block; color: var(--ink-3); font-size: var(--fs-xs); }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: var(--z-top); display: flex; align-items: center; gap: 10px; padding: 10px 24px; background: color-mix(in oklab, var(--bg) 85%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .burger { display: none; }
.search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-input); background: var(--surface); min-height: 38px; color: var(--ink-3); margin: 0; }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--ink); min-height: 36px; }
.search:focus-within { box-shadow: var(--focus); }
.kbd { font-size: 11px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 0 5px; color: var(--ink-3); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.iconbtn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--r-input); border: 1px solid transparent; background: none; cursor: pointer; color: var(--ink-2); position: relative; text-decoration: none; }
.iconbtn:hover { background: var(--surface); border-color: var(--line); }
.iconbtn .badge { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; border: 2px solid var(--bg); box-sizing: content-box; }
.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-input); overflow: hidden; }
.lang a { background: var(--surface); padding: 0 9px; min-height: 34px; display: inline-grid; place-items: center; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--ink); color: var(--surface); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; background: var(--a, var(--navy)); flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.none { background: none; border: 1.5px dashed var(--st-unassigned); color: var(--st-unassigned); }
.dropdown { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-pop); padding: 6px; display: grid; gap: 2px; z-index: var(--z-menu); }
.menu a, .menu button { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; width: 100%; color: var(--ink); }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu small { display: block; color: var(--ink-3); font-size: var(--fs-xs); }
.menu .tile { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--v-wash); color: var(--v-ink); flex: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu .danger { color: var(--danger); }

.content { padding: 24px 24px 56px; display: grid; gap: 20px; max-width: var(--content-max); width: 100%; align-content: start; }
.content[data-v="rent"], .content[data-v="svc"] { border-top: 3px solid var(--v); }

/* ---------- Page header ---------- */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.ph-text { display: grid; gap: 6px; min-width: 0; flex: 1 1 320px; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vtag { display: inline-flex; align-items: center; gap: 6px; width: max-content; font-size: 12.5px; font-weight: 600; padding: 3px 10px 3px 7px; border-radius: var(--r-pill); color: var(--v-ink); background: var(--v-wash); }
.vtag svg { width: 14px; height: 14px; }
.sub { color: var(--ink-2); }
.sub.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumb { font-size: var(--fs-sm); color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumb a { text-decoration: none; color: var(--ink-2); }
.crumb a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: var(--r-input); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.2; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--v-ink); border-color: var(--v-ink); color: var(--btn-text); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: var(--fs-sm); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface); border-color: var(--line); }
.btn.danger { color: var(--danger); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.btn[disabled], .btn.is-busy { opacity: .5; cursor: not-allowed; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-3); border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
form.inline { display: inline; margin: 0; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h2 { font-size: calc(var(--ui-fs-section) - 1.5px); }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-b { padding: 16px 18px; }
.card-b.grid { display: grid; gap: 14px; }
.card-f { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-card) var(--r-card); }
.vcard { border-top: 3px solid var(--v); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* ---------- Pills and chips ---------- */
.pill { --c: var(--st-noshow); display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: var(--r-pill); white-space: nowrap; background: color-mix(in oklab, var(--c) var(--wash-pct), var(--surface)); color: color-mix(in oklab, var(--c), var(--pill-mix) var(--pill-mix-pct)); }
.pill svg { width: 13px; height: 13px; stroke-width: 2.2; }
.pill.pending { --c: var(--st-pending); } .pill.confirmed { --c: var(--st-confirmed); } .pill.progress { --c: var(--st-progress); }
.pill.completed { --c: var(--st-completed); } .pill.cancelled { --c: var(--st-cancelled); } .pill.noshow { --c: var(--st-noshow); }
.pill.unassigned { --c: var(--st-unassigned); background: none; border: 1.5px dashed color-mix(in oklab, var(--c) 60%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; min-height: 32px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); font-size: var(--fs-sm); cursor: pointer; color: var(--ink-2); text-decoration: none; }
.chip[aria-current="true"], .chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--surface-2); font-weight: 600; }
.chip .n { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--a); }
.cc { display: inline-block; font-size: 11px; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; color: var(--ink-3); margin-left: 6px; vertical-align: 1px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > .lbl, legend.lbl { font-size: var(--ui-fs-label); font-weight: 600; color: var(--ink-2); }
.req::after { content: " *"; color: var(--danger); }
.input, .select, textarea.input { border: 1px solid var(--line-strong); border-radius: var(--r-input); background: var(--surface); min-height: 38px; padding: 7px 11px; width: 100%; color: var(--ink); }
.input:focus, .select:focus { outline: none; box-shadow: var(--focus); border-color: var(--svc-ink); }
textarea.input { min-height: 92px; resize: vertical; line-height: 1.5; }
.select { appearance: auto; }
.hint { font-size: var(--ui-fs-hint); color: var(--ink-3); }
.field-error { font-size: var(--ui-fs-hint); color: var(--danger); font-weight: 500; }
.has-error .input, .has-error .select { border-color: var(--danger); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-base); cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--v-ink); }
.radios { display: flex; gap: 8px; flex-wrap: wrap; }
.radios label { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r-input); cursor: pointer; }
.radios label:has(input:checked) { border-color: var(--v-ink); background: var(--v-wash); font-weight: 600; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Tables and lists ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.toolbar .search { max-width: 280px; min-height: 36px; flex: 1 1 200px; }
.toolbar .select { width: auto; min-height: 36px; }
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: var(--ui-fs-table); }
.t th { text-align: left; font-weight: 600; font-size: max(12px, calc(var(--ui-fs-table) - 1.5px)); color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tbody tr[data-href] { cursor: pointer; }
.t tbody tr:hover td { background: var(--surface-2); }
.t a.rowlink { text-decoration: none; font-weight: 600; }
.t a.rowlink:hover { text-decoration: underline; }
.t .r { text-align: right; }
.t .src { font-size: max(12px, calc(var(--ui-fs-table) - 1.5px)); color: var(--ink-3); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-3); }
.pager .btn-row { align-items: center; }
.li { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); text-decoration: none; }
.li:last-child { border-bottom: 0; }
a.li:hover { background: var(--surface-2); }
.li .time { font-weight: 600; font-variant-numeric: tabular-nums; font-size: calc(var(--fs-base) - .5px); }
.li .time small { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--fs-xs); }
.li .what { min-width: 0; }
.li .what b { font-weight: 600; }
.li .what small { display: block; color: var(--ink-3); font-size: var(--ui-fs-hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .end { display: flex; align-items: center; gap: 8px; }
.listh { display: flex; align-items: center; gap: 8px; padding: 12px 18px 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.linked { display: grid; }
.linked a, .linked > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); text-decoration: none; }
.linked > :last-child { border-bottom: 0; }
.linked a:hover { background: var(--surface-2); }
.linked .tile { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--v-wash); color: var(--v-ink); }
.linked small { display: block; color: var(--ink-3); font-size: var(--ui-fs-hint); }

/* ---------- Feedback ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: var(--fs-base); }
.flash.success { --c: var(--success); }
.flash.error { --c: var(--danger); }
.flash.warning { --c: var(--warning); }
.flash.info { --c: var(--info); }
.flash { background: color-mix(in oklab, var(--c, var(--info)) 8%, var(--surface)); border-color: color-mix(in oklab, var(--c, var(--info)) 30%, var(--line)); color: color-mix(in oklab, var(--c, var(--info)), var(--pill-mix) var(--pill-mix-pct)); }
.flash p { color: var(--ink); }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 18px; color: var(--ink-2); }
.empty .tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--v-wash); color: var(--v-ink); }
.empty p { max-width: 46ch; }
.note { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.note b.lbl { font-size: 12.5px; color: var(--ink-3); display: block; }
/* Toast notifications (App\Core\Toasts, DGB.toast): top right on wide screens, top full width on phones.
   Tinted surface + coloured edge + icon + hidden type word: readable text (ink on a light tint), never colour alone. */
.toast-wrap { position: fixed; top: 72px; right: 16px; z-index: var(--z-toast); display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { --t: var(--info); pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; padding: 12px 8px 12px 14px; border-radius: 10px; border: 1px solid color-mix(in oklab, var(--t) 35%, var(--line)); border-left: 4px solid var(--t); background: color-mix(in oklab, var(--t) 9%, var(--surface)); color: var(--ink); box-shadow: var(--shadow-pop); font-size: var(--fs-base); line-height: 1.45; }
.toast > .i { color: var(--t); margin-top: 2px; width: 18px; height: 18px; }
.toast p { margin: 0; overflow-wrap: anywhere; }
.toast.success { --t: var(--success); } .toast.info { --t: var(--info); } .toast.warning { --t: var(--warning); } .toast.error { --t: var(--danger); }
.toast-x { border: 0; background: none; color: var(--ink-2); width: 28px; height: 28px; margin: -4px 0; border-radius: 6px; display: inline-grid; place-items: center; cursor: pointer; }
.toast-x:hover { background: color-mix(in oklab, var(--t) 15%, transparent); color: var(--ink); }
.toast-x:focus-visible { outline: none; box-shadow: var(--focus); }
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-in .2s ease-out; }
  .toast.is-leaving { opacity: 0; transform: translateY(-6px); transition: opacity .18s ease-in, transform .18s ease-in; }
  @keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 560px) { .toast-wrap { top: 10px; right: 10px; left: 10px; width: auto; } }
dialog.modal { border: 0; padding: 0; border-radius: var(--r-sheet); box-shadow: var(--shadow-pop); width: min(480px, calc(100% - 32px)); background: var(--surface); color: var(--ink); }
dialog.modal::backdrop { background: var(--scrim); }
.modal-b { padding: 22px; display: grid; gap: 12px; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.timeline { display: grid; gap: 14px; position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line-strong); }
.timeline > div { position: relative; }
.timeline > div::before { content: ""; position: absolute; left: -18px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink-3); }
.timeline small { display: block; color: var(--ink-3); font-size: var(--fs-xs); }

/* ---------- Overview (Today) ---------- */
.attn-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.attn-row:last-child { border-bottom: 0; }
.attn-row .tile { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--v-wash); color: var(--v-ink); flex: none; }
.attn-row p { flex: 1 1 220px; min-width: 0; }
.attn-row p small { display: block; color: var(--ink-3); font-size: var(--ui-fs-hint); }
.counts { display: flex; border-bottom: 1px solid var(--line); }
.counts > div { flex: 1; padding: 12px 18px; border-right: 1px solid var(--line); }
.counts > div:last-child { border-right: 0; }
.counts b { display: block; font: 700 24px/1.1 var(--font-head); font-variant-numeric: tabular-nums; }
.counts span { font-size: var(--ui-fs-hint); color: var(--ink-3); }
.counts .warn b { color: var(--st-unassigned); }
.turn-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.turn-row:last-child { border-bottom: 0; }
.turn-row .prop b { display: block; font-weight: 600; }
.turn-row .prop small { color: var(--ink-3); font-size: var(--ui-fs-hint); }
.track { position: relative; height: 44px; border-radius: 8px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), var(--line) calc(100% / 12 - 1px) calc(100% / 12)); background-color: var(--surface-2); }
.seg-out, .seg-in, .seg-job { position: absolute; top: 6px; bottom: 6px; border-radius: 6px; font-size: 11.5px; line-height: 1.2; padding: 3px 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; text-decoration: none; }
.seg-job { z-index: 1; }
.seg-out:hover, .seg-in:hover, .seg-job:hover { filter: brightness(.97); }
.seg-out, .seg-in { background: color-mix(in oklab, var(--rent) var(--wash-pct), var(--surface)); color: var(--rent-ink); border: 1px solid color-mix(in oklab, var(--rent) 55%, transparent); }
.seg-job { background: color-mix(in oklab, var(--svc) 22%, var(--surface)); color: var(--svc-ink); border: 1.5px solid var(--svc); font-weight: 600; text-decoration: none; }
.seg-job.none { background: repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in oklab, var(--st-unassigned) 14%, transparent) 6px 12px); border: 1.5px dashed var(--st-unassigned); color: color-mix(in oklab, var(--st-unassigned), var(--pill-mix) var(--pill-mix-pct)); }
.track-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); padding: 0 2px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-3); align-items: center; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats3 > div { padding: 14px 18px; border-right: 1px solid var(--line); }
.stats3 > div:last-child { border-right: 0; }
.stats3 b { font: 700 20px/1.2 var(--font-head); display: block; font-variant-numeric: tabular-nums; }
.stats3 span { font-size: var(--ui-fs-hint); color: var(--ink-3); }
.bar2 { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 8px; background: var(--line); }
.bar2 i { display: block; }

/* ---------- Detail pages ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; min-width: 0; }
.dates { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.dates .d { padding: 12px 14px; border-radius: 10px; background: var(--v-wash); }
.dates .d small { display: block; font-size: var(--fs-xs); color: var(--v-ink); font-weight: 600; }
.dates .d b { display: block; font: 700 18px/1.25 var(--font-head); }
.dates .d span { font-size: var(--fs-sm); color: var(--ink-2); }
.dates .nights { text-align: center; font-size: var(--fs-sm); color: var(--ink-3); }
.dates .nights b { display: block; font: 700 20px/1 var(--font-head); color: var(--ink); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: calc(var(--fs-base) - .5px); color: var(--ink-2); }
.facts span { display: inline-flex; gap: 6px; align-items: center; }
.price { width: 100%; border-collapse: collapse; }
.price td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.price td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.price small { color: var(--ink-3); font-size: var(--ui-fs-hint); display: block; }
.price tr.total td { border-bottom: 0; padding-top: 12px; font-weight: 700; font-size: calc(var(--fs-base) + 2px); }
.price tr.sub td { border-bottom: 0; color: var(--ink-2); padding: 3px 0; font-size: calc(var(--fs-base) - .5px); }
.person { display: flex; gap: 12px; align-items: center; }
.person b { display: block; }
.person small { color: var(--ink-3); font-size: var(--ui-fs-hint); }

/* ---------- Jobs agenda ---------- */
.day-h { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.day-h h2 { font-size: calc(var(--ui-fs-section) - 2px); }
.job { display: grid; grid-template-columns: 96px minmax(0, 1fr) 170px 130px; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); text-decoration: none; }
.job:hover { background: var(--surface-2); }
.job .time { font-weight: 600; font-variant-numeric: tabular-nums; }
.job .time small { display: block; color: var(--ink-3); font-weight: 400; font-size: var(--fs-xs); }
.job .what { min-width: 0; }
.job .what b { font-weight: 600; }
.job .what small { display: block; color: var(--ink-3); font-size: var(--ui-fs-hint); }
.job .who { display: flex; align-items: center; gap: 8px; font-size: calc(var(--fs-base) - .5px); min-width: 0; }
.job.unassigned { background: color-mix(in oklab, var(--st-unassigned) 6%, var(--surface)); }
.linkrent { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--rent-ink); margin-left: 6px; }
.linkrent svg { width: 13px; height: 13px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.photos figure { margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); position: relative; background: var(--surface-2); }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-add { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--line-strong); display: grid; place-items: center; text-align: center; color: var(--ink-3); font-size: 12.5px; cursor: pointer; background: var(--surface-2); padding: 8px; }
.attr { display: grid; gap: 12px; padding: 14px; border-radius: 10px; border: 1px solid color-mix(in oklab, var(--rent) 45%, var(--line)); background: color-mix(in oklab, var(--rent) 6%, var(--surface)); }

/* ---------- Timeline calendar (stays = bars, jobs = blocks) ---------- */
.cal-wrap { overflow-x: auto; }
.cal { min-width: 1100px; }
.cal-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.cal-row:last-child { border-bottom: 0; }
.cal-lbl { padding: 10px 14px; border-right: 1px solid var(--line); display: flex; align-items: center; gap: 9px; font-size: 13.5px; min-width: 0; }
.cal-lbl span { min-width: 0; }
.cal-lbl b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-lbl small { color: var(--ink-3); font-size: var(--fs-xs); display: block; }
.cal-track { position: relative; min-height: 52px; background-image: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--days, 14) - 1px), var(--line) calc(100% / var(--days, 14) - 1px) calc(100% / var(--days, 14))); }
.cal-head .cal-track { display: grid; grid-template-columns: repeat(var(--days, 14), 1fr); background: none; min-height: 0; }
.cal-head .cal-track div { padding: 8px 4px; font-size: var(--fs-xs); text-align: center; color: var(--ink-3); border-left: 1px solid var(--line); }
.cal-head .cal-track div b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cal-head .cal-track div.today { color: var(--ink); font-weight: 600; background: color-mix(in oklab, var(--svc) 7%, var(--surface)); box-shadow: inset 0 -2px 0 var(--ink); }
.cal-head .cal-track div.today b { display: grid; place-items: center; width: 26px; height: 26px; margin: 1px auto 0; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 14px; }
.cal-head .cal-track div.we { background: var(--surface-2); }
.cal-today { position: absolute; top: 0; bottom: 0; background: color-mix(in oklab, var(--ink) 5%, transparent); pointer-events: none; }
.cal-sec { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13.5px; }
.stay { position: absolute; top: 10px; bottom: 10px; border-radius: 16px; background: color-mix(in oklab, var(--rent) 28%, var(--surface)); border: 1.5px solid var(--rent); color: var(--rent-ink); font-size: var(--fs-xs); font-weight: 600; padding: 0 10px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-decoration: none; }
.stay small { font-weight: 400; opacity: .85; }
.stay.pending { background: repeating-linear-gradient(45deg, color-mix(in oklab, var(--rent) 10%, var(--surface)) 0 6px, color-mix(in oklab, var(--rent) 22%, var(--surface)) 6px 12px); border-style: dashed; }
.stay.owner { background: repeating-linear-gradient(45deg, var(--surface-2) 0 6px, var(--line) 6px 12px); border: 1.5px solid var(--line-strong); color: var(--ink-2); }
.stay.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-width: 0; }
.stay.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-width: 0; }
.jobs-day { position: absolute; top: 6px; bottom: 6px; display: grid; gap: 3px; align-content: start; padding: 0 3px; }
.jb { display: block; border-radius: 4px; background: color-mix(in oklab, var(--svc) 16%, var(--surface)); border-left: 3px solid var(--a, var(--svc)); color: var(--ink); font-size: 11px; line-height: 1.25; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.jb b { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--svc-ink); }
.jb.none { background: none; border: 1.5px dashed var(--st-unassigned); border-left-width: 3px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--r-input); overflow: hidden; background: var(--surface); }
.seg a, .seg button { border: 0; background: none; padding: 0 12px; min-height: 34px; display: inline-grid; place-items: center; font-size: var(--fs-sm); cursor: pointer; color: var(--ink-2); border-right: 1px solid var(--line); text-decoration: none; }
.seg > :last-child { border-right: 0; }
.seg [aria-current="true"], .seg [aria-pressed="true"] { background: var(--ink); color: var(--surface); }

/* ---------- Maintenance hub ---------- */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mcard { display: grid; gap: 12px; padding: 18px; align-content: start; text-decoration: none; }
.mcard .mtop { display: flex; gap: 12px; align-items: center; }
.mcard .tile { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); flex: none; }
.mcard h2 { font-size: calc(var(--ui-fs-section) - 2px); }
.mcard p { font-size: calc(var(--fs-base) - .5px); color: var(--ink-2); }
.mcard .mfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.mcard.pick:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.mcard.danger { border-color: color-mix(in oklab, var(--danger) 35%, var(--line)); }
.mcard.danger .tile { color: var(--danger); background: color-mix(in oklab, var(--danger) 8%, var(--surface)); border-color: color-mix(in oklab, var(--danger) 25%, var(--line)); }
.install { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.install > div { padding: 14px 18px; border-right: 1px solid var(--line); }
.install > div:last-child { border-right: 0; }
.install span { display: block; font-size: var(--ui-fs-hint); color: var(--ink-3); }
.install b { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---------- Auth / installer panels ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; }
.auth-panel { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: var(--shadow-pop); padding: 28px; display: grid; gap: 18px; }
.auth-panel.wide { max-width: 560px; }
.auth-panel .brand { padding: 0; }
.auth-logo { max-height: 44px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
/* Customer pages on the auth layout (portal sign-in, pay page; <html data-tone> from App\Core\Theme): the logo
   height from Settings → Styling (--site-logo-h), at most 64px on phones. */
:root[data-tone] .auth-logo { height: var(--site-logo-h, 44px); max-height: none; }
@media (max-width: 640px) { :root[data-tone] .auth-logo { height: min(var(--site-logo-h, 44px), 64px); } }
.auth-foot { text-align: center; font-size: var(--fs-sm); color: var(--ink-3); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; font-size: var(--fs-xs); }
.steps span { padding: 3px 10px; border-radius: var(--r-pill); background: var(--bg); color: var(--ink-3); }
.steps span.active { background: var(--ink); color: var(--surface); font-weight: 600; }
.steps span.done { color: var(--success); }
.reqs { list-style: none; padding: 0; margin: 0; }
.reqs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.card > .reqs li { padding: 10px 18px; }
.reqs li:last-child { border-bottom: 0; }
.reqs li > span:last-child { flex: none; display: inline-grid; place-items: center; }
.reqs .y { color: var(--success); font-weight: 600; }
.reqs .n { color: var(--danger); font-weight: 600; }

/* ---------- Small shared pieces ---------- */
.thumb { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--v-wash); display: inline-grid; place-items: center; color: var(--v-ink); flex: none; }
.logpre { max-height: 520px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; padding: 14px 16px; background: var(--surface-2); border-radius: 0 0 var(--r-card) var(--r-card); font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-2); }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .field { flex: 1 1 140px; }

/* ---------- Date picker (flatpickr) on tokens ---------- */
.flatpickr-calendar { font-family: var(--font-body); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); border-radius: var(--r-card); }
.flatpickr-calendar.arrowTop::before, .flatpickr-calendar.arrowTop::after { border-bottom-color: var(--surface); }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months, .flatpickr-weekday, span.flatpickr-weekday { color: var(--ink); fill: var(--ink); background: transparent; }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { color: var(--ink-2); fill: var(--ink-2); }
.flatpickr-day { color: var(--ink); border-radius: 8px; font-variant-numeric: tabular-nums; }
.flatpickr-day:hover, .flatpickr-day:focus { background: var(--bg-alt); border-color: var(--bg-alt); }
.flatpickr-day.today { border-color: var(--line-strong); }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.startRange, .flatpickr-day.endRange { background: var(--fp-accent, var(--plat-ink)); border-color: var(--fp-accent, var(--plat-ink)); color: #fff; }
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover, .flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: var(--ink-3); opacity: .45; }
.flatpickr-day.flatpickr-disabled { text-decoration: line-through; }
.flatpickr-input[readonly] { cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .detail { grid-template-columns: 1fr; }
  .job { grid-template-columns: 84px minmax(0, 1fr) 150px; }
  .job .st { grid-column: 2 / -1; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: var(--z-drawer); transform: translateX(-102%); transition: transform .22s ease-out; }
  .app.nav-open .side { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: calc(var(--z-drawer) - 1); }
  .top .burger { display: inline-grid; }
  .top { padding: 10px 16px; }
  .content { padding: 18px 16px 48px; }
  .grid-2 { grid-template-columns: 1fr; }
  .turn-row { grid-template-columns: 1fr; gap: 8px; }
  .stats3 { grid-template-columns: 1fr; }
  .stats3 > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: calc(var(--ui-fs-title) - 4px); }
  .search .kbd, .top .hide-s { display: none; }
  .top { gap: 6px; padding: 8px 12px; }
  .top .search { min-width: 0; flex: 1 1 0; }
  .top-right { gap: 4px; }
  .row-2 { grid-template-columns: 1fr; }
  .t.stack-s thead { display: none; }
  .t.stack-s, .t.stack-s tbody, .t.stack-s tr, .t.stack-s td { display: block; width: 100%; }
  .t.stack-s tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .t.stack-s td { border: 0; padding: 0; }
  .t.stack-s td.c-check { grid-row: span 3; padding-top: 2px; }
  .t.stack-s td.c-main { grid-column: 2; }
  .t.stack-s td.c-status { grid-column: 3; grid-row: 1; }
  .t.stack-s td.c-sub { grid-column: 2 / -1; color: var(--ink-2); font-size: var(--fs-sm); }
  .t.stack-s td.c-amount { grid-column: 3; grid-row: 2; text-align: right; font-weight: 600; }
  .t.stack-s td.c-hide { display: none; }
  .job { grid-template-columns: 64px minmax(0, 1fr); }
  .job .who, .job .st { grid-column: 2; }
  .li { grid-template-columns: 52px minmax(0, 1fr); }
  .li .end { grid-column: 2; }
  .counts b { font-size: 20px; }
  .counts > div { padding: 10px 12px; }
  .dates { grid-template-columns: 1fr; }
  .dates .nights { text-align: left; }
  .auth-panel { padding: 22px; }
}

/* Sortable table headers (Services jobs list and other sortable tables). */
.t th a.sortlink { color: inherit; text-decoration: none; }
.t th a.sortlink:hover { text-decoration: underline; }

/* Form rows: a field with a hint or error must not stretch its neighbour's input. */
.row-2 > .field, .row-3 > .field { align-content: start; }
.price small.inline { display: inline; font-weight: 400; }

/* Setup checklist on Today: stands out until the business is set up. */
.setup-card { border: 1px solid color-mix(in oklab, var(--svc) 35%, var(--line)); background: linear-gradient(180deg, color-mix(in oklab, var(--svc) 6%, var(--surface)), var(--surface) 70%); }
.setup-top { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 20px 22px 8px; }
.setup-top .tile { width: 44px; height: 44px; }
.setup-intro h2 { font-size: var(--fs-xl); margin: 0; }
.setup-intro p { margin: 2px 0 10px; }
.setup-bar { height: 8px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; max-width: 420px; margin-bottom: 4px; }
.setup-bar i { display: block; height: 100%; border-radius: inherit; background: var(--svc); }
.setup-steps { list-style: none; margin: 0; padding: 8px 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.setup-steps a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; min-height: 44px; }
.setup-steps a:hover { border-color: var(--line-strong); }
.setup-steps .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: var(--surface); }
.setup-steps .done .mark { background: var(--success); border-color: var(--success); }
.setup-steps .done b { color: var(--ink-3); text-decoration: line-through; }
.setup-steps .next a { border-color: var(--svc); box-shadow: 0 0 0 3px color-mix(in oklab, var(--svc) 15%, transparent); }
.setup-steps small { display: block; color: var(--ink-3); }
@media (max-width: 640px) { .setup-top { grid-template-columns: 1fr; } .setup-top .tile { display: none; } }

/* Live search results under the top-bar search box. */
.search { position: relative; }
.live-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: min(520px, 92vw); max-height: min(70vh, 560px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-card); box-shadow: var(--shadow-pop); z-index: 60; padding: 6px; color: var(--ink); }
.lr-head { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); padding: 8px 10px 4px; }
.lr-item, .lr-all { display: grid; gap: 1px; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; min-height: 40px; }
.lr-item b { font-weight: 600; font-size: var(--fs-base); }
.lr-item small { color: var(--ink-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.lr-item:hover, .lr-item.on, .lr-all:hover, .lr-all.on { background: var(--bg-alt); }
.lr-all { border-top: 1px solid var(--line); margin-top: 6px; border-radius: 0 0 8px 8px; color: var(--svc-ink); font-weight: 600; }
.lr-none { padding: 12px 10px; color: var(--ink-3); margin: 0; }

/* ---------- Settings → Translations ---------- */
.lang-on { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lang-on-item { border: 1px solid var(--line); border-radius: var(--r-input); padding: 10px 12px; align-items: flex-start; background: var(--surface); }
.lang-on-item:has(input:checked) { border-color: var(--line-strong); background: var(--bg); }
.lang-on-item small { display: block; }
.texts-t .texts-group th { background: var(--bg); font-size: var(--fs-sm); text-align: left; padding-top: 10px; padding-bottom: 6px; }
.texts-t .texts-ref { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.card-h .seg.right { margin-left: auto; }

/* ---------- Settings → Styling: sections, font and preset pickers, live preview of the customer look ----------
   The preview (.sty-prev) gets the same custom properties as the customer layouts (App\Core\Theme::cssVars),
   inline from the server and updated by assets/js/styling.js, so it mirrors public.css. */
.sty-default { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.sty-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 36%, 480px); gap: 32px; align-items: start; }
.sty-fields { display: grid; gap: 28px; min-width: 0; }
.sty-sec { display: grid; gap: 16px; min-width: 0; }
.sty-sec + .sty-sec { padding-top: 24px; border-top: 1px solid var(--line); }
.sty-sec > h2, .sty-aside > h2 { font-size: var(--fs-lg); }
.sty-sec > .hint, .sty-aside > .hint { margin-top: -10px; }
.sty-logo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sty-logo-img { max-height: 48px; width: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #FFFFFF; }
.sty-color { display: flex; gap: 10px; align-items: center; }
.sty-color input[type="color"] { width: 56px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-input); padding: 2px; background: var(--surface); cursor: pointer; }
.sty-color output { font-size: var(--fs-sm); color: var(--ink-2); }
.sty-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.sty-preset { display: grid; gap: 6px; justify-items: start; text-align: left; padding: 12px 14px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-card); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.sty-preset:hover { border-color: var(--ink-3); }
.sty-preset:focus-visible { outline: none; box-shadow: var(--focus); }
.sty-preset .hint { font-size: var(--fs-xs); }
.sty-pname { font-size: var(--fs-md); font-weight: 700; }
.sty-sw { display: inline-flex; }
.sty-sw i { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface); }
.sty-sw i + i { margin-left: -5px; }
.sty-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sty-fonts label { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-input); cursor: pointer; }
.sty-fonts label:has(input:checked) { border-color: var(--v-ink); background: var(--v-wash); }
.sty-fonts .hint { grid-column: 2; font-size: var(--fs-xs); }
.sty-aa { font-size: 18px; line-height: 1.2; color: var(--ink); }
.sty-aa.body { font-size: 16px; font-weight: 450; }
.sty-tone { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); background: #FFFFFF; }
.sty-tone[data-tone="warm"] { background: #FBFAF7; }
.sty-tone[data-tone="tint"] { background: var(--sty-tint, color-mix(in oklab, var(--rent) 12%, white)); }
.sty-aside { position: sticky; top: 16px; display: grid; gap: 14px; min-width: 0; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; }
/* Sizes: heading scale, paragraph size and the logo slider side by side when there is room. */
.sty-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; align-items: start; }
.sty-sizes .radios label { min-height: 44px; }
.sty-range { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.sty-range input[type="range"] { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--v-ink); cursor: pointer; }
.sty-range input[type="range"]:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-input); }
.sty-range output { flex: none; min-width: 5ch; text-align: right; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.sty-prev { --r-btn: 10px; --r-box: 14px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--site-bg); color: var(--site-ink); font-family: var(--font-body); box-shadow: var(--shadow-card); }
.sty-prev[data-shape="square"] { --r-btn: 3px; --r-box: 3px; }
.sty-prev[data-shape="pill"] { --r-btn: 999px; }
/* Text, heading and logo sizes (Theme::typeScale, --site-logo-h). The preview is a scaled-down page (52px top bar
   for the website's 76px), so sizes are drawn smaller: logo 28/44, name 16/21, text ~0.83, title ~0.52. */
.sty-prev .sty-top { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; background: var(--site-head-bg); color: var(--site-head-on); border-bottom: 1px solid var(--site-head-line); }
.sty-prev .sty-logo { font: var(--head-weight) max(12px, calc(var(--site-logo-h, 44px) * 16 / 44))/1.1 var(--font-head); letter-spacing: var(--head-track); }
.sty-prev .sty-logo img { height: calc(var(--site-logo-h, 44px) * 28 / 44); max-width: calc(var(--site-logo-h, 44px) * 140 / 44); width: auto; object-fit: contain; object-position: left center; display: block; }
.sty-prev .sty-nav { margin-left: auto; display: flex; gap: 12px; font-size: 13px; opacity: .92; }
.sty-prev .sty-nav .on { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.sty-prev .sty-body { display: grid; gap: 12px; padding: 18px 16px 20px; }
.sty-prev h3 { font-size: calc(var(--site-h1, 38px) * .52); line-height: 1.15; color: var(--site-ink); }
.sty-prev p { font-size: calc(var(--site-text, 16px) * .83); line-height: 1.6; color: var(--site-ink-2); margin: 0; }
.sty-prev .sty-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sty-prev .sty-btn { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: var(--r-btn); background: var(--brand-ink); color: var(--brand-on); font-weight: 600; font-size: 0.95em; }
.sty-prev .sty-btn.alt { background: transparent; color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent-ink); }
.sty-prev .sty-card { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--site-line); border-radius: var(--r-box); background: #FFFFFF; }
.sty-prev .sty-img { aspect-ratio: 1; border-radius: calc(var(--r-box) - 4px); background: var(--brand-wash); color: var(--brand-ink); display: grid; place-items: center; }
.sty-prev[data-shape="square"] .sty-img { border-radius: 2px; }
.sty-prev .sty-card-b { display: grid; gap: 4px; justify-items: start; font-size: 0.9em; color: var(--site-ink-2); }
.sty-prev .sty-card-b b { font-family: var(--font-head); font-weight: var(--head-weight); color: var(--site-ink); font-size: calc(var(--site-h3, 18px) * .75); }
.sty-prev .sty-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); font-weight: 600; font-size: 0.92em; font-variant-numeric: tabular-nums; }
.sty-prev[data-shape="square"] .sty-chip { border-radius: 3px; }
.sty-prev .sty-chip .i { width: 14px; height: 14px; }
.sty-prev .sty-a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; font-size: 0.95em; }

@media (max-width: 1000px) {
  .sty-layout { grid-template-columns: minmax(0, 1fr); }
  .sty-aside { position: static; order: -1; max-height: none; overflow: visible; }
}

/* ---------- Long forms: the save bar stays in view while scrolling ---------- */
.card-f.sticky-save { position: sticky; bottom: 0; z-index: 5; background: var(--surface-2); box-shadow: 0 -6px 16px -12px rgba(10, 37, 64, .35); border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
@media (prefers-reduced-motion: no-preference) { .card-f.sticky-save { transition: box-shadow .15s ease; } }

/* ---------- Property availability calendar (Rentals → property page) ---------- */
.acal-nav { display: flex; align-items: center; gap: 4px; }
.acal-range { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); min-width: 13ch; text-align: center; }
.acal-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.acal { width: 100%; border-collapse: separate; border-spacing: 0 4px; table-layout: fixed; font-variant-numeric: tabular-nums; }
.acal caption { text-align: left; font-family: var(--font-head, inherit); font-weight: 700; font-size: var(--fs-md); color: var(--ink); padding: 0 2px 6px; }
.acal th { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); padding: 2px 0 6px; text-align: center; }
.acal td { padding: 0; height: 38px; text-align: center; }
.acal td > a, .acal td > span { display: grid; place-items: center; height: 34px; margin: 0 1px; border-radius: 8px; font-size: var(--fs-sm); color: var(--ink); text-decoration: none; }
.acal td.past > span, .acal td.past > a { color: var(--ink-3); opacity: .6; }
.acal td.today > span, .acal td.today > a { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 700; }
/* Stays: one continuous bar per stay, in the rentals colour; the link opens the reservation. */
.acal td.booked > a, .acal td.booked > span { background: color-mix(in oklab, var(--rent) 26%, var(--surface)); color: var(--rent-ink); font-weight: 600; margin: 0; border-radius: 0; }
.acal td.booked > a:hover { background: color-mix(in oklab, var(--rent) 40%, var(--surface)); }
/* Owner blocks: hatched, neutral. */
.acal td.blocked > span { background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, color-mix(in oklab, var(--ink-3) 18%, var(--surface)) 5px 7px); color: var(--ink-2); margin: 0; border-radius: 0; }
.acal td.run-start > a, .acal td.run-start > span { border-top-left-radius: 8px; border-bottom-left-radius: 8px; margin-left: 2px; }
.acal td.run-end > a, .acal td.run-end > span { border-top-right-radius: 8px; border-bottom-right-radius: 8px; margin-right: 2px; }
.acal td.past.booked > a, .acal td.past.blocked > span { opacity: .55; }
.acal-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.acal-legend li { display: inline-flex; align-items: center; gap: 8px; }
.acal-legend .sw { width: 18px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line); background: var(--surface); }
.acal-legend .sw.booked { background: color-mix(in oklab, var(--rent) 26%, var(--surface)); border-color: transparent; }
.acal-legend .sw.blocked { background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, color-mix(in oklab, var(--ink-3) 25%, var(--surface)) 3px 5px); }
.acal-legend .sw.today { box-shadow: inset 0 0 0 2px var(--ink); border-color: transparent; }
.acal-times { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; }
@media (max-width: 560px) { .acal-range { display: none; } .acal td { height: 42px; } .acal td > a, .acal td > span { height: 38px; } }

/* Language tabs (role=tablist). Without JS: every language one after the other, each with its heading. */
.ltabs { display: grid; gap: 0; }
.ltab-panel { display: grid; gap: 16px; }
.ltabs:not(.is-tabbed) .ltab-panel + .ltab-panel { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.ltab-h { font-size: var(--fs-md); }
.ltabs.is-tabbed .ltab-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltabs-list { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.ltab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--ink-2); font: 600 var(--fs-base) var(--font-body); cursor: pointer; white-space: nowrap; border-radius: var(--r-input) var(--r-input) 0 0; }
.ltab:hover { color: var(--ink); background: var(--surface-2); }
.ltab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--v-ink, var(--plat-ink)); }
.ltab:focus-visible { outline: none; box-shadow: var(--focus); }
.ltab-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: var(--r-pill); font-size: var(--fs-xs); color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); }
.ltab-badge .i { width: 12px; height: 12px; }
.ltab-badge.ok { color: var(--st-confirmed); border-color: color-mix(in oklab, var(--st-confirmed) 45%, transparent); background: color-mix(in oklab, var(--st-confirmed) 8%, var(--surface)); }
.ltab-badge.err { color: var(--danger); border-color: color-mix(in oklab, var(--danger) 55%, transparent); background: color-mix(in oklab, var(--danger) 8%, var(--surface)); }

/* ---------- Long admin forms split into titled cards (property form) ---------- */
.fgrid { display: grid; gap: 14px 16px; align-items: start; }
.fgrid > .field { align-content: start; min-width: 0; }
.fgrid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fgrid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fgrid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fgrid.cols-name { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.fgrid.cols-addr { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; }
.lform > .card > .card-h h2 { font-size: var(--fs-lg); }
.lform > .card-f.sticky-save { margin-top: -4px; }
@media (max-width: 1100px) { .fgrid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .fgrid.cols-3, .fgrid.cols-name, .fgrid.cols-addr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgrid.cols-name > :first-child, .fgrid.cols-addr > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .fgrid.cols-2, .fgrid.cols-3, .fgrid.cols-4, .fgrid.cols-name, .fgrid.cols-addr { grid-template-columns: 1fr; } }

/* ---------- Column picker (Website pages → Home page) ---------- */
.colpick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.colpick-opt { position: relative; display: grid; gap: 6px; justify-items: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--r-input); cursor: pointer; font-size: var(--fs-sm); color: var(--ink-2); background: var(--surface); }
.colpick-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.colpick-art { display: grid; grid-auto-flow: column; gap: 3px; width: 100%; height: 26px; }
.colpick-art i { display: block; border-radius: 3px; background: color-mix(in oklab, var(--ink-3) 25%, var(--surface)); }
.colpick-opt:has(input:checked) { border-color: var(--v-ink, var(--plat-ink)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--v-ink, var(--plat-ink)); }
.colpick-opt:has(input:checked) .colpick-art i { background: color-mix(in oklab, var(--v-ink, var(--plat-ink)) 45%, var(--surface)); }
.colpick-opt:has(input:focus-visible) { box-shadow: var(--focus); }

/* ==== Client portal revamp ==== customer sign-in pages on auth_layout (portal sign-in, forgot password,
   welcome / reset) and the password field shared with the portal. Wears the business's Styling: --brand-ink
   (set by Theme::head on customer pages) with the platform ink as fallback. */
.pf-auth { display: grid; gap: 18px; }
.pf-auth-head { display: grid; gap: 4px; text-align: center; }
.pf-auth-head h1 { font-size: 22px; }
.pf-auth-head p { margin: 0; font-size: 15px; color: var(--ink-2); }
.pf-auth .form { gap: 16px; }
.pf-auth .field > label { font-size: 15px; color: var(--ink); }
.pf-auth .input { min-height: 46px; font-size: 16px; border-color: color-mix(in oklab, var(--ink) 30%, var(--surface)); }
.pf-auth .input:focus { border-color: var(--brand-ink, var(--v-ink)); }
.pf-auth .btn.primary { background: var(--brand-ink, var(--v-ink)); border-color: var(--brand-ink, var(--v-ink)); color: var(--brand-on, var(--btn-text)); }
.pf-auth-submit { width: 100%; min-height: 48px; font-size: 16px; }
.pf-auth-link { margin: 2px 0 0; font-size: 15px; text-align: right; }
.pf-auth a { color: var(--brand-ink, var(--v-ink)); text-underline-offset: 3px; }
.pf-auth .auth-foot { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.pf-auth .auth-foot a, .pf-auth-link a { display: inline-block; padding: 4px 0; min-height: 24px; }
.pf-auth .flash p { margin: 0; }
/* Password field with a Show / Hide button inside it (44px target on touch screens). */
.pf-pass { position: relative; }
.pf-pass .input { padding-right: 84px; }
.pf-pass .pf-reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 36px; min-width: 66px; }
@media (pointer: coarse) { .pf-pass .pf-reveal, .pf-auth .btn { min-height: 44px; } .pf-pass .pf-reveal { right: 2px; } }
/* ==== [/Client portal revamp] ==== */

/* ==== Settings tabs and email groups ==== */
.set-tabs { align-self: start; }
.set-tabs a { display: inline-flex; gap: 6px; align-items: center; }
.set-panel { display: grid; gap: 16px; min-width: 0; }
.set-panel[hidden] { display: none; }
.set-panel > .card { width: 100%; max-width: 760px; }
.set-panel.set-styling > .card, .set-panel.set-integrations > .card { max-width: none; }
.set-panel.set-emails > .card { max-width: 1120px; }
/* Section headings inside a settings card: clearly above field labels, with air and a rule between sections. */
.set-h { font-family: var(--font-head, inherit); font-size: var(--ui-fs-section); font-weight: 650; color: var(--ink); line-height: 1.3; margin: 0 0 4px; padding: 0; }
legend.set-h { margin-bottom: 12px; }
.set-sec { display: grid; gap: 14px; min-width: 0; }
.set-sec + .set-sec { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 10px; }
.set-sec > .hint { margin-top: -8px; }
.set-choices { display: grid; gap: 10px; }
.set-smtp { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2, var(--bg)); }
.mail-groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.mail-group { border: 1px solid var(--line); border-radius: var(--r-card); padding: 0 16px 16px; margin: 0; min-width: 0; display: grid; gap: 12px; background: var(--surface); }
.mail-group-h { display: flex; gap: 8px; align-items: center; font-size: calc(var(--ui-fs-section) - 2px); font-weight: 650; color: var(--ink); padding: 14px 0 0; float: left; width: 100%; }
.mail-group-h + * { clear: both; }
.mail-group-h svg { color: var(--ink-2); flex: none; }
.mail-meta { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

.mail-count { margin-left: auto; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail-list { display: grid; gap: 10px; }
.mail-list .check { line-height: 1.4; }
.mail-all { justify-self: start; }
.set-look { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .set-look { grid-template-columns: minmax(260px, 1fr) minmax(0, 1.6fr); align-items: start; } }
.mail-preview { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: var(--r-card); background: #f3f4f7; }
.mail-test { max-width: 1120px; border-bottom: 1px solid var(--line); }
.mail-test .lbl { font-weight: 600; color: var(--ink-2); }
.mail-test .input { max-width: 300px; }
/* ==== [/Settings tabs and email groups] ==== */

/* ==== Integrations width, card header with explanation underneath ==== */
.mgrid.intg-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card-h.stack { flex-direction: column; align-items: flex-start; gap: 4px; }
.card-h.stack p { margin: 0; max-width: 80ch; }
.card-h.stack h2 { font-size: var(--fs-lg); }
h3.set-h { font-size: calc(var(--ui-fs-sub) + 1px); }
.card-b > .ltabs, .card-b .set-sec > .ltabs { max-width: 1100px; }
/* ==== [/Integrations width, card header] ==== */

/* ==== Settings: Invoices and Translations tabs ==== */
.set-intro { margin: 0; max-width: 80ch; }
.set-panel.set-translations > .card.tx-wording { max-width: none; }
/* ==== [/Settings: Invoices and Translations tabs] ==== */

/* ==== Quotes revamp ==== */
/* Settings tabs shared by several modules (SettingsTabs sections): one part per module. */
.set-part { display: grid; gap: 16px; min-width: 0; scroll-margin-top: 80px; }
.set-part > .card { width: 100%; max-width: 760px; }
.set-part + .set-part { margin-top: 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.set-part-h { font-family: var(--font-head, inherit); font-size: var(--fs-xl); font-weight: var(--head-weight); letter-spacing: var(--head-track); color: var(--ink); margin: 0; }
/* Quote settings form */
.q-up { text-transform: uppercase; }
.q-wnum { max-width: 10em; }
.q-nextref { margin: 0; }
/* Quote edit / show */
.q-flash { margin-bottom: 16px; }
.q-disc { display: flex; gap: 8px; align-items: stretch; }
.q-disc > .input { flex: 1 1 auto; min-width: 0; }
.q-seg { display: inline-flex; flex: none; margin: 0; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-input); overflow: hidden; background: var(--surface); min-inline-size: 0; }
.q-seg label { position: relative; display: inline-grid; place-items: center; min-width: 44px; padding: 0 12px; cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); border-right: 1px solid var(--line); }
.q-seg label:last-of-type { border-right: 0; }
.q-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.q-seg label:has(input:checked) { background: var(--ink); color: var(--surface); }
.q-seg label:has(input:focus-visible) { box-shadow: inset 0 0 0 3px color-mix(in oklab, var(--svc) 55%, transparent); }
.has-error .q-seg { border-color: var(--danger); }
.q-finish { display: flex; flex-wrap: wrap; gap: 8px; }
.q-totals { max-width: 340px; margin-left: auto; }
.q-notes { white-space: pre-line; margin: 4px 0 0; }
/* ==== [/Quotes revamp] ==== */

/* ==== Complete job ==== */
/* The "Complete job" form: in a dialog (app.js) or as a page (no JavaScript). */
dialog.modal.cj-dlg { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: hidden; }
dialog.modal.cj-dlg[open] { display: flex; flex-direction: column; }
.cj-dlg form.cj { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 32px); }
.cj-dlg .cj-b { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.modal-h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.cj-h { display: grid; gap: 4px; min-width: 0; }
.cj-h h2 { font-size: var(--fs-lg); margin: 0; }
.cj-h p { margin: 0; overflow-wrap: anywhere; }
.cj-x { margin-left: auto; min-width: 44px; min-height: 44px; padding: 0; justify-content: center; flex: none; }
.cj .modal-b { gap: 16px; }
.cj-plbl { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.cj-count { margin-left: auto; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cj-drop { width: 100%; min-height: 72px; display: flex; gap: 12px; align-items: center; justify-content: center; padding: 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-card); background: var(--surface-2); color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.cj-drop span { display: grid; gap: 2px; }
.cj-drop small { color: var(--ink-3); font-size: var(--fs-sm); }
.cj-drop svg { flex: none; color: var(--svc-ink); }
.cj-drop:hover, .cj-drop.is-over { border-color: var(--svc-ink); background: color-mix(in oklab, var(--svc) 7%, var(--surface)); color: var(--ink); }
.cj-drop:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--svc-ink); }
.cj-thumbs { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.cj-thumbs:empty { display: none; }
.cj-rm { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--ink); color: var(--surface); cursor: pointer; }
.cj-rm::after { content: ""; position: absolute; inset: -8px; }   /* 44px touch target */
.cj-rm:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--svc-ink); }
.cj-dmg { display: grid; gap: 14px; padding: 14px; border-radius: 10px; border: 1px solid color-mix(in oklab, var(--rent) 45%, var(--line)); background: color-mix(in oklab, var(--rent) 6%, var(--surface)); }
.cj:has(input[name="damage"]:not(:checked)) .cj-dmg { display: none; }   /* without :has() support the box simply stays visible */
.cj-occ { display: grid; gap: 10px; }
.cj-occ > legend { padding: 0; margin-bottom: 2px; }
.cj-src { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--rent-ink); font-weight: 600; }
.cj-src svg { flex: none; }
.cj-page { max-width: 720px; }
.cj-page form.cj { margin-top: 4px; }
.c-status .cj-row { margin-left: 8px; white-space: nowrap; }
@media (max-width: 720px) {
  .c-status .cj-row { margin: 6px 0 0; display: inline-flex; min-height: 40px; }
}
@media (max-width: 600px) {
  dialog.modal.cj-dlg { width: 100%; max-width: 100%; max-height: 94dvh; margin: auto 0 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
  .cj-dlg form.cj { max-height: 94dvh; }
  .modal-h { padding: 14px 16px 12px; }
  .cj-dlg .modal-b { padding: 16px; }
  .cj-dlg .modal-f { padding: 12px 16px; }
  .cj-dlg .modal-f .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  dialog.modal.cj-dlg[open] { animation: cj-in .16s ease-out; }
  @keyframes cj-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
/* ==== [/Complete job] ==== */

/* ==== Payment send dialog ====
   Invoicing "Request payment" / "Email to client" (_send_form.php): method cards (radio + icon + title +
   one-line description; a method that can't be used is dimmed with the reason and a link to fix it), the
   Stripe/PayPal sub-choice under "Online", and a preview of what the client gets. Which preview shows
   follows the checked radio through :has(); browsers without :has() list every preview. */
dialog.modal.pm-dlg { width: min(600px, calc(100% - 32px)); }
.pm-dlg form.pm { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 32px); }
.pm-dlg .pm-b { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.pm .pm-b { gap: 16px; }
.pm-opts { display: grid; gap: 8px; }
.pm-opts > legend { margin-bottom: 4px; }
.pm-item { display: grid; gap: 6px; }
.pm-opt { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: start; padding: 12px 14px; min-height: 44px;
  border: 1px solid var(--line-strong); border-radius: var(--r-card); background: var(--surface); cursor: pointer; }
.pm-opt input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--v-ink); }
.pm-opt:hover { border-color: var(--v-ink); }
.pm-opt:has(input:checked) { border-color: var(--v-ink); background: var(--v-wash); box-shadow: inset 0 0 0 1px var(--v-ink); }
.pm-opt:has(input:focus-visible) { box-shadow: var(--focus); }
.pm-opt.is-off { cursor: not-allowed; background: var(--surface-2); border-style: dashed; }
.pm-opt.is-off .pm-txt b, .pm-opt.is-off .pm-ico { color: var(--ink-3); }
.pm-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--v-wash); color: var(--v-ink); }
.pm-txt { display: grid; gap: 2px; min-width: 0; }
.pm-txt small { color: var(--ink-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.pm-fix { justify-self: start; margin-left: 56px; }
.pm-sub { margin: 0 0 4px 56px; display: grid; gap: 6px; }
.pm-sub .radios label { min-height: 44px; }
.pm-sub .radios label.is-off { opacity: .6; cursor: not-allowed; border-style: dashed; }
.pm-opts:has(input[name="method"][value="online"]:not(:checked)) .pm-sub { display: none; }
.pm-preview { display: grid; gap: 8px; padding: 14px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface-2); }
.pm-preview h3 { margin: 0; }
.pm-preview p { margin: 0; display: flex; gap: 6px; align-items: center; }
.pm-pv { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink); }
.pm:has(input[name="method"]:checked) .pm-pv { display: none; }
.pm:has(input[name="method"][value="online"]:checked) .pm-pv[data-pm-show="online"],
.pm:has(input[name="method"][value="transfer"]:checked) .pm-pv[data-pm-show="transfer"],
.pm:has(input[name="method"][value="cash"]:checked) .pm-pv[data-pm-show="cash"],
.pm:has(input[name="method"][value="owner"]:checked) .pm-pv[data-pm-show="owner"] { display: grid; }
.owner-pay { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.owner-pay p { margin: 0; }
.pay-how { display: grid; gap: 8px; }
.pay-how h2 { font-size: var(--fs-lg); margin: 0; }
.pay-bank { margin: 0; }
@media (max-width: 600px) {
  dialog.modal.pm-dlg { width: 100%; max-width: 100%; max-height: 94dvh; margin: auto 0 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
  .pm-dlg form.pm { max-height: 94dvh; }
  .pm-dlg .modal-b { padding: 16px; }
  .pm-dlg .modal-f { padding: 12px 16px; }
  .pm-dlg .modal-f .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
  .pm-fix, .pm-sub { margin-left: 0; }
}
/* ==== [/Payment send dialog] ==== */

/* ==== [Header & footer] Settings → Header & footer builder (PublicSite views/settings/chrome.php + chrome.js),
   Business profile fields, Styling's header/footer colours ==== */
.set-part > .card.hf { max-width: 1040px; }
.hf .set-sec { gap: 12px; }
.hf-errsum { align-items: center; }
.hf-errsum:focus { outline: none; box-shadow: var(--focus); }
.hf-errsum a { font-weight: 600; color: inherit; }
.hf-state { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.hf-state .i { color: var(--ink-3); }
.hf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hf-row { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.hf-row.is-group { background: var(--surface-2); }
.hf-row.has-error { border-color: color-mix(in oklab, var(--danger) 55%, var(--line)); box-shadow: inset 3px 0 0 var(--danger); }
.hf-row.is-dragging, .hf-w.is-dragging { opacity: .55; outline: 2px dashed var(--line-strong); outline-offset: 2px; }
.hf-row-main { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; }
.hf-grip { display: inline-grid; place-items: center; width: 24px; min-height: 38px; color: var(--ink-3); cursor: grab; touch-action: none; flex: none; align-self: stretch; }
.hf-grip:active { cursor: grabbing; }
.hf-mini { display: grid; gap: 4px; min-width: 0; }
.hf-mini > span:first-child { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.hf-link { flex: 1 1 220px; }
.hf-url { flex: 2 1 240px; }
.hf-link .select, .hf-url .input { min-height: 38px; }
.hf-tab { align-self: center; min-height: 38px; align-items: center; font-size: var(--fs-sm); white-space: nowrap; }
.hf-tab input { margin-top: 0; }
.hf-move { display: inline-flex; gap: 2px; margin-left: auto; align-self: center; }
.hf-move .btn { min-width: 36px; min-height: 36px; padding: 0; justify-content: center; }
.hf-move .btn:disabled { opacity: .45; }
.hf-del:hover { color: var(--danger); }
.hf-labels > summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); min-height: 32px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hf-labels > summary .hint { font-weight: 400; }
.hf-labels[open] > summary { margin-bottom: 6px; }
.hf-langs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 12px; }
.hf-langs.is-area { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hf-langs .input { min-height: 38px; }
.hf-row .field-error { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-sm); }
.hf-sub { display: grid; gap: 8px; padding: 8px 0 2px 24px; border-left: 2px solid var(--line); margin-left: 11px; }
.hf-sub > .hint { margin: 0; }
.hf-sub > .btn, .hf-w-b > .btn { justify-self: start; }
.hf-children .hf-row { padding: 8px 10px; }
.hf-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.hf-actions [name="menu_reset"], .hf-actions [name="footer_reset"] { margin-left: auto; }
.hf-limit { margin: 0; }
/* Live preview of the header (colours of the website header, set by chrome.js from Theme::colors). */
.hf-pv { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); }
.hf-pv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.hf-pv-head .lbl { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.hf-pv-langs button { min-height: 32px; }
.hf-pv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-height: 56px; padding: 8px 16px; border: 1px solid var(--pv-line, var(--line)); border-radius: 10px; background: var(--pv-bg, #fff); color: var(--pv-on, var(--ink)); }
.hf-pv-logo { margin-right: auto; font-weight: 700; font-size: 15px; color: var(--pv-on, var(--ink)); }
.hf-pv-logo img { display: block; height: 30px; width: auto; max-width: 150px; object-fit: contain; object-position: left center; }
.hf-pv-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.hf-pv-links > li { position: relative; }
.hf-pv-links > li > span { color: var(--pv-mute, var(--ink-2)); }
.hf-pv-links > li > span.on { color: var(--pv-on, var(--ink)); font-weight: 650; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.hf-pv-dd { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--pv-mute, var(--ink-2)); font: inherit; cursor: pointer; }
.hf-pv-dd::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.hf-pv-dd[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.hf-pv-sub { position: absolute; left: 0; top: calc(100% + 6px); z-index: 2; min-width: 160px; list-style: none; margin: 0; padding: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); display: grid; gap: 2px; }
.hf-pv-sub li { padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
.hf-pv-none { color: var(--pv-mute, var(--ink-3)); font-style: italic; }
/* Header options and bottom bar switches. */
.hf-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 24px; }
.hf-opts .check > span { display: grid; gap: 2px; }
.hf-opts .hint { font-size: var(--fs-sm); }
.hf-need { display: flex; align-items: flex-start; gap: 6px; color: var(--ink-2); }
.hf-need .i { flex: none; margin-top: 2px; color: var(--info); }
/* Footer widget cards. */
.hf-widgets { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hf-w { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-card); }
.hf-w.has-error { border-color: color-mix(in oklab, var(--danger) 55%, var(--line)); }
.hf-w-h { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-card) var(--r-card) 0 0; }
.hf-w-t { margin: 0; font-size: var(--fs-md); font-weight: 650; color: var(--ink); }
.hf-w-b { display: grid; gap: 12px; padding: 12px 14px 14px; }
.hf-checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hf-checks .check { font-size: var(--fs-sm); min-height: 32px; align-items: center; }
.hf-checks .check input { margin-top: 0; }
.hf-add-w { min-width: 220px; }
.hf-bottom { display: grid; gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 1px dashed var(--line); }
.hf-copy { display: flex; align-items: center; gap: 8px; }
.hf-copy > span { flex: none; font-size: var(--fs-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hf-copy .input { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .hf-row-main { gap: 8px; }
  .hf-link, .hf-url { flex-basis: 100%; }
  .hf-move { margin-left: 0; }
  .hf-sub { padding-left: 12px; margin-left: 4px; }
  .hf-actions [name="menu_reset"], .hf-actions [name="footer_reset"] { margin-left: 0; }
}
@media (pointer: coarse) {
  .hf-move .btn { min-width: 44px; min-height: 44px; }
  .hf-grip { display: none; }
}

/* Settings → Business: opening hours rows. */
.bp-hours { display: grid; gap: 10px; }
.bp-day { display: grid; gap: 4px; margin: 0; }
.bp-day-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; }
.bp-time { display: grid; gap: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.bp-time .input { width: 140px; }
.bp-closed { align-self: center; min-height: 38px; align-items: center; }
.bp-closed input { margin-top: 0; }
.bp-day.has-error .input { border-color: var(--danger); }

/* Settings → Styling: footer strip and the header over the home page image in the preview. */
.sty-prev .sty-foot { display: grid; gap: 4px; padding: 12px 16px; background: var(--site-foot-bg, color-mix(in oklab, var(--site-bg) 82%, var(--site-line))); color: var(--site-foot-on-2, var(--site-ink-2)); font-size: 12.5px; border-top: 1px solid var(--site-foot-line, var(--site-line)); }
.sty-prev .sty-foot b { color: var(--site-foot-on, var(--site-ink)); font-family: var(--font-head); font-size: 13.5px; }
.sty-prev .sty-foot-base { padding-top: 6px; border-top: 1px solid var(--site-foot-line, var(--site-line)); }
.sty-over-lbl { margin: 4px 0 -6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.sty-prev.sty-over { position: relative; isolation: isolate; min-height: 150px; display: grid; align-content: space-between;
  background: linear-gradient(160deg, #6E8FA6 0%, #C9B79A 55%, #8A7A5C 100%); }
.sty-prev.sty-over::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(12, 14, 18, .62); }
.sty-over-top { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; background: var(--site-top-bg); color: var(--site-top-on); }
.sty-over-top .sty-nav { margin-left: auto; }
.sty-over-h { margin: 0; padding: 0 16px 16px; color: #fff; font: var(--head-weight) 18px/1.2 var(--font-head); }
/* ==== [/Header & footer] ==== */

.sty-logo-img.sty-logo-dark { background: var(--ink); }

/* ==== Admin text sizes ==== */
/* Settings → Styling → Back office (App\Core\TextSizes). The layouts put the sizes that differ from these defaults
   on <html> as --ui-fs-*; the type tokens follow them, so everything built on tokens grows with them. The defaults
   are exactly the old sizes (26 · 17 · 14 · 14 · 13 · 12.5 · 14 · 14, and --fs-xs … --fs-2xl = 12 · 13 · 14 · 15 ·
   17 · 22 · 26). Only text sizes change; containers wrap rather than zoom. .fs-scope recomputes the tokens for a
   container with its own --ui-fs-* (the preview sample on the Styling page). */
:root {
  --ui-fs-title: 26px; --ui-fs-section: 17px; --ui-fs-sub: 14px; --ui-fs-body: 14px;
  --ui-fs-label: 13px; --ui-fs-hint: 12.5px; --ui-fs-table: 14px; --ui-fs-nav: 14px;
}
:root, .fs-scope {
  --fs-xs: max(12px, calc(var(--ui-fs-body) - 2px)); --fs-sm: calc(var(--ui-fs-body) - 1px); --fs-base: var(--ui-fs-body);
  --fs-md: calc(var(--ui-fs-body) + 1px); --fs-lg: var(--ui-fs-section); --fs-xl: calc(var(--ui-fs-title) - 4px); --fs-2xl: var(--ui-fs-title);
}
.fs-scope { font-size: var(--fs-base); }
.muted.small { font-size: calc(var(--ui-fs-hint) + .5px); }
/* Larger text must wrap, never push the layout sideways. */
.nav a { overflow-wrap: anywhere; }
.card-h h2, .ph h1 { overflow-wrap: anywhere; min-width: 0; }
.toolbar .select { max-width: 100%; }
/* The controls and the sample on the Styling page. */
.fs-presets label { min-height: 44px; }
.fs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 16px; }
.fs-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.fs-prev { display: grid; gap: 14px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-card); background: var(--bg); min-width: 0; }
.fs-prev .card-b { display: grid; gap: 12px; }
.fs-prev .nav { display: flex; flex-wrap: wrap; gap: 4px; }
.fs-prev .nav a { flex: 0 1 auto; }
.fs-prev p { color: var(--ink-2); }
/* ==== [/Admin text sizes] ==== */

/* ==== Job where ==== (Services job form: one "Where" select — accommodations, client properties, another address) */
.job-where { gap: 12px; }
.job-where-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; }
.job-where-tools:not(:has(> :not([hidden]))) { display: none; }
.job-where-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; }
.job-where-filter[hidden] { display: none; }
.job-where [data-where-note]:empty { display: none; }
.job-where-other { display: none; }
#job-form:has(#j-where option[value="other"]:checked) .job-where-other { display: grid; }
@supports not selector(:has(*)) { .job-where-other { display: grid; } }
@media (pointer: coarse) { .job-where-tools .btn.sm { min-height: 44px; } }
/* ==== [/Job where] ==== */

/* ==== Email logo ==== */
.mail-logo-band { display: flex; align-items: center; min-height: 72px; max-width: 420px; padding: 14px 20px; border-radius: var(--r-card); background: var(--band, var(--ink)); }
.mail-logo-band img { display: block; max-width: 180px; max-height: 52px; width: auto; height: auto; }
.mail-logo-band span { color: #fff; font: 800 20px var(--font-head, inherit); }
/* ==== [/Email logo] ==== */

/* ==== Names & reservation form ==== (Rentals new/edit reservation: section cards, fields sized to their content) */
.rform .rf-stay { grid-template-columns: minmax(0, 2.4fr) repeat(2, minmax(150px, 1fr)) repeat(2, minmax(84px, .55fr)); }
.rform .rf-find { max-width: 460px; }
.rform .rf-extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 20px; }
.rform .rf-extra .input.num { max-width: 7rem; }
.rform .rf-price { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.rform .rf-price .check { margin-top: 26px; }
@media (max-width: 1100px) {
  .rform .rf-stay { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rform .rf-stay .rf-listing { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .rform .rf-price { grid-template-columns: minmax(0, 1fr); }
  .rform .rf-price .input.num { max-width: 14rem; }
  .rform .rf-price .check { margin-top: 0; }
}
@media (max-width: 640px) {
  .rform .rf-stay { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ==== [/Names & reservation form] ==== */

/* ==== Searchable selects ==== (app.js: a field that looks like .select opens a search popup; the native select stays hidden in the form) */
.ss-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; clip-path: inset(50%); }
.ss-btn { display: flex; align-items: center; position: relative; padding-right: 34px; cursor: pointer; text-align: left; user-select: none; -webkit-user-select: none; line-height: 1.4; }
.ss-btn[hidden] { display: none; }
.ss-btn .ss-val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-btn::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border: solid var(--ink-3); border-width: 0 1.75px 1.75px 0; rotate: 45deg; pointer-events: none; }
.ss-btn[aria-expanded="true"]::after { rotate: 225deg; margin-top: -2px; }
.ss-btn:focus, .ss-btn[aria-expanded="true"] { outline: none; box-shadow: var(--focus); border-color: var(--svc-ink); }
.ss-btn[aria-disabled="true"] { cursor: not-allowed; background: var(--surface-2); color: var(--ink-3); }
.ss-btn[aria-invalid="true"], .has-error .ss-btn { border-color: var(--danger); }
.ss-pop { position: fixed; z-index: calc(var(--z-modal) + 5); display: flex; flex-direction: column; min-height: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-card); box-shadow: var(--shadow-pop); overflow: hidden; font-family: var(--font-body); }
.ss-pop[hidden] { display: none; }
.ss-search { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--ink-3); flex: none; }
.ss-search:focus-within { box-shadow: inset 0 -2px 0 var(--svc-ink); }
.ss-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.ss-q { flex: 1; min-width: 0; min-height: 32px; border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; }
.ss-q:focus, .ss-q:focus-visible { outline: none; box-shadow: none; }
.ss-q::placeholder { color: var(--ink-3); opacity: 1; }
.ss-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px; }
.ss-gh { padding: 10px 10px 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); }
.ss-opt { display: block; min-height: 34px; padding: 7px 30px 7px 10px; line-height: 1.45; border-radius: 7px; cursor: pointer; position: relative; overflow-wrap: anywhere; }
.ss-opt.is-active { background: color-mix(in oklab, var(--svc) 12%, var(--surface)); }
.ss-opt[aria-selected="true"] { font-weight: 600; }
.ss-opt[aria-selected="true"]::after { content: ""; position: absolute; right: 12px; top: 50%; width: 5px; height: 10px; margin-top: -7px; border: solid var(--svc-ink); border-width: 0 2px 2px 0; rotate: 45deg; }
.ss-opt[aria-disabled="true"] { color: var(--ink-3); cursor: default; background: none; }
.ss-hl { background: color-mix(in oklab, var(--svc) 22%, transparent); color: inherit; border-radius: 2px; }
.ss-empty { padding: 12px 10px; color: var(--ink-3); }
.ss-note { flex: none; margin: 0; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--ink-3); font-size: var(--ui-fs-hint, var(--fs-sm)); }
.ss-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (pointer: coarse), (max-width: 640px) {
  .ss-opt { min-height: 44px; padding-top: 11px; padding-bottom: 11px; }
  .ss-q { min-height: 40px; font-size: 16px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ss-pop:not([hidden]) { animation: ss-in .12s ease-out; }
  @keyframes ss-in { from { opacity: 0; } }
}
/* ==== [/Searchable selects] ==== */
