/**
 * PORTAL SAS - MIS NOR RAHMAN BANJARMASIN
 * Stylesheet Utama Aplikasi (PHP Native & Shared Hosting cPanel)
 * Warna Diambil Langsung dari Logo Resmi:
 * - Biru Cerah (#009fe3 / #0284c7)
 * - Kuning Keemasan (#ffd000 / #f59e0b)
 * - Putih Bersih & Abu-abu Gelap (#1e293b)
 */

:root {
    --primary-blue: #0284c7;
    --primary-blue-dark: #0369a1;
    --primary-blue-deep: #0c4a6e;
    --primary-blue-light: #e0f2fe;
    --accent-yellow: #ffd000;
    --accent-gold: #f59e0b;
    --accent-gold-dark: #d97706;
    --accent-yellow-light: #fef9c3;
    
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --success-green: #10b981;
    --warning-amber: #f59e0b;
    --danger-red: #ef4444;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(2, 132, 199, 0.08);
    --shadow-lg: 0 10px 25px rgba(2, 132, 199, 0.12);
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ====================================================================
   1. HEADER & NAVIGASI RESMI
   ==================================================================== */
.app-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border-bottom: 3.5px solid var(--accent-yellow);
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: #ffffff;
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--accent-yellow);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
    opacity: 0.95;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-item {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent-yellow);
}

.nav-btn {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-guru {
    background: #ffffff;
    color: var(--primary-blue-dark);
}

.btn-guru:hover {
    background: var(--accent-yellow);
    color: var(--text-main);
}

.btn-admin {
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-admin:hover {
    background: rgba(0, 0, 0, 0.45);
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.btn-logout {
    background: #ef4444;
    color: #ffffff;
}

.btn-logout:hover {
    background: #dc2626;
}

.user-greeting {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 0.5rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
}

/* ====================================================================
   2. HERO BANNER
   ==================================================================== */
.hero-section {
    background: linear-gradient(180deg, var(--primary-blue-light) 0%, var(--bg-page) 100%);
    padding: 3rem 1.25rem 3rem;
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 28px;
    padding: 2.75rem 2rem 2.25rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-yellow));
}

.hero-logo-box {
    margin-bottom: 1.5rem;
    background: #f0f9ff;
    padding: 1.25rem;
    border-radius: 22px;
    border: 2px dashed #f59e0b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    width: 135px;
    height: 135px;
    object-fit: contain;
    display: block;
}

.hero-text-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.4rem 1.1rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
    border: 1px solid #fde68a;
    letter-spacing: 0.3px;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 900;
    color: #075985;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.hero-school {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.hero-meta {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.hero-meta strong {
    color: #1e293b;
}

.hero-actions-vertical {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.btn-masuk-siswa {
    width: 100%;
    background: #0284c7;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-masuk-siswa:hover {
    background: #0369a1;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

.hero-sub-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
}

.btn-login-guru-home {
    background: #eab308;
    color: #1c1917;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid #facc15;
    transition: var(--transition);
}

.btn-login-guru-home:hover {
    background: #ca8a04;
    color: #ffffff;
}

.btn-login-admin-home {
    background: #ffffff;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid #cbd5e1;
    transition: var(--transition);
}

.btn-login-admin-home:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* ====================================================================
   3. TOMBOL-TOMBOL UTAMA
   ==================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: var(--transition);
    text-align: center;
    line-height: 1.4;
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    box-shadow: 0 6px 14px rgba(2, 132, 199, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--accent-yellow);
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

.btn-secondary:hover {
    background: var(--accent-gold);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f1f5f9;
    border-color: var(--text-muted);
}

.btn-outline-primary {
    background: transparent;
    border: 1.5px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: #ffffff;
}

.btn-outline-warning {
    background: transparent;
    border: 1px solid var(--warning-amber);
    color: var(--warning-amber);
}

.btn-outline-warning:hover {
    background: var(--warning-amber);
    color: #ffffff;
}

.btn-outline-success {
    background: transparent;
    border: 1px solid var(--success-green);
    color: var(--success-green);
}

.btn-outline-success:hover {
    background: var(--success-green);
    color: #ffffff;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
}

.btn-outline-danger:hover {
    background: var(--danger-red);
    color: #ffffff;
}

.btn-disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

/* ====================================================================
   4. KONTEN UTAMA & SECTION
   ==================================================================== */
.main-content {
    flex: 1;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-blue-dark);
    margin-bottom: 0.35rem;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.class-picker-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-color);
}

