/* Sign-in and account creation, on the Copperpot public shell. */

body {
  isolation: isolate;
  position: relative;
}

body::before {
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--saffron) 16%, transparent), transparent 30rem),
    radial-gradient(circle at 84% 82%, color-mix(in srgb, var(--pandan) 14%, transparent), transparent 26rem);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.auth-shell {
  display: grid;
  min-height: min(38rem, calc(100vh - 8rem));
  padding: clamp(1.5rem, 6vh, 3.5rem) var(--gutter) clamp(2.5rem, 8vh, 4.5rem);
  place-items: center;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: var(--lift);
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 2.25rem);
  position: relative;
  width: min(100%, 27rem);
}

.auth-card::before {
  background: linear-gradient(90deg, var(--saffron), var(--paprika) 65%, var(--pandan));
  content: "";
  height: .2rem;
  inset: 0 0 auto;
  position: absolute;
}

.auth-mark {
  color: var(--saffron);
  display: block;
  height: 2.1rem;
  margin-bottom: 1.3rem;
  width: 2.1rem;
}

.auth-intro { display: grid; gap: .4rem; margin-bottom: 1.6rem; }
.auth-intro h2 { font-family: var(--display); font-size: 1.75rem; letter-spacing: -.02em; }
.auth-intro p { color: var(--muted); font-size: .95rem; }

.auth-eyebrow {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.auth-form { display: grid; gap: 1.05rem; }
.auth-form + .auth-form { margin-top: .35rem; }

.auth-field { display: grid; gap: .4rem; }
.auth-field label { font-size: .85rem; font-weight: 600; }

.auth-field input {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: .65rem;
  color: var(--text);
  font: inherit;
  min-height: 2.9rem;
  padding: .6rem .8rem;
  width: 100%;
}
.auth-field input:focus { border-color: var(--saffron); }

.auth-hint { color: var(--muted); font-size: .82rem; line-height: 1.5; }

.auth-errors {
  background: color-mix(in srgb, var(--paprika) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--paprika) 35%, transparent);
  border-radius: .7rem;
  display: grid;
  gap: .35rem;
  font-size: .88rem;
  margin-bottom: 1.2rem;
  padding: .75rem .9rem;
}

.auth-field-errors {
  color: var(--paprika);
  display: grid;
  font-size: .82rem;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-divider {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-family: var(--mono);
  font-size: .66rem;
  gap: .75rem;
  grid-template-columns: 1fr auto 1fr;
  letter-spacing: .12em;
  margin: 1.4rem 0;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after { background: var(--line); content: ""; height: 1px; }

.auth-submit {
  align-items: center;
  background: var(--saffron);
  border: 1px solid transparent;
  border-radius: 999px;
  color: #221a06;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 600;
  gap: .5rem;
  justify-content: center;
  min-height: 2.9rem;
  padding: .6rem 1.2rem;
  transition: background-color .16s ease, transform .16s ease;
  width: 100%;
}
.auth-submit:hover { background: #f0b23f; }
.auth-submit:active { transform: translateY(1px); }
.auth-submit svg { fill: none; height: 1.05rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 1.05rem; }

.auth-switch { color: var(--muted); font-size: .88rem; margin-top: 1.2rem; text-align: center; }
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch + .auth-switch { margin-top: .5rem; }

/* Account creation reuses the card, with Django's default form rendering. */

.auth-card form p { display: grid; gap: .4rem; margin: 0 0 1.05rem; }
.auth-card form label { font-size: .85rem; font-weight: 600; }
.auth-card form input {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: .65rem;
  color: var(--text);
  font: inherit;
  min-height: 2.9rem;
  padding: .6rem .8rem;
  width: 100%;
}
.auth-card form ul,
.auth-card .helptext { color: var(--muted); font-size: .8rem; line-height: 1.5; margin: 0; padding-left: 1.1rem; }
.auth-card .errorlist { color: var(--paprika); list-style: none; padding-left: 0; }
