/* Tela de login do Doca Livre ON e a intro — mesmo desenho do WMS Doca Livre (static/login.css do WMS). */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', 'Segoe UI', Roboto, sans-serif; color: #1e293b; }

/* ---------- Login ---------- */
.login-page { position: relative; display: flex; justify-content: center; align-items: center; min-height: 100vh; min-height: 100dvh; width: 100%; overflow: hidden; padding: 24px; }
.login-bg { position: absolute; inset: 0; z-index: 0; background: #12172a; }
.login-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.login-bg-overlay { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(8, 11, 22, .15) 0%, rgba(8, 11, 22, .55) 100%); }

.login-card {
    position: relative; z-index: 10;
    width: 100%; max-width: 420px;
    background: rgba(248, 250, 252, .96);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 20px; padding: 48px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);
    animation: cardSlideIn .6s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes cardSlideIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.login-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px; }
.login-logo img { height: 64px; max-width: 100%; object-fit: contain; }
.login-on { font-size: 1.35rem; font-weight: 900; letter-spacing: .06em; color: #000; line-height: 1; }
.login-heading { text-align: center; margin-bottom: 32px; }
.login-heading h1 { font-size: 1.5rem; font-weight: 700; color: #0f172a; margin: 0 0 6px; letter-spacing: -.02em; }
.login-heading p { font-size: .875rem; color: #64748b; margin: 0; }

.login-form { display: flex; flex-direction: column; gap: 18px; }
.input-group label { display: block; font-size: .8125rem; font-weight: 600; color: #334155; margin-bottom: 6px; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 15px; color: #94a3b8; font-size: 16px; pointer-events: none; z-index: 1; }
.input-wrapper input {
    width: 100%; padding: 12px 44px 12px 44px;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    font: inherit; font-size: .9375rem; color: #0f172a; background: #fff; outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.input-wrapper input::placeholder { color: #94a3b8; }
.input-wrapper input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.btn-toggle-password {
    position: absolute; right: 8px; width: 34px; height: 34px;
    background: none; border: none; border-radius: 8px; cursor: pointer; color: #94a3b8;
    display: flex; align-items: center; justify-content: center; transition: color .2s ease;
}
.btn-toggle-password:hover { color: #475569; }
.btn-toggle-password:focus-visible, .btn-login:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }

.error-message, .ok-message {
    border-radius: 8px; padding: 10px 14px; margin-bottom: 18px;
    font-size: .8125rem; font-weight: 500; display: flex; align-items: center; gap: 8px;
}
.error-message { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.ok-message { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }

.btn-login {
    width: 100%; padding: 13px 24px; margin-top: 4px;
    background: #2563eb; color: #fff; border: none; border-radius: 10px;
    font: inherit; font-size: .9375rem; font-weight: 600; letter-spacing: .01em; cursor: pointer;
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.btn-login:hover { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37, 99, 235, .35); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

.login-footer { text-align: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
.login-footer p { font-size: .75rem; color: #94a3b8; margin: 0; }

@media (max-width: 768px) {
    .login-card { padding: 36px 28px; border-radius: 16px; }
    .login-logo img { height: 52px; }
    .login-heading h1 { font-size: 1.3rem; }
}
@media (max-width: 480px) {
    .login-card { padding: 28px 20px; border-radius: 14px; }
    .login-logo img { height: 44px; }
}

/* ---------- Intro (splash) ---------- */
.intro-splash {
    position: fixed; inset: 0; z-index: 100002;
    display: flex; align-items: center; justify-content: center;
    background: #ffffff;
}
.intro-splash--exit { animation: introFadeOut .65s ease-in forwards; }
.intro-splash--exit .intro-marca { animation: introLogoExit .65s ease-in forwards; }
.intro-content { display: flex; flex-direction: column; align-items: center; gap: 24px; width: min(480px, 92vw); }
.intro-marca { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: introLogoIn 1.1s cubic-bezier(.22, 1, .36, 1) both; }
.intro-logo { width: min(360px, 88vw); height: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .08)); }
.intro-on { font-size: 1.5rem; font-weight: 900; letter-spacing: .06em; color: #000; line-height: 1; }
.intro-progress-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: introProgressIn .8s ease-out .35s both; }
.intro-progress-track { width: 100%; height: 6px; border-radius: 999px; background: #eef1f4; border: 1px solid #dde1e6; overflow: hidden; }
.intro-progress-bar { height: 100%; width: 0%; border-radius: 999px; background: #6e7681; transition: width .12s linear; }
.intro-progress-label { font-size: .8rem; color: #5c6670; letter-spacing: .04em; }

@keyframes introLogoIn { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes introLogoExit { to { opacity: 0; transform: scale(1.04); } }
@keyframes introProgressIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes introFadeOut { to { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
    .login-card, .intro-marca, .intro-progress-wrap { animation: none; }
}

/* ON: duas linhas no rodapé do cartão (integrado e direitos) */
.login-footer p + p { margin-top: 6px; }
.login-footer .fa-link { color: #16a34a; }

/* ON: "Manter conectado neste aparelho" (sessao de 30 dias, so para quem marca) */
.manter-conectado { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: #475569; cursor: pointer; margin-top: -4px; }
.manter-conectado input { width: 16px; height: 16px; accent-color: #2563eb; }
