/* Login central — medidas do cartão no tema escuro do BiniLab. A luz da borda é fixa. */
.central-auth-page {
  --muted: rgb(148 163 184);
  --accent: #22d3ee;
  --danger: #f87171;
  --font: "Outfit", sans-serif;
  font-family: "Outfit", sans-serif;
}

body.central-auth-page main {
  max-width: none;
  padding-top: 0;
  padding-bottom: 0;
}

.auth-shell-header {
  box-sizing: border-box;
  height: 62px;
  display: flex;
  align-items: center;
  padding: 13.6px 20px;
  border-bottom: 1px solid rgb(30 41 59);
  background: rgb(15 23 42 / 0.85);
}

.auth-shell-header__logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 11rem;
}

.central-auth {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

@media (max-width: 480px) {
  .auth-shell-header {
    height: 59px;
    padding: 12px 16px;
  }
  .central-auth { margin-top: 1.5rem; }
}

.central-auth-page .site-footer {
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  padding: 3.5rem 1rem 2rem;
  text-align: center;
  color: var(--muted);
  border: 0;
  background: transparent;
}

.central-auth-page .site-footer a {
  color: inherit;
  text-decoration: none;
}

.central-auth-page .site-footer a:hover { color: #fff; }

.central-auth__card,
.auth-hub {
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
  padding: 1.25rem 1.1rem 1rem;
  border: 1px solid rgb(30 41 59);
  border-radius: 14px;
  background: rgb(15 23 42 / 0.72);
  box-shadow: 0 8px 24px rgb(2 6 23 / 0.35);
  font-family: "Outfit", sans-serif;
  color: #fff;
}

.auth-hub__title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  color: #fff;
}

.auth-hub__email-hint,
.auth-hub__sub,
.auth-hub__spam,
.auth-hub__confirm {
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.auth-hub__email-hint {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  word-break: break-word;
}

.auth-hub__sub {
  margin: 0 0 1rem;
  font-size: 0.88rem;
}

.auth-hub__spam {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.auth-hub__notice {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}

.auth-hub__notice .auth-hub__spam {
  margin: 0;
  line-height: 1.35;
  text-align: left;
}

.auth-hub .field { margin: 0 0 0.85rem; }

.auth-hub .field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  color: rgb(203 213 225);
}

.auth-hub .field input[type="email"],
.auth-hub .field input[type="password"],
.auth-hub .field input[type="text"]:not(.auth-hub__code-input),
.auth-hub .field input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 39px;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgb(51 65 85);
  border-radius: 10px;
  background: rgb(2 6 23);
  color: #fff;
  font: inherit;
  font-size: 13.333px;
}

.auth-hub .field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 6.5rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgb(51 65 85);
  border-radius: 14px;
  background: rgb(2 6 23);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  resize: vertical;
}

.auth-hub input[readonly] {
  background: rgb(30 41 59);
  color: rgb(148 163 184);
}

.auth-hub__code-wrap { margin: 0.25rem 0 0.5rem; }
.auth-hub__code-row { display: flex; align-items: center; gap: 0.45rem; }
.auth-hub__code-field { flex: 1; min-width: 0; margin-bottom: 0; }

.auth-hub__code-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 71px;
  min-height: 71px;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgb(51 65 85);
  border-radius: 10px;
  background: rgb(2 6 23);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-align: center;
  text-transform: uppercase;
}

.auth-hub__code-input:focus,
.auth-hub .field input:focus,
.auth-hub .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}

.auth-hub__code-input--shake { animation: auth-hub-shake 0.42s ease; }

@keyframes auth-hub-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.auth-hub__feedback {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
}

.auth-hub__feedback[hidden] { display: none !important; }

.auth-hub__feedback-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1.35rem;
  font-weight: 800;
  animation: auth-hub-pop 0.45s ease;
}

@keyframes auth-hub-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.auth-hub__feedback--ok .auth-hub__feedback-icon {
  background: rgb(34 197 94 / 0.16);
  border: 2px solid #22c55e;
  color: #86efac;
}

.auth-hub__feedback--ok .auth-hub__feedback-icon::before { content: "✓"; }

.auth-hub__feedback--err .auth-hub__feedback-icon {
  background: rgb(244 113 116 / 0.18);
  border: 2px solid var(--danger);
  color: #fca5a5;
}

.auth-hub__feedback--err .auth-hub__feedback-icon::before { content: "✕"; }

