/* =========================================================
   AL-HIJRAH DESIGN SYSTEM — Elegant, Modern, Mobile-First
   ========================================================= */
:root {
    --brand: #0f9d76;
    --brand-2: #0ea5a0;
    --brand-dark: #0b7a5c;
    --brand-deep: #064e3b;
    --brand-ink: #052e24;
    --brand-soft: #e7f6f0;
    --brand-tint: #f3faf7;

    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f3f6f4;
    --surface: #ffffff;

    --danger: #dc2626;
    --warning: #d97706;
    --info: #0891b2;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 20px;

    --shadow-xs: 0 1px 2px rgba(16, 42, 34, 0.05);
    --shadow-sm: 0 2px 6px rgba(16, 42, 34, 0.06), 0 1px 2px rgba(16, 42, 34, 0.04);
    --shadow-md: 0 8px 24px rgba(16, 42, 34, 0.08);
    --shadow-lg: 0 18px 40px rgba(16, 42, 34, 0.12);

    /* Bootstrap 5.3 var overrides agar seluruh utilitas ikut tema */
    --bs-primary: var(--brand);
    --bs-primary-rgb: 15, 157, 118;
    --bs-success: var(--brand);
    --bs-success-rgb: 15, 157, 118;
    --bs-info: var(--info);
    --bs-info-rgb: 8, 145, 178;
    --bs-warning: var(--warning);
    --bs-warning-rgb: 217, 119, 6;
    --bs-danger: var(--danger);
    --bs-danger-rgb: 220, 38, 38;
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--ink);
    --bs-link-color: var(--brand);
    --bs-link-hover-color: var(--brand-dark);
    --bs-border-radius: 0.75rem;
    --bs-border-radius-sm: 0.5rem;
    --bs-border-radius-lg: 1rem;
}

* { -webkit-tap-highlight-color: transparent; }

/* Sembunyikan semua scrollbar di seluruh situs (fungsi scroll tetap aktif) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar,
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; }

/* Font mushaf standar Indonesia (LPMQ Isep Misbah) untuk teks ayat */
@font-face {
    font-family: 'LPMQ Isep Misbah';
    src: url('../fonts/LPMQ-Isep-Misbah.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection { background: var(--brand-soft); color: var(--brand-deep); }

/* =========================================================
   LAYOUT & SIDEBAR
   ========================================================= */
.wrapper { display: flex; width: 100%; min-height: 100vh; }

#sidebar {
    width: 264px;
    min-width: 264px;
    background: linear-gradient(180deg, var(--brand-deep) 0%, var(--brand-ink) 100%);
    color: #e2e8f0;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), margin 0.28s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1045;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 28px 22px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar-header img {
    width: 62px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    padding: 6px;
    margin-bottom: 12px;
}

.sidebar-header h4 {
    font-size: 14.5px !important;
    letter-spacing: 0.2px;
    color: #f8fafc;
    line-height: 1.4;
}

#sidebar ul { flex: 1; overflow-y: auto; }

#sidebar ul li { margin: 3px 14px; }

#sidebar ul li a {
    padding: 12px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #a7f3d0;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

#sidebar ul li a i { width: 26px; text-align: center; font-size: 15px; }

#sidebar ul li a:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.07);
    transform: translateX(3px);
}

#sidebar ul li a.dropdown-toggle {
    color: #ffffff;
    font-weight: 600;
}
#sidebar ul li a.dropdown-toggle::after {
    margin-left: auto;
    border-top-color: #86efac;
}

#sidebar ul li.active > a,
#sidebar ul li a.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
    box-shadow: var(--shadow-md) !important;
    font-weight: 600;
}

#sidebar ul li a.bg-success { background: transparent !important; }

#sidebar .collapse { position: static; }
#sidebar .collapse li a {
    padding-left: 34px;
    font-size: 13.5px;
    color: #b9d6cc;
}

#sidebar .logout-link { margin-top: auto; padding-bottom: 18px; }

/* --- Submenu sidebar (Berita, Video, Galeri di bawah Profil Sekolah) ---
   Tanpa kelas 'submenu-js' di <body>, submenu tetap terbuka semua. Jadi kalau
   static/js/admin-submenu.js gagal dimuat, tidak ada menu yang ikut hilang. */
#sidebar ul.admin-submenu-daftar {
    margin: 2px 0 6px 26px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

#sidebar ul.admin-submenu-daftar li { margin: 2px 0; }

#sidebar ul.admin-submenu-daftar li a {
    padding: 9px 12px;
    font-size: 13px;
    color: #b9d6cc;
}

#sidebar ul.admin-submenu-daftar li a i { width: 22px; font-size: 13px; }

/* Grup yang sedang dibuka ditandai halus, bukan gradient penuh: gradient
   dipakai menu yang benar-benar sedang dibuka, jadi tidak perlu dua-duanya
   menyala sekaligus dan membingungkan. */
#sidebar li.admin-submenu.grup-aktif > .admin-submenu-kepala > a {
    color: #ffffff;
    font-weight: 600;
}

#sidebar .admin-submenu-kepala { display: flex; align-items: center; gap: 4px; }
#sidebar .admin-submenu-kepala > a { flex: 1 1 auto; min-width: 0; }

#sidebar .admin-submenu-tombol {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #a7f3d0;
    cursor: pointer;
    transition: all 0.2s ease;
}

#sidebar .admin-submenu-tombol:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

#sidebar .admin-submenu-tombol:focus-visible {
    outline: 2px solid #86efac;
    outline-offset: 2px;
}

#sidebar .admin-submenu-tombol i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

#sidebar .admin-submenu-tombol[aria-expanded="true"] i { transform: rotate(180deg); }

body.submenu-js #sidebar ul.admin-submenu-daftar:not(.terbuka) { display: none; }

#content {
    flex: 1;
    min-width: 0;
    padding: 26px 30px;
    transition: all 0.28s ease;
}

/* =========================================================
   MOBILE: SIDEBAR MENJADI DRAWER
   ========================================================= */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 32, 25, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1040;
}
.overlay.active { display: block; }

@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        box-shadow: 12px 0 40px rgba(4, 32, 25, 0.35);
    }
    #sidebar.active { transform: translateX(0); }
    #content { padding: 16px 14px 40px; }
}

/* =========================================================
   TOPBAR
   ========================================================= */
.navbar-top {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 12px;
    z-index: 1020;
}

.navbar-custom {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--ink);
}
.logo-img { width: 44px; border-radius: 10px; }
.navbar-brand span { color: var(--brand); }

.user-info { min-width: 0; }
.user-info .fw-bold { font-size: 0.95rem; }

/* =========================================================
   KARTU & STATISTIK
   ========================================================= */
.card-modern {
    background: var(--surface);
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--line) !important;
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.card-modern:hover {
    box-shadow: var(--shadow-md) !important;
    border-color: #cbd5e1 !important;
}

