:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #d4af37;
    /* Gold */
    --primary-hover: #b59230;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --sidebar-width: 280px;
    --glass-bg: rgba(30, 30, 30, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

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

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ... other styles (restoring full content) ... */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Base Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface-color);
    border-right: var(--glass-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar-header {
    margin-bottom: 3rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-color);
    text-align: center;
    text-transform: uppercase;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    color: var(--text-muted);
}

.nav-item a:hover,
.nav-item a.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem;
    margin-left: 0;
    /* Changed dynamically if sidebar present */
    width: 100%;
}

.main-content.has-sidebar {
    margin-left: var(--sidebar-width);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    border: none;
    background: var(--primary-color);
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: auto;
    /* <-- antes 100% */
    text-align: center;
}

.btn.full-width {
    width: 100%;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Login Page specific */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #2a2a2a 0%, #121212 100%);
    padding: 2rem;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-muted);
}

/* Dashboard Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: var(--glass-border);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

/* Calendar & Badges */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.8rem;
    margin-top: 2rem;
}

.calendar-day {
    background: var(--surface-color);
    border: var(--glass-border);
    border-radius: 8px;
    padding: 0.8rem;
    min-width: 0;
    /* Prevent overflow */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calendar-day.weekend {
    background: rgba(40, 40, 40, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

.day-header {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.3rem;
    color: var(--primary-color);
}

.day-number {
    font-weight: bold;
    font-size: 1.1rem;
}

.slots-visual {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.slot-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

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

/* Estado Libre (Verde) */
.slot-indicator.free .indicator-dot {
    background-color: #2ecc71;
    box-shadow: 0 0 5px #2ecc71;
}

.slot-indicator.free {
    color: #a0a0a0;
    /* Texto discreto */
}

/* Estado Ocupado (Rojo / Opacidad) */
.slot-indicator.occupied .indicator-dot {
    background-color: #e74c3c;
    box-shadow: 0 0 5px #e74c3c;
}

.slot-indicator.occupied {
    color: #777;
    opacity: 0.6;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 1rem;
    border-radius: var(--border-radius);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .calendar-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Banner */
.branding-header {
    text-align: center;
    padding: 2rem 0;
    background-size: cover;
    background-position: center;
    /* Placeholder gradient until image is set */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--primary-color);
}

.branding-header.with-banner {
    /* background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/banner.jpg'); */
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
}

.branding-title {
    font-family: 'Cinzel', serif;
    /* Elegant serif font */
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

/* Responsive polish */
@media (max-width: 576px) {
    .branding-title {
        font-size: 2rem;
    }

    .login-card {
        padding: 2rem;
    }

    .main-content {
        padding: 1.25rem;
    }

    .card {
        padding: 1.25rem;
    }
}

@media (min-width: 992px) {
    body.is-admin main {
        margin-left: 280px;
    }
}

/* Premium Custom Switch (iOS Style) */
.premium-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.premium-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.premium-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e74c3c;
    /* Red for Off */
    transition: .4s;
    border-radius: 24px;
}

.premium-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.premium-slider {
    background-color: #3498db;
    /* Blue for On */
}

input:focus+.premium-slider {
    box-shadow: 0 0 1px #3498db;
}

input:checked+.premium-slider:before {
    transform: translateX(22px);
}

.premium-control-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transition: background 0.2s ease;
}