/* Sign-in, sign-out and account recovery screens in the tellmachines/Zeradion
   design (ink ground, cream card, signal orange, hexagons instead of rounded
   corners). Scoped to .auth-shell; shared tokens and fonts come from styles.css. */

:root {
  --auth-ink: #0E0E10;
  --auth-ink-line: #3a3a3e;
  --auth-cream: #F1EDE5;
  --auth-cream-2: #E8E3D9;
  --auth-paper: #F8F5EF;
  --auth-white: #FFFFFF;
  --auth-signal: #FF4A1C;
  --auth-deep: #D93A0E;
  --auth-amber: #FF9A4D;
  --auth-muted: #6b675f;
  --auth-muted-dark: #9b968d;
  --auth-signal-soft: rgba(255, 74, 28, 0.25);
  --auth-signal-tint: rgba(255, 74, 28, 0.08);
  --auth-font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --auth-font-cond: "Archivo", "Arial Narrow", Impact, sans-serif;
  --auth-font-mono: "JetBrains Mono", Consolas, monospace;
  --auth-hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  --auth-chamfer: polygon(0 0, calc(100% - 22px) 0, 100% 38px, 100% 100%, 0 100%);
}

.auth-shell {
  min-height: calc(100vh - var(--provider-status-height, 0px));
  display: grid;
  grid-template-rows: minmax(min-content, 1fr) auto;
  place-items: center;
  position: relative;
  isolation: isolate;
  padding: 2rem 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--auth-ink);
  color: var(--auth-ink);
  font-family: var(--auth-font);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(460px, 96vw);
  display: grid;
  gap: 1.1rem;
  padding: 1.6rem 1.5rem 1.5rem;
  background: var(--auth-cream);
  border: 3px solid var(--auth-ink);
  clip-path: var(--auth-chamfer);
  animation: fadeUp 320ms ease;
}

.auth-card header {
  display: grid;
  gap: 0.9rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--auth-ink);
}

.auth-brand-mark {
  display: block;
  width: 34px;
  height: auto;
}

.auth-brand-bar {
  width: 2px;
  height: 2.1rem;
  background: currentColor;
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.auth-brand-name {
  font-family: var(--auth-font-cond);
  font-stretch: 110%;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.025em;
  line-height: 0.8;
}

.auth-brand-claim {
  font-family: var(--auth-font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--auth-muted);
  line-height: 1;
}

.auth-card h1 {
  margin: 0;
  padding-top: 0.9rem;
  border-top: 3px solid var(--auth-ink);
  font-family: var(--auth-font-cond);
  font-stretch: 62%;
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 0.88;
  text-transform: uppercase;
  color: var(--auth-ink);
}

.auth-card h1 em {
  font-style: normal;
  color: var(--auth-signal);
}

.auth-footer {
  position: relative;
  z-index: 1;
  padding-top: 1.5rem;
  color: var(--auth-muted-dark);
  font-family: var(--auth-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-shell .auth-form,
.auth-shell .surface-access-panel {
  gap: 0.8rem;
  padding: 1rem;
  border: 2px solid var(--auth-ink);
  border-radius: 0;
  background: var(--auth-paper);
}

.auth-shell .auth-form h2,
.auth-shell .surface-access-panel h2 {
  font-family: var(--auth-font-cond);
  font-stretch: 84%;
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--auth-ink);
}

.auth-shell label {
  font-weight: 700;
  color: var(--auth-ink);
}

.auth-shell .muted {
  color: var(--auth-muted);
}

.auth-shell input:not([type="checkbox"]):not([type="radio"]) {
  border: 2px solid var(--auth-ink);
  border-radius: 0;
  background: var(--auth-white);
  color: var(--auth-ink);
  box-shadow: none;
}

.auth-shell input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: none;
  border-color: var(--auth-signal);
  box-shadow: 0 0 0 3px var(--auth-signal-soft);
}

.auth-shell input[type="checkbox"],
.auth-shell input[type="radio"] {
  accent-color: var(--auth-signal);
}

.auth-shell button,
.auth-shell .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  border: 2px solid var(--auth-signal);
  border-radius: 0;
  background: var(--auth-signal);
  color: var(--auth-ink);
  font-family: var(--auth-font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, color 150ms ease;
}

.auth-shell button::before,
.auth-shell .button-link::before {
  content: "";
  width: 0.5em;
  height: 0.58em;
  flex: none;
  background: currentColor;
  clip-path: var(--auth-hex);
}

.auth-shell button:hover,
.auth-shell .button-link:hover {
  background: var(--auth-signal);
  color: var(--auth-ink);
  transform: translate(-2px, -2px);
  box-shadow: 2px 2px 0 var(--auth-ink);
}

.auth-shell button.secondary,
.auth-shell .button-link {
  border-color: var(--auth-ink);
  background: transparent;
  color: var(--auth-ink);
}

.auth-shell button.secondary:hover,
.auth-shell .button-link:hover {
  background: var(--auth-ink);
  color: var(--auth-cream);
  box-shadow: 2px 2px 0 var(--auth-signal);
}

.auth-shell button:disabled {
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.auth-shell .auth-verification-symbol {
  border-radius: 0;
  clip-path: var(--auth-hex);
  background: var(--auth-signal);
  color: var(--auth-ink);
}

.auth-shell .auth-login-account {
  border-radius: 0;
  background: var(--auth-cream-2);
  color: var(--auth-muted);
  font-family: var(--auth-font-mono);
}

.auth-shell .auth-method-option {
  border: 2px solid var(--auth-ink);
  border-radius: 0;
  background: var(--auth-white);
}

.auth-shell .auth-method-option:hover {
  border-color: var(--auth-signal);
  background: var(--auth-paper);
}

.auth-shell .auth-method-option:has(input:checked) {
  border-color: var(--auth-signal);
  background: var(--auth-signal-tint);
  box-shadow: none;
}

.auth-shell .auth-method-option:has(input:focus-visible) {
  outline-color: var(--auth-signal);
}

.auth-shell .auth-method-icon {
  border-radius: 0;
  clip-path: var(--auth-hex);
  background: var(--auth-ink);
  color: var(--auth-amber);
}

.auth-shell [aria-invalid="true"] {
  border-color: var(--auth-deep);
  outline-color: var(--auth-deep);
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell button:hover,
  .auth-shell .button-link:hover {
    transform: none;
  }
}
