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

:root {
    /* PLN Brand Colors */
    --pln-blue: #00A2E9;
    --pln-blue-dark: #0077b3;
    --pln-yellow: #FFD100;
    --pln-yellow-dark: #d4ac0d;
    
    /* Neutral Colors (Light Theme Default) */
    --bg-main: #f0f4f8;
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #cbd5e1;
    --danger: #e74c3c;
    --input-bg: #ffffff;
    --highlight-bg: #f8fafc;
    --table-striped: #f9fbfc;
    --table-hover: #f0f7fa;
    --terpakai-bg: #fff9e6;
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --bg-main: #121212;
    --bg-card: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #333333;
    --input-bg: #2c2c2c;
    --highlight-bg: #2a2a2a;
    --table-striped: #242424;
    --table-hover: #333333;
    --terpakai-bg: #3a3115;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* Font 'Inter' yang nyaman dan profesional */
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    padding-bottom: 50px; /* Diperkecil */
    line-height: 1.4; /* Diperkecil agar baris lebih rapat */
    transition: background-color 0.3s, color 0.3s;
}

/* Navbar & Tabs */
.navbar {
    background-color: var(--pln-blue);
    color: white;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}

.nav-brand { font-size: 1.25rem; font-weight: 700; padding: 10px 0; } /* Padding & font diperkecil */
.theme-btn { background: transparent; border: none; font-size: 1.1rem; cursor: pointer; color: white; transition: transform 0.2s; padding: 4px; border-radius: 50%; }
.theme-btn:hover { transform: scale(1.1); background-color: rgba(255, 255, 255, 0.2); }
.nav-menu { display: flex; gap: 5px; }
.tab-btn { background: transparent; color: white; border: none; padding: 12px 15px; font-size: 0.95rem; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.3s ease; } /* Padding diperkecil */
.tab-btn:hover { background-color: rgba(255, 255, 255, 0.1); }
.tab-btn.active { border-bottom: 3px solid var(--pln-yellow); background-color: rgba(255, 255, 255, 0.15); }

/* Container & Cards */
.container { max-width: 1200px; margin: 15px auto; padding: 0 15px; } /* Margin atas-bawah diperkecil dr 30px jd 15px */
.view-section { display: none; animation: fadeIn 0.3s ease-in-out; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.card { background: var(--bg-card); border-radius: 8px; padding: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-top: 4px solid var(--pln-blue); } /* Padding card diperkecil dr 25px jd 15px */
.section-title { color: var(--pln-blue); margin-bottom: 15px; font-size: 1.25rem; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; } /* Gap form diperkecil */
.form-group { display: flex; flex-direction: column; }
.highlight-group { background-color: var(--highlight-bg); padding: 10px; border-radius: 6px; border: 1px solid var(--border-color); }
label { font-weight: 600; margin-bottom: 4px; font-size: 0.85rem; color: var(--text-main); } /* Ukuran font label dirapikan */
input, select { padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 5px; font-size: 0.9rem; background-color: var(--input-bg); color: var(--text-main); transition: border-color 0.3s; } /* Input form lebih ramping */
input:focus, select:focus { outline: none; border-color: var(--pln-blue); box-shadow: 0 0 0 2px rgba(0, 162, 233, 0.15); }
input[readonly] { background-color: var(--highlight-bg); font-weight: 600; color: var(--pln-blue-dark); }
small { color: var(--text-muted); font-size: 0.75rem; margin-top: 3px; }

/* Buttons */
.action-buttons { display: flex; gap: 10px; margin-top: 15px; }
.btn { padding: 10px 15px; border: none; border-radius: 5px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s, transform 0.1s; flex: 1; }
.btn:active { transform: scale(0.98); }
.btn-primary { background-color: var(--pln-blue); color: white; }
.btn-primary:hover { background-color: var(--pln-blue-dark); }
.btn-secondary { background-color: #95a5a6; color: white; }
.btn-secondary:hover { background-color: #7f8c8d; }
.btn-sm { padding: 5px 10px; font-size: 0.85rem; border-radius: 4px; color: #333; border: none; cursor: pointer; font-weight: 600; }
.btn-edit { background-color: var(--pln-yellow); }
.btn-edit:hover { background-color: #e6bc00; }
.btn-delete { background-color: var(--danger); color: white; }
.btn-delete:hover { background-color: #c0392b; }

/* Filter & Summary */
.filter-section { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.filter-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--bg-main); padding: 8px 12px; border-radius: 6px; }
.filter-controls input, .filter-controls select { padding: 4px 8px; font-size: 0.85rem; }

.summary-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 20px; }
.summary-card { background: var(--highlight-bg); border: 1px solid var(--border-color); border-radius: 6px; padding: 12px; border-left: 4px solid var(--pln-blue); }
.summary-card.dark { background: #2c3e50; color: white; border-left: 4px solid var(--pln-yellow); border-color: #34495e; }
.summary-card h3 { margin-bottom: 10px; font-size: 1rem; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 6px; }
.summary-card.dark h3 { border-bottom-color: rgba(255,255,255,0.1); }
.summary-details { display: flex; flex-direction: column; gap: 6px; }
.summary-details div { display: flex; justify-content: space-between; align-items: center; font-size: 0.95rem; }

.text-blue { color: var(--pln-blue-dark); font-weight: 600;}
.text-blue-light { color: #5bc0de; font-weight: 600;}
.text-yellow { color: var(--pln-yellow-dark); font-size: 1.1rem; font-weight: 700;}

/* Table Style */
.table-title { margin-bottom: 10px; font-size: 1.15rem; color: var(--pln-blue); }
.table-responsive { overflow-x: auto; border-radius: 6px; border: 1px solid var(--border-color); }
table { width: 100%; border-collapse: collapse; min-width: 1000px; }

th, td { 
    padding: 8px 10px; /* Padding diperkecil agar baris ringkas */
    text-align: center; 
    border: 1px solid var(--border-color); 
    white-space: nowrap; 
    font-size: 0.85rem; /* Ukuran font disesuaikan agar tidak terlalu besar */
}

th { background-color: var(--pln-blue); color: white; font-weight: 600; }
tbody tr:nth-child(even) { background-color: var(--table-striped); }
tbody tr:hover { background-color: var(--table-hover); }

.actions-cell { 
    display: flex; 
    flex-direction: row; 
    gap: 6px; 
    justify-content: center; 
    align-items: center; 
}

/* Floating Footer */
.floating-footer { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #2c3e50; color: var(--pln-yellow); text-align: center; padding: 8px 15px; font-size: 0.8rem; box-shadow: 0 -2px 8px rgba(0,0,0,0.15); z-index: 1000; }

@media (max-width: 768px) {
    .nav-menu { width: 100%; display: flex; }
    .tab-btn { flex: 1; padding: 10px 5px; font-size: 0.85rem; }
    .filter-section { flex-direction: column; align-items: flex-start; }
    .filter-controls { width: 100%; flex-wrap: wrap; }
    .action-buttons { flex-direction: column; }
}
