/* =======================================================================
   Admin dashboard styles
   Sections (search for "SECTION:"):
   - Base + tokens
   - Layout shell (sidebar + main)
   - Components (tables, badges, charts, modals)
   - Responsive rules
======================================================================= */

/* SECTION: Base + tokens */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-0: #0b0f13;
  --bg-1: #0f141a;
  --bg-2: #141b22;
  --ink: #e6eef2;
  --ink-soft: #b7c4cc;
  --accent: #00b8a1;
  --accent-2: #ff8a3d;
  --panel: rgba(14, 20, 26, 0.78);
  --panel-strong: rgba(18, 26, 34, 0.92);
  --stroke: rgba(207, 226, 235, 0.12);
  --shadow: 0 20px 55px rgba(3, 6, 9, 0.55);
  --shadow-strong: 0 28px 70px rgba(3, 6, 9, 0.65);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink-soft);
  background-color: var(--bg-0);
  background-image:
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 50%, var(--bg-2) 100%),
    url(./img/background.png);
  background-blend-mode: normal, luminosity;
  background-size: cover, auto;
  background-position: center;
  overflow: hidden;
}

/* Custom scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 184, 161, 0.6) rgba(8, 12, 16, 0.35);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: rgba(8, 12, 16, 0.35);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 184, 161, 0.75), rgba(0, 184, 161, 0.35));
  border-radius: 999px;
  border: 2px solid rgba(8, 12, 16, 0.45);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(0, 184, 161, 0.9), rgba(0, 184, 161, 0.5));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(transparent 23px, rgba(217, 230, 236, 0.05) 24px),
    linear-gradient(90deg, transparent 23px, rgba(217, 230, 236, 0.05) 24px);
  background-size: 24px 24px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 0%, rgba(13, 20, 26, 0.8), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.neural-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, rgba(0, 184, 161, 0.18) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(to bottom, rgba(0, 184, 161, 0.18) 0 1px, transparent 1px 24px);
  background-size: 24px 24px;
  opacity: 0.22;
  filter: drop-shadow(0 0 4px rgba(0, 184, 161, 0.25));
  mix-blend-mode: screen;
  animation: grid-breathe 9s ease-in-out infinite;
}

/* SECTION: Layout shell (sidebar + main) */
.admin-layout {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.6rem;
  padding: 2.5rem;
  overflow: hidden;
}

body.sidebar-collapsed .admin-layout {
  grid-template-columns: 1fr;
}

.sidebar {
  background: linear-gradient(140deg, rgba(18, 26, 34, 0.2), rgba(10, 14, 18, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 22px;
  padding: 1.6rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(34px) saturate(170%);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease;
  height: 100%;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

body.sidebar-collapsed .sidebar {
  position: fixed;
  top: 2.5rem;
  left: 2.5rem;
  bottom: 2.5rem;
  width: 260px;
  transform: translateX(-120%);
  z-index: 30;
  pointer-events: none;
}

.sidebar-handle {
  position: fixed;
  top: 8px;
  left: 4px;
  z-index: 35;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 11, 15, 0.55);
  color: rgba(224, 235, 238, 0.78);
  border-radius: 999px;
  font-family: "Chakra Petch", sans-serif;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, border-color 0.3s ease, color 0.3s ease;
  box-shadow: 0 10px 22px rgba(3, 6, 9, 0.4);
  display: grid;
  place-items: center;
}

.sidebar-handle svg {
  width: 16px;
  height: 16px;
}

body.sidebar-collapsed .sidebar-handle {
  opacity: 1;
  pointer-events: auto;
}


.sidebar-handle:hover {
  border-color: rgba(0, 184, 161, 0.4);
  color: var(--ink);
}

.sidebar-header {
  display: grid;
  gap: 0.3rem;
  align-items: center;
  justify-items: center;
  text-align: center;
  margin-bottom: 22px;
}

.sidebar-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 11, 15, 0.4);
  color: rgba(224, 235, 238, 0.78);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.sidebar-close svg {
  width: 16px;
  height: 16px;
}

.sidebar-close:hover {
  border-color: rgba(0, 184, 161, 0.5);
  color: var(--ink);
}

.btn-ghost--compact {
  padding: 0.45rem 0.7rem;
  font-size: 0.62rem;
  width: 100%;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chart-action {
  width: auto;
  text-align: center;
  padding: 0.35rem 0.6rem;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
}

.sidebar-logo {
  width: 140px;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.35));
}

.sidebar-title {
  font-family: "Chakra Petch", sans-serif;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: rgba(224, 235, 238, 0.7);
  text-align: center;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 0.2rem;
  align-content: start;
}

.nav-item,
.nav-toggle {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 15, 0.55);
  color: rgba(224, 235, 238, 0.82);
  height: 40px;
  padding: 0 0.9rem;
  border-radius: 12px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  line-height: 1;
  display: flex;
  align-items: center;
  min-height: 40px;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
  box-shadow: 0 10px 22px rgba(3, 6, 9, 0.35);
}

.nav-item {
  position: relative;
  overflow: hidden;
}

.nav-toggle {
  position: relative;
}

.nav-item:hover,
.nav-toggle:hover {
  border-color: rgba(0, 184, 161, 0.4);
  color: var(--ink);
  box-shadow: 0 14px 26px rgba(3, 6, 9, 0.45);
}

.nav-item.is-active,
.nav-toggle.is-active {
  background: rgba(0, 184, 161, 0.12);
  border-color: rgba(0, 184, 161, 0.5);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(0, 184, 161, 0.12);
}

.nav-item::before,
.btn-primary::before,
.btn-ghost::before,
.action-btn::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  border: 1px solid rgba(0, 184, 161, 0.35);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.nav-item::after,
.btn-primary::after,
.btn-ghost::after,
.action-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 184, 161, 0.35), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.nav-item:hover::before,
.btn-primary:hover::before,
.btn-ghost:hover::before,
.action-btn:hover::before {
  opacity: 1;
}

.nav-item:hover::after,
.btn-primary:hover::after,
.btn-ghost:hover::after,
.action-btn:hover::after {
  transform: translateX(120%);
}

.nav-group {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.nav-toggle {
  position: relative;
}

.nav-toggle::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(224, 235, 238, 0.6);
  border-bottom: 2px solid rgba(224, 235, 238, 0.6);
  transform: translateY(-50%) rotate(-45deg);
  transition: transform 0.3s ease;
}

.nav-group.is-open .nav-toggle::after {
  transform: translateY(-50%) rotate(45deg);
}

.nav-children {
  max-height: 0;
  overflow: hidden;
  display: grid;
  gap: 6px;
  padding-left: 0.35rem;
  transition: max-height 0.35s ease;
}

.nav-group.is-open .nav-children {
  max-height: 220px;
}

.nav-children .nav-item {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  height: 34px;
  min-height: 34px;
  padding: 0 0.75rem;
}

.nav-children .nav-item:not(.is-active) {
  background: rgba(9, 13, 18, 0.65);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
}

.nav-signout {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(12, 18, 24, 0.75);
}

.main {
  background: linear-gradient(160deg, rgba(18, 26, 34, 0.22), rgba(10, 14, 18, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  padding: 2rem 2.2rem;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(32px) saturate(165%);
  display: grid;
  column-gap: 1.8rem;
  row-gap: 1rem;
  position: relative;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.main::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.24), transparent 60%);
  pointer-events: none;
}

.main::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(0, 184, 161, 0.14);
  pointer-events: none;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  grid-row: 1;
}


.eyebrow {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(224, 235, 238, 0.55);
}

