/**
 * Professional Attendance System Stylesheet
 * Modern, responsive design with dark/light theme support
 */

/* CSS Variables - Light Theme (Default) */
:root {
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --placeholder-color: #94a3b8;
    
    /* Accent Colors */
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.1);
    
    /* Border Colors */
    --border-color: #e2e8f0;
    
    /* Status Colors */
    --success-color: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --danger-color: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning-color: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --info-color: #06b6d4;
    --info-light: rgba(6, 182, 212, 0.1);
    
    /* Link Colors */
    --link-color: #3b82f6;
    --link-hover: #2563eb;
    
    /* Table Colors */
    --table-hover: rgba(59, 130, 246, 0.05);
    
    /* Badge Colors */
    --badge-bg: #e2e8f0;
    --badge-text: #475569;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-input: #334155;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --placeholder-color: #64748b;
    
    --border-color: #334155;
    
    --table-hover: rgba(59, 130, 246, 0.1);
    
    --badge-bg: #334155;
    --badge-text: #cbd5e1;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dashboard Layout */
.dashboard-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

#dashboard-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Dashboard Header - FIXED for mobile/tablet */
.dashboard-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    z-index: 1050;
    height: 70px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dashboard-header .navbar {
    padding: 0.5rem 1rem;
    background: var(--bg-card) !important;
    height: 70px;
}

.dashboard-header .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary) !important;
    display: flex;
    align-items: center;
}

/* Hamburger menu styling */
.sidebar-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-toggle:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Dashboard Sidebar */
.dashboard-sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    transition: transform 0.3s ease, visibility 0.3s ease;
    z-index: 1040;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

/* Sidebar collapsed state */
.dashboard-sidebar.collapsed {
    transform: translateX(-280px);
    visibility: hidden;
}

/* Main content expanded when sidebar is collapsed */
.dashboard-main.expanded {
    margin-left: 0 !important;
    width: 100% !important;
}

.sidebar-content {
    padding: 1.5rem 0;
    height: calc(100vh - 70px);
}

.sidebar-nav .nav-link {
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    display: flex;
    align-items: center;
    margin: 0.25rem 0;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.sidebar-nav .nav-link.active:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-primary);
}

.sidebar-nav .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.sidebar-nav .nav-link span {
    flex: 1;
}

