/* ============================================================
   BPRS Dana Moneter — Dashboard Styles
   Theme: Dark Green · White · Faded Gold · Light Gray
   ============================================================ */

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

:root {
    /* ── Greens ── */
    --green-900: #0b3d2e;
    --green-800: #0f4f3a;
    --green-700: #146b4e;
    --green-600: #19875f;
    --green-500: #1da570;
    --green-400: #34c48b;
    --green-300: #6ee7b7;
    --green-200: #a7f3d0;
    --green-100: #d1fae5;
    --green-50:  #ecfdf5;

    /* ── Gold / Yellow ── */
    --gold-700: #92400e;
    --gold-600: #b45309;
    --gold-500: #d4a017;
    --gold-400: #e1b84c;
    --gold-300: #f0d078;
    --gold-200: #f7e6a8;
    --gold-100: #fef3c7;
    --gold-50:  #fffbeb;

    /* ── Neutrals ── */
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50:  #f9fafb;
    --white:    #ffffff;

    /* ── Semantic ── */
    --bg:       var(--gray-50);
    --surface:  var(--white);
    --panel:    var(--white);
    --border:   var(--gray-200);
    --border-light: var(--gray-100);
    --txt:      var(--gray-900);
    --txt-secondary: var(--gray-600);
    --txt-muted: var(--gray-400);
    --accent:   var(--green-700);
    --accent-light: var(--green-50);
    --accent-hover: var(--green-800);
    --gold:     var(--gold-500);
    --gold-light: var(--gold-50);
    --danger:   #dc2626;
    --danger-bg: #fef2f2;
    --success:  #16a34a;
    --success-bg: #f0fdf4;
    --warning:  #d97706;
    --warning-bg: #fffbeb;
    --info:     #2563eb;
    --info-bg:  #eff6ff;

    /* ── Shadows ── */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
    --shadow-xl: 0 20px 25px rgba(0,0,0,.08), 0 8px 10px rgba(0,0,0,.03);

    /* ── Radius ── */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, sans-serif;
    color: var(--txt);
    background: var(--bg);
    min-height: 100vh;
    line-height: 1.55;
    font-size: 14px;
}
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }

/* ── LAYOUT ── */
.container { width: min(1340px, calc(100% - 40px)); margin: 0 auto; }
main { padding-bottom: 60px; }

/* ── TOP BAR ── */
.topbar {
    background: var(--green-900);
    border-bottom: 3px solid var(--gold-500);
    position: sticky; top: 0; z-index: 100;
}
.topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; height: 62px; gap: 16px;
    width: min(1340px, calc(100% - 40px)); margin: 0 auto;
}
.topbar-brand {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none;
}
.topbar-brand:hover { opacity: .92; }
.brand-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    display: grid; place-items: center;
    font-weight: 800; font-size: 16px; color: var(--green-900);
    box-shadow: 0 2px 8px rgba(212,160,23,.3);
}
.brand-text h1 {
    font-size: 16px; font-weight: 800; color: var(--white);
    letter-spacing: .02em; line-height: 1.2;
}
.brand-text span {
    font-size: 11px; color: var(--gold-300); font-weight: 500;
    letter-spacing: .04em;
}
.topbar-nav {
    display: flex; gap: 4px; align-items: center;
    background: rgba(255,255,255,.08); border-radius: var(--radius);
    padding: 4px;
}
.nav-link {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px;
    color: rgba(255,255,255,.7); font-weight: 600; font-size: 13px;
    text-decoration: none; transition: all .2s;
    white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,.1); color: var(--white); }
.nav-link.active {
    background: var(--white); color: var(--green-900);
    box-shadow: var(--shadow-sm);
}
.nav-link .nav-icon { font-size: 15px; line-height: 1; }

