body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

body.modal-open {
  overflow: hidden;
}

.wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: #111827;
  border: 1px solid #243244;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.login-card {
  max-width: 520px;
  margin: 48px auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.grid-main {
  align-items: start;
}

.stats {
  margin-bottom: 16px;
}

.stats-5 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stats .card {
  text-align: center;
}

.stats .card div {
  font-size: 1.8rem;
  font-weight: 700;
}

input,
select,
textarea,
button {
  width: 100%;
  padding: 11px 12px;
  margin: 0;
  border-radius: 10px;
  border: 1px solid #334155;
  box-sizing: border-box;
  background: #0b1220;
  color: #e5e7eb;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

button {
  cursor: pointer;
  background: #22c55e;
  color: white;
  border: none;
  font-weight: 600;
}

button.secondary {
  background: #475569;
}

button.danger {
  background: #dc2626;
}

button.score {
  background: #0ea5e9;
}

button.finish {
  background: #f59e0b;
}

button.small-btn {
  width: auto;
  min-width: 100px;
}

.hidden {
  display: none !important;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scope-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.session-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
}

.label-inline {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  font-size: 0.9rem;
  white-space: nowrap;
}

.form-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-grid {
  grid-template-columns: 2fr 1fr;
}

.full-row {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions button {
  width: auto;
  min-width: 130px;
}

.sticky-actions {
  margin-bottom: 16px;
}

.data-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.data-list li {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid #223045;
}

.item-title {
  font-size: 1rem;
  font-weight: 700;
}

.item-meta {
  color: #cbd5e1;
  margin-top: 4px;
  line-height: 1.45;
}

.muted {
  color: #94a3b8;
}

.scoreline {
  font-weight: bold;
  margin-top: 4px;
}

.inline-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 12px;
}


.match-filter-panel {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.filter-actions {
  display: flex;
  align-items: end;
}

.alert {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.empty-state {
  color: #94a3b8;
  font-style: italic;
}

a {
  color: #38bdf8;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 40;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
}

.modal-panel {
  position: relative;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #111827;
  border: 1px solid #243244;
  border-radius: 18px;
  padding: 20px;
  z-index: 1;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
}

.modal-actions {
  margin-top: 12px;
}

#loginMsg {
  white-space: pre-wrap;
  color: #fca5a5;
}

@media (max-width: 980px) {
  .scope-card,
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .session-grid,
  .three-col,
  .two-col,
  .filter-panel,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }
}


.stats-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.mini-stats .card {
  padding: 16px;
}

#billingCurrentSubscription {
  margin-top: 10px;
}

.readonly-chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.35);
  color: #fde68a;
  font-size: 0.82rem;
}


.preview-box {
  margin-top: 12px;
  white-space: pre-wrap;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
  max-height: 380px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.5;
}

.checkbox-row {
  display: flex;
  align-items: end;
}

.checkbox-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
}

#generationParticipants {
  min-height: 180px;
}


.tenant-grid {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed #334155;
}

.tenant-preview {
  margin: 10px 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.item-meta a {
  color: #7dd3fc;
  text-decoration: none;
}

.item-meta a:hover {
  text-decoration: underline;
}

.portal-grid {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #334155;
}

.portal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #bbf7d0;
  font-size: 0.8rem;
}

.tenant-preview {
  margin-top: 12px;
}

.form-grid textarea {
  min-height: 92px;
}

.data-list .item-meta a {
  color: #7dd3fc;
}


.registration-panel {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.readonly-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  font-size: 0.82rem;
}

.pill.success {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.pill.warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}

.pill.danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}


.match-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(10, 17, 30, 0.96) 100%);
}

.match-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.match-card-main {
  min-width: 0;
}

.match-card-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.match-status-badge,
.match-context-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.match-status-badge {
  font-weight: 700;
}

.match-status-scheduled {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.match-status-live {
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #7dd3fc;
}

.match-status-finished {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.match-context-badge {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #fde68a;
}

.match-score-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 14px 0 12px;
}

.match-score-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.match-score-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-score-value {
  flex-shrink: 0;
  min-width: 36px;
  text-align: right;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: #f8fafc;
}

.match-score-separator {
  font-size: 1.7rem;
  font-weight: 800;
  color: #94a3b8;
}

.match-context-pills {
  margin-top: 0;
  margin-bottom: 12px;
}

.match-pill {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.18);
}

@media (max-width: 860px) {
  .match-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .match-card-status {
    justify-content: flex-start;
  }

  .match-score-strip {
    grid-template-columns: 1fr;
  }

  .match-score-separator {
    display: none;
  }
}


.view-hidden {
  display: none !important;
}

.admin-view-shell {
  position: sticky;
  top: 16px;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.admin-view-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-view-head h2 {
  margin: 0 0 6px;
}

.admin-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-view-tab {
  width: auto;
  min-width: 150px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.95);
}

.admin-view-tab.active {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18) inset;
}

.admin-view-links-wrap {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 12px;
}

.admin-view-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-view-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  color: #bae6fd;
  text-decoration: none;
  font-size: 0.9rem;
}

.admin-view-link:hover {
  background: rgba(14, 165, 233, 0.18);
}

@media (max-width: 900px) {
  .admin-view-shell {
    position: static;
  }

  .admin-view-tab {
    flex: 1 1 200px;
  }
}


/* Safe block 13.1 — vues métier à gauche + alignement permissions */
.admin-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  position: relative;
  min-width: 0;
  min-height: var(--admin-view-shell-reserved, 0px);
}

.admin-content {
  min-width: 0;
}

.admin-sidebar .admin-view-shell {
  position: fixed;
  top: var(--admin-sticky-top);
  left: var(--admin-view-shell-left, auto);
  width: var(--admin-view-shell-width, 280px);
  margin-bottom: 0;
  max-height: var(--admin-view-shell-max-height, calc(100vh - 32px));
  overflow: auto;
}

.admin-content > *:last-child {
  margin-bottom: 0;
}

.admin-sidebar .admin-view-head {
  display: grid;
  gap: 12px;
}

