/*
 * Login premium do Jmon — dark-first, autossuficiente, efeitos sóbrios.
 * Sem dependência do Mazer. Ícones são SVG inline (confiáveis). Anima com
 * moderação e respeita prefers-reduced-motion.
 */
:root {
    --o: #F07E1D;
    --o2: #ff9a3d;
    --o-soft: rgba(240, 126, 29, .14);
    --bg: #0a0f1c;
    --surface: rgba(23, 33, 54, .72);
    --border: rgba(120, 140, 180, .16);
    --text: #eaeef7;
    --muted: #93a2c4;
    --input: rgba(12, 20, 36, .7);
    --danger: #ff6b6b;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body.login-page {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Aurora animada de fundo (efeito profissional discreto) */
.login-aurora {
    position: fixed;
    inset: -30%;
    z-index: 0;
    filter: blur(72px);
    opacity: .55;
    background:
        radial-gradient(40% 40% at 25% 30%, rgba(240, 126, 29, .55), transparent 60%),
        radial-gradient(35% 35% at 80% 20%, rgba(56, 120, 190, .42), transparent 60%),
        radial-gradient(45% 45% at 70% 80%, rgba(240, 126, 29, .28), transparent 60%);
    animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(2%, -2%, 0) scale(1.08); }
    100% { transform: translate3d(-2%, 2%, 0) scale(1.03); }
}
/* Textura de grade sutil por cima da aurora */
.login-page::before {
    content: "";
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(70% 70% at 50% 40%, #000 40%, transparent 100%);
}

.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 424px;
    padding: 24px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 40px 34px 28px;
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
    animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

.login-brand { display: flex; align-items: center; gap: 11px; justify-content: center; margin-bottom: 20px; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--o), var(--o2));
    color: #14181f; font-weight: 800; font-size: 1.3rem;
    box-shadow: 0 8px 22px rgba(240, 126, 29, .4);
    animation: glow 3.6s ease-in-out infinite;
}
@keyframes glow {
    0%, 100% { box-shadow: 0 8px 22px rgba(240, 126, 29, .35); }
    50%      { box-shadow: 0 10px 32px rgba(240, 126, 29, .62); }
}
.brand-name { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.login-brand:hover .brand-name { color: var(--text); }

.login-title { margin: 0; text-align: center; font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; }
.login-sub { margin: 6px 0 26px; text-align: center; color: var(--muted); font-size: .92rem; }

.field { margin-bottom: 16px; animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.field:nth-of-type(1) { animation-delay: .06s; }
.field:nth-of-type(2) { animation-delay: .12s; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap svg.lead { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; transition: color .18s; }
.input-wrap input {
    width: 100%; height: 48px; padding: 0 44px 0 42px; border-radius: 11px;
    background: var(--input); border: 1px solid var(--border); color: var(--text);
    font-family: inherit; font-size: .95rem;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.input-wrap input::placeholder { color: #66739a; }
.input-wrap input:focus { outline: none; border-color: var(--o); box-shadow: 0 0 0 4px var(--o-soft); background: rgba(12, 20, 36, .92); }
.input-wrap input:focus ~ svg.lead { color: var(--o); }
.toggle-pass {
    position: absolute; right: 8px; background: none; border: 0; color: var(--muted);
    cursor: pointer; padding: 8px; display: grid; place-items: center; border-radius: 8px; transition: color .15s;
}
.toggle-pass:hover { color: var(--o); }
.toggle-pass svg { width: 18px; height: 18px; }

.field-error { margin: 8px 2px 0; color: var(--danger); font-size: .82rem; display: flex; gap: 6px; align-items: center; }
.field-error svg { width: 15px; height: 15px; flex-shrink: 0; }

.login-row { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 22px; }
.checkbox { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; cursor: pointer; user-select: none; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--o); }
.link { color: var(--o); text-decoration: none; font-size: .86rem; font-weight: 600; }
.link:hover { color: var(--o2); }

.btn-login {
    width: 100%; height: 50px; border: 0; border-radius: 12px; cursor: pointer;
    background: linear-gradient(135deg, var(--o), var(--o2)); color: #14181f;
    font-family: inherit; font-weight: 700; font-size: .98rem; letter-spacing: .01em;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 12px 28px rgba(240, 126, 29, .35);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(240, 126, 29, .5); filter: brightness(1.03); }
.btn-login:active { transform: translateY(0); }
.btn-login svg { width: 18px; height: 18px; transition: transform .15s; }
.btn-login:hover svg { transform: translateX(3px); }

.login-version { text-align: center; color: #55628a; font-size: .75rem; margin: 22px 0 0; letter-spacing: .05em; }

/* Elementos compartilhados entre as páginas de auth */
.login-brand { text-decoration: none; justify-content: center; margin-bottom: 18px; }
.login-logo { height: 56px; width: auto; display: block; }
.login-lead { text-align: center; color: var(--muted); font-size: .9rem; line-height: 1.55; margin: -8px 0 22px; }
.login-status {
    display: flex; gap: 9px; align-items: flex-start;
    background: rgba(46, 204, 113, .10); border: 1px solid rgba(46, 204, 113, .28);
    color: #7ee2a8; border-radius: 11px; padding: 12px 14px; font-size: .85rem; margin-bottom: 18px;
}
.login-status svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.login-alt { text-align: center; margin: 20px 0 0; font-size: .86rem; color: var(--muted); }
.login-alt a { color: var(--o); font-weight: 600; text-decoration: none; }
.login-alt a:hover { color: var(--o2); }

@media (max-width: 420px) { .login-card { padding: 32px 22px 24px; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
