/* =====================================================================
   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(--fs-base); 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(--fs-base); 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: 15.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(--fs-sm); 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: 12.5px; color: var(--ink-3); }
.field-error { font-size: 12.5px; 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(--fs-base); }
.t th { text-align: left; font-weight: 600; font-size: 12.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: 12.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: 13.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: 12.5px; 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: 12.5px; }

/* ---------- 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-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: var(--z-toast); display: grid; gap: 8px; width: max-content; max-width: calc(100% - 32px); }
.toast { background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-pop); }
.toast.error { background: var(--danger); color: #fff; }
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: 12.5px; }
.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: 12.5px; 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: 12.5px; }
.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: 12.5px; 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: 13.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: 12.5px; display: block; }
.price tr.total td { border-bottom: 0; padding-top: 12px; font-weight: 700; font-size: 16px; }
.price tr.sub td { border-bottom: 0; color: var(--ink-2); padding: 3px 0; font-size: 13.5px; }
.person { display: flex; gap: 12px; align-items: center; }
.person b { display: block; }
.person small { color: var(--ink-3); font-size: 12.5px; }

/* ---------- 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: 15px; }
.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: 12.5px; }
.job .who { display: flex; align-items: center; gap: 8px; font-size: 13.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: 15px; }
.mcard p { font-size: 13.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: 12.5px; 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-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: 22px; }
  .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) minmax(300px, 380px); gap: 28px; 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; }

.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; }
.sty-prev[data-size="large"] { font-size: 1.1em; }
.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) 16px/1.1 var(--font-head); letter-spacing: var(--head-track); }
.sty-prev .sty-logo img { max-height: 28px; width: auto; 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: 1.4em; line-height: 1.15; color: var(--site-ink); }
.sty-prev p { font-size: 0.95em; 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: 1.05em; }
.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; }
}

/* ---------- 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; } }
