/* Hockeylab: donker, rustig, cijfers vooraan. */
:root {
  color-scheme: dark;
  --bg: #0a1112;
  --bg-2: #0d1617;
  --surface: #121c1d;
  --surface-2: #172324;
  --surface-3: #1d2b2c;
  --line: #213030;
  --line-2: #2b3d3c;
  --text: #e9f0ea;
  --soft: #c3cfc8;
  --muted: #8b9d95;
  --faint: #5d6f69;
  --lime: #c9f26d;
  --lime-2: #b3e050;
  --lime-ink: #182808;
  --cyan: #6ed5e6;
  --amber: #f3bb5f;
  --red: #ff7b6c;
  --pitch: #1b4c3c;
  --pitch-2: #1f5543;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -18px rgba(0, 0, 0, .7);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--text); min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* -- Schil ------------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px;
  padding: 26px 16px 18px; background: var(--bg-2); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 0 10px; }
.brand-mark {
  width: 34px; height: 34px; line-height: 34px; text-align: center; border-radius: 10px; flex-shrink: 0;
  background: var(--lime); color: var(--lime-ink); font-weight: 800; font-size: 20px; letter-spacing: -1.5px;
}
.brand-mark i { font-style: normal; color: #48701a; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -.4px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-s);
  text-decoration: none; color: var(--muted); font-weight: 550; transition: background .15s, color .15s;
}
.nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav a:hover { background: var(--surface); color: var(--soft); }
.nav a.active { background: var(--surface-2); color: var(--text); }
.nav a.active svg { stroke: var(--lime); }
.nav-count {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; min-width: 20px; text-align: center;
  padding: 1px 6px; border-radius: 99px; background: rgba(110, 213, 230, .14); color: var(--cyan);
}
.account-area { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.me-card {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: background .15s, border-color .15s;
}
.me-card:hover { background: var(--surface-2); border-color: var(--line-2); }
.me-avatar {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(110, 213, 230, .14); color: var(--cyan); font-weight: 700; font-size: 14px;
}
.me-avatar.large { width: 42px; height: 42px; font-size: 17px; }
.me-text { display: flex; flex-direction: column; min-width: 0; }
.me-text .account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-more { margin-left: auto; flex-shrink: 0; width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.me-section { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.me-section p { font-size: 12.5px; color: var(--muted); }
.me-section p.faint { font-size: 11.5px; color: var(--faint); }
.me-invite { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.invite-link { display: flex; gap: 6px; width: 100%; }
.invite-link input {
  flex: 1; min-width: 0; min-height: 30px; padding: 5px 10px; border-radius: var(--radius-s); border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); font-size: 12px; outline: none;
}
.invite-link input:focus { border-color: var(--lime); }
.me-install { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.me-veo-row { display: flex; align-items: center; gap: 10px; }
.me-veo-row .veo-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 10px; }
.me-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.gate {
  min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  background: radial-gradient(900px 480px at 50% -8%, rgba(201, 242, 109, .07), transparent 62%), var(--bg);
}
.gate-card { width: min(420px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.gate-brand { display: flex; align-items: center; gap: 11px; }
.gate-card h1 { font-size: 26px; }
.gate-card .lead { font-size: 13.5px; }
.gate-form { display: flex; flex-direction: column; gap: 14px; }
.gate-button { min-height: 44px; font-size: 14px; }
.gate-note { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.link-button {
  border: 0; background: none; padding: 0; font-weight: 600; color: var(--lime);
  text-decoration: underline; text-underline-offset: 2px;
}
.account-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface);
  display: flex; flex-direction: column; gap: 10px;
}
.account-top { display: flex; align-items: center; gap: 10px; }
.veo-mark {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: #f4f6f2; color: #0e1614; font-weight: 800; font-size: 11px; letter-spacing: -.3px;
}
.account-name { font-weight: 600; font-size: 13px; line-height: 1.3; }
.account-meta { font-size: 11.5px; color: var(--muted); }
.account-actions { display: flex; gap: 6px; }
.main { padding: 34px 42px 60px; min-width: 0; max-width: 1720px; outline: none; }

/* -- Basis ------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--lime); margin-bottom: 8px; }
h1 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 650; letter-spacing: -.9px; line-height: 1.15; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.3px; }
h3 { font-size: 13px; font-weight: 650; }
.lead { color: var(--muted); margin-top: 8px; max-width: 640px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 15px;
  border-radius: var(--radius-s); border: 1px solid transparent; font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s; text-decoration: none; background: none;
}
.button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .45; cursor: default; transform: none; }
.button.disabled { opacity: .4; pointer-events: none; }
.button.primary { background: var(--lime); color: var(--lime-ink); }
.button.primary:hover:not(:disabled) { background: var(--lime-2); }
.button.ghost { border-color: var(--line-2); color: var(--soft); }
.button.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.button.quiet { color: var(--muted); padding: 6px 10px; min-height: 32px; }
.button.quiet:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.button.danger:hover:not(:disabled) { color: var(--red); background: rgba(255, 123, 108, .08); }
.button.small { min-height: 30px; padding: 5px 11px; font-size: 12px; }
.icon-button {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-s);
  border: 1px solid transparent; background: none; color: var(--muted); transition: background .15s, color .15s;
}
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-button:disabled { opacity: .4; cursor: default; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 550; }
.field input {
  min-height: 40px; padding: 8px 12px; border-radius: var(--radius-s); border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); font-size: 14px; outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--lime); }
.form-error { color: var(--red); font-size: 12.5px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--lime);
  animation: spin .8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* -- Status ------------------------------------------------------------------ */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px;
  font-weight: 650; background: var(--surface-3); color: var(--soft); white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.bezig, .pill.voorbereiden, .pill.afronden { color: var(--cyan); background: rgba(110, 213, 230, .1); }
.pill.bezig::before, .pill.voorbereiden::before, .pill.afronden::before { animation: pulse 1.4s ease-in-out infinite; }
.pill.klaar { color: var(--lime); background: rgba(201, 242, 109, .1); }
.pill.mislukt { color: var(--red); background: rgba(255, 123, 108, .1); }
.pill.geannuleerd, .pill.onderbroken { color: var(--amber); background: rgba(243, 187, 95, .1); }
.pill.wachtrij { color: var(--soft); }
@keyframes pulse { 50% { opacity: .35; } }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--lime); transition: width .6s ease; }
.progress.running i {
  background: linear-gradient(90deg, var(--cyan), #9fe8f2); position: relative; overflow: hidden;
}
.progress.running i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  animation: sweep 1.6s ease-in-out infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* -- Analyses ------------------------------------------------------------------ */
.summary-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-chip { display: flex; align-items: baseline; gap: 7px; padding: 8px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--muted); }
.stat-chip strong { color: var(--text); font-size: 14px; }
.job-list { display: flex; flex-direction: column; gap: 12px; }
.job {
  display: grid; grid-template-columns: 208px minmax(0, 1.25fr) minmax(250px, 1fr) auto; gap: 22px; align-items: center;
  padding: 14px 18px 14px 14px; transition: border-color .2s;
}
.job.highlight { border-color: var(--lime); }
.job-thumb {
  width: 208px; aspect-ratio: 16 / 7; border-radius: 10px; overflow: hidden; background: var(--bg-2);
  display: grid; place-items: center; color: var(--faint);
}
.job-thumb img { width: 100%; height: 100%; object-fit: cover; }
.job-thumb svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.job-title { font-weight: 650; font-size: 15px; letter-spacing: -.2px; }
.job-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--soft); border: 1px solid var(--line); }
.tag.lime { color: var(--lime); border-color: rgba(201, 242, 109, .25); background: rgba(201, 242, 109, .06); }
.job-status { display: flex; flex-direction: column; gap: 8px; }
.job-status-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.job-percent { font-weight: 700; font-size: 15px; }
.job-meta { font-size: 12px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.job-meta b { color: var(--soft); font-weight: 600; }
.job-error { font-size: 12px; color: var(--red); }
.job-actions { display: flex; align-items: center; gap: 4px; }
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 64px 20px;
  border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--bg-2);
}
.empty > svg { width: 120px; height: auto; }
.empty p { color: var(--muted); max-width: 420px; }

