/* =====================================================================
   Judoclub Ypenburg — Toernooi APP
   Huisstijl: warm oranje op diep antraciet, met een bandkleuren-accent.
   Mobiel eerst: tabbalk onderin, tabellen als kaarten, pop-ups als bottom sheet.
   ===================================================================== */
:root {
  --primary: hsl(24 100% 50%);
  --primary-deep: hsl(16 92% 44%);
  --primary-soft: hsl(28 100% 95%);
  --primary-glow: hsl(24 100% 50% / .28);
  --grad: linear-gradient(135deg, hsl(30 100% 55%) 0%, hsl(20 100% 50%) 55%, hsl(12 90% 46%) 100%);
  --ink: hsl(24 14% 11%);
  --ink-soft: hsl(24 8% 40%);
  --charcoal: #1d1814;
  --night: linear-gradient(135deg, #1a1512 0%, #241c17 55%, #33211a 100%);
  --bg: hsl(32 36% 96%);
  --card: #ffffff;
  --border: hsl(28 20% 89%);
  --border-strong: hsl(28 16% 80%);
  --green: #2f9e44;
  --red: #d64545;
  --radius: 1.1rem;
  --radius-sm: .75rem;
  --shadow-sm: 0 1px 2px hsl(24 30% 10% / .06), 0 2px 8px -2px hsl(24 30% 10% / .06);
  --shadow-md: 0 10px 30px -12px hsl(24 40% 15% / .22), 0 2px 6px -2px hsl(24 30% 10% / .06);
  --shadow-lg: 0 28px 60px -20px hsl(24 50% 12% / .40);
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  --nav-h: 0px;             /* hoogte van de mobiele tabbalk */
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink); min-height: 100vh;
  background:
    radial-gradient(900px 420px at 110% -5%, hsl(28 100% 88% / .55), transparent 60%),
    radial-gradient(700px 380px at -10% 30%, hsl(40 100% 90% / .35), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
[x-cloak] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em; }
a { color: var(--primary-deep); }
::selection { background: hsl(24 100% 50% / .22); }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--night); color: #fff; box-shadow: 0 8px 30px -12px hsl(20 60% 8% / .6); }
.topbar::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(500px 140px at 85% 0%, hsl(24 100% 50% / .22), transparent 70%); }
.topbar-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: .7rem 1.1rem;
  display: flex; align-items: center; gap: .8rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; min-width: 0; }
