.login-page {
    --login-panel: rgba(12, 23, 40, .74);
    --login-input: rgba(255, 255, 255, .035);
    --login-line: rgba(148, 163, 184, .16);
    --login-text: #f8fafc;
    --login-muted: #94a3b8;

    min-height: 100vh;
    display: flex;
    position: relative;
    margin: 0;
    overflow-x: hidden;

    background:
        radial-gradient(circle at 12% 12%, rgba(37, 99, 235, .18), transparent 32%),
        radial-gradient(circle at 88% 14%, rgba(34, 211, 238, .08), transparent 28%),
        radial-gradient(circle at 70% 84%, rgba(59, 130, 246, .08), transparent 32%),
        linear-gradient(145deg, #050b14 0%, #08111f 42%, #0a1525 100%) !important;

    color: var(--login-text);
}

.login-page.soft-dark-mode {
    --login-panel: rgba(30, 44, 66, .78);
    --login-input: rgba(255, 255, 255, .045);
    --login-line: rgba(175, 190, 210, .19);
    --login-muted: #a8b4c5;

    background:
        radial-gradient(circle at 12% 12%, rgba(96,165,250,.14), transparent 32%),
        radial-gradient(circle at 88% 14%, rgba(34,211,238,.06), transparent 28%),
        linear-gradient(145deg, #131d2d 0%, #182235 46%, #1b2940 100%) !important;
}

.login-ambient {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.ambient-grid {
    position: absolute;
    inset: 0;
    opacity: .24;
    background-image:
        linear-gradient(rgba(96,165,250,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96,165,250,.04) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 92%);
    animation: gridFade 1.2s ease both;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(18px);
    opacity: .5;
    animation: orbFloat 12s ease-in-out infinite alternate;
}

.orb-one {
    width: 360px;
    height: 360px;
    top: -130px;
    left: -100px;
    background: radial-gradient(circle, rgba(37,99,235,.28), rgba(37,99,235,0) 68%);
}

.orb-two {
    width: 300px;
    height: 300px;
    right: -90px;
    top: 12%;
    background: radial-gradient(circle, rgba(34,211,238,.16), rgba(34,211,238,0) 68%);
    animation-delay: -3s;
}

.orb-three {
    width: 300px;
    height: 300px;
    left: 45%;
    bottom: -150px;
    background: radial-gradient(circle, rgba(59,130,246,.18), rgba(59,130,246,0) 68%);
    animation-delay: -6s;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(125,211,252,.65);
    box-shadow: 0 0 14px rgba(34,211,238,.45);
    animation: particleFloat 8s ease-in-out infinite;
}

.p1 { left: 10%; top: 18%; animation-delay: -1s; }
.p2 { left: 25%; top: 74%; animation-delay: -5s; }
.p3 { left: 47%; top: 20%; animation-delay: -2.5s; }
.p4 { right: 14%; top: 26%; animation-delay: -4s; }
.p5 { right: 27%; bottom: 15%; animation-delay: -6s; }
.p6 { left: 61%; bottom: 36%; animation-delay: -3s; }

.login-shell {
    width: min(1180px, calc(100% - 48px));
    min-height: 680px;
    margin: auto;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
    align-items: stretch;
    gap: 28px;
    padding: 34px 0;
}

.login-brand-panel {
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 34px 30px;
}

.brand-content { width: 100%; max-width: 620px; }

.brand-mark {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(225px, auto) 1px minmax(165px, 195px);
    align-items: center;
    justify-content: start;
    gap: 18px;
    margin-bottom: 52px;
}

.brand-primary {
    min-width: 225px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-copy {
    min-width: 0;
}

.brand-separator {
    width: 1px;
    height: 52px;
    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(96, 165, 250, .30),
            transparent
        );
}

/*
 * Logo Cidade do Aço
 * Fundo branco SOMENTE atrás da marca, para preservar
 * corretamente as letras escuras do arquivo original.
 */
.cidade-aco-logo-wrap {
    width: 190px;
    height: 82px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 9px 13px;

    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 15px;

    background: #ffffff !important;

    box-shadow:
        0 12px 28px rgba(0, 0, 0, .18),
        0 0 0 1px rgba(96, 165, 250, .06);

    overflow: hidden;

    transition:
        transform .22s ease,
        box-shadow .22s ease;
}

.cidade-aco-logo-wrap:hover {
    transform: translateY(-2px);

    box-shadow:
        0 16px 34px rgba(0, 0, 0, .22),
        0 0 0 1px rgba(96, 165, 250, .10);
}

.cidade-aco-logo {
    display: block;

    width: auto;
    height: auto;

    max-width: 164px;
    max-height: 62px;

    object-fit: contain;
}

.brand-logo-wrap {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(96,165,250,.18);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(59,130,246,.15), rgba(34,211,238,.045));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 12px 30px rgba(37,99,235,.10);
}

.brand-logo {
    max-width: 42px;
    max-height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 5px 12px rgba(0,0,0,.16));
}

.brand-kicker {
    margin-bottom: 3px;
    color: #60a5fa;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.brand-name {
    color: var(--login-text);
    font-size: 1.06rem;
    font-weight: 750;
    line-height: 1.18;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 7px 12px;
    border: 1px solid rgba(96,165,250,.18);
    border-radius: 999px;
    background: rgba(59,130,246,.07);
    color: #93c5fd;
    font-size: .74rem;
    font-weight: 700;
}

.brand-hero h1 {
    max-width: 620px;
    margin: 0 0 22px;
    color: #f8fafc !important;
    font-size: clamp(3rem, 5.5vw, 5.1rem);
    line-height: .98;
    font-weight: 800;
    letter-spacing: -.055em;
}

.brand-hero h1 span {
    display: block;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.brand-hero p {
    max-width: 560px;
    margin: 0;
    color: var(--login-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.brand-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 48px;
}

.brand-metric {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 12px;
    border: 1px solid rgba(148,163,184,.10);
    border-radius: 14px;
    background: rgba(255,255,255,.018);
    transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.brand-metric:hover {
    transform: translateY(-3px);
    border-color: rgba(96,165,250,.18);
    background: rgba(59,130,246,.045);
}

.metric-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(59,130,246,.09);
    color: #60a5fa;
    font-size: 1rem;
}

.brand-metric strong,
.brand-metric small { display: block; }

.brand-metric strong {
    margin-bottom: 2px;
    color: #e2e8f0;
    font-size: .76rem;
    font-weight: 700;
}

.brand-metric small {
    color: #7f8da3;
    font-size: .62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    color: #7f8da3;
    font-size: .72rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16,185,129,.10), 0 0 16px rgba(16,185,129,.30);
    animation: statusPulse 2.2s ease-out infinite;
}

.status-separator { opacity: .35; }

.login-form-panel {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    position: relative;
    overflow: hidden;
    padding: 38px;
    border: 1px solid var(--login-line);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,.027), rgba(255,255,255,.006)), var(--login-panel) !important;
    backdrop-filter: blur(28px) saturate(135%);
    -webkit-backdrop-filter: blur(28px) saturate(135%);
    box-shadow: 0 35px 80px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.04);
    text-align: left;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(96,165,250,.22), transparent 38%, transparent 62%, rgba(34,211,238,.12));
    pointer-events: none;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.auth-card-glow {
    position: absolute;
    width: 240px;
    height: 240px;
    top: -150px;
    right: -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.18), rgba(59,130,246,0) 68%);
    pointer-events: none;
}