.admin-sidebar .admin-view-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.admin-sidebar .admin-view-link {
  justify-content: flex-start;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .admin-workspace {
    grid-template-columns: 1fr;
  }

  .admin-sidebar .admin-view-shell {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .admin-sidebar .admin-view-links {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-sidebar .admin-view-links {
    grid-template-columns: 1fr;
  }
}



/* Safe block 14 — header sticky compact + vues métier qui accompagnent le scroll */
#app > header.topbar {
  position: sticky;
  top: 12px;
  z-index: 42;
  backdrop-filter: blur(12px);
  background: rgba(9, 18, 44, 0.92);
  transition: padding 0.22s ease, gap 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

#app > header.topbar h1 {
  transition: font-size 0.22s ease, margin 0.22s ease;
}

#app > header.topbar .muted {
  transition: opacity 0.18s ease, max-height 0.18s ease, margin 0.18s ease;
  max-height: 90px;
  overflow: hidden;
}

.admin-sidebar .admin-view-shell {
  top: var(--admin-sticky-top);
  transition: top 0.22s ease, padding 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  background: rgba(9, 18, 44, 0.9);
}

body.admin-scroll-compact #app > header.topbar {
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 10px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34);
}

body.admin-scroll-compact #app > header.topbar h1 {
  font-size: 1.9rem;
  margin-bottom: 0;
}

body.admin-scroll-compact #app > header.topbar .muted {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  pointer-events: none;
}

body.admin-scroll-compact .admin-sidebar .admin-view-shell {
  top: var(--admin-sticky-top);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34);
}

.admin-view-link.active {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.36);
  color: #dcfce7;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.14) inset;
}

@media (max-width: 1180px) {
  #app > header.topbar {
    position: static;
    backdrop-filter: none;
  }

  .admin-sidebar .admin-view-shell {
    top: auto;
    background: transparent;
  }

  body.admin-scroll-compact #app > header.topbar .muted {
    opacity: 1;
    max-height: none;
    pointer-events: auto;
  }
}


/* Safe block 14.1 — synchro dynamique entre header sticky et vues métier */
:root {
  --admin-topbar-height: 110px;
  --admin-topbar-gap: 16px;
  --admin-sticky-top: calc(var(--admin-topbar-height) + var(--admin-topbar-gap));
  --admin-view-shell-left: 0px;
  --admin-view-shell-width: 280px;
  --admin-view-shell-max-height: calc(100vh - var(--admin-sticky-top) - 16px);
  --admin-view-shell-reserved: 0px;
}

.admin-sidebar .admin-view-shell {
  top: var(--admin-sticky-top);
}

body.admin-scroll-compact .admin-sidebar .admin-view-shell {
  top: var(--admin-sticky-top);
}

.admin-content section[id],
.admin-content .card[id] {
  scroll-margin-top: calc(var(--admin-sticky-top) + 12px);
}


/* Safe block 14.4 — largeur réelle du rail gauche sans débordement */
.admin-sidebar .admin-view-shell {
  box-sizing: border-box;
  max-width: calc(100vw - var(--admin-view-shell-left, 0px) - 24px);
}


/* Safe block 15 — hiérarchie visuelle renforcée dans le rail gauche */
.admin-sidebar .admin-view-shell {
  border-color: rgba(56, 189, 248, 0.16);
  background: linear-gradient(180deg, rgba(8, 17, 39, 0.96) 0%, rgba(9, 18, 44, 0.92) 100%);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
}

.admin-sidebar .admin-view-shell::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 18px 0 0 18px;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.95) 0%, rgba(14, 165, 233, 0.85) 100%);
  opacity: 0.9;
}

.admin-view-head {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.admin-view-head > div:first-child {
  padding-right: 12px;
}

.admin-view-head h2 {
  font-size: 2rem;
  line-height: 1.05;
}

#adminViewDescription {
  line-height: 1.4;
  max-width: 34ch;
}

.admin-view-head .badge {
  align-self: start;
  background: rgba(14, 165, 233, 0.08);
}

.admin-view-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-view-tabs::before {
  content: 'VUE ACTIVE';
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: -2px;
}

.admin-view-tab {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.admin-view-tab::after {
  content: '›';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(148, 163, 184, 0.9);
  font-size: 1rem;
}

.admin-view-tab:hover {
  transform: translateX(2px);
  border-color: rgba(56, 189, 248, 0.26);
}

.admin-view-tab.active {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.22) 0%, rgba(22, 163, 74, 0.16) 100%);
  border-color: rgba(34, 197, 94, 0.52);
  color: #ecfdf5;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.16);
}

.admin-view-tab.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: #22c55e;
}

.admin-view-tab.active::after {
  color: #dcfce7;
}

.admin-view-links-wrap {
  position: relative;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 16px;
}

.admin-view-links-wrap::after {
  content: attr(data-visible-count) ' visibles';
  position: absolute;
  top: 14px;
  right: 0;
  font-size: 0.78rem;
  color: #7dd3fc;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.18);
}

.admin-view-links-wrap .label-inline {
  margin-bottom: 10px;
}

.admin-view-links {
  gap: 10px;
}

.admin-view-link {
  position: relative;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px 10px 14px;
  border-radius: 14px;
  background: rgba(8, 47, 73, 0.18);
  border: 1px solid rgba(14, 165, 233, 0.18);
  color: #dbeafe;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-view-link::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.7);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
  flex: 0 0 auto;
}

.admin-view-link::after {
  content: '→';
  color: rgba(125, 211, 252, 0.86);
  margin-left: auto;
}

.admin-view-link:hover {
  transform: translateX(2px);
  background: rgba(14, 165, 233, 0.16);
  border-color: rgba(56, 189, 248, 0.32);
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.06);
}

.admin-view-link.active {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.18) 0%, rgba(8, 47, 73, 0.32) 100%);
  border-color: rgba(34, 197, 94, 0.38);
  color: #f0fdf4;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.admin-view-link.active::before {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.admin-view-link.active::after {
  color: #bbf7d0;
}

#adminViewShell[data-view-mode="exploitation"]::before {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.95) 0%, rgba(16, 185, 129, 0.85) 100%);
}

