:root {
  --auth-black: #050505;
  --auth-panel: rgba(8, 8, 8, .94);
  --auth-line: rgba(255, 255, 255, .08);
  --auth-text: rgba(255, 255, 255, .86);
  --auth-muted: rgba(255, 255, 255, .48);
  --auth-orange: #f97316;
  --auth-ui: var(--font-primary, 'Inter', sans-serif);
  --auth-serif: var(--font-heading, 'Playfair Display', serif);
  --auth-mono: 'DM Mono', monospace;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  background: var(--auth-black);
  color: var(--auth-text);
  font-family: var(--auth-ui);
}

body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 64%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
}

.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem clamp(2rem, 7vw, 7rem);
}

.auth-brand {
  position: fixed;
  top: 1.4rem;
  left: 1.5rem;
  z-index: 10;             /* must sit above .auth-shell (z-index:1) */
  color: #fff;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
}

.auth-brand:hover {
  color: var(--auth-orange);
}

.auth-brand span {
  color: var(--auth-orange);
}

.auth-nav {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  color: var(--auth-muted);
  font-family: var(--auth-mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-nav a {
  color: inherit;
  text-decoration: none;
}

.auth-nav a:hover {
  color: #fff;
}

.auth-kicker,
.auth-small,
.auth-status-label {
  color: var(--auth-orange);
  font-family: var(--auth-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.auth-side h1 {
  max-width: 720px;
  margin: 1rem 0 0;
  color: #fff;
  font-family: var(--auth-serif);
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: .98;
}

.auth-side p {
  max-width: 560px;
  margin: 1.4rem 0 0;
  color: var(--auth-muted);
  line-height: 1.75;
}

.auth-side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.auth-side-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.1rem;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: rgba(255, 255, 255, .72);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.auth-side-actions a:hover {
  border-color: rgba(249, 115, 22, .35);
  color: #fff;
}

.auth-panel {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
  border-left: 1px solid var(--auth-line);
  background: rgba(8, 8, 8, .72);
}

.auth-card {
  width: min(100%, 390px);
  padding: 2rem;
  border: 1px solid var(--auth-line);
  border-radius: 20px;
  background: var(--auth-panel);
}

.auth-card h2 {
  margin: .7rem 0 1.4rem;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
}

.auth-form {
  display: grid;
  gap: .85rem;
}

.auth-field {
  display: grid;
  gap: .4rem;
}

.auth-field label {
  color: rgba(255, 255, 255, .5);
  font-family: var(--auth-mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-field input {
  min-height: 46px;
  padding: 0 .9rem;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  outline: none;
}

.auth-field input:focus {
  border-color: rgba(249, 115, 22, .42);
}

.auth-submit,
.auth-secondary,
.auth-danger {
  min-height: 44px;
  border-radius: 12px;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.auth-submit {
  border: 0;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
}

.auth-secondary,
.auth-danger {
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, .035);
  color: rgba(255, 255, 255, .72);
}

.auth-secondary:hover,
.auth-danger:hover {
  border-color: rgba(249, 115, 22, .35);
  color: #fff;
}

.auth-danger:hover {
  border-color: rgba(239, 68, 68, .42);
}

.auth-message {
  min-height: 1.2rem;
  color: #fb923c;
  font-size: .82rem;
  line-height: 1.5;
}

.auth-switch {
  margin: 1.25rem 0 0;
  color: var(--auth-muted);
  font-size: .88rem;
}

.auth-switch a {
  color: #fff;
}

.auth-status {
  display: grid;
  gap: .9rem;
  margin: 1.2rem 0 1.4rem;
  padding: 1rem;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
}

.auth-status strong {
  color: #fff;
}

.auth-actions {
  display: grid;
  gap: .75rem;
}

@media (max-width: 860px) {
  .auth-brand,
  .auth-nav {
    position: absolute;
  }

  .auth-nav {
    left: 1.5rem;
    right: auto;
    top: 4rem;
    max-width: calc(100% - 3rem);
    flex-wrap: wrap;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    border-left: 0;
    border-top: 1px solid var(--auth-line);
    padding-top: 2rem;
  }
}

/* Collapsible "local-only dev toggles" section on /auth/account.html */
.auth-dev {
  margin-top: 1.2rem;
  padding-top: .9rem;
  border-top: 1px dashed rgba(255, 255, 255, .12);
}
.auth-dev summary {
  cursor: pointer;
  color: var(--auth-muted);
  font-family: var(--auth-mono);
  font-size: .65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  list-style: none;
  outline: none;
  padding: .35rem 0;
}
.auth-dev summary::-webkit-details-marker { display: none; }
.auth-dev summary:hover { color: #fff; }
.auth-dev[open] summary { color: var(--auth-orange); }
.auth-dev .auth-actions { margin-top: .65rem; }
