:root {
    --navy: #0a2540;
    --orange: #ff6b00;
    --green: #24b47e;
    --light: #f6f9fc;
    --border: #e3e8ee;
    --white: #ffffff;
    --shadow: 0 15px 35px rgba(50, 50, 93, .1), 0 5px 15px rgba(0, 0, 0, .07);
}

* {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--light);
    margin: 0;
    padding-bottom: 100px;
    color: var(--navy);
}

/* NAVBAR */
.navbar {
    background: var(--navy);
    padding: 1.2rem 20px;
    color: white;
    display: flex;
    justify-content: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.logo span {
    color: var(--orange);
}

.nav-btn-home {
    color: #adbdcc;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

/* STEPPER */
.stepper {
    background: white;
    padding: 25px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.25;
    transition: 0.4s;
}

.step.active {
    opacity: 1;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step.active .step-num {
    background: var(--navy);
    color: white;
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--border);
    margin: 0 15px;
}

/* LAYOUTS */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 60vh;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

.layout-centered {
    display: flex;
    justify-content: center;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* CARDS VISITANTES */
.visitor-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    position: relative;
}

.card-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.v-header {
    font-weight: 800;
    color: var(--orange);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.input-pro,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 0.95rem;
}

.input-pro:focus {
    border-color: var(--orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.btn-card-del {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #cbd5e0;
    cursor: pointer;
}

/* BOTONES (ESTILO CORREGIDO) */
button {
    cursor: pointer;
    transition: 0.2s;
    border: none;
    font-family: inherit;
}

.btn-add-visitor {
    width: 100%;
    background: #fff;
    border: 2px dashed var(--border);
    padding: 15px;
    border-radius: 10px;
    font-weight: 700;
    color: var(--navy);
    margin-top: 10px;
}

.btn-add-visitor:hover {
    border-color: var(--orange);
    background: #fffaf5;
}

.btn-main-action {
    background: var(--orange);
    color: white;
    padding: 18px;
    width: 100%;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.btn-main-action:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-text {
    background: none;
    color: #6b7280;
    text-decoration: underline;
    margin-top: 15px;
    width: 100%;
}

/* SIDEBAR SUMMARY */
.summary-box {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 20px;
}

.s-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 600;
}

.s-discount {
    color: var(--green);
}

.s-total {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy);
    border-top: 1px solid var(--border);
    padding-top: 15px;
    margin-top: 10px;
}

/* NOTA LEGAL */
.legal-notice {
    background: #fff8eb;
    border: 1px solid #ffeeba;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #856404;
    line-height: 1.4;
    margin-top: 15px;
}

/* PAGO SEGURO */
.payment-card {
    background: white;
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 35px;
}

.p-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.p-total {
    background: var(--navy);
    color: white;
    padding: 6px 15px;
    border-radius: 50px;
    font-weight: 700;
}

.p-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

/* PANTALLA ÉXITO Y BOTONES FINALES */
.success-screen {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.success-icon {
    font-size: 4rem;
    color: var(--green);
    margin-bottom: 10px;
}

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-print-final {
    background: var(--navy);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
}

.btn-reload-final {
    background: #edf2f7;
    color: var(--navy);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
}

/* TICKETS */
.tickets-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.ticket-card {
    background: white;
    width: 320px;
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-align: left;
}

.t-color {
    width: 10px;
    background: var(--navy);
}

.t-info {
    flex: 1;
    padding: 20px;
}

.t-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.t-info p {
    margin: 4px 0;
    font-size: 0.8rem;
    color: #64748b;
}

.t-qr {
    background: #f8fbff;
    padding: 20px;
    display: flex;
    align-items: center;
    border-left: 1px dashed var(--border);
}

/* FOOTER FIJO CENTRADO */
.footer-fixed {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: white;
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    z-index: 100;
}

.footer-fixed p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* OVERLAY CARGA CENTRADO ABSOLUTO */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 37, 64, 0.98);
    display: flex;
    align-items: center;
    /* Centrado vertical */
    justify-content: center;
    /* Centrado horizontal */
    z-index: 9999;
}

.loader-box {
    text-align: center;
    color: white;
}

.custom-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.badge-status {
    background: #fff3cd;
    color: #856404;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    display: inline-block;
    margin-top: 10px;
}