/* Login redesign — premium SaaS-grade (Stripe/Linear/Vercel-vibe).
   Aside esquerdo: gradients profundos + noise + SVG art organico (curvas
   glow + dashboard blur shapes + cluster dots) + animacoes continuas sutis.
   Lado direito: off-white com textura + card glassmorphism leve.

   Convencao firme: NENHUM JS inline, NENHUM CSS inline em login.php.
   prefers-reduced-motion respeitado em todas as animacoes continuas. */

:root {
    --navy:       #001950;
    --navy-deep:  #000b26;
    --navy-mid:   #002878;
    --royal:      #004bba;
    --royal-soft: rgba(0, 75, 186, .12);
    --gold:       #d29528;
    --gold-light: #f6d562;
    --ink:        #0f172a;
    --ink-muted:  #475569;
    --ink-soft:   #64748b;
    --line:       #e2e8f0;
    --bg-soft:    #f7f8fb;
    --danger:     #b91c1c;
    --danger-bg:  #fef2f2;
    --danger-bd:  #fecaca;
    --info:       #1e40af;
    --info-bg:    #eff6ff;
    --info-bd:    #bfdbfe;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--navy-deep);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SHELL — split 60/40. Colapsa em <= 900px.
   ============================================================ */
.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    min-height: 100vh;
}

@media (max-width: 900px) {
    /* minmax(0, 1fr) — sem o minmax, grid items tem min-width: auto que
       respeita content intrinsic width e estoura o viewport quando o
       conteudo (placeholder longo, etc) e maior que o cell esperado. */
    .login-shell { grid-template-columns: minmax(0, 1fr); }
    .login-shell .login-aside { display: none; }
}

/* Grid items defensivo: login-main sempre pode encolher */
.login-main { min-width: 0; }

/* ============================================================
   ASIDE — gradients profundos + noise + SVG art
   ============================================================ */
.login-aside {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 2rem 3.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    /* Branding no topo, stage (mockup+tags) ocupa o resto centralizado.
       Sem absolute no stage — evita sobreposicao com aside-content. */
    gap: 1rem;
    background:
        radial-gradient(circle at 28% 38%, rgba(59,130,246,.22) 0%, transparent 48%),
        radial-gradient(circle at 80% 75%, rgba(246,213,98,.10) 0%, transparent 45%),
        radial-gradient(circle at 50% 100%, rgba(0,75,186,.30) 0%, transparent 55%),
        linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 50%, var(--navy-mid) 100%);
}

/* Noise texture sutil */
.login-aside::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .055;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============================================================
   ASIDE BG — fundo navy + radiais sutis de luz (substitui SVG art)
   ============================================================ */
.aside-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        /* Halo dourado canto superior direito */
        radial-gradient(ellipse 55% 45% at 82% 18%,
            rgba(246, 213, 98, .14), transparent 70%),
        /* Brilho royal canto inferior esquerdo */
        radial-gradient(ellipse 65% 55% at 18% 88%,
            rgba(0, 75, 186, .32), transparent 65%);
}

/* ============================================================
   ASIDE STAGE — flex item que ocupa espaco restante e centraliza mockup
   ============================================================ */
.aside-stage {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;             /* permite encolher dentro do flex parent */
    pointer-events: none;
    display: grid;
    place-items: center;
    /* Espaco lateral pras tags vazarem (--x:-15% / 110%) sem clipar.
       Reservar ~80px de cada lado em desktop. */
    padding: 1rem clamp(2rem, 6vw, 5rem);
}

/* --- Wrap dimensional: define a area de referencia pras tags. As tags
       sao absolute dentro daqui, entao --x/--y em % sao relativos ao
       mockup e nao ao aside inteiro. Valores >100% / <0% vazam pras bordas. */
.mockup-wrap {
    position: relative;
    /* Reducao vs antes (240-380px) pra caber em coluna com o branding em cima
       sem comprimir nenhum dos dois. */
    width: clamp(200px, 24vw, 300px);
    aspect-ratio: 4 / 5;
    /* Cap altura pra nao estourar quando aside fica baixo (laptop 768p) */
    max-height: 100%;
}

