/* ================================================================
   Tela de login (plano feature-login-dashboard-1, TASK-010).
   Auto-contida: a página só carrega tokens.css + base.css + este
   arquivo (o restante do /static exige sessão). Somente tokens do
   design system; Deep Teal domina a área institucional e o Lime
   aparece apenas no CTA (GUD-001).
   ================================================================ */

.auth-body { background: var(--bg); }

.auth-shell { display: flex; min-height: 100vh; }

/* ---------------- área institucional (desktop) ---------------- */
.auth-brand {
  flex: 1 1 52%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-16);
  background: var(--deep-teal);
  color: var(--cloud);
  position: relative;
  overflow: hidden;
}
.ab-logo { width: min(320px, 60%); height: auto; }
.ab-tagline {
  font-family: var(--font-lead);
  font-size: var(--fs-h2);
  line-height: 1.35;
  max-width: 420px;
  color: var(--cloud);
}
.ab-context {
  font-size: var(--fs-support);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cloud) 62%, var(--deep-teal));
}
.ab-globe {
  position: absolute;
  right: calc(-1 * var(--sp-16));
  bottom: calc(-1 * var(--sp-16));
  width: 320px;
  opacity: .14;
  pointer-events: none;
}

/* ---------------- card de login ---------------- */
.auth-main {
  flex: 1 1 48%;
  display: grid;
  place-items: center;
  padding: var(--sp-8) var(--sp-6);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--rad-12);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  animation: auth-in var(--dur-240) var(--ease);
}
@keyframes auth-in { from { opacity: 0; translate: 0 var(--sp-2); } to { opacity: 1; translate: 0 0; } }
.ac-logo { height: 28px; width: auto; align-self: flex-start; }
.auth-card h1 { font-size: var(--fs-h2); }
.ac-lead { font-family: var(--font-lead); font-size: var(--fs-support); color: var(--text-3); line-height: 1.6; }
.ac-foot { font-size: var(--fs-meta); color: var(--text-3); text-align: center; margin-top: var(--sp-2); }

/* erro genérico (SEC-005) anunciado por aria-live */
.auth-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger-text);
  border-radius: var(--rad-8);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-support);
}

/* ---------------- campos ---------------- */
.auth-field { display: flex; flex-direction: column; gap: var(--sp-2); }
.auth-field label { font-size: var(--fs-support); font-weight: 600; color: var(--text-2); }
.auth-field input {
  min-height: var(--control-h);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--rad-8);
  background: var(--surface);
  width: 100%;
}
.auth-field input:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }

.auth-pass { position: relative; }
.auth-pass input { padding-right: var(--sp-12); }
.auth-pass-toggle {
  position: absolute;
  top: 50%;
  right: var(--sp-2);
  translate: 0 -50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--rad-8);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.auth-pass-toggle:hover { background: var(--cloud); color: var(--text); }
.auth-pass-toggle .icon {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------------- CTA (único uso de Lime — GUD-001) ---------------- */
.auth-btn {
  min-height: var(--control-h);
  border: 1px solid var(--lime);
  border-radius: var(--rad-8);
  background: var(--lime);
  color: var(--deep-teal);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-160) var(--ease);
}
.auth-btn:hover { background: color-mix(in srgb, var(--lime) 82%, var(--deep-teal)); border-color: var(--deep-teal); }
.auth-btn:disabled { opacity: .6; cursor: progress; }

/* ---------------- responsivo: coluna única, sem overflow em 390x844 ---------------- */
@media (max-width: 767px) {
  .auth-shell { flex-direction: column; }
  .auth-brand {
    flex: 0 0 auto;
    padding: var(--sp-6);
    gap: var(--sp-2);
  }
  .ab-logo { width: min(220px, 70%); }
  .ab-tagline { font-size: var(--fs-body); max-width: none; }
  .ab-globe { display: none; }
  .auth-main { padding: var(--sp-6) var(--sp-4); align-items: start; }
  .auth-card { padding: var(--sp-6); max-width: none; }
}
