/* ═══════════════════════════════════════════════════════════════
   MONTESSORI MANAGEMENT SYSTEM - FULLY RESPONSIVE STYLESHEET
   Mobile-First, Touch-Optimized, Cross-Device Compatible
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   CSS RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #f5f7fa;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES
   ═══════════════════════════════════════════════════════════════ */

:root {
    --primary-color: #1a237e;
    --primary-dark: #0d1654;
    --accent-color: #4fc3f7;
    --accent-dark: #29b6f6;
    --success-color: #4caf50;
    --success-dark: #388e3c;
    --danger-color: #f44336;
    --danger-dark: #d32f2f;
    --warning-color: #ff9800;
    --warning-dark: #f57c00;
    --info-color: #2196f3;
    --white: #ffffff;
    --light-gray: #f5f7fa;
    --gray: #e0e0e0;
    --dark-gray: #666;
    --text-color: #333;
    --border-color: #ddd;
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --touch-target: 44px; /* Minimum touch target size */
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-color);
}

h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); }
h3 { font-size: clamp(1.125rem, 3.5vw, 1.5rem); }
h4 { font-size: clamp(1rem, 3vw, 1.25rem); }
h5 { font-size: clamp(0.938rem, 2.5vw, 1.125rem); }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-dark);
}

strong {
    font-weight: 600;
}

small {
    font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT - DASHBOARD WRAPPER
   ═══════════════════════════════════════════════════════════════ */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--light-gray);
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE MENU TOGGLE (placed inside the topbar on small screens)
   ═══════════════════════════════════════════════════════════════ */