/* --- Frame do mockup com fade radial nas bordas --- */
.mockup-frame {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    overflow: hidden;

    /* Fade LINEAR so na base — topo e meio do post ficam 100% nitidos,
       base desvanece pro navy ("post emergindo do fundo", estilo Stripe). */
    mask-image: linear-gradient(
        180deg,
        #000 0%,
        #000 70%,
        rgba(0, 0, 0, .6) 88%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        180deg,
        #000 0%,
        #000 70%,
        rgba(0, 0, 0, .6) 88%,
        transparent 100%
    );

    /* Glow sutil em volta antes do fade — "luz emanando" */
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .45))
            drop-shadow(0 0 80px rgba(0, 75, 186, .22));
}

.mockup-img,
.mockup-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Header social (avatar + handle) sobreposto no topo do mockup --- */
.mockup-social-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .6rem .8rem .9rem;
    /* Gradient escuro topo->transparente: garante legibilidade do handle
       sobre qualquer foto sem cobrir a imagem toda */
    background: linear-gradient(180deg,
        rgba(0, 0, 0, .55) 0%,
        rgba(0, 0, 0, .25) 60%,
        transparent 100%);
    pointer-events: none;
}

.mockup-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, .85);
    background: #fff;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    padding: 3px;
}

.mockup-avatar img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}

.mockup-handle {
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
    letter-spacing: -.005em;
}

/* Float sutil so na imagem estatica. No video o movimento intrinseco do MP4
   ja basta — animar transform num elemento que combina mask + filter +
   <video> forca repaint pesado a cada frame e o compositor perde a posicao
   do video (tremor visivel). */
.mockup-img {
    animation: mockup-float 14s ease-in-out infinite;
    will-change: transform;
}

/* Video decorativo: nao captura input, sem animacao externa */
.mockup-video {
    pointer-events: none;
    background: var(--navy-deep);  /* enquanto MP4 nao baixou, poster cobre isso */
}

/* Reduced motion: pausa o video (forca uso so do poster) */
@media (prefers-reduced-motion: reduce) {
    .mockup-video { display: none; }
    /* Se houver video, o <img poster> nao existe — fallback fica vazio com bg
       navy. Aceitavel: o usuario optou explicitamente por menos movimento. */
}

/* Placeholder quando a imagem ainda nao foi sincronizada */
.mockup-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg,
            rgba(0, 75, 186, .35) 0%,
            rgba(210, 149, 40, .25) 100%),
        linear-gradient(180deg, #002878 0%, #001233 100%);
    color: rgba(255, 255, 255, .55);
    font-size: 4rem;
}

@keyframes mockup-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* Fallback sem mask-image (Chrome <120 raro, Safari ok com -webkit-) */
@supports not ((mask-image: radial-gradient(black, transparent))
            or (-webkit-mask-image: radial-gradient(black, transparent))) {
    .mockup-frame {
        box-shadow:
            inset 0 0 60px 30px var(--navy),
            inset 0 0 120px 60px rgba(0, 11, 38, .8);
    }
}

/* ============================================================
   METRIC TAGS — glass escuro flutuante (posicao via --x/--y)
   ============================================================ */
.metric-tag {
    position: absolute;
    left: var(--x);
    top: var(--y);
    /* Centra o ancora da tag no ponto (--x, --y) */
    transform: translate(-50%, -50%);

    display: inline-flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem .95rem;
    border-radius: 14px;

    /* Glass escuro: branco translucido sobre navy */
    background: rgba(255, 255, 255, .07);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, .35),
        inset 0 1px 0 rgba(255, 255, 255, .14);
    color: #fff;

    /* Float continuo + entry fade staggered */
    opacity: 0;
    animation:
        tag-enter .8s cubic-bezier(.4, 0, .2, 1) forwards,
        tag-float 6s ease-in-out infinite;
    will-change: transform, opacity;
}

.tag--engagement { animation-delay: .3s, 1.1s; }
.tag--reach      { animation-delay: .55s, 2.6s; }
.tag--saves      { animation-delay: .8s, 4.1s; }
.tag--score      { animation-delay: 1.05s, 5.6s; }