.picker-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.class-dropdown {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue-dark);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--primary-blue);
    background: var(--primary-blue-light);
    cursor: pointer;
}

/* ====================================================================
   5. GRID KARTU MATA PELAJARAN (13 MAPEL)
   ==================================================================== */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
}

.subject-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    overflow: hidden;
}

.subject-card.card-ready {
    border-color: #bae6fd;
}

.subject-card.card-ready:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card-top-bar {
    padding: 1rem 1.25rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subject-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-blue-dark);
    background: var(--primary-blue-light);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}

.card-body {
    padding: 0.75rem 1.25rem 1.25rem;
    flex: 1;
}

.subject-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.subject-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.meta-row {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-icon {
    font-size: 0.95rem;
}

.meta-label {
    color: var(--text-muted);
}

.meta-val {
    font-weight: 600;
    color: var(--text-main);
}

.card-footer {
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
}

/* ====================================================================
   6. STATUS BADGES
   ==================================================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    letter-spacing: 0.5px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-tersedia {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.status-tersedia .status-dot {
    background: #10b981;
}

.status-belum {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.status-belum .status-dot {
    background: #f59e0b;
}

.status-ditutup {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.status-ditutup .status-dot {
    background: #ef4444;
}

.status-terjadwal {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.status-terjadwal .status-dot {
    background: #2563eb;
}

.subject-card.card-scheduled {
    border-color: #bfdbfe;
}
.subject-card.card-scheduled:hover {
    border-color: #3b82f6;
    box-shadow: var(--shadow-md);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 640px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.schedule-card-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.schedule-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.schedule-info-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}

/* ====================================================================
   7. MODAL KONFIRMASI MULAI SAS
   ==================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.25rem;
}

.modal-box {
    background: #ffffff;
    max-width: 480px;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    overflow: hidden;
    border-top: 5px solid var(--accent-yellow);
    animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-blue-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
    text-align: center;
}

.modal-alert-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.modal-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.modal-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: #f8fafc;
    padding: 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ====================================================================
   8. HALAMAN LOGIN & AUTH
   ==================================================================== */
.auth-wrapper {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
    background: linear-gradient(180deg, var(--primary-blue-light) 0%, var(--bg-page) 100%);
}

.auth-card {
    background: var(--bg-card);
    max-width: 440px;
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
    border: 2px solid #ffffff;
    border-top: 5px solid var(--accent-yellow);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 85px;
    height: 85px;
    object-fit: contain;
    margin: 0 auto 0.75rem;
    display: block;
}

.auth-badge {
    display: inline-block;
    background: var(--primary-blue-light);
    color: var(--primary-blue-dark);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
}

.auth-badge-admin {
    background: var(--accent-yellow-light);
    color: var(--accent-gold-dark);
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-blue-dark);
}

.auth-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-demo-hint {
    margin-top: 1.5rem;
    background: #f8fafc;
    border: 1px dashed var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.auth-demo-hint code {
    background: #e2e8f0;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-weight: 700;
    color: var(--primary-blue-dark);
}

.auth-footer-nav {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-footer-nav a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.auth-footer-nav a:hover {
    text-decoration: underline;
}

/* ====================================================================
   9. FORM CONTROLS & INPUTS
   ==================================================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.form-label .required {
    color: var(--danger-red);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-main);
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-select-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

/* Opsi Tampilkan / Sembunyikan Password */
.password-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.password-toggle-label input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    cursor: pointer;
    accent-color: var(--primary-blue);
    margin: 0;
}

.password-toggle-label:hover {
    color: var(--primary-blue);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ====================================================================
   10. FLASH ALERTS
   ==================================================================== */
.flash-wrapper {
    max-width: 1200px;
    margin: 1.5rem auto -0.5rem;
    padding: 0 1.25rem;
}

.flash-alert {
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
}

.flash-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1.5px solid #a7f3d0;
}

.flash-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1.5px solid #fecaca;
}

