   
        :root {
            --header-color: #9c27b0;
            --header-dark: #7b1fa2;
            --btn-color: #aecd54;
            --bg-color: #f8f9fa;
            --text-dark: #2c3e50;
            --shadow-card: 0 8px 20px rgba(0,0,0,0.06);
            --radius-std: 15px;
        }

        * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
        
        body { 
            margin: 0; font-family: 'Poppins', sans-serif; background-color: var(--bg-color); 
            color: var(--text-dark); display: flex; flex-direction: column; min-height: 100vh; 
            overflow-x: hidden; width: 100%; 
        }
        
        /* HEADER */
        .header {
            background: linear-gradient(135deg, var(--header-color), var(--header-dark));
            color: white; padding: 15px 20px;
            display: flex; align-items: center; justify-content: space-between;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
            position: sticky; top: 0; z-index: 1000;
            border-bottom-left-radius: 20px; border-bottom-right-radius: 20px;
        }
        .header-left { display: flex; align-items: center; gap: 15px; }
        .logo-area {
            background: white; border-radius: 12px; width: 50px; height: 50px;
            display: flex; align-items: center; justify-content: center;
            overflow: hidden; padding: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .logo-area img { width: 100%; height: auto; object-fit: contain; }
        .header h1 { margin: 0; font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
        .social-icons a { color: white; margin-left: 15px; font-size: 1.3rem; transition: 0.3s; }

        /* NOTIFICATION */
        .notif-bell { position: relative; cursor: pointer; color: white; font-size: 1.4rem; margin-left: 15px; transition: 0.3s; }
        .notif-badge { position: absolute; top: -5px; right: -5px; background: #ff5252; color: white; border-radius: 50%; padding: 2px 6px; font-size: 0.65rem; border: 2px solid var(--header-color); }

        /* CONTAINER */
        .container { max-width: 550px; margin: 0 auto; padding: 20px 15px; flex: 1; width: 100%; position: relative;}
        .hidden { display: none !important; }
        .page-section { animation: fadeIn 0.4s ease-in-out; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        /* CARDS */
        .login-card {
            background: white; padding: 25px; border-radius: var(--radius-std);
            box-shadow: var(--shadow-card); text-align: center; margin-bottom: 20px;
            border: 1px solid rgba(0,0,0,0.02); transition: transform 0.2s;
        }
        h2, h3, h4, h5 { color: var(--header-dark); margin-top: 0; margin-bottom: 10px; }
        .text-small { font-size: 0.85rem; color: #7f8c8d; margin-bottom: 15px; }
        .text-alert { color: #c62828; font-weight: 600; background: #ffebee; padding: 12px; border-radius: 8px; margin-bottom: 15px; font-size: 0.9rem; border-left: 4px solid #c62828; display: flex; align-items: center; gap: 10px;}
        
        /* BUTTONS */
        .btn-block {
            display: block; width: 100%; background-color: var(--btn-color); color: #fff;
            font-weight: 600; padding: 14px; margin-bottom: 12px; border: none;
            border-radius: 12px; cursor: pointer; font-size: 0.95rem; text-transform: uppercase;
            box-shadow: 0 4px 6px rgba(174, 205, 84, 0.3); position: relative; overflow: hidden;
        }
        .btn-block:active { transform: scale(0.97); }
        .btn-purple { background-color: #ab47bc; box-shadow: 0 4px 6px rgba(171, 71, 188, 0.3); }
        .btn-red { background-color: #ef5350; box-shadow: 0 4px 6px rgba(239, 83, 80, 0.3); }
        .btn-blue { background-color: #29b6f6; box-shadow: 0 4px 6px rgba(41, 182, 246, 0.3); }
        .btn-green { background-color: #27ae60; box-shadow: 0 4px 6px rgba(39, 174, 96, 0.3); }
        .btn-home { background-color: #455a64; color: white; margin-top: 20px; }
        .btn-outline { background: transparent; border: 2px solid #e0e0e0; color: #757575; box-shadow: none; }
        .btn-mini { padding: 6px 12px; font-size: 0.75rem; border-radius: 6px; border: none; cursor: pointer; margin: 2px; color: white;}
        .filter-btn { margin-right: 5px; margin-bottom: 5px; transition: 0.3s; }
        .filter-btn.active { background-color: var(--header-dark); color: white; border-color: var(--header-dark); }

        /* INPUTS & TABLES */
        .input-group { position: relative; margin-bottom: 15px; text-align: left; }
        .input-box {
            width: 100%; padding: 14px; border: 2px solid #eee; border-radius: 12px; font-size: 1rem; 
            background: #fbfbfb; color: #333; font-family: inherit;
        }
        .input-box:focus { border-color: var(--header-color); outline: none; background: #fff; }
        .input-label { display: block; text-align: left; font-size: 0.85rem; color: #555; margin-bottom: 6px; font-weight: 600; margin-left: 2px;}
        .toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #aaa; padding: 5px; }

        .table-responsive { overflow-x: auto; margin-top: 15px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
        table { width: 100%; border-collapse: collapse; font-size: 0.8rem; background: white; white-space: nowrap; }
        th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #eee; }
        th { background-color: var(--header-color); color: white; font-weight: 500; text-transform: uppercase; font-size: 0.75rem; }
        tr:nth-child(even) { background-color: #fcfcfc; }

        /* SLIDER & UTILS */
        .slider-container { display: flex; overflow-x: auto; gap: 15px; padding-bottom: 15px; margin-bottom: 20px; scrollbar-width: none; }
        .slider-container::-webkit-scrollbar { display: none; }
        .slider-item { 
            min-width: 260px; height: 160px; background: #e0e0e0; border-radius: 15px; 
            display: flex; align-items: flex-end; justify-content: center; 
            background-size: cover; background-position: center; position: relative; overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        .slider-text { width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: white; padding: 15px; text-align: left; font-weight: 600; }

        .stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
        .stat-card { background: white; padding: 15px; border-radius: 12px; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 1px solid #f0f0f0; }
        .stat-num { font-size: 1.8rem; font-weight: 700; color: var(--header-color); margin-bottom: 5px; }
        
        /* SARAN FAB & MODAL */
        .saran-container { position: fixed; bottom: 25px; right: 25px; z-index: 1500; }
        .saran-fab {
            width: 60px; height: 60px; border-radius: 50%; border: none; font-size: 24px;
            background: var(--btn-color); color: white; cursor: pointer;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: transform 0.2s;
            display: flex; align-items: center; justify-content: center;
        }
        .saran-fab:hover { transform: scale(1.1); }
        .saran-box {
            position: absolute; bottom: 75px; right: 0; width: 280px;
            background: white; padding: 20px; border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            animation: fadeIn 0.3s; border: 1px solid #eee;
        }

        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
        .modal-content { background: white; width: 90%; max-width: 400px; padding: 25px; border-radius: 15px; text-align: left; position: relative; max-height: 85vh; overflow-y: auto; animation: slideUp 0.3s ease; }
        @keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        .close-modal { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; cursor: pointer; color: #888; }
        
        .tab-menu { display: flex; background: #fff; padding: 5px; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
        .tab-item { flex: 1; padding: 10px; cursor: pointer; font-weight: 600; font-size: 0.9rem; text-align: center; border-radius: 8px; transition: 0.3s; color: #777; }
        .tab-item.active { background-color: var(--header-color); color: white; shadow: 0 2px 5px rgba(0,0,0,0.2); }

        /* LOADING */
        #global-loader {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.9);
            z-index: 3000; display: flex; flex-direction: column; align-items: center; justify-content: center;
        }
        .spinner {
            width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid var(--header-color);
            border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 10px;
        }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        
        /* Badge Colors */
        .badge-purple { background-color: #f3e5f5; color: #8e44ad; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; }
        .badge-blue { background-color: #e3f2fd; color: #2196f3; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; }
    
        /* LUXURY ADMIN STYLES */
        .luxury-card-admin {
            background: #ffffff;
            border-radius: 24px;
            padding: 20px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            margin-bottom: 25px;
            border: 1px solid #e1e8ed;
            border-top: 8px solid #1a2a6c; /* Royal Blue Deep */
        }

        .luxury-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .luxury-title {
            margin: 0;
            color: #1a2a6c;
            font-size: 1.1rem;
            font-weight: 800;
            letter-spacing: 1px;
        }

        .luxury-subtitle {
            margin: 0;
            color: #576574;
            font-size: 0.75rem;
            font-weight: 500;
        }

        .luxury-select-wrapper {
            background: #f8f9fa;
            padding: 5px 10px;
            border-radius: 12px;
            border: 2px solid #1a2a6c;
        }

        .luxury-select {
            border: none;
            background: transparent;
            font-weight: bold;
            color: #1a2a6c;
            font-size: 11px;
            outline: none;
            cursor: pointer;
        }

        .luxury-nav-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #1a2a6c;
            padding: 15px;
            border-radius: 18px;
            margin-bottom: 20px;
            color: white;
        }

        .luxury-nav-btn {
            background: rgba(255,255,255,0.2);
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 12px;
            cursor: pointer;
            transition: 0.3s;
        }

        .luxury-nav-btn:hover { background: rgba(255,255,255,0.4); }

        .luxury-date-display {
            font-weight: 700;
            font-size: 0.95rem;
            display: block;
            margin-bottom: 8px;
            text-transform: uppercase;
        }

        .luxury-mode-switch {
            display: flex;
            gap: 15px;
            justify-content: center;
        }

        .luxury-mode-item {
            font-size: 9px;
            color: rgba(255,255,255,0.6);
            cursor: pointer;
            font-weight: 700;
            letter-spacing: 1px;
            padding-bottom: 3px;
            transition: 0.3s;
        }

        .luxury-mode-item.active {
            color: #ffd700; /* Gold */
            border-bottom: 2px solid #ffd700;
        }

        .luxury-chart-area {
            height: 250px;
            padding: 10px;
            background: #fdfdfd;
            border-radius: 15px;
        }

        /* MODERN SEGMENTS */
        .modern-segment-wrapper {
            margin-top: 15px;
            padding: 5px;
            background: #f1f2f6; 
            border-radius: 12px;
            border: 1px solid #dfe4ea;
        }

        .modern-segment-container {
            display: flex;
            gap: 2px;
            background: #e4e7ed;
            padding: 4px;
            border-radius: 10px;
            position: relative;
        }

        .segment-item {
            flex: 1;
            text-align: center;
            padding: 10px 5px;
            font-size: 11px;
            font-weight: 600;
            color: #747d8c;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column; 
            align-items: center;
            gap: 4px;
        }

        .segment-item i { font-size: 14px; }

        .segment-item.active {
            background: #ffffff;
            color: #1a2a6c; 
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            transform: translateY(-2px); 
        }

        .segment-item:hover:not(.active) {
            background: rgba(255,255,255,0.5);
            color: #2f3542;
        }

        .badge-green {
    background-color: #27ae60; /* Warna Hijau Daun */
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

.badge-purple {
    background-color: #8e44ad; /* Warna Ungu */
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

#tblMonitoringHafalan td {
    padding: 10px 5px !important; /* Memberi ruang antar baris */
    vertical-align: middle;
}

/* CSS TAMPILAN HIERARKI */
.cell-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px;
    line-height: 1;
}

/* BARIS 1: J-1 . S-1 (Kecil) */
.info-top {
    font-size: 8px; 
    font-weight: bold;
    color: #7f8c8d;
    margin-bottom: 2px;
    border-bottom: 1px dashed #ddd;
    width: 100%;
    text-align: center;
}

/* BARIS 2: 1 HAL (BESAR) */
.info-mid {
    font-size: 14px; /* UKURAN BESAR */
    font-weight: 900; /* SANGAT TEBAL */
    color: #2c3e50;
    margin: 3px 0;
}

/* BARIS 3: 1 BRS (Kecil) */
.info-bot {
    font-size: 9px;
    color: #95a5a6;
    font-weight: 500;
}

/* TOMBOL DELETE & NILAI */
.action-mini {
    display: flex;
    gap: 3px;
    align-items: center;
    margin-top: 4px;
}

/* Mengecilkan Tombol Hapus Global */
.btn-hapus-simple {
    background: none !important;
    border: none !important;
    color: #e74c3c !important; /* Warna merah */
    font-size: 8px !important;  /* Ukuran icon diperkecil */
    padding: 0px 2px !important; /* Menghilangkan ruang kosong yang bikin kelihatan besar */
    cursor: pointer;
    opacity: 0.5;               /* Bikin agak transparan biar gak mencolok */
    transition: 0.2s;
    vertical-align: middle;
}

/* Efek saat mouse mendekat, baru kelihatan jelas merahnya */
.btn-hapus-simple:hover {
    opacity: 1;
    transform: scale(1.1);      /* Sedikit membesar saat disentuh */
}

/* Pastikan icon Font Awesome di dalamnya juga ikut kecil */
.btn-hapus-simple i {
    font-size: 9px !important;
}

/* --- FOOTER VERSI BIASA --- */
.footer-biasa {
    padding: 40px 0;
    background-color: #ffffff; /* Latar putih polos */
    border-top: 1px solid #eeeeee; /* Garis pembatas tipis */
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.footer-container {
    max-width: 600px;
    margin: 0 auto;
}

.footer-link a {
    text-decoration: none;
    color: #4a148c;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 2px; /* Jarak antar huruf agar elegan */
}

.footer-separator {
    width: 20px;
    height: 1px;
    background-color: #bbbbbb;
    margin: 15px auto;
}

.footer-biasa p {
    margin: 3px 0;
    font-size: 11px;
    color: #777777;
    letter-spacing: 0.5px;
}

.footer-biasa a {
    color: #4a148c;
    text-decoration: none;
}

.footer-biasa a:hover {
    text-decoration: underline;
}

#display-total-quran, #display-total-hadits {
    transition: all 0.5s ease-in-out;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px rgba(255,215,0,0.1); }
    to { text-shadow: 0 0 15px rgba(255,215,0,0.4); }
}

#display-total-quran, #display-total-hadits {
    color: #1a2a6c;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
    letter-spacing: 1px;
}

/* Container untuk badge absen dan tombol hapus */
.attendance-cell-box {
    position: relative;
    display: inline-block;
    padding: 5px;
}

/* Tombol hapus super kecil (nano) */
.btn-hapus-nano {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff7675;
    color: white;
    border: none;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    font-size: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    opacity: 0.3; /* Samar kalau tidak di-hover */
    transition: opacity 0.2s;
}

.attendance-cell-box:hover .btn-hapus-nano {
    opacity: 1; /* Muncul jelas saat kursor di atas sel */
}

.btn-hapus-nano:hover {
    background: #d63031;
    transform: scale(1.2);
}
