/* Plassman Pick 'Em — stadium scoreboard identity
   Palette: night-game field greens, chalk lines, brass trophy gold. */

:root {
  --field: #0d2318;      /* deep field green — page background */
  --field-2: #143020;    /* panel green */
  --field-3: #1b3d29;    /* raised panel */
  --stripe: #2c5138;     /* yard-line borders */
  --chalk: #f1ead8;      /* chalk-white text */
  --chalk-dim: #b9b3a2;  /* secondary text */
  --brass: #d9a53f;      /* trophy gold accent */
  --red: #d05a45;        /* alerts / locked */
  --up: #85b96f;         /* positive / open */
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Graduate", "Arial Black", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--field);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  /* faint yard lines */
  background-image: repeating-linear-gradient(
    to bottom, transparent 0 119px, rgba(241,234,216,.035) 119px 120px);
}

h1, h2, h3 { font-weight: 600; }
a { color: var(--brass); }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 22px;
  border-bottom: 3px solid var(--brass);
  background: var(--field-2);
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--chalk);
}
.wordmark span { color: var(--brass); }
.house-balance { margin-left: auto; text-align: right; }
.house-balance .label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--chalk-dim);
}
.house-balance .amount {
  font-family: var(--mono); font-size: 26px; color: var(--brass); font-weight: 600;
}
.topbar .who { color: var(--chalk-dim); font-size: 13px; }
.topbar .who b { color: var(--chalk); }

/* ---------- Ticker (signature element) ---------- */
.ticker-wrap {
  overflow: hidden; white-space: nowrap;
  border-bottom: 1px solid var(--stripe);
  background: #0a1c13;
  padding: 7px 0;
}
.ticker { display: inline-block; animation: tick 60s linear infinite; }
.ticker-wrap:hover .ticker { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker { animation: none; } }
.tick-item { font-family: var(--mono); font-size: 12.5px; margin: 0 18px; color: var(--chalk-dim); }
.tick-item b { color: var(--chalk); font-weight: 600; }
.tick-item .mv { color: var(--brass); }
.tick-item .own { color: var(--up); }

/* ---------- Layout ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 22px; }
.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--field-2);
  border: 1px solid var(--stripe);
  border-radius: 6px;
  margin-bottom: 22px;
}
.panel > header {
  display: flex; align-items: baseline; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--stripe);
}
.panel > header h2 {
  margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 2.5px;
}
.panel > header .sub { font-size: 12px; color: var(--chalk-dim); margin-left: auto; }
.panel .body { padding: 14px 16px; }
.panel .body.flush { padding: 0; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--chalk-dim); font-weight: 600; padding: 9px 12px;
  border-bottom: 1px solid var(--stripe);
}
td { padding: 8px 12px; border-bottom: 1px solid rgba(44,81,56,.5); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.money, th.money { font-family: var(--mono); text-align: right; }
td.money { color: var(--brass); }
.rank-chip {
  display: inline-block; min-width: 26px; text-align: center;
  font-family: var(--mono); font-size: 12px; padding: 1px 4px;
  border: 1px solid var(--stripe); border-radius: 3px; color: var(--chalk-dim);
}
.rank-chip.ranked { color: var(--field); background: var(--brass); border-color: var(--brass); font-weight: 700; }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding: 2px 7px; border-radius: 3px; }
.tag.house { background: var(--field-3); color: var(--chalk-dim); }
.tag.mine { background: var(--brass); color: var(--field); font-weight: 700; }
.tag.locked { background: rgba(208,90,69,.18); color: var(--red); }
.tag.open { background: rgba(133,185,111,.15); color: var(--up); }

/* ---------- Controls ---------- */
button, .btn {
  font-family: var(--body); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--brass); background: transparent; color: var(--brass);
}
button:hover { background: rgba(217,165,63,.12); }
button.primary { background: var(--brass); color: var(--field); }
button.primary:hover { background: #e6b756; }
button.danger { border-color: var(--red); color: var(--red); }
button.danger:hover { background: rgba(208,90,69,.12); }
button.small { padding: 3px 9px; font-size: 12px; }
button:disabled { opacity: .4; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brass); outline-offset: 2px;
}

input, select, textarea {
  font-family: var(--body); font-size: 14px;
  background: var(--field); color: var(--chalk);
  border: 1px solid var(--stripe); border-radius: 4px;
  padding: 8px 10px; width: 100%;
}
label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px;
        color: var(--chalk-dim); margin: 10px 0 4px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 120px; }

/* ---------- Auction status ---------- */
.auction-status {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.dot.open { background: var(--up); box-shadow: 0 0 8px var(--up); }

/* ---------- Misc ---------- */
.muted { color: var(--chalk-dim); font-size: 13px; }
.list-item { padding: 10px 16px; border-bottom: 1px solid rgba(44,81,56,.5); font-size: 13.5px; }
.list-item:last-child { border-bottom: 0; }
.list-item .actions { margin-top: 6px; display: flex; gap: 8px; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--field-3); border: 1px solid var(--brass); color: var(--chalk);
  padding: 10px 20px; border-radius: 5px; font-size: 14px; z-index: 50;
  max-width: 90vw;
}
.toast.error { border-color: var(--red); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 360px; background: var(--field-2);
  border: 1px solid var(--stripe); border-top: 4px solid var(--brass);
  border-radius: 6px; padding: 30px;
}
.login-card .wordmark { font-size: 26px; display: block; text-align: center; margin-bottom: 4px; }
.login-card .tagline {
  text-align: center; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--chalk-dim); margin-bottom: 24px;
}
.login-card button { width: 100%; margin-top: 18px; }
.login-error { color: var(--red); font-size: 13px; margin-top: 10px; text-align: center; }

/* ---------- Admin tabs ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 22px; }
.tabs button { border-color: var(--stripe); color: var(--chalk-dim); }
.tabs button.active { border-color: var(--brass); color: var(--brass); background: rgba(217,165,63,.08); }
.tabpane { display: none; }
.tabpane.active { display: block; }
.rankings-grid td input { padding: 4px 6px; font-family: var(--mono); font-size: 13px; }
.rankings-grid td:first-child { width: 45%; }
