/**
 * Alfa Pro Student Management Portal
 * Main Stylesheet - RTL Support & Soft UI Design
 * Requirements: 9.2, 19.1, 19.4, 19.5
 */

/* Custom Font */
@font-face {
    font-family: 'AlfaFont';
    src: url('/fonts/main.woff') format('woff'),
         url('/fonts/main.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables - Light Theme */
:root {
    /* Primary Colors - Bright & Cheerful */
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    
    /* Secondary Colors */
    --color-secondary: #ec4899;
    --color-secondary-light: #f472b6;
    --color-secondary-dark: #db2777;
    
    /* Accent Colors */
    --color-accent: #14b8a6;
    --color-accent-light: #2dd4bf;
    --color-accent-dark: #0d9488;
    
    /* Success, Warning, Error */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* Neutral Colors */
    --color-white: #ffffff;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    
    /* Background Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-input: #f1f5f9;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    /* Border Colors */
    --border-color: #e2e8f0;
    --border-focus: var(--color-primary);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    
    /* Header */
    --header-height: 64px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-sidebar: #1e293b;
    --bg-input: #334155;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #334155;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    font-family: 'AlfaFont', 'Vazirmatn', 'Tahoma', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: var(--spacing-xl);
    transition: margin-right var(--transition-normal);
}

.sidebar-collapsed .main-content {
    margin-right: var(--sidebar-collapsed-width);
}

/* Sidebar - Soft UI (No Shadows) */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    z-index: 100;
    transition: width var(--transition-normal);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: background-color var(--transition-fast);
}

.sidebar-toggle:hover {
    background-color: var(--bg-input);
}

.sidebar-nav {
    padding: var(--spacing-md);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    margin-bottom: var(--spacing-xs);
}

.nav-item:hover {
    background-color: var(--bg-input);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--color-primary);
    color: var(--text-inverse);
}

.nav-item-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nav-item-text {
    white-space: nowrap;
    overflow: hidden;
}

/* Header */
.header {
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-xl);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Cards - Soft UI (No Shadows) */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Buttons - Soft UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

.btn-secondary {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--color-gray-200);
}

.btn-success {
    background-color: var(--color-success);
    color: var(--text-inverse);
}

.btn-danger {
    background-color: var(--color-error);
    color: var(--text-inverse);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.75rem;
}

.btn-icon {
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
}

/* Form Elements - Soft UI */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-md);
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--spacing-md);
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--bg-input);
}

.table tr:hover {
    background-color: var(--bg-input);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
}

.badge-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

/* Alerts */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
    border: 1px solid var(--color-info);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background-color: var(--bg-input);
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Spacing Utilities */
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

/* Text Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.font-bold { font-weight: 700; }

/* Responsive */
@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 0 var(--spacing-md);
    }
    
    .card {
        padding: var(--spacing-md);
    }
}

/* Attendance Buttons - Large for easy touch */
.attendance-btn {
    min-width: 120px;
    min-height: 48px;
    font-size: 1rem;
}

.attendance-btn-present {
    background-color: var(--color-success);
    color: var(--text-inverse);
}

.attendance-btn-absent {
    background-color: var(--color-error);
    color: var(--text-inverse);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 18px;
    height: 18px;
    background-color: var(--color-error);
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark Mode Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background-color: var(--bg-input);
}

/* Print Styles */
@media print {
    .sidebar,
    .header,
    .btn,
    .theme-toggle {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
}

/* ============================================
   ENHANCED SIDEBAR STYLES
   Requirements: 9.2 (Collapsible sidebar)
   ============================================ */

.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-logo-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-decoration: none;
    color: var(--text-primary);
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: var(--radius-lg);
    color: var(--text-inverse);
    flex-shrink: 0;
}

.sidebar-logo-icon i {
    width: 24px;
    height: 24px;
}

.sidebar-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: var(--spacing-md);
}

.sidebar.collapsed .sidebar-logo-link {
    justify-content: center;
}

.sidebar.collapsed .sidebar-toggle {
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    position: relative;
}

.nav-item.collapsed {
    justify-content: center;
    padding: var(--spacing-md);
}

.nav-item.collapsed .nav-item-icon {
    margin: 0;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-item::after {
    content: attr(title);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--bg-card);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    z-index: 1000;
}

.sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
    visibility: visible;
}

