/* Ownerstat portal. Same tokens and type as the landing page (ownerstat.com). */
:root{
  --bg:#F3F6F8; --surface:#FFFFFF; --paper:#FFFFFF; --fg:#10212E; --muted:#4F6273; --line:#D3DCE4; --line-strong:#B7C4CF;
  --accent:#0B7A75; --accent-ink:#FFFFFF; --accent-soft:#DCEFED; --clay:#A4472B; --mark:#9A5F12; --mark-soft:#F6EAD8; --ok:#1F7A4D; --bad:#B42318; --bad-soft:#FDECEA;
  --display:"Unbounded","Golos Text",system-ui,sans-serif; --body:"Golos Text",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){ :root{
  --bg:#0E171E; --surface:#152128; --paper:#1A272F; --fg:#E7EEF2; --muted:#A3B4C0; --line:#28383F; --line-strong:#3A4C55;
  --accent:#4CC2B8; --accent-ink:#06211F; --accent-soft:#173A38; --clay:#E07A5A; --mark:#E2A651; --mark-soft:#3A2C17; --ok:#5CC48E; --bad:#F97066; --bad-soft:#3B1D1B; color-scheme:dark } }

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scrollbar-color:var(--line-strong) var(--bg)}
body{background:var(--bg);color:var(--fg);font-family:var(--body);font-size:16px;line-height:1.5;margin:0;min-height:100vh;display:flex;flex-direction:column;caret-color:var(--accent)}
::selection{background:var(--accent);color:var(--accent-ink)}
[hidden]{display:none!important}
.wrap{width:100%;max-width:1120px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
h1,h2,h3{font-family:var(--display);text-wrap:balance;margin:0;line-height:1.2}
h1{font-size:clamp(1.4rem,2.4vw,1.85rem);font-weight:700;letter-spacing:-.01em}
h2{font-size:1.12rem;font-weight:500}
h3{font-family:var(--body);font-size:1rem;font-weight:600}
p{margin:0}
a{color:var(--accent);text-underline-offset:3px;text-decoration-thickness:1px}
a:hover{text-decoration-thickness:2px}
.muted{color:var(--muted)}
.small{font-size:.86rem}
.num{font-variant-numeric:tabular-nums;white-space:nowrap}
.ic{width:1em;height:1em;flex:0 0 auto;vertical-align:-.13em}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;border-radius:8px;font:inherit;font-weight:600;font-size:.93rem;text-decoration:none;cursor:pointer;border:1px solid transparent;background:none;color:var(--fg);line-height:1.2;white-space:nowrap}
.btn-primary{background:var(--accent);color:var(--accent-ink)}
.btn-primary:hover{background:color-mix(in srgb,var(--accent) 88%,var(--fg))}
.btn-ghost{border-color:var(--line-strong);background:var(--surface)}
.btn-ghost:hover{border-color:var(--fg)}
.btn-quiet{padding:6px 8px;color:var(--muted);font-weight:500}
.btn-quiet:hover{color:var(--fg)}
.btn-danger{color:var(--bad)}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.btn-sm{padding:6px 11px;font-size:.85rem}
@media (prefers-reduced-motion:no-preference){ .btn{transition:background-color .15s ease,border-color .15s ease,color .15s ease} }

/* language switch */
.lang{display:flex;border:1px solid var(--line);border-radius:999px;overflow:hidden;flex:0 0 auto}
.lang a{padding:5px 10px;font-size:.78rem;font-weight:600;color:var(--muted);text-decoration:none}
.lang a[aria-current="true"]{background:var(--fg);color:var(--bg)}

/* header */
header.app{position:sticky;top:0;z-index:5;background:var(--bg)}
/* Cypro-Geometric register band and compass rings (direction contract in .impeccable/surfaces) */
.band{height:12px;background:repeating-linear-gradient(90deg,var(--clay) 0 2px,transparent 2px 9px) center/100% 5px no-repeat,linear-gradient(var(--fg),var(--fg)) top/100% 2px no-repeat,linear-gradient(var(--fg),var(--fg)) bottom/100% 1px no-repeat}
.rings{flex:0 0 auto;display:block}
.rings .arc{stroke-linecap:butt}
@media (prefers-reduced-motion:no-preference){ .rings .arc{animation:compass 1.4s cubic-bezier(.2,.7,.2,1) both} .rings .arc.late{animation-delay:.35s} }
@keyframes compass{from{stroke-dasharray:0 400}}
.prop .name-row{display:flex;gap:14px;align-items:center;min-width:0}
.st-seal{display:flex;align-items:center;gap:12px}
.legend{display:flex;flex-direction:column;gap:4px;font-size:.78rem;color:var(--muted)}
.legend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px}
.legend .clay{background:var(--clay)} .legend .teal{background:var(--accent)}
.bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:10px}
.mgr{display:flex;align-items:center;gap:10px;min-width:0;text-decoration:none;color:var(--fg)}
.mgr-logo{flex:0 0 34px;height:34px;border-radius:8px;background:var(--fg);color:var(--bg);display:grid;place-items:center;font-family:var(--display);font-weight:700;font-size:.6rem;letter-spacing:-.03em;overflow:hidden}
.mgr-logo img{width:100%;height:100%;object-fit:contain;background:#fff}
.mgr-name{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.mgr-name b{font-weight:600;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mgr-name small{font-size:.74rem;color:var(--muted)}
.bar-right{display:flex;align-items:center;gap:12px;flex:0 0 auto}
.who{display:flex;align-items:center;gap:8px;font-size:.88rem}
.avatar{width:30px;height:30px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-weight:700;font-size:.78rem}
nav.tabs{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;margin-bottom:-1px}
nav.tabs::-webkit-scrollbar{display:none}
nav.tabs a{flex:0 0 auto;padding:10px 14px;text-decoration:none;color:var(--muted);font-weight:600;font-size:.92rem;border-bottom:2px solid transparent}
nav.tabs a:hover{color:var(--fg)}
nav.tabs a[aria-current="page"]{color:var(--fg);border-bottom-color:var(--accent)}
main{flex:1;padding-block:28px 56px;display:flex;flex-direction:column;gap:28px}
footer.app{padding-block:18px 28px;color:var(--muted);font-size:.8rem}
footer.app .orn{display:block;margin-top:4px}
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 20px}
.page-head > div{display:flex;flex-direction:column;gap:6px;min-width:0}
.page-head > .actions{flex-direction:row;align-items:center}
.back{display:inline-flex;gap:6px;align-items:center;text-decoration:none;font-weight:600;font-size:.9rem}

/* messages */
.flash{display:flex;flex-direction:column;gap:8px}
.flash p{padding:10px 14px;border-radius:8px;background:var(--accent-soft);color:var(--fg);font-size:.92rem;border:1px solid color-mix(in srgb,var(--accent) 35%,transparent)}
.flash p.error{background:var(--bad-soft);border-color:color-mix(in srgb,var(--bad) 35%,transparent)}

/* figures row (overview) */
.figures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--fg);border-bottom:1px solid var(--line)}
.figure{padding:16px 20px 18px 0;display:flex;flex-direction:column;gap:4px;min-width:0}
.figure + .figure{padding-left:20px;border-left:1px solid var(--line)}
.figure span{font-size:.86rem;color:var(--muted)}
.figure b{font-family:var(--display);font-size:1.45rem;font-weight:700;line-height:1.15;font-variant-numeric:tabular-nums}
.figure b.accent{color:var(--accent)}

