/* Account pages (sign up, log in). Builds on the variables in styles.css. */

.auth {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 160px);
  padding: 4.5rem 1rem 5rem;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.auth-card--wide {
  width: min(540px, 100%);
}
.auth-card__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(180deg, var(--titlebar), var(--titlebar-2));
}
.auth-card__bar .dots {
  display: flex;
  gap: 5px;
}
.auth-card__bar .dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}
.auth-card__bar .dots span:first-child {
  background: var(--accent);
}
.auth-card__name {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.auth-card__body {
  padding: 1.5rem 1.5rem 1.25rem;
}
.auth-card__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
}
.auth-card__text {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
}
.auth-card__alt {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--muted);
}
.auth-card__alt a {
  color: var(--accent-bright);
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.auth-field__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-field__input {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.auth-field__input:focus {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: var(--shadow-glow);
}
.auth-field.has-error .auth-field__input {
  border-color: var(--bad);
}
.auth-field__error,
.auth-form__alert {
  margin: 0;
  font-size: 0.8rem;
  color: var(--bad);
}
.auth-form__alert {
  margin-bottom: 1rem;
  padding: 0.6rem 0.75rem;
  background: rgba(192, 57, 43, 0.06);
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: var(--radius-sm);
}
.auth-form__notice {
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.84rem;
  color: var(--good);
  background: rgba(13, 110, 63, 0.06);
  border: 1px solid rgba(13, 110, 63, 0.25);
  border-radius: var(--radius-sm);
}
.auth-form--inline {
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.auth-form--inline .auth-card__text {
  margin: 0;
}
.auth-form__forgot,
.auth-link-button {
  align-self: flex-start;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-bright);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}
.auth-form__forgot {
  margin-top: -0.4rem;
}
.account-details {
  margin: 0 0 1.5rem;
  border-top: 1px solid var(--border);
}
.account-details > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.account-details dt {
  padding-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.account-details dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.account-details__note {
  flex-basis: 100%;
  font-size: 0.8rem;
  color: var(--muted);
}
.account-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
}
.account-badge--good {
  color: var(--good);
  background: rgba(13, 110, 63, 0.06);
  border-color: rgba(13, 110, 63, 0.25);
}
.account-badge--warn {
  color: var(--bad);
  background: rgba(192, 57, 43, 0.06);
  border-color: rgba(192, 57, 43, 0.25);
}
.account-inline-form {
  display: inline;
  margin: 0;
}
.account-actions {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.account-subscribe {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}
.account-section {
  margin-bottom: 1.5rem;
}
.account-section__title {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}
.account-optional summary {
  cursor: pointer;
}
.account-optional .account-details__note {
  display: block;
  margin: 0 0 1rem;
}
.account-logout {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.account-delete {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.account-delete__submit {
  color: var(--bad);
  border-color: rgba(192, 57, 43, 0.4);
}
@media (max-width: 480px) {
  .account-details > div {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}
.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.google-button:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.google-button__logo {
  width: 18px;
  height: 18px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-form__hint {
  margin: -0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.auth-form__submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.4rem;
}
