/* ============================================================
   TSF MEMBERS — Design tokens carried from tsfclub.com/style.css
   ============================================================ */

:root {
  --bg-page: #0E0E10;
  --bg-surface: #17171A;
  --bg-surface-2: #1E1E22;
  --text-primary: #F5F4F1;
  --text-secondary: #A6A5A1;
  --text-muted: #6B6A67;
  --line-subtle: rgba(245, 244, 241, 0.06);
  --line-default: rgba(245, 244, 241, 0.10);
  --line-strong: rgba(245, 244, 241, 0.20);
  --red-core: #C81E1E;
  --red-hover: #A31515;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --dur-fast: 200ms;
  --dur-base: 320ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --container-pad: 24px;
  color-scheme: dark;
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Views */
.view {
  display: none;
  min-height: 100vh;
  padding: var(--space-6) var(--container-pad);
  align-items: center;
  justify-content: center;
}
.view.active { display: flex; flex-direction: column; }

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  width: 100%;
  max-width: 420px;
}

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

/* Logo */
.logo {
  height: 48px;
  width: auto;
  margin: 0 auto var(--space-5);
}
.logo-small { height: 32px; width: auto; }

/* Typography */
h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-2);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-4);
  text-align: left;
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

input, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-default);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  transition: border-color var(--dur-fast) var(--ease-out);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--red-core);
}

select option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* Buttons — carried from tsfclub.com/style.css */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 0.875rem; }

.btn-primary {
  background-color: var(--red-core);
  color: #FFFFFF;
}
.btn-primary:hover { background-color: var(--red-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  padding: 10px 4px;
}
.btn-ghost:hover { color: var(--text-primary); }

.btn:focus-visible {
  outline: 2px solid var(--red-core);
  outline-offset: 3px;
}

/* Dashboard */
#dashboard-view {
  align-items: stretch;
  justify-content: flex-start;
  max-width: 900px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--line-subtle);
  margin-bottom: var(--space-6);
  width: 100%;
}

.dashboard-content { width: 100%; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

@media (min-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
}
