 :root {
     --ea-navy: #0B2A4A;
     --ea-navy-2: #083051;
     --ea-teal: #19B37A;
     --ea-bg: #F6F8FB;
     --ea-text: #0F172A;
     --ea-muted: #64748B;
     --ea-card: #FFFFFF;
 }

 body {
     background: var(--ea-bg);
     color: var(--ea-text);
 }

 .ea-accent {
     color: var(--ea-teal);
 }

 .ea-navbar {
     background: linear-gradient(90deg, var(--ea-navy), var(--ea-navy-2));
 }

 .ea-btn {
     background: var(--ea-teal);
     border-color: var(--ea-teal);
 }

 .ea-btn:hover {
     filter: brightness(.95);
 }

 .ea-card {
     background: var(--ea-card);
     border: 1px solid rgba(15, 23, 42, .06);
     border-radius: 16px;
     box-shadow: 0 10px 30px rgba(2, 8, 23, .06);
 }

 .ea-sidebar {
     background: #FFFFFF;
     border-right: 1px solid rgba(15, 23, 42, .08);
 }

 .ea-side-link {
     color: var(--ea-text);
     text-decoration: none;
     display: flex;
     gap: 10px;
     align-items: center;
     padding: 10px 12px;
     border-radius: 12px;
 }

 .ea-side-link:hover {
     background: rgba(25, 179, 122, .08);
 }

 .ea-side-link.active {
     background: rgba(11, 42, 74, .08);
     font-weight: 600;
 }

 .ea-kpi {
     font-size: 22px;
     font-weight: 800;
 }

 .ea-sub {
     color: var(--ea-muted);
     font-size: 12px;
 }

 .ea-footer {
     color: var(--ea-muted);
     font-size: 12px;
 }

 .ea-login-bg {
     min-height: 100vh;
     background:
         radial-gradient(1000px 500px at 20% 10%, rgba(25, 179, 122, .18), transparent 60%),
         radial-gradient(800px 400px at 80% 20%, rgba(11, 42, 74, .18), transparent 55%),
         var(--ea-bg);
 }

 .ea-login-card {
     border-radius: 20px;
 }

 .ea-logo-mark {
     width: 42px;
     height: 42px;
     border-radius: 14px;
     background: linear-gradient(135deg, var(--ea-navy), var(--ea-teal));
 }

 /* ===== Logo img ===== */
 .ea-logo-img {
     height: 42px;
     width: auto;
     display: block;
 }

 .ea-logo-img-lg {
     height: 56px;
 }

 /* ===== Layout sidebar (grid) ===== */
 .ea-layout {
     display: flex;
     min-height: calc(100vh - 56px);
 }

 .ea-sidebar {
     width: 260px;
     flex: 0 0 260px;
     transition: width .2s ease, flex-basis .2s ease;
 }

 .ea-main {
     flex: 1 1 auto;
     min-width: 0;
 }

 /* ===== Sidebar links ===== */
 .ea-side-link {
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .ea-ico {
     width: 22px;
     text-align: center;
     flex: 0 0 22px;
 }

 .ea-label {
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
 }

 /* ===== Collapsed mode: icon-only ===== */
 body.sidebar-collapsed .ea-sidebar {
     width: 84px;
     flex-basis: 84px;
 }

 body.sidebar-collapsed .ea-label {
     display: none;
 }

 body.sidebar-collapsed .ea-side-link {
     justify-content: center;
     padding: 10px 8px;
 }

 /* ===== Fix: menu 1 baris (no wrap) ===== */
 .ea-side-link {
     white-space: nowrap;
 }

 /* Logo khusus login */
 .ea-logo-login {
     height: 56px;
     width: auto;
     display: block;
 }

 /* ===== Dashboard filter bar: 1 baris + modern ===== */
 .ea-filterbar {
     max-width: 680px;
     /* supaya “geser kiri” (nggak makan tempat) */
     overflow-x: auto;
     /* kalau layar sempit, tetap 1 baris via scroll */
     overflow-y: hidden;
     -webkit-overflow-scrolling: touch;
     scrollbar-width: thin;
 }

 .ea-filterform {
     flex-wrap: nowrap;
     /* kunci: jangan wrap */
     white-space: nowrap;
 }


 .ea-input-w {
     width: 210px;
 }

 /* kecilin date input */
 .ea-select-w {
     width: 160px;
 }

 .ea-btn-pill {
     border-radius: 999px;
     padding-left: 14px;
     padding-right: 14px;
 }

 /* kecilin input-group-text biar modern */
 .ea-filterbar .input-group-text {
     background: rgba(15, 23, 42, .04);
     border-color: rgba(15, 23, 42, .10);
     color: var(--ea-muted);
     font-weight: 600;
 }

 /* rapihin input border */
 .ea-filterbar .form-control,
 .ea-filterbar .form-select {
     border-color: rgba(15, 23, 42, .10);
 }

 /* ===============================
   KPI CARD – MODERN LOOK
================================ */

 .ea-kpi-card {
     padding: 16px 18px;
     border-radius: 18px;
     position: relative;
     overflow: hidden;
     transition: all .25s ease;
 }

 .ea-kpi-card::after {
     content: '';
     position: absolute;
     inset: auto 0 0 0;
     height: 3px;
     background: linear-gradient(90deg, var(--ea-teal), transparent);
     opacity: .6;
 }

 .ea-kpi-card:hover {
     transform: translateY(-2px);
     box-shadow: 0 14px 32px rgba(2, 8, 23, .12);
 }

 /* Header */
 .ea-kpi-head {
     display: flex;
     align-items: center;
     gap: 8px;
     margin-bottom: 6px;
 }

 .ea-kpi-icon {
     font-size: 18px;
     line-height: 1;
 }

 .ea-kpi-label {
     font-size: 10px;
     font-weight: 500;
     letter-spacing: .3px;
     color: var(--ea-muted);
     text-transform: uppercase;
 }

 /* Value */
 .ea-kpi-value {
     font-size: 30px;
     font-weight: 700;
     line-height: 1.1;
     color: var(--ea-text);
 }

 /* Meta */
 .ea-kpi-meta {
     margin-top: 4px;
     font-size: 12px;
     color: var(--ea-muted);
 }

 /* Accent Variants */
 .ea-kpi-danger::after {
     background: linear-gradient(90deg, #ef4444, transparent);
 }

 .ea-kpi-success::after {
     background: linear-gradient(90deg, #22c55e, transparent);
 }

 .ea-kpi-info::after {
     background: linear-gradient(90deg, #38bdf8, transparent);
 }

 .ea-kpi-primary::after {
     background: linear-gradient(90deg, #6366f1, transparent);
 }

 /* ===== Toolbar: 1 baris sejajar (no wrap) ===== */
 .ea-toolbar {
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .ea-toolbar-title {
     font-weight: 800;
     white-space: nowrap;
     flex: 0 0 auto;
 }

 /* area kanan: boleh scroll horizontal, tapi tidak turun */
 .ea-toolbar-scroll {
     flex: 1 1 auto;
     min-width: 0;
     /* WAJIB agar bisa shrink */
     overflow-x: auto;
     overflow-y: hidden;
     -webkit-overflow-scrolling: touch;
     scrollbar-width: thin;
 }

 /* row kanan: paksa 1 baris */
 .ea-toolbar-row {
     display: inline-flex !important;
     /* kunci: inline-flex */
     flex-wrap: nowrap !important;
     /* kunci: no wrap */
     align-items: center;
     gap: 8px;
     white-space: nowrap;
 }

 /* pastikan tiap item tidak full width */
 .ea-toolbar-row>* {
     flex: 0 0 auto;
     width: auto;
 }

 /* search boleh melebar, tapi tetap 1 baris */
 .ea-toolbar-row .ea-search {
     flex: 1 1 320px !important;
     min-width: 260px;
 }

 /* width helper */
 .ea-w-130 {
     width: 130px !important;
 }

 .ea-w-150 {
     width: 150px !important;
 }

 .ea-w-180 {
     width: 180px !important;
 }

 /* di layar kecil, search minimum diperkecil agar tidak “maksa turun” */
 @media (max-width: 576px) {
     .ea-toolbar-row .ea-search {
         min-width: 200px;
     }
 }

 /* Stabilkan area chart supaya tidak resize tarik-ulur */
 .ea-card canvas {
     display: block;
     width: 100% !important;
     height: 100% !important;
 }

 /* =========================================================
   Dashboard Nasional – Layout khusus (min override)
========================================================= */

 /* Header + filter: 1 baris desktop, wrap di tablet */
 .ea-page-head {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 12px;
     flex-wrap: nowrap;
 }

 .ea-page-title {
     display: flex;
     flex-direction: column;
     gap: 2px;
     flex: 0 0 auto;
     min-width: 280px;
 }

 .ea-filterbar {
     flex: 1 1 auto;
     display: flex;
     justify-content: flex-end;
 }

 /* Form: paksa 1 baris + hemat tempat (kalau sempit, bar tetap 1 baris via scroll) */
 .ea-filterform {
     display: flex;
     align-items: center;
     gap: 8px;
     flex-wrap: nowrap !important;
     white-space: nowrap;
 }

 .ea-filterform .input-group,
 .ea-filterform select,
 .ea-filterform button,
 .ea-filterform a {
     flex: 0 0 auto;
     width: auto;
 }

 /* Presisi ukuran input (sesuaikan selera) */
 .ea-filterform input[type="date"] {
     width: 160px;
 }

 .ea-filterform select {
     width: 190px;
 }

 /* Tablet/mobile: boleh wrap dan full width */
 @media (max-width: 992px) {
     .ea-page-head {
         flex-wrap: wrap;
         align-items: flex-start;
     }

     .ea-page-title {
         min-width: 100%;
     }

     .ea-filterbar {
         width: 100%;
         justify-content: flex-start;
     }

     .ea-filterform {
         flex-wrap: wrap !important;
         justify-content: flex-start;
     }

     .ea-filterform input[type="date"],
     .ea-filterform select {
         width: 100%;
     }

     .ea-filterform button,
     .ea-filterform a {
         flex: 1;
     }
 }

 /* KPI GRID: 4 kolom + big card span 2 row */
 .ea-kpi-grid {
     display: grid;
     grid-template-columns: repeat(4, minmax(0, 1fr));
     gap: 12px;
     margin-top: 12px;
 }

 .ea-kpi-mini {
     min-height: 112px;
 }

 .ea-kpi-big {
     grid-column: 4 / 5;
     grid-row: 1 / span 2;
     min-height: 248px;
 }

 /* Sparkline wrap */
 .ea-spark-wrap {
     height: 72px;
     width: 100%;
     border-radius: 12px;
     background: rgba(255, 255, 255, .04);
     padding: 8px;
 }

 /* Tablet: 2 kolom, big card turun full width */
 @media (max-width:1200px) {
     .ea-kpi-grid {
         grid-template-columns: repeat(2, minmax(0, 1fr));
     }

     .ea-kpi-big {
         grid-column: 1 / -1;
         grid-row: auto;
         min-height: 220px;
     }
 }

 /* Sentiment accent border (warna dari PHP via inline style di view) */
 .ea-kpi-pos {
     border-left: 4px solid var(--ea-pos, #22c55e);
 }

 .ea-kpi-net {
     border-left: 4px solid var(--ea-net, #3b82f6);
 }

 .ea-kpi-neg {
     border-left: 4px solid var(--ea-neg, #ef4444);
 }

 /* =========================================================
   Typography – Dashboard Hierarchy
========================================================= */

 /* Brand / Page Title (Dashboard Nasional, dll) */
 .ea-brand {
     font-size: 26px;
     /* lebih besar */
     font-weight: 900;
     /* lebih tebal */
     letter-spacing: .3px;
     line-height: 1.15;
 }

 /* Section Title (judul blok / card / chart) */
 .ea-section-title {
     font-size: 16px;
     font-weight: 800;
     letter-spacing: .25px;
     color: var(--ea-text);
     line-height: 1.2;
 }

 /* Section Sub (penjelasan kecil di bawah title) */
 .ea-section-sub {
     font-size: 12px;
     font-weight: 500;
     color: var(--ea-muted);
     opacity: .9;
     line-height: 1.4;
 }

 /* Optional: spacing default kalau dipakai barengan */
 .ea-section-title+.ea-section-sub {
     margin-top: 2px;
 }
 
