:root { color-scheme: dark; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #f7f3e8; background: #071a12; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem clamp(1.25rem, 5vw, 4rem); border-bottom: 1px solid #2a5a41; }
.brand { color: #f7f3e8; text-decoration: none; font-size: 1.25rem; font-weight: 900; letter-spacing: .04em; }
.brand span { color: #e8c75a; }
.admin-label { color: #b8c7bc; font-size: .875rem; letter-spacing: .15em; }
main { max-width: 32rem; margin: clamp(2rem, 10vh, 6rem) auto; padding: 0 1rem; }
.panel { background: #0d2a1d; padding: clamp(1.5rem, 5vw, 2.5rem); border: 1px solid #2a5a41; border-top: 3px solid #d6a936; border-radius: 1rem; }
.eyebrow { color: #e8c75a; font-size: .875rem; font-weight: 700; letter-spacing: .1em; }
h1 { font-size: clamp(1.75rem, 5vw, 2rem); line-height: 1.2; margin: 1rem 0; }
h2 { font-size: 1rem; margin: 0 0 .5rem; }
p { color: #b8c7bc; line-height: 1.6; overflow-wrap: anywhere; }
#message:empty { display: none; }
#message { padding: .75rem; border: 1px solid #d6a936; border-radius: .5rem; color: #f7f3e8; }
label { display: block; margin: 1.25rem 0 .5rem; font-size: .9375rem; font-weight: 600; }
input { width: 100%; padding: .875rem; background: #071a12; color: #f7f3e8; border: 1px solid #52715e; border-radius: .5rem; font: inherit; }
button { width: 100%; margin-top: 1.25rem; padding: .875rem 1rem; border: 1px solid #e8c75a; border-radius: .5rem; background: #e8c75a; color: #071a12; font: inherit; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { background: transparent; color: #f7f3e8; border-color: #52715e; }
:focus-visible { outline: 3px solid #e8c75a; outline-offset: 4px; }
.access-card { margin-top: 1.5rem; padding: 1.25rem; background: #123522; border: 1px solid #52715e; border-radius: .5rem; }
.access-card p { margin-bottom: 0; }
.account-email { font-size: .9375rem; }
.footer { text-align: center; font-size: .875rem; }

/* ADMIN OVERVIEW LAYOUT */
main.dashboard { max-width: 64rem; }
.dashboard #account { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: 1.5rem; border-bottom: 1px solid #2a5a41; }
.dashboard #account button { width: auto; margin-top: 0; }
.dashboard .account-email { margin: 0; }
.overview { margin-top: 2rem; }
.scope { margin: .5rem 0 1.5rem; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.metric { padding: 1.25rem; border: 1px solid #2a5a41; border-radius: .75rem; background: #071a12; }
.metric dt { font-size: 1rem; color: #b8c7bc; }
.metric dd { margin: .5rem 0; color: #e8c75a; font-size: 2.5rem; font-weight: 800; }
.metric p { font-size: .875rem; margin-bottom: 0; }
.overview-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }
.overview-actions p { font-size: .875rem; }
.overview-actions button { width: auto; margin-top: 0; }
#overview-status:empty { display: none; }
@media (max-width: 640px) { .metrics { grid-template-columns: 1fr; } }

/* MONTHLY SPORTS DATA CREDITS */
.credits-card { margin-top: 2rem; padding: 1.5rem; background: #071a12; border: 1px solid #52715e; border-radius: .75rem; }
.credits-heading { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.credits-heading h2 { margin: 0; font-size: 1.125rem; }
.credits-heading span { font-size: .875rem; color: #b8c7bc; }
.credits-summary { font-size: clamp(1.25rem, 3vw, 1.75rem); color: #e8c75a; font-weight: 800; }
progress { width: 100%; height: .75rem; appearance: none; border: 0; border-radius: 1rem; overflow: hidden; background: #2a5a41; }
progress::-webkit-progress-bar { background: #2a5a41; border-radius: 1rem; }
progress::-webkit-progress-value { background: #e8c75a; border-radius: 1rem; }
progress::-moz-progress-bar { background: #e8c75a; border-radius: 1rem; }
#credits-status:empty { display: none; }
#credits-reset { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ADMIN PLAYER ACCOUNTS PAGE */
.metric-label { display: block; font-size: 1rem; color: #b8c7bc; }
.metric-value { display: block; margin: .5rem 0; color: #e8c75a; font-size: 2.5rem; font-weight: 800; }
.metric-link { color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.metric-link:hover { border-color: #e8c75a; background: #123522; }
.players-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.players-toolbar button, .players-pagination button { width: auto; margin-top: 0; }
.back-link { color: #e8c75a; text-underline-offset: .25rem; }
.player-controls { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.search-field, .sort-field { grid-column: span 2; }
.player-controls label { margin-top: .5rem; }
select { width: 100%; padding: .875rem; color: #f7f3e8; background: #071a12; border: 1px solid #52715e; border-radius: .5rem; font: inherit; }
.clear-filters { display: flex; align-items: end; }
.clear-filters button { margin-top: 0; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid #2a5a41; border-radius: .5rem; }
table { width: 100%; min-width: 1050px; border-collapse: collapse; text-align: left; font-size: .875rem; }
th { background: #071a12; color: #b8c7bc; font-weight: 600; white-space: nowrap; }
th, td { padding: .875rem; border-bottom: 1px solid #2a5a41; vertical-align: top; }
td { max-width: 16rem; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
.account-tag { text-transform: capitalize; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.players-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.players-note { font-size: .875rem; }
#players-status:empty { display: none; }
@media (max-width: 640px) { .player-controls { grid-template-columns: repeat(2,minmax(0,1fr)); } .players-pagination { justify-content: space-between; } }

/* ADMIN GAMES PAGE */
.week-field { grid-column: span 2; }
.games-table { min-width: 1450px; }
.game-details summary { color: #e8c75a; cursor: pointer; white-space: nowrap; }
.game-details[open] { min-width: 16rem; }
.game-details dl { margin-bottom: 0; }
.game-details dt { color: #b8c7bc; font-weight: 600; margin-top: .75rem; }
.game-details dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
#games-status:empty { display: none; }

/* ADMIN PICKS PAGE */
.picks-table { min-width: 1450px; }
#picks-status:empty { display: none; }

/* ADMIN GOAL POOL PAGE */
.goal-link { display:block; margin-top:1rem; border:1px solid #2a5a41; border-radius:.75rem; padding:1.25rem; }
.goals-table { min-width:1600px; }
.goal-toggle { width:auto; margin-top:.5rem; padding:.5rem .75rem; }
#goals-status:empty, #goals-change-status:empty { display:none; }
.goal-copy { margin:.5rem 0 0; font-size:.8rem; }

/* ADMIN SPECIAL CARD CREATOR */
textarea { width:100%; padding:.875rem; color:#f7f3e8; background:#071a12; border:1px solid #52715e; border-radius:.5rem; font:inherit; resize:vertical; }
.special-game-options { max-height:26rem; overflow:auto; border:1px solid #2a5a41; border-radius:.5rem; }
.special-game-choice { display:flex; gap:.75rem; align-items:flex-start; padding:.875rem; margin:0; border-bottom:1px solid #2a5a41; }
.special-game-choice input { width:1.2rem; min-width:1.2rem; margin:.25rem 0; }
.special-objective, .special-card-item { border:1px solid #2a5a41; padding:1rem; border-radius:.75rem; margin:1rem 0; }
.special-card-item button { width:auto; }
#special-editor { margin-top:2rem; border-top:1px solid #2a5a41; padding-top:1rem; }
#special-editor .players-toolbar button { width:auto; }
#special-editor-status:empty,#special-status:empty { display:none; }

/* ADMIN DATA HEALTH PAGE */
.health-scroll { max-height:30rem; margin-bottom:1.5rem; }
.health-scroll thead { position:sticky; top:0; }
.health-events-table { min-width:1200px; }
.health-error { color:#ffb1a7; white-space:pre-wrap; }
#health-pulls .metric p { overflow-wrap:anywhere; }
#health-status:empty { display:none; }