/* -- Nieuwe analyse -------------------------------------------------------------- */
.steps { display: flex; flex-direction: column; gap: 18px; }
.step { padding: 22px; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step-number {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--surface-3); color: var(--soft);
}
.step.done .step-number { background: var(--lime); color: var(--lime-ink); }
.step-head p { color: var(--muted); font-size: 12.5px; }
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.match {
  text-align: left; padding: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2);
  transition: border-color .15s, transform .15s, box-shadow .15s; display: flex; flex-direction: column;
}
.match:hover { border-color: var(--line-2); transform: translateY(-1px); }
.match.selected { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime); }
.match-image { aspect-ratio: 16 / 9; background: var(--surface-2); position: relative; display: grid; place-items: center; color: var(--faint); }
.match-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.match-image svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.match-duration { position: absolute; right: 8px; bottom: 8px; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 6px; background: rgba(8, 14, 14, .82); }
.match-body { padding: 11px 12px 12px; }
.match-title { font-weight: 650; font-size: 13.5px; }
.match-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.login-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; margin-bottom: 14px;
  border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(120deg, rgba(201, 242, 109, .07), transparent 60%);
}
.login-cta > div { display: flex; align-items: center; gap: 12px; }
.new-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.sources { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.source {
  text-align: left; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); padding: 16px;
  display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s;
}
.source:hover:not(:disabled) { border-color: var(--line-2); }
.source.selected { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime); }
.source:disabled { opacity: .45; cursor: default; }
.source-title { display: flex; align-items: center; justify-content: space-between; font-weight: 650; }
.source-title .tag { font-weight: 600; }
.source p { font-size: 12.5px; color: var(--muted); }
.source ul { list-style: none; padding: 0; margin-top: 4px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--soft); }
.source li::before { content: "✓"; color: var(--lime); margin-right: 7px; font-weight: 700; }
.source li.no::before { content: "–"; color: var(--faint); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: none; color: var(--soft);
  font-size: 12.5px; font-weight: 550; transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.range { position: relative; height: 34px; margin: 4px 8px 6px; }
.range-track { position: absolute; left: 0; right: 0; top: 15px; height: 4px; border-radius: 99px; background: var(--surface-3); }
.range-fill { position: absolute; top: 15px; height: 4px; border-radius: 99px; background: var(--lime); }
.range input {
  position: absolute; inset: 0; width: 100%; margin: 0; appearance: none; -webkit-appearance: none; background: none; pointer-events: none;
}
.range input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: all; width: 18px; height: 18px; border-radius: 50%;
  background: var(--text); border: 3px solid var(--lime); cursor: grab; box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.range input::-moz-range-thumb {
  pointer-events: all; width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: 3px solid var(--lime); cursor: grab;
}
.range-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin: 0 8px; }
.times { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.time-box { display: flex; flex-direction: column; gap: 8px; }
.time-box label { font-size: 11.5px; font-weight: 650; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; }
.time-input {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--radius-s); border: 1px solid var(--line-2);
  background: var(--bg-2); font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; outline: none;
}
.time-input:focus { border-color: var(--lime); }
.time-input.invalid { border-color: var(--red); }
.preview { aspect-ratio: 16 / 5; border-radius: 10px; overflow: hidden; background: var(--bg-2); position: relative; display: grid; place-items: center; }
.preview.followcam { aspect-ratio: 16 / 9; }
.preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview .spinner { position: absolute; }
.preview span { font-size: 11.5px; color: var(--faint); padding: 0 12px; text-align: center; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0 0; margin-top: 16px; border-top: 1px solid var(--line); }
.toggle-row p { font-size: 12.5px; color: var(--muted); }
.switch { position: relative; width: 40px; height: 23px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--soft); transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--lime); }
.switch input:checked + span::after { transform: translateX(17px); background: var(--lime-ink); }
.switch input:disabled + span { opacity: .4; cursor: default; }
.summary { position: sticky; top: 24px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.summary-rows { display: flex; flex-direction: column; gap: 10px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.summary-row span:first-child { color: var(--muted); }
.summary-row span:last-child { font-weight: 600; text-align: right; }
.estimate { padding: 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.estimate small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.estimate strong { display: block; font-size: 28px; letter-spacing: -.8px; font-weight: 700; margin-top: 4px; }
.estimate p { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* -- Viewer -------------------------------------------------------------------- */
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; text-decoration: none; margin-bottom: 8px; }
.back:hover { color: var(--text); }
.back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.viewer-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stage-card { padding: 10px; }
.stage {
  position: relative; border-radius: 10px; overflow: hidden; background: #070c0c; user-select: none;
  -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y;
}
/* Ingezoomd: één vinger verschuift het beeld in plaats van de pagina. */
.stage.zoomed { touch-action: none; }
.stage canvas, .stage video { display: block; width: 100%; height: 100%; }
.stage video.hidden-video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.stage .overlay { position: absolute; inset: 0; pointer-events: none; }
.stage.zoomable { cursor: grab; }
.stage.dragging { cursor: grabbing; }
.stage-message {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--soft); font-size: 13px; background: rgba(7, 12, 12, .72); text-align: center; padding: 20px;
}
.stage-badges { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; pointer-events: none; }
.stage-badge { font-size: 11px; font-weight: 650; padding: 4px 8px; border-radius: 6px; background: rgba(7, 12, 12, .78); color: var(--soft); backdrop-filter: blur(4px); }
.stage-badge.lime { color: var(--lime); }
.zoom-controls { position: absolute; right: 12px; top: 12px; display: flex; gap: 4px; }
.zoom-controls .icon-button { background: rgba(7, 12, 12, .78); color: var(--soft); backdrop-filter: blur(4px); }
.controls { display: flex; align-items: center; gap: 14px; padding: 12px 6px 4px; }
.play {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center; flex-shrink: 0;
}
.play:hover { background: var(--lime-2); }
.play svg { width: 18px; height: 18px; fill: currentColor; }
.clock { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.clock strong { color: var(--text); font-size: 15px; font-weight: 650; }
.timeline { position: relative; flex: 1; height: 28px; cursor: pointer; }
.timeline-track { position: absolute; left: 0; right: 0; top: 12px; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.timeline-ready { position: absolute; left: 0; top: 0; bottom: 0; background: #2f4543; }
.timeline-played { position: absolute; left: 0; top: 0; bottom: 0; background: var(--lime); }
.timeline-thumb { position: absolute; top: 8px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px rgba(201, 242, 109, .35); }
.speed { display: flex; gap: 2px; background: var(--bg-2); border-radius: 8px; padding: 2px; }
.speed button { border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 650; padding: 5px 8px; border-radius: 6px; }
.speed button.active { background: var(--surface-3); color: var(--text); }
.layer-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
/* Laagknoppen rustiger dan de hoofdknop: aan = getint en omlijnd, uit = alleen een lijn. */
.layer-toggles .chip.active {
  background: color-mix(in srgb, var(--lime) 13%, transparent); border-color: color-mix(in srgb, var(--lime) 45%, transparent);
  color: var(--lime);
}
.layer-toggles .chip:not(.active) { color: var(--muted); }
.viewer-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.pitch-card { padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pitch-svg { width: 100%; height: auto; display: block; border-radius: 10px; }
.pitch-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.pitch-legend span { display: inline-flex; align-items: center; gap: 7px; }
.pitch-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.side-card { padding: 0; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; }
.tabs button { border: 0; background: none; padding: 14px 12px 12px; font-weight: 650; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--text); border-bottom-color: var(--lime); }
.tab-body { padding: 16px 18px 18px; max-height: 620px; overflow: auto; }
.team-block + .team-block { margin-top: 18px; }
.team-head { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--soft); margin-bottom: 8px; }
.team-head i { width: 12px; height: 12px; border-radius: 4px; }
.team-head em { margin-left: auto; font-style: normal; color: var(--faint); font-weight: 600; letter-spacing: 0; text-transform: none; }
.player-row {
  width: 100%; display: grid; grid-template-columns: 36px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 8px;
  border: 0; border-radius: 8px; background: none; text-align: left; font-size: 12.5px; transition: background .12s;
}
.player-row:hover { background: var(--surface-2); }
.player-row.selected { background: var(--surface-3); box-shadow: inset 2px 0 0 var(--lime); }
.player-row.off { opacity: .45; }
.player-id { display: grid; place-items: center; height: 24px; border-radius: 7px; font-weight: 700; font-size: 12px; color: #0b1212; }
.player-row .muted { font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.metric small { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.metric strong { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.6px; margin-top: 4px; }
.metric p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 14px; }
.selected-player { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 14px; }
.selected-player .player-id { width: 40px; height: 40px; font-size: 15px; border-radius: 10px; }

/* -- Dialoog en meldingen --------------------------------------------------------- */
.dialog { margin: auto; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); padding: 0; width: min(420px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.dialog::backdrop { background: rgba(3, 7, 7, .66); backdrop-filter: blur(3px); }
.dialog-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 4px; }
.dialog-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 20; }
.toast { max-width: 380px; padding: 12px 14px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 13px; box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .8); animation: rise .2s ease; }
.toast.error { border-color: rgba(255, 123, 108, .45); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* Heatmaps per ploeg */
.heat-card { padding: 18px; margin-top: 16px; position: relative; }
.heat-head { align-items: flex-start; }
.heat-head p { font-size: 12.5px; margin-top: 4px; max-width: 620px; }
.heat-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.heat-select { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.heat-select select { background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12.5px; }
.heat-select select:focus { outline: none; border-color: var(--lime); }
.heat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.heat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.heat-panel { margin: 0; min-width: 0; }
.heat-panel figcaption { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.heat-panel figcaption i { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.heat-panel figcaption span { margin-left: auto; font-size: 12px; white-space: nowrap; }
.heat-panel canvas { display: block; width: 100%; height: auto; border-radius: 10px; cursor: crosshair; }
.heat-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; }
.heat-scale { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.heat-scale i { width: 88px; height: 8px; border-radius: 99px; }
.heat-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 12.5px; }
.heat-table th, .heat-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.heat-table th:first-child { text-align: left; }
.heat-table thead th { font-size: 11px; font-weight: 650; letter-spacing: .3px; color: var(--muted); }
.heat-table tbody th { font-weight: 600; color: var(--soft); white-space: nowrap; }
.heat-table tbody th i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; }
.heat-tip { position: absolute; z-index: 5; pointer-events: none; max-width: 280px; padding: 8px 10px; border-radius: 9px; background: rgba(8, 14, 14, .95); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 12px; color: var(--soft); }
.heat-tip strong { color: var(--text); font-size: 14px; }
.heat-tip small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }

@media (max-width: 1200px) {
  .job { grid-template-columns: 150px minmax(0, 1fr) minmax(220px, 1fr); }
  .job-thumb { width: 150px; }
  .job-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .new-layout, .viewer-grid { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .heat-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* -- Telefoon en smalle tablet: kopbalk boven, tabbalk onder (zoals een app) ------ */
.rotate-hint, .me-veo { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; z-index: 15; height: auto; flex-direction: row; align-items: center; gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
    /* Effen, zonder backdrop-filter: dat zou de vaste tabbalk hieronder aan de kopbalk vastzetten. */
    border-right: 0; border-bottom: 1px solid var(--line); background: var(--bg-2);
  }
  .brand { padding: 0; }
  .brand-mark { width: 30px; height: 30px; line-height: 30px; font-size: 18px; border-radius: 9px; }
  .brand-name { font-size: 16px; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; flex-direction: row; gap: 4px;
    padding: 6px max(12px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: rgba(13, 22, 23, .96); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .nav a { flex: 1; flex-direction: column; justify-content: center; gap: 3px; padding: 7px 4px; font-size: 11.5px; position: relative; }
  .nav a svg { width: 22px; height: 22px; }
  .nav a.active { background: none; color: var(--text); }
  .nav-count { position: absolute; top: 3px; left: calc(50% + 7px); margin: 0; min-width: 18px; padding: 0 5px; }
  .account-area { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .account { display: none; }  /* Veo staat op de telefoon in het accountvenster */
  .me-card { width: auto; padding: 3px; border-radius: 99px; }
  .me-text, .me-more { display: none; }
  .me-avatar { width: 34px; height: 34px; }
  .me-veo { display: flex; }
  .main { padding: 20px max(16px, env(safe-area-inset-right)) calc(92px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .toasts { left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  .job { grid-template-columns: 1fr; gap: 14px; padding: 12px; }
  .job-thumb { width: 100%; }
  .job-actions { grid-column: auto; justify-content: flex-end; }
  .sources, .times { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: stretch; margin-bottom: 20px; }
  .page-head > .button { align-self: flex-start; }
  .step, .summary { padding: 16px; }
  .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .match-body { padding: 9px 10px 10px; }
  .match-title { font-size: 13px; }
  .login-cta { flex-wrap: wrap; }
  .viewer-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .layer-toggles { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .layer-toggles::-webkit-scrollbar { display: none; }
  .layer-toggles .chip { flex-shrink: 0; }
  /* De panorama is ruim vier keer zo breed als hoog: gebruik de volle breedte. */
  .stage-card { margin: 0 -16px; padding: 0; border-radius: 0; border-left: 0; border-right: 0; }
  .stage { border-radius: 0; }
  .stage-badges { left: 8px; top: 8px; }
  .stage-badge { font-size: 10px; padding: 3px 6px; }
  .stage-badge.num { display: none; }
  .zoom-controls { right: 6px; top: 6px; }
  .controls { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px 12px; }
  .speed { margin-left: auto; }
  .timeline { flex-basis: 100%; order: 5; }
  .rotate-hint { display: flex; align-items: center; gap: 8px; padding: 0 16px 12px; font-size: 12px; color: var(--muted); }
  .rotate-hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
  .viewer-grid { gap: 12px; margin-top: 12px; }
  .pitch-card, .heat-card { padding: 14px; }
  .heat-card { margin-top: 12px; }
  .tabs { padding: 0; }
  .tabs button { flex: 1; }
  .tab-body { max-height: 60vh; padding: 14px; }
  /* De staande panorama is laag: melding en knop compact en goed leesbaar over het beeld. */
  .stage-message { gap: 6px; padding: 8px 12px; font-size: 12px; background: rgba(7, 12, 12, .92); }
  .stage-message .button.small { min-height: 32px; padding: 5px 12px; }
  .heat-grid, .heat-grid.three { grid-template-columns: minmax(0, 1fr); }
  .heat-head { flex-direction: column; }
  .heat-controls { justify-content: flex-start; }
  .heat-table { display: block; overflow-x: auto; }
  .gate { min-height: 100dvh; padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
}
/* Liggende telefoon: weinig hoogte, dus de tabs gewoon in de kopbalk en geen draai-hint. */
@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .nav { position: static; flex: 1; background: none; border: 0; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav a { flex: 0 1 auto; flex-direction: row; font-size: 13px; padding: 7px 10px; }
  .nav a svg { width: 18px; height: 18px; }
  .nav-count { position: static; margin-left: 4px; }
  .main { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .rotate-hint { display: none; }
}
/* Dialogen als onderblad op de telefoon. */
@media (max-width: 600px) {
  .dialog {
    width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; overflow: auto;
    border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom);
  }
  .dialog-actions .button { flex: 1; }
}
@media (max-width: 600px) and (orientation: landscape) { .rotate-hint { display: none; } }
@media (min-width: 601px) { .rotate-hint { display: none; } }
/* Vingers in plaats van een muis: grotere tikdoelen, en 16px in velden zodat iOS niet inzoomt. */
@media (pointer: coarse) {
  .button { min-height: 44px; }
  .button.small { min-height: 38px; padding: 8px 13px; }
  .icon-button { width: 42px; height: 42px; }
  .chip { padding: 9px 14px; }
  .speed button { padding: 9px 11px; }
  .tabs button { padding: 15px 12px 13px; }
  .player-row { padding: 10px 8px; }
  .range { height: 44px; }
  .range-track, .range-fill { top: 20px; }
  .range input::-webkit-slider-thumb { width: 28px; height: 28px; }
  .range input::-moz-range-thumb { width: 22px; height: 22px; }
  .timeline { height: 40px; }
  .timeline-track { top: 18px; }
  .timeline-thumb { top: 12px; width: 17px; height: 17px; margin-left: -8.5px; }
  .field input, .time-input, .invite-link input, .heat-select select { font-size: 16px; }
  /* Inzoomen gaat met twee vingers; alleen "hele veld" blijft als knop. */
  #zoomIn, #zoomOut { display: none; }
  .match:hover, .button:active { transform: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; } }
