/* ============================================================
   /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; }


/* ============================================================
   Dashboard shell - sidenav + content panel
   (/mod, /mod?role=head-mod and /admin). Scoped to #adminSection so
   /dev, which shares .admin-tabbar, keeps its own top bar.

   The old tab bar is now a vertical sidenav:
   - every main tab is a row with an icon; Alerts and Community fold open
     to reveal their sub-tabs (the same .admin-subtabs[data-group] JS drives)
   - the sidenav is always open (no fold / rail / dropdown)
   ============================================================ */
#adminSection{ --side-w:256px; --side-w-rail:72px; --ease-out:cubic-bezier(.2,.8,.2,1); --ease-io:cubic-bezier(.65,0,.35,1); --ease-pop:cubic-bezier(.34,1.56,.64,1); }

#adminSection .admin-box{
  display:grid; grid-template-columns: var(--side-w) minmax(0,1fr); gap:22px; align-items:start;
  background:transparent; border:0; border-radius:0; overflow:visible;
  transition: grid-template-columns .4s var(--ease-io);
}

/* ---- the sidebar card ---- */
#adminSection .admin-tabbar{
  position:sticky; top:92px; z-index:6; align-self:start;
  display:flex; flex-direction:column; align-items:stretch; flex-wrap:nowrap; gap:6px;
  width:100%; padding:12px; max-height:calc(100vh - 112px); overflow-x:hidden; overflow-y:auto;
  background: var(--bg-alt); border:1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow:0 0 0 rgba(0,0,0,0);
  transition: width .4s var(--ease-io), box-shadow .35s ease, border-color .35s ease;
  animation: sideIn .6s var(--ease-out) both;
}
#adminSection .admin-tabbar:hover{ border-color:#2c3a5c; }

#adminSection .nav-tabs{
  order:0; flex:1 1 auto; display:flex; flex-direction:column; flex-wrap:nowrap; gap:3px;
  margin:0; padding:6px 0; overflow:visible; scroll-snap-type:none;
}
#adminSection .nav-tabs[hidden]{ display:none; }
#adminSection .nav-item{ display:flex; flex-direction:column; }
#adminSection .nav-item:not(:has(.nav-tab)){ display:none; }  /* plain Mod: trimmed tabs leave empty wrappers */

/* shared look for toggle / tabs / logout rows */
#adminSection .nav-tab,
#adminSection .side-toggle,
#adminSection #logoutBtn{
  position:relative; display:flex; align-items:center; justify-content:flex-start; gap:12px;
  width:100%; min-height:44px; padding:11px 14px; margin:0; overflow:hidden;
  background:transparent; border:1px solid transparent; border-radius: var(--radius-md);
  color: var(--text-dim); font-family:'Inter', sans-serif; font-size:.88rem; font-weight:700;
  text-align:left; white-space:nowrap; cursor:pointer;
  transition: color .2s ease, background .25s ease, border-color .25s ease, transform .25s var(--ease-out), padding .35s var(--ease-io), gap .35s var(--ease-io), box-shadow .3s ease;
}

#adminSection .nav-tab:hover,
#adminSection .side-toggle:hover{ background: var(--blue-soft); border-color: rgba(47,107,255,.35); color: var(--text); transform: translateX(4px); }
#adminSection .nav-tab:active,
#adminSection .side-toggle:active,
#adminSection #logoutBtn:active{ transform: translateX(2px) scale(.98); }
#adminSection .nav-tab:focus-visible,
#adminSection .side-toggle:focus-visible,
#adminSection #logoutBtn:focus-visible,
#adminSection .admin-subtabs .leaderboard-tab:focus-visible{ outline:2px solid var(--blue-text); outline-offset:2px; }

#adminSection .nav-tab.is-active{
  background: var(--blue); border-color: var(--blue); color:#fff; transform:none;
  box-shadow:none;
}
#adminSection .nav-tab.is-active:hover{ transform: translateX(2px); }
#adminSection .nav-tab.is-active .nav-ico{ animation: icoPop .55s var(--ease-pop); }

