/* ====================================================
   MAK SCHOOL MANAGEMENT SYSTEM - MASTER CSS
   All colors use CSS variables for dynamic theming
   ==================================================== */

/* CSS Variables - These will be overridden by school theme */
:root {
    --primary-color: #4D0E3C;
    --secondary-color: #DB4748;
    --text-on-primary: #FFFFFF;
    --text-on-secondary: #FFFFFF;
    --bg-gray: #f0f2f5;
    --card-white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border-gray: #dee2e6;
    --danger-red: #dc3545;
    --success-green: #28a745;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 80%, black 20%) 100%);
    color: var(--text-dark);
    line-height: 1.5;
    font-size: 16px;
    min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    color: var(--secondary-color);
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--text-on-secondary);
}

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--secondary-color) 85%, black 15%);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger-red);
    color: white;
}

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

/* ===== CARDS ===== */
.card {
    background: var(--card-white);
    border: 1px solid var(--border-gray);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-header {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header i {
    color: var(--secondary-color);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-label i {
    color: var(--secondary-color);
    margin-right: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-gray);
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--secondary-color) 25%, transparent 75%);
}

.required-star {
    color: var(--danger-red);
    margin-left: 0.25rem;
}

.form-help-text {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* ===== TABLES ===== */
.table-responsive {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-white);
}

.modern-table th {
    background: var(--bg-gray);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
}

.modern-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-gray);
}

.modern-table tr:hover td {
    background-color: color-mix(in srgb, var(--secondary-color) 5%, transparent 95%);
}

/* ====================================================
   PROFESSIONAL NAVBAR STYLES
   ==================================================== */

