/* ============================================
   ESTILOS BASE DEL PROYECTO - SISTEMA DE BOLETOS
   ============================================ */

/* Estilos básicos responsive */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    font-size: 16px;
    transition: margin-left 0.3s ease;
}

/* ============================================
   NAVBAR CON MENÚ LATERAL
   ============================================ */
.navbar {
    background-color: #FF4D00;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.logo img {
    height: 30px;
    width: auto;
}

/* Información del usuario en navbar */
.user-nav-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-details {
    text-align: right;
    color: white;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

.user-role {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 2px;
    white-space: nowrap;
}

/* Botón hamburguesa en navbar */
.menu-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 15px;
    vertical-align: middle;
}

.menu-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   MENÚ LATERAL
   ============================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 300px;
    height: 100vh;
    background: #1a1a1a;
    color: white;
    transition: right 0.3s ease;
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 20px;
    background: #2d2d2d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #444;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
}

.sidebar-logo img {
    height: 30px;
    margin-right: 10px;
}

.sidebar-user-info {
    padding: 20px;
    background: #2d2d2d;
    border-bottom: 1px solid #444;
}

.sidebar-user-info .welcome {
    font-size: 16px;
    color: #fff;
    font-weight: 500;
    display: block;
}

.sidebar-user-info .role {
    font-size: 14px;
    color: #aaa;
    margin-top: 5px;
    display: block;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ddd;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover {
    background: #2d2d2d;
    color: white;
}

.sidebar-nav a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-nav a.logout {
    color: #ff6b6b;
    border-top: 1px solid #444;
    margin-top: 20px;
    padding-top: 20px;
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* ============================================
   ESTILOS DE FORMULARIOS (GENERALES)
   ============================================ */
.registration-form,
.admin-container,
.login-container,
.create-form,
.config-form,
.checkout-container,
.validator-container,
.event-selection,
.search-customer,
.completion-form,
.confirmation-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF4D00;
    box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #FF4D00;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
    font-weight: 500;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.btn:hover {
    background-color: #009790;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #FF4D00;
}

.btn-secondary {
    background-color: #6b7280;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* ============================================
   TABLAS
   ============================================ */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    min-width: 600px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.data-table .actions {
    white-space: nowrap;
}

/* ============================================
   ESTADOS Y BADGES
   ============================================ */
.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.status.active {
    background-color: #d1fae5;
    color: #065f46;
}

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

.status.pending {
    background: #fef3c7;
    color: #92400e;
}

.status.paid {
    background: #d1fae5;
    color: #065f46;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.role-badge.super_admin {
    background: #fef3c7;
    color: #92400e;
}

.role-badge.ticket_seller {
    background: #d1fae5;
    color: #065f46;
}

.role-badge.validator {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================
   ALERTAS Y MENSAJES
   ============================================ */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-error {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.alert-success {
    background: #d1fae5;
    border-left-color: #10b981;
    color: #065f46;
}

/* ============================================
   COMPONENTES ESPECÍFICOS
   ============================================ */

/* Tarjetas */
.info-card, .detail-card, .stat-card, .action-card, .event-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.info-card:hover, .detail-card:hover, .stat-card:hover, .action-card:hover, .event-card:hover {
    transform: translateY(-5px);
}

/* Grids */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Dashboard */
.admin-dashboard h1 {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.quick-actions {
    margin: 40px 0;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #973c00 0%, #009790 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

/* Error page */
.error-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.error-message {
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

/* Checkout */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    position: relative;
    flex-wrap: wrap;
    gap: 10px;
}

.checkout-steps:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #dee2e6;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    background: white;
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    color: #666;
    font-weight: 500;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.step.active {
    border-color: #2563eb;
    color: #2563eb;
    background: #f0f7ff;
}

.step.completed {
    border-color: #10b981;
    color: #10b981;
    background: #d1fae5;
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.empty-state {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Responsive para el menú lateral */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        right: -280px;
    }
    
    .user-details {
        display: none; /* Ocultar info del usuario en móviles */
    }
    
    .menu-toggle-btn {
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Responsive general */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
}

@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .registration-form,
    .admin-container,
    .login-card {
        padding: 25px;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .user-details {
        display: block;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    .registration-form,
    .admin-container,
    .login-card {
        padding: 20px;
        margin-top: 15px;
    }
    
    .hero {
        padding: 30px 15px;
        margin: -20px -15px 30px;
        border-radius: 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .feature {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .checkout-steps:before {
        display: none;
    }
    
    .step {
        width: 100%;
        text-align: center;
    }
    
    .stats-grid,
    .actions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 15px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 8px;
    }
    
    .registration-form,
    .admin-container,
    .login-card {
        padding: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .user-details {
        display: none; /* Ocultar en móviles pequeños */
    }
    
    .menu-toggle-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .feature h3 {
        font-size: 1.2rem;
    }
    
    .feature p {
        font-size: 0.95rem;
    }
    
    .login-card h1 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .error-container {
        padding: 20px;
        margin: 20px auto;
    }
    
    .error-message {
        padding: 15px;
    }
}

@media (max-width: 400px) {
    .logo {
        font-size: 1.1rem;
    }
    
    .logo img {
        height: 25px;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .menu-toggle-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-left: 8px;
    }
}

/* Impresión */
@media print {
    .navbar,
    .btn,
    .menu-toggle-btn,
    .sidebar {
        display: none !important;
    }
    
    .container {
        padding: 0;
        margin: 0;
        max-width: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Deshabilitar efectos hover en dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .feature:hover,
    .btn:hover,
    .info-card:hover,
    .detail-card:hover,
    .stat-card:hover,
    .action-card:hover,
    .event-card:hover {
        transform: none;
    }
}
