@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

:root {
    --primary-bg: #071518;
    --surface: #0e272f;
    --surface-glass: rgba(14, 39, 47, 0.78);
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-gradient: linear-gradient(135deg, #059669 0%, #10b981 60%, #0284c7 100%);
    --star-gold: #fbbf24;
    --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --badge-navy: #004b87;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #f8fafc;
    --text-dim: #94a3b8;
    --border: rgba(16, 185, 129, 0.16);
    --border-hover: rgba(16, 185, 129, 0.35);
    --nav-h: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: var(--primary-bg);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(2, 132, 199, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 30%, rgba(251, 191, 36, 0.05) 0%, transparent 55%);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    line-height: 1.5;
    min-height: 100vh;
}

/* Hiding & Structure */
.view { display: none !important; padding-bottom: 100px; }
.view.active { display: block !important; animation: fadeIn 0.4s ease; }
[hidden] { display: none !important; }
.print-only {
    position: fixed;
    top: 0;
    left: -10000px;
    width: 215.9mm;
    z-index: -1000;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}
.modal-content {
    width: 100%;
    max-width: 950px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    word-break: break-word;
    overflow-wrap: break-word;
}
.modal-overlay.active .modal-content {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Login Screen - Premium Theme */
#login-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: radial-gradient(circle at 50% 15%, #0e3740 0%, #071518 70%);
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem 1rem;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#login-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(2, 132, 199, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.06) 0%, transparent 50%);
    pointer-events: none;
}
#login-screen.active { display: flex !important; }

.login-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 2.5rem 2.25rem;
    background: rgba(12, 34, 41, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 28px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 35px rgba(16, 185, 129, 0.12);
    margin: auto;
}

/* Typography Scale */
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.5px; overflow-wrap: break-word; word-break: break-word; }
h2 { font-size: 1.25rem; font-weight: 700; overflow-wrap: break-word; word-break: break-word; }
h3 { font-size: 1rem; font-weight: 600; color: var(--text-dim); overflow-wrap: break-word; word-break: break-word; }
 
 .salat-pill {
     background: var(--surface);
     border: 2px solid var(--border);
     color: var(--text-dim);
     padding: 1rem 0.75rem;
     border-radius: 16px;
     font-weight: 700;
     cursor: pointer;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     flex: 1;
     min-width: 90px;
     text-align: center;
     font-size: 0.85rem;
     line-height: 1.35;
     letter-spacing: 0.3px;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     gap: 0.4rem;
     overflow-wrap: break-word;
     word-break: break-word;
     white-space: normal;
     touch-action: manipulation;
     -webkit-tap-highlight-color: transparent;
 }
 
 .salat-pill.active {
     background: var(--success);
     color: white;
     border-color: rgba(255,255,255,0.3);
     box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
     transform: translateY(-4px);
 }
 
 .salat-pill:hover:not(.active) {
     border-color: var(--accent);
     color: var(--text);
     background: rgba(16, 185, 129, 0.1);
 }
 
 .adab-pill.active {
     background: var(--gold-gradient);
     color: #0f172a;
     font-weight: 800;
     border-color: rgba(251, 191, 36, 0.6);
     box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
 }

/* Navigation */
.glass-nav {
    height: var(--nav-h); padding: 0 1.5rem;
    background: rgba(7, 21, 24, 0.88); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 1000;
}

.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 480px;
    height: 70px;
    background: rgba(10, 32, 38, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 35px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.nav-item {
    background: none; border: none; color: var(--text-dim);
    font-size: 0.75rem; font-weight: 600; text-align: center;
    transition: all 0.2s; cursor: pointer; display: flex; flex-direction: column; align-items: center;
}
.nav-item.active { color: var(--accent); transform: translateY(-3px); text-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }
.nav-item span { font-size: 1.5rem; margin-bottom: 4px; }

#guru-screen .bottom-nav {
    max-width: 530px;
}
#guru-screen .bottom-nav .nav-item {
    padding: 0.25rem 0.35rem;
    font-size: 0.68rem;
}
#guru-screen .bottom-nav .nav-item span {
    font-size: 1.2rem;
}

/* Dashboard Grid */
.dashboard-grid {
    max-width: 1200px; margin: 0 auto; padding: 1.5rem;
    display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}

@media (min-width: 900px) {
    .dashboard-grid { grid-template-columns: 340px 1fr; }
}

/* Cards & Components */
.glass-card {
    background: var(--surface-glass); border: 1px solid var(--border);
    border-radius: 20px; padding: 1.5rem; position: relative; overflow: hidden;
}

.level-badge {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
}
.level-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 900;
    color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    position: relative;
    flex-shrink: 0;
}
.level-circle::after {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0.3;
}
.level-info h2 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.level-info .rank-title {
    margin: 2px 0 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.xp-bar-outer {
    height: 8px; background: rgba(255, 255, 255, 0.05); border-radius: 4px; overflow: hidden;
    margin: 1rem 0;
}
.xp-bar-inner {
    height: 100%; background: var(--accent-gradient); border-radius: 4px; transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Profile Card Grid */
.profile-card-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-top: 1rem;
}
.profile-field {
    background: rgba(255, 255, 255, 0.03); 
    padding: 1.25rem 1rem; 
    border-radius: 16px; 
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}
.profile-field:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.1);
}
.profile-field .label { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.profile-field .value { font-size: 1rem; font-weight: 600; margin-top: 6px; color: var(--text); }

/* Buttons */
.btn-primary {
    background: var(--accent-gradient); color: white; border: none;
    padding: 1rem; border-radius: 14px; font-weight: 700; cursor: pointer; transition: 0.2s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(1); }

/* Inputs */
.input-group { margin-bottom: 1.25rem; }
.input-group label { display: block; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.5rem; }
input, select {
    width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
    border-radius: 12px; padding: 0.75rem 1rem; color: white; font-size: 1rem; outline: none; transition: 0.2s;
}
input[type="checkbox"], input[type="radio"] {
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    padding: 0 !important;
    margin: 0 !important;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }

/* Hide default browser password reveal and clear buttons (Edge/IE) */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}


option {
    background-color: #161b22;
    color: white;
}

/* Utils */
.mt-2 { margin-top: 2rem; }
.accent-text { color: var(--accent); }
.success-text { color: var(--success); }
.warning-text { color: var(--warning); }

