/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 0.375rem;
}

::selection {
    background-color: #dbeafe;
    color: #1e40af;
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Layout Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.grid { display: grid; }
.block { display: block; }
.inline-flex { display: inline-flex; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }

.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }

/* Spacing */
.gap-1 { gap: 0.25rem; }
.gap-1-5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2-5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-1-5 > * + * { margin-top: 0.375rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-2-5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3-5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1-5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2-5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.pl-10 { padding-left: 2.5rem; }
.pr-4 { padding-right: 1rem; }
.pb-1 { padding-bottom: 0.25rem; }

.m-0 { margin: 0; }
.mt-0-5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mr-3 { margin-right: 0.75rem; }
.ml-auto { margin-left: auto; }

/* Sizing */
.w-full { width: 100%; }
.w-1-5 { width: 0.375rem; }
.w-3 { width: 0.75rem; }
.w-3-5 { width: 0.875rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-7 { width: 1.75rem; }
.w-8 { width: 2rem; }
.w-2-5 { width: 0.625rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-7xl { max-width: 80rem; }
.min-w-0 { min-width: 0; }

.h-1-5 { height: 0.375rem; }
.h-3 { height: 0.75rem; }
.h-3-5 { height: 0.875rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-7 { height: 1.75rem; }
.h-8 { height: 2rem; }
.h-2-5 { height: 0.625rem; }
.min-h-90px { min-height: 90px; }
.min-h-100px { min-height: 100px; }
.min-h-screen { min-height: 100vh; }
.max-h-90vh { max-height: 90vh; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.left-3 { left: 0.75rem; }
.top-1-2 { top: 50%; }
.-translate-y-1-2 { transform: translateY(-50%); }
.-translate-y-0-5 { transform: translateY(-0.125rem); }
.translate-x-0-5 { transform: translateX(0.125rem); }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }

/* Typography */
.text-10px { font-size: 10px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-white { color: #ffffff; }
.text-blue-600 { color: #2563eb; }
.text-emerald-700 { color: #047857; }
.text-red-600 { color: #dc2626; }
.text-emerald-600 { color: #059669; }
.text-emerald-950 { color: #022c22; }
.text-red-950 { color: #450a0a; }
.text-gray-800 { color: #1f2937; }

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }

.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.line-clamp-4 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.break-words { word-wrap: break-word; overflow-wrap: break-word; }
.italic { font-style: italic; }

/* Background */
.bg-transparent { background-color: transparent; }
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-500 { background-color: #6b7280; }
.bg-gray-700 { background-color: #374151; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-emerald-200 { background-color: #a7f3d0; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-200 { background-color: #fecaca; }
.bg-red-500 { background-color: #ef4444; }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-500 { background-color: #3b82f6; }

.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); }

.from-white { --tw-gradient-from: #ffffff; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)); }
.from-gray-50 { --tw-gradient-from: #f9fafb; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(249, 250, 251, 0)); }
.from-gray-900 { --tw-gradient-from: #111827; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(17, 24, 39, 0)); }
.from-gray-800 { --tw-gradient-from: #1f2937; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(31, 41, 55, 0)); }
.from-gray-100 { --tw-gradient-from: #f3f4f6; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(243, 244, 246, 0)); }
.from-emerald-50 { --tw-gradient-from: #ecfdf5; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(236, 253, 245, 0)); }
.from-emerald-100 { --tw-gradient-from: #d1fae5; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(209, 250, 229, 0)); }
.from-emerald-500 { --tw-gradient-from: #10b981; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(16, 185, 129, 0)); }
.from-red-50 { --tw-gradient-from: #fef2f2; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(254, 242, 242, 0)); }
.from-red-100 { --tw-gradient-from: #fee2e2; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(254, 226, 226, 0)); }
.from-red-500 { --tw-gradient-from: #ef4444; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 68, 68, 0)); }

.to-gray-50 { --tw-gradient-to: #f9fafb; }
.to-gray-50-80 { --tw-gradient-to: rgba(249, 250, 251, 0.8); }
.to-gray-900 { --tw-gradient-to: #111827; }
.to-gray-800 { --tw-gradient-to: #1f2937; }
.to-gray-700 { --tw-gradient-to: #374151; }
.to-gray-200 { --tw-gradient-to: #e5e7eb; }
.to-emerald-100-50 { --tw-gradient-to: rgba(209, 250, 229, 0.5); }
.to-emerald-200 { --tw-gradient-to: #a7f3d0; }
.to-emerald-600 { --tw-gradient-to: #059669; }
.to-red-100-50 { --tw-gradient-to: rgba(254, 226, 226, 0.5); }
.to-red-200 { --tw-gradient-to: #fecaca; }
.to-red-600 { --tw-gradient-to: #dc2626; }

.via-gray-800 { --tw-gradient-stops: var(--tw-gradient-from), #1f2937, var(--tw-gradient-to, rgba(31, 41, 55, 0)); }

.bg-clip-text { -webkit-background-clip: text; background-clip: text; }
.text-transparent { color: transparent; }

/* Borders */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }

.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-emerald-300 { border-color: #6ee7b7; }
.border-red-100 { border-color: #fee2e2; }
.border-red-200 { border-color: #fecaca; }
.border-red-300 { border-color: #fca5a5; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-md { border-radius: 0.375rem; }

/* Consistent button styles - no borders for primary actions */
button {
    border: none;
}

/* Navigation arrow buttons */
#prevMonthBtn, #nextMonthBtn, #prevWeekBtn, #nextWeekBtn {
    border: 1px solid #e5e7eb;
}

/* Admin button group - no borders */
#loginBtn, #logoutBtn {
    border: none;
}

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.shadow-blue-500-50 { box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); }

/* Ring */
.ring-2 { box-shadow: 0 0 0 2px var(--tw-ring-color); }
.ring-emerald-200 { --tw-ring-color: #a7f3d0; }
.ring-emerald-500 { --tw-ring-color: #10b981; }
.ring-red-200 { --tw-ring-color: #fecaca; }
.ring-red-500 { --tw-ring-color: #ef4444; }
.ring-gray-400 { --tw-ring-color: #9ca3af; }
.ring-blue-200 { --tw-ring-color: #bfdbfe; }
.ring-blue-500 { --tw-ring-color: #3b82f6; }
.ring-offset-2 { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--tw-ring-color); }

/* Effects */
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.resize-none { resize: none; }

/* Opacity */
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-100 { opacity: 1; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.touch-manipulation { touch-action: manipulation; }

/* Transitions */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

/* Special modifiers for backgrounds */
.bg-black-20 { background-color: rgba(0, 0, 0, 0.2); }

/* Outline */
.outline-none { outline: none; }

/* Custom placeholder color */
.placeholder-gray-400::placeholder { color: #9ca3af; }

/* Focus styles */
.focus-ring-2:focus { box-shadow: 0 0 0 2px #3b82f6; }
.focus-ring-blue-500:focus { --tw-ring-color: #3b82f6; box-shadow: 0 0 0 2px var(--tw-ring-color); }
.focus-border-blue-500:focus { border-color: #3b82f6; }

/* Hover states */
.hover-bg-white:hover { background-color: #ffffff; }
.hover-bg-gray-50:hover { background-color: #f9fafb; }
.hover-bg-gray-100:hover { background-color: #f3f4f6; }
.hover-bg-emerald-200:hover { background-color: #a7f3d0; }
.hover-bg-red-200:hover { background-color: #fecaca; }
.hover-bg-blue-700:hover { background-color: #1d4ed8; }
.hover-bg-gray-800:hover { background-color: #1f2937; }

.hover-text-gray-600:hover { color: #4b5563; }
.hover-text-gray-900:hover { color: #111827; }

.hover-shadow-sm:hover { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.hover-shadow-md:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.hover-shadow-lg:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }

.hover-from-gray-800:hover { --tw-gradient-from: #1f2937; }
.hover-to-gray-700:hover { --tw-gradient-to: #374151; }

.hover-border-gray-300:hover { border-color: #d1d5db; }
.hover-border-gray-400:hover { border-color: #9ca3af; }

/* Active states */
.active-scale-90:active { transform: scale(0.9); }
.active-scale-95:active { transform: scale(0.95); }

/* Group hover */
.group:hover .group-hover-scale-110 { transform: scale(1.1); }
.group:hover .group-hover-opacity-100 { opacity: 1; }
.group:hover .group-hover-text-gray-600 { color: #4b5563; }
.group:hover .group-hover-translate-x-0-5 { transform: translateX(0.125rem); }
.group:hover .group-hover--translate-y-1 { transform: translateY(-0.25rem); }
.group:hover .group-hover-scale-105 { transform: scale(1.05); }

/* Status-specific styles */
.status-available {
    background: linear-gradient(to bottom right, #d1fae5, rgba(209, 250, 229, 0.5));
    border-color: #a7f3d0;
}

.status-unavailable {
    background: linear-gradient(to bottom right, #fee2e2, rgba(254, 226, 226, 0.5));
    border-color: #fecaca;
}

.status-unknown {
    background-color: #ffffff;
    border-color: #e5e7eb;
}

/* Font styles */
.font-sans { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* Mobile-first responsive utilities */
@media (min-width: 640px) {
    .sm-hidden { display: none !important; }
    .sm-block { display: block !important; }
    .sm-flex { display: flex; }
    .sm-flex-row { flex-direction: row; }
    .sm-items-baseline { align-items: baseline; }
    .sm-justify-end { justify-content: flex-end; }
    .sm-w-auto { width: auto; }
    .sm-w-4 { width: 1rem; }
    .sm-w-5 { width: 1.25rem; }
    .sm-w-6 { width: 1.5rem; }
    .sm-w-8 { width: 2rem; }
    .sm-w-9 { width: 2.25rem; }
    .sm-h-4 { height: 1rem; }
    .sm-h-5 { height: 1.25rem; }
    .sm-h-6 { height: 1.5rem; }
    .sm-h-8 { height: 2rem; }
    .sm-h-9 { height: 2.25rem; }
    .sm-min-h-100px { min-height: 100px; }
    .sm-gap-2 { gap: 0.5rem; }
    .sm-gap-3 { gap: 0.75rem; }
    .sm-gap-4 { gap: 1rem; }
    .sm-gap-8 { gap: 2rem; }
    .sm-space-y-5 > * + * { margin-top: 1.25rem; }
    .sm-space-y-8 > * + * { margin-top: 2rem; }
    .sm-p-2 { padding: 0.5rem; }
    .sm-p-2-5 { padding: 0.625rem; }
    .sm-p-4 { padding: 1rem; }
    .sm-p-6 { padding: 1.5rem; }
    .sm-px-4 { padding-left: 1rem; padding-right: 1rem; }
    .sm-px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
    .sm-px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm-py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .sm-py-2-5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
    .sm-py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
    .sm-py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
    .sm-py-8 { padding-top: 2rem; padding-bottom: 2rem; }
    .sm-mb-4 { margin-bottom: 1rem; }
    .sm-text-xs { font-size: 0.75rem; line-height: 1rem; }
    .sm-text-sm { font-size: 0.875rem; line-height: 1.25rem; }
    .sm-text-base { font-size: 1rem; line-height: 1.5rem; }
    .sm-text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .sm-text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .sm-text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .sm-rounded-xl { border-radius: 0.75rem; }
    .sm-line-clamp-4 {
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
    }
    .sm-hover--translate-y-1:hover { transform: translateY(-0.25rem); }
}

@media (min-width: 768px) {
    .md-hidden { display: none !important; }
    .md-block { display: block; }
    .md-text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md-min-h-120px { min-height: 120px; }

    /* Show month grid on desktop, hide week view */
    #monthGrid { display: block !important; }
    #weekView { display: none !important; }
}

@media (min-width: 1024px) {
    .lg-px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Custom utility for React-like day cells */
.day-cell {
    min-height: 90px;
    transition: all 0.2s ease-out;
}

.day-cell.current-month {
    opacity: 1;
}

.day-cell.other-month {
    opacity: 0.4;
    background-color: #f9fafb;
}

.day-cell.past-day {
    opacity: 0.5;
    background-color: #f3f4f6;
}

.day-cell.admin-mode:hover {
    z-index: 10;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Input styling */
input, textarea {
    font-size: 16px; /* Prevents zoom on mobile Safari */
}

/* Mobile specific adjustments */
@media (max-width: 767px) {
    .min-h-90px { min-height: 90px; }
    .text-10px { font-size: 10px; }

    /* Ensure buttons are easily tappable */
    button {
        min-height: 44px;
    }

    /* Show week view on mobile, hide month grid */
    #weekView { display: block !important; }
    #monthGrid { display: none !important; }
}

/* Ensure toggle switch and login button are exactly same height */
#loginBtn, #logoutBtn {
    min-height: 44px;
    height: 44px;
}

.toggle-switch {
    height: 44px;
}

/* ============================================
   LOADING SCREEN
   ============================================ */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

.loader {
    width: 3rem;
    height: 3rem;
    clear: both;
    margin: 1rem auto;
    border: 2px #374151 solid;
    border-radius: 100%;
    overflow: hidden;
    position: relative;
}

.loader:after,
.loader:before {
    content: "";
    border-radius: 50%;
    position: absolute;
    width: inherit;
    height: inherit;
    animation: spVortex 2s infinite linear;
}

.loader:before {
    border-top: 0.5rem #374151 solid;
    top: -0.1875rem;
    left: calc(-50% - 0.1875rem);
    transform-origin: right center;
}

.loader:after {
    border-bottom: 0.5rem #374151 solid;
    top: 0.1875rem;
    right: calc(-50% - 0.1875rem);
    transform-origin: left center;
}

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

/* Dark mode - Loading screen */
body.dark-mode .loading-screen {
    background-color: #0f0f0f;
}

body.dark-mode .loading-text {
    color: #9ca3af;
}

body.dark-mode .loader {
    border-color: #e5e7eb;
}

body.dark-mode .loader:before {
    border-top-color: #e5e7eb;
}

body.dark-mode .loader:after {
    border-bottom-color: #e5e7eb;
}

/* Ensure proper stacking of modals */
#loginModal, #editModal {
    backdrop-filter: blur(4px);
}

/* Selected status option styles */
.status-option.selected {
    background-color: #f9fafb !important;
}

.status-option.selected[data-status="available"] {
    background-color: #d1fae5 !important;
    border-color: #6ee7b7 !important;
    box-shadow: 0 0 0 2px #10b981;
}

.status-option.selected[data-status="available"] .status-icon {
    background-color: #a7f3d0 !important;
    color: #047857 !important;
}

.status-option.selected[data-status="available"] span {
    color: #111827 !important;
}

.status-option.selected[data-status="unavailable"] {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
    box-shadow: 0 0 0 2px #ef4444;
}

.status-option.selected[data-status="unavailable"] .status-icon {
    background-color: #fecaca !important;
    color: #991b1b !important;
}

.status-option.selected[data-status="unavailable"] span {
    color: #111827 !important;
}

.status-option.selected[data-status="unknown"] {
    background-color: #f9fafb !important;
    border-color: #d1d5db !important;
    box-shadow: 0 0 0 2px #9ca3af;
}

.status-option.selected[data-status="unknown"] .status-icon {
    background-color: #e5e7eb !important;
    color: #4b5563 !important;
}

.status-option.selected[data-status="unknown"] span {
    color: #111827 !important;
}

.status-option.selected .status-check {
    display: block !important;
}

/* Mx-auto class */
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   THEME TOGGLE SWITCH
   ============================================ */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 44px;
    display: flex;
    align-items: center;
    --light: #d8dbe0;
    --dark: #28292c;
    --link: rgb(27, 129, 112);
    --link-hover: rgb(24, 94, 82);
}

.switch-label {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: var(--dark);
    border-radius: 15px;
    cursor: pointer;
    border: 2px solid var(--dark);
    display: block;
}

.checkbox {
    position: absolute;
    display: none;
}

.slider {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    -webkit-transition: 0.3s;
    transition: 0.3s;
}

.checkbox:checked ~ .slider {
    background-color: var(--light);
}

.slider::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    -webkit-box-shadow: inset 8px -3px 0px 0px var(--light);
    box-shadow: inset 8px -3px 0px 0px var(--light);
    background-color: var(--dark);
    -webkit-transition: 0.3s;
    transition: 0.3s;
}

.checkbox:checked ~ .slider::before {
    -webkit-transform: translateX(30px);
    -ms-transform: translateX(30px);
    transform: translateX(30px);
    background-color: var(--dark);
    -webkit-box-shadow: none;
    box-shadow: none;
}

/* ============================================
   DARK MODE STYLES - LIGHTER DARK THEME
   ============================================ */
body.dark-mode {
    background-color: #0f0f0f;
    color: #e5e7eb;
}

/* Dark mode - App container */
body.dark-mode #app {
    background-color: #0f0f0f;
    color: #e5e7eb;
}

/* Dark mode - Header */
body.dark-mode header {
    background: #0f0f0f;
    border-bottom-color: #2a2a2a;
}

body.dark-mode #monthName {
    background: linear-gradient(to right, #ffffff, #e5e7eb, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.dark-mode #yearName {
    color: #9ca3af;
}

/* Dark mode - Buttons */
body.dark-mode button {
    color: #9ca3af;
}

body.dark-mode button:hover {
    color: #e5e7eb;
    background-color: #2a2a2a;
}

body.dark-mode .hover-bg-white:hover {
    background-color: #2a2a2a;
}

body.dark-mode #loginBtn {
    background: #1f1f1f;
    color: #e5e7eb;
    border: 1px solid #3a3a3a;
}

body.dark-mode #loginBtn:hover {
    background: #2a2a2a;
    border-color: #4a4a4a;
}

body.dark-mode #logoutBtn {
    background-color: #1f1f1f;
    color: #e5e7eb;
    border: 1px solid #3a3a3a;
}

body.dark-mode #logoutBtn:hover {
    background-color: #2a2a2a;
}

/* Dark mode - Cards and containers */
body.dark-mode .bg-white {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .bg-gray-50 {
    background-color: #0f0f0f;
}

body.dark-mode .bg-gray-100 {
    background-color: #1a1a1a;
}

body.dark-mode .border-gray-200 {
    border-color: #2a2a2a;
}

body.dark-mode .border-gray-100 {
    border-color: #2a2a2a;
}

/* Dark mode - Calendar grid */
body.dark-mode #monthGrid {
    background-color: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .day-cell {
    border-color: #2a2a2a;
    background-color: #1a1a1a;
}

body.dark-mode .day-cell.other-month {
    background-color: #121212;
    opacity: 0.4;
}

body.dark-mode .day-cell.past-day {
    opacity: 0.4;
    background-color: #121212;
}

body.dark-mode .text-gray-900 {
    color: #e5e7eb;
}

body.dark-mode .text-gray-800 {
    color: #d1d5db;
}

body.dark-mode .text-gray-700 {
    color: #9ca3af;
}

body.dark-mode .text-gray-600 {
    color: #6b7280;
}

body.dark-mode .text-gray-500 {
    color: #6b7280;
}

body.dark-mode .text-gray-400 {
    color: #4b5563;
}

/* Dark mode - Week view */
body.dark-mode #weekView .bg-gradient-to-br {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

/* Dark mode - Modals */
body.dark-mode #loginModal .bg-white,
body.dark-mode #editModal .bg-white {
    background-color: #1a1a1a;
}

body.dark-mode #loginModal input,
body.dark-mode #editModal input,
body.dark-mode #loginModal textarea,
body.dark-mode #editModal textarea {
    background-color: #0f0f0f;
    border-color: #2a2a2a;
    color: #e5e7eb;
}

body.dark-mode #loginModal input::placeholder,
body.dark-mode #editModal textarea::placeholder {
    color: #6b7280;
}

body.dark-mode #loginModal .text-gray-900,
body.dark-mode #editModal .text-gray-900 {
    color: #e5e7eb;
}

body.dark-mode #loginModal .text-gray-700,
body.dark-mode #editModal .text-gray-700 {
    color: #9ca3af;
}

body.dark-mode #loginModal .text-gray-500,
body.dark-mode #editModal .text-gray-500 {
    color: #6b7280;
}

body.dark-mode #cancelLoginBtn,
body.dark-mode #cancelEditBtn {
    background-color: #1f1f1f;
    color: #e5e7eb;
    border: 1px solid #3a3a3a;
}

body.dark-mode #cancelLoginBtn:hover,
body.dark-mode #cancelEditBtn:hover {
    background-color: #2a2a2a;
}

/* Dark mode - Status badges - VIBRANT COLORS */
body.dark-mode .status-available {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

body.dark-mode .status-unavailable {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

body.dark-mode .status-unknown {
    background-color: #1a1a1a;
    border-color: #3a3a3a;
}

/* Dark mode - Status options in edit modal */
body.dark-mode .status-option {
    background-color: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .status-option:hover {
    background-color: #1f1f1f;
    border-color: #3a3a3a;
}

body.dark-mode .status-option .status-icon {
    background-color: #2a2a2a;
    color: #6b7280;
}

body.dark-mode .status-option.selected[data-status="available"] {
    background-color: rgba(34, 197, 94, 0.15) !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 1px #22c55e;
}

body.dark-mode .status-option.selected[data-status="available"] .status-icon {
    background-color: rgba(34, 197, 94, 0.2) !important;
    color: #22c55e !important;
}

body.dark-mode .status-option.selected[data-status="available"] span {
    color: #e5e7eb !important;
}

body.dark-mode .status-option.selected[data-status="unavailable"] {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444;
}

body.dark-mode .status-option.selected[data-status="unavailable"] .status-icon {
    background-color: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

body.dark-mode .status-option.selected[data-status="unavailable"] span {
    color: #e5e7eb !important;
}

body.dark-mode .status-option.selected[data-status="unknown"] {
    background-color: #1f1f1f !important;
    border-color: #6b7280 !important;
    box-shadow: 0 0 0 1px #6b7280;
}

body.dark-mode .status-option.selected[data-status="unknown"] .status-icon {
    background-color: #2a2a2a !important;
    color: #9ca3af !important;
}

body.dark-mode .status-option.selected[data-status="unknown"] span {
    color: #e5e7eb !important;
}

/* Dark mode - Admin badge */
body.dark-mode #adminBadge .bg-gradient-to-r {
    background: rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
    color: #22c55e;
}

/* Dark mode - Legend */
body.dark-mode .legend-item .text-gray-700 {
    color: #9ca3af;
}

body.dark-mode .legend-item .text-gray-500 {
    color: #6b7280;
}

/* Dark mode - Statusforklaring section */
body.dark-mode .bg-gradient-to-br {
    background: #1a1a1a !important;
    border: 1px solid #2a2a2a;
}

/* Dark mode - Status indicators in legend */
body.dark-mode .text-emerald-700 {
    color: #22c55e;
}

body.dark-mode .text-emerald-600 {
    color: #22c55e;
}

body.dark-mode .text-emerald-950 {
    color: #22c55e;
}

body.dark-mode .text-red-600 {
    color: #ef4444;
}

body.dark-mode .text-red-950 {
    color: #ef4444;
}

body.dark-mode .bg-emerald-100 {
    background-color: rgba(34, 197, 94, 0.15);
}

body.dark-mode .bg-emerald-200 {
    background-color: rgba(34, 197, 94, 0.2);
}

body.dark-mode .bg-red-50 {
    background-color: rgba(239, 68, 68, 0.1);
}

body.dark-mode .bg-red-100 {
    background-color: rgba(239, 68, 68, 0.15);
}

body.dark-mode .bg-red-200 {
    background-color: rgba(239, 68, 68, 0.2);
}

body.dark-mode .border-emerald-200 {
    border-color: #22c55e;
}

body.dark-mode .border-red-100 {
    border-color: #ef4444;
}

/* ============================================
   HAMBURGER MENU STYLES
   ============================================ */
.hamburger {
    cursor: pointer;
    z-index: 10;
}

.hamburger input {
    display: none;
}

.hamburger svg {
    height: 2.5em;
    transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line {
    fill: none;
    stroke: #1f2937;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
    stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1),
    stroke 300ms ease;
}

.line-top-bottom {
    stroke-dasharray: 12 63;
}

.hamburger input:checked + svg {
    transform: rotate(-45deg);
}

.hamburger input:checked + svg .line-top-bottom {
    stroke-dasharray: 20 300;
    stroke-dashoffset: -32.42;
}

/* Dark mode hamburger menu */
body.dark-mode .line {
    stroke: #f3f4f6;
}

/* Dark mode mobile header */
body.dark-mode #mobileHeader {
    background: linear-gradient(to bottom, #1f2937, rgba(31, 41, 55, 0.8));
    border-color: #374151;
}

body.dark-mode #mobileMonthName {
    background: linear-gradient(to right, #f3f4f6, #e5e7eb, #f3f4f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}