@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;700&display=swap');

:root {
    --primary-color: #d4a373;
    /* Champagne/Gold */
    --secondary-color: #faedcd;
    /* Beige */
    --dark-color: #1a1a1a;
    --accent-color: #ccd5ae;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --sidebar-width: 280px;
    --bg-gradient: linear-gradient(135deg, #fefae0 0%, #faedcd 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--dark-color);
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
.premium-font {
    font-family: 'Playfair Display', serif;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Sidebar Styling */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 2rem 1.5rem;
    transition: all 0.3s;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for sidebar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: #c49363;
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background: var(--primary-color);
    color: var(--dark-color);
    font-weight: 600;
}

#sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

/* Topbar */
#topbar {
    margin-left: var(--sidebar-width);
    padding: 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* Main Content Area */
#main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: calc(100vh - 70px);
}

/* Auth Pages */
.auth-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('https://images.unsplash.com/photo-1560066984-138dadb4c035?q=80&w=2074&auto=format&fit=crop') center/cover no-repeat;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 3rem;
}

/* Premium Buttons */
.btn-premium {
    background: var(--primary-color);
    color: var(--dark-color);
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-premium:hover {
    background: #c29262;
    transform: scale(1.02);
}

/* Form Styles */
.form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
}

.form-control:focus {
    background: white;
    box-shadow: 0 0 0 0.25rem rgba(212, 163, 115, 0.25);
    border-color: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Booking Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
}

.calendar-day {
    min-height: 120px;
    padding: 0.5rem;
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
}

/* Status Badges */
.badge-status {
    padding: 0.5em 0.8em;
    border-radius: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* Tables */
.premium-table thead th {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 1rem;
}

.premium-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* RTL Overrides */
[dir="rtl"] {
    --bg-gradient: linear-gradient(-135deg, #fefae0 0%, #faedcd 100%);
}

[dir="rtl"] #sidebar {
    left: auto;
    right: 0;
}

[dir="rtl"] #topbar,
[dir="rtl"] #main-content {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

[dir="rtl"] #sidebar .nav-link i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .me-1,
[dir="rtl"] .me-2,
[dir="rtl"] .me-3,
[dir="rtl"] .me-4 {
    margin-right: 0 !important;
}

[dir="rtl"] .ms-1,
[dir="rtl"] .ms-2,
[dir="rtl"] .ms-3,
[dir="rtl"] .ms-4 {
    margin-left: 0 !important;
}

/* Flip margin utilities in RTL context if not handled by Bootstrap RTL */
[dir="rtl"] .me-1 {
    margin-left: 0.25rem !important;
}

[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
}

[dir="rtl"] .ms-1 {
    margin-right: 0.25rem !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
}

[dir="rtl"] .fa-arrow-left::before {
    content: "\f061";
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Utilities */
.w-20 {
    width: 20px;
    display: inline-block;
    text-align: center;
}

.hover-danger:hover {
    color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.1);
}

/* Sidebar Active State Enhancements */
#sidebar .nav-link.active {
    background: linear-gradient(90deg, var(--primary-color), #c29262);
    box-shadow: 0 4px 15px rgba(212, 163, 115, 0.3);
    color: #fff !important;
    /* Force white text on active */
}

/* In RTL, 'end' is left */