:root {
  --field-color: #FB9F12;
  --ink: #101418;
  --line: #ffffff;
  --brand: #126d3a;
  --surface: #f4f7f2;
  --panel: #ffffff;
  --muted: #66706a;
  --shadow: 0 4px 16px rgba(17, 29, 22, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

button, input, select {
  font: inherit;
}

h1, h2, h3, p {
  margin: 0;
}

/* ── App shell ────────────────────────────────── */

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 8px 8px 44px;
  gap: 8px;
  overflow: hidden;
}

/* ── Single-column layout ─────────────────────── */

.layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

/* ── Match management panel (boven) ───────────── */

.side-panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid #dde6df;
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Score + klok ─────────────────────────────── */

.match-header {
  flex-shrink: 0;
  padding: 6px 10px;
  border-bottom: 1px solid #e2eae4;
}

.score-clock-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 8px;
  align-items: center;
}

.score-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.team-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-name-input {
  width: 100%;
  min-height: 30px;
  border: 1px solid #d2ded6;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: #fff;
}

.score-val {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1;
  color: var(--brand);
}

.score-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 100%;
}

.score-buttons button {
  font-size: 18px;
  font-weight: 800;
  min-height: 32px;
  padding: 0;
}

/* ── Klok ─────────────────────────────────────── */

.clock-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.period-label {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.clock-display {
  font-variant-numeric: tabular-nums;
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 800;
  line-height: 1;
}

.clock-display.is-paused    { color: #9daa9f; }
.clock-display.is-last-minute { color: #b7791f; }
.clock-display.is-time-up   { color: #b42318; }

.clock-actions {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4px;
  width: 100%;
}



.clock-settings {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.clock-settings label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.clock-settings input {
  width: 46px;
  min-height: 28px;
  border: 1px solid #cfd8d1;
  border-radius: 6px;
  padding: 0 4px;
  text-align: center;
  background: #fff;
  font-size: 12px;
}

/* ── Tab-navigatie ────────────────────────────── */

.tab-bar {
  flex-shrink: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(max-content, 1fr);
  overflow-x: auto;
  border-bottom: 1px solid #e2eae4;
  background: #f8faf8;
}

.tab-btn {
  min-height: 36px;
  white-space: nowrap;
  padding: 0 12px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.tab-btn:hover {
  color: var(--ink);
  background: #eff3f0;
}

.tab-btn.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: transparent;
}

/* ── Tab-inhoud ───────────────────────────────── */

.tab-content {
  overflow-y: auto;
  max-height: clamp(160px, 28vh, 260px);
}

.tab-content.is-hidden {
  display: none;
}

.tab-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid #e4ece6;
  background: #fbfdfb;
  position: sticky;
  top: 0;
  z-index: 1;
}

.tab-toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.tab-toolbar select {
  min-height: 30px;
  border: 1px solid #cfd8d1;
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  font-size: 12px;
}

/* ── Bord-sectie (onderaan) ───────────────────── */

.board-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid #dde6df;
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.board-head {
  flex-shrink: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #e2eae4;
}

.board-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.board-actions label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.board-actions select {
  min-height: 30px;
  border: 1px solid #cfd8d1;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.board-actions .check-control {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid #cfd8d1;
  border-radius: 6px;
  background: #fff;
}

/* ── Buttons ──────────────────────────────────── */

button {
  min-height: 30px;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}

button:hover {
  border-color: #9daf9f;
}

.primary {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.primary:hover {
  background: #0e5a30;
  border-color: #0e5a30;
}

.danger-link,
.icon-danger {
  min-height: 26px;
  border-color: transparent;
  color: #9a4b4b;
  background: transparent;
}

.danger-link:hover,
.icon-danger:hover {
  border-color: #e7c7c7;
  background: #ffecec;
}

.icon-danger {
  width: 26px;
  min-width: 26px;
  padding: 0;
  font-size: 15px;
  font-weight: 800;
}

/* ── Check control ────────────────────────────── */

.check-control {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.check-control input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

/* ── Kleurpicker ──────────────────────────────── */

.color-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-control input {
  width: 38px;
  height: 28px;
  padding: 2px;
  border: 1px solid #cfd8d1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

/* ── Segmented control ────────────────────────── */

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.segmented legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.segmented label {
  min-width: 80px;
  text-align: center;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: block;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
}

.segmented input:checked + span {
  color: #fff;
  background: var(--brand);
}

/* ── Positie-grid ─────────────────────────────── */

.position-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 7px;
  padding: 8px;
}

.position-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d9e4dc;
  border-radius: 8px;
  background: #fbfdfb;
}

.position-card.is-empty {
  border-color: #e0b15f;
  background: #fff9ec;
}

.position-card-tools {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
}

.position-card-tools button {
  min-width: 26px;
  min-height: 26px;
  padding: 0 5px;
  font-size: 11px;
}

.position-card-tools button:disabled {
  opacity: 0.35;
  cursor: default;
}

.position-name {
  width: 100%;
  min-height: 30px;
  border: 1px solid #d2ded6;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 800;
  background: #fff;
}

.position-current {
  display: grid;
  gap: 2px;
  min-height: 38px;
}

.position-current span,
.position-previous span,
.position-swap span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.position-current strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.1;
}

.position-previous strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #59645e;
  font-size: 12px;
}

.position-swap {
  display: grid;
  gap: 4px;
}

.position-swap select {
  width: 100%;
  min-height: 30px;
  border: 1px solid #cfd8d1;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  background: #fff;
}

/* ── Veldbezetting ────────────────────────────── */

.lineup-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
}

h3 {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 6px;
}

/* ── Spelerslijst ─────────────────────────────── */

.player-list {
  display: grid;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.player-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid #d9e4dc;
  border-radius: 7px;
  background: #fbfdfb;
}

.player-stat-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.player-stat-actions button {
  min-height: 27px;
  padding: 0 4px;
  font-size: 11px;
}

#onCourtList .player-card {
  border-color: #c5ddcf;
  background: #f1faf4;
}

#benchList .player-card {
  border-color: #dce2de;
  background: #f7f8f7;
}