#adminViewShell[data-view-mode="gestion"]::before {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.95) 0%, rgba(14, 165, 233, 0.85) 100%);
}

#adminViewShell[data-view-mode="platform"]::before,
#adminViewShell[data-view-mode="plateforme"]::before {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.95) 0%, rgba(14, 165, 233, 0.85) 100%);
}

#adminViewShell[data-view-mode="all"]::before {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.9) 0%, rgba(56, 189, 248, 0.8) 100%);
}

body.admin-scroll-compact .admin-sidebar .admin-view-shell {
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.36);
}

@media (max-width: 1180px) {
  .admin-view-head {
    padding-bottom: 12px;
  }

  .admin-view-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-view-tabs::before {
    grid-column: 1 / -1;
  }

  .admin-view-links-wrap::after {
    position: static;
    display: inline-flex;
    margin-bottom: 10px;
  }
}

@media (max-width: 760px) {
  .admin-view-tabs {
    grid-template-columns: 1fr;
  }

  .admin-view-head {
    gap: 12px;
  }
}


/* Safe block 17.2 — session compacte inline + vues métier conservées */
.session-inline-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 8px;
  padding: 0;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid #243244;
  color: #e5e7eb;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.session-badge-compact {
  font-size: 0.96rem;
  font-weight: 600;
}

.session-badge-compact strong {
  font-size: 0.96rem;
  font-weight: 700;
}

.session-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  font-size: 0.95rem;
}

.session-summary-inline {
  margin: 2px 0 18px;
  color: #93c5fd;
  font-size: 0.9rem;
}

.admin-workspace {
  align-items: start;
}

@media (max-width: 900px) {
  .session-inline-bar {
    gap: 8px;
  }

  .session-badge {
    width: 100%;
    justify-content: flex-start;
    border-radius: 14px;
  }
}


/* SAFE BLOCK 17.4 — inline session UTF-8 safe */
.session-inline-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 2px 0 8px;
  padding: 0 2px;
  color: #cfe3ff;
  font-size: 14px;
}

.session-inline-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e8f1ff;
}

.session-inline-entry strong {
  font-weight: 600;
}

.session-inline-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 13px;
  opacity: .9;
}

.session-inline-dot {
  color: #5f7390;
}

.session-summary-inline {
  margin: 0 0 14px;
  font-size: 13px;
}

/* remove old pill styling if present */
.session-badge,
.session-badge-compact,
.session-icon {
  all: unset;
}

@media (max-width: 900px) {
  .session-inline-bar {
    gap: 8px;
    font-size: 13px;
  }
  .session-inline-dot {
    display: none;
  }
  .session-inline-entry {
    width: 100%;
  }
}


/* SAFE BLOCK 17.5 — session inline finale toujours visible */
.session-inline-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 0 2px;
  color: #d7e6ff;
  font-size: 14px;
}

.session-inline-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.session-inline-label {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8ea7c8;
}

.session-inline-entry strong {
  font-weight: 600;
  color: #f4f8ff;
}

.session-inline-sep {
  color: #5f7390;
}

.session-inline-help {
  margin: 0 0 14px;
  color: #8ea7c8;
  font-size: 13px;
}

@media (max-width: 900px) {
  .session-inline-shell {
    gap: 8px;
  }
  .session-inline-entry {
    width: 100%;
    gap: 6px;
  }
  .session-inline-sep {
    display: none;
  }
}


/* Safe block 19 — ancre session fiable + Tournois/Génération empilés */
.session-inline-wrap {
  scroll-margin-top: calc(var(--admin-topbar-height, 96px) + 24px);
}

.session-inline-wrap:target {
  animation: sessionAnchorPulse 1.2s ease;
}

@keyframes sessionAnchorPulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.28); border-radius: 12px; }
  100% { box-shadow: 0 0 0 12px rgba(56, 189, 248, 0); border-radius: 12px; }
}

#app section[data-admin-key="tournaments"],
#app section[data-admin-key="generation"] {
  grid-column: 1 / -1;
}

#app section[data-admin-key="tournaments"] .form-grid.two-col,
#app section[data-admin-key="generation"] .form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  #app section[data-admin-key="tournaments"] .form-grid.two-col,
  #app section[data-admin-key="generation"] .form-grid.two-col {
    grid-template-columns: 1fr;
  }
}


/* ===== Bloc 21.7 — réintégration complète ===== */
#adminModeBarShell {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin: 16px 0 18px;
}

.admin-mode-bar-shell {
  padding: 18px 20px;
}

.admin-mode-bar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.admin-mode-bar-head h2 {
  margin: 0;
  font-size: 1.8rem;
}

.admin-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-mode-tab {
  appearance: none;
  border: 1px solid rgba(78, 190, 255, 0.22);
  background: rgba(6, 17, 45, 0.9);
  color: #eef4ff;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.admin-mode-tab:hover {
  border-color: rgba(78, 190, 255, 0.46);
  transform: translateY(-1px);
}

.admin-mode-tab.active {
  background: linear-gradient(180deg, rgba(8, 35, 88, 0.95), rgba(9, 24, 61, 0.95));
  border-color: #1fe38a;
  box-shadow: inset 0 -3px 0 rgba(31, 227, 138, 0.95);
}

.admin-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar,
.admin-content {
  min-width: 0;
}

.admin-sidebar-panel {
  position: sticky;
  top: var(--admin-sidebar-sticky-top, 150px);
  padding: 14px;
}

#adminSidebarPanel .sidebar-title-wrap {
  margin-bottom: 14px;
}

#adminSidebarPanel .sidebar-title-wrap h2 {
  margin: 0;
  font-size: 1.9rem;
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-sidebar-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  border: 1px solid rgba(78, 190, 255, 0.18);
  background: rgba(6, 17, 45, 0.86);
  color: #eef4ff;
  padding: 14px 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.admin-sidebar-link:hover,
.admin-sidebar-link.active {
  border-color: #1fe38a;
  background: linear-gradient(180deg, rgba(9, 39, 63, 0.95), rgba(8, 28, 51, 0.95));
  box-shadow: inset 3px 0 0 rgba(31, 227, 138, 0.95);
}

