body {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Tela de autenticação da Potência Diesel: mesma técnica da landing page
     (public/css/pages/landing.css) — reaproveita o design system em azul,
     só troca a cor de destaque aqui (escopo local ao body desta página),
     nunca nas variáveis globais em base/variables.css. */
  --blue:      var(--red);
  --blue-bg:   var(--red-bg);
  --blue-mid:  var(--red-mid);
  --blue-text: var(--red-text);
}
.login-wrap {
  width: 100%;
  max-width: 380px;
  padding: 16px;
}
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.login-logo-icon {
  width: 40px; height: 40px;
  background: var(--blue-bg);
  color: var(--blue);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.login-logo-title { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.login-logo-sub   { font-size: 12px; color: var(--text3); }
.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  padding: 28px;
}
.login-card h2 {
  font-size: 16px; font-weight: 600;
  margin-bottom: 20px; color: var(--text);
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
  color: var(--text2); margin-bottom: 6px;
}
.field .input-wrap {
  position: relative; display: flex; align-items: center;
}
.field .input-wrap i {
  position: absolute; left: 11px;
  font-size: 16px; color: var(--text3); pointer-events: none;
}
.field input {
  width: 100%; padding: 10px 12px 10px 36px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--surface); outline: none;
  transition: border-color .12s;
}
.field input[type="password"] { padding-right: 38px; }
.field input:focus { border-color: var(--blue); }
.toggle-pw {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: none; border: none; cursor: pointer; border-radius: var(--radius-sm);
  color: var(--text3); font-size: 16px; padding: 0;
}
.toggle-pw:hover { color: var(--text2); background: var(--surface2); }
.error-msg {
  display: none;
  background: var(--red-bg);
  border: 1px solid #e0b0b0;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px; color: var(--red);
  margin-bottom: 14px;
  align-items: center; gap: 7px;
}
.error-msg.show { display: flex; }
.btn-login {
  width: 100%; padding: 11px;
  background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity .12s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-login:hover { opacity: .88; }
.btn-login:disabled { opacity: .55; cursor: not-allowed; }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.btn-login.loading .spinner { display: block; }
.btn-login.loading .btn-text { display: none; }
.blocked-msg {
  display: none;
  text-align: center; font-size: 12px; color: var(--text3);
  margin-top: 10px;
}
.blocked-msg.show { display: block; }
.login-alt-link {
  text-align: center; font-size: 13px; color: var(--text3);
  margin-top: 18px;
}
.login-alt-link a {
  color: var(--blue); font-weight: 600; text-decoration: none;
}
.login-alt-link a:hover { text-decoration: underline; }
.field label .optional {
  text-transform: none; font-weight: 400; color: var(--text3);
  letter-spacing: 0;
}
.field-row {
  display: flex; gap: 10px;
}
.field-row .field { flex: 1; }
.login-wrap.login-wrap-wide { max-width: 440px; }

.login-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0;
  font-size: 12px; color: var(--text3);
  text-transform: uppercase; letter-spacing: .4px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
#google-signin-btn,
#google-signin-btn-cadastro {
  display: flex; justify-content: center;
  min-height: 40px;
}
.google-signin-disabled {
  text-align: center; font-size: 12px; color: var(--text3);
  padding: 9px 12px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
}

/* ─── Tela de autenticação com painel deslizante ─────────────────────────── */
.auth-body {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px 16px;
  background: var(--bg);
}
.auth-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 22px;
}
.auth-logo-img { height: 48px; width: auto; }

.auth-container {
  position: relative;
  width: 850px; max-width: 100%;
  min-height: 620px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  overflow: hidden;
}

