/* ==========================================================================
   SISFO GRITUKA - MASTER STYLESHEET (FULL CONSOLIDATED & STANDARDIZED)
   ========================================================================== */

/* --- 1. TEMA WARNA TERANG (LIGHT MODE) --- */
:root {
    --primary: #008dcb;
    --primary-dark: #006b9e;
    --bg-color: #f4f7fb; 
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-shadow: 0 4px 15px rgba(0,0,0,0.03);
    --header-bg: rgba(255,255,255,0.9);
    --border-color: #e2e8f0;
    --input-bg: #ffffff;
    
    --table-head: #f8fafc;
    --table-hover: #f1f5f9;
    
    --insight-bg: #f8fafc;
    --insight-border: #e2e8f0;
    
    --item-bg: #f8fafc;
    --item-hover: #f1f5f9;
    --item-inactive: #e2e8f0;
    --action-bg: #f1f5f9;

    --info-box-bg: #e8f4fd;
    --info-box-text: #004085;
    --info-box-border: #b8daff;
}

/* --- 2. TEMA WARNA GELAP (DARK MODE) --- */
html.dark-theme {
    --primary: #0ea5e9; 
    --primary-dark: #0284c7;
    --bg-color: #0f172a; 
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-shadow: 0 8px 30px rgba(0,0,0,0.4);
    --header-bg: rgba(30, 41, 59, 0.9);
    --border-color: #334155;
    --input-bg: #0f172a;
    
    --table-head: #0f172a;
    --table-hover: #0f172a;
    
    --insight-bg: #0f172a;
    --insight-border: #334155;
    
    --item-bg: #334155;
    --item-hover: #475569;
    --item-inactive: #1e293b;
    --action-bg: #0f172a;

    --info-box-bg: rgba(14, 165, 233, 0.15);
    --info-box-text: #3b82f6;
    --info-box-border: rgba(59, 130, 246, 0.2);
}

/* --- 3. GLOBAL & RESET --- */
*, *::before, *::after { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent !important;
}

html, body, .card, header, input, select, textarea, .bottom-nav, .side-menu, 
.card-header-title, .custom-table th, .custom-table td, .stat-card, .insight-box, 
.student-profile, .item-wrapper > a, .accordion, .action-box, .file-drop-area, 
.shortcut-card, .button-item, .profil-card, .search-box, .jarak-info-box,
.distance-info, .distance-loading {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
    margin: 0; padding: 0; width: 100%; min-height: 100vh; overflow-x: hidden;
    background-color: var(--bg-color); color: var(--text-main); 
    font-family: 'Inter', sans-serif;
}

/* --- 4. BACKGROUND DASHBOARD MINIMALIS ELEGAN --- */
body.dashboard-body {
    /* Gradien biru-abu muda yang tenang untuk Light Mode */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    z-index: 0;
}

html.dark-theme body.dashboard-body {
    /* Gradien dongker elegan untuk Dark Mode */
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Pola tekstur titik (dot) modern statis */
body.dashboard-body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(var(--text-muted) 1px, transparent 1px);
    background-size: 25px 25px;
    opacity: 0.08; /* Sangat transparan agar tidak mendominasi layar */
    z-index: -1;
    pointer-events: none;
}
/* --- 5. LAYOUT & CONTAINER --- */
.container { 
    width: 90%; max-width: 800px; margin: 70px auto 120px auto; 
}
.container-wide { 
    max-width: 1200px; 
}

/* --- 6. HEADER FIX ATAS --- */
header {
    background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color);
    position: fixed; top: 0; left: 0; width: 100%; height: 60px; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between; padding: 0 2.5%;
}
.header-content { 
    width: 100%; max-width: 800px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; 
}
.header-left { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--primary); }
.header-right { display: flex; align-items: center; gap: 12px; }

.dark-mode-toggle, .menu-toggle {
    background: transparent; border: none; cursor: pointer; color: var(--text-main); font-size: 20px;
    padding: 5px; transition: transform 0.2s; display: flex; align-items: center; justify-content: center;
}
.dark-mode-toggle:active, .menu-toggle:active { transform: scale(0.9); }

