/* ============================================
   STYLE.CSS - Modern Islamic Learning UI
   Font Awesome 6 | Dropdown Menu | Smooth
   Theme: Green & Gold | Clean | Responsive
   ============================================ */

/* --------------------------------------------
   1. RESET & VARIABLES
--------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary - Islamic Green */
    --primary-50: #ecfdf5;
    --primary-100: #d1fae5;
    --primary-200: #a7f3d0;
    --primary-300: #6ee7b7;
    --primary-400: #34d399;
    --primary-500: #10b981;
    --primary-600: #059669;
    --primary-700: #047857;
    --primary-800: #065f46;
    --primary-900: #064e3b;

    /* Secondary - Gold/Amber */
    --secondary-500: #f59e0b;
    --secondary-600: #d97706;

    /* Neutral */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.02);

    /* Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.75rem;
    --radius-full: 9999px;

    /* Font */
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --------------------------------------------
   2. BASE STYLES & ANIMATIONS
--------------------------------------------- */
body {
    font-family: var(--font-sans);
    background: linear-gradient(145deg, var(--gray-50) 0%, #ffffff 100%);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

/* Fade-in animation untuk semua konten utama */
.dashboard-container > * {
    animation: fadeInUp 0.4s ease forwards;
}

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

/* --------------------------------------------
   3. TYPOGRAPHY & UTILITIES
--------------------------------------------- */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-600); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.bg-white { background: white; }
.bg-gray-50 { background: var(--gray-50); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* --------------------------------------------
   4. HEADER & NAVIGATION (Glassmorphism)
--------------------------------------------- */
.main-header {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 2px solid rgba(16, 185, 129, 0.3);
}

.header-top {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
    color: white;
    padding: var(--space-4) var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    font-size: 2rem;
    background: rgba(255,255,255,0.15);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease;
}
.logo-icon:hover {
    transform: scale(1.02);
}

.logo-text h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.logo-text p {
    font-size: 0.75rem;
    opacity: 0.85;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: rgba(255,255,255,0.12);
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}
.user-profile:hover {
    background: rgba(255,255,255,0.2);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.user-info-text {
    text-align: right;
}
.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.user-role {
    font-size: 0.7rem;
    opacity: 0.8;
}

.logout-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.2);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.logout-link:hover {
    background: rgba(0,0,0,0.4);
    transform: translateY(-1px);
}

/* Navigation */
.navbar {
    background: white;
    padding: 0 var(--space-6);
    border-bottom: 1px solid var(--gray-200);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.nav-list > li {
    position: relative;
}
.nav-link, .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1.2rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.nav-link i, .dropdown-toggle i {
    width: 1.2rem;
    font-size: 1rem;
}
.nav-link:hover, .dropdown-toggle:hover {
    background: var(--gray-100);
    color: var(--primary-600);
    transform: translateY(-1px);
}
.nav-link.active {
    background: var(--primary-50);
    color: var(--primary-700);
    position: relative;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: var(--primary-500);
    border-radius: var(--radius-full);
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--gray-700);
}

/* --------------------------------------------
   5. DROPDOWN MENU (Desktop hover, Mobile klik)
--------------------------------------------- */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    list-style: none;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
}
.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 1.2rem;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.dropdown-menu li a:hover {
    background: var(--gray-100);
    color: var(--primary-600);
}
.dropdown-toggle i.fa-chevron-down {
    font-size: 0.7rem;
    margin-left: 6px;
    transition: transform 0.2s;
}

/* Desktop hover */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .dropdown:hover .dropdown-toggle i.fa-chevron-down {
        transform: rotate(180deg);
    }
}

/* Mobile toggle (klik) */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1.5rem;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: transparent;
    }
    .dropdown.show .dropdown-menu {
        display: block;
    }
    .dropdown-toggle i.fa-chevron-down {
        float: right;
    }
    .dropdown.show .dropdown-toggle i.fa-chevron-down {
        transform: rotate(180deg);
    }
}