.main-title {
  margin: 0.4rem 0 0;
  color: var(--ink);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.search-field input {
  background: rgba(7, 11, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.6rem 0.9rem;
  color: var(--ink);
  font-size: 0.85rem;
  min-width: 220px;
}

.search-field input:focus {
  outline: none;
  border-color: rgba(0, 184, 161, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 184, 161, 0.15);
}

.filter-select {
  background: rgba(7, 11, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.6rem 0.9rem;
  color: var(--ink);
  font-size: 0.8rem;
  min-width: 140px;
}

.filter-select:focus {
  outline: none;
  border-color: rgba(0, 184, 161, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 184, 161, 0.15);
}
.section-eyebrow {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(224, 235, 238, 0.5);
}

.section-title {
  margin: 0.4rem 0 0;
  font-size: 1.4rem;
  color: var(--ink);
}

.bot-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.78rem;
  color: #d2f4f0;
  margin-bottom: 1rem;
  min-height: 36px;
}

.bot-inline--modal {
  margin: 0.2rem 0 0.6rem;
}

.bot-label {
  color: var(--accent-2);
  font-weight: 600;
}

.bot-text {
  color: #d2f4f0;
}

.btn-primary,
.btn-ghost {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.7rem 1.2rem;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  border: 1px solid rgba(0, 184, 161, 0.5);
  background: rgba(0, 184, 161, 0.15);
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(0, 184, 161, 0.18), inset 0 0 0 1px rgba(0, 184, 161, 0.18);
}

.btn-primary:hover {
  border-color: rgba(0, 184, 161, 0.8);
  box-shadow: 0 16px 30px rgba(0, 184, 161, 0.25);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(224, 235, 238, 0.75);
  box-shadow: 0 10px 22px rgba(3, 6, 9, 0.35);
}

.btn-ghost:hover {
  border-color: rgba(0, 184, 161, 0.4);
  color: var(--ink);
  box-shadow: 0 14px 26px rgba(3, 6, 9, 0.45);
}

.btn-primary:disabled,
.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.kpi-card {
  background: rgba(8, 12, 16, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.2rem 1.1rem;
  box-shadow: 0 14px 28px rgba(3, 6, 9, 0.45), inset 0 0 24px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 0.35rem;
}

.kpi-label {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(224, 235, 238, 0.55);
}

.kpi-value {
  font-size: 1.8rem;
  color: var(--ink);
  font-weight: 600;
}

.kpi-foot {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(224, 235, 238, 0.6);
}

.kpi-card--important {
  gap: 0.6rem;
  --kpi-metric-width: clamp(96px, 14vw, 140px);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.kpi-action {
  font-size: 0.55rem;
  padding: 0.25rem 0.55rem;
  letter-spacing: 0.16em;
  width: auto;
}

.kpi-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: start;
}

.kpi-metric {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  text-align: center;
  width: var(--kpi-metric-width);
  justify-self: center;
}

.kpi-card--important .kpi-value {
  font-size: 1.5rem;
  text-align: center;
  justify-self: center;
}

.kpi-list {
  list-style: none;
  margin: 0;
  padding: 0.45rem 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.35rem 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.kpi-list li {
  display: contents;
}

.kpi-list span {
  font-size: 0.75rem;
  color: rgba(224, 235, 238, 0.55);
}

.kpi-list-date {
  justify-self: start;
}

.kpi-list-count {
  justify-self: start;
  text-align: left;
  color: rgba(224, 235, 238, 0.85);
  font-weight: 600;
}

.kpi-list--timeline {
  position: relative;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  padding-left: 0.7rem;
}

.kpi-list--timeline::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.6rem;
  bottom: 0.2rem;
  width: 1px;
  background: rgba(0, 184, 161, 0.18);
}

.kpi-list--timeline li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 1rem;
  position: relative;
  padding-left: 0.7rem;
}

.kpi-list--timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  transform: translate(-35%, -50%);
  background: rgba(0, 184, 161, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 184, 161, 0.12);
}

.kpi-list--timeline .kpi-list-count {
  justify-self: center;
  text-align: left;
  width: var(--kpi-metric-width);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 184, 161, 0.2);
  background: rgba(0, 184, 161, 0.08);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.status-pill {
  padding: 0.5rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 184, 161, 0.3);
  background: rgba(0, 184, 161, 0.08);
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(224, 235, 238, 0.7);
}

#welcome-pill {
  text-transform: none;
  letter-spacing: 0.08em;
}

.content {
  grid-row: 3;
  position: relative;
  z-index: 1;
  min-height: 0;
  /* .main reserves compact header/banner rows above a minmax(0, 1fr) content
     row, so this is the
     pane meant to scroll. overflow:hidden here clipped any section taller than
     the viewport with no way to reach the rest. overflow-x stays hidden so a
     stray px of child width never adds a horizontal scrollbar. */
  overflow-y: auto;
  overflow-x: hidden;
}

/* Keep header static; allow only the dashboard content to scroll when needed */
.content-section[data-section="dashboard"].is-active {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.dashboard-grid {
  margin-top: 1.4rem;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* SECTION: Tables + data blocks */
.table-card {
  background: rgba(8, 12, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 0.8rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.35);
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 0.7fr 0.7fr 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
}

.table-row > span {
  font-size: 0.85rem;
}

.table-head {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(224, 235, 238, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table-body {
  display: grid;
  gap: 0.35rem;
  max-height: clamp(240px, 42vh, 520px);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.table-head,
.table-footer {
  flex: 0 0 auto;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem 0.2rem;
  gap: 0.8rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.page-size {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(224, 235, 238, 0.6);
}

.page-size select {
  background: rgba(7, 11, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.45rem 0.6rem;
  color: var(--ink);
  font-size: 0.75rem;
}

.page-size select:focus {
  outline: none;
  border-color: rgba(0, 184, 161, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 184, 161, 0.12);
}

.page-indicator {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(224, 235, 238, 0.6);
}

.table-row.table-empty {
  color: rgba(224, 235, 238, 0.6);
  justify-content: center;
  text-align: center;
  grid-template-columns: 1fr;
}

.audit-table .table-row {
  grid-template-columns: 1.2fr 1.2fr 1fr;
  text-align: center;
}

.video-table .table-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(120px, 0.7fr);
}

.audit-table .table-row.table-empty,
.app-users-table .table-row.table-empty {
  grid-template-columns: 1fr;
}

.app-users-table .table-row {
  grid-template-columns: 1.2fr 1.6fr 1fr 0.7fr 0.9fr 1fr;
}

.app-users-table .user-name {
  display: inline-block;
}

.article-table .table-row:not(.table-empty) {
  grid-template-columns: 1.6fr 0.7fr 0.7fr 0.9fr 1fr;
}

.article-stats-table .table-row {
  grid-template-columns: 1.6fr 0.9fr 0.7fr;
}

.article-stats-table .table-row.table-empty {
  grid-template-columns: 1fr;
}

.article-stats-table .table-row > span:nth-child(3) {
  text-align: center;
}

.sport-types-table .table-row:not(.table-empty) {
  grid-template-columns: 1.3fr 1.2fr 1fr 0.8fr 1fr;
}

.tournaments-table .table-row:not(.table-empty) {
  grid-template-columns: 1.25fr 1.25fr 1.15fr 1fr auto;
}

.school-structures-table .table-row:not(.table-empty) {
  grid-template-columns: 1.4fr 1.2fr 0.6fr 0.8fr 1fr;
}

.verified-schools-table .table-row:not(.table-empty) {
  grid-template-columns: 1.7fr 0.8fr 0.8fr 0.8fr 1fr;
}

.schools-table .table-row:not(.table-empty) {
  grid-template-columns: 1.7fr 1.1fr 0.8fr 0.7fr 1.5fr;
}

.article-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 184, 161, 0.2);
  background: rgba(0, 184, 161, 0.08);
  color: rgba(224, 235, 238, 0.9);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-family: "Chakra Petch", sans-serif;
}

.audit-cell {
  font-size: 0.8rem;
  color: rgba(224, 235, 238, 0.75);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  line-height: 1;
  font-weight: 500;
  text-transform: uppercase;
}

.badge--active {
  background: rgba(0, 184, 161, 0.18);
  color: var(--ink);
}

.badge--disabled {
  background: rgba(255, 138, 61, 0.18);
  color: rgba(255, 255, 255, 0.8);
}

.badge--published {
  background: rgba(0, 184, 161, 0.2);
  color: var(--ink);
}

.badge--draft {
  background: rgba(255, 138, 61, 0.2);
  color: rgba(255, 255, 255, 0.85);
}

/* Admin Users: make status badges match the header pill style */
.content-section[data-section="admin-users"] .badge {
  padding: 0.25rem 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 184, 161, 0.3);
  background: rgba(0, 184, 161, 0.08);
  color: rgba(224, 235, 238, 0.7);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  box-shadow: none;
}

.content-section[data-section="admin-users"] .badge--disabled {
  border-color: rgba(255, 138, 61, 0.35);
  background: rgba(255, 138, 61, 0.14);
  color: rgba(255, 255, 255, 0.8);
}

.content-section[data-section="app-users"] .badge {
  padding: 0.25rem 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 184, 161, 0.3);
  background: rgba(0, 184, 161, 0.08);
  color: rgba(224, 235, 238, 0.7);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  box-shadow: none;
}

.content-section[data-section="app-users"] .badge--disabled {
  border-color: rgba(255, 138, 61, 0.35);
  background: rgba(255, 138, 61, 0.14);
  color: rgba(255, 255, 255, 0.8);
}

.content-section[data-section="articles"] .badge {
  padding: 0.25rem 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 184, 161, 0.3);
  background: rgba(0, 184, 161, 0.08);
  color: rgba(224, 235, 238, 0.7);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  box-shadow: none;
}

.content-section[data-section="articles"] .badge--draft {
  border-color: rgba(255, 138, 61, 0.35);
  background: rgba(255, 138, 61, 0.14);
  color: rgba(255, 255, 255, 0.8);
}

.content-section[data-section="sport-types"] .badge,
.content-section[data-section="tournaments"] .badge,
.content-section[data-section="school-structures"] .badge,
.content-section[data-section="verified-schools"] .badge,
.content-section[data-section="schools"] .badge {
  padding: 0.25rem 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 184, 161, 0.3);
  background: rgba(0, 184, 161, 0.08);
  color: rgba(224, 235, 238, 0.7);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  box-shadow: none;
}