/* Journal list */
.journal-card {
    background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border);
    margin-bottom: 0.75rem; border-radius: 14px; padding: 1rem;
    display: flex; justify-content: space-between; align-items: center;
}

/* Premium Raport Styling */
.raport-page {
    background: #fff;
    color: #1a1a1a;
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-family: 'Outfit', sans-serif;
    position: relative;
    overflow: hidden;
    line-height: 1.6;
}
.raport-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #0b0e14;
    text-align: center;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.raport-sub {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2rem;
    border-bottom: 3px double #0b0e14;
    padding-bottom: 1rem;
}
.raport-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}
.raport-table th {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: #475569;
}
.raport-table td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}
.raport-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
}
.sig-box {
    text-align: center;
    min-width: 200px;
}
.sig-line {
    margin-top: 5rem;
    border-top: 1px solid #1a1a1a;
    padding-top: 0.5rem;
    font-weight: 600;
}

/* Integrated Student Modal Styles */
.modal-tabs {
    display: flex;
    background: rgba(0,0,0,0.3);
    padding: 0.5rem;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.modal-tabs::-webkit-scrollbar { display: none; }
.modal-tab-btn {
    flex: 1;
    padding: 0.85rem;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    transition: all 0.2s;
}
.modal-tab-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.modal-tab-btn.active { background: var(--accent); color: white; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }

.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; animation: fadeIn 0.3s ease; }

.status-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-pill.success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.status-pill.danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

/* Jurnal Quiz Options */
.option-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    min-height: 54px;
    height: auto;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.45;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    backdrop-filter: blur(8px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.option-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.option-btn:active {
    transform: scale(0.98);
    background: rgba(99, 102, 241, 0.3);
}

.option-btn.selected {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: var(--success) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
    padding-right: 3.25rem;
}

.option-btn.selected::after {
    content: "✓";
    position: absolute;
    right: 1.15rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.25);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #10b981;
}

.day-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

.day-btn:hover {
    border-color: #ec4899 !important;
    background: rgba(236, 72, 153, 0.2) !important;
    transform: translateY(-2px);
}

.day-btn:active {
    background: #ec4899 !important;
    color: white !important;
    transform: scale(0.95);
}

/* Add minor pulse animation for the active question */
@keyframes fadeInSlide {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.option-btn {
    animation: fadeInSlide 0.25s ease-out forwards;
}

/* =========================================================
   MODERN COMPACT QUIZ & CHECKLIST SYSTEM
   Fixes scrolling locks, massive cards, and cutoff buttons
   ========================================================= */
.quiz-modal-card {
    background: #161b22 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 24px;
    padding: 1.5rem !important;
    max-width: 580px !important;
    max-height: 88vh !important;
    max-height: 88dvh !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7) !important;
    overflow: hidden !important;
}

.quiz-modal-header {
    flex-shrink: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.85rem;
}

.quiz-scroll-area {
    flex-grow: 1;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
    padding-right: 4px;
    padding-bottom: 1rem;
}

.quiz-footer-area {
    flex-shrink: 0;
}

/* Modern Compact Checklist Options */
.checklist-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.check-option-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 52px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.check-option-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.check-option-item:active {
    transform: scale(0.98);
}

.check-option-item .check-box-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    background: rgba(0, 0, 0, 0.3);
}

.check-option-item .check-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
}

.check-option-item .check-text {
    flex-grow: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.35;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Active Check Item */
.check-option-item.active {
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: var(--success) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.check-option-item.active .check-box-icon {
    background: var(--success);
    border-color: var(--success);
}

.check-option-item.active .check-box-icon::after {
    content: '✓';
    font-size: 13px;
    font-weight: 900;
    color: white;
    line-height: 1;
}

.check-option-item.active .check-text {
    color: #ffffff;
    font-weight: 700;
}

/* Admin & Dinas Additional Styles */
.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.tab-btn:hover { background: rgba(255, 255, 255, 0.1); color: white; }
.tab-btn.active { 
    background: var(--accent); 
    color: white; 
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.dinas-tab { display: none; }
.dinas-tab.active { display: block; animation: fadeIn 0.4s ease; }

.monitoring-card {
    display: flex; gap: 1rem; align-items: center; padding: 1.25rem;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    border-radius: 16px; margin-bottom: 0.75rem;
}

#dinas-audit-list tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 600px) {
    .dashboard-grid { padding: 1rem; gap: 1rem; }
    .glass-nav { padding: 0 1rem; }
    h1 { font-size: 1.5rem; }
    #super-actions-header { flex-wrap: wrap; }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
}

.btn-page {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-page:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0 1rem;
}

/* Import Styles */
#import-dropzone {
    transition: all 0.3s ease;
}

#import-dropzone.dragover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent);
    transform: scale(1.02);
}

.import-error-item {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(239, 68, 68, 0.1);
    font-size: 0.8rem;
    color: var(--danger);
}

.import-success-item {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    font-size: 0.8rem;
    color: var(--success);
}

.day-btn {
    padding: 1.25rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.day-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.4);
}
.day-btn:active {
    transform: translateY(-1px);
}
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: var(--text-dim);
}

/* =========================================
   PRINT / PDF EXPORT STYLES (FOLIO / F4)
   ========================================= */
@media print {
    @page {
        size: 215.9mm 330.2mm; /* F4 / Folio: 8.5 x 13 inch */
        margin: 0;
    }

    *, *::before, *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    html, body {
        width: 215.9mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    /* Sembunyikan semua elemen di body selain portal-container dan print-rapor-view */
    body > *:not(#portal-container):not(#print-rapor-view) {
        display: none !important;
    }

    #portal-container {
        display: block !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 215.9mm !important;
        height: auto !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* Sembunyikan semua view/modal di dalam portal-container selain print-rapor-view */
    #portal-container > *:not(#print-rapor-view) {
        display: none !important;
    }

    .no-print,
    .rf4-screen-toolbar {
        display: none !important;
    }

    .print-only,
    #print-rapor-view {
        display: block !important;
        position: static !important;
        width: 215.9mm !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        overflow: visible !important;
        box-shadow: none !important;
    }

    .rapor-f4-page {
        width: 215.9mm !important;
        height: 330.2mm !important;
        max-height: 330.2mm !important;
        box-sizing: border-box !important;
        padding: 8mm 12mm 8mm 12mm !important;
        margin: 0 !important;
        box-shadow: none !important;
        page-break-after: always !important;
        break-after: page !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        overflow: hidden !important;
        background: #ffffff !important;
    }

    .rapor-f4-page:last-child {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    canvas {
        max-width: 100%;
        height: 100% !important;
    }
}

