/* ============================================================
   /admin and /mod dashboards.
   Loaded AFTER style.css, so the topbar, wedge nav, hero banner,
   buttons, bands, leaderboard rows, tournament/wheel and footer all
   come from there. This file only holds what is unique to the
   dashboards: login form, tab bar, form controls, alerts, clip and
   command editors.
   ============================================================ */

/* ---------- login ---------- */
.admin-box{ position:relative; overflow:hidden; }
.login-role{
  display:inline-block; margin-bottom:14px; padding:6px 14px; border-radius:20px;
  background: var(--blue-soft); color: var(--blue-text);
  font-size:.78rem; font-weight:800; text-transform:uppercase; letter-spacing:.6px;
}
.login-role:empty{ display:none; }
.admin-login-form{ display:flex; gap:10px; flex-wrap:wrap; margin-top:18px; }
.admin-error{ margin-top:12px; color: var(--live); font-size:.85rem; font-weight:600; }
.admin-error[hidden]{ display:none; }

/* ---------- form controls ---------- */
.admin-input{
  flex:1; min-width:180px; padding:14px 16px;
  background: var(--bg); border:1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font-family:'Inter', sans-serif; font-size:.9rem;
  transition: border-color .15s ease;
}
.admin-input::placeholder{ color: var(--text-faint); }
.admin-input:focus{ outline:none; border-color: var(--blue); }
.admin-select{
  appearance:none; padding-right:36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size:5px 5px, 5px 5px; background-repeat:no-repeat;
}
input[type="file"].admin-input{ padding:10px 12px; cursor:pointer; }
.admin-btn-row{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:20px; }
/* All panel buttons share one look: blue (same as "Zoeken"). Overrides the
   dark .btn-ghost from style.css; this file is only loaded on /admin and /mod. */