#adminSection .nav-ico{
  width:20px; height:20px; flex:0 0 20px;
  transition: transform .4s var(--ease-pop), color .2s ease;
}
#adminSection .nav-tab:hover .nav-ico{ transform: scale(1.2) rotate(-8deg); color: var(--blue-text); }
#adminSection .nav-tab.is-active:hover .nav-ico{ color:#fff; }
#adminSection .nav-label{
  flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis;
  transition: opacity .25s ease, transform .3s var(--ease-out);
}
#adminSection .nav-caret{
  width:16px; height:16px; flex:0 0 16px; opacity:.7;
  transition: transform .35s var(--ease-io), opacity .2s ease;
}
#adminSection .nav-tab.is-active .nav-caret{ transform: rotate(180deg); opacity:1; }
#adminSection .nav-tab.is-active.is-collapsed .nav-caret{ transform: none; }

/* ---- sidebar head (fold button) ---- */
#adminSection .side-toggle{ display:none !important; order:-1; margin-bottom:4px; border-bottom:1px solid var(--line); border-radius: var(--radius-md) var(--radius-md) 0 0; padding-bottom:12px; min-height:48px; }
#adminSection .side-toggle .side-ico{ transition: transform .45s var(--ease-io), color .2s ease; color: var(--blue-text); }
#adminSection .side-toggle:hover .side-ico{ transform: scale(1.12); }
#adminSection .side-toggle .side-caret{ display:none; }

/* ---- sub-tabs: fold open under their parent ---- */
#adminSection .admin-tabbar .admin-subtabs{
  order:0; flex:none; display:flex; flex-direction:column; flex-wrap:nowrap; gap:2px;
  margin:4px 0 6px 20px; padding:0 0 0 12px; border-left:1px solid var(--line);
  overflow:hidden; max-height:240px; opacity:1; visibility:visible; scroll-snap-type:none;
  transition: max-height .45s var(--ease-io), opacity .3s ease, margin .35s ease, visibility 0s;
}
#adminSection .admin-tabbar .admin-subtabs[hidden]{
  display:flex; max-height:0; opacity:0; margin-top:0; margin-bottom:0; visibility:hidden; pointer-events:none;
  transition: max-height .35s var(--ease-io), opacity .2s ease, margin .3s ease, visibility 0s .35s;
}
#adminSection .admin-subtabs .leaderboard-tab{
  position:relative; display:flex; align-items:center; gap:10px; width:100%; min-height:38px;
  padding:8px 12px; margin:0; border-radius: var(--radius-md); border:1px solid transparent; background:transparent;
  color: var(--text-dim); font-size:.82rem; font-weight:700; text-align:left; white-space:nowrap;
  transition: color .2s ease, background .25s ease, transform .25s var(--ease-out), border-color .2s ease;
}
#adminSection .admin-subtabs .leaderboard-tab:hover{ color: var(--blue-text); background: var(--blue-soft); transform: translateX(5px); }
#adminSection .admin-subtabs .leaderboard-tab.is-active{ color:#fff; background: rgba(47,107,255,.14); border-color: rgba(47,107,255,.3); }
#adminSection .sub-dot{
  width:7px; height:7px; border-radius:50%; flex:0 0 7px; background: var(--text-faint);
  transition: background .25s ease, transform .35s var(--ease-pop), box-shadow .25s ease;
}
#adminSection .admin-subtabs .leaderboard-tab:hover .sub-dot{ transform: scale(1.5); background: var(--blue-text); }
#adminSection .admin-subtabs .leaderboard-tab.is-active .sub-dot{ background: var(--blue-text); }
/* sub-tabs cascade in when their group opens */
#adminSection .admin-subtabs:not([hidden]) .leaderboard-tab{ animation: subIn .45s var(--ease-out) backwards; }
#adminSection .admin-subtabs:not([hidden]) .leaderboard-tab:nth-child(1){ animation-delay:.06s; }
#adminSection .admin-subtabs:not([hidden]) .leaderboard-tab:nth-child(2){ animation-delay:.12s; }
#adminSection .admin-subtabs:not([hidden]) .leaderboard-tab:nth-child(3){ animation-delay:.18s; }
#adminSection .admin-subtabs:not([hidden]) .leaderboard-tab:nth-child(4){ animation-delay:.24s; }

/* ---- logout pinned to the bottom ---- */
#adminSection #logoutBtn{ order:2; margin-top:auto; margin-left:0; border-top:1px solid var(--line); border-radius: 0 0 var(--radius-md) var(--radius-md); padding-top:12px; flex:none; }
#adminSection #logoutBtn:hover{ background: var(--live-soft); color: var(--live); border-color: transparent; border-top-color: var(--line); transform:none; }
#adminSection #logoutBtn .nav-ico{ transition: transform .35s var(--ease-out); }
#adminSection #logoutBtn:hover .nav-ico{ transform: translateX(4px); }