/* ==========================================================================
   OFFICIAL RAPOR KARAKTER 7 KAIH (FOLIO / F4 SINGLE PAGE STANDARD)
   ========================================================================== */
.rf4-screen-toolbar {
    position: sticky;
    top: 0;
    z-index: 99999;
    background: #0f172a;
    color: white;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}
.rf4-toolbar-title {
    font-size: 0.95rem;
    font-weight: 600;
}
.rf4-toolbar-actions {
    display: flex;
    gap: 0.75rem;
}

#print-rapor-view {
    display: none;
}
#print-rapor-view.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #334155;
    z-index: 999999;
    overflow-y: auto;
    padding-bottom: 3rem;
}

.rapor-f4-page {
    width: 215.9mm;
    min-height: 330.2mm;
    max-height: 330.2mm;
    margin: 20px auto 40px auto;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    padding: 8mm 12mm 8mm 12mm;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    color: #000000;
    overflow: hidden;
    position: relative;
    page-break-after: always;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Page 1 Styles */
.rf4-header {
    text-align: center;
    margin-bottom: 2mm;
}
.rf4-banner-img {
    width: 100%;
    height: auto;
    max-height: 22mm;
    display: block;
    object-fit: contain;
}
.rf4-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 2.5mm;
    gap: 3mm;
}
.rf4-student-info {
    flex: 1.35;
}
.rf4-meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 7.2pt;
    line-height: 1.35;
}
.rf4-meta-table td.lbl {
    width: 92px;
    font-weight: 800;
    color: #000;
}
.rf4-meta-table td.val {
    font-weight: 700;
    color: #000;
    padding-left: 3px;
}
.rf4-part-card {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 3mm;
}
.rf4-part-header {
    border: none;
    font-size: 7.8pt;
    font-weight: 900;
    color: #0070c0;
    text-align: right;
    line-height: 1.25;
    padding: 0;
    margin: 0;
    letter-spacing: 0.2px;
}
.rf4-part-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.rf4-donut-wrap {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rf4-part-desc {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 6.2pt;
    line-height: 1.25;
    color: #000;
}
.rf4-arrow {
    color: #0284c7;
    font-size: 11pt;
}

/* Page 1 Grid: 2 Columns */
.rf4-page1-grid {
    display: flex;
    gap: 3.5mm;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}
.rf4-p1-col-left {
    width: 37%;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    gap: 3mm;
}
.rf4-p1-col-right {
    width: 63%;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    gap: 3mm;
}

/* Card & Group Box styles */
.rf4-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5mm;
    height: 18mm;
    flex-shrink: 0;
}
.rf4-header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.rf4-app-brand {
    font-size: 13pt;
    font-weight: 900;
    color: #15803d;
    letter-spacing: 0.5px;
    line-height: 1.1;
}
.rf4-app-subbrand {
    font-size: 6.2pt;
    font-weight: 800;
    color: #000000;
    letter-spacing: 0.2px;
}
.rf4-header-logo-wrap {
    height: 100%;
    display: flex;
    align-items: center;
}
.rf4-theme-card {
    border: 1px solid #000000;
}

/* Page 1 Flex distribution to eliminate voids */
#cell-bangun_pagi {
    flex: 1;
}
#cell-olahraga {
    flex: 1;
}
#group-makan_sehat {
    flex: 1.65;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#group-beribadah {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
#group-gemar_belajar {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
#rf4-duo-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5mm;
}
#cell-bermasyarakat, #cell-tidur_cepat {
    height: 100%;
}
#rf4-salat-container {
    flex: 1.7;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rf4-card-box {
    border-width: 1px;
    border-style: solid;
    border-radius: 0;
    padding: 8px 10px;
    background: #fff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}
.rf4-group-box {
    border-width: 1px;
    border-style: solid;
    border-radius: 0;
    padding: 6px 9px;
    background: #fff;
    box-sizing: border-box;
}
.rf4-group-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2px;
}
.rf4-group-title {
    font-size: 8.5pt;
    font-weight: 900;
    text-align: center;
    color: #000;
    letter-spacing: 0.3px;
}
.rf4-group-banner-wrap {
    text-align: center;
    margin: 1px 0 2px 0;
}
.rf4-card-head, .rf4-sub-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2px;
}
.rf4-card-icon {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex-shrink: 0;
}
.rf4-sub-icon {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}
.rf4-card-title {
    font-size: 8.8pt;
    font-weight: 900;
    color: #000;
    letter-spacing: 0.2px;
}
.rf4-sub-title {
    font-size: 7.5pt;
    font-weight: 800;
    color: #000;
    text-align: center;
}

/* Banner Rectangles (Official Disdik HST Standards: Sharp Rectangular Banners - Fit Word Length) */
.rf4-banner-pill {
    display: inline-block;
    padding: 2px 14px;
    border: 0.8px solid #000000;
    border-radius: 0;
    color: #ffffff;
    font-weight: 900;
    font-size: 7.2pt;
    text-align: center;
    margin: 1.5px auto 2px auto;
    letter-spacing: 0.4px;
    box-sizing: border-box;
    white-space: nowrap;
    max-width: 92%;
}

