/* Sistema de Registro de Visitantes - Parque Ecológico */
/* Estilos Completos - Un Solo Archivo */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    min-height: 100vh;
    padding: 20px;
}

.container {
    background: transparent;
    border-radius: 15px;
    box-shadow: none;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 30px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

header h1 {
    color: #084298;
    font-size: 2.2em;
    margin-bottom: 10px;
}

/* Panel de Estadísticas */
.panel-estadisticas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #084298;
    margin-bottom: 10px;
}

.stat-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0c5460 0%, #084298 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.stat-bar-fill.alerta {
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
}

.stat-bar-fill.lleno {
    background: linear-gradient(90deg, #f44336 0%, #d32f2f 100%);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tab-btn:hover {
    color: #084298;
    background: #f8f9fa;
}

.tab-btn.active {
    color: #084298;
    border-bottom-color: #084298;
    background: #f8f9fa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Secciones */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-section h2 {
    color: #084298;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
}

.section-extra {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.section-extra h3 {
    color: #084298;
    margin-bottom: 15px;
}

/* Formularios */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

.input-with-action {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: nowrap;
}

.input-with-action input {
    flex: 1;
    min-width: 0;
}

.btn-inline {
    white-space: nowrap;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85em;
}

.qr-status {
    display: block;
    margin-top: 8px;
    color: #084298;
    font-size: 0.85em;
    min-height: 18px;
}

.qr-reader {
    margin-top: 15px;
    padding: 15px;
    border: 2px dashed #084298;
    border-radius: 10px;
    background: #f0f7ff;
}

.qr-reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #084298;
}

.qr-reader-container {
    width: 100%;
    min-height: 300px;
    max-width: 500px;
    margin: 0 auto;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.qr-reader-container video {
    width: 100% !important;
    height: auto !important;
    display: block;
}

.qr-reader-container #qrReaderContainer__scan_region {
    min-height: 280px;
}

.qr-reader-container #qrReaderContainer__scan_region video {
    width: 100% !important;
    object-fit: cover;
}

.qr-reader-container #qrReaderContainer__dashboard {
    padding: 10px;
}

.qr-reader-container #qrReaderContainer__dashboard_section_csr button {
    background: #084298 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #084298;
    box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Botones */
.btn {
    padding: 12px 24px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #084298 0%, #0c5460 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(45, 134, 89, 0.4);
}

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

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(108, 117, 125, 0.4);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background: #138496;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.2em;
    width: auto;
    min-width: 250px;
    display: inline-block;
    margin: 20px auto;
}

