@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,600;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* =========================================
   1. FUENTES E IMPORTACIONES GLOBALES
   ========================================= */

/* =========================================
   2. DEFINICIÓN DE VARIABLES Y CLASES MANUALES
      (Reemplazo de tailwind.config.js)
   ========================================= */
:root {
    --brand-red: #E21C21;
    --brand-blue: #0050FF;
    --brand-dark: #0f172a;
    --brand-gold: #D4AF37;

    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-inter: 'Inter', sans-serif;
}

/* Clases de utilidad personalizadas (Manuales) */
.text-brand-blue {
    color: var(--brand-blue);
}

.text-brand-red {
    color: var(--brand-red);
}

.text-brand-dark {
    color: var(--brand-dark);
}

.text-brand-gold {
    color: var(--brand-gold);
}

.bg-brand-blue {
    background-color: var(--brand-blue);
}

.bg-brand-red {
    background-color: var(--brand-red);
}

.bg-brand-dark {
    background-color: var(--brand-dark);
}

.bg-brand-gold {
    background-color: var(--brand-gold);
}

.border-brand-blue {
    border-color: var(--brand-blue);
}

.border-brand-red {
    border-color: var(--brand-red);
}

.font-serif {
    font-family: var(--font-serif);
}

.font-sans {
    font-family: var(--font-sans);
}

/* Scrollbar oculto */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

/* Animaciones Globales */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.status-pulse {
    animation: pulse-brand 2s infinite;
}

@keyframes pulse-brand {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 80, 255, 0.2);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(0, 80, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 80, 255, 0);
    }
}

@keyframes scan {
    0% {
        top: 0;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0;
    }
}

/* =========================================
   3. MÓDULO: LOGIN (AUTH)
   ========================================= */
.main-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    background: white;
    font-family: var(--font-inter);
}

.hero-section {
    flex: 1.5;
    position: relative;
    background: url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.1));
    z-index: 1;
}