.rf4-badge-pill {
    display: inline-block;
    padding: 1.8px 8px;
    border: 0.8px solid #000000;
    border-radius: 0;
    color: #ffffff;
    font-weight: 800;
    font-size: 6.2pt;
    text-align: center;
    margin: 1px auto;
    min-width: 50px;
    box-sizing: border-box;
    white-space: nowrap;
}
.rf4-pill-green, .rf4-badge-green { background: #00a651 !important; color: #ffffff !important; }
.rf4-pill-blue, .rf4-badge-blue { background: #0070c0 !important; color: #ffffff !important; }
.rf4-pill-orange, .rf4-badge-orange { background: #ed7d31 !important; color: #ffffff !important; }
.rf4-pill-red, .rf4-badge-red { background: #e00000 !important; color: #ffffff !important; }
.rf4-pill-gray, .rf4-badge-gray { background: #64748b !important; color: #ffffff !important; }

.rf4-grid-2x3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5mm 3.5mm;
}
.rf4-grid-2x1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5mm;
    flex: 1;
}
.rf4-grid-3x2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3mm 3.5mm;
}
.rf4-bottom-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5mm;
}
.rf4-subcell {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}
.rf4-subcell-divider {
    border-bottom: 0.5px solid #cbd5e1;
    margin: 2px 0;
}

/* Subcell Elements */
.rf4-ind-title {
    font-size: 7.4pt;
    font-weight: 800;
    text-align: center;
    line-height: 1.15;
    color: #000;
}
.rf4-ind-sub {
    font-size: 6.2pt;
    font-weight: 700;
    color: #000;
    text-align: center;
    margin-bottom: 1px;
}
.rf4-ind-narrative {
    font-size: 6.8pt;
    line-height: 1.3;
    color: #000;
    text-align: center;
    margin: 1.5px 0 2px 0;
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
}
.rf4-ind-bar-wrap {
    margin-top: 1.5px;
}
.rf4-bar-label {
    font-size: 6.2pt;
    font-weight: 800;
    text-align: center;
    color: #000;
    margin-bottom: 1px;
}
.rf4-bar-track {
    display: flex;
    height: 14px;
    border: 1px solid #000000;
    border-radius: 0;
    overflow: hidden;
    font-size: 6.5pt;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
    background: #ffffff;
}
.rf4-bar-filled {
    color: #ffffff;
    background: #0052cc;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
}
.rf4-bar-empty {
    background: #ffffff;
    color: #000000;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rf4-bar-under70 {
    background: #ffffff;
    color: #000000;
    width: 100%;
    font-weight: 900;
    font-size: 7.8pt;
    line-height: 14px;
    text-align: center;
}

/* Kotak Khusus Salat 5 Waktu (Page 1 Kanan Bawah) */
.rf4-salat-box {
    border: 1px solid #000000;
    border-radius: 0;
    padding: 5px 7px;
    background: #ffffff;
}
.rf4-salat-box-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2px;
}
.rf4-salat-box-title {
    font-size: 8.5pt;
    font-weight: 900;
    color: #000000;
    text-align: center;
}
.rf4-salat-box-banner {
    display: inline-block;
    padding: 2px 14px;
    border: 0.8px solid #000000;
    border-radius: 0;
    color: #ffffff;
    font-weight: 900;
    font-size: 7.2pt;
    background: #00a651;
    margin: 1.5px auto;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    max-width: 90%;
}
.rf4-salat-box-keterangan {
    font-size: 6.8pt;
    color: #000000;
    text-align: center;
    margin-bottom: 2px;
}
.rf4-salat-row {
    display: flex;
    align-items: center;
    padding: 3px 0;
    border-bottom: 0.5px solid #f1f5f9;
}
.rf4-salat-row:last-child {
    border-bottom: none;
}
.rf4-salat-col-time {
    width: 50px;
    text-align: center;
    flex-shrink: 0;
}
.rf4-salat-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}
.rf4-salat-time-name {
    font-size: 7pt;
    font-weight: 800;
    color: #000000;
    margin-top: 1px;
}
.rf4-salat-col-badge {
    width: 70px;
    text-align: center;
    flex-shrink: 0;
    margin: 0 4px;
}
.rf4-salat-badge-box {
    padding: 1.5px 6px;
    font-size: 5.8pt;
    font-weight: 800;
    color: #ffffff;
    border: 0.8px solid #000000;
    border-radius: 0;
    display: inline-block;
    min-width: 50px;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
}
.rf4-salat-badge-pct {
    font-size: 7pt;
    font-weight: 900;
    color: #000000;
    margin-top: 1px;
}
.rf4-salat-narrative {
    flex: 1;
    font-size: 6.8pt;
    line-height: 1.28;
    color: #000000;
    font-weight: 600;
    text-align: left;
}

/* Page 2 Styles: Adab Kotak */
.rf4-adab-box {
    border: 1px solid #000000;
    border-radius: 0;
    padding: 6px 9px;
    background: #ffffff;
    margin-top: 0;
    height: 114mm;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.rf4-adab-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2px;
}
.rf4-adab-title {
    font-size: 8.8pt;
    font-weight: 900;
    color: #000000;
    text-align: center;
    letter-spacing: 0.3px;
}
.rf4-adab-banner {
    display: inline-block;
    padding: 2.2px 18px;
    border: 0.8px solid #000000;
    border-radius: 0;
    color: #ffffff;
    font-weight: 900;
    font-size: 7.2pt;
    background: #0070c0;
    margin: 2px auto;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    max-width: 90%;
}
.rf4-adab-keterangan {
    font-size: 7pt;
    color: #000000;
    text-align: center;
    margin-bottom: 2px;
    line-height: 1.25;
}
#rf4-adab-grid {
    flex: 1;
    gap: 2.5mm 3.5mm;
}
#rf4-adab-grid .rf4-subcell {
    border: 0.8px solid #cbd5e1;
    padding: 4.5px 7px;
    background: #fafbfc;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.rf4-pembinaan-section {
    margin-top: 2mm;
    display: flex;
    flex-direction: column;
}
.rf4-tanggapan-section {
    margin-top: 2mm;
    display: flex;
    flex-direction: column;
}
.rf4-sec-title {
    font-size: 7.8pt;
    font-weight: 900;
    text-align: center;
    color: #000;
    margin-bottom: 1.2mm;
    letter-spacing: 0.3px;
}
.rf4-pembinaan-box {
    border: 1px solid #000000;
    border-radius: 0;
    padding: 3.5mm 5mm;
    font-size: 7.2pt;
    line-height: 1.45;
    color: #000;
    font-weight: 600;
    text-align: justify;
    background: #fff;
    height: 26mm;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}