.auth-hub__attempts,
.auth-hub__inline-error,
.auth-hub__error {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: var(--danger);
  text-align: center;
}

.auth-hub__inline-error[hidden] { display: none !important; }

.auth-hub__confirm {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.95rem;
}

.auth-hub .btn {
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
}

.auth-hub__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  min-height: 42px;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, rgb(8 145 178), rgb(14 165 233));
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-hub__btn--resend {
  height: 44px;
  min-height: 44px;
  margin-top: 1rem;
  border: 1px solid rgb(51 65 85);
  background: transparent;
  color: rgb(226 232 240);
  font-weight: 600;
  box-shadow: none;
}

.auth-hub__btn--resend:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-hub__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.65rem;
  margin-top: 1.1rem;
  font-size: 0.85rem;
}

.auth-hub__links a { color: rgb(34 211 238); text-decoration: none; }
.auth-hub__links a:hover { text-decoration: underline; }
.auth-hub__links .sep { color: rgb(100 116 139); }

.auth-hub__inline-form { display: inline; margin: 0; }

.auth-hub__help-btn {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid rgb(34 211 238 / 0.55);
  border-radius: 50%;
  background: rgb(34 211 238 / 0.12);
  color: rgb(34 211 238);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}

.auth-hub__help-btn[aria-expanded="true"] {
  background: rgb(8 145 178);
  color: #fff;
}

.auth-hub__popover {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgb(51 65 85);
  border-radius: 8px;
  background: rgb(15 23 42);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.auth-hub__popover[hidden] { display: none !important; }
.auth-hub__popover p { margin: 0 0 0.5rem; }

.auth-hub__link-btn,
.auth-hub__popover-close {
  padding: 0;
  border: none;
  background: none;
  color: rgb(34 211 238);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.auth-hub__ticket {
  margin: 0.35rem 0 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Luz da borda do card de login. Obrigatório em todas as apps.
   A cor é padrão por estado, em --login-light-1 e --login-light-2:
   azul no e-mail, amarelo no código, verde no sucesso.
   E-mail e código giram só em :focus-within. O verde liga no sucesso,
   cerca de 1 s, antes do redirect. prefers-reduced-motion deixa a borda parada.
   Os pseudo-elementos são absolutos: a caixa do card não muda. */

@property --login-glow-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

@keyframes login-card-glow {
  to { --login-glow-angle: 360deg; }
}

.auth-hub {
  position: relative;
  z-index: 0;
  isolation: isolate;
}

.auth-hub[data-login-state="email"] {
  --login-light-1: #1d4ed8;
  --login-light-2: #38bdf8;
}

.auth-hub[data-login-state="code"] {
  --login-light-1: #eab308;
  --login-light-2: #fde047;
}

.auth-hub[data-login-state="success"] {
  --login-light-1: #16a34a;
  --login-light-2: #4ade80;
}

.auth-hub[data-login-state="email"]:focus-within,
.auth-hub[data-login-state="code"]:focus-within,
.auth-hub[data-login-state="success"] {
  animation: login-card-glow 5s linear infinite;
}

.auth-hub::before,
.auth-hub::after {
  content: none;
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--login-glow-angle),
    transparent 0deg,
    transparent 268deg,
    var(--login-light-1) 314deg,
    color-mix(in srgb, var(--login-light-1) 35%, white) 332deg,
    var(--login-light-2) 348deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.auth-hub[data-login-state="email"]:focus-within::before,
.auth-hub[data-login-state="email"]:focus-within::after,
.auth-hub[data-login-state="code"]:focus-within::before,
.auth-hub[data-login-state="code"]:focus-within::after,
.auth-hub[data-login-state="success"]::before,
.auth-hub[data-login-state="success"]::after { content: ""; }

.auth-hub::before { z-index: 1; }

.auth-hub::after {
  z-index: -1;
  inset: -3px;
  padding: 3px;
  filter: blur(6px);
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  .auth-hub[data-login-state="email"]:focus-within,
  .auth-hub[data-login-state="code"]:focus-within,
  .auth-hub[data-login-state="success"] { animation: none; }
  .auth-hub[data-login-state="email"]:focus-within::before,
  .auth-hub[data-login-state="email"]:focus-within::after,
  .auth-hub[data-login-state="code"]:focus-within::before,
  .auth-hub[data-login-state="code"]:focus-within::after,
  .auth-hub[data-login-state="success"]::before,
  .auth-hub[data-login-state="success"]::after { content: none; }
}