/* --------------------------------------------
   6. FOOTER Modern
--------------------------------------------- */
.main-footer {
    background: linear-gradient(145deg, var(--gray-900) 0%, #0f172a 100%);
    color: var(--gray-400);
    margin-top: var(--space-12);
}
.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-10) var(--space-6) var(--space-8);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-8);
}
.footer-section h3 {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--space-4);
    position: relative;
    padding-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-section h3 i {
    color: var(--primary-400);
}
.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-500);
}
.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: var(--space-2);
}
.footer-links a, .footer-links li i {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-links a:hover {
    color: var(--primary-400);
    transform: translateX(3px);
    transition: 0.2s;
}
.social-icons {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}
.social-icons a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--gray-300);
}
.social-icons a:hover {
    background: var(--primary-600);
    color: white;
    transform: translateY(-3px);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: var(--space-5) var(--space-6);
    text-align: center;
    font-size: 0.75rem;
}

/* --------------------------------------------
   7. DASHBOARD & STATS CARDS
--------------------------------------------- */
.dashboard-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}
.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--primary-700) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: var(--space-2);
}
.page-subtitle {
    color: var(--gray-500);
    margin-bottom: var(--space-8);
    border-left: 3px solid var(--primary-500);
    padding-left: var(--space-4);
}
.stats-grid, .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-10);
}
.stat-card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: 1px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-200);
    background: white;
}
.stat-icon {
    font-size: 2.2rem;
    color: var(--primary-600);
    background: var(--primary-50);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
}
.stat-card h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin-bottom: var(--space-1);
}
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1;
}
.stat-trend {
    font-size: 0.7rem;
    margin-top: 4px;
}
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* --------------------------------------------
   8. BUTTONS
--------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}
.btn i {
    font-size: 0.9rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    border: none;
    box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-500);
    color: var(--primary-700);
}
.btn-outline:hover {
    background: var(--primary-50);
    border-color: var(--primary-600);
    transform: translateY(-1px);
}
.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
}
.btn-danger:hover {
    background: #dc2626;
    transform: scale(0.98);
}
.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}
.btn-group {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-4);
}

/* --------------------------------------------
   9. TABLES
--------------------------------------------- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: white;
    border: 1px solid var(--gray-200);
}
.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.modern-table thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}
.modern-table th {
    text-align: left;
    padding: var(--space-4) var(--space-5);
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}
.modern-table td {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
}
.modern-table tbody tr {
    transition: background 0.15s ease;
}
.modern-table tbody tr:hover {
    background: var(--gray-50);
}
.modern-table tbody tr:last-child td {
    border-bottom: none;
}

/* --------------------------------------------
   10. FORMS
--------------------------------------------- */
.form-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-8);
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.2s;
}
.form-container:hover {
    box-shadow: var(--shadow-lg);
}
.form-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-6);
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.form-group {
    margin-bottom: var(--space-5);
}
.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: var(--space-2);
    color: var(--gray-700);
}
.form-label.required::after {
    content: '*';
    color: var(--danger);
    margin-left: 4px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.form-textarea {
    resize: vertical;
    min-height: 100px;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-5);
}

/* --------------------------------------------
   11. MODAL
--------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalFadeIn 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.modal-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 1.2rem;
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.2s;
}
.modal-close:hover {
    color: var(--danger);
}
.modal-body {
    padding: var(--space-6);
}
.modal-footer {
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

/* --------------------------------------------
   12. LOGIN PAGE
--------------------------------------------- */
.login-container {
    max-width: 440px;
    margin: 5rem auto;
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-8);
    text-align: center;
}
.login-container h2 {
    margin-bottom: var(--space-6);
    color: var(--gray-800);
}
.login-container input {
    width: 100%;
    margin-bottom: var(--space-4);
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}
.login-container button {
    width: 100%;
    background: var(--primary-600);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.login-container button:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
}
.error {
    background: #fee2e2;
    color: #b91c1c;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    font-size: 0.85rem;
}