.card-header-green, .header-green {
    background: linear-gradient(120deg, var(--brand), var(--brand-2)) !important;
    color: #ffffff !important;
    border-bottom: none !important;
    padding: 1.05rem 1.4rem;
    font-weight: 600;
}

/* Nav-tabs inside green header */
.header-green .card-header-tabs,
.card-header-green .card-header-tabs {
    margin: 0;
    border-bottom: none;
}
.header-green .card-header-tabs .nav-link,
.card-header-green .card-header-tabs .nav-link {
    color: rgba(255,255,255,0.7);
    border: none;
    border-bottom: 2.5px solid transparent;
    border-radius: 10px 10px 0 0;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    background: transparent;
    margin-bottom: 0;
}
.header-green .card-header-tabs .nav-link:hover,
.card-header-green .card-header-tabs .nav-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.12);
}
.header-green .card-header-tabs .nav-link.active,
.card-header-green .card-header-tabs .nav-link.active {
    color: var(--brand-dark) !important;
    background: #ffffff !important;
    border-bottom: 2.5px solid var(--brand) !important;
    box-shadow: 0 -2px 8px rgba(255,255,255,0.25);
}
.header-green .card-header-tabs .nav-link .badge,
.card-header-green .card-header-tabs .nav-link .badge {
    font-size: 0.7rem;
    padding: 3px 7px;
}
@media (max-width: 576px) {
    .header-green .card-header-tabs .nav-link,
    .card-header-green .card-header-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    .header-green .card-header-tabs,
    .card-header-green .card-header-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .header-green .card-header-tabs .nav-item,
    .card-header-green .card-header-tabs .nav-item {
        flex-shrink: 0;
    }
}

.header-kelas {
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: 1.05rem 1.4rem;
    color: #ffffff;
    font-weight: 600;
    border: none !important;
}

.icon-box {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand);
    flex-shrink: 0;
}

/* Kartu statistik dashboard */
.stat-card { display: flex; align-items: center; gap: 16px; }

/* =========================================================
   TOMBOL
   ========================================================= */
.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-green {
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}
.btn-green:hover {
    color: #ffffff;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-verifikasi {
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    border: none;
    color: #ffffff;
    border-radius: 12px;
    padding: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.btn-verifikasi:hover { color: #ffffff; box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-logout {
    background: linear-gradient(120deg, var(--danger), #b91c1c);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-xs);
    border: none;
}
.btn-logout:hover { color: #ffffff; box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-action {
    width: 34px; height: 34px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px;
    margin: 0 2px;
    border: 1px solid var(--line) !important;
    background: var(--surface) !important;
    color: var(--muted);
    transition: all 0.15s ease;
}
.btn-action:hover { background: var(--brand-soft) !important; color: var(--brand) !important; border-color: var(--brand) !important; transform: none; }

/* Tombol absensi radio */
.btn-absen-radio + label {
    transition: all 0.2s ease;
    font-weight: 600;
    border-width: 1.5px;
    border-radius: 10px;
}
.btn-check:checked + label.btn-outline-success {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
    box-shadow: var(--shadow-sm);
}

/* =========================================================
   FORM
   ========================================================= */
.form-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }

.form-control-modern,
.form-control,
.form-select {
    border-radius: 12px !important;
    padding: 11px 14px !important;
    border: 1.5px solid var(--line) !important;
    background-color: var(--surface) !important;
    color: var(--ink) !important;
    font-size: 0.925rem;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}
.form-control-modern::placeholder, .form-control::placeholder { color: #9ca3af; }

.form-control-modern:hover, .form-control:hover, .form-select:hover { border-color: #cbd5e1 !important; }

.form-control-modern:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--brand) !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(15, 157, 118, 0.14) !important;
}

.form-select option { color: var(--ink); font-weight: 500; }
.form-select option:first-child { color: var(--muted); font-style: italic; }

.form-control[type="file"] { padding: 9px 14px !important; }

.input-group-text {
    background: var(--brand-tint);
    border: 1.5px solid var(--line);
    color: var(--brand);
    border-radius: 12px 0 0 12px;
}

/* Kotak pencarian */
.search-box { position: relative; max-width: 340px; width: 100%; }
.search-box i {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: 14px; z-index: 3;
}
.search-box input {
    padding-left: 42px !important;
    border-radius: 50px !important;
}

/* =========================================================
   TABEL
   ========================================================= */
.table { --bs-table-bg: transparent; }

.table-modern { width: 100%; border-collapse: separate !important; border-spacing: 0; }

.table thead th {
    padding: 13px 16px !important;
    background-color: #f8fafc !important;
    color: var(--muted) !important;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--line) !important;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: var(--ink);
    vertical-align: middle;
    font-size: 0.9rem;
}

.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:hover { background-color: var(--brand-tint) !important; }

.table tbody tr:last-child td { border-bottom: none !important; }

.table-responsive, .custom-table-responsive {
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    background: var(--surface);
    margin-bottom: 0;
}
.custom-table-responsive { border-radius: var(--radius-sm); padding-bottom: 2px; }

.scroll-hint {
    display: none;
    background: var(--brand-tint);
    color: var(--brand-dark);
    padding: 8px 12px;
    border-radius: 50px;
    font-size: 0.74rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    border: 1px dashed #99e6c9;
}
@media (max-width: 767.98px) {
    .scroll-hint { display: block; animation: pulseEffect 2.2s infinite; }
}

/* Admin: scrollbar halaman (di luar tabel) terlihat */
html:has(body.admin-page) {
    scrollbar-width: thin;
    scrollbar-color: #0f9d76 #e9ecef;
}
html:has(body.admin-page)::-webkit-scrollbar {
    display: block !important;
    width: 12px !important;
    height: 12px !important;
}
html:has(body.admin-page)::-webkit-scrollbar-track {
    display: block !important;
    background: #e9ecef !important;
}
html:has(body.admin-page)::-webkit-scrollbar-thumb {
    display: block !important;
    background: #0f9d76 !important;
    border-radius: 6px;
}
html:has(body.admin-page)::-webkit-scrollbar-thumb:hover {
    background: #0b7a5c !important;
}
html:has(body.admin-page[data-theme="dark"]) {
    scrollbar-color: #0f9d76 #334155;
}
html:has(body.admin-page[data-theme="dark"])::-webkit-scrollbar-track {
    background: #334155 !important;
}

.text-nowrap-custom { white-space: nowrap; }

/* =========================================================
   BADGE
   ========================================================= */
.badge { border-radius: 50px !important; padding: 6px 12px !important; font-weight: 600 !important; font-size: 0.76rem; }

