:root {
    --primary: #1E3A8A; /* Biru Dongker */
    --secondary: #F59E0B; /* Kuning Keemasan */
    --primary-light: #2c52c2;
    --secondary-hover: #d97706;
    --bg-color: #F3F6F9;
    --text-dark: #2D3748;
    --text-muted: #718096;
    --white: #FFFFFF;
    --border-color: #E2E8F0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

body { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    background-color: var(--bg-color); 
    margin: 0; padding: 0; 
    color: var(--text-dark); 
}

.hidden { display: none !important; }
.mt-15 { margin-top: 15px; }

/* Typografi Ekstra */
.subtitle { font-size: 13px; color: var(--text-muted); margin: 5px 0 0 0; }

/* ====== TOMBOL & EFEK ====== */
button { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    font-size: 14px; font-weight: 600;
    cursor: pointer; border-radius: 6px; 
    padding: 10px 18px; border: none; 
    transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn-primary { background-color: var(--secondary); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background-color: var(--secondary-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-secondary { background-color: var(--primary); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline { background-color: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3); color: var(--white); }
.btn-outline:hover { background-color: var(--white); color: var(--primary); transform: translateY(-2px); }
.full-width { width: 100%; }

/* ====== FORM INPUT GROUPS ====== */
.input-group {
    position: relative;
    display: flex; align-items: center;
    margin-bottom: 15px;
}
.input-group i {
    position: absolute; left: 12px; color: var(--text-muted);
}
.input-group input, .input-group select {
    width: 100%; padding: 10px 10px 10px 35px;
    border: 1px solid var(--border-color); border-radius: 6px;
    font-family: inherit; font-size: 14px;
    transition: all 0.3s;
    background-color: #f8fafc;
}
.input-group input:focus, .input-group select:focus {
    outline: none; border-color: var(--primary); background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}
.form-row { display: flex; gap: 15px; }
.form-col { flex: 1; }

/* ====== LOGIN PAGE ====== */
#login-page { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; background: linear-gradient(135deg, var(--bg-color) 0%, #e2e8f0 100%); }
.login-box { background: var(--white); padding: 40px; border-radius: 12px; box-shadow: var(--shadow-lg); text-align: center; width: 340px; }
.login-box img { width: 110px; margin-bottom: 10px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); }
.login-box h2 { color: var(--primary); margin: 0 0 5px 0; font-weight: 700; }
.login-box p { font-size: 13px; color: var(--text-muted); margin-bottom: 25px; }

/* ====== NAVBAR UTAMA ====== */
.navbar { 
    background-color: var(--primary); 
    color: var(--white); 
    padding: 0 25px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 65px; /* Tinggi pasti untuk patokan sub-navbar */
    position: sticky; 
    top: 0; 
    z-index: 100; 
    box-sizing: border-box;
    /* Bayangan dihilangkan di sini agar menyatu dengan sub-navbar */
}
.brand { font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 12px; letter-spacing: 0.5px; }
.brand img { width: 35px; }
.badge { font-size: 11px; background: var(--secondary); padding: 3px 8px; border-radius: 12px; font-weight: 600; letter-spacing: 0; }

/* ====== SUB-NAVBAR (MENU TABS) ====== */
.sub-navbar {
    background-color: var(--primary-light); /* Warna biru yang lebih muda */
    height: 50px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 65px; /* Menempel tepat di bawah navbar utama (65px) */
    z-index: 99;
    box-shadow: var(--shadow-md); /* Bayangan dipindah ke bawah sub-header */
    box-sizing: border-box;
}

/* Tabs */
.nav-menu { display: flex; gap: 5px; height: 100%; }
.tab-btn { 
    background: transparent; 
    color: #a5b4fc; 
    font-weight: 600; 
    padding: 0 20px; 
    border-radius: 0; 
    height: 100%; /* Memenuhi tinggi sub-navbar */
    border-bottom: 3px solid transparent; /* Persiapan untuk garis indikator aktif */
}
.tab-btn:hover { 
    color: var(--white); 
    background-color: rgba(255,255,255,0.1); 
    transform: none; 
}
.tab-btn.active { 
    color: var(--secondary); 
    border-bottom: 3px solid var(--secondary); 
    background-color: rgba(255,255,255,0.05); 
}

/* ====== KONTEN UTAMA ====== */
.container { max-width: 1200px; margin: 30px auto; padding: 0 20px; }
.header-action { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.header-action h3 { color: var(--primary); margin: 0; font-size: 22px; }

/* Tabel & Card Panel */
.panel-content { background: var(--white); padding: 25px; border-radius: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
.table-responsive { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border-color); }

/* HAPUS white-space: nowrap dari .data-table */
.data-table { width: 100%; border-collapse: collapse; background: var(--white); }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border-color); vertical-align: top; line-height: 1.5; }
.data-table th { background-color: #f8fafc; color: var(--primary); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.data-table td { font-size: 14px; }
.data-table tbody tr:hover { background-color: #f1f5f9; transition: 0.2s; }

/* Tambahkan class baru untuk mengunci kolom BUP dan Aksi agar tidak melipat */
.col-nowrap { white-space: nowrap; width: 1%; }

/* Tombol Aksi di Tabel */
.action-btn { padding: 6px 10px; font-size: 12px; margin-right: 5px; border-radius: 4px; box-shadow: none; }
.btn-edit { background: #e0f2fe; color: #0284c7; }
.btn-edit:hover { background: #0284c7; color: white; transform: scale(1.05); }
.btn-delete { background: #fee2e2; color: #dc2626; }
.btn-delete:hover { background: #dc2626; color: white; transform: scale(1.05); }

/* ====== MODAL FORM ====== */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: var(--white); padding: 30px; border-radius: 12px; width: 450px; box-shadow: var(--shadow-lg); animation: slideDown 0.3s ease-out; }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }
.modal-header h3 { margin: 0; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.close-btn { font-size: 24px; cursor: pointer; color: var(--text-muted); transition: 0.2s; }
.close-btn:hover { color: #dc2626; transform: rotate(90deg); }
form label { display: block; margin: 10px 0 6px; font-size: 13px; font-weight: 600; color: var(--text-dark); }

/* ====== CHART & LOADING ====== */
.chart-container { overflow-x: auto; min-height: 500px; background: #fdfdfd; padding: 20px; border-radius: 8px; border: 1px dashed #cbd5e1; }

.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.8); backdrop-filter: blur(2px); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.spinner { width: 50px; height: 50px; border: 5px solid #e2e8f0; border-top-color: var(--secondary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p { color: var(--primary); font-weight: 600; font-size: 16px; }

/* ====== LANDING PAGE PORTAL ====== */
.landing-bg {
    /* Biru pastel lembut dengan motif titik (polka) transparan */
    background-color: #e0f2fe; 
    background-image: radial-gradient(#bae6fd 2px, transparent 2px);
    background-size: 30px 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-logo { width: 150px; margin-bottom: 15px; filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1)); }
.hero-title { color: var(--primary); font-size: 42px; font-weight: 800; margin: 0 0 10px 0; letter-spacing: 1px; }
.hero-subtitle { color: var(--secondary); font-size: 20px; font-weight: 600; margin: 0 0 20px 0; }
.hero-desc { color: var(--text-dark); max-width: 700px; font-size: 15px; line-height: 1.6; font-weight: 500; background: rgba(255,255,255,0.6); padding: 15px 25px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.8); backdrop-filter: blur(4px); }

.landing-footer {
    text-align: center;
    padding: 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background-color: rgba(255,255,255,0.5);
    border-top: 1px solid rgba(255,255,255,0.8);
}

.login-modal {
    width: 350px !important; 
    padding: 35px 30px !important;
}

/* Menghapus gaya default Google Charts pada kotak */
.custom-org-node { border: none !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; }
.custom-org-node:hover { background: transparent !important; }

/* ====== PAGINATION ====== */
.pagination-controls button {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--text-dark);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
}
.pagination-controls button:hover:not(:disabled) {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}
.pagination-controls button.active {
    background-color: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}
.pagination-controls button:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    border-color: #f1f5f9;
    background-color: #f8fafc;
    box-shadow: none;
}

/* Responsif untuk Layar Kecil */
@media (max-width: 768px) {
    .header-action { flex-direction: column; align-items: flex-start; gap: 15px; }
    .form-row { flex-direction: column; gap: 0; }
    .nav-menu { display: none; /* Bisa kita ubah jadi hamburger menu jika butuh */ }
}