/* ==============================================================================
   ESTILOS DE AUTENTICAÇÃO, CARDS E OTP (MODERNO & RESPONSIVO)
   ============================================================================== */

:root {
    --auth-bg: #090d16;
    --auth-card-bg: rgba(17, 24, 39, 0.92);
    --auth-border: rgba(255, 255, 255, 0.08);
    --auth-primary: #6366f1;
    --auth-primary-hover: #4f46e5;
    --auth-success: #22c55e;
    --auth-success-hover: #16a34a;
    --auth-warning: #f59e0b;
    --auth-warning-hover: #d97706;
    --auth-text: #f8fafc;
    --auth-text-muted: #94a3b8;
    --auth-input-bg: rgba(15, 23, 42, 0.85);
    --auth-input-border: rgba(255, 255, 255, 0.12);
}

.auth-fullscreen-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.15), transparent 70%), var(--auth-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-sizing: border-box;
    animation: authFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authFadeIn {
    from { opacity: 0; transform: scale(0.97) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.auth-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.5rem;
    color: #818cf8;
}

.auth-icon-badge.badge-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
    border-color: rgba(99, 102, 241, 0.35);
    color: #818cf8;
}

.auth-icon-badge.badge-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.15));
    border-color: rgba(34, 197, 94, 0.35);
    color: #4ade80;
}

.auth-icon-badge.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 179, 8, 0.15));
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.auth-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--auth-text);
    margin: 0 0 0.5rem 0;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--auth-text-muted);
    line-height: 1.5;
    margin: 0;
}

.auth-form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.auth-form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    margin-bottom: 0.45rem;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-input-wrapper .auth-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--auth-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.auth-input-wrapper input {
    padding-left: 2.75rem !important;
}

.auth-input-wrapper .auth-eye-toggle {
    position: absolute;
    right: 1rem;
    color: var(--auth-text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-input-wrapper .auth-eye-toggle:hover {
    color: var(--auth-text);
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: 0.75rem;
    color: var(--auth-text);
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.auth-card input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.auth-input-otp {
    text-align: center !important;
    letter-spacing: 0.6rem !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #a5b4fc !important;
}

.auth-btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-btn:hover {
    transform: translateY(-1px);
}

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

.auth-btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}
.auth-btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
}

.auth-btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}
.auth-btn-success:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.auth-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}
.auth-btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.auth-btn-secondary {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
}
.auth-btn-secondary:hover {
    background: rgba(99, 102, 241, 0.22);
}

.auth-forgot-wrap {
    text-align: center;
    margin-top: 1rem;
}

.auth-forgot-wrap a {
    font-size: 0.8rem;
    color: var(--auth-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-forgot-wrap a:hover {
    color: var(--auth-primary);
}

.auth-footer-divider {
    margin-top: 1.8rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-border);
    text-align: center;
}

.auth-footer-divider p {
    font-size: 0.82rem;
    color: var(--auth-text-muted);
    margin: 0 0 0.85rem 0;
}

.auth-links-col {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.82rem;
}

.auth-links-col a {
    text-decoration: none;
    transition: color 0.2s;
}

.link-resend {
    color: var(--auth-primary);
    font-weight: 700;
}
.link-resend:hover {
    text-decoration: underline;
}

.link-back {
    color: var(--auth-text-muted);
}
.link-back:hover {
    color: var(--auth-text);
}

/* Spinner de Loading */
.auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.6s linear infinite;
}

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

.hidden {
    display: none !important;
}

.auth-btn-loading .btn-text {
    display: none;
}
.auth-btn-loading .auth-spinner {
    display: block !important;
}