.content-section[data-section="sport-types"] .badge--disabled,
.content-section[data-section="tournaments"] .badge--disabled,
.content-section[data-section="school-structures"] .badge--disabled,
.content-section[data-section="verified-schools"] .badge--disabled,
.content-section[data-section="schools"] .badge--disabled {
  border-color: rgba(255, 138, 61, 0.35);
  background: rgba(255, 138, 61, 0.14);
  color: rgba(255, 255, 255, 0.8);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.action-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(10, 14, 18, 0.7);
  color: rgba(224, 235, 238, 0.7);
  border-radius: 10px;
  padding: 0.35rem 0.6rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(3, 6, 9, 0.4);
}

.action-btn:hover {
  border-color: rgba(0, 184, 161, 0.4);
  color: var(--ink);
  box-shadow: 0 12px 20px rgba(3, 6, 9, 0.5);
}

.action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* SECTION: Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 12, 0.7);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  background: rgba(9, 13, 17, 0.98);
  border: 1px solid rgba(0, 184, 161, 0.2);
  border-radius: 16px;
  width: min(92vw, 520px);
  max-height: 90vh;
  padding: 0;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-card--wide {
  width: min(94vw, 860px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(9, 13, 17, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.2rem 1.5rem 0.9rem;
}

.modal-close {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(224, 235, 238, 0.75);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.modal-form {
  display: grid;
  gap: 0.7rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* overflow-y:auto computes overflow-x to auto; pin it hidden so a stray px
     of child width never produces a horizontal scrollbar. */
  overflow-x: hidden;
  padding: 1rem 1.5rem 1.4rem;
}

.school-stepper,
.school-wizard-step {
  display: grid;
  gap: 0.8rem;
}

.school-wizard-step[hidden] {
  display: none;
}

.school-step-position {
  margin: 0;
  color: rgba(224, 235, 238, 0.62);
  font-size: 0.78rem;
}

.school-step-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.school-step-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  min-height: 42px;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(224, 235, 238, 0.12);
  border-radius: 8px;
  background: rgba(7, 11, 15, 0.45);
  color: rgba(224, 235, 238, 0.7);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.school-step-tab > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.school-step-tab.is-active {
  border-color: rgba(0, 184, 161, 0.55);
  background: rgba(0, 184, 161, 0.12);
  color: var(--ink);
}

.school-step-tab:focus-visible {
  outline: none;
  border-color: rgba(0, 184, 161, 0.75);
  box-shadow: 0 0 0 3px rgba(0, 184, 161, 0.14);
}

.school-step-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: rgba(224, 235, 238, 0.12);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.school-step-tab.is-active .school-step-number {
  background: var(--accent, #00b8a1);
  color: #062b27;
}

.keyword-tag-input {
  min-height: 47px;
}

.form-input.is-invalid,
.tag-input.is-invalid,
.lookup-results.is-invalid {
  border-color: rgba(239, 68, 68, 0.72);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-error {
  margin: 0.15rem 0 0;
  color: #ff8a8a;
  font-size: 0.76rem;
  line-height: 1.35;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.form-row {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.form-row > * {
  min-width: 0;
}

.form-label {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 184, 161, 0.8);
  line-height: 1.4;
  padding-bottom: 0.1rem;
  display: inline-block;
}

.form-input {
  background: rgba(7, 11, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  font-size: 0.9rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* Keep colour pickers as compact swatches rather than full-width bars. */
.form-input[type="color"] {
  width: 3.5rem;
  min-width: 3.5rem;
  height: 2.7rem;
  padding: 0.2rem;
}

.form-input:focus {
  outline: none;
  border-color: rgba(0, 184, 161, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 184, 161, 0.12);
}

.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-height: 47px;
  padding: 0.45rem 0.55rem;
  background: rgba(7, 11, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: text;
}

.tag-input:focus-within {
  border-color: rgba(0, 184, 161, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 184, 161, 0.12);
}

.tag-input-tags {
  display: contents;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.28rem 0.35rem 0.28rem 0.6rem;
  border: 1px solid rgba(0, 184, 161, 0.38);
  border-radius: 999px;
  background: rgba(0, 184, 161, 0.12);
  color: var(--ink);
  font-size: 0.82rem;
  white-space: nowrap;
}

.tag-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(224, 235, 238, 0.12);
  color: rgba(224, 235, 238, 0.78);
  cursor: pointer;
  line-height: 1;
}

.tag-chip-remove:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--ink);
}

.tag-input-control {
  flex: 1 1 180px;
  min-width: 130px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 0.3rem 0.2rem;
}

.color-field {
  display: grid;
  grid-template-columns: 42px 34px minmax(84px, 1fr);
  align-items: center;
  gap: 0.6rem;
  min-height: 47px;
  padding: 0.42rem 0.55rem;
  background: rgba(7, 11, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.color-field:focus-within {
  border-color: rgba(0, 184, 161, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 184, 161, 0.12);
}

.color-picker-input {
  width: 42px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.color-picker-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker-input::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.color-picker-input::-moz-color-swatch {
  border: none;
  border-radius: 8px;
}

.color-preview {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: var(--preview-color, #00b8a1);
  box-shadow: inset 0 0 0 2px rgba(7, 11, 15, 0.28);
}

.color-value {
  color: rgba(224, 235, 238, 0.82);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editor-shell {
  background: rgba(7, 11, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 17, 22, 0.95);
}

.ql-container.ql-snow {
  border: none;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  min-height: 240px;
  background: rgba(7, 11, 15, 0.55);
}

.ql-editor {
  min-height: 240px;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
}

.ql-editor.ql-blank::before {
  color: rgba(224, 235, 238, 0.4);
  font-style: normal;
}

.ql-snow .ql-stroke {
  stroke: rgba(224, 235, 238, 0.75);
}

.ql-snow .ql-fill {
  fill: rgba(224, 235, 238, 0.75);
}

.ql-snow .ql-picker {
  color: rgba(224, 235, 238, 0.75);
}

.ql-snow .ql-picker-options {
  background: rgba(10, 14, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ql-snow .ql-picker.ql-expanded .ql-picker-label {
  color: var(--ink);
}

.ql-toolbar.ql-snow button:hover,
.ql-toolbar.ql-snow button.ql-active {
  color: var(--ink);
}

.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button.ql-active .ql-stroke {
  stroke: var(--accent);
}

.form-hint {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(224, 235, 238, 0.5);
}

.brand-inheritance {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.brand-inheritance[hidden] {
  display: none;
}

.brand-choice-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(224, 235, 238, 0.62);
}

.brand-choice-option,
.brand-inherited-note {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(7, 11, 15, 0.58);
  color: rgba(224, 235, 238, 0.85);
  font-size: 0.82rem;
}

.brand-choice-option input {
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.brand-choice-logo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(224, 235, 238, 0.55);
  font-size: 0.65rem;
  text-align: center;
}

.brand-choice-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-choice-swatches {
  display: inline-flex;
  flex: 0 0 auto;
}

.brand-choice-swatch {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--swatch);
}

.brand-choice-swatch + .brand-choice-swatch {
  margin-left: -6px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(7, 11, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  max-height: 190px;
  overflow-y: auto;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: rgba(224, 235, 238, 0.76);
  font-size: 0.85rem;
}

.checkbox-option input {
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.checkbox-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-panel {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 184, 161, 0.16);
  background: rgba(0, 184, 161, 0.05);
}

.invite-panel[hidden] {
  display: none;
}

.invite-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 0.6rem;
}

/* Loader + toast (shared with AdminUI) */
.loader-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(6, 9, 12, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loader-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.loader-core {
  background: rgba(9, 13, 17, 0.95);
  border-radius: 16px;
  border: 1px solid rgba(0, 184, 161, 0.2);
  padding: 1.4rem 1.6rem;
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  color: var(--ink);
}

.loader-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-right-color: rgba(0, 184, 161, 0.4);
  animation: spin 0.8s linear infinite;
}

.loader-text {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(224, 235, 238, 0.75);
}

.toast {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(10, 14, 18, 0.96);
  color: #f2f7f9;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  box-shadow: 0 18px 35px rgba(3, 6, 9, 0.5);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9998;
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--error { border-left-color: #ef4444; }
.toast--success { border-left-color: #22c55e; }
.toast--warning { border-left-color: #f59e0b; }

/* SECTION: Charts + dashboard cards */
.chart-card {
  background: rgba(8, 12, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.2rem 1.1rem 1.4rem;
  box-shadow: 0 18px 32px rgba(3, 6, 9, 0.5), inset 0 0 24px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 1rem;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.chart-pill {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 184, 161, 0.35);
  color: rgba(224, 235, 238, 0.7);
}

.line-chart {
  width: 100%;
  height: 120px;
}

.line-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
  stroke-linecap: round;
}

.line-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(0, 184, 161, 0.4));
}

.line-dot {
  fill: var(--accent-2);
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(224, 235, 238, 0.5);
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  align-items: end;
  min-height: 120px;
}

.bar {
  width: 100%;
  background: linear-gradient(180deg, rgba(0, 184, 161, 0.6), rgba(0, 184, 161, 0.1));
  border-radius: 10px 10px 6px 6px;
  height: var(--value);
  box-shadow: 0 10px 20px rgba(0, 184, 161, 0.15);
}

.donut-chart {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto;
  background: conic-gradient(
    var(--accent) 0 var(--value),
    rgba(255, 138, 61, 0.6) var(--value) 82%,
    rgba(255, 255, 255, 0.1) 82% 100%
  );
  display: grid;
  place-items: center;
  position: relative;
}

.donut-chart::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(9, 13, 17, 0.95);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.donut-center {
  position: relative;
  z-index: 1;
  text-align: center;
  font-family: "Chakra Petch", sans-serif;
}

.donut-value {
  display: block;
  font-size: 1.4rem;
  color: var(--ink);
}

.donut-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(224, 235, 238, 0.55);
}

.donut-legend {
  display: grid;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: rgba(224, 235, 238, 0.7);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.45rem;
}

.legend-active { background: var(--accent); }
.legend-idle { background: rgba(255, 138, 61, 0.6); }
.legend-flagged { background: rgba(255, 255, 255, 0.2); }

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: rgba(224, 235, 238, 0.7);
}

.activity-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 24px;
  border-radius: 10px;
  border: 1px solid rgba(0, 184, 161, 0.3);
  background: rgba(0, 184, 161, 0.08);
  color: rgba(224, 235, 238, 0.7);
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  margin-right: 0.5rem;
}

.activity-list.audit-activity li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
}

.activity-list.audit-activity span {
  width: auto;
  min-width: 120px;
  min-height: 26px;
  height: auto;
  padding: 0.25rem 0.7rem;
  letter-spacing: 0.16em;
  border-radius: 14px;
  line-height: 1.3;
}

.content-section {
  display: none;
  animation: panel-rise 0.6s ease both;
}

.content-section.is-active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.content-section.is-active > .section-header {
  margin-bottom: 1rem;
}

.content-section.is-active > .section-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.4rem;
}

.content-section.is-active > .section-scroll > :first-child {
  margin-top: 0;
}

.content-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.content-card {
  background: rgba(8, 12, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.4rem 1.3rem;
  color: var(--ink-soft);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.35);
}

.content-card h3 {
  margin: 0 0 0.6rem;
  color: var(--ink);
  font-size: 1.05rem;
}

.content-card p {
  margin: 0;
}

@keyframes grid-breathe {
  0%,
  100% {
    opacity: 0.06;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1300px) {
  .admin-layout {
    grid-template-columns: 230px 1fr;
    gap: 1.2rem;
    padding: 2rem;
  }

  .sidebar {
    padding: 1.3rem 1rem;
  }

  body.sidebar-collapsed .sidebar {
    width: 230px;
  }

  .sidebar-logo {
    width: 120px;
  }

  .main-title {
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
    margin-top: 0.25rem;
  }
}

@media (max-width: 1240px) {
  :root {
    --icon-edit: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2020h9%22%2F%3E%3Cpath%20d%3D%22M16.5%203.5a2.1%202.1%200%200%201%203%203L7%2019l-4%201%201-4Z%22%2F%3E%3C%2Fsvg%3E");
    --icon-toggle: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%202v10%22%2F%3E%3Cpath%20d%3D%22M5.5%204.5a9%209%200%201%200%2013%200%22%2F%3E%3C%2Fsvg%3E");
    --icon-delete: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%223%206%205%206%2021%206%22%2F%3E%3Cpath%20d%3D%22M19%206l-1%2014H6L5%206%22%2F%3E%3Cpath%20d%3D%22M10%2011v6%22%2F%3E%3Cpath%20d%3D%22M14%2011v6%22%2F%3E%3Cpath%20d%3D%22M9%206V4h6v2%22%2F%3E%3C%2Fsvg%3E");
    --icon-prev: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%2215%2018%209%2012%2015%206%22%2F%3E%3C%2Fsvg%3E");
    --icon-next: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%229%2018%2015%2012%209%206%22%2F%3E%3C%2Fsvg%3E");
  }

  .table-actions .action-btn {
    width: 34px;
    min-width: 34px;
    height: 32px;
    padding: 0;
    text-indent: -9999px;
    overflow: hidden;
    white-space: nowrap;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
  }

  .table-actions .action-btn[data-action="edit"] {
    background-image: var(--icon-edit);
  }

  .table-actions .action-btn[data-action="toggle"] {
    background-image: var(--icon-toggle);
  }

  .table-actions .action-btn[data-action="delete"] {
    background-image: var(--icon-delete);
  }

  #admin-prev,
  #admin-next,
  #app-users-prev,
  #app-users-next,
  #article-stats-prev,
  #article-stats-next,
  #article-prev,
  #article-next,
  #audit-prev,
  #audit-next {
    width: 34px;
    min-width: 34px;
    height: 32px;
    padding: 0;
    text-indent: -9999px;
    overflow: hidden;
    white-space: nowrap;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 14px 14px;
  }

  #admin-prev,
  #app-users-prev,
  #article-stats-prev,
  #article-prev {
    background-image: var(--icon-prev);
  }

  #admin-next,
  #app-users-next,
  #article-stats-next,
  #article-next {
    background-image: var(--icon-next);
  }

  #audit-prev {
    background-image: var(--icon-prev);
  }

  #audit-next {
    background-image: var(--icon-next);
  }
}

/* SECTION: Responsive rules */
@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
    padding: 1.4rem;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    height: 100vh;
    flex-direction: column;
    z-index: 40;
    transform: translateX(0);
    pointer-events: auto;
    border-radius: 0 22px 22px 0;
  }

  .main-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 0.4rem 0.8rem;
  }

  body.sidebar-collapsed .sidebar {
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-120%);
    pointer-events: none;
  }

  body.sidebar-collapsed .sidebar-handle {
    top: 6px;
    left: 4px;
  }

  body.sidebar-collapsed .admin-layout {
    padding-left: 2.4rem;
  }

  .main-title {
    font-size: clamp(1.25rem, 4.6vw, 1.6rem);
  }

  #welcome-pill {
    justify-self: end;
    align-self: start;
  }

  .eyebrow {
    display: none;
  }
}