/* ---- nav entrance: rows slide in one after the other ---- */
#adminSection .nav-item{ animation: navItemIn .5s var(--ease-out) backwards; }
#adminSection .nav-item:nth-child(1){ animation-delay:.05s; }
#adminSection .nav-item:nth-child(2){ animation-delay:.10s; }
#adminSection .nav-item:nth-child(3){ animation-delay:.15s; }
#adminSection .nav-item:nth-child(4){ animation-delay:.20s; }
#adminSection .nav-item:nth-child(5){ animation-delay:.25s; }
#adminSection .nav-item:nth-child(6){ animation-delay:.30s; }
#adminSection .nav-item:nth-child(7){ animation-delay:.35s; }
#adminSection .nav-item:nth-child(8){ animation-delay:.40s; }
#adminSection .nav-item:nth-child(9){ animation-delay:.45s; }
#adminSection .nav-item:nth-child(10){ animation-delay:.50s; }
#adminSection .nav-item:nth-child(11){ animation-delay:.55s; }

/* ---- content panel ---- */
#adminSection .admin-panel-inner{
  position:relative; min-width:0; min-height:460px;
  background: var(--bg-alt); border:1px solid var(--line); border-radius: var(--radius-lg);
  animation: panelFrameIn .6s var(--ease-out) .08s backwards;
}
#adminSection .admin-tab-panel.is-active,
#adminSection .admin-subpanel.is-active{ animation: panelIn .5s var(--ease-out) backwards; }

/* ---- cards: staggered entrance + hover lift ---- */
#adminSection .stat-tile,
#adminSection .alert-event-card,
#adminSection .alert-reward-card,
#adminSection .cmd-card,
#adminSection .clip-lib-card,
#adminSection .countdown-card,
#adminSection .chart-card,
#adminSection .acc{ animation: cardIn .55s var(--ease-out) backwards; }
#adminSection :is(.stat-tile,.alert-event-card,.alert-reward-card,.cmd-card,.clip-lib-card,.countdown-card,.chart-card,.acc):nth-child(1){ animation-delay:.04s; }
#adminSection :is(.stat-tile,.alert-event-card,.alert-reward-card,.cmd-card,.clip-lib-card,.countdown-card,.chart-card,.acc):nth-child(2){ animation-delay:.09s; }
#adminSection :is(.stat-tile,.alert-event-card,.alert-reward-card,.cmd-card,.clip-lib-card,.countdown-card,.chart-card,.acc):nth-child(3){ animation-delay:.14s; }
#adminSection :is(.stat-tile,.alert-event-card,.alert-reward-card,.cmd-card,.clip-lib-card,.countdown-card,.chart-card,.acc):nth-child(4){ animation-delay:.19s; }
#adminSection :is(.stat-tile,.alert-event-card,.alert-reward-card,.cmd-card,.clip-lib-card,.countdown-card,.chart-card,.acc):nth-child(5){ animation-delay:.24s; }
#adminSection :is(.stat-tile,.alert-event-card,.alert-reward-card,.cmd-card,.clip-lib-card,.countdown-card,.chart-card,.acc):nth-child(6){ animation-delay:.29s; }
#adminSection :is(.stat-tile,.alert-event-card,.alert-reward-card,.cmd-card,.clip-lib-card,.countdown-card,.chart-card,.acc):nth-child(n+7){ animation-delay:.34s; }

#adminSection .stat-tile,
#adminSection .alert-event-card,
#adminSection .alert-tier-card,
#adminSection .alert-reward-card,
#adminSection .cmd-card,
#adminSection .clip-lib-card,
#adminSection .countdown-card,
#adminSection .chart-card,
#adminSection .overlay-url-box{
  transition: transform .3s var(--ease-out), border-color .25s ease, box-shadow .3s ease, background .25s ease;
}
@media (hover:hover){
  #adminSection .stat-tile:hover,
  #adminSection .alert-event-card:hover,
  #adminSection .alert-reward-card:hover,
  #adminSection .cmd-card:hover,
  #adminSection .clip-lib-card:hover,
  #adminSection .countdown-card:hover,
  #adminSection .chart-card:hover,
  #adminSection .overlay-url-box:hover{
    transform: translateY(-2px); border-color: rgba(47,107,255,.4);
  }
  #adminSection .alert-tier-card:hover{ border-color: rgba(47,107,255,.45); background: rgba(47,107,255,.05); }
}
#adminSection .stat-tile .stat-value{ display:inline-block; transition: transform .35s var(--ease-pop); transform-origin:left center; }
#adminSection .stat-tile:hover .stat-value{ transform: scale(1.12); }

