@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Dark Mode Defaults */
    --color-background: 15 23 42;
    --color-surface: 30 41 59;
    --color-surface-hover: 51 65 85;
    --color-text: 248 250 252;
    --color-text-muted: 148 163 184;
    --color-primary: 99 102 241;
    --color-primary-hover: 79 70 229;
    --color-secondary: 16 185 129;
    --color-accent: 139 92 246;

    /* Sidebar Defaults */
    --color-sidebar: 15 23 42;
    --color-sidebar-text: 255 255 255;
    --color-sidebar-muted: 148 163 184;
}

.light-mode {
    /* User Palette: Re-engineered for 10x Visual Excellence & Legibility */
    --color-background: 245 247 251; /* Elegant cool white-gray background */
    --color-surface: 255 255 255;
    --color-surface-hover: 241 245 249;
    --color-text: 15 23 42; /* Slate 900 for high-contrast elite typography */
    --color-text-muted: 71 85 105; /* Slate 600 */

    --color-primary: 99 102 241; /* Indigo Primary */
    --color-primary-hover: 79 70 229;
    --color-secondary: 22 71 106;
    --color-accent: 139 92 246;

    /* Light Mode Sidebar: Pure Clean White Glass sidebar */
    --color-sidebar: 255 255 255;
    --color-sidebar-text: 15 23 42; /* Slate 900 */
    --color-sidebar-muted: 100 116 139; /* Slate 500 */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: rgb(var(--color-background));
    color: rgb(var(--color-text));
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(var(--color-surface), 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card {
    background: linear-gradient(145deg, rgba(var(--color-surface), 0.5) 0%, rgba(var(--color-surface), 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Admin Specific */
.admin-terminal {
    background: #020617;
    font-family: 'Fira Code', 'Courier New', monospace;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-log-line {
    border-left: 2px solid transparent;
    padding-left: 8px;
    margin-bottom: 2px;
}

.admin-log-line:hover {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: #6366f1;
}

.admin-section {
    transition: all 0.3s ease-in-out;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Status Badges */
.badge {
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border-width: 1px;
    border-style: solid;
}

.badge-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-purple {
    background-color: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.2);
}

/* Form Elements */
.input-field {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    transition: all 0.2s;
    /* Ensure icon space for selects */
}

.input-field:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    outline: none;
}

/* Transitions */
.transition-all-300 {
    transition: all 0.3s ease-in-out;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 3px solid #6366f1;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* --- Lavender Icon Overrides --- */

/* 1. Date/Time/Month Picker Indicators (Calendar & Clock) */
/* Target specific input types to apply the filter */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    /* Filter to turn black icon to Lavender (#A78BFA) */
    filter: invert(74%) sepia(28%) saturate(1003%) hue-rotate(218deg) brightness(103%) contrast(97%);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* 2. Custom Select Arrow (Lavender) */
select.input-field,
select.bg-transparent {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    /* Lavender Chevron SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A78BFA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    /* Make space so text doesn't overlap arrow */
}

/* Fix for month-selector specific case since it might not have input-field class but needs it */
#month-selector {
    /* Ensure it specifically gets the filter from above rule */
    cursor: pointer;
}

/* Light Mode Specific Overrides */

/* 1. Custom Premium Subtle Background Gradient */
.light-mode {
    background: linear-gradient(135deg, #f1f4fb 0%, #fcfdfe 60%, #f0f3fa 100%) !important;
}

/* 2. Glassmorphism Stat Cards with Frost & Glow */
.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 6px 20px rgba(31, 41, 135, 0.03) !important;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.light-mode .glass-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(31, 41, 135, 0.06) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

/* 3. Soft Contrast Backgrounds and Glow for Stat Icon Circles */
.light-mode .bg-blue-500.bg-opacity-10 { background-color: rgba(37, 99, 235, 0.08) !important; border: 1px solid rgba(37, 99, 235, 0.15) !important; }
.light-mode .bg-pink-500.bg-opacity-10 { background-color: rgba(219, 39, 119, 0.08) !important; border: 1px solid rgba(219, 39, 119, 0.15) !important; }
.light-mode .bg-purple-500.bg-opacity-10 { background-color: rgba(124, 58, 237, 0.08) !important; border: 1px solid rgba(124, 58, 237, 0.15) !important; }
.light-mode .bg-teal-500.bg-opacity-10 { background-color: rgba(13, 148, 136, 0.08) !important; border: 1px solid rgba(13, 148, 136, 0.15) !important; }
.light-mode .bg-cyan-500.bg-opacity-10 { background-color: rgba(8, 145, 178, 0.08) !important; border: 1px solid rgba(8, 145, 178, 0.15) !important; }
.light-mode .bg-indigo-500.bg-opacity-10 { background-color: rgba(79, 70, 229, 0.08) !important; border: 1px solid rgba(79, 70, 229, 0.15) !important; }

/* 4. Elegant Sidebar with Soft Sidebar-Text and active glow */
.light-mode aside {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.light-mode aside .border-b {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Sidebar Navigation Items */
.light-mode .view-btn {
    font-weight: 500 !important;
    border-radius: 10px !important;
    transition: all 0.2s ease-in-out !important;
}

.light-mode .view-btn:hover {
    background-color: rgba(99, 102, 241, 0.05) !important;
    color: #4f46e5 !important;
}

/* Active navigation item in Light Mode */
.light-mode .view-btn.bg-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%) !important;
    color: #4f46e5 !important;
    box-shadow: none !important;
    border: 1px solid rgba(99, 102, 241, 0.12) !important;
    font-weight: 600 !important;
}

/* 5. Premium Table / Activity Log Panel Styling */
.light-mode .activity-log-panel {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 30px rgba(31, 41, 135, 0.02) !important;
    overflow: hidden !important;
}

.light-mode .table-header-theme {
    background: linear-gradient(135deg, #e0e7ff 0%, #f5f3ff 100%) !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1) !important;
    color: #312e81 !important;
}

.light-mode table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.light-mode th {
    background-color: rgba(255, 255, 255, 0.5) !important;
    color: #475569 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    padding: 12px 16px !important;
}

.light-mode td {
    padding: 14px 16px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03) !important;
    color: #1e293b !important;
    font-weight: 500 !important;
}

.light-mode tr:hover td {
    background-color: rgba(99, 102, 241, 0.02) !important;
    color: #0f172a !important;
}

/* 6. Form Inputs in Light Mode */
.light-mode .input-field {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
    border-radius: 10px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.01) !important;
}

.light-mode .input-field:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

/* 7. Action Buttons (Generate M-FVF, Export CSV) */
.light-mode button.bg-surface,
.light-mode a.bg-surface,
.light-mode select.bg-surface {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #334155 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02) !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.light-mode button.bg-surface:hover,
.light-mode a.bg-surface:hover {
    background: #f8fafc !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    color: #4f46e5 !important;
    transform: translateY(-0.5px) !important;
}

/* 8. Slide-Over Panel Form Container & title */
.light-mode #slide-over-backdrop {
    background-color: rgba(15, 23, 42, 0.3) !important;
    backdrop-filter: blur(4px) !important;
}

.light-mode #slide-over-content > div {
    background-color: #ffffff !important;
    border-left: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.light-mode #slide-over-content .border-t {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

.light-mode #slide-over-title {
    color: #0f172a !important;
}

.light-mode #slide-over-content .bg-slate-900\/50 {
    background-color: #f8fafc !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* 9. Delete button override for warning action in light mode */
.light-mode #delete-entry-btn {
    background-color: rgba(239, 68, 68, 0.06) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #b91c1c !important; /* Rich Dark Red */
}

.light-mode #delete-entry-btn:hover {
    background-color: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

/* 10. High-Contrast Status Badges in Light Mode */
.light-mode .badge-success {
    background-color: rgba(22, 163, 74, 0.08) !important;
    color: #16a34a !important;
    border-color: rgba(22, 163, 74, 0.15) !important;
}

.light-mode .badge-warning {
    background-color: rgba(217, 119, 6, 0.08) !important;
    color: #d97706 !important;
    border-color: rgba(217, 119, 6, 0.15) !important;
}

.light-mode .badge-danger {
    background-color: rgba(225, 29, 72, 0.08) !important;
    color: #e11d48 !important;
    border-color: rgba(225, 29, 72, 0.15) !important;
}

.light-mode .badge-purple {
    background-color: rgba(124, 58, 237, 0.08) !important;
    color: #7c3aed !important;
    border-color: rgba(124, 58, 237, 0.15) !important;
}

/* 11. Stat Card Icon Color Overrides for Premium Vibrancy & Contrast */
.light-mode .text-blue-400 { color: #2563eb !important; }
.light-mode .text-pink-400 { color: #db2777 !important; }
.light-mode .text-purple-400 { color: #7c3aed !important; }
.light-mode .text-teal-400 { color: #0d9488 !important; }
.light-mode .text-cyan-400 { color: #0891b2 !important; }
.light-mode .text-indigo-400 { color: #4f46e5 !important; }
.light-mode .text-red-400 { color: #dc2626 !important; }
.light-mode .text-green-400 { color: #16a34a !important; }
.light-mode .text-yellow-400 { color: #ca8a04 !important; }

/* 12. Floating Action Button */
.light-mode #fab-add-entry {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%) !important;
    box-shadow: 0 6px 20px rgba(219, 39, 119, 0.3) !important;
}

.light-mode #fab-add-entry:hover {
    background: linear-gradient(135deg, #be185d 0%, #9d174d 100%) !important;
    box-shadow: 0 8px 25px rgba(219, 39, 119, 0.45) !important;
}

/* Google Sign-in button */
#login-btn {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 15px rgba(219, 39, 119, 0.3) !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

#login-btn:hover {
    background: linear-gradient(135deg, #db2777 0%, #9d174d 100%) !important;
    box-shadow: 0 6px 20px rgba(219, 39, 119, 0.45) !important;
    transform: translateY(-1px) !important;
}

/* AI Note Assistant Glowing Transition */
.ai-loading-glow {
    border-color: #db2777 !important; /* Dark Pink matching themes */
    box-shadow: 0 0 15px rgba(219, 39, 119, 0.4) !important;
    animation: ai-pulse-border 1.5s infinite ease-in-out;
}

@keyframes ai-pulse-border {
    0%, 100% {
        border-color: rgba(219, 39, 119, 0.4) !important;
        box-shadow: 0 0 5px rgba(219, 39, 119, 0.2) !important;
    }
    50% {
        border-color: rgba(219, 39, 119, 1) !important;
        box-shadow: 0 0 15px rgba(219, 39, 119, 0.6) !important;
    }
}

/* ==========================================================================
   🚀 ROLE SELECTION SCREEN OVERHAUL (100X BETTER DESIGN) 🚀
   ========================================================================== */

/* 1. Backdrop Overlay depending on Active Theme */
#role-selection-view {
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

.light-mode #role-selection-view {
    background: radial-gradient(circle at center, #f8fafc 0%, #e2e8f0 100%) !important;
}

/* 2. Glassmorphic Role Panel Container */
.role-selection-panel {
    background: rgba(15, 23, 42, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    animation: role-selection-bounce-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.light-mode .role-selection-panel {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(99, 102, 241, 0.1) !important;
    box-shadow: 0 25px 60px -12px rgba(99, 102, 241, 0.08) !important;
}

@keyframes role-selection-bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(15px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Logo glow */
.logo-glow {
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.25));
}

/* Typography controls with exact theme safety */
.selection-title {
    color: #ffffff !important;
}
.light-mode .selection-title {
    color: #0f172a !important;
}

.selection-subtitle {
    color: #94a3b8 !important;
}
.light-mode .selection-subtitle {
    color: #475569 !important;
}

/* 3. Role Options Cards with Glowing Custom Hover States */
.role-option-card {
    background: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.light-mode .role-option-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02) !important;
}

/* Trainee specific Hover effects */
.trainee-card:hover {
    background: rgba(219, 39, 119, 0.03) !important; /* Soft Pink tint */
    border-color: rgba(219, 39, 119, 0.35) !important;
    box-shadow: 0 0 30px rgba(219, 39, 119, 0.15) !important;
    transform: translateY(-4px) scale(1.01) !important;
}

.light-mode .trainee-card:hover {
    background: rgba(219, 39, 119, 0.02) !important;
    border-color: rgba(219, 39, 119, 0.4) !important;
    box-shadow: 0 8px 30px rgba(219, 39, 119, 0.08) !important;
}

/* Supervisor specific Hover effects */
.supervisor-card:hover {
    background: rgba(139, 92, 246, 0.03) !important; /* Soft Purple tint */
    border-color: rgba(139, 92, 246, 0.35) !important;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15) !important;
    transform: translateY(-4px) scale(1.01) !important;
}

.light-mode .supervisor-card:hover {
    background: rgba(139, 92, 246, 0.02) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.08) !important;
}

/* Icons Box glow */
.role-icon-box {
    width: 56px !important;
    height: 56px !important;
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
}

.trainee-icon {
    background-color: rgba(219, 39, 119, 0.1) !important;
    color: #f472b6 !important;
    border: 1px solid rgba(219, 39, 119, 0.2) !important;
}

.light-mode .trainee-icon {
    background-color: rgba(219, 39, 119, 0.08) !important;
    color: #db2777 !important;
    border: 1px solid rgba(219, 39, 119, 0.15) !important;
}

.supervisor-icon {
    background-color: rgba(139, 92, 246, 0.1) !important;
    color: #c084fc !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

.light-mode .supervisor-icon {
    background-color: rgba(139, 92, 246, 0.08) !important;
    color: #7c3aed !important;
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
}

/* Scaling icons on hover */
.role-option-card:hover .role-icon-box {
    transform: scale(1.1) rotate(2deg) !important;
}

/* Option Titles & Descriptions */
.option-title {
    color: #ffffff !important;
    font-size: 1.25rem !important;
    letter-spacing: -0.01em !important;
}

.light-mode .option-title {
    color: #0f172a !important;
}

/* OPTION DESCRIPTION: Crucial fix for 100% legibility in both modes */
.option-description {
    color: #94a3b8 !important; /* Slate 400 - high legibility in Dark mode */
}

.light-mode .option-description {
    color: #475569 !important; /* Slate 600 - high legibility in Light mode */
}

/* ==========================================================================
   🌌 INTERACTIVE PARTICLES OVERLAY STYLES 🌌
   ========================================================================== */
#login-particles-canvas,
#role-particles-canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 1 !important; /* Above the dark backdrops, below the main cards */
}

/* Enforce card layers on top of particle canvases & apply elite login styling */
#login-view > div.glass-panel,
#login-view > div.relative.glass-panel {
    position: relative !important;
    z-index: 10 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 
                inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
}

#role-selection-view > div.role-selection-panel {
    position: relative !important;
    z-index: 10 !important;
}

/* Premium guest login button overlay */
#guest-login-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#guest-login-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* ==========================================================================
   🔔 CUSTOM DIALOG MODAL TRANSITIONS 🔔
   ========================================================================== */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes modalScaleUp {
    from { transform: scale(0.94) translateY(8px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes modalScaleDown {
    from { transform: scale(1) translateY(0); opacity: 1; }
    to { transform: scale(0.94) translateY(8px); opacity: 0; }
}

.modal-fade-in {
    animation: modalFadeIn 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.modal-fade-out {
    animation: modalFadeOut 0.18s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.modal-scale-up {
    animation: modalScaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

.modal-scale-down {
    animation: modalScaleDown 0.18s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* ==========================================================================
   📱 RESPONSIVE SIDEBAR
   ========================================================================== */

/* Sidebar shadow when overlaying content (mobile) */
#main-sidebar {
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    height: 100dvh; /* Use dynamic viewport height */
}

/* On lg+ the sidebar is in the normal flow, no external shadow needed */
@media (min-width: 1024px) {
    #main-sidebar {
        box-shadow: none;
        position: relative;
        transform: translateX(0) !important;
    }

    #main-content {
        margin-left: 0;
    }
}

/* Smooth sidebar slide animation */
#main-sidebar {
    will-change: transform;
}

/* Mobile header hamburger button pulse on first load hint */
@keyframes menuHint {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

#mobile-menu-btn {
    animation: menuHint 1.8s ease-in-out 1s 2;
}

/* Sidebar is always fully solid — no transparency bleed-through */
#main-sidebar {
    background-color: rgb(var(--color-sidebar)) !important;
}

/* Magenta row styling for supervisor feedback */
.magenta-row {
    background-color: rgba(236, 72, 153, 0.08) !important; /* pink-500/8 */
    border-left: 3px solid rgb(236, 72, 153) !important; /* pink-500 */
}
.magenta-row:hover {
    background-color: rgba(236, 72, 153, 0.14) !important; /* pink-500/14 */
}
.light-mode .magenta-row {
    background-color: rgba(236, 72, 153, 0.05) !important;
    border-left: 3px solid rgb(219, 39, 119) !important; /* pink-600 */
}
.light-mode .magenta-row:hover {
    background-color: rgba(236, 72, 153, 0.09) !important;
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.animate-bounce-slow {
    animation: bounceSlow 2s ease-in-out infinite;
}

/* Mustard yellow row styling for supervisor dashboard entries with notes */
.mustard-row {
    background-color: rgba(234, 179, 8, 0.08) !important; /* yellow-500/8 */
    border-left: 3px solid rgb(234, 179, 8) !important; /* yellow-500 */
}
.mustard-row:hover {
    background-color: rgba(234, 179, 8, 0.14) !important; /* yellow-500/14 */
}
.light-mode .mustard-row {
    background-color: rgba(202, 138, 4, 0.05) !important; /* yellow-600/5 */
    border-left: 3px solid rgb(202, 138, 4) !important; /* yellow-600 */
}
.light-mode .mustard-row:hover {
    background-color: rgba(202, 138, 4, 0.09) !important;
}

/* Chat View Styling */
.chat-contact-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.chat-contact-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}
.chat-contact-item.active {
    background-color: rgba(99, 102, 241, 0.1) !important; /* Indigo accent background */
    border-color: rgba(99, 102, 241, 0.2);
}
.chat-contact-item.unread {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.18), rgba(236, 72, 153, 0.05)) !important;
    border-color: rgba(236, 72, 153, 0.6) !important;
    border-left: 3px solid #ec4899 !important;
    box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.08);
}
.chat-contact-item.unread .chat-contact-preview {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
}
.chat-unread-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 1.1rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background-color: #ec4899;
    color: white;
    font-size: 0.62rem;
    line-height: 1;
    font-weight: 800;
}

.chat-message-bubble {
    max-w-[70%];
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    position: relative;
    word-break: break-word;
}
.chat-message-bubble.sent {
    background-color: rgb(var(--color-primary));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0.25rem;
}
.chat-message-bubble.received {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-message-meta {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.25rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.chat-message-bubble.received .chat-message-meta {
    justify-content: flex-start;
}

.light-mode .chat-message-bubble.received {
    background-color: rgba(0, 0, 0, 0.03);
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.03);
}
.light-mode .chat-message-bubble.received .chat-message-meta {
    color: #64748b;
}
.light-mode .chat-message-bubble.sent .chat-message-meta {
    color: rgba(255, 255, 255, 0.7);
}
.light-mode .chat-contact-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}
.light-mode .chat-contact-item.active {
    background-color: rgba(99, 102, 241, 0.08) !important;
}
.light-mode .chat-contact-item.unread {
    background: linear-gradient(90deg, rgba(219, 39, 119, 0.16), rgba(219, 39, 119, 0.04)) !important;
    border-color: rgba(219, 39, 119, 0.45) !important;
    border-left-color: #db2777 !important;
}
.light-mode .chat-contact-item.unread .chat-contact-preview {
    color: #831843 !important;
}

/* Chat Message Actions and Previews */
.chat-message-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 75%;
}
.chat-message-wrapper.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-message-wrapper.received {
    align-self: flex-start;
    flex-direction: row;
}
.chat-message-wrapper .chat-message-bubble {
    max-w: 100%;
}

.message-actions {
    display: none;
    align-items: center;
    gap: 0.35rem;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.chat-message-wrapper:hover .message-actions {
    display: flex;
}
.light-mode .message-actions {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.message-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}
.message-actions button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.light-mode .message-actions button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.chat-contact-preview {
    display: block;
    max-width: 100%;
}

/* Green Row for Fixed Feedback */
.green-row {
    background-color: rgba(34, 197, 94, 0.05) !important; /* green-500/5 */
    border-left: 3px solid rgb(34, 197, 94) !important; /* green-500 */
}
.green-row:hover {
    background-color: rgba(34, 197, 94, 0.09) !important;
}
.light-mode .green-row {
    background-color: rgba(22, 163, 74, 0.05) !important; /* green-600/5 */
    border-left: 3px solid rgb(22, 163, 74) !important; /* green-600 */
}
.light-mode .green-row:hover {
    background-color: rgba(22, 163, 74, 0.09) !important;
}