@media (max-width: 401px) {
  .admin-layout {
    padding: 1rem 1rem 1.2rem 2.2rem;
  }

  .main {
    padding: 1.4rem 1.5rem;
  }

  .kpi-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .chart-card,
  .kpi-card,
  .content-card {
    padding: 1rem;
  }

  .chart-legend {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
  }

  .bar-chart {
    gap: 0.25rem;
  }

  .line-chart {
    height: 100px;
  }

  .donut-chart {
    width: 120px;
    height: 120px;
  }

  .donut-chart::after {
    width: 68px;
    height: 68px;
  }

  .kpi-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .content-section[data-section="dashboard"].is-active {
    overflow-x: hidden;
  }

  .content-section[data-section="dashboard"].is-active .chart-card {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 405px) {
  .main-header {
    grid-template-columns: 1fr;
  }

  #welcome-pill {
    justify-self: start;
    margin-top: 0.35rem;
  }

  .chart-pill--segmented {
    display: none;
  }

  .chart-action,
  .kpi-action {
    font-size: 0.55rem;
    padding: 0.25rem 0.5rem;
    letter-spacing: 0.14em;
  }

  .activity-list.audit-activity li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .activity-list.audit-activity span {
    min-width: 0;
  }
}

@media (max-width: 717px) {
  .content-section[data-section="sport-types"] .table-row,
  .content-section[data-section="sport-types"] .table-head {
    grid-template-columns: 0.8rem minmax(0, 1.4fr) auto;
    grid-template-areas: "dot name actions";
    column-gap: 0.2rem;
  }

  .content-section[data-section="sport-types"] .table-row > span:nth-child(2),
  .content-section[data-section="sport-types"] .table-row > span:nth-child(3),
  .content-section[data-section="sport-types"] .table-head > span:nth-child(2),
  .content-section[data-section="sport-types"] .table-head > span:nth-child(3),
  .content-section[data-section="sport-types"] .table-head > span:nth-child(4) {
    display: none !important;
  }

  .content-section[data-section="sport-types"] .table-row > span:nth-child(1),
  .content-section[data-section="sport-types"] .table-head > span:nth-child(1) {
    grid-area: name;
  }

  .content-section[data-section="sport-types"] .table-row > span:nth-child(4) {
    grid-area: dot;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .content-section[data-section="sport-types"] .table-head > span:nth-child(5),
  .content-section[data-section="sport-types"] .table-row .table-actions {
    grid-area: actions;
    justify-self: end;
  }

  .content-section[data-section="schools"] .table-row,
  .content-section[data-section="schools"] .table-head {
    grid-template-columns: 0.8rem minmax(0, 1.4fr) minmax(0, 1.2fr) auto;
    grid-template-areas: "dot name sports actions";
    column-gap: 0.2rem;
  }

  .content-section[data-section="schools"] .table-row > span:nth-child(2),
  .content-section[data-section="schools"] .table-head > span:nth-child(2),
  .content-section[data-section="schools"] .table-head > span:nth-child(4) {
    display: none !important;
  }

  .content-section[data-section="schools"] .table-row > span:nth-child(1),
  .content-section[data-section="schools"] .table-head > span:nth-child(1) {
    grid-area: name;
  }

  .content-section[data-section="schools"] .table-row > span:nth-child(3),
  .content-section[data-section="schools"] .table-head > span:nth-child(3) {
    grid-area: sports;
  }

  .content-section[data-section="schools"] .table-row > span:nth-child(4) {
    grid-area: dot;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .content-section[data-section="schools"] .table-head > span:nth-child(5),
  .content-section[data-section="schools"] .table-row .table-actions {
    grid-area: actions;
    justify-self: end;
  }

  .content-section[data-section="sport-types"] .badge,
  .content-section[data-section="schools"] .badge {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    letter-spacing: 0;
    border-width: 2px;
    transform: translateX(-4px);
  }

  .content-section[data-section="sport-types"] .page-size label,
  .content-section[data-section="schools"] .page-size label {
    display: none;
  }

  .content-section[data-section="admin-users"] .table-row,
  .content-section[data-section="admin-users"] .table-head {
    grid-template-columns: 0.8rem minmax(0, 1.1fr) minmax(0, 1.6fr) auto;
    grid-template-areas: "dot name email actions";
    column-gap: 0.2rem;
  }

  .content-section[data-section="admin-users"] .table-row > span:nth-child(3),
  .content-section[data-section="admin-users"] .table-head > span:nth-child(3),
  .content-section[data-section="admin-users"] .table-head > span:nth-child(4) {
    display: none !important;
  }

  .content-section[data-section="admin-users"] .table-row > span:nth-child(1),
  .content-section[data-section="admin-users"] .table-head > span:nth-child(1) {
    grid-area: name;
  }

  .content-section[data-section="admin-users"] .table-row > span:nth-child(2),
  .content-section[data-section="admin-users"] .table-head > span:nth-child(2) {
    grid-area: email;
  }

  .content-section[data-section="admin-users"] .table-row > span:nth-child(4) {
    grid-area: dot;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .content-section[data-section="admin-users"] .table-head > span:nth-child(5),
  .content-section[data-section="admin-users"] .table-row .table-actions {
    grid-area: actions;
    justify-self: end;
  }

  .content-section[data-section="admin-users"] .badge {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    letter-spacing: 0;
    border-width: 2px;
    transform: translateX(-4px);
  }

  .content-section[data-section="admin-users"] .table-actions [data-action="toggle"] {
    display: none;
  }

  .content-section[data-section="admin-users"] .page-size label {
    display: none;
  }

  .content-section[data-section="admin-users"] .table-row.table-empty,
  .content-section[data-section="app-users"] .table-row.table-empty,
  .content-section[data-section="sport-types"] .table-row.table-empty,
  .content-section[data-section="tournaments"] .table-row.table-empty,
  .content-section[data-section="schools"] .table-row.table-empty,
  .content-section[data-section="videos"] .table-row.table-empty,
  .content-section[data-section="live-events"] .table-row.table-empty,
  .content-section[data-section="articles"] .table-row.table-empty,
  .content-section[data-section="audit-log"] .table-row.table-empty {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    justify-items: center;
    text-align: center;
    padding: 1rem 0.8rem;
    font-size: 0.8rem;
  }

  .content-section[data-section="app-users"] .table-row,
  .content-section[data-section="app-users"] .table-head {
    grid-template-columns: 0.8rem minmax(0, 1.1fr) minmax(0, 1.6fr) auto;
    grid-template-areas: "dot name email actions";
    column-gap: 0.2rem;
  }

  .content-section[data-section="app-users"] .table-row > span:nth-child(3),
  .content-section[data-section="app-users"] .table-row > span:nth-child(5),
  .content-section[data-section="app-users"] .table-head > span:nth-child(3),
  .content-section[data-section="app-users"] .table-head > span:nth-child(4),
  .content-section[data-section="app-users"] .table-head > span:nth-child(5) {
    display: none !important;
  }

  .content-section[data-section="app-users"] .table-row > span:nth-child(1),
  .content-section[data-section="app-users"] .table-head > span:nth-child(1) {
    grid-area: name;
  }

  .content-section[data-section="app-users"] .table-row > span:nth-child(2),
  .content-section[data-section="app-users"] .table-head > span:nth-child(2) {
    grid-area: email;
  }

  .content-section[data-section="app-users"] .table-row > span:nth-child(4) {
    grid-area: dot;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .content-section[data-section="app-users"] .table-head > span:nth-child(6),
  .content-section[data-section="app-users"] .table-row .table-actions {
    grid-area: actions;
    justify-self: end;
  }

  .content-section[data-section="app-users"] .badge {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    letter-spacing: 0;
    border-width: 2px;
    transform: translateX(-4px);
  }

  .content-section[data-section="app-users"] .page-size label {
    display: none;
  }

  .content-section[data-section="articles"] .table-row,
  .content-section[data-section="articles"] .table-head {
    grid-template-columns: 0.8rem minmax(0, 1.5fr) minmax(0, 1fr) auto;
    grid-template-areas: "dot title created actions";
    column-gap: 0.2rem;
  }

  .content-section[data-section="articles"] .table-row > span:nth-child(2),
  .content-section[data-section="articles"] .table-head > span:nth-child(2),
  .content-section[data-section="articles"] .table-head > span:nth-child(3) {
    display: none !important;
  }

  .content-section[data-section="articles"] .table-row > span:nth-child(1),
  .content-section[data-section="articles"] .table-head > span:nth-child(1) {
    grid-area: title;
  }

  .content-section[data-section="articles"] .table-row > span:nth-child(3) {
    grid-area: dot;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .content-section[data-section="articles"] .table-row > span:nth-child(4),
  .content-section[data-section="articles"] .table-head > span:nth-child(4) {
    grid-area: created;
  }

  .content-section[data-section="articles"] .table-head > span:nth-child(5),
  .content-section[data-section="articles"] .table-row .table-actions {
    grid-area: actions;
    justify-self: end;
  }

  .content-section[data-section="articles"] .badge {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    letter-spacing: 0;
    border-width: 2px;
    transform: translateX(-4px);
  }

  .content-section[data-section="articles"] .page-size label {
    display: none;
  }

  .content-section[data-section="videos"] .table-row,
  .content-section[data-section="videos"] .table-head {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    grid-template-areas: "title school actions";
    column-gap: 0.2rem;
  }

  .content-section[data-section="videos"] .table-row > span:nth-child(1),
  .content-section[data-section="videos"] .table-head > span:nth-child(1) {
    grid-area: title;
  }

  .content-section[data-section="videos"] .table-row > span:nth-child(2),
  .content-section[data-section="videos"] .table-head > span:nth-child(2) {
    grid-area: school;
  }

  .content-section[data-section="videos"] .table-row > span:nth-child(3),
  .content-section[data-section="videos"] .table-row > span:nth-child(4),
  .content-section[data-section="videos"] .table-head > span:nth-child(3),
  .content-section[data-section="videos"] .table-head > span:nth-child(4) {
    display: none !important;
  }

  .content-section[data-section="videos"] .table-head > span:nth-child(5),
  .content-section[data-section="videos"] .table-row .table-actions {
    grid-area: actions;
    justify-self: end;
  }

  .content-section[data-section="videos"] .page-size label {
    display: none;
  }

  .content-section[data-section="live-events"] .table-row,
  .content-section[data-section="live-events"] .table-head {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    grid-template-areas: "title school actions";
    column-gap: 0.2rem;
  }

  .content-section[data-section="live-events"] .table-row > span:nth-child(1),
  .content-section[data-section="live-events"] .table-head > span:nth-child(1) {
    grid-area: title;
  }

  .content-section[data-section="live-events"] .table-row > span:nth-child(2),
  .content-section[data-section="live-events"] .table-head > span:nth-child(2) {
    grid-area: school;
  }

  .content-section[data-section="live-events"] .table-row > span:nth-child(3),
  .content-section[data-section="live-events"] .table-row > span:nth-child(4),
  .content-section[data-section="live-events"] .table-head > span:nth-child(3),
  .content-section[data-section="live-events"] .table-head > span:nth-child(4) {
    display: none !important;
  }

  .content-section[data-section="live-events"] .table-head > span:nth-child(5),
  .content-section[data-section="live-events"] .table-row .table-actions {
    grid-area: actions;
    justify-self: end;
  }

  .content-section[data-section="live-events"] .page-size label {
    display: none;
  }

  .content-section[data-section="article-stats"] .page-size label {
    display: none;
  }

  .content-section[data-section="audit-log"] .table-row,
  .content-section[data-section="audit-log"] .table-head {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }

  .content-section[data-section="audit-log"] .table-row > span:nth-child(3),
  .content-section[data-section="audit-log"] .table-head > span:nth-child(3) {
    display: none;
  }

  .content-section[data-section="audit-log"] .page-size label {
    display: none;
  }
}

@media (max-width: 649px) {
  .content-section[data-section="admin-users"] .section-header > div:not(.section-actions) {
    display: none;
  }

  .content-section[data-section="admin-users"] .section-actions {
    width: 100%;
    justify-content: space-between;
  }

  .content-section[data-section="admin-users"] .search-field {
    flex: 1;
  }

  .content-section[data-section="admin-users"] .search-field input {
    min-width: 0;
    width: 100%;
  }

  .content-section[data-section="admin-users"] #admin-add-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    letter-spacing: 0;
    text-indent: -9999px;
    overflow: hidden;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cline%20x1%3D%2212%22%20y1%3D%225%22%20x2%3D%2212%22%20y2%3D%2219%22%2F%3E%3Cline%20x1%3D%225%22%20y1%3D%2212%22%20x2%3D%2219%22%20y2%3D%2212%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
  }

  .content-section[data-section="admin-users"] #admin-add-btn::before,
  .content-section[data-section="admin-users"] #admin-add-btn::after {
    content: none;
  }

  .content-section[data-section="app-users"] .section-header > div:not(.section-actions),
  .content-section[data-section="article-stats"] .section-header > div:not(.section-actions),
  .content-section[data-section="articles"] .section-header > div:not(.section-actions),
  .content-section[data-section="audit-log"] .section-header > div:not(.section-actions) {
    display: none;
  }

  .content-section[data-section="app-users"] .section-actions,
  .content-section[data-section="articles"] .section-actions,
  .content-section[data-section="audit-log"] .section-header {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .content-section[data-section="app-users"] .search-field,
  .content-section[data-section="articles"] .search-field {
    flex: 1 1 220px;
  }

  .content-section[data-section="app-users"] .search-field input,
  .content-section[data-section="articles"] .search-field input {
    min-width: 0;
    width: 100%;
  }

  .content-section[data-section="articles"] #article-add-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    letter-spacing: 0;
    text-indent: -9999px;
    overflow: hidden;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cline%20x1%3D%2212%22%20y1%3D%225%22%20x2%3D%2212%22%20y2%3D%2219%22%2F%3E%3Cline%20x1%3D%225%22%20y1%3D%2212%22%20x2%3D%2219%22%20y2%3D%2212%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
  }

  .content-section[data-section="articles"] #article-add-btn::before,
  .content-section[data-section="articles"] #article-add-btn::after {
    content: none;
  }
}

@media (max-width: 535px) {
  .content-section[data-section="admin-users"] .table-row,
  .content-section[data-section="admin-users"] .table-head {
    grid-template-columns: 0.6rem minmax(0, 1fr) minmax(0, 1.3fr) auto;
    column-gap: 0.12rem;
  }

  .content-section[data-section="admin-users"] .table-row > span,
  .content-section[data-section="admin-users"] .table-head > span {
    font-size: 0.78rem;
  }

  .content-section[data-section="app-users"] .table-row,
  .content-section[data-section="app-users"] .table-head,
  .content-section[data-section="articles"] .table-row,
  .content-section[data-section="articles"] .table-head,
  .content-section[data-section="article-stats"] .table-row,
  .content-section[data-section="article-stats"] .table-head,
  .content-section[data-section="audit-log"] .table-row,
  .content-section[data-section="audit-log"] .table-head {
    column-gap: 0.12rem;
  }

  .content-section[data-section="app-users"] .table-row > span,
  .content-section[data-section="app-users"] .table-head > span,
  .content-section[data-section="articles"] .table-row > span,
  .content-section[data-section="articles"] .table-head > span,
  .content-section[data-section="article-stats"] .table-row > span,
  .content-section[data-section="article-stats"] .table-head > span,
  .content-section[data-section="audit-log"] .table-row > span,
  .content-section[data-section="audit-log"] .table-head > span {
    font-size: 0.78rem;
  }
}

@media (max-width: 511px) {
  .content-section[data-section="admin-users"] .table-row,
  .content-section[data-section="admin-users"] .table-head {
    grid-template-columns: 1.1rem minmax(0, 1fr) minmax(0, 1.4fr);
    grid-template-areas: "edit name email";
    column-gap: 0.4rem;
  }

  .content-section[data-section="admin-users"] .table-row > span:nth-child(4),
  .content-section[data-section="admin-users"] .badge {
    display: none !important;
  }

  .content-section[data-section="admin-users"] .table-head > span:nth-child(5) {
    display: none;
  }

  .content-section[data-section="admin-users"] .table-row .table-actions {
    grid-area: edit;
    justify-self: start;
  }

  .content-section[data-section="admin-users"] .table-actions .action-btn {
    width: 18px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background-color: transparent;
    box-shadow: none;
  }

  .content-section[data-section="admin-users"] .table-actions .action-btn::before,
  .content-section[data-section="admin-users"] .table-actions .action-btn::after {
    content: none;
  }

  .content-section[data-section="admin-users"] .table-actions .action-btn[data-action="edit"] {
    background-image: var(--icon-edit);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
  }

  .content-section[data-section="admin-users"] #admin-count {
    display: none;
  }

  .content-section[data-section="app-users"] .table-row,
  .content-section[data-section="app-users"] .table-head {
    grid-template-columns: 1.1rem minmax(0, 1fr) minmax(0, 1.4fr);
    grid-template-areas: "edit name email";
    column-gap: 0.4rem;
  }

  .content-section[data-section="app-users"] .table-row > span:nth-child(3),
  .content-section[data-section="app-users"] .table-row > span:nth-child(4),
  .content-section[data-section="app-users"] .table-row > span:nth-child(5),
  .content-section[data-section="app-users"] .badge {
    display: none !important;
  }

  .content-section[data-section="app-users"] .table-head > span:nth-child(3),
  .content-section[data-section="app-users"] .table-head > span:nth-child(4),
  .content-section[data-section="app-users"] .table-head > span:nth-child(5),
  .content-section[data-section="app-users"] .table-head > span:nth-child(6) {
    display: none;
  }

  .content-section[data-section="app-users"] .table-row .table-actions {
    grid-area: edit;
    justify-self: start;
  }

  .content-section[data-section="app-users"] .table-actions .action-btn {
    width: 18px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background-color: transparent;
    box-shadow: none;
  }

  .content-section[data-section="app-users"] .table-actions .action-btn::before,
  .content-section[data-section="app-users"] .table-actions .action-btn::after {
    content: none;
  }

  .content-section[data-section="app-users"] .table-actions .action-btn[data-action="edit"] {
    background-image: var(--icon-edit);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
  }

  .content-section[data-section="app-users"] .table-actions .action-btn[data-action="toggle"] {
    display: none;
  }

  .content-section[data-section="app-users"] #app-users-count {
    display: none;
  }

  .content-section[data-section="articles"] .table-row,
  .content-section[data-section="articles"] .table-head {
    grid-template-columns: 1.1rem minmax(0, 1.4fr) minmax(0, 1fr);
    grid-template-areas: "edit title created";
    column-gap: 0.4rem;
  }

  .content-section[data-section="articles"] .table-row > span:nth-child(3),
  .content-section[data-section="articles"] .badge {
    display: none !important;
  }

  .content-section[data-section="articles"] .table-row > span:nth-child(2) {
    display: none !important;
  }

  .content-section[data-section="articles"] .table-head > span:nth-child(5) {
    display: none;
  }

  .content-section[data-section="articles"] .table-row .table-actions {
    grid-area: edit;
    justify-self: start;
  }

  .content-section[data-section="articles"] .table-actions .action-btn {
    width: 18px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background-color: transparent;
    box-shadow: none;
  }

  .content-section[data-section="articles"] .table-actions .action-btn::before,
  .content-section[data-section="articles"] .table-actions .action-btn::after {
    content: none;
  }

  .content-section[data-section="articles"] .table-actions .action-btn[data-action="edit"] {
    background-image: var(--icon-edit);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
  }

  .content-section[data-section="articles"] .table-actions .action-btn[data-action="delete"] {
    display: none;
  }

  .content-section[data-section="articles"] #article-count {
    display: none;
  }

  .content-section[data-section="videos"] #video-count {
    display: none;
  }

  .content-section[data-section="audit-log"] #audit-count {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- School form: status + sports picker (admin) --- */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-field--status {
  max-width: 220px;
}

