/* Modern UI Redesign - Professional Color Palette */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Deep Blue (Trustworthy, Professional) */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* Secondary Colors - Teal/Cyan (Modern, Fresh) */
    --secondary-50: #f0fdfa;
    --secondary-100: #ccfbf1;
    --secondary-200: #99f6e4;
    --secondary-300: #5eead4;
    --secondary-400: #2dd4bf;
    --secondary-500: #14b8a6;
    --secondary-600: #0d9488;
    --secondary-700: #0f766e;
    --secondary-800: #115e59;
    --secondary-900: #134e4a;
    
    /* Neutral Colors - Slate Gray (Professional, Versatile) */
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    
    /* Semantic Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --error: #ef4444;
    --error-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
}

body {
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
    background: var(--neutral-50);
    min-height: 100vh;
    color: var(--neutral-900);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 2px solid var(--primary-100);
}

/* Professional Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-down {
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right {
    animation: fadeInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Professional Card hover effects */
.card-hover {
    transition: all 0.3s ease;
    position: relative;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Professional Loading spinner */
.spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #475569;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Professional Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 10px;
    border: 2px solid var(--neutral-100);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
}

/* Professional Form styles */
.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--neutral-200);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: var(--neutral-900);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
    background: #ffffff;
}

.form-input:hover {
    border-color: var(--neutral-300);
}

/* Mobile form input optimizations */
@media (max-width: 768px) {
    .form-input {
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }
    
    /* Remove default styling on mobile */
    input[type="search"] {
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    /* Better select styling on mobile */
    select.form-input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 40px;
    }
}

/* =====================
   Kavya PNG Brand Theme
   ===================== */
:root {
    --kavya-orange: #F7941D;
    --kavya-purple: #6B2B9A;
    --kavya-pink: #E91E63;
    --kavya-teal: #2EC4B6;
    --kavya-yellow: #F9C74F;
    --kavya-blue: #3B82F6;
}

@keyframes kavyaGradientSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes kavyaBlobFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0px);
    }
    50% {
        transform: translate3d(18px, -22px, 0) scale(1.08);
        filter: blur(0.2px);
    }
}

@keyframes kavyaShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes kavyaUnderlineScan {
    0% {
        transform: translateX(-15%);
        opacity: 0.2;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(15%);
        opacity: 0.2;
    }
}

@keyframes kavyaPanelIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes kavyaNeonPulse {
    0%, 100% {
        box-shadow:
            0 0 0 rgba(233, 30, 99, 0.0),
            0 0 0 rgba(46, 196, 182, 0.0),
            0 0 0 rgba(107, 43, 154, 0.0);
    }
    50% {
        box-shadow:
            0 0 25px rgba(233, 30, 99, 0.35),
            0 0 35px rgba(46, 196, 182, 0.25),
            0 0 45px rgba(107, 43, 154, 0.25);
    }
}

.kavya-hero-bg {
    position: relative;
    overflow: hidden;
}

.kavya-hero-bg::before {
    content: '';
    position: absolute;
    inset: -120px;
    background:
        conic-gradient(
            from 180deg,
            var(--kavya-teal),
            var(--kavya-blue),
            var(--kavya-yellow),
            var(--kavya-pink),
            var(--kavya-purple),
            var(--kavya-teal)
        );
    opacity: 0.25;
    animation: kavyaGradientSpin 12s linear infinite;
    pointer-events: none;
}

.kavya-hero-bg::after {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    left: -160px;
    top: -260px;
    background: radial-gradient(circle at 30% 30%, rgba(46, 196, 182, 0.55), rgba(233, 30, 99, 0.15), rgba(0, 0, 0, 0));
    opacity: 0.9;
    animation: kavyaBlobFloat 6s ease-in-out infinite;
    pointer-events: none;
}

.kavya-hero-bg > * {
    position: relative;
    z-index: 1;
}

/* Student panel header: scrollable links + fixed utilities (avoids logo overlap on md screens) */
.student-panel-nav .student-nav-primary {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.student-panel-nav .student-nav-primary::-webkit-scrollbar {
    height: 4px;
}
.student-panel-nav .student-nav-primary::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.4);
    border-radius: 4px;
}
html.dark-mode .student-panel-nav .student-nav-primary::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
}

body.kavya-theme-student {
    background: radial-gradient(circle at 20% -10%, rgba(46, 196, 182, 0.18), rgba(255, 255, 255, 0) 45%),
        radial-gradient(circle at 90% 10%, rgba(249, 199, 79, 0.18), rgba(255, 255, 255, 0) 45%),
        #f8fafc;
    overflow-x: hidden;
}

