:root {
  --green: #1f5c33;
  --green-dark: #143d22;
  --gold: #d9a441;
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #20261f;
  --muted: #6b7166;
  --red: #a13d2f;
  --border: #e1ddd0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header.site {
  background: var(--green-dark);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

header.site h1 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

header.site h1 a {
  color: white;
  text-decoration: none;
}

nav.site {
  display: flex;
  gap: 1rem;
}

nav.site a {
  color: #e8e4d8;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
}

nav.site a.active,
nav.site a:hover {
  color: white;
  border-bottom-color: var(--gold);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

h2 { margin-top: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.toolbar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

select, input[type=text], input[type=number], input[type=datetime-local] {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  background: white;
  color: var(--text);
}

button {
  background: var(--green);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  cursor: pointer;
}

button:hover { background: var(--green-dark); }
button.secondary { background: var(--muted); }
button.danger { background: var(--red); }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.04em; }

tr:first-child td { border-top: none; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.open { background: #dff0e2; color: var(--green-dark); }
.badge.locked { background: #f2e6d0; color: #8a5a12; }
.badge.final { background: #e6e2d6; color: var(--muted); }

.game-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
}

.game-card .matchup {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.game-card .teams { font-weight: 600; font-size: 1.05rem; }
.game-card .kickoff { color: var(--muted); font-size: 0.85rem; }

.pick-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.pick-row label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.pick-row .conf {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.pick-row .conf input { width: 4.5rem; }

.picks-reveal {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.picks-reveal span.correct { color: var(--green-dark); font-weight: 600; }
.picks-reveal span.wrong { color: var(--red); }

.msg { font-size: 0.9rem; margin-top: 0.4rem; min-height: 1.2em; }
.msg.error { color: var(--red); }
.msg.ok { color: var(--green-dark); }

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

textarea {
  width: 100%;
  min-height: 6rem;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.admin-section { margin-bottom: 2rem; }
.admin-section h3 { margin-bottom: 0.5rem; }

.game-row-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}
