@font-face { font-family: 'Young Serif'; font-weight: 400; font-display: swap; src: url(/fonts/young-serif-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 100 900; font-display: swap; src: url(/fonts/hanken-grotesk-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF,U+2000-206F,U+2212; }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 100 900; font-display: swap; src: url(/fonts/hanken-grotesk-latin-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02FF,U+20A0-20C0; }

/* Airbnb-host feel: white canvas, near-black ink, soft grey lines, round corners */
:root {
  --bg: #fff; --soft: #f7f7f7; --soft2: #ebebeb; --surface: #fff; --ink: #222; --ink2: #3f3f3f; --muted: #6a6a6a; --line: #dddddd; --line2: #ebebeb;
  --brand: #24392d; --gold: #e0a526; --ok: #2f7a4c; --ok-bg: #e7f3ea; --warn: #9a5a12; --warn-bg: #fdf3e1; --err: #c13515; --err-bg: #fdecea; --info-bg: #eef3f8;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; --serif: 'Young Serif', Georgia, serif;
  --r: 12px; --r-lg: 16px; --shadow: 0 6px 16px rgba(0,0,0,.12); --shadow-sm: 0 1px 2px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin-bottom: 12px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small, small { font-size: 0.85rem; }
.warn { color: var(--warn); }
.ok-text { color: var(--ok); }
.center { text-align: center; }
.mono { font-family: ui-monospace, Menlo, monospace; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 0.85em; word-break: break-all; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
img { max-width: 100%; }

/* ---------- Top bar ---------- */
.hb { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line2); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 40px; height: 80px; }
.hb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); font-family: var(--serif); font-size: 1.2rem; }
.hb-brand .logo { width: 32px; height: 32px; color: var(--brand); }
.hb-nav { display: flex; gap: 6px; }
.hb-nav a { position: relative; padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 500; border-radius: 999px; display: flex; gap: 6px; align-items: center; }
.hb-nav a:hover { color: var(--ink); background: var(--soft); }
.hb-nav a.on { color: var(--ink); font-weight: 600; }
.hb-nav a.on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: var(--ink); border-radius: 2px; }
.pill { background: var(--err); color: #fff; font-size: 0.7rem; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
.hb-right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.hb-switch { text-decoration: none; font-weight: 600; font-size: 0.9rem; padding: 10px 14px; border-radius: 999px; }
.hb-switch:hover { background: var(--soft); }
.hb-menu { position: relative; }
.hb-menu summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 5px 5px 5px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; position: relative; }
.hb-menu summary::-webkit-details-marker { display: none; }
.hb-menu summary:hover { box-shadow: var(--shadow-sm); }
.hb-burger svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.2; display: block; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; }
.hb-dot { position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--err); border: 2px solid #fff; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: #fff; border-radius: var(--r); box-shadow: 0 2px 16px rgba(0,0,0,.14); padding: 8px 0; z-index: 60; }
.menu-pop a, .menu-btn { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; text-decoration: none; color: var(--ink); font: 400 0.95rem var(--sans); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.menu-pop a:hover, .menu-btn:hover { background: var(--soft); }
.menu-pop a.on { font-weight: 600; }
.menu-who { padding: 8px 16px 10px; border-bottom: 1px solid var(--line2); margin-bottom: 6px; }
.menu-who b, .menu-who small { display: block; }
.menu-who small { color: var(--muted); }
.menu-pop form { border-top: 1px solid var(--line2); margin-top: 6px; padding-top: 6px; }

.hb-main { max-width: 1280px; margin: 0 auto; padding: 32px 40px 80px; }
.hb-main.wide { max-width: none; padding: 0; }
.page-title { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 24px; }

.tabbar { display: none; }
@media (max-width: 900px) {
  .hb { grid-template-columns: 1fr auto; height: 64px; padding: 0 16px; }
  .hb-nav, .hb-switch { display: none; }
  .hb-main { padding: 20px 16px 96px; }
  .hb-main.wide { padding: 0 0 72px; }
  .page-title { font-size: 1.6rem; margin-bottom: 16px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 45; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line2); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 0.68rem; font-weight: 600; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
  .tabbar a.on { color: var(--ink); }
  .tabbar .pill { position: absolute; top: -2px; left: 54%; }
}

/* ---------- Buttons & controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); background: #fff; color: var(--ink); border-radius: 8px; font: 600 0.95rem var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:hover { background: var(--soft); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.ghost { background: transparent; border-color: transparent; text-decoration: underline; padding: 0 10px; }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { color: var(--err); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 0.875rem; }
.btn.wide { width: 100%; }
.btn.round { border-radius: 999px; border-color: var(--line); background: var(--soft); }
.btn.warn-btn { border-color: var(--err); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon { background: none; border: 0; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; color: var(--ink); display: inline-grid; place-items: center; }
.icon:hover { background: var(--soft); }
.icon.danger:hover { color: var(--err); }
.link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; text-decoration: underline; color: var(--ink); }
.circle { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); display: inline-grid; place-items: center; text-decoration: none; font-size: 1.1rem; flex: none; }
.circle:hover { background: var(--soft2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: inline-block; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--err); }

.seg-tabs { display: inline-flex; gap: 8px; }
.seg-tabs > a, .seg-tabs > button { border: 0; padding: 0 22px; height: 48px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font: 600 1rem var(--sans); cursor: pointer; }
.seg-tabs > .on { background: var(--ink); color: #fff; }
.seg-tabs.wide { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--soft); border-radius: 999px; padding: 4px; }
.seg-tabs.wide > a { height: 44px; background: transparent; font-weight: 500; }
.seg-tabs.wide > .on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-tabs a { text-decoration: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; font-size: 0.92rem; }
.pill-tabs a:hover { border-color: var(--ink); }
.pill-tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill-tabs b { font-size: 0.78rem; background: var(--soft2); color: var(--ink); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.pill-tabs a.on b { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- Panels, tables, badges ---------- */
.panel { background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-lg); padding: 24px; margin-bottom: 24px; }
.panel.flush { padding: 8px 12px; }
.panel.narrow { max-width: 760px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.grid-2.wide-left { grid-template-columns: 1.5fr 1fr; }
@media (max-width: 1100px) { .grid-2, .grid-2.wide-left { grid-template-columns: 1fr; } }
.empty { color: var(--muted); padding: 16px 0; margin: 0; }
.alerts { display: grid; gap: 8px; margin: 0 0 24px; }
.alert { margin: 0; padding: 12px 16px; border-radius: var(--r); background: var(--warn-bg); color: #5e3a08; }
.alert.err { background: var(--err-bg); color: #6e2410; }
.alert.ok { background: var(--ok-bg); color: #1f5a33; }
.alert.info { background: var(--info-bg); color: #233b55; }
.alert a { font-weight: 600; margin-left: 6px; color: inherit; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.toolbar.end { justify-content: flex-end; margin-top: -60px; margin-bottom: 28px; }
@media (max-width: 900px) { .toolbar.end { margin-top: 0; } }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-height: 40px; padding: 6px 10px; }
.filters input[type=search] { min-width: 240px; flex: 1; }
.filters label.inline { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.filters label.inline input { margin: 0; }
.sumline { display: flex; flex-wrap: wrap; gap: 6px 24px; color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.sumline b { color: var(--ink); }
.pager { display: flex; justify-content: space-between; padding: 12px 8px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: var(--soft); }
.table tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.table tr.is-now td { background: #fbfbf6; }
.table a { text-decoration: none; }
.num { text-align: right; white-space: nowrap; }
.wrap-text { max-width: 320px; white-space: pre-wrap; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--ink2); white-space: nowrap; }
.s-new { background: #fff1d6; color: #6e4d05; }
.s-quoted { background: var(--info-bg); color: #233b55; }
.s-confirmed, .p-paid { background: var(--ok-bg); color: #1f5a33; }
.s-cancelled, .s-lost { background: var(--soft); color: var(--muted); }
.p-partial { background: #eef5dc; color: #3c5a14; }
.badge.warn { background: var(--err-bg); color: #8a2410; }
.ch-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; color: var(--ink2); }
.ch-tag i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line2); }
.list small { display: block; color: var(--muted); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 0.875rem; color: var(--ink); }
label > input, label > select, label > textarea, label > .prefix, label > .copy { margin-top: 6px; }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
label .muted { font-weight: 400; }
input, select, textarea { width: 100%; font: 400 1rem var(--sans); color: var(--ink); padding: 12px 14px; border: 1px solid #b0b0b0; border-radius: 8px; background: #fff; min-height: 48px; }
textarea { min-height: 0; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--ink); }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
label.check input { margin: 0; flex: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid h2 { margin: 12px 0 0; padding-top: 16px; border-top: 1px solid var(--line2); }
.form-grid h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.span-2 { grid-column: span 2; } .span-3, .span-4 { grid-column: 1 / -1; }
.form-grid.one .span-2 { grid-column: auto; }
@media (max-width: 640px) { .form-grid, .form-grid.three { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.hint { margin: 0; padding: 12px 14px; background: var(--soft); border-radius: var(--r); color: var(--ink2); font-size: 0.9rem; }
.prefix { display: flex; align-items: center; border: 1px solid #b0b0b0; border-radius: 8px; overflow: hidden; }
.prefix:focus-within { outline: 2px solid var(--ink); outline-offset: -1px; }
.prefix i { font-style: normal; color: var(--muted); padding: 0 0 0 14px; font-weight: 400; white-space: nowrap; }
.prefix input { border: 0; padding-left: 2px; outline: 0; margin: 0; }
.copy { display: flex; gap: 6px; }
.copy input { font-family: ui-monospace, Menlo, monospace; font-size: 0.78rem; background: var(--soft); min-height: 36px; padding: 6px 10px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: 0.875rem; padding: 0; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chips legend { width: 100%; }
.chip-check { position: relative; font-weight: 500; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 0.9rem; user-select: none; }
.chip-check span:hover { border-color: var(--ink); }
.chip-check input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-check input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.radio-card { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; cursor: pointer; margin-bottom: 10px; font-weight: 400; }
.radio-card:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.radio-card input { margin-top: 2px; flex: none; }
.radio-card b { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.radio-card small { display: block; color: var(--muted); margin-top: 2px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #b0b0b0; display: inline-block; margin-right: 6px; }
.status-dot.on { background: #008a05; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line2); font-weight: 500; font-size: 1rem; }
input[type=checkbox][role=switch] { appearance: none; -webkit-appearance: none; width: 48px; height: 32px; border-radius: 999px; background: #b0b0b0; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; border: 0; padding: 0; }
input[type=checkbox][role=switch]::after { content: ''; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
input[type=checkbox][role=switch]:checked { background: var(--ink); }
input[type=checkbox][role=switch]:checked::after { transform: translateX(16px); }
.steppers { display: grid; }
.stepper-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line2); font-size: 1rem; }
.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #b0b0b0; background: #fff; cursor: pointer; font-size: 1.1rem; color: var(--ink2); }
.stepper button:hover { border-color: var(--ink); color: var(--ink); }
.stepper input { width: 52px; text-align: center; border: 0; padding: 0; min-height: 34px; font-size: 1rem; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stack-fields { border: 1px solid #b0b0b0; border-radius: var(--r); overflow: hidden; margin: 8px 0 24px; }
.stack-fields label { padding: 10px 14px 8px; font-size: 0.78rem; font-weight: 400; color: var(--muted); }
.stack-fields label + label { border-top: 1px solid #b0b0b0; }
.stack-fields select { border: 0; padding: 0; min-height: 30px; margin: 0; font-size: 1.05rem; color: var(--ink); background-color: transparent; }
.stack-fields select:focus { outline: 0; }

/* ---------- Today ---------- */
.today { max-width: 980px; margin: 0 auto; }
.today > .seg-tabs { display: flex; justify-content: center; margin: 4px 0 28px; }
.hello { text-align: center; color: var(--muted); margin: 0; }
.hero-h { text-align: center; font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em; margin: 4px 0 32px; line-height: 1.15; }
.tcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 40px; }
.tcard { display: block; text-align: center; text-decoration: none; background: #fff; border-radius: 24px; padding: 28px 24px; box-shadow: 0 6px 20px rgba(0,0,0,.08); border: 1px solid var(--line2); transition: box-shadow .2s, transform .2s; }
.tcard:hover { box-shadow: 0 10px 28px rgba(0,0,0,.13); transform: translateY(-2px); }
.tc-time { font-weight: 600; margin-bottom: 18px; min-height: 1.4em; }
.tc-faces { position: relative; width: 120px; height: 104px; margin: 0 auto 16px; }
.tc-av { position: absolute; left: 0; top: 0; width: 96px; height: 96px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 2.4rem; font-weight: 600; box-shadow: 0 0 0 4px #fff; }
.tc-faces img { position: absolute; right: 0; bottom: 0; width: 52px; height: 52px; object-fit: cover; border-radius: 14px; border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.tcard h3 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.tcard .muted { margin-bottom: 10px; }
.tc-meta { font-size: 0.85rem; color: var(--muted); margin: 0; }
.upc { list-style: none; padding: 0; margin: 0 0 40px; }
.upc li { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line2); }
.upc-date b { display: block; font-size: 0.85rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.upc-date span { font-size: 1.15rem; font-weight: 600; }
.upc-items { display: grid; gap: 8px; }
.upc-items a { text-decoration: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.upc-items a:hover { text-decoration: underline; }
.dir { font-size: 0.75rem; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.dir.in { background: var(--ok-bg); color: #1f5a33; }
.dir.out { background: var(--soft2); color: var(--ink2); }
.block { margin-bottom: 40px; }
.block-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.block-head h2 { margin: 0; font-size: 1.4rem; letter-spacing: -0.02em; }
.block-head a { margin-left: auto; font-weight: 600; }
.count { background: var(--ink); color: #fff; border-radius: 999px; font-size: 0.8rem; font-weight: 700; padding: 1px 9px; }
.todo { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line2); border-radius: var(--r-lg); overflow: hidden; }
.todo li + li { border-top: 1px solid var(--line2); }
.todo a { display: flex; align-items: center; gap: 14px; padding: 16px 20px; text-decoration: none; }
.todo a:hover { background: var(--soft); }
.todo-tag { flex: none; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--soft2); width: 150px; text-align: center; }
.todo-tag.warn { background: var(--err-bg); color: #8a2410; }
.todo-tag.new { background: #fff1d6; color: #6e4d05; }
.todo-tag.info { background: var(--info-bg); color: #233b55; }
.todo-text { flex: 1; min-width: 0; }
.todo-text small { display: block; color: var(--muted); }
.chev { font-size: 1.5rem; color: var(--muted); }
@media (max-width: 600px) { .todo a { flex-wrap: wrap; } .todo-tag { width: auto; } .chev { display: none; } }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { border: 1px solid var(--line2); border-radius: var(--r-lg); padding: 18px 20px; }
.kpi span { display: block; color: var(--muted); font-size: 0.85rem; }
.kpi strong { display: block; font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0; }
.kpi small { color: var(--muted); }
.kpi em { font-style: normal; font-weight: 600; }
.kpi em.up { color: var(--ok); } .kpi em.down { color: var(--err); }
@media (max-width: 800px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi strong { font-size: 1.5rem; } }
.gaps { list-style: none; margin: 0 0 10px; padding: 0; border: 1px solid var(--line2); border-radius: var(--r-lg); }
.gaps li { display: grid; grid-template-columns: 200px 1fr; gap: 14px; padding: 14px 20px; align-items: center; }
.gaps li + li { border-top: 1px solid var(--line2); }
.gap-home { text-decoration: none; }
.gap-home small { display: block; color: var(--muted); }
.gap-runs { display: flex; flex-wrap: wrap; gap: 6px; }
.gap { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; padding: 5px 10px; border-radius: 999px; background: var(--soft); }
.gap i { font-style: normal; color: var(--muted); font-size: 0.75rem; }
.gap.orphan { background: #fff1d6; }
@media (max-width: 600px) { .gaps li { grid-template-columns: 1fr; } }

/* ---------- Insights ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line2); }
.chart .tick, .chart .sub { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .lbl { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--sans); }
.chart .val { fill: var(--ink2); font-size: 11px; font-family: var(--sans); }
.chart .bar-g rect { fill: var(--brand); }
.chart .bar-g.now rect { fill: var(--ink); }
.chart .bar-g.future rect { fill: #a9b8ad; }
.hbars { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 14px; }
.hbars li { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 10px; }
.hbars small { grid-column: 2 / 4; color: var(--muted); margin-top: -10px; }
.hb-track { height: 12px; background: var(--soft2); border-radius: 999px; overflow: hidden; }
.hb-track i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.hb-name { font-weight: 600; font-size: 0.9rem; }
.stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; margin-bottom: 14px; }
.funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.funnel div { background: var(--soft); border-radius: var(--r); padding: 14px; }
.funnel strong { display: block; font-size: 1.5rem; font-weight: 600; }
.funnel span { color: var(--muted); font-size: 0.8rem; }
@media (max-width: 600px) { .funnel { grid-template-columns: 1fr 1fr; } }

/* ---------- Listings ---------- */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px 24px; }
.lcard { text-decoration: none; display: grid; gap: 4px; }
.lc-img { position: relative; display: block; aspect-ratio: 20 / 19; border-radius: var(--r-lg); overflow: hidden; background: var(--soft); margin-bottom: 10px; }
.lc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.lcard:hover .lc-img img { transform: scale(1.03); }
.lc-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.lc-status { position: absolute; top: 14px; left: 14px; background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow-sm); }
.lc-status i { width: 8px; height: 8px; border-radius: 50%; background: #b0b0b0; }
.lc-status.on i { background: #008a05; }
.lcard b { font-size: 1rem; }
.lcard small { color: var(--muted); }

/* ---------- Listing editor ---------- */
.le { display: grid; grid-template-columns: minmax(340px, 440px) 1fr; min-height: calc(100vh - 80px); }
.le-side { border-right: 1px solid var(--line2); padding: 28px 32px 40px 48px; position: sticky; top: 80px; height: calc(100vh - 80px); overflow-y: auto; }
.le-top { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.le-top h1 { flex: 1; font-size: 2rem; letter-spacing: -0.03em; }
.le-name { color: var(--muted); margin: 0 0 20px 54px; }
.le-side .seg-tabs { margin-bottom: 20px; }
.le-cards { display: grid; gap: 14px; }
.le-card { display: block; text-decoration: none; border-radius: var(--r-lg); padding: 20px 22px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.07); border: 1px solid var(--line2); transition: box-shadow .2s; }
.le-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.le-card.on { box-shadow: inset 0 0 0 2px var(--ink); border-color: var(--ink); }
.le-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.le-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.le-card .split { display: grid; grid-template-columns: 1fr auto; gap: 16px; }
.le-card .split div + div { border-left: 1px solid var(--line); padding-left: 16px; text-align: right; }
.le-card .split b { display: block; font-size: 1rem; }
.le-card .split span { color: var(--muted); }
.ico-list { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 8px; color: var(--ink2); }
.ico-list i { font-style: normal; display: inline-block; width: 26px; color: var(--muted); }
.stack-thumbs { display: flex; margin-top: 12px; }
.stack-thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.stack-thumbs img + img { margin-left: -26px; }
.le-main { padding: 40px 56px 80px; max-width: 900px; width: 100%; }
.le-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.le-head h2 { font-size: 2rem; letter-spacing: -0.03em; margin: 0; }
.le-intro { color: var(--muted); margin-bottom: 24px; }
.le-form { display: grid; gap: 18px; }
.le-form h4 { font-size: 1.05rem; margin-top: 6px; }
.le-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line2); display: flex; justify-content: space-between; align-items: center; padding: 16px 0; margin-top: 16px; }
.le-foot .btn.primary { margin-left: auto; min-width: 110px; }
.big-price { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 20px 0 0; }
.big-price span { font-size: 3.5rem; font-weight: 700; }
.big-price input { border: 0; font-size: 4.5rem; font-weight: 700; width: 5.2ch; padding: 0; text-align: left; letter-spacing: -0.03em; min-height: 0; -moz-appearance: textfield; }
.big-price input::-webkit-inner-spin-button { -webkit-appearance: none; }
.big-price input:focus { outline: 0; border-bottom: 2px solid var(--ink); }
.price-example .table td, .price-example .table th { padding: 8px 12px; }
@media (max-width: 1000px) {
  .le { grid-template-columns: 1fr; }
  .le-side { position: static; height: auto; border-right: 0; padding: 20px 16px; }
  .le-cards { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .le-card { flex: 0 0 240px; scroll-snap-align: start; padding: 14px 16px; }
  .le-main { padding: 8px 16px 40px; }
  .le-head h2 { font-size: 1.6rem; }
  .le-top h1 { font-size: 1.5rem; }
  .le-name { margin-left: 0; }
}

/* Photos */
.drop { position: relative; display: block; border: 2px dashed var(--line); border-radius: var(--r-lg); padding: 28px; text-align: center; cursor: pointer; margin: 8px 0 16px; }
.drop:hover, .drop.over { border-color: var(--ink); background: var(--soft); }
.drop input { position: absolute; opacity: 0; width: 1px; }
.drop b { font-size: 1.05rem; }
.drop small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; }
.photo-grid { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.photo-grid li { position: relative; border-radius: var(--r); overflow: hidden; background: var(--soft); cursor: grab; }
.photo-grid li.dragging { opacity: .4; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-grid .cap { border: 0; border-radius: 0; font-size: 0.85rem; min-height: 38px; padding: 8px 10px; background: #fff; }
.ph-actions { display: flex; justify-content: space-between; padding: 2px 4px; background: #fff; }
.cover-tag { position: absolute; top: 10px; left: 10px; background: #fff; font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow-sm); }

/* ---------- Bookings detail ---------- */
.detail-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-head h2 { font-size: 1.8rem; margin: 2px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; letter-spacing: -0.02em; }
.detail-head a { text-decoration: none; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .detail { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 0 0 14px; }
.kv dt { color: var(--muted); font-size: 0.8rem; }
.kv dd { margin: 0; }
.kv .wide { grid-column: 1 / -1; }
.kv.tight { grid-template-columns: 1fr; gap: 8px; }
.kv.tight div { display: flex; justify-content: space-between; }
details summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; padding: 8px 0; text-decoration: underline; }
details .form-grid { margin-top: 10px; }
.lines { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.lines th { text-align: left; font-size: 0.78rem; color: var(--muted); padding: 4px 6px; }
.lines td { padding: 4px 6px; }
.lines td:nth-child(2) { width: 150px; }
.lines td:last-child { width: 40px; }
.lines input { min-height: 40px; padding: 8px 10px; }
.lines input.num { text-align: right; }
.line-adds { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
.lines tr.total td { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line2); padding-top: 12px; }
.share { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line2); display: grid; gap: 8px; }
.status-actions { display: grid; gap: 8px; }
.activity { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.activity time { color: var(--muted); white-space: nowrap; font-size: 0.8rem; }
.activity small { display: block; color: var(--muted); }
.m-sent { color: var(--ok); } .m-failed { color: var(--err); } .m-skipped { color: var(--warn); }
.detail-side textarea { margin-bottom: 8px; }
.panel.verify { border-color: var(--err); box-shadow: inset 0 0 0 1px var(--err); }
.proof { max-height: 260px; border-radius: var(--r); border: 1px solid var(--line2); margin: 6px 0 10px; }

/* ---------- Settings (account style) ---------- */
.acct { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: start; }
.acct-nav { display: grid; gap: 4px; position: sticky; top: 104px; }
.acct-nav a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); text-decoration: none; font-size: 1.02rem; }
.acct-nav a:hover { background: var(--soft); }
.acct-nav a.on { background: var(--soft); font-weight: 600; }
.ai { width: 24px; text-align: center; filter: grayscale(1); }
.acct-nav hr { border: 0; border-top: 1px solid var(--line2); margin: 10px 0; }
.acct-main { max-width: 760px; }
.acct-main > h2 { font-size: 2rem; letter-spacing: -0.03em; margin-bottom: 20px; }
.srow { display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line2); align-items: flex-start; }
.srow-main { flex: 1; min-width: 0; }
.srow h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 4px; }
.srow-val { color: var(--muted); }
.srow-val .pre { white-space: pre-wrap; }
.srow-form { display: grid; gap: 10px; margin-top: 10px; }
.srow-edit { flex: none; }
.srow.toggle { align-items: center; }
.qr-preview { width: 140px; height: 140px; object-fit: contain; border: 1px solid var(--line2); border-radius: var(--r); padding: 6px; background: #fff; display: block; margin: 6px 0; }
.sub-h { margin: 28px 0 8px; font-size: 1.1rem; }
.checks { list-style: none; padding: 0; margin: 0 0 12px; }
.checks li { padding: 14px 0 14px 28px; position: relative; border-bottom: 1px solid var(--line2); }
.checks li::before { position: absolute; left: 0; top: 14px; font-weight: 700; }
.checks li.ok::before { content: '✓'; color: var(--ok); }
.checks li.off::before { content: '○'; color: var(--warn); }
@media (max-width: 900px) { .acct { grid-template-columns: 1fr; gap: 16px; } .acct-nav { position: static; display: flex; overflow-x: auto; } .acct-nav a { white-space: nowrap; padding: 10px 14px; } .acct-nav hr { display: none; } .acct-main > h2 { font-size: 1.6rem; } }

/* ---------- Multi-calendar ---------- */
.mc { display: grid; grid-template-columns: 240px minmax(0, 1fr) 360px; height: calc(100vh - 80px); }
.mc-rail { border-right: 1px solid var(--line2); overflow-y: auto; padding: 16px 12px; display: grid; align-content: start; gap: 4px; }
.mc-all { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r); text-decoration: none; font-weight: 600; margin-bottom: 8px; }
.mc-all-ic { width: 48px; height: 48px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; font-size: 1.3rem; }
.mc-all:hover, .mc-home:hover { background: var(--soft); }
.mc-home { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); text-decoration: none; }
.mc-home.on { background: var(--soft); box-shadow: inset 0 0 0 2px var(--ink); }
.mc-thumb { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--soft2); flex: none; }
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mc-hname { min-width: 0; }
.mc-hname b { display: block; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-hname small { color: var(--muted); font-size: 0.78rem; }
.mc-rail-select { display: none; }
.mc-cal { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 24px 10px; flex-wrap: wrap; }
.mc-head h2 { font-size: 1.6rem; letter-spacing: -0.02em; margin: 0; }
.mc-head p { margin: 2px 0 0; }
.mc-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-tools .btn { border-color: var(--line); border-radius: 999px; }
.mc-dow { display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px 24px; border-bottom: 1px solid var(--line2); font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.mc-dow span { padding-left: 8px; }
.mc-months { flex: 1; overflow-y: auto; padding: 0 24px 24px; outline: 0; }
.mc-loading { padding: 40px 0; }
.mc-month h3 { font-size: 1.3rem; letter-spacing: -0.02em; padding: 22px 0 12px; position: sticky; top: 0; background: #fff; z-index: 3; }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); }
.mcd { position: relative; width: 100%; min-width: 0; height: 104px; border: 0; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); background: #fff; padding: 8px 10px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.mcd.blank { cursor: default; background: #fff; }
.mcd:not(.blank):not([disabled]):hover { box-shadow: inset 0 0 0 2px var(--ink); z-index: 1; }
.mcd .n { font-weight: 600; font-size: 0.95rem; }
.mcd .p { font-size: 0.85rem; color: var(--ink2); }
.mcd.custom .p { font-weight: 700; color: var(--ink); }
.mcd.custom::after { content: ''; position: absolute; top: 10px; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.mcd.past { background: repeating-linear-gradient(-45deg, #fafafa 0 6px, #f3f3f3 6px 12px); color: #b0b0b0; cursor: default; }
.mcd.past .p { color: #c4c4c4; }
.mcd.today .n { background: var(--ink); color: #fff; border-radius: 999px; padding: 0 8px; align-self: flex-start; }
.mcd.blocked { background: repeating-linear-gradient(-45deg, #fff 0 6px, #f1f1f1 6px 12px); }
.mcd.blocked .p { text-decoration: line-through; color: var(--muted); }
.mcd .bar { position: absolute; left: -1px; right: -1px; top: 42px; height: 30px; background: var(--c); color: #fff; display: flex; align-items: center; padding: 0 10px; z-index: 2; }
.mcd .bar.s { left: 10px; border-top-left-radius: 999px; border-bottom-left-radius: 999px; }
.mcd .bar.e { right: 10px; border-top-right-radius: 999px; border-bottom-right-radius: 999px; }
.mcd .bar em { font-style: normal; font-size: 0.8rem; font-weight: 600; white-space: nowrap; position: relative; z-index: 3; }
.mcd .note-dot { position: absolute; left: 10px; bottom: 30px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.mcd.sel { background: var(--ink); color: #fff; }
.mcd.sel .p, .mcd.sel.past .p { color: #fff; }
.mcd.sel .bar { box-shadow: 0 0 0 2px #fff; }
.mcd.sel.today .n { background: #fff; color: var(--ink); }
.mc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 24px; border-top: 1px solid var(--line2); font-size: 0.8rem; color: var(--ink2); }
.mc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 10px; border-radius: 999px; display: inline-block; }
.lg.custom { background: var(--gold); width: 8px; height: 8px; }
.lg.blocked { background: repeating-linear-gradient(-45deg, #fff 0 3px, #cfcfcf 3px 6px); border: 1px solid #cfcfcf; border-radius: 3px; }

.mc-panel { border-left: 1px solid var(--line2); overflow-y: auto; padding: 20px 24px 40px; }
.mp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.mp-head .icon { margin-left: auto; }
.range-pill { background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 600; }
.mp-section { border: 1px solid var(--line2); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 14px; }
.mp-section h3 { font-size: 1.1rem; margin-bottom: 12px; }
.mp-section h4 { font-size: 0.9rem; margin-bottom: 10px; }
.mp-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.mp-rates small { color: var(--muted); display: block; font-size: 0.78rem; }
.mp-rates strong { display: block; font-size: 1.25rem; }
.mp-rates span { color: var(--muted); font-size: 0.78rem; }
.mp-tip { padding: 0 4px; }
.mp-avail { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mp-avail small { display: block; color: var(--muted); }
.av-toggle { display: inline-flex; gap: 6px; }
.av-toggle button { width: 44px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; font-weight: 700; color: var(--muted); }
.av-toggle button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.av-toggle button:hover { border-color: var(--ink); }
.price-card small { display: block; color: var(--muted); }
.price-card strong { display: block; font-size: 2rem; letter-spacing: -0.02em; margin: 4px 0 10px; }
.price-edit { display: flex; align-items: center; gap: 8px; border: 1px solid #b0b0b0; border-radius: 10px; padding: 4px 4px 4px 12px; margin-bottom: 8px; }
.price-edit:focus-within { outline: 2px solid var(--ink); }
.price-edit span { font-weight: 700; }
.price-edit input { border: 0; padding: 4px; min-height: 36px; outline: 0; }
.custom-set summary { list-style: none; display: flex; justify-content: space-between; text-decoration: none; padding: 0; font-size: 1rem; }
.custom-set summary::-webkit-details-marker { display: none; }
.custom-set summary span { font-size: 1.3rem; font-weight: 400; }
.custom-set[open] summary span { transform: rotate(45deg); }
.custom-set form { margin-top: 14px; }
.custom-set input, .custom-set select { min-height: 42px; padding: 8px 12px; }
.res-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.res { display: grid; grid-template-columns: 10px 1fr; gap: 4px 12px; align-items: start; }
.res-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.res small { display: block; color: var(--muted); }
.res .btn { grid-column: 2; justify-self: start; margin-top: 4px; }
@media (max-width: 1200px) { .mc { grid-template-columns: 200px minmax(0, 1fr) 320px; } }
@media (max-width: 1000px) {
  .mc { grid-template-columns: 1fr; height: auto; }
  .mc-rail { border: 0; padding: 12px 16px 0; display: flex; gap: 8px; }
  .mc-rail .mc-home, .mc-rail .mc-all { display: none; }
  .mc-rail-select { display: block; }
  .mc-head, .mc-dow, .mc-months, .mc-legend { padding-left: 16px; padding-right: 16px; }
  .mc-months { overflow: visible; }
  .mcd { height: 76px; padding: 6px; }
  .mcd .bar { top: 30px; height: 22px; }
  .mcd .bar em { font-size: 0.7rem; }
  .mcd .p { font-size: 0.75rem; }
  .mc-panel { position: fixed; z-index: 44; left: 0; right: 0; bottom: 64px; max-height: 62vh; background: #fff; border: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.18); padding: 18px 16px 24px; }
  .mc-panel:not(:has(.mp-head)) { display: none; }
}

/* Overview (all homes) */
.ov-wrap { overflow-x: auto; }
.ov { border-collapse: separate; border-spacing: 3px; font-size: 0.75rem; }
.ov th { font-weight: 600; color: var(--muted); text-align: center; min-width: 30px; padding: 2px 0; line-height: 1.1; }
.ov th span { display: block; font-weight: 400; }
.ov th small { display: block; color: var(--ink); font-weight: 700; }
.ov th.we { color: var(--ink); }
.ov .ov-name { text-align: left; min-width: 150px; position: sticky; left: 0; background: #fff; padding-right: 10px; z-index: 1; }
.ov .ov-name a { text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.ov td { height: 34px; background: var(--soft); border-radius: 6px; position: relative; }
.ov td a { position: absolute; inset: 0; }
.ov td.manual { background: repeating-linear-gradient(-45deg, #fff 0 4px, #d9d9d9 4px 8px) !important; }
.ov td.custom { box-shadow: inset 0 -3px 0 var(--gold); }
.rc-nav { display: flex; gap: 6px; }

/* ---------- Dialogs ---------- */
dialog.dlg { border: 0; padding: 0; border-radius: 20px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 10px 40px rgba(0,0,0,.25); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg-body { padding: 0 24px 0; display: grid; gap: 14px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: #fff; padding: 20px 0 12px; border-bottom: 1px solid var(--line2); z-index: 2; }
.dlg-head h2 { margin: 0; font-size: 1.2rem; }
.dlg-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; position: sticky; bottom: 0; background: #fff; padding: 14px 0 20px; border-top: 1px solid var(--line2); }
.dlg-foot > span { margin-right: auto; }
dialog.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; border-radius: 20px 0 0 20px; width: min(560px, 100vw); }
.dow-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dow-pick legend { width: 100%; }
.dow-pick .quick { font-size: 0.85rem; margin-left: 6px; }
.seg-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-pick legend { width: 100%; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-weight: 500; }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.chan-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.chan { border: 1px solid var(--line2); border-radius: var(--r-lg); padding: 14px 16px; }
.chan.on { border-color: #cfcfcf; }
.chan-top { display: flex; align-items: center; gap: 10px; }
.chan-top .badge { margin-left: auto; }
.chan-badge { width: 30px; height: 30px; border-radius: 8px; color: #fff; display: grid; place-items: center; font-weight: 700; }
.feed-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0 0; margin-top: 10px; border-top: 1px solid var(--line2); }
.feed-row small { display: block; color: var(--muted); }
.feed-row .url { word-break: break-all; }
.feed-row .err { color: var(--err); }
.feed-actions { display: flex; gap: 6px; align-items: start; }
.chan details { margin-top: 6px; }
.chan details summary { font-size: 0.85rem; }
.feed-form { display: flex; gap: 8px; margin: 8px 0 12px; }
.feed-form input { min-height: 40px; padding: 8px 12px; font-size: 0.9rem; }
.sync-foot { padding: 16px 0 24px; }
.sync-foot h3 { font-size: 1rem; margin-bottom: 6px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; opacity: 0; transition: .2s; pointer-events: none; z-index: 1000; max-width: 90vw; font-weight: 500; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--err); }
@media (max-width: 900px) { .toast { bottom: 84px; } }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: var(--soft); }
.login { width: 100%; max-width: 400px; display: grid; gap: 16px; padding: 32px; background: #fff; border: 1px solid var(--line2); border-radius: 20px; box-shadow: var(--shadow-sm); }
.login h1 { font-size: 1.4rem; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--brand); text-decoration: none; font-family: var(--serif); font-size: 1.15rem; }
.brand .logo { width: 30px; height: 30px; color: var(--brand); }
.brand.dark { padding: 0 0 4px; }
.err-page { padding: 80px 0; text-align: center; }
.table th.num { text-align: right; }

/* Tags */
.tg { display: inline-flex; align-items: center; font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.tg.t-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.tg.t-gold { background: var(--gold); color: #2a1e02; border-color: var(--gold); }
.tg.t-rose { background: #e0565b; color: #fff; border-color: #e0565b; }
.tg.t-green { background: var(--brand); color: #fff; border-color: var(--brand); }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.lc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.tone-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; border: 1px solid var(--line); background: #fff; vertical-align: -1px; }
.tone-dot.t-dark { background: var(--ink); } .tone-dot.t-gold { background: var(--gold); } .tone-dot.t-rose { background: #e0565b; } .tone-dot.t-green { background: var(--brand); }
.new-tag { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line2); }
.srow.new-tag { align-items: flex-end; }

.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; max-width: 560px; }
.icon-pick label { position: relative; }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick span { display: grid; place-items: center; height: 40px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--ink2); }
.icon-pick span:hover { border-color: var(--ink); }
.icon-pick input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-pick input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.am-h { display: flex; align-items: center; gap: 12px; }
.chip-check span .ic { vertical-align: -4px; margin-right: 6px; }
.hero-pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 8px; }
.hero-pic { position: relative; }
.hero-pic img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; display: block; }
.hero-pic .btn { position: absolute; left: 10px; bottom: 10px; background: #fff; }

.leads { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }
.lead { margin: 0; display: grid; gap: 10px; align-content: start; }
.lead-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.lead-head h3 { font-size: 1.15rem; }
.lead-head p { margin: 2px 0 0; }
.lead-head select { width: auto; min-height: 38px; padding: 6px 10px; }
.lead-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; border-top: 1px solid var(--line2); padding-top: 12px; }
.lead .wrap-text { max-width: none; margin: 0; }
@media (max-width: 500px) { .leads { grid-template-columns: 1fr; } }

/* Team */
.team { display: grid; gap: 8px; }
.members { display: grid; gap: 14px; margin: 16px 0 28px; }
.member { margin: 0; }
.member.off { opacity: .6; }
.member-head { display: flex; gap: 14px; align-items: flex-start; }
.member-head > div { flex: 1; min-width: 0; }
.member-head h3 { font-size: 1.1rem; }
.member-head p { margin: 2px 0 0; }
.member-form { margin-top: 16px; border-top: 1px solid var(--line2); padding-top: 16px; }
.member-extra { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line2); }
.inline-reset { display: flex; gap: 8px; margin-top: 6px; }
.inline-reset input { min-height: 36px; padding: 6px 10px; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.role-pick legend { grid-column: 1 / -1; }
.perm { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 14px; }
.perm-list { display: grid; gap: 4px; }
.perm-item { align-items: flex-start !important; padding: 8px 0; }
.perm-item input { margin-top: 2px !important; }
.perm-item b { display: block; font-weight: 600; }
.perm-item small { display: block; color: var(--muted); font-weight: 400; }
@media (max-width: 760px) { .perm, .role-pick { grid-template-columns: 1fr; } }

.le-link { display: grid; gap: 6px; margin: 0 0 20px; padding: 12px 14px; background: var(--soft); border-radius: 14px; font-size: 0.85rem; }
.le-link > span:first-child { font-weight: 600; }
.le-link .copy input { background: #fff; }
.le-link-acts { color: var(--muted); }

/* Phone with country code */
.field { display: block; font-weight: 600; font-size: 0.875rem; }
.phone-field { display: flex; margin-top: 6px; border: 1px solid var(--pf-line, #b0b0b0); border-radius: 10px; background: #fff; overflow: hidden; }
.phone-field:focus-within { outline: 2px solid var(--pf-ink, #1e2521); outline-offset: -1px; border-color: transparent; }
.pf-cc { position: relative; flex: none; display: flex; align-items: center; padding: 0 10px 0 12px; border-right: 1px solid var(--pf-line, #b0b0b0); background: #fafbf9; font-weight: 500; white-space: nowrap; }
.pf-cc::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: -3px 0 0 8px; opacity: .6; }
.pf-cc select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; min-height: 0; margin: 0; border: 0; }
.phone-field input[data-num] { border: 0; border-radius: 0; margin: 0 !important; flex: 1; min-width: 0; outline: none; }
