/* Desert Classic — colors taken from the event logo */
:root {
  --navy: #1b4f8c;
  --navy-d: #12386a;
  --sky: #8fc0e6;
  --sun: #f2a43a;
  --sun-d: #d9822a;
  --clay: #b9613a;
  --cactus: #5d8b3c;
  --cactus-l: #e5efd9;
  --sand: #f7f0e1;
  --sand-d: #eadcbc;
  --ink: #1f2a36;
  --muted: #6b7480;
  --line: #e2d7bf;
  --red: #b3261e;
  --red-l: #fbe4e1;
  --white: #fff;
  --head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --r: 12px;
  --shadow: 0 2px 10px rgba(18, 56, 106, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body); color: var(--ink); font-size: 15px;
  background: var(--sand) linear-gradient(180deg, #fdf6e6 0, var(--sand) 300px) no-repeat;
  min-height: 100vh;
}
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--navy-d); margin: 0 0 .6em; }
h2 { font-size: 20px; }
h3 { font-size: 15px; margin-top: 1.2em; }
.muted { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: .9em; }
.fine { color: var(--muted); font-size: 13px; line-height: 1.4; }
.err { color: var(--red); background: var(--red-l); padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.center { text-align: center; }
code { background: #f1ead9; padding: 2px 6px; border-radius: 5px; font-size: 13px; word-break: break-all; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px; padding: 8px 22px;
  background: linear-gradient(90deg, var(--navy-d), var(--navy) 60%, #2a66a8);
  color: #fff; box-shadow: 0 3px 0 var(--sun);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 52px; height: 52px; border-radius: 50%; background: #fff; padding: 2px; }
.brand-title { font-family: var(--head); font-size: 22px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; line-height: 1; }
.brand-sub { font-family: var(--head); font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--sun); margin-top: 3px; }
.tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.tabs button {
  font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: 15px; font-weight: 500;
  background: transparent; color: #dce9f7; border: 0; padding: 10px 14px; border-radius: 8px; cursor: pointer;
}
.tabs button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.tabs button.on { background: var(--sun); color: var(--navy-d); }
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #dce9f7; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa; }
.dot.ok { background: #7ed957; box-shadow: 0 0 0 3px rgba(126, 217, 87, .25); }
.dot.bad { background: #ff6b5b; box-shadow: 0 0 0 3px rgba(255, 107, 91, .3); }

main { padding: 20px 22px 60px; max-width: 1500px; margin: 0 auto; }
.tab { display: none; }
.tab.on { display: block; }
.card { background: var(--white); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; border-top: 4px solid var(--navy); }
.card.intro { border-top-color: var(--sun); }
.card.intro p { margin: 0; line-height: 1.5; }

/* ---------- buttons & inputs ---------- */
.btn {
  font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; font-weight: 500; font-size: 14px;
  border: 2px solid var(--navy); background: #fff; color: var(--navy); padding: 8px 14px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.btn:hover { background: #eef4fb; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-d); }
.btn.ghost { border-color: var(--line); color: var(--navy-d); }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red-l); }
.btn.big { font-size: 18px; padding: 13px 20px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.file { position: relative; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
input, select {
  font-family: var(--body); font-size: 15px; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(27, 79, 140, .15); }
label { display: block; font-weight: 600; font-size: 13px; color: var(--navy-d); margin-bottom: 10px; }
label input, label select { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.check input { width: auto; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 50% 30%, #fbe3b8, var(--sand) 45%, #e9d6ad); }
.login-card { background: #fff; padding: 30px 34px; border-radius: 18px; box-shadow: 0 10px 40px rgba(18, 56, 106, .18); width: min(380px, 100%); text-align: center; border-top: 6px solid var(--sun); }
.login-card img { width: 130px; }
.login-card h1 { font-size: 30px; margin: 6px 0 0; }
.login-card label { text-align: left; }

/* ---------- bet form ---------- */
.bet-grid { display: grid; grid-template-columns: minmax(420px, 560px) 1fr; gap: 18px; align-items: start; }
.bet-card { border-top-color: var(--sun); }
.field { margin-bottom: 16px; }
.lbl { font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--clay); font-weight: 600; margin-bottom: 6px; }
.picker { position: relative; }
.picker input { width: 100%; font-size: 17px; padding: 11px 13px; }
.drop { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14); max-height: 340px; overflow: auto; }
.drop .opt { padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; border-bottom: 1px solid #f3ecdc; }
.drop .opt:last-child { border-bottom: 0; }
.drop .opt.act, .drop .opt:hover { background: #eef4fb; }
.drop .opt small { color: var(--muted); }
.drop .grp { padding: 6px 12px; font-family: var(--head); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; background: var(--sand); color: var(--clay); position: sticky; top: 0; }
.drop .opt.new { color: var(--cactus); font-weight: 700; }
.tid { font-family: var(--head); font-weight: 600; font-size: 16px; color: var(--navy); min-width: 38px; display: inline-block; }
.chip-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--cactus-l); color: #2f4f1b; border-radius: 999px; padding: 5px 12px; font-weight: 700; }
.chip button { border: 0; background: transparent; cursor: pointer; font-size: 16px; color: inherit; padding: 0 2px; }
.linkbtn { border: 0; background: none; color: var(--navy); font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; font-size: 14px; }
.seg { display: inline-flex; border: 2px solid var(--navy); border-radius: 10px; overflow: hidden; }
.seg button { font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: 16px; border: 0; background: #fff; color: var(--navy); padding: 9px 22px; cursor: pointer; border-left: 2px solid var(--navy); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--navy); color: #fff; }
.seg button.locked { color: #9aa; text-decoration: line-through; }
.seg button.on.locked { background: #8a96a6; color: #fff; }
.seg.small button { font-size: 14px; padding: 6px 14px; }
.team-card { margin-top: 10px; border: 2px solid var(--sky); background: #f3f8fd; border-radius: 10px; padding: 10px 12px; display: flex; gap: 14px; align-items: center; }
.team-card .big-id { font-family: var(--head); font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1; }
.team-card .meta { flex: 1; line-height: 1.3; }
.team-card .meta b { font-size: 16px; }
.team-card .odds-pill { font-family: var(--head); background: var(--sun); color: var(--navy-d); border-radius: 8px; padding: 6px 10px; text-align: center; line-height: 1.1; }
.team-card .odds-pill small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amt { display: grid; grid-template-columns: 38px 1fr 38px; grid-template-rows: auto auto; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.amt.has { border-color: var(--cactus); background: #f8fbf4; }
.amt-lbl { grid-column: 1 / 4; text-align: center; font-family: var(--head); text-transform: uppercase; letter-spacing: .1em; font-size: 14px; background: var(--sand); color: var(--navy-d); padding: 4px; }
.amt.has .amt-lbl { background: var(--cactus); color: #fff; }
.amt input { border: 0; text-align: center; font-family: var(--head); font-size: 26px; padding: 6px 0; width: 100%; min-width: 0; border-radius: 0; }
.amt input:focus { box-shadow: none; }
.step { border: 0; background: #f4efe2; font-size: 22px; cursor: pointer; color: var(--navy); }
.step:hover { background: var(--sand-d); }
.quick { margin-top: 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 600; }
.quick button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; cursor: pointer; font-weight: 700; color: var(--navy); }
.quick button:hover { border-color: var(--navy); }
.quick button.ghost { color: var(--muted); }
.bet-summary { background: var(--sand); border-radius: 10px; padding: 10px 14px; margin: 8px 0 12px; font-size: 15px; line-height: 1.5; min-height: 46px; }
.bet-summary b { color: var(--navy-d); }
.bet-summary .tot { font-family: var(--head); font-size: 22px; color: var(--navy-d); float: right; }

/* side odds */
.side-odds { position: sticky; top: 92px; }
.side-head { display: flex; justify-content: space-between; align-items: baseline; }
.mini-odds { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini-odds th { font-family: var(--head); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--muted); text-align: left; padding: 4px 6px; border-bottom: 2px solid var(--line); }
.mini-odds td { padding: 5px 6px; border-bottom: 1px solid #f1e9d6; }
.mini-odds tr.sel td { background: #fff4df; }
.mini-odds .r, .grid .r { text-align: right; }
.pool-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 12px; }
.pool-strip div { background: var(--sand); border-radius: 8px; padding: 6px 8px; text-align: center; }
.pool-strip small { display: block; font-family: var(--head); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--clay); }
.pool-strip b { font-family: var(--head); font-size: 18px; color: var(--navy-d); font-weight: 600; }
.bar { height: 8px; background: #f1e9d6; border-radius: 6px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--clay)); }
.oddsv { font-family: var(--head); font-weight: 600; color: var(--navy); font-size: 15px; }
.closed-tag { background: #8a96a6; color: #fff; font-family: var(--head); letter-spacing: .08em; text-transform: uppercase; font-size: 11px; padding: 2px 8px; border-radius: 6px; }

/* ---------- tables ---------- */
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.list-head h2 { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input { min-width: 230px; }
.table-wrap { overflow: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th { font-family: var(--head); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; color: #fff; background: var(--navy); padding: 8px; text-align: left; cursor: pointer; white-space: nowrap; position: sticky; top: 0; user-select: none; }
.grid th.sorted::after { content: " ▲"; font-size: 10px; color: var(--sun); }
.grid th.sorted.desc::after { content: " ▼"; }
.grid td { padding: 7px 8px; border-bottom: 1px solid #f1e9d6; white-space: nowrap; }
.grid tbody tr:nth-child(even) td { background: #fdfaf3; }
.grid tbody tr:hover td { background: #eef4fb; }
.grid tr.void td { color: #a0a6ad; text-decoration: line-through; }
.grid tr.void td:last-child { text-decoration: none; }
.grid tr.new td { animation: flash 2.5s ease-out; }
@keyframes flash { from { background: #ffe7b8; } to { background: transparent; } }
.grid tfoot td { font-weight: 700; background: var(--sand); border-top: 2px solid var(--line); }
.grid .win-amt { color: var(--cactus); font-weight: 800; }
.mini { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer; color: var(--navy); font-weight: 600; }
.mini:hover { border-color: var(--navy); }
.mini.red { color: var(--red); }

/* ---------- odds page ---------- */
.odds-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.div-head { display: flex; justify-content: space-between; align-items: center; background: var(--navy); color: #fff; border-radius: 10px 10px 0 0; padding: 8px 12px; }
.div-head h3 { color: #fff; margin: 0; font-size: 18px; }

/* ---------- results ---------- */
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 18px; }
.res-card { padding: 0; overflow: hidden; border-top: 0; }
.res-card .res-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: linear-gradient(90deg, var(--navy-d), var(--navy)); color: #fff; }
.res-card .res-head h3 { color: #fff; margin: 0; font-size: 19px; }
.res-card .res-head h3 span { color: var(--sun); }
.res-body { padding: 14px 16px; }
.entries { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.entries td { padding: 3px 4px; }
.entries input { width: 100%; text-transform: uppercase; font-family: var(--head); font-size: 16px; }
.entries select { width: 100%; }
.entries .who { font-size: 13px; color: var(--muted); }
.pay-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.pay-table th { background: var(--sand); font-family: var(--head); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; padding: 6px; text-align: center; color: var(--navy-d); }
.pay-table td { padding: 6px; border-bottom: 1px solid #f1e9d6; text-align: center; }
.pay-table td.l { text-align: left; }
.pay-table .rate { font-family: var(--head); font-size: 18px; color: var(--cactus); font-weight: 600; }
.pay-table .rate small { display: block; font-family: var(--body); font-size: 11px; color: var(--muted); font-weight: 400; }
.pay-table .nob { color: var(--clay); font-size: 12px; }
.pool-sum { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.pool-sum div { background: #f6f1e4; border-radius: 8px; padding: 6px; text-align: center; font-size: 12px; color: var(--muted); }
.pool-sum b { display: block; font-family: var(--head); font-size: 16px; color: var(--navy-d); font-weight: 600; }
.badge { font-family: var(--head); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; }
.badge.open { background: #7ed957; color: #173a07; }
.badge.closed { background: #ffcf8a; color: #5a3200; }
.badge.final { background: var(--sun); color: var(--navy-d); }

/* ---------- winners ---------- */
.win-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; border-bottom: 2px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.win-totals { display: flex; gap: 10px; }
.win-totals div { background: var(--sand); border-radius: 8px; padding: 6px 12px; font-size: 12px; color: var(--muted); text-align: center; }
.win-totals b { display: block; font-family: var(--head); font-size: 20px; color: var(--navy-d); font-weight: 600; }
.wb { border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.wb-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #fff8ea; }
.wb-head b { font-size: 17px; }
.wb-head .amt-big { font-family: var(--head); font-size: 22px; color: var(--cactus); font-weight: 600; }
.wb table { margin: 0; }

/* ---------- setup ---------- */
.setup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; align-items: start; }
.setup-grid .card { margin: 0; }
.setup-grid .card.wide { grid-column: 1 / -1; }
.lock-grid { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 6px; align-items: center; }
.lock-grid .h { font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--muted); text-align: center; }
.lock-btn { font-family: var(--head); text-transform: uppercase; font-size: 13px; letter-spacing: .06em; padding: 8px; border-radius: 8px; border: 0; cursor: pointer; }
.lock-btn.open { background: #dff3d3; color: #24510f; }
.lock-btn.closed { background: #ffe0b8; color: #6a3a00; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.copy { display: flex; gap: 8px; align-items: center; }
.roster-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.roster-table td, .roster-table th { padding: 4px 6px; border-bottom: 1px solid #f1e9d6; text-align: left; }
.roster-table th { background: var(--sand); font-family: var(--head); font-weight: 500; text-transform: uppercase; font-size: 12px; }
.roster-table .chg { background: #fff4df; }

/* ---------- toast & modal ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--navy-d); color: #fff; padding: 12px 18px; border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25); z-index: 50; font-weight: 600; display: flex; gap: 14px; align-items: center; border-left: 6px solid var(--sun); max-width: 92vw; }
.toast.bad { border-left-color: #ff6b5b; }
.toast button { background: var(--sun); color: var(--navy-d); border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 700; cursor: pointer; }
.modal { position: fixed; inset: 0; background: rgba(18, 30, 50, .5); display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal-card { background: #fff; border-radius: 14px; padding: 22px; width: min(480px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal-card .btns { justify-content: flex-end; margin-bottom: 0; }

@media (max-width: 1100px) {
  .bet-grid, .odds-cols { grid-template-columns: 1fr; }
  .side-odds { position: static; }
  .results-grid { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; gap: 8px; }
}
@media print {
  .top, .tabs, .filters, .btns, .toast { display: none !important; }
}