.auth-header {
    position: relative;
    z-index: 1;
    margin-bottom: 32px;
}

.auth-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #60a5fa;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.auth-header h2 {
    margin: 0 0 10px;
    color: #f8fafc !important;
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -.035em;
}

.auth-header p {
    margin: 0;
    color: var(--login-muted);
    font-size: .88rem;
    line-height: 1.65;
}

.auth-form { position: relative; z-index: 1; }
.login-field { margin-bottom: 20px; }

.login-field label {
    display: block;
    margin-bottom: 7px;
    color: #dbe6f5;
    font-size: .74rem;
    font-weight: 700;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.forgot-link {
    color: #60a5fa;
    font-size: .71rem;
    font-weight: 650;
    text-decoration: none;
}

.forgot-link:hover { color: #7dd3fc; }
.login-input-wrap { position: relative; }

.login-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: #72839a;
    font-size: 1rem;
    pointer-events: none;
    transition: color .18s ease, transform .18s ease;
}

.login-input {
    height: 54px !important;
    padding: 0 48px !important;
    border: 1px solid rgba(148,163,184,.14) !important;
    border-radius: 13px !important;
    background: var(--login-input) !important;
    color: #f8fafc !important;
    font-size: .89rem !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.015) !important;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

.login-input::placeholder { color: #68788e !important; }
.login-input:hover { border-color: rgba(96,165,250,.24) !important; }

.login-input:focus {
    border-color: rgba(59,130,246,.62) !important;
    background: rgba(59,130,246,.045) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,.10), 0 8px 24px rgba(0,0,0,.08) !important;
    transform: translateY(-1px);
}

.login-input-wrap:focus-within .login-input-icon {
    color: #60a5fa;
    transform: translateY(-50%) scale(1.08);
}

.password-toggle {
    width: 42px;
    height: 42px;
    position: absolute;
    top: 50%;
    right: 6px;
    z-index: 3;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #718198;
    transition: background .16s ease, color .16s ease;
}

.password-toggle:hover {
    background: rgba(59,130,246,.08);
    color: #93c5fd;
}

.login-submit {
    width: 100%;
    height: 54px;
    margin-top: 9px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96,165,250,.30) !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 55%, #0ea5e9 100%) !important;
    color: #ffffff !important;
    font-size: .88rem;
    font-weight: 750;
    box-shadow: 0 12px 30px rgba(37,99,235,.24), inset 0 1px 0 rgba(255,255,255,.16) !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}