.badge-green {
    background: var(--brand-soft);
    color: var(--brand-dark);
    border: 1px solid #a7e8cf;
}
.badge-active { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #86e2c2; }
.badge-none { background: #fee2e2; color: var(--danger); border: 1px solid #fecaca; }

.bg-success-subtle { background-color: var(--brand-soft) !important; color: var(--brand-dark) !important; }
.bg-danger-subtle { background-color: #fee2e2 !important; color: #b91c1c !important; }

/* Badge di dalam tabel */
.table .badge { box-shadow: none; }
.table .bg-success { background-color: var(--brand-soft) !important; color: var(--brand-dark) !important; border: 1px solid #a7e8cf; }
.table .bg-primary { background-color: #e0f2fe !important; color: #0369a1 !important; border: 1px solid #bae6fd; }
.table .bg-info { background-color: #cffafe !important; color: #0e7490 !important; border: 1px solid #a5f3fc; }
.table .bg-warning { background-color: #fef3c7 !important; color: #92400e !important; border: 1px solid #fde68a; }
.table .bg-danger { background-color: #fee2e2 !important; color: #b91c1c !important; border: 1px solid #fecaca; }

/* =========================================================
   TABS NAV PILLS
   ========================================================= */
.nav-pills .nav-link {
    color: var(--ink);
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-right: 8px;
    transition: all 0.2s ease;
}
.nav-pills .nav-link:hover { border-color: #cbd5e1; color: var(--brand); background: var(--brand-tint); }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background: linear-gradient(120deg, var(--brand), var(--brand-2)) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: var(--shadow-sm);
}

/* =========================================================
   MODAL, DROPDOWN, ACCORDION, ALERT
   ========================================================= */
.modal-content {
    background: var(--surface) !important;
    border: none !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}
.modal-header { border-bottom: 1px solid var(--line); }
.modal-header.bg-success {
    background: linear-gradient(120deg, var(--brand), var(--brand-2)) !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    color: #ffffff !important;
}

.dropdown-menu {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 8px;
    animation: slideDownFade 0.22s ease;
}
.dropdown-menu .dropdown-item { border-radius: 8px; padding: 9px 12px; font-size: 0.9rem; }
.dropdown-menu .dropdown-item:hover { background: var(--brand-tint); color: var(--brand-dark); }

.accordion-button {
    box-shadow: none !important;
    font-weight: 600;
    border-radius: var(--radius) !important;
}
.accordion-button:not(.collapsed) {
    background: var(--brand-tint);
    color: var(--brand-dark);
}
.accordion-item { border: 1px solid var(--line); }

.alert {
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 0.9rem;
}

/* =========================================================
   KARTU FILTER
   ========================================================= */
.filter-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}
.filter-box { min-width: 240px; }
.filter-dropdown .btn { border-radius: 10px; }

.filter-menu {
    border-radius: var(--radius) !important;
    border: 1px solid var(--line) !important;
    background: var(--surface) !important;
    box-shadow: var(--shadow-md) !important;
    animation: slideDownFade 0.22s ease;
}
.filter-menu .custom-input {
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    width: 100%;
    color: var(--ink);
}
.filter-menu .custom-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,157,118,0.14); outline: none; }
.filter-menu .form-label i { color: var(--brand); }

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   ACCORDION KELAS (DETAILS)
   ========================================================= */
details.kelas-group summary::-webkit-details-marker { display: none; }
details.kelas-group summary { list-style: none; outline: none; }
details.kelas-group summary.header-kelas { cursor: pointer; user-select: none; transition: background 0.2s ease; }
details.kelas-group summary.header-kelas:hover { background: linear-gradient(120deg, var(--brand-dark), var(--brand)) !important; }
details.kelas-group .transition-icon { transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
details.kelas-group[open] .transition-icon { transform: rotate(90deg); }
details.kelas-group[open] .table-responsive { animation: slideDown 0.25s ease-out; }
details.kelas-group:not([open]) summary.header-kelas { border-radius: var(--radius) !important; }
details.kelas-group[open] summary.header-kelas { border-radius: var(--radius) var(--radius) 0 0 !important; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.month-box {
    transition: all 0.2s ease;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
}
.month-box:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--brand); }
.semester-title {
    font-size: 0.95rem;
    border-bottom: 1px dashed var(--line);
    padding-bottom: 6px;
    margin-bottom: 14px;
    font-weight: 700;
    color: var(--ink);
}
.fs-7 { font-size: 0.85rem; }

/* =========================================================
   HALAMAN LOGIN & OTP (KANAN SCROLL, KIRI DIAM)
   ========================================================= */

/* Body dikunci 100vh agar layar tidak scroll secara global di Desktop */
.login-body { 
    position: relative; 
    min-height: 100vh; 
    overflow-y: auto; 
    background-color: #d1eed8; 
}

/* Fixed background gambar gedung di area kanan */
.login-bg {
    position: fixed; 
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: url('/static/img/background-gedung.jpeg') no-repeat center center / cover;
    z-index: -2;
    filter: none; 
    border-top-left-radius: 50% 100%;
    border-bottom-left-radius: 50% 100%;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
}

.login-overlay { 
    display: none; 
}

/* Pembungkus layout terkunci seukuran layar monitor */
.login-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* BAGIAN KIRI: Info akun demo, dibiarkan tetap (diam) */
.login-left {
    width: 45%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 5%;
}

/* BAGIAN KANAN: Form login, aktifkan overflow-y: auto agar bisa di-scroll */
.login-right {
    width: 55%;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    padding: 2rem 5%;
}
.login-right > * {
    margin: auto;
}

.card-login-modern {
    background: rgba(255, 255, 255, 0.97) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    box-shadow: var(--shadow-lg) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Role selector buttons */
.role-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 2px solid var(--line);
    background: #fff;
    text-align: left;
    transition: all 0.2s ease;
    cursor: pointer;
}
.role-btn:hover {
    border-color: var(--brand);
    background: #f0fdf9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15,157,118,0.12);
}
.role-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.role-guru .role-icon { background: #dbeafe; color: #1d4ed8; }
.role-ortu .role-icon { background: #dcfce7; color: #16a34a; }
.role-admin .role-icon { background: #fef3c7; color: #d97706; }
.role-info { flex: 1; }
.role-label { display: block; font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.role-desc { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 1px; }
.role-arrow { color: var(--muted); font-size: 0.8rem; }
.card-otp { 
    border: 1px solid var(--line) !important; 
    border-radius: var(--radius-lg) !important; 
    box-shadow: var(--shadow-md) !important; 
    background: rgba(255,255,255,0.97) !important; 
}

.form-control-otp {
    border-radius: 12px;
    padding: 12px;
    border: 2px solid var(--line);
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 6px;
    font-weight: 700;
    background: var(--surface);
    color: var(--ink);
}
.form-control-otp:focus { 
    border-color: var(--brand); 
    box-shadow: 0 0 0 4px rgba(15,157,118,0.14); 
    outline: none; 
}

.login-logo { width: 84px; height: auto; border-radius: 16px; }

/* Kotak info akun demo */
.demo-box {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-md);
}
.demo-box table { margin: 0; font-size: 0.84rem; }
.demo-box td { border: none; }
.demo-box .code {
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--brand-dark);
    font-weight: 600;
    font-size: 0.82rem;
    background: var(--brand-tint);
    padding: 2px 8px;
    border-radius: 7px;
    border: 1px solid #d6efe3;
}

/* Styling transparan khusus kotak demo di atas gambar sebelah kanan */
.demo-box-right {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-lg);
}

/* Responsif Layar Login pada perangkat Tablet & Mobile */
@media (max-width: 991.98px) {
    .login-body { 
        min-height: 100vh; 
        overflow-x: hidden; 
        overflow-y: auto; 
    }
    .login-bg {
        width: 100%;
        height: 100%;
        border-radius: 0;
        box-shadow: none;
        position: fixed;
        top: 0;
        left: 0;
    }
    .login-wrapper {
        min-height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 1.5rem;
    }
    .login-left {
        display: none;
    }
    .login-right {
        width: 100%;
        max-width: 400px;
        height: auto;
        padding: 0;
        overflow-y: visible;
        display: block;
    }
    .card-login-modern {
        background: rgba(255, 255, 255, 0.75) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(255, 255, 255, 0.5) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    }
}

/* =========================================================
   PRELOADER
   ========================================================= */
.loader-wrapper {
    position: fixed; inset: 0;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}
.loader-container { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.loader-logo { width: 120px; border-radius: 24px; box-shadow: var(--shadow-md); }
.loading-text {
    color: var(--brand-dark);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 10px;
    animation: pulseText 1.6s infinite alternate;
}
.progress-track {
    position: relative;
    width: 420px;
    height: 12px;
    background: #e2e8f0;
    border-radius: 40px;
    overflow: hidden;
}
.progress-fill {
    position: absolute;
    top: 0; left: -50%;
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    border-radius: 30px;
    animation: sweepingLight 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.glass-reflection {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}

@keyframes sweepingLight { 0% { left: -50%; } 100% { left: 100%; } }
@keyframes pulseText {
    0% { opacity: 0.55; }
    100% { opacity: 1; }
}
@keyframes pulseEffect {
    0% { opacity: 0.65; }
    50% { opacity: 1; }
    100% { opacity: 0.65; }
}

@media (max-width: 480px) {
    .progress-track { width: 260px; }
    .loading-text { font-size: 1.4rem; letter-spacing: 5px; }
}

/* =========================================================
   RESPONSIVE REFINEMENTS
   ========================================================= */
@media (max-width: 767.98px) {
    .card-body { padding: 16px !important; }
    .table th, .table td { padding: 12px 10px !important; font-size: 0.85rem; }
    .navbar-top { padding: 12px 14px; }
    .card-modern { border-radius: var(--radius) !important; }
    .btn { white-space: nowrap; }
}

/* Tombol & tautan area sentuh yang nyaman */
@media (hover: none) {
    .btn:hover, .btn-green:hover, .btn-verifikasi:hover, .btn-logout:hover { transform: none; }
}

/* =========================================================
   KOREKSI AYAT (marker merah pada nomor ayat yang salah)
   Hanya berlaku di dalam form (#koreksi-ayats) agar tidak
   menimpa blok ayat pada dashboard/report.
   ========================================================= */
#koreksi-ayats .koreksi-ayat {
    cursor: pointer;
    user-select: none;
    min-width: 42px;
    height: 42px;
    line-height: 38px;
    text-align: center;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #dee2e6;
    color: #212529;
    font-weight: 600;
    display: inline-block;
    font-size: 0.9rem;
    padding: 0 8px;
    transition: all 0.15s ease;
}
#koreksi-ayats .koreksi-ayat:hover {
    border-color: #198754;
    background: #f1f8f4;
}
#koreksi-ayats .koreksi-ayat.koreksi-salah,
#koreksi-ayats .koreksi-ayat.koreksi-salah:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Potongan ayat (teks koreksi yang salah) */
.koreksi-block {
    border: 1px solid #f1b8bd;
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    border-left: 4px solid #dc3545;
    box-shadow: 0 1px 4px rgba(220, 53, 69, 0.08);
}
.koreksi-block .koreksi-arab {
    font-family: 'LPMQ Isep Misbah', 'Scheherazade New', 'Amiri', 'Traditional Arabic', 'Times New Roman', serif;
    font-size: 1.55rem;
    line-height: 2.2;
    color: #212529;
    font-weight: normal;
    direction: rtl;
    text-align: right;
}
.koreksi-block .koreksi-arab .kata-salah {
    color: #dc3545;
    font-weight: 700;
    background: #ffeef0;
    border-radius: 4px;
    padding: 0 2px;
}
.koreksi-block .koreksi-indo {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}
.koreksi-block .koreksi-note {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #b02a37;
    background: #fff0f0;
    border-left: 3px solid #dc3545;
    padding: 6px 10px;
    border-radius: 6px;
}
.koreksi-block .koreksi-manual {
    border-color: #f1b8bd;
}

/* Pilihan radio bulat nomor ayat */
.koreksi-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.koreksi-radio-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #f1b8bd;
    background: #fff5f5;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.koreksi-radio-item:hover {
    background: #ffeef0;
}
.koreksi-radio-item:has(input:checked) {
    background: #ffeef0;
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
}
.koreksi-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 2px solid #b02a37;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.koreksi-radio:checked {
    background: #dc3545;
    border-color: #dc3545;
    box-shadow: inset 0 0 0 3px #ffffff;
}
.koreksi-radio-num {
    font-weight: 600;
    font-size: 0.9rem;
    color: #b02a37;
}
.koreksi-radio-item:has(input:checked) .koreksi-radio-num {
    color: #dc3545;
}
.koreksi-detail {
    display: none;
    border: 1px solid #f1b8bd;
    background: #ffffff;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}
.koreksi-block .koreksi-ayat {
    padding: 8px 0;
    border-bottom: 1px dashed #f1b8bd;
}
.koreksi-block .koreksi-ayat:last-child { border-bottom: none; padding-bottom: 0; }
.koreksi-block .koreksi-ayat:first-child { padding-top: 0; }
.koreksi-block .koreksi-head {
    color: #495057;
    font-size: 0.86rem;
    margin-bottom: 6px;
}
.koreksi-block .koreksi-head .fw-bold {
    color: #dc3545;
}

/* Blok ayat benar (default, saat semua ayat ditampilkan) */
.koreksi-block.koreksi-ok {
    border-color: #dee2e6;
    background: #f8f9fa;
    border-left: 5px solid #198754;
}
.koreksi-block.koreksi-ok .koreksi-arab {
    color: #212529;
}
.koreksi-block.koreksi-ok .koreksi-indo {
    color: #6c757d;
}

/* Badge "Koreksi" pada blok yang ditandai salah (legacy — hanya tampil di dalam .koreksi-salah) */
.koreksi-block.koreksi-salah .koreksi-badge {
    display: inline-block;
}

/* Blok ayat salah di preview form = blok merah penuh */
#koreksi-preview .koreksi-block.koreksi-salah {
    background: #dc3545;
    border: 1px solid #dc3545;
    border-left: 5px solid #b02a37;
    color: #ffffff;
}
#koreksi-preview .koreksi-block.koreksi-salah strong.text-danger {
    color: #ffffff !important;
}
#koreksi-preview .koreksi-block.koreksi-salah .koreksi-surah {
    color: #f8d7da;
}
#koreksi-preview .koreksi-block.koreksi-salah .koreksi-arab {
    color: #ffffff;
}
#koreksi-preview .koreksi-block.koreksi-salah .koreksi-indo {
    color: #ffe1e3;
}
#koreksi-preview .koreksi-block.koreksi-salah .koreksi-badge {
    background: #ffffff;
    color: #dc3545;
}
#koreksi-preview .koreksi-block.koreksi-salah .koreksi-manual {
    border-color: #ffffff;
    background: #fff;
}