.btn.btn-ghost, .btn.btn-ghost.admin-danger{ background: var(--blue); color:#fff; border-color: var(--blue); }
.btn.btn-ghost:hover, .btn.btn-ghost.admin-danger:hover{ background: var(--blue-dark); border-color: var(--blue-dark); color:#fff; }
.admin-add-form{
  display:flex; gap:10px; flex-wrap:wrap; margin-bottom:22px; padding-bottom:22px;
  border-bottom:1px solid var(--line);
}
.admin-draw-section{ margin-bottom:22px; padding-bottom:22px; border-bottom:1px solid var(--line); cursor:pointer; }
.admin-player-row{ justify-content:space-between; }
.admin-remove-btn{
  background:transparent; border:1px solid var(--line); color: var(--text-dim);
  width:28px; height:28px; border-radius:50%; cursor:pointer; flex-shrink:0;
  font-size:.8rem; line-height:1; transition: border-color .15s ease, color .15s ease;
}
.admin-remove-btn:hover{ border-color: var(--live); color: var(--live); }

/* ---------- tab bar ----------
   Row 1: the main subjects (Overzicht/Alerts/Chat/... or Wheel/Commands) as pills + Uitloggen.
   Row 2: whichever sub-tab group belongs to the active main tab. */
.admin-tabbar{
  display:flex; align-items:center; flex-wrap:wrap; gap:14px 12px;
  padding:20px 30px; border-bottom:1px solid var(--line);
}
.nav-tabs{ order:1; flex:1 1 auto; display:flex; flex-wrap:wrap; gap:8px; }
.nav-tabs[hidden]{ display:none; }
.admin-tabbar #logoutBtn{ order:2; margin-left:auto; }
.admin-subtabs{ order:3; flex:1 1 100%; margin-bottom:0; gap:6px; }
.admin-subtabs[hidden]{ display:none; }
.nav-tab{
  padding:9px 18px; border-radius:20px; border:1px solid var(--line);
  background: var(--bg); color: var(--text-dim);
  font-family:'Inter', sans-serif; font-size:.85rem; font-weight:700; cursor:pointer; white-space:nowrap;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.nav-tab:hover{ border-color: var(--blue); color: var(--blue-text); }
.nav-tab.is-active{ background: var(--blue); border-color: var(--blue); color:#fff; }
.nav-tab:focus-visible{ outline:2px solid var(--blue-text); outline-offset:2px; }
.admin-subtabs .leaderboard-tab{ padding:7px 14px; font-size:.78rem; }
.admin-panel-inner{ padding-top:26px; }
.admin-tab-panel[hidden], .admin-subpanel[hidden]{ display:none; }

/* ---------- overview ---------- */
.admin-stats-grid{ margin-top:0; margin-bottom:26px; }
#statsChatters, #statsClips, #statsActivity{ margin-bottom:26px; }

/* ---------- alerts ---------- */
.overlay-url-box{
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap;
  background: var(--bg); border:1px solid var(--line); border-radius: var(--radius-md);
  padding:18px 20px; margin-bottom:22px;
}
.overlay-url-code{
  display:inline-block; margin-top:10px; padding:6px 10px;
  background: var(--bg-alt); border:1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--blue-text); font-size:.84rem; word-break:break-all;
}
.alert-events-list{ display:grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap:14px; margin-bottom:28px; }
.alert-event-card{
  background: var(--bg); border:1px solid var(--line); border-radius: var(--radius-md);
  padding:18px; display:flex; flex-direction:column; gap:8px;
}
.alert-event-head{ display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.alert-event-icon{ font-size:1.2rem; flex-shrink:0; }
.alert-event-title{
  font-family:'Anton', sans-serif; font-weight:400; text-transform:uppercase;
  letter-spacing:.3px; font-size:1rem; flex:1;
}
.alert-toggle{ position:relative; width:40px; height:22px; flex-shrink:0; cursor:pointer; }
.alert-toggle input{ position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer; }
.alert-toggle-slider{ position:absolute; inset:0; background: var(--line); border-radius:999px; transition: background .15s ease; }
.alert-toggle-slider::before{
  content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%;
  background:#fff; transition: transform .15s ease;
}
.alert-toggle input:checked + .alert-toggle-slider{ background: var(--blue); }
.alert-toggle input:checked + .alert-toggle-slider::before{ transform: translateX(18px); }
.alert-toggle input:focus-visible + .alert-toggle-slider{ outline:2px solid var(--blue-text); outline-offset:2px; }
.alert-field-label{
  font-size:.72rem; font-weight:700; color: var(--text-faint);
  text-transform:uppercase; letter-spacing:.5px; margin-top:4px;
}
.alert-field-row{ display:flex; align-items:center; gap:8px; }
.alert-field-row .admin-input{ flex:1; min-width:0; }
.alert-field-label{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.alert-field-label-val{ font-size:.8rem; font-weight:700; color: var(--text-dim); text-transform:none; letter-spacing:normal; }
.admin-range{ width:100%; display:block; accent-color: var(--blue); margin:2px 0 4px; }
.alert-event-actions{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }

/* tiered events (cheer / giftsub) - one wide card holding several
   independent per-amount-bracket sub-cards */
.alert-event-card-tiered{ grid-column: 1 / -1; }
.alert-tier-hint{ font-size:.8rem; color: var(--text-dim); margin:0 0 4px; }
.alert-tier-list{ display:grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap:12px; }
.alert-tier-card, .alert-reward-card{
  background: var(--bg-alt); border:1px solid var(--line); border-radius: var(--radius-sm);
  padding:14px; display:flex; flex-direction:column; gap:8px;
}
.alert-tier-head{ display:flex; align-items:center; gap:10px; }
.alert-tier-head .admin-input{ flex:1; min-width:0; }

/* channel redeem: default alert + a grid of per-reward alerts */
.alert-event-card-wide{ grid-column: 1 / -1; }
.alert-redeem-default{ display:flex; flex-direction:column; gap:8px; max-width:460px; }
.alert-rewards{
  display:flex; flex-direction:column; gap:8px;
  margin-top:14px; padding-top:16px; border-top:1px solid var(--line);
}
.alert-rewards-create{
  display:flex; flex-direction:column; gap:8px;
  padding:12px; border:1px solid var(--line); border-radius:12px;
  background: rgba(255,255,255,.03);
}
.alert-rewards-subhead{ font-weight:700; font-size:.95rem; }
.ar-create-input-label{ display:flex; align-items:center; gap:6px; font-size:.85rem; white-space:nowrap; }
.alert-rewards-link{ margin-top:4px; }
.alert-rewards-link summary{ cursor:pointer; font-size:.85rem; opacity:.8; padding:4px 0; }
.alert-rewards-head{
  font-family:'Anton', sans-serif; font-weight:400; text-transform:uppercase;
  letter-spacing:.3px; font-size:.95rem; color: var(--card-accent, var(--text));
}
/* dropdown + add button: full width, side by side (the dropdown takes all
   remaining space, the button keeps its natural width). The manual-name
   input, when shown, wraps onto its own full-width row underneath. */
.alert-rewards-add{ max-width:none; width:100%; flex-direction:row; flex-wrap:wrap; align-items:stretch; }
.alert-rewards-add .ar-new-select{ flex:1 1 0; min-width:0; width:auto; max-width:none; box-sizing:border-box; }
.alert-rewards-add .ar-new-name{ flex:1 1 100%; order:3; width:100%; max-width:none; box-sizing:border-box; }
.alert-rewards-add .ar-add{ flex:0 0 auto; width:auto; white-space:nowrap; }
.alert-tier-range{
  font-family:'Anton', sans-serif; font-weight:400; text-transform:uppercase;
  letter-spacing:.3px; font-size:.86rem; flex:1; color: var(--card-accent, var(--text));
}
.alert-log-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.alert-log{
  display:flex; flex-direction:column; border:1px solid var(--line);
  border-radius: var(--radius-md); overflow:hidden; overflow-y:auto; max-height:320px;
}
.alert-log-row{ display:flex; align-items:center; gap:10px; padding:11px 16px; border-bottom:1px solid var(--line); font-size:.86rem; }
.alert-log-row:last-child{ border-bottom:none; }
.alert-log-icon{ flex-shrink:0; }
.alert-log-text{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.alert-log-time{ flex-shrink:0; color: var(--text-faint); font-size:.78rem; }

/* ---------- clip + sound library ---------- */
.clip-lib-card{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background: var(--bg); border:1px solid var(--line); border-radius: var(--radius-md); padding:12px 14px;
}
.clip-lib-info{ min-width:0; display:flex; flex-direction:column; gap:2px; }
.clip-lib-label{ font-weight:700; font-size:.9rem; }
.clip-lib-url{
  display:block; max-width:220px; font-size:.76rem; color: var(--text-dim); text-decoration:none;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.clip-lib-url:hover{ color: var(--blue-text); }

/* ---------- chat commands (editable cards on /admin, read-only overview on /mod) ---------- */
#adminSection .cmd-list{ grid-template-columns: minmax(0, 1fr); }  /* minmax(0,…) lets cards shrink instead of overflowing */
#adminSection .cmd-card{ display:flex; flex-direction:column; gap:10px; padding:14px 16px; }
.cmd-card-top{ display:flex; align-items:center; gap:10px; }
.cmd-toggle{ flex-shrink:0; }
#adminSection .cmd-trigger{
  flex:1; min-width:0; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight:700; font-size:.92rem;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.cmd-card-bottom{ display:flex; align-items:center; gap:8px; }
.cmd-target-row{ display:flex; align-items:center; gap:8px; margin-top:10px; cursor:pointer; }
.cmd-response{ flex:1; min-width:0; }
.cmd-save, .cmd-reset-count{ flex-shrink:0; }

.placeholder-chips{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:8px; }
.placeholder-chips-label{
  font-size:.72rem; font-weight:700; color: var(--text-faint);
  text-transform:uppercase; letter-spacing:.5px; margin-right:4px;
}
.placeholder-chip{
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size:.76rem; font-weight:600;
  color: var(--blue-text); background: var(--bg); border:1px solid var(--line);
  border-radius:999px; padding:4px 11px; cursor:pointer;
  transition: border-color .15s ease, color .15s ease;
}
.placeholder-chip:hover{ border-color: var(--blue); color: var(--text); }
.placeholder-chip:focus-visible{ outline:2px solid var(--blue-text); outline-offset:1px; }

/* add-command block: form + its codes, closed off by one divider so the chips
   clearly belong to the "Reactie" field and not to the first command below */
.cmd-add{ margin-bottom:22px; padding-bottom:22px; border-bottom:1px solid var(--line); }
.cmd-add .admin-add-form{ margin:0; padding:0; border:none; }
.cmd-add .placeholder-chips{ margin-top:12px; }
/* chips on a command card only show while that card is being edited (keeps a long list calm) */
.cmd-card .placeholder-chips{ margin-top:0; display:none; }
.cmd-card:focus-within .placeholder-chips{ display:flex; }
.cmd-card .placeholder-chip{ background: var(--bg-alt); }

@media (max-width: 700px){
  .admin-tabbar{ padding:18px 20px; }
  .admin-login-form, .admin-add-form{ flex-direction:column; }
  .admin-btn-row{ flex-direction:column; }
  .admin-btn-row .btn, .admin-login-form .btn, .admin-add-form .btn{ width:100%; }
  .alert-events-list{ grid-template-columns:1fr; }
  .overlay-url-box{ flex-direction:column; align-items:stretch; }
  .admin-tabbar #logoutBtn{ order:4; flex:1 1 100%; margin-left:0; }
}

/* ============================================================
   Login screens on phones (/mod, /mod?role=head-mod, /admin, /dev).
   Compact top bar and banner so the password field sits above the
   fold, 16px inputs (stops iOS zooming in on focus), and 48px+
   touch targets. Scoped to the login screen only.
   ============================================================ */
@media (max-width: 700px){
  .topbar{
    padding: 12px max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
  .topbar-right{ gap:12px; }

  .hero-page:has(+ #loginSection){ min-height: 0; }
  .hero-page:has(+ #loginSection) .hero-content{ padding: 30px 6vw 32px; }
  .hero-page:has(+ #loginSection) .hero-kicker{ margin-bottom:8px; font-size:.72rem; }
  .hero-page:has(+ #loginSection) h1{ font-size: clamp(2rem, 10vw, 2.6rem); overflow-wrap:anywhere; }

  .hero-page + #loginSection{ padding-top:24px; padding-bottom: max(40px, env(safe-area-inset-bottom)); }
  #loginSection .panel-inner{ padding: 22px 18px 24px; }
  #loginSection .panel-inner > p:not(.admin-error){
    font-size:.95rem; line-height:1.5; color: var(--text-dim);
  }
  #loginSection .admin-login-form{ gap:12px; margin-top:16px; }
  #loginSection .admin-input{
    min-width:0; width:100%; flex:none; min-height:50px; font-size:16px;
  }
  #loginSection .admin-login-form .btn{ min-height:50px; font-size:1rem; }
}
@media (max-width: 360px){
  #loginSection .panel-inner{ padding: 18px 14px 20px; }
  .topbar-right{ gap:8px; }
}
/* the wedge nav list must fit short phone screens (dynamic viewport aware) */
@supports (height: 100dvh){
  @media (max-width: 760px){
    .nav-links{ max-height: calc(100dvh - 130px); }
  }
}

/* ============================================================
   Dashboard (Alerts tab and its Clips / Geluiden sub-tabs) on phones.
   The event grid used minmax(300px, 1fr), which is wider than the
   usable width of a phone, so cards ran off the right edge and were
   clipped. On phones everything is a single shrinkable column with
   tighter padding, 16px inputs and full-width actions.
   ============================================================ */
@media (max-width: 700px){
  #adminSection.section{ padding-left:4vw; padding-right:4vw; }
  #adminSection .admin-panel-inner{ padding: 18px 14px 26px; }

  /* tab bar: one swipeable row per group instead of 4 wrapped rows */
  .admin-tabbar{ gap:10px; padding:14px 14px; }
  .nav-tabs, .admin-subtabs{
    flex:1 1 100%; flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch;
    scrollbar-width:none; scroll-snap-type:x proximity;
    margin:0 -14px; padding:2px 14px; scroll-padding:0 14px;
  }
  .nav-tabs::-webkit-scrollbar, .admin-subtabs::-webkit-scrollbar{ display:none; }
  .nav-tab, .admin-subtabs .leaderboard-tab{ flex:0 0 auto; white-space:nowrap; scroll-snap-align:start; }
  .nav-tab{ min-height:40px; }
  .admin-subtabs .leaderboard-tab{ min-height:36px; }
  .admin-tabbar #logoutBtn{ min-height:44px; }

  /* OBS URL box */
  .overlay-url-box{ padding:14px; gap:12px; }
  .overlay-url-box .btn{ width:100%; min-height:44px; }

  /* single shrinkable column (minmax(0,1fr) is what stops the overflow) */
  .alert-events-list{ grid-template-columns: minmax(0, 1fr); gap:12px; }
  .alert-tier-list{ grid-template-columns: minmax(0, 1fr); }
  .alert-event-card, .alert-tier-card, .alert-reward-card{ min-width:0; padding:14px; }
  .alert-event-card *, .alert-tier-card *, .alert-reward-card *{ min-width:0; }
  .alert-event-title{ overflow-wrap:anywhere; }
  .alert-field-label{ line-height:1.35; overflow-wrap:anywhere; align-items:flex-start; }
  .alert-field-label-val{ flex:none; white-space:nowrap; }

  /* inputs: 16px stops iOS zoom, taller for thumbs */
  .alert-event-card .admin-input, .alert-tier-card .admin-input, .alert-reward-card .admin-input,
  #subtab-clips .admin-input, #subtab-sounds .admin-input{
    font-size:16px; min-height:46px; width:100%;
  }
  .alert-tier-head .admin-input, .alert-field-row .admin-input{ width:auto; }
  .admin-range{ height:30px; }

  /* sound URL + "Test" button: stack so the URL gets the full width */
  .alert-field-row{ flex-wrap:wrap; }
  .alert-field-row .admin-input{ flex:1 1 100%; }
  .alert-field-row .btn{ flex:1 1 100%; min-height:44px; }
  .alert-rewards-add .ar-new-select{ flex:1 1 100%; }
  .alert-rewards-add .ar-add{ flex:1 1 100%; min-height:46px; }

  /* card actions: full-width, easy to hit */
  .alert-event-actions{ flex-direction:column; }
  .alert-event-actions .btn{ width:100%; min-height:44px; }

  /* activity log */
  .alert-log-head{ flex-wrap:wrap; }
  .alert-log-row{ padding:10px 12px; gap:8px; }
  .alert-log-text{ white-space:normal; overflow-wrap:anywhere; }

  /* clip + sound library cards */
  .clip-lib-card{ flex-wrap:wrap; }
  .clip-lib-info{ flex:1 1 100%; }
  .clip-lib-url{ max-width:100%; }
}
@media (max-width: 360px){
  #adminSection .admin-panel-inner{ padding:14px 10px 22px; }
  .alert-event-card, .alert-tier-card, .alert-reward-card{ padding:12px; }
}

/* ---------- Countdowns tab ---------- */
.countdown-grid{ display:grid; gap:20px; }
.countdown-card{ display:flex; flex-direction:column; gap:10px; }
.countdown-preview{
  aspect-ratio:16/9; width:100%; max-width:640px; border-radius:14px; overflow:hidden;
  background:repeating-conic-gradient(#1b2236 0% 25%, #232c45 0% 50%) 50% / 24px 24px;
  border:1px solid rgba(255,255,255,.1);
}
.countdown-preview iframe{ width:100%; height:100%; border:0; display:block; background:transparent; }

/* ---------- Position / size editors (alerts + countdowns) ---------- */
.layout-details{ margin:0 0 18px; }
.layout-editor{ display:flex; flex-direction:column; gap:14px; margin-top:12px; }
.layout-controls{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px; }
.layout-group{ display:flex; flex-direction:column; gap:8px; }
.layout-row{ display:grid; grid-template-columns:96px 1fr 52px; align-items:center; gap:10px; font-size:.9rem; }
.layout-row input[type=range]{ width:100%; }
.layout-val{ text-align:right; font-variant-numeric:tabular-nums; opacity:.8; }
.layout-foot{ display:flex; flex-direction:column; align-items:stretch; gap:8px; }
.layout-foot .draw-sub:empty{ display:none; }
.layout-reset{ width:100%; }
.layout-preview{
  position:relative; container-type:inline-size; overflow:hidden;
  aspect-ratio:16/9; width:100%; max-width:640px; border-radius:14px;
  background:repeating-conic-gradient(#1b2236 0% 25%, #232c45 0% 50%) 50% / 24px 24px;
  border:1px solid rgba(255,255,255,.1);
}
.layout-mock-text, .layout-mock-clip{ position:absolute; width:max-content; }
.layout-mock-text{
  padding:.7cqw 1.4cqw; border-radius:999px; font-weight:700; font-size:1.05cqw; color:#eef1f8;
  background:rgba(10,14,26,.88); border:.15cqw solid #5c8df6; white-space:nowrap;
}
.layout-mock-clip{
  width:29.2cqw; aspect-ratio:16/9; border-radius:1cqw; display:flex; align-items:center; justify-content:center;
  background:#0a0e1a; box-shadow:0 0 0 .18cqw #5c8df6; color:#8fb0ff; font-size:1.4cqw; font-weight:700;
}

/* ---------- Analytics tab ---------- */
.analytics-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.analytics-kpis{ display:flex; flex-direction:column; gap:14px; margin-bottom:14px; }
.analytics-kpis .stat-tile{ min-width:0; }
.analytics-kpis .stat-value,
.analytics-kpis .stat-value-text{ overflow-wrap:anywhere; }
.stat-note{ font-size:.72rem; color:var(--text-dim); overflow-wrap:anywhere; }
.analytics-grid{ display:flex; flex-direction:column; gap:14px; margin-bottom:30px; }
.analytics-row{ display:grid; grid-template-columns:repeat(var(--k,1), minmax(0,1fr)); gap:14px; }
.chart-wide-only{ display:block; }
.chart-narrow-only{ display:none; }
.chart-card{
  background:var(--bg); border:1px solid var(--line); border-radius:var(--radius-md);
  padding:16px 16px 14px; min-width:0; display:flex; flex-direction:column; gap:10px;
}
.chart-title{
  font-family:'Anton',sans-serif; font-weight:400; text-transform:uppercase; letter-spacing:.3px;
  font-size:1rem; color:var(--text); margin:0;
}
.chart-sub{ font-size:.78rem; color:var(--text-faint); margin:-6px 0 0; }
.chart-empty{ font-size:.85rem; color:var(--text-dim); padding:18px 4px; margin:0; }
.chart-svg{ width:100%; height:auto; display:block; overflow:visible; }
.chart-grid{ stroke:var(--line); stroke-width:1; }
.chart-zero{ stroke:#3a4358; }
.chart-axis{ fill:var(--text-faint); font-size:10px; font-family:'Inter',sans-serif; }
.chart-val{ fill:var(--text-dim); font-size:10px; font-weight:600; font-family:'Inter',sans-serif; }
.chart-bar{ transition:opacity .15s ease; }
.chart-bar:hover{ opacity:.8; }
.chart-line{ stroke-width:2.4; stroke-linejoin:round; stroke-linecap:round; }
.chart-area{ opacity:.14; }
.chart-inline-stats{ display:flex; flex-wrap:wrap; gap:16px; font-size:.82rem; color:var(--text-dim); }
.chart-inline-stats b{ color:var(--text); font-weight:700; margin-left:3px; }

.donut-wrap{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.donut-svg{ width:140px; height:140px; flex:0 0 auto; }
.donut-total{ fill:var(--text); font-family:'Anton',sans-serif; font-size:20px; }
.donut-sub{ fill:var(--text-faint); font-size:8px; text-transform:uppercase; letter-spacing:.5px; font-family:'Inter',sans-serif; }
.legend{ list-style:none; display:flex; flex-direction:column; gap:7px; flex:1 1 140px; min-width:0; }
.legend li{ display:flex; align-items:center; gap:8px; font-size:.82rem; min-width:0; }
.legend-dot{ width:10px; height:10px; border-radius:3px; flex:0 0 auto; }
.legend-label{ color:var(--text-dim); flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.legend-val{ color:var(--text); font-weight:600; white-space:nowrap; }
.legend-val small{ color:var(--text-faint); font-weight:500; margin-left:2px; }

.hbars{ display:flex; flex-direction:column; gap:9px; }
.hbar{ display:flex; align-items:center; gap:10px; font-size:.84rem; min-width:0; }
.hbar-rank{ width:16px; color:var(--text-faint); font-variant-numeric:tabular-nums; text-align:right; flex:0 0 auto; }
.hbar-label{ flex:0 0 28%; max-width:180px; min-width:60px; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hbar-track{ flex:1 1 auto; height:10px; background:var(--bg-alt); border-radius:999px; overflow:hidden; min-width:40px; }
.hbar-fill{ display:block; height:100%; border-radius:999px; }
.hbar-val{ flex:0 0 auto; color:var(--text-dim); font-variant-numeric:tabular-nums; font-size:.8rem; }

@media (max-width:1000px){
  .analytics-row.is-tiles{ grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); }
  .analytics-row.is-cards{ grid-template-columns:repeat(auto-fit, minmax(min(100%,300px),1fr)); }
}
@media (max-width:900px){
  .chart-wide-only{ display:none; }
  .chart-narrow-only{ display:block; }
}
@media (max-width:560px){
  .analytics-row.is-tiles{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .donut-wrap{ justify-content:center; }
  .hbar-label{ flex-basis:34%; }
}
.chart-note{ font-size:.78rem; color:var(--text-faint); line-height:1.5; margin:-14px 0 30px; max-width:80ch; }


/* ---------- collapsible section rows (all admin / mod pages + Analytics) ----------
   Anton title, thin divider, chevron on the right. Closed by default. */
.acc{ border-bottom:1px solid var(--line); }
.acc-head{ display:flex; align-items:center; gap:12px; cursor:pointer; }
.acc-toggle{
  flex:1 1 auto; min-width:0; text-align:left; background:none; border:0; cursor:pointer;
  padding:21px 0; color:var(--text);
  font-family:'Anton',sans-serif; font-weight:400; text-transform:uppercase; letter-spacing:.3px;
  font-size:1.05rem; line-height:1.2;
}
.acc-toggle:focus-visible{ outline:2px solid var(--blue-text); outline-offset:2px; }
.acc-extra{ display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.acc-chev{
  width:20px; height:20px; flex:0 0 auto; color:var(--text);
  transition:transform .2s ease; pointer-events:none;
}
.acc.is-open > .acc-head .acc-chev{ transform:rotate(180deg); }
.acc-body{ padding:4px 0 26px; min-width:0; }
.acc:not(.is-open) > .acc-body{ display:none; }
.acc-body > :last-child{ margin-bottom:0; }
.acc-body > .tournament-subheading:first-child{ margin-top:0; }
@media (max-width:560px){
  .acc-toggle{ font-size:.98rem; padding:18px 0; }
}

/* ---------- Playlist tab (songverzoeken) ---------- */
.playlist-now{
  display:flex; flex-direction:column; gap:4px;
  background: var(--blue-soft); border:1px solid var(--blue);
  border-radius: var(--radius-md); padding:16px 18px; margin-bottom:16px;
}
.playlist-now .leaderboard-empty{ margin:0; }
.playlist-now-label{ color: var(--blue-text); font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.playlist-now-song{ font-size:1.15rem; font-weight:700; overflow-wrap:anywhere; }
.playlist-now-by{ color: var(--text-dim); font-size:.85rem; }
.playlist-count{ color: var(--text-dim); font-weight:400; }
.playlist-list{ list-style:none; display:flex; flex-direction:column; gap:8px; margin-bottom:18px; }
.playlist-row{
  display:flex; align-items:center; gap:12px;
  background: var(--bg); border:1px solid var(--line);
  border-radius: var(--radius-md); padding:10px 12px;
}
.playlist-pos{
  flex-shrink:0; width:28px; height:28px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: var(--slate); color: var(--blue-text); font-size:.8rem; font-weight:700;
}
.playlist-info{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.playlist-song{ font-weight:600; overflow-wrap:anywhere; }
.playlist-meta{ color: var(--text-dim); font-size:.8rem; }
.playlist-badge{
  display:inline-block; margin-left:4px; padding:1px 7px; border-radius:999px;
  background: var(--blue-soft); color: var(--blue-text); font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
}
.playlist-badge-alt{ background: var(--slate); color: var(--text-dim); }
.playlist-actions{ flex-shrink:0; display:flex; gap:6px; }
.playlist-actions .btn[disabled]{ opacity:.35; cursor:default; }
.playlist-list-history .playlist-row{ opacity:.75; }
.playlist-list-history .playlist-row.is-skipped .playlist-song{ text-decoration:line-through; color: var(--text-dim); }
@media (max-width:560px){
  .playlist-row{ flex-wrap:wrap; }
  .playlist-actions{ width:100%; justify-content:flex-end; }
}

/* Playlist: Spotify link box + per-song Spotify state */
.playlist-spotify{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 14px; margin-bottom:14px; border-radius:10px; background: var(--slate); }
.playlist-spotify-text{ font-size:.9rem; }
.playlist-spotify-btns{ display:flex; gap:8px; }
.playlist-art{ width:40px; height:40px; border-radius:6px; object-fit:cover; flex-shrink:0; }
.playlist-badge-ok{ background:#1db954; color:#07210f; }
.playlist-badge-warn{ background:#b45309; color:#fff; }
