/* ═══════════════════════════════════════════════
   LOGIN — COMPARTILHADO
   Carregado após base.css, que já fornece :root,
   reset global e body::after (ruído de textura).
   Este arquivo cuida apenas do layout da tela
   de login.
   ═══════════════════════════════════════════════ */

body {
    font-size: 16px;
    line-height: var(--line-height-loose);
}

/* Aviso de sessão expirada */
.timeout_aviso {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: #dc2626;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 100;
    animation: fadeUp 0.3s ease forwards;
    white-space: nowrap;
}

/* Grade de fundo decorativa */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(42,92,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42,92,255,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black, transparent);
    pointer-events: none;
    z-index: 0;
}

/* ── Área central ── */
main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background:
        radial-gradient(ellipse 70% 60% at 30% 40%, rgba(26,63,212,0.15) 0%, transparent 65%),
        radial-gradient(ellipse 50% 50% at 80% 70%, rgba(10,20,80,0.2) 0%, transparent 70%);
}

/* ── Card principal ── */
.login_div_corpo {
    display: flex;
    width: 100%;
    max-width: 800px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--modal-shadow);
    backdrop-filter: blur(16px);
    overflow: hidden;
    animation: fadeUp 0.6s ease forwards;
}

/* ── Painel esquerdo (apresentação da marca) ── */
.login_div_apresentacao {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1.2;
    padding: 52px 32px;
    background: linear-gradient(145deg, var(--login-left-start), var(--login-left-end));
    border-right: 1px solid var(--border);
    overflow: hidden;
    text-align: center;
}

.login_div_apresentacao::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42,92,255,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42,92,255,0.07) 1px, transparent 1px);
    background-size: 40px 40px;
}

.brand-label {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cobalt-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-label::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--cobalt-bright);
    flex-shrink: 0;
}

.login_div_apresentacao h1 {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
    background: linear-gradient(135deg, var(--white) 0%, var(--cobalt-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.login_div_apresentacao h2 {
    position: relative;
    z-index: 1;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    line-height: var(--line-height-loose);
}

/* Anéis decorativos animados */
.brand-decoration {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

.brand-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(42,92,255,0.15);
    animation: ringpulse 4s ease-in-out infinite;
}

.brand-ring:nth-child(1) { width: 140px; height: 140px; animation-delay: 0s; }
.brand-ring:nth-child(2) { width: 230px; height: 230px; animation-delay: 0.8s; }
.brand-ring:nth-child(3) { width: 320px; height: 320px; animation-delay: 1.6s; }

@keyframes ringpulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%       { opacity: 0.15; transform: scale(1.04); }
}

/* ── Painel direito (formulário) ── */
.login_div_entrada {
    display: flex;
    flex: 1.5;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px 40px;
}

.login_formulario {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 320px;
}

.login_div_inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login_div_inputs h1 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
}

.login_div_inputs label {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

.login_div_inputs input {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.login_div_inputs input:focus {
    border-color: var(--cobalt-bright);
    box-shadow: var(--focus-ring);
}

.login_div_inputs input::placeholder { color: var(--text-dim); }

/* ── Botões ── */
.login_div_btn { display: flex; gap: 12px; }

.login_div_btn button {
    flex: 1;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.login_div_btn button[type="submit"] {
    background: var(--cobalt-bright);
    color: var(--white);
    box-shadow: 0 4px 20px var(--cobalt-glow);
}

.login_div_btn button[type="submit"]:hover {
    background: var(--cobalt-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--cobalt-glow);
}

.login_div_btn button[type="reset"] {
    background: transparent;
    border: 1px solid var(--border-btn);
    color: var(--text-muted);
}

.login_div_btn button[type="reset"]:hover {
    border-color: var(--cobalt-bright);
    background: var(--cobalt-pale);
    color: var(--text);
}

/* ── Animações ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .login_div_corpo {
        flex-direction: column;
        max-width: 100%;
    }

    .login_div_apresentacao {
        flex: none;
        padding: 36px 24px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .brand-ring:nth-child(3) { display: none; }

    .login_div_entrada { padding: 36px 24px; }

    .login_formulario { max-width: 100%; }

    @media (orientation: landscape) {
        .login_div_corpo { flex-direction: row; }
        .login_div_apresentacao {
            border-right: 1px solid var(--border);
            border-bottom: none;
        }
    }
}
