/* ==========================================================================
   Bloco do Sueltos — página de ENTRADA do painel (/entrar)
   Folha própria e enxuta, de propósito: esta página é pública e não pode
   carregar o CSS do painel. Mesma linguagem do estandarte (tokens.css):
   tecido creme, bordado azul-royal, franja dourada. Desenhada primeiro
   para 375px.
   ========================================================================== */

@import url('tokens.css?v=2');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-body);
    line-height: var(--lh);
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(5, 13, 34, 0.55) 0%, rgba(5, 13, 34, 0.92) 70%),
        url('../image_d0e8af.jpg') center 30% / cover no-repeat fixed;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 36px 22px 40px;
    background:
        linear-gradient(var(--royal), var(--royal)) top / 100% 8px no-repeat,
        repeating-linear-gradient(90deg, var(--gold) 0 4px, transparent 4px 8px) bottom / 100% 12px no-repeat,
        var(--cream);
    color: var(--cream-ink);
    box-shadow: var(--shadow-panel);
    text-align: left;
}

.login-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.login-logo { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--gold); object-fit: cover; flex-shrink: 0; }
.login-card h1 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--royal);
    font-weight: 400;
}
.login-card h1 span { display: block; font-size: 0.72em; color: var(--cream-ink-2); }
.login-card > p { color: var(--cream-ink-2); font-weight: 700; font-size: 0.98rem; margin-bottom: 18px; }
.login-card form p { color: var(--cream-ink-2); font-weight: 700; font-size: 0.98rem; margin-bottom: 14px; }

.form-group { margin-bottom: 14px; min-width: 0; }
.form-group label { display: block; font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--cream-ink); }
.form-group input {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid rgba(30, 63, 158, 0.35);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1.05rem;
    background: #fff;
    color: var(--cream-ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input::placeholder { color: #6B7A9E; }
.form-group input:focus {
    outline: none;
    border-color: var(--royal);
    box-shadow: 0 0 0 3px rgba(30, 63, 158, 0.25);
}

.form-error {
    display: none;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(185, 28, 28, 0.1);
    border: 1px solid #f87171;
    color: #991b1b;
    font-weight: 700;
    margin-bottom: 14px;
}

.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 56px; }
.pwd-eye {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--cream-ink-2);
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.pwd-eye:hover { color: var(--royal); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 12px 20px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-gold {
    width: 100%;
    min-height: 56px;
    font-size: 1.1rem;
    margin-top: 4px;
    background: var(--gold-bright);
    border-color: var(--gold-bright);
    color: var(--navy-950);
    box-shadow: 0 10px 24px -12px rgba(255, 215, 0, 0.7);
}
.btn-gold:hover:not(:disabled) { background: var(--gold-pale); border-color: var(--gold-pale); }

.login-links { margin-top: 14px; }
.login-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--royal);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.login-links a:hover { color: var(--navy-700); }
.login-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    min-height: 44px;
    color: var(--cream-ink-2);
    font-weight: 700;
    text-decoration: none;
}
.login-back:hover { color: var(--royal); }

/* Aviso rápido (substitui o toast do painel, que não existe aqui) */
#entrar-aviso {
    display: none;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(30, 63, 158, 0.1);
    border: 1px solid rgba(30, 63, 158, 0.35);
    color: var(--cream-ink);
    font-weight: 700;
}

@media (min-width: 720px) {
    body { align-items: center; }
    .login-card { padding: 44px 34px 46px; }
}