.top-brand {
    position: absolute;
    top: 50px;
    left: 60px;
    font-size: 32px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 20;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.top-brand span {
    color: var(--brand-red);
}

.hero-content {
    position: relative;
    z-index: 10;
    border-left: 5px solid var(--brand-red);
    padding-left: 40px;
}

.hero-text h1 {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 15px;
    color: white;
    text-transform: uppercase;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hero-text span {
    color: var(--brand-red);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    display: inline-block;
    margin-top: 5px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0 10px;
    transform: skewX(-10deg);
}

.hero-text p {
    font-size: 18px;
    color: white;
    max-width: 500px;
    line-height: 1.6;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    margin-top: 20px;
}

.form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    background-color: white;
    position: relative;
    padding-top: 40px;
}

.form-card {
    width: 100%;
    max-width: 400px;
    padding: 20px 40px;
    margin-top: auto;
    margin-bottom: auto;
}

.logo-container {
    width: 70px;
    height: 70px;
    background: var(--brand-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 20px rgba(226, 28, 33, 0.3);
}

.logo-container img {
    width: 35px;
    height: auto;
    filter: brightness(0) invert(1);
}

.brand-header {
    text-align: center;
    margin-bottom: 25px;
}

.brand-header h2 {
    font-size: 24px;
    color: var(--text-main);
    font-weight: 700;
}

.brand-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.tab-btn.active {
    color: var(--brand-red);
    border-bottom: 3px solid var(--brand-red);
}

.input-block {
    margin-bottom: 15px;
}

.input-block label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-main);
    transition: 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: var(--brand-red);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(226, 28, 33, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--brand-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(226, 28, 33, 0.2);
}

.submit-btn:hover {
    background-color: #c4181c;
    transform: translateY(-2px);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #94a3b8;
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    padding: 0 10px;
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

.google-btn:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.form-wrapper {
    display: none;
}

.form-wrapper.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.forgot-pass {
    color: var(--brand-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    display: block;
    text-align: right;
    margin-top: 5px;
}

@media (max-width: 900px) {
    .hero-section {
        display: none;
    }

    .form-section {
        width: 100%;
        padding: 0;
        background: white;
    }

    .form-card {
        padding: 20px;
        max-width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .top-brand {
        display: block;
        color: var(--brand-red);
        top: 20px;
        left: 20px;
        font-size: 24px;
        z-index: 100;
        text-shadow: none;
    }
}

/* =========================================
   4. MÓDULO: MENÚ / CARTA (HOME)
   ========================================= */
.bg-gradient-brand {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-red) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
}

.nav-transparent {
    background: transparent;
    padding: 2rem 3rem;
}

.nav-scrolled .nav-link {
    color: var(--dark-bg);
}

.nav-transparent .nav-link {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* =========================================
   5. MÓDULO: PERFIL
   ========================================= */
.glass-panel {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.member-card {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #0030a0 100%);
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    box-shadow: 0 10px 20px -5px rgba(0, 80, 255, 0.4);
    transition: transform 0.3s ease;
}

.member-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top right, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    z-index: 1;
}

.member-card:hover {
    transform: translateY(-3px);
}

.input-profile {
    width: 100%;
    background: #ffffff;
    border: 1px solid #CBD5E1;
    color: #1E293B;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    outline: none;
    transition: 0.2s;
    font-size: 0.9rem;
}

.input-profile:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 80, 255, 0.1);
}

.input-profile:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #F1F5F9;
    color: #64748B;
}

.settings-tab {
    padding: 1rem;
    color: #64748B;
    font-weight: 600;
    text-align: left;
    border-radius: 0.75rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-tab:hover {
    background: #F1F5F9;
    color: var(--brand-blue);
}

.settings-tab.active {
    background: #EFF6FF;
    color: var(--brand-blue);
    border-left: 4px solid var(--brand-blue);
    border-radius: 0 0.75rem 0.75rem 0;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: #CBD5E1;
    border-radius: 99px;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-checkbox:checked+.toggle-switch {
    background: var(--brand-blue);
}

.toggle-checkbox:checked+.toggle-switch::after {
    transform: translateX(20px);
}

/* =========================================
   6. MÓDULO: RESERVAS (CREAR)
   ========================================= */
.reservation-wrapper {
    background-color: #F8FAFC;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #334155;
    font-family: var(--font-sans);
    background-image: radial-gradient(#E2E8F0 1px, transparent 1px);
    background-size: 24px 24px;
}

.reservation-card {
    background: #FFFFFF;
    width: 100%;
    max-width: 650px;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    border: 1px solid #E2E8F0;
    position: relative;
    z-index: 10;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 15px;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 30px;
    right: 30px;
    height: 2px;
    background: #E2E8F0;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 25%;
}

.step-circle {
    width: 36px;
    height: 36px;
    background: #FFFFFF;
    border: 2px solid #CBD5E1;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748B;
    transition: all 0.3s;
}

.step.active .step-circle {
    border-color: var(--brand-blue);
    color: #FFFFFF;
    background: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(0, 80, 255, 0.15);
    transform: scale(1.1);
}

.step.completed .step-circle {
    border-color: #10B981;
    background: #10B981;
    color: white;
    border-width: 0;
}

.step p {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #94A3B8;
}

.step.active p {
    color: var(--brand-blue);
}

.reservation-card input,
.reservation-card select,
.reservation-card textarea {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #1E293B;
    outline: none;
    transition: 0.2s;
    font-weight: 500;
}

.reservation-card input:focus,
.reservation-card select:focus,
.reservation-card textarea:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 80, 255, 0.1);
}

.input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    pointer-events: none;
    z-index: 10;
    width: 18px;
    height: 18px;
}

.reservation-card input:focus~.input-icon {
    color: var(--brand-blue);
}

.input-wrapper .icon-textarea {
    top: 20px !important;
    transform: none !important;
}

.mesas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.mesa-option {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    padding: 20px 15px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.mesa-option:hover {
    border-color: var(--brand-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.mesa-option.selected {
    border-color: var(--brand-blue);
    background: #EFF6FF;
    box-shadow: 0 0 0 2px var(--brand-blue) inset;
}

.mesa-option h4 {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1E293B;
    margin-bottom: 4px;
}

.mesa-option span {
    font-size: 0.75rem;
    color: #64748B;
    display: block;
}

.mesa-option .price {
    margin-top: 8px;
    color: var(--brand-blue);
    font-weight: 700;
    font-size: 0.85rem;
}

.btn-res {
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-prev {
    background: #F1F5F9;
    color: #64748B;
}

.btn-prev:hover {
    background: #E2E8F0;
    color: #334155;
}

.btn-next {
    background: var(--brand-blue);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 80, 255, 0.2);
}

.btn-next:hover {
    background: #0040CC;
    transform: translateY(-1px);
}

/* =========================================
   7. MÓDULO: MIS RESERVAS / PEDIDOS (HISTORIAL)
   ========================================= */
.orders-wrapper {
    background-color: #F8FAFC;
    min-height: 100vh;
    padding-bottom: 80px;
    font-family: var(--font-sans);
}

.header-sticky {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #E2E8F0;
}

.ticket-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #F1F5F9;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.ticket-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #CBD5E1;
}

.border-l-status {
    border-left-width: 5px;
}

.ticket-divider {
    border-top: 2px dashed #E2E8F0;
    position: relative;
    margin: 1.5rem 0;
}

.ticket-divider::before,
.ticket-divider::after {
    content: '';
    position: absolute;
    top: -10px;
    width: 20px;
    height: 20px;
    background-color: #F8FAFC;
    border-radius: 50%;
}

.ticket-divider::before {
    left: -30px;
}

.ticket-divider::after {
    right: -30px;
}

.details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.details-content.open {
    max-height: 500px;
    transition: max-height 0.4s ease-in-out;
}

/* =========================================
   8. COMPONENTES: MODALES
   ========================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    width: 90%;
    max-width: 400px;
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-content {
    transform: scale(1) translateY(0);
}

#modalQR {
    transition: opacity 0.3s ease;
}

#modalQR.hidden {
    display: none;
    pointer-events: none;
}

#modalQR:not(.hidden) {
    display: flex;
    pointer-events: auto;
}