.sports-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sports-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.sports-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 1.6rem;
  align-items: center;
}
.sports-tags-empty {
  font-size: 0.8rem;
  color: rgba(224, 235, 238, 0.45);
}
.sport-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.35rem 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #062b27;
  background: var(--accent, #00b8a1);
  white-space: nowrap;
}
.sport-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #062b27;
  background: rgba(6, 43, 39, 0.2);
}
.sport-tag-remove:hover {
  background: rgba(6, 43, 39, 0.38);
}
.sports-choose-btn {
  flex: 0 0 auto;
}

.sports-popup {
  margin-top: 0.4rem;
  padding: 0.85rem;
  border: 1px solid rgba(0, 184, 161, 0.35);
  border-radius: 12px;
  background: rgba(0, 184, 161, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.sports-popup[hidden] {
  display: none;
}
.sports-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sports-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* --- Schools table: thumbnail cell + icon action buttons --- */
.school-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.school-thumb {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
}
.school-thumb {
  padding: 3px;
}
.school-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.school-thumb--empty {
  color: var(--accent, #00b8a1);
  background: rgba(0, 184, 161, 0.14);
  font-weight: 600;
  font-size: 0.9rem;
}
.table-actions--icons {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(224, 235, 238, 0.16);
  background: transparent;
  color: rgba(224, 235, 238, 0.8);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover {
  color: var(--accent, #00b8a1);
  border-color: rgba(0, 184, 161, 0.5);
  background: rgba(0, 184, 161, 0.1);
}

/* --- Verified schools and team editors --- */
.verified-link-field,
.team-editor {
  display: grid;
  gap: 0.5rem;
}

.verified-link-row,
.team-editor-head,
.team-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.verified-link-row .form-input {
  flex: 1 1 240px;
}

.lookup-results {
  display: grid;
  gap: 0.35rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 0.45rem;
  border: 1px solid rgba(0, 184, 161, 0.25);
  border-radius: 12px;
  background: rgba(0, 184, 161, 0.05);
}

.lookup-results[hidden] {
  display: none;
}

.lookup-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  border: 1px solid rgba(224, 235, 238, 0.1);
  border-radius: 10px;
  background: rgba(7, 11, 15, 0.72);
  color: var(--ink);
  padding: 0.55rem 0.7rem;
  text-align: left;
  cursor: pointer;
}

.lookup-option:hover {
  border-color: rgba(0, 184, 161, 0.45);
}

.team-list {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(7, 11, 15, 0.35);
}

.structure-defaults-list {
  display: grid;
  gap: 0.7rem;
}

.structure-block {
  display: grid;
  gap: 0.5rem;
  padding: 0.65rem;
  border: 1px solid rgba(0, 184, 161, 0.22);
  border-radius: 12px;
  background: rgba(0, 184, 161, 0.05);
}

.structure-block-head {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1fr) auto 34px;
  gap: 0.45rem;
  align-items: center;
}

.structure-toggle {
  font-size: 1rem;
  font-weight: 600;
}

.structure-block-body {
  display: grid;
  gap: 0.45rem;
}

.structure-block.is-collapsed .structure-block-body {
  display: none;
}

.structure-block.is-collapsed {
  background: rgba(0, 184, 161, 0.025);
}

.age-group-list {
  display: grid;
  gap: 0.45rem;
}

.age-group-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) minmax(150px, auto) 34px;
  gap: 0.45rem;
  align-items: center;
}

.age-group-row.is-single {
  grid-template-columns: minmax(150px, 1fr) minmax(150px, auto) 34px;
}

.age-group-row.is-single [data-age-field="designations"] {
  display: none;
}

.age-single-option {
  min-height: 34px;
  align-items: center;
  white-space: nowrap;
}

.structure-preview {
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(7, 11, 15, 0.45);
  color: rgba(224, 235, 238, 0.7);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* School teams — collapsible per-sport groups with removable tags. */
.team-list--groups {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  border: none;
  background: transparent;
}

.team-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(7, 11, 15, 0.55);
  overflow: hidden;
}

.team-group-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  user-select: none;
}