/* property rows */
.props{display:flex;flex-direction:column;border-top:1px solid var(--fg)}
.prop{display:grid;grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,.7fr)) auto;gap:8px 20px;padding-block:16px;border-bottom:1px solid var(--line);align-items:center}
.prop .name{display:flex;flex-direction:column;gap:4px;min-width:0}
.prop .name small{color:var(--muted);font-size:.85rem}
.stat{display:flex;flex-direction:column;gap:2px;min-width:0}
.stat span{font-size:.78rem;color:var(--muted)}
.stat b{font-weight:600}
.tag{display:inline-flex;align-items:center;gap:5px;font-size:.76rem;padding:2px 8px;border-radius:4px;background:var(--accent-soft);color:var(--accent);font-weight:600;white-space:nowrap;line-height:1.4;width:fit-content}
.tag.ok{background:transparent;color:var(--ok);border:1px solid currentColor;padding:1px 7px}
.tag.warn{background:var(--mark-soft);color:var(--mark)}
.tag.bad{background:var(--bad-soft);color:var(--bad)}
.tag.draft{background:transparent;color:var(--muted);border:1px dashed var(--line-strong)}

/* chips */
.chips,.page-head > .chips{display:flex;flex-direction:row;gap:8px;flex-wrap:wrap}
.chip{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:6px 14px;font-size:.85rem;font-weight:600;color:var(--muted);text-decoration:none}
.chip[aria-current="true"]{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}

/* tables as ledgers */
.ledger{width:100%;border-collapse:collapse;font-size:.93rem}
.ledger th{text-align:left;font-size:.78rem;color:var(--muted);font-weight:600;padding:0 12px 8px 0;border-bottom:1px solid var(--fg);white-space:nowrap}
.ledger td{padding:12px 12px 12px 0;border-bottom:1px solid var(--line);vertical-align:middle}
.ledger .r{text-align:right;padding-right:0}
.ledger .bk{padding-left:20px}
.ledger tr.link{cursor:pointer}
.ledger tr.link:hover td{background:color-mix(in srgb,var(--accent-soft) 55%,transparent)}
.ledger tr.off td{color:var(--muted);text-decoration:line-through}
.ledger tr.off td.keep{text-decoration:none}
.scroll-x{overflow-x:auto}

