/* ═══════════════════════════════════════════════════════════════
   Telas de Login (admin + motorista) — claro/escuro via CSS vars
═══════════════════════════════════════════════════════════════ */

.login-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow: hidden;
}

/* Brilho de fundo, com cor por tipo de tela */
.login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,107,53,.16), transparent 42%),
    radial-gradient(circle at 85% 85%, rgba(255,159,10,.12), transparent 45%);
  pointer-events: none;
}

.login-wrap {
  width: 100%;
  max-width: 410px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  animation: loginPop .3s cubic-bezier(.34,1.56,.64,1);
}

@keyframes loginPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── Marca ── */
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-logo {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: color-mix(in srgb, var(--logo-cor, var(--accent)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--logo-cor, var(--accent)) 40%, transparent);
}
.login-brand-name { font-size: 19px; font-weight: 800; color: var(--text); }
.login-brand-sub { font-size: 12px; color: var(--muted); }

.login-sub { font-size: 13px; color: var(--muted); margin: 14px 0 18px; line-height: 1.5; }
.login-h2 { font-size: 19px; font-weight: 800; margin: 16px 0 0; color: var(--text); }

/* ── Campos ── */
.login-field { margin-bottom: 14px; }
.login-field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }

.login-input {
  width: 100%; box-sizing: border-box;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.login-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.login-pass { position: relative; }
.login-pass .login-input { padding-right: 44px; }
.login-codigo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; text-transform: uppercase; }
.pass-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px;
  width: 34px; height: 34px; border-radius: 8px;
}
.pass-toggle:hover { background: var(--border); }

.caps-warn { font-size: 11px; color: #ff9f0a; margin-top: 6px; }

/* ── Linha lembrar / esqueceu ── */
.login-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 16px; }
.login-check { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; cursor: pointer; }
.login-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.login-link { background: none; border: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.login-link:hover { text-decoration: underline; }

/* ── Honeypot (invisível) ── */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Botão ── */
.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: none; border-radius: 12px;
  color: #1a1207; font-size: 15px; font-weight: 800;
  cursor: pointer; transition: filter .15s, opacity .15s;
  margin-top: 4px;
}
.login-btn:hover { filter: brightness(1.07); }
.login-btn:disabled { opacity: .65; cursor: not-allowed; }

/* ── Mensagens ── */
.login-msg { font-size: 13px; min-height: 18px; margin: 4px 0 10px; font-weight: 600; }
.msg-err { color: #ff453a; }
.msg-ok { color: #34c759; }
.msg-info { color: var(--muted); }

/* ── Bloqueio ── */
.login-lock {
  background: rgba(255,69,58,.1); border: 1px solid rgba(255,69,58,.32);
  border-radius: 11px; padding: 11px 13px; font-size: 13px; color: #ff453a;
  margin-bottom: 16px; line-height: 1.4;
}

/* ── Rodapé do card ── */
.login-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.login-foot a { color: var(--accent); font-weight: 700; text-decoration: none; }
.login-foot a:hover { text-decoration: underline; }
.login-foot-muted { font-size: 12px; }

.login-demo {
  margin-top: 18px; padding: 10px 12px;
  background: var(--panel-2); border: 1px dashed var(--border); border-radius: 10px;
  font-size: 12px; color: var(--muted); line-height: 1.5;
}
.login-demo code { color: var(--accent); font-weight: 700; }

.login-legal { text-align: center; font-size: 11px; color: var(--muted); margin-top: 18px; }

/* ── Confirmação de e-mail enviado ── */
.login-ok-icon { font-size: 44px; text-align: center; margin: 8px 0 4px; }

/* ── Medidor de força de senha ── */
.pwd-meter { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin: 8px 0 6px; }
.pwd-meter-fill { height: 100%; width: 0; border-radius: 3px; transition: width .25s, background .25s; }
.pwd-hint { font-size: 11px; color: var(--muted); }

/* ── Tablet ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .login-wrap { max-width: 460px; }
}

/* ── Celular ── */
@media (max-width: 767px) {
  .login-body { padding: 16px; align-items: flex-start; padding-top: 5vh; }
  .login-wrap { max-width: 100%; }
  .login-card { padding: 24px 18px; border-radius: 16px; }
  .login-brand-name { font-size: 16px; }
  .login-input { font-size: 16px; /* evita zoom automático no iOS */ }
  .login-btn { font-size: 15px; padding: 14px; }
}

/* ── Celular pequeno ── */
@media (max-width: 440px) {
  .login-card { padding: 20px 16px; }
  .login-logo { width: 42px; height: 42px; }
}

/* ── Paisagem celular ── */
@media (max-width: 812px) and (orientation: landscape) {
  .login-body { padding: 12px; align-items: center; padding-top: 2vh; }
  .login-card { padding: 16px 20px; }
  .login-sub { display: none; }
  .login-demo { display: none; }
}