.admin-content > * {
  margin-bottom: 18px;
}

.admin-content > *:last-child {
  margin-bottom: 0;
}

.admin-managed-section.view-hidden,
.view-hidden {
  display: none !important;
}

#adminContent .session-inline-wrap,
#adminContent > .grid.stats,
#adminContent section.card,
#adminContent .grid.grid-main {
  scroll-margin-top: 138px;
}

#adminContent .grid.grid-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

#adminContent .grid.grid-main > section.card {
  min-width: 0;
}

#adminContent .grid.grid-main > section.card.view-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .admin-mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-workspace {
    grid-template-columns: 1fr;
  }

  .admin-sidebar-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .admin-mode-tabs {
    grid-template-columns: 1fr;
  }

  #adminContent .grid.grid-main {
    grid-template-columns: 1fr;
  }
}


/* Bloc 21.8 — réalignement dashboard */
.topbar {
  align-items: flex-start;
}

.topbar-main {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-links {
  margin-bottom: 12px;
}

.dashboard-session-wrap {
  margin-top: 6px;
}

.dashboard-session-wrap .session-inline-shell {
  background: transparent;
  border: 0;
  padding: 0;
  gap: 10px;
}

.dashboard-session-wrap .session-inline-help {
  margin: 6px 0 0;
}

#adminContent > .session-inline-wrap {
  display: none !important;
}

#admin-section-scope.session-inline-wrap,
#admin-section-scope .session-inline-wrap {
  scroll-margin-top: 140px;
}

@media (max-width: 980px) {
  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}


/* Bloc 21.9 — sticky navigation + dédoublonnage */
:root {
  --admin-modebar-top: 120px;
  --admin-sidebar-sticky-top: 210px;
  --admin-section-scroll-top: 220px;
}

#adminModeBarShell {
  position: sticky;
  top: var(--admin-modebar-top, 120px);
  z-index: 36;
  margin: 10px 0 18px;
}

.admin-mode-bar-shell {
  padding: 12px 18px;
  background: rgba(9, 18, 44, 0.96);
  backdrop-filter: blur(12px);
}

.admin-mode-bar-head {
  margin-bottom: 8px;
}

.admin-mode-bar-head h2 {
  font-size: 1.35rem;
  margin: 0;
}

#adminModeDescription {
  display: none !important;
}

.admin-mode-tabs {
  gap: 10px;
}

.admin-mode-tab {
  padding: 12px 14px;
}

.admin-workspace {
  align-items: start;
}

#adminSidebarPanel {
  position: sticky;
  top: var(--admin-sidebar-sticky-top, 210px);
  max-height: calc(100vh - var(--admin-sidebar-sticky-top, 210px) - 16px);
  overflow: auto;
  scrollbar-width: thin;
}

#adminSidebarPanel .sidebar-title-wrap {
  margin-bottom: 10px;
}

#adminSidebarPanel .sidebar-title-wrap h2 {
  font-size: 1.65rem;
}

.admin-sidebar-nav {
  gap: 8px;
}

.admin-sidebar-link {
  padding: 12px 14px;
}

#adminContent .session-inline-wrap,
#adminContent > .grid.stats,
#adminContent section.card,
#adminContent .grid.grid-main,
.admin-managed-section {
  scroll-margin-top: var(--admin-section-scroll-top, 220px);
}

@media (max-width: 1180px) {
  #adminModeBarShell {
    position: static;
    top: auto;
  }

  #adminSidebarPanel {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }
}

/* Bloc 22.0 — dashboard ultra compact */
#app > header.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: start;
  padding: 16px 18px;
  margin-bottom: 14px;
}

#app > header.topbar .topbar-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#app > header.topbar h1 {
  margin: 0;
  font-size: clamp(1.75rem, 2.8vw, 2.25rem);
  line-height: 1.05;
}

#app > header.topbar .topbar-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  line-height: 1.2;
  font-size: 0.95rem;
}

#app > header.topbar .topbar-links a {
  white-space: nowrap;
}

#app > header.topbar .dashboard-session-wrap {
  margin-top: 0;
  display: grid;
  gap: 4px;
}

#app > header.topbar .dashboard-session-wrap .session-inline-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1.2;
}

#app > header.topbar .dashboard-session-wrap .session-inline-entry {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
}

#app > header.topbar .dashboard-session-wrap .session-inline-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

#app > header.topbar .dashboard-session-wrap .session-inline-entry strong {
  font-size: 0.95rem;
  line-height: 1.15;
}

#app > header.topbar .dashboard-session-wrap .session-inline-sep {
  margin: 0;
}

#app > header.topbar .dashboard-session-wrap .session-inline-help {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.25;
}

#app > header.topbar .topbar-actions {
  display: grid;
  gap: 10px;
  align-self: start;
  min-width: 190px;
}

#app > header.topbar .topbar-actions .badge,
#app > header.topbar .topbar-actions button {
  width: 100%;
  justify-content: center;
}

#app > header.topbar .topbar-actions .badge {
  padding: 9px 12px;
}

#app > header.topbar .topbar-actions button {
  padding: 11px 14px;
}

:root {
  --admin-modebar-top: 104px;
}

@media (max-width: 1180px) {
  #app > header.topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #app > header.topbar .topbar-actions {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    min-width: 0;
  }
}

@media (max-width: 780px) {
  #app > header.topbar {
    padding: 14px 14px;
  }

  #app > header.topbar h1 {
    font-size: 1.55rem;
  }

  #app > header.topbar .topbar-links {
    font-size: 0.9rem;
    gap: 6px 10px;
  }

  #app > header.topbar .topbar-actions {
    grid-template-columns: 1fr;
  }

  #app > header.topbar .dashboard-session-wrap .session-inline-shell {
    gap: 5px 8px;
  }

  #app > header.topbar .dashboard-session-wrap .session-inline-label {
    font-size: 0.64rem;
  }

  #app > header.topbar .dashboard-session-wrap .session-inline-entry strong {
    font-size: 0.9rem;
  }
}


/* Bloc 22.1 — header simplifié */
#app > header.topbar .topbar-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