/* ── HERO SECTION ── */
.hero-section {
    background: linear-gradient(135deg, var(--green-800) 0%, var(--green-900) 100%);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin: 20px 0 0;
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute; right: -40px; top: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(212,160,23,.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-section::after {
    content: '';
    position: absolute; left: 50%; bottom: -60px;
    width: 300px; height: 120px;
    background: radial-gradient(ellipse, rgba(255,255,255,.04) 0%, transparent 70%);
}
.hero-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(212,160,23,.2); border: 1px solid rgba(212,160,23,.3);
    color: var(--gold-300); font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: 999px;
    letter-spacing: .06em; text-transform: uppercase;
}
.hero-section h2 {
    font-size: clamp(24px, 3.5vw, 34px); font-weight: 800;
    margin: 6px 0 4px; line-height: 1.15;
}
.hero-subtitle {
    color: rgba(255,255,255,.6); font-size: 14px; font-weight: 400;
}

/* ── FLASH MESSAGES ── */
.flash {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; border-radius: var(--radius);
    margin: 16px 0; font-weight: 600; font-size: 13px;
    border-left: 4px solid;
}
.flash-success { background: var(--success-bg); border-color: var(--success); color: #15803d; }
.flash-error { background: var(--danger-bg); border-color: var(--danger); color: #b91c1c; }

/* ── PANEL ── */
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 16px 0;
    box-shadow: var(--shadow);
}
.panel-head {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 20px;
    gap: 12px; flex-wrap: wrap;
}
.panel-head h2 {
    font-size: 18px; font-weight: 800;
    color: var(--green-900); letter-spacing: -.01em;
}
.chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--accent-light); border: 1px solid var(--green-200);
    color: var(--green-700); border-radius: 999px;
    padding: 5px 14px; font-size: 12px; font-weight: 600;
    white-space: nowrap;
}
.chip-gold {
    background: var(--gold-light); border-color: var(--gold-200);
    color: var(--gold-700);
}

/* ── GRIDS ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.leading-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.upload-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

/* ── GENERIC CARD ── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: box-shadow .2s, border-color .2s;
}
.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}
.card-title {
    font-weight: 700; font-size: 13px;
    color: var(--txt); margin-bottom: 10px;
    letter-spacing: .01em;
}

/* ── UPLOAD STATUS CARDS ── */
.upload-status-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    border-left: 4px solid var(--green-500);
    transition: all .2s;
}
.upload-status-card:hover {
    border-left-color: var(--gold-500);
    box-shadow: var(--shadow-md);
}
.upload-type {
    font-weight: 700; font-size: 12px; letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--green-700); margin-bottom: 6px;
}
.upload-info { display: flex; flex-direction: column; gap: 2px; }
.upload-info span { font-size: 12px; color: var(--txt-secondary); }
.upload-period { font-weight: 600; color: var(--txt) !important; }
.upload-status-card.empty { border-left-color: var(--gray-300); opacity: .6; }
.upload-status-card.empty .upload-type { color: var(--gray-400); }

/* ── TRENDLINE ── */
.trend-card {
    display: flex; flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 160px;
}
.chart-box { position: relative; height: 200px; margin: 4px 0; }
.chart-box canvas { width: 100% !important; height: 100% !important; }
.trend-values {
    color: var(--txt-secondary); font-size: 12px;
    padding-top: 8px; border-top: 1px solid var(--border-light);
    margin-top: 8px;
}
.trend-values strong { color: var(--txt); }

