:root {
    --canvas: #f7f9fa;
    --surface: #ffffff;
    --surface-subtle: #eef2f4;
    --brand: #0d5b57;
    --brand-hover: #094844;
    --brand-mid: #168b83;
    --brand-soft: #edf8f7;
    --ink: #10212b;
    --muted: #4a5a64;
    --quiet: #71818a;
    --border: #dce3e7;
    --success: #067647;
    --success-soft: #ecfdf3;
    --warning: #9a6700;
    --warning-soft: #fff8e8;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    --info: #315fad;
    --info-soft: #eef4ff;
    --purple: #7456a5;
    --cyan: #22859a;
    --shadow-card: 0 4px 16px rgba(16, 33, 43, .06);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --sidebar-width: 248px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.45; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-shell { min-height: 100vh; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 24px 16px 18px; color: #d9e7e5; background: #102d30; overflow-y: auto; }
.brand-lockup { display: flex; align-items: center; gap: 12px; padding: 0 8px 25px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-mark { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid rgba(255,255,255,.82); border-radius: 12px; color: white; }
.brand-mark span { position: absolute; left: 9px; right: 9px; bottom: 8px; height: 13px; border: 1.5px solid currentColor; border-top: 0; }
.brand-mark span::before { content: ""; position: absolute; left: -3px; right: -3px; top: -6px; height: 6px; border: 1.5px solid currentColor; border-radius: 3px 3px 0 0; }
.brand-mark b { position: relative; font-size: 11px; margin-top: 9px; }
.brand-lockup strong { display: block; color: white; letter-spacing: .16em; font-size: 15px; }
.brand-lockup small { display: block; margin-top: 2px; color: #96b0b0; font-size: 10px; }
.portfolio-label { margin: 23px 12px 9px; color: #708f8f; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.sidebar-nav { display: grid; gap: 3px; }
.nav-item { min-height: 40px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #afc2c2; text-decoration: none; font-size: 12.5px; font-weight: 500; transition: .18s ease; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: #0d5b57; box-shadow: inset 3px 0 #72c9c0; }
.nav-item em { min-width: 21px; margin-left: auto; padding: 2px 6px; border-radius: 999px; color: #ffc8c2; background: rgba(180,35,24,.28); font-size: 10px; font-style: normal; text-align: center; }
.nav-group { display: grid; gap: 3px; }
.sidebar-nav .portfolio-label { margin-top: 18px; }
.sidebar-nav .portfolio-label:first-child { margin-top: 6px; }
.nav-item.has-children em { margin-left: auto; }
.nav-chevron { width: 13px !important; height: 13px !important; margin-left: auto; transition: transform .18s ease; }
.nav-item.has-children.active .nav-chevron { transform: rotate(90deg); }
.nav-item.has-children:has(em) .nav-chevron { margin-left: 0; }
.subnav { display: none; margin: 1px 0 5px 19px; padding-left: 17px; border-left: 1px solid rgba(255,255,255,.12); }
.subnav.expanded { display: grid; }
.subnav-item { min-height: 32px; display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 8px; color: #8fa9a9; text-decoration: none; font-size: 11.5px; }
.subnav-item:hover { color: white; background: rgba(255,255,255,.05); }
.subnav-item.active { color: #dff8f4; background: rgba(22,139,131,.18); font-weight: 650; }
.subnav-item em { min-width: 20px; margin-left: auto; padding: 2px 6px; border-radius: 999px; color: #ffc8c2; background: rgba(180,35,24,.28); font-size: 9px; font-style: normal; text-align: center; }
.sidebar-context { margin-top: auto; padding: 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.04); }
.sidebar-context span, .sidebar-context small { display: block; color: #8aa5a4; font-size: 10px; }
.sidebar-context strong { display: block; margin: 4px 0; color: #f4faf9; font-size: 12px; }

.main-content { min-width: 0; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 20; height: 72px; display: flex; align-items: center; gap: 24px; padding: 0 32px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.topbar-title { min-width: 230px; }
.topbar-title span, .topbar-title strong { display: block; }
.topbar-title span { color: var(--quiet); font-size: 10px; letter-spacing: .04em; }
.topbar-title strong { margin-top: 2px; font-size: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search-control { width: min(290px, 25vw); display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--canvas); color: var(--quiet); }
.search-control svg { width: 17px; height: 17px; }
.search-control input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.icon-button { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); background: white; }
.notification-button span { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; background: var(--danger); color: white; font-size: 8px; font-weight: 700; }
.profile-control { display: flex; align-items: center; gap: 10px; padding: 4px 7px 4px 4px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.profile-control > span:not(.avatar) { min-width: 104px; }
.profile-control strong, .profile-control small { display: block; }
.profile-control strong { font-size: 11px; }
.profile-control small { color: var(--quiet); font-size: 9px; }
.profile-control svg { width: 14px; height: 14px; transform: rotate(90deg); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--brand); font-size: 11px; font-weight: 700; }
.mobile-menu { display: none; }

.dashboard-content { width: min(100%, 1500px); margin: auto; padding: 28px 32px 40px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.eyebrow, .section-kicker { color: var(--brand-mid); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
h1 { margin: 5px 0 3px; font-size: 27px; line-height: 1.25; letter-spacing: -.02em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 10px; }
.filter-control { min-width: 174px; padding: 8px 11px 7px; border: 1px solid var(--border); border-radius: 10px; background: white; box-shadow: 0 2px 6px rgba(16,33,43,.025); }
.filter-control span { display: block; color: var(--quiet); font-size: 9px; }
.filter-control select { width: 100%; margin-top: 1px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11.5px; font-weight: 600; }
.data-notice { display: flex; align-items: center; gap: 9px; min-height: 38px; margin-bottom: 16px; padding: 8px 12px; border: 1px solid #cfe2f7; border-radius: 10px; background: var(--info-soft); color: var(--info); font-size: 10.5px; }
.data-notice > span { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 700; }
.data-notice p { margin: 0; }
.data-notice small { margin-left: auto; color: #5d7190; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi-card, .panel, .business-strip { border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-card); }
.kpi-card { min-height: 153px; padding: 17px; border-radius: var(--radius-lg); background: var(--surface) !important; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-top > span { padding: 4px 7px; border-radius: 999px; color: var(--muted); background: var(--surface-subtle); font-size: 9px; font-weight: 600; }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.metric-icon svg { width: 17px; height: 17px; }
.kpi-card > p { margin: 15px 0 2px; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.kpi-card > strong { display: block; font-size: 25px; letter-spacing: -.03em; }
.kpi-card > small { display: block; margin-top: 2px; color: var(--quiet); font-size: 9px; }
.kpi-card.tone-success .metric-icon { background: var(--success-soft); color: var(--success); }
.kpi-card.tone-warning .metric-icon { background: var(--warning-soft); color: var(--warning); }
.kpi-card.tone-info .metric-icon { background: var(--info-soft); color: var(--info); }
.business-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; border-radius: var(--radius-lg); }
.business-strip article { display: flex; align-items: flex-start; gap: 11px; padding: 15px 18px; }
.business-strip article + article { border-left: 1px solid var(--border); }
.business-strip p, .business-strip strong, .business-strip small { display: block; margin: 0; }
.business-strip p { color: var(--muted); font-size: 9.5px; }
.business-strip strong { margin: 1px 0; font-size: 17px; }
.business-strip small { color: var(--quiet); font-size: 8.5px; }
.status-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--brand-mid); box-shadow: 0 0 0 4px var(--brand-soft); }

.dashboard-grid { display: grid; gap: 14px; margin-top: 14px; }
.two-columns { grid-template-columns: 1.15fr .85fr; }
.two-columns.balanced, .revenue-activity { grid-template-columns: 1fr 1fr; }
.panel { min-width: 0; padding: 18px; border-radius: var(--radius-lg); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.panel-heading h2 { margin: 3px 0 0; font-size: 15px; line-height: 1.3; }
.text-action { display: inline-flex; align-items: center; gap: 3px; padding: 4px 0; border: 0; color: var(--brand); background: transparent; font-size: 9.5px; font-weight: 700; }
.text-action svg { width: 13px; height: 13px; }
.chip, .count-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 8.5px; font-weight: 700; white-space: nowrap; }
.chip-success { color: var(--success); background: var(--success-soft); }
.chip-warning { color: var(--warning); background: var(--warning-soft); }
.chip-danger { color: var(--danger); background: var(--danger-soft); }
.chip-neutral { color: var(--muted); background: var(--surface-subtle); }
.count-badge { color: var(--danger); background: var(--danger-soft); }

.occupancy-body { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: center; }
.donut-wrap { display: grid; justify-items: center; }
.donut { width: 142px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--brand-mid) 0 82.8%, #e7a93e 82.8% 95.8%, #6f92d1 95.8% 100%); }
.donut::before { content: ""; grid-area: 1/1; width: 100px; aspect-ratio: 1; border-radius: 50%; background: white; }
.donut div { z-index: 1; grid-area: 1/1; text-align: center; }
.donut strong, .donut span { display: block; }
.donut strong { font-size: 24px; }
.donut span { color: var(--muted); font-size: 9px; }
.donut-wrap > small { margin-top: 9px; color: var(--quiet); font-size: 9px; }
.occupancy-detail { min-width: 0; }
.legend-row { display: grid; grid-template-columns: 9px 1fr 64px 44px; align-items: center; gap: 7px; min-height: 29px; border-bottom: 1px solid #edf1f3; font-size: 10px; }
.legend-row strong { text-align: right; }
.legend-row small { color: var(--quiet); text-align: right; }
.legend-swatch { width: 8px; height: 8px; border-radius: 3px; background: var(--brand-mid); }
.trend-block { margin-top: 13px; }
.trend-block > div:first-child { display: flex; justify-content: space-between; color: var(--quiet); font-size: 8.5px; }
.trend-block > div strong { color: var(--success); }
.sparkline { width: 100%; height: 52px; margin-top: 3px; overflow: visible; }
.spark-area { fill: url(#sparkFill); stroke: none; }
.spark-line { fill: none; stroke: var(--brand-mid); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sparkline circle { fill: white; stroke: var(--brand-mid); stroke-width: 2; }
.month-axis { display: flex !important; justify-content: space-between !important; color: #8b989e !important; font-size: 7px !important; }

.billing-summary { display: grid; gap: 12px; }
.billing-row { display: grid; grid-template-columns: 135px 1fr 34px; align-items: center; gap: 10px; }
.billing-row span, .billing-row strong { display: block; }
.billing-row span { color: var(--muted); font-size: 9px; }
.billing-row strong { margin-top: 1px; font-size: 11px; }
.billing-row > small { color: var(--quiet); font-size: 8px; text-align: right; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--surface-subtle); }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--brand-mid); }
.collection-callout { margin-top: 18px; padding: 14px; border: 1px solid #f0dfba; border-radius: 12px; background: var(--warning-soft); }
.collection-callout div { display: flex; align-items: center; justify-content: space-between; }
.collection-callout span { color: var(--warning); font-size: 9px; font-weight: 700; }
.collection-callout strong { color: var(--warning); font-size: 14px; }
.collection-callout p { margin: 5px 0 9px; color: #715d2f; font-size: 8.5px; }
.collection-callout button { display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; color: var(--warning); background: transparent; font-size: 9px; font-weight: 700; }
.collection-callout svg { width: 12px; height: 12px; }

.exception-list { display: grid; }
.exception-row { display: grid; grid-template-columns: 32px 1fr auto 14px; align-items: center; gap: 10px; min-height: 56px; border-bottom: 1px solid #edf1f3; }
.exception-row:last-child { border-bottom: 0; }
.exception-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-size: 10px; font-weight: 800; }
.exception-row strong, .exception-row small { display: block; }
.exception-row strong { font-size: 10px; }
.exception-row small { color: var(--quiet); font-size: 8px; }
.exception-row b { font-size: 10px; }
.exception-row svg { width: 13px; height: 13px; color: var(--quiet); }
.panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px -18px -18px; padding: 11px 18px; border-top: 1px solid var(--border); background: #fbfcfc; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.panel-footer > span { color: var(--quiet); font-size: 7.5px; }
.panel-footer i { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--info); }
.contract-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.contract-summary > div { min-height: 70px; padding: 10px; border: 1px solid #edf1f3; border-radius: 10px; background: #fbfcfc; }
.contract-summary p { min-height: 24px; margin: 7px 0 1px; color: var(--muted); font-size: 7.8px; }
.contract-summary strong { font-size: 16px; }
.subheading { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.subheading > strong { font-size: 9.5px; }
.table-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; min-height: 52px; border-top: 1px solid #edf1f3; }
.tenant-initial { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 800; }
.table-row strong, .table-row small { display: block; }
.table-row strong { font-size: 9px; }
.table-row small { margin-top: 2px; color: var(--quiet); font-size: 7.5px; }

.service-panel { margin-top: 14px; }
.service-total { display: flex; align-items: baseline; gap: 8px; }
.service-total span { color: var(--quiet); font-size: 9px; }
.service-total strong { font-size: 20px; }
.service-layout { display: grid; grid-template-columns: 1.1fr 1.35fr .65fr; gap: 18px; }
.ticket-breakdown { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ticket-status { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 6px; padding: 10px; border: 1px solid #edf1f3; border-radius: 10px; background: #fbfcfc; }
.ticket-status p { margin: 0; color: var(--muted); font-size: 8px; }
.ticket-status strong { font-size: 15px; }
.ticket-status small { grid-column: 2 / 4; color: var(--quiet); font-size: 7px; }
.service-metrics { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.service-metrics > div { padding: 12px; }
.service-metrics > div:nth-child(2n) { border-left: 1px solid var(--border); }
.service-metrics > div:nth-child(n+3) { border-top: 1px solid var(--border); }
.service-metrics span, .service-metrics strong, .service-metrics small { display: block; }
.service-metrics span { color: var(--muted); font-size: 8px; }
.service-metrics strong { margin: 3px 0; font-size: 15px; }
.service-metrics small { color: var(--success); font-size: 7px; }
.service-metrics > div:last-child small { color: var(--warning); }
.sla-meter { display: grid; justify-items: center; align-content: center; border-left: 1px solid var(--border); }
.radial-progress { width: 100px; height: 100px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--success) 0 91.4%, var(--surface-subtle) 91.4%); }
.radial-progress::before { content: ""; grid-area: 1/1; width: 73px; height: 73px; border-radius: 50%; background: white; }
.radial-progress div { z-index: 1; grid-area: 1/1; text-align: center; }
.radial-progress strong, .radial-progress span { display: block; }
.radial-progress strong { font-size: 17px; }
.radial-progress span { color: var(--quiet); font-size: 7px; }
.sla-meter p { margin: 7px 0; color: var(--quiet); font-size: 7.5px; }

.revenue-total span, .revenue-total strong, .revenue-total small { display: block; }
.revenue-total span { color: var(--muted); font-size: 9px; }
.revenue-total strong { margin: 2px 0; font-size: 22px; }
.revenue-total small { color: var(--quiet); font-size: 7.5px; }
.revenue-stack { display: flex; height: 10px; margin: 13px 0 10px; overflow: hidden; border-radius: 999px; background: var(--surface-subtle); }
.revenue-stack span { min-width: 3px; height: 100%; }
.revenue-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.revenue-list > div { display: grid; grid-template-columns: 8px 1fr auto 34px; align-items: center; gap: 7px; min-height: 31px; border-bottom: 1px solid #edf1f3; }
.revenue-list p { margin: 0; color: var(--muted); font-size: 8.5px; }
.revenue-list strong { font-size: 9px; }
.revenue-list small { color: var(--quiet); font-size: 7.5px; text-align: right; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; min-height: 57px; border-bottom: 1px solid #edf1f3; }
.activity-row:last-child { border-bottom: 0; }
.activity-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: var(--brand-soft); }
.activity-icon svg { width: 15px; height: 15px; }
.activity-row strong { display: block; font-size: 9.5px; }
.activity-row p { margin: 2px 0 0; color: var(--quiet); font-size: 7.5px; }
.activity-row time { align-self: start; padding-top: 14px; color: var(--quiet); font-size: 7px; white-space: nowrap; }
.dashboard-footer { display: flex; align-items: center; gap: 15px; margin-top: 20px; padding: 14px 2px 0; border-top: 1px solid var(--border); color: var(--quiet); font-size: 8px; }
.dashboard-footer span { color: var(--brand); font-weight: 700; }
.dashboard-footer p { margin: 0; }
.dashboard-footer small { margin-left: auto; }

.tone-brand { background-color: var(--brand-mid) !important; }
.tone-success { background-color: var(--success) !important; }
.tone-warning { background-color: #e7a93e !important; }
.tone-danger { background-color: var(--danger) !important; }
.tone-info { background-color: #6f92d1 !important; }
.tone-neutral { background-color: #87969e !important; }
.tone-purple { background-color: var(--purple) !important; }
.tone-cyan { background-color: var(--cyan) !important; }
.kpi-card.tone-brand,
.kpi-card.tone-success,
.kpi-card.tone-warning,
.kpi-card.tone-info { background-color: var(--surface) !important; }
.status-dot.tone-brand, .status-dot.tone-success, .status-dot.tone-warning, .status-dot.tone-danger, .status-dot.tone-info, .status-dot.tone-neutral { box-shadow: 0 0 0 4px rgba(13,91,87,.08); }
.exception-mark.tone-danger, .activity-icon.tone-danger { color: var(--danger); background: var(--danger-soft) !important; }
.exception-mark.tone-warning, .activity-icon.tone-warning { color: var(--warning); background: var(--warning-soft) !important; }
.exception-mark.tone-info, .activity-icon.tone-info { color: var(--info); background: var(--info-soft) !important; }
.exception-mark.tone-success, .activity-icon.tone-success { color: var(--success); background: var(--success-soft) !important; }
.exception-mark.tone-neutral { color: var(--muted); background: var(--surface-subtle) !important; }
.sidebar-overlay { display: none; }

@media (max-width: 1200px) {
    .search-control { display: none; }
    .dashboard-content { padding-inline: 22px; }
    .service-layout { grid-template-columns: 1fr 1fr; }
    .sla-meter { grid-column: 1 / -1; grid-template-columns: auto auto auto; gap: 16px; border-left: 0; border-top: 1px solid var(--border); padding-top: 15px; }
    .radial-progress { width: 78px; height: 78px; }
    .radial-progress::before { width: 56px; height: 56px; }
}

@media (max-width: 1080px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-menu { display: grid; }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 25; display: block; visibility: hidden; background: rgba(10,27,31,.4); opacity: 0; transition: .2s; }
    .sidebar-overlay.visible { visibility: visible; opacity: 1; }
}

@media (max-width: 820px) {
    .topbar { padding-inline: 16px; }
    .topbar-title span, .profile-control > span:not(.avatar), .profile-control > svg { display: none; }
    .topbar-title { min-width: 0; }
    .dashboard-content { padding: 20px 16px 30px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .filters { width: 100%; }
    .filter-control { flex: 1; min-width: 0; }
    .data-notice { align-items: flex-start; flex-wrap: wrap; }
    .data-notice small { width: 100%; margin-left: 27px; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .business-strip { grid-template-columns: repeat(2, 1fr); }
    .business-strip article:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
    .business-strip article:nth-child(4) { border-top: 1px solid var(--border); }
    .two-columns, .two-columns.balanced, .revenue-activity { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    h1 { font-size: 23px; }
    .kpi-grid { grid-template-columns: 1fr; }
    .kpi-card { min-height: 136px; }
    .business-strip { grid-template-columns: 1fr; }
    .business-strip article + article { border-left: 0; border-top: 1px solid var(--border); }
    .occupancy-body, .service-layout { grid-template-columns: 1fr; }
    .billing-row { grid-template-columns: 115px 1fr 30px; }
    .contract-summary, .ticket-breakdown, .service-metrics, .revenue-list { grid-template-columns: 1fr; }
    .contract-summary { grid-template-columns: repeat(2, 1fr); }
    .service-metrics > div:nth-child(2n) { border-left: 0; }
    .service-metrics > div + div { border-top: 1px solid var(--border); }
    .sla-meter { grid-column: auto; grid-template-columns: 1fr; border-top: 0; }
    .profile-control { display: none; }
    .filters { flex-direction: column; }
    .panel-footer { align-items: flex-start; flex-direction: column; }
    .dashboard-footer { align-items: flex-start; flex-direction: column; }
    .dashboard-footer small { margin-left: 0; }
}

/* Module destinations */
.brand-link { text-decoration: none; }
.module-content { max-width: 1540px; }
.module-heading { align-items: center; }
.primary-action, .secondary-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 11px; font-weight: 700; text-decoration: none; }
.primary-action { border: 1px solid var(--brand); color: white; background: var(--brand); box-shadow: 0 4px 12px rgba(13,91,87,.18); }
.primary-action:hover { background: var(--brand-hover); }
.primary-action svg, .secondary-action svg { width: 15px; height: 15px; }
.secondary-action { border: 1px solid var(--border); color: var(--brand); background: white; }
.module-kpis { margin-bottom: 14px; }
.module-kpi { position: relative; min-height: 124px; padding: 18px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-card); }
.metric-accent { position: absolute; inset: 0 auto 0 0; width: 4px; }
.module-kpi p, .module-kpi strong, .module-kpi small { display: block; }
.module-kpi p { margin: 0 0 7px; color: var(--muted); font-size: 10px; font-weight: 600; }
.module-kpi strong { font-size: 23px; line-height: 1.15; letter-spacing: -.02em; }
.module-kpi small { margin-top: 7px; color: var(--quiet); font-size: 8.5px; }
.module-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; align-items: start; }
.module-table-panel { padding: 0; overflow: hidden; }
.module-panel-heading { align-items: center; margin: 0; padding: 18px; }
.module-panel-heading p { margin: 3px 0 0; color: var(--quiet); font-size: 9px; }
.table-toolbar { display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-block: 1px solid var(--border); background: #fbfcfc; }
.module-search { width: min(330px, 36%); display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; background: white; color: var(--quiet); }
.module-search svg { width: 15px; height: 15px; }
.module-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 10px; }
.module-filter { min-width: 145px; height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; background: white; }
.module-filter span { color: var(--quiet); font-size: 8px; }
.module-filter select { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--ink); background: white; font-size: 9px; font-weight: 600; }
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 860px; border-collapse: collapse; text-align: left; }
.data-table th { height: 42px; padding: 0 13px; border-bottom: 1px solid var(--border); color: var(--quiet); background: #f8fafb; font-size: 8px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.data-table td { height: 62px; padding: 9px 13px; border-bottom: 1px solid #edf1f3; color: var(--muted); font-size: 9px; vertical-align: middle; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #f9fcfc; }
.data-table td strong, .data-table td small { display: block; }
.data-table td strong { color: var(--ink); font-size: 9px; font-weight: 650; }
.data-table td small { margin-top: 3px; color: var(--quiet); font-size: 7.5px; }
.data-table th:last-child, .data-table td:last-child { width: 42px; padding-inline: 6px; }
.table-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--surface-subtle); font-size: 8px; font-weight: 700; white-space: nowrap; }
.table-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-success { color: var(--success); background: var(--success-soft); }
.status-warning { color: var(--warning); background: var(--warning-soft); }
.status-danger { color: var(--danger); background: var(--danger-soft); }
.status-info, .status-brand { color: var(--info); background: var(--info-soft); }
.row-action { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; color: var(--quiet); background: transparent; }
.row-action:hover { color: var(--brand); background: var(--brand-soft); }
.row-action svg { width: 15px; height: 15px; }
.table-pagination { min-height: 47px; display: flex; align-items: center; justify-content: space-between; padding: 8px 18px; color: var(--quiet); background: #fbfcfc; font-size: 8px; }
.table-pagination div { display: flex; align-items: center; gap: 5px; }
.table-pagination button, .table-pagination b { min-width: 28px; height: 27px; display: grid; place-items: center; padding: 0 8px; border: 1px solid var(--border); border-radius: 7px; color: var(--quiet); background: white; font-size: 8px; }
.table-pagination b { color: white; background: var(--brand); border-color: var(--brand); }
.table-empty { display: none; padding: 48px 20px; text-align: center; }
.table-empty.visible { display: block; }
.table-empty strong { font-size: 12px; }
.table-empty p { margin: 4px 0 0; color: var(--quiet); font-size: 9px; }
.insight-panel { position: sticky; top: 88px; }
.insight-list { display: grid; }
.insight-list article { display: grid; grid-template-columns: 28px 1fr; gap: 9px; padding: 13px 0; border-bottom: 1px solid #edf1f3; }
.insight-list article > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--brand); background: var(--brand-soft); font-size: 8px; font-weight: 800; }
.insight-list strong { display: block; font-size: 9px; }
.insight-list p { margin: 3px 0 0; color: var(--quiet); font-size: 8px; }
.integration-note { margin-top: 16px; padding: 13px; border: 1px solid #cfe3e0; border-radius: 11px; background: var(--brand-soft); }
.integration-note strong { color: var(--brand); font-size: 9px; }
.integration-note p { margin: 5px 0 0; color: #416461; font-size: 7.8px; line-height: 1.55; }
.demo-toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; max-width: 340px; padding: 12px 16px; border-radius: 10px; color: white; background: #15383a; box-shadow: 0 12px 34px rgba(16,33,43,.2); font-size: 10px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.demo-toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1160px) {
    .module-workspace { grid-template-columns: 1fr; }
    .insight-panel { position: static; }
    .insight-list { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .insight-list article { border: 0; }
}

@media (max-width: 820px) {
    .module-heading { align-items: flex-start; }
    .module-heading .primary-action { width: 100%; }
    .table-toolbar { align-items: stretch; flex-wrap: wrap; }
    .module-search { width: 100%; }
    .module-filter { flex: 1; }
    .insight-list { grid-template-columns: 1fr; gap: 0; }
    .insight-list article { border-bottom: 1px solid #edf1f3; }
}

/* Readability calibration — comfortable enterprise desktop scale */
.topbar-title span { font-size: 11px; }
.topbar-title strong { font-size: 15px; }
.search-control input { font-size: 13px; }
.profile-control strong { font-size: 12px; }
.profile-control small { font-size: 10px; }
.nav-item { font-size: 13px; }
.portfolio-label { font-size: 11px; }
.sidebar-context span, .sidebar-context small { font-size: 11px; }
.sidebar-context strong { font-size: 13px; }
.eyebrow, .section-kicker { font-size: 10px; }
h1 { font-size: 30px; }
.page-heading p { font-size: 13px; }
.filter-control span { font-size: 10px; }
.filter-control select { font-size: 12.5px; }
.data-notice { font-size: 11.5px; }
.data-notice small { font-size: 10px; }

.kpi-top > span { font-size: 10px; }
.kpi-card > p { font-size: 12px; }
.kpi-card > strong { font-size: 27px; }
.kpi-card > small { font-size: 10px; }
.business-strip p { font-size: 11px; }
.business-strip strong { font-size: 19px; }
.business-strip small { font-size: 10px; }
.panel-heading h2 { font-size: 17px; }
.text-action { font-size: 11px; }
.chip, .count-badge { font-size: 10px; }

.donut span { font-size: 10px; }
.donut-wrap > small { font-size: 10px; }
.legend-row { font-size: 11px; }
.trend-block > div:first-child { font-size: 10px; }
.month-axis { font-size: 8px !important; }
.billing-row span { font-size: 10px; }
.billing-row strong { font-size: 12px; }
.billing-row > small { font-size: 9px; }
.collection-callout span { font-size: 10px; }
.collection-callout p { font-size: 10px; }
.collection-callout button { font-size: 10px; }
.exception-row strong { font-size: 11px; }
.exception-row small { font-size: 9px; }
.exception-row b { font-size: 11px; }
.panel-footer > span { font-size: 9px; }
.contract-summary p { font-size: 9px; }
.subheading > strong { font-size: 11px; }
.table-row strong { font-size: 10.5px; }
.table-row small { font-size: 9px; }
.service-total span { font-size: 10px; }
.ticket-status p { font-size: 10px; }
.ticket-status small { font-size: 9px; }
.service-metrics span { font-size: 9px; }
.service-metrics small { font-size: 8.5px; }
.radial-progress span { font-size: 9px; }
.sla-meter p { font-size: 9px; }
.revenue-total span { font-size: 10px; }
.revenue-total small { font-size: 9px; }
.revenue-list p { font-size: 10px; }
.revenue-list strong { font-size: 10px; }
.revenue-list small { font-size: 9px; }
.activity-row strong { font-size: 11px; }
.activity-row p { font-size: 9px; }
.activity-row time { font-size: 8.5px; }
.dashboard-footer { font-size: 9.5px; }

.primary-action, .secondary-action { font-size: 12px; }
.module-kpi p { font-size: 12px; }
.module-kpi strong { font-size: 25px; }
.module-kpi small { font-size: 10px; }
.module-panel-heading p { font-size: 10.5px; }
.module-search input { font-size: 11.5px; }
.module-filter span { font-size: 9px; }
.module-filter select { font-size: 10.5px; }
.data-table th { font-size: 9.5px; }
.data-table td { font-size: 11px; }
.data-table td strong { font-size: 11px; }
.data-table td small { font-size: 9px; }
.table-status { font-size: 9.5px; }
.table-pagination { font-size: 9.5px; }
.table-pagination button, .table-pagination b { font-size: 9.5px; }
.insight-list article > span { font-size: 9px; }
.insight-list strong { font-size: 11px; }
.insight-list p { font-size: 9.5px; }
.integration-note strong { font-size: 11px; }
.integration-note p { font-size: 9.5px; }
.demo-toast { font-size: 11px; }

/* Ticket-linked tenant conversation workspace */
.conversation-page { width: min(100%, 1500px); margin: auto; padding: 20px 32px 36px; }
.conversation-breadcrumb { display: flex; align-items: center; gap: 5px; margin-bottom: 10px; color: var(--quiet); font-size: 11px; }
.conversation-breadcrumb a { color: var(--brand); text-decoration: none; font-weight: 650; }
.conversation-breadcrumb svg { width: 12px; height: 12px; }
.conversation-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 19px; }
.conversation-title-row { display: flex; align-items: center; gap: 8px; }
.priority-label { color: var(--quiet); font-size: 10px; }
.conversation-header h1 { margin: 7px 0 2px; font-size: 20px; }
.conversation-header p { margin: 0; color: var(--quiet); font-size: 10px; }
.conversation-header-actions { display: flex; gap: 8px; }
.conversation-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; margin-top: 14px; align-items: start; }
.chat-panel { padding: 0; overflow: hidden; }
.chat-header { min-height: 70px; display: flex; align-items: center; gap: 10px; padding: 12px 17px; border-bottom: 1px solid var(--border); }
.assigned-avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: white; background: var(--brand); font-size: 11px; font-weight: 800; }
.chat-header > div:nth-child(2) strong, .chat-header > div:nth-child(2) span { display: block; }
.chat-header > div:nth-child(2) strong { font-size: 12px; }
.chat-header > div:nth-child(2) span { color: var(--success); font-size: 9px; }
.chat-sla { width: 190px; margin-left: auto; text-align: right; }
.chat-sla span, .chat-sla strong { display: block; }
.chat-sla span { color: var(--success); font-size: 9px; font-weight: 700; }
.chat-sla strong { margin: 1px 0 5px; font-size: 10px; }
.chat-sla > div { height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-subtle); }
.chat-sla i { display: block; height: 100%; border-radius: inherit; background: var(--success); }
.message-thread { height: 500px; padding: 18px; overflow-y: auto; background: #f8fafb; }
.thread-date { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--quiet); font-size: 9px; }
.thread-date::before, .thread-date::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.message-row { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 15px; }
.message-row.outgoing { flex-direction: row-reverse; }
.message-avatar { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 800; }
.outgoing .message-avatar { color: white; background: var(--brand); }
.message-content { max-width: min(72%, 620px); }
.message-meta { display: flex; align-items: center; gap: 8px; margin: 0 3px 4px; }
.outgoing .message-meta { justify-content: flex-end; }
.message-meta strong { font-size: 9.5px; }
.message-meta time { color: var(--quiet); font-size: 8px; }
.message-bubble { padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px 13px 13px 13px; color: var(--ink); background: white; box-shadow: 0 2px 6px rgba(16,33,43,.03); }
.outgoing .message-bubble { border-color: var(--brand); border-radius: 13px 4px 13px 13px; color: white; background: var(--brand); }
.message-bubble > p { margin: 0; font-size: 11px; line-height: 1.55; }
.message-attachment { width: 100%; min-width: 280px; display: flex; align-items: center; gap: 9px; margin-top: 9px; padding: 9px; border: 1px solid var(--border); border-radius: 9px; color: var(--ink); background: #f8fafb; text-align: left; }
.message-attachment > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: var(--brand); background: var(--brand-soft); }
.message-attachment svg { width: 15px; height: 15px; }
.message-attachment strong, .message-attachment small { display: block; }
.message-attachment strong { font-size: 9px; }
.message-attachment small { color: var(--quiet); font-size: 8px; }
.system-message { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px auto; color: var(--quiet); font-size: 8.5px; text-align: center; }
.system-message > span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--success); background: var(--success-soft); }
.system-message svg { width: 10px; height: 10px; }
.system-message p { margin: 0; }
.system-message time { color: #98a5aa; }
.note-message .message-bubble { border-color: #e7c972; color: #614d11; background: #fff9e6; }
.note-message .message-avatar { color: var(--warning); background: var(--warning-soft); }
.reply-mode { display: flex; align-items: center; gap: 4px; padding: 10px 16px 0; border-top: 1px solid var(--border); }
.reply-mode button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 0; border-radius: 8px; color: var(--quiet); background: transparent; font-size: 9.5px; font-weight: 650; }
.reply-mode button.active { color: var(--brand); background: var(--brand-soft); }
.reply-mode svg { width: 12px; height: 12px; }
.message-composer { margin: 8px 16px 16px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: white; transition: border-color .15s; }
.message-composer:focus-within { border-color: var(--brand-mid); box-shadow: 0 0 0 3px rgba(22,139,131,.08); }
.message-composer.internal-note { border-color: #e7c972; background: #fffdf5; }
.message-composer textarea { width: 100%; min-height: 72px; padding: 12px; border: 0; outline: 0; resize: vertical; color: var(--ink); background: transparent; font-size: 11px; line-height: 1.5; }
.composer-actions { min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 11px; border-top: 1px solid #edf1f3; }
.composer-icon { display: flex; align-items: center; gap: 5px; padding: 6px; border: 0; color: var(--muted); background: transparent; font-size: 9px; }
.composer-icon svg { width: 14px; height: 14px; }
.composer-actions > small { margin-left: auto; color: var(--quiet); font-size: 8px; }
.send-button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; color: white; background: var(--brand); font-size: 10px; font-weight: 700; }
.send-button svg { width: 13px; height: 13px; }
.conversation-context { display: grid; gap: 14px; }
.context-card { padding: 16px; }
.context-card .panel-heading { margin-bottom: 13px; }
.tenant-context-head { display: flex; align-items: center; gap: 9px; padding-bottom: 13px; border-bottom: 1px solid #edf1f3; }
.tenant-context-head > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: 11px; font-weight: 800; }
.tenant-context-head strong, .tenant-context-head small { display: block; }
.tenant-context-head strong { font-size: 10.5px; }
.tenant-context-head small { margin-top: 2px; color: var(--quiet); font-size: 8px; }
.context-card dl { margin: 9px 0; }
.context-card dl > div { display: flex; justify-content: space-between; gap: 15px; padding: 6px 0; }
.context-card dt { color: var(--quiet); font-size: 9px; }
.context-card dd { margin: 0; color: var(--ink); font-size: 9px; font-weight: 650; text-align: right; }
.context-link { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 9px 0 0; border: 0; border-top: 1px solid #edf1f3; color: var(--brand); background: transparent; font-size: 9.5px; font-weight: 700; }
.context-link svg { width: 12px; height: 12px; }
.ticket-timeline { display: grid; }
.timeline-step { position: relative; min-height: 44px; display: grid; grid-template-columns: 22px 1fr; gap: 9px; }
.timeline-step::before { content: ""; position: absolute; left: 10px; top: 21px; bottom: -1px; width: 1px; background: var(--border); }
.timeline-step:last-child::before { display: none; }
.timeline-step > span { z-index: 1; width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: white; }
.timeline-step.done > span { border-color: var(--brand); color: white; background: var(--brand); }
.timeline-step svg { width: 11px; height: 11px; }
.timeline-step strong, .timeline-step small { display: block; }
.timeline-step strong { font-size: 9.5px; }
.timeline-step small { margin-top: 2px; color: var(--quiet); font-size: 8px; }
.compact-context > span { color: var(--quiet); font-size: 9px; }
.assigned-tro { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.assigned-tro strong, .assigned-tro small { display: block; }
.assigned-tro strong { font-size: 10px; }
.assigned-tro small { color: var(--quiet); font-size: 8px; }
.assigned-tro button { margin-left: auto; padding: 5px 7px; border: 0; color: var(--brand); background: var(--brand-soft); border-radius: 7px; font-size: 8.5px; font-weight: 700; }

@media (max-width: 1100px) {
    .conversation-workspace { grid-template-columns: 1fr; }
    .conversation-context { grid-template-columns: repeat(2, 1fr); }
    .compact-context { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .conversation-page { padding: 16px; }
    .conversation-header { align-items: flex-start; flex-direction: column; }
    .conversation-header-actions { width: 100%; }
    .conversation-header-actions button { flex: 1; }
    .conversation-context { grid-template-columns: 1fr; }
    .compact-context { grid-column: auto; }
    .message-content { max-width: 85%; }
    .chat-sla { width: 130px; }
    .composer-actions { flex-wrap: wrap; }
    .composer-actions > small { order: 3; width: 100%; margin-left: 0; }
}
