/* Login / register. Same palette as the rest of the site; the card is the only
   lit surface on the page. */

body.auth {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 72px 20px 24px;
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(111, 216, 230, 0.08), transparent 60%),
    var(--void);
}

/* Top-left way out. Points home, or at the dashboard once a session exists. */
.back {
  position: fixed;
  text-decoration: none;
  top: max(20px, env(safe-area-inset-top));
  left: max(20px, env(safe-area-inset-left));
  z-index: 2;
  font-size: 13px;
  color: var(--muted);
}
.back:hover { color: var(--ink); }

.card {
  width: 100%;
  max-width: 348px;
  padding: 30px 28px 26px;
  background: rgba(17, 23, 33, 0.62);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.card h1 { margin: 0 0 22px; font-size: 19px; font-weight: 600; letter-spacing: 0.01em; }
.card h1 a { text-decoration: none; }

.tabs { display: flex; gap: 4px; margin-bottom: 22px; }
.tab {
  flex: 1;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.tab.active {
  color: var(--ink);
  background: rgba(120, 145, 175, 0.10);
  border-color: var(--line);
}

.field { margin-bottom: 12px; }
.field:last-of-type { margin-bottom: 20px; }
.field label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--muted);
}
.field input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: rgba(5, 7, 10, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.field input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }

.submit {
  width: 100%;
  padding: 11px;
  font: inherit;
  font-weight: 600;
  color: #041018;
  background: var(--cyan);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.submit:hover { filter: brightness(1.08); }
.submit:disabled { opacity: 0.55; cursor: default; filter: none; }

.key { color: rgba(4, 16, 24, 0.6); }

.switch { margin: 16px 0 0; text-align: center; }
.linkish {
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}
.linkish:hover:not(:disabled) { color: var(--cyan); }
.linkish:disabled { cursor: default; opacity: 0.6; }

.msg { min-height: 1.5em; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.msg.error { color: var(--danger); }
/* Error codes travel with the message so a report can name one exactly. */
.msg .code { font-family: var(--mono); font-size: 12px; opacity: 0.75; }
.hint { margin: 8px 0 0; font-size: 12px; color: var(--dim); }