body.kavya-theme-student::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(46, 196, 182, 0.25), transparent 40%),
        radial-gradient(circle at 75% 30%, rgba(233, 30, 99, 0.18), transparent 45%),
        radial-gradient(circle at 60% 85%, rgba(107, 43, 154, 0.14), transparent 40%);
    pointer-events: none;
    z-index: -1;
}

body.kavya-theme-teacher {
    background: radial-gradient(circle at 20% -10%, rgba(107, 43, 154, 0.18), rgba(255, 255, 255, 0) 45%),
        radial-gradient(circle at 85% 20%, rgba(233, 30, 99, 0.12), rgba(255, 255, 255, 0) 45%),
        #f8fafc;
    overflow-x: hidden;
}

body.kavya-theme-teacher::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(107, 43, 154, 0.22), transparent 42%),
        radial-gradient(circle at 70% 40%, rgba(46, 196, 182, 0.12), transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(249, 199, 79, 0.10), transparent 40%);
    pointer-events: none;
    z-index: -1;
}

body.kavya-theme-admin {
    background: radial-gradient(circle at 20% -10%, rgba(233, 30, 99, 0.18), rgba(255, 255, 255, 0) 45%),
        radial-gradient(circle at 80% 10%, rgba(46, 196, 182, 0.15), rgba(255, 255, 255, 0) 45%),
        #060913;
    overflow-x: hidden;
    color: rgba(255, 255, 255, 0.92);
}

body.kavya-theme-admin::before {
    content: '';
    position: fixed;
    inset: -40%;
    background:
        radial-gradient(circle at 40% 30%, rgba(233, 30, 99, 0.18), transparent 50%),
        radial-gradient(circle at 70% 40%, rgba(46, 196, 182, 0.16), transparent 50%),
        radial-gradient(circle at 55% 80%, rgba(107, 43, 154, 0.14), transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: kavyaGradientSpin 26s linear infinite;
}

.kavya-glow-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(226, 232, 240, 0.6) !important;
    transform: translateZ(0);
}

.kavya-glow-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        120deg,
        rgba(244, 114, 182, 0) 0%,
        rgba(233, 30, 99, 0.30) 20%,
        rgba(46, 196, 182, 0.28) 45%,
        rgba(107, 43, 154, 0.28) 70%,
        rgba(249, 199, 79, 0) 100%
    );
    background-size: 250% 100%;
    opacity: 0.40;
    animation: kavyaShimmer 2.4s linear infinite;
    pointer-events: none;
    mix-blend-mode: screen;
}

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

body.kavya-theme-teacher .teacher-tab {
    position: relative;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

body.kavya-theme-teacher .teacher-tab.active {
    color: var(--kavya-purple) !important;
}

body.kavya-theme-teacher .teacher-tab.active::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -2px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--kavya-pink), var(--kavya-teal), var(--kavya-purple));
    animation: kavyaUnderlineScan 0.9s ease-out both;
    pointer-events: none;
}

.kavya-panel-in {
    animation: kavyaPanelIn 520ms ease both;
}

/* Admin neon upgrades */
#adminSidebar.kavya-admin-sidebar {
    position: relative;
    background: linear-gradient(180deg, #0b1020 0%, #101a33 100%) !important;
    overflow: hidden;
}

#adminSidebar.kavya-admin-sidebar::before {
    content: '';
    position: absolute;
    inset: -40%;
    background:
        conic-gradient(
            from 210deg,
            rgba(233, 30, 99, 0.0),
            rgba(233, 30, 99, 0.35),
            rgba(46, 196, 182, 0.30),
            rgba(107, 43, 154, 0.35),
            rgba(249, 199, 79, 0.10),
            rgba(233, 30, 99, 0.0)
        );
    opacity: 0.35;
    animation: kavyaGradientSpin 18s linear infinite;
    pointer-events: none;
}

#adminSidebar.kavya-admin-sidebar > * {
    position: relative;
    z-index: 1;
}

/* Admin layout alignment improvements */
body.kavya-theme-admin #adminSidebar {
    width: 16rem;
}

body.kavya-theme-admin #mainContent {
    margin-left: 16rem;
    width: calc(100% - 16rem);
}

body.kavya-theme-admin .nav-item {
    min-height: 46px;
    border-radius: 12px;
    line-height: 1.2;
}

body.kavya-theme-admin .nav-item i {
    width: 1.25rem;
    text-align: center;
}

body.kavya-theme-admin #sectionTitle {
    letter-spacing: 0.2px;
}

body.kavya-theme-admin .kavya-admin-banner h2 {
    line-height: 1.2;
}

body.kavya-theme-admin .kavya-admin-stat {
    border-radius: 14px;
}

body.kavya-theme-admin .kavya-admin-banner {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 12px;
}

