/* ============================================
   Recover Password Page Styles
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Sin fondo decorativo — fondo blanco puro */

/* ── Layout ───────────────────────────────── */
.page-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

/* ── Back link (dentro de la card, esquina sup izq) ── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    position: absolute;
    top: 1.5rem;
    left: 1.75rem;
    transition: color 0.2s ease;
    z-index: 1;
}

.back-link:hover {
    color: #06b6d4;
}

.back-link i {
    font-size: 0.9rem;
}

/* ── Card ─────────────────────────────────── */
.card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    padding-top: 3.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    border: 1px solid #f0f0f0;
    animation: fadeInUp 0.4s ease-out;
    position: relative;
}

/* ── Card Header ──────────────────────────── */
.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.icon-wrap {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(6, 182, 212, 0.22));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 32px;
    color: #06b6d4;
}

.card-header h1 {
    font-size: 1.625rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.card-header p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ── Divider ──────────────────────────────── */
.divider {
    height: 1px;
    background: #f3f4f6;
    margin-bottom: 2rem;
}

/* ── Form ─────────────────────────────────── */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    transition: all 0.3s ease;
    background: white;
    outline: none;
}

.form-input:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

/* ── Código de verificación (4 dígitos) ──────── */
.code-inputs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.code-input {
    width: 64px;
    height: 72px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    background: white;
    -moz-appearance: textfield;
}

.code-input::-webkit-outer-spin-button,
.code-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.code-input:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.code-input.filled {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.04);
}

.code-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.resend-note {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.resend-note a {
    color: #06b6d4;
    font-weight: 600;
    text-decoration: none;
}

.resend-note a:hover {
    text-decoration: underline;
}

.resend-note a.disabled {
    color: #9ca3af;
    pointer-events: none;
    text-decoration: none;
}

#resendTimer {
    color: #9ca3af;
}

.email-highlight {
    display: inline-block;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: #0e7490;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

/* ── Submit Button ────────────────────────── */
.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: #06b6d4;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 400px;
    height: 400px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.35);
}

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

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-submit span,
.btn-submit i {
    position: relative;
    z-index: 1;
}

/* ── Messages ─────────────────────────────── */
.message {
    display: none;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    animation: slideIn 0.3s ease-out;
}

.message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.04));
    border: 1.5px solid #ef4444;
    color: #991b1b;
}

.message i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.message.error i {
    color: #ef4444;
}

/* ── Info Note ────────────────────────────── */
.info-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.875rem 1rem;
    background: rgba(6, 182, 212, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(6, 182, 212, 0.15);
}

.info-note i {
    color: #06b6d4;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-note span {
    font-size: 0.825rem;
    color: #4b5563;
    line-height: 1.55;
}

/* ── Card Footer ──────────────────────────── */
.card-footer {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.card-footer a {
    color: #06b6d4;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.card-footer a:hover {
    text-decoration: underline;
}

/* ── Estados ocultos / Success State ──────── */
.hidden-state {
    display: none;
}

#successState {
    text-align: center;
    animation: fadeInUp 0.4s ease-out;
}

#successState .success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 36px;
    color: #10b981;
}

#successState h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

#successState p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.success-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 1.5rem 0;
}

/* ── Back Button ──────────────────────────── */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-back:hover {
    background: #e5e7eb;
}

/* ── Animations ───────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

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

.spinning {
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 400px) {
    .code-input {
        width: 54px;
        height: 62px;
        font-size: 1.5rem;
    }
}