/* ============================================
   SISTEMA DE EVENTOS - ESTILOS RESPONSIVE
   Mobile-First Approach + Desktop Enhancements
   ============================================ */

/* ===== VARIABLES CSS ===== */
:root {
    /* Colores */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Fondos */
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-alt: #f1f5f9;
    
    /* Texto */
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    
    /* Bordes */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Radio */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Transiciones */
    --transition: all 0.2s ease-in-out;
    --transition-slow: all 0.3s ease-in-out;
    
    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
}

/* ===== RESET Y BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TIPOGRAFÍA RESPONSIVE ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    /* Móvil: 1.75rem, Desktop: 2.5rem */
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

p {
    margin-bottom: 1rem;
    font-size: clamp(0.875rem, 2vw, 1rem);
}

small, .text-sm {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ===== UTILIDADES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden { display: none !important; }
.visible { display: block !important; }
.flex { display: flex !important; }
.grid { display: grid !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }

/* ===== BOTONES RESPONSIVE ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px; /* Touch target mínimo */
    min-width: 44px;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    min-height: 52px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.75rem;
    min-width: 44px;
}

/* ===== FORMULARIOS RESPONSIVE ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    transition: var(--transition);
    min-height: 48px; /* Touch friendly */
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

/* ===== HEADER RESPONSIVE ===== */
.main-header, .landing-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.company-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