body.kavya-theme-admin .kavya-admin-banner::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(120deg, var(--kavya-pink), var(--kavya-teal), var(--kavya-purple), var(--kavya-yellow));
    background-size: 220% 100%;
    animation: kavyaShimmer 2.2s linear infinite;
    opacity: 0.25;
    z-index: -1;
}

body.kavya-theme-admin .kavya-admin-stat {
    animation: kavyaNeonPulse 2.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .kavya-hero-bg::before,
    .kavya-hero-bg::after,
    .kavya-glow-card::after,
    body.kavya-theme-admin::before,
    body.kavya-theme-admin .kavya-admin-stat {
        animation: none !important;
    }
}


.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

/* Professional Button styles with cohesive color palette */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-600) 0%, var(--secondary-700) 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
    background: linear-gradient(135deg, var(--secondary-700) 0%, var(--secondary-800) 100%);
}

.btn-accent {
    background: linear-gradient(135deg, var(--neutral-700) 0%, var(--neutral-800) 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.btn-accent:hover::before {
    left: 100%;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, var(--neutral-800) 0%, var(--neutral-900) 100%);
}

/* Professional Table styles */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    border: 1px solid var(--neutral-200);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--neutral-200);
    transition: background-color 0.2s ease;
}

th {
    background: var(--primary-50);
    font-weight: 600;
    color: var(--primary-800);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-200);
}

tr {
    transition: background-color 0.2s ease;
}

tr:hover {
    background: var(--neutral-50);
}

/* Professional Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #ffffff;
    margin: 5% auto;
    padding: 32px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 3px solid #d1fae5;
}

.close {
    color: #64748b;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #334155;
    background: #f1f5f9;
    transform: rotate(90deg);
}

/* Professional Alert styles */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: slideInRight 0.3s ease;
    position: relative;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border-left-color: var(--success);
}

.alert-error {
    background: var(--error-light);
    color: #991b1b;
    border-left-color: var(--error);
}

.alert-info {
    background: var(--info-light);
    color: var(--primary-800);
    border-left-color: var(--info);
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border-left-color: var(--warning);
}

/* Professional Filter chips */
.filter-chip {
    display: inline-block;
    padding: 8px 16px;
    background: var(--neutral-50);
    border-radius: 6px;
    margin: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid var(--neutral-200);
    color: var(--neutral-700);
    font-weight: 500;
}

.filter-chip:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    color: var(--primary-700);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* Admin Sidebar Toggle Styles */
#sidebarToggle {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

#sidebarToggle:hover {
    transform: scale(1.1);
}

#sidebarToggle:active {
    transform: scale(0.95);
}

#sidebarOverlay {
    display: none;
}

/* Admin Sidebar Scrollable Navigation */
#adminSidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

#adminSidebar nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* Custom scrollbar for admin sidebar */
#adminSidebar nav::-webkit-scrollbar {
    width: 6px;
}

#adminSidebar nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

#adminSidebar nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

#adminSidebar nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Dark mode scrollbar for sidebar */
html.dark-mode #adminSidebar nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

html.dark-mode #adminSidebar nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

html.dark-mode #adminSidebar nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 1024px) {
    #adminSidebar {
        z-index: 50;
    }
    
    #sidebarOverlay {
        display: block;
        z-index: 40;
    }
    
    #mainContent {
        margin-left: 0 !important;
        width: 100% !important;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #adminSidebar.-translate-x-full {
        transform: translateX(-100%);
    }
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   ============================================ */

