:root {
  --ink:#17211b; --muted:#65736b; --paper:#f5f3ed; --panel:#fff; --on-primary:#fff;
  --forest:#173f35; --forest-deep:#102c26; --mint:#b8e0ca;
  --lime:#d8ee8a; --amber:#f3b85b; --rose:#d97878; --line:#dde2dc;
  --shadow:0 7px 22px rgba(20,40,31,.05);
}
* { box-sizing:border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:Inter,"Segoe UI",Arial,sans-serif; line-height:1.5; }
a { color:var(--forest); }
.skip-link { position:fixed; z-index:1000; top:8px; left:8px; padding:10px 14px; border-radius:8px; background:var(--panel); color:var(--ink); font-weight:800; transform:translateY(-150%); }
.skip-link:focus { transform:translateY(0); }
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:3px solid var(--amber); outline-offset:3px; }
.app-shell { min-height:100vh; }
.masthead {
  padding:18px 30px 16px; color:var(--on-primary);
  background:radial-gradient(circle at 82% 20%,rgba(216,238,138,.28),transparent 28%),linear-gradient(125deg,var(--forest-deep),var(--forest));
}
.masthead-inner { max-width:1380px; margin:0 auto; display:flex; justify-content:space-between; gap:24px; align-items:end; }
.brand-link { color:var(--on-primary); text-decoration:none; }
.eyebrow { color:var(--lime); font-size:12px; letter-spacing:.16em; text-transform:uppercase; font-weight:800; }
.masthead h1 { margin:3px 0 2px; font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:clamp(25px,3vw,34px); font-weight:500; line-height:1.1; }
.masthead p { margin:0; color:#c9d8d1; }
.account-block { text-align:right; font-size:13px; color:#dce8e2; }
.account-block a { color:var(--lime); }
.account-block form { display:inline; margin:0; }
/* A sign-out control must be a POST form, not a GET link, but should still
   read as the plain text link it replaces. */
.link-button { border:0; margin:0; padding:0; background:none; font:inherit; color:var(--lime); text-decoration:underline; cursor:pointer; }
.workspace-frame { display:grid; grid-template-columns:248px minmax(0,1fr); min-height:calc(100vh - 150px); }
.workspace-frame--single { display:block; }
.workspace-frame--single main { max-width:1180px; }
.workspace-nav { background:var(--panel); border-right:1px solid var(--line); box-shadow:3px 0 16px rgba(20,40,31,.035); padding:25px 14px; }
.nav-heading,.nav-label { display:block; padding:0 12px 9px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.nav-inner { display:flex; flex-direction:column; gap:3px; }
.workspace-nav a { display:flex; align-items:center; min-height:44px; color:var(--ink); text-decoration:none; padding:10px 12px; border-radius:9px; border-left:3px solid transparent; white-space:nowrap; }
.workspace-nav a:hover { color:var(--forest); background:#f3f6f2; }
.workspace-nav a.active { color:var(--forest); background:#e9f2ed; border-left-color:var(--lime); font-weight:750; }
.nav-label { margin-top:20px; padding-top:17px; border-top:1px solid var(--line); }
.nav-group { margin-top:18px; padding-top:12px; border-top:1px solid var(--line); }
.nav-group summary { display:block; min-height:44px; padding:12px; color:var(--muted); cursor:pointer; font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; list-style:none; }
.nav-group summary::-webkit-details-marker { display:none; }
.nav-group summary::after { content:"+"; float:right; font-size:14px; line-height:1; }
.nav-group[open] summary::after { content:"−"; }
.nav-group a { display:block; margin-top:2px; padding:8px 11px; }
.nav-toggle { display:none; align-items:center; gap:9px; margin-bottom:12px; padding:8px 11px; border:1px solid rgba(255,255,255,.38); border-radius:8px; color:#fff; background:rgba(255,255,255,.08); font:inherit; font-weight:700; cursor:pointer; }
.nav-toggle-icon { display:grid; gap:3px; width:17px; }
.nav-toggle-icon span { display:block; height:2px; border-radius:2px; background:currentColor; }
.nav-scrim { display:none; }
main { width:100%; max-width:1380px; margin:0 auto; padding:26px 24px 44px; min-width:0; }
.page-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:18px; }
.page-heading .page-intro { margin-bottom:0; }
.filter-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:18px 0; }
.filter-tabs a { padding:8px 13px; border-radius:999px; color:var(--muted); text-decoration:none; background:var(--panel); border:1px solid var(--line); }
.filter-tabs a.active,.filter-tabs a:hover { color:#fff; background:var(--forest); border-color:var(--forest); }
.management-section { margin:18px 0; padding:0; border:1px solid var(--line); border-radius:13px; background:var(--panel); box-shadow:var(--shadow); }
.management-section>summary { display:flex; flex-direction:column; padding:16px 18px; cursor:pointer; }
.management-section>summary span { color:var(--muted); font-size:13px; font-weight:400; }
.management-section[open]>summary { border-bottom:1px solid var(--line); }
.management-section>.grid { margin:18px; }
.management-section>section { border:0; box-shadow:none; }
.secondary-panel { margin-top:14px; }
.installation-grid { margin:18px 0; }
.installation-card { color:var(--ink); text-decoration:none; transition:transform .15s ease,border-color .15s ease; }
.installation-card:hover { transform:translateY(-2px); border-color:var(--forest); }
.installation-flow { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); gap:16px; margin-top:18px; }
.bi-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:16px 0; }
.conductor-list { display:grid; gap:14px; }
.conductor-field { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,360px); gap:22px; border-left:5px solid var(--amber); }
.conductor-field.sensitive { border-left-color:var(--rose); }
.pill.risk { color:#8d3333; background:#f9e7e7; }
.conductor-actions { align-self:start; display:grid; gap:8px; }
.conductor-actions label { text-transform:none; letter-spacing:0; }
.mapping-control { padding:12px; border:1px solid var(--line); border-radius:10px; background:#f8faf8; }
.mapping-control label { display:block; margin-bottom:6px; font-weight:700; }
.mapping-control input { width:100%; margin-bottom:5px; }
.mapping-control small { display:block; color:var(--muted); }
.confirm-check { display:block; margin-bottom:8px; text-transform:none; letter-spacing:0; font-weight:600; }
.confirm-check input { width:auto; margin-right:6px; }
h1,h2.section-title { font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-weight:500; }
h1 { font-size:31px; margin:0 0 4px; }
h2 { margin-top:28px; }
.page-intro { color:var(--muted); margin:0 0 20px; }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:18px; box-shadow:var(--shadow); overflow-x:auto; -webkit-overflow-scrolling:touch; }
.workspace-picker { max-width:880px; margin:42px auto; }
.workspace-picker-heading { margin-bottom:22px; }
.auth-page { max-width:520px; }
.auth-panel { padding:24px; border:1px solid var(--line); border-radius:16px; background:var(--panel); box-shadow:var(--shadow); }
.auth-panel input { max-width:none; min-height:46px; }
.auth-panel button { width:100%; }
.auth-help { margin:18px 0 0; color:var(--muted); font-size:13px; }
.alert-error { margin-bottom:14px; padding:11px 13px; border-left:4px solid var(--rose); border-radius:8px; background:#fff3f2; color:#8d3333; }
.workspace-grid { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); }
.workspace-card { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:15px; align-items:center; padding:20px; border:1px solid var(--line); border-radius:16px; background:var(--panel); color:var(--ink); text-decoration:none; box-shadow:var(--shadow); }
.workspace-card:hover { border-color:#a8bdb1; background:#fbfcfa; }
.workspace-card strong,.workspace-card small { display:block; }
.workspace-card strong { font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:21px; font-weight:500; }
.workspace-card small { margin-top:3px; color:var(--muted); }
.workspace-mark { display:grid; place-items:center; width:48px; height:48px; border-radius:13px; background:var(--forest); color:#fff; font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:24px; }
.workspace-arrow { color:var(--forest); font-size:25px; }
.owner-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:28px; margin:4px 0 22px; }
.owner-hero h1 { font-size:clamp(34px,4vw,48px); color:var(--forest-deep); }
.refresh-status { min-width:220px; padding:14px 16px; border-left:3px solid var(--lime); background:rgba(255,255,255,.58); }
.refresh-status span,.refresh-status strong,.refresh-status a { display:block; }
.refresh-status span { color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.refresh-status strong { margin:2px 0 4px; }
.refresh-status a,.text-link { color:var(--forest); font-size:13px; font-weight:750; }
.owner-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.owner-kpi { min-height:142px; padding:19px; border:1px solid var(--line); border-radius:15px; background:var(--panel); box-shadow:var(--shadow); }
.owner-kpi span,.owner-kpi small { display:block; color:var(--muted); }
.owner-kpi span { font-size:12px; font-weight:750; }
.owner-kpi strong { display:block; margin:9px 0 4px; color:var(--forest); font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:clamp(25px,3vw,35px); font-weight:500; line-height:1.1; }
.owner-kpi--primary { color:#fff; border-color:var(--forest); background:linear-gradient(135deg,var(--forest-deep),var(--forest)); }
.owner-kpi--primary span,.owner-kpi--primary small { color:#d9e6e0; }
.owner-kpi--primary strong { color:#fff; }
.owner-kpi--warning { border-top:4px solid var(--amber); }
.owner-layout { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(280px,.65fr); gap:16px; margin-bottom:16px; }
.section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.section-heading h2 { margin:2px 0 0; font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:25px; font-weight:500; }
.attention-list { display:grid; gap:0; margin:0; padding:0; list-style:none; }
.attention-list li { display:grid; grid-template-columns:10px minmax(0,1fr); gap:12px; padding:13px 0; border-top:1px solid var(--line); }
.attention-list li:first-child { border-top:0; }
.attention-list p { margin:3px 0 0; color:var(--muted); }
.attention-marker { width:8px; height:8px; margin-top:7px; border-radius:50%; background:var(--amber); }
.attention-marker--critical,.attention-marker--high { background:var(--rose); }
.confidence-value { margin:8px 0 4px; font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:34px; color:var(--forest); }
.confidence-breakdown { display:grid; gap:0; margin:16px 0; }
.confidence-breakdown div { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-top:1px solid var(--line); }
.confidence-breakdown dt { color:var(--muted); }
.confidence-breakdown dd { margin:0; font-weight:800; }
.button-block { display:block; text-align:center; }
.empty-state { padding:24px; border:1px dashed #cbd5ce; border-radius:12px; background:#fafbf9; }
.empty-state p { margin:5px 0 0; color:var(--muted); }
.portfolio-preview { margin-bottom:16px; }
.ranking-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(300px,.8fr); gap:16px; }
.rank-number { display:grid; width:28px; height:28px; place-items:center; border-radius:50%; background:var(--forest); color:var(--on-primary); font-weight:800; }
.bottom-property-list { display:grid; }
.bottom-property-list a { display:flex; justify-content:space-between; gap:14px; padding:13px 0; border-top:1px solid var(--line); color:var(--ink); text-decoration:none; }
.bottom-property-list a:first-child { border-top:0; }
.bottom-property-list small { display:block; margin-top:3px; color:var(--muted); }
.negative-value { color:var(--rose); }
.metric-note { margin:12px 0 0; color:var(--muted); font-size:12px; }
.property-decision-panel { margin:16px 0; padding:20px; border:1px solid var(--line); border-radius:15px; background:var(--panel); box-shadow:var(--shadow); }
.property-decision-panel form,.property-decision-panel button { margin:0; }
.decision-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:10px; }
.decision-item { display:grid; grid-template-columns:9px minmax(0,1fr); gap:10px; padding:13px; border:1px solid var(--line); border-radius:10px; }
.decision-item>span { width:8px; height:8px; margin-top:7px; border-radius:50%; background:var(--lime); }
.decision-item--medium>span { background:var(--amber); }
.decision-item--high>span,.decision-item--critical>span { background:var(--rose); }
.decision-item p { margin:4px 0 0; color:var(--muted); }
.system-boundary { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; margin:0 0 18px; padding:12px 16px; border:1px solid var(--line); border-radius:12px; background:var(--panel); color:var(--muted); font-size:13px; }
.system-boundary strong { color:var(--ink); }
.source-badge { display:inline-block; padding:4px 8px; border-radius:999px; font-size:11px; font-weight:800; white-space:nowrap; }
.source-hostaway { background:#e8f0fe; color:#174ea6; }
.source-stayops { background:var(--mint); color:var(--forest-deep); }
.handoff-note { display:block; margin-top:4px; color:var(--muted); }
.hostaway-handoff { margin:0; }
.finance-exception-list { display:grid; }
.finance-exception-row { display:grid; grid-template-columns:minmax(190px,.8fr) minmax(260px,1.5fr) auto; gap:18px; align-items:center; padding:15px 0; border-top:1px solid var(--line); }
.finance-exception-row:first-child { border-top:0; }
.finance-exception-row small,.finance-alert-copy span { display:block; color:var(--muted); }
.finance-alert-copy { display:grid; gap:4px; }
.finance-exception-row .button { margin:0; white-space:nowrap; }
.exception-stack { display:grid; }
.exception-stack article { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center; padding:13px 0; border-top:1px solid var(--line); }
.exception-stack article:first-child { border-top:0; }
.exception-stack small { display:block; margin-top:3px; color:var(--muted); }
.exception-stack a { color:var(--forest); font-weight:750; }
.exception-stack.compact article { padding:10px 0; }
.property-summary-list { display:grid; }
.property-summary-row { display:grid; grid-template-columns:34px minmax(190px,1.5fr) minmax(145px,.7fr) auto; gap:14px; align-items:center; padding:14px 4px; border-top:1px solid var(--line); color:var(--ink); text-decoration:none; }
.property-summary-row:first-child { border-top:0; }
.property-summary-row:hover strong:first-child { color:var(--forest); text-decoration:underline; }
.property-summary-row span,.property-summary-row small,.property-summary-row strong { min-width:0; }
.property-summary-row small { display:block; color:var(--muted); font-weight:500; }
.owner-actions { display:flex; flex-wrap:wrap; gap:10px; }
.owner-actions .button { margin-top:0; }
.metric { font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); color:var(--forest); font-size:30px; font-weight:500; margin:7px 0 3px; }
.muted { color:var(--muted); }
.pill { display:inline-block; padding:4px 9px; border-radius:999px; background:#e9f5ef; color:var(--forest); font-size:12px; font-weight:700; }
table { width:100%; border-collapse:collapse; background:var(--panel); }
th,td { text-align:left; padding:12px; border-bottom:1px solid var(--line); vertical-align:top; }
th { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.07em; }
tbody tr:hover { background:#fafbf9; }
label { display:block; color:var(--muted); font-size:12px; font-weight:800; margin:12px 0 5px; text-transform:uppercase; letter-spacing:.04em; }
input,select,textarea { width:100%; max-width:560px; padding:10px 11px; border:1px solid var(--line); border-radius:7px; background:var(--panel); color:var(--ink); }
input:focus,select:focus,textarea:focus { outline:3px solid rgba(184,224,202,.55); border-color:var(--forest); }
button,.button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; margin-top:16px; border:0; border-radius:9px; padding:10px 14px; background:var(--forest); color:var(--on-primary); font-weight:750; cursor:pointer; text-decoration:none; }
button:hover,.button:hover { background:var(--forest-deep); }
.button.secondary { border:1px solid var(--forest); background:#fff; color:var(--forest); }
.button.secondary:hover { background:#edf8f2; }
.notice { border-left:4px solid var(--mint); background:#edf8f2; border-radius:8px; padding:13px; margin:14px 0; overflow-wrap:anywhere; }
.errors { color:#9b3232; }
.errors.card { border-left:4px solid var(--rose); background:#fff3f2; }
.import-options { margin-top:16px; border:1px solid var(--line); border-radius:9px; padding:11px; }
.import-options legend { font-weight:700; padding:0 5px; }
.check-option { display:inline-flex; align-items:center; gap:6px; margin:4px 12px 4px 0; }
.check-option input { width:auto; max-width:none; }
.report-filters { display:flex; gap:16px; align-items:end; flex-wrap:wrap; margin-bottom:16px; }
.report-filters>div { flex:1 1 180px; }
.report-filters button { margin-top:0; }
.report-kpis { margin:16px 0; }
.calendar-range { display:grid; grid-template-columns:repeat(2,minmax(150px,1fr)); gap:10px; }
.import-progress { margin-top:14px; padding:12px; border-radius:9px; background:#edf8f2; color:var(--forest); }
.import-progress[hidden] { display:none; }
.import-progress strong,.import-progress small { display:block; }
.progress-track { height:8px; margin-bottom:9px; overflow:hidden; border-radius:999px; background:#d6e4dc; }
.progress-track span { display:block; width:38%; height:100%; border-radius:999px; background:var(--forest); animation:import-progress 1.25s ease-in-out infinite; }
.progress-track--static span { animation:none; }
.document-header { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px; }
.document-header h2 { margin:4px 0; }
.receipt-review-lock { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; }
.receipt-review-lock form { margin:0; }
.receipt-review-lock--mine { border-left-color:#15803d; background:#edf8f2; }
.receipt-takeover-form { display:flex; align-items:end; gap:10px; min-width:min(100%, 560px); }
.receipt-takeover-form label { flex:1; }
@media (max-width:760px) {
  .receipt-review-lock, .receipt-takeover-form { align-items:stretch; flex-direction:column; }
}

/* SaaS account and billing framework */
.billing-mode-notice { margin-bottom: 1.25rem; }
.billing-current { margin-bottom: 1.5rem; }
.billing-current-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.billing-current-grid div { display: grid; gap: .3rem; }
.billing-current-grid span { color: var(--muted, #5f716c); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.billing-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.billing-plan { position: relative; display: flex; flex-direction: column; gap: .75rem; }
.billing-plan form { margin-top: auto; }
.billing-plan--selected { outline: 3px solid var(--accent, #477c91); }
.billing-selected-label { align-self: flex-start; padding: .25rem .55rem; border-radius: 999px; background: #e8f3f4; color: #064f58; font-size: .78rem; font-weight: 700; }
.billing-price { display: flex; align-items: baseline; gap: .35rem; margin: .35rem 0; }
.billing-price strong { font-family: var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size: 2.4rem; line-height: 1; }
.billing-checkout-result { max-width: 760px; }
.billing-checkout-result dl { display: grid; gap: .75rem; }
.billing-checkout-result dl div { display: grid; grid-template-columns: minmax(150px, .5fr) 1fr; gap: 1rem; border-bottom: 1px solid #dce3df; padding-bottom: .75rem; }
.billing-checkout-result dt { color: #5f716c; }
.billing-checkout-result dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .billing-plan-grid, .billing-current-grid { grid-template-columns: 1fr; }
}
.document-upload-form { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:0 18px; align-items:end; }
.document-upload-form p { margin:0; }
.document-upload-form>div { grid-column:1/-1; }
.drop-zone { grid-column:1/-1; padding:14px; border:2px dashed var(--line); border-radius:10px; transition:border-color .12s, background .12s; }
.drop-zone.is-dragging { border-color:var(--forest); background:var(--mint); }
.drop-zone .drop-hint { display:block; margin-top:4px; }
.drop-error { display:block; margin-top:4px; color:var(--rose); font-weight:600; }
.document-path { display:block; max-width:520px; overflow-wrap:anywhere; white-space:normal; }
.compact-button { min-height:34px; margin:0 8px 4px 0; padding:6px 9px; }
.document-review-layout { display:grid; grid-template-columns:minmax(320px,.8fr) minmax(360px,1.2fr); gap:16px; }
.extracted-text { max-height:360px; overflow:auto; padding:12px; border:1px solid var(--line); border-radius:8px; background:#f7f8f5; white-space:pre-wrap; }
.queue-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
.filter-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; align-items:end; margin:16px 0 20px; }
.filter-grid label { display:block; margin-bottom:5px; font-weight:700; }
.filter-grid input,.filter-grid select { width:100%; }
.filter-actions { display:flex; align-items:center; gap:12px; min-height:44px; }
.queue-tab { display:inline-flex; align-items:center; gap:7px; padding:7px 12px; border:1px solid var(--line); border-radius:999px; color:var(--forest); text-decoration:none; }
.queue-tab.active { border-color:var(--forest); background:var(--forest); color:#fff; }
.queue-tab.active .pill { background:rgba(255,255,255,.22); color:#fff; }
.receipt-journey { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:0 0 18px; }
.receipt-stage { display:flex; align-items:center; gap:10px; min-width:0; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:var(--panel); color:var(--ink); text-decoration:none; }
.receipt-stage:hover { border-color:var(--forest); background:#f4faf6; }
.receipt-stage.active { border-color:var(--forest); background:var(--forest); color:var(--on-primary); box-shadow:0 8px 18px rgba(19,73,60,.13); }
.receipt-stage-number { display:grid; flex:0 0 28px; width:28px; height:28px; place-items:center; border-radius:50%; background:#e7efe9; color:var(--forest); font-weight:800; }
.receipt-stage.active .receipt-stage-number { background:var(--on-primary); color:var(--forest); }
.receipt-stage strong,.receipt-stage small { display:block; }
.receipt-stage small { margin-top:2px; color:var(--muted); font-size:11px; line-height:1.25; }
.receipt-stage.active small { color:inherit; opacity:.82; }
.receipt-boundary { margin-top:0; }
.receipt-selection-bar { position:sticky; z-index:8; bottom:12px; display:flex; align-items:center; justify-content:space-between; gap:18px; margin:14px 0; padding:12px 14px; border:1px solid var(--forest); border-radius:12px; background:rgba(255,255,255,.97); box-shadow:0 10px 28px rgba(19,73,60,.2); backdrop-filter:blur(8px); }
.receipt-selection-bar strong,.receipt-selection-bar small { display:block; }
.receipt-selection-bar small { margin-top:3px; color:var(--muted); }
.receipt-selection-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.receipt-selection-actions button,.receipt-selection-actions .button { margin:0; }
.comparison-table th[scope="row"] { white-space:nowrap; }
.comparison-table .row-conflict,tr.row-conflict { background:#fdf3e6; }
.pill-warning { background:#f4c98a; color:#5a3a10; }
.line-table input,.line-table select { width:100%; min-width:110px; }
.line-table td { padding:4px 6px; }
.review-layout { display:grid; grid-template-columns:minmax(280px,1fr) minmax(360px,1.15fr); gap:16px; align-items:start; }
@media (max-width:900px) { .review-layout { grid-template-columns:1fr; } }
.review-scan { position:sticky; top:12px; }
.scan-preview { display:block; width:100%; max-height:70vh; border:1px solid var(--line); border-radius:8px; background:#fff; object-fit:contain; }
iframe.scan-preview { height:70vh; }
.item-table input,.item-table select { width:100%; min-width:96px; }
.item-table td { padding:5px 6px; vertical-align:top; }
.item-detail td { padding-top:0; border-top:0; }
.item-detail summary { color:var(--forest); font-size:13px; cursor:pointer; }
.item-detail input { margin-top:6px; }
.allocation-summary { display:flex; flex-wrap:wrap; gap:18px; margin:14px 0; padding:12px 14px; border:1px solid var(--line); border-radius:8px; background:#f7f8f5; }
.allocation-summary div { display:flex; flex-direction:column; gap:2px; }
.allocation-summary strong { font-size:18px; }
.allocation-clear strong { color:var(--forest); }
.allocation-left strong { color:#a4560c; }
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.task-progress-label { display:block; margin-top:8px; color:var(--forest); font-size:14px; }
.task-progress-native { display:block; width:100%; height:18px; margin:7px 0 4px; accent-color:var(--forest); }
.task-progress-native::-webkit-progress-bar { border:1px solid #9db8aa; border-radius:999px; background:#dfeae4; }
.task-progress-native::-webkit-progress-value { border-radius:999px; background:var(--forest); }
.task-progress-native::-moz-progress-bar { border-radius:999px; background:var(--forest); }
.provider-catalogue { margin-bottom:28px; }
.provider-card { position:relative; min-height:220px; }
.provider-card h3 { margin:12px 0 6px; font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:24px; font-weight:500; }
.provider-card p { color:var(--muted); }
.provider-card.planned { background:#f9faf7; }
.provider-mark { display:grid; width:42px; height:42px; place-items:center; border-radius:11px; background:var(--forest); color:#fff; font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:22px; }
.setup-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-bottom:20px; }
.eyebrow.dark { color:var(--forest); }
.readiness-score { display:grid; min-width:120px; padding:15px; text-align:center; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:var(--shadow); }
.readiness-score strong { color:var(--forest); font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:32px; line-height:1; }
.readiness-score span { margin-top:5px; color:var(--muted); font-size:12px; font-weight:750; text-transform:uppercase; }
.setup-checklist h2,.setup-step h2 { margin:0 0 8px; }
.checklist-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:10px; }
.readiness-item { display:flex; gap:10px; align-items:flex-start; padding:11px; border-radius:9px; background:#fff4e4; }
.readiness-item>span { display:grid; min-width:25px; height:25px; place-items:center; border-radius:50%; background:var(--amber); color:#402c0d; font-weight:900; }
.readiness-item.complete { background:#edf8f2; }
.readiness-item.complete>span { background:var(--forest); color:#fff; }
.readiness-item strong,.readiness-item small { display:block; }
.readiness-item small { margin-top:2px; color:var(--muted); }
.guided-setup-form { display:grid; gap:14px; margin-top:14px; }
.setup-step { display:grid; grid-template-columns:54px minmax(0,1fr); gap:16px; }
.step-number { display:grid; width:44px; height:44px; place-items:center; border-radius:12px; background:var(--forest); color:#fff; font-weight:850; }
.step-content { max-width:900px; }
.capability-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px; }
.capability-card { display:flex; gap:10px; align-items:center; margin:0; padding:14px; border:1px solid var(--line); border-radius:10px; background:#fafbf9; text-transform:none; letter-spacing:0; }
.capability-card:has(input:checked) { border-color:var(--forest); background:#edf8f2; color:var(--forest); }
.capability-card input,.enable-control input { width:auto; }
.enable-control { display:flex; align-items:center; gap:9px; padding:13px; border:1px solid var(--line); border-radius:10px; text-transform:none; letter-spacing:0; }
.automation-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; }
.automation-heading form { flex:0 0 auto; }
.subnav { display:flex; gap:8px; margin:18px 0; overflow-x:auto; }
.subnav a { padding:8px 12px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--muted); text-decoration:none; white-space:nowrap; }
.subnav a.active { border-color:var(--forest); background:var(--forest); color:#fff; }
.recommendation-list { display:grid; gap:12px; }
.recommendation-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; align-items:center; }
.recommendation-card h2 { margin:8px 0 4px; }
.recommendation-card p { margin:5px 0; }
.recommendation-actions { display:flex; min-width:190px; flex-direction:column; align-items:stretch; }
.recommendation-actions form,.recommendation-actions button,.recommendation-actions .button { width:100%; margin-top:7px; text-align:center; }
.empty-state { text-align:center; padding:35px; }
.health-heading,.health-card-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; }
.eyebrow.dark { color:var(--forest); margin-bottom:5px; }
.health-summary { margin:20px 0; }
.health-summary .card { display:flex; flex-direction:column; }
.health-summary .metric { margin:0; }
.health-summary small,.check-list small { display:block; color:var(--muted); }
.health-list { display:grid; gap:15px; }
.health-card { border-left:5px solid var(--line); }
.health-card.health-healthy { border-left-color:#4d9d72; }
.health-card.health-attention { border-left-color:var(--amber); }
.health-card.health-paused { border-left-color:#89948e; }
.health-card.health-error { border-left-color:var(--rose); }
.health-card h2 { margin:5px 0 0; }
.health-card-heading p { margin:0; color:var(--muted); }
.health-state { display:inline-block; padding:4px 9px; border-radius:999px; background:#edf2ee; color:var(--forest); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.health-error .health-state { background:#f9e7e7; color:#8d3333; }
.health-attention .health-state { background:#fff2db; color:#805614; }
.health-actions { display:flex; gap:8px; }
.health-reason { padding:10px 12px; border-radius:8px; background:var(--paper); }
.health-details { display:grid; grid-template-columns:minmax(260px,1fr) minmax(260px,1fr); gap:25px; }
.health-details h3 { margin:8px 0 10px; }
.check-list { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.check-list li { display:grid; grid-template-columns:24px 1fr; gap:8px; }
.check-list li>span { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#e7eee9; color:var(--forest); font-weight:800; }
.check-list li.failed>span { background:#fff0da; color:#875912; }
.check-list--labelled li { grid-template-columns:5.5rem minmax(0,1fr); align-items:start; }
.check-list--labelled li>span { width:auto; height:auto; padding:2px 8px; border-radius:999px; font-size:.78rem; letter-spacing:.02em; }
.fetch-progress { margin:4px 0 14px; }
.fetch-progress-track { height:12px; overflow:hidden; border-radius:999px; background:#d6e4dc; }
.fetch-progress-track span { display:block; min-width:12px; height:100%; border-radius:999px; background-color:var(--forest); background-image:linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); background-size:200% 100%; animation:fetch-progress-shimmer 1.6s linear infinite; transition:width .6s ease; }
.fetch-progress-label { display:flex; justify-content:space-between; gap:12px; margin:8px 0 0; font-variant-numeric:tabular-nums; }
@keyframes fetch-progress-shimmer { from { background-position:150% 0; } to { background-position:-50% 0; } }
@media (prefers-reduced-motion: reduce) { .fetch-progress-track span { animation:none; transition:none; } }
.health-activity dl { display:grid; grid-template-columns:1fr 1fr; gap:8px 14px; margin:0; }
.health-activity dt { color:var(--muted); }
.health-activity dd { margin:0; text-align:right; font-weight:700; }
.reconnect-heading { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; }
.reconnect-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(300px,.7fr); gap:16px; }
.warning-panel { padding:14px 16px; margin:12px 0 18px; border-left:4px solid var(--amber); background:#fff8eb; border-radius:8px; }
.warning-panel ul { margin-bottom:0; }
.pill.confidence-high { background:#e5f6ec; color:#1f7a44; }
.pill.confidence-medium { background:#fff3d6; color:#8a6100; }
.pill.confidence-low { background:#f9e7e7; color:#8d3333; }
.alert-list { list-style:none; padding:0; margin:10px 0 0; }
.alert-list li { padding:9px 12px; border-radius:8px; margin-bottom:8px; border-left:4px solid var(--line); background:var(--paper); }
.alert-list li.alert-high { border-left-color:#c0392b; background:#fbecea; }
.alert-list li.alert-medium { border-left-color:var(--amber); background:#fff8eb; }
.status-chip { display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:700; }
.status-actual { background:#e5f6ec; color:#1f7a44; }
.status-expected_only { background:#eef3fb; color:#2f5aa8; }
.status-stale { background:#fff3d6; color:#8a6100; }
.status-missing { background:#f9e7e7; color:#8d3333; }
.status-not_applicable { background:#eee; color:#555; }
.caveat { color:#8d3333; }
.pill.rating-green { background:#e5f6ec; color:#1f7a44; }
.pill.rating-amber { background:#fff3d6; color:#8a6100; }
.pill.rating-red { background:#f9e7e7; color:#8d3333; }
.pnl-table { width:100%; border-collapse:collapse; margin:8px 0 18px; max-width:560px; }
.pnl-table td { padding:6px 10px; border-bottom:1px solid var(--line); }
.pnl-amount { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.pnl-revenue td { font-weight:600; }
.pnl-deduction .pnl-amount { color:#8d3333; }
.pnl-subtotal td { border-top:1px solid var(--line); font-weight:700; background:#f4f7f5; }
.pnl-total td { border-top:2px solid var(--forest); border-bottom:2px solid var(--forest); font-weight:800; font-size:1.05em; }
.pnl-note td { border-bottom:none; padding-top:0; color:var(--muted); }
.pnl-estimate-heading td { padding-top:16px; border-bottom:none; color:var(--muted); font-size:.92em; }
.pnl-estimate .pnl-amount { color:#7a5200; }
.pnl-estimate-total td { border-top:2px dashed var(--amber); border-bottom:2px dashed var(--amber); background:#fdf6e8; }
.confirmation-box { display:flex; gap:10px; align-items:flex-start; margin:18px 0; padding:13px; border:1px solid var(--line); border-radius:9px; background:var(--paper); text-transform:none; letter-spacing:0; }
.confirmation-box input { width:auto; margin-top:4px; }
.reconnect-steps ol { padding:0; margin:16px 0; list-style:none; counter-reset:reconnect; }
.reconnect-steps li { position:relative; padding:0 0 18px 38px; counter-increment:reconnect; }
.reconnect-steps li::before { content:counter(reconnect); position:absolute; left:0; top:0; display:grid; place-items:center; width:25px; height:25px; border-radius:50%; background:#e8ede9; color:var(--forest); font-weight:800; }
.reconnect-steps li.complete::before { content:"✓"; background:var(--forest); color:#fff; }
.reconnect-steps li span { display:block; color:var(--muted); font-size:13px; }
button:disabled { cursor:wait; opacity:.58; }
@keyframes import-progress {
  0% { transform:translateX(-110%); }
  100% { transform:translateX(290%); }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
  .progress-track span { width:100%; animation:none; }
}
@media (max-width:760px) {
  .masthead { padding:15px 16px; }
  .masthead-inner { align-items:start; flex-direction:column; }
  .masthead p { display:none; }
  .account-block { display:none; }
  main { padding:20px 14px 36px; }
  .page-heading { flex-direction:column; }
  .page-heading>.button { width:100%; margin-top:0; }
  table { min-width:680px; }
  .owner-kpis { grid-template-columns:1fr; }
  .owner-hero { align-items:flex-start; flex-direction:column; gap:12px; }
  .refresh-status { width:100%; }
  .owner-layout { grid-template-columns:1fr; }
  .property-summary-row { grid-template-columns:minmax(0,1fr) auto; }
  .property-summary-row>span:nth-child(2),.property-summary-row>span:nth-child(3) { display:none; }
  .ask-fab-label { display:none; }
  .ask-fab { padding:12px; }
  .setup-heading { align-items:flex-start; flex-direction:column; }
  .setup-step { grid-template-columns:1fr; }
  .automation-heading { align-items:flex-start; flex-direction:column; }
  .recommendation-card { grid-template-columns:1fr; }
  .health-heading,.health-card-heading { flex-direction:column; }
  .health-details { grid-template-columns:1fr; }
  .health-actions { width:100%; }
  .reconnect-heading { flex-direction:column; }
  .reconnect-layout { grid-template-columns:1fr; }
  .installation-flow { grid-template-columns:1fr; }
  .bi-grid { grid-template-columns:1fr; }
  .conductor-field { grid-template-columns:1fr; }
}
@media (max-width:980px) {
  .ranking-layout { grid-template-columns:1fr; }
  .finance-exception-row { grid-template-columns:1fr; gap:9px; }
  .workspace-frame { display:block; }
  .nav-toggle { display:flex; }
  .workspace-nav { position:fixed; z-index:50; top:0; bottom:0; left:0; width:min(300px,84vw); padding:24px 14px; overflow-y:auto; transform:translateX(-105%); transition:transform .2s ease; box-shadow:12px 0 35px rgba(5,30,22,.2); }
  .nav-open .workspace-nav { transform:translateX(0); }
  .nav-scrim { position:fixed; z-index:40; inset:0; width:100%; height:100%; border:0; background:rgba(5,25,19,.48); opacity:0; pointer-events:none; transition:opacity .2s ease; }
  .nav-open .nav-scrim { display:block; opacity:1; pointer-events:auto; }
}

/* Analytics charts */
.chart-card .page-heading { margin-bottom:14px; }
/* Roomier two-per-row rhythm; the first panel becomes a full-width hero. */
.chart-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(360px,1fr)); gap:18px; margin:8px 0 22px; }
.chart-grid .chart-panel:first-child:nth-last-child(odd) { grid-column:1 / -1; }
.chart-panel { margin:0; padding:18px 18px 14px; border:1px solid var(--line); border-radius:16px; background:var(--panel); box-shadow:var(--shadow); }
.chart-panel figcaption { font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); color:var(--forest); font-size:15px; font-weight:500; margin-bottom:12px; }
.chart-holder { position:relative; height:340px; }
.chart-grid .chart-panel:first-child:nth-last-child(odd) .chart-holder { height:400px; }
.chart-holder canvas { max-width:100%; }
.chart-empty { display:flex; align-items:center; justify-content:center; height:340px; margin:0; text-align:center; }
.chart-toolbar { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.chart-btn { padding:5px 11px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--muted); font:inherit; font-size:12px; font-weight:700; cursor:pointer; transition:color .15s ease, background .15s ease, border-color .15s ease; }
.chart-btn:hover { color:var(--forest); border-color:var(--forest); }
.chart-btn[aria-pressed="true"] { background:var(--forest); border-color:var(--forest); color:#fff; }
.chart-data-wrap { margin-top:12px; overflow-x:auto; }
.chart-data-table { width:100%; border-collapse:collapse; font-size:12px; }
.chart-data-table th, .chart-data-table td { padding:6px 10px; border-bottom:1px solid var(--line); text-align:right; white-space:nowrap; }
.chart-data-table th:first-child, .chart-data-table td:first-child { text-align:left; }
.quick-links { margin:6px 0 0; padding-left:18px; }
.quick-links li { margin-bottom:7px; }

/* BI dashboard shell */
.dash-head { margin-bottom:14px; }
.dash-head h1 { font-size:clamp(23px,2.6vw,29px); margin:0 0 3px; }
.dash-head .page-intro { margin:0; }
.dash-filters { position:sticky; top:0; z-index:6; border-radius:14px; padding:14px 16px; overflow:visible; }
.dash-bar { display:flex; flex-wrap:wrap; align-items:flex-start; gap:12px 16px; }
.dash-bar .field { display:flex; flex-direction:column; gap:5px; min-width:0; }
.dash-bar input[type=date], .dash-bar select { width:auto; min-width:132px; max-width:240px; min-height:42px; padding:8px 36px 8px 11px; border-color:var(--line); border-radius:9px; background-color:var(--panel); }
.dash-bar select { appearance:none; background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position:calc(100% - 16px) 18px,calc(100% - 11px) 18px; background-size:5px 5px,5px 5px; background-repeat:no-repeat; }
.filter-label { display:block; font-size:11px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:.07em; margin:0; }
.filter-label .muted { text-transform:none; letter-spacing:0; font-weight:600; }
.check-inline { display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--ink); text-transform:none; letter-spacing:0; margin:0; white-space:nowrap; }
.check-inline input { width:auto; }
.field-actions { flex-direction:row; align-items:center; gap:12px; margin-left:auto; align-self:flex-end; }
.field-actions button { padding:9px 18px; }
/* dropdown-checkbox popover */
.ms { position:relative; }
.ms > summary { list-style:none; cursor:pointer; display:inline-flex; align-items:center; gap:6px; min-width:150px; min-height:42px; padding:8px 11px; border:1px solid var(--line); border-radius:9px; background:var(--panel); color:var(--ink); font-size:14px; font-weight:600; }
.ms > summary::-webkit-details-marker { display:none; }
.ms > summary::after { content:"▾"; margin-left:auto; color:var(--muted); font-size:11px; }
.ms[open] > summary { border-color:var(--forest); box-shadow:0 0 0 3px rgba(184,224,202,.4); }
.ms-count { color:var(--forest); font-weight:800; }
.ms-panel { position:absolute; z-index:40; top:calc(100% + 6px); left:0; min-width:220px; max-height:250px; overflow-y:auto; padding:8px; background:var(--panel); border:1px solid var(--line); border-radius:11px; box-shadow:0 16px 38px rgba(20,40,31,.18); display:flex; flex-direction:column; gap:2px; }
.ms-opt { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:7px; font-size:13px; font-weight:600; color:var(--ink); text-transform:none; letter-spacing:0; margin:0; cursor:pointer; white-space:nowrap; }
.ms-opt:hover { background:#f3f6f2; }
.ms-opt input { width:auto; }
/* segmented control */
.segmented { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:#fff; }
.segmented label { position:relative; margin:0; }
.segmented input { position:absolute; opacity:0; width:0; height:0; }
.segmented span { display:inline-block; padding:8px 12px; font-size:13px; font-weight:700; color:var(--muted); cursor:pointer; border-left:1px solid var(--line); user-select:none; }
.segmented label:first-child span { border-left:0; }
.segmented input:checked + span { background:var(--forest); color:#fff; }
.segmented input:focus-visible + span { outline:2px solid rgba(184,224,202,.9); outline-offset:-2px; }
.filter-reset { font-size:13px; font-weight:700; color:var(--muted); text-decoration:none; white-space:nowrap; }
.filter-reset:hover { color:var(--forest); text-decoration:underline; }
.filter-summary { margin:12px 0 0; padding:9px 14px; background:#eef4f0; border:1px solid #dbe8e0; border-radius:12px; font-size:13px; color:var(--ink); }
.filter-summary strong { color:var(--forest); }
.filter-summary .filter-reset { margin-left:8px; }
.dash-note { margin:8px 0 0; }
.preset-row { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 12px; }
.branding-form fieldset { margin:22px 0 0; padding:0; border:0; }
.branding-form legend { margin-bottom:10px; font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:20px; color:var(--ink); }
.colour-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.colour-field { display:grid; grid-template-columns:1fr 52px; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--panel); font-weight:700; }
.colour-field input[type="color"] { width:52px; height:38px; padding:3px; border-color:var(--line); cursor:pointer; }
.colour-field .field-error { grid-column:1 / -1; color:var(--rose); font-size:12px; font-weight:600; }
/* Progressive-disclosure tables */
.dash-details { margin-top:16px; }
.dash-details > summary { display:inline-block; cursor:pointer; padding:9px 14px; border:1px solid var(--forest); border-radius:9px; background:#fff; color:var(--forest); font-weight:700; font-size:13px; list-style:none; transition:background .15s ease, color .15s ease; }
.dash-details > summary::-webkit-details-marker { display:none; }
.dash-details > summary:hover { background:var(--forest); color:#fff; }
.dash-details[open] > summary { margin-bottom:14px; }
.dash-details > summary .dd-hide { display:none; }
.dash-details[open] > summary .dd-show { display:none; }
.dash-details[open] > summary .dd-hide { display:inline; }
.dash-tabs { display:flex; flex-wrap:nowrap; gap:2px; margin:18px 0 20px; border-bottom:1px solid var(--line); overflow-x:auto; }
.dash-tabs a { padding:10px 15px; color:var(--muted); text-decoration:none; font-weight:700; font-size:14px; border-bottom:2px solid transparent; white-space:nowrap; transition:color .15s ease, border-color .15s ease; }
.dash-tabs a:hover { color:var(--forest); }
.dash-tabs a.active { color:var(--forest); border-bottom-color:var(--forest); }
.dash-export { margin:-6px 0 14px; }
.dash-export a { font-size:13px; font-weight:700; }
.dash-panel { min-width:0; }
.dash-panel h2 { font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:23px; font-weight:500; color:var(--ink); }
.report-kpis { grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; }
.masked { color:var(--muted); font-style:italic; letter-spacing:.02em; }
@media (max-width:640px) {
  .chart-holder, .chart-grid .chart-panel:first-child:nth-last-child(odd) .chart-holder { height:280px; }
  .dash-filters { position:static; }
}
@media (prefers-reduced-motion: reduce) {
  .chart-panel, .report-kpis .card, .dash-panel > section.card { animation:none; }
  .chart-panel:hover, .report-kpis .card:hover, .dash-tabs a:hover { transform:none; }
}

/* Ask StayOps floating chat widget */
.ask-widget { position:fixed; right:22px; bottom:22px; z-index:60; }
.ask-fab { display:inline-flex; align-items:center; gap:8px; padding:12px 18px; border:0; border-radius:999px; background:var(--forest); color:#fff; font:inherit; font-weight:800; font-size:14px; cursor:pointer; box-shadow:0 10px 26px rgba(16,44,38,.34); transition:transform .15s ease, box-shadow .15s ease; }
.ask-fab:hover { transform:translateY(-2px); box-shadow:0 16px 34px rgba(16,44,38,.42); }
.ask-fab-icon { font-size:16px; }
.ask-widget.open .ask-fab { display:none; }
.ask-panel { position:fixed; right:22px; bottom:22px; width:min(390px,calc(100vw - 32px)); height:min(560px,72vh); display:none; flex-direction:column; background:#fff; border:1px solid var(--line); border-radius:18px; box-shadow:0 24px 60px rgba(16,44,38,.32); overflow:hidden; }
.ask-widget.open .ask-panel { display:flex; }
.ask-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 16px; background:radial-gradient(circle at 82% 20%,rgba(216,238,138,.28),transparent 30%),linear-gradient(125deg,var(--forest-deep),var(--forest)); color:#fff; }
.ask-head strong { font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-weight:500; font-size:16px; }
.ask-scope { display:block; font-size:11px; color:#c9d8d1; letter-spacing:.04em; }
.ask-close { border:0; background:transparent; color:#fff; font-size:22px; line-height:1; cursor:pointer; padding:0 4px; }
.ask-messages { flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; background:var(--paper); }
.ask-empty { color:var(--muted); font-size:13px; }
.ask-suggests { display:flex; flex-direction:column; gap:7px; margin-top:10px; }
.ask-suggest { text-align:left; padding:8px 11px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--forest); font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.ask-suggest:hover { border-color:var(--forest); background:#f3f6f2; }
.ask-bubble { max-width:85%; padding:10px 13px; border-radius:14px; font-size:13.5px; line-height:1.45; }
.ask-bubble.ask-user { align-self:flex-end; background:var(--forest); color:#fff; border-bottom-right-radius:5px; }
.ask-bubble.ask-bot { align-self:flex-start; background:#fff; border:1px solid var(--line); color:var(--ink); border-bottom-left-radius:5px; box-shadow:var(--shadow); }
.ask-flags { align-self:flex-start; display:flex; flex-wrap:wrap; gap:5px; }
.ask-chip { font-size:10.5px; font-weight:700; text-transform:capitalize; color:var(--muted); background:#fff9ec; border:1px solid #f3d9a6; border-radius:999px; padding:3px 8px; }
.ask-thinking { display:inline-flex; gap:4px; align-items:center; }
.ask-dot { width:6px; height:6px; border-radius:50%; background:var(--muted); animation:askblink 1s infinite ease-in-out; }
.ask-dot:nth-child(2){ animation-delay:.15s; } .ask-dot:nth-child(3){ animation-delay:.3s; }
@keyframes askblink { 0%,80%,100%{ opacity:.25; } 40%{ opacity:1; } }
.ask-composer { display:flex; gap:8px; align-items:flex-end; padding:12px; border-top:1px solid var(--line); background:#fff; }
.ask-input { flex:1; resize:none; max-height:120px; border:1px solid #cfd7d1; border-radius:10px; padding:9px 11px; font:inherit; font-size:13.5px; }
.ask-send { border:0; border-radius:10px; background:var(--forest); color:#fff; font:inherit; font-weight:800; padding:9px 15px; cursor:pointer; }
.ask-send:disabled { opacity:.5; cursor:default; }
.ask-foot { margin:0; padding:8px 12px 10px; background:#fff; color:var(--muted); font-size:10.5px; text-align:center; }
@media (max-width:520px) {
  .owner-kpis { grid-template-columns:1fr; }
  .owner-kpi { min-height:auto; }
  .ask-panel { right:0; bottom:0; width:100vw; height:88vh; border-radius:18px 18px 0 0; }
  .ask-widget { right:14px; bottom:14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ask-panel { animation:none; } .ask-fab:hover { transform:none; } .ask-dot { animation:none; }
}

/* ---- Responsive / mobile ---- */
@media (max-width: 860px) {
  .workspace-frame { grid-template-columns: 1fr; }
  main { max-width: 100%; padding: 18px 14px 40px; }
  .masthead-inner,
  .owner-hero,
  .page-heading,
  .section-heading,
  .owner-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
  .bi-grid,
  .owner-kpis,
  .owner-layout,
  .ranking-layout,
  .installation-flow,
  .conductor-field,
  .conductor-actions,
  .finance-exception-row,
  .property-summary-row,
  .decision-list { grid-template-columns: 1fr; }
  .exception-stack article { grid-template-columns: auto minmax(0,1fr); gap: 10px; }
  .card { overflow-x: auto; }
  .dash-bar { flex-wrap: wrap; }
  input, select, textarea { max-width: 100%; }
}
@media (max-width: 560px) {
  main { padding: 14px 11px 34px; }
  h1 { font-size: 1.45rem; }
}
.filed-receipt { border-left:4px solid var(--forest); }
.filed-receipt code { display:block; margin:4px 0; }
/* Dividing one item across properties, inside the row's own disclosure. */
.split-row { display:flex; flex-wrap:wrap; gap:9px; align-items:center; margin:9px 0 0; }
.split-row label { display:flex; gap:6px; align-items:center; margin:0; }
.split-row select { width:auto; min-width:190px; }
.split-row .muted { flex-basis:100%; margin:0; font-size:.85rem; }
@media (max-width:760px) {
  .receipt-journey { display:flex; overflow-x:auto; padding-bottom:6px; scroll-snap-type:x proximity; }
  .receipt-stage { flex:0 0 190px; scroll-snap-align:start; }
  .receipt-selection-bar { align-items:stretch; flex-direction:column; bottom:6px; }
  .receipt-selection-actions { justify-content:stretch; }
  .receipt-selection-actions button { flex:1 1 100%; }
}

/* Removable filter chips (#27): one press unpicks one choice. */
.filter-chip { display:inline-flex; align-items:center; gap:5px; border:1px solid var(--line); border-radius:999px; padding:3px 11px; background:var(--panel); font:inherit; font-size:12.5px; font-weight:600; cursor:pointer; margin:0 4px 4px 0; }
.filter-chip:hover { border-color: var(--brand-primary, #123f35); }
/* Progressive disclosure for the filter bar on narrow screens (#25). */
.dash-toggle { display:none; font:inherit; font-weight:700; padding:8px 14px; border:1px solid var(--line); border-radius:9px; background:var(--panel); cursor:pointer; }
@media (max-width: 760px) {
  .dash-toggle { display:inline-flex; margin-bottom:10px; }
  .dash-filters .dash-bar { display:none; }
  .dash-filters.dash-open .dash-bar { display:flex; }
}

.page-tabs {
  display:flex; flex-wrap:wrap; gap:4px; margin:0 0 22px;
  padding-bottom:10px; border-bottom:1px solid var(--line);
}
.page-tabs a {
  min-height:40px; display:flex; align-items:center; padding:8px 15px;
  border-radius:9px 9px 0 0; color:var(--muted); text-decoration:none;
  font-weight:650; border-bottom:3px solid transparent; margin-bottom:-13px;
}
.page-tabs a:hover { color:var(--forest); background:#f3f6f2; }
.page-tabs a.active { color:var(--forest); border-bottom-color:var(--forest); }
.nav-group--nested { margin-top:10px; padding-top:8px; }
.nav-group--nested summary { padding-left:12px; }
.nav-group--nested a { padding-left:22px; }

/* The assistant answers in markdown; these are the tags it renders to. */
.notice h4,.notice h5,.notice h6 { margin:14px 0 6px; font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-weight:600; }
.notice h4:first-child,.notice h5:first-child,.notice h6:first-child,.notice p:first-child { margin-top:0; }
.notice p { margin:0 0 10px; }
.notice ul,.notice ol { margin:0 0 10px; padding-left:22px; }
.notice li { margin-bottom:4px; }
.notice code { padding:1px 5px; border-radius:5px; background:rgba(23,63,53,.07); font-size:.92em; }
.notice hr { margin:14px 0; border:0; border-top:1px solid var(--line); }
.answer-table { overflow-x:auto; margin:0 0 12px; }
.answer-table table { border-collapse:collapse; width:100%; font-size:14px; }
.answer-table th,.answer-table td { padding:7px 12px; text-align:left; border-bottom:1px solid var(--line); white-space:nowrap; }
.answer-table th { font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.answer-table td { font-variant-numeric:tabular-nums; }
.answer-table tr:last-child td { border-bottom:0; }

/* Money screens: an assumed rate you can move, and money shown as a shape.
   Amber is the house colour for "attention, not error", and every figure
   resting on a guessed commission rate is marked with it so an assumption
   never looks like a statement. */
.assume-card { border-left:4px solid var(--amber); }
.assume-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; margin:0 0 4px; }
.assume-heading small { color:var(--muted); font-weight:400; }
.rate-row { display:grid; grid-template-columns:minmax(8rem,1fr) minmax(0,2.6fr) auto; align-items:center; gap:10px 18px; padding:12px 0; border-top:1px solid var(--line); }
.rate-row:first-of-type { border-top:0; }
.rate-who { font-weight:700; }
.rate-who small { display:block; color:var(--muted); font-weight:400; font-size:12px; }
.rate-track { display:flex; flex-direction:column; gap:2px; min-width:0; }
.rate-track input[type=range] { width:100%; margin:0; accent-color:var(--forest); cursor:pointer; }
.rate-ticks { position:relative; height:15px; font-size:11px; color:var(--muted); }
.rate-tick { position:absolute; transform:translateX(-50%); white-space:nowrap; }
.rate-tick::before { content:""; position:absolute; left:50%; top:-3px; width:1px; height:4px; background:var(--line); }
.rate-value { display:flex; align-items:center; gap:4px; }
.rate-value input[type=number] { width:5.2rem; min-height:42px; text-align:right; font-variant-numeric:tabular-nums; font-weight:750; -moz-appearance:textfield; }
.rate-value input::-webkit-outer-spin-button,.rate-value input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.rate-value span { font-weight:750; color:var(--muted); }

/* A month of money, as a bar you can compare against the months either side. */
.flow-row { display:grid; grid-template-columns:minmax(7rem,auto) minmax(0,1fr) minmax(7rem,auto); align-items:center; gap:10px 16px; padding:11px 0; border-top:1px solid var(--line); }
.flow-row:first-of-type { border-top:0; }
.flow-when { font-weight:700; }
.flow-when small { display:block; color:var(--muted); font-weight:400; font-size:12px; }
.flow-track { height:22px; border-radius:7px; background:#e8eee9; overflow:hidden; }
.flow-track span { display:block; height:100%; border-radius:7px; background:var(--forest); }
.flow-row--late .flow-track span { background:var(--rose); }
.flow-amount { text-align:right; font-variant-numeric:tabular-nums; font-weight:750; }
.flow-row--late .flow-amount { color:#8d3333; }

/* Figures that came from a guess rather than a statement. */
.assumed-note { color:#8a6100; font-size:12px; font-weight:700; }
.money-num { font-variant-numeric:tabular-nums; text-align:right; }

/* Flagged bookings, grouped by cause. 212 sharing one reason is one decision,
   so each cause folds away until somebody wants the rows behind it. */
.flag-group { border-top:1px solid var(--line); }
.flag-group summary { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; min-height:44px; padding:13px 0; cursor:pointer; font-weight:750; list-style:none; }
.flag-group summary::-webkit-details-marker { display:none; }
.flag-group summary small { color:var(--muted); font-weight:400; }
.flag-group summary::after { content:"Show"; margin-left:auto; color:var(--forest); font-size:12px; font-weight:750; }
.flag-group[open] summary::after { content:"Hide"; }
.flag-group table { margin-bottom:10px; }

/* Paging controls, shared by every long list. */
.paging { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; padding:12px 0 2px; border-top:1px solid var(--line); margin-top:10px; font-size:13px; }
.paging-count { color:var(--muted); }
.paging-sizes, .paging-moves { display:flex; align-items:center; gap:8px; color:var(--muted); }
.paging-sizes a, .paging-moves a { color:var(--forest); font-weight:700; text-decoration:none; }
.paging-sizes a:hover, .paging-moves a:hover { text-decoration:underline; }
.paging-sizes strong { color:var(--ink); }
.paging-moves { margin-left:auto; }

/* The finance lines behind one booking. */
.line-role { font-size:11px; letter-spacing:.08em; text-transform:uppercase; font-weight:750; color:var(--muted); }
.line-guest { color:var(--forest); }
.line-channel { color:#8a6100; }

/* An estimated commission. Always marked, never styled like a figure a
   channel sent: amber, dotted, with its own tag. */
.est-figure { color:#7a5200; font-weight:700; border-bottom:2px dotted var(--amber); }
.est-tag { display:inline-block; margin-left:5px; padding:0 7px; border-radius:999px; border:1px solid var(--amber); background:#fdf6e8; color:#7a5200; font-size:11px; font-weight:750; letter-spacing:.03em; vertical-align:1px; }
.kpi-est { display:block; margin-top:8px; padding-top:8px; border-top:1px dashed var(--line); }
.kpi-est b { color:#7a5200; font-variant-numeric:tabular-nums; }
.owner-kpi--primary .kpi-est { border-top-color:rgba(255,255,255,.22); }
.owner-kpi--primary .kpi-est b { color:#f3c77c; }
.flow-row--est .flow-track span { background:repeating-linear-gradient(135deg,var(--amber) 0 6px,transparent 6px 10px); border:1px solid var(--amber); }
.rate-used { font-family:var(--ssc-heading, Manrope, Inter, ui-sans-serif, system-ui, sans-serif); font-size:19px; color:var(--forest); }
.rate-range { display:flex; align-items:center; gap:8px; min-width:11rem; }
.rate-range-bar { position:relative; flex:1; height:8px; border-radius:4px; background:#e8eee9; }
.rate-range-bar i { position:absolute; top:0; bottom:0; border-radius:4px; background:var(--mint); }
.rate-range-bar.few i { background:var(--amber); }
.rate-range-bar b { position:absolute; top:-3px; width:2px; height:14px; background:var(--forest); }
.rate-range small { color:var(--muted); white-space:nowrap; }
.estimate-rules { margin:0; padding:13px 16px; border-radius:10px; border-left:4px solid var(--mint); background:#edf8f2; }
.estimate-rules ul { margin:4px 0 0; padding-left:18px; }
.estimate-working { margin:0; padding:13px 16px; border-radius:10px; border-left:4px solid var(--amber); background:#fdf6e8; }
