/* MídiaFlow — estilos isolados para autenticação. Não substituem o painel. */
html.auth-document,
html.auth-document body {
  max-width: 100%;
  overflow-x: hidden;
}

body.auth-page {
  --auth-purple: #8b5cf6;
  --auth-purple-strong: #7c3aed;
  --auth-blue: #38bdf8;
  --auth-surface: #11151f;
  --auth-surface-2: #171c28;
  --auth-border: #2a3242;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  margin: 0;
  padding: clamp(16px, 4vw, 48px);
  overflow-x: hidden;
  color: #f8fafc;
  background:
    radial-gradient(circle at 12% 8%, rgba(139, 92, 246, .20), transparent 30%),
    radial-gradient(circle at 88% 92%, rgba(56, 189, 248, .13), transparent 32%),
    #080b11;
}

/* Mantém o fallback para navegadores que ainda não aceitam a corradial. */
body.auth-page {
  background-color: #080b11;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(139, 92, 246, .20), transparent 30%),
    radial-gradient(circle at 88% 92%, rgba(56, 189, 248, .13), transparent 32%);
}

body.auth-page,
body.auth-page * {
  box-sizing: border-box;
}

.auth-page .auth-container {
  width: min(100%, 520px);
  min-width: 0;
  margin: 0 auto;
}

.auth-page .auth-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: clamp(24px, 5vw, 40px);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(23, 28, 40, .98), rgba(14, 18, 27, .98));
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.auth-page .auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(28px, 6vw, 42px);
}

.auth-page .auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.auth-page .auth-logo {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-purple), var(--auth-blue));
  box-shadow: 0 8px 22px rgba(124, 58, 237, .28);
  font-weight: 900;
}

.auth-page .auth-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(167, 139, 250, .28);
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, .10);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .02em;
  white-space: nowrap;
}

.auth-page .auth-kicker {
  display: block;
  margin-bottom: 10px;
  color: #a78bfa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-page h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.auth-page .auth-intro {
  margin: 12px 0 0;
  color: #9aa5b5;
  font-size: 15px;
  line-height: 1.55;
}

.auth-page .auth-error {
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid #7f2d3b;
  border-radius: 12px;
  color: #fecdd3;
  background: rgba(127, 29, 58, .34);
  font-size: 14px;
  line-height: 1.45;
}

.auth-page .auth-form {
  margin-top: 26px;
}

.auth-page .field {
  margin: 0 0 17px;
}

.auth-page .field label {
  display: block;
  margin: 0 0 7px;
  color: #dbe3ef;
  font-size: 14px;
  font-weight: 650;
}

.auth-page .input,
.auth-page input[type="email"],
.auth-page input[type="password"],
.auth-page input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid #364052;
  border-radius: 11px;
  outline: none;
  color: #fff;
  background: #0b0f17;
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.auth-page .input::placeholder {
  color: #657086;
}

.auth-page .input:hover {
  border-color: #465269;
}

.auth-page .input:focus {
  border-color: var(--auth-purple);
  background: #0d1220;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .18);
}

.auth-page .auth-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  padding: 13px 18px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-purple-strong), #6d28d9);
  box-shadow: 0 10px 24px rgba(109, 40, 217, .24);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.auth-page .auth-submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 13px 28px rgba(109, 40, 217, .32);
  transform: translateY(-1px);
}

.auth-page .auth-submit:active {
  transform: translateY(0);
}

.auth-page .auth-submit:focus-visible,
.auth-page .auth-links a:focus-visible,
.auth-page .auth-back:focus-visible,
.auth-page .auth-brand:focus-visible {
  outline: 3px solid rgba(56, 189, 248, .45);
  outline-offset: 3px;
}

.auth-page .auth-footer {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  color: #9aa5b5;
  font-size: 14px;
  text-align: center;
}

.auth-page .auth-links {
  display: flex;
  justify-content: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin: 0;
  color: #9aa5b5;
  font-size: 13px;
}

.auth-page .auth-links a,
.auth-page .auth-footer a,
.auth-page .auth-back {
  color: #c4b5fd;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(196, 181, 253, .42);
  text-underline-offset: 3px;
}

.auth-page .auth-links a:hover,
.auth-page .auth-footer a:hover,
.auth-page .auth-back:hover {
  color: #ddd6fe;
}

.auth-page .auth-back {
  display: inline-block;
  margin-top: 17px;
  color: #7f8ba0;
  font-size: 13px;
  text-decoration: none;
}

@media (max-width: 480px) {
  body.auth-page {
    place-items: start center;
    padding: 12px;
  }

  .auth-page .auth-card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .auth-page .auth-header {
    align-items: flex-start;
    margin-bottom: 30px;
  }

  .auth-page .auth-badge {
    max-width: 132px;
    white-space: normal;
    text-align: center;
  }

  .auth-page .auth-intro {
    font-size: 14px;
  }

  .auth-page .auth-form {
    margin-top: 22px;
  }

  .auth-page .auth-footer {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page .auth-submit,
  .auth-page .input {
    transition: none;
  }
}
