/* /systems/aura/modules/login/login.css
   Redesign "split-screen" — painel navy + formulário claro, destaque laranja (cor da marca ASSEP).
   Mantém os mesmos hooks de id/classe que o login.js espera. */

:root {
  /* Navy (painel de marca) */
  --nav-1: #1b1e3a;
  --nav-2: #12142a;
  --nav-line: rgba(255, 255, 255, 0.10);

  /* Laranja de destaque (cor da marca ASSEP) */
  --accent: #f26a21;
  --accent-strong: #d8541a;
  --accent-soft: #fdeee2;

  /* Neutros (lado claro) */
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --page-bg: #eef0f6;

  --t-base: 0.28s ease;
  --t-fast: 0.16s ease-out;
}

html,
body {
  height: 100%;
}

/* Fundo da página: off-white com leve brilho laranja nos cantos */
body.login-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(242, 106, 33, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(242, 106, 33, 0.08), transparent 55%),
    var(--page-bg);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Centralização */
.center-screen {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  box-sizing: border-box;
}

/* Card = duas colunas (marca | formulário) */
.login-card {
  width: min(960px, 100%);
  min-height: 580px;
  border-radius: 22px;
  background: var(--surface);
  padding: 0;                 /* zera o padding herdado da .card global */
  border: none;
  box-shadow:
    0 30px 70px rgba(17, 20, 45, 0.18),
    0 6px 18px rgba(17, 20, 45, 0.08);
  overflow: hidden;

  display: grid;
  grid-template-columns: 45% 55%;
  animation: cardEntrance 0.55s var(--t-base) both;
}

/* neutraliza o brilho radial do .card global */
.login-card::before {
  display: none !important;
}

/* ============================================================
   PAINEL DE MARCA (esquerda, navy)
   ============================================================ */
.login-brandpanel {
  position: relative;
  overflow: hidden;
  padding: 40px 38px;
  color: #fff;
  background:
    linear-gradient(160deg, var(--nav-1) 0%, var(--nav-2) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}

/* brilho laranja grande no canto inferior */
.brandpanel__glow {
  position: absolute;
  z-index: -1;
  width: 460px;
  height: 460px;
  left: -140px;
  bottom: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 106, 33, 0.55), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}

/* grade sutil de pontos */
.brandpanel__grid {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: linear-gradient(160deg, rgba(0, 0, 0, 0.55), transparent 70%);
  -webkit-mask-image: linear-gradient(160deg, rgba(0, 0, 0, 0.55), transparent 70%);
  pointer-events: none;
}

/* logo branca da ASSEP (logo-base.png já é branca) */
.brandpanel__logo {
  width: 150px;
  height: auto;
  opacity: 0.98;
}

.brandpanel__center {
  max-width: 320px;
}

.brandpanel__headline {
  margin: 0 0 12px 0;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.brandpanel__headline .hl {
  color: #ffb784;
}

.brandpanel__sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.66);
}

.brandpanel__foot {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 600;
}

/* ============================================================
   FORMULÁRIO (direita)
   ============================================================ */
.login-body {
  padding: 46px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface);
}

/* Etapas (contrato com o login.js) */
.login-step {
  display: none;
  animation: fadeInUp 0.4s var(--t-base) both;
}

.login-step--active {
  display: block;
}

.login-head {
  margin-bottom: 26px;
}

.login-title {
  margin: 0 0 6px 0;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.login-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

/* Campos */
.field {
  margin: 18px 0;
}

.label {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin: 0 0 8px 0;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.input {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 15px 16px;
  outline: none;
  transition: box-shadow var(--t-base), border-color var(--t-base);
  font-size: 15px;
  box-sizing: border-box;
  font-family: inherit;
}

.input::placeholder {
  color: #aab0bd;
}

.input:hover {
  border-color: #cfd4de;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(242, 106, 33, 0.15);
}

/* Botão primário */
.button {
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
  box-shadow: 0 12px 26px rgba(242, 106, 33, 0.30);
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transition: left 0.6s var(--t-base);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(242, 106, 33, 0.38);
  filter: brightness(1.03);
}

.button:hover::before {
  left: 120%;
}

.button:active {
  transform: translateY(0);
}

.button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-primary {
  margin-top: 8px;
}

/* Link "Não é você?" */
.link-button {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 4px;
  font-family: inherit;
}

.link-button:hover {
  text-decoration: underline;
}

/* Identidade (etapa senha) */
.login-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.login-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid #fff;
  box-shadow:
    0 0 0 2px rgba(242, 106, 33, 0.35),
    0 14px 28px rgba(17, 20, 45, 0.14);
  background: #f3f4f6;
}

.login-name {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

/* Helper */
.helper {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

.helper-bottom {
  margin-top: 20px;
}

/* ============================================================
   Toasts (AuraToast) — mantém as classes esperadas pelo JS
   ============================================================ */
.toast-stack {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 360px;
  background: #fff;
  border-radius: 12px;
  box-shadow:
    0 16px 36px rgba(17, 20, 45, 0.16),
    0 0 0 1px rgba(17, 20, 45, 0.05);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  pointer-events: auto;
  border-left: 4px solid var(--accent);
}

.toast.error {
  border-left-color: #dc2626;
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.success {
  border-left-color: #16a34a;
}

.toast-body {
  flex: 1;
}

.toast-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.toast-msg {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0 0 0 0.4rem;
}

.toast-hide {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

/* ============================================================
   Animações
   ============================================================ */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 880px) {
  .login-card {
    grid-template-columns: 1fr;
    min-height: 0;
    width: min(440px, 100%);
  }

  /* painel vira uma faixa de topo compacta */
  .login-brandpanel {
    padding: 26px 28px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .brandpanel__center,
  .brandpanel__foot {
    display: none;
  }

  .brandpanel__logo {
    width: 108px;
  }

  .login-body {
    padding: 32px 26px 34px;
  }
}

@media (max-width: 420px) {
  .login-title {
    font-size: 22px;
  }
  .login-avatar {
    width: 88px;
    height: 88px;
  }
}

/* Acessibilidade: reduz movimento */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