/* Mobile-First: Base styles for mobile devices (up to 640px) */
@media (max-width: 640px) {
    /* Typography adjustments for mobile */
    body {
        font-size: 14px;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    h3 {
        font-size: 1.25rem !important;
        line-height: 1.4;
    }
    
    h4 {
        font-size: 1.1rem !important;
    }
    
    p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    /* Container padding for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Touch-friendly buttons - minimum 44x44px touch target */
    button,
    .btn-primary,
    .btn-secondary,
    .btn-accent,
    a[role="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        font-size: 16px; /* Prevents zoom on iOS */
        touch-action: manipulation;
    }
    
    /* Form inputs - prevent zoom on iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    input[type="time"],
    input[type="search"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px 16px;
        min-height: 44px;
    }
    
    /* Modal optimizations for mobile */
    .modal-content {
        padding: 20px;
        margin: 5% auto;
        width: 95%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    /* Table responsive wrapper */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        width: 100%;
    }
    
    table {
        min-width: 600px; /* Ensures table doesn't get too cramped */
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    /* Card spacing adjustments */
    .card,
    [class*="card"],
    [class*="rounded-2xl"],
    [class*="rounded-xl"] {
        margin-bottom: 1rem;
    }
    
    /* Grid adjustments */
    .grid {
        gap: 1rem;
    }
    
    /* Navigation adjustments */
    nav {
        padding: 0.5rem 0;
    }
    
    /* Hero section adjustments */
    section[class*="hero"],
    section[class*="Hero"] {
        padding: 2rem 0;
    }
    
    /* Footer adjustments */
    footer {
        padding: 2rem 0;
        font-size: 0.875rem;
    }
    
    /* Spacing utilities for mobile */
    .py-20,
    .py-16,
    .py-12 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .px-8,
    .px-12 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Image optimizations */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    html {
        overflow-x: hidden;
    }
    
    /* Text truncation for long content */
    .truncate-mobile {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Tablet and small desktop (641px to 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .modal-content {
        padding: 24px;
        margin: 8% auto;
        width: 90%;
    }
    
    button,
    .btn-primary,
    .btn-secondary,
    .btn-accent {
        min-height: 44px;
        padding: 12px 24px;
    }
}

/* Standard responsive utilities (768px and below) */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block !important;
    }
    
    /* Stack columns on mobile */
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    
    /* Flex column on mobile */
    .flex-row {
        flex-direction: column;
    }
    
    /* Center align text on mobile for better readability */
    .text-left-mobile {
        text-align: center;
    }
    
    /* Adjust spacing for mobile */
    .space-x-6 > * + * {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    /* Mobile menu optimizations */
    #mobileMenu {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
        z-index: 100;
    }
    
    /* Mobile menu links */
    #mobileMenu a,
    #mobileMenu button {
        padding: 14px 16px;
        font-size: 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
        width: 100%;
    }
    
    /* Better mobile menu animation */
    #mobileMenu {
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Admin sidebar mobile adjustments */
    #adminSidebar {
        width: 280px;
    }
    
    /* Cart and badge adjustments */
    #cartBadge,
    #cartBadgeMobile {
        font-size: 0.7rem;
        min-width: 18px;
        height: 18px;
        padding: 2px;
    }
}

/* Large mobile devices (481px to 640px) */
@media (min-width: 481px) and (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 90%;
    }
}