#app > header.topbar h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
}

#app > header.topbar .dashboard-summary {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.25;
}

#app > header.topbar .dashboard-hidden-session {
  display: none !important;
}

#app > header.topbar .topbar-actions {
  min-width: 210px;
}

#app > header.topbar .topbar-badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#app > header.topbar .topbar-actions .badge {
  width: 100%;
}

#app > header.topbar .topbar-actions .badge-neutral {
  background: rgba(56, 189, 248, 0.08);
  color: #cdeeff;
  border-color: rgba(56, 189, 248, 0.22);
}

@media (max-width: 980px) {
  #app > header.topbar .topbar-badges {
    grid-template-columns: 1fr;
  }
}


/* Bloc 22.2 — badges + sidebar sticky */
#app > header.topbar .topbar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  min-width: 320px;
}

#app > header.topbar .topbar-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#app > header.topbar .topbar-actions .badge {
  width: auto !important;
  max-width: 100%;
  flex: 0 0 auto;
  white-space: nowrap;
}

#app > header.topbar .topbar-actions button.secondary {
  width: 100%;
  max-width: 300px;
}

#adminModeBarShell {
  z-index: 34;
}

#adminWorkspace,
.admin-workspace,
.admin-sidebar,
.admin-content {
  overflow: visible;
}

.admin-sidebar {
  align-self: start;
}

#adminSidebarPanel {
  position: sticky;
  top: var(--admin-sidebar-sticky-top, 210px);
  z-index: 18;
  max-height: calc(100vh - var(--admin-sidebar-sticky-top, 210px) - 18px);
  overflow: auto;
  overscroll-behavior: contain;
}

@media (max-width: 1180px) {
  #app > header.topbar .topbar-actions {
    min-width: 0;
    width: 100%;
    align-items: stretch;
  }

  #app > header.topbar .topbar-badges {
    justify-content: flex-start;
  }

  #app > header.topbar .topbar-actions button.secondary {
    max-width: none;
  }

  #adminSidebarPanel {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 780px) {
  #app > header.topbar .topbar-badges {
    gap: 8px;
  }

  #app > header.topbar .topbar-actions .badge {
    white-space: normal;
  }
}

/* Bloc 22.3 — stabilisation sticky propre */
:root {
  --admin-modebar-top: 12px;
  --admin-sidebar-sticky-top: 112px;
  --admin-section-scroll-top: 132px;
}

#adminModeBarShell {
  position: sticky !important;
  top: var(--admin-modebar-top, 12px) !important;
  z-index: 42;
  margin: 10px 0 16px;
}

.admin-mode-bar-shell {
  background: rgba(9, 18, 44, 0.96);
  backdrop-filter: blur(12px);
}

.admin-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  overflow: visible;
}

.admin-sidebar {
  position: sticky !important;
  top: var(--admin-sidebar-sticky-top, 112px) !important;
  align-self: start;
  height: fit-content;
  min-width: 0;
  overflow: visible !important;
}

#adminSidebarPanel {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  max-height: calc(100vh - var(--admin-sidebar-sticky-top, 112px) - 16px);
  overflow: auto;
  overscroll-behavior: contain;
}

.admin-content {
  min-width: 0;
  overflow: visible;
}

#adminContent .session-inline-wrap,
#adminContent > .grid.stats,
#adminContent section.card,
#adminContent .grid.grid-main,
.admin-managed-section {
  scroll-margin-top: var(--admin-section-scroll-top, 132px);
}

@media (max-width: 1180px) {
  #adminModeBarShell,
  .admin-sidebar {
    position: static !important;
    top: auto !important;
  }

  #adminSidebarPanel {
    max-height: none;
    overflow: visible;
  }
}


/* Bloc 22.4 — dashboard sticky complet */
:root {
  --admin-topbar-top: 12px;
  --admin-topbar-height: 122px;
  --admin-modebar-height: 88px;
  --admin-modebar-top: calc(var(--admin-topbar-top) + var(--admin-topbar-height) + 12px);
  --admin-sidebar-sticky-top: calc(var(--admin-modebar-top) + var(--admin-modebar-height) + 12px);
  --admin-section-scroll-top: calc(var(--admin-sidebar-sticky-top) + 12px);
}

#app > header.topbar {
  position: sticky !important;
  top: var(--admin-topbar-top, 12px) !important;
  z-index: 48;
  margin-bottom: 16px;
  background: rgba(5, 12, 34, 0.96);
  backdrop-filter: blur(12px);
}

#adminModeBarShell {
  position: sticky !important;
  top: var(--admin-modebar-top) !important;
  z-index: 44;
}

.admin-sidebar {
  position: sticky !important;
  top: var(--admin-sidebar-sticky-top) !important;
  z-index: 24;
}

#adminSidebarPanel {
  max-height: calc(100vh - var(--admin-sidebar-sticky-top) - 16px);
}

#adminContent .session-inline-wrap,
#adminContent > .grid.stats,
#adminContent section.card,
#adminContent .grid.grid-main,
.admin-managed-section {
  scroll-margin-top: var(--admin-section-scroll-top);
}

@media (max-width: 1180px) {
  #app > header.topbar,
  #adminModeBarShell,
  .admin-sidebar {
    position: static !important;
    top: auto !important;
  }

  #adminSidebarPanel {
    max-height: none;
  }
}


/* Bloc sûr 22.5 — finition UX pro */
body.admin-ux-pro {
  background:
    radial-gradient(circle at top center, rgba(14, 165, 233, 0.12), transparent 28%),
    linear-gradient(180deg, #09101d 0%, #0b1220 35%, #0f172a 100%);
  color: #e2e8f0;
}

body.admin-ux-pro .wrap {
  max-width: 1440px;
  padding: 18px 24px 32px;
}

body.admin-ux-pro .card {
  background: rgba(11, 18, 32, 0.88);
  border: 1px solid rgba(71, 85, 105, 0.28);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(12px);
}

body.admin-ux-pro #app > header.topbar,
body.admin-ux-pro #adminModeBarShell,
body.admin-ux-pro #adminSidebarPanel {
  background: linear-gradient(180deg, rgba(9, 15, 28, 0.96), rgba(13, 21, 37, 0.9));
}