.rf4-tanggapan-box {
    border: 1px solid #000000;
    border-radius: 0;
    background: #fff;
    height: 32mm;
    box-sizing: border-box;
}
.rf4-sig-block {
    margin-top: 2.5mm;
    margin-bottom: 2mm;
    flex-shrink: 0;
}
.rf4-sig-row {
    display: flex;
    justify-content: space-between;
    padding: 0 10mm;
}
.rf4-sig-col {
    width: 44%;
    text-align: center;
    font-size: 7.2pt;
}
.rf4-sig-titimangsa-label, .rf4-sig-titimangsa {
    height: 14px;
    line-height: 14px;
    font-size: 7.2pt;
    font-weight: 600;
    color: #000;
    margin-bottom: 2px;
    text-align: center;
}
.rf4-sig-label {
    font-weight: 700;
    font-size: 7.5pt;
    color: #000;
}
.rf4-sig-space {
    height: 18mm;
}
.rf4-sig-name {
    font-weight: 800;
    font-size: 7.8pt;
    color: #000;
}
.rf4-sig-nip {
    font-size: 7pt;
    color: #000;
}
.rf4-matrix-table-wrap {
    border: 1px solid #000000;
    border-radius: 0;
    margin-bottom: 2mm;
    overflow: hidden;
    flex-shrink: 0;
}
.rf4-matrix-header-title {
    font-size: 7.2pt;
    font-weight: 900;
    text-align: center;
    padding: 2.5px;
    background: #fff;
    color: #000;
    border-bottom: 1px solid #000000;
}
.rf4-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 6pt;
    text-align: center;
}
.rf4-matrix-table th {
    padding: 2.8px 1px;
    border: 0.5px solid #000000;
    font-weight: 900;
    background: #f8fafc;
}
.rf4-matrix-table td {
    padding: 2.8px 1px;
    border: 0.5px solid #000000;
    color: #000000;
    font-weight: 700;
    line-height: 1.32;
    vertical-align: top;
}
.rf4-footnote-box {
    border: 1px solid #000000;
    border-radius: 0;
    padding: 2.8mm 3.8mm;
    font-size: 5.6pt;
    line-height: 1.28;
    color: #000;
    text-align: justify;
    background: #fff;
    margin-bottom: 2mm;
    flex-shrink: 0;
}
.rf4-footnote-box a {
    color: #0284c7;
    text-decoration: underline;
}
.rf4-footer-student {
    position: absolute;
    bottom: 3mm;
    left: 12mm;
    font-size: 6.8pt;
    font-weight: 700;
    color: #000000;
}



/* =========================================================
   CLEAN LIGHT ENTERPRISE THEME (Admin Dinas & Superadmin)
   Official Government & Corporate Dashboard UI (Non-Glassmorphism)
   ========================================================= */
.desktop-portal-view {
    padding-bottom: 0 !important;
    background-color: #f1f5f9 !important;
    min-height: 100vh;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.desktop-portal-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Solid Deep Navy Sidebar */
.desktop-sidebar {
    width: 270px;
    min-width: 270px;
    background: #0f172a !important;
    border-right: 1px solid #1e293b !important;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.05);
}

.desktop-sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2) !important;
    background: #07181c !important;
}

.desktop-sidebar-header .brand-badge {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.desktop-sidebar-header .brand-text .brand-title {
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff !important;
    line-height: 1.2;
}

.desktop-sidebar-header .brand-text .brand-sub {
    font-size: 0.72rem;
    color: #94a3b8 !important;
    margin-top: 2px;
}

.desktop-sidebar-menu {
    flex: 1;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
}

.sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #64748b !important;
    padding: 0.5rem 0.75rem 0.25rem;
}

.desktop-nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: transparent !important;
    border: none !important;
    color: #cbd5e1 !important;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.desktop-nav-btn .icon {
    font-size: 1.15rem;
}

.desktop-nav-btn:hover {
    background: #0e2b33 !important;
    color: #34d399 !important;
    transform: none;
}

.desktop-nav-btn.active {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.desktop-sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(16, 185, 129, 0.2) !important;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #07181c !important;
}

.system-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

.status-dot.online {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.sidebar-logout-btn {
    width: 100%;
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
}

.sidebar-logout-btn:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

/* Main Content Area - Clean Light Solid */
.desktop-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #f1f5f9 !important;
}