.login-submit::before {
    content: "";
    width: 90px;
    height: 170%;
    position: absolute;
    top: -35%;
    left: -130px;
    transform: rotate(18deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.24), transparent);
    transition: left .55s ease;
}

.login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 17px 36px rgba(37,99,235,.31), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

.login-submit:hover::before { left: calc(100% + 60px); }
.login-submit:active { transform: scale(.985); }
.login-submit:disabled { cursor: wait; opacity: .86; }

.submit-default,
.submit-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-default i { transition: transform .18s ease; }
.login-submit:hover .submit-default i { transform: translateX(4px); }
.submit-loading { display: none; }
.login-submit.is-loading .submit-default { display: none; }
.login-submit.is-loading .submit-loading { display: flex; }

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid rgba(148,163,184,.10);
    color: #718198;
    font-size: .66rem;
}

.auth-footer i { color: #10b981; }
.footer-dot { opacity: .35; }

.login-theme-toggle {
    width: 48px;
    height: 48px;
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 20;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148,163,184,.15);
    border-radius: 14px;
    background: rgba(8,17,31,.58);
    backdrop-filter: blur(16px);
    color: #93a4ba;
    box-shadow: 0 10px 28px rgba(0,0,0,.14);
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.login-page.soft-dark-mode .login-theme-toggle { background: rgba(34,48,71,.72); }
.login-theme-toggle:hover { transform: translateY(-2px) rotate(4deg); border-color: rgba(96,165,250,.30); color: #7dd3fc; }
.theme-icon { grid-area: 1 / 1; transition: opacity .2s ease, transform .2s ease; }
.theme-icon-soft { opacity: 0; transform: rotate(-30deg) scale(.72); }
.login-theme-toggle.is-soft .theme-icon-dark { opacity: 0; transform: rotate(30deg) scale(.72); }
.login-theme-toggle.is-soft .theme-icon-soft { opacity: 1; transform: rotate(0) scale(1); }

.login-reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: loginReveal .72s cubic-bezier(.16, 1, .3, 1) forwards;
}

.reveal-1 { animation-delay: .08s; }
.reveal-2 { animation-delay: .18s; }
.reveal-3 { animation-delay: .30s; }
.reveal-4 { animation-delay: .42s; }
.reveal-card { animation-delay: .28s; transform: translateY(24px) scale(.985); }
.reveal-field-1 { animation-delay: .47s; }
.reveal-field-2 { animation-delay: .57s; }
.reveal-field-3 { animation-delay: .67s; }
.reveal-field-4 { animation-delay: .78s; }

@keyframes loginReveal {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes statusPulse {
    0% { box-shadow: 0 0 0 0 rgba(16,185,129,.28), 0 0 14px rgba(16,185,129,.22); }
    70% { box-shadow: 0 0 0 8px rgba(16,185,129,0), 0 0 18px rgba(16,185,129,.28); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0), 0 0 14px rgba(16,185,129,.22); }
}

@keyframes orbFloat {
    from { transform: translate3d(-10px,-8px,0) scale(.96); }
    to { transform: translate3d(18px,14px,0) scale(1.05); }
}

@keyframes particleFloat {
    0%,100% { transform: translateY(0) scale(.85); opacity: .25; }
    50% { transform: translateY(-18px) scale(1.15); opacity: .75; }
}

@keyframes gridFade {
    from { opacity: 0; }
    to { opacity: .24; }
}

@media (max-width: 980px) {

    .brand-mark {
        grid-template-columns: minmax(210px, auto) 1px minmax(145px, 165px);
        gap: 14px;
        margin-bottom: 28px;
    }

    .brand-primary {
        min-width: 210px;
    }

    .cidade-aco-logo-wrap {
        width: 160px;
        height: 70px;
        padding: 8px 11px;
    }

    .cidade-aco-logo {
        max-width: 137px;
        max-height: 52px;
    }

    .login-shell {
        width: min(760px, calc(100% - 32px));
        grid-template-columns: 1fr;
        gap: 0;
        padding: 74px 0 30px;
    }
    .login-brand-panel { padding: 24px 24px 10px; }
    .brand-mark { margin-bottom: 28px; }
    .brand-hero h1 { font-size: clamp(2.5rem, 8vw, 4rem); }
    .brand-metrics { margin-top: 30px; }
    .login-form-panel { padding: 18px 24px 28px; }
}

@media (max-width: 640px) {
    .login-shell { width: min(100%, calc(100% - 20px)); padding-top: 68px; }
    .login-brand-panel { padding: 14px 10px 4px; }
    .brand-mark { margin-bottom: 24px; }
    .brand-logo-wrap { width: 54px; height: 54px; border-radius: 15px; }
    .brand-logo { max-width: 36px; max-height: 40px; }
    .brand-kicker { font-size: .62rem; }
    .brand-name { font-size: 1rem; }
    .brand-hero h1 { font-size: clamp(2.35rem, 13vw, 3.2rem); }
    .brand-hero p { font-size: .88rem; line-height: 1.65; }
    .brand-metrics { grid-template-columns: 1fr; margin-top: 24px; }
    .system-status { flex-wrap: wrap; }
    .login-form-panel { padding: 18px 0 24px; }
    .auth-card { padding: 28px 20px; border-radius: 20px; }
    .auth-header h2 { font-size: 1.65rem; }
    .login-input { font-size: 16px !important; }
    .login-theme-toggle { top: 14px; right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-reveal,
    .ambient-orb,
    .particle,
    .ambient-grid,
    .status-dot {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

.login-page a:focus-visible,
.login-page button:focus-visible,
.login-page input:focus-visible {
    outline: 2px solid rgba(96,165,250,.8);
    outline-offset: 2px;
}

/* ==========================================================================
   MOBILE COMPACTO
   No celular o formulário de login precisa aparecer inteiro sem depender
   de rolagem para alcançar o botão Entrar.
   O desktop permanece com a apresentação institucional completa.
   ========================================================================== */

@media (max-width: 640px) {

    .login-page {
        min-height: 100vh;
        min-height: 100svh;
        align-items: flex-start;
    }

    .login-shell {
        width: min(100%, calc(100% - 16px));
        min-height: 0;
        margin: 0 auto;
        padding: 54px 0 10px;
        grid-template-columns: 1fr;
        gap: 0;
        align-items: start;
    }

    /*
     * No mobile mantemos somente a identificação visual.
     * Hero, métricas e status ficam para tablet/desktop.
     */
    .login-brand-panel {
        min-height: 0;
        padding: 0 8px 8px;
        display: block;
    }

    .brand-content {
        max-width: 100%;
    }

    .brand-hero,
    .brand-metrics,
    .system-status {
        display: none !important;
    }

    .brand-mark {
        width: 100%;
        min-height: 46px;
        margin: 0;
        padding: 0 48px 0 4px;

        display: flex;
        align-items: center;
        justify-content: flex-start;

        gap: 9px;
    }

    .brand-primary {
        display: flex;
        align-items: center;
        gap: 9px;
        min-width: 0;
    }

    .brand-logo-wrap {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-radius: 12px;
    }

    .brand-logo {
        max-width: 30px;
        max-height: 32px;
    }

    .brand-copy {
        min-width: 0;
    }

    .brand-kicker {
        margin-bottom: 1px;
        font-size: .52rem;
        letter-spacing: .10em;
        white-space: nowrap;
    }

    .brand-name {
        font-size: .88rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    .brand-separator {
        width: 1px;
        height: 27px;
        flex: 0 0 1px;
        margin: 0 2px;
        background: rgba(148, 163, 184, .18);
    }

    .cidade-aco-logo-wrap {
        width: 88px;
        height: 44px;
        min-width: 88px;
        max-width: 88px;

        padding: 4px 7px;

        border-radius: 9px;
        background: #ffffff !important;

        box-shadow:
            0 6px 16px rgba(0,0,0,.16);
    }

    .cidade-aco-logo {
        display: block;

        width: auto;
        height: auto;

        max-width: 72px;
        max-height: 34px;

        object-fit: contain;
    }

    .login-form-panel {
        min-height: 0;
        padding: 5px 0 10px;
        align-items: flex-start;
    }

    .auth-card {
        width: 100%;
        max-width: none;
        padding: 19px 18px 15px;
        border-radius: 18px;
    }

    .auth-card-glow {
        width: 170px;
        height: 170px;
        top: -112px;
        right: -72px;
    }

    .auth-header {
        margin-bottom: 16px;
    }

    .auth-eyebrow {
        margin-bottom: 5px;
        font-size: .58rem;
        letter-spacing: .11em;
    }

    .auth-header h2 {
        margin-bottom: 4px;
        font-size: 1.34rem;
        line-height: 1.08;
    }

    .auth-header p {
        font-size: .76rem;
        line-height: 1.35;
    }

    .login-field {
        margin-bottom: 11px;
    }

    .login-field label {
        margin-bottom: 4px;
        font-size: .69rem;
    }

    .forgot-link {
        font-size: .67rem;
    }

    /*
     * 16px no input evita o zoom automático do Safari/iPhone.
     */
    .login-input {
        height: 47px !important;
        padding: 0 43px !important;
        border-radius: 11px !important;
        font-size: 16px !important;
    }

    .login-input-icon {
        left: 14px;
        font-size: .92rem;
    }

    .password-toggle {
        width: 36px;
        height: 36px;
        right: 5px;
        border-radius: 9px;
    }

    .login-submit {
        height: 47px;
        margin-top: 2px;
        border-radius: 11px !important;
        font-size: .83rem;
    }

    .login-feedback {
        min-height: 0;
    }

    .auth-footer {
        gap: 5px;
        margin-top: 13px;
        padding-top: 10px;
        font-size: .58rem;
        line-height: 1.25;
    }

    .login-theme-toggle {
        width: 39px;
        height: 39px;
        top: max(9px, env(safe-area-inset-top));
        right: max(9px, env(safe-area-inset-right));
        border-radius: 11px;
    }

    /*
     * Animações mais rápidas no telefone para o formulário ficar disponível
     * imediatamente.
     */
    .reveal-card,
    .reveal-field-1,
    .reveal-field-2,
    .reveal-field-3,
    .reveal-field-4 {
        animation-delay: .08s;
        animation-duration: .38s;
    }
}


/* Telefones estreitos */
@media (max-width: 390px) {

    .login-shell {
        width: min(100%, calc(100% - 12px));
        padding-top: 49px;
    }

    .brand-mark {
        min-height: 40px;
        padding-right: 42px;
        gap: 7px;
    }

    .brand-logo-wrap {
        width: 39px;
        height: 39px;
        flex-basis: 39px;
        border-radius: 11px;
    }

    .brand-logo {
        max-width: 27px;
        max-height: 29px;
    }

    .brand-kicker {
        font-size: .47rem;
    }

    .brand-name {
        font-size: .80rem;
    }

    .brand-separator {
        height: 23px;
    }

    .cidade-aco-logo-wrap {
        width: 74px;
        height: 38px;
        min-width: 74px;
        max-width: 74px;

        padding: 3px 5px;

        background: #ffffff !important;
    }

    .cidade-aco-logo {
        max-width: 62px;
        max-height: 29px;
    }

    .auth-card {
        padding: 17px 15px 13px;
        border-radius: 16px;
    }

    .auth-header {
        margin-bottom: 13px;
    }

    .auth-header h2 {
        font-size: 1.22rem;
    }

    .auth-header p {
        font-size: .72rem;
    }

    .login-field {
        margin-bottom: 9px;
    }

    .login-input,
    .login-submit {
        height: 45px !important;
    }

    .auth-footer {
        margin-top: 10px;
        padding-top: 8px;
    }
}


/*
 * Celulares em modo paisagem ou aparelhos com pouca altura.
 * Retira até a faixa de marcas para garantir prioridade total ao acesso.
 */
@media (max-width: 640px) and (max-height: 600px) {

    .login-shell {
        padding-top: 47px;
        padding-bottom: 6px;
    }

    .login-brand-panel {
        display: none !important;
    }

    .login-form-panel {
        padding: 0;
    }

    .auth-card {
        max-width: 470px;
        margin: 0 auto;
        padding-top: 16px;
        padding-bottom: 12px;
    }

    .auth-header {
        margin-bottom: 12px;
    }

    .auth-header p {
        display: none;
    }

    .login-field {
        margin-bottom: 8px;
    }

    .auth-footer {
        margin-top: 8px;
        padding-top: 7px;
    }
}


/* Alturas extremamente pequenas: mantém o acesso como prioridade absoluta */
@media (max-width: 640px) and (max-height: 500px) {

    .login-shell {
        padding-top: 42px;
    }

    .auth-eyebrow,
    .auth-footer {
        display: none;
    }

    .auth-header {
        margin-bottom: 8px;
    }

    .auth-header h2 {
        font-size: 1.12rem;
    }

    .login-input,
    .login-submit {
        height: 42px !important;
    }

    .login-field {
        margin-bottom: 6px;
    }
}