.sidebar-nav .badge {
    margin-left: auto;
    font-size: 0.75rem;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard Main Content */
.dashboard-main {
    flex: 1;
    margin-left: 280px;
    margin-top: 70px;
    padding: 1.5rem;
    transition: margin-left 0.3s ease, width 0.3s ease;
    width: calc(100% - 280px);
    min-height: calc(100vh - 70px);
}

/* Stats Cards */
.stats-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: var(--bg-card);
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stats-icon.bg-primary { background: var(--accent-primary); }
.stats-icon.bg-success { background: #10b981; }
.stats-icon.bg-warning { background: #f59e0b; }
.stats-icon.bg-info { background: #06b6d4; }
.stats-icon.bg-danger { background: #ef4444; }

/* Stat Card - Legacy Support */
.stat-card {
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 15px;
}

.stat-icon.bg-primary { background: var(--accent-primary); }
.stat-icon.bg-success { background: #10b981; }
.stat-icon.bg-info { background: #06b6d4; }
.stat-icon.bg-warning { background: #f59e0b; }

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.stat-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table {
    color: var(--text-primary);
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

.table-hover tbody tr:hover {
    background: var(--table-hover);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.3s ease;
    border: 1px solid var(--border-color);
}

.activity-item:hover {
    background: var(--bg-secondary);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content h6 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.activity-content p {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.activity-content small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Notification Styles */
.notification-list .dropdown-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.notification-list .dropdown-item:last-child {
    border-bottom: none;
}

.notification-list .dropdown-item:hover {
    background: var(--bg-secondary);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

.badge.bg-success { background-color: var(--success-color) !important; }
.badge.bg-danger { background-color: var(--danger-color) !important; }
.badge.bg-warning { background-color: var(--warning-color) !important; color: #000; }
.badge.bg-info { background-color: var(--info-color) !important; }
.badge.bg-primary { background-color: var(--accent-primary) !important; }

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #000;
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
    transform: translateY(-2px);
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: #0891b2;
    border-color: #0891b2;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-outline-primary:hover {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.05);
}

/* Form Controls */
.form-control, .form-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.625rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-input);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: var(--placeholder-color);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Alerts */
.alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success-color);
    color: #065f46;
}

.alert-danger {
    background-color: var(--danger-light);
    border-color: var(--danger-color);
    color: #991b1b;
}

.alert-warning {
    background-color: var(--warning-light);
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-info {
    background-color: var(--info-light);
    border-color: var(--info-color);
    color: #0e7490;
}

/* Modal */
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.modal-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* Dropdown */
.dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    transition: background 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.dropdown-divider {
    border-color: var(--border-color);
}

/* Camera Container - Face Recognition */
.camera-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-lg);
}

.camera-container video {
    width: 100%;
    height: auto;
    display: block;
}

.camera-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Face Recognition Status */
.recognition-status {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
}

.recognition-status.success {
    background-color: var(--success-light);
    color: #065f46;
}

.recognition-status.error {
    background-color: var(--danger-light);
    color: #991b1b;
}

.recognition-status.loading {
    background-color: var(--info-light);
    color: #0e7490;
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1, .page-header h2 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-color) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1039;
    transition: opacity 0.3s ease;
}

/* Login/Register Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card .logo h1 {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.75rem;
}

.auth-card .logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Navbar styling */
.navbar {
    background: var(--bg-card) !important;
}

.navbar-brand {
    color: var(--accent-primary) !important;
    font-weight: 700;
}

.nav-link {
    color: var(--text-secondary) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-primary) !important;
}

/* Glass Effect (Legacy Support) */
.glass-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.glass-nav {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Utility Classes */
.min-w-0 { min-width: 0; }
.w-40 { width: 40% !important; }
.w-25 { width: 25% !important; }
.w-20 { width: 20% !important; }
.w-15 { width: 15% !important; }

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    padding: 30px;
    margin-top: 70px;
}

/* Sidebar Legacy Support */
.sidebar {
    background: var(--bg-card);
    min-height: calc(100vh - 70px);
    padding: 0;
    position: fixed;
    top: 70px;
    left: 0;
    width: 280px;
    z-index: 100;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link {
    color: var(--text-secondary);
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 10px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .nav-link:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.sidebar .nav-link.active {
    background: var(--accent-light);
    color: var(--accent-primary);
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 20px;
}

.sidebar-heading {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-left: 10px;
    text-transform: uppercase;
}

/* ==========================================
   RESPONSIVE DESIGN - Tablet (768px - 992px)
   ========================================== */
@media (max-width: 992px) {
    .dashboard-sidebar,
    .sidebar {
        transform: translateX(-100%);
        visibility: hidden;
        box-shadow: none;
    }
    
    .dashboard-sidebar.show,
    .sidebar.show {
        transform: translateX(0);
        visibility: visible;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
    }
    
    .dashboard-main,
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
    
    .dashboard-main.mobile-push {
        transform: translateX(280px);
    }
    
    .sidebar-overlay {
        display: block;
        opacity: 0;
        visibility: hidden;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    .container-fluid {
        padding: 0 1rem;
    }
    
    .stats-card .card-body,
    .stat-card {
        padding: 1rem;
    }
    
    .stats-icon,
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .d-flex.gap-2 {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
}

/* ==========================================
   RESPONSIVE DESIGN - Mobile (< 768px)
   ========================================== */
@media (max-width: 768px) {
    .dashboard-header {
        height: 56px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
    
    .dashboard-header .navbar {
        height: 56px;
        padding: 0.4rem 0.75rem;
    }
    
    .dashboard-header .navbar-brand {
        font-size: 1.1rem;
        margin-right: auto;
    }
    
    .dashboard-header .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
    
    .sidebar-toggle {
        width: 40px;
        height: 40px;
        margin-right: 0.5rem;
        font-size: 1.2rem;
    }
    
    .sidebar-toggle:active {
        background: rgba(59, 130, 246, 0.2);
    }
    
    .dashboard-sidebar,
    .sidebar {
        top: 56px;
        width: 270px;
        z-index: 1045;
    }
    
    .sidebar-overlay {
        top: 56px;
    }
    
    .dashboard-main,
    .main-content {
        margin-top: 56px;
        padding: 0.75rem;
    }
    
    .container-fluid {
        padding: 0 0.75rem;
    }
    
    .row {
        margin-left: -0.375rem;
        margin-right: -0.375rem;
    }
    
    .col-md-6, .col-lg-4, .col-lg-6, .col-xl-3 {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }
    
    .stats-card,
    .stat-card {
        margin-bottom: 0.75rem;
    }
    
    .stats-card .card-body,
    .stat-card {
        padding: 1rem;
    }
    
    .stats-icon,
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        min-width: 45px;
    }
    
    .stats-card .d-flex {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    
    .stats-card h5,
    .stat-content p {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    .stats-card h2,
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .card-header {
        padding: 0.875rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card-header .btn {
        align-self: flex-start;
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
        min-width: 80px;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .table {
        font-size: 0.85rem;
        margin-bottom: 0;
    }
    
    .table thead th {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .table tbody td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .table tbody tr:hover {
        background: inherit;
    }
    
    .dropdown-menu {
        position: fixed !important;
        top: 56px !important;
        left: 0.5rem !important;
        right: 0.5rem !important;
        width: auto !important;
        max-width: calc(100% - 1rem);
        transform: translate3d(0px, 0px, 0px) !important;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .dropdown-menu-end {
        left: auto !important;
        right: 0.5rem !important;
    }
    
    .sidebar-toggle span {
        display: none;
    }
    
    .btn-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .h1, .h2, .h3 {
        font-size: 1.25rem !important;
    }
    
    .page-header h1,
    .page-header h2 {
        margin-bottom: 0.5rem;
        font-size: 1.25rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .col-md-3 {
        width: 100% !important;
    }
    
    .btn.w-100 {
        padding: 0.625rem;
        font-size: 0.9rem;
        text-align: left;
    }
    
    .activity-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .activity-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.9rem;
    }
    
    .activity-content h6 {
        font-size: 0.9rem;
    }
    
    .activity-content p {
        font-size: 0.8rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .alert {
        padding: 0.75rem;
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    /* Auth pages mobile */
    .auth-page {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    /* Camera container mobile */
    .camera-container {
        border-radius: 8px;
    }
}

/* ==========================================
   RESPONSIVE DESIGN - Extra Small Mobile (< 576px)
   ========================================== */
@media (max-width: 576px) {
    .dashboard-header {
        height: 52px;
    }
    
    .dashboard-header .navbar {
        height: 52px;
        padding: 0.3rem 0.5rem;
    }
    
    .dashboard-header .navbar-brand {
        font-size: 1rem;
        font-weight: 700;
    }
    
    .sidebar-toggle {
        width: 38px;
        height: 38px;
        padding: 0;
    }
    
    .dashboard-sidebar,
    .sidebar {
        top: 52px;
        width: 240px;
    }
    
    .sidebar-overlay {
        top: 52px;
    }
    
    .dashboard-main,
    .main-content {
        margin-top: 52px;
        padding: 0.5rem;
    }
    
    .container-fluid {
        padding: 0 0.5rem;
    }
    
    .row {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    .col-md-6, .col-lg-4, .col-lg-6, .col-xl-3 {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        width: 100% !important;
    }
    
    .form-control, .form-select {
        font-size: 16px;
        padding: 0.5rem;
        border-radius: 6px;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        border-radius: 6px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .sidebar-content {
        padding: 1rem 0;
    }
    
    .sidebar-nav .nav-link,
    .sidebar .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .sidebar-nav .nav-link i,
    .sidebar .nav-link i {
        width: 20px;
        font-size: 0.95rem;
    }
    
    .stats-icon,
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stats-card h2,
    .stat-content h3 {
        font-size: 1.25rem;
    }
    
    .stats-card h5,
    .stat-content p {
        font-size: 0.8rem;
    }
    
    .card {
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }
    
    .card-header {
        padding: 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table thead th {
        padding: 0.4rem;
        font-size: 0.7rem;
    }
    
    .table tbody td {
        padding: 0.4rem;
        font-size: 0.75rem;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    .alert {
        padding: 0.6rem;
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .dropdown-menu {
        top: 52px !important;
        max-height: 60vh;
    }
    
    .dropdown-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    .input-group {
        margin-bottom: 0.75rem;
    }
    
    .input-group > * {
        border-radius: 0;
        font-size: 0.9rem;
        height: 40px;
    }
    
    .input-group > :first-child {
        border-radius: 6px 0 0 6px;
    }
    
    .input-group > :last-child {
        border-radius: 0 6px 6px 0;
    }
    
    /* Auth pages extra small */
    .auth-card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .auth-card .logo h1 {
        font-size: 1.5rem;
    }
}

/* ==========================================
   DARK THEME ADJUSTMENTS
   ========================================== */
[data-theme="dark"] {
    --bs-body-bg: var(--bg-primary);
    --bs-body-color: var(--text-primary);
    --bs-link-color: var(--link-color);
    --bs-link-hover-color: var(--link-hover);
    --bs-border-color: var(--border-color);
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
    --bs-form-control-bg: var(--bg-input);
    --bs-form-control-border-color: var(--border-color);
}

[data-theme="dark"] body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .stats-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .card,
[data-theme="dark"] .glass-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .card-header {
    background: var(--bg-card);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .card-body {
    background: var(--bg-card);
}

[data-theme="dark"] .table {
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .table thead th {
    background: var(--bg-secondary);
    border-bottom-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .table tbody tr:hover {
    background: var(--table-hover);
}

[data-theme="dark"] .dashboard-sidebar,
[data-theme="dark"] .sidebar {
    background: var(--bg-card);
    border-right-color: var(--border-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .dashboard-header,
[data-theme="dark"] .navbar,
[data-theme="dark"] .glass-nav {
    background: var(--bg-card) !important;
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .sidebar-toggle {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar-toggle:hover {
    background: var(--accent-primary);
    color: white;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--bg-input);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--placeholder-color);
}

[data-theme="dark"] .form-label {
    color: var(--text-primary);
}

[data-theme="dark"] .input-group-text {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-muted);
}

[data-theme="dark"] .activity-item {
    background: transparent;
    border-color: var(--border-color);
}

[data-theme="dark"] .activity-item:hover {
    background: var(--table-hover);
}

[data-theme="dark"] .activity-content h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .activity-content p {
    color: var(--text-secondary);
}

[data-theme="dark"] .alert {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .alert-success {
    background-color: var(--success-light);
    border-color: #10b981;
    color: #6ee7b7;
}

[data-theme="dark"] .alert-danger {
    background-color: var(--danger-light);
    border-color: #ef4444;
    color: #fca5a5;
}

[data-theme="dark"] .alert-warning {
    background-color: var(--warning-light);
    border-color: #f59e0b;
    color: #fcd34d;
}

[data-theme="dark"] .alert-info {
    background-color: var(--info-light);
    border-color: #06b6d4;
    color: #67e8f9;
}

[data-theme="dark"] .modal-content {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-primary {
    color: white;
}

[data-theme="dark"] .btn-primary:hover {
    color: white;
}

[data-theme="dark"] .modal-header {
    background-color: var(--bg-card);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .auth-page {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

[data-theme="dark"] .auth-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .badge {
    background-color: var(--badge-bg);
    color: var(--badge-text);
}

[data-theme="dark"] .stat-content h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .stat-content p {
    color: var(--text-secondary);
}

[data-theme="dark"] .sidebar-heading {
    color: var(--text-muted);
}

[data-theme="dark"] .sidebar .nav-link {
    color: var(--text-secondary);
}

[data-theme="dark"] .sidebar .nav-link:hover,
[data-theme="dark"] .sidebar .nav-link.active {
    background: var(--accent-light);
    color: var(--accent-primary);
}

/* Dark Mode Text Fixes */
[data-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-black {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .bg-white {
    background-color: var(--bg-card) !important;
}

[data-theme="dark"] .bg-white.text-dark {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .badge.bg-white {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

[data-theme="dark"] .bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.2) !important;
}

[data-theme="dark"] .bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.2) !important;
}

[data-theme="dark"] .bg-primary-subtle {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

[data-theme="dark"] .bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.2) !important;
}

[data-theme="dark"] .bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.2) !important;
}

[data-theme="dark"] .bg-secondary-subtle {
    background-color: rgba(100, 116, 139, 0.2) !important;
}

[data-theme="dark"] .text-success {
    color: #34d399 !important;
}

[data-theme="dark"] .text-danger {
    color: #f87171 !important;
}

[data-theme="dark"] .text-primary {
    color: #60a5fa !important;
}

[data-theme="dark"] .text-warning {
    color: #fbbf24 !important;
}

[data-theme="dark"] .text-info {
    color: #22d3ee !important;
}

[data-theme="dark"] .card-title {
    color: var(--text-primary);
}

[data-theme="dark"] .card-footer {
    background-color: var(--bg-card);
    border-top-color: var(--border-color);
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6 {
    color: var(--text-primary);
}

[data-theme="dark"] p {
    color: var(--text-secondary);
}

[data-theme="dark"] small {
    color: var(--text-muted);
}

[data-theme="dark"] strong {
    color: var(--text-primary);
}

[data-theme="dark"] label {
    color: var(--text-primary);
}

[data-theme="dark"] .page-header h1,
[data-theme="dark"] .page-header p {
    color: var(--text-primary);
}

[data-theme="dark"] .page-header p {
    color: var(--text-secondary);
}

[data-theme="dark"] .navbar-brand {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .btn-link {
    color: var(--text-primary);
}

[data-theme="dark"] .list-group-item {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .empty-state-icon {
    background: var(--bg-secondary);
}

[data-theme="dark"] .empty-state-icon i {
    color: var(--text-muted);
}

/* Form Group Spacing */
.form-group {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1rem !important;
    }
}

/* Text Truncation Utilities */
@media (max-width: 768px) {
    .text-truncate-mobile {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Fix for dropdown menus in mobile */
@media (max-width: 768px) {
    .dropdown-menu {
        max-height: 400px;
        overflow-y: auto;
    }
    
    .notification-list {
        max-height: 300px;
        overflow-y: auto;
    }
}

/* Student Photo Styles */
.student-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.student-photo-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
}

/* Attendance Status Colors */
.status-present {
    color: var(--success-color);
}

.status-absent {
    color: var(--danger-color);
}

.status-late {
    color: var(--warning-color);
}

/* Session Card */
.session-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.session-card:hover {
    box-shadow: var(--shadow-md);
}

.session-card.active {
    border-color: var(--success-color);
    background: var(--success-light);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ==========================================
   AUTH PAGES - Login & Register
   ========================================== */

/* Auth Page Background */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 1rem;
    position: relative;
}

[data-theme="dark"] .auth-page {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Auth Card */
.auth-card {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border-color);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Section */
.auth-card .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card .logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #8b5cf6 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.auth-card .logo-icon i {
    font-size: 2.25rem;
    color: white;
}

.auth-card .logo h1 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-card .logo p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Auth Form */
.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form .form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.auth-form .input-group {
    border-radius: 10px;
    overflow: hidden;
}

.auth-form .input-group-text {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-right: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
}

.auth-form .form-control {
    border: 1px solid var(--border-color);
    border-left: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background: var(--bg-input);
    color: var(--text-primary);
}

.auth-form .form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: none;
}

.auth-form .input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    border-radius: 10px;
}

.auth-form .input-group:focus-within .input-group-text {
    border-color: var(--accent-primary);
}

.auth-form .input-group:focus-within .form-control {
    border-color: var(--accent-primary);
}

/* Password Toggle Button */
.password-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
}

.password-toggle:hover {
    color: var(--accent-primary);
    background: var(--bg-secondary);
}

/* Auth Button */
.btn-auth {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #8b5cf6 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg, var(--accent-hover) 0%, #7c3aed 100%);
}

.btn-auth:active {
    transform: translateY(0);
}

/* Forgot Password Link */
.forgot-password {
    color: var(--accent-primary);
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Password Strength Indicator */
.password-strength-container {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0;
}

.password-strength.weak {
    width: 33%;
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.password-strength.medium {
    width: 66%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.password-strength.strong {
    width: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* Theme Toggle Float Button */
.theme-toggle-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 1000;
}

.theme-toggle-float:hover {
    transform: scale(1.1);
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Form Check Custom */
.auth-form .form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.2em;
    border-color: var(--border-color);
}

.auth-form .form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.auth-form .form-check-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-form .form-check-label a {
    color: var(--accent-primary);
    text-decoration: none;
}

.auth-form .form-check-label a:hover {
    text-decoration: underline;
}

/* Auth Form Text */
.auth-form .form-text {
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* Auth Page Responsive */
@media (max-width: 576px) {
    .auth-page {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .auth-card {
        padding: 1.75rem;
        border-radius: 16px;
    }
    
    .auth-card .logo-icon {
        width: 70px;
        height: 70px;
        border-radius: 16px;
    }
    
    .auth-card .logo-icon i {
        font-size: 2rem;
    }
    
    .auth-card .logo h1 {
        font-size: 1.5rem;
    }
    
    .auth-card .logo p {
        font-size: 0.875rem;
    }
    
    .btn-auth {
        padding: 0.75rem 1.25rem;
    }
    
    .theme-toggle-float {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* ============================================
   MOBILE APP-LIKE STYLES
   ============================================ */

/* Mobile Bottom Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    z-index: 1060;
    height: 65px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    font-size: 0.7rem;
    gap: 4px;
    height: 100%;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.mobile-nav-item span {
    font-weight: 500;
}

.mobile-nav-item.active {
    color: var(--accent-primary);
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

.mobile-nav-item:active {
    background: var(--accent-light);
}

/* Primary action button in center */
.mobile-nav-primary {
    position: relative;
}

.mobile-nav-primary i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    margin-top: -20px;
}

.mobile-nav-primary.active i,
.mobile-nav-primary i {
    transform: none;
}

.mobile-nav-primary span {
    margin-top: 4px;
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 80px;
    left: 1rem;
    right: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    z-index: 1100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.install-prompt-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

/* Sidebar User Info (Mobile) */
.sidebar-user {
    text-align: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.user-avatar-lg {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    margin: 0 auto 0.75rem;
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

/* Theme Toggle Button */
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: rotate(15deg);
}

/* User Avatar in Header */
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Empty State */
.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Pulse Animation for Active Sessions */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Camera Container */
.camera-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    min-height: 300px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 0;
    overflow: hidden;
}

.camera-container.camera-large {
    aspect-ratio: 16/9;
    min-height: 400px;
}

.camera-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem;
}

.camera-overlay.hidden {
    display: none !important;
}

.camera-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: pulse-glow 2s ease-in-out infinite;
}

.camera-icon-wrapper i {
    font-size: 2rem;
    color: white;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
    }
}

/* Recognition Stats */
.recognition-stats {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 0.75rem;
}

/* Attendance List */
.attendance-list {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.attendance-list::-webkit-scrollbar {
    width: 6px;
}

.attendance-list::-webkit-scrollbar-track {
    background: transparent;
}

.attendance-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Attendance Log Card */
.attendance-log-card {
    border: none;
    box-shadow: var(--shadow-md);
}

.attendance-log-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

/* Empty State Attendance */
.empty-state-attendance {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-light) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    position: relative;
}

.empty-icon-wrapper i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-icon-wrapper::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px dashed var(--border-color);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-state-attendance h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-attendance p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    max-width: 200px;
}

.empty-state-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.empty-state-features span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
}

.empty-state-features span i {
    color: var(--accent-primary);
    font-size: 0.625rem;
}

/* Attendance Log List */
.attendance-log-list {
    padding: 0.5rem 0;
}

.attendance-log-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.attendance-log-item:last-child {
    border-bottom: none;
}

.attendance-log-item:hover {
    background: var(--bg-secondary);
}

/* Log Avatar */
.log-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    overflow: hidden;
}

.log-avatar.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.log-avatar.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.log-avatar.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

[data-theme="dark"] .log-avatar.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.3) 100%);
    color: #6ee7b7;
}

[data-theme="dark"] .log-avatar.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.3) 100%);
    color: #fcd34d;
}

[data-theme="dark"] .log-avatar.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.3) 100%);
    color: #fca5a5;
}

.log-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.log-avatar span {
    position: relative;
    z-index: 1;
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
    font-size: 0.5rem;
}

.status-indicator.success {
    background: var(--success-color);
    color: white;
}

.status-indicator.warning {
    background: var(--warning-color);
    color: white;
}

.status-indicator.danger {
    background: var(--danger-color);
    color: white;
}

/* Log Info */
.log-info {
    flex: 1;
    min-width: 0;
}

.log-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.log-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.log-meta span i {
    font-size: 0.625rem;
    opacity: 0.7;
}

/* Log Actions */
.log-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.status-pill {
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-pill.success {
    background: var(--success-light);
    color: var(--success-color);
}

.status-pill.warning {
    background: var(--warning-light);
    color: var(--warning-color);
}

.status-pill.danger {
    background: var(--danger-light);
    color: var(--danger-color);
}

.action-buttons {
    display: flex;
    gap: 0.375rem;
}

.action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.action-btn.success {
    background: var(--success-light);
    color: var(--success-color);
}

.action-btn.success:hover:not(:disabled) {
    background: var(--success-color);
    color: white;
}

.action-btn.danger {
    background: var(--danger-light);
    color: var(--danger-color);
}

.action-btn.danger:hover:not(:disabled) {
    background: var(--danger-color);
    color: white;
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Mobile Responsive for Attendance Log */
@media (max-width: 575.98px) {
    .attendance-log-item {
        padding: 0.75rem 1rem;
    }
    
    .log-avatar {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    
    .status-indicator {
        width: 16px;
        height: 16px;
    }
    
    .log-name {
        font-size: 0.875rem;
    }
    
    .log-meta {
        gap: 0.5rem;
    }
    
    .log-meta span {
        font-size: 0.6875rem;
    }
    
    .status-pill {
        font-size: 0.625rem;
        padding: 0.2rem 0.5rem;
    }
    
    .action-btn {
        width: 26px;
        height: 26px;
    }
    
    .empty-state-attendance {
        padding: 2rem 1rem;
    }
    
    .empty-icon-wrapper {
        width: 64px;
        height: 64px;
    }
    
    .empty-icon-wrapper i {
        font-size: 1.5rem;
    }
}
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.attendance-item .info {
    flex: 1;
    min-width: 0;
}

.attendance-item .name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attendance-item .student-id {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mobile Responsive - Dashboard */
@media (max-width: 991.98px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        visibility: hidden;
        width: 280px;
        top: 0;
        padding-top: 70px;
    }
    
    .dashboard-sidebar.show {
        transform: translateX(0);
        visibility: visible;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    .dashboard-main {
        margin-left: 0;
        width: 100%;
        padding-bottom: 80px;
    }
    
    .sidebar-toggle {
        display: flex !important;
    }
    
    /* Hide desktop footer in sidebar */
    .sidebar-footer {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .sidebar-toggle {
        display: none !important;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    .dashboard-sidebar {
        transform: none !important;
        visibility: visible !important;
    }
}

/* Mobile Small Screens */
@media (max-width: 575.98px) {
    .dashboard-header {
        height: 60px;
    }
    
    .dashboard-header .navbar {
        height: 60px;
        padding: 0.5rem;
    }
    
    .dashboard-main {
        margin-top: 60px;
        padding: 1rem;
        padding-bottom: 85px;
    }
    
    .dashboard-sidebar {
        padding-top: 60px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .page-header .d-flex.gap-2 {
        width: 100%;
        margin-top: 0.75rem;
    }
    
    .page-header .btn {
        flex: 1;
    }
    
    .stats-card .card-body {
        padding: 1rem;
    }
    
    .stats-icon {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    .stats-card h2 {
        font-size: 1.5rem;
    }
    
    .camera-container {
        min-height: 220px;
        aspect-ratio: 4/3;
    }
    
    .camera-container.camera-large {
        min-height: 280px;
        aspect-ratio: 4/3;
    }
    
    .camera-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .camera-icon-wrapper i {
        font-size: 1.5rem;
    }
    
    .card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .card-header .btn-group {
        width: 100%;
    }
    
    .card-header .btn-group .btn {
        flex: 1;
    }
    
    /* Adjust install prompt for mobile nav */
    .install-prompt {
        bottom: 80px;
    }
    
    .attendance-list {
        max-height: 350px;
    }
}

/* Dropdown Menu Styles */
.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-header {
    padding: 0.5rem 1rem;
}

.dropdown-item {
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.dropdown-item.text-danger:hover {
    background: var(--danger-light);
    color: var(--danger-color);
}

.dropdown-divider {
    border-color: var(--border-color);
}

/* Toast Styles */
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.toast-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.toast-body {
    color: var(--text-primary);
}

/* Face Capture Section */
.face-capture-section .camera-container {
    height: 200px;
    border-radius: 12px;
    background: var(--bg-secondary);
}

/* Modal Fullscreen on Mobile */
@media (max-width: 767.98px) {
    .modal-fullscreen-md-down {
        width: 100vw;
        max-width: none;
        height: 100%;
        margin: 0;
    }
    
    .modal-fullscreen-md-down .modal-content {
        height: 100%;
        border: 0;
        border-radius: 0;
    }
    
    .modal-fullscreen-md-down .modal-body {
        overflow-y: auto;
    }
}

/* Prevent body scroll when sidebar is open */
body.sidebar-open {
    overflow: hidden;
}

/* Safe area for iOS devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .dashboard-main {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}