.form-container {
  position: absolute; top: 0; height: 100%; width: 50%;
  transition: all .6s ease-in-out;
}
.auth-form {
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 0 40px; text-align: center;
  overflow-y: auto;
}
.auth-form h1 {
  font-size: 22px; font-weight: 700; margin-bottom: 6px; color: var(--text);
}
.auth-form .login-divider { width: 100%; margin: 10px 0 16px; }
.auth-form .field,
.auth-form .field-row { width: 100%; }
.auth-form .error-msg,
.auth-form .blocked-msg { width: 100%; }
.auth-form .btn-login { width: 100%; margin-top: 4px; }
.auth-forgot { width: 100%; text-align: right; font-size: 12px; margin: -6px 0 12px; }
.auth-hint { width: 100%; text-align: left; font-size: 11.5px; color: var(--text3); margin: -8px 0 14px; }
.auth-forgot a { color: var(--blue); font-weight: 600; text-decoration: none; }
.auth-forgot a:hover { text-decoration: underline; }
.auth-mobile-switch {
  display: none;
  font-size: 13px; color: var(--text3); margin-top: 16px;
}
.auth-mobile-switch a { color: var(--blue); font-weight: 600; text-decoration: none; }

.sign-in-container { left: 0; z-index: 2; }
.sign-up-container { left: 0; z-index: 1; opacity: 0; }

.overlay-container {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  overflow: hidden; z-index: 100;
  transition: transform .6s ease-in-out;
}
.overlay {
  background: linear-gradient(120deg, var(--blue-mid), var(--blue));
  color: #fff; position: relative; left: -100%; width: 200%; height: 100%;
  transform: translateX(0); transition: transform .6s ease-in-out;
}
.overlay-panel {
  position: absolute; top: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  height: 100%; width: 50%; padding: 0 40px;
}
.overlay-panel h1 { font-size: 24px; font-weight: 700; margin-bottom: 14px; }
.overlay-panel p { font-size: 13.5px; line-height: 1.6; opacity: .92; margin-bottom: 26px; }
.overlay-left { transform: translateX(-20%); left: 0; }
.overlay-right { transform: translateX(0); right: 0; }

.ghost {
  background: transparent; border: 1.5px solid #fff; color: #fff;
  border-radius: 999px; padding: 10px 34px;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s;
}
.ghost:hover { background: #fff; color: var(--blue); }

/* Estado ativo: desliza tudo para o lado do cadastro */
.auth-container.right-panel-active .sign-in-container { transform: translateX(100%); }
.auth-container.right-panel-active .sign-up-container {
  transform: translateX(100%); opacity: 1; z-index: 5;
  animation: authShow .6s;
}
.auth-container.right-panel-active .overlay-container { transform: translateX(-100%); }
.auth-container.right-panel-active .overlay { transform: translateX(50%); }
.auth-container.right-panel-active .overlay-left { transform: translateX(0); }
.auth-container.right-panel-active .overlay-right { transform: translateX(20%); }

@keyframes authShow {
  0%, 49.9%   { opacity: 0; z-index: 1; }
  50%, 100%   { opacity: 1; z-index: 5; }
}

/* ─── Cadastro público oculto ────────────────────────────────────────────
   Ver CLAUDE.md ("Cadastro público oculto"): só esconde via CSS — o form,
   o JS (doCadastro) e a rota /api/auth/signup continuam intactos. Reaproveita
   o mesmo layout de coluna única que o breakpoint mobile abaixo já usava,
   só que aplicado em qualquer largura de tela. Pra reativar, remova a classe
   "cadastro-oculto" do #authContainer em login.html. */
.cadastro-oculto { min-height: 0; }
.cadastro-oculto .overlay-container,
.cadastro-oculto .sign-up-container,
.cadastro-oculto .sign-in-container .auth-mobile-switch { display: none !important; }
.cadastro-oculto .form-container {
  position: static; width: 100%; height: auto; transition: none;
}

@media (max-width: 768px) {
  .auth-container { min-height: 0; }
  .overlay-container { display: none; }
  .form-container {
    position: static; width: 100%; height: auto; transition: none;
  }
  .sign-up-container { display: none; opacity: 1; }
  .auth-container.right-panel-active .sign-in-container { display: none; }
  .auth-container.right-panel-active .sign-up-container {
    display: flex; transform: none; animation: none;
  }
  .auth-form { padding: 28px 22px; }
  .auth-mobile-switch { display: block; }
}