/* Kartu laporan perkembangan (orang tua) */
.report-card {
    border: 1px solid var(--line) !important;
    border-left-width: 5px !important;
    border-radius: var(--radius-sm) !important;
}
.report-hafalan { border-left-color: #0d6efd !important; }
.report-murojaah { border-left-color: var(--brand) !important; }
.report-iqro { border-left-color: var(--warning) !important; }
.report-ujian { border-left-color: #dc2626 !important; }

.report-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 4px;
}
.report-value { font-weight: 700; color: var(--ink); font-size: 0.95rem; }

.report-note {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--ink);
    font-size: 0.88rem;
}

.koreksi-line {
    padding: 6px 0;
    border-bottom: 1px dashed #f1b8bd;
    color: #b02a37;
    font-size: 0.86rem;
}
.koreksi-line:last-child { border-bottom: none; padding-bottom: 0; }
.koreksi-line:first-child { padding-top: 0; }

/* =========================================================
   KOREKSI V4 — WORD-LEVEL, NO PILL
   ========================================================= */

/* Surah header */
.ayat-surah-header {
    font-weight: 700;
    color: #0f766e;
    font-size: 0.95rem;
    padding: 10px 0 4px 0;
    border-bottom: 2px solid #ccfbf1;
    margin-bottom: 6px;
}

