/* os/css/auth.css — Terra Vault Auth Screen */

/* ── Screen ──────────────────────────────────────────── */

#auth-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: #0f0f13;
  align-items: flex-start;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  overflow-y: auto;
  padding: 28px 16px 40px;
  transition: opacity 0.45s;
}

#auth-screen.visible  { display: flex; opacity: 1; }
#auth-screen.fade-out { opacity: 0; pointer-events: none; }

/* ── Card ────────────────────────────────────────────── */

.auth-box {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 38px 34px 30px;
  background: #17171f;
  border: 1px solid #2e2e44;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow:
    0 0 0 1px #3a2a6010,
    0 8px 40px #00000060,
    0 0 80px #5020c014;
}

/* ── Logo ────────────────────────────────────────────── */

.auth-logo {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  /* Vibrant gradient: cyan → violet */
  background: linear-gradient(120deg, #38e8ff 0%, #a78bfa 60%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px #7c5cff40);
}

.auth-logo span {
  /* Slightly dimmer segment */
  background: linear-gradient(120deg, #7c5cff 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-sub {
  text-align: center;
  font-size: 11px;
  color: #6c6c88;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: -6px;
}

/* ── Form layout ─────────────────────────────────────── */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Inputs ──────────────────────────────────────────── */

.auth-form input {
  width: 100%;
  box-sizing: border-box;
  background: #101018;
  border: 1px solid #2c2c44;
  border-radius: 6px;
  color: #f0f0ff;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form input::placeholder { color: #3e3e5a; }

.auth-form input:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px #7c5cff18;
}

/* ── Error text ──────────────────────────────────────── */

.au-err {
  font-size: 11px;
  color: #ff6b82;
  min-height: 16px;
  text-align: center;
  line-height: 1.5;
}

/* ── Primary button ──────────────────────────────────── */

.auth-form button {
  width: 100%;
  padding: 12px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 4px;
  border: 1px solid #6d40e0;
  background: linear-gradient(135deg, #4a1fa8 0%, #7c3aed 100%);
  color: #f5f0ff;
  transition: filter 0.15s, box-shadow 0.15s;
}

.auth-form button:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 20px #7c3aed40;
}

.auth-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

/* ── Helper links ────────────────────────────────────── */

.auth-forgot {
  text-align: center;
}

.auth-forgot a {
  font-size: 11px;
  color: #5a5a82;
  text-decoration: none;
  transition: color 0.12s;
}

.auth-forgot a:hover { color: #a78bfa; }

.au-step {
  font-size: 11.5px;
  color: #8888aa;
  line-height: 1.65;
  margin: 0;
  text-align: center;
}

.au-step strong { color: #c084fc; }

/* ── Toggle (switch between login/register) ──────────── */

.auth-toggle {
  text-align: center;
  font-size: 11px;
  color: #44445a;
  padding-top: 2px;
}

.auth-toggle a       { color: #7c5cff; text-decoration: none; transition: color 0.12s; }
.auth-toggle a:hover { color: #c084fc; }

/* ══════════════════════════════════════════════════════
   SHAPE SELECTOR
══════════════════════════════════════════════════════ */

.shape-label-row {
  font-size: 11px;
  color: #6c6c88;
  line-height: 1.55;
  margin-top: 6px;
}

.shape-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

/* ── Shape card ──────────────────────────────────────── */

.shape-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px 7px;
  border-radius: 8px;
  border: 1px solid #252536;
  background: #101018;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.14s, background 0.14s, box-shadow 0.14s;
}

.shape-card:hover {
  border-color: #5a3aaa;
  background: #18182a;
}

.shape-card.selected {
  border-color: #a78bfa;
  background: #1c1430;
  box-shadow: 0 0 12px #7c5cff30, inset 0 0 6px #7c5cff08;
}

/* ── Shape SVG ───────────────────────────────────────── */

.shape-card svg {
  width: 32px;
  height: 32px;
  fill: #383858;
  transition: fill 0.14s, filter 0.14s;
}

.shape-card:hover svg {
  fill: #7c5cff;
  filter: drop-shadow(0 0 4px #7c5cff50);
}

.shape-card.selected svg {
  fill: #c084fc;
  filter: drop-shadow(0 0 6px #a78bfa80);
}

/* ── Shape label ─────────────────────────────────────── */

.shape-card span {
  font-size: 8px;
  color: #3e3e5a;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  letter-spacing: 0.04em;
}

.shape-card:hover span    { color: #6666aa; }
.shape-card.selected span { color: #a78bfa; }

/* ── Selection counter ───────────────────────────────── */

.shape-hint {
  font-size: 11px;
  text-align: right;
  color: #44445a;
}

.shape-hint span {
  color: #a78bfa;
  font-weight: 600;
}