/* statement document */
.st-wrap{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:28px;align-items:start}
.statement{background:var(--paper);border:1px solid var(--line);border-radius:6px;padding:26px 28px;box-shadow:0 1px 0 var(--line),0 24px 48px -36px rgba(10,30,40,.5);font-size:.93rem;min-width:0}
.st-head{display:flex;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.st-head .l{display:flex;flex-direction:column;gap:4px;min-width:0}
.st-head .l > b{font-family:var(--display);font-weight:500;font-size:1.08rem}
.st-meta{font-size:.84rem;color:var(--muted)}
.st-sec{padding-block:14px;border-bottom:1px solid var(--line)}
.st-sec:last-child{border-bottom:0;padding-bottom:0}
.st-title{font-size:.8rem;color:var(--muted);margin-bottom:8px;font-weight:600}
.row{display:flex;justify-content:space-between;gap:12px;padding-block:4px;align-items:baseline}
.row > span:first-child{min-width:0}
.row.total{font-weight:600;border-top:1px dashed var(--line-strong);margin-top:4px;padding-top:8px}
.row.net{font-family:var(--display);font-weight:500;font-size:1.12rem;color:var(--accent)}
.row.me{font-weight:600}
.row:has(.thumb){align-items:center}
.st-note{font-size:.82rem;color:var(--muted);margin-top:6px}
.st-note.num{white-space:normal}
.exp{display:flex;align-items:center;gap:10px;min-width:0}
.thumb{display:block;width:36px;height:36px;border-radius:4px;overflow:hidden;flex:0 0 36px;border:1px solid var(--line)}
.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.side{display:flex;flex-direction:column;gap:12px;position:sticky;top:116px}
.box{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:10px}
.box .btn{width:100%}
.box.split{flex-direction:row}
.box.split .btn{flex:1;width:auto}
.ph-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ph-grid a{display:block;aspect-ratio:1;border-radius:6px;overflow:hidden;border:1px solid var(--line)}
.ph-grid img{width:100%;height:100%;object-fit:cover;display:block}

/* documents */
.docs{display:flex;flex-direction:column;border-top:1px solid var(--fg)}
.doc{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:14px;align-items:center;padding-block:12px;border-bottom:1px solid var(--line)}
.doc .meta{font-size:.82rem;color:var(--muted)}
.dicon{width:36px;height:44px;border:1px solid var(--line-strong);border-radius:4px;display:grid;place-items:end center;padding-bottom:5px;font-size:.58rem;font-weight:700;color:var(--accent);background:var(--surface);position:relative;text-transform:uppercase}
.dicon::before{content:"";position:absolute;top:8px;left:7px;right:7px;height:2px;background:var(--line);box-shadow:0 5px 0 var(--line),0 10px 0 var(--line)}
.group{display:flex;flex-direction:column;gap:12px}

/* photos */
.gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.gallery figure{margin:0;display:flex;flex-direction:column;gap:8px;min-width:0}
.gallery figure > a{display:block;aspect-ratio:4/3;border-radius:6px;overflow:hidden;border:1px solid var(--line);background:var(--surface)}
.gallery img{width:100%;height:100%;object-fit:cover;display:block}
.gallery figcaption{font-size:.88rem;display:flex;flex-direction:column;gap:2px}
.gallery figcaption small{color:var(--muted);font-size:.78rem}

/* forms */
.form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;max-width:760px}
.form.one{grid-template-columns:1fr;max-width:460px}
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field.full{grid-column:1/-1}
label,.label{font-size:.86rem;font-weight:600}
.help{font-size:.8rem;color:var(--muted)}
.err{font-size:.82rem;color:var(--bad)}
input,select,textarea{font:inherit;font-size:.95rem;padding:10px 12px;border:1px solid var(--line-strong);border-radius:6px;background:var(--surface);color:var(--fg);width:100%;min-width:0}
input:hover,select:hover,textarea:hover{border-color:var(--muted)}
input[type=file]{padding:8px;background:var(--bg)}
input[type=checkbox]{width:auto;accent-color:var(--accent)}
textarea{min-height:84px;resize:vertical}
.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.section{display:flex;flex-direction:column;gap:14px;padding-top:24px;border-top:1px solid var(--line)}
.section-head{display:flex;flex-direction:column;gap:4px;max-width:46em}
.inline-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:end}
.inline-form .wide{grid-column:span 2}
.uploads{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.upload{display:flex;flex-direction:column;gap:10px;padding:16px;border:1px dashed var(--line-strong);border-radius:8px;background:var(--surface)}
.cal-card{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:18px;min-width:0}
.cal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.cal-head h2{margin:0}
.cal-nav{display:flex;gap:6px;align-items:center}
.cal{display:flex;flex-direction:column;gap:4px}
.cal-row{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.cal-wd span{font-size:.72rem;font-weight:600;color:var(--muted);text-align:center;padding-bottom:2px}
.cal .d{--st-free:var(--surface);--st-booked:var(--accent-soft);--st-stay:var(--clay);--st-request:color-mix(in srgb,var(--clay) 14%,var(--surface));--st-blocked:color-mix(in srgb,var(--line-strong) 55%,var(--surface));
  --cur:var(--st-free);--prev:var(--st-free);position:relative;height:clamp(44px,6vw,64px);border-radius:7px;background:var(--cur);box-shadow:inset 0 0 0 1px var(--line);
  display:flex;align-items:flex-start;justify-content:flex-start;padding:5px 7px;font-size:.82rem;min-width:0;color:var(--fg)}
.cal .d b{font-weight:600;font-variant-numeric:tabular-nums;line-height:1.2;border-radius:4px}
.cal .d.booked{--cur:var(--st-booked);box-shadow:none;color:var(--accent)}
.cal .d.stay{--cur:var(--st-stay);box-shadow:none;color:#fff}
.cal .d.request{--cur:var(--st-request);box-shadow:inset 0 0 0 2px var(--clay);color:var(--clay)}
.cal .d.blocked{--cur:var(--st-blocked);box-shadow:none;color:var(--muted)}
.cal .d.from-booked{--prev:var(--st-booked)}
.cal .d.from-stay{--prev:var(--st-stay)}
.cal .d.from-request{--prev:var(--st-request)}
.cal .d.from-blocked{--prev:var(--st-blocked)}
.cal .d.turn{background:linear-gradient(135deg,var(--prev) 0 49.6%,var(--cur) 50.4% 100%);box-shadow:inset 0 0 0 1px var(--line)}
.cal .d.turn b{background:color-mix(in srgb,var(--surface) 85%,transparent);color:var(--fg);padding:0 4px;margin:-1px -3px}
.cal .d.out{opacity:.35}
.cal .d.past{opacity:.55}
.cal .d.today b{background:var(--fg);color:var(--surface);padding:0 5px;margin:-1px -3px}
.cal-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:14px;font-size:.82rem;color:var(--muted)}
.cal-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-1px;border:1px solid var(--line)}
.cal-legend i.booked{background:var(--accent-soft);border-color:var(--accent)}
.cal-legend i.stay{background:var(--clay);border-color:var(--clay)}
.cal-legend i.request{border:2px solid var(--clay);background:color-mix(in srgb,var(--clay) 14%,var(--surface))}
.cal-legend i.blocked{background:color-mix(in srgb,var(--line-strong) 55%,var(--surface));border-color:transparent}
.cal-legend i.turn{background:linear-gradient(135deg,var(--accent-soft) 0 49%,var(--surface) 51%);border-color:var(--accent)}
.cal-legend i.free{background:var(--bg)}
.stay-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding-block:8px;border-top:1px solid var(--line)}
.stay-row .meta{font-size:.82rem;color:var(--muted);margin-top:3px}
.task-list{display:flex;flex-direction:column;gap:12px}
.task-card{background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--clay);border-radius:8px;padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.task-card.done{border-left-color:var(--ok);opacity:.8}
.task-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.task-card .meta,.task-row .meta{font-size:.82rem;color:var(--muted);margin-top:3px}
.task-done{display:flex;flex-direction:column;gap:8px}
.task-done .btn{width:100%}
.task-row.done{opacity:.7}
.task-row .actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.task-row select{max-width:180px}
.task-thumbs{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.task-thumbs img{width:56px;height:56px;object-fit:cover;border-radius:6px;border:1px solid var(--line)}
.req{display:flex;flex-direction:column;gap:8px;padding:14px 0;border-bottom:1px solid var(--line)}
.req:first-of-type{border-top:1px solid var(--fg)}
.req-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.req-head .meta{font-size:.82rem;color:var(--muted);margin-top:3px}
.req-total{font-family:var(--display);font-size:1.15rem}
.req-actions{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
.listing-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.listing-photos figure{margin:0;display:flex;flex-direction:column;gap:6px}
.listing-photos img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:6px;border:1px solid var(--line)}
.listing-photos figcaption{display:flex;justify-content:space-between;align-items:center;gap:6px}
@media (max-width:620px){ .req-actions{grid-template-columns:1fr 1fr} .req-actions input{grid-column:span 2} }
.note{display:flex;gap:12px 20px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:12px 16px;border-radius:8px;border:1px solid var(--line);background:var(--surface);font-size:.9rem}
.note.warn{background:var(--mark-soft);border-color:color-mix(in srgb,var(--mark) 35%,transparent);align-items:flex-start}
.note ul{margin:6px 0 0;padding-left:18px}
.note form{margin:0}
.conn-rows{display:flex;flex-direction:column;border-top:1px solid var(--fg)}
.conn-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:12px;align-items:center;padding-block:10px;border-bottom:1px solid var(--line)}
.copybox{display:flex;gap:8px}
.copybox input{font-size:.85rem}

