/* =========================================================
   SECOND NATURE - AUTH & ACCOUNT RECOVERY STYLES
   Estética minimalista inspirada en el modal de acceso
   Soporte completo para Tema Oscuro y Tema Claro
   ========================================================= */

.auth-page-wrapper {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.25rem;
    position: relative;
    box-sizing: border-box;
}

.auth-card {
    background: linear-gradient(160deg, #161618 0%, #0c0c0e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: clamp(2rem, 4vw, 2.8rem);
    position: relative;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
    font-family: 'Raleway', 'Inter', -apple-system, sans-serif;
    animation: authCardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

@keyframes authCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Raleway', sans-serif;
    font-size: 0.78rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-transform: lowercase;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.auth-card-title {
    font-family: 'Raleway', sans-serif !important;
    font-size: clamp(1.8rem, 3.5vw, 2.2rem) !important;
    font-weight: 200 !important;
    letter-spacing: -0.8px !important;
    margin: 0 0 0.45rem 0 !important;
    text-transform: lowercase !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: color 0.3s ease;
}

.auth-card-subtitle {
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.92rem;
    font-weight: 200;
    letter-spacing: 0.2px;
    line-height: 1.5;
    margin: 0;
    transition: color 0.3s ease;
}

.auth-info-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 200;
    transition: color 0.3s ease;
}

.auth-timer-hint {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin: -0.2rem 0 0.5rem 0;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    width: 100%;
    box-sizing: border-box;
}

.auth-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    text-align: left;
    width: 100%;
}

.auth-field-hint {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 300;
    margin-top: 0.2rem;
    display: block;
    font-family: 'Inter', sans-serif;
}

.auth-label {
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.3px;
    text-transform: lowercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.auth-label-link {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
    font-family: 'Inter', sans-serif;
}

.auth-label-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.auth-input,
.form-control {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.auth-input:focus,
.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
    background-color: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.auth-input::placeholder,
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Primary Button with Radial Glow and bottom light line */
.auth-btn-submit {
    width: 100%;
    position: relative;
    cursor: pointer;
    padding: 13px 20px;
    border: 0;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    background: radial-gradient(
        ellipse at bottom,
        rgba(71, 81, 92, 1) 0%,
        rgba(11, 21, 30, 1) 45%
    );
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Raleway', 'Inter', -apple-system, sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    outline: none;
    box-sizing: border-box;
    transition: all 0.5s cubic-bezier(0.15, 0.83, 0.66, 1);
    margin-top: 0.6rem;
}

.auth-btn-submit::before {
    content: "";
    width: 70%;
    height: 1px;
    position: absolute;
    bottom: 0;
    left: 15%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0.25;
    transition: all 0.5s cubic-bezier(0.15, 0.83, 0.66, 1);
}

.auth-btn-submit:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 10px 25px -8px rgba(0, 0, 0, 0.7);
}

.auth-btn-submit:hover::before {
    opacity: 0.9;
}

/* Secondary Outline Button */
.auth-btn-secondary {
    width: 100%;
    text-align: center;
    border-radius: 8px;
    padding: 12px 18px;
    font-family: 'Raleway', 'Inter', -apple-system, sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.4px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-weight: 300;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.auth-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Alert / Error Boxes */
.auth-alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: #fca5a5;
    font-size: 0.86rem;
    line-height: 1.4;
    text-align: left;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: #86efac;
    font-size: 0.86rem;
    line-height: 1.4;
    text-align: left;
}

.errorlist {
    color: #ef4444;
    font-size: 0.82rem;
    list-style: none;
    padding-left: 0;
    margin: 0.35rem 0 0 0;
}

/* OTP Code Box */
.auth-otp-input {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Mono', 'Courier New', monospace !important;
    font-size: 2.1rem !important;
    letter-spacing: 0.6rem !important;
    padding: 1rem !important;
    font-weight: 200 !important;
    background-color: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
}

.auth-otp-input:focus {
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.08) !important;
}

/* Footer Switch Links */
.auth-switch-text {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
    font-weight: 200;
}

.auth-switch-link {
    color: #ffffff;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-switch-link:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* =========================================================
   REFINAMIENTOS TEMA CLARO [data-theme="light"]
   ========================================================= */

[data-theme="light"] .auth-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .auth-badge-pill {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.09);
    color: #374151;
}

[data-theme="light"] .auth-card-title {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

[data-theme="light"] .auth-card-subtitle {
    color: #6b7280;
}

[data-theme="light"] .auth-info-text {
    color: #6b7280;
}

[data-theme="light"] .auth-timer-hint {
    color: #6b7280;
}

[data-theme="light"] .auth-field-hint {
    color: #64748b;
}

[data-theme="light"] .auth-label {
    color: #374151;
}

[data-theme="light"] .auth-label-link {
    color: #6b7280;
}

[data-theme="light"] .auth-label-link:hover {
    color: #111827;
}

[data-theme="light"] .auth-input,
[data-theme="light"] .form-control {
    background-color: #f9fafb;
    border-color: #e5e7eb;
    color: #111827;
}

[data-theme="light"] .auth-input:focus,
[data-theme="light"] .form-control:focus {
    background-color: #ffffff;
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

[data-theme="light"] .auth-input::placeholder,
[data-theme="light"] .form-control::placeholder {
    color: #9ca3af;
}

[data-theme="light"] .auth-btn-submit {
    background: #111827;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.18);
}

[data-theme="light"] .auth-btn-submit::before {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0.25;
}

[data-theme="light"] .auth-btn-submit:hover {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

[data-theme="light"] .auth-btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    color: #111827;
    border-color: #d1d5db;
}

[data-theme="light"] .auth-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.07);
    border-color: #9ca3af;
    color: #000000;
}

[data-theme="light"] .auth-otp-input {
    background-color: #f9fafb !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
}

[data-theme="light"] .auth-otp-input:focus {
    border-color: #111827 !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08) !important;
}

[data-theme="light"] .auth-switch-text {
    color: #6b7280;
}

[data-theme="light"] .auth-switch-link {
    color: #111827;
    border-bottom-color: rgba(17, 24, 39, 0.25);
}

[data-theme="light"] .auth-switch-link:hover {
    color: #000000;
    border-bottom-color: #000000;
}

[data-theme="light"] .auth-alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

[data-theme="light"] .auth-alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}