/* ==========================================================================
   PlayLink — login e configuração inicial
   ========================================================================== */

.auth-page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--studio-bg);
  color: var(--studio-ink);
  overflow-x: hidden;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-bg .aurora__blob {
  opacity: 0.42;
}

.auth-bg .aurora__blob--blue {
  top: -14%;
  left: 4%;
}

.auth-bg .aurora__blob--green {
  top: 36%;
  right: -6%;
}

.auth-bg .aurora__blob--yellow {
  bottom: -18%;
  left: 36%;
}

.auth-bg .aurora__blob--red {
  top: 55%;
  left: -10%;
}

.auth-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px 10px;
}

.auth-topbar .studio-brand {
  color: var(--studio-ink);
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 460px);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 24px 46px;
  flex: 1 1 auto;
}

.auth-story {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 660px;
  padding-left: 8px;
}

.auth-story h1 {
  margin: 20px 0 0;
  font-size: clamp(38px, 4.3vw, 58px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.auth-story__content > p {
  max-width: 540px;
  margin: 20px 0 0;
  color: var(--studio-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
}

.auth-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  max-width: 520px;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-points__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--studio-line);
  border-radius: 11px;
  background: var(--studio-surface);
  color: var(--studio-accent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.auth-points__icon .icon {
  width: 18px;
  height: 18px;
}

.auth-points li > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 1px;
}

.auth-points strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.auth-points span {
  color: var(--studio-muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
}

.auth-story__proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 520px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 16px;
  background: var(--studio-line);
  box-shadow: var(--studio-card-shadow);
}

.auth-story__proof > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--studio-surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.auth-story__proof strong {
  color: var(--studio-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.auth-story__proof span {
  color: var(--studio-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.auth-story__foot {
  margin: 20px 0 0;
  color: var(--studio-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
}

.auth-panel::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(1, 135, 95, 0.16), transparent 68%);
  content: "";
  filter: blur(34px);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--studio-line);
  border-radius: 28px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.55), transparent 42%),
    var(--studio-surface);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  box-shadow: var(--studio-shadow);
  animation: fade-up 0.45s cubic-bezier(0.2, 0, 0, 1) both;
}

[data-theme="dark"] .auth-card {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 42%),
    var(--studio-surface);
}

.auth-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--studio-accent), transparent);
  opacity: 0.65;
  content: "";
}

.auth-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-card__top .auth-card__badge {
  margin-bottom: 0;
}

.auth-card__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid rgba(1, 135, 95, 0.18);
  border-radius: 999px;
  background: rgba(1, 135, 95, 0.07);
  color: #01875f;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

[data-theme="dark"] .auth-card__status {
  border-color: rgba(109, 213, 140, 0.2);
  background: rgba(109, 213, 140, 0.08);
  color: #6dd58c;
}

.auth-card__status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: auth-status-pulse 2.2s ease-in-out infinite;
}

.auth-card__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--studio-accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

@keyframes auth-status-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.auth-card--setup {
  max-width: 480px;
}

.auth-card__badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--studio-accent-soft);
  color: var(--studio-accent);
}

.auth-card__badge .icon {
  width: 22px;
  height: 22px;
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.auth-card__sub {
  margin: 7px 0 22px;
  color: var(--studio-muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.55;
}

.auth-field-group {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  margin-bottom: 7px;
  color: var(--studio-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}

.auth-field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 12px;
  border: 1.5px solid var(--studio-line-strong);
  border-radius: 12px;
  background: var(--studio-bg-2);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-field:focus-within {
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 4px var(--studio-accent-soft);
}

.auth-field__icon {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--studio-muted);
}

.auth-field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--studio-ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.auth-field input::placeholder {
  color: var(--studio-muted);
  opacity: 0.62;
  font-weight: 400;
}

.auth-eye {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--studio-muted);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.auth-eye:hover {
  background: var(--studio-line);
  color: var(--studio-ink);
}

.auth-eye .icon {
  width: 17px;
  height: 17px;
}

.auth-eye .icon--eye-off {
  display: none;
}

.auth-eye[aria-pressed="true"] .icon--eye {
  display: none;
}

.auth-eye[aria-pressed="true"] .icon--eye-off {
  display: block;
}

.auth-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.auth-field-row .auth-field-group {
  margin-bottom: 0;
}

.auth-field-row .auth-field {
  height: 50px;
  padding-inline: 10px;
}

.auth-field-row .auth-field__icon {
  display: none;
}

.auth-error {
  margin: 4px 0 12px;
  padding: 9px 12px;
  border: 1px solid rgba(217, 48, 37, 0.22);
  border-radius: 10px;
  background: rgba(217, 48, 37, 0.07);
  color: #b3261e;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
}

[data-theme="dark"] .auth-error {
  border-color: rgba(242, 139, 130, 0.25);
  background: rgba(242, 139, 130, 0.08);
  color: #f28b82;
}

.auth-page .auth-submit {
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin-top: 4px;
  border-radius: 12px;
  background: linear-gradient(135deg, #01875f, #0a9b6e);
  box-shadow: 0 10px 22px -12px rgba(1, 135, 95, 0.65);
  font-size: 13px;
  transition: filter 0.18s ease, box-shadow 0.18s ease;
}

.auth-page .auth-submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 12px 26px -12px rgba(1, 135, 95, 0.75);
}

.auth-page .auth-submit .icon {
  transition: transform 0.18s ease;
}

.auth-page .auth-submit:hover .icon {
  transform: translateX(3px);
}

.auth-page .auth-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-page .auth-submit.is-loading {
  gap: 8px;
}

.auth-page .auth-submit.is-loading .icon {
  display: none;
}

.auth-page .auth-submit.is-loading::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.auth-help {
  margin: 18px 0 0;
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
}

.auth-fixed-hint {
  margin: 6px 0 0;
  color: var(--studio-muted);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.45;
}

.auth-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--studio-line);
  color: var(--studio-muted);
  font-size: 10px;
  font-weight: 500;
}

/* Responsivo ------------------------------------------------------------- */

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    padding-top: 12px;
  }

  .auth-story {
    display: none;
  }

  .auth-card {
    margin-top: 12px;
  }

  .auth-footer {
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .auth-topbar {
    padding: 16px 16px 4px;
  }

  .auth-shell {
    padding: 14px 16px 34px;
  }

  .auth-card {
    padding: 22px;
    border-radius: 22px;
  }

  .auth-card h2 {
    font-size: 23px;
  }

  .auth-field {
    height: 50px;
  }

  .auth-field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .auth-field-row .auth-field__icon {
    display: block;
  }

  .auth-card__sub {
    margin-bottom: 18px;
  }

  .auth-footer {
    padding: 14px 16px 18px;
  }
}
