/* =============================================================================
 * shared.css — base variables and elements shared across auth-site pages
 * (sign-in, affiliate landing/login/dashboard/settings/resources, admin).
 * Page-specific styles live in the page's own <style> block.
 * ============================================================================= */

:root {
  --accent:         #bbfcbb;
  --bg:             #0b2326;
  --card-bg:        #0c373a;
  --input-bg:       #0f4245;
  --border:         #2a6366;
  --text-primary:   #ffffff;
  --text-secondary: #a3c4c7;
  --text-tertiary:  #7a9fa3;
  --on-accent:      #0b2326;
  --error:          #ff8a8a;
  --warn:           #ffc97a;
  --success:        #bbfcbb;
  --font-display:   'Barlow Semi Condensed', sans-serif;
  --font-body:      'Figtree', system-ui, sans-serif;
  /* Geist Mono powers the engineering-precision half of the typography:
   * affiliate codes, dollar amounts, dates, transfer IDs, anything where
   * tabular alignment + the mechanical character of a monospace adds
   * legibility. Display stays Barlow (editorial weight); body stays
   * Figtree (warm, readable). Pages opt in by importing the Geist Mono
   * font and using `var(--font-mono)` or the `.mono` utility class. */
  --font-mono:      'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button { font-family: inherit; cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--text-tertiary); opacity: 1; }

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
}

/* Dot grid — pinned to bottom of viewport, fades upward */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(42,99,102,0.55) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to top, black 0%, black 18%, transparent 75%);
  -webkit-mask-image: linear-gradient(to top, black 0%, black 18%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: pageEnter 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.05;
  margin-bottom: 8px;
}

[hidden] { display: none !important; }

/* =============================================================================
 * Typography utilities — for the "engineering precision" half of the
 * editorial-meets-engineering pairing. Use `.mono` on any data that benefits
 * from tabular alignment (codes, dollar amounts, dates, transfer IDs) and
 * `.tabular` on stat values that should stay column-aligned even in the
 * default body face.
 * ============================================================================= */
.mono {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum', 'zero';
  letter-spacing: -0.01em;
}
.tabular { font-variant-numeric: tabular-nums; }

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Footer styles shared across pages */
.footer-row {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.footer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s;
}
.footer:hover { color: var(--text-secondary); }
.footer strong { color: var(--text-secondary); font-weight: 600; }
.footer-sep {
  width: 1px;
  height: 12px;
  background: var(--border);
}

/* Toast/status helper used by several pages */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.error { border-color: var(--error); }
.toast.success { border-color: var(--accent); }
