/* Nucleus 27 — shared design tokens
   Aligned with corp.html: sovereign dark × Apple clarity × restrained hacker edge
   Do not neon. Cyan/violet dialed down. Syne + Space Mono. */

:root {
  --bg: #000000;
  --surface: #060608;
  --surface2: #0c0c10;
  --surface3: #100e14;
  --border: rgba(255, 255, 255, 0.08);
  --border-cyan: rgba(0, 196, 235, 0.22);
  --border-violet: rgba(154, 58, 160, 0.28);

  --violet: #9a3aa0;
  --violet-hover: #b04ab6;
  --cyan: #00c4eb;
  --cyan-hover: #1ad0f0;
  --green: #39d98a;
  --red: #ff4d6d;
  --magenta: #c048a8;

  --atom-blue: #00c4eb;
  --atom-violet: #9a3aa0;
  --atom-magenta: #c048a8;

  --text: #f4f0f8;
  --text2: rgba(244, 240, 248, 0.62);
  --text3: rgba(244, 240, 248, 0.32);

  --mono: 'Space Mono', ui-monospace, monospace;
  --display: 'Syne', system-ui, sans-serif;

  --r: 2px;
  --glow-cyan: rgba(0, 196, 235, 0.08);
  --glow-violet: rgba(154, 58, 160, 0.07);
}

/* Shared reset helpers (pages may still self-reset) */
.n27-grain::before,
body.n27-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 65% 45% at 50% -8%, rgba(154, 58, 160, 0.07), transparent 58%),
    radial-gradient(ellipse 45% 35% at 80% 18%, rgba(0, 196, 235, 0.05), transparent 52%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  opacity: 0.7;
}

body.n27-shell::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* Auth card primitives */
.n27-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
}
.n27-card::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), transparent 85%);
  opacity: 0.7;
}

.n27-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  border: 1px solid transparent;
}
.n27-btn-primary {
  background: var(--violet);
  color: #fff;
  border-color: transparent;
}
.n27-btn-primary:hover {
  background: var(--violet-hover);
}
.n27-btn-ghost {
  background: transparent;
  color: var(--text2);
  border-color: var(--border);
}
.n27-btn-ghost:hover {
  color: var(--cyan);
  border-color: var(--border-cyan);
}
.n27-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.n27-field-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text3);
}
.n27-field-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.n27-field-input:focus {
  border-color: var(--border-cyan);
  box-shadow: 0 0 0 1px rgba(0, 196, 235, 0.12);
}
.n27-field-input::placeholder {
  color: var(--text3);
}

.n27-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--r);
  border: 1px solid var(--border-cyan);
  color: var(--cyan);
  background: rgba(0, 196, 235, 0.04);
}