.mobile-menu-toggle {
    display: none; /* hidden by default, shown via media query on small screens */
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 10003;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:active {
    transform: scale(0.95) translateY(-50%);
}

.mobile-menu-toggle.active {
    background: var(--danger-color);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Show mobile menu toggle on tablets and phones */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .sidebar {
        transform: translateX(-100%);
        z-index: 10000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: clamp(16px, 4vw, 18px);
    margin-bottom: 5px;
    color: var(--white);
    word-break: break-word;
}

.sidebar-header p {
    font-size: clamp(11px, 3vw, 12px);
    opacity: 0.8;
    color: var(--white);
    word-break: break-word;
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-item {
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: var(--transition);
    cursor: pointer;
    font-size: clamp(13px, 3.5vw, 14px);
    border-left: 3px solid transparent;
    min-height: var(--touch-target);
}

.menu-item span {
    margin-right: 12px;
    font-size: clamp(16px, 4vw, 18px);
}

.menu-item:hover {
    background: rgba(79, 195, 247, 0.15);
    color: var(--white);
    text-decoration: none;
    border-left-color: var(--accent-color);
}

.menu-item.active {
    background: rgba(79, 195, 247, 0.2);
    color: var(--white);
    border-left-color: var(--accent-color);
}

/* Mobile sidebar */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* Sidebar Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT AREA - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: var(--light-gray);
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 0.3s ease;
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TOPBAR - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.topbar {
    background: var(--white);
    padding: 12px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--topbar-height);
    position: sticky;
    top: 0;
    z-index: 10002;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar-left h1 {
    font-size: clamp(18px, 5vw, 24px);
    color: var(--primary-color);
    margin: 0;
}

.topbar-right {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.notification-badge {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--dark-gray);
    transition: var(--transition);
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add bell icon before the notification badge content */
.notification-badge::before {
    content: "🔔";
    font-size: 18px;
    margin-right: 6px;
    display: inline-block;
    color: var(--dark-gray);
}

.notification-badge:hover {
    color: var(--primary-color);
}

.notification-badge .badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger-color);
    color: var(--white);
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0 5px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: var(--transition);
    min-height: var(--touch-target);
}

.user-menu:hover {
    background: var(--light-gray);
}

.user-avatar {
    width: 35px;
    height: 35px;
    min-width: 35px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    font-size: 14px;
}

.user-menu span {
    font-size: clamp(12px, 3vw, 14px);
    white-space: nowrap;
}

@media (max-width: 576px) {
    .user-menu span {
        display: none;
    }
}

@media (max-width: 992px) {
    .topbar-left {
        /* give space for the mobile toggle */
        padding-left: 68px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   CONTENT AREA - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.content-area {
    padding: clamp(15px, 4vw, 30px);
}

.page-title {
    font-size: clamp(20px, 5vw, 28px);
    color: var(--primary-color);
    margin-bottom: clamp(15px, 4vw, 25px);
    word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: clamp(15px, 4vw, 25px);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

/* Two column layout helper (stacks on small screens) */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

@media (max-width: 576px) {
    .two-column-grid {
        grid-template-columns: 1fr;
    }
}

.card-header {
    font-size: clamp(16px, 4vw, 18px);
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
    word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════════
   STATISTICS CARDS - RESPONSIVE GRID
   ═══════════════════════════════════════════════════════════════ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(15px, 3vw, 20px);
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: clamp(18px, 4vw, 25px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-card-icon {
    font-size: clamp(28px, 6vw, 32px);
    opacity: 0.8;
}

.stat-card-value {
    font-size: clamp(24px, 6vw, 32px);
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
    word-break: break-word;
}

.stat-card-label {
    font-size: clamp(12px, 3vw, 14px);
    color: var(--dark-gray);
    margin-top: 5px;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS - TOUCH-FRIENDLY
   ═══════════════════════════════════════════════════════════════ */

.btn {
    padding: clamp(10px, 2.5vw, 12px) clamp(16px, 4vw, 20px);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: clamp(13px, 3.5vw, 14px);
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    text-decoration: none;
    line-height: 1.5;
    min-height: var(--touch-target);
    white-space: nowrap;
    touch-action: manipulation;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background: var(--dark-gray);
    color: var(--white);
}

.btn-secondary:hover {
    background: #555;
    color: var(--white);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: var(--success-dark);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--danger-dark);
    color: var(--white);
}

.btn-warning {
    background: var(--warning-color);
    color: var(--white);
}

.btn-warning:hover {
    background: var(--warning-dark);
    color: var(--white);
}

.btn-info {
    background: var(--info-color);
    color: var(--white);
}

.btn-sm {
    padding: clamp(6px, 2vw, 8px) clamp(10px, 3vw, 12px);
    font-size: clamp(11px, 3vw, 12px);
    min-height: 36px;
}

.btn-lg {
    padding: clamp(12px, 3vw, 14px) clamp(24px, 5vw, 28px);
    font-size: clamp(14px, 4vw, 16px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Button group responsiveness */
@media (max-width: 576px) {
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-sm {
        width: auto;
        display: inline-block;
    }
}

/* ═══════════════════════════════════════════════════════════════
   FORMS - MOBILE OPTIMIZED
   ═══════════════════════════════════════════════════════════════ */

.form-group {
    margin-bottom: clamp(15px, 4vw, 20px);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: clamp(13px, 3.5vw, 14px);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: clamp(10px, 3vw, 12px);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: clamp(14px, 3.5vw, 16px);
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    min-height: var(--touch-target);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.1);
}

.form-group input[type="file"] {
    padding: 8px;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
    opacity: 0.7;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-width: 20px;
    min-height: 20px;
    margin-right: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   TABLES - RESPONSIVE WITH SCROLL
   ═══════════════════════════════════════════════════════════════ */

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 clamp(-15px, -4vw, -25px);
    padding: 0 clamp(15px, 4vw, 25px);
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: var(--white);
}

table th {
    background: var(--light-gray);
    padding: clamp(10px, 3vw, 12px);
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--gray);
    font-size: clamp(11px, 3vw, 13px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

table td {
    padding: clamp(10px, 3vw, 12px);
    border-bottom: 1px solid #f0f0f0;
    font-size: clamp(12px, 3.5vw, 14px);
}

table tr:hover {
    background: #f9f9f9;
}

table tr:last-child td {
    border-bottom: none;
}

/* Mobile table cards */
@media (max-width: 768px) {
    .table-responsive-cards {
        display: block;
    }
    
    .table-responsive-cards thead {
        display: none;
    }
    
    .table-responsive-cards tbody,
    .table-responsive-cards tr,
    .table-responsive-cards td {
        display: block;
        width: 100%;
    }
    
    .table-responsive-cards tr {
        margin-bottom: 15px;
        border: 1px solid var(--gray);
        border-radius: var(--border-radius);
        padding: 10px;
    }
    
    .table-responsive-cards td {
        text-align: right;
        padding: 8px;
        position: relative;
        padding-left: 50%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .table-responsive-cards td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        text-align: left;
        font-weight: 600;
        color: var(--primary-color);
    }
}

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background: #fff3e0;
    color: #ef6c00;
}

.badge-danger {
    background: #ffebee;
    color: #c62828;
}

.badge-info {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-primary {
    background: #e8eaf6;
    color: var(--primary-color);
}

.badge-secondary {
    background: #f5f5f5;
    color: #666;
}

/* ═══════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════ */

.alert {
    padding: clamp(12px, 3vw, 15px) clamp(15px, 4vw, 20px);
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: clamp(13px, 3.5vw, 14px);
    line-height: 1.6;
    border-left: 4px solid;
    word-break: break-word;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left-color: #4caf50;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left-color: #f44336;
}

.alert-warning {
    background: #fff3e0;
    color: #ef6c00;
    border-left-color: #ff9800;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left-color: #2196f3;
}

/* ═══════════════════════════════════════════════════════════════
   MODALS - MOBILE OPTIMIZED
   ═══════════════════════════════════════════════════════════════ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 3vw, 20px);
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: clamp(15px, 4vw, 20px) clamp(20px, 5vw, 25px);
    border-bottom: 1px solid var(--gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-header h3 {
    font-size: clamp(16px, 4vw, 20px);
    color: var(--primary-color);
    margin: 0;
    word-break: break-word;
}

.modal-close {
    font-size: clamp(24px, 6vw, 28px);
    cursor: pointer;
    color: var(--dark-gray);
    line-height: 1;
    transition: var(--transition);
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: clamp(20px, 5vw, 25px);
}

.modal-footer {
    padding: clamp(15px, 4vw, 20px) clamp(20px, 5vw, 25px);
    border-top: 1px solid var(--gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS - MOBILE POSITIONED
   ═══════════════════════════════════════════════════════════════ */

.toast {
    position: fixed;
    bottom: clamp(20px, 5vw, 30px);
    right: clamp(10px, 3vw, 20px);
    padding: clamp(12px, 3vw, 15px) clamp(20px, 5vw, 25px);
    border-radius: 5px;
    color: var(--white);
    font-weight: 600;
    z-index: 20000;
    animation: toastSlideIn 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    max-width: 90vw;
    font-size: clamp(13px, 3.5vw, 14px);
    word-break: break-word;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background: var(--success-color);
}

.toast-error {
    background: var(--danger-color);
}

.toast-info {
    background: var(--info-color);
}

.toast-warning {
    background: var(--warning-color);
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */

.empty-state {
    text-align: center;
    padding: clamp(40px, 8vw, 60px) clamp(15px, 4vw, 20px);
    color: var(--dark-gray);
}

.empty-state-icon {
    font-size: clamp(48px, 10vw, 64px);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: clamp(14px, 3.5vw, 16px);
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   LOADING STATE
   ═══════════════════════════════════════════════════════════════ */

.loading {
    text-align: center;
    padding: clamp(30px, 6vw, 40px);
    color: var(--dark-gray);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE - MOBILE OPTIMIZED
   ═══════════════════════════════════════════════════════════════ */

.login-container {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 95%;
    max-width: 450px;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-header {
    background: var(--primary-color);
    color: var(--white);
    padding: clamp(25px, 6vw, 30px);
    text-align: center;
}

.login-header h1 {
    font-size: clamp(20px, 5vw, 24px);
    margin-bottom: 5px;
    color: var(--white);
}

.login-header p {
    font-size: clamp(12px, 3vw, 14px);
    opacity: 0.9;
}

.login-body {
    padding: clamp(25px, 6vw, 30px);
}

.form-panel {
    display: none;
}

.form-panel.active {
    display: block;
    animation: panelFadeIn 0.3s ease;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-tabs {
    display: flex;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 25px;
    overflow-x: auto;
}

.tab {
    flex: 1;
    padding: clamp(10px, 3vw, 12px);
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-gray);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    min-width: 100px;
    font-size: clamp(12px, 3vw, 14px);
    white-space: nowrap;
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab:hover {
    background: var(--light-gray);
}

.switch-text {
    text-align: center;
    margin-top: 20px;
    color: var(--dark-gray);
    font-size: clamp(12px, 3vw, 14px);
}

.switch-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.switch-text a:hover {
    text-decoration: underline;
}

.register-tab {
    display: none;
}

.register-tab.active {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════
   TAB NAVIGATION - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.tab-link {
    flex: 1;
    padding: clamp(12px, 3vw, 15px) clamp(15px, 4vw, 20px);
    text-align: center;
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    display: inline-block;
    min-width: 100px;
    font-size: clamp(12px, 3vw, 14px);
    white-space: nowrap;
}

.tab-link:hover {
    background: var(--light-gray);
    color: var(--primary-color);
    text-decoration: none;
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--light-gray);
}

/* Tab container scroll */
.card > div[style*="flex"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ═══════════════════════════════════════════════════════════════
   REPORT CARDS - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.report-card {
    background: var(--white);
    padding: clamp(20px, 5vw, 25px);
    border-radius: var(--border-radius);
    border: 2px solid #f0f0f0;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.report-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 5px 20px rgba(79, 195, 247, 0.2);
    transform: translateY(-3px);
}

.report-icon {
    font-size: clamp(40px, 8vw, 48px);
    margin-bottom: 15px;
}

.report-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: clamp(16px, 4vw, 18px);
}

.report-card p {
    color: var(--dark-gray);
    font-size: clamp(12px, 3vw, 14px);
    margin-bottom: 15px;
    min-height: 40px;
}

/* ═══════════════════════════════════════════════════════════════
   GRID UTILITIES - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(15px, 3vw, 20px);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: clamp(15px, 3vw, 20px);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: clamp(15px, 3vw, 20px);
}

/* ═══════════════════════════════════════════════════════════════
   SPACING UTILITIES
   ═══════════════════════════════════════════════════════════════ */

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.5rem !important; }
.p-2 { padding: 1rem !important; }
.p-3 { padding: 1.5rem !important; }
.p-4 { padding: 2rem !important; }
.p-5 { padding: 3rem !important; }

/* ═══════════════════════════════════════════════════════════════
   TEXT UTILITIES
   ═══════════════════════════════════════════════════════════════ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-muted { color: var(--dark-gray); }

.text-bold { font-weight: 600; }
.text-normal { font-weight: 400; }

.text-small { font-size: clamp(12px, 3vw, 14px); }
.text-large { font-size: clamp(16px, 4vw, 18px); }

/* ═══════════════════════════════════════════════════════════════
   DISPLAY UTILITIES
   ═══════════════════════════════════════════════════════════════ */

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE HELPERS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 576px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 577px) {
    .show-mobile { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════ */

@media print {
    .sidebar,
    .topbar,
    .btn,
    .modal,
    .toast,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .content-area {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    table {
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    body {
        background: white;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR CUSTOMIZATION
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════ */

*:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS SUMMARY
   ═══════════════════════════════════════════════════════════════ */

/* 
    Mobile (Portrait):  < 576px
    Mobile (Landscape): 577px - 768px
    Tablet (Portrait):  769px - 992px
    Tablet (Landscape): 993px - 1200px
    Desktop:            > 1200px
*/

/* ═══════════════════════════════════════════════════════════════
   END OF RESPONSIVE STYLESHEET
   ═══════════════════════════════════════════════════════════════ */