* { box-sizing: border-box; }
body {
  margin: 0; font-family: "Segoe UI", -apple-system, Helvetica, Arial, sans-serif;
  background: #f4f6f8; color: #1c2733;
}
main { max-width: 1180px; margin: 0 auto; padding: 18px 20px 60px; }
a { color: #0b6e6e; }

/* top bar */
.topbar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  background: #123c2e; color: #fff; padding: 10px 20px;
}
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: .3px;
  color: #fff; text-decoration: none; }
.brand:hover { color: #ffd76e; }
.logo { margin-right: 4px; }
.topbar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar nav a { color: #cfe8dd; text-decoration: none; font-weight: 600; }
.topbar nav a:hover { color: #fff; }
.topbar .admin-link { color: #ffd76e; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nick { font-weight: 700; }
.logout { color: #cfe8dd; font-size: .85rem; }

.flash {
  background: #fff8dc; border: 1px solid #e6d38a; padding: 8px 20px;
  font-weight: 600; color: #6b5900;
}
.flash.success { background: #d9f2d0; border-color: #7cc36c; color: #14652a; font-size: 1.05rem; }
.flash.warning { background: #fde3c8; border-color: #e0a05f; color: #8a4b00; font-size: 1.05rem; }

.pick-status {
  margin: 0 0 10px; padding: 9px 14px; border-radius: 6px; font-weight: 700;
}
.pick-status.complete { background: #d9f2d0; border: 1px solid #7cc36c; color: #14652a; }
.pick-status.incomplete { background: #fde3c8; border: 1px solid #e0a05f; color: #8a4b00; }
.pick-status.unsaved { background: #fdecea; border: 1px solid #e2857a; color: #8a2318; }
.notice {
  background: #fdecea; border: 1px solid #f5b7b1; border-radius: 6px;
  padding: 10px 14px; margin-bottom: 16px;
}
footer { text-align: center; color: #7b8a97; font-size: .8rem; padding: 20px; }

/* auth */
.auth-card {
  max-width: 420px; margin: 40px auto; background: #fff; border-radius: 10px;
  padding: 28px 32px; box-shadow: 0 4px 18px rgba(0,0,0,.08);
}
.auth-card h1 { margin: 0 0 4px; color: #123c2e; }
.tagline { color: #5c6b78; margin-top: 0; }
.auth-card label { display: block; margin: 14px 0 4px; font-weight: 600; }
.auth-card input {
  width: 100%; padding: 9px 10px; border: 1px solid #c3ccd4; border-radius: 6px;
  font-size: 1rem;
}
.auth-card button {
  margin-top: 18px; width: 100%; padding: 11px; border: 0; border-radius: 6px;
  background: #0b6e6e; color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer;
}
.auth-card button:hover { background: #095858; }
.alt { text-align: center; margin-top: 16px; }
.hint { font-weight: 400; color: #7b8a97; font-size: .85rem; }

/* pick sheet — spreadsheet look */
.sheet { background: #fff; border: 1px solid #c9d2da; border-radius: 8px; padding: 18px 20px 24px; }
.sheet-title { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.sheet-title h1 { margin: 0 0 8px; font-size: 1.35rem; color: #123c2e; }
.week-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.week-nav a {
  text-decoration: none; padding: 3px 10px; border-radius: 14px;
  background: #e8eef2; color: #33454f; font-size: .85rem; font-weight: 600;
}
.week-nav a.current { background: #123c2e; color: #fff; }
.instruction {
  background: #40e0d0; color: #06312c; font-weight: 800; text-align: center;
  padding: 8px; margin: 10px 0 6px; letter-spacing: .4px; border-radius: 4px;
}
.instruction.locked-note { background: #d9dee3; color: #55606a; }
.legend { color: #5c6b78; font-size: .85rem; margin-bottom: 12px; }

.grid-wrap { overflow-x: auto; }
table.lines { border-collapse: collapse; min-width: 100%; }
table.lines th, table.lines td {
  border: 1px solid #9fb0be; padding: 7px 10px; text-align: center;
  font-size: .95rem; white-space: nowrap;
}
table.lines th { background: #f0e9c8; text-align: left; font-weight: 700; }
.row-fav td, .row-dog td { font-weight: 700; }
.row-spread td { background: #fbfbee; color: #555; }
.row-sep td { border-left: 0; border-right: 0; background: #fff; height: 8px; padding: 0; border-color: #fff; }
th.your-picks { background: #f0e9c8; vertical-align: middle; }
.nick-label { font-weight: 400; font-size: .8rem; color: #6b5900; }

.pickcell { padding: 0 !important; background: #d6f7f3; }
.pickcell label {
  display: block; padding: 8px 10px; cursor: pointer; font-weight: 700; color: #0b4f48;
}
.pickcell input { position: absolute; opacity: 0; }
.pickcell.selected, .pickcell:has(input:checked) { background: #40e0d0; }
.pickcell.selected label, .pickcell:has(input:checked) label { color: #062f2a; }
.pickcell:hover:not(.lockcell) { outline: 2px solid #14b8a6; outline-offset: -2px; }
.pickcell.lockcell { background: #e8ebee; }
.pickcell.lockcell label { cursor: not-allowed; color: #9aa7b1; }
.pickcell.lockcell.selected, .pickcell.lockcell:has(input:checked) { background: #b9c6c4; }
.pickcell.auto { outline: 2px dashed #c98a00; outline-offset: -2px; }
td.won { background: #d9f2d0; }
td.off { background: #eee; color: #999; text-decoration: line-through; }
.row-score td { color: #333; background: #f7f7f7; font-weight: 600; }

.tb-row {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px; background: #f7fafc; border: 1px solid #dde5ec;
  border-radius: 6px;
}
.tb-input { width: 70px; padding: 6px; border: 1px solid #9fb0be; border-radius: 4px;
  background: #d6f7f3; font-weight: 700; text-align: center; }
.tb-actual { font-weight: 700; color: #123c2e; }
.save-btn {
  margin-left: auto; padding: 10px 26px; border: 0; border-radius: 6px;
  background: #0b6e6e; color: #fff; font-weight: 800; font-size: 1rem; cursor: pointer;
}
.save-btn:hover { background: #095858; }
.save-btn:disabled { background: #9aa7b1; cursor: not-allowed; }
.byes { margin-top: 14px; font-weight: 700; color: #8a3b00; letter-spacing: .3px; }

/* pool picks sheet */
.pool-sheet .matchup { font-size: .78rem; line-height: 1.25; color: #55606a; background: #f7f7f2; }
.pool-sheet .nickcell { white-space: nowrap; }
.pool-sheet td { font-weight: 600; }
.pool-sheet .cell-win { background: #d9f2d0; color: #14652a; }
.pool-sheet .cell-loss { background: #f9dcd7; color: #8a2318; }
.pool-sheet .cell-push { background: #e8ebee; color: #55606a; }
.pool-sheet .cell-none { color: #b6c0c9; }
.pool-sheet .pts { background: #fdf6d8; font-weight: 800; }

/* rules */
.rules { max-width: 780px; }
.rules h2 { margin-top: 22px; }
.rules h2:first-child { margin-top: 0; }
.rules li { margin: 8px 0; line-height: 1.5; }

/* weekly recap */
a.recap-banner { display: block; background: #123c2e; color: #ffd76e; text-decoration: none; }
a.recap-banner:hover { background: #0c2b21; }
.recap-story p { font-size: 1.02rem; line-height: 1.55; }
.recap-link { font-size: .8rem; font-weight: 600; margin-left: 10px; }
.recap-table .group-head { text-align: center; background: #123c2e; color: #fff; }
.recap-table .totals td { background: #eef2f5; border-top: 2px solid #9fb0be; }

/* standings movement */
.move .up { color: #14652a; font-weight: 800; }
.move .down { color: #a33; font-weight: 800; }

/* results & generic tables */
h2 { color: #123c2e; margin-top: 28px; }
table.results { border-collapse: collapse; background: #fff; width: 100%; }
table.results th, table.results td {
  border: 1px solid #d3dbe2; padding: 7px 12px; text-align: left; font-size: .92rem;
}
table.results th { background: #eef2f5; }
tr.winner td { background: #fdf6d8; font-weight: 700; }
.dim { color: #8494a1; font-weight: 400; font-size: .85rem; }
.empty { color: #66757f; font-size: 1.05rem; }

/* badges */
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .72rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.badge.pending { background: #fde3c8; color: #8a4b00; }
.badge.active, .badge.open { background: #d2efd6; color: #14652a; }
.badge.admin-badge { background: #dfe3ff; color: #2b3a8f; }
.badge.auto-badge { background: #fff0c9; color: #8a6400; border: 1px dashed #c98a00; }

/* cards & forms */
.card {
  background: #fff; border: 1px solid #d3dbe2; border-radius: 8px;
  padding: 16px 20px; margin-bottom: 20px;
}
.card h2 { margin-top: 0; }
.stack label { display: block; margin: 10px 0; font-weight: 600; }
.stack input, .stack select {
  display: block; margin-top: 4px; padding: 7px 9px; border: 1px solid #c3ccd4;
  border-radius: 5px; min-width: 240px;
}
.stack button, .inline button, .inline-row button {
  margin-top: 10px; padding: 8px 18px; border: 0; border-radius: 5px;
  background: #0b6e6e; color: #fff; font-weight: 700; cursor: pointer;
}
form.inline { display: inline; }
.inline-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.inline-row label { font-weight: 600; font-size: .85rem; display: flex; flex-direction: column; gap: 3px; }
.inline-row input, .inline-row select { padding: 6px 8px; border: 1px solid #c3ccd4; border-radius: 5px; }
input.short { width: 80px; }
button.linkish { background: none; color: #0b6e6e; padding: 0; text-decoration: underline; }
button.danger { background: #a33; }
button.linkish.danger { background: none; color: #a33; }
.radio-line { display: block; margin: 8px 0; font-weight: 600; }
.payouts ul { margin: 6px 0 0; }
