:root {
  --yellow: #f5c518;
  --yellow-deep: #8a6a00;
  --black: #141414;
  --black-soft: #232323;
  --red: #c0392b;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e6e2d6;
  --bg: #f8f7f3;
  --card-bg: #ffffff;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--yellow-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--black);
  color: #fff;
  border-bottom: 3px solid var(--yellow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 20px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
}
.brand:hover { text-decoration: none; }

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}
.site-header .brand-logo {
  height: 76px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav a {
  color: #f1f1f1;
  font-weight: 500;
}

.main-nav a:hover { color: var(--yellow); }

.nav-admin {
  padding: 6px 14px;
  border: 1px solid var(--yellow);
  border-radius: 20px;
  color: var(--yellow) !important;
}
.nav-admin:hover { background: var(--yellow); color: var(--black) !important; text-decoration: none; }

.nav-logout-form { display: inline; }

.link-button {
  background: none;
  border: none;
  color: #f1f1f1;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.link-button:hover { color: var(--yellow); text-decoration: underline; }

/* Main */
main.container {
  padding-top: 30px;
  padding-bottom: 50px;
  min-height: 60vh;
}

.page-intro h1 {
  margin: 0 0 6px;
  font-size: 1.8rem;
  color: var(--black);
}
.motm-line {
  margin: 0 0 20px;
  font-weight: 600;
  color: var(--yellow-deep);
}
.match-score {
  display: inline-block;
  margin: 0 10px;
  padding: 2px 12px;
  border-radius: 6px;
  background: var(--yellow);
  color: var(--black);
  font-size: 1.2rem;
}
.page-intro p {
  margin: 0 0 24px;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.admin-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.admin-nav a {
  font-weight: 600;
  color: var(--black);
  padding: 4px 0;
}
.admin-nav a:hover { color: var(--yellow-deep); }

.inline-form {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-form input {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.85rem;
  width: 120px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 20px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  color: var(--black);
  border-left: 4px solid var(--yellow);
  padding-left: 10px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink);
  border-top: 4px solid var(--yellow);
}
.stat-card:hover { text-decoration: none; border-color: var(--yellow); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.stat-number { font-size: 2.2rem; font-weight: 800; color: var(--black); }
.stat-label { color: var(--muted); margin-top: 4px; }

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.table th { color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); font-size: 0.85rem; }
.yellow-col { color: #8a6d1a; }
.red-col { color: var(--red); }
.empty { color: var(--muted); font-style: italic; }

.more-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
}

.detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-list li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.detail-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-success { background: #fff3c4; color: #6b5900; }
.badge-warning { background: #fdf1de; color: #92600c; }
.badge-yellow { background: #fff6d9; color: #8a6d1a; }
.badge-red { background: #fbe2df; color: var(--red); }

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 8px;
}
.form input[type="text"],
.form input[type="number"],
.form input[type="date"],
.form select {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin-top: 10px;
}
.checkbox-label input { width: auto; }

.score-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.score-inputs input {
  width: 70px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  border: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--yellow);
  color: var(--black);
  margin-top: 16px;
}
.btn-primary:hover { background: var(--yellow-deep); color: #fff; text-decoration: none; }
.btn-secondary {
  background: #eee;
  color: var(--ink);
}
.btn-secondary:hover { background: #ddd; text-decoration: none; }

.row-actions {
  display: flex;
  gap: 12px;
  white-space: nowrap;
}
.link-danger { color: var(--red); }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-weight: 500;
}
.alert-error { background: #fbe2df; color: var(--red); }
.alert-success { background: #fff3c4; color: #6b5900; }

/* Footer */
.site-footer {
  background: var(--black);
  color: #d8d8d8;
  padding: 30px 0;
  font-size: 0.85rem;
  border-top: 3px solid var(--yellow);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-credit {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-logo {
  height: 48px;
  width: auto;
  vertical-align: middle;
  filter: brightness(0) invert(1);
}
.footer-credit a {
  color: #fff;
  font-weight: 600;
}

/* Login page */
.login-body {
  background: var(--black);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.login-card {
  background: #fff;
  border-radius: var(--radius);
  border-top: 4px solid var(--yellow);
  padding: 34px 32px;
  width: 100%;
  max-width: 360px;
}
.login-brand {
  color: var(--black);
  justify-content: center;
  margin-bottom: 18px;
}
.login-brand .brand-logo { height: 56px; }
.login-card h1 {
  font-size: 1.3rem;
  text-align: center;
  margin: 0 0 20px;
  color: var(--black);
}
.login-form {
  display: flex;
  flex-direction: column;
}