/* Datos del Visitante */
.datos-visitante {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.datos-visitante h3 {
    color: #084298;
    margin-bottom: 20px;
    font-size: 1.3em;
}

/* Mensajes */
.mensaje {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.mensaje.show {
    display: block;
}

.mensaje-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mensaje-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.mensaje-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.mensaje-small {
    font-size: 0.9em;
    padding: 8px 15px;
    margin-top: 10px;
}

/* Indicador de campo requerido */
.required {
    color: #dc3545;
    font-weight: bold;
}

.info-text {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-style: italic;
}

/* Resultados */
.resultados-container {
    margin-top: 30px;
    max-width: 100%;
    overflow-x: auto;
}

.tabla-resultados {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.tabla-resultados thead {
    background: linear-gradient(135deg, #084298 0%, #0c5460 100%);
    color: white;
}

.tabla-resultados th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.tabla-resultados td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.tabla-resultados tbody tr:hover {
    background-color: #f8f9fa;
}

.tabla-resultados tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-entrada {
    background-color: #d4edda;
    color: #155724;
}

.badge-salida {
    background-color: #fff3cd;
    color: #856404;
}

.badge-nacional {
    background-color: #cfe2ff;
    color: #084298;
}

.badge-extranjero {
    background-color: #f8d7da;
    color: #842029;
}

/* Estados */
.cargando,
.sin-resultados {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 20px;
    color: #721c24;
    background-color: #f8d7da;
    border-radius: 8px;
}

/* Info de Entrada */
.info-entrada {
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
}

.info-entrada p {
    margin: 8px 0;
    color: #333;
}

.info-entrada strong {
    color: #084298;
}

/* Integrantes Grupo */
.integrante-item {
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.integrante-item h4 {
    color: #084298;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.info-text {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    /* border-left: 4px solid #084298; */
}

/* Modo Rápido */
.switch-rapido {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.switch-rapido input[type="checkbox"] {
    width: 40px;
    height: 20px;
    appearance: none;
    background: #ccc;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.switch-rapido input[type="checkbox"]:checked {
    background: #084298;
}

.switch-rapido input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.switch-rapido input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.switch-rapido span {
    font-weight: 600;
    color: #084298;
    font-size: 0.9em;
}

.atajo-teclado {
    font-size: 0.75em;
    color: #999;
    font-weight: normal;
    font-style: italic;
}

/* Footer */
footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.9em;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .panel-estadisticas {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 15px;
    }
    
    .tabs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
        border-bottom: 2px solid #e0e0e0;
    }
    
    .tab-btn {
        width: auto;
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 10px 15px;
        font-size: 0.9em;
    }
    
    .welcome-section h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    .welcome-section h3 {
        font-size: 1.2em;
        margin-bottom: 12px;
    }
    
    .form-container {
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .input-with-action {
        flex-direction: column;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .input-with-action input {
        width: 100%;
        min-width: 100%;
        flex: none;
    }
    
    .btn-inline {
        width: 100%;
        margin-top: 0;
    }
    
    .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
        padding: 12px 20px;
        font-size: 0.95em;
    }
    
    .datos-visitante {
        padding: 15px;
        margin-top: 20px;
    }
    
    .datos-visitante h3,
    .datos-visitante h4 {
        font-size: 1.1em;
        margin-bottom: 15px;
    }
    
    .integrante-item {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .integrante-item h4 {
        font-size: 1.1em;
        margin-bottom: 12px;
    }
    
    .qr-reader {
        padding: 10px;
        margin-top: 10px;
    }
    
    .qr-reader-container {
        min-height: 250px;
        max-width: 100%;
    }
    
    .qr-reader-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .tabla-resultados {
        font-size: 0.85em;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        width: 100%;
    }
    
    .tabla-resultados thead {
        display: none;
    }
    
    .tabla-resultados tbody,
    .tabla-resultados tr,
    .tabla-resultados td {
        display: block;
    }
    
    .tabla-resultados tr {
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
        background: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
    
    .tabla-resultados td {
        padding: 10px 10px 10px 40%;
        border-bottom: 1px solid #e0e0e0;
        position: relative;
        text-align: left;
    }
    
    .tabla-resultados td:last-child {
        border-bottom: none;
    }
    
    .tabla-resultados td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 35%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #084298;
        font-size: 0.85em;
    }
    
    .info-text {
        font-size: 0.85em;
        padding: 8px;
    }
    
    .section-extra {
        padding: 15px;
        margin-top: 20px;
    }
    
    .mensaje {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 15px;
        border-radius: 8px;
    }
    
    header h1 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
    
    .stat-box {
        padding: 15px;
    }
    
    .tabs {
        gap: 3px;
    }
    
    .tab-btn {
        padding: 10px 12px;
        font-size: 0.85em;
        min-width: 100px;
    }
    
    .welcome-section h2 {
        font-size: 1.3em;
    }
    
    .welcome-section h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .welcome-section h4 {
        font-size: 1em;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 0.9em;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px;
        font-size: 0.95em;
    }
    
    .form-group small {
        font-size: 0.8em;
        display: block;
        margin-top: 5px;
    }
    
    .datos-visitante {
        padding: 12px;
    }
    
    .integrante-item {
        padding: 12px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    
    .qr-reader-container {
        min-height: 200px;
    }
    
    .switch-rapido {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.3em;
    }
    
    .tab-btn {
        font-size: 0.8em;
        padding: 8px 10px;
        min-width: 90px;
    }
}

/* Estilos para Selección de Tipo de Visita */
.tipo-visita-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.btn-tipo-visita {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    display: block;
    color: inherit;
}

.btn-tipo-visita:hover {
    border-color: #084298;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(8, 66, 152, 0.2);
    text-decoration: none;
    color: inherit;
}

.btn-tipo-visita:active,
.btn-tipo-visita:visited {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(8, 66, 152, 0.3);
    background: #f0f7ff;
    text-decoration: none;
    color: inherit;
}

.btn-tipo-visita:focus {
    border-color: #084298;
    box-shadow: 0 0 0 3px rgba(8, 66, 152, 0.25);
    text-decoration: none;
    color: inherit;
}

.btn-tipo-visita .icono-tipo {
    font-size: 4em;
    margin-bottom: 15px;
}

.btn-tipo-visita h3 {
    color: #084298;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.btn-tipo-visita p {
    color: #666;
    font-size: 1em;
    margin: 0;
}

/* Estilos para Pasos del Grupo */
.paso-grupo {
    margin-bottom: 30px;
}

.codigo-grupo-container {
    background: linear-gradient(135deg, #084298 0%, #0c5460 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.codigo-grupo-container h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.codigo-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.codigo-texto {
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 30px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
}

.codigo-qr-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
}

.codigo-qr-container canvas,
.codigo-qr-container img {
    max-width: 200px;
    height: auto;
}

.lista-acompanantes {
    margin-bottom: 30px;
}

.lista-acompanantes h4 {
    color: #084298;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.acompanante-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acompanante-item .info {
    flex: 1;
}

.acompanante-item .nombre {
    font-weight: 600;
    color: #084298;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.acompanante-item .detalles {
    color: #666;
    font-size: 0.9em;
}

.acompanante-item .eliminar {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.acompanante-item .eliminar:hover {
    background: #c82333;
}

.form-agregar-acompanante {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.form-agregar-acompanante h4 {
    color: #084298;
    margin-bottom: 15px;
}

.acciones-finales {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .tipo-visita-selector {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .btn-tipo-visita {
        padding: 30px 20px;
    }
    
    .codigo-display {
        flex-direction: column;
    }
    
    .codigo-texto {
        font-size: 1.8em;
        padding: 10px 20px;
    }
    
    .acompanante-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .acompanante-item .eliminar {
        width: 100%;
    }
    
    .acciones-finales {
        flex-direction: column;
    }
    
    .acciones-finales .btn {
        width: 100%;
    }
}

/* Estilos para Reservas */
.paso-reserva {
    margin-bottom: 30px;
}

.confirmacion-reserva {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 15px;
    border: 2px solid #003caa;
}

.confirmacion-reserva h3 {
    color: #155724;
    margin-bottom: 20px;
    font-size: 2em;
}

.codigo-reserva-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
}

.codigo-reserva-container h4 {
    color: #084298;
    margin-bottom: 20px;
}

.codigo-reserva-texto {
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 5px;
    background: #f8f9fa;
    padding: 15px 30px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    color: #084298;
    margin-bottom: 20px;
}

.codigo-reserva-qr {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 20px;
}

.codigo-reserva-qr canvas {
    max-width: 200px;
    height: auto;
}

.datos-reserva-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.datos-reserva-card h3,
.datos-reserva-card h4 {
    color: #084298;
    margin-bottom: 15px;
}

.datos-reserva-card p {
    margin: 10px 0;
    color: #333;
}

.datos-reserva-card ul {
    margin: 10px 0;
    padding-left: 20px;
}

.datos-reserva-card li {
    margin: 5px 0;
    color: #555;
}

.datos-reserva-confirmacion {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .codigo-reserva-texto {
        font-size: 1.8em;
        padding: 10px 20px;
    }

    .confirmacion-reserva {
        padding: 20px;
    }
}

/* ===== ESTILOS DEL CALENDARIO VISUAL PARA RESERVAS ===== */
.calendar-container-reserva {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    margin-top: 10px;
}

.calendar-header-reserva {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.calendar-nav-btn {
    background: #2065D1;
    color: white;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.calendar-nav-btn:hover {
    background: #1557b0;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(32, 101, 209, 0.3);
}

.calendar-nav-btn:active {
    transform: scale(0.95);
}

.calendar-month-year {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-transform: capitalize;
}

.calendar-weekdays-reserva {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    color: #666;
    font-size: 0.9em;
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-days-reserva {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-reserva {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    position: relative;
    padding: 5px;
}

.calendar-day-reserva:hover:not(.disabled):not(.past) {
    background: #e3f2fd;
    border-color: #2065D1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(32, 101, 209, 0.2);
}

.calendar-day-reserva.disabled {
    background: #f5f5f5;
    color: #bbb;
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-day-reserva.past {
    background: #f9f9f9;
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.calendar-day-reserva.selected {
    background: linear-gradient(135deg, #2065D1 0%, #1557b0 100%);
    color: white;
    border-color: #1557b0;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(32, 101, 209, 0.4);
    transform: scale(1.05);
}

.calendar-day-reserva.today {
    background: #fff3cd;
    border-color: #ffc107;
    font-weight: 600;
    color: #856404;
}

.calendar-day-reserva.today.selected {
    background: linear-gradient(135deg, #2065D1 0%, #1557b0 100%);
    color: white;
    border-color: #1557b0;
}

.calendar-day-number {
    font-size: 1em;
    font-weight: 500;
}

.calendar-day-reserva.selected .calendar-day-number {
    color: white;
    font-weight: bold;
}

.calendar-selected-info {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.calendar-selected-text {
    font-size: 0.95em;
    color: #666;
    font-weight: 500;
}

.calendar-selected-info.has-selection {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2065D1;
}

.calendar-selected-info.has-selection .calendar-selected-text {
    color: #1557b0;
    font-weight: 600;
}

/* Responsive para calendario */
@media (max-width: 768px) {
    .calendar-container-reserva {
        padding: 15px;
    }
    
    .calendar-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .calendar-month-year {
        font-size: 1.1em;
    }
    
    .calendar-weekday {
        font-size: 0.8em;
        padding: 6px 0;
    }
    
    .calendar-day-number {
        font-size: 0.9em;
    }
}

/* ===== ESTILOS PARA SECCIÓN DE RESPONSABLE ===== */
.responsable-header {
    margin-bottom: 20px;
}

.responsable-header h4 {
    color: #2065D1;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.responsable-header h4::before {
    content: "👤";
    font-size: 1.2em;
}

.responsable-info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2065D1;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(32, 101, 209, 0.15);
}

.responsable-info-box i {
    color: #2065D1;
    font-size: 1.2em;
    margin-top: 2px;
    flex-shrink: 0;
}

.responsable-info-box span {
    color: #1557b0;
    font-size: 0.95em;
    line-height: 1.5;
}

.responsable-info-box strong {
    font-weight: 600;
}

/* ===== ESTILOS PARA CAMPOS DE ACOMPAÑANTES EN RESERVA ===== */
#acompanantes-container {
    animation: fadeIn 0.3s ease-out;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.acompanantes-header {
    margin-bottom: 20px;
}

.acompanantes-header h4 {
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.acompanantes-header h4::before {
    content: "👥";
    font-size: 1.2em;
}

.acompanantes-info-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #003caa;
    border-radius: 6px;
    padding: 10px 15px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.acompanantes-info-box i {
    color: #003caa;
    font-size: 1.1em;
    flex-shrink: 0;
}

.acompanantes-info-box span {
    color: #495057;
    font-size: 0.9em;
    line-height: 1.4;
}

.acompanante-reserva-item {
    transition: all 0.3s ease;
}

.acompanante-reserva-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #2065D1;
}

.acompanante-reserva-item h5 {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 15px;
}

.acompanante-reserva-item .form-group {
    margin-bottom: 0;
}

.acompanante-reserva-item .form-group label {
    font-size: 0.9em;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

.acompanante-reserva-item .form-control {
    font-size: 0.9em;
    padding: 0.6rem 0.8rem;
}

@media (max-width: 768px) {
    .acompanante-reserva-item {
        padding: 12px;
    }
    
    .acompanante-reserva-item .form-row {
        flex-direction: column;
    }
    
    .acompanante-reserva-item .form-group {
        flex: 1 1 100% !important;
        margin-right: 0 !important;
        margin-bottom: 10px;
    }
}



/* =============================================================================
   Estilos Específicos para el Escáner QR - Sistema de Validación de Entrada
   ============================================================================= */

/* Estilos específicos para el escáner QR */
.scanner-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border: 2px solid #e0e0e0;
}

.scanner-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 25px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.camera-switch {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(8, 66, 152, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.camera-switch:hover {
    background: rgba(12, 84, 96, 0.9);
    transform: rotate(180deg);
}

#reader {
    border-radius: 10px;
    overflow: hidden;
}

.manual-input {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.manual-input h3 {
    color: #084298;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.info-text {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #084298;
    box-shadow: 0 0 0 3px rgba(8, 66, 152, 0.1);
}

.result-container {
    display: none;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
    animation: slideIn 0.3s ease;
    position: relative;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
}

.result-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
}

.result-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
}

.btn-cerrar-mensaje {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 24px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-cerrar-mensaje:hover {
    background: rgba(0, 0, 0, 0.4);
    color: #000;
    transform: scale(1.1);
}

.btn-cerrar-mensaje:active {
    transform: scale(0.95);
}

.result-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.result-title {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.result-message {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 20px;
}

.visitor-details {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #084298;
}

.detail-value {
    color: #333;
}

.loading {
    text-align: center;
    padding: 30px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #084298;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 1.1em;
}

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

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #084298;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.95em;
    color: #666;
    font-weight: 600;
}

/* Responsive para el escáner QR */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .input-group {
        flex-direction: column;
    }

    .result-icon {
        font-size: 3em;
    }

    .result-title {
        font-size: 1.4em;
    }

    .stat-number {
        font-size: 2em;
    }
}

/* ================================================
   Estilos para formulario de reservas
   ================================================ */

/* Navegación del header */
.nav-header {
    margin-top: 20px;
}

/* Tip informativo en formularios (color azul) */
.form-tip {
    display: block;
    margin-top: 5px;
    color: #2563eb;
    font-size: 0.85em;
}

/* Nota informativa en formularios (color gris) */
.form-note {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}

/* Contenedor oculto por defecto */
.hidden-container {
    display: none;
    margin-top: 20px;
}

/* Encabezado de acompañantes */
.acompanantes-header h4 {
    margin-bottom: 10px;
    color: #333;
}

/* Contenedor de confirmación */
.confirmacion-container {
    max-width: 700px;
    margin: 0 auto;
}

/* Título del código QR */
.qr-title {
    margin-top: 30px;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Descripción del código QR */
.qr-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

/* Estilos para confirmación de reserva */
.confirmacion-titulo {
    text-align: center;
    color: #27ae60;
    margin-bottom: 30px;
}

.codigo-reserva-container {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.codigo-reserva-label {
    margin-bottom: 10px;
    color: #2c3e50;
}

.codigo-reserva-texto {
    font-size: 1.8em;
    font-weight: bold;
    color: #e74c3c;
    letter-spacing: 3px;
    margin-bottom: 25px;
}

.qr-section {
    border-top: 2px solid #ddd;
    padding-top: 25px;
    margin-top: 25px;
}

.codigo-reserva-qr {
    display: inline-block;
    margin: 0 auto;
}

.qr-image {
    width: 200px;
    height: 200px;
    display: block;
    margin: 0 auto;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 10px;
    background-color: #fff;
}

.qr-error-message {
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 8px;
}

.confirmacion-acciones {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

.confirmacion-acciones .btn {
    margin-right: 10px;
}

/* Estilos para datos de confirmación de reserva */
.datos-reserva-titulo {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

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

.datos-seccion {
    margin-bottom: 15px;
}

.datos-seccion-titulo {
    color: #34495e;
    margin-bottom: 10px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.datos-item {
    margin: 8px 0;
}

.datos-valor {
    color: #555;
}

.datos-valor-codigo {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.1em;
}

.datos-valor-bold {
    color: #555;
    font-weight: bold;
}

.acompanantes-list {
    margin-top: 15px;
}

.acompanantes-list-title {
    margin-bottom: 10px;
    color: #333;
}

.acompanantes-list-items {
    list-style: none;
    padding: 0;
}

.acompanante-item-list {
    padding: 8px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.datos-extra-box {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.datos-extra-box-small {
    margin-top: 15px;
}

.datos-extra-texto {
    margin: 5px 0 0 0;
    color: #555;
}

.info-importante {
    background: linear-gradient(135deg, #2348eb 0%, #000000 100%);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.info-importante-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-importante-icon {
    font-size: 2.5em;
}

.info-importante-titulo {
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.info-importante-texto {
    margin: 0;
    font-size: 0.95em;
    opacity: 0.95;
}

.info-adicional {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}

.info-adicional-texto {
    margin: 0;
    color: #856404;
}

/* Estilos para campos autocompletados */
.campo-autocompletado {
    background-color: #e8f5e9 !important;
    border-color: #4caf50 !important;
    transition: all 0.3s ease;
}

/* Clase para mensaje de éxito (si no existe) */
.mensaje-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}


/* ============================================
   ESTILOS PARA EL BACKEND ADMINISTRATIVO
   ============================================ */

/* Layout Principal del Backend */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

/* Sidebar */
#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: #fff !important;
    border-right: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

#sidebar.active {
    margin-left: -260px;
}

#sidebar .sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff !important;
}

#sidebar .sidebar-header h4 {
    color: #084298 !important;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

#sidebar .sidebar-header p {
    color: #666666 !important;
    font-size: 0.875rem;
    margin-top: 4px;
}

#sidebar ul.components {
    padding: 16px 0;
    list-style: none;
}

#sidebar ul li {
    padding: 0;
}

#sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333333 !important;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.9375rem;
}

#sidebar ul li a:hover,
#sidebar ul li a.active {
    background: #e3f2fd;
    border-left-color: #084298;
    color: #084298;
}

#sidebar ul li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1.125rem;
}

/* �rea de Contenido */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    background: #f8f9fa;
}

#content.active {
    width: calc(100% + 260px);
}

.top-navbar {
    background: #fff;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.content-area {
    padding: 0 30px 30px;
}

/* Tarjetas de Estad�sticas */
.stats-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #3383fa;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.stats-card h3 {
    font-size: 2em;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.stats-card .text-muted {
    font-size: 0.9em;
    color: #718096;
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
}

/* Tarjetas de Contenido */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.card-header {
    background: #fff;
    border-bottom: 2px solid #f0f0f0;
    padding: 20px 25px;
    border-radius: 10px 10px 0 0 !important;
}

.card-header h5 {
    margin: 0;
    color: #2d3748;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

/* Tablas */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

table.dataTable {
    border-collapse: separate;
    border-spacing: 0;
}

table.dataTable thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

table.dataTable tbody td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

table.dataTable tbody tr {
    transition: background-color 0.2s;
}

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

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.85em;
    border-radius: 20px;
}

.badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.badge-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.badge-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Botones */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #1962e0 );
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1962e0 );
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #00aa25 0%,);
    color: #fff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #00aa25 0%,);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%);
    color: #fff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%);
    color: #fff;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, );
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #1b65ec 0%);
    color: #fff;
}

.btn-info:hover {
    background: linear-gradient(135deg, #1b65ec 0%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.btn-light {
    background: #fff;
    color: #2d3748;
    border: 1px solid #e2e8f0;
}

.btn-light:hover {
    background: #f8f9fa;
    border-color: #cbd5e0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875em;
}

/* Formularios */
.form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #003caa;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-label {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
}

.form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Modal Personalizado */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #003caa 0%, #002b76 100%);
    color: #fff;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 20px 25px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 20px 25px;
}

/* Gráficos */
canvas {
    max-height: 300px;
}

/* Alertas */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -260px;
    }
    
    #sidebar.active {
        margin-left: 0;
    }
    
    #content {
        width: 100%;
    }
    
    #content.active {
        width: calc(100% - 260px);
    }
    
    .content-area {
        padding: 0 15px 15px;
    }
    
    .top-navbar {
        padding: 15px;
    }
    
    .stats-card {
        margin-bottom: 15px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Utilidades */
.text-gradient {
    background: linear-gradient(135deg, #002b76 0%, #001a4d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

.shadow {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   ESTILOS PARA EL ESCÁNER QR (Validación)
   ============================================ */

.scanner-section {
    margin-bottom: 30px;
}

.scanner-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#reader {
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#reader video {
    width: 100%;
    height: auto;
    border-radius: 15px;
}

#reader canvas {
    display: none;
}

.camera-switch {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.camera-switch:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.camera-switch:active {
    transform: scale(0.95);
}

.manual-input {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.manual-input h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.info-text {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
}

.rut-display {
    margin-top: 15px;
    padding: 12px;
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
}

.rut-display strong {
    color: #1e40af;
}

#rutExtraido {
    font-size: 1.1em;
    color: #1e40af;
    font-weight: bold;
}

.result-container {
    margin-top: 25px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    display: none;
    position: relative;
}

.result-container.result-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    color: #155724;
}

.result-container.result-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
    color: #721c24;
}

.result-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.result-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-message {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.visitor-details {
    margin-top: 20px;
    text-align: left;
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: bold;
    color: #333;
}

.detail-value {
    color: #555;
}

.loading {
    text-align: center;
    padding: 30px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 1.1em;
}

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

.stat-card {
    background: linear-gradient(135deg, #e1e4ef 0%, #d1d6e3 100%);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Responsive para el escáner */
@media (max-width: 768px) {
    .scanner-container {
        max-width: 100%;
    }
    
    #reader {
        min-height: 250px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input {
        width: 100%;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ESTILOS PARA LOGOS EN HEADER DE RESERVAS
   ============================================ */

/* Layout del header con logos */
.header-logos-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Logo izquierda */
.logo-izquierda {
    flex-shrink: 0;
    z-index: 10;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

/* Logo derecha */
.logo-derecha {
    flex-shrink: 0;
    z-index: 10;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

/* Título central */
.header-titulo-centro {
    flex: 1;
    text-align: center;
    z-index: 10;
    padding: 0 20px;
    min-width: 0; /* Permite que el texto se ajuste */
    position: relative;
}

.header-titulo-centro h1 {
    margin: 0 0 10px 0;
    color: #084298;
    font-size: 2.2em;
    word-wrap: break-word;
}

/* Imágenes de logos en header */
.logo-header-img {
    max-height: 60px;
    height: auto;
    width: auto;
    display: block;
    position: relative;
    z-index: 11;
}

/* Logo 3 como fondo */
.logo-fondo-azul {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    
}

.logo-fondo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
   
}

/* Asegurar que el container tenga posición relativa */
.container {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.85);
}

/* Responsive para logos */
@media (max-width: 768px) {
    .header-logos-layout {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 15px;
        align-items: flex-start;
    }
    
    .logo-izquierda {
        order: 1;
        flex: 0 0 auto;
        min-width: auto;
        width: auto;
    }
    
    .logo-derecha {
        order: 2;
        flex: 0 0 auto;
        min-width: auto;
        width: auto;
    }
    
    .header-titulo-centro {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        padding: 10px 10px 0 10px;
        margin-top: 10px;
    }
    
    .header-titulo-centro h1 {
        font-size: 1.5em;
    }
    
    .header-titulo-centro h2 {
        font-size: 1.2em;
    }
    
    .logo-header-img {
        max-height: 50px;
    }
}