@keyframes tag-enter {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes tag-float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50%      { transform: translate(-50%, -50%) translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
    .metric-tag {
        animation: none;
        opacity: 1;
    }
    .mockup-img { animation: none; }
}

.tag-icon {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 9px;
    background: rgba(0, 75, 186, .55);
    color: #cfe0ff;
    font-size: 1rem;
    flex-shrink: 0;
}

.tag-icon--gold {
    background: rgba(210, 149, 40, .35);
    color: var(--gold-light);
}

.tag-body {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.tag-label {
    font-size: .68rem;
    color: rgba(255, 255, 255, .65);
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 500;
}

.tag-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.01em;
    /* Blur do numero — preserva a "forma" mas borra o digito. Sinaliza
       'dados reais protegidos pre-login'. Label e icone ficam nitidos. */
    filter: blur(4px);
    user-select: none;
}

/* Fallback sem backdrop-filter: glass fica mais opaco pra preservar contraste */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .metric-tag { background: rgba(20, 33, 71, .88); }
}

/* Mid-breakpoint: aside ficando estreito — encolhe tags */
@media (max-width: 1180px) {
    .metric-tag {
        padding: .55rem .75rem;
        gap: .55rem;
    }
    .tag-icon  { width: 28px; height: 28px; font-size: .9rem; }
    .tag-label { font-size: .62rem; }
    .tag-value { font-size: .9rem; }
}

/* ============================================================
   ASIDE CONTENT — branding em cima do SVG
   ============================================================ */
.aside-content {
    position: relative;
    z-index: 2;
    max-width: 480px;
    /* Centralizado horizontalmente no aside pra simetria com o mockup
       (que esta centralizado no stage abaixo) */
    align-self: center;
    text-align: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.brand-logo .logo-mark {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff 0%, #e8edf7 100%);
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.30),
                inset 0 -1px 0 rgba(0,0,0,.08);
    flex-shrink: 0;
}

.brand-logo .logo-text {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.72);
}

.brand-title {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.025em;
    margin: 0 0 1.1rem;
    color: #fff;
}

.brand-title .accent {
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 600;
    font-size: .85em;
}

/* ============================================================
   MAIN — off-white com textura sutil + card glassmorphism leve
   ============================================================ */
.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: var(--bg-soft);
    position: relative;
    overflow: hidden;
}

/* Textura sutil + radial soft no bg direito (elimina o "flat") */
.login-main::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(0,75,186,.04) 0%, transparent 50%),
        radial-gradient(circle at 30% 80%, rgba(246,213,98,.03) 0%, transparent 45%);
}

/* Noise sutil sobre o off-white */
.login-main::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .025;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Filete dourado vertical na borda esquerda (conecta com aside) */
.login-main .accent-edge {
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    z-index: 1;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--gold) 25%, var(--gold-light) 50%, var(--gold) 75%,
        transparent 100%);
    opacity: .85;
    pointer-events: none;
}

@media (max-width: 900px) {
    .login-main .accent-edge {
        width: 100%; height: 3px;
        background: linear-gradient(90deg,
            var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    }
}

/* CARD GLASSMORPHISM LEVE */
.login-form-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    min-width: 0;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    /* Profundidade premium: 4 camadas + tom sutil de royal pra harmonizar
       com a marca (halo levemente azulado, nao "sombra preta generica"). */
    box-shadow:
        /* Halo difuso azul (luz da marca) */
        0 40px 80px -20px rgba(0, 75, 186, .14),
        /* Sombra grande difusa (profundidade) */
        0 28px 56px -16px rgba(15, 23, 42, .14),
        /* Sombra media (forma) */
        0 12px 24px -8px rgba(15, 23, 42, .08),
        /* Sombra curta (borda definida) */
        0 3px 8px rgba(15, 23, 42, .05),
        /* Inset highlight superior (brilho de borda) */
        inset 0 1px 0 rgba(255, 255, 255, .72),
        /* Inset linha inferior (leve abaulamento) */
        inset 0 -1px 0 rgba(15, 23, 42, .04);
    display: flex;
    flex-direction: column;
    /* Entrada cinematografica: fade + slide suave de baixo pra cima.
       cubic-bezier(.16,1,.3,1) eh o ease "spring-out" usado por Stripe/Linear. */
    animation: card-enter .55s cubic-bezier(.16, 1, .3, 1) both;
    will-change: transform, opacity;
}

@keyframes card-enter {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .login-form-card { animation: none; }
}

/* Fallback: navegador sem backdrop-filter (ex: Firefox antigo) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .login-form-card {
        background: rgba(255, 255, 255, .95);
        border-color: rgba(15, 23, 42, .06);
    }
}

/* --- Brand mini (mobile only) --- */
.brand-mini {
    display: none;
    text-align: center;
    margin-bottom: 1.5rem;
}

