/* =========================================================
   Party Animals Playtesting — Tester (User) Theme
   NDA-protected interface — minimal, locked-down
   ========================================================= */

:root {
  --bg:       #0d0f18;
  --surface:  #161926;
  --surface2: #1e2235;
  --border:   #2a2f4a;
  --accent:   #5865f2;
  --danger:   #ed4245;
  --success:  #57f287;
  --warning:  #fee75c;
  --muted:    #6b7080;
  --text:     #dde1eb;
  --text-dim: #9499a8;
  --radius:   8px;
}

/* ── Light Mode ── */
html.light-mode,
body.light-mode {
  --bg:       #dde2f0;
  --surface:  #eef0f8;
  --surface2: #e4e8f4;
  --border:   #c0c6dc;
  --accent:   #5865f2;
  --danger:   #d9363e;
  --success:  #2d8a4e;
  --warning:  #9a7b00;
  --muted:    #6b7280;
  --text:     #111827;
  --text-dim: #374151;
}

/* ensure html element fills viewport with light bg */
html.light-mode {
  min-height: 100vh;
  background: var(--bg);
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

input, textarea { -webkit-user-select: text; user-select: text; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── NDA Watermark overlay ── */
#nda-watermark {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
#nda-watermark .wm-text { display: none; }

/* ── NDA banner ── */
.nda-banner {
  background: #1a0f0f;
  border-bottom: 1px solid #4a1a1a;
  padding: 6px 20px;
  text-align: center;
  font-size: 11px;
  color: #cc6666;
  letter-spacing: .5px;
  font-weight: 600;
  text-transform: uppercase;
}

/* ── Top navigation ── */
.topnav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topnav-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.topnav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.topnav-links a {
  color: var(--text-dim);
  font-size: 13px;
}
.topnav-links a:hover { color: var(--text); text-decoration: none; }

.topnav-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.topnav-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Main content ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.card-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: 18px; }

/* ── Stat row ── */
.stat-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.stat-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  flex: 1;
  min-width: 120px;
  text-align: center;
}
.stat-pill .val {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-pill .lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 4px;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  background: var(--surface2);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 9px 14px;
  text-align: left;
}
tbody tr { border-bottom: 1px solid var(--border); }
tbody td { padding: 9px 14px; }
tbody tr:last-child { border-bottom: none; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity .15s;
}
.btn:hover { opacity: .8; text-decoration: none; }
.btn-primary   { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-sm        { padding: 4px 10px; font-size: 12px; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.form-control {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
  -webkit-user-select: text;
  user-select: text;
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--muted); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.badge-active    { background: #1a3a2a; color: var(--success); }
.badge-draft     { background: #2a2a1a; color: var(--warning); }
.badge-completed { background: #1a2a3a; color: #5bb8f5; }
.badge-cancelled { background: #2a1a1a; color: var(--muted); }
.badge-attended  { background: #1a3a2a; color: var(--success); }
.badge-late      { background: #2a2a1a; color: var(--warning); }
.badge-noshow    { background: #2a1a1a; color: var(--danger); }
.badge-partial   { background: #1a2a3a; color: #5bb8f5; }
.badge-pending   { background: var(--surface2); color: var(--muted); }
.badge-confirmed { background: #1a3a2a; color: var(--success); }
.badge-waitlist  { background: #1a2a3a; color: #5bb8f5; }
.badge-default   { background: var(--surface2); color: var(--text-dim); }

/* ── Alerts ── */
.alerts { padding: 0; margin-bottom: 16px; }
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 13px;
}
.alert-success { background: #1a3a2a; border: 1px solid #2a5a3a; color: var(--success); }
.alert-danger  { background: #2a1a1a; border: 1px solid #5a2a2a; color: var(--danger); }
.alert-warning { background: #2a2a1a; border: 1px solid #5a5a1a; color: var(--warning); }
.alert-info    { background: #1a2a3a; border: 1px solid #2a4a6a; color: #5bb8f5; }

/* ── Login / Register ── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  flex-direction: column;
  gap: 16px;
}
.auth-box {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo .title  { font-size: 18px; font-weight: 700; }
.auth-logo .sub    { font-size: 12px; color: var(--muted); margin-top: 3px; }
.auth-nda {
  font-size: 10px;
  color: #884444;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .6px;
  max-width: 400px;
}

/* ── Profile ── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.profile-name { font-size: 20px; font-weight: 700; }
.profile-steam { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Score bar ── */
.score-bar-wrap { display: flex; align-items: center; gap: 10px; }
.score-bar {
  flex: 1;
  height: 8px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}
.score-bar-fill { height: 100%; border-radius: 99px; }
.score-high   { background: var(--success); }
.score-medium { background: var(--warning); }
.score-low    { background: var(--danger); }

/* ── Page title ── */
.page-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

/* ── Empty state ── */
.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ── Key display ── */
.key-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: monospace;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text);
  word-break: break-all;
}

.key-entry { margin-bottom: 8px; }

.key-reveal-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.key-masked {
  font-family: monospace;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--text-dim);
  flex: 1;
}

.copy-key-btn {
  padding: 5px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.copy-key-btn:hover { opacity: .8; }
.copy-key-btn:disabled { opacity: .5; cursor: default; }

.key-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

/* ── Text helpers ── */
.text-sm  { font-size: 12px; }
.text-muted { color: var(--muted); }
.btn-danger { background: var(--danger); color: #fff; }

/* ── Detail row (profile) ── */
.detail-row {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  width: 140px;
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ─────────────────────────────────────────────────────────────
   LIGHT MODE OVERRIDES
   ───────────────────────────────────────────────────────────── */

/* NDA banner — warm light red stripe in light mode */
body.light-mode .nda-banner {
  background: #fff0f0;
  border-bottom: 1px solid #f5c6c6;
  color: #b91c1c;
}

/* Badges — light mode tinted backgrounds */
body.light-mode .badge-active,
body.light-mode .badge-attended,
body.light-mode .badge-confirmed {
  background: #d1fae5;
  color: #065f46;
}
body.light-mode .badge-draft,
body.light-mode .badge-late {
  background: #fef9c3;
  color: #78350f;
}
body.light-mode .badge-completed,
body.light-mode .badge-partial,
body.light-mode .badge-waitlist {
  background: #dbeafe;
  color: #1e40af;
}
body.light-mode .badge-cancelled,
body.light-mode .badge-noshow {
  background: #fee2e2;
  color: #991b1b;
}
body.light-mode .badge-pending,
body.light-mode .badge-default {
  background: var(--surface2);
  color: var(--text-dim);
}

/* Alerts — light mode */
body.light-mode .alert-success {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}
body.light-mode .alert-danger {
  background: #fff1f2;
  border-color: #fca5a5;
  color: #991b1b;
}
body.light-mode .alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
body.light-mode .alert-info {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
}