/* --------------------------------------------
   13. BADGES (Status)
--------------------------------------------- */
.badge-hadir, .badge-sakit, .badge-izin, .badge-alpha {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}
.badge-hadir { background: #d1fae5; color: #065f46; }
.badge-sakit { background: #fed7aa; color: #9b2c1d; }
.badge-izin { background: #dbeafe; color: #1e40af; }
.badge-alpha { background: #fee2e2; color: #991b1b; }

/* --------------------------------------------
   14. RESPONSIVE
--------------------------------------------- */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
        padding: var(--space-4);
    }
    .user-profile {
        width: 100%;
        justify-content: center;
    }
    .navbar {
        padding: 0 var(--space-4);
    }
    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: var(--space-3) 0;
    }
    .nav-list.active {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .stats-grid, .stats {
        grid-template-columns: 1fr;
    }
    .dashboard-container {
        padding: var(--space-5);
    }
    .form-container {
        padding: var(--space-5);
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .stat-number {
        font-size: 1.5rem;
    }
    .btn-group {
        flex-direction: column;
    }
    .btn-group .btn {
        width: 100%;
    }
    .modern-table th, .modern-table td {
        padding: var(--space-3);
        font-size: 0.7rem;
    }
}

/* --------------------------------------------
   15. PRINT STYLES
--------------------------------------------- */
@media print {
    .main-header, .navbar, .main-footer, .btn, .menu-toggle, .user-profile {
        display: none !important;
    }
    .dashboard-container {
        padding: 0;
        margin: 0;
    }
    body {
        background: white;
    }
    .stat-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
.logo-icon img {
    border-radius: 50%;
    object-fit: cover;
}
/* ============================================
   MOBILE ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    /* Perbaikan font size */
    body {
        font-size: 14px;
    }
    
    /* Header logo lebih kecil */
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .logo-text h1 {
        font-size: 1rem;
    }
    .logo-text p {
        font-size: 0.65rem;
    }
    
    /* User profile lebih ringkas */
    .user-profile {
        padding: 0.3rem 0.8rem;
        gap: 0.5rem;
    }
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .user-name {
        font-size: 0.75rem;
    }
    .user-role {
        font-size: 0.6rem;
    }
    .logout-link {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    /* Navigasi mobile lebih nyaman */
    .nav-link, .dropdown-toggle {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    .dropdown-menu li a {
        padding: 0.5rem 1rem 0.5rem 1.8rem;
        font-size: 0.75rem;
    }
    
    /* Cards dan container */
    .stat-card {
        padding: 0.8rem;
    }
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    .stat-number {
        font-size: 1.5rem;
    }
    .form-container {
        padding: 1rem;
    }
    
    /* Tombol */
    .btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
    .btn-group {
        gap: 0.5rem;
    }
    
    /* Tabel - scroll horizontal */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .modern-table th, .modern-table td {
        padding: 0.5rem;
        font-size: 0.7rem;
        white-space: nowrap;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    /* Mushaf (Al-Qur'an) */
    .ayat-arab {
        font-size: 1.2rem;
        line-height: 1.6rem;
    }
    .ayat-card {
        padding: 0.6rem 1rem;
    }
    .ayat-number {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
        line-height: 26px;
    }
    .ayat-translation {
        font-size: 0.75rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }
}

/* Untuk layar sangat kecil (<=480px) */
@media (max-width: 480px) {
    .dashboard-container {
        padding: 0.8rem;
    }
    .page-title {
        font-size: 1.3rem;
    }
    .page-subtitle {
        font-size: 0.8rem;
    }
    
    /* Stat card jadi 2 kolom atau stack? Biar stack saja */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Radio button di absensi */
    .radio-group-horizontal label {
        font-size: 10px;
    }
    .radio-group-horizontal input {
        transform: scale(0.8);
    }
    
    /* Dropdown select di tabel */
    .modern-table select {
        font-size: 0.65rem;
        padding: 2px 4px;
        width: 55px;
    }
}

/* Perbaikan touch target (minimal 44x44px) */
.btn, .nav-link, .dropdown-toggle, .modal-close, 
.btn-edit-kelas, .btn-edit-siswa, .btn-preview,
a[href*="hapus"], button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Kecuali untuk tombol kecil di dalam tabel */
.btn-sm {
    min-height: auto;
    padding: 4px 8px;
}

/* Scroll yang halus */
html {
    scroll-behavior: smooth;
}

/* Hindari zoom otomatis pada input */
input, select, textarea {
    font-size: 16px !important; /* Mencegah zoom otomatis di iOS */
}