/* Authentication cards shared by the sign-in and create-account pages. */

.auth-main {
  min-height: calc(100vh - 60px);
  padding: 112px 24px 72px;
  display: grid;
  place-items: center;
}

.auth-card {
  position: relative;
  width: min(500px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0%, rgba(104, 196, 255, 0.18), transparent 19rem),
    linear-gradient(145deg, var(--card), var(--paper-deep));
  box-shadow: var(--shadow-warm);
  padding: 38px;
  animation: rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) 80ms both;
}

.auth-card::after {
  content: "";
  position: absolute;
  top: -36px;
  right: 58px;
  width: 135px;
  height: 135px;
  border: 1px solid rgba(27, 42, 74, 0.1);
  background: linear-gradient(135deg, rgba(255, 253, 246, 0.9), rgba(104, 196, 255, 0.22));
  box-shadow: 16px 16px 34px rgba(27, 42, 74, 0.09);
  transform: rotate(45deg);
  pointer-events: none;
}

.auth-copy {
  position: relative;
  z-index: 1;
}

.auth-copy .section-kicker {
  justify-content: flex-start;
}

.auth-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 4vw, 43px);
}

.auth-copy p {
  max-width: 30rem;
  color: var(--ink-soft);
}

.auth-session {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  border: 1px solid rgba(12, 121, 216, 0.16);
  border-radius: 10px;
  background: rgba(12, 121, 216, 0.07);
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 650;
  padding: 11px 13px;
}

.auth-session button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 4px 7px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.device-code {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  border: 1px dashed rgba(12, 121, 216, 0.4);
  border-radius: 10px;
  background: rgba(12, 121, 216, 0.08);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 13px;
  text-align: center;
}

.device-code + .btn {
  width: 100%;
  margin-top: 12px;
}

.auth-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field label {
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 700;
}

.auth-field input {
  border: 1.5px solid var(--line-strong);
  border-radius: 9px;
  background: #fffef9;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 12px 13px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(12, 121, 216, 0.12);
  outline: 0;
}

.auth-form .btn {
  border: 0;
  cursor: pointer;
  justify-content: center;
  margin-top: 6px;
  padding-block: 13px;
}

.auth-alt {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.auth-alt a {
  color: var(--accent-deep);
  font-weight: 700;
}

.auth-status {
  position: relative;
  z-index: 1;
  min-height: 23px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
}

.auth-status.is-error {
  color: #b3533b;
  font-weight: 650;
}

.auth-status.is-success {
  color: #167a4b;
  font-weight: 650;
}

.auth-success {
  position: relative;
  z-index: 1;
  display: none;
  margin-top: 24px;
  text-align: center;
}

.auth-success.visible {
  display: block;
}

.auth-success h2 {
  color: #167a4b;
  font-size: 22px;
  margin: 0 0 8px;
}

.auth-success p {
  color: var(--ink-soft);
}

.auth-success .btn {
  margin-top: 14px;
}

@media (max-width: 640px) {
  .auth-main {
    padding: 92px 16px 52px;
  }

  .auth-card {
    padding: 27px 21px 31px;
  }

  .auth-card::after {
    opacity: 0.55;
  }

  .auth-session {
    align-items: flex-start;
    flex-direction: column;
  }
}