.desktop-top-header {
    height: 70px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.crumb-root { color: #64748b !important; font-weight: 500; }
.crumb-sep { color: #cbd5e1 !important; }
.crumb-current { color: #0f172a !important; font-weight: 800; }

.header-right-tools {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.btn-success-export {
    background: #16a34a !important;
    color: #ffffff !important;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
    transition: background 0.15s ease;
}

.btn-success-export:hover {
    background: #15803d !important;
}

.desktop-user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.85rem;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
}

.desktop-user-pill .user-avatar {
    font-size: 1.3rem;
}

.desktop-user-pill .user-meta .user-nama {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a !important;
    line-height: 1.2;
}

.desktop-user-pill .user-meta .user-role {
    font-size: 0.7rem;
    color: #64748b !important;
}

.desktop-main-body {
    padding: 2rem;
    max-width: 1600px;
    width: 100%;
}

/* Widescreen Solid Enterprise KPI Metric Cards */
.desktop-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.desktop-kpi-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px;
    padding: 1.35rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.desktop-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06) !important;
    border-color: #cbd5e1 !important;
}

.desktop-kpi-card .kpi-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.desktop-kpi-card .kpi-val {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a !important;
    margin: 0.35rem 0 0.15rem;
    line-height: 1.1;
}

.desktop-kpi-card .kpi-sub {
    font-size: 0.75rem;
    color: #94a3b8 !important;
}

/* Panels & Cards in Enterprise Light Theme */
.admin-enterprise-theme .glass-card,
.admin-enterprise-theme .admin-panel-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    backdrop-filter: none !important;
    color: #0f172a !important;
}

.admin-enterprise-theme .glass-card h3,
.admin-enterprise-theme .admin-panel-card h3 {
    color: #0f172a !important;
    font-weight: 800 !important;
}

.admin-enterprise-theme .glass-card p,
.admin-enterprise-theme .admin-panel-card p {
    color: #64748b !important;
}

/* Data Tables for Enterprise Console */
.desktop-table-container {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px;
    overflow: hidden;
    margin-top: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.desktop-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.desktop-table th {
    background: #f8fafc !important;
    color: #475569 !important;
    padding: 1rem 1.25rem;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.desktop-table td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
    background: #ffffff;
}

.desktop-table tr:hover td {
    background: #f8fafc !important;
}

/* Inputs & Filter Selects in Enterprise Light */
.admin-enterprise-theme input[type="text"],
.admin-enterprise-theme input[type="search"],
.admin-enterprise-theme input[type="password"],
.admin-enterprise-theme input[type="date"],
.admin-enterprise-theme input[type="month"],
.admin-enterprise-theme select {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.9rem !important;
}

.admin-enterprise-theme input:disabled,
.admin-enterprise-theme select:disabled,
.rakat-select:disabled {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #0f172a !important;
    cursor: not-allowed !important;
    font-weight: 700 !important;
}

.admin-enterprise-theme option,
.rakat-select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.admin-enterprise-theme input::placeholder {
    color: #94a3b8 !important;
}

.admin-enterprise-theme input:focus,
.admin-enterprise-theme select:focus {
    border-color: #2563eb !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Buttons in Enterprise Theme */
.admin-enterprise-theme .btn-ghost {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.admin-enterprise-theme .btn-ghost:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.admin-enterprise-theme .btn-ghost.active {
    background: #10b981 !important;
    border: 1px solid #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25) !important;
}

.admin-enterprise-theme .btn-ghost.active:hover {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

/* Pagination in Enterprise Theme */
.admin-enterprise-theme .pagination-container button {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

.admin-enterprise-theme .pagination-container button:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

.admin-enterprise-theme .pagination-container button.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

.admin-enterprise-theme .pagination-info {
    color: #64748b !important;
}

/* School Cards in Peringkat Sekolah */
.school-rank-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.school-rank-card:hover {
    border-color: #2563eb !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

/* Clean Enterprise Modals */
#user-modal .modal-content,
#sekolah-modal .modal-content,
#kelas-modal .modal-content,
#import-modal .modal-content,
#confirm-modal .modal-content {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
}

#user-modal .modal-content h2,
#sekolah-modal .modal-content h2,
#kelas-modal .modal-content h2,
#import-modal .modal-content h2,
#confirm-modal .modal-content h2,
#user-modal .modal-content h3,
#import-modal .modal-content h3 {
    color: #0f172a !important;
    font-weight: 800 !important;
}

#user-modal label,
#sekolah-modal label,
#kelas-modal label,
#import-modal label {
    color: #334155 !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
}

#user-modal input,
#user-modal select,
#sekolah-modal input,
#sekolah-modal select,
#kelas-modal input,
#kelas-modal select {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

#user-modal input:focus,
#user-modal select:focus,
#sekolah-modal input:focus,
#sekolah-modal select:focus,
#kelas-modal input:focus,
#kelas-modal select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

#import-dropzone {
    background: #f8fafc !important;
    border: 2px dashed #cbd5e1 !important;
    color: #475569 !important;
}

#import-dropzone:hover {
    border-color: #2563eb !important;
    background: #eff6ff !important;
}

/* Modal Cancel / Close Button - High Legibility & Solid */
.btn-modal-cancel {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 0.75rem 1.25rem !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}

.btn-modal-cancel:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* =========================================================
   MOBILE RESPONSIVENESS SUITE FOR STUDENT PORTAL (HP / PWA)
   Tested across 320px, 360px, 390px, 414px, 480px, 768px
   ========================================================= */
@media screen and (max-width: 768px) {
    :root {
        --nav-h: 60px;
    }

    body {
        font-size: 14.5px;
        -webkit-text-size-adjust: 100%;
        overflow-x: hidden;
    }

    /* Student Portal Main View - Ample space so bottom cards are never covered */
    #app-screen, #progress-screen, #full-history-screen, #quiz-screen, #guru-screen, #admin-screen {
        padding-bottom: calc(115px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .dashboard-grid {
        padding: 0.85rem 1rem !important;
        gap: 0.85rem !important;
        width: 100%;
        max-width: 100%;
    }

    .glass-card {
        padding: 1.15rem 1rem !important;
        border-radius: 18px !important;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Floating Thumb-Friendly Bottom Navigation */
    .bottom-nav {
        width: calc(100% - 20px) !important;
        max-width: 440px !important;
        height: 64px !important;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 32px !important;
        padding: 0 0.5rem !important;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
        z-index: 1000 !important;
    }

    .nav-item {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.6rem !important;
        min-height: 48px;
        justify-content: center;
        touch-action: manipulation;
    }

    .nav-item span {
        font-size: 1.25rem !important;
        margin-bottom: 2px !important;
    }

    #guru-screen .bottom-nav {
        width: calc(100% - 10px) !important;
        max-width: 480px !important;
        padding: 0 0.2rem !important;
    }

    #guru-screen .bottom-nav .nav-item {
        font-size: 0.62rem !important;
        padding: 0.2rem 0.2rem !important;
        min-width: 42px;
    }

    #guru-screen .bottom-nav .nav-item span {
        font-size: 1.1rem !important;
    }

    /* Top Glass Navbar */
    .glass-nav {
        padding: 0 1rem !important;
        height: var(--nav-h) !important;
    }

    .glass-nav #nav-name {
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.85rem !important;
    }

    /* Gamified Level & XP Section */
    .level-badge {
        gap: 0.85rem !important;
        margin-bottom: 1rem !important;
        padding: 0.25rem !important;
    }

    .level-circle {
        width: 58px !important;
        height: 58px !important;
        font-size: 1.45rem !important;
        flex-shrink: 0;
    }

    .level-info .rank-title {
        font-size: 1.1rem !important;
        overflow-wrap: break-word;
    }

    /* Profile Grid on Mobile */
    .profile-card-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    .profile-field {
        padding: 0.85rem 0.75rem !important;
        border-radius: 14px !important;
        min-width: 0;
    }

    .profile-field .label {
        font-size: 0.6rem !important;
    }

    .profile-field .value {
        font-size: 0.9rem !important;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Journal Date Selector Buttons */
    #journal-selection-area {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    .day-btn {
        padding: 0.9rem 0.6rem !important;
        font-size: 0.95rem !important;
        min-height: 50px !important;
        border-radius: 14px !important;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        text-align: center;
    }

    /* Dedicated Quiz / Isi Jurnal Screen */
    #quiz-card-wrapper {
        padding: 1.5rem 1.15rem !important;
        border-radius: 20px !important;
    }

    .quiz-scroll-area {
        flex-grow: 1;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        overscroll-behavior: contain !important;
        padding-bottom: 1.5rem !important;
    }

    #quiz-question-text {
        font-size: 1.15rem !important;
        line-height: 1.35 !important;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    #quiz-question-desc {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
        line-height: 1.4 !important;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .option-btn {
        min-height: 52px !important;
        height: auto !important;
        padding: 0.85rem 1rem !important;
        font-size: 0.92rem !important;
        line-height: 1.4 !important;
        border-radius: 14px !important;
        margin-bottom: 0.5rem !important;
        touch-action: manipulation;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    .check-option-item {
        min-height: 50px !important;
        padding: 0.7rem 0.85rem !important;
    }

    .check-option-item .check-text {
        font-size: 0.9rem !important;
    }

    /* Action Submit Buttons inside Quiz */
    #btn-salat-submit,
    #btn-ibadah-submit,
    #btn-wawasan-submit,
    #btn-karya-submit,
    #btn-adab-submit,
    #btn-masyarakat-submit {
        margin-top: 1rem !important;
        padding: 0.9rem 1rem !important;
        font-size: 0.95rem !important;
        min-height: 48px !important;
        overflow-wrap: break-word;
        white-space: normal;
    }

    #btn-quiz-prev {
        min-height: 44px;
        padding: 0.6rem 1.25rem;
        margin-bottom: 0.5rem;
    }

    /* Haid Days Grid */
    #quiz-options-area .day-btn {
        padding: 0.75rem 0.35rem !important;
        font-size: 0.85rem !important;
        border-radius: 10px !important;
    }
}