.player-number,
.player-number-input {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  font-size: 12px;
}

.player-number-input {
  border: 0;
  padding: 0;
  text-align: center;
  appearance: textfield;
}

.player-number-input::-webkit-outer-spin-button,
.player-number-input::-webkit-inner-spin-button,
.table-number-input::-webkit-outer-spin-button,
.table-number-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.player-meta {
  min-width: 0;
}

.player-meta strong,
.player-name-input {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.player-name-input,
.table-name-input,
.table-number-input {
  min-height: 28px;
  border: 1px solid #d2ded6;
  border-radius: 6px;
  padding: 0 7px;
  background: #fff;
  font-size: 12px;
}

.player-name-input {
  font-weight: 800;
}

.table-name-input {
  width: min(220px, 100%);
}

.table-number-input {
  width: 56px;
  text-align: center;
}

.player-meta span {
  color: var(--muted);
  font-size: 11px;
}

.player-meta .mini-stats {
  display: block;
  min-height: 13px;
  color: #2f6b46;
  font-size: 11px;
  font-weight: 800;
}

/* ── Statistieken ─────────────────────────────── */

.stat-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 8px;
}

.stat-card {
  padding: 8px;
  border: 1px solid #d9e4dc;
  border-radius: 7px;
  background: #fbfdfb;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stat-card strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
  line-height: 1;
}

.selection-stats {
  border-top: 1px solid #e4ece6;
  border-bottom: 1px solid #e4ece6;
  background: #fbfdfb;
}

.selection-stats h3 {
  padding: 6px 10px 0;
}

.compact-table-wrap {
  padding-top: 0;
}

.selection-table {
  min-width: 460px;
}

.table-wrap {
  overflow-x: auto;
  padding: 0 8px 8px;
}

.stats-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.stats-table th,
.stats-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #e4ece6;
  text-align: left;
  white-space: nowrap;
}

.stats-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.stat-actions {
  display: flex;
  gap: 4px;
}

.stat-actions button {
  min-height: 28px;
  padding: 0 7px;
  font-size: 11px;
}

/* ── Verdediging aanpassen ────────────────────── */

.defense-editor {
  flex-shrink: 0;
  border-bottom: 1px solid #e2eae4;
  padding: 6px 10px;
  background: #fbfdfb;
}

.defense-editor summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.defense-labels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.defense-label-row {
  display: grid;
  grid-template-columns: 30px 48px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
}

.defense-label-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.defense-label-row input {
  min-height: 28px;
  min-width: 0;
  border: 1px solid #d2ded6;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 12px;
  background: #fff;
}

/* ── Bord ─────────────────────────────────────── */