/* Navegación móvil */
.landing-nav {
    display: none; /* Oculto en móvil por defecto */
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.auth-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 40px;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.mobile-menu-btn:hover {
    background: var(--surface-alt);
}

/* ===== HERO SECTION RESPONSIVE ===== */
.hero-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    color: white;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.125rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.hero-cta .btn {
    width: 100%;
    max-width: 300px;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.hero-trust span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-image {
    display: none; /* Oculto en móvil */
}

.hero-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== EVENT CARDS RESPONSIVE ===== */
.events-section {
    padding: 2rem 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.event-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.event-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.event-badge.featured { background: var(--warning); color: white; }
.event-badge.sold-out { background: var(--danger); color: white; }
.event-badge.low-stock { background: var(--info); color: white; }

.event-image {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--surface-alt);
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

.event-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-date {
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-title {
    font-size: 1.125rem;
    margin: 0;
    line-height: 1.3;
}

.event-venue {
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.event-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.event-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.event-capacity {
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.event-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
}

.event-actions .btn {
    flex: 1;
}

/* ===== CHECKOUT RESPONSIVE ===== */
.checkout-wrapper {
    padding: 1rem;
}

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
}

.checkout-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.checkout-progress {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.checkout-progress .step {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    background: var(--surface-alt);
    color: var(--text-light);
}

.checkout-progress .step.active {
    background: var(--primary);
    color: white;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.checkout-summary {
    position: sticky;
    top: 80px;
    z-index: 10;
}

.summary-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.summary-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.summary-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-light);
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

.summary-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.125rem;
}

.price-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.5rem;
}

.summary-availability {
    margin-top: 1rem;
}

.availability-bar {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.availability-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.checkout-total-sticky {
    position: sticky;
    bottom: 0;
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-top: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 1rem;
}

.total-row.grand {
    border-top: 2px solid var(--border);
    padding-top: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

/* Formulario de checkout */
.checkout-form-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.form-step {
    border: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.form-step legend {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.qty-btn {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

#ticket-qty {
    width: 60px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.5rem;
}

/* Attendees cards */
.attendee-card {
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

.attendee-card h5 {
    margin-bottom: 1rem;
    color: var(--text);
}

/* Payment methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    cursor: pointer;
}

.payment-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: var(--surface);
}

.payment-option input:checked + .payment-card {
    border-color: var(--primary);
    background: rgb(37 99 235 / 0.05);
}

.payment-card:hover {
    border-color: var(--primary-light);
}

.payment-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
    color: var(--primary);
}

.payment-card.whatsapp .payment-icon {
    background: #25D366;
    color: white;
}

.payment-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.payment-info small {
    display: block;
    color: var(--text-light);
}

.payment-note {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--success);
}

.step-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.step-actions .btn {
    flex: 1;
}

/* Success messages */
.success-message {
    text-align: center;
    padding: 3rem 1.5rem;
}

.success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1.5rem;
}

.success-message h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.success-text {
    margin-bottom: 2rem;
    color: var(--text-light);
}

.success-details {
    text-align: left;
    background: var(--surface-alt);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1.5rem;
}

.success-details p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

/* ===== MODALS RESPONSIVE ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal[hidden] {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(0 0 0 / 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

.modal-content.modal-lg {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--surface-alt);
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin-bottom: 1rem;
}

.modal-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
}

.modal-tabs .tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.modal-tabs .tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.modal-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--surface-alt);
    font-size: 0.75rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}

/* Terms modal specific */
.terms-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.terms-content h3 {
    margin: 1.5rem 0 1rem;
}

.terms-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.terms-content li {
    margin-bottom: 0.5rem;
}

.terms-accept {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.terms-accept input {
    margin-top: 2px;
}

/* ===== DASHBOARD RESPONSIVE ===== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
}

.dashboard-sidebar {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.sidebar-logo {
    height: 36px;
}

.sidebar-role {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-super_admin { background: #8b5cf6; color: white; }
.badge-admin { background: var(--primary); color: white; }
.badge-scanner { background: var(--warning); color: white; }
.badge-user { background: var(--secondary); color: white; }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    background: var(--primary);
    color: white;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.dashboard-header h1 {
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-msg {
    font-weight: 500;
}

/* Section cards */
.section-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

/* Tickets grid */
.tickets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.ticket-card {
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    border-left: 4px solid var(--primary);
}

.ticket-card[data-status="used"] { border-left-color: var(--text-muted); opacity: 0.7; }
.ticket-card[data-status="pending"] { border-left-color: var(--warning); }
.ticket-card[data-status="active"] { border-left-color: var(--success); }

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ticket-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: var(--warning); color: white; }
.badge-active { background: var(--success); color: white; }
.badge-used { background: var(--text-muted); color: white; }

.ticket-body p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-light);
}

.qr-display {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.qr-display canvas {
    max-width: 100%;
    height: auto;
}

.qr-instruction {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
}

.payment-pending {
    background: rgb(245 158 11 / 0.1);
    border: 1px solid var(--warning);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== SCANNER PAGE RESPONSIVE ===== */
.scanner-page {
    background: var(--background);
}

.scanner-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.scanner-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.scanner-container h1 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.scanner-info {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.qr-reader {
    margin: 1.5rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-alt);
}

.qr-reader video {
    width: 100%;
    max-width: 400px;
}

.scanner-manual {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.input-group input {
    flex: 1;
    min-height: 48px;
}

.scan-result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.scan-result.success {
    background: rgb(16 185 129 / 0.1);
    border: 2px solid var(--success);
}

.scan-result.error {
    background: rgb(239 68 68 / 0.1);
    border: 2px solid var(--danger);
}

.result-icon {
    font-size: 3rem;
}

.scan-result.success .result-icon { color: var(--success); }
.scan-result.error .result-icon { color: var(--danger); }

.result-message {
    font-weight: 600;
    font-size: 1.125rem;
}

.result-event, .result-user {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ===== TERMS PAGE ===== */
.terms-page {
    padding: 2rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.terms-header {
    text-align: center;
    margin-bottom: 2rem;
}

.terms-header h1 {
    margin-bottom: 0.5rem;
}

.terms-header p {
    color: var(--text-light);
}

.terms-content-page {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.terms-content-page h3 {
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.terms-content-page h3:first-child {
    margin-top: 0;
}

.terms-content-page ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.terms-content-page li {
    margin-bottom: 0.5rem;
}

.terms-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.terms-footer .btn {
    min-width: 200px;
}

/* ===== FOOTER RESPONSIVE ===== */
.landing-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer-links, .footer-contact, .footer-security {
    text-align: center;
}

.footer-links h4,
.footer-contact h4,
.footer-security h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-links a {
    display: block;
    padding: 0.25rem 0;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact p,
.footer-security p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.9375rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== ALERTS Y NOTIFICACIONES ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.alert-error {
    background: rgb(239 68 68 / 0.1);
    color: #991b1b;
    border: 1px solid rgb(239 68 68 / 0.3);
}

.alert-success {
    background: rgb(16 185 129 / 0.1);
    color: #065f46;
    border: 1px solid rgb(16 185 129 / 0.3);
}

.alert-warning {
    background: rgb(245 158 11 / 0.1);
    color: #92400e;
    border: 1px solid rgb(245 158 11 / 0.3);
}

/* Loading states */
.loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.loading::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== AUTH PAGE ===== */
.auth-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-xl);
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    height: 60px;
    margin-bottom: 1rem;
}

.auth-logo h1 {
    color: var(--primary);
    font-size: 1.5rem;
}

.auth-subtitle {
    color: var(--text-light);
    font-size: 0.9375rem;
}

.auth-box {
    margin-bottom: 1.5rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
}

.auth-tabs .tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.auth-tabs .tab-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-security {
    text-align: center;
    padding: 1rem;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.guest-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    opacity: 0.9;
}

.guest-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ===== UTILIDADES ADICIONALES ===== */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

.visually-hidden-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus visible para accesibilidad */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== MEDIA QUERIES - TABLET (768px+) ===== */
@media (min-width: 768px) {
    /* Header */
    .landing-nav {
        display: flex;
        gap: 1.5rem;
    }
    
    .landing-nav a {
        color: var(--text);
        text-decoration: none;
        font-weight: 500;
        padding: 0.5rem;
        transition: var(--transition);
    }
    
    .landing-nav a:hover {
        color: var(--primary);
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    /* Hero */
    .hero-section {
        grid-template-columns: 1fr 1fr;
        padding: 4rem 2rem;
        text-align: left;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .hero-cta {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .hero-cta .btn {
        width: auto;
    }
    
    .hero-trust {
        justify-content: flex-start;
    }
    
    .hero-image {
        display: block;
        position: relative;
    }
    
    /* Events grid */
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Checkout */
    .checkout-grid {
        grid-template-columns: 350px 1fr;
    }
    
    .checkout-summary {
        order: 2;
    }
    
    .checkout-form-section {
        order: 1;
    }
    
    .step-actions {
        justify-content: flex-end;
    }
    
    .step-actions .btn {
        flex: 0 0 auto;
        min-width: 150px;
    }
    
    /* Dashboard */
    .dashboard-layout {
        grid-template-columns: 240px 1fr;
        padding: 2rem;
        gap: 2rem;
    }
    
    .dashboard-sidebar {
        position: sticky;
        top: 100px;
        height: fit-content;
    }
    
    .sidebar-nav {
        flex-direction: column;
    }
    
    /* Footer */
    .footer-container {
        grid-template-columns: repeat(4, 1fr);
        text-align: left;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        text-align: left;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Modals */
    .modal-content {
        max-width: 600px;
    }
    
    .modal-content.modal-lg {
        max-width: 900px;
    }
}

/* ===== MEDIA QUERIES - DESKTOP (1024px+) ===== */
@media (min-width: 1024px) {
    /* Header */
    .header-container {
        padding: 0 2rem;
    }
    
    .logo {
        height: 50px;
    }
    
    .company-name {
        font-size: 1.25rem;
    }
    
    /* Hero */
    .hero-section {
        padding: 6rem 4rem;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content p {
        font-size: 1.25rem;
    }
    
    /* Events */
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .event-card {
        flex-direction: column;
    }
    
    /* Checkout */
    .checkout-wrapper {
        padding: 2rem;
    }
    
    .checkout-container {
        max-width: 1400px;
    }
    
    .checkout-grid {
        grid-template-columns: 400px 1fr;
        gap: 3rem;
    }
    
    .summary-card {
        padding: 2rem;
    }
    
    .checkout-form-section {
        padding: 2rem;
    }
    
    /* Dashboard */
    .dashboard-layout {
        padding: 2rem 4rem;
    }
    
    .dashboard-sidebar {
        padding: 1.5rem;
    }
    
    .section-card {
        padding: 2rem;
    }
    
    .tickets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Scanner */
    .scanner-container {
        padding: 3rem 2rem;
    }
    
    .qr-reader {
        max-width: 400px;
        margin: 2rem auto;
    }
    
    /* Footer */
    .footer-container {
        padding: 0 2rem;
    }
    
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    /* Buttons */
    .btn-lg {
        padding: 1.25rem 2.5rem;
        font-size: 1.25rem;
    }
}

/* ===== MEDIA QUERIES - LARGE DESKTOP (1440px+) ===== */
@media (min-width: 1440px) {
    .events-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .tickets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .dashboard-layout {
        max-width: 1600px;
        margin: 0 auto;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .ticket-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 2px solid black;
    }
    
    .qr-display {
        page-break-inside: avoid;
    }
}

/* ===== DARK MODE SUPPORT (opcional) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --surface: #1e293b;
        --surface-alt: #334155;
        --text: #f1f5f9;
        --text-light: #94a3b8;
        --text-muted: #64748b;
        --border: #334155;
        --border-light: #475569;
    }
    
    .event-card,
    .section-card,
    .summary-card,
    .checkout-form-section,
    .ticket-card,
    .modal-content,
    .scanner-container {
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}