/* editor layout */
.editor{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:28px;align-items:start}
.editor .summary{position:sticky;top:116px}

/* onboarding checklist */
.onboard{display:flex;flex-direction:column;gap:14px;padding:20px 22px;background:var(--surface);border:1px solid var(--line);border-radius:8px}
.steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;border-top:1px solid var(--fg)}
.steps-list li{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:14px;align-items:center;padding-block:12px;border-bottom:1px solid var(--line)}
.steps-list li > div{display:flex;flex-direction:column;gap:2px;min-width:0}
.steps-list .tick{width:28px;height:28px;border-radius:50%;border:2px solid var(--clay);display:grid;place-items:center;font-weight:700;font-size:.82rem;color:var(--clay)}
.steps-list li.done .tick{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.steps-list li.done b{color:var(--muted);text-decoration:line-through;text-decoration-thickness:1px}
.check{display:flex;gap:10px;align-items:flex-start;font-size:.88rem;font-weight:500}
.check input{margin-top:2px;width:18px;height:18px;flex:0 0 18px}
.hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}

/* login */
.login{flex:1;display:grid;place-items:center;padding-block:40px}
.login-card{width:100%;max-width:420px;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:28px 24px;display:flex;flex-direction:column;gap:18px;box-shadow:0 24px 48px -36px rgba(10,30,40,.5)}
.login-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.brand{font-family:var(--display);font-weight:500;font-size:.95rem;display:flex;align-items:center;gap:10px;color:var(--fg);text-decoration:none}
.brand i{width:12px;height:12px;background:var(--accent);display:inline-block;border-radius:2px}
.login-foot{font-size:.82rem;color:var(--muted)}
.empty{padding:28px 0;color:var(--muted)}

