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

:root {
    /* Core Palette - Vibrant & Premium */
    --primary-hue: 220;
    --primary-sat: 90%;
    --primary-lig: 56%;

    --ca-primary: hsl(var(--primary-hue), var(--primary-sat), var(--primary-lig));
    --ca-primary-dark: hsl(var(--primary-hue), var(--primary-sat), 40%);
    --ca-primary-light: hsl(var(--primary-hue), var(--primary-sat), 96%);

    --ca-accent: #00d4ff;
    /* Cyan for vibrant accents */
    --ca-accent-glow: rgba(0, 212, 255, 0.4);

    --ca-success: #10b981;
    --ca-warning: #f59e0b;
    --ca-danger: #ef4444;

    --ca-bg-body: #f8fafc;
    --ca-bg-surface: #ffffff;
    --ca-text-main: #0f172a;
    --ca-text-muted: #64748b;

    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --glass-blur: 12px;

    /* Bootstrap Overrides */
    --bs-primary: var(--ca-primary);
    --bs-body-bg: var(--ca-bg-body);
    --bs-body-font-family: 'Inter', sans-serif;
}

body {
    background-color: #f1f5f9;
    color: var(--ca-text-main);
    background-image:
        radial-gradient(at 0% 0%, rgba(148, 163, 184, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(96, 165, 250, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(129, 140, 248, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(203, 213, 225, 0.15) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(255, 255, 255, 0) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
    border-radius: 1.5rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: var(--ca-primary);
}

/* Navbar Modernization */
/* Navbar Modernization */
.navbar-modern {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-text {
    background: linear-gradient(135deg, var(--ca-primary) 0%, #3b82f6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
}

.navbar-brand i {
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.nav-link {
    font-weight: 500;
    color: var(--ca-text-muted) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    padding: 0.5rem 1.25rem !important;
    margin: 0 0.125rem;
    position: relative;
    overflow: hidden;
}

.nav-link:hover,
.nav-link.active {
    color: var(--ca-primary) !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    font-weight: 600;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
}

/* Dropdown Modernization */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    padding: 0.5rem;
    animation: dropdownFadeIn 0.2s ease forwards;
    margin-top: 0.5rem !important;
}

.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    font-weight: 500;
    color: var(--ca-text-muted);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--ca-primary);
    transform: translateX(4px);
}

.dropdown-divider {
    border-top-color: rgba(0, 0, 0, 0.05);
    margin: 0.5rem 0;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

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

/* Buttons */
.btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    border-radius: 0.75rem;
    padding: 0.625rem 1.25rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--ca-primary) 0%, #2563eb 100%);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    filter: brightness(1.1);
}

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

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

.animate-fade-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

/* Tables */
.table-modern {
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

/* Ensure dropdowns have space to expand */
.table-responsive {
    min-height: 600px;
    overflow-y: visible;
    padding-bottom: 10rem;
}

.table-modern thead th {
    border: none;
    background: transparent;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ca-text-muted);
    padding: 0.75rem;
}

.table-modern tbody tr {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.table-modern tbody tr:hover {
    background-color: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left-color: var(--ca-primary);
}

.table-modern td {
    border: none;
    padding: 1rem 0.75rem;
}

.table-modern td:first-child {
    border-radius: 0.75rem 0 0 0.75rem;
}

.table-modern td:last-child {
    border-radius: 0 0.75rem 0.75rem 0;
}

/* Status Badges */
.badge-modern {
    padding: 0.6em 1em;
    border-radius: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 0.9em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.badge-pending {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.badge-approved {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #6ee7b7;
}

.badge-rejected {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

/* Locker Grid */
.locker-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1.5rem;
}

.locker-slot-modern {
    aspect-ratio: 1;
    background: white;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.locker-slot-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
}

.locker-slot-modern.vacant {
    border-color: var(--ca-success);
}

.locker-slot-modern.vacant::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ca-success);
    opacity: 0.05;
}

.locker-slot-modern.occupied {
    border-color: var(--ca-text-muted);
    background: #f1f5f9;
    opacity: 0.8;
}

.locker-number {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

/* Footer */
.footer-modern {
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Landing Page Utilities */
.blur-3xl {
    filter: blur(64px);
}

.bg-clip-text {
    background: linear-gradient(135deg, var(--ca-primary) 0%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.opacity-10 {
    opacity: 0.1 !important;
}

/* Realistic Locker Styles */
.locker-grid-realistic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.locker-unit {
    aspect-ratio: 3/5;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border: 1px solid #94a3b8;
    border-radius: 4px;
    position: relative;
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.8),
        inset -2px -2px 5px rgba(0, 0, 0, 0.1),
        5px 5px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.locker-unit:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.8),
        inset -2px -2px 5px rgba(0, 0, 0, 0.1),
        10px 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Locker Vents */
.locker-vents {
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    opacity: 0.6;
}

.locker-vent {
    width: 60%;
    height: 4px;
    background: linear-gradient(to bottom, #94a3b8, #e2e8f0);
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Number Plate */
.locker-plate {
    background: linear-gradient(to bottom, #f1f5f9, #e2e8f0);
    border: 1px solid #cbd5e1;
    margin: 10px auto;
    padding: 4px 12px;
    border-radius: 2px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #475569;
    font-size: 1.1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 1);
}

/* Handle & Lock Zone */
.locker-handle-zone {
    margin-top: auto;
    margin-bottom: 20%;
    margin-right: 15%;
    align-self: flex-end;
    position: relative;
    width: 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.locker-handle {
    width: 8px;
    height: 40px;
    background: linear-gradient(to right, #cbd5e1, #94a3b8, #cbd5e1);
    border-radius: 4px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Padlock */
.locker-padlock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -20%);
    font-size: 1.5rem;
    filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.locker-unit:hover .locker-padlock {
    transform: translate(-50%, -20%) rotate(5deg);
}

/* Status Colors */
.locker-unit.occupied {
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
}

.locker-unit.occupied .locker-padlock {
    color: #ef4444;
    /* Red lock */
}

.locker-unit.vacant {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.locker-unit.vacant .locker-padlock {
    color: #10b981;
    /* Green open lock */
    opacity: 0.7;
}

/* Occupant Tag */
.locker-occupant {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: #334155;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    backdrop-filter: blur(4px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.locker-unit:hover .locker-occupant {
    transform: translateY(0);
}

/* Calendar View */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    overflow: hidden;
    min-width: 700px;
    /* Ensure it doesn't get too squashed */
}

/* Container for scrolling */
#view-calendar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar-header {
    background: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--ca-text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 0.5rem;
    position: relative;
    transition: background 0.2s ease;
}

.calendar-day:hover {
    background: #f8fafc;
}

.calendar-day.other-month {
    background: #f1f5f9;
    color: #cbd5e1;
}

.calendar-day.today {
    background: #eff6ff;
}

.day-number {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--ca-text-muted);
}

.calendar-day.today .day-number {
    color: var(--ca-primary);
}

.calendar-event {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.calendar-event:hover {
    transform: scale(1.02);
    z-index: 2;
}

.event-approved {
    background: #ecfdf5;
    color: #047857;
    border-left: 2px solid #10b981;
}

.event-pending {
    background: #fffbeb;
    color: #b45309;
    border-left: 2px solid #f59e0b;
}

.event-rejected {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 2px solid #ef4444;
}

/* Digital Ticket */
.digital-ticket {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
    position: relative;
    max-width: 400px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ticket-header {
    background: linear-gradient(135deg, var(--ca-primary) 0%, #2563eb 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.ticket-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: radial-gradient(circle, transparent 10px, white 11px);
    background-size: 30px 40px;
    background-position: center bottom;
}

.ticket-body {
    padding: 2rem 1.5rem;
    text-align: center;
}

.ticket-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ca-text-muted);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.ticket-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ca-text-main);
    margin-bottom: 1.25rem;
    font-family: 'Outfit', sans-serif;
}

.ticket-qr {
    width: 120px;
    height: 120px;
    background: #f1f5f9;
    margin: 0 auto 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.ticket-footer {
    background: #f8fafc;
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--ca-text-muted);
    border-top: 2px dashed #e2e8f0;
}

@media print {
    body * {
        visibility: hidden;
    }

    .digital-ticket,
    .digital-ticket * {
        visibility: visible;
    }

    .digital-ticket {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Modern File Upload */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.file-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--ca-primary);
    background: rgba(59, 130, 246, 0.05);
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.file-upload-content {
    pointer-events: none;
}

.file-upload-icon {
    font-size: 2rem;
    color: var(--ca-text-muted);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.file-upload-zone:hover .file-upload-icon {
    color: var(--ca-primary);
}

.file-upload-text {
    font-weight: 500;
    color: var(--ca-text-main);
    margin-bottom: 0.25rem;
}

.file-upload-hint {
    font-size: 0.75rem;
    color: var(--ca-text-muted);
}

.file-preview {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.file-preview.active {
    display: flex;
}

.file-preview-icon {
    font-size: 1.25rem;
    color: var(--ca-primary);
}

.file-preview-info {
    flex: 1;
    overflow: hidden;
}

.file-preview-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-size: 0.75rem;
    color: var(--ca-text-muted);
}

.file-preview-remove {
    color: var(--ca-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.file-preview-remove:hover {
    background: #fee2e2;
    color: #ef4444;
}