/* --- 6.1 LOKASI / INDIKATOR JARAK GPS --- */
.distance-info, .distance-loading {
    display: flex; align-items: center; gap: 6px;
    background: var(--card-bg); border: 1px solid var(--border-color);
    padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 600;
    box-shadow: var(--card-shadow); color: var(--text-muted);
}

/* --- 7. NAVIGASI BAWAH (BOTTOM NAV) & SIDE MENU --- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; width: 100%;
    background: var(--card-bg); display: flex; justify-content: space-evenly; align-items: center;
    padding: 10px 0 15px 0; box-shadow: 0 -5px 20px rgba(0,0,0,0.05); border-radius: 24px 24px 0 0; z-index: 1000;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; text-decoration: none;
    color: var(--text-muted); font-size: 10px; font-weight: 600; width: 20%; text-align: center;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.nav-item i { font-size: 22px; margin-bottom: 6px; }
.nav-item:hover, .nav-item.active { color: var(--primary); }

.fab-center {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important; width: 64px; height: 64px; border-radius: 50%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    margin-top: -45px; box-shadow: 0 6px 15px rgba(0, 141, 203, 0.35); border: 6px solid var(--bg-color);
    transition: transform 0.2s;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.fab-center:active { transform: scale(0.95); }
.fab-center i { font-size: 22px; margin-bottom: 0; }
.fab-center span { font-size: 9px; margin-top: 4px; font-weight: 700; }

.side-menu {
    position: fixed; top: 0; right: 0; width: 260px; height: 100%;
    background-color: var(--card-bg); box-shadow: -5px 0 25px rgba(0,0,0,0.2);
    transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto; z-index: 99999;
    border-radius: 20px 0 0 20px;
}
.side-menu.active { transform: translateX(0); }
.side-menu-header { padding: 30px 20px 15px; border-bottom: 1px solid var(--border-color); text-align: center;}
.side-menu-header img { width: 90px; }
html.dark-theme .side-menu-header img { filter: drop-shadow(0 0 5px rgba(255,255,255,0.2)); }
.side-menu ul { list-style: none; padding: 15px; margin: 0; }
.side-menu ul li a { text-decoration: none; color: var(--text-main); font-size: 14px; font-weight: 500; display: flex; align-items: center; padding: 12px 15px; border-radius: 10px; margin-bottom:5px; }
.side-menu ul li a i { width: 25px; color: var(--primary); font-size: 16px; }
.side-menu ul li a:hover { background: var(--bg-color); color: var(--primary); }

/* --- 8. KARTU (CARDS) --- */
.card { 
    background: var(--card-bg); border-radius: 20px; padding: 25px 20px; 
    box-shadow: var(--card-shadow); border: 1px solid var(--border-color); margin-bottom: 25px; 
}
.card-header-title {
    background: linear-gradient(135deg, var(--card-bg), var(--bg-color));
    color: var(--text-main); padding: 12px 20px; border-radius: 16px; font-size: 14px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02); border: 1px solid var(--border-color); position: relative; overflow: hidden;
}
.card-header-title::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
}

/* --- 9. FORM, INPUT & SEARCH BOX --- */
.form-group { margin-bottom: 18px; }
.form-group label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }

input[type="text"], input[type="url"], input[type="number"], input[type="date"], input[type="datetime-local"], textarea, select {
    width: 100%; padding: 14px 15px; border: 1px solid var(--border-color); border-radius: 12px;
    background: var(--input-bg); color: var(--text-main); font-family: 'Inter', sans-serif;
    font-size: 14px; outline: none; transition: 0.3s;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 141, 203, 0.1); }
textarea { resize: vertical; min-height: 100px; }

.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 15px; }

/* PERBAIKAN KOTAK PENCARIAN DASHBOARD agar presisi di tengah */
.search-container { 
    position: relative; 
    margin-bottom: 20px; 
    width: 100%;
}