body.admin-ux-pro #app > header.topbar {
  padding: 18px 20px;
  gap: 18px;
}

body.admin-ux-pro #app > header.topbar .topbar-main {
  gap: 10px;
}

body.admin-ux-pro #app > header.topbar .topbar-title-row h1 {
  margin: 0;
  font-size: clamp(2rem, 2.4vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

body.admin-ux-pro #app > header.topbar .topbar-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.98rem;
  line-height: 1.45;
}

body.admin-ux-pro #app > header.topbar .topbar-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #7dd3fc;
}

body.admin-ux-pro #app > header.topbar .topbar-links a:hover {
  color: #bae6fd;
}

body.admin-ux-pro #app > header.topbar .dashboard-summary {
  margin: 2px 0 0;
  font-size: 0.97rem;
  line-height: 1.45;
  color: #9fb2c9;
}

body.admin-ux-pro #app > header.topbar .topbar-actions {
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  min-width: min(250px, 100%);
}

body.admin-ux-pro #app > header.topbar .topbar-badges {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

body.admin-ux-pro #app > header.topbar .topbar-actions .badge {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.12);
}

body.admin-ux-pro #app > header.topbar .topbar-actions .badge-neutral {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(96, 165, 250, 0.35);
}

body.admin-ux-pro #app > header.topbar .topbar-actions button.secondary {
  min-height: 42px;
  border-radius: 14px;
  font-weight: 700;
  background: linear-gradient(180deg, #64748b, #475569);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

body.admin-ux-pro .admin-mode-bar-shell {
  padding: 14px 18px 16px;
  border-radius: 20px;
}

body.admin-ux-pro .admin-mode-bar-head {
  margin-bottom: 10px;
}

body.admin-ux-pro .admin-mode-bar-head .eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #7dd3fc;
}

body.admin-ux-pro .admin-mode-bar-head h2 {
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

body.admin-ux-pro .admin-mode-tabs {
  gap: 12px;
}

body.admin-ux-pro .admin-mode-tab {
  min-height: 44px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(71, 85, 105, 0.4);
  font-size: 0.96rem;
  font-weight: 700;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

body.admin-ux-pro .admin-mode-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
}

body.admin-ux-pro .admin-mode-tab.active {
  background: linear-gradient(180deg, rgba(11, 25, 47, 0.94), rgba(7, 53, 79, 0.9));
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.28), 0 10px 24px rgba(14, 165, 233, 0.16);
}

body.admin-ux-pro .admin-workspace {
  gap: 20px;
  align-items: start;
}

body.admin-ux-pro .admin-sidebar {
  width: 288px;
}

body.admin-ux-pro .admin-sidebar-panel {
  padding: 18px 14px 14px;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.18);
}

body.admin-ux-pro #adminSidebarPanel .sidebar-title-wrap {
  gap: 2px;
  padding: 0 4px 8px;
}

body.admin-ux-pro #adminSidebarPanel .sidebar-title-wrap .eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #7dd3fc;
}

body.admin-ux-pro #adminSidebarPanel .sidebar-title-wrap h2 {
  font-size: 1.08rem;
  line-height: 1.1;
  margin: 0;
}

body.admin-ux-pro .admin-sidebar-nav {
  gap: 10px;
}

body.admin-ux-pro .admin-sidebar-link {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(10, 19, 34, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.8);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

body.admin-ux-pro .admin-sidebar-link:hover,
body.admin-ux-pro .admin-sidebar-link.active {
  transform: translateX(2px);
  border-color: rgba(52, 211, 153, 0.55);
  background: linear-gradient(180deg, rgba(6, 20, 33, 0.96), rgba(7, 31, 40, 0.92));
  box-shadow: 0 12px 28px rgba(5, 46, 60, 0.16);
}

body.admin-ux-pro .admin-sidebar-link::before {
  width: 9px;
  height: 9px;
}

body.admin-ux-pro .stats {
  gap: 16px;
}

body.admin-ux-pro .stats .card,
body.admin-ux-pro .mini-stats .card {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  text-align: left;
  padding: 18px 18px 16px;
}

body.admin-ux-pro .stats .card h3,
body.admin-ux-pro .mini-stats .card h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #a8bbd0;
}

body.admin-ux-pro .stats .card div,
body.admin-ux-pro .mini-stats .card div {
  font-size: clamp(2rem, 2.8vw, 2.5rem);
  line-height: 1;
  color: #f8fafc;
}

body.admin-ux-pro .section-head {
  margin-bottom: 16px;
}

body.admin-ux-pro .section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 1.7vw, 1.9rem);
  line-height: 1.08;
}

body.admin-ux-pro .section-head .muted {
  margin: 0;
  line-height: 1.5;
}

body.admin-ux-pro .grid-main > section.card {
  padding: 18px 20px 20px;
}

body.admin-ux-pro .form-grid {
  gap: 14px;
  margin-bottom: 14px;
}

body.admin-ux-pro label {
  margin-bottom: 7px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #dbe5f1;
}

body.admin-ux-pro input,
body.admin-ux-pro select,
body.admin-ux-pro textarea,
body.admin-ux-pro button {
  min-height: 44px;
  border-radius: 12px;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease, transform .14s ease;
}

body.admin-ux-pro textarea {
  min-height: 112px;
}

body.admin-ux-pro input:focus,
body.admin-ux-pro select:focus,
body.admin-ux-pro textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.56);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
  background: #0a1324;
}

body.admin-ux-pro button:not(.admin-mode-tab):not(.admin-sidebar-link) {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

body.admin-ux-pro button:hover:not(:disabled):not(.admin-sidebar-link) {
  transform: translateY(-1px);
}

body.admin-ux-pro .actions {
  gap: 10px;
}

body.admin-ux-pro .data-list li {
  border-radius: 16px;
  background: rgba(7, 13, 24, 0.78);
  border-color: rgba(51, 65, 85, 0.74);
}

body.admin-ux-pro .inline-pills {
  gap: 7px;
}

body.admin-ux-pro .pill {
  border-radius: 999px;
  padding: 6px 10px;
}

body.admin-ux-pro .table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
}

