/* ── NAVIGATION ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,8,16,0.95);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 9px 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: nowrap;
}

/* live/connection badge, left of the tabs */
.nav-live {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--muted);
  padding: 5px 10px; border-radius: 20px; background: var(--surface2); border: 1px solid var(--border);
}
.nav-live #dbDot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); transition: background 0.4s; flex-shrink: 0; }

.nav-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35em;
  letter-spacing: 4px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-right: 8px;
  white-space: nowrap;
  transition: background 0.4s;
}

/* Tabs live in the middle and scroll sideways if they run out of room, so the
   brand (left) and action icons (right) never collide with them. */
.nav-tabs {
  display: flex; gap: 3px; flex: 1 1 auto; min-width: 0;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.18s;
  white-space: nowrap;
  position: relative;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%; right: 50%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: left 0.2s, right 0.2s, background 0.4s;
}

.tab-btn:hover { color: var(--text2); background: rgba(255,255,255,0.04); }
.tab-btn.active { color: var(--accent); background: var(--accent-dim); }
.tab-btn.active::after { left: 8px; right: 8px; }
.tab-btn:active { transform: scale(0.94); opacity: 0.85; transition: transform 0.08s, opacity 0.08s; }

.nav-actions {
  display: flex; gap: 6px;
  flex-shrink: 0; flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
}

/* Compact icon buttons — Full / Reset / QR / New Season / Exit collapse to
   icons + tooltip so the action bar stops overflowing into the tabs. */
.nav-ic {
  width: 36px; height: 36px; flex-shrink: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; cursor: pointer;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text2); transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.1s;
}
.nav-ic:hover { background: var(--surface3); border-color: var(--border2); color: var(--text); }
.nav-ic:active { transform: scale(0.92); }
.nav-ic.reset { color: var(--danger); border-color: rgba(255,69,96,0.25); }
.nav-ic.reset:hover { background: rgba(255,69,96,0.1); }
.nav-ic.exit:hover { background: rgba(255,159,64,0.1); border-color: rgba(255,159,64,0.3); }

/* ── Tabs get their own full-width row when the bar is tight ──
   A superadmin has 8 tabs plus a wide action cluster (season badge, role,
   5 icons); on a single row the tab strip is flex-crushed to a sliver and the
   last tabs (Admin / Reports) fall off the right edge — unreachable on a TV or
   any non-touch screen that can't scroll the hidden strip. Dropping the strip
   onto its own row keeps every tab visible. The single-row layout stays only on
   very wide screens where the whole bar genuinely fits. (Phones ≤768px already
   do this, and additionally hide the badges — see components.css.) */
@media (max-width: 1600px) {
  .nav { flex-wrap: wrap; row-gap: 8px; }
  .nav-actions { margin-left: auto; }
  .nav-tabs { order: 5; flex-basis: 100%; justify-content: flex-start; }
}

/* BUTTONS */
.btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 65%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.35s, opacity 0.35s;
  border-radius: inherit;
  pointer-events: none;
}
.btn:active::after {
  transform: scale(2.5);
  opacity: 1;
  transition: 0s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #e8a800 100%);
  color: #111;
  box-shadow: 0 4px 12px rgba(245,200,66,0.2);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,200,66,0.35); }

.btn-danger { background: rgba(255,69,96,0.12); color: var(--danger); border: 1px solid rgba(255,69,96,0.2); }
.btn-danger:hover { background: rgba(255,69,96,0.22); }

.btn-info { background: rgba(59,142,255,0.1); color: var(--blue); border: 1px solid rgba(59,142,255,0.18); }
.btn-info:hover { background: rgba(59,142,255,0.2); }

.btn-success { background: rgba(0,230,118,0.1); color: var(--green); border: 1px solid rgba(0,230,118,0.18); }
.btn-success:hover { background: rgba(0,230,118,0.2); }

.btn-outline { background: transparent; border: 1px solid var(--border2); color: var(--text2); }
.btn-outline:hover { background: var(--surface2); border-color: var(--border2); }

.btn-sm { padding: 5px 11px; font-size: 12px; }

.btn-reset {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255,69,96,0.25);
  padding: 7px 13px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-fs {
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
  padding: 7px 13px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-fs:hover { background: var(--surface3); border-color: var(--border2); }

