/* ============================================================
   GKI Griya Merpati Mas - Laporan Dana Program Vs Realisasi
   Periode: April 2025 - Maret 2026
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
    background: #0f172a;
    color: #1e293b;
    line-height: 1.6;
}
a { color: #1e3a5f; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   PRESENTATION MODE (index.php)
   ============================================================ */

/* Admin Bar */
.admin-bar {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 24px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000;
    font-size: 14px;
}
.admin-actions { display: flex; gap: 10px; }
.admin-link {
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #334155;
    transition: all 0.2s;
}
.admin-link:hover { color: white; background: #334155; text-decoration: none; }
.admin-btn {
    background: #1e3a5f;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.admin-btn:hover { background: #2d5a87; }

/* Slide Navigation */
.slide-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 24px;
    display: flex; justify-content: center; align-items: center; gap: 12px;
    z-index: 1000;
}
.nav-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.nav-btn:hover { background: rgba(255,255,255,0.2); }
.slide-counter {
    font-size: 14px;
    color: #94a3b8;
    min-width: 60px;
    text-align: center;
}

/* Nav Dots */
.nav-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}
.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}
.nav-dot:hover { background: rgba(255,255,255,0.5); transform: scale(1.3); }
.nav-dot.active { background: #f0c040; transform: scale(1.4); box-shadow: 0 0 8px rgba(240,192,64,0.5); }

/* ============================================================
   PRESENTER MODE (dual-screen: popup for projector, controls on main)
   ============================================================ */
.presenter-panel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #0f172a;
    flex-direction: column;
    overflow: hidden;
}
.presenter-panel.active { display: flex; }

