:root {
    /* Paleta original mantida */
    --blue: #0b1e3a;
    --fg: #ffffff;
    --accent: #ffbf7b;
    --muted: #94a3b8;

    /* Variantes refinadas para o visual minimalista */
    --bg-deep: #050c18;
    --glass-surf: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.02);
    --input-focus: rgba(255, 255, 255, 0.05);
    --primary-grad: linear-gradient(135deg, #ffbf7b 0%, #ff9e42 100%);
    --shadow-soft: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    /* Fundo sutil e profundo */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(11, 30, 58, 0.8) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 191, 123, 0.05) 0%, transparent 40%);
    color: var(--fg);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100dvh;
    padding: clamp(12px, 2vh, 24px) 0;
    overflow-x: hidden;
    overflow-y: auto;
    /* Remove barra se o conteúdo couber */
}

@media (min-height: 900px) {
    body {
        align-items: center;
    }
}

/* Container centralizado e limpo */
.container {
    width: 100%;
    max-width: 1100px;
    padding: 0 2rem;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    /* Lado direito levemente maior */
    gap: 0;
    /* Removendo gap para unir os painéis se quiser, ou manter separado estilo card flutuante */
    background: var(--glass-surf);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    width: 100%;
    min-height: 560px;
}

/* === Lado Esquerdo: Formulário === */
.auth-card {
    padding: clamp(1.8rem, 2.6vw, 3rem) clamp(2rem, 3vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-sub {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

/* Campos */
.field {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.5rem;
    margin-left: 4px;
}

.input {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.input:focus {
    outline: none;
    background: var(--input-focus);
    border-color: rgba(255, 191, 123, 0.3);
    /* Accent color suave */
    box-shadow: 0 0 0 4px rgba(255, 191, 123, 0.05);
    transform: translateY(-1px);
}

.input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Toggle Senha */
.pw-wrap {
    position: relative;
}

.pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.pw-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Ações secundárias */
.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.row.only-link {
    justify-content: flex-end;
}

.link {
    color: var(--accent);
    font-weight: 500;
    transition: opacity 0.2s;
}

.link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Botão Principal */
.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    border: none;
    background: var(--primary-grad);
    color: #0b1e3a;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(255, 191, 123, 0.25);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 191, 123, 0.35);
}

.btn:active {
    transform: scale(0.98);
}

.btn-secondary {
    margin-top: 0.75rem;
    background: transparent;
    color: var(--fg);
    border: 1px solid rgba(255, 191, 123, 0.35);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 191, 123, 0.08);
    border-color: rgba(255, 191, 123, 0.6);
    box-shadow: none;
}

.terms {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.terms-signup {
    font-size: 0.95rem;
}

/* === Lado Direito: Visual/Branding === */
.side {
    background: linear-gradient(180deg, rgba(11, 30, 58, 0.6) 0%, rgba(11, 30, 58, 0.2) 100%);
    padding: clamp(2rem, 2.6vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border-left: 1px solid var(--glass-border);
    overflow: hidden;
}

/* Elementos decorativos animados */
.side::before,
.side::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.4;
}

.side::before {
    top: -10%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: var(--blue);
}

.side::after {
    bottom: -10%;
    right: 20%;
    width: 200px;
    height: 200px;
    background: var(--accent);
}

.side-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.side-body {
    margin-top: auto;
    margin-bottom: auto;
}

.big {
    font-size: clamp(2.2rem, 4.1vw, 3rem);
    line-height: 1.1;
    font-weight: 800;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.03em;
}

.big span {
    color: var(--accent);
}

.muted {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.7;
    max-width: 90%;
}

/* Bullet points minimalistas */
.bullets {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bullet {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: 0.2s;
}

.bullet:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.ico {
    font-size: 1.2rem;
}

.bullet h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.bullet p {
    display: none;
}

/* Ocultando descrição para ficar minimalista, ou manter se curto */

/* Responsivo */
@media (max-width: 900px) {
    .grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: auto;
        max-height: none;
    }

    .side {
        display: none;
    }

    /* Ocultar side em mobile p/ foco total no login */
    .auth-card {
        padding: 2rem;
    }
}

@media (max-height: 860px) {
    .grid {
        min-height: 500px;
    }

    .field {
        margin-bottom: 1.1rem;
    }

    .row {
        margin-bottom: 1.2rem;
    }

    .terms {
        margin-top: 1rem;
    }
}

/* Estados de Erro */
.input.is-invalid {
    border-color: #ef4444;
}

.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.4rem;
    font-weight: 600;
}

.caps-warn {
    margin-top: 0.4rem;
    color: #ffd3ae;
    font-size: 0.78rem;
    font-weight: 800;
}

/* Canvas no fundo */
#bgfx {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.6;
}