.brand-mini .logo-mark {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--navy), var(--royal));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: .9rem;
    box-shadow: 0 8px 22px rgba(0,25,80,.25);
}

.brand-mini h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 .15rem;
    letter-spacing: -.01em;
}

.brand-mini .subtitle {
    font-size: .8rem;
    color: var(--ink-soft);
    font-weight: 500;
}

@media (max-width: 900px) {
    .brand-mini { display: block; }
    .login-main { padding-top: 3rem; }
}

/* --- Heading do form --- */
.form-heading { margin-bottom: 1.5rem; }

.form-heading h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.01em;
    margin: 0 0 .35rem;
}

.form-heading p {
    font-size: .88rem;
    color: var(--ink-muted);
    margin: 0;
    line-height: 1.5;
}

/* --- Alerts --- */
.alert-box {
    padding: .7rem .85rem;
    border-radius: 10px;
    font-size: .85rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    line-height: 1.4;
}

.alert-box .bi { flex-shrink: 0; margin-top: .12rem; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-bd); }
.alert-info  { background: var(--info-bg);   color: var(--info);   border-color: var(--info-bd);  }

/* --- Form fields --- */
.field { margin-bottom: 1rem; }

.field label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: .35rem;
    display: block;
}

.input-wrap { position: relative; }

.input-wrap .form-input {
    width: 100%;
    min-width: 0; /* HTML inputs tem implicit min-width baseado em size="20".
                     Sem isso, placeholder longo (voce@cativaoperadora.com) forca
                     o input pra >250px e o form-card cresce alem do parent
                     em viewports estreitos (<400px). */
    border: 1.5px solid var(--line);
    border-radius: 11px;
    padding: .82rem 1rem;
    font-size: .95rem;
    font-family: inherit;
    color: var(--ink);
    background: rgba(255, 255, 255, .85);
    transition: border-color .2s ease, box-shadow .25s ease, background .2s ease;
}

.input-wrap .form-input::placeholder { color: #94a3b8; }

/* Focus state premium: borda azul + ring duplo + glow externo difuso */
.input-wrap .form-input:focus {
    outline: none;
    border-color: var(--royal);
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(0, 75, 186, .12),
        0 0 24px rgba(0, 75, 186, .15),
        inset 0 1px 0 rgba(255, 255, 255, .8);
}

.input-wrap .field-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    transition: color .2s ease;
}

.input-wrap .form-input:focus + .field-icon {
    color: var(--royal);
}

.input-wrap.has-toggle .form-input { padding-right: 46px; }
.input-wrap.has-icon   .form-input { padding-right: 40px; }

.pwd-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ink-soft);
    font-size: 1.05rem;
    padding: .4rem .55rem;
    border-radius: 7px;
    cursor: pointer;
    line-height: 1;
    transition: color .15s ease, background .15s ease;
}

.pwd-toggle:hover {
    color: var(--royal);
    background: rgba(0,75,186,.06);
}

.pwd-toggle:focus-visible {
    outline: 2px solid var(--royal);
    outline-offset: 2px;
}

.caps-hint {
    display: none;
    align-items: center;
    gap: .35rem;
    margin-top: .35rem;
    font-size: .74rem;
    color: #b45309;
    font-weight: 500;
}

.caps-hint .bi { font-size: .9em; }
.caps-hint.is-on { display: inline-flex; }

/* --- Botao primario polido --- */
.btn-primary-login {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 1rem 1rem;
    font-size: .98rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--navy) 0%, var(--royal) 100%);
    cursor: pointer;
    margin-top: .35rem;
    letter-spacing: .005em;
    transition: transform .2s ease, box-shadow .25s ease, filter .2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    font-family: inherit;
    box-shadow:
        0 6px 18px rgba(0, 75, 186, .28),
        inset 0 -1px 0 rgba(0, 0, 0, .18),
        inset 0 1px 0 rgba(255, 255, 255, .14);
}

.btn-primary-login:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.10);
    box-shadow:
        0 16px 38px rgba(0, 75, 186, .42),
        0 0 0 2px rgba(246, 213, 98, .22),
        inset 0 -1px 0 rgba(0, 0, 0, .18),
        inset 0 1px 0 rgba(255, 255, 255, .2);
}

