:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; background: #0e1217; color: #edf1f7; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 90% -10%, rgba(108,75,177,.28) 0, transparent 31%), #0e1217; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 24px clamp(18px, 3.4vw, 52px); border-bottom: 1px solid #252d38; background: rgba(14,18,23,.78); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 4; }
.eyebrow, .section-kicker, .panel-title span { color: #a98bff; font-weight: 800; letter-spacing: .16em; font-size: 10px; text-transform: uppercase; }
h1 { font-size: clamp(23px, 2.6vw, 34px); margin: 3px 0 0; letter-spacing: -.025em; }
h2 { font-size: 17px; margin: 4px 0 0; letter-spacing: -.01em; }
.subtitle { margin: 5px 0 0; color: #7f8998; font-size: 12px; }
.identity { display: grid; justify-items: end; gap: 3px; color: #98a3b3; font-size: 12px; }
.identity strong { color: #f0f3f8; font-size: 13px; }
.user-tools { display: grid; justify-items: end; gap: 9px; }
.role-preview { padding: 10px; border: 1px solid #4c3d6a; border-radius: 10px; background: rgba(25,21,36,.94); }
.role-preview-fields { display: flex; align-items: end; justify-content: flex-end; gap: 7px; }
.role-preview-fields label { min-width: 145px; }
.role-preview-fields select { min-width: 145px; }
.role-preview-status { margin-top: 7px; color: #a996d7; font-size: 10px; text-align: right; }
.role-preview-status.active { color: #ffcf7d; font-weight: 700; }
.role-preview-status.error { color: #ff8ba0; }
main { max-width: 1800px; margin: 0 auto; padding: 22px clamp(18px, 3.4vw, 52px) 56px; }
.filterbar { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; padding: 15px 16px; border: 1px solid #29323e; background: rgba(24,30,38,.82); border-radius: 13px; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
label { display: grid; gap: 5px; color: #8f9aaa; font-size: 11px; }
input, select, button { min-height: 38px; border: 1px solid #35404e; border-radius: 8px; background: #141a21; color: #edf1f7; padding: 9px 11px; }
button { background: linear-gradient(135deg, #7a5be5, #6345c7); border-color: #8469e4; cursor: pointer; font-weight: 750; padding-inline: 18px; }
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .65; cursor: wait; }
.period-presets { display: flex; gap: 6px; align-items: end; }
.period-presets .preset { min-height: 38px; padding-inline: 11px; background: #141a21; border-color: #35404e; color: #9fa9b8; font-size: 11px; }
.period-presets .preset:hover { color: #edf1f7; border-color: #6f58bd; }
.freshness { color: #9fa9b8; font-size: 12px; padding: 8px 11px; background: #111820; border: 1px solid #283340; border-radius: 999px; }
.view-tabs { display: inline-flex; gap: 5px; padding: 5px; margin: 0 0 20px; border: 1px solid #29323e; border-radius: 11px; background: rgba(20,26,33,.88); }
.view-tab { min-height: 34px; padding: 7px 15px; background: transparent; border-color: transparent; color: #8995a6; font-size: 12px; }
.view-tab.active { background: #33284c; border-color: #5b477f; color: #f1ecff; box-shadow: 0 5px 18px rgba(68,45,116,.28); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 7px 2px 13px; }
.section-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.comparison-note, .table-note { color: #7f8a9a; font-size: 11px; }
.attention-note { color: #ffb66e; font-size: 11px; }
.crm-head { margin-top: 25px; }
.kpis { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.history-kpis { grid-template-columns: repeat(5, minmax(170px, 1fr)); }
.product-kpis { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.project-kpis { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.manager-kpis { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.manager-company-head { margin-top: 2px; }
.manager-filter-bar { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #303a48; border-radius: 12px; background: rgba(18,24,31,.86); }
.manager-filter-fields { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; }
.manager-filter-fields select { min-width: 210px; }
.manager-department-head { margin-top: 24px; }
.department-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.department-summary-card { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(280px, 1.2fr); gap: 18px; padding: 18px; border: 1px solid #2d3846; border-radius: 13px; background: linear-gradient(145deg, rgba(29,36,46,.98), rgba(21,27,35,.98)); }
.department-summary-card > div > strong { display: block; margin: 10px 0 5px; color: #d8ccff; font-size: 25px; letter-spacing: -.03em; }
.department-summary-card > div > small { color: #7f8a99; font-size: 10px; }
.department-summary-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.department-summary-card dl div { padding: 7px 0; border-bottom: 1px solid #2b3541; }
.department-summary-card dt { color: #7f8a99; font-size: 10px; }
.department-summary-card dd { margin: 4px 0 0; color: #e0e5ec; font-size: 14px; font-weight: 750; }
.positive { color: #3ed4a6 !important; }
.negative { color: #ff7188 !important; }
.neutral { color: #8792a2 !important; }
.secondary-button { min-height: 34px; padding: 7px 13px; background: #171e27; border-color: #3a4655; color: #c4ccd7; font-size: 11px; }
.plan-editor { margin: 0 0 18px; padding: 20px; border-color: #59467c; background: linear-gradient(145deg, rgba(37,31,52,.98), rgba(22,28,36,.98)); }
.plan-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.plan-editor-head p { margin: 6px 0 0; color: #8d98a8; font-size: 11px; }
.icon-button { min-height: 34px; min-width: 34px; padding: 0; border-radius: 50%; background: #171e27; color: #aeb7c4; font-size: 20px; }
.plan-editor-toolbar { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; padding: 13px; border: 1px solid #303a48; border-radius: 10px; background: rgba(13,18,24,.55); }
.plan-editor-stat { display: grid; gap: 2px; min-width: 120px; text-align: right; }
.plan-editor-stat:first-of-type { margin-left: auto; }
.plan-editor-stat span { color: #8490a0; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.plan-editor-stat strong { color: #c0a8ff; font-size: 18px; }
.editor-status { min-height: 36px; padding: 11px 2px 8px; color: #8e99a9; font-size: 11px; }
.editor-status.success { color: #42d6aa; }
.editor-status.error { color: #ff8ba0; }
.plan-editor-table { max-height: 560px; border: 1px solid #2c3542; border-radius: 9px; }
.plan-editor-table input, .plan-editor-table select { width: 100%; min-height: 34px; border: 1px solid #35404e; border-radius: 7px; background: #121820; color: #edf1f7; padding: 7px 9px; }
.plan-editor-table input { min-width: 96px; text-align: right; font-variant-numeric: tabular-nums; transition: border-color .15s, background .15s; }
.plan-editor-table select { min-width: 142px; }
.team-editor { margin: 0 0 14px; padding: 13px; border: 1px solid #303a48; border-radius: 10px; background: rgba(13,18,24,.42); }
.team-editor summary { cursor: pointer; color: #c7b7f4; font-weight: 750; }
.team-editor > p { margin: 7px 0 11px; color: #8d98a8; font-size: 11px; }
.team-add-row { display: grid; grid-template-columns: minmax(220px,1.5fr) minmax(190px,1.2fr) 150px 145px auto; gap: 8px; align-items: end; margin-bottom: 10px; }
.team-add-row label { display: grid; gap: 5px; color: #8d98a8; font-size: 10px; }
.team-add-row input, .team-add-row select, .team-table input, .team-table select { min-height: 34px; border: 1px solid #35404e; border-radius: 7px; background: #121820; color: #edf1f7; padding: 7px 9px; }
.team-table { max-height: 300px; border: 1px solid #29323e; border-radius: 8px; }
.team-table table { min-width: 720px; }
.team-table tr.inactive-team-row { opacity: .58; }
.team-table .team-status { min-width: 110px; }
.manager-link { min-height: 0; padding: 0; border: 0; background: transparent; color: #ddd3ff; font: inherit; font-weight: 750; text-align: left; text-decoration: underline; text-decoration-color: rgba(169,139,255,.42); text-underline-offset: 3px; }
.manager-link:hover { color: #fff; filter: none; }
.manager-dialog { width: min(560px, calc(100vw - 28px)); border: 1px solid #5a477f; border-radius: 14px; background: #161c24; color: #edf1f7; padding: 0; box-shadow: 0 26px 90px rgba(0,0,0,.55); }
.manager-dialog::backdrop { background: rgba(3,6,10,.72); backdrop-filter: blur(3px); }
.manager-dialog form { padding: 20px; }
.manager-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.manager-dialog p { margin: 10px 0 16px; color: #909bab; font-size: 11px; line-height: 1.5; }
.manager-dialog-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.manager-dialog-fields label:last-child { grid-column: 1 / -1; }
.manager-dialog-fields input, .manager-dialog-fields select { width: 100%; }
.manager-dialog-fields small { color: #7f8a99; }
.manager-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.manager-detail-dialog { width: min(1500px, calc(100vw - 34px)); max-height: calc(100vh - 42px); border: 1px solid #5a477f; border-radius: 14px; background: #141a21; color: #edf1f7; padding: 0; box-shadow: 0 26px 90px rgba(0,0,0,.62); }
.manager-detail-dialog::backdrop { background: rgba(3,6,10,.74); backdrop-filter: blur(3px); }
.manager-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 8px; }
.manager-detail-head p { margin: 7px 0 0; color: #8995a5; font-size: 11px; }
.manager-detail-dialog .editor-status { padding: 8px 20px 12px; }
.manager-detail-table { max-height: calc(100vh - 190px); border-top: 1px solid #2c3542; }
.manager-detail-table table { min-width: 1320px; }
.annual-plan-table table { min-width: 1660px; table-layout: fixed; }
.annual-plan-table th, .annual-plan-table td { padding: 8px 6px; }
.annual-plan-table th:nth-child(n+3):nth-child(-n+14) { width: 102px; text-align: center; }
.annual-plan-table .sticky-manager { position: sticky; left: 0; width: 190px; min-width: 190px; background: #1a212a; z-index: 3; }
.annual-plan-table td.sticky-manager { background: #171e27; z-index: 2; }
.annual-plan-table .sticky-department { position: sticky; left: 190px; width: 154px; min-width: 154px; background: #1a212a; z-index: 3; box-shadow: 8px 0 14px rgba(0,0,0,.13); }
.annual-plan-table td.sticky-department { background: #171e27; z-index: 2; }
.annual-plan-table input.missing-plan { border-color: #3a4451; background: #11171e; }
.annual-plan-table input.changed-plan { border-color: #9276ee; background: rgba(91,68,145,.28); box-shadow: inset 0 0 0 1px rgba(169,139,255,.14); }
.annual-plan-table input:disabled { opacity: .34; cursor: not-allowed; }
.plan-month-cell small { display: block; min-height: 24px; margin-top: 4px; color: #8390a0; font-size: 9px; line-height: 1.25; text-align: right; white-space: normal; }
.department-plan-row th, .department-plan-row td { background: #252033 !important; border-top: 1px solid #65518d; }
.department-plan-row th { position: sticky; left: 0; z-index: 5; text-align: left; }
.department-plan-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.department-plan-title strong { color: #d9cdf9; }
.department-plan-title button { min-height: 27px; padding: 4px 8px; font-size: 9px; }
.department-plan-row input { min-width: 96px; border-color: #6e5a98; background: #1b1725; color: #d9cdf9; font-weight: 750; }
.department-plan-row input.department-target-changed { border-color: #e1b866; box-shadow: inset 0 0 0 1px rgba(225,184,102,.2); }
.company-plan-row th, .company-plan-row td { background: #342850 !important; border-top: 1px solid #8c70c8; border-bottom: 1px solid #8c70c8; }
.company-plan-row th { position: sticky; left: 0; z-index: 6; text-align: left; }
.company-plan-row strong { color: #f0eaff; }
.company-plan-row input { min-width: 96px; border-color: #9b7ddd; background: #211a32; color: #f0eaff; font-weight: 800; }
.company-plan-row input.company-target-changed, .department-plan-row input.department-target-changed { border-color: #e1b866; box-shadow: inset 0 0 0 1px rgba(225,184,102,.2); }
.annual-plan-table input.target-mismatch { border-color: #e06d75; box-shadow: inset 0 0 0 1px rgba(224,109,117,.3); }
.annual-row-total, .annual-grand-total { color: #c0a8ff; font-weight: 750; }
.annual-total-head { width: 105px; }
.annual-plan-table tfoot th, .annual-plan-table tfoot td { position: sticky; bottom: 0; background: #202733; z-index: 2; color: #d2d8e2; }
.annual-plan-table tfoot th { left: 0; text-align: left; z-index: 4; }
.plan-history { margin-top: 14px; color: #909bab; font-size: 11px; }
.plan-history summary { cursor: pointer; color: #b8a6ef; }
.history-row { display: grid; grid-template-columns: 135px minmax(170px,1fr) 90px minmax(180px,1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid #29323e; }
.history-row strong { color: #d6dce5; }
.kpi, .panel, .notice { background: linear-gradient(145deg, rgba(27,34,43,.97), rgba(22,28,36,.97)); border: 1px solid #2a3441; border-radius: 13px; box-shadow: 0 14px 38px rgba(0,0,0,.14); }
.kpi { padding: 17px; min-height: 132px; display: flex; flex-direction: column; }
.kpi-primary { background: linear-gradient(145deg, rgba(67,49,103,.92), rgba(29,31,46,.98)); border-color: #59467c; }
.kpi > span { color: #98a3b2; font-size: 12px; min-height: 30px; }
.kpi strong { display: block; margin: 10px 0 6px; font-size: clamp(21px, 2vw, 29px); color: #c0a8ff; letter-spacing: -.03em; white-space: nowrap; }
.kpi small { margin-top: auto; color: #788394; font-size: 10px; }
.kpi small.positive { color: #3ed4a6; }
.kpi small.negative { color: #ff7188; }
.kpi small.neutral { color: #7f8a99; }
.charts { display: grid; gap: 12px; margin-bottom: 12px; }
.charts-lead { grid-template-columns: minmax(0, 1.55fr) minmax(360px, .75fr); }
.charts-split { grid-template-columns: 1fr 1fr; }
.panel { padding: 18px; min-width: 0; }
.panel-title { display: flex; justify-content: space-between; align-items: center; min-height: 43px; margin-bottom: 8px; }
.legend { display: flex; align-items: center; gap: 6px; color: #828d9d; font-size: 10px; }
.legend i { width: 17px; height: 3px; margin-left: 8px; border-radius: 4px; background: #a786ff; }
.legend i.previous { background: #657286; }
.chart { height: 310px; }
.chart-large { height: 355px; }
.table-panel { padding-bottom: 8px; }
.table-wrap { overflow: auto; max-height: 520px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid #29323e; white-space: nowrap; }
th { color: #818d9d; font-weight: 650; position: sticky; top: 0; background: #1a212a; z-index: 1; }
td { color: #bec6d2; }
td strong { display: block; color: #e5e9ef; font-size: 12px; font-weight: 600; }
td small { display: block; color: #707c8d; margin-top: 3px; }
.manager-department-divider td { padding: 12px 10px; background: #222a35; border-top: 1px solid #445063; color: #d5dbe4; }
.manager-department-divider strong { display: inline; color: #cbbaff; font-size: 12px; }
.manager-department-divider span { margin-left: 14px; color: #8793a3; font-size: 10px; }
.delta-positive { color: #3ed4a6; }
.delta-negative { color: #ff7188; }
.delta-neutral { color: #8792a2; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.status.matched { background: rgba(38,191,148,.13); color: #42d6aa; }
.status.unmatched { background: rgba(123,136,155,.12); color: #8e99a9; }
.status.successful { background: rgba(38,191,148,.13); color: #42d6aa; }
.status.open { background: rgba(167,134,255,.14); color: #c0a8ff; }
.status.failed { background: rgba(255,113,136,.12); color: #ff8ba0; }
.status.on-pace { background: rgba(38,191,148,.13); color: #42d6aa; }
.status.behind { background: rgba(255,182,110,.12); color: #ffb66e; }
.status.no-plan { background: rgba(123,136,155,.12); color: #a1acbb; }
.entity-link { color: #bba7ff; text-decoration: none; font-weight: 650; }
.entity-link:hover { color: #d4c7ff; text-decoration: underline; }
.notice { text-align: center; padding: 56px 20px; color: #aeb7c5; }
.notice h2 { color: #f4f6fb; font-size: 22px; }
.notice p { max-width: 560px; margin: 0 auto; color: #8994a4; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: rgba(143,108,255,.13); color: #aa8aff; font-size: 22px; }
.error { border-color: #713a45; color: #ff9baa; }
.hidden { display: none !important; }
@media (max-width: 1500px) { .kpis, .history-kpis { grid-template-columns: repeat(4, minmax(160px, 1fr)); } }
@media (max-width: 1050px) { .charts-lead, .charts-split { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, 1fr); } .department-summary-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .team-add-row { grid-template-columns: 1fr 1fr; } .team-add-row button { grid-column: 1 / -1; } }
@media (max-width: 600px) { .topbar { position: static; align-items: flex-start; gap: 16px; flex-direction: column; } .user-tools, .identity { width: 100%; justify-items: start; } .role-preview { width: 100%; } .role-preview-fields { display: grid; grid-template-columns: 1fr; } .role-preview-fields label, .role-preview-fields select { width: 100%; min-width: 0; } .role-preview-status { text-align: left; } .subtitle { display: none; } .filterbar, .manager-filter-bar { align-items: stretch; } .filters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } .filters > button { grid-column: 1 / -1; } .manager-filter-fields { display: grid; grid-template-columns: 1fr; width: 100%; } .manager-filter-fields select { min-width: 0; width: 100%; } .period-presets { grid-column: 1 / -1; } .period-presets button { flex: 1; } .freshness { width: 100%; text-align: center; } .view-tabs { display: flex; overflow-x: auto; } .view-tab { flex: 0 0 auto; } .kpis { grid-template-columns: 1fr; } .section-head { display: block; } .section-actions { justify-content: flex-start; margin-top: 8px; } .comparison-note { display: block; margin-top: 5px; } .legend { display: none; } .plan-editor-toolbar { align-items: stretch; } .plan-editor-stat { margin-left: 0; text-align: left; } .history-row { grid-template-columns: 1fr; gap: 3px; } .team-add-row { grid-template-columns: 1fr; } .team-add-row button { grid-column: auto; } .department-summary-card { grid-template-columns: 1fr; } .manager-department-divider span { display: block; margin: 4px 0 0; } }

.month-frame{display:block;border:0;width:100%;height:900px;color-scheme:dark}
.startup{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:24px;background:#0d111bed;color:#eef1fb;backdrop-filter:blur(8px)}
.startup[hidden],#startupRetry[hidden]{display:none}
.startup-card{width:min(520px,100%);padding:36px;border:1px solid #a996ff45;border-radius:20px;background:linear-gradient(140deg,#242035,#151f2b);box-shadow:0 24px 100px #0005}
.startup-card h2{font-size:25px;margin:22px 0}.startup-card p{font-size:14px;color:#aeb8cc;line-height:1.6;min-height:44px}
.startup-spinner{width:48px;height:48px;border:4px solid #a996ff30;border-top-color:#a996ff;border-radius:50%;animation:startup-spin 1s linear infinite}
#startupSteps{padding-left:25px;line-height:2.3;color:#8995ab}#startupSteps .current{color:#eee8ff;font-weight:700}#startupSteps .complete{color:#63d9b3}
.startup.failed .startup-spinner{animation:none;border-color:#f0bf72}.startup.failed #startupSteps .current{color:#f0bf72}
@keyframes startup-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.startup-spinner{animation:none;border-top-color:#a996ff}}

/* A fixed shell gives every report the same visible scroll area. */
.topbar { position: relative; z-index: 20; backdrop-filter: none; padding: 10px clamp(12px, 2vw, 28px); gap: 16px; }
.brand-line { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-line h1 { margin: 0; font-size: 18px; }
.brand-mark { color: #a98bff; font-size: 22px; }
.user-tools { display: flex; align-items: center; gap: 16px; }
.role-preview { position: relative; padding: 0; border: 0; background: none; }
.role-preview > summary { cursor: pointer; font-size: 12px; padding: 10px; white-space: nowrap; }
.role-preview-popover { position: absolute; right: 0; top: 100%; z-index: 20; padding: 14px; border: 1px solid #4c3d6a; border-radius: 10px; background: #191524; box-shadow: 0 12px 35px #0008; }
body > main { padding: 0 clamp(12px, 2vw, 28px) 24px; }
.section-navigation { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 10; padding: 8px 0; background: #0e1217; }
.section-navigation .view-tabs { display: flex; flex: 1; min-width: 0; overflow-x: auto; margin: 0; border: 0; background: transparent; padding: 0; }
.section-navigation .view-tab { flex: 0 0 auto; white-space: nowrap; }
#tvMode { flex: 0 0 auto; white-space: nowrap; }
#approvedStatus:empty { display: none; }
#approvedStatus { margin: 8px 0; }
body.tv-mode > .topbar { display: none; }
body.tv-mode > main { max-width: none; padding-inline: 12px; }
body.tv-mode #approvedManagerControls { display: none; }
@media (max-width: 700px) {
  .topbar { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .brand-line h1 { font-size: 15px; }
  .user-tools { width: auto; margin-left: auto; gap: 8px; }
  .identity { width: auto; justify-items: end; font-size: 10px; }
  .identity strong { font-size: 11px; }
  .role-preview { width: auto; }
  .role-preview-popover { width: min(340px, calc(100vw - 24px)); }
  .section-navigation { gap: 6px; }
  #tvMode { max-width: 140px; white-space: normal; font-size: 10px; padding: 6px 8px; }
}

html, body { height: 100%; }
body { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar { flex: 0 0 auto; }
body > main { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; padding-bottom: 0; }
#dashboard:not(.hidden) { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.section-navigation { flex: 0 0 auto; }
#approvedView:not(.hidden), #monthView:not(.hidden) { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#approvedFrame, #monthFrame { flex: 1; min-height: 0; height: 100% !important; }
#approvedManagerControls { flex: 0 0 auto; max-height: 65vh; overflow: auto; }

/* The initial complete summary stays usable while details arrive. */
.lead-progressive{padding:12px 0}.lead-progressive[hidden]{display:none}.lead-progressive h2{margin:0 0 8px;font-size:22px}.lead-summary-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:16px 0}.lead-summary-cards article{background:#191e29;border:1px solid #343a4d;border-radius:12px;padding:18px;display:flex;flex-direction:column;gap:10px}.lead-summary-cards strong{font-size:28px}.lead-summary-cards span,.lead-progressive small{color:#bac4d5}.lead-progressive [role=status]{color:#c6b2ff;font-size:14px}