.sidebar-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.sidebar-footer-content {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

/* ============================================
   ENHANCED HEADER STYLES
   Requirements: 19.6 (Dark mode toggle), 32.5 (Notifications)
   ============================================ */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.header-right,
.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.btn-icon:hover {
    background-color: var(--bg-input);
    color: var(--text-primary);
}

.btn-icon i {
    width: 20px;
    height: 20px;
}

/* Notification Styles */
.notification-wrapper {
    position: relative;
}

.notification-btn {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 360px;
    max-height: 480px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    z-index: 200;
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.notification-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.btn-link {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.btn-link:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-empty {
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-muted);
}

.notification-empty i {
    width: 48px;
    height: 48px;
    margin-bottom: var(--spacing-md);
}

.notification-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color var(--transition-fast);
}

.notification-item:hover {
    background-color: var(--bg-input);
}

.notification-item.unread {
    background-color: rgba(99, 102, 241, 0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.notification-icon i {
    width: 20px;
    height: 20px;
}

.notification-icon-grade {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.notification-icon-payment {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.notification-icon-absence {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

.notification-icon-message {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
}

.notification-icon-system {
    background-color: rgba(107, 114, 128, 0.1);
    color: var(--text-secondary);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0 0 var(--spacing-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* User Menu Styles */
.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: none;
    border: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.user-menu-btn:hover {
    background-color: var(--bg-input);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-menu-btn i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 240px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    z-index: 200;
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown-header .user-name {
    font-size: 1rem;
}

.user-dropdown-menu {
    padding: var(--spacing-sm);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--bg-input);
}

.dropdown-item i {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.dropdown-item-danger {
    color: var(--color-error);
}

.dropdown-item-danger i {
    color: var(--color-error);
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-sm) 0;
}

/* ============================================
   TRANSITIONS FOR ALPINE.JS
   Requirements: 19.7 (Smooth transitions)
   ============================================ */

.transition-opacity {
    transition: opacity var(--transition-normal);
}

.transition-dropdown {
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* ============================================
   MOBILE SIDEBAR OVERLAY
   Requirements: 19.8 (Responsive design)
   ============================================ */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
}

/* Show overlay when sidebar is open on mobile */
@media (max-width: 768px) {
    .sidebar-overlay {
        display: block;
    }
}

.mobile-menu-toggle {
    display: none;
}

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

[data-theme="dark"] #loading-overlay {
    background-color: rgba(15, 23, 42, 0.9);
}

.loading-spinner {
    text-align: center;
}

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

/* ============================================
   PAGE CONTENT
   ============================================ */

.page-content {
    padding-top: var(--spacing-lg);
}

/* ============================================
   RESPONSIVE STYLES
   Requirements: 19.8 (Responsive design)
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar .sidebar-logo-text,
    .sidebar .nav-item-text,
    .sidebar .sidebar-footer {
        display: none;
    }
    
    .sidebar .sidebar-header {
        justify-content: center;
        padding: var(--spacing-md);
    }
    
    .sidebar .sidebar-toggle.desktop-only {
        display: none;
    }
    
    .sidebar .nav-item {
        justify-content: center;
        padding: var(--spacing-md);
    }
    
    .main-content {
        margin-right: var(--sidebar-collapsed-width);
    }
    
    .notification-dropdown {
        width: 320px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        width: var(--sidebar-width);
        transform: translateX(100%);
        transition: transform var(--transition-normal);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar .sidebar-logo-text,
    .sidebar .nav-item-text,
    .sidebar .sidebar-footer {
        display: block;
    }
    
    .sidebar .sidebar-header {
        justify-content: space-between;
        padding: var(--spacing-lg);
    }
    
    .sidebar .nav-item {
        justify-content: flex-start;
        padding: var(--spacing-md);
    }
    
    .sidebar .sidebar-toggle.mobile-only {
        display: flex;
    }
    
    .sidebar-overlay {
        display: block;
    }
    
    .main-content {
        margin-right: 0;
        padding: var(--spacing-md);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: flex;
    }
    
    .header {
        padding: 0 var(--spacing-md);
    }
    
    .header-title {
        font-size: 1rem;
    }
    
    .notification-dropdown {
        position: fixed;
        top: var(--header-height);
        left: var(--spacing-md);
        right: var(--spacing-md);
        width: auto;
    }
    
    .user-dropdown {
        position: fixed;
        top: var(--header-height);
        left: var(--spacing-md);
        right: var(--spacing-md);
        width: auto;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .header-left {
        gap: var(--spacing-xs);
    }
    
    .btn-icon {
        width: 36px;
        height: 36px;
    }
    
    .avatar-sm {
        width: 28px;
        height: 28px;
    }
}


/* ============================================
   DASHBOARD SPECIFIC STYLES
   ============================================ */

/* Stat Cards */
.stat-card {
    padding: var(--spacing-lg);
}

.stat-card-content {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.stat-icon i {
    width: 24px;
    height: 24px;
}

.stat-icon-primary {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
}

.stat-icon-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.stat-icon-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.stat-icon-secondary {
    background-color: rgba(236, 72, 153, 0.1);
    color: var(--color-secondary);
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 var(--spacing-xs);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.stat-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.stat-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.8125rem;
}

.stat-change i {
    width: 14px;
    height: 14px;
}

.stat-change-positive {
    color: var(--color-success);
}

.stat-change-negative {
    color: var(--color-error);
}

.stat-change-neutral {
    color: var(--text-muted);
}

/* Card Title with Icon */
.card-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.card-title-icon {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.card-body {
    padding: 0;
}

/* Student List */
.student-list {
    display: flex;
    flex-direction: column;
}

.student-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.student-item:last-child {
    border-bottom: none;
}

.student-info {
    flex: 1;
}

.student-name {
    font-weight: 600;
    margin: 0 0 var(--spacing-xs);
}

.student-level {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

/* Class List */
.class-list {
    display: flex;
    flex-direction: column;
}

.class-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.class-item:last-child {
    border-bottom: none;
}

.class-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    padding: var(--spacing-sm);
    background-color: var(--bg-input);
    border-radius: var(--radius-md);
}

.time-start {
    font-weight: 600;
    font-size: 0.875rem;
}

.time-end {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.class-info {
    flex: 1;
}

.class-name {
    font-weight: 600;
    margin: 0 0 var(--spacing-xs);
}

.class-teacher {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-md);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    background-color: var(--bg-input);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.quick-action-btn:hover {
    background-color: var(--color-primary);
    color: var(--text-inverse);
}

.quick-action-btn:hover .quick-action-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-inverse);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-full);
    color: var(--color-primary);
    transition: all var(--transition-fast);
}

.quick-action-icon i {
    width: 24px;
    height: 24px;
}

.quick-action-btn span {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* Responsive Quick Actions */
@media (max-width: 1024px) {
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-action-btn {
        padding: var(--spacing-md);
    }
    
    .quick-action-icon {
        width: 40px;
        height: 40px;
    }
    
    .quick-action-icon i {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-icon i {
        width: 20px;
        height: 20px;
    }
}


/* ============================================
   LOGIN PAGE STYLES
   Requirements: 13.1 (OTP-based authentication)
   ============================================ */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--color-gray-100) 100%);
    padding: var(--spacing-lg);
}

[data-theme="dark"] .login-body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--color-gray-800) 100%);
}

.login-container {
    width: 100%;
    max-width: 440px;
    position: relative;
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: var(--radius-xl);
    color: var(--text-inverse);
}

.login-logo-icon i {
    width: 32px;
    height: 32px;
}

.login-logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

/* Form Elements */
.form-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-label-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.form-input-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.125rem;
    text-align: center;
    letter-spacing: 0.1em;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
    margin-bottom: 0;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--color-error);
    margin-top: var(--spacing-sm);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Button Block */
.btn-block {
    width: 100%;
}

/* OTP Mobile Display */
.otp-mobile-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-md);
    background-color: var(--bg-input);
    border-radius: var(--radius-lg);
}

.otp-mobile-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.otp-mobile-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.otp-mobile-display .btn-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.8125rem;
}

.otp-mobile-display .btn-link i {
    width: 14px;
    height: 14px;
}

/* OTP Input Container */
.otp-input-container {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    direction: ltr;
}

.otp-digit-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    background-color: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.otp-digit-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: var(--bg-secondary);
}

.otp-digit-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* OTP Timer */
.otp-timer {
    text-align: center;
    margin: var(--spacing-lg) 0;
}

.otp-timer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

.otp-timer-text i {
    width: 18px;
    height: 18px;
}

.otp-timer-value {
    font-weight: 600;
    color: var(--color-primary);
    font-family: monospace;
    font-size: 1rem;
}

/* Login Success */
.login-success {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.login-success-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(34, 197, 94, 0.1);
    border-radius: var(--radius-full);
    margin: 0 auto var(--spacing-lg);
    color: var(--color-success);
}

.login-success-icon i {
    width: 48px;
    height: 48px;
}

.login-success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm);
}

.login-success-message {
    color: var(--text-muted);
    margin: 0 0 var(--spacing-lg);
}