@media (max-width:900px){
  .st-wrap,.editor{grid-template-columns:1fr}
  .side,.editor .summary{position:static}
  .gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
  .inline-form{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inline-form .wide{grid-column:1/-1}
  .inline-form > .btn{grid-column:1/-1}
}
@media (max-width:720px){
  .figures{grid-template-columns:1fr}
  .figure + .figure{padding-left:0;border-left:0;border-top:1px solid var(--line)}
  .prop{grid-template-columns:repeat(3,minmax(0,1fr))}
  .prop .name{grid-column:1/-1}
  .prop .go{grid-column:1/-1}
  .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form,.uploads,.conn-row{grid-template-columns:1fr}
  .statement{padding:18px 16px}
  .statement .ledger{font-size:.84rem}
  .statement .ledger td,.statement .ledger th{padding-right:8px}
  .who .nm,.mgr-name small{display:none}
  .ledger.stack thead{display:none}
  .ledger.stack tr{display:grid;grid-template-columns:minmax(0,1fr) auto;padding-block:10px;border-bottom:1px solid var(--line)}
  .ledger.stack td{border:0;padding:2px 0}
  .ledger.stack td.r{text-align:right}
}
@media print{
  header.app,footer.app,.side,.back,.flash,.no-print{display:none!important}
  body{background:#fff;color:#000}
  main{padding:0}
  .st-wrap{display:block}
  .statement{box-shadow:none;border:0;padding:0}
}

/* date picker */
.dp-btn{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:9px 12px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);
  color:var(--fg);font:inherit;font-size:.95rem;text-align:left;cursor:pointer}
.dp-btn:hover{border-color:var(--accent)}
.dp-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.dp-btn .ic{flex:0 0 auto;width:16px;height:16px;color:var(--muted)}
.dp-btn > span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dp-ph{color:var(--muted)}
.dp-pop{position:absolute;z-index:50;width:328px;padding:12px;background:var(--surface);border:1px solid var(--line-strong);border-radius:12px;
  box-shadow:0 16px 40px rgba(16,33,46,.18)}
.dp-pop.sheet{position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;border-radius:16px 16px 0 0;padding:14px 16px max(16px,env(safe-area-inset-bottom))}
.dp-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.dp-sel{display:flex;gap:6px;min-width:0;flex:1 1 auto}
.dp-sel select{-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23667' stroke-width='1.6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;height:36px;padding:0 24px 0 10px;border:1px solid var(--line);border-radius:8px;background-color:var(--surface);color:var(--fg);font:inherit;font-weight:600;font-size:.92rem;min-width:0;cursor:pointer}
.dp-sel .dp-month{flex:1 1 0;width:auto;max-width:none}.dp-sel .dp-year{flex:0 0 76px;width:76px}
.dp-sel select:hover,.dp-sel select:focus-visible{border-color:var(--accent);outline:none}
.dp-head{gap:6px}
.dp-nav{flex:0 0 36px;width:36px;padding:0;height:36px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--fg);font-size:1.2rem;line-height:1;cursor:pointer}
.dp-nav:hover{border-color:var(--accent)}
.dp-hint{font-size:.8rem;color:var(--muted);margin:0 0 6px}
.dp-wd,.dp-days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.dp-wd span{font-size:.7rem;font-weight:600;color:var(--muted);text-align:center;padding:4px 0}
.dp-d{height:38px;border:0;border-radius:8px;background:transparent;color:var(--fg);font:inherit;font-size:.9rem;font-variant-numeric:tabular-nums;cursor:pointer}
.dp-pop.sheet .dp-d{height:44px}
.dp-d:hover:not([disabled]){background:var(--accent-soft)}
.dp-d:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.dp-d[disabled]{color:var(--muted);opacity:.45;cursor:default}
.dp-d.busy[disabled]{text-decoration:line-through}
.dp-d.today{box-shadow:inset 0 0 0 1px var(--fg)}
.dp-d.in{background:var(--accent-soft);border-radius:0}
.dp-d.rs,.dp-d.re,.dp-d.sel{background:var(--accent);color:var(--accent-ink);opacity:1}
.dp-foot{display:flex;justify-content:space-between;margin-top:8px}
.dp-foot button{border:0;background:none;color:var(--accent);font:inherit;font-weight:600;padding:8px 4px;cursor:pointer}
.dp-clear{color:var(--muted)!important}

.gp-row.is-new{background:var(--accent-soft);border-radius:8px;padding-inline:10px}
.gp-row .actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
.gp-row{grid-template-columns:minmax(0,1fr) auto}
@media (max-width:620px){ .gp-row{grid-template-columns:1fr;gap:8px} .gp-row .actions{justify-content:flex-start} }