/* Presenter current slide info bar */
.presenter-current-info {
    padding: 12px 16px;
    background: rgba(0,0,0,0.4);
    border-bottom: 1px solid #1e293b;
}
.presenter-current-name {
    font-size: 14px;
    color: #e2e8f0;
    font-weight: 600;
    margin-top: 2px;
}
.presenter-slide-counter {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.presenter-slide-label {
    font-size: 11px;
    color: #64748b;
    padding: 8px 16px;
    background: rgba(0,0,0,0.3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Presenter sidebar - full panel in main window */
.presenter-sidebar {
    flex: 1;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Timer */
.presenter-timer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid #1e293b;
}
.presenter-timer {
    font-size: 28px;
    font-weight: 700;
    color: #f0c040;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}
.timer-controls {
    display: flex;
    gap: 6px;
}
.timer-btn {
    background: rgba(255,255,255,0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
}
.timer-btn:hover { background: rgba(255,255,255,0.2); }

/* Next Slide Preview */
.presenter-next-box {
    height: 220px;
    min-height: 200px;
    border-bottom: 1px solid #1e293b;
    overflow: hidden;
    background: white;
}
.presenter-next-slide {
    height: calc(100% - 28px);
    overflow: hidden;
    background: white;
}
.presenter-next-slide .slide {
    display: block !important;
    transform: scale(0.5);
    transform-origin: top left;
    width: 200%;
    height: 200%;
}
.presenter-next-slide .slide-cover {
    display: flex !important;
}

/* Slide List */
.presenter-notes {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.presenter-slide-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}
.slide-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 12px;
    text-align: left;
    transition: all 0.15s;
}
.slide-list-item:hover { background: rgba(255,255,255,0.06); color: white; }
.slide-list-item.active { background: rgba(240,192,64,0.15); color: #f0c040; }
.sli-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    flex-shrink: 0;
}
.slide-list-item.active .sli-num { background: #f0c040; color: #1e293b; }
.sli-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.presenter-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239,68,68,0.8);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    z-index: 2010;
    transition: background 0.2s;
}
.presenter-close:hover { background: #ef4444; }

/* Presenter button active state */
.admin-btn-presenter.active {
    background: #f0c040 !important;
    color: #1e293b !important;
}

/* Slide Container */
.slide-container {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 56px;
    overflow-y: auto;
}

/* Individual Slide */
.slide {
    display: none;
    min-height: 100%;
    background: white;
    animation: fadeIn 0.4s ease;
    position: relative;
    overflow: hidden;
}
.slide.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Slide Header */
.slide-header {
    background: linear-gradient(135deg, #1e3a5f, #1a4d7a);
    color: white;
    padding: 24px 40px;
    display: flex; justify-content: space-between; align-items: center;
}
.slide-header h1 { font-size: 24px; font-weight: 700; }
.slide-period { font-size: 14px; opacity: 0.85; background: rgba(255,255,255,0.15); padding: 6px 16px; border-radius: 20px; }

/* Slide Body */
.slide-body { padding: 30px 40px; }

/* ============================================================
   SLIDE 1: COVER
   ============================================================ */
.slide-cover {
    background: linear-gradient(135deg, #0f2b46 0%, #1a4d7a 50%, #1e3a5f 100%);
    align-items: center; justify-content: center;
    min-height: 100vh;
    color: white;
    position: relative;
    overflow: hidden;
}
.slide-cover.active { display: flex; }

.cover-bg {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-decoration {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.c1 { width: 400px; height: 400px; top: -100px; right: -80px; }
.c2 { width: 300px; height: 300px; bottom: -60px; left: -60px; }
.c3 { width: 200px; height: 200px; top: 40%; left: 10%; background: rgba(255,255,255,0.02); }

.cover-content {
    text-align: center;
    z-index: 1;
    padding: 40px;
}
.church-logo {
    margin-bottom: 24px;
}
.church-logo-img img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 8px;
}
.church-initials {
    font-size: 16px;
    letter-spacing: 8px;
    text-transform: uppercase;
    opacity: 0.7;
}
.cover-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
}
.cover-title .highlight {
    color: #f0c040;
}
.cover-divider {
    width: 80px;
    height: 3px;
    background: #f0c040;
    margin: 16px auto;
    border-radius: 2px;
}
.cover-church {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 12px;
    opacity: 0.9;
}
.cover-period {
    font-size: 16px;
    opacity: 0.75;
    margin-bottom: 8px;
}
.cover-period strong { font-weight: 700; opacity: 1; }
.cover-date { font-size: 13px; opacity: 0.5; margin-top: 20px; }

/* ============================================================
   SLIDE 2: RINGKASAN
   ============================================================ */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.summary-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
}
.summary-box:hover { transform: translateY(-2px); }
.summary-box.box-blue { background: #eff6ff; border-color: #bfdbfe; }
.summary-box.box-green { background: #f0fdf4; border-color: #bbf7d0; }
.summary-icon { font-size: 24px; margin-bottom: 8px; }
.summary-number { font-size: 22px; font-weight: 800; color: #1e293b; margin-bottom: 4px; }
.summary-label { font-size: 12px; color: #64748b; font-weight: 500; }

/* Progress Bar */
.big-progress-wrap { max-width: 700px; margin: 0 auto; }
.big-progress-bar {
    background: #e2e8f0;
    border-radius: 12px;
    height: 36px;
    overflow: hidden;
    position: relative;
}
.big-progress-fill {
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    transition: width 1s ease;
    min-width: 60px;
}
.big-progress-text {
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
    color: #94a3b8;
}

/* Bidang Tags */
.bidang-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.bidang-tag {
    background: white;
    border: 2px solid;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bidang-tag small {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* ============================================================
   SLIDE 3: LAPORAN BIDANG DAN KOMISI
   ============================================================ */
.bidang-list-table {
    font-size: 13px;
}
.bidang-list-table th {
    font-size: 11px;
    padding: 10px 12px;
}
.bidang-list-table td {
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
}
.bidang-list-table tbody tr:hover {
    background: #eff6ff;
}
.td-bidang-full {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}
.bidang-list-table tfoot td {
    font-size: 13px;
    padding: 12px;
}

/* ============================================================
   SLIDE 4: TABEL UTAMA
   ============================================================ */
.table-slide-body { padding: 16px 20px; }

/* Table viewport for 16:9 - constrain table to fit */
.table-viewport {
    max-height: calc(100vh - 180px);
    overflow: auto;
}
.table-scroll {
    overflow-x: auto;
}

.slide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 0;
}
.slide-table th {
    background: #1e3a5f;
    color: white;
    padding: 8px 5px;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid #2d5a87;
    white-space: nowrap;
}
.slide-table td {
    padding: 6px 4px;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}
.slide-table tbody tr:nth-child(even) { background: #f8fafc; }
.slide-table tbody tr:hover { background: #eff6ff; }
.slide-table tfoot td {
    background: #f1f5f9;
    font-weight: 600;
    border: 2px solid #1e3a5f;
}
.slide-total-row td { border-color: #1e3a5f !important; }

.col-no { width: 30px; text-align: center; }
.col-bidang { min-width: 110px; max-width: 180px; }
.col-dana { min-width: 85px; }
.col-bulan { min-width: 62px; text-align: right; }
.col-total { min-width: 85px; }
.col-persen { min-width: 55px; }

.td-bidang { font-weight: 600; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.td-dana { color: #475569; font-size: 11px; }
.td-total { color: #1e3a5f; font-size: 11px; }
.td-empty { background: #fafbfc !important; }
.cell-dash { color: #cbd5e1; text-align: center; }
.cell-real { font-size: 11px; }

.persen-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12px;
}
.persen-badge small {
    font-size: 0.75em;
    opacity: 0.85;
}
.persen-total { font-size: 14px; }

.text-center { text-align: center; }
.text-right { text-align: right; }

/* ============================================================
   SLIDE 4: GRAFIK PER BIDANG
   ============================================================ */
.chart-container { display: flex; flex-direction: column; gap: 14px; }
.chart-row {
    display: grid;
    grid-template-columns: 160px 1fr 70px 150px;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}
.chart-label {
    font-weight: 600;
    font-size: 13px;
    text-align: right;
    padding-right: 12px;
    white-space: nowrap;
}
.chart-bar-area { flex: 1; }
.chart-bar-wrap {
    position: relative;
    height: 32px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.chart-bar-dana-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #e2e8f0;
}
.chart-bar-label {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}
.chart-bar-realisasi {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    transition: width 1s ease;
    min-width: 0;
}
.chart-bar-realisasi .chart-bar-label { color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.chart-persen {
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}
.chart-info { display: flex; gap: 8px; align-items: center; font-size: 11px; color: #94a3b8; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.dana { background: #e2e8f0; border: 1px solid #cbd5e1; }

.chart-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}
.legend-color {
    width: 30px;
    height: 12px;
    border-radius: 4px;
}

/* ============================================================
   SLIDE 5: GRAFIK PER BULAN
   ============================================================ */
.vertical-chart { padding: 20px 0; }
.vchart-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    justify-content: center;
    height: 280px;
    padding: 0 20px;
}
.vchart-col {
    flex: 1;
    max-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.vchart-value {
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    text-align: center;
    min-height: 20px;
    white-space: nowrap;
}
.vchart-bar-wrap {
    width: 100%;
    height: 220px;
    background: #f1f5f9;
    border-radius: 6px 6px 0 0;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-bottom: none;
}
.vchart-bar {
    position: absolute;
    bottom: 0;
    left: 2px;
    right: 2px;
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
    min-height: 4px;
}
.vchart-target {
    position: absolute;
    left: 0; right: 0;
    border-top: 2px dashed #ef4444;
    z-index: 2;
}
.vchart-target-label {
    position: absolute;
    top: -16px;
    right: 0;
    font-size: 9px;
    color: #ef4444;
    font-weight: 600;
}
.vchart-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
}
.vchart-note {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 12px;
}

.status-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.status-ok { background: #22c55e; }
.status-below { background: #ef4444; }

.small-table { font-size: 12px; }
.small-table th { padding: 8px 10px; font-size: 11px; }
.small-table td { padding: 6px 10px; font-size: 12px; }

/* ============================================================
   SLIDE 6+: DETAIL PER BIDANG
   ============================================================ */
.detail-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.detail-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.detail-card.card-green { background: #f0fdf4; border-color: #bbf7d0; }
.detail-label { font-size: 12px; color: #64748b; margin-bottom: 4px; }
.detail-value { font-size: 20px; font-weight: 800; color: #1e293b; }

.mini-progress {
    width: 80px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}
.mini-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-slide {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-slide h3 { font-size: 20px; color: #64748b; margin-bottom: 8px; }

/* ============================================================
   ADMIN PAGES (bidang.php, dana_program.php, realisasi.php)
   ============================================================ */
.admin-page {
    background: #f1f5f9;
    min-height: 100vh;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #0f2b46 0%, #1a3d5c 100%);
    color: white;
    padding: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}
.logo {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    padding: 28px 0 4px;
    letter-spacing: 4px;
    color: #f0c040;
}
.church-name {
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-menu {
    list-style: none;
    padding: 16px 0;
    flex: 1;
}
.nav-menu li { margin-bottom: 2px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    text-decoration: none;
}
.nav-link.active {
    background: rgba(255,255,255,0.12);
    color: white;
    border-left-color: #f0c040;
}
.nav-link .icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer {
    padding: 16px 20px;
    font-size: 12px;
    opacity: 0.6;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    margin-left: 240px;
    flex: 1;
    padding: 24px 32px;
    min-height: 100vh;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
}
.breadcrumb {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}
.breadcrumb a { color: #3b82f6; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, #1e3a5f, #2d5a87);
    color: white;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-secondary {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.btn-secondary:hover { background: #f8fafc; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    display: inline-block;
}
.btn-edit { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.btn-edit:hover { background: #dbeafe; }
.btn-delete { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.btn-delete:hover { background: #fee2e2; }

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.card h2 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.card-desc { font-size: 13px; color: #64748b; margin-bottom: 16px; }

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Info Box */
.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #1e40af;
}

/* Form */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin-bottom: 4px;
}
.form-group label .required { color: #ef4444; }
.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-actions {
    display: flex;
    gap: 10px;
    padding-top: 8px;
}

/* Data Table */
.table-responsive { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th {
    background: #f8fafc;
    color: #475569;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.data-table tbody tr:hover { background: #f8fafc; }
.total-row td {
    background: #f8fafc;
    font-weight: 700;
    border-top: 2px solid #e2e8f0;
}
.data-table .empty {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-style: italic;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.badge-info { background: #eff6ff; color: #2563eb; }
.badge-success { background: #f0fdf4; color: #16a34a; }
.badge-warning { background: #fefce8; color: #ca8a04; }

/* Progress Bar Mini */
.progress-bar-mini {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s;
}

/* Progress Bar Large */
.progress-bar-large {
    background: #e2e8f0;
    border-radius: 10px;
    height: 28px;
    overflow: hidden;
}
.progress-fill-large {
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    transition: width 1s;
    min-width: 40px;
}
.progress-fill-large span {
    color: white;
    font-weight: 700;
    font-size: 12px;
}

/* Summary Cards (realisasi page) */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.summary-card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.summary-card .summary-label { font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.summary-card .summary-value { font-size: 18px; font-weight: 800; color: #1e293b; }
.text-primary { color: #2563eb !important; }
.text-success { color: #16a34a !important; }

/* Month Input Grid */
.month-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.month-input-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    transition: border-color 0.2s;
}
.month-input-card:focus-within { border-color: #3b82f6; }
.month-label {
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    margin-bottom: 8px;
}
.month-name {
    display: block;
    font-weight: 400;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}
.month-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.currency-prefix {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
}
.month-input-wrap input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    font-family: inherit;
}
.month-input-wrap input:focus {
    outline: none;
    border-color: #3b82f6;
}
.month-persen {
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-summary { grid-template-columns: repeat(2, 1fr); }
    .summary-cards { grid-template-columns: repeat(2, 1fr); }
    .chart-row { grid-template-columns: 120px 1fr 60px; }
    .chart-info { display: none; }
    .month-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .admin-page { flex-direction: column; }
    .sidebar { width: 100%; position: relative; }
    .main-content { margin-left: 0; padding: 16px; }
    .slide-header { padding: 16px 20px; }
    .slide-header h1 { font-size: 18px; }
    .slide-body { padding: 16px 20px; }
    .cover-title { font-size: 28px; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .month-grid { grid-template-columns: 1fr; }
    .summary-cards { grid-template-columns: 1fr 1fr; }
    .chart-row { grid-template-columns: 1fr; gap: 4px; }
    .chart-label { text-align: left; }
    .vchart-row { height: 200px; }
    .vchart-bar-wrap { height: 160px; }
    .slide-table { font-size: 10px; }
    .slide-table th, .slide-table td { padding: 4px 3px; }
}

@media print {
    html, body { margin: 0; padding: 0; background: white !important; }
    .admin-bar, .slide-nav, .presenter-panel, .no-print { display: none !important; }
    .presentation-mode { background: white !important; }

    .slide-container {
        position: static !important;
        overflow: visible !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        background: none !important;
        width: 100% !important;
        height: auto !important;
    }

    .slide {
        display: block !important;
        page-break-after: always;
        page-break-inside: avoid;
        break-after: page;
        break-inside: avoid;
        min-height: auto;
        height: auto;
        overflow: visible !important;
        position: static !important;
        animation: none !important;
        padding: 0;
        margin: 0;
    }

    /* Cover slide - full page */
    .slide-cover {
        min-height: 100vh;
        height: 100vh;
        display: flex !important;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    .cover-decoration { display: none !important; }

    /* Last slide - no page break after */
    .slide:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    /* Fix slide body overflow */
    .slide-body { padding: 10px 14px; overflow: visible !important; }
    .table-slide-body { padding: 8px 10px; }
    .table-viewport { overflow: visible !important; max-height: none !important; }
    .table-scroll { overflow: visible !important; }

    /* Compact Bidang list table for print */
    .bidang-list-table { font-size: 9px; }
    .bidang-list-table th { font-size: 8px; padding: 4px 6px; }
    .bidang-list-table td { padding: 3px 6px; font-size: 9px; }
    .bidang-list-table tfoot td { padding: 4px 6px; font-size: 9px; }
    .td-bidang-full { font-size: 9px; }

    /* Compact table for print */
    .slide-table { font-size: 8px; width: 100%; }
    .slide-table th { font-size: 7px; padding: 3px 2px; white-space: nowrap; }
    .slide-table td { padding: 2px 2px; font-size: 8px; }
    .slide-table tfoot td { padding: 3px 2px; font-size: 8px; }
    .td-bidang { max-width: 120px; font-size: 8px; }

    /* Compact headers */
    .slide-header { padding: 8px 14px; }
    .slide-header h1 { font-size: 14px; }
    .slide-period { font-size: 10px; padding: 3px 10px; }

    /* Compact summary cards */
    .summary-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .summary-box { padding: 8px; border-radius: 6px; }
    .summary-number { font-size: 14px; }
    .summary-label { font-size: 9px; }

    /* Compact chart */
    .chart-row { gap: 4px; padding: 3px 0; }
    .chart-bar-wrap { height: 22px; }
    .chart-label { font-size: 10px; }
    .chart-persen { font-size: 12px; }
    .chart-legend { gap: 10px; padding: 8px; margin-top: 10px; }

    /* Compact vertical chart */
    .vertical-chart { padding: 8px 0; }
    .vchart-row { height: 180px; }
    .vchart-bar-wrap { height: 140px; }
    .vchart-value { font-size: 7px; }
    .vchart-label { font-size: 8px; }

    /* Progress bars */
    .big-progress-bar { height: 24px; }
    .big-progress-text { font-size: 10px; }

    /* Detail cards */
    .detail-summary { gap: 8px; }
    .detail-card { padding: 8px; }
    .detail-value { font-size: 14px; }

    /* Small table */
    .small-table { font-size: 8px; }
    .small-table th { padding: 4px 6px; font-size: 7px; }
    .small-table td { padding: 3px 6px; font-size: 8px; }

    /* Persen badges */
    .persen-badge { padding: 2px 6px; font-size: 8px; }
    .mini-progress { width: 50px; height: 4px; }

    /* Bidang tags */
    .bidang-tags { gap: 4px; }
    .bidang-tag { padding: 4px 10px; font-size: 10px; }
}