/* Baris ayat */
.koreksi-ayat-row {
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 10px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s;
}
.koreksi-ayat-row:hover {
    border-color: #93c5fd;
}
.koreksi-ayat-row-header {
    display: flex;
    align-items: flex-start;
    padding: 12px 14px;
    gap: 12px;
}
.koreksi-ayat-num {
    min-width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
    font-size: 0.82rem;
    border: 2px solid #bfdbfe;
    flex-shrink: 0;
}
.play-ayat-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
    border: 2px solid #198754;
    color: #198754;
    background: #f0fdf4;
}
.play-ayat-btn:hover {
    background: #198754;
    color: #fff;
}

/* Kata-kata Arab */
.koreksi-ayat-words {
    font-family: 'LPMQ Isep Misbah', 'Scheherazade New', 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.45rem;
    line-height: 2.2;
    color: #1f2937;
    text-align: right;
    direction: rtl;
    flex: 1;
    cursor: default;
}
.koreksi-word {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    display: inline;
}
.koreksi-word:hover {
    background: #f0f9ff;
}
.koreksi-word.word-active {
    background: #dbeafe;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
}
.koreksi-word.word-salah {
    background: #fecaca;
    color: #991b1b;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 4px;
    border-bottom: 2px solid #dc2626;
    display: inline;
}

/* Tags koreksi inline per kata (di dropdown) */
.koreksi-word-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.koreksi-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid;
}
.koreksi-tag-kat {
    font-weight: 400;
    opacity: 0.75;
}
.korecsi-tag-remove {
    background: none;
    border: none;
    color: inherit;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0 0 0 3px;
    cursor: pointer;
    opacity: 0.6;
}
.koreksi-tag-remove:hover { opacity: 1; }

/* Dropdown 2 level */
.koreksi-ayat-dropdown {
    border-top: 1px solid #e5e7eb;
    padding: 12px 14px;
    background: #f9fafb;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.koreksi-dropdown-title {
    width: 100%;
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 2px;
}
.koreksi-kategori-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 22px;
    border: 2px solid #d1d5db;
    background: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.koreksi-kategori-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.koreksi-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 0.82rem;
    color: #6b7280;
    cursor: pointer;
}
.koreksi-back-btn:hover { background: #f3f4f6; }
.koreksi-opsi-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #d1d5db;
    background: #fff;
    font-size: 0.82rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.koreksi-opsi-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.koreksi-opsi-selected {
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.18);
}

/* Badge koreksi di dashboard */
.koreksi-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 576px) {
    .koreksi-ayat-row-header { padding: 10px 12px; gap: 8px; }
    .koreksi-ayat-words { font-size: 1.2rem; }
    .koreksi-ayat-dropdown { padding: 10px 12px; }
}

/* =========================================================
   BOTTOM NAVIGATION (Mobile)
   ========================================================= */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    /* Padding bawah ekstra untuk home indicator iPhone (iOS) agar sama
       seperti Android yang punya area sistem sendiri. Butuh viewport-fit=cover. */
    padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 6px);
}

.bottom-nav .nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bottom-nav .nav-items li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.bottom-nav .nav-items a,
.bottom-nav .nav-items button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 4px 2px;
    border: none;
    background: none;
    border-radius: 8px;
    transition: color 0.2s;
    width: 100%;
    line-height: 1.2;
}

.bottom-nav .nav-items a .bi,
.bottom-nav .nav-items a .fas,
.bottom-nav .nav-items button .bi,
.bottom-nav .nav-items button .fas {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.bottom-nav .nav-items a.active,
.bottom-nav .nav-items a.text-success {
    color: var(--brand) !important;
    font-weight: 700;
}

/* Dropdown menu dari bottom nav "Lainnya" */
.bottom-nav .dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    border-radius: var(--radius) var(--radius) 0 0;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    padding: 8px 0;
    max-height: 55vh;
    overflow-y: auto;
}

.bottom-nav .dropdown-menu .dropdown-item {
    padding: 10px 16px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.bottom-nav .dropdown-menu .dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--brand);
}

.bottom-nav .dropdown-menu .dropdown-item:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

@media (max-width: 767.98px) {
    .bottom-nav { display: block; }
    .wrapper #sidebar { display: none !important; }
    .wrapper #sidebar.active { display: block !important; position: fixed; top: 0; left: 0; width: 260px; height: 100vh; z-index: 1100; background: #fff; overflow-y: auto; box-shadow: var(--shadow-lg); }
    #content { padding-bottom: 80px !important; }
    #sidebarCollapse { display: none !important; }
}

