/* ENH-20: Premium Aesthetic (Freyja Inspired) */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Lato:wght@300;400;500&display=swap');

:root {
    /* Palette: Fresh & Clean (Celeste + White) */
    --primary: #00A8E8;
    /* Cerulean/Celeste */
    --primary-hover: #0090C8;
    /* Darker Celeste for hover */
    --primary-light: #E0F2FE;
    /* Light Sky Blue for backgrounds */
    --primary-dark: #0284C7;
    /* Deep Blue for text/borders */

    --secondary: #334155;
    /* Slate 700 - Neutral Dark for Text */
    --secondary-light: #94A3B8;
    /* Slate 400 */

    --accent: #00A8E8;
    /* Same as primary for consistency */

    --background: #FFFFFF;
    /* Pure White */
    --surface: #F8FAFC;
    /* Slate 50 - Very light gray for panels */
    --border: #E2E8F0;
    /* Slate 200 - Subtle borders */

    --text: #1E293B;
    /* Slate 800 - Main text */
    --text-light: #64748B;
    /* Slate 500 - Secondary text */
    --text-main: #1E293B;

    --bg-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    /* Kept for elegance, but can be switched if requested */
    --font-body: 'Lato', sans-serif;

    /* Spacing & roundedness */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    /* Softer corners for friendly feel */

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 168, 232, 0.1);
    /* Subtle blue-tinted shadow */
    --shadow-lg: 0 10px 15px -3px rgba(0, 168, 232, 0.1);

    --container-width: 1200px;
    --nav-height: 80px;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h3,
