/* --- TAMPILAN DASAR & VARIABEL WARNA ISLAMI --- */
:root {
    --primary-color: #0b4a2d;      /* Hijau Tua / Emerald Gelap */
    --secondary-color: #1a6f44;    /* Hijau Daun Segar */
    --accent-color: #d4af37;       /* Aksen Emas / Gold */
    --bg-color: #f4f7f6;           /* Abu-abu lembut bersih */
    --card-bg: #ffffff;            /* Putih bersih */
    --text-main: #333333;          /* Teks utama */
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
}

/* --- NAVBAR UTAMA --- */
nav {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav h2 {
    font-size: 20px;
    letter-spacing: 0.5px;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

/* --- SIDEBAR & KONTEN KUSTOM --- */
aside {
    background-color: var(--primary-color) !important;
    color: white !important;
}

aside a, aside .nav-link {
    color: #e0e0e0 !important;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

aside a:hover, aside .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

aside .nav-active {
    background-color: var(--secondary-color) !important;
    color: white !important;
    font-weight: bold;
}

/* --- KARTU (CARD) & KONTAINER --- */
.card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    border-top: 3px solid var(--secondary-color);
}

/* --- TABEL MODERN --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

th, td {
    border-bottom: 1px solid #edf2f7;
    padding: 12px 15px;
    text-align: left;
    font-size: 14px;
}

th {
    background-color: var(--secondary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: #f8fafc;
}

/* --- TOMBOL & AKSI HALAMAN --- */
.btn, button, .btn-login, .btn-page {
    padding: 9px 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary, .btn-login, .btn-success {
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
}

.btn-primary:hover, .btn-login:hover, .btn-success:hover {
    opacity: 0.9;
}

.btn-danger {
    background-color: #d9534f;
    color: white;
}

.btn-info, .btn-page {
    background-color: #5bc0de;
    color: white;
    text-decoration: none;
}

/* --- FORM, FILTER, & MENU KONTEN HALAMAN --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select, 
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius);
    font-size: 14px;
    background-color: #fff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(26, 111, 68, 0.15);
}

/* Kontainer pembungkus filter/menu di dalam halaman agar fleksibel */
.card > div, main > div {
    max-width: 100%;
}

/* --- PROGRESS BAR KLASEMEN --- */
.progress-container {
    width: 100%;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    height: 18px;
    margin-top: 8px;
    border: 1px solid #ccc;
}

.prog-koordinator {
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.prog-guru {
    background: #f0ad4e;
}

.prog-latihan {
    background: #5bc0de;
}

/* --- RESPONSIF MOBILE (FIT UKURAN LAYAR KECIL) --- */
@media screen and (max-width: 768px) {
    /* Layout utama bertumpuk vertikal */
    body > div[style*="display: flex"] {
        flex-direction: column !important;
    }

    aside {
        width: 100% !important;
    }

    /* Menu/filter di dalam halaman (seperti filter kelompok, bulan, dan tombolnya) 
       akan otomatis turun ke bawah dan menyesuaikan lebar layar secara penuh (fit) */
    .card div[style*="display: flex"], 
    .card div[style*="gap"],
    main div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    /* Elemen input dan tombol filter di dalam halaman ikut memenuhi lebar layar (fit 100%) */
    .card select, .card button, 
    main select, main button {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-top: 5px !important;
    }

    /* Tabel bisa digeser horizontal jika terlalu lebar di HP */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
}
