/* ── Design tokens ── */
:root {
    --brand:      #1dcfb8;
    --brand-deep: #11a18e;
    --ink:        #141720;
    --ink2:       #2a2e3a;
    --ink3:       #5a6072;
    --surface:    #F2F3F7;
    --surface2:   #E7E9F0;
    --line:       #E1E3EB;
    --white:      #ffffff;

    /* semantic */
    --green:      #1a7f37;
    --green-bg:   rgba(26,127,55,.10);
    --red:        #cf222e;
    --red-bg:     rgba(207,34,46,.10);
    --amber:      #9a6700;
    --amber-bg:   rgba(154,103,0,.10);
    --blue:       #0969da;
    --blue-bg:    rgba(9,105,218,.10);

    /* layout */
    --radius:     14px;
    --radius-sm:  8px;
    --radius-lg:  20px;

    /* aliases for template compatibility */
    --bg:       #F2F3F7;
    --bg2:      #ffffff;
    --bg3:      #E7E9F0;
    --bg4:      #E1E3EB;
    --border:   #E1E3EB;
    --border2:  #c8cbd6;
    --text:     #141720;
    --text2:    #2a2e3a;
    --text3:    #5a6072;
    --brand-dark:   #11a18e;
    --brand-glow:   rgba(29,207,184,.12);
}

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Geist', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    background: var(--surface);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: 'Geist', 'DM Sans', ui-sans-serif, system-ui, sans-serif; }

/* ── App shell ── */
.app-shell { min-height: calc(100vh - 60px); background: var(--surface); }
::selection { background: var(--brand-glow); color: var(--ink); }

/* ── Strips above the bar ── */
.sub-banner {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 28px;
    background: var(--red-bg); color: var(--red);
    border-bottom: 1px solid rgba(207,34,46,.25);
    font-size: 13.5px;
}
.sub-banner svg { flex-shrink: 0; }
.sub-banner a { color: var(--red); font-weight: 600; margin-left: auto; white-space: nowrap; }
.imp-banner {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 28px; background: #6d28d9; color: #fff; font-size: 13.5px;
}
.imp-banner svg { flex-shrink: 0; }
.imp-banner a { margin-left: auto; color: #fff; font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

/* ── Flash messages ── */
.flash-zone { padding: 20px 32px 0; display: flex; flex-direction: column; gap: 8px; max-width: 1440px; margin: 0 auto; }
.flash { border-radius: var(--radius-sm); padding: .75rem 1rem; font-size: .875rem; }
.flash-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(26,127,55,.3); }
.flash-error   { background: var(--red-bg);   color: var(--red);   border: 1px solid rgba(207,34,46,.3); }