h4 {
    font-family: var(--font-heading);
    color: var(--secondary);
    font-weight: 700;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-btn {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-btn:hover {
    color: var(--primary);
}

.nav-btn.secondary {
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: var(--primary-hover);
    color: #fff;
}

/* Featured Reservation Button - Clean Style */
.nav-links .btn-primary {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: var(--shadow-md) !important;
    border: none !important;
}

.nav-links .btn-primary:hover {
    background: var(--primary-hover) !important;
    color: white !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: calc(100vh - var(--nav-height));
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    width: 50%;
    padding-right: 4rem;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-image {
    position: absolute;
    right: 0;
    top: 0;
    width: 45%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    border-bottom-left-radius: 80px;
}

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

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

/* Services */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* Booking Form */
.booking-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.time-slot {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.time-slot.selected {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.time-slot:hover:not(.selected) {
    background-color: var(--accent);
}

.time-slot.disabled {
    background-color: #f5f5f5;
    color: #a3a3a3;
    cursor: not-allowed;
    border-color: #e5e5e5;
    text-decoration: line-through;
    opacity: 0.7;
}

.time-slot.disabled:hover {
    background-color: #f5f5f5;
    border-color: #e5e5e5;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: var(--surface);
    color: var(--text-main);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-light);
}

/* Utilities */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: white;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        border-top: 1px solid #f1f1f1;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        flex-direction: column-reverse;
        height: auto;
        padding: 4rem 0;
    }

    .hero-content {
        width: 100%;
        padding: 0;
        text-align: center;
    }

    .hero-image {
        position: relative;
        width: 100%;
        height: 300px;
        margin-bottom: 2rem;
        border-radius: var(--radius-lg);
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

/* Modal & Toast Styles (ENH-04) */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Service Detail (ENH-02) */
.detail-header {
    background: var(--primary);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.benefit-list {
    list-style: none;
    margin: 1.5rem 0;
}

.benefit-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.benefit-list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
}

/* Edit Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

/* Login Styles (ENH-10) */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header h2 {
    color: var(--secondary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* UI Enhancements */

/* ENH-12: Secondary Button */
.btn-secondary {
    background-color: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    /* margin-left: 1rem; Removed to fix alignment when used alone */
}

.btn-secondary:hover {
    background-color: var(--secondary);
    color: #000;
    /* Fix contrast: Black text on Gold background is better than White on Gold */
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ENH-13: WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Move Toast to Center Bottom to avoid overlap */
.toast {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    bottom: 2rem;
}

/* ENH-15: Service Tabs */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s;
    font-family: var(--font-body);
    font-size: 1.1rem;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

/* ENH-21: Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.confirmado {
    background: #e6fffa;
    color: #047857;
}

.status-badge.cancelado {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.completado {
    background: #e0f2fe;
    color: #075985;
}

/* Professional Image */
.prof-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ENH-22: Calendar View */
.view-toggle {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
}

.view-toggle button {
    padding: 6px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    color: #64748b;
    font-weight: 500;
}

.view-toggle button.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.calendar-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-icon {
    background: transparent;
    border: 1px solid #e2e8f0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.btn-icon:hover {
    background: #f8fafc;
    color: var(--primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
}

.calendar-day {
    min-height: 100px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 0.5rem;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

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

.calendar-day.empty {
    background: #fcfcfc;
    pointer-events: none;
}

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

.day-number {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.day-indicators {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot.plus {
    background: transparent;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 8px;
    margin-left: 2px;
}

/* Enhancements based on Implementation Plan */

/* 1. Filter Bar Enhancements */
.filters-bar {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 2rem;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: flex-end; 
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.filters-bar:hover {
    box-shadow: 0 8px 30px rgba(0, 168, 232, 0.08);
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--secondary-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--bg-white);
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.filter-select:hover {
    border-color: var(--primary-light);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.15);
}

.btn-filter-clear {
    height: 42px;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-filter-clear:hover {
    background: #f1f5f9;
    color: #ef4444; /* Soft red for clear action */
    border-color: #fca5a5;
}

/* 2. Calendar Enhancements */
.calendar-grid {
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden; /* So borders curve with the grid */
}

.calendar-day {
    min-height: 120px; /* Taller cells for more air */
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 0.75rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.calendar-day:hover {
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px var(--primary-light);
}

.calendar-day.empty {
    background: #f8fafc;
    opacity: 0.5;
    pointer-events: none;
}

.calendar-day.today {
    background: #f0f9ff;
    box-shadow: inset 0 0 0 2px var(--primary); /* Stronger highlight for today */
}

.calendar-day.today .day-number {
    color: var(--primary);
    font-weight: 800;
}

.day-number {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    display: inline-block;
}

/* Enhanced Booking Pills */
.day-booking-pill {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.2s, box-shadow 0.2s;
}

.day-booking-pill:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.day-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 6px;
    text-align: center;
    background: var(--primary-light);
    border-radius: 12px;
    padding: 2px 0;
}

/* Infinite Scroll Loader */
.loader-container {
    display: flex;
    justify-content: center;
    padding: 2rem;
    width: 100%;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-light);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Admin Sidebar Styles */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --sidebar-bg: #FFFFFF;
    --sidebar-text: #1E293B;
    --sidebar-accent: #00A8E8;
    --sidebar-hover: #E0F2FE;
    --transition-speed: 0.3s;
}

body.admin-mode {
    padding-left: var(--sidebar-width);
    transition: padding-left var(--transition-speed);
}

body.admin-mode.sidebar-collapsed {
    padding-left: var(--sidebar-collapsed-width);
}

/* Hide top navbar in admin mode if desired, or adjust it */
body.admin-mode .navbar {
    display: none;
    /* We will replace it with sidebar navigation */
}

/* If we want to keep a top header for admin, we can style a separate one or reuse navbar with adjustments. 
   For now, we'll assume sidebar takes over navigation duties. */

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    transition: width var(--transition-speed);
    z-index: 1001;
    overflow-x: hidden;
}

.admin-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: 80px;
    /* Match nav height */
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    justify-content: space-between;
}

.sidebar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--sidebar-accent);
    font-weight: 700;
    text-decoration: none;
    opacity: 1;
    transition: opacity var(--transition-speed);
}

.admin-sidebar.collapsed .sidebar-brand {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #a3a3a3;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: white;
}

.sidebar-link.active {
    background: var(--sidebar-hover);
    color: var(--sidebar-accent);
    border-left-color: var(--sidebar-accent);
}

.sidebar-link i,
.sidebar-link svg {
    margin-right: 1rem;
    min-width: 24px;
}

.admin-sidebar.collapsed .sidebar-link {
    padding: 0.75rem 0;
    justify-content: center;
}

.admin-sidebar.collapsed .sidebar-link span {
    display: none;
}

.admin-sidebar.collapsed .sidebar-link i,
.admin-sidebar.collapsed .sidebar-link svg {
    margin-right: 0;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sidebar-accent);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-speed);
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.user-role {
    font-size: 0.75rem;
    color: #888;
}

.admin-sidebar.collapsed .user-info {
    opacity: 0;
    display: none;
}

.admin-sidebar.collapsed .sidebar-footer {
    padding: 1.5rem 0.5rem;
    display: flex;
    justify-content: center;
}

/* Sidebar Recovery */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
}

#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--bg-white);
    color: var(--text);
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    border-right: 1px solid var(--border);
}

#sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

#sidebar .sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
}

#sidebar .logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
}

#sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-nav-item i {
    min-width: 24px;
    margin-right: 1rem;
}

#sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
    padding: 0.75rem 0;
}

#sidebar.collapsed .sidebar-nav-item i {
    margin-right: 0;
}

#sidebar.collapsed .sidebar-nav-item span {
    display: none;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar.collapsed .sidebar-footer {
    padding: 1rem;
    text-align: center;
}

.collapse-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collapse-btn:hover {
    color: var(--primary);
}

/* Auth Layout Adjustment */
body.with-sidebar {
    padding-left: var(--sidebar-width);
    transition: padding-left 0.3s ease;
}

body.with-sidebar.sidebar-collapsed {
    padding-left: var(--sidebar-collapsed-width);
}

/* Hide Navbar when sidebar is active */
body.with-sidebar .navbar {
    display: none;
}