/* ============================================================================
   Tela de login (Views/Account/Login.cshtml) — pensada primeiro para o CELULAR.
   Celular: topo colorido com a logo + cartão de entrar subindo de baixo (como app).
   Computador: tela dividida — painel colorido à esquerda, formulário à direita.
   ============================================================================ */
.lg { --roxo: #4338ca; --anil: #6366f1; --lilas: #8b5cf6; --ceu: #0ea5e9;
    margin: 0; min-height: 100vh; min-height: 100dvh; background: #f4f6fb; color: #0f172a;
    font-family: inherit; -webkit-tap-highlight-color: transparent; }
.lg * { box-sizing: border-box; }
.lg-tela { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Topo / painel colorido ---------- */
.lg-hero {
    position: relative; overflow: hidden; isolation: isolate; color: #fff;
    padding: calc(env(safe-area-inset-top) + 34px) 24px 56px;
    background: linear-gradient(150deg, #312e81 0%, var(--roxo) 38%, var(--lilas) 75%, #a855f7 100%);
    display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 36vh;
}
.lg-bolha { position: absolute; border-radius: 50%; filter: blur(2px); z-index: -1; opacity: .35; animation: lgFlutua 14s ease-in-out infinite alternate; }
.lg-bolha.um { width: 260px; height: 260px; right: -80px; top: -90px; background: radial-gradient(circle at 30% 30%, #a5b4fc, transparent 70%); }
.lg-bolha.dois { width: 200px; height: 200px; left: -70px; bottom: -60px; background: radial-gradient(circle at 60% 40%, var(--ceu), transparent 70%); animation-delay: -5s; }
.lg-bolha.tres { width: 120px; height: 120px; left: 55%; top: 40%; background: radial-gradient(circle, #f0abfc, transparent 70%); opacity: .25; animation-delay: -9s; }
@keyframes lgFlutua { to { transform: translate(-24px, 18px) scale(1.12); } }
.lg-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .12;
    background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.4px); background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); }

.lg-hero-conteudo { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 480px;
    animation: lgSobe .6s cubic-bezier(.16,1,.3,1) backwards; }
.lg-marca { background: #fff; border-radius: 22px; padding: 14px 22px; box-shadow: 0 18px 40px -18px rgba(15,23,42,.55), 0 0 0 6px rgba(255,255,255,.14); }
.lg-marca img { display: block; height: 58px; width: auto; max-width: 240px; object-fit: contain; }
.lg-marca-texto { font-size: 18px; font-weight: 800; color: #1e1b4b; }
.lg-saudacao { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.lg-saudacao i { font-style: normal; opacity: .6; }
.lg-hero-desktop { display: none; }
.lg-hero-rodape { display: none; }

/* ---------- Cartão de entrar ---------- */
.lg-cartao {
    position: relative; z-index: 2; flex: 1; margin-top: -30px; background: #fff; border-radius: 28px 28px 0 0;
    padding: 14px 22px calc(env(safe-area-inset-bottom) + 26px); box-shadow: 0 -20px 40px -24px rgba(30,27,75,.35);
    animation: lgSobe .55s cubic-bezier(.16,1,.3,1) .08s backwards;
}
@keyframes lgSobe { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.lg-puxador { width: 44px; height: 5px; border-radius: 999px; background: #e2e8f0; margin: 0 auto 18px; }
.lg-cartao h1 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -0.02em; color: #0f172a; }
.lg-sub { margin: 4px 0 20px; font-size: 14.5px; color: #64748b; }

.lg-aviso { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; margin-bottom: 16px; font-size: 13.5px; line-height: 1.45; }
.lg-aviso[hidden] { display: none; }
.lg-aviso svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-aviso.erro { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }
.lg-aviso.tempo { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; }

.lg-form { display: flex; flex-direction: column; gap: 16px; }
.lg-campo { display: flex; flex-direction: column; gap: 7px; }
.lg-rotulo { font-size: 13px; font-weight: 700; color: #334155; }
.lg-entrada {
    display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 6px 0 16px; border-radius: 16px;
    background: #f4f6fb; border: 1.5px solid #e2e8f0; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.lg-entrada:focus-within { background: #fff; border-color: var(--anil); box-shadow: 0 0 0 4px rgba(99,102,241,.16); }
.lg-entrada.vazio { border-color: #f87171; box-shadow: 0 0 0 4px rgba(248,113,113,.15); animation: lgTreme .3s; }
@keyframes lgTreme { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.lg-entrada > svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: #94a3b8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-entrada:focus-within > svg { stroke: var(--anil); }
/* 16px: o iPhone não dá zoom ao tocar no campo */
.lg-entrada input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; font: inherit; font-size: 16px; color: #0f172a; }
.lg-entrada input::placeholder { color: #a8b3c4; }
.lg-entrada input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #f4f6fb inset; -webkit-text-fill-color: #0f172a; }
.lg-olho { width: 44px; height: 44px; border: none; background: none; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: #64748b; }
.lg-olho:active { background: #e2e8f0; }
.lg-olho svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-caps { font-size: 12px; font-weight: 700; color: #b45309; }
.lg-caps[hidden] { display: none; }

.lg-lembrar { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #334155; cursor: pointer; user-select: none; min-height: 44px; }
.lg-lembrar input { position: absolute; opacity: 0; pointer-events: none; }
.lg-chave { width: 44px; height: 26px; border-radius: 999px; background: #e2e8f0; position: relative; flex: 0 0 auto; transition: background-color .2s ease; }
.lg-chave i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .2s cubic-bezier(.16,1,.3,1); }
.lg-lembrar input:checked + .lg-chave { background: var(--anil); }
.lg-lembrar input:checked + .lg-chave i { transform: translateX(18px); }
.lg-lembrar input:focus-visible + .lg-chave { outline: 2px solid var(--anil); outline-offset: 3px; }

.lg-entrar {
    position: relative; height: 58px; border: none; border-radius: 18px; cursor: pointer; margin-top: 4px;
    font: inherit; font-size: 17px; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(135deg, var(--anil), var(--roxo) 60%, var(--lilas)); box-shadow: 0 16px 30px -14px rgba(67,56,202,.75);
    transition: transform .12s ease, box-shadow .2s ease;
}
.lg-entrar:active { transform: scale(.98); }
.lg-entrar-seta { transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.lg-entrar:hover .lg-entrar-seta { transform: translateX(4px); }
.lg-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: lgGira .8s linear infinite; }
@keyframes lgGira { to { transform: rotate(360deg); } }
.lg-entrar[aria-busy="true"] { opacity: .9; cursor: wait; }
.lg-entrar[aria-busy="true"] .lg-spinner { display: inline-block; }
.lg-entrar[aria-busy="true"] .lg-entrar-seta { display: none; }

.lg-ajuda { margin: 20px 0 0; text-align: center; font-size: 13px; color: #64748b; line-height: 1.5; }

.lg-instalar { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px; border-radius: 18px; background: #eef2ff; border: 1px solid #c7d2fe; }
.lg-instalar[hidden] { display: none; }
.lg-instalar img { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; box-shadow: 0 4px 10px -4px rgba(0,0,0,.2); }
.lg-instalar span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lg-instalar b { font-size: 14px; color: #1e1b4b; }
.lg-instalar small { font-size: 12px; color: #4f46e5; line-height: 1.35; }
.lg-instalar button { flex: 0 0 auto; height: 38px; padding: 0 14px; border: none; border-radius: 12px; font: inherit; font-size: 13px; font-weight: 800; color: #fff; background: var(--anil); cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
    .lg-bolha, .lg-hero-conteudo, .lg-cartao, .lg-entrada.vazio { animation: none !important; }
}

/* ---------- Computador: tela dividida ---------- */
@media (min-width: 900px) {
    .lg-tela { flex-direction: row; }
    .lg-hero { flex: 1.1; min-height: 100vh; align-items: flex-start; text-align: left; justify-content: center; padding: 56px clamp(40px, 6vw, 96px); }
    .lg-hero-conteudo { align-items: flex-start; max-width: 560px; gap: 18px; }
    .lg-marca img { height: 64px; max-width: 280px; }
    .lg-hero-desktop { display: block; margin-top: 18px; }
    .lg-hero-desktop h2 { margin: 0 0 14px; font-size: clamp(32px, 3.2vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; }
    .lg-hero-desktop p { margin: 0 0 24px; font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.82); max-width: 460px; }
    .lg-hero-desktop b { color: #fff; }
    .lg-destaques { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .lg-destaques li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; font-size: 14px; font-weight: 600;
        background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(6px); }
    .lg-destaques li span { font-size: 18px; }
    .lg-hero-rodape { display: flex; align-items: center; gap: 8px; position: absolute; left: clamp(40px, 6vw, 96px); bottom: 28px; font-size: 13px; color: rgba(255,255,255,.75); }
    .lg-ponto { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.25); }
    .lg-cartao { flex: 0 0 min(520px, 46vw); margin: 0; border-radius: 0; display: flex; flex-direction: column; justify-content: center;
        padding: 56px clamp(36px, 5vw, 72px); box-shadow: none; }
    .lg-cartao > * { max-width: 400px; width: 100%; }
    .lg-puxador { display: none; }
    .lg-cartao h1 { font-size: 30px; }
}