/* language tabs in editors */
.lang-tabs{display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.lang-tab-bar{display:none;gap:6px;flex-wrap:wrap}
.lang-tabs.js .lang-tab-bar{display:flex}
.lang-tabs.js .lang-panel-head{display:none}
.lang-tab{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--muted);font:inherit;font-weight:600;font-size:.88rem;cursor:pointer}
.lang-tab[aria-selected="true"]{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
.lang-count{font-size:.74rem;font-weight:600;padding:1px 7px;border-radius:999px;background:var(--mark-soft);color:var(--mark)}
.lang-count.full{background:transparent;color:var(--ok);box-shadow:inset 0 0 0 1px currentColor}
.lang-count.empty{background:var(--bad-soft);color:var(--bad)}
.lang-panel{display:flex;flex-direction:column;gap:14px}
.lang-panel-head{margin:6px 0 0;font-weight:700}
.lang-panel textarea{resize:vertical}
.lang-tabs.full{grid-column:1/-1}
.inv-box{display:flex;flex-direction:column;gap:8px;padding-top:12px;margin-top:4px;border-top:1px dashed var(--line-strong)}
.ap-card{display:flex;flex-direction:column;gap:10px;padding:16px 18px;margin-bottom:12px;background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--mark);border-radius:8px}
.ap-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.ap-head .meta{font-size:.82rem;color:var(--muted);margin-top:3px}
.ap-sum{font-family:var(--display);font-size:1.2rem}
.ap-decide{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
@media (max-width:620px){ .ap-decide{grid-template-columns:1fr 1fr} .ap-decide input{grid-column:span 2} }
/* owner analytics: palettes validated with the dataviz validator against --surface in both modes */
.an-filters{display:flex;flex-wrap:wrap;gap:10px 24px;margin:-6px 0 20px}
.an-tiles{display:grid;grid-template-columns:1.4fr repeat(3,minmax(0,1fr));gap:12px;margin-bottom:20px}
.an-tile{display:flex;flex-direction:column;gap:4px;padding:16px 18px;background:var(--surface);border:1px solid var(--line);border-radius:10px;min-width:0}
.an-label{font-size:.82rem;color:var(--muted)}
.an-value{font-family:var(--body);font-weight:600;font-size:1.7rem;line-height:1.15;color:var(--fg)}
.an-tile.hero .an-value{font-size:3rem}
.an-delta{font-size:.84rem;font-weight:600}
.an-delta.up{color:var(--ok)}
.an-delta.down{color:var(--bad)}
.an-delta .muted{font-weight:400}
.viz-card{--viz-cur:#008C82;--viz-prev:#C4552F;--viz-s1:#2a78d6;--viz-s2:#eb6834;--viz-s3:#1baf7a;--viz-s4:#eda100;--viz-s5:#e87ba4;
  background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:18px 20px;margin-bottom:16px}
@media (prefers-color-scheme: dark){ .viz-card{--viz-cur:#22A194;--viz-prev:#D96C4A;--viz-s1:#3987e5;--viz-s2:#d95926;--viz-s3:#199e70;--viz-s4:#c98500;--viz-s5:#d55181} }
.viz-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.viz-head h2{margin:0;font-size:1.05rem}
.viz-card > p{margin:4px 0 10px}
.viz-legend{display:flex;gap:16px;font-size:.84rem;color:var(--muted)}
.viz-legend span{display:inline-flex;align-items:center;gap:6px}
.k{display:inline-block;width:12px;height:12px;border-radius:3px;flex:0 0 auto}
.k.cur{background:var(--viz-cur)}.k.prev{background:var(--viz-prev)}
.k.s1,.seg.s1{background:var(--viz-s1)}.k.s2,.seg.s2{background:var(--viz-s2)}.k.s3,.seg.s3{background:var(--viz-s3)}.k.s4,.seg.s4{background:var(--viz-s4)}.k.s5,.seg.s5{background:var(--viz-s5)}
.viz-wrap{position:relative}
.viz{display:block;width:100%;height:auto;overflow:visible}
.viz .grid{stroke:var(--line);stroke-width:1}
.viz .tick{fill:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.viz .bar.cur{fill:var(--viz-cur)}.viz .bar.prev{fill:var(--viz-prev)}
.viz .line{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.viz .line.cur{stroke:var(--viz-cur)}.viz .line.prev{stroke:var(--viz-prev)}
.viz .dot{stroke:var(--surface);stroke-width:2}
.viz .dot.cur{fill:var(--viz-cur)}.viz .dot.prev{fill:var(--viz-prev)}
.viz .hit{fill:transparent;cursor:default;outline:none}
.viz .hit.on,.viz .hit:focus-visible{fill:color-mix(in srgb,var(--fg) 5%,transparent)}
.viz-tip{position:absolute;pointer-events:none;z-index:3;transform:translateY(-100%);margin-top:-6px;padding:8px 10px;background:var(--fg);color:var(--surface);
  border-radius:8px;font-size:.82rem;line-height:1.45;white-space:nowrap;box-shadow:0 6px 18px rgba(16,33,46,.2)}
.mix-bar{display:flex;gap:2px;height:18px;margin:6px 0 12px}
.mix-bar .seg{display:block;height:100%;min-width:4px}
.mix-bar .seg:first-child{border-radius:4px 0 0 4px}.mix-bar .seg:last-child{border-radius:0 4px 4px 0}
.mix-legend{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px 18px}
.mix-legend li{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:8px;align-items:center;font-size:.9rem}
.an-table td,.an-table th{white-space:nowrap}
@media (max-width:900px){ .an-tiles{grid-template-columns:1fr 1fr} .an-tile.hero{grid-column:span 2} }
@media (max-width:520px){ .an-tile.hero .an-value{font-size:2.1rem} .an-value{font-size:1.4rem} }
.an-table tr.an-gap td{color:var(--muted)}
.an-table th,.an-table td{padding-inline:10px}
.an-table th:first-child,.an-table td:first-child{padding-left:0}
@media (max-width:900px){ .an-tiles .an-tile:last-child{grid-column:span 2} }
@media (max-width:640px){
  .viz-wrap{overflow-x:auto;overscroll-behavior-x:contain;margin-inline:-6px;padding-inline:6px}
  .viz{min-width:620px}
  .viz-card > p.muted{margin-bottom:6px}
}
@media (max-width:640px){ .viz .tick{font-size:13px} }
/* installed app */
.app-hint{margin-bottom:16px}
.in-app header.app{padding-top:env(safe-area-inset-top)}
.in-app footer.app{padding-bottom:max(16px,env(safe-area-inset-bottom))}
.install-app{display:none}
.pwa-can .install-app{display:inline-flex}
.in-app .install-app{display:none}
@media (max-width:620px){ .install-app{padding-inline:10px} }
.offline-page{min-height:100vh;display:grid;place-items:center;background:var(--bg)}
.offline{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:24px;max-width:420px}
.offline img{border-radius:16px}
.offline h1{margin:8px 0 0;font-family:var(--display);font-size:1.4rem}
.hi-steps{list-style:none;display:flex;flex-wrap:wrap;gap:8px 22px;margin:-6px 0 22px;padding:0;font-size:.9rem;color:var(--muted)}
.hi-steps li{display:inline-flex;align-items:center;gap:8px}
.hi-steps li span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1.5px solid var(--line-strong);font-weight:700;font-size:.78rem}
.hi-steps li.on{color:var(--fg);font-weight:600}.hi-steps li.on span{border-color:var(--accent);background:var(--accent);color:var(--accent-ink)}
.hi-steps li.ok span{border-color:var(--accent);color:var(--accent)}
.pr-hint{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;margin-bottom:8px;border-radius:8px;
  background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--mark)}
.pr-hint.lastminute{border-left-color:var(--accent)}
.pr-hint form{margin:0}
#cal{scroll-margin-top:12px}
.team-row{border-bottom:1px solid var(--line)}
.team-edit{padding:0 0 14px 50px}
.team-edit summary{cursor:pointer;color:var(--accent);font-weight:600;font-size:.9rem;width:max-content}
.team-edit form{display:grid;gap:12px;margin-top:10px;max-width:520px}
.team-roles{border:0;margin:0;padding:0;display:grid;gap:6px}
.team-roles .radio{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border:1px solid var(--line);border-radius:8px;cursor:pointer}
.team-roles .radio input{flex:0 0 16px;width:16px;height:16px;padding:0;margin:3px 0 0;accent-color:var(--accent)}
.team-roles .radio > span{display:grid;gap:2px}
.team-props .check{display:flex;gap:8px;align-items:center;font-size:.92rem;padding:3px 0}
.team-props .check input{flex:0 0 16px;width:16px;height:16px;padding:0;margin:0;accent-color:var(--accent)}
.team-prop-list{padding-left:22px}
.team-edit form:has(input[name=team_role][value=manager]:not(:checked)) .team-props{display:none}
.team-props:has(input[name=all_properties]:checked) .team-prop-list{display:none}
@media (max-width:620px){ .team-edit{padding-left:0} }
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.act-list{list-style:none;margin:0;padding:0}
.act-list li{display:grid;grid-template-columns:128px minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.act-list time{padding-top:2px}
@media (max-width:620px){ .act-list li{grid-template-columns:1fr;gap:2px} }
.gdpr-erase{margin-top:14px}.gdpr-erase summary{cursor:pointer;color:var(--bad);font-weight:600;font-size:.9rem;width:max-content}
.dep-row{border-bottom:1px solid var(--line)}
.dep-box{display:grid;gap:8px;margin:0 0 14px;padding:10px 14px;border-radius:8px;background:var(--surface);border:1px solid var(--line)}
.dep-actions{display:flex;gap:8px;flex-wrap:wrap}.dep-actions form{margin:0}
.dep-box summary{cursor:pointer;color:var(--accent);font-weight:600;font-size:.9rem;width:max-content}
.dep-keep{margin-top:10px}

/* ---- controls: one height per size, so buttons and fields line up in every row */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select{height:44px;min-height:44px}
.btn{min-height:44px}
.btn-sm,.btn.small{min-height:34px;padding:6px 12px;font-size:.85rem}
.btn-quiet{padding-inline:10px}
.btn-quiet.btn-sm,.btn-quiet.small{padding:6px 10px}
/* the form's buttons always get their own row, under the fields */
.form > .actions{grid-column:1/-1}
/* file fields: the picker button in the same style as our own buttons */
input[type=file]{padding:0 12px 0 5px;line-height:42px;background:var(--surface);color:var(--muted);font-size:.88rem;cursor:pointer;display:flex;align-items:center}
input[type=file]::file-selector-button{font:inherit;font-size:.85rem;font-weight:600;color:var(--fg);background:var(--surface);border:1px solid var(--line-strong);
  border-radius:6px;padding:0 12px;height:32px;line-height:30px;margin:0 12px 0 0;vertical-align:middle;cursor:pointer}
input[type=file]:hover::file-selector-button{border-color:var(--fg)}
@media (prefers-reduced-motion:no-preference){ input[type=file]::file-selector-button{transition:border-color .15s ease} }
/* copy buttons hold both labels, so the width never changes when the label switches */
.btn-copy{display:inline-grid;place-items:center}
.btn-copy > span{grid-area:1/1}
.btn-copy .c2,.btn-copy.done .c1{visibility:hidden}
.btn-copy.done .c2{visibility:visible}
.dp-sel select{min-height:0;height:36px}.dp-btn{min-height:44px}
.inline-form > .btn,.inline-form > form > .btn{min-height:44px}

/* ---- steady navigation: the scrollbar keeps its place on short and long pages, and pages cross-fade with the header still */
html{scrollbar-gutter:stable}
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  header.app{view-transition-name:app-header}
  ::view-transition-group(app-header),::view-transition-old(app-header),::view-transition-new(app-header){animation:none}
  ::view-transition-old(root),::view-transition-new(root){animation-duration:.12s}
}

/* ---- live demo: the band with the role switcher, and the entry page */
.demo-band{background:var(--accent);color:var(--accent-ink);font-size:.9rem}
.demo-band .wrap{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;padding-block:10px}
.demo-band-text{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1 1 220px}
.demo-band-text b{font-family:var(--display);font-weight:500;font-size:1rem;letter-spacing:.01em}
.demo-band-text span{opacity:.85;font-size:.82rem}
.demo-switch{display:flex;align-items:center;gap:10px;margin:0;min-width:0;max-width:100%}
.demo-switch-label{font-weight:600;font-size:.82rem;white-space:nowrap}
.demo-seg{display:flex;gap:2px;padding:3px;border-radius:10px;background:color-mix(in srgb,var(--accent-ink) 16%,transparent);overflow-x:auto;scrollbar-width:none;max-width:100%}
.demo-seg::-webkit-scrollbar{display:none}
.demo-seg button{flex:0 0 auto;border:0;background:none;color:inherit;font:inherit;font-weight:600;font-size:.86rem;padding:0 12px;height:34px;border-radius:7px;cursor:pointer;white-space:nowrap}
.demo-seg button:hover{background:color-mix(in srgb,var(--accent-ink) 14%,transparent)}
.demo-seg button[aria-pressed="true"]{background:var(--accent-ink);color:var(--accent)}
.demo-seg button:focus-visible{outline:2px solid var(--accent-ink);outline-offset:1px}
.demo-exit{color:inherit;font-weight:600;font-size:.86rem;white-space:nowrap}
@media (max-width:620px){ .demo-switch{flex-direction:column;align-items:flex-start;gap:6px;width:100%} .demo-seg{width:100%;flex-wrap:wrap} .demo-seg button{flex:1 1 auto;height:32px;padding:0 10px} }
.demo-start{padding-block:28px 56px;max-width:980px}
.demo-start-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}
.demo-start h1{font-family:var(--display);font-size:clamp(1.6rem,3.4vw,2.3rem);margin:0 0 10px}
.demo-start .lead{max-width:44em;color:var(--muted);margin:0 0 24px}
.demo-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 18px}
.demo-card{display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;padding:18px;border:1px solid var(--line-strong);border-radius:10px;
  background:var(--surface);color:var(--fg);font:inherit;cursor:pointer}
.demo-card b{font-family:var(--display);font-weight:500;font-size:1.05rem}
.demo-card span{color:var(--muted);font-size:.9rem;line-height:1.45}
.demo-card .demo-go{margin-top:auto;color:var(--accent);font-weight:600;display:inline-flex;gap:6px;align-items:center}
.demo-card:hover{border-color:var(--accent)}
@media (prefers-reduced-motion:no-preference){ .demo-card{transition:border-color .15s ease} }
@media (max-width:820px){ .demo-cards{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:520px){ .demo-cards{grid-template-columns:1fr} }

/* ---- proposals */
.pp-row{grid-template-columns:minmax(0,1fr) auto auto;text-decoration:none;color:inherit}
.pp-row:hover b{color:var(--accent)}
.pp-share{display:grid;gap:12px;padding:18px;margin-bottom:24px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.pp-share-num{display:flex;flex-direction:column;gap:2px}
.pp-share-num b{font-family:var(--display);font-weight:500;font-size:2rem;color:var(--accent);line-height:1.1}
.pp-share .actions form{margin:0}
.pp-checks{flex-direction:row;gap:18px;align-items:center;padding-top:22px}
.pp-checks .check{display:flex;gap:8px;align-items:center;font-weight:500}
@media (max-width:620px){ .pp-row{grid-template-columns:1fr} .pp-checks{padding-top:0} }

/* ---- chat inbox */
.chat-row{grid-template-columns:auto minmax(0,1fr) auto;text-decoration:none;color:inherit}
.chat-row.is-unread b{color:var(--accent)}
.chat-ch{font-size:.72rem;font-weight:600;padding:3px 8px;border-radius:999px;border:1px solid var(--line-strong);color:var(--muted);white-space:nowrap}
.chat-preview{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-log{display:flex;flex-direction:column;gap:10px;max-height:60vh;overflow-y:auto;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);margin-bottom:12px}
.bubble{max-width:78%;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--bg)}
.bubble.in{align-self:flex-start;border-bottom-left-radius:4px}
.bubble.out{align-self:flex-end;background:var(--accent-soft);border-color:transparent;border-bottom-right-radius:4px}
.bubble.failed{border-color:var(--bad)}
.b-main{white-space:normal;overflow-wrap:anywhere}
.b-orig{margin-top:6px;padding-top:6px;border-top:1px dashed var(--line-strong);color:var(--muted);font-size:.85rem;overflow-wrap:anywhere}
.b-meta{margin-top:4px;color:var(--muted);font-size:.72rem}
.chat-reply{display:grid;gap:10px}
.chat-reply .actions{justify-content:space-between}
@media (max-width:620px){ .bubble{max-width:92%} .chat-row{grid-template-columns:minmax(0,1fr) auto} .chat-row .chat-ch{display:none} }

.chat-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start}
.chat-main{display:grid;gap:12px;min-width:0}
.chat-side{position:sticky;top:16px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.chat-side .form{gap:10px}
.chat-how{background:var(--accent-soft);border-color:transparent}
.b-tag{display:block;font-size:.68rem;font-weight:600;text-transform:none;color:var(--muted);margin-bottom:2px}
.chat-quick{display:flex;gap:6px;flex-wrap:wrap}
.chat-quick .chip{cursor:pointer;font:inherit;font-size:.82rem}
.chat-send{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.chat-to{display:flex;align-items:center;gap:8px;font-size:.88rem;font-weight:600}
.chat-to select{width:auto;max-width:260px}
.chat-send-btns{display:flex;gap:8px}
.chat-preview-box{padding:12px 14px;border:1px dashed var(--line-strong);border-radius:8px;display:grid;gap:4px;white-space:pre-line}
.chat-help{margin:4px 0 14px}.chat-help summary{cursor:pointer;color:var(--accent);font-weight:600;font-size:.9rem;width:max-content}
.chat-help ol{margin:8px 0 0;padding-left:20px;max-width:70ch;display:grid;gap:4px}
.tab-count{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;margin-left:4px;border-radius:999px;background:var(--clay);color:#fff;font-size:.7rem;font-weight:700;vertical-align:1px}
@media (max-width:860px){ .chat-grid{grid-template-columns:1fr} .chat-side{position:static} }
.chat-preview-box textarea{min-height:72px;background:var(--surface)}
/* ---- Ownerstat outreach emails */
.mail-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start}
.mail-grid h2{font-size:1.05rem;margin:0 0 12px}
.ttabs{display:flex;gap:6px}
.ttab{border:1px solid var(--line-strong);background:var(--surface);color:var(--muted);font:inherit;font-weight:600;font-size:.85rem;padding:0 14px;height:34px;border-radius:999px;cursor:pointer}
.ttab[aria-selected="true"]{background:var(--fg);color:var(--bg);border-color:var(--fg)}
.mail-envelope{padding:10px 12px;border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:var(--surface);display:grid;gap:2px;overflow-wrap:anywhere}
.mail-frame{width:100%;height:620px;border:1px solid var(--line);border-radius:0 0 10px 10px;background:#fff;display:block}
.mail-table td{vertical-align:middle}
.mail-fu{margin:4px 0 12px;border-top:1px solid var(--line);padding-top:10px}
.mail-fu summary{cursor:pointer;font-weight:600;font-size:.92rem;padding:4px 0 10px}
.mail-rcpts{display:grid;gap:10px;margin-top:18px}
.mail-rcpt{border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:var(--surface);display:grid;gap:10px}
.mail-rcpt.is-picked{border-color:var(--fg)}
.mr-head{display:flex;justify-content:space-between;gap:12px;align-items:baseline;flex-wrap:wrap;overflow-wrap:anywhere}
.mr-fields{display:grid;grid-template-columns:90px minmax(0,180px) minmax(0,1fr);gap:10px}
.mr-fields label{display:grid;gap:4px;font-size:.8rem;color:var(--muted);font-weight:500}
.mr-fields input,.mr-fields select{min-width:0}
.mr-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.mr-actions .check{align-items:center}
.mr-actions .check input{margin-top:0}
@media (max-width:720px){ .mr-fields{grid-template-columns:1fr 1fr} .mr-personal{grid-column:1/-1} }
@media (max-width:960px){ .mail-grid{grid-template-columns:1fr} .mail-frame{height:520px} }