.team-group-toggle {
  width: 1rem;
  color: rgba(0, 184, 161, 0.85);
}

.team-group-name {
  color: var(--ink);
  font-weight: 600;
}

.team-group-count {
  margin-left: auto;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 184, 161, 0.75);
  white-space: nowrap;
}

.team-group-remove {
  border: none;
  background: transparent;
  color: rgba(224, 235, 238, 0.5);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 0.15rem;
  cursor: pointer;
}

.team-group-remove:hover {
  color: #ff6b6b;
}

.team-group-body {
  display: grid;
  gap: 0.6rem;
  padding: 0 0.75rem 0.75rem;
}

.team-group.is-collapsed .team-group-body {
  display: none;
}

.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.team-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}

.team-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) minmax(110px, 1fr) 80px 34px;
  gap: 0.45rem;
  align-items: center;
}

.team-row--template {
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) 90px 34px;
}

.team-row .icon-btn {
  width: 34px;
  height: 34px;
}

.team-group-title {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 184, 161, 0.75);
}

.color-swatches {
  display: inline-flex;
  gap: 0.25rem;
  vertical-align: middle;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

/* --- Manage school admins modal --- */
.school-for-admins {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent, #00b8a1);
}
.admins-add-row {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}
.admins-add-btn-wrap {
  display: flex;
  align-items: flex-end;
}
.admins-section {
  margin-top: 0.9rem;
}
.admins-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
}
.admins-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(224, 235, 238, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.admins-row-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.15rem;
}
.admins-row-name {
  font-size: 0.9rem;
  color: var(--ink, #e0ebee);
}
.admins-row-email {
  font-size: 0.78rem;
  color: rgba(224, 235, 238, 0.5);
}
.admins-badge {
  font-size: 0.66rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.16);
  color: #eab308;
  vertical-align: middle;
}
.admins-row-actions {
  display: flex;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.admins-danger {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.32);
}
.admins-danger:hover {
  background: rgba(252, 165, 165, 0.12);
}