.btn-primary-login:active:not(:disabled) {
    transform: translateY(0);
    box-shadow:
        0 4px 12px rgba(0, 75, 186, .25),
        inset 0 -1px 0 rgba(0, 0, 0, .18),
        inset 0 1px 0 rgba(255, 255, 255, .1);
}

.btn-primary-login:focus-visible {
    outline: 2px solid var(--royal);
    outline-offset: 3px;
}

.btn-primary-login:disabled,
.btn-primary-login.is-loading {
    cursor: not-allowed;
    opacity: .85;
}

.btn-primary-login .spinner {
    display: none;
    width: 1rem; height: 1rem;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .65s linear infinite;
}

.btn-primary-login.is-loading .spinner { display: inline-block; }
.btn-primary-login.is-loading .btn-ico { display: none; }

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

@media (prefers-reduced-motion: reduce) {
    .btn-primary-login .spinner { animation: none; }
    .btn-primary-login:hover:not(:disabled) { transform: none; }
}

/* --- "Esqueci minha senha" (abre modal explicativo, sem mailto) --- */
.forgot-password {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: .9rem;
    font-size: .82rem;
    color: var(--ink-muted);
    text-decoration: none;
    transition: color .2s ease;
    /* reset de <button> pra parecer link */
    background: none;
    border: none;
    padding: .25rem;
    font-family: inherit;
    cursor: pointer;
    border-radius: 4px;
}

.forgot-password:hover,
.forgot-password:focus-visible {
    color: var(--royal);
    text-decoration: underline;
}

.forgot-password:focus-visible {
    outline: 2px solid var(--royal);
    outline-offset: 2px;
}

/* --- Modal de reset (dialog nativo) --- */
.forgot-modal {
    border: none;
    border-radius: 16px;
    padding: 0;
    max-width: 420px;
    width: calc(100% - 2rem);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 28px 70px rgba(15, 23, 42, .28),
                0 6px 18px rgba(15, 23, 42, .12);
    color: var(--ink);
    font-family: inherit;
}

.forgot-modal::backdrop {
    background: rgba(0, 25, 80, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.forgot-modal-body {
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
}

.forgot-modal-ico {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--royal-soft), rgba(246, 213, 98, .15));
    color: var(--royal);
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    border: 1px solid rgba(0, 75, 186, .12);
}

.forgot-modal h3 {
    margin: 0 0 .6rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ink);
}

.forgot-modal p {
    margin: 0 0 1.1rem;
    font-size: .88rem;
    color: var(--ink-muted);
    line-height: 1.55;
}

.forgot-modal p strong {
    color: var(--ink);
    font-weight: 600;
}

.forgot-modal-actions { margin: 1.25rem 0 0; }

.btn-close-modal {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, var(--navy) 0%, var(--royal) 100%);
    color: #fff;
    padding: .8rem;
    border-radius: 11px;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    font-family: inherit;
    transition: filter .2s ease, transform .15s ease;
    box-shadow: 0 6px 18px rgba(0, 75, 186, .22);
}

.btn-close-modal:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-close-modal:active { transform: translateY(0); }

/* --- Footer note --- */
.form-footer {
    text-align: center;
    font-size: .72rem;
    color: var(--ink-soft);
    margin-top: 1.75rem;
    letter-spacing: .02em;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    background: rgba(241, 245, 249, .85);
    border: 1px solid rgba(226, 232, 240, .9);
    color: var(--ink-muted);
    font-size: .7rem;
    font-weight: 600;
    margin-top: .65rem;
}

.secure-badge .bi { color: #059669; font-size: .9em; }

/* --- Override autofill amarelo do Chrome (proteje o glass) --- */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, .9) inset !important;
    -webkit-text-fill-color: var(--ink) !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: var(--ink);
}

/* ============================================================
   ENV BADGE — refinado: minimal, opacity baixa, integrado
   ============================================================ */
.env-badge {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .65);
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .82);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: .75;
    transition: opacity .25s ease;
}

.env-badge:hover { opacity: 1; }

.env-badge .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 6px rgba(251,191,36,.55);
    animation: env-pulse 2.4s ease-in-out infinite;
}

@keyframes env-pulse {
    0%, 100% { opacity: .9; }
    50%      { opacity: .45; }
}

@media (prefers-reduced-motion: reduce) {
    .env-badge .dot { animation: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .env-badge { background: rgba(15, 23, 42, .92); }
}