/* Menggunakan selector yang lebih kuat dan !important agar padding kiri 45px tidak ditimpa */
input[type="text"].search-box {
    width: 100%; 
    padding: 14px 40px 14px 45px !important; 
    border-radius: 20px; 
    border: 1px solid var(--border-color);
    background: var(--card-bg); 
    color: var(--text-main); 
    font-size: 14px; 
    outline: none; 
    box-shadow: var(--card-shadow); 
    font-family: 'Inter', sans-serif;
    display: block;
}

/* Posisi Icon Kaca Pembesar */
.search-icon { 
    position: absolute; 
    left: 18px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--text-muted);
    z-index: 2;
    pointer-events: none;
}

/* Posisi Tombol Silang Hapus Pencarian */
.clear-search { 
    position: absolute; 
    right: 18px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--text-muted); 
    cursor: pointer; 
    display: none; 
    z-index: 2;
}

/* --- 10. TOMBOL (BUTTONS) --- */
.btn-submit, .btn-filter, .btn-export-excel, .btn-upload, .btn-back, .btn-tambah {
    padding: 14px; border: none; border-radius: 12px; font-size: 14px; font-weight: 700;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s;
    text-decoration: none; color: white; width: 100%;
}
.btn-submit { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }
.btn-filter, .btn-upload { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 4px 12px rgba(0, 141, 203, 0.2); }
.btn-export-excel { background: linear-gradient(135deg, #217346, #1e6c41); box-shadow: 0 4px 12px rgba(33, 115, 70, 0.2); }
.btn-back { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.btn-tambah { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2); width: auto; padding: 10px 20px;}
.btn-submit:hover:not(:disabled), .btn-filter:hover, .btn-export-excel:hover, .btn-upload:hover, .btn-back:hover, .btn-tambah:hover { transform: translateY(-2px); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* --- 11. TABEL (TABLES) & REKAP CBT --- */
.table-responsive { width: 100%; overflow-x: auto; border-radius: 12px; border: 1px solid var(--border-color); }
.custom-table { width: 100%; border-collapse: collapse; text-align: left; }
.custom-table th {
    background-color: var(--table-head); color: var(--text-muted); padding: 14px 15px;
    font-size: 12px; font-weight: 700; text-transform: uppercase; border-bottom: 2px solid var(--border-color);
    white-space: nowrap; text-align: center;
}
.custom-table td { padding: 12px 15px; border-bottom: 1px solid var(--border-color); color: var(--text-main); font-size: 13px; vertical-align: middle; }
.custom-table tbody tr:hover td { background-color: var(--table-hover); }

.score-cell { text-align: center; font-weight: 700; font-family: monospace; font-size: 14px; }
.score-below-kkm { color: #ef4444; }
.score-above-kkm { color: #10b981; }
.score-na { color: var(--text-muted); font-style: italic; }
.kkm-row { background-color: var(--insight-bg); font-weight: 700; color: var(--text-main); }
.kkm-row td { border-top: 2px solid var(--border-color); }
.ujian-header { background-color: var(--bg-color); color: var(--primary); text-align: center; font-size: 12px; }
.rata-rata-header { background-color: var(--primary-dark); color: white !important; text-align: center; font-weight: bold; }
.rata-rata-cell { text-align: center; font-weight: bold; background-color: rgba(0, 141, 203, 0.05); }

.select-nilai-tabel { width: 100%; min-width: 65px; padding: 8px 6px; font-weight: bold; text-align: center; border-radius: 8px; border: 1px solid var(--primary); color: var(--primary); background: var(--card-bg); outline: none; }
.select-nilai-tabel:focus { box-shadow: 0 0 0 3px rgba(0, 141, 203, 0.1); }

/* --- 12. BADGE, NOTIFIKASI & INDIKATOR --- */
.badge { padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.semester-badge { background: linear-gradient(135deg, #10b981, #059669); color: white; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: bold; letter-spacing: 0.5px; box-shadow: 0 2px 5px rgba(16, 185, 129, 0.4); }
.semester-badge.smt2 { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 2px 5px rgba(245, 158, 11, 0.4); }
.rank-badge { background: var(--primary); color: white; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 12px; font-weight: bold; }
.badge-pemeriksa { background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border-color); padding: 8px 15px; border-radius: 12px; font-size: 13px; font-weight: 700; }

.icon-wrapper { position: relative; display: inline-block; }
.badge-notif { position: absolute; top: -5px; right: -8px; background: #ef4444; color: white; font-size: 9px; font-weight: bold; padding: 2px 6px; border-radius: 10px; z-index: 1; }

.live-indicator {
    display: inline-flex; align-items: center; gap: 6px; background: rgba(239, 68, 68, 0.1);
    color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); padding: 4px 10px;
    border-radius: 20px; font-size: 11px; font-weight: 800; letter-spacing: 1px;
    animation: pulse-red 1.5s infinite;
}
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- 13. INFO BOX & INSIGHT --- */
.info-box { background-color: var(--info-box-bg); border: 1px solid var(--info-box-border); border-radius: 14px; padding: 12px 18px; margin-bottom: 20px; font-size: 13px; line-height: 1.6; color: var(--info-box-text); }
.insight-box { background: var(--insight-bg); border: 1px solid var(--insight-border); border-radius: 16px; padding: 25px; }
.insight-header { color: var(--primary); font-weight: 700; font-size: 15px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px dashed var(--border-color); padding-bottom: 15px; text-transform: uppercase;}
.no-data, .empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; font-style: italic; }
.jarak-info-box { background: var(--bg-color); padding: 15px; border-radius: 12px; margin: 15px 0; border: 1px dashed var(--border-color); }

/* --- 14. STATS GRID --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { background: var(--card-bg); padding: 15px 20px; border-radius: 16px; box-shadow: var(--card-shadow); border: 1px solid var(--border-color); display: flex; align-items: center; gap: 15px; }
.stat-icon { width: 45px; height: 45px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.bg-blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.bg-green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.bg-purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

/* --- 15. MODAL POPUP & DETAIL LITERASI / ABSEN GTK --- */
.modal { display: none; position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); backdrop-filter: blur(5px); overflow: auto; }
.modal-content { background-color: var(--card-bg); color: var(--text-main); margin: 10% auto; padding: 25px; border: 1px solid var(--border-color); width: 90%; max-width: 500px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 20px; }
.close-modal { color: var(--text-muted); font-size: 24px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.close-modal:hover { color: #ef4444; }

.modal-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
@media(max-width: 768px) { .modal-grid { grid-template-columns: 1fr; } }

.modal-sidebar { background: var(--insight-bg); padding: 20px; border-radius: 16px; border: 1px solid var(--border-color); text-align: center; }
.modal-cover-wrapper img { width: 100%; max-height: 220px; object-fit: contain; border-radius: 8px; box-shadow: var(--card-shadow); margin-bottom: 15px; }
.modal-cover-empty { background: var(--card-bg); padding: 30px; border-radius: 8px; border: 1px dashed var(--border-color); color: var(--text-muted); margin-bottom: 15px; }

.meta-label { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; margin-top: 10px; display: block; }
.meta-value { font-size: 13px; color: var(--text-main); font-weight: 600; margin-bottom: 5px; }

.modal-main { padding: 10px 0; }
.book-title { font-size: 18px; font-weight: 800; color: var(--primary); margin: 0 0 5px 0; }
.book-author { font-size: 13px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 15px; }

.summary-box { background: var(--input-bg); border: 1px solid var(--border-color); padding: 15px; border-radius: 12px; font-size: 13px; line-height: 1.6; color: var(--text-main); white-space: pre-line; max-height: 250px; overflow-y: auto; margin-bottom: 20px;}
.fiksi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.fiksi-box { background: var(--insight-bg); border: 1px solid var(--border-color); padding: 12px; border-radius: 10px; font-size: 13px; }

.form-penilaian { background: rgba(59, 130, 246, 0.05); border: 1px solid rgba(59, 130, 246, 0.2); padding: 20px; border-radius: 16px; margin-top: 25px; }
.form-penilaian select { width: 100%; padding: 12px; border-radius: 10px; background: var(--card-bg); border: 1px solid var(--primary); color: var(--primary); font-weight: bold; font-size: 15px; text-align: center; outline: none; margin-bottom: 15px; }
.form-penilaian textarea { width: 100%; padding: 12px; border-radius: 10px; background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-main); min-height: 80px; outline: none; margin-bottom: 15px; font-family: 'Inter', sans-serif; font-size: 13px; }

/* --- 15.1 ABSENSI GTK MODAL STYLES --- */
.modal-absen { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); align-items: center; justify-content: center; }
.modal-absen-content { background: var(--card-bg); padding: 25px; border-radius: 24px; width: 85%; max-width: 350px; text-align: center; color: var(--text-main); box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.btn-absen { padding: 12px; border: none; border-radius: 12px; color: white; font-weight: bold; cursor: pointer; font-size: 12px; width:100%; margin-bottom:8px; transition: 0.2s; }
.btn-absen:hover { opacity: 0.9; transform: translateY(-2px); }

/* --- 16. FILE UPLOAD (DRAG DROP) --- */
.file-drop-area { position: relative; display: flex; flex-direction: column; align-items: center; padding: 40px 20px; border: 2px dashed var(--border-color); border-radius: 16px; background-color: var(--input-bg); cursor: pointer; transition: all 0.3s ease; margin-bottom: 20px; text-align: center; }
.file-drop-area:hover { border-color: var(--primary); background-color: rgba(0, 141, 203, 0.05); }
.file-name-preview { margin-top: 10px; font-size: 13px; color: #10b981; font-weight: 700; display: none; }
.file-drop-area input[type="file"] { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* --- 17. TABS, ACCORDION & LIST MATERI --- */
.tab-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.tab-button { padding: 10px 20px; border: 1px solid var(--border-color); border-radius: 12px; cursor: pointer; background: var(--card-bg); color: var(--text-muted); font-weight: 600; font-size: 13px; transition: all 0.3s ease; }
.tab-button:hover { background: var(--item-hover); color: var(--text-main); }
.tab-button.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(0, 141, 203, 0.2); }
.tab-content { display: none; animation: fadeEffect 0.4s; }
@keyframes fadeEffect { from {opacity: 0; transform: translateY(10px);} to {opacity: 1; transform: translateY(0);} }

.item-wrapper { display: flex; gap: 8px; align-items: stretch; margin-bottom: 12px; transition: 0.3s; }
.item-wrapper > a, .accordion { flex-grow: 1; display: flex; align-items: center; justify-content: space-between; text-decoration: none; color: var(--text-main); padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 12px; background-color: var(--item-bg); font-weight: 600; font-size: 13px; cursor: pointer; outline: none; line-height: 1.4; }
.item-wrapper > a:hover, .accordion:hover { background-color: var(--item-hover); }
.accordion.active { background-color: var(--primary); color: white; border-color: var(--primary); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.accordion-content { display: none; padding: 15px; border: 1px solid var(--border-color); border-top: none; background-color: var(--card-bg); margin-bottom: 12px; border-radius: 0 0 12px 12px; font-size: 13px; line-height: 1.6; }
.action-box { display: flex; gap: 15px; align-items: center; padding: 0 15px; border: 1px solid var(--border-color); border-radius: 12px; background-color: var(--action-bg); }
.item-inactive { opacity: 0.6; filter: grayscale(40%); }
.item-inactive > a, .item-inactive .accordion, .item-inactive .action-box { background-color: var(--item-inactive); border-style: dashed; color: var(--text-muted); }

/* --- 18. PAGINATION --- */
.pagination { display: flex; justify-content: center; align-items: center; margin-top: 25px; gap: 10px; flex-wrap: wrap; }
.pagination a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--text-main); background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; text-decoration: none; transition: all 0.2s ease; box-shadow: var(--card-shadow); }
.pagination a:hover { background-color: var(--primary); color: white; border-color: var(--primary); }
.pagination span { font-size: 13px; font-weight: 700; color: var(--primary); padding: 10px; background: rgba(0, 141, 203, 0.1); border-radius: 10px; }

/* --- 19. PROFILE ID CARDS & HEADER DASHBOARD --- */
.profile-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; text-align: center; position: relative; overflow: hidden; }
.profile-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 120px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: 20px 20px 0 0; z-index: 0; }
.profile-avatar-wrapper { position: relative; width: 130px; height: 130px; margin-bottom: 20px; z-index: 1; }
.profile-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 5px solid var(--card-bg); background: var(--card-bg); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.edit-badge { position: absolute; bottom: 5px; right: 5px; background: linear-gradient(135deg, #f59e0b, #d97706); color: white; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3); border: 3px solid var(--card-bg); transition: transform 0.2s; cursor: pointer; }
.edit-badge:hover { transform: scale(1.1); color: white; }
.profile-name { font-size: 22px; font-weight: 800; color: var(--text-main); margin: 0 0 5px 0; z-index: 1; }
.profile-role { font-size: 14px; font-weight: 600; color: var(--primary); margin: 0 0 25px 0; z-index: 1; text-transform: uppercase; letter-spacing: 1px; }

/* Profil Mini Dashboard */
.profil-card { background: var(--card-bg); padding: 15px 20px; border-radius: 20px; box-shadow: var(--card-shadow); display: flex; align-items: center; gap: 15px; margin-bottom: 20px; border: 1px solid var(--border-color); }
.profil-card img, .profil-card .inisial { width: 55px; height: 55px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); box-shadow: 0 4px 10px rgba(0, 141, 203, 0.2); flex-shrink: 0; }
.profil-card .inisial { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: bold; }
.profil-text { flex: 1; min-width: 0; }
.profil-text h2 { font-size: 16px; margin: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.profil-text p { font-size: 12px; color: var(--text-muted); margin: 4px 0 0 0; font-weight: 600; }

/* --- 20. DASHBOARD SHORTCUT GRID CARDS (MAPPED & UNIFIED) --- */
.shortcut-grid, .button-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.shortcut-card, .button-item {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid transparent;
    padding: 15px 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--card-shadow);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
}

.shortcut-card:hover, .button-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(0, 141, 203, 0.15);
    color: var(--primary) !important;
}
.shortcut-card:active, .button-item:active { transform: scale(0.95); }

.shortcut-card i, .button-item i { font-size: 26px; transition: transform 0.2s; }
.shortcut-card:hover i, .button-item:hover i { transform: scale(1.1); }
.shortcut-card img, .button-item img { width: 26px; height: 26px; object-fit: contain; }

.shortcut-card span, .button-item span {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    display: block;
    color: var(--text-main);
}
.shortcut-card:hover span, .button-item:hover span { color: var(--primary); }

/* Section Title Menu Capsule */
.section-menu-title, .menu-section h3 {
    background: linear-gradient(135deg, var(--card-bg), var(--bg-color));
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 30px 0 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}
.section-menu-title::before, .menu-section h3::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
}

.menu-section { margin-bottom: 25px; }

/* --- 20.1 TOAST ABSENSI --- */
.toast-absen {
    position: fixed; top: 70px; right: -300px; background: #10b981; color: white;
    padding: 12px 20px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex; align-items: center; gap: 10px; font-weight: bold; z-index: 10000;
    transition: right 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast-absen.show { right: 20px; }

@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.game i { animation: bounce 1s ease infinite; }

/* --- 21. RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
    .shortcut-grid, .button-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .shortcut-card, .button-item { padding: 15px 8px; }
    .shortcut-card i, .button-item i { font-size: 26px; }
    .shortcut-card span, .button-item span { font-size: 11px; }
}

@media (max-width: 480px) {
    .filter-form { flex-direction: column; align-items: stretch; }
    .btn-filter, .btn-export-excel, .btn-submit { width: 100%; justify-content: center; }
}
/* --- 23. KARTU PENGUMUMAN --- */
.pengumuman-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}
.pengumuman-card {
    background: var(--card-bg); border-radius: 16px; padding: 20px;
    box-shadow: var(--card-shadow); border: 1px solid var(--border-color);
    display: flex; flex-direction: column; position: relative; overflow: hidden;
    border-top: 4px solid var(--primary); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.pengumuman-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0, 141, 203, 0.15); 
    border-color: var(--primary); 
}
.pengumuman-date { 
    font-size: 12px; color: var(--primary); font-weight: 700; 
    margin-bottom: 12px; display: flex; align-items: center; gap: 6px; 
}
.pengumuman-title { 
    font-size: 16px; font-weight: 800; margin: 0 0 10px 0; 
    line-height: 1.4; color: var(--text-main); 
}
.pengumuman-excerpt { 
    font-size: 13px; color: var(--text-muted); line-height: 1.6; 
    flex-grow: 1; margin-bottom: 20px; font-weight: 500;
}
.pengumuman-footer { 
    display: flex; justify-content: space-between; align-items: center; 
    border-top: 1px dashed var(--border-color); padding-top: 15px; 
}
.pengumuman-views { 
    font-size: 11px; color: var(--text-muted); font-weight: 700; 
    display: flex; align-items: center; gap: 5px; 
}
.btn-read { 
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
    color: white; text-decoration: none; padding: 8px 16px; border-radius: 10px; 
    font-size: 12px; font-weight: 700; transition: 0.2s; 
    box-shadow: 0 4px 10px rgba(0, 141, 203, 0.2); display: inline-flex; align-items: center; gap: 5px;
}
.btn-read:hover { transform: translateY(-2px); color: white; }
/* --- 24. DETAIL PENGUMUMAN & ARTIKEL --- */
.article-title {
    font-size: 22px; font-weight: 800; color: var(--text-main);
    margin: 0 0 15px 0; line-height: 1.3;
}
.article-meta {
    display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-muted);
    padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px dashed var(--border-color);
}
.article-meta-item { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.article-meta-item i { color: var(--primary); font-size: 14px; }

.article-content {
    font-size: 14px; color: var(--text-main); line-height: 1.7;
    white-space: pre-line; margin-bottom: 30px; font-weight: 500;
}

/* PDF Viewer */
.pdf-box {
    margin-top: 25px; border: 1px solid var(--border-color); border-radius: 12px;
    overflow: hidden; background: var(--card-bg); box-shadow: var(--card-shadow);
}
.pdf-info {
    background: var(--insight-bg); padding: 12px 15px; display: flex; justify-content: space-between;
    align-items: center; font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--border-color);
}
.btn-dl {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white;
    text-decoration: none; padding: 6px 12px; border-radius: 8px; display: flex; align-items: center;
    gap: 6px; transition: 0.2s; box-shadow: 0 2px 8px rgba(0, 141, 203, 0.3);
}
.btn-dl:hover { transform: translateY(-2px); color: white; }
.pdf-viewer { width: 100%; height: 500px; background: #e2e8f0; }
.pdf-viewer iframe { width: 100%; height: 100%; border: none; }

@media (max-width: 600px) {
    .article-title { font-size: 18px; }
    .pdf-viewer { height: 400px; }
}

/* =============================================
   LOADING SPINNER
   ============================================= */
.loading-spinner {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.loading-spinner i {
    font-size: 24px;
    margin-right: 10px;
    color: var(--primary);
}

/* =============================================
   TOAST NOTIFICATION (di luar style sebelumnya)
   ============================================= */
.toast-absen {
    position: fixed;
    top: 70px;
    right: -300px;
    background: #10b981;
    color: white;
    padding: 14px 24px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 14px;
    z-index: 10000;
    transition: right 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90%;
}

.toast-absen .toast-icon {
    font-size: 20px;
}

.toast-absen.show {
    right: 20px;
}

@media (max-width: 600px) {
    .toast-absen {
        padding: 12px 18px;
        font-size: 13px;
        top: 65px;
        right: -280px;
    }
    .toast-absen.show {
        right: 10px;
    }
}