html { --vvh: 100dvh; --kb-inset: 0px; }
body.login-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', system-ui, sans-serif;
    color: #f8fafc;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 28%),
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 32%),
        #0f172a;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    padding-bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + var(--kb-inset, 0px)));
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
}
.login-wrap {
    width: 100%;
    max-width: 420px;
    padding: 0;
    box-sizing: border-box;
}
.login-container {
    border-radius: 12px;
    background-color: #1e293b;
    border: 1px solid #334155;
    padding: 40px;
}
.logo-box { text-align: center; margin-bottom: 30px; }
.logo-img {
    max-width: 60%;
    max-height: 70px;
    object-fit: contain;
    margin-bottom: 15px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block;
}
.brand-title { margin: 0; font-size: 22px; color: white; letter-spacing: 1px; font-weight: 700; }
.brand-subtitle {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.login-field { margin-bottom: 16px; }
.login-label {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.login-input {
    width: 100%;
    box-sizing: border-box;
    background-color: #0f172a;
    border: 1px solid #334155;
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 16px;
}
.login-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}
.login-input--code { text-align: center; font-weight: 700; letter-spacing: 2px; }
.login-btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 12px;
    min-height: 44px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: inherit;
    background: #3b82f6;
    color: white;
    cursor: pointer;
}
.login-btn:focus-visible,
.login-input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.45);
}
.login-btn:hover { background: #2563eb; }
.login-btn:active { transform: scale(0.98); }
.login-btn, .login-input { touch-action: manipulation; }
.login-btn:disabled { background: #475569; cursor: not-allowed; }
.login-btn--danger { background: #ef4444; }
.login-btn--danger:hover { background: #dc2626; }
.login-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fecaca;
    padding: 8px 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}
.login-help {
    color: #cbd5e1;
    text-align: center;
    font-size: 13px;
    margin: 0 0 20px;
}
.login-back {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #64748b;
    font-size: 12px;
    text-decoration: none;
}
.captcha-box { display: flex; justify-content: center; margin-bottom: 18px; min-height: 65px; }
.bloqueio-box { text-align: center; color: #fca5a5; font-size: 13px; line-height: 1.5; }
@media (max-width: 768px) {
    body.login-page {
        align-items: flex-start;
        padding-top: max(24px, env(safe-area-inset-top, 0px));
    }
    body.login-page.m-kb-open {
        align-items: flex-start;
        min-height: var(--vvh, 100dvh);
    }
}
@media (max-width: 480px) {
    .login-container { padding: 24px 18px; }
    .brand-title { font-size: 20px; }
    .logo-img { max-width: 70%; }
}
@media (prefers-reduced-motion: reduce) {
    .login-btn:active { transform: none; }
}