@media (min-width: 768px) {
    .bottom-nav { display: none !important; }
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
    body { background: #ffffff; color: #000000; }
    .card-modern { box-shadow: none !important; border: none !important; }
    #sidebar, .navbar-top, .btn { display: none !important; }
    #content { padding: 0 !important; }
    .table thead th { background-color: #f1f5f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .header-kelas { background: var(--brand) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; border: none !important; }
}
/* =========================================================
   MODE GELAP — diatur dari halaman Profil (data-theme="dark")
   ========================================================= */
[data-theme="dark"] {
    --ink: #e6edf6;
    --muted: #94a5bc;
    --line: #24314a;
    --bg: #0b1220;
    --surface: #121c30;
    --brand-soft: #14382e;
    --brand-tint: #0f1b2a;
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--ink);
}
[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
[data-theme="dark"] .card,
[data-theme="dark"] .card-modern { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .modal-content { background: var(--surface); color: var(--ink); }
[data-theme="dark"] .navbar-top {
    background: rgba(18, 28, 48, 0.92);
    border-bottom-color: var(--line);
    box-shadow: none;
}
[data-theme="dark"] .bottom-nav {
    background: rgba(16, 26, 45, 0.96);
    border-top-color: var(--line);
}
[data-theme="dark"] .bottom-nav .nav-items li a { color: #8fa3bf; }
[data-theme="dark"] .bottom-nav .nav-items li a.active,
[data-theme="dark"] .bottom-nav .nav-items li a.active span { color: var(--brand) !important; }
[data-theme="dark"] #sidebar {
    background: linear-gradient(180deg, #07231c 0%, #04120e 100%);
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #0d1626;
    border-color: var(--line);
    color: var(--ink);
}
[data-theme="dark"] .form-control::placeholder { color: #5d6d88; }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background: #0d1626;
    color: var(--ink);
}
[data-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ink);
    --bs-table-border-color: var(--line);
}
[data-theme="dark"] .table > :not(caption) > * > * { background-color: transparent; }
[data-theme="dark"] .text-muted { color: var(--muted) !important; }
[data-theme="dark"] .text-dark { color: var(--ink) !important; }
[data-theme="dark"] .accordion-item { background: transparent; border-color: var(--line); }
[data-theme="dark"] .accordion-button { background: var(--surface); color: var(--ink); }
[data-theme="dark"] .accordion-button:not(.collapsed) { background: var(--brand-soft); color: #c9ecd9; }
[data-theme="dark"] .alert-light { background: var(--surface); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .btn-outline-secondary { color: var(--muted); border-color: var(--line); }
[data-theme="dark"] .btn-outline-success:not(:hover) { color: #7ee2c0; border-color: #1d5c47; }
[data-theme="dark"] ::placeholder { color: #5d6d88 !important; opacity: 1; }

/* =========================================================
   MODE GELAP LANJUTAN — penyesuaian tulisan & latar inline
   ========================================================= */
/* Tulisan gelap -> terang (menyasar style="" di template) */
[data-theme="dark"] [style*="color:#0f172a"], [data-theme="dark"] [style*="color: #0f172a"],
[data-theme="dark"] [style*="color:#1e293b"], [data-theme="dark"] [style*="color: #1e293b"],
[data-theme="dark"] [style*="color:#052e24"], [data-theme="dark"] [style*="color: #052e24"] { color: var(--ink) !important; }
[data-theme="dark"] [style*="color:#334155"], [data-theme="dark"] [style*="color: #334155"] { color: #c6d2e2 !important; }
[data-theme="dark"] [style*="color:#475569"], [data-theme="dark"] [style*="color: #475569"],
[data-theme="dark"] [style*="color:#64748b"], [data-theme="dark"] [style*="color: #64748b"],
[data-theme="dark"] [style*="color:#6b7280"], [data-theme="dark"] [style*="color: #6b7280"],
[data-theme="dark"] [style*="color:#94a3b8"], [data-theme="dark"] [style*="color: #94a3b8"] { color: var(--muted) !important; }

/* Aksen gelap diterangkan agar kontras di latar gelap */
[data-theme="dark"] [style*="color:#991b1b"] { color: #fca5a5 !important; }
[data-theme="dark"] [style*="color:#c2410c"], [data-theme="dark"] [style*="color:#ea580c"] { color: #fdba74 !important; }
[data-theme="dark"] [style*="color:#d97706"] { color: #fbbf24 !important; }
[data-theme="dark"] [style*="color:#dc2626"] { color: #f87171 !important; }
[data-theme="dark"] [style*="color:#16a34a"] { color: #4ade80 !important; }
[data-theme="dark"] [style*="color:#198754"] { color: #34d399 !important; }
[data-theme="dark"] [style*="color:#0b7a5c"] { color: #6ee7b7 !important; }
[data-theme="dark"] [style*="color:#2563eb"] { color: #60a5fa !important; }
[data-theme="dark"] [style*="color:#1d4ed8"] { color: #93c5fd !important; }
[data-theme="dark"] [style*="color:#0284c7"] { color: #7dd3fc !important; }
[data-theme="dark"] [style*="color:#7c3aed"] { color: #c4b5fd !important; }
[data-theme="dark"] [style*="color:#9333ea"] { color: #d8b4fe !important; }

/* Latar putih / abu terang -> permukaan gelap */
[data-theme="dark"] [style*="background:#fff"], [data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#ffffff"], [data-theme="dark"] [style*="background: #ffffff"] { background-color: var(--surface) !important; }
[data-theme="dark"] [style*="background:#f8fafc"], [data-theme="dark"] [style*="background: #f8fafc"],
[data-theme="dark"] [style*="background:#f1f5f9"], [data-theme="dark"] [style*="background: #f1f5f9"],
[data-theme="dark"] [style*="background:#f3f6f4"], [data-theme="dark"] [style*="background: #f3f6f4"] { background-color: #101a2e !important; }

/* Latar pastel chip/badge -> versi transparan gelap */
[data-theme="dark"] [style*="background:#dbeafe"] { background-color: rgba(37, 99, 235, 0.18) !important; }
[data-theme="dark"] [style*="background:#fee2e2"] { background-color: rgba(220, 38, 38, 0.15) !important; }
[data-theme="dark"] [style*="background:#fef3c7"] { background-color: rgba(217, 119, 6, 0.14) !important; }
[data-theme="dark"] [style*="background:#ffedd5"] { background-color: rgba(234, 88, 12, 0.14) !important; }
[data-theme="dark"] [style*="background:#f3e8ff"] { background-color: rgba(147, 51, 234, 0.14) !important; }
[data-theme="dark"] [style*="background:#fecaca"] { background-color: rgba(220, 38, 38, 0.22) !important; }
[data-theme="dark"] [style*="background:#dcfce7"], [data-theme="dark"] [style*="background:#d1fae5"],
[data-theme="dark"] [style*="background:#e7f8f1"], [data-theme="dark"] [style*="background:#f0fdf4"] { background-color: rgba(22, 163, 74, 0.13) !important; }
[data-theme="dark"] [style*="background:#e0f2fe"] { background-color: rgba(2, 132, 199, 0.15) !important; }

/* Komponen internal style.css yang berlatar putih */
[data-theme="dark"] .table thead th {
    background-color: #182238 !important;
    color: var(--ink);
    border-color: var(--line);
}
[data-theme="dark"] .role-btn,
[data-theme="dark"] .koreksi-block,
[data-theme="dark"] .koreksi-detail,
[data-theme="dark"] .koreksi-radio,
[data-theme="dark"] .koreksi-kategori-btn,
[data-theme="dark"] .koreksi-back-btn,
[data-theme="dark"] .koreksi-opsi-btn,
[data-theme="dark"] .koreksi-ayat-row,
[data-theme="dark"] #koreksi-ayats .koreksi-ayat,
[data-theme="dark"] #koreksi-preview .koreksi-block.koreksi-salah .koreksi-badge,
[data-theme="dark"] #koreksi-preview .koreksi-block.koreksi-salah .koreksi-manual,
[data-theme="dark"] .report-note {
    background-color: var(--surface) !important;
    color: var(--ink);
    border-color: var(--line);
}

/* Teks & komponen koreksi per-kata agar terbaca di mode gelap */
[data-theme="dark"] .ayat-surah-header {
    color: #6ee7b7;
    border-bottom-color: #134e4a;
}
[data-theme="dark"] .koreksi-ayat-words,
[data-theme="dark"] .koreksi-word { color: var(--ink) !important; }
[data-theme="dark"] .koreksi-word:hover { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .koreksi-word.word-active {
    background: rgba(37,99,235,0.35);
    box-shadow: 0 0 0 2px rgba(96,165,250,0.35);
}
[data-theme="dark"] .koreksi-word.word-salah {
    background: rgba(220,38,38,0.25);
    color: #fecaca !important;
    border-bottom-color: #f87171;
}
[data-theme="dark"] .koreksi-ayat-num {
    background: #182238;
    color: #7dd3fc;
    border-color: #1d4ed8;
}
[data-theme="dark"] .play-ayat-btn {
    background: #0d1626;
    color: #34d399;
    border-color: #34d399;
}
[data-theme="dark"] .play-ayat-btn:hover { background: #198754; color: #fff; }
[data-theme="dark"] .koreksi-ayat-dropdown {
    background: #0d1626;
    border-top-color: var(--line);
}
[data-theme="dark"] .koreksi-dropdown-title { color: var(--muted); }
[data-theme="dark"] .koreksi-kategori-btn,
[data-theme="dark"] .koreksi-back-btn,
[data-theme="dark"] .koreksi-opsi-btn {
    background: var(--surface) !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
}
[data-theme="dark"] .koreksi-kategori-btn:hover,
[data-theme="dark"] .koreksi-back-btn:hover,
[data-theme="dark"] .koreksi-opsi-btn:not(.koreksi-opsi-selected):hover {
    background: #1b2740 !important;
    border-color: #33415c !important;
}
[data-theme="dark"] .koreksi-word-tags .koreksi-tag-badge { color: var(--ink); }
[data-theme="dark"] .wrapper #sidebar.active {
    background: linear-gradient(180deg, #07231c 0%, #04120e 100%) !important;
}

/* Komponen Bootstrap umum */
[data-theme="dark"] .list-group-item { background: var(--surface); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .nav-tabs { border-bottom-color: var(--line); }
[data-theme="dark"] .nav-tabs .nav-link { color: var(--muted); }
[data-theme="dark"] .nav-tabs .nav-link:hover { border-color: var(--line); }
[data-theme="dark"] .nav-tabs .nav-link.active {
    background: var(--surface); color: var(--ink); border-color: var(--line) var(--line) var(--surface);
}
[data-theme="dark"] .btn-light { background: #1b2740; border-color: var(--line); color: var(--ink); }
[data-theme="dark"] .badge.bg-light, [data-theme="dark"] .bg-light { background-color: #1b2740 !important; }
[data-theme="dark"] .dropdown-menu { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .dropdown-item { color: var(--ink); }
[data-theme="dark"] .dropdown-item:hover { background: rgba(255,255,255,.06); color: var(--ink); }
[data-theme="dark"] .modal-header, [data-theme="dark"] .modal-footer { border-color: var(--line); }
[data-theme="dark"] hr { border-color: var(--line); opacity: 1; }

/* Kunci pewarisan warna konten utama agar tak ada teks gelap tersisa */
[data-theme="dark"] #content,
[data-theme="dark"] .wrapper,
[data-theme="dark"] main { color: var(--ink); }
[data-theme="dark"] [style*="background:#fff"], [data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#ffffff"], [data-theme="dark"] [style*="background: #ffffff"] {
    background-color: var(--surface) !important;
}

/* Badge *-subtle & komponen halaman Absensi Guru dalam mode gelap */
[data-theme="dark"] .bg-primary-subtle { background-color: rgba(13, 110, 253, 0.22) !important; }
[data-theme="dark"] .badge.bg-primary-subtle { color: #93c5fd !important; }
[data-theme="dark"] .bg-success-subtle { background-color: rgba(15, 157, 118, 0.2) !important; }
[data-theme="dark"] .badge.bg-success-subtle { color: #6ee7b7 !important; }
[data-theme="dark"] .bg-warning-subtle { background-color: rgba(217, 119, 6, 0.2) !important; }
[data-theme="dark"] .badge.bg-warning-subtle { color: #fbbf24 !important; }
[data-theme="dark"] .bg-danger-subtle { background-color: rgba(220, 38, 38, 0.2) !important; }
[data-theme="dark"] .badge.bg-danger-subtle { color: #f87171 !important; }
[data-theme="dark"] .bg-info-subtle { background-color: rgba(8, 145, 178, 0.22) !important; }
[data-theme="dark"] .badge.bg-info-subtle { color: #67e8f9 !important; }
[data-theme="dark"] .bg-secondary-subtle { background-color: rgba(100, 116, 139, 0.28) !important; }
[data-theme="dark"] .badge.bg-secondary-subtle,
[data-theme="dark"] .text-secondary { color: #aab8cc !important; }
[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: transparent;
    background-color: rgba(255, 255, 255, 0.045);
}

/* Badge jumlah notifikasi pada icon lonceng */
.notif-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    outline: 1.5px solid rgba(255, 255, 255, 0.85);
}
[data-theme="dark"] .notif-badge { border-color: var(--surface); }

/* Kartu notifikasi belum dibaca */
.notif-unread { border: 1.5px solid rgba(15, 157, 118, 0.35) !important; background: var(--brand-tint) !important; }
[data-theme="dark"] .notif-unread { background: rgba(15, 157, 118, 0.12) !important; }

/* Modal assign siswa ke halaqoh */
.assign-list-wrap {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 6px;
}
.assign-row-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s ease;
}
.assign-row-item:hover {
    background: #f0faf4;
}
.assign-row-item:has(input:checked) {
    background: #e8f8f0;
}
.assign-row-name {
    font-weight: 500;
    font-size: 0.88rem;
    color: #1a1a1a;
}
.assign-row-nisn {
    font-size: 0.75rem;
    color: #6c757d;
    margin-left: auto;
    white-space: nowrap;
}
.assign-row-item:has(input:checked) .assign-row-name {
    color: #0b7a5c;
    font-weight: 600;
}
.assign-list-wrap .form-check-input:checked {
    background-color: #0f9d76;
    border-color: #0f9d76;
}
[data-theme="dark"] .assign-list-wrap {
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .assign-row-item:hover {
    background: rgba(15, 157, 118, 0.1);
}
[data-theme="dark"] .assign-row-item:has(input:checked) {
    background: rgba(15, 157, 118, 0.15);
}
[data-theme="dark"] .assign-row-name { color: #e0e0e0; }
[data-theme="dark"] .assign-row-nisn { color: #9aa5b4; }
[data-theme="dark"] .assign-row-item:has(input:checked) .assign-row-name { color: #4dd9a8; }

/* =========================================================
   MAINTENANCE PAGE
   ========================================================= */
.maintenance-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e7f6f0 0%, #d1eed8 40%, #b8e6c8 100%);
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    position: relative;
}

.maintenance-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(15, 157, 118, 0.08);
    animation: maintenance-float 20s infinite ease-in-out;
}
.particle-1 { width: 300px; height: 300px; top: -80px; left: -60px; animation-delay: 0s; }
.particle-2 { width: 200px; height: 200px; top: 60%; right: -50px; animation-delay: -5s; background: rgba(15, 157, 118, 0.06); }
.particle-3 { width: 150px; height: 150px; bottom: -40px; left: 30%; animation-delay: -10s; }
.particle-4 { width: 100px; height: 100px; top: 20%; right: 20%; animation-delay: -7s; background: rgba(14, 165, 160, 0.06); }
.particle-5 { width: 250px; height: 250px; top: 10%; left: 50%; animation-delay: -3s; background: rgba(15, 157, 118, 0.04); }

@keyframes maintenance-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-15px, 25px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

.maintenance-container {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    max-width: 440px;
    width: 100%;
}

.maintenance-logo-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 2rem;
}

.maintenance-gear-outer {
    position: relative;
    width: 140px;
    height: 140px;
}

.maintenance-gear {
    position: absolute;
    inset: -18px;
    color: var(--brand);
    opacity: 0.18;
    animation: maintenance-spin 12s linear infinite;
}

.maintenance-gear svg {
    width: 100%;
    height: 100%;
}

@keyframes maintenance-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.maintenance-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(15, 157, 118, 0.25));
    animation: maintenance-breathe 3s ease-in-out infinite;
}

@keyframes maintenance-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.maintenance-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(15, 157, 118, 0.1);
    animation: maintenance-pulse-ring 3s ease-out infinite;
}

@keyframes maintenance-pulse-ring {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

.maintenance-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-deep);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.maintenance-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(15, 157, 118, 0.3);
    margin-bottom: 1.5rem;
}

.maintenance-desc {
    font-size: 0.95rem;
    color: #4a6358;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.maintenance-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    border-radius: 3px;
    margin: 0 auto 1.5rem;
}

.maintenance-info {
    margin-bottom: 2rem;
}

.maintenance-info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #5a7a6a;
}

.maintenance-info-item svg {
    color: var(--brand);
    flex-shrink: 0;
}

.maintenance-footer {
    font-size: 0.75rem;
    color: #8aaa9a;
    font-weight: 500;
    letter-spacing: 0.02em;
}

@media (max-width: 480px) {
    .maintenance-logo-wrap { width: 120px; height: 120px; }
    .maintenance-gear-outer { width: 120px; height: 120px; }
    .maintenance-logo { width: 75px; height: 75px; }
    .maintenance-pulse { width: 100px; height: 100px; }
    .maintenance-title { font-size: 1.5rem; }
    .maintenance-desc { font-size: 0.88rem; }
    .particle-1 { width: 200px; height: 200px; }
    .particle-2 { width: 140px; height: 140px; }
    .particle-5 { width: 180px; height: 180px; }
}

/* =========================================================
   LAYOUT PER PLATFORM (desktop / android / ios)
   =========================================================
   Class ditulis di <body> oleh folder template:
     templates/desktop/*  -> layout-desktop
     templates/android/*  -> layout-mobile os-android role-guru | role-ortu
     templates/ios/*      -> layout-mobile os-ios       role-guru | role-ortu
   Guru mobile memakai bottom-nav di HP MAUPUN tablet.
   Orang tua mobile tetap memakai drawer sidebar (tanpa bottom-nav).
   Desktop memakai sidebar dan menyembunyikan bottom-nav.
   ========================================================= */

/* --- Mobile umum (guru) --- */
.layout-mobile .wrapper #sidebar { display: none !important; }
.layout-mobile .bottom-nav { display: block !important; }
.layout-mobile #content {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
}

/* --- Orang tua mobile: tanpa bottom-nav, sidebar sebagai drawer --- */
.layout-mobile.role-ortu .wrapper #sidebar {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1045;
    transform: translateX(-100%);
}
.layout-mobile.role-ortu .wrapper #sidebar.active { transform: translateX(0); }
.layout-mobile.role-ortu .bottom-nav { display: none !important; }
.layout-mobile.role-ortu #sidebarCollapse { display: flex !important; }
.layout-mobile.role-ortu #content {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
}

/* --- Desktop --- */
.layout-desktop .bottom-nav { display: none !important; }
.layout-desktop .wrapper #sidebar { display: flex !important; }

/* --- Penanda "sudah dibaca orang tua" (centang ala WhatsApp) --- */
.rc-check {
    font-size: 0.95rem;
    line-height: 1;
    white-space: nowrap;
    cursor: default;
}
.rc-check .fas { margin-left: 2px; }
.rc-belum { color: #94a3b8; }
.rc-sudah { color: #2563eb; }
.rc-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.02em;
}
.rc-waktu {
    font-size: 0.62rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* --- Popup detail "kapan dibaca" --- */
.rc-popup {
    position: fixed;
    z-index: 9999;
    min-width: 220px;
    max-width: 320px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    padding: 12px 14px;
    font-family: 'Segoe UI', -apple-system, 'Helvetica Neue', Arial, sans-serif;
    pointer-events: auto;
}
.rc-popup .rc-arrow {
    position: absolute;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    transform: rotate(45deg);
}
.rc-popup.arrow-atas .rc-arrow { bottom: -6px; }
.rc-popup:not(.arrow-atas) .rc-arrow { top: -6px; }
.rc-popup-tit {
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}
.rc-popup-waktu {
    font-size: 0.78rem;
    color: #334155;
    line-height: 1.4;
}
.rc-popup-ket {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}
