:root {
    --navy: #172847;
    --navy-2: #20375f;
    --gold: #c9a227;
    --bg: #f5f7fb;
    --text: #1c2635;
    --muted: #6f7b8f;
    --danger: #b42318;
    --success: #0b7a3b;
    --warn: #8a6500;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
.app { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--navy); color: #fff; transition: width .25s ease; flex-shrink: 0; }
.sidebar.collapsed { width: 76px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar nav { display: grid; gap: 6px; padding: 14px; }
.sidebar a { padding: 12px 14px; border-radius: 12px; color: #dfe7f4; white-space: nowrap; overflow: hidden; }
.sidebar a.active, .sidebar a:hover { background: rgba(201,162,39,.18); color: #fff; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 72px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; box-shadow: 0 8px 28px rgba(23,40,71,.08); }
.brand { display: flex; align-items: center; gap: 14px; font-weight: 700; color: var(--navy); }
.brand img { max-height: 42px; max-width: 150px; object-fit: contain; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn, .btn, button { border: 0; border-radius: 10px; cursor: pointer; }
.icon-btn { background: #edf1f7; padding: 8px 11px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--navy); color: #fff; padding: 10px 14px; font-weight: 600; }
.btn.secondary { background: #e9edf5; color: var(--navy); }
.btn.gold { background: var(--gold); color: #141414; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.success { background: var(--success); color: #fff; }
.content { padding: 26px; flex: 1; }
.footer { background: #fff; color: var(--muted); padding: 12px 24px; border-top: 1px solid #e5eaf2; font-size: 13px; }
.card { background: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 10px 35px rgba(23,40,71,.08); margin-bottom: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; color: var(--navy); font-size: 28px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { position: relative; overflow: hidden; }
.kpi h3 { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.kpi .value { margin: 10px 0 4px; font-size: 28px; color: var(--navy); font-weight: 800; line-height: 1.1; }
.kpi .value small { font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; color: inherit; }
.kpi .value.sub { font-size: 22px; margin-top: 6px; }
.kpi-follow { margin-top: 14px !important; }
.kpi small { color: var(--muted); }
.kpi.good .value { color: var(--success); }
.kpi.warn .value { color: var(--warn); }
.kpi.bad .value { color: var(--danger); }
.kpi::after { content: ""; position: absolute; right: -12px; top: -12px; width: 72px; height: 72px; border-radius: 50%; background: rgba(201,162,39,.12); }
.tou-rows { display: grid; gap: 8px; margin: 14px 0 10px; position: relative; z-index: 1; }
.tou-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.tou-row span { color: var(--muted); }
.tou-row strong { color: var(--navy); font-variant-numeric: tabular-nums; }
.tou-bar { height: 8px; background: #edf1f7; border-radius: 99px; overflow: hidden; position: relative; z-index: 1; margin-bottom: 6px; }
.tou-bar > span { display: block; height: 100%; background: var(--gold); border-radius: 99px; max-width: 100%; }
.tou-compare { display: grid; gap: 8px; margin: 12px 0 8px; position: relative; z-index: 1; }
.tou-compare-line { display: grid; gap: 4px; }
.tou-compare-line > div { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.tou-compare-line strong { color: var(--navy); font-variant-numeric: tabular-nums; }
.kpi.tou-wbp .value { color: var(--danger); }
.kpi.tou-wbp .tou-bar.load > span { background: var(--danger); }
.tou-bar.hours > span { background: #9aa7bc; }
.tou-vs { font-size: 12px; font-weight: 700; position: relative; z-index: 1; margin: 0 0 8px; }
.tou-vs.over { color: var(--danger); }
.tou-vs.under { color: var(--success); }
label { display: grid; gap: 7px; color: var(--navy); font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid #d7deea; border-radius: 12px; padding: 11px 12px; font: inherit; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions input[type="date"], .actions input[type="month"] { width: auto; min-width: 160px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid #edf1f7; vertical-align: top; }
th { color: var(--navy); background: #f8fafc; font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { display: inline-flex; padding: 5px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #e8edf5; color: var(--navy); }
.badge.good, .badge.off { background: #dff7e9; color: var(--success); }
.badge.warn, .badge.scheduled { background: #fff4cc; color: var(--warn); }
.badge.bad, .badge.on { background: #fee4e2; color: var(--danger); }
.alert { padding: 13px 15px; border-radius: 12px; margin-bottom: 16px; }
.alert.success { background: #e8f8ef; color: var(--success); }
.alert.danger { background: #fee4e2; color: var(--danger); }
.alert.warn { background: #fff7dc; color: var(--warn); }
.user-menu { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.user-menu span { color: var(--navy); font-weight: 700; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy), var(--navy-2)); padding: 24px; }
.login-card { width: min(440px, 100%); background: #fff; border-radius: 24px; padding: 34px; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.login-logo { display: block; max-width: 220px; max-height: 90px; margin: 0 auto 24px; object-fit: contain; }
.muted { color: var(--muted); }
.section-title { margin: 0 0 14px; color: var(--navy); font-size: 18px; }
.spark { width: 100%; height: 140px; background: #f8fafc; border-radius: 14px; }
.month-chart { display: flex; align-items: flex-end; gap: 8px; min-height: 188px; padding: 8px 2px 0; }
.month-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.month-bar-wrap { width: 100%; max-width: 36px; height: 132px; display: flex; align-items: flex-end; background: #eef2f8; border-radius: 10px; overflow: hidden; }
.month-bar-wrap span { display: block; width: 100%; background: var(--navy); border-radius: 10px 10px 0 0; min-height: 0; }
.month-chart.water .month-bar-wrap span { background: #3d8a8a; }
.month-col small { color: var(--muted); font-size: 11px; }
.month-col .month-val { color: var(--navy); font-weight: 700; font-size: 10px; text-align: center; white-space: nowrap; }
.month-col.is-current .month-bar-wrap { outline: 2px solid var(--gold); }
.cr-card .summary-head { align-items: flex-start; }
.cr-totals .val { white-space: nowrap; font-size: 16px; overflow: visible; }
.cr-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0 10px; }
.cr-key { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--navy); }
.cr-key::before { content: ""; width: 22px; height: 3px; border-radius: 99px; background: currentColor; }
.cr-key.cost { color: #b88912; }
.cr-key.rev { color: #1f4e79; }
.cr-plot { display: grid; grid-template-columns: 92px minmax(0, 1fr) 100px; align-items: stretch; gap: 4px; overflow: visible; }
.cr-yaxis { position: relative; min-height: 240px; }
.cr-yaxis span { position: absolute; left: 0; right: 6px; transform: translateY(-50%); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; color: #b88912; text-align: right; line-height: 1; }
.cr-yaxis.rev span { left: 6px; right: 0; text-align: left; color: #1f4e79; }
.cr-chart { position: relative; overflow: visible; min-width: 0; }
.cr-svg { width: 100%; height: auto; display: block; overflow: visible; }
.cr-grid { stroke: #e8edf5; stroke-width: 1; }
.cr-x { font-size: 10px; fill: var(--muted); font-family: "Segoe UI", Arial, sans-serif; }
.cr-area.cost { fill: rgba(201, 162, 39, .16); }
.cr-area.rev { fill: rgba(31, 78, 121, .10); }
.cr-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.cr-line.cost { stroke: #c9a227; }
.cr-line.rev { stroke: #1f4e79; }
.cr-dot { stroke: #fff; stroke-width: 1.4; pointer-events: none; }
.cr-dot.cost { fill: #c9a227; }
.cr-dot.rev { fill: #1f4e79; }
.cr-hit { fill: transparent; cursor: pointer; }
.cr-card.is-hover .cr-hit[data-active="1"] { fill: rgba(23, 40, 71, .05); }
.cr-tip { position: fixed; z-index: 80; min-width: 240px; pointer-events: none; background: #172847; color: #fff; border-radius: 12px; padding: 10px 12px; font-size: 12px; box-shadow: 0 12px 30px rgba(23, 40, 71, .28); white-space: nowrap; }
.cr-tip strong { display: block; margin-bottom: 6px; }
.cr-tip span { display: flex; justify-content: space-between; gap: 16px; color: #dfe7f4; }
.cr-tip b { font-variant-numeric: tabular-nums; }
.cr-tip .c { color: #e8c547; }
.cr-tip .r { color: #9ec9ef; }
.cr-strip-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid #e5eaf2; border-radius: 12px; }
.cr-strip { display: flex; min-width: max-content; }
.cr-strip-col { flex: 0 0 auto; min-width: 118px; padding: 8px 10px; border-right: 1px solid #edf1f7; text-align: right; }
.cr-strip-col small { display: block; text-align: center; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.cr-strip-col b { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12px; line-height: 1.45; overflow: visible; }
.cr-strip-col .c { color: #b88912; }
.cr-strip-col .r { color: #1f4e79; }
.cr-card.water .cr-key.cost,
.cr-card.water .cr-yaxis.cost span,
.cr-card.water .cr-strip-col .c { color: #3d8a8a; }
.cr-card.water .cr-line.cost { stroke: #3d8a8a; }
.cr-card.water .cr-dot.cost { fill: #3d8a8a; }
.cr-card.water .cr-area.cost { fill: rgba(61, 138, 138, .16); }
.cr-card.water .cr-tip .c { color: #8fd4d0; }
@media (max-width: 1100px) {
    .cr-card .summary-head { flex-direction: column; }
    .cr-plot { grid-template-columns: 76px minmax(0, 1fr) 84px; }
}
.area-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: #c9d3e3; vertical-align: middle; }
.area-dot.pln { background: #c9a227; }
.area-dot.ballroom { background: #3d8a8a; }
.area-dot.sdp { background: #7eb8d4; }
.area-dot.vac { background: #8fbf7a; }
.area-dot.heatpump { background: #f3c4a0; }
.area-dot.meeting { background: #5b8fb8; }
.area-dot.unmetered { background: #e8c547; }
.area-dot.water { background: #4a7c9b; }
.area-dot.pool { background: #7eb8d4; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 90px; gap: 10px; align-items: center; margin-bottom: 8px; }
.bar { height: 10px; background: #e8edf5; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--navy); }
.bar span.gold { background: var(--gold); }
.bar span.danger { background: var(--danger); }
.callout { padding: 14px 16px; border-radius: 14px; background: #f8fafc; border: 1px solid #e3e9f3; }
.callout strong { color: var(--navy); }
.guide-steps { margin: 0; padding-left: 20px; line-height: 1.7; }
.guide-steps li { margin-bottom: 8px; }
.guide-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.guide-head .section-title { margin: 0; }
.card ul { line-height: 1.65; padding-left: 18px; }
.card code { background: #eef2f8; padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid label small { display: block; margin-top: 4px; font-weight: 500; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; }
@media (max-width: 1100px) {
    .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.content.chat-content { padding: 0; display: flex; flex-direction: column; min-height: calc(100vh - 72px); }
.chat-layout { display: grid; grid-template-columns: 260px 1fr; flex: 1; min-height: 0; }
.chat-list { background: #fff; border-right: 1px solid #e5eaf2; display: flex; flex-direction: column; min-height: 0; }
.chat-list-head { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #edf1f7; color: var(--navy); }
#chatSessions { overflow: auto; flex: 1; }
.chat-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; padding: 12px 16px; border-bottom: 1px solid #f3f6fb; }
.chat-item-main { display: grid; gap: 4px; min-width: 0; color: inherit; text-decoration: none; }
.chat-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-del { background: transparent; color: var(--muted); padding: 2px 8px; line-height: 1.2; font-size: 18px; }
.chat-del:hover { background: #fee4e2; color: var(--danger); }
.chat-item small { color: var(--muted); font-weight: 400; }
.chat-item.active, .chat-item:hover { background: #f6f8fd; }
.chat-main { display: flex; flex-direction: column; min-width: 0; background: #eef2f8; }
.chat-toolbar { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; background: #fff; border-bottom: 1px solid #e5eaf2; }
.chat-toolbar p { margin: 4px 0 0; }
.chat-suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 20px 0; }
.chat-suggest button { background: #fff; color: var(--navy); border: 1px solid #d7deea; padding: 8px 12px; font-weight: 600; }
.chat-thread { flex: 1; overflow: auto; padding: 18px 20px; display: grid; gap: 12px; align-content: start; }
.chat-bubble { max-width: 78%; padding: 12px 14px; border-radius: 16px; line-height: 1.5; box-shadow: 0 8px 20px rgba(23,40,71,.06); }
.chat-bubble.user { margin-left: auto; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble.assistant { background: #fff; color: var(--text); border-bottom-left-radius: 4px; }
.chat-bubble.pending { color: var(--muted); font-style: italic; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px 20px 18px; background: #fff; border-top: 1px solid #e5eaf2; }
.chat-form textarea { min-height: 52px; }
@media (max-width: 1100px) {
    .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .sidebar { position: fixed; z-index: 20; height: 100vh; transform: translateX(-110%); }
    .sidebar.open { transform: none; }
    .grid.cols-2, .grid.cols-3, .form-grid { grid-template-columns: 1fr; }
    .chat-layout { grid-template-columns: 1fr; }
    .chat-list { display: flex; flex-direction: column; max-height: 36vh; border-right: 0; border-bottom: 1px solid #e5eaf2; }
}
.hours-input { width: 72px; padding: 7px 8px; text-align: right; }
.asset-table { table-layout: fixed; width: 100%; }
.asset-table col.item { width: auto; }
.asset-table col.num { width: 88px; }
.asset-table col.hours { width: 92px; }
.asset-table col.money { width: 124px; }
.asset-table col.act { width: 86px; }
.asset-table th, .asset-table td { vertical-align: middle; }
.asset-table th.num, .asset-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.asset-table .item-name { display: block; line-height: 1.3; }
.asset-table .hours-input { width: 68px; margin-left: auto; display: block; }
.asset-table .act { text-align: right; white-space: nowrap; }
.asset-table .act .btn { padding: 7px 10px; }
.asset-table .group-row td {
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    padding: 10px 12px;
    border-bottom: 0;
}
.asset-table .group-row:target td { background: #c9a227; color: #141414; }
html { scroll-padding-top: 84px; }
.asset-area-rows { display: grid; gap: 0; }
.asset-area-row {
    display: grid;
    grid-template-columns: auto minmax(180px, 260px) minmax(80px, 1fr) 96px 56px;
    gap: 8px 10px;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid #edf1f7;
    border-radius: 0;
    cursor: pointer;
    font-weight: 500;
}
.asset-area-row input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--gold);
    justify-self: start;
}
.asset-area-row:hover, .asset-area-row.active { background: #fff8e8; }
.asset-area-row .area-name { color: var(--navy); font-weight: 600; font-size: 13px; line-height: 1.25; min-width: 0; }
.asset-area-row .area-name small { display: block; font-weight: 500; color: var(--muted); }
.asset-area-row .bar { height: 12px; min-width: 0; }
.asset-area-row .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.asset-area-row .pct { font-weight: 700; color: var(--navy); min-width: 52px; }
@media (max-width: 800px) {
    .asset-area-row {
        grid-template-columns: auto minmax(0, 1fr) 56px;
        grid-template-areas: "radio name pct" ". bar bar";
    }
    .asset-area-row input[type="radio"] { grid-area: radio; }
    .asset-area-row .area-name { grid-area: name; }
    .asset-area-row .bar { grid-area: bar; }
    .asset-area-row .num:not(.pct) { display: none; }
    .asset-area-row .pct { grid-area: pct; }
}
.asset-table td, .sheet td { vertical-align: middle; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 10px 14px; border-radius: 10px; background: #e9edf5; color: var(--navy); font-weight: 600; }
.tabs a.active { background: var(--navy); color: #fff; }
.sidebar-pick { display: grid; gap: 18px; }
.sidebar-pick-group h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sidebar-pick-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #f4f6fb; border-radius: 12px; margin-bottom: 8px; }
.sidebar-pick-item strong { display: block; }
.sidebar-pick-item small { color: var(--muted); }
.sidebar-pick-item input { width: 18px; height: 18px; }
.sidebar-pick-item.locked { opacity: .72; }
.sheet-wrap { overflow: auto; max-height: 70vh; border: 1px solid #e5eaf2; border-radius: 12px; }
.sheet { width: max-content; min-width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { border: 1px solid #e5eaf2; padding: 6px 8px; font-size: 13px; white-space: nowrap; }
.sheet thead th { position: sticky; top: 0; z-index: 2; background: #f3f6fb; }
.sheet .sticky { position: sticky; left: 0; z-index: 3; background: #fff; min-width: 92px; }
.sheet thead .sticky { z-index: 4; background: #eef2f8; }
.sheet input { width: 88px; padding: 6px 8px; border-radius: 8px; }
.sheet .cons { color: var(--muted); text-align: right; }
.sheet tr.today td { background: #fff8e6; }
.sheet tr.today .sticky { background: #fff8e6; }
.sheet thead .area-head { background: var(--navy); color: #fff; text-align: center; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.sheet thead .area-head.pln { background: #c9a227; color: #141414; }
.sheet thead .area-head.ballroom { background: #3d8a8a; color: #fff; }
.sheet thead .area-head.heatpump { background: #f3c4a0; color: #3b2416; }
.sheet thead .area-head.sdp, .sheet thead .area-head.meeting { background: #7eb8d4; color: #123044; }
.sheet thead .area-head.vac { background: #8fbf7a; color: #143318; }
.sheet thead .area-head.water { background: #4a7c9b; color: #fff; }
.sheet thead .group-head.pln { background: #e4c56a; color: #141414; }
.sheet thead .group-head.ballroom { background: #5aa3a3; color: #fff; }
.sheet thead .group-head.heatpump { background: #f8d4b8; color: #3b2416; }
.sheet thead .group-head.sdp, .sheet thead .group-head.meeting { background: #a9d0e4; color: #123044; }
.sheet thead .group-head.vac { background: #b4d6a4; color: #143318; }
.sheet thead .group-head.water { background: #7aa3bd; color: #fff; }
.sheet thead .group-head.kvarh { background: #f0dd8a; color: #141414; }
.sheet th.pln-split, .sheet td.pln-split { border-left: 2px dashed #3b7ea6; }
.sheet thead tr:nth-child(1) th { top: 0; }
.sheet thead tr:nth-child(2) th { top: 29px; }
.sheet thead tr:nth-child(3) th { top: 58px; }
.mtd-areas .pln .val { color: #8a6500; }
.mtd-areas .ballroom .val { color: #2d6b6b; }
.mtd-areas .heatpump .val { color: #a05a2c; }
.mtd-areas .sdp .val, .mtd-areas .meeting .val { color: #1d5f7a; }
.mtd-areas .vac .val { color: #2d6a32; }
.area-usage-table { width: 100%; border-collapse: collapse; }
.area-usage-table th, .area-usage-table td { padding: 8px 12px; border-bottom: 1px solid #e3e9f3; }
.area-usage-table th.num, .area-usage-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.area-usage-table .meter-name { padding-left: 22px; }
.area-usage-table .skip-formula td { color: #6b7280; }
.area-usage-table .group-row td { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; padding-left: 12px; }
.area-usage-table .group-row.pln td { background: #c9a227; color: #141414; }
.area-usage-table .group-row.ballroom td { background: #3d8a8a; color: #fff; }
.area-usage-table .group-row.sdp td { background: #7eb8d4; color: #123044; }
.area-usage-table .group-row.vac td { background: #8fbf7a; color: #143318; }
.area-usage-table .group-row.water td { background: #4a7c9b; color: #fff; }
.area-usage-table .group-row.heatpump td { background: #f3c4a0; color: #3b2416; }
.area-usage-table .group-row.meeting td { background: #5b8fb8; color: #fff; }
.area-usage-table .subtotal td { background: #f3f6fb; font-weight: 700; }
.area-usage-table tr.section-gap td { height: 14px; padding: 0; border-bottom: 0; background: transparent; }
.area-usage-table tfoot td { font-weight: 700; background: #eef2f8; }
.area-usage-table tfoot .unmetered td { background: #fff4cc; color: #8a6500; }
.area-usage-table .feeder-toggle td { font-weight: 700; cursor: pointer; user-select: none; }
.area-usage-table .feeder-toggle.ballroom td { background: #3d8a8a; color: #fff; }
.area-usage-table .feeder-toggle.sdp td { background: #7eb8d4; color: #123044; }
.area-usage-table .feeder-toggle.vac td { background: #8fbf7a; color: #143318; }
.area-usage-table .feeder-toggle.heatpump td { background: #f3c4a0; color: #3b2416; }
.area-usage-table .feeder-toggle.meeting td { background: #5b8fb8; color: #fff; }
.area-usage-table tfoot .unmetered-feeder td { background: #f3ead0; color: #5c4a12; cursor: pointer; }
.area-usage-table .panel-nested td { padding-left: 44px; font-weight: 500; }
.area-usage-table .feeder-toggle small { display: inline-block; margin-left: 8px; font-weight: 500; opacity: .85; text-transform: none; letter-spacing: 0; }
.area-usage-table .feeder-caret { display: inline-block; width: 1em; transition: transform .15s ease; }
.area-usage-table .feeder-toggle.is-open .feeder-caret { transform: rotate(90deg); }
.area-usage-table .panel-child td { background: #f7f9fc; }
.panel-setup { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e3e9f3; }
.panel-setup h3, #panels h4 { margin: 0 0 8px; font-size: 13px; }
.panel-add { display: grid; grid-template-columns: 160px 1.2fr 1.4fr 80px auto; gap: 10px; align-items: end; margin: 12px 0 18px; }
.panel-setup-list .row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.panel-setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.panel-setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.panel-setup-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: #f4f6fb; border-radius: 10px; }
.loc-tree { display: grid; gap: 14px; }
.loc-building { background: #f4f6fb; border-radius: 12px; padding: 10px 12px; }
.loc-floor { margin: 8px 0 0 14px; padding-left: 10px; border-left: 2px solid #d5deea; }
.loc-area { margin: 4px 0 0 16px; font-size: 13px; }
.loc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.loc-row .row-actions { margin-left: auto; }
@media (max-width: 900px) {
    .panel-add, .panel-setup-grid { grid-template-columns: 1fr; }
}
.dropzone { border: 2px dashed #c9d3e3; border-radius: 16px; padding: 22px; background: #f8fafc; }
.nav-note { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.45); padding: 10px 14px 2px; }
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(23,40,71,.45); place-items: center; padding: 24px; }
.modal-overlay.open { display: grid; }
.modal-box { background: #fff; border-radius: 18px; padding: 22px; width: min(760px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 24px 70px rgba(23,40,71,.25); }
.modal-box .page-head { margin-bottom: 12px; }
.modal-box .page-head .section-title { margin: 0; }
.modal-box ul { margin: 0 0 14px; padding-left: 18px; color: var(--navy); }
.sheet tr.today td, table tr.today td { background: #fff8e6; }
.date-pick { display: grid; place-items: center; margin: 0; cursor: pointer; }
.date-pick input { width: 18px; height: 18px; accent-color: var(--gold); }
.date-pick-text { cursor: pointer; font-weight: 700; color: var(--navy); }
th.pick, td.pick { width: 52px; text-align: center; }
table tr.is-selected td, .sheet tr.is-selected td { background: #fff8e6; }
.sheet tr.is-selected .sticky { background: #fff8e6; }
.summary-rooms { width: 78px; text-align: right; padding: 8px 10px; }
.summary-rev { min-width: 168px; width: 100%; text-align: right; padding: 8px 10px; }
.summary-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.summary-head .section-title { margin-bottom: 6px; }
.summary-head .muted { margin: 0; }
.mtd-areas { background: #f8fafc; border: 1px solid #e5eaf2; border-radius: 14px; padding: 12px 16px; margin: 12px 0 14px; }
.mtd-areas h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mtd-area-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 16px; }
.mtd-areas small { color: var(--muted); display: block; }
.mtd-areas .val { font-weight: 800; color: var(--navy); font-size: 18px; margin: 4px 0 2px; }
.mtd-areas .pln .val { color: #8a6500; }
.sheet tfoot .mtd-row td { background: #eef2f8; font-weight: 700; color: var(--navy); }
.month-avg h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.month-avg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px 16px; }
.month-avg small { color: var(--muted); display: block; }
.month-avg .val { font-weight: 800; color: var(--navy); font-size: 18px; margin: 4px 0 2px; }
@media (max-width: 900px) {
    .month-avg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ai-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 12px 0 16px; }
.ai-slots li { border: 1px solid #e5eaf2; border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; background: #f8fafc; }
.ai-slots li.active { border-color: var(--gold); background: #fff8e8; }
.ai-slots strong { color: var(--navy); }
.ai-slots small { color: var(--muted); word-break: break-all; }
.ai-slot-key { font-size: 12px; font-weight: 700; }
.ai-slot-key.ok { color: var(--success); }
.ai-slot-key.no { color: var(--danger); }
@media (max-width: 900px) {
    .ai-slots { grid-template-columns: 1fr; }
}