.flash-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1.5px solid #fde68a;
}

.flash-info {
    background: #e0f2fe;
    color: #075985;
    border: 1.5px solid #bae6fd;
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    line-height: 1;
}

.alert-box {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ====================================================================
   11. DASHBOARD & ADMIN PAGES
   ==================================================================== */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.page-container.form-narrow {
    max-width: 720px;
}

.page-title-row {
    margin-bottom: 1.75rem;
}

.page-main-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-blue-dark);
}

.page-sub-title {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.dash-welcome-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 2rem 2.25rem;
    color: #ffffff;
    border-bottom: 4px solid var(--accent-yellow);
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.dash-welcome-card.admin-welcome {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue-deep) 100%);
}

.dash-pill {
    display: inline-block;
    background: var(--accent-yellow);
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.dash-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

.dash-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    max-width: 600px;
}

.dash-stats-mini {
    display: flex;
    gap: 1.25rem;
}

.mini-stat {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-lg);
    text-align: center;
    min-width: 110px;
}

.mini-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.mini-num.stat-ready {
    color: var(--accent-yellow);
}

.mini-label {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 600;
}

.guide-box {
    background: #ffffff;
    border: 1.5px solid var(--accent-yellow);
    border-left: 5px solid var(--accent-gold);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.guide-icon {
    font-size: 1.3rem;
}

.guide-text a {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Grid Penugasan Guru */
.assignments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.assignment-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.assignment-card.card-status-ready {
    border-top: 4px solid var(--primary-blue);
}

.assignment-card.card-status-empty {
    border-top: 4px solid var(--accent-gold);
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.badge-class {
    font-size: 0.8rem;
    font-weight: 800;
    background: var(--primary-blue-light);
    color: var(--primary-blue-dark);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
}

.subject-heading {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.link-preview-box {
    margin: 1rem 0;
    background: #f8fafc;
    border: 1px dashed var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}

.link-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.link-url-text {
    word-break: break-all;
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.link-url-text:hover {
    text-decoration: underline;
}

.link-empty-text {
    color: var(--text-muted);
    font-style: italic;
}

.card-actions {
    display: flex;
    gap: 0.65rem;
    margin-top: 1rem;
}

/* ====================================================================
   12. ADMIN STATS & TABLES
   ==================================================================== */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-color);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.icon-blue { background: #e0f2fe; }
.icon-gold { background: #fef9c3; }
.icon-green { background: #ecfdf5; }
.icon-amber { background: #fffbeb; }

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue-dark);
    line-height: 1;
    display: block;
    margin-bottom: 0.35rem;
}

.stat-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.stat-link {
    margin-top: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
}

.stat-link:hover {
    text-decoration: underline;
}

.stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.quick-nav-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.25rem;
    background: #ffffff;
    padding: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.quick-btn {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-blue-dark);
    background: var(--primary-blue-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.quick-btn:hover {
    background: var(--primary-blue);
    color: #ffffff;
}

.quick-btn-outline {
    background: transparent;
    border: 1.5px solid var(--accent-gold);
    color: var(--accent-gold-dark);
}

.quick-btn-outline:hover {
    background: var(--accent-gold);
    color: #ffffff;
}

.grid-layout-admin {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.75rem;
    align-items: flex-start;
}

.side-form-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-color);
    border-top: 4px solid var(--primary-blue);
    padding: 1.5rem;
}

.side-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-blue-dark);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.main-table-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-color);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

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

.data-table th {
    background: #f8fafc;
    padding: 0.85rem 1rem;
    font-weight: 800;
    color: var(--text-main);
    border-bottom: 1.5px solid var(--border-color);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tr:hover {
    background: #f0f9ff;
}

.tag-class {
    color: var(--primary-blue-dark);
}

.link-table {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.link-table:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: #e2e8f0; color: #475569; }
.badge-primary { background: #e0f2fe; color: #0369a1; text-decoration: none; }

.action-buttons-inline {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.action-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* ====================================================================
   13. FOOTER RESMI
   ==================================================================== */
.app-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 1.75rem 1.25rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.footer-brand strong {
    display: block;
    font-size: 0.95rem;
    color: var(--primary-blue-dark);
}

.footer-brand span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-info {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-sub a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

/* ====================================================================
   14. MEDIA QUERIES RESPONSIVE MOBILE
   ==================================================================== */
@media (max-width: 900px) {
    .grid-layout-admin {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-blue-dark);
        flex-direction: column;
        padding: 1.25rem;
        gap: 0.75rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    }

    .header-nav.active {
        display: flex;
    }

    .hero-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.25rem;
        gap: 1.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }
}

/* ====================================================================
   15. CREDENTIAL PILL & PASSWORD DISPLAY (ADMIN)
   ==================================================================== */
.credential-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: #1e293b;
    vertical-align: middle;
}

.credential-pill.password-revealed {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #065f46;
    font-weight: 700;
}

.btn-copy-sm {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    color: #64748b;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    transition: 0.2s;
    line-height: 1;
}

.btn-copy-sm:hover {
    color: #0284c7;
    background: #e2e8f0;
}

/* ====================================================================
   16. STUDENT PORTAL ONBOARDING & EXAM RULES STYLING
   ==================================================================== */
.student-entry-container {
    max-width: 1080px;
    margin: -1.5rem auto 2.5rem;
    padding: 0 1.25rem;
    position: relative;
    z-index: 5;
}

.student-onboarding-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 35px -8px rgba(2, 132, 199, 0.15), 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.onboarding-header-strip {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: #ffffff;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.onboarding-title-wrap h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.onboarding-title-wrap p {
    font-size: 0.875rem;
    color: var(--primary-blue-light);
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.student-tag-pill {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    backdrop-filter: blur(4px);
}

.student-grid-guidelines {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    padding: 1.75rem 2rem;
    background: #ffffff;
}

.guideline-col-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
}

.guideline-col-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.guideline-col-card.rules-card {
    border-top: 4px solid var(--accent-gold);
}

.guideline-col-card.instructions-card {
    border-top: 4px solid var(--primary-blue);
}

.guideline-col-card.motivation-card {
    border-top: 4px solid var(--success-green);
    background: linear-gradient(180deg, #f0fdf4 0%, #f8fafc 100%);
}

.guideline-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed #e2e8f0;
}

.guideline-icon {
    font-size: 1.25rem;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.guideline-header h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.guideline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.825rem;
    color: #475569;
}

.guideline-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.45;
}

.guideline-list li strong {
    color: #1e293b;
}

.list-check-icon {
    color: var(--primary-blue);
    font-weight: 800;
    flex-shrink: 0;
}

.rules-card .list-check-icon {
    color: var(--accent-gold-dark);
}

.motivation-content {
    font-size: 0.85rem;
    color: #166534;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.hadith-quote {
    background: #ffffff;
    border-left: 3px solid var(--success-green);
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #15803d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hadith-source {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #166534;
    margin-top: 0.35rem;
    font-style: normal;
}

.doa-box {
    background: #ffffff;
    border: 1px dashed #bbf7d0;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.arabic-doa {
    font-size: 1.15rem;
    font-weight: 700;
    color: #14532d;
    margin-bottom: 0.25rem;
    font-family: 'Amiri', 'Traditional Arabic', serif;
}

.doa-arti {
    font-size: 0.75rem;
    color: #374151;
}

.student-selection-panel {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.selection-info-text {
    flex: 1;
    min-width: 250px;
}

.selection-info-text h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.selection-info-text p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.selection-controls-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.class-select-styled {
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-blue-deep);
    background: #ffffff;
    border: 2px solid var(--primary-blue);
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.12);
    outline: none;
    transition: var(--transition);
}

.class-select-styled:focus {
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
}

.jump-to-mapel-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
    background: var(--primary-blue);
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.jump-to-mapel-btn:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .student-entry-container {
        margin-top: -0.5rem;
        padding: 0 0.75rem;
    }
    .student-grid-guidelines {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }
    .student-selection-panel {
        padding: 1.25rem;
    }
    .onboarding-header-strip {
        padding: 1.25rem;
    }
}

