/* Pro-League-Nostiek — minimalistische stijl */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --border: #e2e2de;
  --text: #1e1e1c;
  --text-muted: #6b6b67;
  --accent: #3a3a36;
  --accent-dark: #000000;
  --accent-soft: #ececea;
  --good: #1e1e1c;
  --good-soft: #eaeae7;
  --bad: #1e1e1c;
  --bad-soft: #e4e4e1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(43, 41, 37, 0.06);
  --max-width: 980px;
  --font-display: "Oswald", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Topbar ------------------------------------------------------------- */

.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.brand span { color: var(--accent); }

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

.nav a {
  font-family: var(--font-display);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav a:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }
.nav a.active { color: var(--accent-dark); background: var(--accent-soft); font-weight: 500; }

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Typography ----------------------------------------------------------*/

h1 { font-family: var(--font-display); font-size: 26px; font-weight: 600; margin: 0 0 4px; letter-spacing: 0.01em; text-transform: uppercase; }
h2 { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin: 0 0 12px; letter-spacing: 0.01em; }
.subtitle { color: var(--text-muted); margin: 0 0 28px; font-size: 14px; }
.page-header { margin-bottom: 28px; }

/* Cards -----------------------------------------------------------------*/

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 20px; }

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

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

.stat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  flex: 1;
  min-width: 140px;
}

.stat .label { font-family: var(--font-display); font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.stat .value { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: 0; }
.stat .value.accent { color: var(--accent-dark); }

/* Forms -------------------------------------------------------------- */

label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }

input, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field { margin-bottom: 16px; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: background 0.12s ease;
}

button:hover, .btn:hover { background: var(--accent-dark); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-dark); }

.btn-small { padding: 5px 10px; font-size: 13px; }

.btn-secondary.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }

.result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: none; }
.result-row .team-name { flex: 1 1 auto; font-size: 14px; }
.result-row .team-name.right { text-align: right; }
.result-row select.team-name { flex: 1 1 auto; }
.result-row .score-input {
  width: 46px;
  flex: 0 0 auto;
  text-align: center;
  padding: 7px 4px;
}
.result-row .score-sep { color: var(--text-muted); flex: 0 0 auto; }
.result-day-heading {
  font-size: 12px;
  color: var(--text-muted);
  margin: 14px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.result-day-heading:first-child { margin-top: 0; }

.form-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

/* Login card ----------------------------------------------------------*/

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.auth-logo span { color: var(--accent); }

/* Tables ----------------------------------------------------------------*/

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

th, td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th {
  font-family: var(--font-display);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

td.num, th.num { text-align: center; width: 46px; }
tr.match td { background: var(--good-soft); }
tr:last-child td { border-bottom: none; }

.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 13px;
}

.team-row.selectable { cursor: pointer; }
.team-row.selected td { background: var(--accent-soft); }

.delta { font-size: 13px; font-weight: 600; }
.delta.pos { color: var(--good); }
.delta.neg { color: var(--bad); }
.delta.zero { color: var(--text-muted); }

/* Badges / pills ----------------------------------------------------- */

.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.pill.muted { background: #eeece5; color: var(--text-muted); }
.pill.good { background: var(--good-soft); color: var(--good); }

/* Messages ------------------------------------------------------------*/

.message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  border-left: 3px solid var(--text);
}
.message::before { font-weight: 700; margin-right: 6px; }
.message.error { background: var(--bad-soft); color: var(--bad); }
.message.error::before { content: "\2715"; }
.message.success { background: var(--good-soft); color: var(--good); }
.message.success::before { content: "\2713"; }
.message.info { background: var(--accent-soft); color: var(--accent-dark); border-left-color: var(--text-muted); }
.message.info::before { content: "i"; }

.hidden { display: none !important; }

.muted { color: var(--text-muted); }
.small { font-size: 13px; }

.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.section-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }
.list-row .name { flex: 1; font-size: 14px; }
.list-row.selectable { cursor: pointer; border-radius: 7px; }
.list-row.selectable:hover { background: var(--accent-soft); }
.list-row.selected { background: var(--accent-soft); }
.list-row.pending { background: var(--good-soft); }
.list-row .row-actions { display: flex; gap: 4px; }

.icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  padding: 0;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-soft); }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; background: var(--surface); color: var(--text-muted); }

.list-row[draggable="true"] { cursor: grab; }
.list-row.dragging { opacity: 0.35; }
.list-row.drop-target { border-top: 2px solid var(--accent); }
.drag-handle { color: var(--text-muted); padding: 0 2px; font-size: 15px; line-height: 1; user-select: none; }
.list-row .name-input { flex: 1; width: auto; margin-right: 8px; }

.fixture-day-heading {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 18px 0 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.fixture-day-heading:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.fixture-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  gap: 12px;
}
.fixture-item:last-child { border-bottom: none; }
.fixture-date { color: var(--text-muted); font-size: 12px; min-width: 130px; }
.fixture-teams { font-weight: 500; flex: 1 1 auto; }
.fixture-time { color: var(--text-muted); font-size: 13px; flex: 0 0 auto; white-space: nowrap; }
.fixture-status { flex: 0 0 auto; }

.rules-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: rule;
}
.rules-list li {
  counter-increment: rule;
  position: relative;
  padding: 16px 0 16px 44px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.6;
}
.rules-list li:first-child { padding-top: 0; }
.rules-list li:last-child { border-bottom: none; padding-bottom: 0; }
.rules-list li::before {
  content: counter(rule);
  position: absolute;
  left: 0;
  top: 16px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rules-list li:first-child::before { top: 0; }

/* Scorebord (Klassement-pagina) ---------------------------------------- */

.scoreboard {
  background: #cce6e9;
  border: none;
}

.scoreboard-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 640px;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .scoreboard-cols { grid-template-columns: 1fr; max-width: 360px; }
}

.scoreboard-panel {
  background: #e2f1f2;
  border-radius: 8px;
  padding: 14px;
}

.scoreboard-col-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #3d6a6e;
  margin: 0 0 12px;
}

.scoreboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.scoreboard-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  width: 38px;
  flex: 0 0 auto;
  color: #1e1e1c;
}

.team-tile {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.15;
  box-shadow: 0 1px 2px rgba(20, 30, 30, 0.15);
  overflow: hidden;
}

.team-tile.split .team-tile-corner {
  position: absolute;
  inset: 0;
  /* Harde driehoek: raakt de linkerboven-, rechterboven- en
     linkeronderhoek, geen gradient/blur op de scheidingslijn. */
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.team-tile.split .team-tile-label {
  position: relative;
  z-index: 1;
}

.team-tile.bordered {
  border: 1px solid #d5d5d0;
  box-shadow: none;
}

.team-tile.empty {
  background: transparent;
  color: #7a9a9d;
  box-shadow: none;
  border: 1px dashed #a9c9cc;
  font-weight: 500;
}

.scoreboard-row.match .team-tile {
  outline: 2px solid #1e1e1c;
  outline-offset: 2px;
}

.scoreboard-note {
  margin: 0 0 12px;
}

.footer-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 40px;
}