body.admin-ux-pro .table-wrap thead th {
  background: rgba(15, 23, 42, 0.92);
}

body.admin-ux-pro .table-wrap tbody tr:hover {
  background: rgba(14, 165, 233, 0.05);
}

body.admin-ux-pro #app > header.topbar,
body.admin-ux-pro #adminModeBarShell,
body.admin-ux-pro #adminSidebar {
  scroll-margin-top: 18px;
}

body.admin-ux-pro[data-admin-view="plateforme"] #app > header.topbar {
  box-shadow: 0 18px 44px rgba(14, 165, 233, 0.12);
}

body.admin-ux-pro[data-admin-view="gestion"] #app > header.topbar {
  box-shadow: 0 18px 44px rgba(34, 197, 94, 0.1);
}

body.admin-ux-pro[data-admin-view="exploitation"] #app > header.topbar {
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.1);
}

body.admin-ux-pro[data-admin-view="all"] #app > header.topbar {
  box-shadow: 0 18px 44px rgba(148, 163, 184, 0.12);
}

@media (max-width: 1180px) {
  body.admin-ux-pro #app > header.topbar {
    padding: 16px 18px;
  }

  body.admin-ux-pro #app > header.topbar .topbar-actions {
    min-width: 220px;
  }

  body.admin-ux-pro .admin-sidebar {
    width: 272px;
  }
}

@media (max-width: 980px) {
  body.admin-ux-pro .wrap {
    padding: 14px 16px 26px;
  }

  body.admin-ux-pro #app > header.topbar {
    padding: 16px;
  }

  body.admin-ux-pro #app > header.topbar .topbar-title-row h1 {
    font-size: 1.9rem;
  }

  body.admin-ux-pro #app > header.topbar .topbar-actions {
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  body.admin-ux-pro #app > header.topbar .topbar-badges {
    justify-content: flex-start;
  }

  body.admin-ux-pro .admin-workspace {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  body.admin-ux-pro .card {
    border-radius: 18px;
  }

  body.admin-ux-pro .stats .card,
  body.admin-ux-pro .mini-stats .card,
  body.admin-ux-pro .grid-main > section.card,
  body.admin-ux-pro .admin-sidebar-panel,
  body.admin-ux-pro .admin-mode-bar-shell {
    padding: 16px;
  }

  body.admin-ux-pro .admin-sidebar {
    width: 100%;
  }

  body.admin-ux-pro .admin-sidebar-link {
    min-height: 46px;
  }

  body.admin-ux-pro #app > header.topbar .topbar-links {
    gap: 8px 12px;
    font-size: 0.94rem;
  }
}


.session-context-card {
  margin-top: 18px;
}

.session-context-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  margin-bottom: 10px;
}

.session-context-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(80, 153, 255, 0.18);
  border-radius: 14px;
  background: rgba(5, 16, 42, 0.55);
}

.session-context-label {
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(185, 206, 245, 0.76);
}

@media (max-width: 1100px) {
  .session-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .session-context-grid {
    grid-template-columns: 1fr;
  }
}


/* Bloc 22.7 — KPI uniquement plateforme + version compacte */
#admin-section-stats.platform-kpi-shell {
  padding: 14px 16px 16px;
}

#admin-section-stats .platform-kpi-head {
  margin-bottom: 10px;
  align-items: center;
}

#admin-section-stats .platform-kpi-head h2 {
  font-size: 1rem;
  margin-bottom: 2px;
}

#admin-section-stats .platform-kpi-head p {
  font-size: 0.86rem;
}

#admin-section-stats .platform-kpi-grid {
  gap: 10px;
}

#admin-section-stats .compact-kpi-card {
  min-height: 0;
  padding: 12px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
}

#admin-section-stats .compact-kpi-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.85);
}

#admin-section-stats .compact-kpi-card strong {
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

#admin-section-stats .compact-kpi-card-revenue strong {
  font-size: 1.45rem;
}

body.admin-ux-pro[data-admin-view="plateforme"] #admin-section-stats {
  display: block;
}

body.admin-ux-pro[data-admin-view="exploitation"] #admin-section-stats,
body.admin-ux-pro[data-admin-view="gestion"] #admin-section-stats,
body.admin-ux-pro[data-admin-view="all"] #admin-section-stats {
  display: none !important;
}

@media (max-width: 1100px) {
  #admin-section-stats .platform-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #admin-section-stats .platform-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #admin-section-stats .compact-kpi-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}


/* Bloc 22.8 — finition UX métier plateforme */
body.admin-ux-pro.is-platform-view .platform-quick-actions {
  display: block;
}
.platform-quick-actions {
  display: none;
}
.platform-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.platform-action-grid button.secondary {
  width: 100%;
  justify-content: center;
  padding: 10px 12px;
  font-size: 14px;
}
body.admin-ux-pro .session-context-card .section-head h2,
body.admin-ux-pro #subscriptionsSection .section-head h2,
body.admin-ux-pro #paymentsSection .section-head h2,
body.admin-ux-pro #organizersSection .section-head h2 {
  letter-spacing: -0.01em;
}
body.admin-ux-pro .platform-kpi-shell,
body.admin-ux-pro .platform-quick-actions,
body.admin-ux-pro .session-context-card {
  scroll-margin-top: var(--admin-section-scroll-top, 220px);
}

.env-test-banner {
  position: sticky;
  top: 0;
  z-index: 100000;
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(90deg, #991b1b, #dc2626);
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.env-test-badge {
  position: fixed;
  top: 52px;
  right: 14px;
  z-index: 100001;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #7f1d1d;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.env-test-badge::before {
  content: "●";
  font-size: 12px;
}

body.env-test-active {
  scroll-padding-top: 56px;
}

@media (max-width: 768px) {
  .env-test-banner {
    font-size: 11px;
    padding: 8px 12px;
  }

  .env-test-badge {
    top: 46px;
    right: 10px;
    padding: 8px 12px;
    font-size: 11px;
  }
}

.field-hint {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.35;
}

.field-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.publication-admin-shell {
  margin-bottom: 16px;
}

.publication-admin-shell--full {
  width: 100%;
}

.publication-summary-card {
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.68));
  padding: 18px;
}

