@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #3b82f6;
    --accent: #38bdf8;
    --bg-dark: #09090b;
    --bg-card: rgba(17, 17, 27, 0.8);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(255, 255, 255, 0.03);
    --gradient-1: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Elements */
.bg-glow {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}

.glow-1 {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.15) 0%, transparent 70%);
    filter: blur(80px);
}

.glow-2 {
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    filter: blur(100px);
}

.login-container {
    width: 100%;
    max-width: 1100px;
    margin: 20px;
    display: flex;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Left side: Visuals */
.login-visual {
    flex: 1;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1614850523296-e8c041de83a4?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.login-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(225deg, rgba(96, 165, 250, 0.4) 0%, transparent 100%);
}

.visual-content {
    position: relative;
    z-index: 1;
}

.visual-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.visual-content p {
    color: #e2e8f0;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 400px;
}

/* Right side: Form */
.login-form-side {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 40px;
}

.logo-box {
    margin-bottom: 30px;
}

.logo-box img {
    height: 45px;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-header p {
    color: var(--text-dim);
}

/* Alert Styling */
.alert {
    padding: 15px 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

/* --- ESTILO RADICAL DE BOTÕES (MÉTODO DE RECUPERAÇÃO) --- */
.reset-method-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border: none;
    background: none;
}

.radio-option-card {
    flex: 1;
    position: relative;
}

/* FORÇA O RÁDIO A SUMIR */
.radio-option-card input[type="radio"] {
    display: none !important;
    visibility: hidden !important;
}

.radio-option-card span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    color: var(--text-dim);
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    width: 100%;
    user-select: none;
}

.radio-option-card:hover span {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ESTADO SELECIONADO: BOTÃO PREMIUM ATIVO */
.radio-option-card input[type="radio"]:checked + span {
    background: rgba(96, 165, 250, 0.15);
    border-color: var(--primary);
    color: white;
    box-shadow: 
        0 0 25px rgba(96, 165, 250, 0.3),
        inset 0 0 10px rgba(96, 165, 250, 0.1);
    transform: scale(1.02);
}

.radio-option-card input[type="radio"]:checked + span i {
    color: var(--primary);
    filter: drop-shadow(0 0 5px var(--primary));
}

/* -------------------------------------------------------- */

/* Form Styling General */
.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1.2rem;
    transition: 0.3s;
}

.styled-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px 18px 55px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
    outline: none;
}

.styled-input:focus {
    border-color: var(--primary);
    background: rgba(96, 165, 250, 0.05);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.1);
}

.styled-input:focus + .input-icon {
    color: var(--primary);
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
    margin-top: -10px;
}

.forgot-link {
    color: var(--primary);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid transparent;
}

.forgot-link:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.submit-btn {
    width: 100%;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 10px 25px rgba(96, 165, 250, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(96, 165, 250, 0.5);
}

.submit-btn.loading {
    pointer-events: none;
    position: relative;
    padding-left: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    top: 50%;
    left: 20px;
    margin-top: -11px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

.form-footer {
    margin-top: 40px;
    text-align: center;
    color: var(--text-dim);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

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

/* Mobile Responsive */
@media (max-width: 992px) {
    .login-visual {
        display: none;
    }
    .login-container {
        max-width: 500px;
    }
}

@media (max-width: 576px) {
    .login-form-side {
        padding: 40px 25px;
    }
    .login-container {
        border-radius: 24px;
    }
}