/* ── PROGRESS RING ── */
.progress-card {
    display: grid; grid-template-columns: 78px 1fr;
    gap: 14px; align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.ring-wrap { display: grid; place-items: center; }
.ring {
    width: 72px; height: 72px; border-radius: 999px;
    display: grid; place-items: center;
    position: relative;
}
.ring::before {
    content: ""; width: 52px; height: 52px;
    border-radius: 999px; background: var(--white);
    position: absolute;
}
.ring span {
    position: relative; z-index: 1;
    font-weight: 800; font-size: 13px; color: var(--green-900);
}
.meta { color: var(--txt-secondary); font-size: 13px; line-height: 1.6; }

/* ── KPIs ── */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kpis div {
    background: var(--gray-50); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 10px 11px;
}
.kpis b { display: block; font-size: 11px; color: var(--txt-muted); margin-bottom: 4px; font-weight: 600; }

/* ── DATA TABLES ── */
.tables-root { display: grid; gap: 16px; }
.table-block {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden; background: var(--white);
    box-shadow: var(--shadow-sm);
}
.table-block h3 {
    margin: 0; padding: 14px 18px;
    font-size: 14px; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left; padding: 10px 14px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--txt-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
td {
    padding: 10px 14px; font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap; color: var(--txt);
}
tbody tr:hover td { background: var(--gray-50); }
tbody tr:nth-child(even) td { background: rgba(0,0,0,.01); }
tbody tr:nth-child(even):hover td { background: var(--gray-50); }
tr.total-row td { font-weight: 700; background: var(--green-50) !important; color: var(--green-900); }
tr.npf-warning td { color: var(--danger); font-weight: 600; }

/* ── Table Tones ── */
.tone-green h3 {
    background: var(--green-900); color: var(--white);
    border-bottom: 2px solid var(--gold-500);
}
.tone-green th { background: var(--green-50); color: var(--green-800); }
.tone-yellow h3 {
    background: linear-gradient(135deg, var(--gold-600), var(--gold-700));
    color: var(--white);
    border-bottom: 2px solid var(--green-700);
}
.tone-yellow th { background: var(--gold-50); color: var(--gold-700); }
.tone-default h3 {
    background: var(--gray-800); color: var(--white);
}

/* ── BADGES ── */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700;
    letter-spacing: .03em;
}
.badge-deposito    { background: #fef3c7; color: #92400e; }
.badge-laba_rugi   { background: #d1fae5; color: #065f46; }
.badge-neraca      { background: #dbeafe; color: #1e40af; }
.badge-new_booking { background: #ede9fe; color: #5b21b6; }
.badge-npf         { background: #fee2e2; color: #991b1b; }
.badge-pembiayaan  { background: #cffafe; color: #155e75; }
.badge-tabungan    { background: #dcfce7; color: #166534; }
.status {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700;
}
.status-completed  { background: #dcfce7; color: #166534; }
.status-processing { background: #fef3c7; color: #92400e; }
.status-failed     { background: #fee2e2; color: #991b1b; }

/* ── FORMS ── */
.form-grid, .settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 14px;
}
label {
    display: grid; gap: 6px;
    font-size: 12px; font-weight: 600;
    color: var(--txt-secondary);
}
input, textarea, select {
    width: 100%; border: 1px solid var(--border);
    background: var(--white); color: var(--txt);
    border-radius: var(--radius-sm); padding: 10px 12px;
    font: inherit; font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(29,165,112,.12);
}
textarea { resize: vertical; }
select { cursor: pointer; }
.full { grid-column: 1 / -1; }
.file-input {
    padding: 16px; border-style: dashed;
    border-color: var(--gray-300); cursor: pointer;
    background: var(--gray-50);
    transition: all .2s;
}
.file-input:hover { border-color: var(--green-500); background: var(--green-50); }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }

/* ── BUTTONS ── */
.btn {
    border: none; border-radius: var(--radius-sm);
    padding: 11px 24px; font-weight: 700; font-size: 13px;
    cursor: pointer; transition: all .2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
    background: var(--green-800); color: var(--white);
    box-shadow: 0 1px 3px rgba(11,61,46,.2);
}
.btn-primary:hover { background: var(--green-900); box-shadow: var(--shadow-md); }
.btn-gold {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--white); box-shadow: 0 1px 3px rgba(180,83,9,.2);
}
.btn-gold:hover { filter: brightness(1.08); }
.btn-sm {
    border: 1px solid var(--border); background: var(--white);
    color: var(--txt); border-radius: var(--radius-sm);
    padding: 5px 12px; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all .15s;
    text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.btn-sm:hover { background: var(--gray-50); border-color: var(--gray-300); box-shadow: var(--shadow-sm); }
.btn-info { border-color: var(--green-300); color: var(--green-800); }
.btn-info:hover { background: var(--green-50); border-color: var(--green-400); }
.btn-danger { border-color: #fca5a5; color: #b91c1c; background: #fff5f5; }
.btn-danger:hover { background: #fee2e2; border-color: #f87171; }
.action-cell { white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.empty-state {
    text-align: center; padding: 48px 20px;
    color: var(--txt-muted); font-size: 15px;
}

/* ── DETAIL INFO ── */
.detail-info { margin-bottom: 16px; }
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.info-grid div {
    background: var(--gray-50); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px;
}
.info-grid b { color: var(--txt-secondary); margin-right: 6px; }

/* ── GUIDE ── */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.guide-item {
    background: var(--gray-50); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px;
}
.guide-item h4 {
    margin: 0 0 8px; color: var(--green-700);
    font-size: 13px; font-weight: 700;
}
.guide-item code {
    display: block; font-size: 11px; color: var(--txt-secondary);
    word-break: break-all; line-height: 1.7;
    font-family: 'Fira Code', 'Cascadia Code', monospace;
}

/* ── SETTINGS (Redesigned) ── */
.settings-nav {
    display: flex;
    gap: 8px;
    padding: 16px 0;
    margin: 8px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 12px;
    font-weight: 600;
    color: var(--txt-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s;
    box-shadow: var(--shadow-sm);
}
.settings-nav-item:hover {
    border-color: var(--green-300);
    color: var(--green-800);
    background: var(--green-50);
    box-shadow: var(--shadow);
}
.settings-nav-item.active {
    border-color: var(--green-600);
    color: var(--green-900);
    background: var(--green-50);
    box-shadow: 0 0 0 2px rgba(29,165,112,.15);
}
.settings-nav-icon {
    font-size: 16px;
    line-height: 1;
}
.settings-nav-label {
    font-size: 12px;
}

.settings-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .3s, border-color .3s;
    scroll-margin-top: 80px;
}
.settings-section-highlight {
    box-shadow: 0 0 0 3px rgba(29,165,112,.2), var(--shadow-lg);
    border-color: var(--green-400);
}

.settings-section-header {
    background: linear-gradient(135deg, var(--green-50) 0%, #f8faf9 100%);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.settings-section-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.settings-section-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.settings-section-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--green-900);
    letter-spacing: -.01em;
    margin: 0 0 4px;
}
.settings-section-desc {
    font-size: 13px;
    color: var(--txt-secondary);
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
}
.settings-section-badge {
    flex-shrink: 0;
}
.settings-dashboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--green-200);
    color: var(--green-700);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.settings-section-body {
    padding: 20px 24px 24px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 16px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.settings-field label {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.setting-label {
    font-size: 13px;
    color: var(--txt);
    font-weight: 600;
}
.setting-key-badge {
    font-size: 10px;
    color: var(--txt-muted);
    font-weight: 500;
    font-family: 'Fira Code', 'Cascadia Code', monospace;
    background: var(--gray-100);
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.settings-input {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--txt);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
.settings-input:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(29,165,112,.12);
}

.settings-footer {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin: 0 0 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    bottom: 16px;
    z-index: 40;
}
.btn-save {
    padding: 12px 32px;
    font-size: 14px;
}
.settings-footer-hint {
    font-size: 12px;
    color: var(--txt-muted);
    font-weight: 500;
}

@media (max-width: 700px) {
    .settings-nav { gap: 6px; padding: 12px 0; }
    .settings-nav-item { padding: 8px 12px; font-size: 11px; }
    .settings-section-header { padding: 16px; flex-direction: column; }
    .settings-section-body { padding: 16px; }
    .settings-grid { grid-template-columns: 1fr; }
    .settings-footer { flex-direction: column; text-align: center; bottom: 8px; padding: 16px; }
}

/* ── PAGINATION ── */
nav[role="navigation"] { display: flex; justify-content: center; margin-top: 16px; }
nav[role="navigation"] .flex { display: flex; gap: 4px; }
nav[role="navigation"] a, nav[role="navigation"] span {
    padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--txt-secondary); font-size: 12px; font-weight: 600;
    text-decoration: none; transition: all .15s;
}
nav[role="navigation"] a:hover { background: var(--gray-50); border-color: var(--gray-300); }
nav[role="navigation"] span[aria-current] {
    background: var(--green-800); color: var(--white);
    border-color: var(--green-800);
}

/* ── FOOTER ── */
.footer {
    text-align: center; padding: 24px 0;
    color: var(--txt-muted); font-size: 12px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}
.footer strong { color: var(--green-800); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .container { width: min(1340px, calc(100% - 24px)); }
    .topbar-inner { padding: 0 12px; gap: 8px; }
    .brand-text h1 { font-size: 14px; }
    .topbar-nav { width: 100%; overflow-x: auto; }
    .nav-link { padding: 8px 10px; font-size: 12px; }
    .hero-section { padding: 20px; margin: 12px 0 0; }
    .panel { padding: 16px; }
    .panel-head { flex-direction: column; align-items: flex-start; }
    .trend-grid, .progress-grid, .leading-grid { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .chart-box { height: 180px; }
    .kpis { grid-template-columns: 1fr; }
    .form-grid, .settings-grid { grid-template-columns: 1fr; }
    .upload-status-grid { grid-template-columns: 1fr; }
}

/* ── UTILITY ── */
.text-green { color: var(--green-700); }
.text-gold { color: var(--gold-600); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-muted { color: var(--txt-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.bg-glow { display: none; }

/* ═══════════════════════════════════════════════════════
   NEW DASHBOARD — Trendline / Progress / Leading Indicator
   ═══════════════════════════════════════════════════════ */

/* ── TRENDLINE GRID ── */
.grid-trend {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.trend-card-v2 {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px 10px;
    display: flex; flex-direction: column;
}
.trend-legend {
    display: flex; gap: 14px; font-size: 11px;
    font-weight: 600; color: var(--txt-secondary);
    margin-bottom: 4px;
}
.trend-legend span { display: flex; align-items: center; gap: 5px; }
.dot {
    display: inline-block; width: 10px; height: 10px;
    border-radius: 50%;
}
.dot-0 { background: #0f4f3a; }
.dot-1 { background: #1da570; }
.dot-2 { background: #d4a017; }
.chart-box-v2 {
    position: relative; flex: 1;
    min-height: 180px; max-height: 220px;
}
.chart-box-v2 canvas { width: 100% !important; height: 100% !important; }
.trend-label {
    text-align: center; font-weight: 800; font-size: 13px;
    color: var(--gray-600); text-transform: uppercase;
    letter-spacing: .08em; padding-top: 6px;
    border-top: 1px solid var(--border-light); margin-top: 6px;
}

/* ── PROGRESS BUDGET GRID ── */
.grid-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.prog-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px 14px;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; position: relative;
}
.prog-ring-wrap {
    position: relative; width: 150px; height: 150px;
    display: flex; align-items: center; justify-content: center;
}
.prog-ring-svg {
    width: 150px; height: 150px;
    transform: scaleX(-1); /* clockwise fill */
}
.prog-ring-inner {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 20px;
}
.prog-pct-sub {
    font-size: 10px; font-weight: 700; color: var(--txt-secondary);
    text-transform: uppercase; letter-spacing: .04em;
}
.prog-pct-detail {
    font-size: 11px; font-weight: 600; color: var(--txt);
    line-height: 1.5; margin-top: 2px;
}
.prog-pct-badge {
    position: absolute; top: 50%; left: 10px;
    transform: translateY(-50%);
    color: var(--white); font-weight: 800; font-size: 20px;
    padding: 4px 10px; border-radius: var(--radius-sm);
    line-height: 1;
}
.prog-label-box {
    margin-top: 10px;
    font-weight: 800; font-size: 14px; color: var(--green-900);
    text-transform: uppercase; letter-spacing: .06em;
    border: 2px solid var(--green-900);
    border-radius: var(--radius-sm);
    padding: 3px 18px;
}

/* ── LEADING INDICATOR GRID ── */
.grid-leading {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.li-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow .2s;
}
.li-card:hover { box-shadow: var(--shadow-md); }
.li-top {
    background: linear-gradient(135deg, #f5f0e3 0%, #f9f4e8 100%);
    padding: 14px 16px 8px;
    display: flex; justify-content: space-between; align-items: flex-start;
}
.li-name {
    font-weight: 800; font-size: 13px;
    color: var(--green-900); text-transform: uppercase;
    letter-spacing: .04em;
}
.li-date {
    font-size: 10px; font-weight: 600;
    color: var(--txt-muted); white-space: nowrap;
}
.li-big {
    background: linear-gradient(135deg, #f5f0e3 0%, #f9f4e8 100%);
    padding: 2px 16px 14px;
    font-size: 28px; font-weight: 800; color: var(--green-900);
    line-height: 1.1;
}
.li-big-sub {
    font-size: 16px; font-weight: 700;
    color: var(--txt-secondary); margin-left: 8px;
}
.li-bottom {
    display: grid; grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--border);
}
.li-col {
    padding: 10px 14px;
    display: flex; flex-direction: column; gap: 2px;
}
.li-col:first-child { border-right: 1px solid var(--border); }
.li-col-date {
    font-size: 9px; font-weight: 700;
    color: var(--txt-muted); text-transform: uppercase;
    letter-spacing: .06em;
}
.li-col-val {
    font-size: 16px; font-weight: 800;
    color: var(--txt);
}
.li-col-sub {
    font-size: 12px; font-weight: 600;
    color: var(--txt-secondary);
}
.li-col-pct {
    font-size: 11px; font-weight: 700;
}
.li-col-pct.up { color: var(--success); }
.li-col-pct.down { color: var(--danger); }

/* ── RESPONSIVE OVERRIDES ── */
@media (max-width: 1000px) {
    .grid-trend, .grid-progress, .grid-leading {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 650px) {
    .grid-trend, .grid-progress, .grid-leading {
        grid-template-columns: 1fr;
    }
    .prog-pct-badge { font-size: 16px; left: 6px; }
}

/* ═══════════════════════════════════════════════════════
   NEW DASHBOARD — Tables / Portfolio / NB per AO
   ═══════════════════════════════════════════════════════ */

/* ── 2-Column Table Grid ── */
.grid-2-tables {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 900px) {
    .grid-2-tables { grid-template-columns: 1fr; }
}

/* ── Text Alignment Overrides ── */
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

/* ── Percentage Badge ── */
.pct-badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800;
    min-width: 50px;
}
.pct-good {
    background: #dcfce7; color: #166534;
}
.pct-warn {
    background: #fef3c7; color: #92400e;
}
.pct-low {
    background: #fee2e2; color: #991b1b;
}

/* ── Portfolio Badge ── */
.badge-portfolio { background: #e0e7ff; color: #3730a3; }

/* ── Table Enhancement for new sections ── */
.table-block table td strong {
    color: var(--green-900);
    font-weight: 700;
}

/* ── Region Separator in Tables ── */
tr.region-header td {
    background: var(--green-50) !important;
    font-weight: 800;
    color: var(--green-800);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 12px;
    border-top: 2px solid var(--green-200);
}

/* ── Sparkline Style for trends ── */
.trend-mini {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700;
}
.trend-mini.up { color: var(--success); }
.trend-mini.down { color: var(--danger); }

/* ── Responsive Table ── */
@media (max-width: 700px) {
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-wrap table {
        min-width: 500px;
    }
}

/* ═══════════════════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════════════════ */
.filter-bar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    margin: 16px 0 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 68px;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,.95);
}
.filter-bar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.filter-label {
    display: flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: 14px;
    color: var(--green-900);
    white-space: nowrap;
}
.filter-icon { font-size: 18px; }
.filter-form {
    display: flex; align-items: center; gap: 8px;
    flex: 1;
}
.filter-select {
    min-width: 220px;
    padding: 9px 14px;
    border: 2px solid var(--green-200);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    color: var(--green-900);
    background: var(--green-50);
    cursor: pointer;
    transition: all .2s;
}
.filter-select:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(29,165,112,.15);
    outline: none;
}
.filter-reset {
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
    background: #fff5f5 !important;
    font-weight: 700;
    white-space: nowrap;
}
.filter-reset:hover {
    background: #fee2e2 !important;
    border-color: #f87171 !important;
}
.filter-info {
    margin-left: auto;
}

@media (max-width: 700px) {
    .filter-bar { padding: 10px 14px; top: 60px; }
    .filter-bar-inner { gap: 10px; }
    .filter-select { min-width: 160px; }
    .filter-info { margin-left: 0; width: 100%; }
}