.publication-summary-card--wide {
  width: 100%;
}

.publication-summary-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.95fr);
  align-items: end;
  gap: 18px 24px;
  margin-bottom: 14px;
}

.publication-summary-head h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.publication-summary-head > div:first-child {
  min-width: 0;
}

.publication-summary-tools .secondary {
  min-width: 148px;
}

.publication-summary-tools {
  display: grid;
  gap: 8px;
  align-self: start;
  justify-self: end;
  width: min(100%, 620px);
}

.publication-picker-label {
  font-size: 0.78rem;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

.publication-club-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  width: 100%;
  align-items: center;
}

.publication-club-picker select {
  width: 100%;
  min-width: 0;
}

.publication-club-picker button {
  white-space: nowrap;
}

.publication-club-picker .publication-badge {
  justify-self: end;
  white-space: nowrap;
}

.publication-badge {
  border-width: 1px;
}

.publication-badge-draft {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
}

.publication-badge-published {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.34);
  color: #86efac;
}

.publication-badge-unpublished {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.32);
  color: #fde68a;
}

.publication-badge-blocked {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.publication-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.publication-grid--wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.publication-item {
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.14);
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.publication-item span {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.publication-item strong {
  display: block;
  color: #f8fafc;
  line-height: 1.4;
  word-break: break-word;
}

.publication-actions {
  margin-top: 14px;
}

.publication-actions--wide {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.publication-actions--wide > * {
  flex: 1 1 180px;
}

.publication-hint {
  margin: 12px 0 0;
}

.club-publication-pill {
  border-color: transparent;
}

.club-publication-pill.published {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.club-publication-pill.unpublished {
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
}

.club-publication-pill.blocked {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.club-publication-summary {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.club-publication-summary strong {
  color: #f8fafc;
}

@media (max-width: 1200px) {
  .publication-grid--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .publication-grid,
  .publication-grid--wide {
    grid-template-columns: 1fr;
  }

  .publication-summary-head {
    grid-template-columns: 1fr;
  }

  .publication-actions--wide > * {
    flex-basis: 100%;
  }
}

@media (max-width: 900px) {
  .publication-summary-tools {
    width: 100%;
    justify-self: stretch;
    min-width: 0;
  }

  .publication-club-picker {
    grid-template-columns: 1fr;
  }

  .publication-club-picker .publication-badge {
    justify-self: start;
  }
}

/* Bloc 2.2.3b — publication panel visible only in plateforme / all views */
body[data-admin-view="exploitation"] .publication-admin-shell,
body[data-admin-view="gestion"] .publication-admin-shell {
  display: none !important;
}

body[data-admin-view="plateforme"] .publication-admin-shell,
body[data-admin-view="all"] .publication-admin-shell {
  display: block;
}


/* ===== Bloc A V2 shell ===== */
body.admin-v2-ready .topbar-actions {
  gap: 10px;
}
.role-preview-wrap {
  display: grid;
  gap: 6px;
  width: min(260px, 100%);
}
.role-preview-wrap label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.role-preview-wrap select {
  min-height: 40px;
  border-radius: 12px;
}
.admin-context-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
}
.admin-context-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.28);
  background: rgba(15, 23, 42, 0.42);
}
.admin-context-item span {
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-context-item strong {
  font-size: 0.96rem;
  color: #f8fafc;
}
.admin-mode-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-mode-bar-head .eyebrow {
  font-size: 0.78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7dd3fc;
}
.admin-mode-bar-head h2 {
  margin: 4px 0 0;
}
.admin-content {
  display: grid;
  gap: 18px;
}
.admin-module-chrome {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
}
.admin-module-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.admin-module-header h2 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 2vw, 2rem);
}
.admin-module-header p {
  margin: 0;
}
.admin-module-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-module-subnav button {
  width: auto;
  min-width: 150px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.24);
}
.admin-module-subnav button.active {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.44);
  color: #ecfdf5;
}
.admin-v2-placeholder {
  padding: 24px;
}
.club-quick-create-panel {
  padding: 18px 20px;
}
.club-quick-create-panel .form-grid {
  margin-bottom: 0;
}
.club-quick-create-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.club-quick-create-head h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}
.club-quick-create-head p {
  margin: 0;
}
body.admin-v2-ready .admin-managed-section,
body.admin-v2-ready .admin-v2-placeholder,
body.admin-v2-ready .club-quick-create-panel {
  display: none;
}
body.admin-v2-ready .admin-managed-section.module-visible,
body.admin-v2-ready .admin-v2-placeholder.module-visible,
body.admin-v2-ready .club-quick-create-panel.module-visible {
  display: block;
}
body.admin-v2-ready .grid.grid-main.module-visible {
  display: grid;
}
body.admin-v2-ready .grid.grid-main:not(.module-visible) {
  display: none;
}
.publication-admin-shell.module-visible,
#admin-section-clubs.module-visible,
#admin-section-tournaments.module-visible,
#admin-section-generation.module-visible,
#admin-section-registrations.module-visible,
#admin-section-matches.module-visible,
#admin-section-billing.module-visible,
#admin-section-tenants.module-visible,
#subscriptionsSection.module-visible,
#paymentsSection.module-visible,
#organizersSection.module-visible,
#admin-section-players.module-visible,
#admin-section-scope.module-visible,
#admin-section-stats.module-visible,
#admin-section-platform-actions.module-visible {
  display: block !important;
}
.admin-sidebar-link.module-link {
  justify-content: flex-start;
}
.admin-sidebar-link.module-link::after {
  content: '';
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.7);
}
.admin-sidebar-link.module-link.active::after {
  background: #22c55e;
}
@media (max-width: 1080px) {
  .admin-context-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .admin-context-bar {
    grid-template-columns: 1fr;
  }
  .admin-module-header {
    flex-direction: column;
  }
  .admin-module-subnav button {
    flex: 1 1 100%;
  }
}