/* --- Themed dialog (AdminUI.confirm / showLink) --- */
.adminui-dialog-text {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink, #e0ebee);
}
.adminui-dialog-text[hidden] { display: none; }
.adminui-linkwrap {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.4rem;
}
.adminui-linkwrap[hidden] { display: none; }
.adminui-linkwrap .form-input {
  flex: 1 1 auto;
  min-width: 0;
}
.adminui-linkwrap .btn-primary { flex: 0 0 auto; }
.btn-danger {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}
.btn-danger:hover { background: #b91c1c !important; border-color: #b91c1c !important; }

/* === Streaming registry (moved from styles.css — dashboard.html loads only this sheet) === */

.streaming-status {
  min-height: 1.4rem;
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.streaming-status.is-error {
  color: #c23b3b;
}

.streaming-modal-status {
  min-height: 1.2rem;
  margin: 0;
}

.streaming-form--camera .streaming-modal-status {
  grid-column: 1 / -1;
}

.streaming-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.streaming-add-label {
  display: block;
  margin: 0 0 0.3rem;
  color: rgba(224, 235, 238, 0.62);
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.streaming-section-header {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, auto) minmax(280px, 1fr);
}

.streaming-list-search-field {
  justify-self: center;
  align-self: end;
}

.streaming-school-actions {
  align-items: flex-start;
  justify-self: end;
}

.streaming-school-lookup {
  position: relative;
  width: min(420px, 100%);
}

.streaming-school-lookup .lookup-results {
  position: absolute;
  z-index: 60;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  background: rgba(8, 12, 16, 0.98);
  box-shadow: var(--shadow);
}

.streaming-schools-table .table-row {
  grid-template-columns: minmax(180px, 1.45fr) 80px 110px minmax(160px, 1fr) minmax(170px, auto);
}

.ops-accounts-table .table-row {
  grid-template-columns: minmax(160px, 1.2fr) minmax(220px, 1.4fr) 110px 100px minmax(95px, auto);
}

.streaming-schools-table .table-row > span:nth-child(2),
.streaming-schools-table .table-head > span:nth-child(2) {
  justify-self: center;
  text-align: center;
}

.streaming-ready-cell {
  display: flex;
  justify-content: center;
}

.streaming-school-row small,
.streaming-subtle {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.streaming-ready-btn {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(224, 235, 238, 0.18);
  border-radius: 50%;
  color: rgba(224, 235, 238, 0.52);
  background: rgba(255, 255, 255, 0.04);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.streaming-ready-btn.is-ready {
  border-color: rgba(0, 184, 161, 0.6);
  color: #06120f;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 184, 161, 0.14);
}

.streaming-card {
  padding: 1.25rem;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--panel);
}

.streaming-card--wide {
  grid-column: 1 / -1;
}

.streaming-card-header,
.streaming-item,
.streaming-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.streaming-card h3,
.streaming-item strong {
  margin: 0;
}

.streaming-card > p,
.streaming-item p,
.streaming-empty {
  color: var(--ink-soft);
}

.streaming-form {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.streaming-form--camera {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

.streaming-form--channel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.streaming-form--channel .btn-primary {
  justify-self: start;
}

.streaming-field {
  display: grid;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.streaming-field-heading,
.form-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.streaming-field-heading label,
.streaming-field > label {
  color: inherit;
}

.streaming-form--ops {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

.streaming-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.streaming-item {
  padding: 0.8rem;
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.streaming-item p {
  margin: 0.25rem 0 0;
}

.streaming-camera-meta {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(224, 235, 238, 0.62);
}

.streaming-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.streaming-warning {
  display: inline-block;
  margin-left: 0.45rem;
  color: #b86b00;
  font-weight: 700;
}

.streaming-channel-list {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.streaming-connection-health {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.streaming-connection-health p {
  margin: 0.25rem 0 0.65rem;
}

.streaming-connection-health dl,
.streaming-connection-health dl div {
  display: grid;
  gap: 0.25rem;
}

.streaming-connection-health dl {
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.streaming-connection-health dt {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.streaming-connection-health dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ops-linked-search {
  margin-bottom: 0.4rem;
}

.ops-linked-item {
  min-height: 0;
  padding: 0.5rem 0.65rem;
}

.ops-linked-item .school-thumb {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.ops-linked-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.ops-linked-copy strong {
  font-size: 0.85rem;
}

.ops-linked-copy span {
  color: rgba(224, 235, 238, 0.62);
  font-size: 0.72rem;
  line-height: 1.3;
}

.streaming-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.streaming-toggle > label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.field-help {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.field-help-button {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(0, 184, 161, 0.55);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(0, 184, 161, 0.08);
  font: 700 0.72rem/1 "Space Grotesk", sans-serif;
  cursor: pointer;
}

.field-help-button:hover,
.field-help-button:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 184, 161, 0.16);
}

.field-help-popover {
  position: fixed;
  z-index: 1000;
  width: min(340px, calc(100vw - 3rem));
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(0, 184, 161, 0.4);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(8, 12, 16, 0.98);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
}

.field-help-popover[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .streaming-grid,
  .streaming-form--camera,
  .streaming-form--channel,
  .streaming-form--ops {
    grid-template-columns: 1fr;
  }

  .streaming-schools-table .table-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-accounts-table .table-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .streaming-section-header {
    grid-template-columns: 1fr;
  }

  .streaming-list-search-field,
  .streaming-school-actions {
    justify-self: stretch;
  }

  .streaming-card--wide {
    grid-column: auto;
  }
}
.live-event-side,
.tournament-permission {
  border: 1px solid rgba(0, 184, 161, 0.25);
  border-radius: 12px;
  padding: 12px;
}

.live-event-side {
  display: grid;
  gap: 0.7rem;
  grid-column: span 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-event-side[hidden],
.tournament-permission[hidden] {
  display: none;
}

.live-event-side legend,
.tournament-permission legend {
  color: rgba(0, 184, 161, 0.88);
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 0 6px;
  text-transform: uppercase;
}

@media (max-width: 717px) {
  .tournaments-table .table-row:not(.table-empty) {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .tournaments-table .table-row > span:nth-child(2),
  .tournaments-table .table-row > span:nth-child(4) {
    display: none;
  }

  .live-event-side {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}
.greenvu-visibility {
  align-items: center;
  background: rgba(216, 165, 38, 0.14);
  border: 1px solid rgba(216, 165, 38, 0.55);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  grid-row: 2;
  justify-content: space-between;
  margin: 0;
  min-height: 0;
  padding: 7px 10px;
}

.greenvu-visibility[hidden] {
  display: none;
}

.greenvu-visibility strong {
  font-size: 0.78rem;
  line-height: 1.2;
}

.greenvu-visibility p {
  font-size: 0.72rem;
  line-height: 1.25;
  margin: 1px 0 0;
}

.greenvu-visibility form {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.greenvu-visibility form .form-input {
  font-size: 0.75rem;
  height: 34px;
  min-width: 130px;
  padding: 6px 10px;
}

#greenvu-visibility-reason {
  width: min(220px, 20vw);
}

.greenvu-visibility form .btn-primary,
.greenvu-visibility form .btn-ghost {
  font-size: 0.56rem;
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .greenvu-visibility {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .greenvu-visibility form {
    margin-left: 0;
    width: 100%;
  }

  #greenvu-visibility-reason {
    flex: 1 1 180px;
    width: auto;
  }
}