/* Very small devices (up to 480px) - Android phones */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.35rem !important;
    }
    
    h3 {
        font-size: 1.15rem !important;
    }
    
    /* Extra small padding */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Smaller buttons but still touch-friendly */
    button,
    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    /* Compact modal */
    .modal-content {
        padding: 16px;
        margin: 2% auto;
        width: 98%;
        max-height: 95vh;
    }
    
    /* Smaller table font */
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 8px 6px;
    }
    
    /* Logo size adjustment */
    img[alt*="Logo"],
    img[alt*="logo"] {
        max-width: 48px !important;
        max-height: 48px !important;
    }
    
    /* Navigation height adjustment */
    nav {
        height: auto;
        min-height: 60px;
    }
    
    /* Footer grid single column */
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    /* Stats section - single column */
    .grid-cols-4,
    .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    /* Reduce vertical padding in landscape */
    .py-20,
    .py-16 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Adjust hero section */
    section[class*="hero"] {
        min-height: auto;
        padding: 1.5rem 0;
    }
    
    /* Modal adjustments for landscape */
    .modal-content {
        max-height: 85vh;
        margin: 2% auto;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .hover\:scale-105:hover,
    .hover\:shadow-xl:hover {
        transform: none;
        box-shadow: inherit;
    }
    
    /* Increase touch targets */
    a,
    button,
    input[type="button"],
    input[type="submit"],
    .clickable {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better tap feedback */
    button:active,
    a:active,
    .clickable:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* High DPI displays (Retina, etc.) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp rendering on high DPI */
    img,
    svg {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Android-specific optimizations */
@supports (-webkit-appearance: none) {
    /* Android Chrome optimizations */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Smooth scrolling on Android */
    html {
        -webkit-overflow-scrolling: touch;
    }
}

/* Prevent text size adjustment on iOS */
@media screen and (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}

/* Safe area insets for notched devices (iPhone X, etc.) */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    nav {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .modal-content {
        margin-left: max(5%, env(safe-area-inset-left));
        margin-right: max(5%, env(safe-area-inset-right));
    }
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
}

/* Accessibility */
.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;
}

/* Professional Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
    border-radius: 4px;
    box-shadow: 0 0 0 3px var(--primary-100);
    transition: all 0.2s ease;
}

/* Remove focus outline from sidebar nav items after click */
.nav-item:focus {
    outline: none !important;
    box-shadow: none !important;
}

.nav-item:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove selection marks from nav items */
.nav-item::selection {
    background: transparent;
}

.nav-item::-moz-selection {
    background: transparent;
}

/* Dark Mode Styles */
html.dark-mode {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

html.dark-mode,
html.dark-mode body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #e2e8f0 !important;
}

html.dark-mode body.bg-gray-50 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

html.dark-mode .bg-white,
html.dark-mode body .bg-white {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155;
}

html.dark-mode .bg-gray-50,
html.dark-mode body .bg-gray-50 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

html.dark-mode .bg-gray-100,
html.dark-mode body .bg-gray-100 {
    background-color: #334155 !important;
}

html.dark-mode .bg-gray-200,
html.dark-mode body .bg-gray-200 {
    background-color: #475569 !important;
}

html.dark-mode .text-gray-900,
html.dark-mode body .text-gray-900 {
    color: #f1f5f9 !important;
}

html.dark-mode .text-gray-800,
html.dark-mode body .text-gray-800 {
    color: #e2e8f0 !important;
}

html.dark-mode .text-gray-700,
html.dark-mode body .text-gray-700 {
    color: #cbd5e1 !important;
}

html.dark-mode .text-gray-600,
html.dark-mode body .text-gray-600 {
    color: #94a3b8 !important;
}

html.dark-mode .text-gray-500,
html.dark-mode body .text-gray-500 {
    color: #64748b !important;
}

html.dark-mode .text-gray-400,
html.dark-mode body .text-gray-400 {
    color: #94a3b8 !important;
}

html.dark-mode .text-gray-300,
html.dark-mode body .text-gray-300 {
    color: #cbd5e1 !important;
}

html.dark-mode .text-gray-200,
html.dark-mode body .text-gray-200 {
    color: #e2e8f0 !important;
}

html.dark-mode .border-gray-200,
html.dark-mode .border-gray-300,
html.dark-mode body .border-gray-200,
html.dark-mode body .border-gray-300 {
    border-color: #475569 !important;
}

html.dark-mode .shadow-lg,
html.dark-mode body .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 
                0 4px 6px -2px rgba(0, 0, 0, 0.2) !important;
}

html.dark-mode .shadow-md,
html.dark-mode body .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 
                0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

html.dark-mode nav,
html.dark-mode body nav {
    background-color: #1e293b !important;
    border-bottom: 2px solid #334155 !important;
}

html.dark-mode .navbar-scrolled,
html.dark-mode body .navbar-scrolled {
    background-color: rgba(30, 41, 59, 0.98) !important;
}

html.dark-mode nav a,
html.dark-mode body nav a {
    color: #cbd5e1 !important;
}

html.dark-mode nav a:hover,
html.dark-mode body nav a:hover {
    color: #cbd5e1 !important;
    transition: all 0.3s ease;
}

html.dark-mode button,
html.dark-mode body button {
    color: #cbd5e1 !important;
}

html.dark-mode .form-input,
html.dark-mode body .form-input {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html.dark-mode .form-input:focus,
html.dark-mode body .form-input:focus {
    border-color: #64748b !important;
    background-color: #334155 !important;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2) !important;
}

html.dark-mode .form-label,
html.dark-mode body .form-label {
    color: #cbd5e1 !important;
}

html.dark-mode table,
html.dark-mode body table {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

html.dark-mode th,
html.dark-mode body th {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border-bottom-color: #334155 !important;
}

html.dark-mode td,
html.dark-mode body td {
    border-bottom-color: #334155 !important;
}

html.dark-mode tr:hover,
html.dark-mode body tr:hover {
    background: #334155 !important;
}

html.dark-mode .modal-content,
html.dark-mode body .modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

html.dark-mode .modal-header,
html.dark-mode body .modal-header {
    border-bottom-color: #475569 !important;
}

html.dark-mode .close,
html.dark-mode body .close {
    color: #94a3b8 !important;
}

html.dark-mode .close:hover,
html.dark-mode body .close:hover {
    color: #cbd5e1 !important;
    background: #334155 !important;
}

html.dark-mode .filter-chip,
html.dark-mode body .filter-chip {
    background: #334155 !important;
    color: #cbd5e1 !important;
    border-color: #475569 !important;
}

html.dark-mode .filter-chip:hover,
html.dark-mode body .filter-chip:hover {
    background: #475569 !important;
}

html.dark-mode .filter-chip.active,
html.dark-mode body .filter-chip.active {
    background: #475569 !important;
    color: white !important;
    border-color: #475569 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

html.dark-mode footer,
html.dark-mode body footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border-top: 2px solid #334155 !important;
}

html.dark-mode .bg-gray-900,
html.dark-mode body .bg-gray-900 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

html.dark-mode .border-gray-800,
html.dark-mode body .border-gray-800 {
    border-color: #475569 !important;
}

html.dark-mode .bg-gradient-to-r,
html.dark-mode body .bg-gradient-to-r {
    opacity: 0.9;
}

html.dark-mode .text-white,
html.dark-mode body .text-white {
    color: #e2e8f0 !important;
}

html.dark-mode .text-black,
html.dark-mode body .text-black {
    color: #e2e8f0 !important;
}

html.dark-mode .bg-blue-50,
html.dark-mode .bg-purple-50,
html.dark-mode .bg-green-50,
html.dark-mode .bg-yellow-50,
html.dark-mode .bg-red-50,
html.dark-mode body .bg-blue-50,
html.dark-mode body .bg-purple-50,
html.dark-mode body .bg-green-50,
html.dark-mode body .bg-yellow-50,
html.dark-mode body .bg-red-50 {
    background-color: #334155 !important;
}

html.dark-mode .bg-blue-100,
html.dark-mode .bg-purple-100,
html.dark-mode .bg-green-100,
html.dark-mode body .bg-blue-100,
html.dark-mode body .bg-purple-100,
html.dark-mode body .bg-green-100 {
    background-color: #475569 !important;
}

html.dark-mode .border-blue-600,
html.dark-mode .border-purple-600,
html.dark-mode .border-green-600,
html.dark-mode body .border-blue-600,
html.dark-mode body .border-purple-600,
html.dark-mode body .border-green-600 {
    border-color: #475569 !important;
}

/* Comprehensive Dark Mode Text and Element Styles */
html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode h5,
html.dark-mode h6,
html.dark-mode body h1,
html.dark-mode body h2,
html.dark-mode body h3,
html.dark-mode body h4,
html.dark-mode body h5,
html.dark-mode body h6 {
    color: #f1f5f9 !important;
}

html.dark-mode p,
html.dark-mode body p,
html.dark-mode div,
html.dark-mode body div,
html.dark-mode span,
html.dark-mode body span {
    color: #e2e8f0 !important;
}

html.dark-mode a,
html.dark-mode body a {
    color: #60a5fa !important;
}

html.dark-mode a:hover,
html.dark-mode body a:hover {
    color: #93c5fd !important;
}

html.dark-mode a:visited,
html.dark-mode body a:visited {
    color: #818cf8 !important;
}

html.dark-mode ul,
html.dark-mode ol,
html.dark-mode body ul,
html.dark-mode body ol {
    color: #e2e8f0 !important;
}

html.dark-mode li,
html.dark-mode body li {
    color: #e2e8f0 !important;
}

html.dark-mode .table-container,
html.dark-mode body .table-container {
    background: #1e293b !important;
    border-color: #334155 !important;
}

html.dark-mode .card,
html.dark-mode body .card,
html.dark-mode [class*="card"],
html.dark-mode body [class*="card"] {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

html.dark-mode input[type="text"],
html.dark-mode input[type="email"],
html.dark-mode input[type="password"],
html.dark-mode input[type="number"],
html.dark-mode input[type="tel"],
html.dark-mode input[type="date"],
html.dark-mode input[type="time"],
html.dark-mode input[type="search"],
html.dark-mode input[type="url"],
html.dark-mode body input[type="text"],
html.dark-mode body input[type="email"],
html.dark-mode body input[type="password"],
html.dark-mode body input[type="number"],
html.dark-mode body input[type="tel"],
html.dark-mode body input[type="date"],
html.dark-mode body input[type="time"],
html.dark-mode body input[type="search"],
html.dark-mode body input[type="url"] {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html.dark-mode input[type="text"]::placeholder,
html.dark-mode input[type="email"]::placeholder,
html.dark-mode input[type="password"]::placeholder,
html.dark-mode input[type="number"]::placeholder,
html.dark-mode input[type="tel"]::placeholder,
html.dark-mode input[type="search"]::placeholder,
html.dark-mode body input[type="text"]::placeholder,
html.dark-mode body input[type="email"]::placeholder,
html.dark-mode body input[type="password"]::placeholder,
html.dark-mode body input[type="number"]::placeholder,
html.dark-mode body input[type="tel"]::placeholder,
html.dark-mode body input[type="search"]::placeholder {
    color: #94a3b8 !important;
}

html.dark-mode select,
html.dark-mode body select {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html.dark-mode textarea,
html.dark-mode body textarea {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html.dark-mode textarea::placeholder,
html.dark-mode body textarea::placeholder {
    color: #94a3b8 !important;
}

html.dark-mode label,
html.dark-mode body label {
    color: #cbd5e1 !important;
}

html.dark-mode i,
html.dark-mode body i,
html.dark-mode .fa,
html.dark-mode body .fa,
html.dark-mode [class*="fa-"],
html.dark-mode body [class*="fa-"] {
    color: inherit !important;
}

html.dark-mode .btn-primary,
html.dark-mode body .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
}

html.dark-mode .btn-primary:hover,
html.dark-mode body .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
}

html.dark-mode .btn-secondary,
html.dark-mode body .btn-secondary {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
    color: #ffffff !important;
}

html.dark-mode .btn-secondary:hover,
html.dark-mode body .btn-secondary:hover {
    background: linear-gradient(135deg, #0f766e 0%, #115e59 100%) !important;
}

html.dark-mode .alert-success,
html.dark-mode body .alert-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
    border-left-color: #10b981 !important;
}

html.dark-mode .alert-error,
html.dark-mode body .alert-error {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border-left-color: #ef4444 !important;
}

html.dark-mode .alert-info,
html.dark-mode body .alert-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93c5fd !important;
    border-left-color: #3b82f6 !important;
}

html.dark-mode .alert-warning,
html.dark-mode body .alert-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fcd34d !important;
    border-left-color: #f59e0b !important;
}

html.dark-mode .glass,
html.dark-mode body .glass {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
}

html.dark-mode code,
html.dark-mode body code,
html.dark-mode pre,
html.dark-mode body pre {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

html.dark-mode blockquote,
html.dark-mode body blockquote {
    border-left-color: #475569 !important;
    color: #cbd5e1 !important;
}

html.dark-mode hr,
html.dark-mode body hr {
    border-color: #334155 !important;
    background-color: #334155 !important;
}

html.dark-mode .bg-slate-50,
html.dark-mode .bg-slate-100,
html.dark-mode .bg-slate-200,
html.dark-mode body .bg-slate-50,
html.dark-mode body .bg-slate-100,
html.dark-mode body .bg-slate-200 {
    background-color: #334155 !important;
}

html.dark-mode .bg-slate-800,
html.dark-mode .bg-slate-900,
html.dark-mode body .bg-slate-800,
html.dark-mode body .bg-slate-900 {
    background-color: #1e293b !important;
}

html.dark-mode .text-slate-100,
html.dark-mode .text-slate-200,
html.dark-mode .text-slate-300,
html.dark-mode body .text-slate-100,
html.dark-mode body .text-slate-200,
html.dark-mode body .text-slate-300 {
    color: #e2e8f0 !important;
}

html.dark-mode .text-slate-400,
html.dark-mode .text-slate-500,
html.dark-mode .text-slate-600,
html.dark-mode body .text-slate-400,
html.dark-mode body .text-slate-500,
html.dark-mode body .text-slate-600 {
    color: #94a3b8 !important;
}

html.dark-mode .text-slate-700,
html.dark-mode .text-slate-800,
html.dark-mode .text-slate-900,
html.dark-mode body .text-slate-700,
html.dark-mode body .text-slate-800,
html.dark-mode body .text-slate-900 {
    color: #cbd5e1 !important;
}

html.dark-mode .border-slate-200,
html.dark-mode .border-slate-300,
html.dark-mode .border-slate-400,
html.dark-mode body .border-slate-200,
html.dark-mode body .border-slate-300,
html.dark-mode body .border-slate-400 {
    border-color: #475569 !important;
}

html.dark-mode .border-slate-600,
html.dark-mode .border-slate-700,
html.dark-mode body .border-slate-600,
html.dark-mode body .border-slate-700 {
    border-color: #475569 !important;
}

/* Additional comprehensive dark mode styles */
html.dark-mode section,
html.dark-mode body section,
html.dark-mode article,
html.dark-mode body article,
html.dark-mode aside,
html.dark-mode body aside {
    color: #e2e8f0 !important;
}

html.dark-mode .container,
html.dark-mode body .container {
    color: #e2e8f0 !important;
}

html.dark-mode .badge,
html.dark-mode body .badge,
html.dark-mode [class*="badge"],
html.dark-mode body [class*="badge"] {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

html.dark-mode .dropdown-menu,
html.dark-mode body .dropdown-menu,
html.dark-mode [class*="dropdown"],
html.dark-mode body [class*="dropdown"] {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

html.dark-mode .dropdown-menu a,
html.dark-mode body .dropdown-menu a {
    color: #e2e8f0 !important;
}

html.dark-mode .dropdown-menu a:hover,
html.dark-mode body .dropdown-menu a:hover {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

html.dark-mode .tooltip,
html.dark-mode body .tooltip,
html.dark-mode [class*="tooltip"],
html.dark-mode body [class*="tooltip"] {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

html.dark-mode .progress,
html.dark-mode body .progress,
html.dark-mode [class*="progress"],
html.dark-mode body [class*="progress"] {
    background-color: #334155 !important;
}

html.dark-mode .progress-bar,
html.dark-mode body .progress-bar,
html.dark-mode [class*="progress-bar"],
html.dark-mode body [class*="progress-bar"] {
    background-color: #3b82f6 !important;
}

html.dark-mode .breadcrumb,
html.dark-mode body .breadcrumb,
html.dark-mode [class*="breadcrumb"],
html.dark-mode body [class*="breadcrumb"] {
    color: #e2e8f0 !important;
}

html.dark-mode .breadcrumb a,
html.dark-mode body .breadcrumb a {
    color: #60a5fa !important;
}

html.dark-mode .pagination,
html.dark-mode body .pagination,
html.dark-mode [class*="pagination"],
html.dark-mode body [class*="pagination"] {
    color: #e2e8f0 !important;
}

html.dark-mode .pagination a,
html.dark-mode body .pagination a {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

html.dark-mode .pagination a:hover,
html.dark-mode body .pagination a:hover {
    background-color: #475569 !important;
    color: #f1f5f9 !important;
}

html.dark-mode .pagination .active,
html.dark-mode body .pagination .active {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

html.dark-mode .tabs,
html.dark-mode body .tabs,
html.dark-mode [class*="tab"],
html.dark-mode body [class*="tab"] {
    border-color: #334155 !important;
}

html.dark-mode .tabs a,
html.dark-mode body .tabs a,
html.dark-mode [class*="tab"] a,
html.dark-mode body [class*="tab"] a {
    color: #cbd5e1 !important;
}

html.dark-mode .tabs a.active,
html.dark-mode body .tabs a.active,
html.dark-mode [class*="tab"] a.active,
html.dark-mode body [class*="tab"] a.active {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

/* Scrollbar for dark mode */
html.dark-mode ::-webkit-scrollbar-track {
    background: #1e293b !important;
}

html.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #64748b, #475569) !important;
}

html.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #475569, #334155) !important;
}

/* Notification System Styles */
.notification-container {
    position: relative;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

.animate-slide-out {
    animation: slideOut 0.3s ease-in;
}

.notification-item {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Announcement Board Styles */
.announcement-card {
    transition: all 0.3s ease;
}

.announcement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Progress Bar Styles */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

html.dark-mode .progress-bar-container {
    background-color: #374151;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 999px;
    transition: width 0.6s ease;
}

.progress-bar-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-bar-fill.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Calendar Widget Styles */
.calendar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

html.dark-mode .calendar-widget {
    background: #1e293b;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover {
    background-color: #f3f4f6;
}

html.dark-mode .calendar-day:hover {
    background-color: #374151;
}

.calendar-day.today {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-weight: bold;
}

.calendar-day.has-event {
    position: relative;
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background-color: #ef4444;
    border-radius: 50%;
}

/* Certificate Styles */
.certificate-container {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #d1d5db;
    border-radius: 16px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

html.dark-mode .certificate-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #475569;
}

.certificate-border {
    position: absolute;
    inset: 10px;
    border: 3px double #d1d5db;
    border-radius: 12px;
    pointer-events: none;
}

html.dark-mode .certificate-border {
    border-color: #475569;
}

.certificate-seal {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: 4px solid #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Dark Mode Toggle Switch */
.dark-mode-toggle {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

.dark-mode-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dark-mode-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #64748b, #475569);
    transition: 0.4s;
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-mode-toggle .slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: linear-gradient(135deg, #fef9f3, #ffffff);
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-mode-toggle input:checked + .slider {
    background: linear-gradient(135deg, #475569, #334155);
    box-shadow: 0 0 10px rgba(71, 85, 105, 0.3);
}

.dark-mode-toggle input:checked + .slider:before {
    transform: translateX(26px);
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
}

.dark-mode-toggle .slider-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: 0.4s;
    z-index: 1;
}

.dark-mode-toggle .slider-icon.sun {
    left: 8px;
    color: #f59e0b;
}

.dark-mode-toggle .slider-icon.moon {
    right: 8px;
    color: #6366f1;
}

.dark-mode-toggle input:checked ~ .slider-icon.sun {
    opacity: 0;
}

.dark-mode-toggle input:not(:checked) ~ .slider-icon.moon {
    opacity: 0;
}

/* Professional Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--secondary-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Professional Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Subtle Pulse animation for CTAs */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(71, 85, 105, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(71, 85, 105, 0);
    }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* Additional Professional Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.bounce-animation {
    animation: bounce 2s infinite;
}

/* Subtle Glow effect */
.glow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

/* Professional Shimmer effect for text */
.shimmer-text {
    background: linear-gradient(90deg, #334155, #475569, #64748b, #475569, #334155);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* Touch device specific styles */
.touch-device button,
.touch-device a[role="button"],
.touch-device .clickable {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    tap-highlight-color: rgba(59, 130, 246, 0.2);
}

.touch-device button:active,
.touch-device a:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* Prevent text selection on buttons for better mobile UX */
button,
.btn-primary,
.btn-secondary,
.btn-accent,
a[role="button"] {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Loading states for mobile */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Better scrollbar for mobile webkit browsers */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
    }
}