.login-success .spinner {
    margin: 0 auto;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.login-footer p {
    margin: 0 0 var(--spacing-xs);
}

.login-footer a {
    color: var(--color-primary);
}

/* Login Theme Toggle */
.login-theme-toggle {
    position: fixed;
    bottom: var(--spacing-lg);
    left: var(--spacing-lg);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-theme-toggle:hover {
    background-color: var(--bg-input);
    color: var(--text-primary);
}

.login-theme-toggle i {
    width: 20px;
    height: 20px;
}

/* Transition Fade */
.transition-fade {
    transition: opacity var(--transition-normal);
}

/* Responsive Login */
@media (max-width: 480px) {
    .login-body {
        padding: var(--spacing-md);
    }
    
    .login-card {
        padding: var(--spacing-xl);
    }
    
    .login-logo-icon {
        width: 48px;
        height: 48px;
    }
    
    .login-logo-icon i {
        width: 28px;
        height: 28px;
    }
    
    .login-logo-text {
        font-size: 1.5rem;
    }
    
    .otp-digit-input {
        width: 42px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .otp-input-container {
        gap: var(--spacing-xs);
    }
    
    .login-theme-toggle {
        bottom: var(--spacing-md);
        left: var(--spacing-md);
    }
}


/* ============================================
   ENHANCED NOTIFICATION DROPDOWN STYLES
   Requirements: 32.1, 32.3, 32.5
   ============================================ */

/* Notification Loading State */
.notification-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
    gap: var(--spacing-sm);
}

.notification-loading .spinner {
    width: 24px;
    height: 24px;
}

/* Notification Unread Dot */
.notification-unread-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* Enhanced Notification Header */
.notification-header h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.notification-header h3 i {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

.notification-header .btn-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.notification-header .btn-link i {
    width: 14px;
    height: 14px;
}

.notification-header .btn-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced Notification View All Link */
.notification-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    width: 100%;
    padding: var(--spacing-sm) 0;
}

.notification-view-all i {
    width: 16px;
    height: 16px;
}

/* Notification Item Enhancement */
.notification-item {
    position: relative;
}

.notification-item .notification-unread-dot {
    position: absolute;
    top: 50%;
    left: var(--spacing-md);
    transform: translateY(-50%);
}

/* Notification Badge Animation */
@keyframes notification-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.notification-badge {
    animation: notification-pulse 2s ease-in-out infinite;
}

/* Hide badge animation when count is 0 */
.notification-badge[x-show="false"] {
    animation: none;
}


/* ============================================
   ENHANCED MOBILE RESPONSIVE STYLES
   Requirement 10.1: Adapt layout for smaller screens
   ============================================ */

/* 
 * Mobile-First Base Styles
 * Ensures minimum 16px base font for readability without zooming
 */
html {
    font-size: 16px; /* Minimum base font for mobile readability */
}

/* Touch Target Accessibility - Minimum 44px for all interactive elements */
.touch-target,
button,
.btn,
a.nav-item,
.dropdown-item,
.notification-item,
.student-row,
.teacher-row,
.class-row,
.payment-row {
    min-height: 44px;
}

/* ============================================
   TABLET BREAKPOINT (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    /* Sidebar collapses to icon-only mode */
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar .sidebar-logo-text,
    .sidebar .nav-item-text,
    .sidebar .sidebar-footer {
        display: none;
    }
    
    .sidebar .sidebar-header {
        justify-content: center;
        padding: var(--spacing-md);
    }
    
    .sidebar .sidebar-toggle.desktop-only {
        display: none;
    }
    
    .sidebar .nav-item {
        justify-content: center;
        padding: var(--spacing-md);
    }
    
    .main-content {
        margin-right: var(--sidebar-collapsed-width);
    }
    
    /* Grid adjustments */
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
    
    /* Notification dropdown width */
    .notification-dropdown {
        width: 320px;
    }
    
    /* Quick actions grid */
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   MOBILE BREAKPOINT (max-width: 768px)
   Requirement 10.1: Mobile device layout adaptation
   ============================================ */
@media (max-width: 768px) {
    /* Root font size adjustment for mobile */
    html {
        font-size: 16px;
    }
    
    /* Sidebar - Full width slide-out on mobile */
    .sidebar {
        position: fixed;
        width: var(--sidebar-width);
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        z-index: 1000;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Restore sidebar content on mobile when open */
    .sidebar .sidebar-logo-text,
    .sidebar .nav-item-text,
    .sidebar .sidebar-footer {
        display: block;
    }
    
    .sidebar .sidebar-header {
        justify-content: space-between;
        padding: var(--spacing-lg);
    }
    
    .sidebar .nav-item {
        justify-content: flex-start;
        padding: var(--spacing-md);
        min-height: 48px; /* Touch-friendly height */
    }
    
    .sidebar .sidebar-toggle.mobile-only {
        display: flex;
    }
    
    /* Sidebar overlay for mobile */
    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition-normal), visibility var(--transition-normal);
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Main content - Full width on mobile */
    .main-content {
        margin-right: 0;
        padding: var(--spacing-md);
    }
    
    /* Mobile menu toggle visibility */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: flex;
    }
    
    /* Header mobile adjustments */
    .header {
        padding: 0 var(--spacing-md);
        height: 56px;
    }
    
    .header-title {
        font-size: 1rem;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Grid - Single column on mobile */
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    /* Cards - Reduced padding on mobile */
    .card {
        padding: var(--spacing-md);
        border-radius: var(--radius-lg);
    }
    
    /* Notification dropdown - Full width on mobile */
    .notification-dropdown {
        position: fixed;
        top: 56px;
        left: var(--spacing-sm);
        right: var(--spacing-sm);
        width: auto;
        max-height: calc(100vh - 70px);
        border-radius: var(--radius-lg);
    }
    
    /* User dropdown - Full width on mobile */
    .user-dropdown {
        position: fixed;
        top: 56px;
        left: var(--spacing-sm);
        right: var(--spacing-sm);
        width: auto;
    }
    
    /* Quick actions - 2 columns on mobile */
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-action-btn {
        padding: var(--spacing-md);
    }
    
    .quick-action-icon {
        width: 40px;
        height: 40px;
    }
    
    .quick-action-icon i {
        width: 20px;
        height: 20px;
    }
    
    /* Tables - Horizontal scroll on mobile */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 calc(-1 * var(--spacing-md));
        padding: 0 var(--spacing-md);
    }
    
    .table {
        min-width: 600px;
    }
    
    /* Forms - Stack vertically on mobile */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        margin-bottom: var(--spacing-md);
    }
    
    /* Form inputs - Larger touch targets */
    .form-input,
    .form-select,
    .form-textarea {
        padding: var(--spacing-md);
        font-size: 16px; /* Prevents iOS zoom on focus */
        min-height: 48px;
    }
    
    /* Buttons - Touch-friendly sizing */
    .btn {
        min-height: 44px;
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 0.9375rem;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .btn-lg {
        min-height: 52px;
        padding: var(--spacing-md) var(--spacing-xl);
    }
    
    .btn-icon {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Pagination - Centered on mobile */
    .pagination-container {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Modal - Full screen on mobile */
    .modal-overlay {
        padding: var(--spacing-sm);
    }
    
    .modal {
        max-width: 100%;
        max-height: 90vh;
        margin: var(--spacing-sm);
    }
    
    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }
    
    /* Stat cards - Stack on mobile */
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-card-content {
        align-items: center;
    }
    
    /* Typography adjustments */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.375rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    /* Page headers */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .page-header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .page-title i {
        width: 24px;
        height: 24px;
    }
    
    /* Search and filters */
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    /* Breadcrumb - Scrollable on mobile */
    .breadcrumb {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--spacing-xs);
    }
    
    /* Tabs - Scrollable on mobile */
    .tabs,
    .settings-tabs,
    .report-tabs,
    .survey-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: var(--spacing-xs);
    }
    
    .tab-btn,
    .settings-tab,
    .report-tab,
    .survey-tab {
        flex-shrink: 0;
        min-height: 44px;
    }
    
    /* Detail cards grid */
    .detail-cards-grid {
        grid-template-columns: 1fr;
    }
    
    /* Profile stats */
    .student-profile-stats,
    .teacher-profile-stats,
    .class-profile-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* Action buttons in tables */
    .action-buttons {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    /* Attendance specific */
    .attendance-stats-bar {
        flex-wrap: wrap;
        gap: var(--spacing-lg);
    }
    
    .gesture-instructions {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Session info grid */
    .session-info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Classes grid */
    .classes-grid {
        grid-template-columns: 1fr;
    }
    
    /* Payment type grid */
    .payment-type-grid {
        grid-template-columns: 1fr;
    }
    
    /* Payment info grid */
    .payment-info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Installments list */
    .installments-list {
        grid-template-columns: 1fr;
    }
    
    /* Report stats grid */
    .report-stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Financial summary */
    .financial-summary {
        grid-template-columns: 1fr;
    }
    
    /* Analytics grid */
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    /* Revenue breakdown */
    .revenue-breakdown {
        grid-template-columns: 1fr;
    }
    
    /* Term comparison */
    .term-comparison {
        grid-template-columns: 1fr;
    }
    
    /* Grade scale options */
    .grade-scale-options {
        grid-template-columns: 1fr;
    }
    
    /* Backup stats */
    .backup-stats {
        grid-template-columns: 1fr;
    }
    
    /* Survey stats */
    .survey-stats {
        grid-template-columns: 1fr;
    }
    
    /* Survey classes grid */
    .survey-classes-grid {
        grid-template-columns: 1fr;
    }
    
    /* Survey rating selector */
    .survey-rating-selector {
        flex-direction: column;
    }
    
    /* Holiday calendar */
    .holiday-calendar {
        font-size: 0.75rem;
    }
    
    .calendar-day {
        min-height: 60px;
    }
    
    /* List items - Stack on mobile */
    .secretary-item,
    .holiday-item,
    .backup-item,
    .survey-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .secretary-actions,
    .holiday-actions,
    .backup-actions,
    .survey-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Schedule items */
    .schedule-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Schedule slots in forms */
    .schedule-slot {
        grid-template-columns: 1fr;
    }
    
    /* Enrollment header */
    .enrollment-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    /* Grade item */
    .grade-item {
        flex-wrap: wrap;
    }
    
    .grade-class-info {
        width: 100%;
    }
    
    .grade-details {
        width: 100%;
        justify-content: space-between;
    }
    
    .grade-meta {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Student grade row */
    .student-grade-row {
        flex-wrap: wrap;
    }
    
    .student-info-section {
        width: 100%;
    }
    
    .grade-input-section {
        flex: 1;
    }
    
    /* Summary header */
    .summary-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .summary-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    /* Children tabs */
    .children-tabs {
        flex-direction: column;
    }
    
    .child-tab {
        width: 100%;
    }
    
    /* Teacher summary */
    .survey-teacher-summary {
        flex-direction: column;
        text-align: center;
    }
    
    .teacher-summary-info {
        text-align: center;
    }
    
    /* Top teacher card */
    .survey-top-teacher-card {
        flex-wrap: wrap;
    }
    
    .top-teacher-info {
        flex: 1 1 100%;
        order: 1;
    }
    
    /* Distribution row */
    .distribution-row {
        flex-wrap: wrap;
    }
    
    .distribution-label {
        width: 100%;
        margin-bottom: var(--spacing-xs);
    }
    
    /* Payment detail header */
    .payment-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .payment-status-section {
        align-items: flex-start;
        width: 100%;
    }
    
    /* Payment summary grid */
    .payment-summary-grid {
        grid-template-columns: 1fr;
    }
    
    /* Cash history item */
    .cash-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .cash-history-meta {
        align-items: flex-start;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
    
    /* Payment search info */
    .payment-search-info {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .payment-search-amounts {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Class info grid */
    .class-info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Grade stats bar */
    .grade-stats-bar {
        flex-wrap: wrap;
        gap: var(--spacing-lg);
    }
    
    /* Grade instructions */
    .grade-instructions {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* Filters container */
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-actions {
        margin-right: 0;
        justify-content: flex-start;
    }
    
    /* Report filters */
    .report-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    /* Survey filters */
    .survey-filters {
        flex-direction: column;
    }
    
    /* Grade scale info */
    .grade-scale-info {
        flex-direction: column;
        text-align: center;
    }
    
    .scale-range {
        margin-right: 0;
    }
    
    /* Trend chart */
    .trend-chart {
        overflow-x: auto;
    }
    
    /* Monthly summary */
    .monthly-summary {
        grid-template-columns: 1fr;
    }
    
    /* Students stats list */
    .students-stats-list {
        grid-template-columns: 1fr;
    }
    
    /* Student stat body */
    .student-stat-body {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
}

/* ============================================
   SMALL MOBILE BREAKPOINT (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Further reduced spacing */
    .main-content {
        padding: var(--spacing-sm);
    }
    
    /* Header adjustments */
    .header {
        height: 52px;
    }
    
    .header-left {
        gap: var(--spacing-xs);
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .avatar-sm {
        width: 28px;
        height: 28px;
    }
    
    /* Card padding */
    .card {
        padding: var(--spacing-sm);
    }
    
    /* Stat values */
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-icon i {
        width: 20px;
        height: 20px;
    }
    
    /* Typography */
    h1 { font-size: 1.375rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    h4 { font-size: 1rem; }
    
    .page-title {
        font-size: 1.125rem;
    }
    
    /* Login page */
    .login-body {
        padding: var(--spacing-sm);
    }
    
    .login-card {
        padding: var(--spacing-md);
    }
    
    .login-logo-icon {
        width: 48px;
        height: 48px;
    }
    
    .login-logo-icon i {
        width: 28px;
        height: 28px;
    }
    
    .login-logo-text {
        font-size: 1.5rem;
    }
    
    .otp-digit-input {
        width: 40px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .otp-input-container {
        gap: var(--spacing-xs);
    }
    
    .login-theme-toggle {
        bottom: var(--spacing-sm);
        left: var(--spacing-sm);
        width: 40px;
        height: 40px;
    }
    
    /* Modal */
    .modal {
        margin: var(--spacing-xs);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--spacing-md);
    }
    
    /* Form actions - Stack buttons */
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Quick amount buttons */
    .quick-amount-buttons {
        flex-direction: column;
    }
    
    .quick-amount-buttons .btn {
        width: 100%;
    }
    
    /* Survey form actions */
    .survey-form-actions {
        flex-direction: column;
    }
    
    .survey-form-actions .btn {
        width: 100%;
    }
    
    /* Survey success actions */
    .survey-success-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .survey-success-actions .btn {
        width: 100%;
    }
    
    /* Settings modal */
    .settings-modal {
        max-width: 100%;
        margin: var(--spacing-sm);
    }
    
    /* Settings card */
    .settings-card {
        padding: var(--spacing-md);
    }
    
    /* Tab buttons */
    .settings-tab,
    .report-tab,
    .survey-tab {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.75rem;
    }
    
    /* Chart container */
    .chart-container {
        padding: var(--spacing-md);
    }
    
    .chart-canvas {
        height: 200px;
    }
    
    /* Report title */
    .report-title {
        font-size: 1.25rem;
    }
    
    .report-title i {
        width: 24px;
        height: 24px;
    }
    
    /* Survey title */
    .survey-title {
        font-size: 1.25rem;
    }
    
    .survey-title i {
        width: 24px;
        height: 24px;
    }
    
    /* Settings title */
    .settings-title {
        font-size: 1.25rem;
    }
    
    .settings-title i {
        width: 24px;
        height: 24px;
    }
    
    /* Stat box */
    .stat-box {
        min-width: 80px;
        padding: var(--spacing-sm);
    }
    
    .stat-box .stat-value {
        font-size: 1.25rem;
    }
    
    /* Quick actions */
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .quick-action-btn {
        padding: var(--spacing-sm);
    }
    
    .quick-action-btn span {
        font-size: 0.75rem;
    }
    
    /* Notification dropdown */
    .notification-dropdown {
        left: var(--spacing-xs);
        right: var(--spacing-xs);
    }
    
    /* User dropdown */
    .user-dropdown {
        left: var(--spacing-xs);
        right: var(--spacing-xs);
    }
}

/* ============================================
   ENHANCED TABLET RESPONSIVE STYLES
   Requirement 10.2: Optimize layout for medium screens (768px - 1024px)
   ============================================ */

/* Tablet-specific breakpoint range */
@media (min-width: 769px) and (max-width: 1024px) {
    /* ----------------------------------------
       SIDEBAR - Collapsed icon-only mode with hover expansion
       ---------------------------------------- */
    .sidebar {
        width: var(--sidebar-collapsed-width);
        transition: width var(--transition-normal);
    }
    
    /* Hover expansion for sidebar on tablet */
    .sidebar:hover {
        width: var(--sidebar-width);
    }
    
    .sidebar:hover .sidebar-logo-text,
    .sidebar:hover .nav-item-text,
    .sidebar:hover .sidebar-footer {
        display: block;
        opacity: 1;
    }
    
    .sidebar:hover .sidebar-header {
        justify-content: space-between;
        padding: var(--spacing-lg);
    }
    
    .sidebar:hover .nav-item {
        justify-content: flex-start;
        padding: var(--spacing-md);
    }
    
    /* Hide text elements in collapsed state */
    .sidebar .sidebar-logo-text,
    .sidebar .nav-item-text,
    .sidebar .sidebar-footer {
        display: none;
        opacity: 0;
        transition: opacity var(--transition-fast);
    }
    
    .sidebar .sidebar-header {
        justify-content: center;
        padding: var(--spacing-md);
    }
    
    .sidebar .sidebar-toggle.desktop-only {
        display: none;
    }
    
    .sidebar .nav-item {
        justify-content: center;
        padding: var(--spacing-md);
    }
    
    /* Main content margin adjustment */
    .main-content {
        margin-right: var(--sidebar-collapsed-width);
        padding: var(--spacing-lg);
        transition: margin-right var(--transition-normal);
    }
    
    /* ----------------------------------------
       GRID LAYOUTS - 2-column optimization
       ---------------------------------------- */
    .grid-cols-4 { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .grid-cols-3 { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    /* Dashboard grid - 2 columns */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Stats grid - 2 columns */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Report stats grid - 2 columns */
    .report-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Survey stats - 2 columns */
    .survey-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Backup stats - 2 columns */
    .backup-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Analytics grid - 2 columns */
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Revenue breakdown - 2 columns */
    .revenue-breakdown {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Financial summary - 3 columns on tablet */
    .financial-summary {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Term comparison - 2 columns */
    .term-comparison {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* ----------------------------------------
       FORM LAYOUTS - 2-column where applicable
       ---------------------------------------- */
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    /* Payment type grid - 2 columns */
    .payment-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Payment info grid - 2 columns */
    .payment-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Payment summary grid - 2 columns */
    .payment-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Grade scale options - 2 columns */
    .grade-scale-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Installments list - 2 columns */
    .installments-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Survey classes grid - 2 columns */
    .survey-classes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Detail cards grid - 2 columns */
    .detail-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Children cards - 2 columns */
    .children-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* ----------------------------------------
       DASHBOARD CARDS AND STATS
       ---------------------------------------- */
    .stat-card {
        padding: var(--spacing-md);
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        width: 44px;
        height: 44px;
    }
    
    .stat-icon i {
        width: 22px;
        height: 22px;
    }
    
    /* Quick actions - 3 columns on tablet */
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .quick-action-btn {
        padding: var(--spacing-md);
    }
    
    .quick-action-icon {
        width: 44px;
        height: 44px;
    }
    
    .quick-action-icon i {
        width: 22px;
        height: 22px;
    }
    
    /* ----------------------------------------
       HEADER ADJUSTMENTS
       ---------------------------------------- */
    .header {
        padding: 0 var(--spacing-lg);
    }
    
    .header-title {
        font-size: 1.125rem;
    }
    
    /* Notification dropdown - optimized width */
    .notification-dropdown {
        width: 340px;
    }
    
    /* User dropdown - optimized width */
    .user-dropdown {
        width: 220px;
    }
    
    /* ----------------------------------------
       CARDS AND CONTAINERS
       ---------------------------------------- */
    .card {
        padding: var(--spacing-lg);
    }
    
    .card-header {
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .card-body {
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    /* Settings card */
    .settings-card {
        padding: var(--spacing-lg);
    }
    
    /* Survey card */
    .survey-card {
        padding: var(--spacing-lg);
    }
    
    /* ----------------------------------------
       TABLES - Horizontal scroll optimization
       ---------------------------------------- */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 700px;
    }
    
    .table th,
    .table td {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
    }
    
    /* ----------------------------------------
       CHARTS AND DATA VISUALIZATIONS
       ---------------------------------------- */
    .chart-container {
        padding: var(--spacing-md);
        min-height: 280px;
    }
    
    .chart-canvas {
        height: 240px;
    }
    
    .chart-header {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .chart-legend {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* ----------------------------------------
       MODALS - Optimized for tablet
       ---------------------------------------- */
    .modal {
        max-width: 560px;
    }
    
    .modal-lg {
        max-width: 680px;
    }
    
    .modal-body {
        max-height: 55vh;
    }
    
    /* Settings modal */
    .settings-modal {
        max-width: 520px;
    }
    
    /* ----------------------------------------
       TABS AND NAVIGATION
       ---------------------------------------- */
    .settings-tabs,
    .report-tabs,
    .survey-tabs {
        gap: var(--spacing-xs);
    }
    
    .settings-tab,
    .report-tab,
    .survey-tab {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.8125rem;
    }
    
    /* ----------------------------------------
       FILTERS AND SEARCH
       ---------------------------------------- */
    .search-filters {
        gap: var(--spacing-md);
    }
    
    .search-box {
        min-width: 200px;
        max-width: 300px;
    }
    
    .filter-select {
        min-width: 140px;
    }
    
    .report-filters {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    .filter-group {
        min-width: 130px;
    }
    
    /* ----------------------------------------
       LISTS AND ITEMS
       ---------------------------------------- */
    .student-list,
    .teacher-list,
    .class-list,
    .payment-list {
        gap: var(--spacing-sm);
    }
    
    .student-item,
    .teacher-item,
    .class-item {
        padding: var(--spacing-md);
    }
    
    /* Secretary list items */
    .secretary-item {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* Holiday items */
    .holiday-item {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* Backup items */
    .backup-item {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* Survey items */
    .survey-item {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* ----------------------------------------
       PROFILE AND DETAIL VIEWS
       ---------------------------------------- */
    .student-profile-stats,
    .teacher-profile-stats,
    .class-profile-stats {
        gap: var(--spacing-lg);
    }
    
    .stat-item .stat-value {
        font-size: 1.125rem;
    }
    
    /* ----------------------------------------
       ATTENDANCE SPECIFIC
       ---------------------------------------- */
    .attendance-stats-bar {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    .attendance-btn {
        min-width: 100px;
        min-height: 44px;
    }
    
    /* ----------------------------------------
       SCHEDULE SLOTS
       ---------------------------------------- */
    .schedule-slot {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .schedule-slot .form-group:nth-child(3) {
        grid-column: 1 / -1;
    }
    
    /* ----------------------------------------
       CALENDAR
       ---------------------------------------- */
    .holiday-calendar {
        font-size: 0.8125rem;
    }
    
    .calendar-day {
        min-height: 70px;
        padding: var(--spacing-xs);
    }
    
    .calendar-day-number {
        font-size: 0.8125rem;
    }
    
    /* ----------------------------------------
       PAGINATION
       ---------------------------------------- */
    .pagination-container {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    /* ----------------------------------------
       BUTTONS
       ---------------------------------------- */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .btn-lg {
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    /* ----------------------------------------
       TYPOGRAPHY
       ---------------------------------------- */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    .page-title {
        font-size: 1.375rem;
    }
    
    .page-title i {
        width: 26px;
        height: 26px;
    }
    
    /* ----------------------------------------
       NEXT CLASS CARD (Student Dashboard)
       ---------------------------------------- */
    .next-class-content {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    .next-class-name {
        font-size: 1.25rem;
    }
    
    /* ----------------------------------------
       PAYMENT STATUS ITEMS
       ---------------------------------------- */
    .payment-status-item {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    .payment-amounts {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* ----------------------------------------
       TEACHER REPORTS
       ---------------------------------------- */
    .teacher-report-table th,
    .teacher-report-table td {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.8125rem;
    }
    
    /* ----------------------------------------
       SURVEY RATING SELECTOR
       ---------------------------------------- */
    .survey-rating-selector {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .survey-rating-option {
        min-width: 90px;
        padding: var(--spacing-md);
    }
    
    /* ----------------------------------------
       TEACHER SUMMARY
       ---------------------------------------- */
    .survey-teacher-summary {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* ----------------------------------------
       TOP TEACHER CARDS
       ---------------------------------------- */
    .survey-top-teacher-card {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* ----------------------------------------
       DISTRIBUTION ROWS
       ---------------------------------------- */
    .distribution-row {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    /* ----------------------------------------
       CHAT LAYOUT
       ---------------------------------------- */
    .chat-sidebar {
        width: 260px;
    }
    
    .chat-messages {
        padding: var(--spacing-md);
    }
    
    /* ----------------------------------------
       NOTIFICATION CENTER
       ---------------------------------------- */
    .notification-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* ----------------------------------------
       PROGRESS TRACKING
       ---------------------------------------- */
    .progress-student-card {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* ----------------------------------------
       LEVELS MANAGEMENT
       ---------------------------------------- */
    .level-stats {
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
}

/* ============================================
   LANDSCAPE MOBILE ORIENTATION
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 260px;
    }
    
    .modal {
        max-height: 85vh;
    }
    
    .modal-body {
        max-height: 50vh;
    }
    
    .notification-dropdown {
        max-height: 70vh;
    }
}

/* ============================================
   HIGH DPI / RETINA DISPLAYS
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp borders on high DPI displays */
    .card,
    .btn,
    .form-input,
    .form-select,
    .table th,
    .table td {
        border-width: 0.5px;
    }
}

/* ============================================
   REDUCED MOTION PREFERENCE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .sidebar {
        transition: none;
    }
    
    .notification-badge {
        animation: none;
    }
}

/* ============================================
   SAFE AREA INSETS (for notched devices)
   ============================================ */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(var(--spacing-md), env(safe-area-inset-left));
        padding-right: max(var(--spacing-md), env(safe-area-inset-right));
    }
    
    .sidebar {
        padding-bottom: max(var(--spacing-md), env(safe-area-inset-bottom));
    }
    
    .main-content {
        padding-bottom: max(var(--spacing-lg), env(safe-area-inset-bottom));
    }
    
    .saving-indicator {
        bottom: max(var(--spacing-lg), env(safe-area-inset-bottom));
    }
}


/* ============================================
   DESKTOP BREAKPOINT (min-width: 1025px)
   Requirement 10.3: Utilize full screen width effectively on desktop
   ============================================ */

@media (min-width: 1025px) {
    /* ----------------------------------------
       SIDEBAR - Fully expanded on desktop
       ---------------------------------------- */
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .sidebar .sidebar-logo-text,
    .sidebar .nav-item-text,
    .sidebar .sidebar-footer {
        display: block;
        opacity: 1;
    }
    
    .sidebar .sidebar-header {
        justify-content: space-between;
        padding: var(--spacing-lg);
    }
    
    .sidebar .sidebar-toggle.desktop-only {
        display: flex;
    }
    
    .sidebar .nav-item {
        justify-content: flex-start;
        padding: var(--spacing-md);
    }
    
    /* Main content with full sidebar margin */
    .main-content {
        margin-right: var(--sidebar-width);
        padding: var(--spacing-xl);
        transition: margin-right var(--transition-normal);
    }
    
    /* Collapsed sidebar state on desktop */
    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar.collapsed .sidebar-logo-text,
    .sidebar.collapsed .nav-item-text,
    .sidebar.collapsed .sidebar-footer {
        display: none;
    }
    
    .sidebar.collapsed .sidebar-header {
        justify-content: center;
        padding: var(--spacing-md);
    }
    
    .sidebar.collapsed .nav-item {
        justify-content: center;
    }
    
    .sidebar-collapsed .main-content {
        margin-right: var(--sidebar-collapsed-width);
    }
    
    /* ----------------------------------------
       GRID LAYOUTS - 3-4 columns on desktop
       ---------------------------------------- */
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Dashboard grid - 2 columns with wider cards */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    
    /* Stats grid - 4 columns on desktop */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-lg);
    }
    
    .stats-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Report stats grid - 4 columns */
    .report-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Survey stats - 4 columns */
    .survey-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Backup stats - 4 columns */
    .backup-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Analytics grid - 2 columns */
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    
    /* Revenue breakdown - 3 columns */
    .revenue-breakdown {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Financial summary - 4 columns */
    .financial-summary {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Term comparison - 3 columns */
    .term-comparison {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* ----------------------------------------
       FORM LAYOUTS - Horizontal optimization
       ---------------------------------------- */
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .form-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Payment type grid - 3 columns */
    .payment-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Payment info grid - 3 columns */
    .payment-info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Payment summary grid - 4 columns */
    .payment-summary-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Grade scale options - 3 columns */
    .grade-scale-options {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Installments list - 3 columns */
    .installments-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Survey classes grid - 3 columns */
    .survey-classes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Detail cards grid - 2 columns */
    .detail-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    
    /* Children cards - 3 columns */
    .children-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* ----------------------------------------
       DASHBOARD CARDS AND STATS
       ---------------------------------------- */
    .stat-card {
        padding: var(--spacing-xl);
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .stat-icon {
        width: 56px;
        height: 56px;
    }
    
    .stat-icon i {
        width: 28px;
        height: 28px;
    }
    
    /* Quick actions - 6 columns on desktop */
    .quick-actions {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .quick-action-btn {
        padding: var(--spacing-lg);
    }
    
    .quick-action-icon {
        width: 48px;
        height: 48px;
    }
    
    .quick-action-icon i {
        width: 24px;
        height: 24px;
    }
    
    /* ----------------------------------------
       HEADER ADJUSTMENTS
       ---------------------------------------- */
    .header {
        padding: 0 var(--spacing-xl);
        height: var(--header-height);
    }
    
    .header-title {
        font-size: 1.25rem;
    }
    
    /* Notification dropdown - full width */
    .notification-dropdown {
        width: 400px;
    }
    
    /* User dropdown - full width */
    .user-dropdown {
        width: 260px;
    }
    
    /* ----------------------------------------
       CARDS AND CONTAINERS
       ---------------------------------------- */
    .card {
        padding: var(--spacing-xl);
    }
    
    .card-header {
        padding: var(--spacing-lg) var(--spacing-xl);
    }
    
    .card-body {
        padding: var(--spacing-lg) var(--spacing-xl);
    }
    
    /* Settings card */
    .settings-card {
        padding: var(--spacing-xl);
    }
    
    /* Survey card */
    .survey-card {
        padding: var(--spacing-xl);
    }
    
    /* ----------------------------------------
       TABLES - Full width optimization
       ---------------------------------------- */
    .table-container {
        overflow-x: visible;
    }
    
    .table {
        min-width: auto;
        width: 100%;
    }
    
    .table th,
    .table td {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 0.9375rem;
    }
    
    /* ----------------------------------------
       CHARTS AND DATA VISUALIZATIONS
       ---------------------------------------- */
    .chart-container {
        padding: var(--spacing-xl);
        min-height: 350px;
    }
    
    .chart-canvas {
        height: 300px;
    }
    
    .chart-header {
        margin-bottom: var(--spacing-lg);
    }
    
    .chart-legend {
        gap: var(--spacing-xl);
    }
    
    /* ----------------------------------------
       MODALS - Larger on desktop
       ---------------------------------------- */
    .modal {
        max-width: 560px;
    }
    
    .modal-lg {
        max-width: 800px;
    }
    
    .modal-xl {
        max-width: 1000px;
    }
    
    .modal-body {
        max-height: 65vh;
    }
    
    /* Settings modal */
    .settings-modal {
        max-width: 600px;
    }
    
    /* ----------------------------------------
       TABS AND NAVIGATION
       ---------------------------------------- */
    .settings-tabs,
    .report-tabs,
    .survey-tabs {
        gap: var(--spacing-sm);
    }
    
    .settings-tab,
    .report-tab,
    .survey-tab {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 0.9375rem;
    }
    
    /* ----------------------------------------
       FILTERS AND SEARCH
       ---------------------------------------- */
    .search-filters {
        gap: var(--spacing-lg);
    }
    
    .search-box {
        min-width: 300px;
        max-width: 450px;
    }
    
    .filter-select {
        min-width: 180px;
    }
    
    .report-filters {
        gap: var(--spacing-lg);
    }
    
    .filter-group {
        min-width: 160px;
    }
    
    /* ----------------------------------------
       LISTS AND ITEMS
       ---------------------------------------- */
    .student-list,
    .teacher-list,
    .class-list,
    .payment-list {
        gap: var(--spacing-md);
    }
    
    .student-item,
    .teacher-item,
    .class-item {
        padding: var(--spacing-lg);
    }
    
    /* ----------------------------------------
       PROFILE AND DETAIL VIEWS
       ---------------------------------------- */
    .student-profile-stats,
    .teacher-profile-stats,
    .class-profile-stats {
        gap: var(--spacing-2xl);
    }
    
    .stat-item .stat-value {
        font-size: 1.5rem;
    }
    
    /* ----------------------------------------
       ATTENDANCE SPECIFIC
       ---------------------------------------- */
    .attendance-stats-bar {
        gap: var(--spacing-xl);
    }
    
    .attendance-btn {
        min-width: 140px;
        min-height: 52px;
        font-size: 1rem;
    }
    
    /* ----------------------------------------
       SCHEDULE SLOTS
       ---------------------------------------- */
    .schedule-slot {
        grid-template-columns: 1fr 1fr 1fr auto;
    }
    
    /* ----------------------------------------
       CALENDAR
       ---------------------------------------- */
    .holiday-calendar {
        font-size: 0.9375rem;
    }
    
    .calendar-day {
        min-height: 90px;
        padding: var(--spacing-sm);
    }
    
    .calendar-day-number {
        font-size: 0.9375rem;
    }
    
    /* ----------------------------------------
       PAGINATION
       ---------------------------------------- */
    .pagination-container {
        gap: var(--spacing-lg);
    }
    
    /* ----------------------------------------
       BUTTONS
       ---------------------------------------- */
    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
    }
    
    .btn-lg {
        padding: var(--spacing-md) var(--spacing-xl);
        font-size: 1rem;
    }
    
    /* ----------------------------------------
       TYPOGRAPHY
       ---------------------------------------- */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-title i {
        width: 28px;
        height: 28px;
    }
    
    /* ----------------------------------------
       NEXT CLASS CARD (Student Dashboard)
       ---------------------------------------- */
    .next-class-content {
        gap: var(--spacing-xl);
    }
    
    .next-class-name {
        font-size: 1.5rem;
    }
    
    /* ----------------------------------------
       PAYMENT STATUS ITEMS
       ---------------------------------------- */
    .payment-status-item {
        gap: var(--spacing-xl);
    }
    
    .payment-amounts {
        gap: var(--spacing-xl);
    }
    
    /* ----------------------------------------
       CHAT LAYOUT
       ---------------------------------------- */
    .chat-sidebar {
        width: 320px;
    }
    
    .chat-messages {
        padding: var(--spacing-xl);
    }
    
    /* ----------------------------------------
       NOTIFICATION CENTER
       ---------------------------------------- */
    .notification-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* ----------------------------------------
       PROGRESS TRACKING
       ---------------------------------------- */
    .progress-student-card {
        gap: var(--spacing-xl);
    }
    
    /* ----------------------------------------
       LEVELS MANAGEMENT
       ---------------------------------------- */
    .level-stats {
        display: flex;
        gap: var(--spacing-lg);
    }
    
    /* ----------------------------------------
       SESSION INFO GRID
       ---------------------------------------- */
    .session-info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* ----------------------------------------
       CLASSES GRID
       ---------------------------------------- */
    .classes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* ----------------------------------------
       MONTHLY SUMMARY
       ---------------------------------------- */
    .monthly-summary {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* ----------------------------------------
       STUDENTS STATS LIST
       ---------------------------------------- */
    .students-stats-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   LARGE DESKTOP BREAKPOINT (min-width: 1440px)
   Requirement 10.3: Ultra-wide screen optimization
   ============================================ */

@media (min-width: 1440px) {
    /* ----------------------------------------
       ROOT VARIABLES - Larger spacing for ultra-wide
       ---------------------------------------- */
    :root {
        --sidebar-width: 300px;
    }
    
    /* ----------------------------------------
       MAIN CONTENT - Maximum width constraint for readability
       ---------------------------------------- */
    .main-content {
        padding: var(--spacing-2xl);
    }
    
    /* Content wrapper for maximum width constraint */
    .content-wrapper {
        max-width: 1600px;
        margin: 0 auto;
    }
    
    /* ----------------------------------------
       GRID LAYOUTS - Enhanced for ultra-wide
       ---------------------------------------- */
    .grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-xl);
    }
    
    /* Dashboard grid - 3 columns on ultra-wide */
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }
    
    /* Stats grid - 4 columns with larger gaps */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-xl);
    }
    
    /* Analytics grid - 2 columns with larger gaps */
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-2xl);
    }
    
    /* Detail cards grid - 3 columns on ultra-wide */
    .detail-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }
    
    /* Children cards - 4 columns */
    .children-cards {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Survey classes grid - 4 columns */
    .survey-classes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* ----------------------------------------
       FORM LAYOUTS - 3 columns on ultra-wide
       ---------------------------------------- */
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }
    
    .form-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Payment type grid - 3 columns */
    .payment-type-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* Installments list - 4 columns */
    .installments-list {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* ----------------------------------------
       DASHBOARD CARDS AND STATS
       ---------------------------------------- */
    .stat-card {
        padding: var(--spacing-2xl);
    }
    
    .stat-value {
        font-size: 2.25rem;
    }
    
    .stat-icon {
        width: 64px;
        height: 64px;
    }
    
    .stat-icon i {
        width: 32px;
        height: 32px;
    }
    
    /* Quick actions - 8 columns on ultra-wide */
    .quick-actions {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    
    /* ----------------------------------------
       HEADER ADJUSTMENTS
       ---------------------------------------- */
    .header {
        padding: 0 var(--spacing-2xl);
    }
    
    .header-title {
        font-size: 1.375rem;
    }
    
    /* Notification dropdown - larger */
    .notification-dropdown {
        width: 440px;
    }
    
    /* User dropdown - larger */
    .user-dropdown {
        width: 280px;
    }
    
    /* ----------------------------------------
       CARDS AND CONTAINERS
       ---------------------------------------- */
    .card {
        padding: var(--spacing-2xl);
    }
    
    .card-header {
        padding: var(--spacing-xl) var(--spacing-2xl);
    }
    
    .card-body {
        padding: var(--spacing-xl) var(--spacing-2xl);
    }
    
    /* ----------------------------------------
       TABLES - Enhanced spacing
       ---------------------------------------- */
    .table th,
    .table td {
        padding: var(--spacing-lg) var(--spacing-xl);
        font-size: 1rem;
    }
    
    /* ----------------------------------------
       CHARTS AND DATA VISUALIZATIONS
       ---------------------------------------- */
    .chart-container {
        padding: var(--spacing-2xl);
        min-height: 400px;
    }
    
    .chart-canvas {
        height: 350px;
    }
    
    /* ----------------------------------------
       MODALS - Larger on ultra-wide
       ---------------------------------------- */
    .modal {
        max-width: 640px;
    }
    
    .modal-lg {
        max-width: 900px;
    }
    
    .modal-xl {
        max-width: 1200px;
    }
    
    /* Settings modal */
    .settings-modal {
        max-width: 700px;
    }
    
    /* ----------------------------------------
       FILTERS AND SEARCH
       ---------------------------------------- */
    .search-box {
        min-width: 350px;
        max-width: 500px;
    }
    
    .filter-select {
        min-width: 200px;
    }
    
    /* ----------------------------------------
       CALENDAR
       ---------------------------------------- */
    .calendar-day {
        min-height: 100px;
    }
    
    /* ----------------------------------------
       TYPOGRAPHY
       ---------------------------------------- */
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.5rem; }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .page-title i {
        width: 32px;
        height: 32px;
    }
    
    /* ----------------------------------------
       CHAT LAYOUT
       ---------------------------------------- */
    .chat-sidebar {
        width: 360px;
    }
    
    /* ----------------------------------------
       NOTIFICATION CENTER
       ---------------------------------------- */
    .notification-stats {
        grid-template-columns: repeat(5, 1fr);
    }
    
    /* ----------------------------------------
       MONTHLY SUMMARY
       ---------------------------------------- */
    .monthly-summary {
        grid-template-columns: repeat(6, 1fr);
    }
    
    /* ----------------------------------------
       STUDENTS STATS LIST
       ---------------------------------------- */
    .students-stats-list {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* ----------------------------------------
       SESSION INFO GRID
       ---------------------------------------- */
    .session-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* ----------------------------------------
       CLASSES GRID
       ---------------------------------------- */
    .classes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   EXTRA LARGE DESKTOP BREAKPOINT (min-width: 1920px)
   For 4K and ultra-wide monitors
   ============================================ */

@media (min-width: 1920px) {
    /* Maximum content width for readability */
    .main-content {
        padding: var(--spacing-2xl) calc(var(--spacing-2xl) * 2);
    }
    
    .content-wrapper {
        max-width: 1800px;
    }
    
    /* Dashboard grid - 3 columns with max width */
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1800px;
        margin: 0 auto;
    }
    
    /* Stats grid - 4 columns with max width */
    .stats-grid {
        max-width: 1800px;
        margin: 0 auto var(--spacing-xl);
    }
    
    /* Quick actions - limit to 8 columns */
    .quick-actions {
        grid-template-columns: repeat(8, 1fr);
        max-width: 1600px;
    }
    
    /* Tables - center with max width */
    .table-container {
        max-width: 1800px;
        margin: 0 auto;
    }
    
    /* Charts - larger height */
    .chart-canvas {
        height: 400px;
    }
    
    /* Form grid - 3 columns with max width */
    .form-grid {
        max-width: 1200px;
    }
}

/* ============================================
   DESKTOP-SPECIFIC UTILITY CLASSES
   ============================================ */

/* Show only on desktop */
@media (min-width: 1025px) {
    .desktop-show {
        display: block !important;
    }
    
    .desktop-flex {
        display: flex !important;
    }
    
    .desktop-grid {
        display: grid !important;
    }
    
    .desktop-hide {
        display: none !important;
    }
    
    /* Desktop-specific grid columns */
    .desktop-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .desktop-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .desktop-cols-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* Desktop-specific gaps */
    .desktop-gap-lg {
        gap: var(--spacing-lg) !important;
    }
    
    .desktop-gap-xl {
        gap: var(--spacing-xl) !important;
    }
    
    /* Desktop-specific padding */
    .desktop-p-xl {
        padding: var(--spacing-xl) !important;
    }
    
    .desktop-p-2xl {
        padding: var(--spacing-2xl) !important;
    }
}

/* Show only on large desktop */
@media (min-width: 1440px) {
    .large-desktop-show {
        display: block !important;
    }
    
    .large-desktop-hide {
        display: none !important;
    }
    
    /* Large desktop-specific grid columns */
    .large-desktop-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .large-desktop-cols-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}
