/* Login · MaxHub ---------------------------------------------------- */
:root {
    --marca: #c41f25;
    --marca-forte: #a3181d;
    --marca-clara: #ff6b70;
    --anel: rgba(196, 31, 37, .2);
    --tinta: #141824;
    --texto: #2a3040;
    --suave: #687083;
    --fraco: #9aa1b2;
    --borda: #e2e5ec;
    --campo: #f6f7f9;
    --erro: #c81e1e;
    --sucesso: #15803d;
    --noite: #0b0d13;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--texto);
    background: var(--noite);
    -webkit-font-smoothing: antialiased;
}

.login {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(400px, 520px);
    align-items: center;
    gap: 48px;
    padding: 48px clamp(24px, 6vw, 96px);
    overflow: hidden;
    isolation: isolate;
}

/* Fundo ------------------------------------------------------------ */
.fundo { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.fundo-grade {
    position: absolute; inset: -2px;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(1100px 700px at 30% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(1100px 700px at 30% 40%, #000 30%, transparent 75%);
}
.fundo-brilho { position: absolute; border-radius: 50%; filter: blur(80px); }
.fundo-brilho.b1 { width: 620px; height: 620px; left: -160px; top: -200px; background: rgba(196, 31, 37, .32); animation: brilho 16s ease-in-out infinite; }
.fundo-brilho.b2 { width: 520px; height: 520px; right: 10%; bottom: -260px; background: rgba(196, 31, 37, .22); animation: brilho 20s ease-in-out infinite reverse; }
.fundo-x {
    position: absolute;
    left: 38%;
    top: 50%;
    width: min(64vh, 620px);
    transform: translate(-50%, -50%) rotate(-8deg);
    overflow: visible;
    opacity: .9;
}
.fx-cheio { fill: rgba(196, 31, 37, .07); }
.fx-traco {
    fill: none; stroke: rgba(255, 107, 112, .55); stroke-width: .35; stroke-linejoin: round;
    stroke-dasharray: 100; stroke-dashoffset: 100;
    animation: desenhar 3.2s cubic-bezier(.65, 0, .35, 1) .2s forwards, pulsar 6s ease-in-out 3.6s infinite;
}
@keyframes desenhar { to { stroke-dashoffset: 0; } }
@keyframes pulsar { 0%, 100% { stroke: rgba(255, 107, 112, .55); } 50% { stroke: rgba(255, 107, 112, .2); } }
@keyframes brilho { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, 40px); } }

/* Marca ------------------------------------------------------------ */
.marca { color: #fff; max-width: 560px; animation: subir .7s cubic-bezier(.2, .8, .2, 1) both; }
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo svg { width: 38px; height: auto; filter: drop-shadow(0 6px 18px rgba(196, 31, 37, .55)); }
.logo-texto { font-size: 2rem; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.logo-texto strong { font-weight: 800; color: var(--marca-clara); }
.marca h1 { margin-top: 56px; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.06; font-weight: 800; letter-spacing: -.035em; }
.marca h1 span { background: linear-gradient(90deg, #ff8a8e, var(--marca) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.marca > p { margin-top: 20px; max-width: 470px; font-size: 1.05rem; line-height: 1.6; color: rgba(255, 255, 255, .66); }
.destaques { list-style: none; margin-top: 34px; display: flex; flex-direction: column; gap: 12px; }
.destaques li { display: inline-flex; align-items: center; gap: 12px; font-size: .95rem; color: rgba(255, 255, 255, .82); font-weight: 500; }
.destaques .material-icons-round { width: 36px; height: 36px; flex: 0 0 36px; overflow: hidden; border-radius: 10px; display: grid; place-items: center; font-size: 20px; color: #ff8a8e; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09); }

/* Painel / cartão --------------------------------------------------- */
.painel { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: subir .7s cubic-bezier(.2, .8, .2, 1) .08s both; }
.cartao {
    width: 100%;
    background: #fff;
    border-radius: 22px;
    padding: 38px 36px 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06);
}
.cartao-topo { margin-bottom: 26px; }
.logo-pequeno { display: none; margin-bottom: 22px; }
.logo-pequeno .logo-texto { font-size: 1.5rem; color: var(--tinta); }
.logo-pequeno .logo-texto strong { color: var(--marca); }
.logo-pequeno svg { width: 28px; }
.cartao h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.025em; color: var(--tinta); }
.cartao-topo p { margin-top: 6px; color: var(--suave); font-size: .92rem; line-height: 1.5; }

.campo { margin-bottom: 16px; }
.campo label { display: block; margin-bottom: 7px; font-size: .82rem; font-weight: 600; color: var(--texto); }
.campo-entrada {
    position: relative; display: flex; align-items: center; gap: 10px;
    height: 50px; padding: 0 14px;
    background: var(--campo); border: 1.5px solid transparent; border-radius: 12px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.campo-entrada:hover { border-color: var(--borda); }
.campo-entrada:focus-within { background: #fff; border-color: var(--marca); box-shadow: 0 0 0 4px var(--anel); }
.campo-entrada > .material-icons-round { width: 20px; overflow: hidden; flex: 0 0 20px; font-size: 20px; color: var(--fraco); transition: color .15s; }
.campo-entrada:focus-within > .material-icons-round { color: var(--marca); }
.campo-entrada input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: .98rem; color: var(--tinta); }
.campo-entrada input::placeholder { color: #b3b9c6; }
.campo-entrada input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--campo) inset; -webkit-text-fill-color: var(--tinta); }
.campo-entrada:focus-within input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; }
.campo-entrada.invalido { border-color: var(--erro); background: #fff; box-shadow: 0 0 0 4px rgba(200, 30, 30, .12); animation: tremer .32s; }
.ver-senha { display: grid; place-items: center; width: 34px; height: 34px; margin-right: -6px; border: 0; border-radius: 9px; background: none; color: var(--fraco); cursor: pointer; }
.ver-senha:hover { background: rgba(0, 0, 0, .05); color: var(--texto); }
.ver-senha .material-icons-round { width: 20px; overflow: hidden; font-size: 20px; }
.aviso-caps { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; font-size: .78rem; font-weight: 600; color: #b45309; }
.aviso-caps .material-icons-round { font-size: 16px; }

.lembrar { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; font-size: .86rem; color: var(--suave); cursor: pointer; user-select: none; }
.lembrar input { position: absolute; opacity: 0; pointer-events: none; }
.lembrar .caixa { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 6px; border: 1.5px solid #c7ccd6; display: grid; place-items: center; transition: .15s; }
.lembrar .caixa .material-icons-round { font-size: 15px; color: #fff; opacity: 0; transform: scale(.6); transition: .15s; }
.lembrar input:checked + .caixa { background: var(--marca); border-color: var(--marca); }
.lembrar input:checked + .caixa .material-icons-round { opacity: 1; transform: none; }
.lembrar input:focus-visible + .caixa { box-shadow: 0 0 0 4px var(--anel); }

.mensagem { margin-bottom: 14px; padding: 11px 14px; border-radius: 11px; font-size: .86rem; font-weight: 500; line-height: 1.45; }
.mensagem.erro { background: #fef2f2; color: var(--erro); border: 1px solid #fecaca; }
.mensagem.sucesso { background: #f0fdf4; color: var(--sucesso); border: 1px solid #bbf7d0; }

.botao-entrar {
    position: relative; width: 100%; height: 52px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 13px;
    background: linear-gradient(180deg, #d4262c, var(--marca));
    color: #fff; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 12px 26px -12px rgba(196, 31, 37, .8), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .12s, box-shadow .15s, filter .15s;
    overflow: hidden;
}
.botao-entrar:hover { filter: brightness(1.06); box-shadow: 0 16px 30px -12px rgba(196, 31, 37, .9), inset 0 1px 0 rgba(255, 255, 255, .18); }
.botao-entrar:active { transform: translateY(1px); }
.botao-entrar:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--anel); }
.botao-seta { width: 20px; overflow: hidden; font-size: 20px; transition: transform .2s; }
.botao-entrar:hover .botao-seta { transform: translateX(3px); }
.botao-carregando { display: none; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: girar .7s linear infinite; }
.botao-entrar.carregando { cursor: progress; }
.botao-entrar.carregando .botao-texto, .botao-entrar.carregando .botao-seta { display: none; }
.botao-entrar.carregando .botao-carregando { display: block; }
.botao-entrar.sucesso { background: linear-gradient(180deg, #19a250, var(--sucesso)); }
.botao-entrar:disabled { opacity: .92; }

.nota-convite { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: .84rem; font-weight: 500; }
.nota-convite .material-icons-round { font-size: 18px; }
.seguro { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; font-size: .76rem; color: var(--fraco); }
.seguro .material-icons-round { width: 15px; overflow: hidden; font-size: 15px; color: #16a34a; }
.rodape { font-size: .78rem; color: rgba(255, 255, 255, .42); }

@keyframes girar { to { transform: rotate(360deg); } }
@keyframes tremer { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes subir { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Telas menores ----------------------------------------------------- */
@media (max-width: 980px) {
    .login { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; padding: 32px 16px; align-content: center; }
    .marca { display: none; }
    .painel { width: 100%; max-width: 440px; }
    .logo-pequeno { display: inline-flex; }
    .fundo-x { left: 50%; width: 90vw; opacity: .55; }
}
@media (max-width: 420px) {
    .cartao { padding: 28px 22px 22px; border-radius: 18px; }
    .cartao h2 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
    .fx-traco { animation: none; stroke-dashoffset: 0; }
    .fundo-brilho, .marca, .painel { animation: none; }
}