.board-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--panel);
}

.board {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  background: #dfe8df;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.board[data-field-mode="attack"] {
  aspect-ratio: 1 / 1;
}

.board.is-drawing {
  cursor: crosshair;
}

.board.is-erasing {
  cursor: cell;
}

.field-svg {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--field-color);
}

.field-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.six-meter,
.center-dot,
.seven-meter,
.nine-meter,
.sub-line {
  vector-effect: non-scaling-stroke;
}

.nine-meter {
  stroke-dasharray: 12px 10px;
}

.center-dot, .seven-meter {
  stroke-dasharray: none;
}

.center-dot {
  fill: var(--line);
  stroke: none;
}

.draw-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.draw-path,
.draw-head {
  vector-effect: non-scaling-stroke;
}

.marker {
  position: absolute;
  width: clamp(30px, 3.8vw, 44px);
  height: clamp(30px, 3.8vw, 44px);
  display: grid;
  place-items: center;
  padding: 2px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #151515;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  font-size: clamp(8px, 1.1vw, 13px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  word-break: break-word;
  user-select: none;
  cursor: grab;
  transform: translate(-50%, -50%);
  touch-action: none;
}

.marker[data-team="attack"] {
  background: var(--brand);
}

.marker[data-team="ball"] {
  width: clamp(22px, 2.8vw, 32px);
  height: clamp(22px, 2.8vw, 32px);
  border-color: #1d1d1d;
  color: transparent;
  background: #ffb72b;
}

.marker:active {
  cursor: grabbing;
}

/* ── Responsive ───────────────────────────────── */

@media (max-width: 640px) {
  .stat-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .score-clock-grid {
    grid-template-columns: 1fr 1.6fr 1fr;
  }
}

@media (max-width: 440px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .lineup-columns {
    grid-template-columns: 1fr;
  }
}

/* Kleine schermen (telefoon, iPad liggend): pagina scrolt, bord houdt volle breedte */
@media (max-width: 640px), (max-height: 700px) {
  body,
  .app {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .layout {
    overflow: visible;
  }

  .board-section {
    flex: none;
  }

  .board-wrap {
    flex: none;
  }

  .tab-content {
    max-height: 60vh;
  }
}

/* Touch: inputs < 16px laten iOS Safari inzoomen bij focus */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
  select {
    font-size: 16px !important;
  }
}

/* ── Wisselschema: tik-om-te-wisselen ─────────── */

.tab-sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fbfdfb;
  border-bottom: 1px solid #e4ece6;
}

.tab-sticky .tab-toolbar {
  position: static;
  border-bottom: 0;
}

.bench-strip {
  padding: 0 10px 8px;
}

.bench-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.bench-chip,
.position-pick {
  display: grid;
  gap: 2px;
  min-height: 44px;
  border: 2px solid #cfd8d1;
  border-radius: 8px;
  padding: 6px 10px;
  text-align: left;
  background: #fff;
}

.bench-chip {
  flex: none;
}

.bench-chip span,
.position-pick span,
.position-pick em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.position-pick {
  width: 100%;
  min-height: 56px;
}

.position-pick strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.position-pick em {
  min-height: 13px;
  color: #2f6b46;
  font-weight: 800;
}

.bench-chip.is-selected,
.position-card.is-selected .position-pick {
  border-color: var(--brand);
  background: #e6f4ea;
}

.bench-empty {
  color: var(--muted);
  font-size: 12px;
}

#undoSwap:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Bord verbergen: het wedstrijdpaneel krijgt de vrijgekomen ruimte */
.app.board-hidden .board-section {
  display: none;
}

.app.board-hidden .side-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.app.board-hidden .tab-content,
.app.board-hidden .side-panel .tab-content {
  max-height: none;
}

/* Vaste hoogte: de strook mag niet verspringen tussen de eerste en tweede tik */
.bench-label {
  align-self: center;
  flex: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.bench-chip span {
  white-space: nowrap;
}

#toggleBoard {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 10;
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0.75;
}

.bench-strip {
  padding-bottom: 6px;
}

.bench-chip {
  min-height: 40px;
  padding: 4px 10px;
}

/* ── Compact scorebord ────────────────────────── */

.score-side {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
}

.team-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.team-name-input {
  grid-column: 1 / -1;
}

.score-buttons {
  display: contents;
}

.score-buttons button:first-child {
  grid-column: 1;
  order: 1;
}

