:root {
    --navy: #0b213f;
    --blue: #1769d2;
    --cyan: #18a9d5;
    --green: #159267;
    --amber: #d89112;
    --red: #c84444;
    --purple: #7651bf;
    --ink: #17233a;
    --muted: #667085;
    --line: #e5e9f0;
    --surface: #ffffff;
    --canvas: #f4f7fb;
    --radius: 14px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Segoe UI, Arial, sans-serif; color: var(--ink); background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; padding: 24px 18px; background: var(--navy); color: white; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 28px; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(145deg, var(--cyan), var(--blue)); }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; font-size: 11px; color: #b9c7dc; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a { padding: 13px 14px; color: #d9e4f3; border-radius: 10px; font-size: 14px; }
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,.11); color: white; }
.sidebar-user { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 16px 8px 12px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user strong { font-size: 13px; }
.sidebar-user small { font-size: 11px; color: #b9c7dc; margin-top: 2px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 800; }
.logout { padding: 10px 8px; color: #ffd0d0; font-size: 13px; }

.main { margin-left: 260px; width: calc(100% - 260px); }
.topbar { min-height: 88px; padding: 20px 34px; display: flex; align-items: center; gap: 18px; background: white; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 22px; }
.topbar p { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.menu-button { display: none; border: 0; background: transparent; font-size: 24px; }
.role-chip { margin-left: auto; background: #eaf3ff; color: #1558ad; border-radius: 99px; padding: 8px 13px; font-weight: 700; font-size: 12px; }
.content { padding: 30px 34px 50px; }

.hero { border-radius: var(--radius); padding: 28px 30px; color: white; background: linear-gradient(120deg, #0b2749, #1169a8); margin-bottom: 24px; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -60px; top: -110px; border: 46px solid rgba(255,255,255,.08); border-radius: 50%; }
.hero h2 { margin: 0 0 8px; font-size: 24px; }
.hero p { margin: 0; max-width: 730px; color: #dceeff; line-height: 1.6; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 18px rgba(20,46,82,.04); }
.stat { padding: 20px; }
.stat small { color: var(--muted); font-weight: 600; }
.stat strong { display: block; font-size: 30px; margin-top: 8px; }
.stat .accent { width: 34px; height: 4px; border-radius: 5px; margin-top: 14px; background: var(--blue); }
.stat.green .accent { background: var(--green); }
.stat.amber .accent { background: var(--amber); }
.stat.purple .accent { background: var(--purple); }
.card { padding: 22px; margin-bottom: 22px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.card-header h2, .card h2 { margin: 0; font-size: 18px; }

.workflow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.verification-workflow { grid-template-columns: repeat(3, 1fr); }
.workflow-dashboard-stats { grid-template-columns: repeat(5, 1fr); }
.verifier-queue { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-color: #d6c7f2; background: linear-gradient(110deg, #fbf9ff, #f2edff); }
.verifier-queue h2 { margin-bottom: 6px; }
.verifier-queue p { margin: 0; color: var(--muted); font-size: 12px; }
.workflow-step { position: relative; padding: 15px 13px; border-radius: 10px; color: #17345b; background: #eaf2fb; min-height: 88px; }
.workflow-step strong { display: block; font-size: 13px; }
.workflow-step span { display: block; margin-top: 6px; font-size: 11px; color: #61738b; }

.btn { appearance: none; border: 0; border-radius: 9px; padding: 10px 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; font-size: 13px; }
.btn-primary { color: white; background: var(--blue); }
.btn-success { color: white; background: var(--green); }
.btn-warning { color: white; background: var(--amber); }
.btn-danger { color: white; background: var(--red); }
.btn-light { color: var(--ink); background: #edf1f6; }
.btn-sm { padding: 7px 11px; font-size: 12px; }
.btn:hover { filter: brightness(.96); }

.filters { display: grid; grid-template-columns: 2fr 1fr auto; gap: 10px; margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 7px; color: #35435b; }
.field input, .field select, .field textarea, .filters input, .filters select { width: 100%; border: 1px solid #d6dce6; background: white; color: var(--ink); border-radius: 9px; padding: 11px 12px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,210,.1); }
.field textarea { min-height: 95px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 5px; }
.help { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 10px; font-size: 11px; color: var(--muted); text-align: left; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
td { padding: 13px 10px; font-size: 13px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; border-radius: 99px; padding: 6px 9px; font-weight: 700; font-size: 11px; white-space: nowrap; }
.badge.slate { color: #475467; background: #f0f2f5; }
.badge.blue { color: #1558ad; background: #e8f2ff; }
.badge.amber { color: #8b5700; background: #fff3d7; }
.badge.purple { color: #5a3b9c; background: #f0eaff; }
.badge.red { color: #a72c2c; background: #ffe8e8; }
.badge.green { color: #087650; background: #dcf7ec; }
.empty { padding: 34px; text-align: center; color: var(--muted); }

.alert { padding: 13px 15px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; }
.alert.success { color: #086443; background: #dbf5e9; }
.alert.error { color: #9f2929; background: #ffe5e5; }
.alert.info { color: #185699; background: #e4f1ff; }

.detail-grid { display: grid; grid-template-columns: 1.45fr .85fr; gap: 22px; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.detail-item small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.detail-item strong { display: block; font-size: 13px; line-height: 1.5; }
.timeline { position: relative; margin: 8px 0 0 8px; padding-left: 22px; border-left: 2px solid #dbe3ef; }
.timeline-item { position: relative; padding: 0 0 20px 10px; }
.timeline-item::before { content: ""; position: absolute; left: -29px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); border: 3px solid white; box-shadow: 0 0 0 1px #b9c9dc; }
.timeline-item strong, .timeline-item small, .timeline-item span { display: block; }
.timeline-item strong { font-size: 12px; }
.timeline-item span { font-size: 12px; color: #4b596f; margin-top: 5px; line-height: 1.5; }
.timeline-item small { font-size: 10px; color: var(--muted); margin-top: 3px; }
.document-links { display: flex; flex-wrap: wrap; gap: 8px; }
.map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.map-tools .help { flex-basis: 100%; }
.disabled-link { opacity: .45; pointer-events: none; }
.map-preview { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; margin: -5px 0 20px; }
.map-preview iframe { display: block; width: 100%; height: 330px; border: 0; }
.open-map-shell { overflow: hidden; margin: -5px 0 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.open-map { width: 100%; height: 390px; z-index: 1; }
.open-map-caption { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; color: var(--muted); font-size: 11px; }
.open-map-caption strong { color: var(--ink); }
.map-error { display: grid; place-items: center; height: 100%; padding: 30px; color: var(--red); text-align: center; }
.map-boundary-alert { margin-top: -4px; }

/* Struktur inti Leaflet sebagai pengaman jika stylesheet CDN gagal dimuat. */
.leaflet-container { position: relative; overflow: hidden; outline-offset: 1px; background: #dce7ef; }
.leaflet-pane, .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow,
.leaflet-tile-container, .leaflet-pane > svg, .leaflet-pane > canvas,
.leaflet-zoom-box, .leaflet-image-layer, .leaflet-layer { position: absolute; left: 0; top: 0; }
.leaflet-container .leaflet-tile-pane img,
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-overlay-pane img { max-width: none !important; max-height: none !important; }
.leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow { user-select: none; -webkit-user-drag: none; }
.leaflet-tile { visibility: hidden; filter: inherit; }
.leaflet-tile-loaded { visibility: inherit; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-control { float: left; clear: both; }
.leaflet-right .leaflet-control { float: right; }
.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; }
.leaflet-control-zoom { overflow: hidden; border: 2px solid rgba(0,0,0,.2); border-radius: 6px; background: white; }
.leaflet-control-zoom a { display: block; width: 30px; height: 30px; line-height: 30px; text-align: center; color: #17233a; background: white; border-bottom: 1px solid #d7dde6; font-size: 20px; font-weight: 700; }
.leaflet-control-zoom a:last-child { border-bottom: 0; }
.leaflet-control-attribution { padding: 2px 6px; color: #556277; background: rgba(255,255,255,.85); font-size: 9px; }
.leaflet-control-attribution a { color: #1769d2; }
.leaflet-control-container .leaflet-control { pointer-events: auto; }
.leaflet-grab { cursor: grab; }
.leaflet-dragging .leaflet-grab { cursor: grabbing; }
.sr-map-marker { position: absolute; }
.sr-map-marker span { position: relative; display: block; width: 28px; height: 28px; border: 4px solid white; border-radius: 50% 50% 50% 0; background: #1769d2; box-shadow: 0 3px 9px rgba(11,33,63,.38); transform: rotate(-45deg); }
.sr-map-marker span::after { content: ""; position: absolute; width: 8px; height: 8px; left: 6px; top: 6px; border-radius: 50%; background: white; }
.route-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-color: #b8d8ff; background: linear-gradient(110deg, #f8fbff, #eef6ff); }
.route-card h2 { margin-bottom: 6px; }
.route-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.location-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.location-card { margin: 0; }
.check-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; font-size: 12px; font-weight: 700; }
.check-row input { width: 17px; height: 17px; }
.location-meta { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.vendor-scope-form { display: grid; grid-template-columns: minmax(125px, 1fr) 82px auto; gap: 6px; min-width: 330px; }
.vendor-scope-form select, .vendor-scope-form input { min-width: 0; border: 1px solid #d6dce6; border-radius: 7px; padding: 7px; font-size: 11px; }
.program-year-card { display: flex; align-items: center; justify-content: space-between; gap: 25px; border-color: #b8d8ff; background: linear-gradient(110deg, #f7fbff, #edf6ff); }
.program-year-card h2 { margin: 4px 0 7px; }
.program-year-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.year-control { display: flex; align-items: center; gap: 8px; }
.year-control input { width: 115px; border: 1px solid #b9c9dc; border-radius: 9px; padding: 10px; font-size: 18px; font-weight: 800; text-align: center; }
.header-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.submit-help { margin: -2px 0 12px; padding: 10px 12px; border-radius: 8px; color: #385d86; background: #eef6ff; }
.document-panel { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.form-section { margin: 24px 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbfe; }
.form-section .card-header { margin-bottom: 15px; }
.document-upload-grid .field { margin-bottom: 6px; }
.agreement-box { border-color: #bcebd8; background: linear-gradient(120deg, #f8fffc, #eefaf5); }
.agreement-date { max-width: 280px; }
.agreement-terms { margin: 4px 0 18px; padding-left: 22px; color: #46546a; font-size: 12px; line-height: 1.7; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid #a9dcc8; border-radius: 10px; color: #075c40; background: white; font-size: 12px; font-weight: 700; line-height: 1.5; }
.consent-row input { width: 18px; height: 18px; flex: 0 0 auto; }
.supporting-documents { display: grid; gap: 9px; }
.supporting-document { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfd; }
.supporting-document strong, .supporting-document span, .supporting-document small { display: block; }
.supporting-document strong { font-size: 13px; }
.supporting-document span { margin-top: 4px; color: #4b596f; font-size: 11px; }
.supporting-document small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.document-add-form { display: grid; grid-template-columns: .8fr 1.4fr auto; gap: 12px; align-items: end; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.document-add-form .field { margin: 0; }
.detail-wide { grid-column: 1 / -1; }
.text-link { color: var(--blue); text-decoration: underline; }
.customer-number { margin: -2px 0 22px; padding: 18px 20px; border-radius: 12px; background: linear-gradient(110deg, #e3f8ef, #eefbf7); border: 1px solid #bcebd8; }
.customer-number small, .customer-number strong { display: block; }
.customer-number small { color: #167557; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.customer-number strong { color: #075c40; font-size: 25px; margin-top: 5px; }
.action-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.action-card h2 { margin-bottom: 6px; }
.action-card p, .success-panel p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.split-actions { justify-content: space-between; }
.success-panel { border-color: #bcebd8; background: #f1fbf7; }
.success-panel h2 { color: #087650; margin-bottom: 7px; }
.benefit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.report-filters { display: grid; grid-template-columns: 1.2fr .8fr 1.2fr 1fr 1fr; gap: 12px; align-items: end; }
.report-filter-actions { grid-column: 1 / -1; }
.row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-map { margin: 20px 0 0; }
.print-page { background: #e9edf3; padding: 28px; }
.print-toolbar { width: min(900px, 100%); display: flex; justify-content: flex-end; gap: 8px; margin: 0 auto 14px; }
.beneficiary-sheet { width: min(900px, 100%); min-height: 1120px; margin: auto; padding: 52px 58px; background: white; box-shadow: 0 12px 38px rgba(25,45,75,.14); }
.beneficiary-header { display: flex; align-items: center; gap: 18px; padding-bottom: 22px; border-bottom: 3px double #183b67; color: #102f55; }
.city-mark { width: 70px; height: 70px; display: grid; place-items: center; border: 3px solid #1769d2; border-radius: 14px; font-size: 20px; font-weight: 900; color: #1769d2; }
.document-logo { width: 76px; height: 76px; flex: 0 0 auto; object-fit: contain; }
.document-logo-pair { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.document-logo-pair .city-mark { width: 72px; height: 72px; font-size: 16px; }
.logo-upload-grid { align-items: start; }
.logo-upload-panel { min-width: 0; }
.empty-logo { color: var(--muted); font-size: 12px; }
.small-mark { width: 56px; height: 56px; font-size: 13px; border-width: 2px; border-radius: 10px; flex: 0 0 auto; }
.utility-logo-setting { display: flex; align-items: center; gap: 18px; margin: -5px 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfd; }
.utility-logo-setting img { width: 72px; height: 72px; object-fit: contain; }
.utility-logo-setting .check-row { margin: 0; }
.beneficiary-header strong { font-size: 19px; letter-spacing: .04em; }
.beneficiary-header h1 { margin: 4px 0; font-size: 25px; }
.beneficiary-header p { margin: 0; color: var(--muted); }
.beneficiary-title { margin: 30px 0 20px; text-align: center; }
.beneficiary-title span, .beneficiary-title strong { display: block; }
.beneficiary-title span { font-size: 17px; font-weight: 800; }
.beneficiary-title strong { margin-top: 8px; color: var(--blue); font-size: 22px; }
.beneficiary-intro { color: #46546a; line-height: 1.7; font-size: 13px; }
.beneficiary-data { margin-top: 20px; border: 1px solid #cfd7e3; }
.beneficiary-data th, .beneficiary-data td { padding: 11px 13px; border: 1px solid #dfe4eb; text-transform: none; letter-spacing: 0; }
.beneficiary-data th { width: 34%; background: #f3f6fa; color: #34445c; font-size: 12px; }
.beneficiary-data td { font-size: 13px; }
.beneficiary-note { margin-top: 22px; padding: 14px; text-align: center; border: 1px solid #9fdcc5; border-radius: 8px; color: #087650; background: #ebfaf4; font-size: 13px; }
.signature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 55px; text-align: center; }
.signature-grid div { min-height: 110px; display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; }
.signature-grid strong { border-top: 1px solid #7c8798; padding-top: 7px; }
.beneficiary-footer { margin-top: 36px; padding-top: 12px; border-top: 1px solid #dfe4eb; text-align: center; color: #7c8798; font-size: 10px; }
.agreement-sheet { width: min(900px, 100%); min-height: 1120px; margin: auto; padding: 46px 54px; background: white; box-shadow: 0 12px 38px rgba(25,45,75,.14); }
.agreement-heading { margin: 26px 0 22px; text-align: center; }
.agreement-heading h2 { margin: 0; font-size: 19px; line-height: 1.45; text-decoration: underline; }
.agreement-heading p { margin: 8px 0 0; font-size: 13px; }
.agreement-paragraph { color: #39495f; font-size: 13px; line-height: 1.75; text-align: justify; }
.agreement-subtitle { margin: 24px 0 8px; font-size: 14px; }
.agreement-clauses { margin: 0; padding-left: 22px; color: #39495f; font-size: 12px; line-height: 1.75; text-align: justify; }
.agreement-legacy-note { margin-top: 20px; }
.agreement-signatures { margin-top: 45px; }
.signature-grid.two-parties { grid-template-columns: repeat(2, 1fr); gap: 80px; }
.agreement-parties { margin: 12px 0 20px; padding-left: 22px; color: #39495f; font-size: 13px; line-height: 1.75; text-align: justify; }
.agreement-parties li + li { margin-top: 10px; }
.agreement-subtitle.centered { text-align: center; line-height: 1.5; }
.agreement-article { break-inside: avoid; page-break-inside: avoid; }
.compact-data { margin-top: 10px; }
.leadership-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; padding: 27px 30px; border-radius: var(--radius); color: white; background: linear-gradient(120deg, #071d37, #114f7d 68%, #167c8f); }
.leadership-hero h2 { margin: 6px 0 8px; font-size: 25px; }
.leadership-hero p { margin: 0; color: #d8eaf5; font-size: 13px; line-height: 1.6; }
.eyebrow { color: #7adcec; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.leader-year-filter { min-width: 145px; }
.leader-year-filter label { display: block; margin-bottom: 6px; color: #cce2ef; font-size: 10px; font-weight: 700; }
.leader-year-filter select { width: 100%; padding: 10px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; color: white; background: rgba(255,255,255,.12); font-weight: 800; }
.leader-year-filter option { color: var(--ink); }
.leadership-stats { grid-template-columns: repeat(5, 1fr); }
.red-stat .accent { background: var(--red) !important; }
.leader-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 22px; }
.progress-metric { margin: 18px 0; }
.progress-metric > div:first-child { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.progress-metric span { color: var(--muted); }
.progress-track, .mini-progress { overflow: hidden; height: 9px; margin-top: 9px; border-radius: 99px; background: #e7edf5; }
.progress-track span, .mini-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #159267, #2ebf8c); }
.purple-track span { background: linear-gradient(90deg, #7651bf, #9a78d8); }
.executive-alerts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.executive-alerts div { padding: 13px; border-radius: 9px; background: #f3f6fa; }
.executive-alerts strong, .executive-alerts span { display: block; }
.executive-alerts strong { font-size: 20px; }
.executive-alerts span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.executive-alerts .danger { background: #fff0f0; color: #a72c2c; }
.status-distribution { display: grid; gap: 3px; }
.status-distribution > div { display: grid; grid-template-columns: 12px 1fr auto; gap: 9px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.status-distribution > div:last-child { border-bottom: 0; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #98a2b3; }
.status-dot.amber { background: var(--amber); }.status-dot.purple { background: var(--purple); }.status-dot.green { background: var(--green); }.status-dot.red { background: var(--red); }
.mini-progress { width: 105px; height: 6px; margin: 0 0 4px; }
.report-sheet { width: min(1180px, 100%); margin: auto; padding: 34px 38px; background: white; box-shadow: 0 12px 38px rgba(25,45,75,.14); }
.report-print-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding-bottom: 18px; border-bottom: 3px double #183b67; }
.report-print-header h1 { margin: 0 0 5px; color: #102f55; font-size: 23px; }
.report-print-header p { margin: 3px 0; color: var(--muted); font-size: 12px; }
.report-print-meta { text-align: right; }
.report-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }
.report-summary div { padding: 12px 14px; border: 1px solid #dfe4eb; border-radius: 8px; background: #f7f9fc; }
.report-summary small, .report-summary strong { display: block; }
.report-summary small { color: var(--muted); font-size: 10px; }
.report-summary strong { margin-top: 5px; font-size: 20px; }
.report-filter-note { margin-bottom: 16px; padding: 10px 12px; border-radius: 7px; background: #eef6ff; color: #385d86; font-size: 11px; }
.report-print-table th, .report-print-table td { padding: 8px 7px; font-size: 10px; }
.report-print-table th { font-size: 9px; }
.report-signature { width: 260px; margin: 44px 0 0 auto; text-align: center; font-size: 11px; }
.report-signature strong { display: block; margin-top: 62px; padding-top: 6px; border-top: 1px solid #7c8798; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 80% 20%, #1b6fa9 0, #0b2749 45%, #07172b 100%); }
.login-shell { width: min(940px, 100%); display: grid; grid-template-columns: 1.15fr .85fr; overflow: hidden; border-radius: 22px; box-shadow: 0 30px 70px rgba(0,0,0,.28); background: white; }
.login-info { padding: 54px; color: white; background: linear-gradient(145deg, #0b2749, #126da8); position: relative; }

.login-agency { display: flex; align-items: center; gap: 16px; }
.login-logo-pair { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.login-logo-box, .login-logo-fallback { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 9px 24px rgba(0,0,0,.15); overflow: hidden; }
.login-logo-box img { display: block; max-width: 56px; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.login-logo-fallback { color: #0b2749; font-size: 18px; font-weight: 900; letter-spacing: .04em; }
.login-agency-copy { min-width: 0; }
.login-agency-copy strong, .login-agency-copy span { display: block; }
.login-agency-copy strong { font-size: 13px; letter-spacing: .06em; }
.login-agency-copy span { margin-top: 5px; color: #d7ecfb; font-size: 12px; line-height: 1.4; }
.login-mobile-agency { display: none; margin-bottom: 28px; text-align: center; }
.login-mobile-agency strong, .login-mobile-agency > span { display: block; }
.login-mobile-agency strong { margin-top: 12px; font-size: 11px; letter-spacing: .05em; color: #243651; }
.login-mobile-agency > span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.login-logo-pair.compact { justify-content: center; }
.login-logo-pair.compact .login-logo-box, .login-logo-pair.compact .login-logo-fallback { width: 58px; height: 58px; border: 1px solid var(--line); box-shadow: 0 5px 15px rgba(20,46,82,.08); }
.login-logo-pair.compact .login-logo-box img { max-width: 47px; max-height: 47px; }
.login-info h1 { font-size: 36px; line-height: 1.15; margin: 28px 0 16px; }
.login-info p { color: #d7ecfb; line-height: 1.7; }
.login-flow { margin-top: 32px; display: grid; gap: 12px; }
.login-flow span { padding: 10px 13px; border-left: 3px solid #5bd1e7; background: rgba(255,255,255,.08); font-size: 12px; }
.login-form { padding: 54px 44px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { margin: 0 0 7px; font-size: 25px; }
.login-form > p { margin: 0 0 25px; color: var(--muted); font-size: 13px; }
.login-form .btn { width: 100%; padding: 13px; }
.login-foot { margin-top: 20px; text-align: center; color: #8b95a6; font-size: 11px; }
.setup-link { display: block; margin-top: 15px; text-align: center; color: var(--blue); font-size: 12px; }
.install-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #07172b, #1169a8); }
.install-card { width: min(620px, 100%); border-radius: 20px; background: white; padding: 38px; box-shadow: 0 25px 65px rgba(0,0,0,.25); }
.install-card h1 { margin: 20px 0 8px; }
.install-card > p { color: var(--muted); line-height: 1.6; }
.install-button { width: 100%; margin-top: 12px; }
.credentials { display: grid; gap: 8px; margin: 18px 0 8px; padding: 16px; border-radius: 10px; background: #f3f6fa; font-size: 13px; }
.credentials code { color: #075c40; font-weight: 700; }
.install-help { text-align: center; margin-top: 13px; }
.users-layout { grid-template-columns: .8fr 1.2fr; }

@media (max-width: 980px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .workflow { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .location-grid { grid-template-columns: 1fr; }
    .report-filters { grid-template-columns: 1fr 1fr; }
    .leadership-stats { grid-template-columns: repeat(3, 1fr); }
    .workflow-dashboard-stats { grid-template-columns: repeat(3, 1fr); }
    .leader-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .sidebar { transform: translateX(-100%); transition: .2s; box-shadow: 14px 0 35px rgba(0,0,0,.15); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; width: 100%; }
    .menu-button { display: block; }
    .content { padding: 20px 16px 40px; }
    .topbar { padding: 16px; }
    .role-chip { display: none; }
    .stats, .grid-2, .grid-3, .filters { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-info { display: none; }
    .login-form { padding: 42px 28px; }
    .login-mobile-agency { display: block; }
    .detail-list { grid-template-columns: 1fr; }
    .detail-wide { grid-column: auto; }
    .document-panel, .action-card, .split-actions, .program-year-card, .route-card, .verifier-queue { align-items: stretch; flex-direction: column; }
    .supporting-document, .leadership-hero { align-items: stretch; flex-direction: column; }
    .document-add-form, .leadership-stats, .workflow-dashboard-stats, .executive-alerts, .verification-workflow { grid-template-columns: 1fr; }
    .report-filters { grid-template-columns: 1fr; }
    .report-filter-actions { grid-column: auto; }
    .print-page { padding: 0; }
    .beneficiary-sheet { padding: 28px 22px; min-height: auto; }
    .agreement-sheet { padding: 28px 22px; min-height: auto; }
    .signature-grid, .signature-grid.two-parties { grid-template-columns: 1fr; }
}

@media print {
    @page { size: A4; margin: 12mm; }
    @page reportLandscape { size: A4 landscape; margin: 10mm; }
    .print-page { background: white; padding: 0; }
    .print-toolbar { display: none; }
    .beneficiary-sheet { width: 100%; min-height: 0; padding: 0; box-shadow: none; }
    .agreement-sheet { width: 100%; min-height: 0; padding: 0; box-shadow: none; }
    .beneficiary-footer { position: fixed; left: 0; right: 0; bottom: 0; }
    .report-sheet { page: reportLandscape; width: 100%; padding: 0; box-shadow: none; }
    .report-print-table { page-break-inside: auto; }
    .report-print-table tr { page-break-inside: avoid; page-break-after: auto; }
    .report-print-table thead { display: table-header-group; }
}

/* v18 - Executive dashboard analytics */
.leadership-hero-v18 { align-items: center; }
.leader-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.leader-filter-panel { padding-bottom: 17px; }
.leader-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(135px, 1fr)); gap: 12px; }
.leader-filter-grid .field { margin-bottom: 0; }
.stat-link { display: block; transition: transform .15s ease, box-shadow .15s ease; }
.stat-link:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(20,46,82,.09); }
.leader-chart-grid { display: grid; gap: 22px; }
.leader-chart-grid.two-columns { grid-template-columns: 1fr 1fr; }
.chart-card { min-width: 0; }
.chart-note { margin-top: 14px; color: var(--muted); font-size: 10px; }
.funnel-bars { display: grid; gap: 12px; }
.funnel-row { display: grid; grid-template-columns: 145px 1fr 46px; gap: 12px; align-items: center; padding: 4px 0; font-size: 12px; }
.funnel-row:hover span { color: var(--blue); }
.funnel-row strong { text-align: right; font-size: 13px; }
.chart-bar-track { position: relative; height: 13px; overflow: hidden; border-radius: 99px; background: #edf1f6; }
.chart-bar-track i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, #1769d2, #18a9d5); }
.donut-layout { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: center; }
.status-donut { width: 160px; height: 160px; border-radius: 50%; display: grid; place-items: center; }
.status-donut::after { content: ""; grid-area: 1/1; width: 94px; height: 94px; border-radius: 50%; background: white; box-shadow: 0 0 0 1px #edf1f6; }
.status-donut > div { grid-area: 1/1; position: relative; z-index: 1; text-align: center; }
.status-donut strong, .status-donut span { display: block; }
.status-donut strong { font-size: 27px; }
.status-donut span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.donut-legend { display: grid; gap: 6px; }
.donut-legend a { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; padding: 5px 0; font-size: 10px; border-bottom: 1px solid #f0f2f5; }
.donut-legend a:hover { color: var(--blue); }
.donut-legend i { width: 8px; height: 8px; border-radius: 50%; }
.chart-legend-inline, .chart-key { display: flex; gap: 13px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.chart-legend-inline span::before, .chart-key span i { content: ""; display: inline-block; width: 10px; height: 3px; margin-right: 5px; border-radius: 4px; vertical-align: middle; }
.legend-blue::before, .assigned-key { background: #1769d2; }.legend-amber::before { background: #d89112; }.legend-green::before, .done-key, .realized-key { background: #159267; }.target-key { background: #b8c2d0; }
.trend-chart-wrap { width: 100%; overflow-x: auto; }
.trend-chart { width: 100%; min-width: 720px; height: 250px; overflow: visible; }
.grid-line { stroke: #e8edf4; stroke-width: 1; }
.trend-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend-line.registrations, .trend-point.registrations { stroke: #1769d2; fill: #1769d2; }
.trend-line.installations, .trend-point.installations { stroke: #d89112; fill: #d89112; }
.trend-line.actives, .trend-point.actives { stroke: #159267; fill: #159267; }
.trend-point { stroke-width: 2; cursor: pointer; }
.month-label { fill: #667085; font-size: 10px; }
.comparison-chart, .vendor-chart { display: grid; gap: 14px; }
.comparison-row { display: grid; gap: 7px; }
.comparison-label, .vendor-label { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 11px; }
.comparison-label span, .vendor-label span { color: var(--muted); font-size: 10px; }
.dual-bar { position: relative; display: block; height: 20px; border-radius: 6px; overflow: hidden; background: #edf1f6; }
.dual-bar i { position: absolute; left: 0; border-radius: 0 6px 6px 0; }
.dual-bar .target { top: 3px; height: 5px; background: #b8c2d0; }
.dual-bar .realized { bottom: 3px; height: 8px; background: #159267; }
.chart-key { margin-top: 15px; justify-content: flex-end; }
.vendor-row { display: grid; grid-template-columns: 160px 1fr 40px; gap: 12px; align-items: center; padding: 5px 0; }
.vendor-row > strong { text-align: right; font-size: 12px; }
.vendor-label { display: block; }
.vendor-label strong, .vendor-label span { display: block; }
.vendor-label span { margin-top: 3px; }
.vendor-bars { position: relative; height: 19px; border-radius: 6px; overflow: hidden; background: #edf1f6; }
.vendor-bars i { position: absolute; left: 0; }
.vendor-bars .assigned { top: 3px; height: 5px; background: #1769d2; }
.vendor-bars .done { bottom: 3px; height: 7px; background: #159267; }
.executive-alerts-vertical { grid-template-columns: 1fr; margin-top: 0; }
.executive-alerts a { display: block; padding: 13px; border-radius: 9px; background: #f3f6fa; }
.sr-list-filters { display: grid; grid-template-columns: 1.6fr repeat(6, minmax(120px, 1fr)); gap: 10px; align-items: end; margin-bottom: 14px; }
.sr-list-filters .field { margin-bottom: 0; }
.sr-list-filter-actions { grid-column: 1 / -1; }
.filter-result-note { margin-bottom: 12px; color: var(--muted); font-size: 11px; }

.report-chart-section { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 18px; }
.report-chart-card { break-inside: avoid; padding: 12px; border: 1px solid #dfe4eb; border-radius: 8px; }
.report-chart-card h3 { margin: 0 0 10px; color: #183b67; font-size: 12px; }
.report-trend-card { grid-column: 1 / -1; }
.report-bar-chart { display: grid; gap: 7px; }
.report-bar-row { display: grid; grid-template-columns: 120px 1fr 32px; gap: 7px; align-items: center; font-size: 8px; }
.report-bar-row > div, .report-dual-track { height: 8px; overflow: hidden; border-radius: 4px; background: #edf1f6; }
.report-bar-row i { display: block; height: 100%; background: #1769d2; }
.report-location-row { display: grid; grid-template-columns: 85px 1fr 52px; gap: 7px; align-items: center; font-size: 8px; }
.report-dual-track { position: relative; height: 13px; }
.report-dual-track i { position: absolute; left: 0; }
.report-dual-track .target { top: 2px; height: 4px; background: #aeb9c8; }
.report-dual-track .realized { bottom: 2px; height: 5px; background: #159267; }
.report-month-bars { height: 95px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; }
.report-month-bars > div { height: 100%; display: grid; grid-template-rows: 12px 1fr 11px; text-align: center; font-size: 7px; }
.month-column { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 65px; border-bottom: 1px solid #dfe4eb; }
.month-column i { display: block; width: 55%; min-height: 1px; background: #1769d2; }

@media (max-width: 1180px) {
    .leader-filter-grid { grid-template-columns: repeat(3, 1fr); }
    .sr-list-filters { grid-template-columns: repeat(3, 1fr); }
    .filter-search-wide { grid-column: span 2; }
}
@media (max-width: 900px) {
    .leader-chart-grid.two-columns { grid-template-columns: 1fr; }
    .donut-layout { grid-template-columns: 150px 1fr; }
}
@media (max-width: 760px) {
    .leader-filter-grid, .sr-list-filters { grid-template-columns: 1fr; }
    .filter-search-wide { grid-column: auto; }
    .donut-layout { grid-template-columns: 1fr; justify-items: center; }
    .donut-legend { width: 100%; }
    .funnel-row { grid-template-columns: 110px 1fr 38px; }
    .vendor-row { grid-template-columns: 120px 1fr 32px; }
}
@media print {
    .report-chart-section { display: grid; grid-template-columns: 1fr 1fr; }
    .report-chart-card { box-shadow: none; }
}