/* ── App bar (top navigation) ── */
.appbar {
    position: sticky; top: 0; z-index: 100;
    height: 60px; display: flex; align-items: center; gap: 4px;
    padding: 0 20px 0 28px;
    background: var(--ink); color: #b4bac4;
}
.appbar-logo { display: flex; align-items: center; margin-right: 22px; flex-shrink: 0; border-radius: 6px; }
.appbar-logo img { height: 24px; width: auto; display: block; }
.appbar-links { display: flex; align-items: center; gap: 2px; min-width: 0; }
.appbar-link {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 11px; border-radius: 8px; border: 0; background: none; cursor: pointer;
    font: 500 14px/1.2 'Geist', ui-sans-serif, system-ui, sans-serif;
    color: inherit; text-decoration: none; white-space: nowrap;
    transition: background .15s, color .15s;
}
.appbar-link:hover { color: #fff; background: #1f2330; }
.appbar-link[aria-current="page"] { color: #fff; background: #2a2f3d; }
.appbar-link:focus-visible, .appbar-avatar:focus-visible, .appbar-logo:focus-visible, .appbar-burger:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.appbar-admin { border: 1px solid #3a4050; }
.appbar-chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-count {
    font-size: 12px; font-weight: 600; line-height: 1; padding: 3px 7px; border-radius: 9px;
    background: var(--brand); color: var(--ink); font-variant-numeric: tabular-nums;
}
.nav-count-warn  { background: #ffd9a8; color: #6b3d00; }
.nav-count-alert { background: #ffc9cd; color: #8a1019; }
.appbar-more { display: none; }
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.appbar-dd { position: relative; }
.appbar-avatar {
    width: 34px; height: 34px; border-radius: 17px; border: 0; cursor: pointer;
    background: var(--brand); color: var(--ink); font: 600 13px/1 'Geist', sans-serif;
    display: grid; place-items: center;
}
.appbar-avatar[aria-current="page"] { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #fff; }
.appbar-menu {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 110;
    min-width: 250px; padding: 6px; display: none;
    background: var(--white); color: var(--ink);
    border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 12px 32px rgba(20,23,32,.16);
}
.appbar-menu-left { left: 0; right: auto; min-width: 180px; }
.appbar-dd.is-open .appbar-menu { display: block; }
.appbar-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 8px; font-size: 14px;
    color: var(--ink2); text-decoration: none;
}
.appbar-menu a:hover, .appbar-menu a:focus-visible { background: var(--surface); outline: none; }
.appbar-menu a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.appbar-menu a .nav-count { margin-left: auto; }
.appbar-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.appbar-menu-head { font-size: 12.5px; color: var(--ink3); padding: 8px 10px 4px; }
.appbar-icon { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.appbar-account { min-width: 270px; }
.appbar-who { padding: 10px 10px 8px; }
.appbar-who strong { display: block; font-weight: 600; }
.appbar-who span { display: block; font-size: 13px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-plan { margin: 4px 4px 6px; padding: 12px; border-radius: 10px; background: var(--surface); }
.appbar-plan-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.appbar-plan-row strong { font-weight: 600; }
.appbar-plan-row span { color: var(--ink3); }
.appbar-plan-bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.appbar-plan-bar span { display: block; height: 100%; background: var(--brand); }
.appbar-plan-bar.is-full span { background: var(--red); }
.appbar-menu a.appbar-plan-cta {
    display: block; margin-top: 10px; padding: 7px; text-align: center;
    background: var(--ink); color: #fff; font-weight: 600; font-size: 13px;
}
.appbar-menu a.appbar-plan-cta:hover { background: var(--ink2); }
.appbar-burger {
    display: none; margin-left: auto; width: 40px; height: 40px; border-radius: 9px;
    border: 0; background: none; color: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.appbar-burger svg, .appsheet-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* phone menu sheet */
.appsheet { position: fixed; inset: 0; z-index: 300; }
.appsheet[hidden] { display: none; }
.appsheet-scrim { position: absolute; inset: 0; background: rgba(20,23,32,.5); }
.appsheet-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88vw);
    background: var(--white); overflow-y: auto; padding: 12px 12px 28px;
    box-shadow: -8px 0 30px rgba(20,23,32,.2);
}
.appsheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; }
.appsheet-head img { height: 22px; width: auto; }
.appsheet-close { width: 40px; height: 40px; border: 0; background: none; border-radius: 9px; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.appsheet-panel a {
    display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 9px;
    font-size: 15px; font-weight: 500; color: var(--ink2); text-decoration: none;
}
.appsheet-panel a[aria-current="page"] { background: var(--brand-glow); color: var(--ink); }
.appsheet-panel a .nav-count { margin-left: auto; }
.appsheet-group { font-size: 12.5px; color: var(--ink3); padding: 16px 10px 4px; }

@media (max-width: 1240px) {
    .appbar-secondary { display: none; }
    .appbar-more { display: block; }
}
@media (max-width: 900px) {
    .appbar { padding: 0 10px 0 16px; }
    .appbar-links, .appbar-right { display: none; }
    .appbar-burger { display: flex; }
    .sub-banner, .imp-banner { padding: 9px 16px; flex-wrap: wrap; }
}

.app-footer { max-width: 1440px; margin: 0 auto; padding: 8px 32px 28px; font-size: 12px; color: var(--ink3); background: var(--surface); }
.app-footer a { color: inherit; }

@media print {
    .appbar, .app-footer, .imp-banner, .sub-banner { display: none !important; }
}

/* ── Main area ── */
.main {
    max-width: 1440px; margin: 0 auto;
    min-height: calc(100vh - 60px);
    background: var(--surface);
    color: var(--ink);
}

/* ── Page header (title and actions under the app bar) ── */
.topbar {
    display: flex; align-items: center; flex-wrap: wrap;
    padding: 26px 32px 0;
    gap: 12px 16px;
}
.topbar-title-wrap { flex: 1; min-width: 0; }
.topbar h1 {
    font-size: 26px; font-weight: 600;
    letter-spacing: -0.02em; color: var(--ink); line-height: 1.15;
}
.topbar-sub {
    font-size: 14px; color: var(--ink3); margin-top: 3px;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-content { padding: 22px 32px 32px; }

/* ── Primary button (dark ink) ── */
.btn-accent, .btn-primary-ink {
    background: var(--ink); color: #fff;
    border: none; border-radius: 9px;
    padding: 9px 16px;
    font-family: 'Geist', sans-serif; font-size: 13.5px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
    text-decoration: none; transition: background .15s;
}
.btn-accent:hover, .btn-primary-ink:hover { background: var(--ink2); }

/* Brand mint accent button */
.btn-brand {
    background: var(--brand); color: var(--ink);
    border: none; border-radius: 9px;
    padding: 9px 16px;
    font-family: 'Geist', sans-serif; font-size: 13.5px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
    text-decoration: none; transition: background .15s;
}
.btn-brand:hover { background: var(--brand-deep); color: var(--white); }

/* Ghost/secondary button */
.btn-secondary {
    background: var(--white); color: var(--ink);
    border: 1px solid var(--line); border-radius: 9px;
    padding: 9px 16px;
    font-family: 'Geist', sans-serif; font-size: 13.5px; font-weight: 500;
    cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
    text-decoration: none; transition: background .15s;
}
.btn-secondary:hover { background: var(--surface); }

.btn-danger {
    background: var(--red-bg); border: 1px solid rgba(207,34,46,.3);
    color: var(--red); border-radius: var(--radius-sm);
    padding: 9px 16px;
    font-family: 'Geist', sans-serif; font-size: 13px; cursor: pointer;
    transition: background .15s;
}
.btn-danger:hover { background: rgba(207,34,46,.15); }

/* ── Badges / pills ── */
.badge {
    font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: 20px; white-space: nowrap;
    font-family: 'Geist Mono', ui-monospace, monospace;
}
.badge.ok      { background: var(--green-bg);  color: var(--green); }
.badge.due     { background: var(--amber-bg);  color: var(--amber); }
.badge.overdue { background: var(--red-bg);    color: var(--red); }
.badge.btl     { background: var(--blue-bg);   color: var(--blue); }
.badge.blue    { background: var(--brand-glow);color: var(--brand-deep); }
.badge.hmo     { background: rgba(29,207,184,.12); color: var(--brand-deep); }
.badge.flip    { background: var(--amber-bg);  color: var(--amber); }
.badge.ns      { background: var(--surface2);  color: var(--ink3); }
.badge.sa      { background: rgba(109,40,217,.1); color: #6D28D9; }
.badge.r2sa    { background: rgba(219,39,119,.1); color: #DB2777; }
.badge.let     { background: rgba(29,207,184,.15); color: var(--brand-deep); }
.badge.void    { background: var(--surface2);  color: var(--ink3); }

/* ── Cards ── */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}
.card-header {
    padding: 18px 22px; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.see-all { font-size: 12px; color: var(--brand-deep); cursor: pointer; text-decoration: none; font-family: 'Geist Mono', ui-monospace, monospace; }

/* ── Stat cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 20px 18px;
    position: relative; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}
.stat-card .slabel {
    font-size: 11px; color: var(--ink3); font-weight: 500;
    margin-bottom: 10px; text-transform: uppercase; letter-spacing: .07em;
    font-family: 'Geist Mono', ui-monospace, monospace;
}
.stat-card .sval {
    font-size: 30px; font-weight: 600; line-height: 1;
    margin-bottom: 6px; letter-spacing: -0.8px; color: var(--ink);
}
.stat-card .sval.accent { color: var(--brand-deep); }
.stat-card .schg {
    font-size: 11.5px; color: var(--ink3);
    font-family: 'Geist Mono', ui-monospace, monospace;
}
.stat-card .schg.good { color: var(--brand-deep); }
/* top stripe */
.adot {
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px; border-radius: var(--radius) var(--radius) 0 0;
}

/* ── Chart ── */
.mini-chart { padding: 18px 22px 22px; }
.chart-wrap { display: flex; gap: 10px; }
.chart-yaxis {
    display: flex; flex-direction: column; justify-content: space-between;
    height: 160px; flex-shrink: 0; text-align: right;
}
.chart-yaxis span {
    font-size: 10px; color: var(--ink3); white-space: nowrap; line-height: 1;
    font-family: 'Geist Mono', ui-monospace, monospace;
}
.chart-main { flex: 1; min-width: 0; }
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; position: relative; }
.chart-bar {
    flex: 1; background: var(--brand); border-radius: 6px 6px 0 0;
    opacity: .65; transition: opacity .2s; cursor: pointer;
    position: relative; z-index: 1;
}
.chart-bar:hover { opacity: 1; }
.chart-labels { display: flex; gap: 6px; margin-top: 8px; }
.chart-labels span {
    flex: 1; text-align: center; font-size: 10px; color: var(--ink3);
    font-family: 'Geist Mono', ui-monospace, monospace;
}

/* ── Dashboard grid ── */
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-bottom: 28px; }

/* ── Section header (SectionHead) ── */
.section-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 20px; gap: 16px;
}
.section-head-left h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; }
.section-head-left .section-sub {
    font-size: 12.5px; color: var(--ink3); margin-top: 3px;
    font-family: 'Geist Mono', ui-monospace, monospace;
}

/* ── Filter bar ── */
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.search-box {
    flex: 1; max-width: 320px;
    background: var(--white); border: 1px solid var(--line);
    border-radius: 9px; padding: 9px 14px;
    color: var(--ink); font-family: 'Geist', sans-serif; font-size: 13px;
    outline: none; transition: border-color .2s;
}
.search-box:focus { border-color: var(--ink); }
.search-box::placeholder { color: var(--ink3); }
.fsel, .filter-select {
    background: var(--white); border: 1px solid var(--line);
    border-radius: 9px; padding: 9px 14px;
    color: var(--ink2); font-family: 'Geist', sans-serif; font-size: 13px;
    outline: none; cursor: pointer;
}

/* ── Segment control (filter toggles) ── */
.seg-control {
    display: inline-flex; gap: 4px;
    background: var(--white); border: 1px solid var(--line);
    border-radius: 9px; padding: 3px;
}
.seg-btn {
    padding: 6px 14px; border-radius: 7px;
    font-size: 12.5px; border: none; cursor: pointer;
    font-family: 'Geist', sans-serif; font-weight: 450;
    background: transparent; color: var(--ink2);
    transition: background .12s, color .12s;
}
.seg-btn.active { background: var(--ink); color: #fff; font-weight: 600; }

/* ── Property grid / cards ── */
.prop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.prop-card {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    cursor: pointer; text-decoration: none; color: inherit; display: block;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    transition: box-shadow .15s, transform .15s;
}
.prop-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); transform: translateY(-1px); }
.prop-card-inner { display: grid; grid-template-columns: 150px 1fr; min-height: 160px; }
.prop-card-photo {
    background: var(--surface2); position: relative;
    display: flex; align-items: center; justify-content: center;
    font-size: 44px;
}
.prop-card-right { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); }
.prop-card-body { padding: 18px; flex: 1; }
.prop-card-body .prop-name { font-size: 15px; font-weight: 600; letter-spacing: -0.3px; color: var(--ink); }
.prop-card-body .prop-city { font-size: 11.5px; color: var(--ink3); margin-top: 2px; font-family: 'Geist Mono', ui-monospace, monospace; }
.prop-stats { display: flex; gap: 20px; margin-top: 16px; }
.prop-stat .stat-lbl { font-size: 10px; color: var(--ink3); font-family: 'Geist Mono', ui-monospace, monospace; text-transform: uppercase; letter-spacing: .05em; }
.prop-stat .stat-val { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 16px; font-weight: 600; margin-top: 2px; color: var(--ink); }
.prop-stat .stat-val.neutral  { color: var(--ink3); }
.prop-stat .stat-val.positive { color: var(--green); }
.prop-stat .stat-val.negative { color: var(--red); }
.prop-card-footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.compliance-dots { display: flex; gap: 6px; align-items: center; }
.cdot { width: 8px; height: 8px; border-radius: 50%; }
.cdot.ok      { background: #1dcfb8; }
.cdot.due     { background: #E68A2E; }
.cdot.overdue { background: #D9484A; }
.cdot.ns      { background: var(--surface2); border: 1px solid var(--border2); }

/* property row (list view) */
.property-row {
    display: flex; align-items: center; padding: 13px 20px;
    border-bottom: 1px solid var(--line); gap: 14px;
    cursor: pointer; text-decoration: none; color: inherit;
    transition: background .12s;
}
.property-row:last-child { border-bottom: none; }
.property-row:hover { background: var(--surface); }
.prop-thumb {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0; background: var(--surface2);
}
.prop-info { flex: 1; }
.prop-info .prop-name { font-size: 14px; font-weight: 500; margin-bottom: 2px; color: var(--ink); }
.prop-info .prop-addr { font-size: 12px; color: var(--ink3); font-family: 'Geist Mono', ui-monospace, monospace; }
.prop-cashflow { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 15px; font-weight: 600; }
.prop-cashflow.pos { color: var(--brand-deep); }
.prop-cashflow.neg { color: var(--red); }

/* ── Alert / issue rows ── */
.alert-row {
    display: flex; align-items: flex-start;
    padding: 13px 20px; border-bottom: 1px solid var(--line); gap: 12px;
}
.alert-row:last-child { border-bottom: none; }
.aicon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 14px;
}
.aicon.warn   { background: var(--amber-bg); }
.aicon.danger { background: var(--red-bg); }
.atext .atitle { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.atext .asub   { font-size: 12px; color: var(--ink3); font-family: 'Geist Mono', ui-monospace, monospace; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 80px 40px; }
.empty-state .eicon { font-size: 52px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: var(--ink3); font-size: 14px; max-width: 340px; margin: 0 auto 24px; }

/* ── Detail page ── */
.detail-header {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px; margin-bottom: 20px;
    display: flex; align-items: flex-start; gap: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.d-icon {
    width: 68px; height: 68px; background: var(--surface2);
    border-radius: var(--radius); display: flex; align-items: center;
    justify-content: center; font-size: 34px; flex-shrink: 0;
}
.d-info { flex: 1; }
.d-info h2 { font-size: 22px; font-weight: 600; margin-bottom: 4px; letter-spacing: -0.4px; color: var(--ink); }
.d-info .daddr { color: var(--ink3); font-size: 13px; margin-bottom: 12px; font-family: 'Geist Mono', ui-monospace, monospace; }
.d-info .dmeta { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.detail-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }

/* prop info two-column ── */
.prop-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* ── Prop tabs ── */
.prop-tabs {
    display: flex; gap: 0;
    border-bottom: 1px solid var(--line); padding: 0 22px;
    overflow-x: auto; scrollbar-width: none;
}
.prop-tabs::-webkit-scrollbar { display: none; }
.prop-tab {
    padding: 13px 16px; font-size: 13px; font-weight: 500;
    color: var(--ink3); cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .12s, border-color .12s; user-select: none;
}
.prop-tab:hover { color: var(--ink); }
.prop-tab.active { color: var(--brand-deep); border-bottom-color: var(--brand-deep); }
.prop-tab-panel { display: none; }
.prop-tab-panel.active { display: block; }
.data-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--line);
}
.data-row:last-child { border-bottom: none; }
.data-row .dk { font-size: 13px; color: var(--ink3); }
.data-row .dv { font-size: 14px; font-weight: 500; color: var(--ink); }

/* ── Compliance table ── */
.comp-table {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.comp-table table { width: 100%; border-collapse: collapse; }
.comp-table thead tr { background: var(--surface); }
.comp-table th {
    padding: 12px 18px; text-align: left; font-size: 10.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .07em; color: var(--ink3);
    border-bottom: 1px solid var(--line);
    font-family: 'Geist Mono', ui-monospace, monospace;
}
.comp-table td { padding: 13px 18px; font-size: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.comp-table tr:last-child td { border-bottom: none; }
.comp-table tr:hover td { background: var(--surface); }

/* ── Modal ── */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(20,23,32,.45); backdrop-filter: blur(4px);
    z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    width: 680px; max-height: 90vh; overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.35);
}
.modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; background: var(--white); z-index: 1;
}
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-close {
    width: 30px; height: 30px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--ink3); font-size: 18px; line-height: 1;
    transition: background .12s;
}
.modal-close:hover { background: var(--red-bg); color: var(--red); }
.modal-body { padding: 22px 24px; }
.modal-footer {
    padding: 16px 24px; border-top: 1px solid var(--line);
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    position: sticky; bottom: 0; background: var(--white);
}

/* ── Modal tabs ── */
.modal-tabs {
    display: flex; padding: 0 24px;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 61px; background: var(--white); z-index: 1;
}
.mtab {
    padding: 12px 14px; font-size: 13px; font-weight: 500; color: var(--ink3);
    cursor: pointer; background: none; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    display: flex; align-items: center; gap: 7px; white-space: nowrap;
}
.mtab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.mtab:hover:not(.active):not(:disabled) { color: var(--ink2); }
.mtab:disabled { opacity: .38; cursor: not-allowed; }
.mtab-num {
    width: 18px; height: 18px; border-radius: 50%; font-size: 10px; font-weight: 700;
    background: var(--surface2); color: var(--ink3);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: background .15s, color .15s;
}
.mtab.active .mtab-num { background: var(--ink); color: #fff; }
.mtab.done .mtab-num { background: var(--green); color: #fff; }
.mtab-panel { display: none; }
.mtab-panel.active { display: block; }
.saved-chip {
    font-size: 12px; font-weight: 600; color: var(--green);
    align-items: center; gap: 5px; display: none;
}
.saved-chip.show { display: flex; }
.modal-footer-split {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
}

/* ── Forms ── */
.form-section { margin-bottom: 28px; }
.form-section h4 {
    font-size: 11px; font-weight: 600; color: var(--ink3);
    text-transform: uppercase; letter-spacing: .08em;
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
    font-family: 'Geist Mono', ui-monospace, monospace;
}
.form-section h4::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fgrid.c3 { grid-template-columns: 1fr 1fr 1fr; }
.fgrid .full { grid-column: 1 / -1; }
.field { margin-bottom: 0; }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%;
    background: var(--white); border: 1px solid var(--line);
    border-radius: 10px; padding: 11px 13px;
    color: var(--ink); font-family: 'Geist', sans-serif; font-size: 14px;
    outline: none; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field input::placeholder { color: var(--ink3); }
.field.field-error input, .field.field-error select, .field.field-error textarea { border-color: var(--red); }
.field-error-msg { font-size: 12px; color: var(--red); margin-top: 5px; }
.field select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%235a6072' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

/* ── Settings ── */
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 24px; min-width: 0; }
.snav-item {
    padding: 10px 14px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 14px; color: var(--ink3);
    transition: background .12s, color .12s; margin-bottom: 4px;
}
.snav-item:hover { background: var(--surface); color: var(--ink2); }
.snav-item.active { background: var(--surface); color: var(--ink); font-weight: 500; }
.ssection {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); margin-bottom: 20px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.ssec-head { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.ssec-head h4 { font-size: 15px; font-weight: 600; }
.ssec-head p { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.ssec-body { padding: 22px; }
.tog-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 0; border-bottom: 1px solid var(--line);
}
.tog-row:last-child { border-bottom: none; }
.tog-lbl h5 { font-size: 14px; font-weight: 500; }
.tog-lbl p  { font-size: 12px; color: var(--ink3); }
.toggle {
    width: 42px; height: 24px; background: var(--surface2);
    border-radius: 12px; position: relative; cursor: pointer;
    transition: background .2s; flex-shrink: 0; border: none;
}
.toggle.on { background: var(--brand); }
.toggle::after {
    content: ''; position: absolute;
    width: 18px; height: 18px; background: white;
    border-radius: 50%; top: 3px; left: 3px;
    transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.toggle.on::after { left: 21px; }

/* ── Toast ── */
.toast {
    position: fixed; bottom: 28px; right: 28px;
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 14px 20px; font-size: 14px;
    z-index: 999; transform: translateY(80px); opacity: 0;
    transition: transform .3s, opacity .3s;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }

/* ── Confirm dialog ── */
.confirm-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(20,23,32,.45); z-index: 300;
    align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.confirm-overlay.open { display: flex; }
.confirm-box {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 32px; width: 380px; text-align: center;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.35);
}
.confirm-box h3 { font-size: 18px; margin-bottom: 10px; }
.confirm-box p  { font-size: 14px; color: var(--ink3); margin-bottom: 24px; }
.confirm-box .cactions { display: flex; gap: 12px; justify-content: center; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(20,23,32,.12); border-radius: 4px;
    border: 2px solid transparent; background-clip: content-box;
}

/* ── Table styles ── */
.table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap thead tr { background: var(--surface); }
.table-wrap th {
    padding: 12px 18px; text-align: left; font-size: 10.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .07em; color: var(--ink3);
    border-bottom: 1px solid var(--line);
    font-family: 'Geist Mono', ui-monospace, monospace;
}
.table-wrap td { padding: 13px 18px; font-size: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: var(--surface); }

/* ── Auth screens ── */
.auth-split {
    height: 100vh; width: 100vw;
    display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
}
.auth-form-side {
    display: flex; flex-direction: column;
    padding: 40px 56px; overflow-y: auto; background: #fff;
}
.auth-logo { display: flex; align-items: center; gap: 9px; }
.auth-logo img { height: 28px; width: auto; display: block; }
.auth-form-center {
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; max-width: 400px;
    margin: 0 auto; width: 100%; padding: 24px 0;
}
.auth-step-bar { display: flex; gap: 6px; margin-bottom: 28px; }
.auth-step-bar span { height: 4px; flex: 1; border-radius: 2px; }
.auth-h2 { font-size: 32px; font-weight: 600; letter-spacing: -1px; margin: 0 0 8px; }
.auth-sub { font-size: 15px; color: var(--ink3); margin: 0 0 28px; line-height: 1.5; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.auth-divider-line { flex: 1; height: 1px; background: var(--line); }
.auth-divider span { font-size: 12px; color: var(--ink3); font-family: 'Geist Mono', ui-monospace, monospace; }
.auth-ghost-btn {
    width: 100%; background: #fff; color: var(--ink);
    border: 1.5px solid var(--line); border-radius: 10px; padding: 12px;
    font-family: 'Geist', sans-serif; font-size: 15px; font-weight: 500;
    cursor: pointer; transition: border-color .15s;
}
.auth-ghost-btn:hover { border-color: var(--ink3); }
.auth-switch { text-align: center; margin-top: 24px; font-size: 13px; color: var(--ink3); }
.auth-switch a { color: var(--ink); text-decoration: none; font-weight: 500; }
.auth-error {
    background: var(--red-bg); color: var(--red);
    border: 1px solid rgba(207,34,46,.3); border-radius: var(--radius-sm);
    padding: .75rem 1rem; margin-bottom: 1.25rem; font-size: .875rem;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btn-primary {
    width: 100%; background: var(--ink); color: #fff;
    border: none; border-radius: 10px; padding: 13px;
    font-family: 'Geist', sans-serif; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: background .15s; margin-top: 8px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { background: var(--ink2); }
@media (max-width: 860px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-form-side { padding: 40px 32px; }
}

/* ── Monthly portfolio table ── */
.portfolio-table th { font-family: 'Geist Mono', ui-monospace, monospace; }
.portfolio-table td.mono { font-family: 'Geist Mono', ui-monospace, monospace; }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .stat-grid   { grid-template-columns: repeat(2, 1fr); }
    .prop-grid   { grid-template-columns: 1fr; }
    .dash-grid   { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-cols { grid-template-columns: 1fr; }
    .prop-info-grid { grid-template-columns: 1fr; }
    .prop-card-inner { grid-template-columns: 120px 1fr; }
    #issueLayout { grid-template-columns: 1fr; }
    #issueDetail { display: none !important; }
}
@media (max-width: 600px) {
    .prop-card-inner { grid-template-columns: 1fr; }
    .prop-card-photo { min-height: 120px; }
    .prop-card-right { border-left: none; border-top: 1px solid var(--line); }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Inspection checklist ── */
.checklist-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist-item:last-child { border-bottom: none; }
.ci-label { flex: 1; font-size: 13.5px; color: var(--ink); }
.ci-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.ci-seg label { display: flex; align-items: center; }
.ci-seg label { position: relative; }
.ci-seg label input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ci-seg label input[type=radio]:focus-visible + span { outline: 2px solid var(--ink); outline-offset: -2px; }
.ci-seg label span { font-size: 12px; font-weight: 500; padding: 5px 11px; color: var(--ink3); cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; }
.ci-seg label:not(:last-child) span { border-right: 1px solid var(--line); }
.ci-seg label input[value="pass"]:checked + span { background: var(--green); color: #fff; }
.ci-seg label input[value="fail"]:checked + span { background: var(--red); color: #fff; }
.ci-seg label input[value="na"]:checked + span { background: var(--surface2); color: var(--ink); }
.ci-notes { font-size: 12.5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); width: 160px; flex-shrink: 0; }
.ci-notes:focus { outline: none; border-color: var(--ink3); }
.insp-stat-bar { display: flex; align-items: center; gap: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; flex-wrap: wrap; }
.insp-stat-item { display: flex; flex-direction: column; gap: 2px; }
.insp-stat-val { font-size: 22px; font-weight: 700; color: var(--ink); font-family: 'Geist Mono', ui-monospace, monospace; }
.insp-stat-val.pass { color: var(--green); }
.insp-stat-val.fail { color: var(--red); }
.insp-stat-lbl { font-size: 11.5px; color: var(--ink3); font-weight: 500; }
.ci-result { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ci-result:last-child { border-bottom: none; }
.ci-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; flex-shrink: 0; margin-top: 1px; }
.ci-badge.pass { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.ci-badge.fail { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.ci-badge.na { background: var(--surface2); color: var(--ink3); }
.ci-result-notes { font-size: 12px; color: var(--ink3); margin-top: 3px; }

/* ── Inspection page tabs ── */
.insp-tabs { display:flex; background:var(--white); border:1px solid var(--line); border-radius:12px; overflow:hidden; margin-bottom:20px; overflow-x:auto; scrollbar-width:none; }
.insp-tabs::-webkit-scrollbar { display:none; }
.insp-tab { padding:13px 18px; font-size:13px; font-weight:500; color:var(--ink3); cursor:pointer; background:none; border:none; border-bottom:2px solid transparent; flex-shrink:0; display:flex; align-items:center; gap:7px; white-space:nowrap; transition:color .15s, border-color .15s, background .15s; }
.insp-tab.active { color:var(--ink); border-bottom-color:var(--ink); font-weight:600; background:var(--surface); }
.insp-tab:hover:not(.active) { color:var(--ink2); background:var(--surface); }
.insp-tab-count { font-size:10.5px; font-weight:700; padding:1px 6px; border-radius:10px; line-height:16px; }
.insp-tab-count.ok { background:var(--surface2); color:var(--ink3); }
.insp-tab-count.fail { background:var(--red); color:#fff; }
.insp-tab-panel { display:none; }
.insp-tab-panel.active { display:block; }

@media (max-width: 600px) {
    .checklist-item { flex-wrap: wrap; }
    .ci-notes { width: 100%; }
}

/* ── Dashboard v2 stat cards ── */
.stat-card2 { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.sc2-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--ink3); font-family: 'Geist Mono', ui-monospace, monospace; margin-bottom: 10px; }
.sc2-val { font-size: 28px; font-weight: 600; letter-spacing: -1px; color: var(--ink); line-height: 1; }
.sc2-sub { font-size: 12px; color: var(--ink3); margin-top: 4px; font-family: 'Geist Mono', ui-monospace, monospace; }

/* ── Topbar search ── */
.topbar-search { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink3); width: 200px; background: var(--surface); cursor: default; }
.topbar-search-kbd { margin-left: auto; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; background: var(--white); color: var(--ink3); }

/* ── Property status badges ── */
.badge.let  { background: var(--brand-glow); color: var(--brand-deep); }
.badge.void { background: var(--surface2); color: var(--ink3); }

/* ── Bell notification dot ── */
.topbar-bell-dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 1.5px solid var(--white); }

/* ── input-field generic helper ── */
.input-field {
    background: var(--white); border: 1px solid var(--line);
    border-radius: 10px; padding: 10px 13px;
    color: var(--ink); font-family: 'Geist', sans-serif; font-size: 14px;
    outline: none; transition: border-color .2s;
}
.input-field:focus { border-color: var(--ink); }

/* ── Mobile breakpoint (≤ 768px) ── */
@media (max-width: 768px) {
    /* sub-banner compact */
    .sub-banner { font-size: 12px; }

    /* page header */
    .topbar { padding: 20px 16px 0; gap: 10px; }
    .topbar h1 { font-size: 22px; }
    .topbar-actions { gap: 6px; }

    /* page content */
    .page-content { padding: 16px; }
    .flash-zone { padding: 12px 16px 0; }

    /* grids → single column */
    .stat-grid   { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .prop-grid   { grid-template-columns: 1fr; }
    .dash-grid   { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .detail-cols { grid-template-columns: 1fr; }
    .prop-info-grid { grid-template-columns: 1fr; }
    .fgrid       { grid-template-columns: 1fr; }
    .fgrid.c3    { grid-template-columns: 1fr; }
    .form-grid   { grid-template-columns: 1fr; }

    /* stat card values smaller */
    .stat-card .sval { font-size: 22px; }

    /* property card stacked */
    .prop-card-inner { grid-template-columns: 1fr; }
    .prop-card-photo { min-height: 110px; }
    .prop-card-right { border-left: none; border-top: 1px solid var(--line); }

    /* tables — allow horizontal scroll */
    .comp-table, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* modal — full-screen on mobile */
    .modal { width: 100%; max-width: 100%; max-height: 100vh; border-radius: 0; margin: 0; }
    .modal-overlay { align-items: flex-end; }

    /* confirm box */
    .confirm-box { width: calc(100vw - 32px); }

    /* filter bar wrapping */
    .filter-bar { flex-wrap: wrap; }
    .search-box { max-width: 100%; }

    /* cashflow stat tiles */
    .stat-card2 { padding: 14px 16px; }
    .sc2-val { font-size: 22px; }

    /* inspection stat bar */
    .insp-stat-bar { gap: 16px; padding: 12px 16px; }

    /* hide topbar-search on mobile */
    .topbar-search { display: none; }

    /* settings nav → horizontal tabs above content */
    .settings-grid { grid-template-columns: 1fr; }

    /* detail header — stack photo + info vertically */
    .detail-header { flex-direction: column; gap: 14px; }
    .d-icon { width: 48px; height: 48px; font-size: 24px; }

    /* prop stats row — allow wrapping */
    .prop-stats { flex-wrap: wrap; gap: 12px; }

    /* section head — stack title and actions */
    .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }

    /* topbar: don't let action buttons overflow */
    .topbar-actions { max-width: 100%; flex-wrap: wrap; }

    /* data rows in detail panels */
    .data-row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .data-row .dv { font-size: 13px; }
}

/* ── Extra small (≤ 480px) ── */
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .topbar h1 { font-size: 20px; }
    .page-content { padding: 12px; }
    .card { border-radius: 10px; }
}

/* ── Responsive page layout grids ──
   Replace inline grid-template-columns with these classes so media
   queries can override them (inline styles have higher specificity). ── */

/* 2-column content+aside (e.g. dashboard rows, property detail) */
.pg-2col { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }

/* 4-equal-column grid (dashboard news widget, investment strip) */
.pg-4col { display: grid; grid-template-columns: repeat(4, 1fr); }

/* Property banner: fixed photo column + details */
.pg-banner { display: grid; grid-template-columns: 220px 1fr; overflow: hidden; }

/* Investment strip: 4 equal stat columns */
.pg-strip { display: grid; grid-template-columns: repeat(4, 1fr); }

/* Properties list table row: name + strategy + status + rent */
.pg-prop-row { display: grid; grid-template-columns: 1.6fr 60px 72px 88px; gap: 12px; align-items: center; }

/* Topbar actions: allow wrapping on small screens */
.topbar-actions { flex-shrink: 0; }

@media (max-width: 1024px) {
    .pg-2col { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
    .pg-4col   { grid-template-columns: repeat(2, 1fr); }
    .pg-banner { grid-template-columns: minmax(0, 1fr); }
    .pg-strip  { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* News widget: remove right border on 2nd column, add bottom border between rows */
    .pg-4col > a:nth-child(2n) { border-right: none !important; }
    .pg-4col > a:nth-child(n+3) { border-top: 1px solid var(--line); }

    /* Collapse property list rows: show name + rent only */
    .pg-prop-row { grid-template-columns: 1fr 88px; }
    .pg-prop-row .pg-col-strategy,
    .pg-prop-row .pg-col-status { display: none; }

    /* Topbar: allow actions to wrap under title */
    .topbar { flex-wrap: wrap; }
    .topbar-title-wrap { min-width: 0; }

    /* Property show topbar: stack action buttons */
    .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }

    /* Tables scroll horizontally rather than breaking layout */
    .comp-table, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .comp-table table,
    .table-wrap table { min-width: 480px; }
}

@media (max-width: 480px) {
    .pg-4col  { grid-template-columns: 1fr; }
    .pg-strip { grid-template-columns: repeat(2, 1fr); }
    .pg-prop-row { grid-template-columns: 1fr; }
    .pg-prop-row .pg-col-strategy,
    .pg-prop-row .pg-col-status,
    .pg-prop-row .pg-col-rent { display: none; }

    /* News widget single column: remove all dividers */
    .pg-4col > a { border-right: none !important; border-top: 1px solid var(--line); }
    .pg-4col > a:first-child { border-top: none; }

    /* Tables: reduce min-width so they don't force horizontal scroll on small phones */
    .comp-table table,
    .table-wrap table { min-width: 320px; }

    /* Auth screens */
    .auth-form-side { padding: 32px 20px; }
}

/* ── Home: your year ── */
.dash-head { align-items: flex-end; }
.dash-figures { display: flex; gap: 12px 32px; flex-wrap: wrap; margin: 0 8px 0 auto; }
.dash-figures dt { font-size: 12.5px; color: var(--ink3); }
.dash-figures dd { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dash-figures .is-good { color: #0b7466; }
.dash-figures .is-bad { color: var(--red); }
.dash-empty { padding: 28px; }
.dash-empty h2 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.dash-empty p { color: var(--ink2); max-width: 62ch; margin-bottom: 16px; }

.yband { padding: 20px 22px 18px; overflow: visible; }
.yband-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.yband-head h2 { font-size: 15px; font-weight: 600; }
.yband-seg { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.yband-seg button { padding: 6px 12px; border: 0; background: var(--white); font: 500 13px/1.3 'Geist', sans-serif; color: var(--ink3); cursor: pointer; }
.yband-seg button + button { border-left: 1px solid var(--line); }
.yband-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.yband-seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.yband-scroll { position: relative; overflow-x: auto; margin: 0 -6px; padding: 4px 6px 2px; scrollbar-width: thin; }
.yband-cols { display: grid; grid-template-columns: repeat(12, minmax(64px, 1fr)); gap: 10px; height: 220px; min-width: 860px; }
.yband[data-view="dates"] .yband-cols { height: 278px; }
.yband-col {
    display: flex; flex-direction: column; gap: 6px; min-width: 0;
    padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: center;
}
.yband-col:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.yband-pins { display: none; height: 52px; flex-direction: column; justify-content: flex-end; gap: 4px; }
.yband[data-view="dates"] .yband-pins { display: flex; }
.yband-pin { font-size: 12px; padding: 2px 7px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; background: #e9ecf1; color: var(--ink2); }
.yband-pin.is-amber { background: #fdf1dc; color: #8a5200; }
.yband-pin.is-red { background: #fbe9ea; color: #b01c27; }
.yband-pin.is-more { background: none; color: var(--ink3); padding-left: 2px; }
.yband-track { flex: 1; position: relative; }
.yband-rent, .yband-cash { position: absolute; inset: 0; }
.yband-expected { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px; box-shadow: inset 0 0 0 1.5px #c4ccca; transition: box-shadow .15s; }
.yband-col.is-future .yband-expected { background: repeating-linear-gradient(0deg, transparent 0 7px, #eef1f0 7px 8px); }
.yband-stack { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 8px; overflow: hidden; pointer-events: none; }
.yband-received { background: var(--brand); flex-shrink: 0; }
.yband-late { background: repeating-linear-gradient(135deg, var(--red) 0 3px, #fff 3px 6px); flex-shrink: 0; }
.yband-unrecorded { background: #d6dcdb; flex-shrink: 0; }
.yband-cash { display: none; }
.yband-cash span { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px; background: var(--ink2); }
.yband-cash.is-forecast span { background: #a9b1b8; }
.yband-cash.is-negative span { background: var(--red); }
.yband[data-view="cashflow"] .yband-rent { display: none; }
.yband[data-view="cashflow"] .yband-cash { display: block; }
.yband-amt { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.yband-amt.is-muted { color: var(--ink3); }
.yband-amt-cash { display: none; }
.yband[data-view="cashflow"] .yband-amt-rent { display: none; }
.yband[data-view="cashflow"] .yband-amt-cash { display: block; }
.yband-label { font-size: 12px; color: var(--ink3); }
.yband-yr { color: var(--ink3); }
.yband-col.is-current .yband-label { color: var(--ink); font-weight: 600; }
.yband-col:hover .yband-expected { box-shadow: inset 0 0 0 2px var(--ink3); }
.yband-col[aria-selected="true"] .yband-expected { box-shadow: inset 0 0 0 2px var(--ink); }
.yband-col[aria-selected="true"] .yband-cash span { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink); }
.yband-col[aria-selected="true"] .yband-label { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.yband-legend { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--ink3); }
.yband-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }
.yband-legend .for-cash { display: none; }
.yband[data-view="cashflow"] .yband-legend .for-rent { display: none; }
.yband[data-view="cashflow"] .yband-legend .for-cash { display: inline; }
.lg-received { background: var(--brand); }
.lg-late { background: repeating-linear-gradient(135deg, var(--red) 0 3px, #fff 3px 6px); }
.lg-unrecorded { background: #d6dcdb; }
.lg-expected { box-shadow: inset 0 0 0 1.5px #c4ccca; }
.lg-cash { background: var(--ink2); }
.lg-forecast { background: #a9b1b8; }
.yband-detail { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: var(--surface); display: grid; grid-template-columns: auto 1fr; gap: 8px 28px; align-items: start; }
.yband-detail[hidden] { display: none; }
.yband-detail h3 { font-size: 15px; font-weight: 600; grid-row: span 2; }
.yband-nums { display: flex; gap: 6px 24px; flex-wrap: wrap; font-size: 13.5px; }
.yband-nums strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.yband-nums .is-bad { color: var(--red); }
.yband-events { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.yband-events .yband-pin { font-size: 13px; padding: 3px 9px; white-space: normal; }
.yband-none { font-size: 13px; color: var(--ink3); }

.dash-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; margin-top: 16px; }
.dash-card { padding: 16px 20px; }
.dash-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.dash-card-head h2 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dash-card-head a { font-size: 13px; color: var(--ink3); text-decoration: underline; text-underline-offset: 3px; }
.dash-quiet { font-size: 13.5px; color: var(--ink3); padding: 10px 0 4px; max-width: 60ch; }
.dash-list { list-style: none; }
.dash-list li + li { border-top: 1px solid var(--line); }
.dash-list a { display: flex; align-items: center; gap: 12px; padding: 10px 4px; margin: 0 -4px; border-radius: 8px; text-decoration: none; color: inherit; }
.dash-list a:hover { background: var(--surface); }
.dash-list-main { flex: 1; min-width: 0; }
.dash-list-main strong { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-list-main span { display: block; font-size: 12.5px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-dot { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; background: var(--ink3); }
.dash-dot.is-red { background: var(--red); }
.dash-dot.is-amber { background: #e08a1e; }
.dash-tag { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--surface2); color: var(--ink2); flex-shrink: 0; }
.dash-scroll { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dash-table th { text-align: left; font-weight: 500; color: var(--ink3); font-size: 12.5px; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); }
.dash-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table .num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; font-weight: 500; }
.dash-table a { color: inherit; text-decoration: none; }
.dash-table a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.dash-table strong { font-weight: 600; }
.dash-table tr.is-off { opacity: .6; }
.dash-sub { display: block; font-size: 12.5px; color: var(--ink3); }
.dash-gauge { display: block; width: 110px; height: 7px; border-radius: 4px; box-shadow: inset 0 0 0 1.2px #b9c2c0; overflow: hidden; }
.dash-gauge span { display: block; height: 100%; background: var(--brand); }
.dash-gauge.is-late { background: repeating-linear-gradient(135deg, var(--red) 0 3px, #fff 3px 6px); }
.dash-next.is-red { color: var(--red); }
.dash-next.is-amber { color: #8a5200; }

@media (max-width: 1024px) {
    .dash-row { grid-template-columns: minmax(0, 1fr); }
    .dash-figures { margin-left: 0; order: 3; width: 100%; }
}
@media (max-width: 768px) {
    .dash-figures { gap: 10px 22px; }
    .dash-figures dd { font-size: 20px; }
    .yband { padding: 16px 14px; }
    .yband-detail { grid-template-columns: 1fr; }
    .yband-detail h3 { grid-row: auto; }
    .dash-table .dash-gauge { width: 70px; }
}
@media (prefers-reduced-motion: reduce) {
    .yband-expected, .appbar-link { transition: none; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Properties: list beside the picked property ── */
.psplit { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.psplit-list { position: sticky; top: 76px; max-height: calc(100vh - 92px); display: flex; flex-direction: column; overflow: hidden; }
.psplit-month { margin: 14px 14px 10px; padding: 14px; border-radius: 12px; background: var(--ink); color: #c9ced6; font-size: 13.5px; }
.psplit-month strong { color: #fff; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-right: 4px; font-variant-numeric: tabular-nums; }
.psplit-month-gauge { display: block; height: 8px; margin-top: 10px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px #5d6472; overflow: hidden; }
.psplit-month-gauge span { display: block; height: 100%; background: var(--brand); }
.psplit-filters { display: flex; gap: 8px; padding: 0 14px 10px; }
.psplit-search, .psplit-select {
    min-width: 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
    font: 13.5px 'Geist', sans-serif; color: var(--ink); background: var(--white);
}
.psplit-search { flex: 1; }
.psplit-select { flex: 0 0 132px; }
.psplit-search:focus, .psplit-select:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.psplit-rows { list-style: none; overflow-y: auto; border-top: 1px solid var(--line); }
.psplit-rows li + li { border-top: 1px solid var(--line); }
.psplit-rows li[hidden] { display: none; }
.psplit-row { display: grid; gap: 3px; padding: 13px 16px; color: inherit; text-decoration: none; }
a.psplit-row:hover { background: var(--surface); }
.psplit-row[aria-current] { background: var(--brand-glow); }
.psplit-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.psplit-row.is-off { opacity: .6; }
.psplit-row-top { display: flex; justify-content: space-between; gap: 10px; }
.psplit-row-top strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psplit-rent { font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.psplit-addr { font-size: 12.5px; color: var(--ink3); }
.psplit-gauge { width: 100%; height: 6px; margin-top: 6px; }
.psplit-next { margin-top: 5px; font-size: 12.5px; }
.psplit-flag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-weight: 500; background: #e9ecf1; color: var(--ink2); }
.psplit-flag.is-red { background: #fbe9ea; color: #b01c27; }
.psplit-flag.is-amber { background: #fdf1dc; color: #8a5200; }
.psplit-flag.is-ok { background: var(--brand-glow); color: #0b7466; }
.psplit-flag.is-off { background: var(--surface2); color: var(--ink3); }
.psplit-more { color: var(--ink3); }
.psplit-nomatch { padding: 18px 16px; font-size: 13.5px; color: var(--ink3); }
turbo-frame.psplit-pane { display: block; min-width: 0; }
turbo-frame.psplit-pane[busy] .ppane { opacity: .55; transition: opacity .15s; }
.ppane-empty { padding: 28px; color: var(--ink2); }

.ppane { padding: 22px 24px 24px; }
.ppane-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ppane-title { flex: 1; min-width: 240px; }
.ppane-title h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.ppane-title p { color: var(--ink3); margin-top: 3px; }
.ppane-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; margin-top: 8px !important; }
.ppane-meta > span:not(.badge) { color: var(--ink2); }
.ppane-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ppane-actions .btn-secondary, .ppane-actions .btn-accent { text-decoration: none; display: inline-flex; align-items: center; }
.ppane-needs { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--surface); }
.ppane-needs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.ppane-needs li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.ppane-needs li.is-red { color: #b01c27; }
.ppane-needs li.is-amber { color: #8a5200; }
.ppane-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin-top: 20px; }
.ppane-block h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.ppane-big { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ppane-big span { font-size: 14px; font-weight: 400; color: var(--ink3); letter-spacing: 0; }
.ppane-gauge { width: 100%; height: 8px; margin: 10px 0 4px; }
.ppane-note { font-size: 13px; color: var(--ink3); margin-top: 8px; }
.ppane-note a { color: var(--ink); }
.ppane-note.is-bad, .ppane .is-bad { color: var(--red); }
.ppane .is-good { color: #0b7466; }
.ppane .is-warn { color: #8a5200; }
.ppane-kv { margin-top: 14px; display: grid; gap: 7px; font-size: 13.5px; }
.ppane-kv div { display: flex; justify-content: space-between; }
.ppane-kv dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.ppane-kv-total { border-top: 1px solid var(--line); padding-top: 8px; }
.ppane-kv-total dt { font-weight: 600; }
.pyear { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; height: 128px; }
.pyear-col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pyear-col .yband-expected, .pyear-col .yband-stack { border-radius: 5px; }
.pyear-col.is-future .yband-expected { background: repeating-linear-gradient(0deg, transparent 0 5px, #eef1f0 5px 6px); }
.pyear-col.is-current .yband-expected { box-shadow: inset 0 0 0 2px var(--ink); }
.pyear-label { font-size: 12px; color: var(--ink3); text-align: center; }
.pyear-col.is-current .pyear-label { color: var(--ink); font-weight: 600; }
.ppane .yband-legend { margin-top: 10px; gap: 4px 14px; font-size: 12px; }
.ppane-list { list-style: none; }
.ppane-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.ppane-list li + li { border-top: 1px solid var(--line); }
.ppane-list-main { flex: 1; min-width: 0; }
.dash-dot.is-ok { background: var(--brand); }

@media (max-width: 1100px) {
    .ppane-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .psplit { grid-template-columns: minmax(0, 1fr); }
    .psplit-list { position: static; max-height: none; }
    turbo-frame.psplit-pane { display: none; }
    .psplit-row[aria-current] { background: none; }
}

/* ── Property page ── */
.prop-head { align-items: flex-start; }
.prop-crumb-row { flex: 1 0 100%; }
.prop-crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink3); text-decoration: none; }
.prop-crumb:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.prop-id { flex: 1; min-width: 0; display: flex; gap: 18px; align-items: flex-start; }
.prop-photo { position: relative; flex-shrink: 0; width: 96px; height: 96px; border-radius: 14px; overflow: hidden; background: var(--surface2); display: grid; place-items: center; }
.prop-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-photo-empty { width: 40px; height: 40px; fill: none; stroke: var(--ink3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.prop-photo-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,23,32,.55); }
.prop-photo-busy[hidden] { display: none; }
.prop-photo-busy svg path { animation: prop-spin .75s linear infinite; transform-origin: 16px 16px; }
@keyframes prop-spin { to { transform: rotate(360deg); } }
.prop-titles { min-width: 0; }
.prop-titles h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.prop-address { color: var(--ink3); margin-top: 3px; }
.prop-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; font-size: 13.5px; color: var(--ink2); }
.prop-photo-actions { display: flex; gap: 14px; margin-top: 8px; }
.prop-link { background: none; border: 0; padding: 0; cursor: pointer; font: 500 13px 'Geist', sans-serif; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }
.prop-link:hover { color: var(--ink); }
.prop-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.prop-link.is-danger { color: var(--red); }
.prop-delete { color: var(--red); }
.prop-locked { margin-bottom: 14px; padding: 12px 14px; border-radius: 10px; background: var(--surface2); font-size: 13.5px; color: var(--ink2); }
.prop-locked a { color: var(--ink); font-weight: 600; }
.prop-needs { margin-bottom: 16px; padding: 12px 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.prop-needs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.prop-needs li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.prop-needs li.is-red { color: #b01c27; }
.prop-needs li.is-amber { color: #8a5200; }
.prop-top { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.prop-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.prop-side { display: flex; flex-direction: column; gap: 16px; }
.pcard { padding: 18px 20px; overflow: visible; }
.pcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.pcard-head h2 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pcard-head h3 { font-size: 14px; font-weight: 600; }
.pcard-links { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.pcard-link { font-size: 13px; color: var(--ink3); text-decoration: underline; text-underline-offset: 3px; }
.pcard-link:hover { color: var(--ink); }
.pcard-foot { margin-top: 8px; }
.pcard .ppane-note a { color: var(--ink); }
.pcard .is-good { color: #0b7466; }
.pcard .is-bad { color: var(--red); }
.prop-month .ppane-big { margin-top: 2px; }
.prop-tenancy { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.prop-tenancy .pcard-head { margin-bottom: 6px; }
.prop-tenancy-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.prop-tenancy-who strong { font-weight: 600; }
.prop-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.prop-figures dt { font-size: 12.5px; color: var(--ink3); }
.prop-figures dd { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.prop-figures span { display: block; font-size: 12px; color: var(--ink3); margin-top: 1px; }
.prop-figures span.is-good { color: #0b7466; }
.prop-figures span.is-bad { color: var(--red); }
.phist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 16px 0 10px; }
.phist-head h3 { font-size: 14px; font-weight: 600; }
.phist-head span { font-size: 12.5px; color: var(--ink3); }
.phist { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 150px; }
.phist-col { display: grid; grid-template-rows: 1fr auto; min-width: 0; }
.phist.has-neg .phist-col { grid-template-rows: 1fr 1fr auto; }
.phist-up, .phist-down { display: flex; min-height: 0; }
.phist-up { align-items: flex-end; }
.phist-down { align-items: flex-start; border-top: 1px solid var(--line); }
.phist-up span, .phist-down span { display: block; width: 100%; }
.phist-up span { background: color-mix(in srgb, var(--brand) 65%, white); border-radius: 4px 4px 0 0; }
.phist-down span { background: var(--red); opacity: .7; border-radius: 0 0 4px 4px; }
.phist-col.is-current .phist-up span { background: var(--brand); }
.phist-label { font-size: 12px; color: var(--ink3); text-align: center; padding-top: 5px; }
.phist-col.is-current .phist-label { color: var(--ink); font-weight: 600; }
.phist-pager { display: flex; justify-content: space-between; margin-top: 12px; }
.prow-list { list-style: none; }
.prow-list li { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
.prow-list li + li { border-top: 1px solid var(--line); }
.prow-list li:has(> .prow-link) { padding: 0; }
.prow-link { display: flex; align-items: center; gap: 11px; padding: 10px 6px; margin: 0 -6px; border-radius: 8px; color: inherit; text-decoration: none; width: calc(100% + 12px); }
.prow-link:hover { background: var(--surface); }
.prow-main { flex: 1; min-width: 0; }
.prow-main strong { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-main span { display: block; font-size: 12.5px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-end { font-size: 12.5px; font-weight: 500; color: var(--ink2); flex-shrink: 0; text-align: right; }
.prow-end.is-red { color: var(--red); }
.prow-end.is-amber { color: #8a5200; }
.prow-end.is-ok { color: var(--ink3); }
.prop-next { margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--ink2); }
.prop-next.is-bad { color: var(--red); }
.prop-bin { position: relative; width: 16px; height: 20px; border-radius: 3px 3px 2px 2px; background: var(--bin); flex-shrink: 0; margin-top: 3px; box-shadow: inset 0 0 0 1px rgba(20,23,32,.15); }
.prop-bin::before { content: ''; position: absolute; top: -3px; left: -1px; right: -1px; height: 3px; border-radius: 2px; background: var(--bin); }

@media (max-width: 1100px) {
    .prop-top, .prop-cols { grid-template-columns: minmax(0, 1fr); }
    .prop-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .prop-photo { width: 64px; height: 64px; border-radius: 10px; }
    .prop-id { gap: 12px; }
    .prop-titles h1 { font-size: 20px; }
    .prop-head .topbar-actions { width: 100%; justify-content: flex-start; }
    .prop-head .topbar-actions .btn-secondary { padding: 7px 10px; font-size: 12.5px; }
    .pcard { padding: 16px; }
}

/* ── Tenancy pages ── */
.ten-titles { flex: 1 1 340px; min-width: 0; }
.ten-figures { margin-bottom: 4px; }
.ten-dates { margin-top: 6px; }
.ten-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-glow); color: var(--brand-deep); font-size: 13px; font-weight: 600; }
.ten-avatar.is-quiet { background: var(--surface2); color: var(--ink2); }
.ten-notes { font-size: 13.5px; color: var(--ink2); line-height: 1.55; max-width: 65ch; overflow-wrap: anywhere; }
.ten-narrow { max-width: 1000px; }

.ten-form { padding: 0; container-type: inline-size; }
.ten-sec { display: grid; gap: 14px; padding: 20px; }
.ten-sec + .ten-sec { border-top: 1px solid var(--line); }
.ten-sec-intro h2 { font-size: 15px; font-weight: 600; }
.ten-sec-intro p { font-size: 13px; color: var(--ink3); margin-top: 4px; max-width: 46ch; }
.ten-sec.has-error .ten-row input:invalid,
.ten-sec.has-error .ten-row input[required]:placeholder-shown { border-color: var(--red); }
.ten-hint { font-size: 12px; color: var(--ink3); margin-top: 5px; }
.ten-rows { display: grid; gap: 10px; }
.ten-rows:empty { display: none; }
.ten-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: center; }
.ten-row input { width: 100%; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; color: var(--ink); font: 14px 'Geist', sans-serif; outline: none; transition: border-color .2s; }
.ten-row input:focus, .ten-sec .field input:focus-visible, .ten-sec .field select:focus-visible, .ten-sec .field textarea:focus-visible { border-color: var(--ink); box-shadow: 0 0 0 3px var(--brand-glow); }
.ten-row input::placeholder { color: var(--ink3); }
.ten-add { margin-top: 12px; }
.ten-sec .field textarea { resize: vertical; min-height: 84px; }
.ten-form-actions { display: flex; gap: 10px; margin: 16px 0 8px; }
.ten-modal { width: 420px; max-width: calc(100vw - 32px); }

@container (min-width: 760px) {
    .ten-sec { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding: 22px 24px; }
}
@container (max-width: 560px) {
    .ten-sec .fgrid, .ten-sec .fgrid.c3 { grid-template-columns: minmax(0, 1fr); }
    .ten-row { grid-template-columns: minmax(0, 1fr); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
    .ten-row .prop-link { justify-self: start; }
}

/* ── Certificates (Compliance) ── */
.dash-figures .is-warn { color: #8a5200; }
.cert-filter { margin-bottom: 12px; }
.cert-filter .psplit-select { flex: none; min-width: 220px; }
.cert-groups { display: grid; gap: 16px; }
.cert-list li { gap: 11px 16px; }
.cert-list li[hidden] { display: none; }
.cert-prop { color: inherit; text-underline-offset: 3px; }
.cert-prop:hover { color: var(--ink); }
.cert-rem { flex: 0 0 210px; font-size: 12.5px; color: var(--ink3); }
.cert-list .prow-end { flex: 0 0 130px; }
.cert-actions { display: flex; gap: 14px; flex: 0 0 auto; }
.cert-modal { width: 440px; max-width: calc(100vw - 32px); }
.cert-fields { display: grid; gap: 16px; }
.cert-readonly { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; color: var(--ink2); }
.cert-rem-pick { border: 0; padding: 0; margin: 0; }
.cert-rem-pick legend { font-size: 12.5px; font-weight: 500; color: var(--ink2); margin-bottom: 8px; padding: 0; }
.cert-rem-opts { display: flex; gap: 8px; }
.cert-rem-opts label { flex: 1; position: relative; }
.cert-rem-opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cert-rem-opts span { display: block; text-align: center; padding: 10px 0; border-radius: 9px; border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink3); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.cert-rem-opts input:checked + span { border-color: var(--brand-deep); background: var(--brand-glow); color: var(--brand-deep); }
.cert-rem-opts input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 900px) {
    .cert-list li { flex-wrap: wrap; }
    .cert-list .prow-main { flex: 1 1 calc(100% - 160px); }
    .cert-list .prow-end { order: 3; flex: 0 0 auto; text-align: left; padding-left: 19px; }
    .cert-rem { order: 3; flex: 1 1 auto; }
    .cert-actions { order: 4; }
}

.cert-history { margin-top: 16px; }
.cert-history summary { list-style: none; cursor: pointer; margin-bottom: 0; }
.cert-history summary::-webkit-details-marker { display: none; }
.cert-history summary h2::before { content: ''; width: 7px; height: 7px; border-right: 1.5px solid var(--ink3); border-bottom: 1.5px solid var(--ink3); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.cert-history[open] summary h2::before { transform: rotate(45deg); }
.cert-history[open] summary { margin-bottom: 10px; }
.cert-history summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
.cert-history .prow-main strong { color: var(--ink2); }

/* ── Inspections ── */
.insp-head-note { font-size: 13px; color: var(--ink3); }
.insp-head-note.is-bad { color: var(--red); font-weight: 500; }
.insp-row { gap: 11px 18px; }
.insp-bar { display: flex; gap: 2px; width: 120px; height: 8px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.insp-bar span { display: block; min-width: 3px; }
.insp-bar .is-pass { background: var(--brand); }
.insp-bar .is-fail { background: var(--red); }
.insp-bar .is-na { background: var(--surface2); }
.pcard .insp-bar { width: 100%; margin-top: 16px; }
.insp-list .insp-bar { width: 120px; margin-top: 0; }
.insp-counts { flex: 0 0 150px; font-size: 12.5px; color: var(--ink3); }
.insp-counts .is-bad { color: var(--red); }
.insp-list .prow-end { flex: 0 0 90px; }
.insp-figures { border-bottom: 0; padding-bottom: 0; }
.insp-wrap strong, .insp-wrap span { white-space: normal; }
.insp-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.insp-item.is-na .prow-main strong { color: var(--ink3); font-weight: 400; }
.insp-item .ci-badge { min-width: 44px; text-align: center; }
.insp-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink2); margin-bottom: 6px; }
.insp-allpass { margin-top: 10px; }
.insp-check { list-style: none; }
.insp-check li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 200px); gap: 12px; align-items: center; padding: 9px 0; }
.insp-check li + li { border-top: 1px solid var(--line); }
.insp-check-label { font-size: 13.5px; }
.insp-check-notes { width: 100%; min-width: 0; font: 13px 'Geist', sans-serif; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); outline: none; }
.insp-check-notes:focus-visible { border-color: var(--ink); box-shadow: 0 0 0 3px var(--brand-glow); }
.insp-check .ci-seg label span { padding: 6px 12px; }
.insp-check .ci-seg label input[value="pass"]:checked + span { background: var(--brand-deep); }
.insp-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; padding: 12px 0; background: var(--surface); border-top: 1px solid var(--line); }
.insp-savebar-count { margin-right: auto; font-size: 13px; color: var(--ink3); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
    .insp-row { flex-wrap: wrap; }
    .insp-row .prow-main { flex: 1 1 calc(100% - 110px); }
    .insp-list .insp-bar { order: 3; flex: 1 1 100%; width: auto; }
    .insp-counts { order: 4; flex: 1 1 auto; }
}
@container (max-width: 560px) {
    .insp-check li { grid-template-columns: minmax(0, 1fr) auto; }
    .insp-check-notes { grid-column: 1 / -1; }
}

/* ── Insurance ── */
.ins-provider { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.ins-number { margin-top: 2px; }
.ins-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; padding-bottom: 0; border-bottom: 0; }
.ins-figures .is-warn, .pcard .is-warn { color: #8a5200; }
.ins-figures span.is-bad { color: var(--red); }

/* ── Waste ── */
.waste-cols { margin-top: 0; }
.waste-prop { color: inherit; text-decoration: none; }
.waste-prop:hover { text-decoration: underline; text-underline-offset: 3px; }
.waste-days { list-style: none; }
.waste-day { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 12px 0; }
.waste-day + .waste-day { border-top: 1px solid var(--line); }
.waste-date strong { display: block; font-size: 14px; font-weight: 600; }
.waste-date span { display: block; font-size: 12.5px; color: var(--ink3); margin-top: 1px; }
.waste-day.is-next .waste-date strong { color: var(--brand-deep); }
.waste-day .prow-list li { padding: 6px 0; }
.waste-day .prow-list li + li { border-top: 0; }
.prow-list li.is-off { opacity: .55; }
.waste-type { display: flex; align-items: center; gap: 10px; }
.waste-type .prop-bin { margin-top: 0; }
.waste-slots { display: grid; gap: 12px; }
.waste-slot { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.waste-slot.is-on { background: var(--surface); }
.waste-slot .waste-fields { margin-top: 14px; }
.waste-fields[hidden], .waste-slots .field[hidden] { display: none; }
.waste-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; cursor: pointer; position: relative; }
.waste-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.waste-switch-track { width: 34px; height: 20px; border-radius: 10px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); position: relative; transition: background .15s; flex-shrink: 0; }
.waste-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.waste-switch input:checked + .waste-switch-track { background: var(--brand-deep); box-shadow: none; }
.waste-switch input:checked + .waste-switch-track::after { transform: translateX(14px); }
.waste-switch input:focus-visible + .waste-switch-track { outline: 2px solid var(--ink); outline-offset: 2px; }
.waste-check { display: flex !important; align-items: center; gap: 7px; margin: 8px 0 0 !important; font-weight: 400 !important; font-size: 13px !important; }
.waste-check input { width: 15px !important; height: 15px; accent-color: var(--brand-deep); }
@media (max-width: 600px) {
    .waste-day { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .ins-figures { grid-template-columns: minmax(0, 1fr); }
}

/* ── Issues ── */
.issue-list .prow-link { gap: 11px 14px; }
.prow-link.is-static { cursor: default; }
.prow-link.is-static:hover { background: none; }
.issue-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.issue-meta { font-size: 12px; color: var(--ink3); }
.issue-state { display: inline-flex; align-items: center; gap: 8px; min-width: 150px; justify-content: flex-end; }
.issue-priority { display: inline-flex; align-items: center; gap: 6px; }
.field-optional { font-weight: 400; color: var(--ink3); }
.issue-cols { margin-top: 0; }
.issue-thread { list-style: none; display: grid; gap: 12px; }
.issue-msg { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.issue-msg.is-you { background: var(--surface); }
.issue-msg.is-internal { background: #fdf6e9; border-color: #f1dfb8; }
.issue-msg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.issue-msg-head strong { font-size: 13.5px; font-weight: 600; }
.issue-msg-head time { margin-left: auto; font-size: 12.5px; color: var(--ink3); }
.issue-msg-body { font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 72ch; }
.issue-photos { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.issue-photos a { display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--surface2); }
.issue-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.issue-photos a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.issue-reply { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.issue-reply textarea { resize: vertical; min-height: 96px; }
.issue-reply-foot { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-top: 10px; }
.issue-reply-foot .waste-check { margin: 0 !important; }
.issue-reply-foot .ten-hint { flex: 1 1 220px; margin: 0; }
.issue-reply-foot .btn-accent { margin-left: auto; }
.issue-closed { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.issue-status { display: grid; gap: 12px; }
.issue-status .btn-secondary { justify-self: start; }
.issue-kv dd { text-align: right; overflow-wrap: anywhere; }
.issue-kv div { gap: 12px; }
@media (max-width: 900px) {
    .issue-list .prow-link { flex-wrap: wrap; }
    .issue-list .prow-main { flex: 1 1 calc(100% - 30px); }
    .issue-tags { order: 3; justify-content: flex-start; padding-left: 19px; }
    .issue-state { order: 4; min-width: 0; margin-left: auto; }
}

/* ── Tenant report link ── */
.qr-cols { margin-top: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.qr-code { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; line-height: 0; }
.qr-code canvas { display: block; }
.qr-link { display: flex; gap: 8px; }
.qr-link input { flex: 1; min-width: 0; font: 13px 'Geist Mono', ui-monospace, monospace; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.qr-link input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.qr-steps { padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink2); }
@media (max-width: 1100px) { .qr-cols { grid-template-columns: minmax(0, 1fr); } }

/* ── Tenant pages (report, confirmation, tracking): no account, usually a phone ── */
.tp-page { min-height: 100vh; background: var(--surface); color: var(--ink); padding: 0 16px 48px; }
.tp-head { max-width: 560px; margin: 0 auto; padding: 22px 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tp-logo { display: block; height: 24px; width: auto; }
.tp-place { font-size: 13.5px; color: var(--ink2); }
.tp-main { max-width: 560px; margin: 0 auto; }
.tp-title { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.tp-lead { margin: 6px 0 20px; color: var(--ink2); font-size: 15px; line-height: 1.5; max-width: 52ch; }
.tp-alert { margin-bottom: 14px; padding: 12px 14px; border-radius: 10px; background: var(--red-bg); color: #b01c27; font-size: 14px; font-weight: 500; }
.tp-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.tp-form { display: grid; gap: 18px; }
.tp-form .field input, .tp-form .field textarea { font-size: 16px; }
.tp-form textarea { resize: vertical; }
.tp-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink2); margin-bottom: 6px; }
.tp-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tp-fieldset legend { font-size: 15px; font-weight: 600; margin-bottom: 10px; padding: 0; }
.tp-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tp-cat { position: relative; }
.tp-cat input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tp-cat span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; font-weight: 500; color: var(--ink2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s, color .15s; min-height: 76px; justify-content: center; }
.tp-cat svg { width: 22px; height: 22px; }
.tp-cat span:hover { border-color: var(--ink3); }
.tp-cat input:checked + span { border-color: var(--brand-deep); background: var(--brand-glow); color: var(--brand-deep); }
.tp-cat input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.tp-fieldset.has-error .tp-cat span { border-color: var(--red); }
.tp-photos { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--ink3); border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--ink2); cursor: pointer; }
.tp-photos svg { width: 22px; height: 22px; flex-shrink: 0; }
.tp-photos:hover { border-color: var(--ink); color: var(--ink); }
#issuePhotosInput:focus-visible + .tp-thumbs, .tp-photos:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.tp-thumbs { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.tp-thumbs[hidden] { display: none; }
.tp-thumbs li { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface2); }
.tp-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-you { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.tp-submit { justify-content: center; width: 100%; padding: 14px 18px; font-size: 15px; }
.tp-submit:disabled { opacity: .6; cursor: progress; }
.tp-small { font-size: 12.5px; color: var(--ink3); line-height: 1.5; }
.tp-done { text-align: center; padding: 32px 22px 24px; }
.tp-done-mark { display: inline-flex; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-glow); color: var(--brand-deep); align-items: center; justify-content: center; margin-bottom: 14px; }
.tp-done-mark svg { width: 26px; height: 26px; }
.tp-quote { margin-top: 6px; color: var(--ink2); font-size: 15px; }
.tp-next { list-style: none; text-align: left; margin: 22px 0; display: grid; gap: 10px; font-size: 14.5px; line-height: 1.5; color: var(--ink2); }
.tp-next li { padding-left: 22px; position: relative; }
.tp-next li::before { content: ''; position: absolute; left: 4px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-deep); }
.tp-status { margin-bottom: 16px; }
.tp-status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; color: var(--ink2); }
.tp-thread { margin-bottom: 16px; }
.tp-thread .issue-msg { background: var(--white); }
.tp-thread .issue-msg.is-you { background: var(--white); border-color: var(--line); }
.tp-thread .issue-msg.is-tenant { border-color: color-mix(in srgb, var(--brand-deep) 35%, var(--line)); background: color-mix(in srgb, var(--brand-glow) 50%, var(--white)); }
.tp-closed { font-size: 14px; color: var(--ink2); line-height: 1.5; }
@media (max-width: 480px) {
    .tp-title { font-size: 22px; }
    .tp-you { grid-template-columns: 1fr; }
    .tp-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Cashflow ── */
.cf-years a { padding: 6px 12px; font-size: 13px; color: var(--ink2); text-decoration: none; font-variant-numeric: tabular-nums; }
.cf-years a + a { border-left: 1px solid var(--line); }
.cf-years a[aria-current] { background: var(--ink); color: #fff; font-weight: 600; }
.cf-years a:hover:not([aria-current]) { background: var(--surface); }
.cf-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; height: 210px; }
.cf-col { display: grid; grid-template-rows: 1fr auto; min-width: 0; }
.cf-bars { display: flex; align-items: flex-end; gap: 3px; min-height: 0; }
.cf-rent { flex: 1.6; position: relative; display: flex; align-items: flex-end; border-radius: 6px 6px 3px 3px; box-shadow: inset 0 0 0 1.5px #c4ccca; overflow: hidden; }
.cf-received { display: block; width: 100%; background: var(--brand); }
.cf-out { flex: 1; background: #b9c0cc; border-radius: 6px 6px 3px 3px; }
.cf-col.is-forecast .cf-bars { opacity: .4; }
.cf-label { font-size: 12px; color: var(--ink3); text-align: center; padding-top: 6px; }
.cf-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.cf-key.is-received { background: var(--brand); }
.cf-key.is-rent { box-shadow: inset 0 0 0 1.5px #c4ccca; }
.cf-key.is-out { background: #b9c0cc; }
.yband-legend { list-style: none; }
.cf-arrears-total { font-size: 15px; font-weight: 600; color: var(--red); font-variant-numeric: tabular-nums; }
.cf-kv { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.cf-kv .is-good { color: #0b7466; }
.cf-pnl { margin-top: 16px; }
.cf-pnl .is-good { color: #0b7466; }
.cf-pnl .is-bad { color: var(--red); }
.cf-muted { color: var(--ink3); }
.cf-prop { font-weight: 500; color: var(--ink); }
.dash-table tfoot th, .dash-table tfoot td { padding: 11px 10px 2px 0; border-top: 1px solid var(--ink3); font-weight: 600; text-align: left; }
.dash-table tfoot td.num { text-align: right; padding-right: 0; }
@media (max-width: 700px) {
    .cf-chart { gap: 4px; height: 170px; }
    .cf-bars { gap: 1px; }
    .cf-label { font-size: 11px; }
}

/* ── Rent ledger and financial history ── */
.rent-form-card { position: sticky; top: 76px; }
.rent-form { display: grid; gap: 16px; }
.rent-form .btn-accent { justify-self: start; }
.dash-table .prow-end { font-size: 13px; }
.fh-month { font-weight: 500; white-space: nowrap; }
.fh-table .is-good { color: #0b7466; }
.fh-table .is-bad { color: var(--red); }
.fh-actions { text-align: right; white-space: nowrap; }
.fh-actions .prop-link + .prop-link { margin-left: 14px; }
.dash-table tbody th { text-align: left; font-weight: 500; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); }
.dash-table tbody tr:last-child th { border-bottom: 0; }
.prop-locked + .prop-locked { margin-top: -6px; }
@media (max-width: 1100px) { .rent-form-card { position: static; } }
.field input[readonly] { background: var(--surface); color: var(--ink2); }

/* ── Account ── */
.acct-head { align-items: flex-end; }
.acct-tabs { flex: 1 0 100%; display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
.acct-tabs::-webkit-scrollbar { display: none; }
.acct-tabs a { padding: 10px 14px; font-size: 14px; color: var(--ink3); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.acct-tabs a:hover { color: var(--ink); }
.acct-tabs a[aria-current] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.acct-tabs a:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 6px 6px 0 0; }
.acct-actions { margin: 16px 0 8px; }
.tp-alert p + p { margin-top: 4px; }
.acct-prefs { list-style: none; }
.acct-prefs li + li { border-top: 1px solid var(--line); }
.acct-pref-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; cursor: pointer; }
.acct-prefs li:first-child .acct-pref-row { padding-top: 0; }
.acct-pref-text strong { display: block; font-size: 14px; font-weight: 600; }
.acct-pref-text span { display: block; font-size: 13px; color: var(--ink3); margin-top: 2px; max-width: 56ch; }
.acct-pref-text .acct-pref-warn { color: var(--red); }
.acct-choice { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.acct-choice label { position: relative; margin: 0 !important; }
.acct-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acct-choice span { display: inline-block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--ink2); cursor: pointer; }
.acct-choice input:checked + span { border-color: var(--brand-deep); background: var(--brand-glow); color: var(--brand-deep); font-weight: 600; }
.acct-choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.ten-form .field[hidden] { display: none; }
.acct-plan { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.acct-plan-name { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.acct-plan .is-bad { color: var(--red); }
.acct-plan-usage { font-size: 13.5px; color: var(--ink2); }
.acct-plan-usage .dash-gauge { width: 180px; margin-top: 8px; }
.acct-plans-card { margin-bottom: 16px; }
.acct-interval { border: 0; padding: 0; margin: 0; }
.acct-interval label { position: relative; }
.acct-interval input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acct-interval span { display: block; padding: 6px 14px; font-size: 13px; color: var(--ink2); cursor: pointer; }
.acct-interval label + label span { border-left: 1px solid var(--line); }
.acct-interval input:checked + span { background: var(--ink); color: #fff; font-weight: 600; }
.acct-interval input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.acct-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.acct-plan-opt { position: relative; }
.acct-plan-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acct-plan-box { display: grid; gap: 4px; height: 100%; padding: 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.acct-plan-box:hover { border-color: var(--ink3); }
.acct-plan-opt input:checked + .acct-plan-box { border-color: var(--ink); box-shadow: 0 8px 24px -14px rgba(20,23,32,.35); }
.acct-plan-opt input:focus-visible + .acct-plan-box { outline: 2px solid var(--brand); outline-offset: 2px; }
.acct-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acct-plan-top strong { font-size: 15px; }
.acct-plan-limit { font-size: 13px; color: var(--ink3); }
.acct-price { margin-top: 8px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.acct-price[hidden] { display: none; }
.acct-price small { font-size: 13px; font-weight: 400; color: var(--ink3); letter-spacing: 0; }
.acct-price em { display: block; font-style: normal; font-size: 12.5px; font-weight: 600; color: #0b7466; letter-spacing: 0; margin-top: 2px; }
.acct-plan-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.acct-promo { flex: 1; min-width: 0; font: 15px 'Geist Mono', ui-monospace, monospace; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.acct-promo::placeholder { text-transform: none; letter-spacing: 0; font-family: 'Geist', sans-serif; }
.acct-promo:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.acct-cancel { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.acct-cancel h2 { font-size: 15px; font-weight: 600; }
.acct-danger { background: var(--red); }
.acct-danger:hover { background: #a8222d; }
.acct-code { max-width: 440px; display: grid; gap: 14px; }
.acct-code h2 { font-size: 20px; font-weight: 600; }
.acct-pin { text-align: center; font-size: 26px !important; font-weight: 600; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.ten-narrow > .card + .card { margin-top: 16px; }

/* ── Plan ended, payment received ── */
.sub-required { margin: 24px auto 0; max-width: 480px; }
.sub-required .tp-lead { margin-bottom: 4px; }

/* ── Admin ── */
.form-actions-row { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-table .is-bad { color: var(--red); }
.promo-code { font-family: 'Geist Mono', ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; }
.admin-shot { display: block; margin-top: 12px; }
.admin-shot img { max-width: 100%; max-height: 420px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.topbar-actions .cf-muted { font-size: 13.5px; }
.dash-table td.num + td, .dash-table td.num + th, .dash-table th.num + th { padding-left: 18px; }

/* ── Signed-out pages: form on white, sample property on the mint field ── */
.auth-logo { display: inline-flex; }
.auth-logo img { height: 24px; width: auto; }
.auth-logo:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 4px; }
.auth-h2 { font-size: 30px; letter-spacing: -0.02em; text-wrap: balance; }
.auth-sub { color: var(--ink2); margin-bottom: 24px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .field input { font-size: 16px; }
.auth-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.auth-label-row a { font-size: 13px; color: var(--ink2); text-underline-offset: 3px; }
.auth-label-row a:hover { color: var(--ink); }
.auth-remember { margin: -2px 0 0 !important; }
.auth-submit { justify-content: center; width: 100%; padding: 13px 18px; font-size: 15px; margin-top: 4px; }
.auth-submit:disabled { opacity: .6; cursor: progress; }
.auth-hint { font-size: 12.5px; color: var(--ink3); margin: -8px 0 0; }
.auth-form .auth-hint:last-of-type { margin-top: 0; text-align: center; }
.auth-error { border-radius: 10px; font-size: 14px; }
.auth-switch { font-size: 14px; color: var(--ink2); }
.auth-switch a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-footer { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 12.5px; color: var(--ink3); }
.auth-footer a { color: inherit; display: inline-flex; }
.auth-footer a:hover { color: var(--ink); }
.auth-aside { background: var(--ink); color: #fff; display: flex; align-items: center; padding: 48px 56px; overflow-y: auto; }
.auth-aside-inner { max-width: 470px; width: 100%; margin: 0 auto; }
.auth-aside-title { font-size: 34px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; text-wrap: balance; }
.auth-aside-lead { margin-top: 14px; font-size: 16px; line-height: 1.55; color: rgba(255,255,255,.72); max-width: 44ch; }
.auth-demo { margin: 32px 0 0; }
.auth-demo-field { background: var(--brand); color: var(--ink); border-radius: 18px; padding: 22px; }
.auth-demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.auth-demo-head strong { font-size: 16px; font-weight: 600; }
.auth-demo-head span { font-size: 13.5px; color: rgba(20,23,32,.72); }
.auth-demo-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 96px; margin: 18px 0 16px; }
.auth-demo-bar { display: flex; align-items: flex-end; border-radius: 5px; box-shadow: inset 0 0 0 1.5px rgba(20,23,32,.28); overflow: hidden; }
.auth-demo-bar span { display: block; width: 100%; background: var(--ink); }
.auth-demo-bar.is-now { box-shadow: inset 0 0 0 2px var(--ink); }
.auth-demo-bar.is-future { box-shadow: inset 0 0 0 1.5px rgba(20,23,32,.18); }
.auth-demo-list { list-style: none; display: grid; gap: 8px; font-size: 14px; }
.auth-demo-list li { display: flex; align-items: center; gap: 10px; }
.auth-pill { display: inline-block; min-width: 86px; text-align: center; padding: 3px 10px; border-radius: 20px; background: #fff; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.auth-demo figcaption { margin-top: 10px; font-size: 12.5px; color: rgba(255,255,255,.6); }
@media (max-width: 480px) { .auth-pair { grid-template-columns: 1fr; } .auth-h2 { font-size: 26px; } }
@media (max-width: 860px) { .auth-aside { display: none; } }

/* ── Help ── */
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.help-side { position: sticky; top: 76px; display: grid; gap: 14px; }
.help-search { position: relative; }
.help-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink3); pointer-events: none; }
.help-search input { width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font: 14px 'Geist', sans-serif; color: var(--ink); }
.help-search input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.help-nav { list-style: none; display: grid; gap: 2px; }
.help-nav a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 14px; color: var(--ink2); text-decoration: none; }
.help-nav a span { color: var(--ink3); font-variant-numeric: tabular-nums; }
.help-nav a:hover { background: var(--white); color: var(--ink); }
.help-nav a.is-empty { opacity: .4; }
.help-nav a:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.help-main { display: grid; gap: 16px; min-width: 0; }
.help-topic { scroll-margin-top: 80px; }
.help-topic h2 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.help-topic[hidden], .help-q[hidden] { display: none; }
.help-q + .help-q { border-top: 1px solid var(--line); }
.help-q summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; font-size: 15px; font-weight: 500; cursor: pointer; }
.help-q summary::-webkit-details-marker { display: none; }
.help-q summary::after { content: ''; width: 8px; height: 8px; flex-shrink: 0; border-right: 1.6px solid var(--ink3); border-bottom: 1.6px solid var(--ink3); transform: rotate(45deg); margin-top: -4px; transition: transform .15s; }
.help-q[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.help-q summary:hover { color: var(--ink); }
.help-q summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.help-a { padding: 0 0 16px; font-size: 14.5px; line-height: 1.6; color: var(--ink2); max-width: 68ch; }
.help-a a { color: var(--ink); text-underline-offset: 3px; }
.help-none { padding: 14px 16px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); font-size: 14px; }
.help-more { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.help-more h2 { font-size: 16px; font-weight: 600; }
@media (max-width: 860px) {
    .help-layout { grid-template-columns: minmax(0, 1fr); }
    .help-side { position: static; }
    .help-nav { display: flex; flex-wrap: wrap; gap: 6px; }
    .help-nav a { background: var(--white); border: 1px solid var(--line); padding: 5px 10px; font-size: 13px; }
}