.score-val {
  grid-column: 2;
  order: 2;
  min-width: 1.2em;
  text-align: center;
  font-size: clamp(30px, 4vw, 44px);
}

.score-buttons button:last-child {
  grid-column: 3;
  order: 3;
}

.clock-display {
  font-size: clamp(36px, 5vw, 56px);
}

.clock-col {
  gap: 3px;
}

/* ── Wisseltactiek ────────────────────────────── */

[hidden] {
  display: none !important;
}

.tactic-editor {
  margin: 0 8px 8px;
  padding: 6px 10px;
  border: 1px solid #d9e4dc;
  border-radius: 8px;
  background: #fbfdfb;
}

.tactic-editor summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

#tacticEditor {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.tactic-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.tactic-name {
  min-height: 30px;
  border: 1px solid #d2ded6;
  border-radius: 6px;
  padding: 0 8px;
  font-weight: 800;
  background: #fff;
}

.tactic-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tactic-chain button {
  min-height: 36px;
  border-color: var(--brand);
  background: #e6f4ea;
}

.tactic-empty {
  color: var(--muted);
  font-size: 12px;
}

.tactic-add,
.tactic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tactic-add button,
.tactic-actions button,
[data-tactic-new] {
  min-height: 36px;
}

/* ── Compacte positiekaarten ──────────────────── */

.position-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  padding: 6px;
}

.position-card {
  display: grid;
  gap: 1px;
  width: 100%;
  min-height: 0;
  padding: 5px 8px;
  border: 2px solid #cfd8d1;
  border-radius: 8px;
  text-align: left;
  background: #fff;
}

.position-card.is-empty {
  border-color: #e0b15f;
  background: #fff9ec;
}

.position-card.is-selected {
  border-color: var(--brand);
  background: #e6f4ea;
}

.position-label {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.position-label span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.position-label em {
  color: #2f6b46;
  font-style: normal;
}

.position-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.position-sub {
  min-height: 13px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

/* ── Posities-tab ─────────────────────────────── */

.pos-help {
  padding: 6px 10px 0;
}

.position-list {
  display: grid;
  gap: 4px;
  padding: 8px;
}

.pos-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid #d9e4dc;
  border-radius: 8px;
  background: #fbfdfb;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.pos-grip {
  color: #9daa9f;
  text-align: center;
}

.pos-row .position-name {
  min-height: 32px;
  user-select: text;
  -webkit-user-select: text;
}

.pos-row.is-dragging {
  position: relative;
  z-index: 3;
  border-color: var(--brand);
  background: #e6f4ea;
  box-shadow: var(--shadow);
  touch-action: none;
}

.pos-row.drop-before {
  box-shadow: 0 -3px 0 var(--brand);
}

.pos-row.drop-after {
  box-shadow: 0 3px 0 var(--brand);
}

/* Slepen in het Wisselschema */
.position-card,
.bench-chip {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.position-card.is-dragging,
.bench-chip.is-dragging {
  position: relative;
  z-index: 5;
  border-color: var(--brand);
  background: #e6f4ea;
  box-shadow: var(--shadow);
  touch-action: none;
}

.position-card.drop-target,
.bench-chip.drop-target {
  border-color: var(--brand);
  border-style: dashed;
  background: #d5eddd;
}

/* Sleepen van een kaart mag de scroll van het paneel niet meenemen */
.tab-content:has(.is-dragging) {
  overflow: hidden;
}

.position-label span {
  min-width: 0;
}

.position-label em {
  flex: none;
}

/* ── Tactiek-tab ──────────────────────────────── */

.tactic-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.saved-tactics {
  border-top: 1px solid #e4ece6;
  background: #fbfdfb;
}

.saved-tactic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #d9e4dc;
  border-radius: 8px;
  background: #fff;
}

.saved-tactic-info {
  display: grid;
  min-width: 0;
}

.saved-tactic-info span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-tactic button:not(.icon-danger) {
  min-height: 36px;
}

.saved-tactic-info small {
  color: var(--muted);
  font-weight: 400;
}

.saved-tactic:not(:has(.icon-danger)) {
  grid-template-columns: minmax(0, 1fr) auto;
}

/* Hint ("Gaat eruit") kleiner en niet in hoofdletters zodat hij op smalle kaarten past */
.position-label em {
  font-size: 9px;
  text-transform: none;
}