/* no blue hover glow on cards - style.css's global .stat-tile:hover shadow is cancelled here */
#adminSection .stat-tile:hover,
#adminSection .alert-event-card:hover,
#adminSection .alert-reward-card:hover,
#adminSection .cmd-card:hover,
#adminSection .clip-lib-card:hover,
#adminSection .countdown-card:hover,
#adminSection .chart-card:hover,
#adminSection .overlay-url-box:hover{ box-shadow:none; }

/* rows that don't re-render often: nudge on hover */
#adminSection .leaderboard-row,
#adminSection .alert-log-row,
#adminSection .playlist-row,
#adminSection .admin-player-row{ transition: background .2s ease, transform .25s var(--ease-out), padding .25s ease; }
@media (hover:hover){
  #adminSection .leaderboard-row:hover,
  #adminSection .alert-log-row:hover,
  #adminSection .playlist-row:hover,
  #adminSection .admin-player-row:hover{ background: rgba(47,107,255,.07); transform: translateX(4px); }
}

/* accordion headers */
#adminSection .acc-head{ transition: color .2s ease, padding-left .3s var(--ease-out); }
#adminSection .acc-head:hover{ color: var(--blue-text); padding-left:6px; }
#adminSection .acc-chev{ transition: transform .35s var(--ease-io); }
#adminSection .acc.is-open > .acc-body{ animation: accOpen .4s var(--ease-out) backwards; }

/* ---- controls ---- */
#adminSection .admin-input{ transition: border-color .2s ease, box-shadow .25s ease, background .2s ease, transform .2s ease; }
#adminSection .admin-input:hover{ border-color:#34405c; }
#adminSection .admin-input:focus{ box-shadow:0 0 0 2px var(--blue-soft); background: #0d1017; }
#adminSection .btn{
  position:relative; overflow:hidden;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s var(--ease-out), box-shadow .25s ease;
}
#adminSection .btn:hover:not(:disabled){ transform: translateY(-1px); }
#adminSection .btn:active:not(:disabled){ transform: translateY(0) scale(.97); box-shadow:none; }
#adminSection #logoutBtn:hover{ box-shadow:none; }
#adminSection .alert-toggle-slider::before{ transition: transform .3s var(--ease-pop); }
#adminSection .admin-remove-btn{ transition: border-color .2s ease, color .2s ease, transform .3s var(--ease-pop), background .2s ease; }
#adminSection .admin-remove-btn:hover{ transform: rotate(90deg) scale(1.15); background: var(--live-soft); }
#adminSection .placeholder-chip{ transition: border-color .2s ease, color .2s ease, transform .25s var(--ease-pop); }
#adminSection .placeholder-chip:hover{ transform: translateY(-2px) scale(1.05); }
#adminSection .tournament-status-badge{ transition: transform .3s var(--ease-pop); }
#adminSection .tournament-status-badge:hover{ transform: scale(1.06); }
#adminSection .chart-bar{ transition: opacity .2s ease, transform .3s var(--ease-out); transform-box:fill-box; transform-origin:bottom; }
#adminSection .chart-bar:hover{ transform: scaleY(1.04); }
#adminSection .hbar-fill{ transition: filter .2s ease; }
#adminSection .hbar:hover .hbar-fill{ filter: brightness(1.1); }
#adminSection .tournament-subheading{ position:relative; display:inline-block; }
#adminSection .tournament-subheading::after{
  content:''; position:absolute; left:0; bottom:-4px; height:2px; width:0; background: var(--blue);
  transition: width .45s var(--ease-out);
}
#adminSection .tournament-subheading:hover::after{ width:100%; }
#adminSection .team-card{ transition: transform .3s var(--ease-out), border-color .25s ease; }
#adminSection .team-card:hover{ transform: translateY(-3px); border-color: var(--blue); }