.brand img { height: 40px; width: auto; display: block; border-radius: 8px; box-shadow: 0 0 0 1px hsl(0 0% 100% / .12); }
.brand .sub { font-family: var(--font-display); line-height: 1.05; min-width: 0; }
.brand-title { font-size: 1.08rem; font-weight: 700; }
.brand .sub small { display: block; font-family: var(--font-body); font-weight: 500; color: hsl(30 100% 75%);
  font-size: .74rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.topbar .spacer { flex: 1; }
.belt-stripe { height: 4px; background: linear-gradient(90deg,
  #f4f1ea 0 14.28%, #ffd23f 14.28% 28.57%, #f5871f 28.57% 42.85%, #3fa34d 42.85% 57.14%,
  #2e6fdb 57.14% 71.42%, #7a4b27 71.42% 85.71%, #111 85.71% 100%); opacity: .95; }

/* tabs (desktop) */
.tabs { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 1.1rem .7rem; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { appearance: none; border: 1px solid transparent; background: transparent; cursor: pointer; color: hsl(0 0% 100% / .74);
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; padding: .5rem .95rem; border-radius: 999px;
  white-space: nowrap; transition: background .18s, color .18s, border-color .18s; }
.tab:hover { background: hsl(0 0% 100% / .08); color: #fff; }
.tab.active { background: hsl(0 0% 100% / .96); color: var(--primary-deep); box-shadow: 0 6px 16px -8px hsl(24 100% 50% / .6); }

/* gebruikersmenu */
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: .5rem; border: 1px solid hsl(0 0% 100% / .16); background: hsl(0 0% 100% / .07);
  color: #fff; border-radius: 999px; padding: .25rem .7rem .25rem .25rem; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 600; }
.user-chip:hover { background: hsl(0 0% 100% / .14); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--grad); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: .8rem; letter-spacing: .02em;
  box-shadow: inset 0 0 0 2px hsl(0 0% 100% / .25); }
.avatar.lg { width: 46px; height: 46px; font-size: 1rem; }
.avatar.r-kijker { background: linear-gradient(135deg, #8a8580, #5d5751); }
.avatar.r-medewerker { background: linear-gradient(135deg, #3f8cff, #2359c9); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: #fff; color: var(--ink);
  border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); padding: .4rem; z-index: 80; }
.menu-head { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; display: grid; gap: .1rem; }
.menu-head span { font-size: .78rem; color: var(--ink-soft); }
.menu-pop button, .menu-pop a { display: block; width: 100%; text-align: left; border: none; background: none; font: inherit;
  font-size: .9rem; padding: .6rem .7rem; border-radius: 9px; color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--primary-soft); }
.icon-round { width: 38px; height: 38px; border-radius: 50%; border: 1px solid hsl(0 0% 100% / .18); background: hsl(0 0% 100% / .08);
  color: #fff; font-size: 1.1rem; cursor: pointer; flex: none; }

/* ---------- Layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 1.6rem 1.1rem 4rem; }
.section-title { font-size: 1.45rem; margin: 0 0 1rem; }
.muted { color: var(--ink-soft); }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.eyebrow { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .16em; color: var(--primary-deep); display: flex; align-items: center; gap: .5rem; }
.eyebrow::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--grad); }
.dash-title { margin: .2rem 0 0; font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; }
.t-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }

/* ---------- Knoppen ---------- */
.btn { appearance: none; cursor: pointer; font-family: var(--font-display); font-weight: 650; border-radius: 12px;
  border: 1px solid transparent; padding: .6rem 1rem; font-size: .9rem; display: inline-flex; align-items: center; gap: .45rem;
  transition: transform .12s, box-shadow .18s, background .18s, border-color .18s, filter .18s; text-decoration: none; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -10px var(--primary-glow), inset 0 1px 0 hsl(0 0% 100% / .25); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.05); box-shadow: 0 12px 26px -10px hsl(24 100% 50% / .55), inset 0 1px 0 hsl(0 0% 100% / .25); transform: translateY(-1px); }
.btn-ghost { background: hsl(0 0% 100% / .08); color: #fff; border-color: hsl(0 0% 100% / .2); }
.btn-ghost:hover { background: hsl(0 0% 100% / .16); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-deep); }
.btn-sm { padding: .42rem .72rem; font-size: .82rem; border-radius: 10px; }
.btn-big { width: 100%; justify-content: center; padding: .9rem 1rem; font-size: 1.05rem; }
.icon-btn { appearance: none; border: 1px solid transparent; background: transparent; cursor: pointer; border-radius: 9px;
  padding: .25rem .5rem; font-size: .92rem; color: var(--ink-soft); }
.icon-btn:hover { background: var(--primary-soft); border-color: var(--border); color: var(--ink); }
.icon-btn.danger:hover { background: #fdecec; border-color: #f0c0c0; color: var(--red); }
.link-btn { border: none; background: none; color: var(--primary-deep); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; padding: .2rem 0; }

/* ---------- Kaarten & statistieken ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stat { position: relative; overflow: hidden; padding: 1.1rem 1.2rem 1rem; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--grad); opacity: .85; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, hsl(28 100% 60% / .14), transparent 70%); }
.stat .n { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; line-height: 1; letter-spacing: -.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--ink-soft); font-size: .74rem; margin-top: .45rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat.clickable { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.stat.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.progress { height: 10px; background: hsl(28 60% 92%); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--grad); box-shadow: 0 0 12px hsl(24 100% 50% / .45); transition: width .4s; }
.mini-progress { height: 6px; margin-top: .7rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }
.big { font-size: 2.4rem; }

/* pills & badges */
.pill { display: inline-flex; align-items: center; gap: .25rem; padding: .18rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.pill.done { background: hsl(135 45% 92%); color: #237a35; }
.pill.busy { background: var(--primary-soft); color: var(--primary-deep); }
.pill.idle { background: hsl(28 12% 93%); color: var(--ink-soft); }
.pill.live { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -6px var(--primary-glow); }
.pill.warn { background: hsl(45 100% 90%); color: hsl(30 80% 30%); }
.pill.glass { background: hsl(0 0% 100% / .1); color: #fff; border: 1px solid hsl(0 0% 100% / .2); }
.badge { font-size: .72rem; font-weight: 700; padding: .18rem .6rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); font-family: var(--font-display); }
.prize-chip { display: inline-block; font-size: .74rem; font-weight: 700; padding: .14rem .55rem; border-radius: 999px;
  background: linear-gradient(135deg, hsl(48 100% 88%), hsl(40 100% 82%)); color: hsl(35 70% 26%); margin-right: .3rem; }

/* ---------- Dashboard: toernooikaarten ---------- */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.1rem; }
.t-card { display: flex; gap: 1rem; padding: 1.1rem; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s; }
.t-card:hover, .t-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: hsl(24 100% 50% / .45); outline: none; }
.t-date { flex: none; width: 64px; height: 70px; border-radius: 16px; background: var(--grad); color: #fff; display: flex; align-items: center;
  justify-content: center; text-align: center; font-family: var(--font-display); line-height: 1;
  box-shadow: 0 10px 20px -10px var(--primary-glow), inset 0 1px 0 hsl(0 0% 100% / .3); }
.t-date .d { display: block; font-size: 1.8rem; font-weight: 800; }
.t-date .m { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.t-date.nodate { background: var(--primary-soft); color: var(--primary-deep); box-shadow: none; }
.t-main { flex: 1; min-width: 0; }
.t-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 28px; }
.t-name { margin: .35rem 0 .15rem; font-size: 1.18rem; overflow-wrap: anywhere; }
.t-meta { margin: 0; font-size: .85rem; }
.t-nums { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .75rem; font-size: .82rem; color: var(--ink-soft); }
.t-nums strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.t-hint { margin: .7rem 0 0; font-size: .82rem; color: var(--ink-soft); font-style: italic; }
.t-actions { display: flex; gap: .2rem; }
.empty-dash { text-align: center; padding: 3.2rem 1.5rem; }
.empty-dash h3 { margin: .5rem 0 .3rem; }
.next-step { display: flex; align-items: center; gap: 1.2rem; padding: 1.3rem 1.4rem; flex-wrap: wrap;
  background: linear-gradient(135deg, #fff 0%, hsl(30 100% 97%) 100%); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
table.data th, table.data td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--border); }
table.data th { font-family: var(--font-display); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft); background: hsl(32 40% 98%); position: sticky; top: 0; font-weight: 700; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: hsl(28 100% 97%); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data.compact th, table.data.compact td { padding: .42rem .55rem; font-size: .85rem; }
.clickable-rows tbody tr { cursor: pointer; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nomail { font-size: .7rem; color: var(--ink-soft); margin-left: .35rem; opacity: .7; }
.belt { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; }
.belt .dot { width: 14px; height: 14px; border-radius: 4px; border: 1px solid hsl(24 10% 60% / .4); flex: none; }

/* ---------- Filters & formulieren ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.filters input, .filters select, .search-input {
  padding: .62rem .85rem; border: 1px solid var(--border-strong); border-radius: 12px; font: inherit; font-size: .9rem; background: #fff; color: var(--ink); }
.filters input { min-width: 240px; flex: 1 1 240px; max-width: 380px; }
.field { display: block; margin-bottom: .95rem; }
.field > span { display: block; font-size: .8rem; font-weight: 650; margin-bottom: .35rem; font-family: var(--font-display); }
.field em { font-weight: 400; font-style: normal; }
.field input[type="text"], .field input[type="date"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; padding: .7rem .8rem; font: inherit; border: 1px solid var(--border-strong); border-radius: 12px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .filters select:focus, .search-input:focus,
.typeahead input:focus, .inline-form input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px hsl(24 100% 50% / .14); }
.field textarea { resize: vertical; }
.field textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
.field code { font-size: .78rem; background: var(--primary-soft); padding: 0 .3rem; border-radius: 4px; }
.field input[type="file"] { font: inherit; font-size: .85rem; max-width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.check { display: flex; align-items: center; gap: .55rem; font-size: .9rem; margin: .2rem 0 .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-section { border: 1px solid var(--border); border-radius: 14px; padding: .2rem .95rem .3rem; margin-bottom: .95rem; background: hsl(32 40% 99%); }
.form-section summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; padding: .7rem 0; }
.seg-choice { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg-choice label { display: flex; align-items: center; gap: .4rem; padding: .55rem .85rem; border: 1px solid var(--border-strong);
  border-radius: 12px; cursor: pointer; font-size: .88rem; font-weight: 600; background: #fff; transition: all .15s; }
.seg-choice label.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-deep); box-shadow: 0 0 0 3px hsl(24 100% 50% / .12); }
.seg-choice input { position: absolute; opacity: 0; pointer-events: none; }
.small-note { font-size: .8rem; margin: 0 0 .7rem; }
.form-error { color: var(--red); font-weight: 600; margin: .4rem 0 .8rem; }
.inline-form { display: flex; gap: .5rem; margin-top: .6rem; }
.inline-form input { flex: 1; min-width: 0; padding: .55rem .75rem; border: 1px solid var(--border-strong); border-radius: 10px; font: inherit; font-size: .88rem; }
.typeahead { position: relative; }
.typeahead input { width: 100%; padding: .6rem .8rem; border: 1px solid var(--border-strong); border-radius: 12px; font: inherit; font-size: .9rem; }
.ta-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-md); overflow: hidden; }
.ta-list button { display: block; width: 100%; text-align: left; border: none; background: #fff; padding: .6rem .8rem; font: inherit; font-size: .88rem; cursor: pointer; }
.ta-list button:hover { background: var(--primary-soft); }

/* ---------- Modal (desktop) / bottom sheet (mobiel) ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: hsl(24 30% 8% / .5); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { width: 100%; max-width: 540px; padding: 1.5rem 1.5rem 1.25rem; box-shadow: var(--shadow-lg); max-height: 92vh; overflow-y: auto;
  animation: pop-in .22s cubic-bezier(.2, .9, .3, 1.2); }
.modal h2 { margin: 0 0 1rem; font-size: 1.4rem; }
.modal-wide { max-width: 940px; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.sheet-grip { width: 42px; height: 5px; border-radius: 5px; background: var(--border-strong); margin: -.4rem auto .9rem; }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.login-link input { width: 100%; margin-top: .5rem; padding: .55rem .7rem; font-size: .8rem; border: 1px solid var(--primary);
  border-radius: 10px; background: var(--primary-soft); font-family: ui-monospace, monospace; }
.account-head { display: flex; align-items: center; gap: .9rem; margin-bottom: .6rem; }

/* toast */
.toast { position: fixed; bottom: calc(1.2rem + var(--nav-h) + var(--safe-b)); left: 50%; transform: translateX(-50%); z-index: 100;
  background: var(--charcoal); color: #fff; padding: .75rem 1.15rem; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 600;
  max-width: calc(100vw - 2rem); font-size: .9rem; border: 1px solid hsl(0 0% 100% / .08); }
.toast.err { background: var(--red); }

/* ---------- Poules ---------- */
.group-block { margin-bottom: 2rem; }
.group-head { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .8rem; flex-wrap: wrap; }
.group-head h3 { font-size: 1.2rem; margin: 0; }
.poule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.poule-card { padding: 1rem 1.05rem; cursor: pointer; transition: box-shadow .18s, border-color .18s, transform .18s; }
.poule-card:hover { box-shadow: var(--shadow-md); border-color: hsl(24 100% 50% / .45); transform: translateY(-2px); }
.poule-card .top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.poule-card .wl { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.poule-card .mat { font-size: .74rem; color: var(--ink-soft); }
.poule-card ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .86rem; color: var(--ink-soft); }
.poule-note { font-size: .74rem; color: var(--ink-soft); margin: -.15rem 0 .35rem; }
.warn-text { color: hsl(30 80% 35%); font-weight: 600; }

/* indeling: slepen / tikken */
.dnd-hint { font-size: .86rem; margin: 0 0 1rem; line-height: 1.55; }
.pick-banner { position: sticky; top: 120px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--grad); color: #fff; border-radius: 14px; padding: .65rem .95rem; margin-bottom: 1rem; box-shadow: var(--shadow-md); font-size: .9rem; }
.indeling.with-side { display: grid; grid-template-columns: 1fr 260px; gap: 1.2rem; align-items: start; }
.poule-card.dnd { cursor: default; transform: none; display: flex; flex-direction: column; }
.poule-card.dnd:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border); }
.poule-card.dnd.over, .poule-card.dnd.target:hover { border-color: var(--primary); box-shadow: 0 0 0 4px hsl(24 100% 50% / .2); }
.poule-card.dnd.target { cursor: pointer; }
.poule-card.dnd.locked { background: hsl(32 30% 98.5%); }
.poule-card.dnd.odd { border-color: hsl(40 80% 72%); }
ul.members { list-style: none; padding: 0; margin: .25rem 0 .45rem; }
ul.members li { display: flex; align-items: center; gap: .45rem; padding: .4rem .4rem; margin: 0 -.4rem; border-radius: 10px; font-size: .87rem; color: var(--ink); }
ul.members li[draggable="true"] { cursor: grab; }
ul.members li[draggable="true"]:hover { background: var(--primary-soft); }
ul.members li.over { background: hsl(24 100% 50% / .14); outline: 2px dashed var(--primary); }
ul.members li.picked, .side-item.picked { background: var(--grad); color: #fff; }
ul.members li.picked .muted, .side-item.picked .muted { color: #fff; }
ul.members li.out { color: var(--ink-soft); }
ul.members li.out .nm { text-decoration: line-through; }
ul.members .nm { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.members .meta, .side-item .meta { font-size: .76rem; white-space: nowrap; }
ul.members .x { margin-left: auto; padding: .15rem .4rem; font-size: .82rem; opacity: .5; }
ul.members li:hover .x { opacity: 1; }
.grip { cursor: grab; color: var(--ink-soft); font-size: 1.05rem; padding: .1rem .2rem; user-select: none; touch-action: none; }
.picked .grip { color: #fff; }
.new-poule { border: 2px dashed var(--border-strong); border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  min-height: 96px; color: var(--ink-soft); font-size: .86rem; font-weight: 600; text-align: center; padding: 1rem; transition: all .15s; }
.new-poule.over, .new-poule.target:hover { border-color: var(--primary); color: var(--primary-deep); background: var(--primary-soft); cursor: pointer; }
.side-list { position: sticky; top: 124px; padding: 1rem; max-height: 75vh; overflow-y: auto; }
.side-list h4 { margin: 0 0 .2rem; }
.side-item { display: flex; align-items: center; gap: .5rem; padding: .5rem .55rem; border: 1px solid var(--border); border-radius: 11px;
  margin-bottom: .45rem; cursor: grab; font-size: .86rem; background: #fff; }
.side-item .nm { font-weight: 600; }
.side-item.out .nm { text-decoration: line-through; color: var(--ink-soft); }

/* ---------- Jurytafel ---------- */
.jury { display: grid; grid-template-columns: 290px 1fr; gap: 1.2rem; align-items: start; }
.poule-picker { max-height: 74vh; overflow-y: auto; padding: .5rem; position: sticky; top: 124px; }
.pp-group { font-family: var(--font-display); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft); margin: .8rem .5rem .3rem; }
.pp-item { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem .65rem; border-radius: 11px; cursor: pointer; font-size: .9rem; }
.pp-item:hover { background: var(--primary-soft); }
.pp-item.active { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -10px var(--primary-glow); }
.pp-item.active .muted { color: #fff; }
.pp-item.active .pp-dot { background: #fff; }
.pp-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--border-strong); flex: none; display: inline-block; margin-right: .35rem; }
.pp-dot.ok { background: var(--green); }
.pp-dot.part { background: var(--primary); }
.jury-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.match-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: center; padding: .6rem; border: 1px solid var(--border);
  border-radius: 14px; margin-bottom: .55rem; background: #fff; transition: border-color .15s; }
.match-row:hover { border-color: var(--border-strong); }
.match-row .who { font-weight: 600; font-size: .95rem; min-width: 0; overflow-wrap: break-word; }
.match-row .who.right { text-align: right; }
.match-row .who.win { color: var(--primary-deep); }
.match-row .who.lose { color: var(--ink-soft); }
.wbtns { display: flex; gap: .3rem; justify-content: center; }
.wbtn { appearance: none; cursor: pointer; border: 1px solid var(--border-strong); background: #fff; border-radius: 10px; padding: .45rem .6rem;
  font-size: .8rem; font-weight: 700; font-family: var(--font-display); color: var(--ink-soft); min-width: 44px; min-height: 40px; transition: all .12s; }
.wbtn:hover { border-color: var(--primary); }
.wbtn.sel { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 14px -8px var(--primary-glow); }
.wbtn.sel.draw { background: var(--ink-soft); }
/* wedstrijdtimer */
.match-timer { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: .35rem; margin-top: .1rem; }
.timer-btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border-strong); background: #fff; border-radius: 999px;
  padding: .3rem .85rem; font: inherit; font-family: var(--font-display); font-weight: 700; font-size: .9rem; cursor: pointer; color: var(--ink-soft);
  min-height: 34px; transition: all .15s; font-variant-numeric: tabular-nums; }
.timer-btn:hover { border-color: var(--primary); color: var(--primary-deep); }
.timer-btn .t-time { min-width: 2.6rem; text-align: center; }
.timer-btn.t-running { background: var(--night); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px hsl(20 60% 10% / .6); font-size: 1.05rem; }
.timer-btn.t-running.last, .timer-btn.t-running.last:hover { background: var(--red); color: #fff; animation: pulse 1s ease-in-out infinite; }
.timer-btn.t-paused { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-deep); }
.timer-btn.t-done { background: var(--red); border-color: transparent; color: #fff; animation: blink .6s step-end infinite; font-size: 1.05rem; }
.timer-reset { border: none; background: none; font-size: 1.05rem; cursor: pointer; color: var(--ink-soft); padding: .3rem .45rem; border-radius: 8px; }
.timer-reset:hover { background: var(--primary-soft); color: var(--ink); }
/* houdgreeptimer */
.hold-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; min-width: 8.4rem;
  border: 1px solid var(--border-strong); background: #fff; border-radius: 999px; padding: .3rem .85rem; min-height: 34px;
  font: inherit; font-family: var(--font-display); font-weight: 700; font-size: .88rem; color: var(--ink-soft); cursor: pointer;
  font-variant-numeric: tabular-nums; margin-left: .25rem; transition: border-color .15s, color .15s; }
.hold-btn:hover { border-color: #2e6fdb; color: #2359c9; }
.hold-btn .h-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #3f8cff, #2359c9); transition: width .25s linear; }
.hold-btn .h-label { position: relative; z-index: 1; }
.hold-btn.h-running { border-color: #2359c9; color: #fff; background: hsl(220 70% 35%); font-size: 1.02rem; }
.hold-btn.h-shown { border-color: #2359c9; background: hsl(220 90% 95%); color: #1d4aa8; font-size: 1.02rem; }
.hold-btn.h-shown .h-fill { opacity: .18; }
.hold-btn.h-max { border-color: transparent; background: var(--red); color: #fff; font-size: 1.02rem; animation: blink .6s step-end infinite; }
.hold-btn.h-max .h-fill { display: none; }
@media (hover: none) and (pointer: coarse) { .hold-btn { min-height: 44px; padding: .45rem 1.1rem; font-size: .98rem; } }

.match-row.timing { border-color: var(--charcoal); box-shadow: 0 0 0 2px hsl(20 30% 12% / .12); }
.match-row.time-up { border-color: var(--red); box-shadow: 0 0 0 3px hsl(0 70% 50% / .18); }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes blink { 50% { opacity: .45; } }
@media (hover: none) and (pointer: coarse) { .timer-btn { min-height: 44px; padding: .45rem 1.1rem; font-size: 1rem; } }
/* smal scherm: namen naast elkaar bovenaan, knoppen en timer eronder */
@media (max-width: 560px) {
  .match-row { grid-template-columns: 1fr 1fr; grid-template-areas: "a b" "btn btn" "tmr tmr"; row-gap: .45rem; }
  .match-row > .who:first-child { grid-area: a; }
  .match-row > .who.right { grid-area: b; }
  .match-row > .wbtns { grid-area: btn; }
  .match-row > .match-timer { grid-area: tmr; }
  .match-row .who { overflow-wrap: break-word; }
}

.standings td.rank { font-family: var(--font-display); font-weight: 800; color: var(--primary-deep); width: 44px; }
.standings tr.r1 { background: hsl(46 100% 94%); }

/* uitslagen */
.podium-card { padding: 1.05rem; }
.podium-card h4 { margin: 0 0 .2rem; font-size: 1rem; }
.podium { list-style: none; margin: .6rem 0 0; padding: 0; }
.podium li { display: flex; align-items: center; gap: .6rem; padding: .42rem .1rem; border-bottom: 1px dashed var(--border); }
.podium li:last-child { border-bottom: none; }
.podium .pos { width: 28px; font-family: var(--font-display); font-weight: 800; }
.podium .pn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .pn > span:first-child { display: block; overflow: hidden; text-overflow: ellipsis; }
.star-line { display: flex; align-items: center; gap: .4rem; margin-top: .12rem; font-size: .72rem; }
.star-total { color: var(--primary-deep); white-space: nowrap; }
.star-total b { font-family: var(--font-display); }
.prize-tag { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink-soft); font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.prize-tag::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--pc); flex: none;
  box-shadow: inset 0 0 0 1px hsl(0 0% 0% / .15); }
.podium li.out .pn { text-decoration: line-through; color: var(--ink-soft); }
.podium .wl-small { font-size: .74rem; white-space: nowrap; }
.podium .pts { min-width: 3.4rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: .85rem; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); background: #fff; padding: 2.5rem 1.5rem; text-align: center; }
.dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- CRM / judoka-detail ---------- */
.jd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.jd-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.4rem; margin-top: 1rem; }
.jd-total { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: linear-gradient(135deg, hsl(30 100% 96%), hsl(24 100% 92%)); border-radius: 14px; padding: .9rem 1.05rem; }
.jd-total .n { font-family: var(--font-display); font-weight: 800; font-size: 2.3rem; color: var(--primary-deep); line-height: 1; }
.jd-total .l { margin-left: .4rem; font-weight: 600; color: var(--primary-deep); }
.jd-h { margin: 1.15rem 0 .5rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.ladder { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.ladder li { display: flex; align-items: center; gap: .7rem; padding: .42rem .75rem; font-size: .88rem; border-bottom: 1px solid var(--border); color: var(--ink-soft); }
.ladder li:last-child { border-bottom: none; }
.ladder li.earned { background: hsl(46 100% 95%); color: var(--ink); font-weight: 600; }
.ladder .lt { width: 3.2rem; text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-display); font-weight: 700; }
.ladder .handed { margin-left: auto; font-size: .76rem; font-weight: 500; color: var(--ink-soft); display: flex; align-items: center; gap: .3rem; cursor: pointer; }
.email-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .5rem 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: 0; font-size: .9rem; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; }

/* inschrijvingen / punten */
.reg-link-card { padding: 1.1rem 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center;
  background: linear-gradient(135deg, #fff 0%, hsl(30 100% 97%) 100%); }
.reg-url { display: inline-block; margin-top: .35rem; font-family: ui-monospace, monospace; font-size: .86rem; color: var(--primary-deep); word-break: break-all; }
.reg-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.info-card, .warn-card { padding: .85rem 1.05rem; font-size: .88rem; line-height: 1.55; margin-top: .6rem; }
.warn-card { background: hsl(46 100% 95%); border-color: hsl(40 80% 76%); }
.pts-input { width: 5.2rem; padding: .38rem .5rem; border: 1px solid var(--border-strong); border-radius: 9px; font: inherit; font-size: .88rem; text-align: right; }
.pts-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px hsl(24 100% 50% / .15); }
.add-judoka { margin-top: 1rem; max-width: 440px; }
.add-judoka label { display: block; margin-bottom: .3rem; }

/* gebruikers */
.role-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .9rem 0 1.2rem; font-size: .84rem; color: var(--ink-soft); }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; }
.user-card { padding: 1.1rem; display: flex; flex-direction: column; gap: .75rem; }
.user-card.inactive { opacity: .6; }
.uc-top { display: flex; align-items: center; gap: .8rem; }
.uc-top h3 { margin: 0; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-mail { margin: .1rem 0 0; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .8rem; }
.uc-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: auto; }

/* matten */
.mat-chip { display: inline-block; font-size: .7rem; font-weight: 800; padding: .1rem .45rem; border-radius: 6px; margin-left: .25rem;
  background: var(--charcoal); color: #fff; letter-spacing: .02em; vertical-align: 1px; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; margin: -.4rem 0 1.4rem; }
.mat-card { display: flex; align-items: center; gap: .85rem; padding: .8rem .95rem; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.mat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mat-no { width: 48px; height: 48px; border-radius: 14px; background: var(--night); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); line-height: 1; flex: none; text-align: center; }
.mat-no small { display: block; font-size: .55rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; margin-bottom: -.35rem; }
.mat-no span { font-size: 1.35rem; font-weight: 800; }
.mat-line { display: flex; justify-content: space-between; gap: .5rem; font-size: .88rem; }
.mat-filter { display: flex; gap: .35rem; flex-wrap: wrap; }
.mat-filter button { border: 1px solid var(--border-strong); background: #fff; border-radius: 999px; padding: .42rem .85rem; font: inherit;
  font-size: .84rem; font-weight: 650; cursor: pointer; color: var(--ink); }
.mat-filter button.on { background: var(--night); border-color: transparent; color: #fff; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: #fff; }
.stepper button { width: 44px; height: 44px; border: none; background: none; font-size: 1.2rem; cursor: pointer; color: var(--primary-deep); }
.stepper button:hover { background: var(--primary-soft); }
.stepper strong { min-width: 2.4rem; text-align: center; font-family: var(--font-display); font-size: 1.2rem; }
.setup-title { font-family: var(--font-display); font-weight: 700; padding: .7rem 0 .5rem; }

/* medewerker: vaste mat + toewijzing */
.my-mat { display: inline-flex; align-items: center; gap: .6rem; background: var(--night); color: #fff; border-radius: 14px;
  padding: .45rem .5rem .45rem .9rem; font-size: .85rem; box-shadow: var(--shadow-md); }
.my-mat strong { background: var(--grad); border-radius: 10px; padding: .3rem .7rem; font-family: var(--font-display); font-size: 1.05rem; }
.uc-mats { border-top: 1px dashed var(--border); padding-top: .6rem; display: grid; gap: .35rem; }
.uc-mats-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 700; }
.uc-mat-row { display: flex; align-items: center; gap: .6rem; font-size: .85rem; }
.uc-mat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-mat-row select { flex: none; max-width: 8.5rem; font: inherit; font-size: .84rem; padding: .35rem .5rem; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; }
.user-card, .uc-mats, .uc-mat-row { min-width: 0; }
.uc-mat-name { display: flex; flex-direction: column; line-height: 1.25; }
.uc-mat-name > span { overflow: hidden; text-overflow: ellipsis; }

/* grid-items mogen smaller worden dan hun inhoud (lange namen breken anders de mobiele layout) */
.poule-grid > *, .t-grid > *, .user-grid > *, .indeling > *, .grid-stats > *, .jury > *, .jury-body > *, .jd-grid > * { min-width: 0; }
.wrap { overflow-x: clip; }

/* ---------- Mobiele navigatie ---------- */
@media (min-width: 761px) { .only-mobile { display: none !important; } }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: hsl(0 0% 100% / .92); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); padding-bottom: var(--safe-b); box-shadow: 0 -8px 30px -18px hsl(24 40% 15% / .4); }
.bn-row { display: flex; }
.bn-row button { flex: 1; min-width: 0; border: none; background: none; font: inherit; font-size: .68rem; font-weight: 600; color: var(--ink-soft);
  padding: .5rem .2rem .45rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; cursor: pointer; position: relative; }
.bn-row button span { font-size: 1.25rem; line-height: 1; filter: grayscale(.4); transition: transform .15s; }
.bn-row button em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bn-row button.active { color: var(--primary-deep); }
.bn-row button.active span { filter: none; transform: translateY(-1px) scale(1.08); }
.bn-row button.active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }
.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: hsl(24 30% 8% / .4); display: flex; align-items: flex-end; }
.more-sheet { width: 100%; background: #fff; border-radius: 20px 20px 0 0; padding: .8rem .8rem calc(4.6rem + var(--safe-b)); animation: sheet-up .25s ease-out;
  display: grid; gap: .3rem; }
.more-sheet button { display: flex; align-items: center; gap: .7rem; border: none; background: none; font: inherit; font-size: 1rem; font-weight: 600;
  padding: .85rem .9rem; border-radius: 12px; text-align: left; color: var(--ink); cursor: pointer; }
.more-sheet button.active, .more-sheet button:active { background: var(--primary-soft); color: var(--primary-deep); }
.fab { position: fixed; right: 1.1rem; bottom: calc(4.6rem + var(--safe-b)); z-index: 65; width: 56px; height: 56px; border-radius: 18px; border: none;
  background: var(--grad); color: #fff; font-size: 1.7rem; font-weight: 300; box-shadow: 0 14px 30px -10px hsl(24 100% 45% / .7); cursor: pointer; }
.fab:active { transform: scale(.95); }

/* grote tikvlakken op touchapparaten */
@media (hover: none) and (pointer: coarse) {
  .wbtn { min-width: 54px; min-height: 46px; font-size: .95rem; }
  .pp-item { padding: .75rem .7rem; }
  .btn { min-height: 42px; }
  .btn-sm { min-height: 38px; }
  ul.members li { padding: .55rem .45rem; }
  .grip { font-size: 1.3rem; padding: .2rem .35rem; }
  .icon-btn { min-width: 36px; min-height: 36px; }
  input, select, textarea { font-size: 16px !important; } /* voorkomt inzoomen op iOS */
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1000px) {
  .jury { grid-template-columns: 1fr; }
  .poule-picker { position: static; max-height: 38vh; }
  .jury-body { grid-template-columns: 1fr; }
  .indeling.with-side { grid-template-columns: 1fr; }
  .side-list { position: static; max-height: none; }
}

@media (max-width: 760px) {
  :root { --nav-h: 60px; --radius: 1rem; }
  .hide-mobile { display: none !important; }
  body { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
  .topbar-inner { padding: .55rem .8rem; gap: .55rem; }
  .brand img { height: 34px; }
  .brand-title { font-size: .98rem; }
  .brand .sub small { max-width: 52vw; }
  .user-chip { padding: .2rem; border: none; background: none; }
  .wrap { padding: 1.1rem .85rem 5.5rem; }
  .section-title { font-size: 1.22rem; }
  .dash-title { font-size: 1.75rem; }
  .grid-stats { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .stat { padding: .9rem .95rem .85rem; }
  .stat .n { font-size: 1.7rem; }
  .t-grid, .user-grid { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .t-card { padding: .95rem; }
  .poule-grid { grid-template-columns: minmax(0, 1fr); }
  .field-row, .field-row.three { grid-template-columns: 1fr; gap: 0; }
  .jd-grid { grid-template-columns: 1fr; }
  .filters input { min-width: 0; max-width: none; flex-basis: 100%; }
  .filters select { flex: 1 1 45%; }
  .reg-link-card, .next-step { padding: 1rem; }
  .reg-actions .btn { flex: 1 1 auto; justify-content: center; }
  .pick-banner { top: 64px; }

  /* pop-ups als bottom sheet */
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal, .modal-wide { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; padding: 1.1rem 1.05rem calc(1.2rem + var(--safe-b));
    animation: sheet-up .28s cubic-bezier(.2, .9, .3, 1); border-bottom: none; }
  .modal-actions { position: sticky; bottom: calc(-1.2rem - var(--safe-b)); background: #fff; margin: .8rem -1.05rem calc(-1.2rem - var(--safe-b));
    padding: .8rem 1.05rem calc(.9rem + var(--safe-b)); border-top: 1px solid var(--border); z-index: 2; }
  .modal-actions .btn { flex: 1 1 auto; justify-content: center; }

  /* tabellen als kaarten */
  table.data.stack thead { display: none; }
  table.data.stack, table.data.stack tbody { display: block; }
  table.data.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .9rem; padding: .8rem .9rem; border-bottom: 1px solid var(--border); }
  table.data.stack td { display: flex; flex-direction: column; padding: .15rem 0; border: none; text-align: left; min-width: 0; font-size: .88rem; }
  table.data.stack td::before { content: attr(data-label); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-soft); font-weight: 700; font-family: var(--font-display); }
  table.data.stack td[data-label=""]::before { display: none; }
  table.data.stack td[data-title] { grid-column: 1 / -1; font-size: 1rem; font-weight: 700; flex-direction: row; flex-wrap: wrap; gap: .3rem; align-items: center; }
  table.data.stack td[data-title]::before { display: none; }
  table.data.stack td.num { text-align: left; }
  .table-wrap:has(table.stack) { overflow: visible; }
}

@media (max-width: 380px) {
  .stat .n { font-size: 1.45rem; }
  .match-row { gap: .3rem; padding: .5rem .45rem; }
  .wbtn { min-width: 44px; }
}
