/* ======================================================= */
/* 1. GAYA UMUM & DASAR
/* ======================================================= */
body { font-family: Arial, sans-serif; margin: 0; line-height: 1.6; background-color: #f4f4f4; color: #333; }
.container { width: 80%; margin: 2rem auto; }
main { min-height: 70vh; padding: 1rem 0; }
.btn { text-decoration: none; padding: 12px 25px; border-radius: 5px; font-weight: bold; transition: all 0.3s ease; display: inline-block; }

/* ======================================================= */
/* 2. HEADER & NAVIGASI UTAMA
/* ======================================================= */
header { background: #FFFFFF; padding: 1rem 0; border-bottom: 1px solid #e0e0e0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); position: sticky; top: 0; z-index: 1000; }
.header-container { width: 85%; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; }
.logo img { margin-right: 15px; height: 50px; width: auto; }
.logo h1 { margin: 0; font-size: 1.6rem; font-weight: 700; color: #333; }
nav ul { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; }
nav ul li { margin-left: 8px; position: relative; }
nav a { color: #4A4A4A; text-decoration: none; font-size: 1rem; font-weight: 600; padding: 12px 18px; border-radius: 8px; display: block; transition: all 0.3s ease; }
nav ul li a:hover, .dropdown:hover > a { background-color: #00A79D; color: #FFFFFF; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 167, 157, 0.3); }
.login-button { background-color: #00A79D; color: #FFFFFF !important; box-shadow: 0 4px 8px rgba(0, 167, 157, 0.2); }
.login-button:hover { background-color: #00897B !important; color: #FFFFFF !important; box-shadow: 0 4px 12px rgba(0, 137, 123, 0.4); }
.dropdown-content { display: none; position: absolute; background-color: #FFFFFF; min-width: 200px; box-shadow: 0 8px 16px 0px rgba(0,0,0,0.1); z-index: 1; border-radius: 8px; margin-top: 10px; border: 1px solid #f0f0f0; overflow: hidden; }
.dropdown-content a { color: #4A4A4A; }
.dropdown-content a:hover { transform: none; box-shadow: none; }
.dropdown:hover .dropdown-content { display: block; }
.hamburger-menu { display: none; }

/* ======================================================= */
/* 3. FOOTER
/* ======================================================= */
footer { background: #333; color: #fff; padding: 2.5rem 0; }
.footer-container { width: 85%; margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-column { flex: 1; min-width: 250px; }
.footer-column h4 { margin-bottom: 1rem; color: #00A79D; border-bottom: 2px solid #555; padding-bottom: 0.5rem; display: inline-block; }
.footer-column ul { list-style: none; padding: 0; }
.footer-column ul li a { color: #ccc; text-decoration: none; line-height: 2; transition: color 0.3s; }
.footer-column ul li a:hover { color: #fff; }
.footer-column address { font-style: normal; line-height: 1.8; color: #ccc; }
.footer-column address a { color: #00A79D; text-decoration: none; }
.footer-about { color: #ccc; margin-top: 1rem; }
.copyright { text-align: center; border-top: 1px solid #555; padding-top: 1.5rem; margin-top: 1.5rem; font-size: 0.9rem; }

/* ======================================================= */
/* 4. HALAMAN BERANDA (SLIDER, PEGAWAI TERBAIK, DASBOR)
/* ======================================================= */
/* --- Slider --- */
.slider-container { position: relative; width: 100%; height: 60vh; overflow: hidden; background-color: #333; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s ease-in-out; }
.slide.active { opacity: 1; }
.slide-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); }
.slide-content { position: relative; z-index: 2; color: #fff; text-align: center; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 20px; }
.slide-content h1 { font-size: 2.8rem; margin-bottom: 0.5rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.7); }
.slide-content p { font-size: 1.2rem; margin-bottom: 1.5rem; }
.slide-buttons { display: flex; justify-content: center; gap: 1rem; }
.btn.btn-primary { background-color: #00A79D; border: 2px solid #00A79D; }
.btn.btn-primary:hover { background-color: transparent; color: #fff; }
.btn.btn-secondary { background-color: #00A79D; border: 2px solid #00A79D; }
.btn.btn-secondary:hover { background-color: transparent; color: #fff; }

/* --- Pegawai Terbaik --- */
.pegawai-terbaik-container { background: #f8f9fa; border: 1px solid #dee2e6; padding: 2rem; border-radius: 12px; text-align: center; margin-top: 2rem; }
.pegawai-terbaik-container h2 { font-size: 2rem; margin-bottom: 0.5rem; color: #343a40; }
.pegawai-terbaik-container .icon-trophy::before { content: '🏆'; margin-right: 10px; }
.semester-info { color: #6c757d; margin-bottom: 2rem; }
.winners-row { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.winner-card { background-color: #fff; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.07); width: 300px; overflow: hidden; text-align: center; transition: transform 0.3s, box-shadow 0.3s; }
.winner-card:hover { transform: translateY(-10px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.winner-card .winner-header { padding: 10px; font-weight: bold; color: #fff; }
.winner-card.guru .winner-header { background: linear-gradient(45deg, #00A79D, #007991); }
.winner-card.staf .winner-header { background: linear-gradient(45deg, #6c757d, #343a40); }
.winner-card .winner-body { padding: 1.5rem; }
.winner-card img { width: 120px; height: 120px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 10px rgba(0,0,0,0.1); margin-top: -70px; background-color: #fff; object-fit: cover; }
.winner-card h3 { margin: 1rem 0 0.5rem 0; font-size: 1.4rem; color: #343a40; }
.winner-card p { margin: 0; color: #6c757d; }
.winner-card .skor { font-weight: bold; font-size: 1.2rem; color: #00A79D; }

/* --- Dasbor Kinerja Individu --- */
.kinerja-checker { padding: 2.5rem; background-color: #fff; border-radius: 8px; margin-top: 2rem; text-align: center; border: 1px solid #e9ecef;}
.kinerja-checker h2 { margin-bottom: 0.5rem; }
.kinerja-form { margin: 2rem 0; }
.kinerja-form select { width: 100%; max-width: 400px; padding: 12px; font-size: 1rem; border: 1px solid #ccc; border-radius: 5px; }
.kinerja-result { margin-top: 1.5rem; text-align: left; background-color: #fff; padding: 2rem; border-radius: 5px; min-height: 150px; }
.kinerja-result .placeholder { color: #888; text-align: center; padding-top: 2rem; }
.kinerja-result h3 { border-bottom: 2px solid #00A79D; padding-bottom: 0.5rem; margin-top: 2rem; margin-bottom: 1.5rem; }
.chart-container { width: 100%; max-width: 500px; margin: 1rem auto; }
.chart-legend-summary { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1rem; }
.summary-item { background-color: #e9ecef; padding: 8px 15px; border-radius: 20px; display: flex; align-items: center; font-size: 0.9rem; }
.summary-label { margin-right: 8px; color: #6c757d; }
.summary-value { font-weight: bold; color: #fff; background-color: #00A79D; padding: 2px 10px; border-radius: 12px; font-size: 1rem; }
.section-divider { border: 0; height: 1px; background-color: #e9ecef; margin: 2.5rem 0; }
.activity-feed { display: flex; flex-direction: column; gap: 1rem; }
.activity-item { display: flex; gap: 1.5rem; background-color: #f8f9fa; padding: 1rem; border-radius: 8px; border: 1px solid #eee; transition: box-shadow 0.3s; }
.activity-item:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.activity-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 5px; cursor: pointer; transition: transform 0.2s; }
.activity-item img:hover { transform: scale(1.05); }
.activity-item-caption h4 { margin: 0 0 0.5rem 0; color: #495057; font-size: 0.9rem; }
.activity-item-caption p { margin: 0; font-size: 1rem; line-height: 1.5; color: #212529; }
.warning-box { background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba; border-radius: 8px; padding: 2rem; text-align: center; font-size: 1.2rem; font-weight: bold; }

/* ======================================================= */
/* 5. HALAMAN DAFTAR PEGAWAI
/* ======================================================= */
.pegawai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; margin-top: 2rem; }
.pegawai-card { background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.07); text-align: center; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column; }
.pegawai-card:hover { transform: translateY(-10px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.pegawai-card-image { width: 100%; height: 150px; background-color: #00A79D; position: relative; }
.pegawai-card-image img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%); }
.pegawai-card-content { padding: 80px 20px 30px 20px; flex-grow: 1; display: flex; flex-direction: column; }
.pegawai-card-content div:first-child { flex-grow: 1; }
.pegawai-nama { font-size: 1.3rem; color: #343a40; margin: 0 0 5px 0; }
.pegawai-jabatan { color: #6c757d; font-size: 1rem; margin: 0 0 1.5rem 0; }
.pegawai-card-actions { display: flex; justify-content: center; gap: 10px; margin-top: 1rem; }
.btn-detail, .btn-kinerja { padding: 10px 20px; border-radius: 20px; text-decoration: none; font-weight: 600; transition: all 0.3s; border: 1px solid transparent; }
.btn-detail { background: #e9ecef; color: #495057; border-color: #dee2e6; }
.btn-detail:hover { background: #dee2e6; }
.btn-kinerja { background-color: #00A79D; color: #fff; }
.btn-kinerja:hover { background-color: #00897B; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

/* ======================================================= */
/* 6. FORM (UNTUK form_pegawai & form_kinerja)
/* ======================================================= */
.form-container { background-color: #fff; padding: 2.5rem; border-radius: 12px; box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08); margin: 2rem auto; border: 1px solid #e9ecef; max-width: 800px; }
.form-container h2 .icon-form::before { content: '📋'; margin-right: 10px; }
.form-container p { text-align: center; color: #6c757d; margin-bottom: 2.5rem; }
.form-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 250px; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: #495057; font-size: 0.9rem; }
.form-group input[type="text"], .form-group input[type="date"], .form-group input[type="tel"], .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ced4da; border-radius: 8px; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: #00A79D; box-shadow: 0 0 0 3px rgba(0, 167, 157, 0.2); }
.form-group input[type="file"] { border-radius: 8px; padding: 8px; width: 100%; }
fieldset.form-group { border: 1px solid #ced4da; padding: 1.5rem; border-radius: 8px; }
fieldset.form-group legend { font-weight: 600; padding: 0 10px; }
.jabatan-wrapper { display: flex; flex-direction: column; gap: 1rem; }
.jabatan-option, .checkbox-item, .wali-option { display: flex; align-items: center; gap: 1rem; padding: 5px 0; }
.jabatan-option label, .checkbox-item label, .wali-option label { order: 1; flex-grow: 1; margin: 0; font-weight: normal; cursor: pointer; }
.jabatan-option input, .checkbox-item input, .wali-option input { order: 2; flex-shrink: 0; }
.sub-options { display: none; padding: 1.25rem; margin-top: 0.5rem; margin-left: 1.5rem; background-color: #f8f9fa; border-radius: 8px; border: 1px solid #e9ecef; }
.sub-options-title { font-weight: bold; font-size: 0.9rem; margin-bottom: 1rem; display: block; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.wali-kelas-container { display: flex; flex-direction: column; gap: 0.8rem; }
.wali-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wali-row b { margin-right: 5px; }
.btn-submit { display: block; width: 100%; padding: 15px; font-size: 1.1rem; font-weight: bold; color: #fff; background-color: #00A79D; border: none; border-radius: 8px; cursor: pointer; transition: background-color 0.3s; }
.btn-submit:hover { background-color: #00897B; }
.status-message { padding: 15px; margin-bottom: 20px; border-radius: 8px; text-align: center; font-weight: bold; }
.status-message.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-message.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ======================================================= */
/* 7. LIGHTBOX (TAMPILAN GAMBAR BESAR)
/* ======================================================= */
.lightbox { display: none; position: fixed; z-index: 9999; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); }
.lightbox-content { margin: auto; display: block; width: 80%; max-width: 700px; animation-name: zoom; animation-duration: 0.6s; }
@keyframes zoom { from {transform:scale(0)} to {transform:scale(1)} }
.lightbox-close { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; }
.lightbox-close:hover, .lightbox-close:focus { color: #bbb; }
.lightbox-caption { margin: auto; display: block; width: 80%; max-width: 700px; text-align: center; color: #ccc; padding: 10px 0; height: 150px; }

/* ======================================================= */
/* 8. ATURAN RESPONSIVE (MEDIA QUERY)
/* ======================================================= */
@media screen and (max-width: 992px) {
    .container { width: 90%; }
    .header-container { width: 90%; }
    .logo h1 { font-size: 1.2rem; }
    .hamburger-menu { display: flex; }
    #main-nav { position: fixed; top: 0; right: 0; width: 75%; max-width: 320px; height: 100vh; background-color: #ffffff; flex-direction: column; align-items: flex-start; padding: 60px 20px 20px; box-shadow: -5px 0 15px rgba(0,0,0,0.15); transform: translateX(100%); transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1); }
    #main-nav li { display: block; margin: 0; width: 100%; }
    #main-nav li a { display: flex; justify-content: space-between; align-items: center; padding: 15px 10px; border-bottom: 1px solid #f0f0f0; }
    #main-nav .dropdown > a::after { content: '\25BC'; font-size: 0.7rem; transition: transform 0.3s ease; }
    .dropdown.active > a::after { transform: rotate(180deg); }
    .dropdown .dropdown-content { position: static; box-shadow: none; border: none; background-color: #f1f8f7; padding-left: 20px; max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out; }
    .dropdown.active .dropdown-content { max-height: 500px; }
    body.nav-active #main-nav { transform: translateX(0); }
    body.nav-active .hamburger-menu .bar:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    body.nav-active .hamburger-menu .bar:nth-child(2) { opacity: 0; }
    body.nav-active .hamburger-menu .bar:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
    body.nav-active::before { content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 998; }
    .slide-content h1 { font-size: 1.8rem; }
    .slide-content p { font-size: 1rem; }
    .slide-buttons { flex-direction: column; }
    .slide-buttons .btn { margin: 5px 0; width: 80%; align-self: center; }
    .kinerja-checker { padding: 1.5rem; }
    .footer-container { flex-direction: column; text-align: center; }
    .footer-column h4 { display: block; }
    .activity-item { flex-direction: column; }
    .activity-item img { width: 100%; height: 180px; }
    .lightbox-content { width: 95%; }
    .form-row { flex-direction: column; gap: 0; }
    .form-container { padding: 1.5rem; }
    .sub-options { margin-left: 0; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .wali-row { flex-direction: column; align-items: flex-start; }
}

.form-group input[type="text"],
.form-group input[type="password"], /* <-- TAMBAHKAN BARIS INI */
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select { /* <-- Aturan ini yang dipakai */
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    /* ...gaya lainnya... */
}

/* ======================================================= */
/* CSS FINAL (REVISI) UNTUK HALAMAN LOGIN YANG MENARIK */
/* ======================================================= */

.login-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem 1rem;
    /* Latar belakang halaman dengan gradasi warna lembut */
    background: linear-gradient(135deg, #e0f7fa 0%, #f0f4f7 100%);
}

.login-form-container {
    background-color: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 16px; /* Sudut lebih tumpul */
    /* Bayangan lebih halus dan menyebar */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.5); /* Garis tepi semi-transparan */
    overflow: hidden;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* [BARU] Lingkaran untuk membungkus logo */
.login-logo-wrapper {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #00A79D, #007991); /* Gradasi warna tema */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 167, 157, 0.3);
}

.login-logo {
    width: 55px; /* Ukuran logo di dalam lingkaran */
    height: auto;
}

.login-header h2 {
    margin: 0 0 0.5rem 0;
    color: #343a40;
    font-size: 1.8rem;
}

.login-header p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

/* [BARU] Gaya input yang lebih lembut */
.login-form-body .form-group input {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
}
.login-form-body .form-group input:focus {
    background-color: #fff;
}

/* [BARU] Gaya tombol login yang lebih menarik */
.login-form-body .btn-submit {
    background: linear-gradient(135deg, #00A79D, #00897B);
    box-shadow: 0 4px 15px rgba(0, 167, 157, 0.25);
    transform: translateY(0);
}
.login-form-body .btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 167, 157, 0.35);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.login-footer a {
    color: #00A79D;
    text-decoration: none;
    font-weight: 600;
}
.login-footer a:hover {
    text-decoration: underline;
}

/* CSS untuk Riwayat Kinerja per Tanggal */
.riwayat-tanggal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.btn-tanggal {
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    background-color: #f1f1f1;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-tanggal:hover {
    border-color: #00A79D;
    color: #00A79D;
}

.btn-tanggal.active {
    background-color: #00A79D;
    color: #fff;
    border-color: #00A79D;
    box-shadow: 0 4px 8px rgba(0, 167, 157, 0.2);
    transform: translateY(-2px);
}

/* Tombol Merah untuk Tanpa Keterangan */
.btn-tanpa-keterangan {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}
.btn-tanpa-keterangan:hover {
    background-color: #f1b0b7;
    border-color: #e8a1aa;
    color: #721c24;
}
.btn-tanpa-keterangan.active {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
/* ======================================================= */
/* 9. GAYA KHUSUS DASBOR ADMIN (VERSI FINAL RESPONSIVE)
/* ======================================================= */

/* --- Tata Letak Utama Dasbor --- */
body.admin-body { background-color: #f4f7fa; }
.admin-wrapper { display: flex; }

/* --- Sidebar Menu (Tampilan Desktop) --- */
.sidebar {
    width: 260px;
    background-color: #2c3e50; /* Warna gelap yang profesional */
    color: #ecf0f1;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}
.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #34495e;
}
.sidebar-header img { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 0.5rem; object-fit: cover; background: #fff; padding: 3px; }
.sidebar-header h3 { margin: 0; font-size: 1.1rem; color: #fff; }

.sidebar-menu { list-style: none; padding: 0.5rem 0; margin: 0; flex-grow: 1; overflow-y: auto; /* [PENTING] Menambahkan scroll jika menu panjang */ }
.sidebar-menu i.icon { margin-right: 12px; font-style: normal; }
.sidebar-menu li a { display: flex; align-items: center; padding: 14px 1.5rem; color: #bdc3c7; /* Warna teks lebih lembut */ text-decoration: none; font-weight: 500; border-left: 4px solid transparent; transition: all 0.2s ease; }
.sidebar-menu li a:hover { background-color: #34495e; color: #fff; }
/* Gaya untuk link yang sedang aktif */
.sidebar-menu li a.active { background-color: #34495e; color: #fff; font-weight: 600; border-left-color: #00A79D; }
.sidebar-menu .menu-divider { padding: 1rem 1.5rem 0.5rem; font-size: 0.7rem; color: #7f8c8d; text-transform: uppercase; font-weight: bold; }

/* [BARU] Gaya untuk Dropdown Sidebar */
.sidebar-dropdown .sidebar-submenu { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-in-out; background-color: #212f3d; }
.sidebar-dropdown.active .sidebar-submenu { max-height: 500px; /* Cukup besar untuk menampung submenu */ }
.sidebar-submenu a { padding-left: 3.5rem !important; font-size: 0.9rem; border-left: 4px solid transparent !important; }
.sidebar-submenu a:hover, .sidebar-submenu a.active { background-color: #46627f; color: #fff; border-left-color: #00A79D !important; }
.sidebar-dropdown > a { justify-content: space-between; }
.sidebar-dropdown > a::after { content: '›'; font-size: 1.5rem; transition: transform 0.3s ease; }
.sidebar-dropdown.active > a::after { transform: rotate(90deg); }


/* --- Area Konten Utama --- */
.admin-content {
    margin-left: 260px; /* Seukuran lebar sidebar, ini untuk desktop */
    width: calc(100% - 260px);
    transition: margin-left 0.3s ease-in-out;
}
/* Gaya tambahan untuk halaman dasbor */
.dashboard-summary { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; }
.summary-card { background: #fff; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); flex-grow: 1; text-align: center; }
.summary-card h4 { margin: 0 0 0.5rem 0; color: #6c757d; }
.summary-number { font-size: 2.5rem; font-weight: bold; color: #00A79D; margin: 0; }

.admin-topbar { background-color: #fff; padding: 1rem 2rem; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 999; }
.admin-main-content { padding: 2rem; }
.admin-hamburger { display: none; } /* Hamburger disembunyikan di desktop */


/* --- ATURAN RESPONSIVE KHUSUS DASBOR --- */
@media screen and (max-width: 992px) {
    /* [PERBAIKAN] Aturan ini sekarang HANYA berlaku untuk layar mobile */
    .sidebar {
        transform: translateX(-100%); /* Sembunyikan sidebar di luar layar */
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    body.admin-nav-active .sidebar {
        transform: translateX(0);
    }
    .admin-content {
        margin-left: 0; /* Konten memenuhi layar */
        width: 100%;
    }
    .admin-topbar {
        justify-content: space-between;
    }
    /* Tampilkan tombol hamburger hanya di mobile */
    .admin-hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10;
        position: absolute; 
        left: 1.5rem;
    }
    .admin-hamburger .bar { display: block; width: 100%; height: 3px; background-color: var(--secondary-color); border-radius: 3px; transition: all 0.3s ease-in-out; }
    body.admin-nav-active .admin-hamburger .bar:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    body.admin-nav-active .admin-hamburger .bar:nth-child(2) { opacity: 0; }
    body.admin-nav-active .admin-hamburger .bar:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

    .topbar-welcome {
        display: none; /* Sembunyikan teks selamat datang agar muat */
    }
}/* CSS untuk Riwayat Aktivitas dengan Scroll */
.activity-feed-wrapper {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.activity-feed-container {
    max-height: 500px; /* Tinggi maksimal yang Anda minta */
    overflow-y: auto;  /* Fitur scroll akan muncul jika konten lebih tinggi dari 500px */
    padding: 1rem;
}

.loading-indicator, .end-of-results {
    text-align: center;
    padding: 1.5rem;
    color: #6c757d;
    font-style: italic;
}
/* CSS untuk Riwayat Kinerja per Tanggal */
.riwayat-tanggal-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.btn-tanggal {
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-tanggal:hover {
    border-color: #00A79D;
    color: #00A79D;
}

.btn-tanggal.active {
    background-color: #00A79D;
    color: #fff;
    border-color: #00A79D;
    box-shadow: 0 4px 8px rgba(0, 167, 157, 0.2);
    transform: translateY(-2px);
}

/* Tombol Merah untuk Tanpa Keterangan */
.btn-tanpa-keterangan {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}
.btn-tanpa-keterangan:hover {
    background-color: #f1b0b7;
    border-color: #e8a1aa;
    color: #721c24;
}
.btn-tanpa-keterangan.active {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

#detail-aktivitas-container {
    min-height: 100px;
    padding-top: 1rem;
}
/* CSS untuk Kalender Kinerja */
.kalender-kinerja-wrapper {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}
#kalender-container {
    flex-shrink: 0;
    width: 320px;
}
#detail-aktivitas-container {
    flex-grow: 1;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    max-height: 500px;
    overflow-y: auto;
}
/* Kustomisasi warna kalender agar sesuai tema */
.vanilla-calendar-day__btn_selected {
    background-color: #00A79D !important;
    color: #fff !important;
}
.vanilla-calendar-day__marker_content {
    background-color: #00A79D !important;
}
/* [BARU] Penanda untuk tanggal Tanpa Keterangan */
.vanilla-calendar-day__marker_content.marker-tk {
    background-color: #dc3545 !important;
}

/* Responsif untuk kalender */
@media screen and (max-width: 992px) {
    .kalender-kinerja-wrapper {
        flex-direction: column;
    }
    #kalender-container {
        width: 100%;
    }
}

/* CSS untuk Tabel Log Kinerja di Dasbor Admin */
.log-table-wrapper {
    margin-top: 1.5rem;
    max-height: 500px; /* Tinggi maksimal tabel yang Anda minta */
    overflow-y: auto;  /* Scrollbar vertikal akan muncul jika konten melebihi 500px */
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
}

.log-table th, .log-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.log-table thead th {
    background-color: #f8f9fa;
    position: sticky; /* Membuat header tabel tetap di atas saat di-scroll */
    top: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.log-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.log-table-img {
    max-width: 100px;
    height: auto;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.log-table-img:hover {
    transform: scale(1.1);
}

/* CSS untuk Tabel Absensi Siswa di Dasbor Admin */
.table-absen td.count-alfa {
    font-weight: bold;
    color: #dc3545; /* Merah untuk Alfa */
    text-align: center;
}

.table-absen td.count-sakit {
    font-weight: bold;
    color: #ffc107; /* Oranye untuk Sakit */
    text-align: center;
}

.table-absen td.count-izin {
    font-weight: bold;
    color: #17a2b8; /* Biru untuk Izin */
    text-align: center;
}
.info-box {
    padding: 12px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-style: italic;
    color: var(--text-light);
    min-height: 49px; /* Agar tingginya sama dengan input lain */
}

/* CSS untuk Fitur Absensi Jurnal Kelas */
.checklist-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.8rem;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
}

.absensi-container {
    padding-top: 1rem;
}

.absensi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.absensi-nama {
    font-weight: 500;
}

.absensi-pilihan {
    display: flex;
    gap: 5px;
}

.absensi-pilihan input[type="radio"] {
    display: none;
}

.absensi-pilihan label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.absensi-pilihan input[type="radio"]:checked + label {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* CSS untuk Absensi Model Tombol */
.absensi-container-tombol {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}
.absensi-item-tombol {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.absensi-item-tombol .absensi-nama {
    font-weight: 500;
}
.absensi-pilihan-tombol {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}
.btn-status {
    padding: 8px 15px;
    border: none;
    background-color: #fff;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-light);
    transition: all 0.2s ease-in-out;
    border-left: 1px solid var(--border-color);
}
.btn-status:first-child {
    border-left: none;
}
.btn-status.active {
    color: #fff;
}
/* Warna untuk setiap status */
.btn-status[data-status="Hadir"].active { background-color: var(--success-color); }
.btn-status[data-status="Sakit"].active { background-color: var(--warning-color); } /* Sakit (Kuning) */
.btn-status[data-status="Izin"].active { background-color: var(--primary-color); } /* Izin (Biru) */
.btn-status[data-status="Alfa"].active { background-color: var(--danger-color); } /* Alfa (Merah) */

/* CSS untuk Kotak Login di Beranda & Pop-up */
.login-prompt-container {
    padding: 3rem 0;
}
.login-prompt-box {
    max-width: 450px;
    margin: 0 auto;
    padding: 2.5rem;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.login-prompt-form {
    text-align: left;
}
.login-prompt-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-daftar {
    font-weight: 600;
}

/* ======================================================= */
/* 11. PENGATURAN TINGGI & SCROLL UNTUK AREA KONSELING */
/* ======================================================= */

/* Target wadah utama yang berisi daftar siswa untuk konseling */
.konseling-container {
    max-height: 500px; /* Batasi tinggi maksimal hingga 500px */
    overflow-y: auto;  /* Tampilkan scrollbar vertikal secara otomatis jika konten melebihi tinggi */
    
    /* Sedikit gaya tambahan agar terlihat rapi */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    background-color: #fdfdfd;
}

/* Pastikan ada di dalam blok: @media screen and (max-width: 992px) */


/* Saat body memiliki kelas ini, sidebar akan muncul */
body.admin-nav-active .sidebar {
    transform: translateX(0);
}



/* Menampilkan tombol hamburger HANYA di mobile */
.admin-topbar .hamburger-menu {
    display: flex; 
    z-index: 1002;
    position: absolute; /* Atur posisi agar tidak menggeser tulisan logout */
    left: 1.5rem;
}
.admin-topbar {
    justify-content: flex-end; /* Pindahkan semua item ke kanan */
    position: relative; /* Diperlukan untuk positioning tombol hamburger */
}
.topbar-welcome {
    display: none; /* Sembunyikan teks selamat datang di mobile agar tidak penuh */
}

/* Gaya untuk pilihan Izin/Sakit di form_izin.php */
.radio-group-wrapper {
    display: flex;
    gap: 1.5rem;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.radio-item-izin {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-item-izin label {
    font-weight: normal;
    margin: 0;
    cursor: pointer;
}

.radio-item-izin input[type="radio"] {
    width: auto;
}

/* ======================================================= */
/* 12. GAYA BARU UNTUK FILTER & AKSI LAPORAN           */
/* ======================================================= */

/* Mengubah .form-container yang digunakan untuk filter */
.form-container.filter-box {
    background: #f8f9fa; /* Latar belakang sedikit berbeda */
    border: 1px solid var(--border-color);
    box-shadow: none; /* Hilangkan bayangan agar lebih flat */
    margin-bottom: 1.5rem;
}

/* Mengatur tata letak filter dan tombol */
.form-inline {
    display: flex;
    align-items: flex-end; /* Membuat label dan input sejajar di bawah */
    gap: 1rem;
    flex-wrap: wrap;
}

.form-inline .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-inline button.btn-submit {
    flex-shrink: 0; /* Mencegah tombol menyusut */
    width: auto !important; /* Override lebar 100% dari .btn-submit */
    padding: 12px 25px !important;
}

/* Area untuk tombol download */
.page-actions {
    display: flex;
    justify-content: flex-end; /* Posisikan tombol ke kanan */
    margin-bottom: 1.5rem;
}

/* Tombol Tambah/Download yang sudah ada, kita percantik */
.btn-tambah {
    display: inline-block;
    background-color: #8d7473;
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.2);
    border: none;
}

.btn-tambah:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(46, 204, 113, 0.3);
}

/* Gaya untuk tombol Kembali ke Filter */
.btn-secondary {
    display: inline-block;
    background-color: #1d757d;
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* ======================================================= */
/* 13. GAYA UNTUK HALAMAN PROFIL PEGAWAI               */
/* ======================================================= */
.profile-container {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.profile-title h1 {
    font-size: 2.2rem;
    margin: 0;
    color: var(--secondary-color);
}

.profile-title p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

.profile-motto {
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
    background-color: var(--bg-light);
    border-radius: 8px;
    border-left: 5px solid var(--accent-color);
}

.profile-motto p {
    margin: 0;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-color);
}

.profile-details h3 {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.profile-details ul {
    list-style: none;
    padding: 0;
}

.profile-details li {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.profile-details li:last-child {
    border-bottom: none;
}

.profile-details li strong {
    flex-basis: 200px; /* Lebar tetap untuk label */
    flex-shrink: 0;
    color: var(--secondary-color);
}

/* Icon sederhana (bisa diganti dengan library ikon) */
.profile-details li i::before {
    margin-right: 10px;
    color: var(--accent-color);
}
.icon-map::before { content: '📍'; }
.icon-phone::before { content: '📞'; }
.icon-birthday::before { content: '🎂'; }

.profile-actions {
    text-align: right;
    margin-top: 2rem;
}

/* ======================================================= */
/* 13. DESAIN BARU UNTUK HALAMAN PROFIL PEGAWAI          */
/* ======================================================= */

.profile-container {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden; /* Penting untuk header dengan background */
}

.profile-header {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #fff;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    margin-bottom: 1.5rem;
}

.profile-title h1 {
    font-size: 2.2rem;
    margin: 0;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.profile-title p {
    font-size: 1.1rem;
    color: #ecf0f1;
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
}

.profile-body {
    padding: 2.5rem;
}

.profile-motto {
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    border-left: 5px solid var(--accent-color);
}

.profile-motto p {
    margin: 0;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-color);
}

.profile-details h3 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.profile-details ul {
    list-style: none;
    padding: 0;
}

.profile-details li {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}
.profile-details li:last-child {
    border-bottom: none;
}

.profile-details li strong {
    flex-basis: 200px;
    flex-shrink: 0;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-details li i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.profile-actions {
    text-align: right;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Penyesuaian untuk mobile */
@media screen and (max-width: 768px) {
    .profile-header {
        padding: 2rem 1rem;
    }
    .profile-image img {
        width: 120px;
        height: 120px;
    }
    .profile-title h1 {
        font-size: 1.8rem;
    }
    .profile-body {
        padding: 1.5rem;
    }
    .profile-details li {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    .profile-details li strong {
        flex-basis: auto;
    }
}

/* CSS untuk Tabel Rekap Absensi */
.absen-rekap-table {
    border: 1px solid #dee2e6;
}

.absen-rekap-table th, .absen-rekap-table td {
    white-space: nowrap; /* Mencegah teks turun baris */
}

.absen-rekap-table thead th {
    vertical-align: middle;
}

.status-hadir {
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}
.status-absen {
    color: var(--danger-color);
    font-weight: bold;
}

.keterangan-absen {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* CSS untuk daftar jabatan di halaman profil */
.profile-details ul ul {
    list-style-type: disc; /* Memberi bullet point */
    padding-left: 20px;
    margin-top: 5px;
}
.profile-details ul ul li {
    padding: 2px 0;
    border: none;
}

/* CSS untuk daftar jabatan berpoin di halaman profil */
.profile-details ul ul {
    list-style-type: disc; /* Menampilkan bullet point berupa bulatan */
    padding-left: 20px;    /* Memberi jarak ke dalam */
    margin-top: 5px;
    margin-bottom: 0;
}
.profile-details ul ul li {
    padding: 2px 0;
    border-bottom: none; /* Hapus garis bawah dari item list jabatan */
}

/* CSS untuk Halaman Manajemen Kelas */
.form-inline .form-group {
    flex-grow: 1;
}

.form-inline .form-group input[type="text"],
.form-inline .form-group select {
    min-width: 200px;
}

.form-inline button.btn-submit {
    align-self: flex-end;
    height: 49px; /* Samakan tinggi dengan input */
}

.log-table td form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.log-table td select {
    width: auto;
    flex-grow: 1;
    padding: 8px;
    font-size: 0.9rem;
}

.log-table td button {fd
    padding: 8px 15px !important; /* Override gaya umum */
    font-size: 0.9rem !important;
}

.aksi-kolom {
    white-space: nowrap;
}
/* Gaya untuk Dropdown Sidebar */
.sidebar-dropdown .sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background-color: #212f3d;
}
.sidebar-dropdown.active .sidebar-submenu {
    max-height: 500px; /* Atau tinggi lain yang cukup */
}
.sidebar-submenu a {
    padding-left: 3.5rem !important;
    font-size: 0.9rem;
}
.sidebar-dropdown > a::after {
    content: '›';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}
.sidebar-dropdown.active > a::after {
    transform: rotate(90deg);
}
.btn-kembali {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #00A79D; /* Warna utama tema (hijau toska) */
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 20px;
    text-decoration: none; /* Tambahan agar tidak ada garis bawah jika menggunakan tag <a> */
    transition: background-color 0.2s;
}

.btn-kembali:hover {
    background-color: #00897B; /* Warna yang sedikit lebih gelap saat disentuh */
}

.btn-kembali i {
    font-size: 0.8em;
}