/* ---- keyframes ---- */
@keyframes sideIn{ from{ opacity:0; transform: translateX(-22px); } to{ opacity:1; transform:none; } }
@keyframes navItemIn{ from{ opacity:0; transform: translateX(-16px); } to{ opacity:1; transform:none; } }
@keyframes subIn{ from{ opacity:0; transform: translateX(-10px); } to{ opacity:1; transform:none; } }
@keyframes icoPop{ 0%{ transform: scale(.6) rotate(-20deg); } 60%{ transform: scale(1.25) rotate(6deg); } 100%{ transform:none; } }
@keyframes panelFrameIn{ from{ opacity:0; transform: translateY(18px); } to{ opacity:1; transform:none; } }
@keyframes panelIn{ from{ opacity:0; transform: translateY(14px); } to{ opacity:1; transform:none; } }
@keyframes lineDraw{ from{ transform: scaleX(0); } to{ transform: scaleX(1); } }
@keyframes cardIn{ from{ opacity:0; transform: translateY(16px) scale(.98); } to{ opacity:1; transform:none; } }
@keyframes accOpen{ from{ opacity:0; transform: translateY(-8px); } to{ opacity:1; transform:none; } }

/* ---- phones + small tablets: nav drops down under the toggle ---- */
@media (max-width: 900px){
  #adminSection .admin-box{ grid-template-columns: minmax(0,1fr); gap:14px; }
  #adminSection .admin-tabbar{ position:relative; top:auto; max-height:none; overflow:hidden; padding:8px; gap:0; animation-name: panelFrameIn; }
  #adminSection .nav-tab{ min-height:46px; }
  #adminSection .admin-subtabs .leaderboard-tab{ min-height:42px; }
  #adminSection #logoutBtn{ margin-top:4px; min-height:46px; }
  #adminSection .admin-panel-inner{ min-height:0; }
}

/* ---- motion preferences ---- */
@media (prefers-reduced-motion: reduce){
  #adminSection *, #adminSection *::before, #adminSection *::after{
    animation-duration:.001ms !important; animation-delay:0s !important; animation-iteration-count:1 !important;
    transition-duration:.001ms !important; transition-delay:0s !important;
  }
}

/* ---------- Schema tab (weekly schedule editor) ---------- */
.schedule-edit-row{
  display:grid; grid-template-columns: 110px 120px 120px auto minmax(160px, 1fr);
  align-items:end; gap:12px; padding:12px 0; border-bottom:1px solid var(--line);
}
.schedule-edit-day{ font-family:'Anton', sans-serif; text-transform:uppercase; letter-spacing:.3px; color: var(--blue-text); padding-bottom:10px; }
.schedule-edit-field{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.schedule-edit-field > span, .schedule-note-field > span{ font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color: var(--text-faint); }
.schedule-edit-field .admin-input{ width:100%; min-width:0; padding:10px 12px; }
.schedule-edit-field input:disabled{ opacity:.4; }
.schedule-edit-open{ display:flex; align-items:center; gap:10px; font-size:.82rem; color: var(--text-dim); padding-bottom:10px; white-space:nowrap; }
.schedule-note-field{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.schedule-notes{ display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
@media (max-width: 760px){
  .schedule-edit-row{ grid-template-columns: 1fr 1fr; }
  .schedule-edit-day{ grid-column: 1 / -1; padding-bottom:0; }
  .schedule-edit-game{ grid-column: 1 / -1; }
  .schedule-notes{ grid-template-columns: 1fr; }
}

/* ---------- Suggesties tab ---------- */
.suggest-admin-row{ display:flex; align-items:center; gap:14px; padding:10px 0; border-bottom:1px solid var(--line); flex:1; min-width:0; flex-wrap:wrap; }
.suggest-admin-info{ display:flex; flex-direction:column; gap:3px; flex:1; min-width:160px; }
.suggest-admin-game{ font-weight:700; color: var(--text); overflow-wrap:anywhere; }
.suggest-admin-meta{ font-size:.78rem; color: var(--text-faint); }
.suggest-admin-meta strong{ color: var(--text-dim); }
.suggest-admin-picked{ color:#5fd38d; }
.suggest-admin-actions{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.suggest-admin-actions .suggest-day{ width:auto; min-width:120px; padding-top:8px; padding-bottom:8px; }
.suggest-admin-ranked{ display:flex; align-items:center; gap:10px; }
.suggest-admin-ranked > .leaderboard-rank{ align-self:center; }