/* Extra Small Devices (Galaxy Fold folded, iPhone SE, screen <= 360px) */
@media screen and (max-width: 360px) {
    .glass-nav #nav-name {
        max-width: 100px;
    }

    .bottom-nav {
        height: 60px !important;
    }

    .nav-item {
        font-size: 0.65rem !important;
    }

    .nav-item span {
        font-size: 1.15rem !important;
    }

    #salat-pills-container,
    #ibadah-pills-container,
    #wawasan-pills-container,
    #karya-pills-container,
    #adab-pills-container {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   DASHBOARD RAKAT KAIH HST STYLES
   ========================================================= */
.rakat-header-panel {
    background: linear-gradient(135deg, #1d4ed8, #2563eb, #3b82f6);
    color: white;
    padding: 24px 20px;
    border-radius: 14px;
    margin-bottom: 22px;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
    text-align: center;
}
.rakat-header-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    color: white;
}
.rakat-header-sub {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.95;
    margin: 0;
    color: #e0e7ff;
}

.rakat-filter-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 22px;
    border: 1px solid #e2e8f0;
}
.rakat-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.rakat-filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rakat-filter-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
}
.rakat-select {
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s;
}
.rakat-select:focus {
    border-color: #2563eb;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.rakat-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.rakat-kpi-card {
    padding: 16px 18px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    border-left: 5px solid;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.rakat-kpi-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 6px;
}
.rakat-kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}
.rakat-kpi-blue { border-left-color: #2563eb; }
.rakat-kpi-blue .rakat-kpi-value { color: #2563eb; }
.rakat-kpi-green { border-left-color: #10b981; }
.rakat-kpi-green .rakat-kpi-value { color: #059669; }
.rakat-kpi-yellow { border-left-color: #f59e0b; }
.rakat-kpi-yellow .rakat-kpi-value { color: #d97706; }
.rakat-kpi-darkred { border-left-color: #64748b; }
.rakat-kpi-darkred .rakat-kpi-value { color: #475569; }
.rakat-kpi-red { border-left-color: #ef4444; }
.rakat-kpi-red .rakat-kpi-value { color: #dc2626; }

.rakat-charts-row {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 20px;
    margin-bottom: 22px;
}
@media (max-width: 992px) {
    .rakat-charts-row {
        grid-template-columns: 1fr;
    }
}
.rakat-card-custom {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    background-color: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.rakat-card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    color: #1e293b;
    padding: 14px 18px;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rakat-card-body {
    padding: 18px;
    flex-grow: 1;
}

.rakat-rubrik-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #2563eb;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.rakat-rubrik-item {
    padding: 9px 12px;
    font-size: 0.83rem;
    border-radius: 8px;
    margin-bottom: 8px;
    line-height: 1.4;
    color: white;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.bg-skor-0 { background-color: #ef4444; }
.bg-skor-1 { background-color: #f97316; }
.bg-skor-2 { background-color: #f59e0b; color: #0f172a !important; }
.bg-skor-3 { background-color: #06b6d4; color: #0f172a !important; }
.bg-skor-4-inkonsisten { background-color: #3b82f6; }
.bg-skor-4-konsisten { background-color: #10b981; }

/* Admin Sekolah Navigation Tabs */
.admin-tab-nav {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    align-items: center;
}

.admin-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 0.55rem 1.15rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.admin-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.admin-nav-btn.active {
    background: var(--accent-gradient, #4f46e5);
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

/* Admin Tab Nav in Enterprise Light Theme */
.admin-enterprise-theme .admin-tab-nav {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    padding: 0.85rem 1.5rem;
}

.admin-enterprise-theme .admin-nav-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 600;
}

.admin-enterprise-theme .admin-nav-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.admin-enterprise-theme .admin-nav-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
}

/* =========================================================
   DEDICATED QUIZ / ISI JURNAL SCREEN MODERN RESPONSIVE LAYOUT
   ========================================================= */
.quiz-nav-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    padding: 0 1rem !important;
    height: var(--nav-h) !important;
    min-height: var(--nav-h) !important;
}

.quiz-nav-back-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    border: 1px solid var(--border) !important;
    padding: 0.42rem 0.75rem !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
}

.quiz-nav-back-btn:hover {
    background: rgba(255, 255, 255, 0.14) !important;
}

.quiz-nav-center {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: center !important;
    padding: 0 0.25rem !important;
}

.quiz-nav-title {
    display: block !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    color: #f8fafc !important;
    letter-spacing: -0.3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.quiz-nav-right {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

.quiz-nav-badge {
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    padding: 0.32rem 0.65rem !important;
    border-radius: 999px !important;
    background: rgba(99, 102, 241, 0.18) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.quiz-main-content {
    max-width: 680px !important;
    margin: 0 auto !important;
    padding: 1.25rem 1rem 6rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

.quiz-progress-card {
    padding: 1rem 1.25rem !important;
    border-radius: 18px !important;
    background: rgba(10, 32, 38, 0.7) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.quiz-progress-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0.5rem !important;
}

.quiz-progress-label {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    color: var(--text-dim) !important;
}

.quiz-progress-count {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
}

.quiz-progress-outer {
    height: 8px !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

#quiz-progress {
    height: 100% !important;
    background: linear-gradient(90deg, #6366f1, #10b981) !important;
    border-radius: 6px !important;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.quiz-card-card {
    padding: 1.5rem 1.25rem !important;
    border-radius: 20px !important;
    background: rgba(10, 32, 38, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
}

.quiz-question-heading {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    margin-bottom: 0.5rem !important;
    color: #f8fafc !important;
}

.quiz-question-description {
    color: var(--text-dim) !important;
    font-size: 0.92rem !important;
    margin-bottom: 1.25rem !important;
    line-height: 1.5 !important;
}

.quiz-actions-bar {
    margin-top: 1.5rem !important;
    display: flex !important;
    gap: 0.75rem !important;
}

.quiz-btn-prev {
    flex: 1 !important;
    padding: 0.85rem !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
}

/* 2-Option Cards for TTD and Haid */
.quiz-choice-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.85rem !important;
    width: 100% !important;
}

.quiz-choice-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 1.25rem 0.75rem !important;
    min-height: 100px !important;
    border-radius: 16px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    line-height: 1.35 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    -webkit-tap-highlight-color: transparent !important;
}

.quiz-choice-btn .choice-icon {
    font-size: 1.75rem !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
    line-height: 1 !important;
}

.quiz-choice-btn:hover {
    transform: translateY(-2px) !important;
}

.quiz-choice-btn:active {
    transform: scale(0.97) !important;
}

@media (max-width: 480px) {
    .quiz-nav-bar {
        padding: 0 0.75rem !important;
        gap: 0.35rem !important;
    }
    .quiz-nav-back-btn {
        padding: 0.38rem 0.6rem !important;
        font-size: 0.78rem !important;
    }
    .quiz-nav-title {
        font-size: 0.88rem !important;
    }
    .quiz-nav-badge {
        font-size: 0.72rem !important;
        padding: 0.28rem 0.55rem !important;
    }
    .quiz-card-card {
        padding: 1.25rem 1rem !important;
    }
    .quiz-choice-btn {
        padding: 1rem 0.5rem !important;
        font-size: 0.88rem !important;
    }
    .quiz-choice-btn .choice-icon {
        font-size: 1.5rem !important;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================================
   KUNJUNGAN GURU WALI KPI CARDS (ADMIN & GURU)
   ========================================================= */
.kunjungan-kpi-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 1.1rem 1.15rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kunjungan-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.kunjungan-kpi-card.kpi-blue {
    border-left: 4px solid #3b82f6 !important;
}
.kunjungan-kpi-card.kpi-green {
    border-left: 4px solid #10b981 !important;
}
.kunjungan-kpi-card.kpi-orange {
    border-left: 4px solid #f59e0b !important;
}
.kunjungan-kpi-card.kpi-purple {
    border-left: 4px solid #8b5cf6 !important;
}
.kunjungan-kpi-card.kpi-cyan {
    border-left: 4px solid #06b6d4 !important;
}

.kunjungan-kpi-title {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 0.25rem !important;
}

.kunjungan-kpi-value {
    font-size: 1.7rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin-bottom: 0.25rem !important;
}

.kunjungan-kpi-sub {
    font-size: 0.73rem !important;
    font-weight: 600 !important;
}

.kpi-blue .kunjungan-kpi-value { color: #3b82f6 !important; }
.kpi-blue .kunjungan-kpi-sub { color: #64748b !important; }

.kpi-green .kunjungan-kpi-value { color: #10b981 !important; }
.kpi-green .kunjungan-kpi-sub { color: #059669 !important; }

.kpi-orange .kunjungan-kpi-value { color: #f59e0b !important; }
.kpi-orange .kunjungan-kpi-sub { color: #d97706 !important; }

.kpi-purple .kunjungan-kpi-value { color: #8b5cf6 !important; }
.kpi-purple .kunjungan-kpi-sub { color: #7c3aed !important; }

.kpi-cyan .kunjungan-kpi-value { color: #06b6d4 !important; }
.kpi-cyan .kunjungan-kpi-sub { color: #0891b2 !important; }

.kunjungan-kpi-card.kpi-rose {
    border-left: 4px solid #f43f5e !important;
}
.kpi-rose .kunjungan-kpi-value { color: #e11d48 !important; }
.kpi-rose .kunjungan-kpi-sub { color: #be123c !important; }

.guru-filter-tab {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.guru-filter-tab:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}
.guru-filter-tab.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}
.guru-filter-tab.active-unvisited {
    background: #be123c !important;
    border-color: #be123c !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(190, 18, 60, 0.25) !important;
}
.guru-filter-tab.active-active {
    background: #047857 !important;
    border-color: #047857 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(4, 120, 87, 0.25) !important;
}

/* =========================================================
   QUIZ QUESTION 3: MENGAJI AL-QUR'AN (AYAT INPUT)
   ========================================================= */
.quran-ayat-card {
    margin-top: 0.85rem;
    padding: 1.25rem 1.15rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: slideDownFade 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.quran-ayat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.85rem 0;
}

.quran-ayat-input {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    transition: all 0.2s ease;
}

.quran-ayat-input:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

.quran-ayat-unit {
    padding: 0.85rem 1.15rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap;
}

.quran-ayat-chips {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.btn-ayat-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #cbd5e1;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

.btn-ayat-chip:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-ayat-chip.active {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.quran-page-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.15rem;
    border-radius: 14px;
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    text-align: left;
}

.quran-page-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    transform: translateY(-1px);
}

.quran-page-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35) 0%, rgba(5, 150, 105, 0.45) 100%) !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.quran-page-btn .check-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: transparent;
    font-size: 0.8rem;
    font-weight: 900;
    transition: all 0.2s ease;
}

.quran-page-btn.active .check-indicator {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.quran-juz-wrapper {
    margin-bottom: 1.15rem;
    padding: 0.95rem 1rem;
    background: rgba(15, 23, 42, 0.65);
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    border-radius: 14px;
    transition: all 0.2s ease;
}

.quran-juz-wrapper:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
}

.quran-juz-select {
    width: 100%;
    padding: 0.75rem 0.95rem;
    border-radius: 10px;
    background: #0f172a;
    color: #f8fafc;
    border: 1.5px solid rgba(16, 185, 129, 0.45);
    font-size: 0.95rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quran-juz-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.quran-juz-select option {
    background: #0f172a;
    color: #f8fafc;
    padding: 8px;
}




