/* ================================================================
   RoninBet Partners — Affiliate Portal
   Shared styles for signup, login, dashboard
   ================================================================ */

:root {
  --bg: #0a0a0b;
  --bg-2: #050505;
  --bg-card: rgba(255,255,255,0.02);
  --bg-card-2: rgba(255,255,255,0.03);
  --gold: #d4a853;
  --gold-bright: #f0c454;
  --gold-warm: #a07c3a;
  --gold-5: rgba(212,168,83,0.05);
  --gold-10: rgba(212,168,83,0.10);
  --gold-15: rgba(212,168,83,0.15);
  --gold-20: rgba(212,168,83,0.20);
  --gold-30: rgba(212,168,83,0.30);
  --gold-40: rgba(212,168,83,0.40);
  --green: #4ade80;
  --red: #f87171;
  --text: #ffffff;
  --text-2: #d4d4d8;
  --text-3: #a1a1aa;
  --text-4: #71717a;
  --text-5: #52525b;
  --border: rgba(212,168,83,0.10);
  --border-2: rgba(212,168,83,0.15);
  --border-3: rgba(212,168,83,0.20);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--gold); color: #000; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(212,168,83,0.10), transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(212,168,83,0.05), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.container-narrow {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.container-tight {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ===== Nav ===== */
nav.portal-nav {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,11,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-wordmark {
  height: 28px;
  width: auto;
  display: block;
}

.brand-tag {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  border-left: 1px solid var(--border-3);
  padding-left: 10px;
  line-height: 1;
  padding-top: 1px;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 13px;
}

.nav-links a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--gold); }

.nav-user {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .brand-wordmark { height: 24px; }
  .brand-tag { font-size: 9px; padding-left: 8px; }
  .nav-links { gap: 16px; }
}

/* ===== Type ===== */
.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.h1 .accent { font-style: italic; color: var(--gold); }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.h2 .accent { font-style: italic; color: var(--gold); }

.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-3);
  max-width: 640px;
}

.lede strong { color: var(--text); font-weight: 500; }

/* ===== Layout ===== */
main {
  flex: 1;
  position: relative;
  z-index: 2;
  padding: 48px 0 80px;
}

.main-narrow { max-width: 1024px; margin: 0 auto; }
.main-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}

/* ===== Card ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 32px;
}

.card-title {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.15;
}

.card-sub {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 28px;
  line-height: 1.55;
}

/* ===== Forms ===== */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.field .req { color: var(--gold); }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"] {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  transition: all 0.2s;
}

.field input:focus {
  outline: none;
  border-color: var(--gold-40);
  background: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.1);
}

.field input::placeholder {
  color: var(--text-5);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--sans);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(to right, var(--gold), var(--gold-bright));
  color: #000;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(to right, var(--gold-bright), var(--gold));
  box-shadow: 0 0 30px rgba(212,168,83,0.3);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gold-40);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--gold-5);
  color: var(--gold);
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--text-3);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--gold-40);
  color: var(--gold);
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 12px; }

/* ===== Notice ===== */
.notice {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.notice-info { background: rgba(255,255,255,0.04); color: var(--text-2); border-color: rgba(255,255,255,0.08); }
.notice-success { background: rgba(74,222,128,0.08); color: var(--green); border-color: rgba(74,222,128,0.25); }
.notice-error { background: rgba(248,113,113,0.08); color: var(--red); border-color: rgba(248,113,113,0.25); }

.fineprint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-4);
  line-height: 1.5;
}

.fineprint a {
  color: var(--gold);
  text-decoration: none;
}

.fineprint a:hover { text-decoration: underline; }

.center { text-align: center; }

/* ===== Pitch (signup) ===== */
.pitch h1 { margin-bottom: 16px; }
.pitch .lede { margin-bottom: 28px; }

.pitch-points {
  list-style: none;
  margin-top: 24px;
}

.pitch-points li {
  padding: 12px 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.pitch-points li::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  margin-top: 9px;
  flex-shrink: 0;
}

.pitch-points strong {
  color: var(--text);
  font-weight: 500;
}

.signup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 900px) {
  .signup-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ===== Dashboard ===== */
.dash-hero {
  margin-bottom: 32px;
}

.dash-hero h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.dash-hero .sub {
  color: var(--text-3);
  font-size: 15px;
}

/* Status strip - 4 tiles */
.status-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .status-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .status-strip { grid-template-columns: 1fr; }
}

.tile {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.tile-featured {
  background: linear-gradient(135deg, var(--gold-10), rgba(212,168,83,0.02));
  border-color: var(--gold-30);
}

.tile-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tile-value {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.tile-value .pre {
  color: var(--gold);
  margin-right: 2px;
}

.tile-value .num {
  color: var(--gold);
}

.tile-sub {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 0.05em;
}

.tile-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-4);
  line-height: 1.4;
}

.tile-action {
  justify-content: space-between;
}

.tile-action .btn {
  margin-top: 12px;
}

/* Section card */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section-sub {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 20px;
  margin-top: -8px;
}

/* Referral link */
.referral-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.referral-input {
  flex: 1;
  padding: 12px 14px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.referral-input:focus {
  outline: none;
  border-color: var(--gold-40);
}

.referral-note {
  font-size: 12px;
  color: var(--text-4);
  line-height: 1.55;
}

/* Range selector */
.range-selector {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}

.range-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 12px;
  font-family: var(--sans);
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.range-btn:hover { color: var(--gold); }

.range-btn.active {
  background: var(--gold-10);
  color: var(--gold);
}

/* Performance grid */
.perf-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

@media (max-width: 900px) { .perf-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .perf-grid { grid-template-columns: repeat(2, 1fr); } }

.perf-tile {
  padding: 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
}

.perf-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-4);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.perf-value {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--gold);
  line-height: 1;
}

.perf-value .pre { color: var(--gold-warm); margin-right: 1px; font-size: 0.7em; }

/* Players table */
.table-wrap {
  overflow-x: auto;
  margin: 0 -28px;
  padding: 0 28px;
}

.players-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.players-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-4);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.players-table th.num { text-align: right; }

.players-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-2);
}

.players-table td.num { text-align: right; color: var(--gold); font-variant-numeric: tabular-nums; }

.players-table tr:last-child td { border-bottom: 0; }

.players-table code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  background: rgba(255,255,255,0.04);
  padding: 2px 7px;
  border-radius: 3px;
}

.empty-row td {
  text-align: center !important;
  color: var(--text-4);
  font-size: 13px;
  padding: 32px 12px !important;
}

.text-muted { color: var(--text-5); }

.status-active { color: var(--green); font-size: 11px; font-weight: 500; }
.status-dormant { color: var(--text-4); font-size: 11px; }
.status-new { color: var(--gold); font-size: 11px; font-weight: 500; }

.pvp-yes { color: var(--gold); font-weight: 600; font-size: 14px; }

/* Templates */
.template { margin-bottom: 14px; }

.template-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.template-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.template-body {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.kit-link-strip {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--gold-5);
  border: 1px solid var(--border-2);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.kit-link-strip-text {
  font-size: 13px;
  color: var(--text-2);
}

.kit-link-strip-text strong { color: var(--text); }

/* ===== Footer ===== */
footer.portal-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-5);
  letter-spacing: 0.05em;
}

.portal-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-footer a {
  color: var(--text-3);
  text-decoration: none;
}

.portal-footer a:hover { color: var(--gold); }
