@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

:root{
  --navy:#122a55;
  --navy2:#213e72;
  --blue:#376fc2;
  --blue-light:#7aa9ea;
  --ice:#eaf2fd;
  --orange:#eea15d;
  --orange-light:#fbe6d3;
  --bg:#f4f7fc;
  --line:#e1e8f2;
  --muted:#667a96;
  --text:#172c4e;
  --white:#fff;
  --shadow:0 9px 28px rgba(35,62,104,.045),0 2px 6px rgba(35,62,104,.025);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-family:'Be Vietnam Pro',Arial,sans-serif;font-size:13px;-webkit-font-smoothing:antialiased}
button,select{font:inherit}
button{cursor:pointer}
.app-shell{min-height:100vh}
.header{height:76px;display:flex;justify-content:space-between;align-items:center;padding:0 max(35px,calc((100vw - 1580px)/2));background:#fff;border-bottom:1px solid #e8edf5}
.brand{display:flex;align-items:center;gap:12px}
.brand-mark{height:38px;width:38px;background:#163463;border-radius:11px;display:flex;align-items:flex-end;justify-content:center;gap:4px;padding:9px 8px}
.brand-mark span{display:block;width:5px;border-radius:2px;background:#fff}
.brand-mark span:nth-child(1){height:11px;opacity:.62}
.brand-mark span:nth-child(2){height:20px}
.brand-mark span:nth-child(3){height:15px;opacity:.84}
.brand-main{font-weight:800;color:#163665;font-size:17px;letter-spacing:-.5px;line-height:1.3}
.brand-main span{font-weight:500;color:#59718d;font-size:14px;letter-spacing:0}
.brand-sub{color:#8391a6;font-size:10.5px;margin-top:3px;letter-spacing:.02em}
.header-actions{display:flex;gap:13px;align-items:center}
.date-chip{border:1px solid #e3eaf4;border-radius:8px;background:#f8fafe;color:#647894;font-size:11px;font-weight:600;padding:10px 13px}
.dot{display:inline-block;height:6px;width:6px;background:#3c9e8f;border-radius:50%;margin-right:6px;vertical-align:2px}
.icon-button{height:35px;width:35px;display:grid;place-items:center;border:1px solid #e3eaf4;background:white;border-radius:9px;color:#516684}
.icon-button:hover{background:#edf3fc}
.icon-button svg{width:17px;height:17px}
.main{max-width:1580px;margin:auto;padding:31px 35px 22px}
.intro{display:flex;justify-content:space-between;gap:25px;align-items:flex-end}
.eyebrow{font-size:10.5px;color:#4f7ab8;letter-spacing:.19em;font-weight:800;margin:0 0 10px}
h1{font-size:25px;line-height:1.38;letter-spacing:-.75px;margin:0;font-weight:800;color:#142f5b}
.intro-sub{font-size:12px;color:#8290a4;margin:9px 0 0}
.page-indicator{font-size:15px;color:#a3afc0;font-weight:600;white-space:nowrap;line-height:1.3;padding-bottom:5px}
.page-indicator span:first-child{font-size:30px;color:#163b73;font-weight:800}
.page-divider{margin:0 7px;color:#d2dce8}
.tabs{margin:26px 0 19px;display:flex;gap:7px;border-bottom:1px solid #dce5f0}
.tab{display:flex;align-items:center;gap:10px;border:0;border-bottom:3px solid transparent;background:transparent;color:#8390a4;padding:13px 23px 15px;font-weight:700;font-size:12px;margin-bottom:-1px;transition:.16s}
.tab:hover{color:#3766ab;background:rgba(255,255,255,.5)}
.tab.active{color:#183e79;border-bottom-color:#3975ca;background:#fff;border-radius:9px 9px 0 0}
.tab-num{font-size:11px;opacity:.6}
.tab.active .tab-num{opacity:.95}
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:16px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:13px;min-height:107px;padding:18px 21px 15px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.kpi::before{content:"";position:absolute;top:0;left:0;height:3px;width:100%;background:#c7d8ef}
.kpi.featured::before{background:#356cb8}
.kpi.orange::before{background:#e9a164}
.kpi-label{color:#74849b;font-weight:600;font-size:11.1px;line-height:1.4}
.kpi-value{margin-top:9px;font-size:27px;font-weight:800;color:#153461;letter-spacing:-.8px;white-space:nowrap;line-height:1.18}
.kpi-value .unit{font-size:14px;letter-spacing:0;margin-left:3px;font-weight:700;color:#667b99}
.kpi-foot{color:#9aa7b9;font-size:10px;margin-top:5px}
.chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.chart-grid.behavior{grid-template-columns:minmax(0,1.42fr) minmax(0,1fr)}
.chart-grid .wide{grid-column:1 / -1}
.card{min-width:0;background:#fff;border:1px solid var(--line);border-radius:13px;padding:19px 21px 15px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden}
.card-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start;min-height:45px}
.card-title{font-size:13px;font-weight:800;color:#1a3969;letter-spacing:-.13px;line-height:1.48;margin:0}
.card-sub{font-size:10.2px;color:#91a0b3;margin-top:4px;line-height:1.5}
.card-body{flex:1;min-height:0;position:relative;margin-top:12px}
.card.chart-half{height:343px}
.card.chart-large{height:398px}
.card.chart-wide{height:260px}
.card.chart-heat{height:350px}
.card.chart-butterfly{height:350px}
.chart-controls{display:flex;gap:8px;align-items:center;flex-shrink:0}
.select{background:#f7f9fd;border:1px solid #e0e9f4;border-radius:7px;font-size:10px;color:#506786;font-weight:700;padding:7px 23px 7px 9px;max-width:140px}
.chart-svg{display:block;width:100%;height:100%;overflow:visible}
.axis-line{stroke:#e4eaf3;stroke-width:1}
.grid-line{stroke:#edf1f7;stroke-width:1;stroke-dasharray:3 4}
.svg-tick{fill:#9aa8bc;font-family:inherit;font-size:10.5px}
.svg-label{fill:#4e6380;font-family:inherit;font-size:11.5px;font-weight:600}
.svg-small{fill:#7d8fa7;font-family:inherit;font-size:10px;font-weight:500}
.svg-value{fill:#1e3b68;font-family:inherit;font-size:12px;font-weight:800}
.svg-value-white{fill:#fff;font-family:inherit;font-size:11.5px;font-weight:800}
.chart-legend{display:flex;gap:16px;flex-wrap:wrap;align-items:center}
.legend-item{display:inline-flex;align-items:center;gap:6px;font-size:10px;color:#8190a5;font-weight:600;white-space:nowrap}
.swatch{height:8px;width:8px;border-radius:3px;display:inline-block;flex:none}
.horizontal-bars{padding:2px 1px}
.hbar-row{display:grid;grid-template-columns:115px 1fr 83px;gap:12px;align-items:center;margin:0 0 18px}
.hbar-row:last-child{margin-bottom:0}
.hbar-label{font-size:12px;font-weight:700;color:#4d6584;white-space:nowrap}
.hbar-label small{display:block;font-size:10px;font-weight:500;color:#9aa8b8;margin-top:4px}
.hbar-track{height:16px;background:#edf3fb;border-radius:5px;overflow:hidden}
.hbar-fill{height:100%;border-radius:5px;background:linear-gradient(90deg,#326bb7,#75a6e3)}
.hbar-row:nth-child(2) .hbar-fill{background:linear-gradient(90deg,#476fba,#94b5e7)}
.hbar-row:nth-child(3) .hbar-fill{background:linear-gradient(90deg,#5f87c6,#b2c9ec)}
.hbar-row:nth-child(4) .hbar-fill,.hbar-row:nth-child(5) .hbar-fill{background:#c0d4f0}
.hbar-value{text-align:right;font-size:11.5px;font-weight:800;color:#28466f}
.hbar-value small{display:block;color:#94a3b6;font-size:10px;font-weight:600;margin-top:2px}
.donut-layout{height:100%;display:flex;justify-content:center;align-items:center;gap:20px;padding:5px}
.donut-wrap{height:205px;width:205px;flex:0 0 205px}
.donut-legend{display:flex;flex-direction:column;gap:16px;min-width:140px}
.donut-legend .item{display:grid;grid-template-columns:10px 1fr auto;gap:7px;align-items:start}
.donut-legend .item .swatch{margin-top:4px}
.donut-legend .legend-label{font-size:10.5px;color:#6c7f99;font-weight:600}
.donut-legend .legend-value{font-size:12px;color:#1f3a65;font-weight:800;text-align:right}
.donut-legend .legend-pct{display:block;color:#93a0b1;font-size:10px;font-weight:600;margin-top:3px}
.upset-scroll{height:100%;overflow-x:auto;overflow-y:hidden;scrollbar-color:#d3deec transparent;scrollbar-width:thin;padding-bottom:2px}
.upset-scroll svg{display:block;height:100%;max-width:none}
.heatmap{width:100%;border-collapse:separate;border-spacing:5px 7px;table-layout:fixed}
.heatmap th{text-align:center;font-size:10.5px;color:#6b7d96;font-weight:800;padding:3px 0 5px}
.heatmap th:first-child{text-align:left;width:41%}
.heatmap td{text-align:center;padding:9px 4px;border-radius:7px;border:1px solid rgba(30,69,121,.07);font-weight:800;color:#1e3f72;font-size:12px}
.heatmap .seg-label{background:transparent;border:none;text-align:left;font-size:10.5px;font-weight:700;color:#4a607e;white-space:normal;line-height:1.25;padding:4px 6px 4px 0}
.seg-n{display:block;font-weight:500;color:#98a6b7;font-size:9px;margin-top:4px}
.heatmap .cell-n{display:block;font-size:9px;font-weight:600;margin-top:3px;opacity:.78}
.heat-foot{display:flex;justify-content:space-between;margin:8px 8px 0;font-size:9.5px;color:#8fa0b6}
.heat-gradient{width:116px;height:8px;border-radius:9px;background:linear-gradient(90deg,#edf4fd,#c9dcf8,#8db9e8,#4e82cf,#1d4f99)}
.heat-scale{display:flex;align-items:center;gap:9px}
.bottom-line{padding:19px 4px 0;display:flex;justify-content:space-between;color:#a4afbe;font-size:10px;font-weight:600;letter-spacing:.01em}
.loading{background:white;text-align:center;padding:80px 20px;color:#677c9b;border-radius:16px;border:1px solid var(--line)}
.error{color:#a83b35}
.tooltip{z-index:50;pointer-events:none;position:fixed;max-width:245px;background:#17345b;color:#fff;padding:9px 12px;border-radius:7px;font-size:10.5px;line-height:1.5;box-shadow:0 6px 22px #1a35625c;opacity:0;transform:translateY(4px);transition:opacity .1s}
.tooltip.show{opacity:1;transform:translateY(0)}
.muted-right{font-size:10px;color:#93a2b6;font-weight:600}
.card-note{font-size:9.7px;color:#8ea0b4;margin-top:6px}
.source-dialog{border:1px solid #dce6f3;border-radius:14px;padding:25px 27px;max-width:495px;width:calc(100% - 40px);box-shadow:0 18px 70px #0b295a40;color:#435a78;line-height:1.9}
.source-dialog::backdrop{background:rgba(15,39,76,.36);backdrop-filter:blur(2px)}
.dialog-header{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:13px}
.dialog-header h2{font-size:17px;margin:0;color:#173b70}
.dialog-close{border:0;background:#eff4fb;color:#264a7a;font-size:23px;width:32px;height:32px;line-height:1;border-radius:8px}
.source-dialog p{font-size:12px;margin:0 0 11px}
@media(max-width:1050px){
  .main{padding:26px 20px}.header{padding:0 20px}
  .chart-grid,.chart-grid.behavior{grid-template-columns:1fr}
  .card.chart-half,.card.chart-large,.card.chart-heat,.card.chart-butterfly{height:360px}
  .card.chart-wide{height:270px}
  .hbar-row{grid-template-columns:130px 1fr 80px}
}
@media(max-width:660px){
  .header{height:67px}.brand-main{font-size:15px}.brand-sub{font-size:9px}
  .date-chip{display:none}.main{padding:22px 13px}
  h1{font-size:20px}.intro-sub{font-size:11px}
  .page-indicator{display:none}
  .tabs{overflow-x:auto;white-space:nowrap;margin-top:22px}
  .tab{padding:12px;font-size:10.5px}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .kpi{padding:13px;min-height:95px}.kpi-value{font-size:23px}
  .kpi-label{font-size:10px}.chart-grid{gap:12px}.card{padding:15px 12px}
  .card.chart-half,.card.chart-large,.card.chart-heat,.card.chart-butterfly{height:335px}
  .hbar-row{grid-template-columns:97px 1fr 68px;gap:7px}.hbar-label{font-size:10.5px}
  .donut-layout{gap:8px}.donut-wrap{height:168px;width:168px;flex-basis:168px}
  .donut-legend{gap:10px;min-width:102px}.donut-legend .legend-label{font-size:9px}
  .heatmap th:first-child{width:35%}.heatmap .seg-label{font-size:9px}
  .bottom-line{font-size:8px}
}
@media print{
  @page{size:16in 9in;margin:7mm}
  body{background:#fff;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .header,.tabs,.bottom-line,.icon-button,.source-dialog{display:none!important}
  .main{max-width:none;margin:0;padding:0}
  .intro{margin-bottom:9px}.eyebrow{display:none}h1{font-size:18px}
  .kpis{gap:8px;margin-bottom:8px}.kpi{min-height:74px;padding:10px;box-shadow:none}
  .kpi-value{font-size:20px;margin-top:5px}.kpi-foot{display:none}
  .chart-grid{gap:8px}.card{box-shadow:none;padding:8px 12px}
  .card.chart-half,.card.chart-large,.card.chart-heat,.card.chart-butterfly{height:235px}
  .card.chart-wide{height:180px}.card-title{font-size:10px}.card-sub{font-size:8px}
  .card-head{min-height:30px}.card-body{margin-top:6px}
  .chart-grid.behavior{grid-template-columns:1.42fr 1fr}
  .donut-wrap{width:145px;height:145px;flex-basis:145px}
}