.navbar {
    background: var(--card-white);
    border-bottom: 1px solid var(--border-gray);
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

/* Brand Section */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.school-logo {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.school-logo:hover {
    transform: scale(1.02);
}

.school-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.navbar-brand i.fa-school {
    font-size: 28px;
    color: var(--secondary-color);
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.menu-toggle i {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.menu-toggle:hover {
    background: var(--bg-gray);
}

/* User Section */
.navbar-user {
    position: relative;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: 40px;
    transition: all 0.2s ease;
    background: transparent;
}

.user-info:hover {
    background: var(--bg-gray);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
    transition: transform 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 1.8rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.85rem;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.65rem;
    color: var(--text-light);
    text-transform: capitalize;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.user-info.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid var(--border-gray);
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    font-size: 0.85rem;
    transition: all 0.2s;
    text-decoration: none;
}

.dropdown-menu a i {
    width: 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.dropdown-menu a:hover {
    background: var(--bg-gray);
}

.dropdown-menu a:hover i {
    color: var(--primary-color);
}

.dropdown-menu hr {
    margin: 0.25rem 0;
    border: none;
    border-top: 1px solid var(--border-gray);
}

/* ===== STAT CARDS ===== */
.stat-card {
    text-align: center;
    padding: 1.5rem;
    border-top: 4px solid var(--secondary-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stat-label i {
    color: var(--secondary-color);
    margin-right: 0.25rem;
}

/* ===== WELCOME SECTION ===== */
.welcome-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 80%, black 20%) 100%);
    color: var(--text-on-primary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.welcome-section h3 {
    color: var(--text-on-primary);
    margin-bottom: 0.25rem;
}

.welcome-section i {
    color: var(--secondary-color);
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-gray);
    border-radius: 0.5rem;
    color: var(--text-dark);
    transition: all 0.2s;
    border: 1px solid var(--border-gray);
}

.quick-action-btn i {
    color: var(--secondary-color);
}

.quick-action-btn:hover {
    background: var(--secondary-color);
    color: var(--text-on-secondary);
}

.quick-action-btn:hover i {
    color: var(--text-on-secondary);
}

/* ===== FILTER BUTTONS ===== */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    background: var(--bg-gray);
    color: var(--text-dark);
    border: 1px solid var(--border-gray);
}

.filter-btn i {
    color: var(--secondary-color);
    margin-right: 0.25rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: var(--text-on-secondary);
}

.filter-btn:hover i,
.filter-btn.active i {
    color: var(--text-on-secondary);
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.action-btn-view {
    background: var(--secondary-color);
    color: var(--text-on-secondary);
}

.action-btn-view i {
    color: var(--text-on-secondary);
}

.action-btn-edit {
    background: var(--primary-color);
    color: var(--text-on-primary);
}

.action-btn-edit i {
    color: var(--text-on-primary);
}

.action-btn:hover {
    transform: translateY(-2px);
}

/* ===== BADGES ===== */
.badge-day {
    background: var(--secondary-color);
    color: var(--text-on-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-boarding {
    background: var(--primary-color);
    color: var(--text-on-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 500;
}

/* ===== ALERTS ===== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #e8f5e9;
    border-left-color: var(--success-green);
    color: #1b5e20;
}

.alert-danger {
    background-color: #ffebee;
    border-left-color: var(--danger-red);
    color: #b71c1c;
}

.alert-warning {
    background-color: #fff3e0;
    border-left-color: var(--secondary-color);
    color: #e65100;
}

.alert i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

/* ===== LOGIN PAGE ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 80%, black 20%) 100%);
    padding: 1rem;
}

.login-card {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    border-top: 4px solid var(--secondary-color);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 3rem;
    color: var(--secondary-color);
}

.login-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.btn-login {
    width: 100%;
    justify-content: center;
    background: var(--secondary-color);
    color: var(--text-on-secondary);
}

.btn-login:hover {
    background: color-mix(in srgb, var(--secondary-color) 85%, black 15%);
}

/* ===== FORM SECTIONS ===== */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i {
    color: var(--secondary-color);
}

/* ===== PROGRESS STEPS ===== */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.form-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: var(--border-gray);
    z-index: 0;
}

.progress-step {
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.progress-step .step-number {
    width: 40px;
    height: 40px;
    background: var(--card-white);
    border: 2px solid var(--border-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 600;
}

.progress-step.active .step-number {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-on-secondary);
}

.progress-step.completed .step-number {
    background: var(--success-green);
    border-color: var(--success-green);
    color: white;
}

/* ===== STICKY SAVE BAR ===== */
.sticky-save-bar {
    position: sticky;
    bottom: 0;
    background: var(--card-white);
    border-top: 1px solid var(--border-gray);
    padding: 1rem;
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    z-index: 10;
}

/* ===== ROW & COLUMN ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.col {
    flex: 1;
    min-width: 200px;
}

/* ===== PHOTO PREVIEW ===== */
.photo-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.photo-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--bg-gray);
    border-radius: 0.75rem;
}

.empty-state i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet and Desktop */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
    
    .sidebar {
        transform: translateX(0) !important;
    }
    
    .main-content {
        margin-left: 20px;
    }
    
    .school-name {
        max-width: 250px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        order: 1;
    }
    
    .navbar-brand {
        order: 2;
        flex: 1;
        justify-content: center;
    }
    
    .navbar-user {
        order: 3;
    }
    
    .school-logo {
        width: 32px;
        height: 32px;
    }
    
    .school-name {
        font-size: 0.9rem;
        max-width: 120px;
    }
    
    .user-details {
        display: none;
    }
    
    .dropdown-arrow {
        display: none;
    }
    
    .user-info {
        padding: 0.25rem;
    }
    
    .user-avatar,
    .user-avatar-placeholder {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
    
    .dropdown-menu {
        position: fixed;
        right: 0.75rem;
        left: auto;
        width: calc(100% - 1.5rem);
        max-width: 280px;
    }
    
    .row {
        flex-direction: column;
    }
    
    .modern-table thead {
        display: none;
    }
    
    .modern-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-gray);
        border-radius: 0.5rem;
    }
    
    .modern-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
    }
    
    .modern-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary-color);
        margin-right: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .navbar-brand {
        gap: 0.4rem;
    }
    
    .school-logo {
        width: 28px;
        height: 28px;
    }
    
    .school-name {
        font-size: 0.8rem;
        max-width: 100px;
    }
    
    .navbar-brand i.fa-school {
        font-size: 22px;
    }
}

/* Desktop Large Screens */
@media (min-width: 1200px) {
    .school-logo {
        width: 48px;
        height: 48px;
    }
    
    .school-name {
        font-size: 1.2rem;
        max-width: 300px;
    }
    
    .user-avatar,
    .user-avatar-placeholder {
        width: 44px;
        height: 44px;
    }
    
    .user-name {
        font-size: 0.9rem;
        max-width: 150px;
    }
}

/* ===== PRINT ===== */
@media print {
    .sidebar, .navbar, .menu-toggle, .btn, .no-print {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    body {
        background: white;
    }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.p-3 { padding: 1rem; }

/* Dashboard Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-white);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-top: 4px solid var(--secondary-color);
    transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-3px); }

.stat-icon { font-size: 2rem; color: var(--secondary-color); margin-bottom: 0.5rem; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--primary-color); }
.stat-label { color: var(--text-light); font-size: 0.875rem; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.quick-actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-gray);
    border-radius: 2rem;
    color: var(--text-dark);
    transition: all 0.2s;
    border: 1px solid var(--border-gray);
}

.quick-action-btn i { color: var(--secondary-color); }
.quick-action-btn:hover { background: var(--secondary-color); color: var(--text-on-secondary); }
.quick-action-btn:hover i { color: var(--text-on-secondary); }

.recent-list { display: flex; flex-direction: column; gap: 0.75rem; }
.recent-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border-bottom: 1px solid var(--border-gray); }
.recent-item i { color: var(--secondary-color); font-size: 1.2rem; }
.recent-info { display: flex; flex-direction: column; }
.recent-info strong { font-size: 0.9rem; }
.recent-info span { font-size: 0.7rem; color: var(--text-light); }

.view-all-link { display: inline-block; margin-top: 0.75rem; font-size: 0.85rem; color: var(--secondary-color); }

.summary-card {
    background: var(--bg-gray);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.summary-item strong { font-size: 1.5rem; color: var(--primary-color); margin-right: 0.5rem; }

.filter-section {
    background: var(--card-white);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-gray);
}

.filter-title { font-weight: 600; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.filter-title i { color: var(--secondary-color); }

.data-table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: var(--card-white); border-radius: 0.75rem; overflow: hidden; }
.data-table th { background: var(--bg-gray); padding: 0.75rem; text-align: left; font-weight: 600; color: var(--primary-color); border-bottom: 2px solid var(--secondary-color); }
.data-table td { padding: 0.75rem; border-bottom: 1px solid var(--border-gray); }
.data-table tr:hover td { background: color-mix(in srgb, var(--secondary-color) 5%, transparent); }

.avatar-sm { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; }
.avatar-icon { font-size: 1.8rem; color: var(--secondary-color); }
.avatar-placeholder { width: 70px; height: 70px; border-radius: 50%; background: var(--bg-gray); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--secondary-color); }

.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 0.375rem; transition: all 0.2s; }
.btn-view { background: var(--secondary-color); color: white; }
.btn-edit { background: var(--primary-color); color: white; }
.btn-icon:hover { transform: translateY(-2px); }

.form-container { display: flex; flex-direction: column; gap: 1.5rem; }
.form-card { background: var(--card-white); border-radius: 1rem; padding: 1.5rem; border: 1px solid var(--border-gray); }
.form-card-header { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem; color: var(--primary-color); border-bottom: 2px solid var(--secondary-color); padding-bottom: 0.5rem; }
.form-card-header i { color: var(--secondary-color); }

.profile-layout { display: grid; grid-template-columns: 320px 1fr; gap: 1.5rem; }
@media (max-width: 768px) {
    .dashboard-grid, .profile-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* ====================================================
   PROFESSIONAL SIDEBAR STYLES (KEEP THIS ONLY)
   ==================================================== */

.sidebar {
    background: linear-gradient(180deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 85%, black 15%) 100%);
    color: var(--text-on-primary);
    width: 280px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.sidebar-brand span {
    letter-spacing: -0.5px;
}

/* Close Button */
.sidebar-close {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    transition: all 0.2s ease;
}

.sidebar-close i {
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.sidebar-close:hover {
    background: var(--secondary-color);
    transform: translateX(-2px);
}

.sidebar-close:hover i {
    transform: translateX(-3px);
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 0 0.75rem;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-menu a i {
    width: 24px;
    font-size: 1.1rem;
    color: var(--secondary-color);
    transition: all 0.2s;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.sidebar-menu a.active {
    background: var(--secondary-color);
    color: var(--text-on-secondary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.sidebar-menu a.active i {
    color: var(--text-on-secondary);
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.sidebar-version {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Desktop View */
@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0) !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar-header {
        padding: 1.25rem 1.25rem;
    }
    
    .sidebar-close {
        display: flex !important;
        background: rgba(0, 0, 0, 0.2);
    }
    
    .sidebar-close:hover {
        background: rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-overlay {
        display: none !important;
    }
    
    .menu-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-left: 280px;
    }
}

/* Mobile View */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-close span {
        display: inline;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}