/* File: guru.css */
/* ==========================================
FILE: guru.css
FUNGSI: Gaya Visual, Tata Letak, Tema, dan Animasi Portal Pengajar
========================================== */

:root {
    --bg-body: #F8FAFC;
    --bg-surface: #FFFFFF;
    --border-color: #E2E8F0;
    --border-focus: #93C5FD;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-light: #EFF6FF;
    --success: #10B981;
    --success-hover: #059669;
    --success-bg: #ECFDF5;
    --success-text: #047857;
    --warning: #F59E0B;
    --warning-hover: #D97706;
    --warning-bg: #FFFBEB;
    --warning-text: #B45309;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;
    --danger-text: #B91C1C;
    --purple: #8B5CF6;
    --purple-bg: #F5F3FF;
    --purple-text: #5B21B6;
    --premium-gold: #D97706;
    --premium-gold-light: #FDE68A;
    --premium-gold-bg: #FFFBEB;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-focus: 0 0 0 3px rgba(37,99,235, 0.2);
    --shadow-premium: 0 10px 25px -5px rgba(217,119,6, 0.4);
    --bottom-nav-height: 65px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    outline: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

h1, h2, h3, h4, h5 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-muted {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
}

/* KOMPONEN TOMBOL UTAMA */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.btn:hover:not(:disabled) {
    background: #F1F5F9;
    color: var(--text-main); 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.btn:focus-visible {
    box-shadow: var(--shadow-focus);
    border-color: var(--primary);
}

.btn:active:not(:disabled) {
    transform: translateY(1px) !important; 
    box-shadow: none !important;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #ffffff !important;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #ffffff;
}

.btn-success:hover:not(:disabled) {
    background: var(--success-hover) !important;
    border-color: var(--success-hover) !important;
    color: #ffffff !important;
}

.btn-warning {
    background: var(--warning);
    border-color: var(--warning);
    color: #ffffff;
}

.btn-warning:hover:not(:disabled) {
    background: var(--warning-hover) !important;
    border-color: var(--warning-hover) !important;
    color: #ffffff !important;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
    background: #DC2626 !important;
    border-color: #DC2626 !important;
    color: #ffffff !important;
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover:not(:disabled) {
    background: #F8FAFC !important;
    color: var(--text-main) !important;
}

.btn-ghost {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
    background: #F1F5F9 !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
    transform: none !important;
}

.btn-premium {
    background: linear-gradient(135deg, var(--premium-gold) 0%, #F59E0B 100%);
    color: #ffffff;
    border: 0;
    box-shadow: var(--shadow-premium);
    font-weight: 800;
    border-radius: var(--radius-xl);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-premium:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--premium-gold) 0%, #F59E0B 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 30px -5px rgba(217, 119, 6, 0.5) !important;
    color: #ffffff !important;
    z-index: 10;
}

#container-absensi-qr {
    padding-top: 4px;
}

.input-group { margin-bottom: 16px; }

.input-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-field, .form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-main);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input-field::placeholder, .form-control::placeholder { color: var(--text-light); }
.input-field:focus, .form-control:focus { border-color: var(--primary); box-shadow: var(--shadow-focus); }
textarea.input-field { min-height: 80px; resize: vertical; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip-btn {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
    flex: 1;
    text-align: center;
}
.chip-btn:hover { background: #F1F5F9; color: var(--text-main); }
.chip-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* Komponen Khusus Modul Tahsin */
.page-counter {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 42px;
}
.page-counter button {
    width: 44px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F8FAFC;
    border: none;
    border-right: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s;
}
.page-counter button:last-child { border-right: none; border-left: 1px solid var(--border-color); }
.page-counter button:active { background: #E2E8F0; }
.page-counter input {
    flex: 1;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    font-family: monospace;
    color: var(--primary);
    background: transparent;
}

.chip-status {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.chip-status.active.status-lanjut { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.chip-status.active.status-ulang { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }

.badge-outline-action {
    display: inline-block;
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.badge-outline-action:hover { background: var(--primary-light); border-color: var(--border-focus); color: var(--primary); }
.badge-outline-action:active { background: #E2E8F0; }

/* Komponen Khusus Modul Kesantrian */
.pill-nav {
    display: flex;
    background: #F1F5F9;
    padding: 4px;
    border-radius: var(--radius-md);
    gap: 4px;
    width: 100%;
    margin-bottom: 16px;
}
.pill-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.pill-btn.active { background: var(--bg-surface); color: var(--primary); box-shadow: var(--shadow-sm); }

.custom-select-wrapper { position: relative; user-select: none; width: 100%; z-index: 10; transition: z-index 0.2s; }
.custom-select { position: relative; display: flex; flex-direction: column; }
.custom-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s;
}
.custom-select.open .custom-select__trigger { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.custom-options {
    position: absolute;
    display: block;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: all 0.15s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 50;
    max-height: 250px;
    overflow-y: auto;
}
.custom-select.open .custom-options { opacity: 1; visibility: visible; pointer-events: all; }
.custom-option {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.1s;
}
.custom-option:not(:last-child) { border-bottom: 1px solid #F1F5F9; }
.custom-option:hover { background: #F8FAFC; color: var(--primary); }
.custom-option.selected { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.custom-option-group {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
    background: #F8FAFC;
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    letter-spacing: 0.05em;
}
.custom-option-group:first-child { border-top: none; }

.arrow-icon { width: 16px; height: 16px; transition: transform 0.2s; color: var(--text-muted); }
.custom-select.open .arrow-icon { transform: rotate(180deg); color: var(--primary); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-hadir, .badge-success { background: var(--success-bg); color: var(--success); border: 1px solid #A7F3D0; }
.badge-terlambat, .badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #FDE68A; }
.badge-alpa, .badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #FECACA; }
.badge-neutral { background: #F1F5F9; color: var(--text-muted); border: 1px solid var(--border-color); }

.pill { display: inline-flex; align-items: center; border-radius: var(--radius-md); font-weight: 600; border: 1px solid transparent; }
.pill-excelent { background: var(--success-bg); color: var(--success-text); border-color: #A7F3D0; }
.pill-good { background: var(--primary-light); color: var(--primary); border-color: var(--border-focus); }
.pill-fair { background: var(--warning-bg); color: var(--warning-text); border-color: #FDE68A; }
.pill-poor { background: var(--danger-bg); color: var(--danger-text); border-color: #FECACA; }

.mini-progress-track { width: 100%; height: 4px; background: #E2E8F0; border-radius: var(--radius-full); overflow: hidden; margin-top: 8px; }
.mini-progress-fill { height: 100%; background: var(--primary); border-radius: var(--radius-full); width: 0; transition: width 1s ease; }

.view-section { display: none; width: 100%; min-height: 100vh; background: var(--bg-body); }
.view-section.active { display: block; animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1); }

.tab-content { display: none; animation: fadeIn 0.3s ease-out; }
.tab-content.active { display: block; }
.tab-content.slide-left { animation: slideInLeft 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.tab-content.slide-right { animation: slideInRight 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }

/* HEADER UTAMA PORTAL GURU: z-index 120 agar tidak pernah tertutup kartu atau search bar saat scroll */
.app-bar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 120;
}
.app-bar-brand {
    font-size: 16px;
    font-weight: 600; 
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}
.app-bar-brand .logo-icon { color: var(--primary); }

.dashboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px calc(var(--bottom-nav-height) + 20px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 6px -1px rgba(0,0,0, 0.05);
    padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
}
.nav-item:hover { color: var(--text-muted); }
.nav-item.active { color: var(--primary); }
.nav-item.active i { transform: scale(1.15); stroke-width: 2.5; }
.nav-item i { width: 22px; height: 22px; transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }

.badge-notif {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    height: 18px;
    min-width: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
    padding: 0 4px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.search-sticky-wrapper {
    position: sticky;
    top: 56px;
    z-index: 40;
    background: var(--bg-body);
    padding: 12px 20px;
    margin: 0 -20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
}
.search-sticky-wrapper.scrolled {
    padding: 8px 20px;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.login-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: linear-gradient(135deg, #F8FAFC 0, #E2E8F0 100%); }
.login-card, .safety-card { width: 100%; max-width: 380px; text-align: center; background: var(--bg-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, 0.8); }
.login-card { padding: 48px 32px; }
.safety-card { padding: 32px 24px; border-top: 4px solid var(--danger); margin-bottom: 24px; }
.logo-box { width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary) 0, #3B82F6 100%); border-radius: 20px; margin: 0 auto 24px; display: flex; align-items: center; justify-content: center; color: #ffffff; box-shadow: 0 8px 15px -3px rgba(37, 99, 235, 0.3); }

.section-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 4px; }
.class-selector-card { background: var(--primary-light); border: 1px solid var(--border-focus); padding: 16px; border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 8px; }

.student-list { display: flex; flex-direction: column; gap: 16px; }
.student-list.grid-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: stretch; gap: 12px; }

.student-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s, border-color 0.2s;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}
.student-card:active { transform: scale(0.98); background-color: #F8FAFC; }
.student-card:hover { box-shadow: var(--shadow-md); border-color: #CBD5E1; }

.student-header { display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; flex-direction: column; }
.student-name { font-size: 16px; font-weight: 700; color: var(--text-main); line-height: 1.2; margin-bottom: 4px; }
.student-meta { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; width: 100%; justify-content: space-between; }

.card-primary-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.card-secondary-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-color); }
.action-text { display: inline; }

.student-list.grid-view .student-card { padding: 12px; }
.student-list.grid-view .student-name { font-size: 14px; }
.student-list.grid-view .student-meta { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 12px; }
.student-list.grid-view .card-primary-actions { flex-direction: column; gap: 6px; }
.student-list.grid-view .card-primary-actions .btn { width: 100%; padding: 8px; font-size: 12px; }
.student-list.grid-view .card-secondary-actions { justify-content: center; gap: 4px; }
.student-list.grid-view .card-secondary-actions .btn { flex: 1; padding: 8px; }
.student-list.grid-view .card-secondary-actions .action-text { display: none; }

.timeline { display: flex; flex-direction: column; gap: 16px; position: relative; padding-left: 12px; }
.timeline::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 0; width: 2px; background: var(--border-color); border-radius: 2px; }
.timeline-item { position: relative; padding-left: 20px; }
.timeline-item::before { content: ''; position: absolute; left: -5px; top: 6px; width: 12px; height: 12px; background: var(--bg-surface); border: 2px solid var(--primary); border-radius: 50%; box-shadow: 0 0 0 3px var(--bg-body); z-index: 2; }
.timeline-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px; box-shadow: var(--shadow-sm); display: flex; justify-content: space-between; align-items: flex-start; }

.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(6px); z-index: 2000; display: none; justify-content: center; align-items: center; padding: 20px; opacity: 0; transition: opacity 0.25s ease; }
.modal-overlay.active { display: flex; opacity: 1; }
.modal-container { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; transform: scale(0.95); transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); background: var(--bg-body); border-radius: var(--radius-xl); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.modal-overlay.active .modal-container { transform: scale(1); }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; background: var(--bg-surface); position: sticky; top: 0; z-index: 20; }
.modal-body { padding: 24px; }

.flex-row { display: flex; gap: 16px; }
.flex-row > * { flex: 1; min-width: 0; }

.chat-history { display: flex; flex-direction: column; gap: 12px; }
.chat-row { display: flex; flex-direction: column; max-width: 85%; }
.chat-row.guru { align-self: flex-end; align-items: flex-end; }
.chat-row.ortu { align-self: flex-start; align-items: flex-start; }
.chat-bubble { padding: 10px 14px; font-size: 13px; line-height: 1.5; position: relative; box-shadow: var(--shadow-sm); }
.chat-row.guru .chat-bubble { background: var(--primary); color: #ffffff; border-radius: 12px 12px 2px 12px; }
.chat-row.ortu .chat-bubble { background: var(--bg-surface); border: 1px solid var(--border-color); color: var(--text-main); border-radius: 12px 12px 12px 2px; }
.chat-meta { font-size: 10px; color: var(--text-light); margin-top: 4px; font-weight: 500; display: flex; align-items: center; gap: 4px; }

.table-rekap th, .table-rekap td { padding: 12px 16px; border-bottom: 1px solid var(--border-color); font-size: 13px; }
.table-rekap th { background: #F8FAFC; font-weight: 600; text-align: left; color: var(--text-muted); }
.table-rekap tbody tr:hover { background: #F1F5F9; }

.sort-btn { padding: 6px 12px; font-size: 12px; font-weight: 600; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--text-muted); cursor: pointer; transition: all 0.2s; height: auto; }
.sort-btn.active-sort { background: var(--bg-surface); color: var(--text-main); box-shadow: var(--shadow-sm); }

.custom-calendar { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; }
.cal-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--bg-body); border-bottom: 1px solid var(--border-color); }
.cal-header button { background: none; border: 0; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: var(--radius-sm); transition: background 0.2s; }
.cal-header button:hover { background: var(--border-color); color: var(--text-main); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 10px; }
.cal-cell { text-align: center; font-size: 13px; font-weight: 500; padding: 8px 0; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-main); transition: all 0.2s; }
.cal-cell.header { color: var(--text-light); font-size: 11px; cursor: default; }
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell.day:hover { background: var(--primary-light); color: var(--primary); }
.cal-cell.day.active { background: var(--primary); color: #ffffff; box-shadow: var(--shadow-sm); }

.time-spinner-row { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 16px; border-top: 1px solid var(--border-color); background: var(--bg-surface); }
.time-col { display: flex; flex-direction: column; align-items: center; }
.time-col button { background: #F1F5F9; border: 0; padding: 4px 16px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-muted); transition: background 0.2s; }
.time-col button:hover { background: var(--border-color); color: var(--text-main); }
.time-val { font-size: 18px; font-weight: 700; width: 40px; text-align: center; margin: 4px 0; }

.toast { position: fixed; top: 24px; right: 24px; left: 24px; margin: 0 auto; max-width: 340px; padding: 14px 20px; background: #1E293B; color: #ffffff; font-size: 13px; font-weight: 500; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; transform: translateY(-150%); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); z-index: 4000; }
@media(min-width: 640px) { .toast { left: auto; top: 24px; right: 24px; transform: translateY(-150%); } }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
.toast.show { transform: translateY(0); }

.twibbon-preview-area { width: 100%; aspect-ratio: 1/1; background: #E2E8F0; border-radius: var(--radius-md); border: 2px dashed #94A3B8; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; margin-bottom: 8px; touch-action: none; }
.twibbon-preview-area canvas { width: 100%; height: 100%; cursor: move; }
.file-upload-btn { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(4px); color: #ffffff; padding: 8px 16px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.2); z-index: 10; }
.zoom-slider-container { display: none; margin-bottom: 20px; background: var(--bg-surface); padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }

.zoom-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #E2E8F0;
    border-radius: var(--radius-full);
    outline: none;
    transition: background 0.2s;
}
.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    border: 2px solid #FFFFFF;
    transition: transform 0.1s, box-shadow 0.2s;
}
.zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}
.zoom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    border: 2px solid #FFFFFF;
    transition: transform 0.1s, box-shadow 0.2s;
}
.zoom-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

/* KAMERA SCANNER QR (TAHFIZH, KESANTRIAN, & PRESENSI PAGI) */
.scanner-wrapper { position: relative; width: 100%; border-radius: var(--radius-lg); overflow: hidden; background: #000000; box-shadow: inset 0 0 10px rgba(0,0,0, 0.5); height: 360px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
#reader-canvas, #reader-canvas-pagi, #reader-canvas-tahfizh { width: 100%; height: 100%; position: absolute; top: 0; left: 0; border: 0 !important; }
#reader-canvas video, #reader-canvas-pagi video, #reader-canvas-tahfizh video { width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: var(--radius-lg); }
#reader-canvas > div:not(:first-child), #reader-canvas img, #reader-canvas span, #reader-canvas a,
#reader-canvas-pagi > div:not(:first-child), #reader-canvas-pagi img, #reader-canvas-pagi span, #reader-canvas-pagi a,
#reader-canvas-tahfizh > div:not(:first-child), #reader-canvas-tahfizh img, #reader-canvas-tahfizh span, #reader-canvas-tahfizh a { display: none !important; opacity: 0 !important; visibility: hidden !important; }

.scan-frame { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 220px; height: 220px; border: 3px solid var(--premium-gold); border-radius: 16px; z-index: 10; overflow: hidden; box-shadow: 0 0 0 4000px rgba(15, 23, 42, 0.65); }
.scan-laser { position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--premium-gold); box-shadow: 0 0 15px var(--premium-gold); animation: scanLaser 2s infinite ease-in-out; }
@keyframes scanLaser { 0% { top: -5%; opacity: 0; } 10%, 90% { opacity: 1; } 100% { top: 105%; opacity: 0; } }

.hw-scanner-overlay { position: absolute; inset: 0; z-index: 30; display: none; flex-direction: column; align-items: center; justify-content: center; background: var(--primary); color: #ffffff; text-align: center; padding: 24px; }
.hw-scanner-overlay.active { display: flex; animation: fadeIn 0.2s ease-out; }

.scan-toast { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(50px); background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(8px); padding: 12px 20px; border-radius: var(--radius-full); z-index: 50; display: flex; align-items: center; gap: 10px; opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); width: max-content; max-width: 90%; }
.scan-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.scan-toast-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.system-update-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(10px); display: none; justify-content: center; align-items: center; z-index: 99999; color: #ffffff; flex-direction: column; text-align: center; }
.system-update-overlay.active { display: flex; }
.loader-spinner { width: 50px; height: 50px; border: 4px solid rgba(255, 255, 255, 0.1); border-left-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 24px; }
@keyframes spin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }

/* KOMPONEN SMART TAHFIZH & MUROJAAH */
.juz-quick-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 14px;
}

.juz-pill-btn {
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.juz-pill-btn:hover {
    background: #F8FAFC;
    color: var(--text-main);
}

.juz-pill-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.quick-ayat-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
    margin-bottom: 16px;
}

.quick-ayat-btn {
    flex: 1;
    min-width: 70px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-focus);
    background: var(--primary-light);
    color: var(--primary);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.quick-ayat-btn:hover {
    background: var(--primary);
    color: #FFFFFF;
}

.quick-ayat-btn:active {
    transform: scale(0.97);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 10px; }