* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ENCABEZADO BLANCO */
.white-header {
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container .logo-img {
    height: 45px;
    width: auto;
    display: block;
}

.back-button {
    background-color: #e0e0e0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    transition: background 0.3s;
}

.back-button:hover {
    background-color: #ccc;
}

/* OTP CONTAINER */
.otp-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
    flex: 1;
}

.otp-card {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    text-align: center;
    border-top: 4px solid #26ac47;
}

.otp-icon {
    font-size: 3rem;
    color: #26ac47;
    margin-bottom: 1rem;
}

.otp-card h2 {
    color: #1a2b4c;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.otp-card p {
    color: #666;
    margin-bottom: 0.5rem;
}

/* ========== OTP INPUTS - COMPACTOS EN 1 LÍNEA ========== */
.otp-input-group {
    margin-bottom: 1.5rem;
}

.otp-input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #333;
}

.otp-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.2rem 0;
}

.otp-digit {
    width: 48px;
    height: 58px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 10px;
    background-color: white;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
}

.otp-digit::-webkit-inner-spin-button,
.otp-digit::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
    display: none;
}

.otp-digit:focus {
    outline: none;
    border-color: #26ac47;
    box-shadow: 0 0 0 3px rgba(38,172,71,0.1);
}

/* Botón verificar */
.verify-btn {
    background-color: #26ac47;
    color: white;
    border: none;
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 1rem;
}

.verify-btn:hover {
    background-color: #1e8c3a;
}

/* Sección reenviar */
.resend-section {
    margin-top: 1rem;
}

.resend-section p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.resend-btn {
    background: none;
    border: none;
    color: #26ac47;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.resend-btn:hover {
    text-decoration: underline;
}

.resend-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.timer {
    font-size: 0.8rem;
    color: #888;
}

.timer span {
    font-weight: bold;
    color: #ff6600;
}

/* Mensaje */
.otp-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

/* FOOTER VERDE PEGADO ABAJO */
footer {
    background-color: #26ac47;
    color: white;
    text-align: center;
    padding: 1.2rem;
    margin-top: auto;
}

/* SPINNER Y MODALES */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.spinner-container {
    background: white;
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.spinner-dots {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
}

.spinner-dot {
    width: 20px;
    height: 20px;
    background-color: #26ac47;
    border-radius: 50%;
    animation: wormAnimation 0.8s infinite ease-in-out;
}

.spinner-container p {
    color: #1a2b4c;
    font-weight: 500;
}

@keyframes wormAnimation {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
        background-color: #1e8c3a;
    }
}

/* MODAL ERROR */
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2001;
}

.error-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    max-width: 350px;
    animation: slideIn 0.3s ease;
}

.error-content i {
    font-size: 4rem;
    color: #d32f2f;
    margin-bottom: 1rem;
}

.error-content h3 {
    color: #d32f2f;
    margin-bottom: 0.5rem;
}

.error-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

.error-content button {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.error-content button:hover {
    background-color: #b71c1c;
}

/* MODAL ÉXITO */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2001;
}

.success-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    max-width: 350px;
    animation: slideIn 0.3s ease;
}

.success-content i {
    font-size: 4rem;
    color: #26ac47;
    margin-bottom: 1rem;
}

.success-content h3 {
    color: #26ac47;
    margin-bottom: 0.5rem;
}

.success-content p {
    color: #666;
}

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

/* ========== RESPONSIVE - MÓVIL ========== */
@media (max-width: 480px) {
    .otp-card {
        padding: 1.5rem;
    }
    
    /* OTP aún más compacto en móvil */
    .otp-digit {
        width: 38px;
        height: 46px;
        font-size: 1.2rem;
        border-radius: 8px;
    }
    
    .otp-inputs {
        gap: 0.3rem;
    }
    
    .white-header {
        padding: 0.6rem 1rem;
    }
    .logo-img {
        height: 35px;
    }
}

/* ========== PARA PANTALLAS MUY PEQUEÑAS ========== */
@media (max-width: 380px) {
    .otp-digit {
        width: 32px;
        height: 40px;
        font-size: 1rem;
        border-radius: 6px;
    }
    
    .otp-inputs {
        gap: 0.2rem;
    }
}
