/* Login v2 — keeps the original login-background.css image/drift as-is
   (the real wallpaper: login-graphite-v1.png, same silk/chrome concept as
   the logo). This file only layers a quiet starfield + card polish on top. */

:root {
    --lg-silver: #e8ecf2;
    --lg-silver-dim: #8b93a3;
}

body.smart-login-background {
    overflow-x: hidden;
}

/* faint grain so the wallpaper gradients don't band */
.smart-login-background .lg-grain {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: .04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* starfield + chrome light-sweep canvas, between the vignette and the card */
#lg-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.smart-login-background.motion-paused::before { animation-play-state: paused; }

/* ---------- Card: still glass, no spinning border — a quiet static frame ---------- */
.login-card-frame {
    position: relative;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(155deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .02) 40%, rgba(255, 255, 255, .08));
    box-shadow: 0 24px 70px -28px rgba(0, 0, 0, .8);
}

.login-glass {
    position: relative;
    background: rgba(20, 22, 27, .6);
    border: 1px solid rgba(255, 255, 255, .07);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    border-radius: 17px;
    animation: fadeInUp .7s cubic-bezier(.16, 1, .3, 1);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* logo: quiet chrome glow pulse, matches the metallic artwork instead of adding color */
.login-glass img {
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, .18));
    animation: lg-logo-pulse 5s ease-in-out infinite;
}

@keyframes lg-logo-pulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .12)); }
    50%      { filter: drop-shadow(0 0 20px rgba(255, 255, 255, .28)); }
}

/* ---------- Inputs: silver glow-on-focus ---------- */
.login-glass .form-control {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #f2f4fb;
    transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.login-glass .form-control::placeholder { color: rgba(255, 255, 255, .35); }

.login-glass .form-control:focus {
    background: rgba(255, 255, 255, .07);
    border-color: var(--lg-silver);
    box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .12),
                0 0 20px -6px rgba(255, 255, 255, .5);
    color: #fff;
}

/* ---------- Ações: mesma linguagem de vidro do sistema ---------- */
.login-password-toggle {
    display: grid;
    place-items: center;
    width: 46px;
    border: 1px solid rgba(255,255,255,.18);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(145deg,rgba(92,99,108,.58),rgba(35,39,45,.72));
    color: #eef2f5;
    transition: .2s ease;
}
.login-password-toggle:hover,.login-password-toggle:focus-visible { background: rgba(255,255,255,.16);color:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.1);outline:0; }
.login-glass .input-group .form-control { border-radius:10px 0 0 10px; }

.login-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 43px;
    padding: 10px 15px;
    border: 1px solid rgba(213,223,232,.25);
    border-radius: 13px;
    background: linear-gradient(145deg,rgba(75,82,90,.72),rgba(31,35,40,.68));
    color: #edf2f6;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px 0 rgba(0,0,0,.24),0 8px 20px rgba(0,0,0,.24);
    -webkit-backdrop-filter: blur(15px) saturate(140%);
    backdrop-filter: blur(15px) saturate(140%);
    font-size: .78rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    transition: transform .18s ease,border-color .2s ease,box-shadow .2s ease,background .2s ease;
}
.login-button::after { content:"";position:absolute;z-index:-1;top:-90%;left:-28%;width:48%;height:260%;border-radius:50%;background:rgba(255,255,255,.48);filter:blur(14px);opacity:.25;transform:rotate(20deg);transition:.35s ease;pointer-events:none; }
.login-button:hover { transform:translateY(-2px);border-color:rgba(235,242,247,.48);color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 12px 26px rgba(0,0,0,.32); }
.login-button:hover::after { opacity:.62;transform:translateX(280%) rotate(20deg); }
.login-button:active { transform:translateY(0) scale(.985); }
.login-button:focus-visible { outline:3px solid rgba(111,226,187,.25);outline-offset:3px; }

.login-button-primary { min-height:51px;border-color:rgba(57,209,160,.48);background:linear-gradient(145deg,rgba(25,145,109,.94),rgba(9,78,61,.92));color:#fff;font-size:.86rem;box-shadow:inset 0 1px 0 rgba(255,255,255,.23),0 12px 30px rgba(5,83,61,.34); }
.login-button-primary:hover { border-color:rgba(105,234,193,.72);background:linear-gradient(145deg,rgba(33,172,130,.98),rgba(10,96,73,.96));box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 15px 34px rgba(4,94,67,.44),0 0 0 4px rgba(62,205,161,.08); }
.login-button-icon { display:grid;place-items:center;width:29px;height:29px;margin-left:-4px;border-radius:9px;background:rgba(255,255,255,.13);box-shadow:inset 0 1px 0 rgba(255,255,255,.15); }
.login-button-arrow { margin-left:auto;opacity:.8;transition:transform .2s ease; }.login-button-primary:hover .login-button-arrow{transform:translateX(3px)}
.login-button-warning { border-color:rgba(245,190,73,.42);background:linear-gradient(145deg,rgba(114,85,26,.72),rgba(62,48,22,.66));color:#ffe29b; }
.login-button-warning:hover { border-color:rgba(255,207,100,.68);background:linear-gradient(145deg,rgba(141,105,28,.82),rgba(76,57,20,.76));color:#fff1c7; }
.login-secondary-actions { display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:18px;padding-top:18px;border-top:1px solid rgba(255,255,255,.11); }
.login-button-secondary { width:100%;min-width:0;min-height:44px;padding:10px 11px;border-color:rgba(213,223,232,.25)!important;background:linear-gradient(145deg,rgba(75,82,90,.72),rgba(31,35,40,.68))!important;color:#edf2f6!important;font-size:.7rem; }
.login-button-secondary:hover { border-color:rgba(235,242,247,.48)!important;background:linear-gradient(145deg,rgba(91,99,108,.78),rgba(39,44,50,.76))!important;color:#fff!important; }
.login-button-secondary i { flex:0 0 auto;color:#82ddbf!important;font-size:.9rem; }
.login-button-secondary span { display:block;min-width:0; }
.login-help-action { display:flex;justify-content:center;margin-top:2px; }
.login-help-action a { display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:8px;color:rgba(238,243,247,.76);font-size:.7rem;font-weight:650;text-decoration:none;transition:.18s ease; }
.login-help-action a:hover { background:rgba(255,255,255,.07);color:#fff;text-shadow:0 0 12px rgba(255,255,255,.42); }

/* ---------- Respect reduced motion & keep it usable everywhere ---------- */
@media (prefers-reduced-motion: reduce) {
    .smart-login-background::before,
    .login-glass img {
        animation: none !important;
    }
    #lg-particles { display: none; }
}

@media (max-width: 480px) {
    #lg-particles { opacity: .7; }
    .login-secondary-actions { grid-template-columns:1fr; }
}
