:root {
  --ink: #17211d;
  --muted: #5d6863;
  --line: #dce2de;
  --line-strong: #c7d0ca;
  --surface: #ffffff;
  --surface-soft: #f4f6f2;
  --surface-tint: #edf3ef;
  --brand: #146c43;
  --brand-deep: #0b3b2f;
  --brand-soft: #dff0e7;
  --lime: #d3f36f;
  --clay: #c96f4a;
  --coral: #e4573d;
  --blue: #326fa8;
  --warning: #a96116;
  --shadow: 0 10px 28px rgba(16, 43, 33, 0.08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ROADMAP-7: growth, integrations, messages and explainable insights */
.v7-heading,
.v7-heading-actions,
.v7-tabs,
.v7-toolbar,
.v7-command-row,
.v7-insight-toolbar,
.v7-toggle,
.v7-item-head,
.v7-item-actions {
  display: flex;
  align-items: center;
}

.v7-heading {
  gap: 18px;
  justify-content: space-between;
}

.v7-heading-actions,
.v7-command-row,
.v7-item-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.v7-safety-badge {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  align-items: center;
  color: #7b4214;
  background: #fff2dc;
  border: 1px solid #ebd0a7;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 760;
}

.v7-tabs {
  width: fit-content;
  max-width: 100%;
  margin: 18px 0 22px;
  padding: 3px;
  gap: 3px;
  overflow-x: auto;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.v7-tabs button {
  min-height: 38px;
  padding: 0 16px;
  color: var(--muted);
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 760;
}

.v7-tabs button.active {
  color: var(--brand);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(20, 52, 40, 0.1);
}

.v7-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.v7-metric {
  min-width: 0;
  min-height: 78px;
  padding: 13px 14px;
  background: var(--surface);
}

.v7-metric span,
.v7-metric small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.v7-metric strong {
  display: block;
  margin: 5px 0 2px;
  overflow-wrap: anywhere;
  color: var(--brand);
  font-size: 20px;
  line-height: 1.15;
}

.v7-member-mode,
.v7-admin-mode {
  min-width: 0;
}

.loyalty-admin-center .section-heading p {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.loyalty-form-grid {
  margin-top: 22px;
}

.loyalty-rule-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.loyalty-lists {
  margin-top: 24px;
}

.loyalty-redemption-list {
  margin-top: 12px;
}

.loyalty-redemption-item {
  border-left: 3px solid var(--theme-gold);
}

.v7-member-mode[hidden],
.v7-admin-mode[hidden] {
  display: none;
}

.v7-toolbar {
  min-height: 46px;
  margin-bottom: 14px;
  gap: 18px;
  justify-content: space-between;
}

.v7-toolbar h3,
.v7-form-title h3,
.v7-split-list h3,
.v7-privacy-layout h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

.v7-recommendation-toolbar {
  align-items: end;
}

.v7-recommendation-toolbar label,
.v7-insight-toolbar label {
  min-width: 180px;
}

.v7-recommendation-toolbar label > span,
.v7-insight-toolbar label > span,
.v7-form-band label > span,
.v7-inline-form label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.v7-recommendation-toolbar select,
.v7-insight-toolbar select,
.v7-form-band input,
.v7-form-band select,
.v7-form-band textarea,
.v7-inline-form input,
.v7-inline-form select,
.v7-correction-editor input,
.v7-correction-editor select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.v7-form-band textarea {
  min-height: 92px;
  padding-top: 10px;
  resize: vertical;
}

.v7-preferences {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.v7-preferences label,
.v7-toggle,
.v7-check-grid label {
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.v7-preferences input,
.v7-toggle input,
.v7-check-grid input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
}

.v7-list {
  min-width: 0;
  border-top: 1px solid var(--line);
}

.v7-list-item {
  min-width: 0;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}

.v7-item-head {
  min-width: 0;
  gap: 12px;
  justify-content: space-between;
}

.v7-item-head > div {
  min-width: 0;
}

.v7-item-head h4 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.v7-list-item p {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.v7-item-meta {
  display: flex;
  margin-top: 9px;
  flex-wrap: wrap;
  gap: 6px;
}

.v7-chip {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  align-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 740;
}

.v7-chip-blue {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: var(--line);
}

.v7-chip-warning {
  color: #855019;
  background: #fff2dc;
  border-color: #ebd0a7;
}

.v7-chip-critical {
  color: #963a2c;
  background: #fff0ed;
  border-color: #efc9c2;
}

.v7-item-actions {
  margin-top: 11px;
}

.v7-item-actions button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.v7-reason-list {
  display: grid;
  margin: 9px 0 0;
  padding: 0;
  gap: 4px;
  list-style: none;
}

.v7-reason-list li {
  color: var(--muted);
  font-size: 12px;
}

.v7-reason-list li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 7px 2px 0;
  background: var(--blue);
  border-radius: 50%;
}

.v7-correction-editor {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(200px, 2fr) auto;
  margin-top: 10px;
  gap: 8px;
}

.v7-privacy-layout,
.v7-split-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.v7-privacy-layout {
  margin-bottom: 20px;
}

.v7-toggle {
  min-height: 44px;
  margin-top: 12px;
}

.v7-message {
  margin-top: 16px;
}

.v7-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 -28px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.v7-form-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 22px 28px;
  align-content: start;
  gap: 13px 14px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.v7-form-band:nth-child(even) {
  background: var(--surface-tint);
  border-left: 1px solid var(--line);
}

.v7-form-title,
.v7-form-band .wide-field,
.v7-form-band > button {
  grid-column: 1 / -1;
}

.v7-form-band > button {
  width: fit-content;
}

.v7-form-band select[multiple] {
  min-height: 92px;
  padding: 7px 10px;
}

.v7-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 9px 10px;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.v7-check-grid legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.v7-check-grid label {
  display: flex;
  align-items: center;
}

.v7-split-list > div {
  min-width: 0;
}

.v7-insight-toolbar {
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.v7-inline-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  margin: 20px 0 26px;
  padding: 18px 0;
  align-items: end;
  gap: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.v7-empty {
  padding: 24px 2px;
  color: var(--muted);
  font-size: 13px;
}

.v7-growth-member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.v7-referral-redeem {
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0;
  padding: 0 0 14px;
  border-top: 0;
}

.v7-member-share-lists,
.v7-partner-band {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.v7-list-title {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v7-list-title h3 {
  margin: 0;
}

.v7-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 14px;
  align-items: center;
}

.v7-code-row img {
  width: 88px;
  height: 88px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.v7-code-value {
  display: inline-block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 800;
}

.v7-partner-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.v7-partner-item {
  min-width: 0;
  padding: 16px;
  background: #fff;
}

.v7-partner-item h4 {
  margin: 8px 0 6px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.v7-partner-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.v7-partner-item a {
  display: inline-block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
}

.public-share-view {
  min-height: 100vh;
  padding: 0;
  background: #f1f5f2;
}

.public-share-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.7fr);
}

.public-share-main {
  display: flex;
  max-width: 900px;
  padding: clamp(42px, 7vw, 96px);
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.public-share-brand {
  display: flex;
  margin-bottom: 42px;
  align-items: center;
  gap: 11px;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 850;
}

.public-share-main > h2 {
  max-width: 760px;
  margin: 18px 0 10px;
  overflow-wrap: anywhere;
  color: var(--brand-deep);
  font-size: 46px;
  letter-spacing: 0;
}

.public-share-main > p {
  margin-bottom: 24px;
  color: var(--muted);
}

.public-share-content {
  width: 100%;
  max-width: 760px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.public-share-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
}

.public-share-fact span,
.public-share-fact strong {
  display: block;
}

.public-share-fact span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.public-share-fact strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.public-share-schedule {
  display: grid;
  margin: 18px 0 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.public-share-schedule li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  padding: 10px 0;
  gap: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.public-share-actions {
  display: flex;
  margin-top: 26px;
  flex-wrap: wrap;
  gap: 9px;
}

.public-share-qr {
  display: flex;
  padding: 48px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: var(--brand-deep);
}

.public-share-qr .section-kicker {
  color: var(--lime);
}

.public-share-qr h3 {
  color: #fff;
  font-size: 20px;
}

.public-share-qr img {
  width: min(256px, 100%);
  aspect-ratio: 1;
  padding: 10px;
  background: #fff;
  border-radius: 6px;
}

.public-share-qr p {
  max-width: 280px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.6;
}

body.public-landing .topbar,
body.public-landing .notice,
body.public-landing .message-strip {
  display: none;
}

body.public-landing .public-share-view {
  width: 100%;
  max-width: none;
  margin-left: 0;
}

@media (max-width: 980px) {
  .v7-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v7-form-grid,
  .v7-privacy-layout,
  .v7-split-list,
  .v7-growth-member-grid {
    grid-template-columns: 1fr;
  }

  .v7-partner-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-share-layout {
    grid-template-columns: 1fr;
  }

  .public-share-qr {
    min-height: 420px;
  }

  .v7-form-band:nth-child(even) {
    border-left: 0;
  }

  .v7-inline-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .v7-heading,
  .v7-toolbar,
  .v7-recommendation-toolbar {
    align-items: stretch;
  }

  .v7-heading,
  .v7-toolbar,
  .v7-recommendation-toolbar,
  .v7-insight-toolbar {
    flex-direction: column;
  }

  .v7-heading-actions {
    justify-content: space-between;
  }

  .v7-tabs {
    width: 100%;
  }

  .v7-tabs button {
    flex: 1 0 auto;
  }

  .v7-metric-strip,
  .v7-form-band,
  .v7-inline-form,
  .v7-correction-editor,
  .v7-partner-list,
  .public-share-facts {
    grid-template-columns: 1fr;
  }

  .v7-referral-redeem {
    grid-template-columns: 1fr;
  }

  .v7-form-grid {
    margin-right: -18px;
    margin-left: -18px;
  }

  .v7-form-band {
    padding: 20px 18px;
  }

  .v7-recommendation-toolbar label,
  .v7-insight-toolbar label {
    width: 100%;
    min-width: 0;
  }

  .v7-command-row > button {
    flex: 1 1 140px;
  }

  .v7-item-head {
    align-items: flex-start;
  }

  .public-share-main {
    min-height: 68vh;
    padding: 34px 20px 42px;
  }

  .public-share-brand {
    margin-bottom: 28px;
  }

  .public-share-main > h2 {
    font-size: 32px;
  }

  .public-share-qr {
    min-height: 380px;
    padding: 38px 20px 96px;
  }

  .public-share-schedule li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* 2026-07-16: compact operations shell and venue-operator workspace */
.visual-theme-control {
  display: grid;
  margin-bottom: 18px;
  gap: 6px;
}

.visual-theme-control > span:first-child {
  color: var(--sidebar-muted);
  font-size: 11px;
}

.visual-theme-select-wrap {
  position: relative;
  display: flex;
  min-height: 38px;
  align-items: center;
}

.visual-theme-select-wrap select {
  width: 100%;
  min-height: 38px;
  padding: 0 28px 0 34px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 680;
}

.visual-theme-swatch {
  position: absolute;
  z-index: 1;
  left: 11px;
  width: 14px;
  height: 14px;
  pointer-events: none;
  background: #28775b;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
}

.visual-theme-swatch.theme-championship {
  background: #f6f8fb;
  border-color: #4f7fac;
}

.visual-theme-swatch.theme-night {
  background: #0b2742;
  border-color: #dbea62;
}

.visual-theme-swatch.theme-australian { background: #00609c; border-color: #d8f05a; }
.visual-theme-swatch.theme-clay { background: #9c3f28; border-color: #f1d45a; }
.visual-theme-swatch.theme-grass { background: #17643d; border-color: #e4dc70; }
.visual-theme-swatch.theme-china { background: #a51f35; border-color: #f0cd55; }

.page-head-actions,
.admin-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.sound-control {
  display: inline-flex;
  min-height: 38px;
  padding: 0 10px;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.sound-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.sound-control-indicator {
  position: relative;
  display: block;
  width: 30px;
  height: 17px;
  flex: 0 0 auto;
  background: #9ba7a1;
  border-radius: 10px;
  transition: background 160ms ease;
}

.sound-control-indicator::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease;
}

.sound-control input:checked + .sound-control-indicator {
  background: var(--brand);
}

.sound-control input:checked + .sound-control-indicator::after {
  transform: translateX(13px);
}

.sound-control-copy {
  display: grid;
  line-height: 1.1;
}

.sound-control-copy b {
  font-size: 10px;
  font-weight: 760;
}

.sound-control-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.clickable-item {
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.clickable-item:hover,
.clickable-item:focus-visible {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  box-shadow: 0 8px 22px rgba(18, 49, 38, 0.09);
  outline: none;
  transform: translateY(-1px);
}

.admin-side-nav {
  align-content: start;
  gap: 2px;
}

.admin-side-label {
  margin: 0 11px 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.admin-side-group {
  display: block;
  margin: 12px 12px 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  font-weight: 760;
}

.admin-side-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.admin-side-nav button {
  position: relative;
  display: flex;
  min-height: 38px;
  padding: 0 12px 0 24px;
  align-items: center;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
}

.admin-side-nav button::before {
  content: "";
  position: absolute;
  left: 11px;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 50%;
}

.admin-side-nav button:hover,
.admin-side-nav button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.admin-side-nav button.active {
  box-shadow: inset 2px 0 0 var(--theme-accent);
}

.admin-side-nav button.active::before {
  background: var(--theme-accent);
}

.admin-side-nav button[hidden],
.admin-workspace-nav button[hidden] {
  display: none !important;
}

body.dedicated-admin-entry .topbar {
  width: 248px;
  padding: 22px 16px 18px;
}

body.dedicated-admin-entry .topbar h1 {
  max-width: none;
  overflow-wrap: normal;
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
}

body.dedicated-admin-entry .view,
body.dedicated-admin-entry .notice,
body.dedicated-admin-entry .message-strip {
  width: calc(100% - 248px);
  margin-left: 248px;
}

body.dedicated-admin-entry #adminView {
  padding: 22px 28px 72px;
}

body.dedicated-admin-entry:not(.admin-authenticated) .admin-page-head {
  display: none;
}

.admin-page-head {
  min-height: 64px;
  margin: 0 0 14px;
  padding: 0 0 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.admin-page-head h2 {
  margin: 2px 0 3px;
  font-size: 22px;
  line-height: 1.2;
}

.admin-page-head .page-subtitle {
  margin: 0;
  font-size: 11px;
}

.admin-page-actions {
  margin-left: auto;
}

.admin-summary-data {
  display: none !important;
}

.admin-session-bar {
  min-height: 40px;
  margin-bottom: 12px;
  padding: 5px 8px 5px 13px;
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
}

.admin-live-center {
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.admin-live-head {
  display: flex;
  min-height: 58px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-live-head > div,
.admin-live-head > div > span:last-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-live-head > div > span:last-child {
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
}

.admin-live-head b {
  font-size: 15px;
}

.admin-live-head small {
  color: var(--muted);
  font-size: 10px;
}

.live-status-dot,
.admin-live-item-status i {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: #cf6045;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(207, 96, 69, 0.12);
}

.admin-live-count {
  color: var(--muted);
  font-size: 11px;
}

.admin-live-count strong {
  color: var(--ink);
  font-size: 18px;
}

.admin-live-list {
  display: grid;
}

.admin-live-item {
  display: grid;
  min-height: 62px;
  padding: 9px 16px;
  grid-template-columns: 92px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.admin-live-item:last-child {
  border-bottom: 0;
}

.admin-live-item:hover,
.admin-live-item:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.admin-live-item-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a64934;
  font-size: 10px;
  font-weight: 760;
}

.admin-live-item > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-live-item strong,
.admin-live-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-live-item strong {
  font-size: 13px;
}

.admin-live-item small {
  color: var(--muted);
  font-size: 10px;
}

.admin-live-item > b {
  color: var(--muted);
  font-size: 19px;
}

.external-venue-toolbar {
  display: flex;
  min-height: 58px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.external-venue-toolbar label {
  width: min(380px, 100%);
}

.external-venue-toolbar label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.external-venue-toolbar select {
  width: 100%;
}

.external-venue-toolbar p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.external-venue-form-grid,
.external-venue-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.external-venue-form-grid {
  margin: 16px 0;
}

.external-venue-form-grid .booking-admin-form {
  align-content: start;
}

.external-venue-columns {
  margin-top: 14px;
}

.external-venue-columns > section,
.external-sync-section {
  min-width: 0;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.external-sync-section {
  margin-top: 14px;
}

.booking-connection-row .booking-admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.booking-admin-metrics > article:nth-child(2) {
  border-top-color: var(--blue);
}

.booking-admin-metrics > article:nth-child(3) {
  border-top-color: var(--clay);
}

.booking-admin-metrics > article:nth-child(4) {
  border-top-color: var(--warning);
}

body.venue-operator-session .admin-side-label::after {
  content: " · 球场运营";
  color: var(--theme-accent);
}

@media (max-width: 1180px) {
  body.dedicated-admin-entry .topbar {
    width: 220px;
  }

  body.dedicated-admin-entry .view,
  body.dedicated-admin-entry .notice,
  body.dedicated-admin-entry .message-strip {
    width: calc(100% - 220px);
    margin-left: 220px;
  }

  .external-venue-form-grid,
  .external-venue-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.dedicated-admin-entry .topbar {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 118px 150px;
  }

  body.dedicated-admin-entry .view,
  body.dedicated-admin-entry .notice,
  body.dedicated-admin-entry .message-strip {
    width: 100%;
    margin-left: 0;
  }

  body.dedicated-admin-entry .admin-side-nav {
    height: 62px;
  }

  body.dedicated-admin-entry .admin-side-nav button {
    width: 100px;
    min-width: 100px;
    min-height: 48px;
    padding: 4px 8px;
    justify-content: center;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.25;
  }

  body.dedicated-admin-entry .admin-side-nav button.active {
    color: var(--text);
  }

  body.dedicated-admin-entry .admin-side-nav button::before,
  .admin-side-group {
    display: none;
  }

  .admin-page-head {
    display: flex;
  }
}

/* Keep the approved admin controls above all legacy cascade layers. */
body.dedicated-admin-entry.admin-authenticated > .app-shell > .topbar .language-switch {
  align-self: flex-start;
}

body.dedicated-admin-entry.admin-authenticated > .app-shell > .topbar .language-switch > span {
  display: block !important;
}

body.dedicated-admin-entry.admin-authenticated > .app-shell > .topbar .visual-theme-control {
  display: grid !important;
}

body.dedicated-admin-entry.admin-authenticated > .app-shell > .topbar .visual-theme-select-wrap {
  min-height: 32px;
  display: flex !important;
}

body.dedicated-admin-entry.admin-authenticated > .app-shell > .topbar .visual-theme-select-wrap select {
  min-height: 32px;
}

@media (max-width: 900px) {
  body.dedicated-admin-entry.admin-authenticated > .app-shell > .topbar .language-switch {
    width: calc(50% - 15px);
    margin-left: 10px;
  }

  body.dedicated-admin-entry.admin-authenticated > .app-shell > .topbar .visual-theme-control {
    top: 72px;
    right: 10px;
    width: calc(50% - 15px);
  }

  body.dedicated-admin-entry.admin-authenticated > .app-shell > .topbar .visual-theme-control > span:first-child {
    display: block;
  }
}

@media (max-width: 640px) {
  body.dedicated-admin-entry.admin-authenticated .admin-page-head {
    display: block !important;
  }

  body.dedicated-admin-entry.admin-authenticated .admin-page-actions {
    width: 100%;
    margin-top: 10px;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.dedicated-admin-entry.admin-authenticated .admin-page-actions > button {
    width: 100%;
    min-width: 0;
    padding-inline: 6px;
  }
}

/* Admin Operations Shell V10: approved eight-category information architecture. */
body.dedicated-admin-entry.admin-authenticated {
  --admin-canvas: var(--app-bg);
  --admin-panel: var(--surface);
  --admin-panel-soft: var(--surface-soft);
  --admin-border: var(--line);
  --admin-accent: var(--brand);
  --admin-accent-soft: var(--brand-soft);
  --admin-danger: #b83f50;
  --admin-danger-soft: #f8e8eb;
  --admin-warning: #9a6515;
  --admin-warning-soft: #fbf0dd;
  --admin-info: var(--theme-blue);
  overflow-x: hidden;
  background: var(--admin-canvas);
}

:root[data-ace-theme="night"] body.dedicated-admin-entry.admin-authenticated {
  --admin-danger: #ff8c9a;
  --admin-danger-soft: #3d2130;
  --admin-warning: #efc36b;
  --admin-warning-soft: #40341e;
}

body.dedicated-admin-entry.admin-authenticated > .app-shell {
  min-height: 100dvh;
}

body.dedicated-admin-entry.admin-authenticated > .app-shell > .topbar {
  position: fixed;
  z-index: 80;
  inset: 0 auto 0 0;
  width: 248px;
  height: 100dvh;
  min-height: 0;
  display: flex;
  padding: 0;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  color: #f4f8f5;
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow: none;
}

body.dedicated-admin-entry.admin-authenticated .topbar .brand-lockup {
  width: 100%;
  min-height: 72px;
  margin: 0;
  padding: 0 18px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body.dedicated-admin-entry.admin-authenticated .topbar .brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 6px;
}

body.dedicated-admin-entry.admin-authenticated .topbar .brand-lockup h1 {
  max-width: 158px;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dedicated-admin-entry.admin-authenticated .topbar .brand-lockup .eyebrow {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
}

body.dedicated-admin-entry.admin-authenticated .topbar .language-switch,
body.dedicated-admin-entry.admin-authenticated .topbar .visual-theme-control {
  width: calc(50% - 5px);
  min-width: 0;
  margin: 10px 0 8px;
  display: inline-grid;
  gap: 4px;
}

body.dedicated-admin-entry.admin-authenticated .topbar .language-switch {
  margin-left: 10px;
}

body.dedicated-admin-entry.admin-authenticated .topbar .visual-theme-control {
  position: absolute;
  top: 72px;
  right: 10px;
}

body.dedicated-admin-entry.admin-authenticated .topbar .language-switch > span,
body.dedicated-admin-entry.admin-authenticated .topbar .visual-theme-control > span:first-child {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
}

body.dedicated-admin-entry.admin-authenticated .topbar select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 24px 0 8px;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  font-size: 10px;
}

body.dedicated-admin-entry.admin-authenticated .topbar .nav-tabs,
body.dedicated-admin-entry.admin-authenticated .admin-side-label {
  display: none !important;
}

body.dedicated-admin-entry.admin-authenticated .admin-side-nav {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 4px 10px 14px;
  display: block;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.admin-sidebar-role {
  min-height: 52px;
  margin: 6px 4px 10px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

.admin-sidebar-role span,
.admin-sidebar-role small,
.admin-sidebar-role b {
  min-width: 0;
  display: block;
}

.admin-sidebar-role small {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
}

.admin-sidebar-role b {
  overflow: hidden;
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar-role > i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: #66d69f;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(102, 214, 159, 0.12);
}

.admin-nav-section {
  display: block;
  margin-bottom: 3px;
}

.admin-side-nav .admin-nav-parent,
.admin-side-nav .admin-nav-children > button {
  position: relative;
  width: 100%;
  display: grid;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}

.admin-side-nav .admin-nav-parent::before,
.admin-side-nav .admin-nav-children > button::before {
  content: none;
}

.admin-side-nav .admin-nav-parent {
  min-height: 42px;
  padding: 0 9px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 9px;
  font-size: 12px;
  font-weight: 690;
}

.admin-side-nav .admin-nav-parent:hover,
.admin-side-nav .admin-nav-parent.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.admin-side-nav .admin-nav-parent.active {
  box-shadow: inset 3px 0 0 var(--theme-accent);
}

.admin-nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--theme-accent);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  font-size: 13px;
  font-style: normal;
}

.admin-nav-parent > b,
.admin-nav-children > button > b {
  min-width: 20px;
  height: 20px;
  display: grid;
  padding: 0 5px;
  place-items: center;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
}

.admin-nav-chevron {
  color: rgba(255, 255, 255, 0.42);
  font-size: 18px;
}

.admin-nav-children {
  position: relative;
  margin: 2px 0 4px 20px;
  padding-left: 19px;
}

.admin-nav-children::before {
  content: "";
  position: absolute;
  inset: 5px auto 5px 3px;
  width: 1px;
  background: rgba(255, 255, 255, 0.13);
}

.admin-side-nav .admin-nav-children > button {
  min-height: 32px;
  padding: 0 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  font-size: 10px;
  font-weight: 590;
}

.admin-side-nav .admin-nav-children > button::after {
  content: "";
  position: absolute;
  left: -18px;
  width: 7px;
  height: 7px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid var(--sidebar-bg);
  border-radius: 50%;
}

.admin-side-nav .admin-nav-children > button:hover,
.admin-side-nav .admin-nav-children > button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.admin-side-nav .admin-nav-children > button.active::after {
  background: var(--theme-accent);
}

body.dedicated-admin-entry.admin-authenticated .topbar .sidebar-status {
  position: static;
  width: auto;
  min-height: 48px;
  margin: 0 14px;
  padding: 11px 0 13px;
  flex: 0 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

body.dedicated-admin-entry.admin-authenticated .view,
body.dedicated-admin-entry.admin-authenticated .notice,
body.dedicated-admin-entry.admin-authenticated .message-strip {
  width: calc(100% - 248px);
  margin-left: 248px;
}

body.dedicated-admin-entry.admin-authenticated #adminView {
  max-width: none;
  min-width: 0;
  padding: 0 24px 56px;
  overflow-x: clip;
}

.admin-ops-topbar {
  position: sticky;
  z-index: 45;
  top: 0;
  min-height: 66px;
  margin: 0 -24px 20px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(240px, 460px) auto;
  align-items: center;
  gap: 20px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

#adminLiveCenter {
  scroll-margin-top: 86px;
}

#v7AdminPanel {
  scroll-margin-top: 156px;
}

.admin-mobile-menu,
.admin-mobile-brand {
  display: none;
}

.admin-breadcrumb {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.admin-breadcrumb b {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-global-search {
  position: relative;
  min-width: 0;
}

.admin-global-search > label {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.admin-global-search input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.admin-search-results {
  position: absolute;
  z-index: 75;
  top: 44px;
  right: 0;
  left: 0;
  max-height: min(440px, 60vh);
  padding: 5px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 16px 44px rgba(13, 35, 26, 0.18);
}

.admin-search-results > button {
  width: 100%;
  min-height: 52px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 5px;
}

.admin-search-results > button:hover {
  background: var(--surface-soft);
}

.admin-search-results span,
.admin-search-results b,
.admin-search-results small {
  min-width: 0;
  display: block;
}

.admin-search-results b,
.admin-search-results small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-search-results b {
  font-size: 12px;
}

.admin-search-results small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.admin-search-results em {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 9px;
  font-style: normal;
}

.admin-search-empty {
  padding: 20px 10px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.admin-top-actions {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.admin-top-icon,
.admin-sound-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
}

.admin-top-icon.admin-mobile-menu {
  display: none;
}

.admin-sound-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-sound-toggle:has(input:checked) {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
}

.admin-notice-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  background: var(--admin-danger);
  border: 1px solid var(--surface);
  border-radius: 50%;
}

.admin-account-button {
  min-width: 156px;
  min-height: 42px;
  padding: 0 5px 0 8px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.admin-account-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--on-brand);
  background: var(--brand);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 780;
}

.admin-account-button strong,
.admin-account-button small {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-account-button strong {
  font-size: 11px;
}

.admin-account-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.admin-account-menu {
  position: absolute;
  z-index: 80;
  top: 49px;
  right: 0;
  width: 220px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 16px 44px rgba(13, 35, 26, 0.18);
}

.admin-account-menu > span {
  display: block;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
}

.admin-account-menu > button {
  width: 100%;
  min-height: 38px;
}

.admin-page-head {
  min-height: 66px;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border: 0;
}

.admin-page-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  font-weight: 750;
}

.admin-page-head .page-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.admin-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-page-actions > button {
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
}

.admin-page-actions > .primary-button {
  color: var(--on-brand);
  background: var(--brand);
}

.admin-ops-kpis {
  min-width: 0;
  margin-bottom: 13px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.admin-ops-kpi {
  min-width: 0;
  min-height: 96px;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(20, 36, 29, 0.055);
}

.admin-ops-kpi span,
.admin-ops-kpi small,
.admin-ops-kpi strong,
.admin-ops-kpi em {
  min-width: 0;
  display: block;
}

.admin-ops-kpi small {
  color: var(--muted);
  font-size: 10px;
}

.admin-ops-kpi strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 25px;
  line-height: 30px;
}

.admin-ops-kpi em {
  margin-top: 2px;
  overflow: hidden;
  color: var(--brand);
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-ops-kpi > i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  font-size: 17px;
  font-style: normal;
  font-weight: 760;
}

.admin-ops-kpi.warning strong,
.admin-ops-kpi.warning em {
  color: var(--admin-danger);
}

.admin-ops-kpi.warning > i {
  color: var(--admin-danger);
  background: var(--admin-danger-soft);
}

.admin-ops-dashboard {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(270px, 0.82fr);
  align-items: start;
  gap: 13px;
}

.admin-ops-main,
.admin-ops-side {
  min-width: 0;
  display: grid;
  gap: 13px;
}

.admin-live-center,
.admin-venue-snapshot,
.admin-ops-panel {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(20, 36, 29, 0.055);
}

.admin-live-head,
.admin-ops-panel-head {
  min-height: 58px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-live-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-live-head b,
.admin-live-head small,
.admin-ops-panel-head h2,
.admin-ops-panel-head p {
  display: block;
  margin: 0;
}

.admin-live-head b,
.admin-ops-panel-head h2 {
  color: var(--ink);
  font-size: 13px;
  line-height: 19px;
}

.admin-live-head small,
.admin-ops-panel-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.live-status-dot {
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.admin-live-head .text-button,
.admin-ops-panel-head .text-button {
  min-height: 34px;
  padding: 0 3px;
  color: var(--brand);
  background: transparent;
  border: 0;
  font-size: 10px;
}

.admin-live-columns,
.admin-live-item {
  display: grid;
  grid-template-columns: minmax(190px, 1.7fr) 92px minmax(120px, 0.9fr) 90px 34px;
  align-items: center;
  gap: 9px;
}

.admin-live-columns {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-size: 9px;
}

.admin-live-item {
  width: 100%;
  min-height: 64px;
  padding: 8px 12px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 0;
}

.admin-live-item:last-child {
  border-bottom: 0;
}

.admin-live-item:hover {
  background: var(--surface-soft);
}

.admin-live-title,
.admin-live-title strong,
.admin-live-title small,
.admin-live-mode,
.admin-live-mode b,
.admin-live-mode small {
  min-width: 0;
  display: block;
}

.admin-live-title strong,
.admin-live-title small,
.admin-live-mode b,
.admin-live-mode small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-live-title strong {
  font-size: 11px;
}

.admin-live-title small,
.admin-live-mode small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.admin-live-mode b {
  font-size: 10px;
  font-weight: 650;
}

.admin-live-item-status {
  min-height: 23px;
  width: fit-content;
  max-width: 100%;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 12px;
  font-size: 9px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-live-item-status > i {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  background: currentColor;
  border-radius: 50%;
}

.admin-live-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-live-progress > i {
  width: 48px;
  height: 5px;
  overflow: hidden;
  background: var(--surface-tint);
  border-radius: 3px;
}

.admin-live-progress > i > b {
  height: 100%;
  display: block;
  background: var(--brand);
  border-radius: 3px;
}

.admin-live-progress small {
  color: var(--muted);
  font-size: 8px;
}

.admin-live-open {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  font-size: 13px;
}

.admin-live-list > .empty-card {
  margin: 12px;
}

.admin-task-list,
.admin-risk-list {
  padding: 0 14px;
}

.admin-task-list > button,
.admin-risk-list > button {
  width: 100%;
  min-height: 56px;
  padding: 7px 0;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 0;
}

.admin-task-list > button:last-child,
.admin-risk-list > button:last-child {
  border-bottom: 0;
}

.admin-task-list > button:hover,
.admin-risk-list > button:hover {
  background: var(--surface-soft);
}

.admin-task-list i,
.admin-risk-list i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  font-size: 12px;
  font-style: normal;
}

.admin-risk-list i.danger {
  color: var(--admin-danger);
  background: var(--admin-danger-soft);
}

.admin-risk-list i.warning {
  color: var(--admin-warning);
  background: var(--admin-warning-soft);
}

.admin-risk-list i.info {
  color: var(--admin-info);
  background: color-mix(in srgb, var(--admin-info) 13%, var(--surface));
}

.admin-task-list span,
.admin-task-list b,
.admin-task-list small,
.admin-risk-list span,
.admin-risk-list b,
.admin-risk-list small {
  min-width: 0;
  display: block;
}

.admin-task-list b,
.admin-task-list small,
.admin-risk-list b,
.admin-risk-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-task-list b,
.admin-risk-list b {
  font-size: 10px;
}

.admin-task-list small,
.admin-risk-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.admin-task-list > button > strong,
.admin-risk-list > button > strong {
  min-width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--surface-tint);
  border-radius: 11px;
  font-size: 9px;
}

.admin-ops-empty {
  min-height: 96px;
  padding: 20px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.admin-venue-snapshot-list {
  padding: 12px 15px 15px;
  overflow-x: auto;
}

.admin-venue-scale,
.admin-venue-row {
  min-width: 590px;
  display: grid;
  grid-template-columns: 92px repeat(6, minmax(55px, 1fr));
  align-items: center;
  gap: 4px;
}

.admin-venue-scale {
  min-height: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 8px;
}

.admin-venue-row {
  width: 100%;
  min-height: 40px;
  margin-top: 4px;
  padding: 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.admin-venue-name b,
.admin-venue-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-venue-name b {
  font-size: 9px;
}

.admin-venue-name small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.admin-venue-slot {
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-tint);
  border-radius: 4px;
  font-size: 7px;
}

.admin-venue-slot.booked {
  color: var(--on-brand);
  background: var(--brand);
}

.admin-venue-slot.event {
  color: var(--ink);
  background: color-mix(in srgb, var(--theme-gold) 46%, var(--surface));
}

.admin-sidebar-backdrop[hidden],
.admin-account-menu[hidden],
.admin-search-results[hidden],
.admin-nav-section[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .admin-ops-topbar {
    grid-template-columns: minmax(130px, auto) minmax(210px, 1fr) auto;
    gap: 12px;
  }

  .admin-account-button {
    min-width: 42px;
    width: 42px;
    grid-template-columns: 32px;
    padding: 0 5px;
    border-left: 0;
  }

  .admin-account-button > span:nth-child(2),
  .admin-account-button > i {
    display: none;
  }

  .admin-ops-dashboard {
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.75fr);
  }

  .admin-live-columns,
  .admin-live-item {
    grid-template-columns: minmax(175px, 1.5fr) 86px minmax(105px, 0.8fr) 78px 32px;
  }
}

@media (max-width: 900px) {
  html,
  body.dedicated-admin-entry.admin-authenticated {
    overscroll-behavior-y: contain;
  }

  body.dedicated-admin-entry.admin-authenticated > .app-shell > .topbar {
    z-index: 100;
    width: 268px;
    height: 100dvh;
    min-height: 0;
    display: flex;
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  body.dedicated-admin-entry.admin-authenticated.admin-sidebar-open > .app-shell > .topbar {
    transform: translateX(0);
  }

  body.dedicated-admin-entry.admin-authenticated .admin-side-nav {
    position: static;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 4px 10px 14px;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent;
    border: 0;
  }

  body.dedicated-admin-entry.admin-authenticated .admin-side-nav .admin-nav-parent,
  body.dedicated-admin-entry.admin-authenticated .admin-side-nav .admin-nav-children > button {
    width: 100%;
    min-width: 0;
    place-items: initial;
    text-align: left;
  }

  body.dedicated-admin-entry.admin-authenticated .admin-side-nav .admin-nav-parent {
    min-height: 42px;
    padding: 0 9px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    font-size: 12px;
  }

  body.dedicated-admin-entry.admin-authenticated .admin-side-nav .admin-nav-children > button {
    min-height: 34px;
    padding: 0 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    font-size: 11px;
  }

  body.dedicated-admin-entry.admin-authenticated .admin-side-nav .admin-nav-parent.active {
    box-shadow: inset 3px 0 0 var(--theme-accent);
  }

  body.dedicated-admin-entry.admin-authenticated .view,
  body.dedicated-admin-entry.admin-authenticated .notice,
  body.dedicated-admin-entry.admin-authenticated .message-strip {
    width: 100%;
    margin-left: 0;
  }

  body.dedicated-admin-entry.admin-authenticated #adminView {
    width: 100%;
    padding: 0 12px 34px;
    overflow-x: clip;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
  }

  .admin-sidebar-backdrop {
    position: fixed;
    z-index: 90;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(5, 14, 10, 0.48);
    border: 0;
    border-radius: 0;
  }

  .admin-ops-topbar {
    min-height: 58px;
    margin: 0 -12px 15px;
    padding: 0 11px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .admin-top-icon.admin-mobile-menu {
    display: inline-grid;
  }

  .admin-mobile-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .admin-mobile-brand img {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    border-radius: 5px;
  }

  .admin-mobile-brand b {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-breadcrumb,
  .admin-global-search,
  .admin-sound-toggle,
  #adminHelpButton,
  #adminRefreshAll {
    display: none;
  }

  .admin-top-actions {
    gap: 4px;
  }

  .admin-top-icon,
  .admin-account-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }

  .admin-account-button {
    padding: 2px;
  }

  .admin-account-avatar {
    width: 30px;
    height: 30px;
  }

  .admin-account-menu {
    top: 45px;
    width: min(220px, calc(100vw - 24px));
  }

  .admin-page-head {
    min-height: 0;
    margin-bottom: 13px;
    display: block;
  }

  .admin-page-head h2 {
    font-size: 21px;
    line-height: 29px;
  }

  .admin-page-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-page-actions > button {
    min-width: 0;
    min-height: 42px;
    padding: 0 8px;
  }

  .admin-page-actions > button:nth-child(n + 3) {
    display: none;
  }

  .admin-ops-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-ops-kpi {
    min-height: 88px;
    padding: 11px;
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .admin-ops-kpi strong {
    font-size: 22px;
    line-height: 27px;
  }

  .admin-ops-kpi > i {
    width: 34px;
    height: 34px;
  }

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

  .admin-live-columns {
    display: none;
  }

  .admin-live-head,
  .admin-ops-panel-head {
    min-height: 54px;
    padding: 0 12px;
  }

  .admin-live-item {
    min-height: 78px;
    padding: 9px 11px;
    grid-template-columns: minmax(0, 1fr) auto 30px;
    grid-template-areas:
      "title status open"
      "title progress open";
    gap: 7px;
  }

  .admin-live-title {
    grid-area: title;
  }

  .admin-live-item-status {
    grid-area: status;
    justify-self: end;
  }

  .admin-live-mode {
    display: none;
  }

  .admin-live-progress {
    grid-area: progress;
    justify-self: end;
  }

  .admin-live-open {
    grid-area: open;
    width: 30px;
  }

  .admin-ops-side {
    grid-row: 2;
  }

  .admin-venue-snapshot-list {
    padding: 10px 12px 13px;
  }

  .admin-task-list,
  .admin-risk-list {
    padding: 0 12px;
  }

  body.dedicated-admin-entry.admin-authenticated input,
  body.dedicated-admin-entry.admin-authenticated select,
  body.dedicated-admin-entry.admin-authenticated textarea {
    font-size: 16px;
  }

  body.dedicated-admin-entry.admin-authenticated button {
    touch-action: manipulation;
  }
}

@media (max-width: 430px) {
  .admin-page-actions > button {
    font-size: 11px;
  }

  .admin-ops-kpi {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  .admin-ops-kpi > i {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .admin-ops-kpi em {
    max-width: 100%;
  }

  .admin-live-head small {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  body.dedicated-admin-entry .topbar {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  body.dedicated-admin-entry .visual-theme-control {
    grid-column: 1 / -1;
  }

  .visual-theme-control > span:first-child {
    display: none;
  }

  .admin-page-head {
    align-items: flex-start;
  }

  .admin-page-actions {
    width: auto;
  }

  .admin-page-actions .sound-control-copy,
  .home-head .sound-control-copy {
    display: none;
  }

  .sound-control {
    min-height: 36px;
    padding: 0 8px;
  }

  .admin-live-item {
    grid-template-columns: 72px minmax(0, 1fr) 10px;
    padding-right: 10px;
    padding-left: 10px;
    gap: 8px;
  }

  .external-venue-toolbar {
    display: grid;
    align-items: start;
  }

  .external-venue-toolbar label {
    width: 100%;
  }
}

/* ROADMAP-5: venue booking and city play */
.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  flex: 0 0 40px;
  place-items: center;
  color: var(--brand-deep);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 19px;
  font-weight: 800;
}

.icon-button:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.booking-page-head,
.booking-head-actions,
.booking-admin-heading-tools,
.booking-admin-toolbar,
.booking-admin-tabs,
.booking-mode-tabs,
.booking-filters,
.booking-meta-line,
.booking-meetup-actions,
.booking-record-actions,
.booking-admin-row-actions {
  display: flex;
  align-items: center;
}

.booking-head-actions,
.booking-admin-heading-tools {
  gap: 10px;
}

.booking-account-state,
.booking-summary-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.booking-mode-tabs {
  width: fit-content;
  max-width: 100%;
  gap: 3px;
  margin: 0 0 18px;
  padding: 3px;
  background: #e8ede9;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.booking-mode-tabs button,
.booking-admin-tabs button {
  min-height: 38px;
  padding: 0 17px;
  color: var(--muted);
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 760;
}

.booking-mode-tabs button.active,
.booking-admin-tabs button.active {
  color: var(--brand-deep);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(20, 52, 40, 0.1);
}

.booking-create-band,
.booking-discovery-band,
.booking-my-band {
  margin: 0 -28px;
  padding: 24px 28px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.booking-discovery-band,
.booking-my-band {
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
}

.compact-section-heading {
  margin-bottom: 18px;
}

.status-chip {
  display: inline-flex;
  min-height: 28px;
  padding: 0 10px;
  align-items: center;
  color: #265d85;
  background: #e7f1f8;
  border: 1px solid #c8ddea;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
}

.booking-form label,
.booking-admin-form label {
  min-width: 0;
}

.booking-form label > span,
.booking-admin-form label > span {
  display: block;
  margin-bottom: 6px;
  color: #4f5d56;
  font-size: 12px;
  font-weight: 760;
}

.booking-form input,
.booking-form select,
.booking-admin-form input,
.booking-admin-form select,
.booking-filters input,
.booking-filters select,
.booking-admin-toolbar select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.booking-form .wide-field,
.booking-admin-form .wide-field {
  grid-column: 1 / -1;
}

.booking-consent {
  display: flex;
  min-height: 42px;
  padding: 8px 11px;
  align-items: center;
  gap: 9px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.booking-consent input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
}

.booking-consent > span {
  margin: 0 !important;
}

.booking-slot-form .booking-slot-picker,
.booking-slot-form .booking-form-message {
  grid-column: 1 / -1;
}

.booking-slot-picker {
  display: grid;
  min-height: 92px;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}

.booking-slot {
  display: grid;
  min-width: 0;
  min-height: 78px;
  padding: 10px;
  place-content: center;
  gap: 2px;
  color: var(--ink);
  text-align: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.booking-slot strong,
.booking-slot span,
.booking-slot small {
  overflow-wrap: anywhere;
}

.booking-slot strong {
  font-size: 15px;
}

.booking-slot span,
.booking-slot small {
  color: var(--muted);
  font-size: 11px;
}

.booking-slot:hover:not(:disabled),
.booking-slot.selected {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.booking-slot:hover:not(:disabled) span,
.booking-slot:hover:not(:disabled) small,
.booking-slot.selected span,
.booking-slot.selected small {
  color: rgba(255, 255, 255, 0.78);
}

.booking-slot.unavailable {
  color: #7b8580;
  background: #f1f3f1;
  border-style: dashed;
}

.booking-slot.waitlistable {
  color: #8c5014;
  background: #fff8ed;
  border-color: #e6c89e;
}

.booking-form-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.booking-filters {
  width: min(100%, 360px);
  gap: 8px;
}

.booking-filters input,
.booking-filters select {
  min-width: 0;
}

.booking-meetup-list,
.booking-record-list,
.booking-notification-list,
.booking-admin-table,
.booking-connection-list {
  display: grid;
  gap: 8px;
}

.booking-meetup-item {
  display: grid;
  min-width: 0;
  padding: 17px 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
}

.booking-meetup-main,
.booking-meetup-title {
  min-width: 0;
}

.booking-meetup-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.booking-meetup-title h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.booking-meetup-main > p,
.booking-participant-line {
  margin: 7px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  font-size: 13px;
}

.booking-meta-line {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.booking-meta-line span,
.booking-status,
.booking-action-note {
  display: inline-flex;
  min-height: 25px;
  padding: 0 8px;
  align-items: center;
  color: #4f5d56;
  background: #f0f3f1;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 720;
}

.booking-status-recruiting,
.booking-status-confirmed,
.booking-status-completed {
  color: #12603b;
  background: #e3f1e8;
}

.booking-status-full,
.booking-status-hold,
.booking-status-waitlist {
  color: #88500f;
  background: #fff0d8;
}

.booking-status-in_progress,
.booking-status-checked_in {
  color: #255f8b;
  background: #e6f1f9;
}

.booking-status-cancelled,
.booking-status-no_show {
  color: #9a3e2b;
  background: #fbe8e3;
}

.booking-meetup-actions,
.booking-record-actions,
.booking-admin-row-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.booking-meetup-actions button,
.booking-record-actions button,
.booking-admin-row-actions button {
  min-height: 34px;
  padding: 0 11px;
  white-space: nowrap;
  font-size: 12px;
}

.booking-my-layout,
.booking-ops-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 22px;
}

.booking-record-row,
.booking-notification-row,
.booking-admin-row,
.booking-connection-row {
  display: grid;
  min-width: 0;
  padding: 13px 14px;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.booking-record-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.booking-record-row strong,
.booking-admin-row strong,
.booking-connection-row strong,
.booking-notification-row strong {
  overflow-wrap: anywhere;
}

.booking-record-row p,
.booking-admin-row p,
.booking-connection-row p,
.booking-notification-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.booking-record-status {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
}

.booking-record-status b {
  color: var(--ink);
}

.booking-notification-row time,
.booking-connection-row time {
  color: #8a948f;
  font-size: 11px;
}

.booking-admin-center {
  overflow: hidden;
}

.booking-admin-toolbar {
  min-width: 0;
  margin: 8px -22px 0;
  padding: 14px 22px;
  justify-content: space-between;
  gap: 18px;
  background: #f5f7f5;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.booking-admin-toolbar label {
  display: grid;
  min-width: min(100%, 280px);
  gap: 5px;
}

.booking-admin-toolbar label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.booking-admin-tabs {
  max-width: 100%;
  padding: 3px;
  overflow-x: auto;
  background: #e7ece8;
  border-radius: 6px;
}

.booking-admin-metrics {
  display: grid;
  margin: 0 -22px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.booking-admin-metrics > div {
  min-width: 0;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.booking-admin-metrics > div:last-child {
  border-right: 0;
}

.booking-admin-metrics span,
.booking-admin-metrics strong {
  display: block;
  overflow-wrap: anywhere;
}

.booking-admin-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.booking-admin-metrics strong {
  margin-top: 3px;
  color: var(--brand-deep);
  font-size: 21px;
}

.booking-admin-section {
  margin: 0 -22px;
  padding: 22px;
}

.booking-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  border-top: 1px solid var(--line);
}

.booking-admin-form {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.booking-admin-form-grid .booking-admin-form:nth-child(odd) {
  padding-right: 22px;
  border-right: 1px solid var(--line);
}

.booking-admin-form .subsection-heading {
  margin-bottom: 4px;
}

.weekday-selector {
  display: grid;
  grid-template-columns: repeat(7, minmax(38px, 1fr));
  gap: 6px;
}

.weekday-selector label {
  position: relative;
}

.weekday-selector input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.weekday-selector span {
  display: grid !important;
  min-height: 38px;
  margin: 0 !important;
  place-items: center;
  color: var(--muted) !important;
  background: #f1f3f1;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.weekday-selector input:checked + span {
  color: #fff !important;
  background: var(--brand);
  border-color: var(--brand);
}

.booking-admin-table,
.booking-connection-list {
  margin-top: 18px;
}

.booking-directory-review {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.booking-directory-review .subsection-heading {
  margin-bottom: 12px;
}

.booking-directory-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.booking-admin-row,
.booking-connection-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.booking-admin-row > div:last-child,
.booking-connection-row > div:last-child {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
}

.booking-connection-form {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 1050px) {
  .booking-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .booking-admin-tabs {
    width: 100%;
  }

  .booking-admin-tabs button {
    flex: 1 0 auto;
  }

  .booking-admin-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .booking-admin-metrics > div:nth-child(3) {
    border-right: 0;
  }

  .booking-admin-metrics > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .booking-page-head,
  .booking-discovery-band .section-heading,
  .booking-my-band .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .booking-head-actions,
  .booking-filters,
  .booking-mode-tabs {
    width: 100%;
  }

  .booking-mode-tabs button,
  .booking-filters > * {
    flex: 1 1 0;
  }

  .booking-create-band,
  .booking-discovery-band,
  .booking-my-band {
    margin-right: -16px;
    margin-left: -16px;
    padding: 20px 16px;
  }

  .booking-form,
  .booking-admin-form-grid,
  .booking-my-layout,
  .booking-ops-columns {
    grid-template-columns: 1fr;
  }

  .booking-admin-form-grid .booking-admin-form:nth-child(odd) {
    padding-right: 0;
    border-right: 0;
  }

  .booking-meetup-item,
  .booking-record-row,
  .booking-admin-row,
  .booking-connection-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .booking-meetup-actions,
  .booking-record-actions,
  .booking-admin-row-actions {
    justify-content: flex-start;
  }

  .booking-record-status,
  .booking-admin-row > div:last-child,
  .booking-connection-row > div:last-child {
    justify-items: start;
  }

  .booking-admin-toolbar,
  .booking-admin-metrics,
  .booking-admin-section {
    margin-right: -16px;
    margin-left: -16px;
  }

  .booking-admin-toolbar,
  .booking-admin-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .booking-admin-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    overflow: visible;
  }

  .booking-admin-tabs button {
    width: 100%;
    min-height: 42px;
    padding: 5px 8px;
    white-space: normal;
  }

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

  .booking-admin-metrics > div,
  .booking-admin-metrics > div:nth-child(3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .booking-admin-metrics > div:nth-child(even) {
    border-right: 0;
  }

  .booking-admin-metrics > div:last-child {
    border-right: 1px solid var(--line);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--surface-soft);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(50, 111, 168, 0.3);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: 252px;
  height: 100vh;
  padding: 26px 18px 20px;
  overflow-y: auto;
  flex-direction: column;
  color: #f7fbf8;
  background: var(--brand-deep);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-lockup > div {
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--lime);
  border-radius: 50%;
  background: var(--lime);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  width: 32px;
  height: 32px;
  content: "";
  border: 2px solid var(--brand-deep);
  border-radius: 50%;
}

.brand-mark::before {
  left: -17px;
}

.brand-mark::after {
  right: -17px;
}

.topbar h1 {
  max-width: 164px;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 20px;
  font-weight: 760;
}

.eyebrow,
.section-kicker {
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar .eyebrow {
  margin: 0;
  color: var(--lime);
}

.language-switch {
  display: grid;
  gap: 7px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.language-switch select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  color: #f7fbf8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

.language-switch option {
  color: var(--ink);
  background: #ffffff;
}

.nav-tabs {
  display: grid;
  gap: 5px;
}

.nav-tabs button {
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 650;
}

.nav-tabs button::before {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  place-items: center;
  color: var(--lime);
  font-size: 15px;
  font-weight: 800;
}

.nav-tabs button[data-view="home"]::before { content: "⌂"; }
.nav-tabs button[data-view="front"]::before { content: "●"; }
.nav-tabs button[data-view="meetup"]::before { content: "↔"; }
.nav-tabs button[data-view="signup"]::before { content: "▦"; }
.nav-tabs button[data-view="register"]::before { content: "◎"; }
.nav-tabs button[data-view="admin"]::before { content: "⚙"; }

.nav-tabs button:hover,
.nav-tabs button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-tabs button.active {
  box-shadow: inset 3px 0 0 var(--lime);
}

body.dedicated-admin-entry .nav-tabs {
  display: none;
}

body.dedicated-admin-entry .sidebar-status {
  margin-top: auto;
}

.nav-symbol {
  display: none;
}

.sidebar-status {
  display: flex;
  margin-top: auto;
  padding: 14px 12px;
  align-items: flex-start;
  gap: 9px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.sidebar-status strong,
.sidebar-status small {
  display: block;
}

.sidebar-status strong {
  font-size: 12px;
}

.sidebar-status small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 5px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(211, 243, 111, 0.12);
}

.view,
.notice,
.message-strip {
  width: calc(100% - 252px);
  max-width: 1520px;
  margin-left: 252px;
}

.view {
  display: none;
  padding: 30px 36px 70px;
}

.view.active {
  display: block;
}

.notice {
  margin-top: 18px;
  padding: 12px 36px;
  color: #7c370d;
  background: #fff1dc;
  border-block: 1px solid #efc99f;
}

.message-strip {
  display: grid;
  padding: 18px 36px 0;
  gap: 8px;
}

.message-strip[hidden] {
  display: none;
}

.message-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) auto minmax(240px, 1.6fr);
  padding: 11px 14px;
  align-items: center;
  gap: 12px;
  background: #fffdf8;
  border: 1px solid #eadfc8;
  border-left: 4px solid var(--clay);
  border-radius: 6px;
}

.message-card strong,
.message-card p,
.message-card span {
  margin: 0;
}

.message-card span {
  color: var(--clay);
  font-size: 12px;
  font-weight: 700;
}

.message-card p {
  color: var(--muted);
  font-size: 13px;
}

.page-head {
  display: flex;
  min-height: 64px;
  margin-bottom: 20px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-head h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 760;
}

.page-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 901px) {
  .registration-head > div:first-child {
    min-width: 150px;
    flex: 0 0 150px;
  }

  .registration-head .compact-toolbar {
    flex: 1 1 auto;
  }
}

.home-head {
  align-items: center;
}

.refresh-icon-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 21px;
}

.matchday-banner {
  position: relative;
  display: grid;
  min-height: 222px;
  margin-bottom: 18px;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.72fr);
  color: #ffffff;
  background: var(--brand-deep);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.banner-copy {
  z-index: 1;
  display: flex;
  padding: 30px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.banner-copy h2 {
  max-width: 560px;
  margin: 12px 0 8px;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 29px;
  font-weight: 780;
}

.banner-copy p {
  max-width: 580px;
  margin-bottom: 21px;
  color: rgba(255, 255, 255, 0.7);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
}

.live-pill i {
  width: 7px;
  height: 7px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(228, 87, 61, 0.2);
}

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

.light-button,
.outline-light-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  font-weight: 750;
}

.light-button {
  color: var(--brand-deep);
  background: var(--lime);
  border: 1px solid var(--lime);
}

.outline-light-button {
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.court-visual {
  position: relative;
  min-height: 222px;
  padding: 24px;
  overflow: hidden;
  background: #a9533c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.court-visual::before {
  position: absolute;
  inset: 12px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 9px rgba(88, 47, 37, 0.08);
}

.court-lines {
  position: absolute;
  top: 33px;
  right: 20px;
  bottom: 33px;
  left: 20px;
  background: #28755f;
  border: 3px solid #f7faf8;
  box-shadow: 0 10px 0 rgba(75, 37, 30, 0.18), inset 0 0 30px rgba(10, 69, 53, 0.14);
}

.court-singles-line,
.court-service-line,
.court-service-center,
.court-center-mark {
  position: absolute;
  display: block;
  background: #f7faf8;
}

.court-singles-line {
  right: 0;
  left: 0;
  height: 2px;
}

.court-singles-top { top: 14%; }
.court-singles-bottom { bottom: 14%; }

.court-service-line {
  top: 14%;
  bottom: 14%;
  width: 2px;
}

.court-service-left { left: 27%; }
.court-service-right { right: 27%; }

.court-service-center {
  top: 50%;
  right: 27%;
  left: 27%;
  height: 2px;
}

.court-center-mark {
  top: calc(50% - 1px);
  width: 13px;
  height: 2px;
}

.court-center-left { left: 0; }
.court-center-right { right: 0; }

.court-net {
  position: absolute;
  z-index: 3;
  top: -8px;
  bottom: -8px;
  left: calc(50% - 3px);
  width: 7px;
  background: rgba(17, 45, 38, 0.86);
  border-inline: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 4px 0 0 rgba(17, 45, 38, 0.18);
}

.court-ball {
  position: absolute;
  z-index: 4;
  top: 28%;
  left: 68%;
  width: 17px;
  height: 17px;
  background: var(--lime);
  border: 2px solid #efffb8;
  border-radius: 50%;
  box-shadow: 6px 7px 0 rgba(11, 59, 47, 0.25);
}

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

.metric-card {
  min-width: 0;
  padding: 17px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metric-card span,
.metric-card small,
.metric-card strong {
  display: block;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card strong {
  margin: 4px 0 2px;
  font-size: 28px;
  line-height: 1;
}

.metric-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-actions {
  display: grid;
  margin-bottom: 26px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-actions button {
  display: grid;
  min-width: 0;
  min-height: 86px;
  padding: 14px 15px;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.quick-actions button:hover {
  border-color: var(--brand);
  box-shadow: 0 7px 20px rgba(16, 43, 33, 0.07);
}

.quick-actions button > span {
  display: grid;
  width: 32px;
  height: 32px;
  grid-row: 1 / span 2;
  place-items: center;
  color: var(--brand-deep);
  background: var(--lime);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.quick-actions strong,
.quick-actions small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-actions strong {
  align-self: end;
  font-size: 14px;
}

.quick-actions small {
  align-self: start;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 26px 28px;
}

.dashboard-section {
  min-width: 0;
}

.dashboard-main {
  grid-row: span 2;
}

.section-heading {
  display: flex;
  min-height: 48px;
  margin-bottom: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-strong);
}

.section-heading h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.section-heading .section-kicker {
  margin: 0 0 2px;
  font-size: 9px;
}

.text-button {
  padding: 6px 0;
  color: var(--brand);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 750;
}

.primary-button,
.ghost-button,
.link-button,
.score-button,
.action-row button,
.segmented-control button,
.admin-workspace-nav button {
  min-height: 42px;
  border-radius: 6px;
  font-weight: 720;
}

.primary-button,
.link-button {
  color: var(--on-brand);
  background: var(--brand);
  border: 1px solid var(--brand);
}

.primary-button:hover,
.link-button:hover {
  background: #0f5737;
  border-color: #0f5737;
}

.ghost-button {
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.ghost-button:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.link-button {
  display: inline-flex;
  max-width: 100%;
  padding: 0 15px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar {
  display: grid;
  margin-bottom: 18px;
  padding: 14px;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.compact-toolbar {
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  background: transparent;
  border: 0;
}

.match-picker {
  position: sticky;
  z-index: 8;
  top: 12px;
  box-shadow: 0 7px 24px rgba(16, 43, 33, 0.08);
}

label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

label > span,
.toolbar label > span {
  color: #4d5b54;
  font-size: 12px;
  font-weight: 720;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #9aaba1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(20, 108, 67, 0.11);
}

.panel {
  min-width: 0;
  margin-bottom: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.panel > h2,
.history-panel h2 {
  margin-bottom: 16px;
  font-size: 17px;
}

.form-grid,
.match-form {
  display: grid;
  align-items: end;
  gap: 12px;
}

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

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

.form-grid .wide-field,
.match-form .wide-field {
  grid-column: 1 / -1;
}

.feature-settings {
  min-width: 0;
  margin: 4px 0 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.feature-settings legend {
  padding: 0 10px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.feature-settings > .form-note {
  margin: 2px 0 12px;
  line-height: 1.55;
}

.feature-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.feature-toggle {
  min-height: 68px;
  padding: 12px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.feature-toggle input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
}

.feature-toggle-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.feature-toggle-copy strong {
  color: var(--ink);
  font-size: 13px;
}

.feature-toggle-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.local-server-center {
  overflow: hidden;
}

.local-server-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.local-server-head h2 {
  margin: 2px 0 6px;
  font-size: 18px;
}

.local-server-head .form-note {
  max-width: 760px;
  line-height: 1.55;
}

.local-server-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.local-server-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  padding: 16px 20px 0 0;
}

.local-server-summary > div {
  min-height: 62px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.local-server-summary > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.local-server-summary span,
.local-server-summary strong {
  display: block;
}

.local-server-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.local-server-summary strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.local-server-summary strong[data-tone="good"] {
  color: var(--brand);
}

.local-server-summary strong[data-tone="warning"] {
  color: var(--warning);
}

.local-server-summary > p {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.local-server-entry {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px 0 0 20px;
  border-left: 1px solid var(--line);
}

.local-server-entry img {
  width: 132px;
  height: 132px;
  padding: 6px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.local-server-entry h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.local-server-entry p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.local-server-entry .link-button,
.local-server-entry .text-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin: 0 8px 6px 0;
}

.test-data-reset {
  overflow: hidden;
}

.test-data-reset-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.test-data-reset-head h2 {
  margin: 2px 0 6px;
  font-size: 18px;
}

.test-data-reset-head p {
  max-width: 850px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.test-data-reset-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.test-data-reset-metrics > div {
  min-width: 0;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
}

.test-data-reset-metrics > div:last-child {
  border-right: 0;
}

.test-data-reset-metrics span,
.test-data-reset-metrics strong {
  display: block;
}

.test-data-reset-metrics span {
  min-height: 34px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.test-data-reset-metrics strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.test-data-reset-metrics > div:first-child strong {
  color: var(--clay);
}

.test-data-reset-preserved {
  display: flex;
  margin-top: 14px;
  align-items: baseline;
  gap: 12px;
}

.test-data-reset-preserved strong {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 12px;
}

.test-data-reset-preserved p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.test-data-reset-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  margin-top: 14px;
  align-items: end;
  gap: 12px;
}

.test-data-reset-confirm {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.test-data-reset-confirm input {
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.test-data-reset-actions .danger-button {
  min-height: 42px;
  padding-inline: 18px;
  color: #ffffff;
  background: #a43b32;
  border-color: #a43b32;
}

.test-data-reset-actions .danger-button:hover:not(:disabled) {
  color: #ffffff;
  background: #8d3029;
  border-color: #8d3029;
}

.test-data-reset-actions .danger-button:disabled {
  color: var(--muted);
  background: var(--surface-tint);
  border-color: var(--line);
  opacity: 1;
}

.test-data-reset-message {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.test-data-reset-message[data-tone="warning"] {
  color: var(--warning);
}

.test-data-reset-message[data-tone="good"] {
  color: var(--brand);
}

@media (max-width: 980px) {
  .test-data-reset-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .test-data-reset-metrics > div:nth-child(3n) {
    border-right: 0;
  }

  .test-data-reset-metrics > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .test-data-reset-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .test-data-reset-metrics > div:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .test-data-reset-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .test-data-reset-metrics > div:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .test-data-reset-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .test-data-reset-actions .danger-button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .local-server-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .local-server-summary {
    padding-right: 0;
  }

  .local-server-entry {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 480px) {
  .local-server-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .local-server-summary > div:nth-child(odd) {
    border-right: 0;
  }

  .local-server-entry {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: start;
  }

  .local-server-entry img {
    width: 112px;
    height: 112px;
  }
}

.form-grid > button,
.match-form > button {
  min-height: 42px;
  padding: 0 14px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-grid,
.data-grid,
.register-layout,
.account-layout,
.business-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.register-layout > .panel,
.account-layout > .panel,
.admin-grid > .panel,
.data-grid > .panel,
.business-grid > .panel {
  height: 100%;
}

#clubIdentityPanel {
  order: -1;
}

.account-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.account-layout > .panel {
  height: auto;
}

.account-panel {
  min-width: 0;
}

.account-register-panel {
  border-top: 4px solid var(--brand);
}

.account-login-panel {
  border-top: 4px solid var(--blue);
}

.account-panel > .section-kicker {
  display: block;
  margin-bottom: 4px;
}

.account-form {
  margin-top: 16px;
}

.account-login-form {
  grid-template-columns: 1fr;
}

.member-account-panel {
  border-top: 4px solid var(--brand);
}

.member-account-header {
  display: flex;
  min-width: 0;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.member-account-header h2 {
  margin: 3px 0 4px;
  overflow-wrap: anywhere;
  font-size: 22px;
}

.member-account-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.member-account-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #b9d8c7;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 760;
}

.member-account-grid {
  display: grid;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.member-account-field {
  display: grid;
  min-width: 0;
  padding: 13px 4px;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.member-account-field:nth-child(odd) {
  padding-right: 16px;
}

.member-account-field:nth-child(even) {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.member-account-field span {
  color: var(--muted);
  font-size: 11px;
}

.member-account-field strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.member-account-actions {
  display: flex;
  margin-top: 16px;
  justify-content: flex-end;
}

.compact-heading {
  margin-bottom: 16px;
  align-items: end;
}

.compact-heading h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.compact-select-label {
  display: grid;
  min-width: 240px;
  gap: 5px;
}

.compact-select-label span,
.preferred-club-row label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.preferred-club-row {
  display: grid;
  margin-bottom: 18px;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.preferred-club-row label {
  display: grid;
  gap: 5px;
}

.club-context-grid,
.club-admin-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.club-context-grid > section,
.club-admin-split > section {
  min-width: 0;
}

.club-context-grid h3,
.club-admin-split h3,
#clubMembershipAdminPanel > h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.club-notification-list {
  margin-top: 16px;
}

.ownership-transfer-center {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.member-import-section {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.member-import-section > h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.membership-editor {
  display: grid;
  width: 100%;
  margin-top: 10px;
  padding-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
}

.membership-editor label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.membership-editor label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.membership-editor .wide-field {
  grid-column: 1 / -1;
}

.ownership-transfer-center > h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.ownership-transfer-item > p {
  margin-block: 5px;
}

.ownership-actions {
  display: flex;
  margin-top: 11px;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.ownership-actions input {
  min-width: min(260px, 100%);
  flex: 1 1 220px;
}

.ownership-actions button,
.danger-button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 720;
}

.ownership-actions .approve-button {
  color: #ffffff;
  background: var(--brand);
  border: 1px solid var(--brand);
}

.ownership-actions .reject-button,
.danger-button {
  color: #8e2f22;
  background: #fff7f5;
  border: 1px solid #e8b6ab;
}

.danger-button:hover {
  background: #fdebe7;
  border-color: #d98676;
}

.compact-list-item {
  padding-block: 10px;
}

.club-join-panel {
  max-width: 760px;
  margin-inline: auto;
}

.club-join-preview {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.club-join-preview h2 {
  margin: 5px 0 8px;
  font-size: 25px;
}

.club-join-form {
  margin-top: 18px;
}

.club-join-actions {
  display: flex;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.club-invite-preview {
  display: grid;
  margin: 14px 0;
  padding: 14px;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.club-invite-preview img {
  width: 180px;
  height: 180px;
  padding: 6px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
}

.club-invite-preview a {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--brand);
  font-weight: 700;
}

.review-club-item > input,
#clubJoinApplicationList .list-item > input,
.duplicate-identity-item > input,
.club-role-item > input {
  width: 100%;
  margin-top: 10px;
}

.club-role-section {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.club-role-section > h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.subsection-heading {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.subsection-heading h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.subsection-heading p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.permission-note {
  margin-top: 8px;
}

.segmented-control,
.admin-workspace-nav {
  display: flex;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 4px;
  overflow-x: auto;
  gap: 3px;
  background: #e7ece8;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.segmented-control button,
.admin-workspace-nav button {
  min-width: max-content;
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
}

.segmented-control button.active,
.admin-workspace-nav button.active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(23, 33, 29, 0.1);
}

[data-profile-panel].profile-panel-hidden,
.admin-panel-hidden {
  display: none !important;
}

.player-activity-panel {
  border-top: 4px solid var(--blue);
}

.activity-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.activity-toolbar h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.activity-toolbar label {
  display: grid;
  min-width: 220px;
  gap: 5px;
}

.activity-toolbar label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.player-activity-content {
  display: grid;
  margin-top: 16px;
  gap: 18px;
}

.activity-player-line {
  display: flex;
  min-width: 0;
  padding: 11px 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-block: 1px solid var(--line);
}

.activity-player-line > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.activity-player-line strong {
  font-size: 16px;
}

.activity-player-line span,
.activity-player-line small {
  color: var(--muted);
  font-size: 11px;
}

.activity-empty {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  background: #f5f7f6;
  border-left: 3px solid var(--line-strong);
}

.activity-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line-strong);
}

.activity-stat {
  display: grid;
  min-width: 0;
  min-height: 104px;
  padding: 14px;
  align-content: center;
  gap: 4px;
  border-right: 1px solid var(--line);
}

.activity-stat:last-child {
  border-right: 0;
}

.activity-stat span,
.activity-stat small {
  color: var(--muted);
  font-size: 11px;
}

.activity-stat strong {
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.25;
}

.activity-pattern-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line-strong);
}

.activity-pattern-line > div {
  display: grid;
  min-width: 0;
  padding: 10px 14px;
  gap: 2px;
}

.activity-pattern-line > div + div {
  border-left: 1px solid var(--line);
}

.activity-pattern-line span {
  color: var(--muted);
  font-size: 10px;
}

.activity-pattern-line strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.activity-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 22px;
}

.activity-chart-section,
.activity-recent-section {
  min-width: 0;
  padding-top: 4px;
}

.activity-chart-section h3,
.activity-recent-section h3 {
  margin-bottom: 12px;
  font-size: 14px;
}

.activity-bars {
  display: grid;
  height: 190px;
  min-width: 540px;
  padding: 8px 4px 0;
  grid-template-columns: repeat(12, minmax(30px, 1fr));
  align-items: end;
  gap: 6px;
  border-bottom: 1px solid var(--line-strong);
}

.activity-chart-section {
  overflow-x: auto;
}

.activity-bar-item {
  display: grid;
  height: 180px;
  grid-template-rows: 18px minmax(0, 1fr) 22px;
  align-items: end;
  justify-items: center;
  gap: 3px;
}

.activity-bar-item > span,
.activity-bar-item > small {
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.activity-bar-item > i {
  display: block;
  width: min(22px, 72%);
  min-height: 2px;
  background: var(--blue);
  border-radius: 2px 2px 0 0;
}

.activity-recent-list {
  display: grid;
}

.activity-recent-list > div {
  display: flex;
  min-width: 0;
  min-height: 50px;
  padding: 8px 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.activity-recent-list > div > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.activity-recent-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.activity-recent-list small,
.activity-recent-list b {
  color: var(--muted);
  font-size: 10px;
}

.activity-recent-list b {
  flex: 0 0 auto;
}

.booking-connection {
  display: flex;
  min-height: 66px;
  padding: 11px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #f2f5f7;
  border-left: 4px solid var(--blue);
}

.booking-connection.connected {
  background: var(--brand-soft);
  border-left-color: var(--brand);
}

.booking-connection.testing {
  background: #fff5e8;
  border-left-color: var(--warning);
}

.booking-connection > div {
  display: grid;
  gap: 2px;
}

.booking-connection span,
.booking-connection p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.booking-connection strong {
  font-size: 13px;
}

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

.score-mode-nav {
  width: fit-content;
  max-width: 100%;
}

.score-mode-panel-hidden {
  display: none !important;
}

.quick-builder-panel {
  border-top: 4px solid var(--brand);
}

.quick-builder-form textarea {
  min-height: 112px;
  resize: vertical;
}

.quick-seed-field {
  display: grid;
  gap: 9px;
}

.quick-seed-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.quick-seed-heading > span {
  font-size: 12px;
  font-weight: 720;
}

.quick-seed-heading small {
  color: var(--muted);
  font-size: 11px;
}

.quick-seed-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 8px;
}

.quick-seed-item {
  display: grid;
  min-width: 0;
  min-height: 52px;
  padding: 7px 8px 7px 10px;
  grid-template-columns: minmax(82px, 1fr) 72px 88px;
  align-items: center;
  gap: 8px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.quick-seed-item > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.quick-seed-item .quick-seed-control {
  display: grid;
  grid-template-columns: auto 42px;
  align-items: center;
  gap: 5px;
}

.quick-seed-item .quick-age-control {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
}

.quick-seed-item label span {
  color: var(--muted);
  font-size: 10px;
}

.quick-seed-item input {
  min-height: 36px;
  padding: 5px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.quick-monthly-rule {
  padding: 9px 11px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
}

.quick-record-section {
  margin-top: 26px;
}

.quick-session-list {
  display: grid;
  gap: 30px;
}

.quick-session-block {
  min-width: 0;
  padding-top: 2px;
}

.quick-session-block + .quick-session-block {
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.quick-session-header {
  display: flex;
  margin-bottom: 13px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.quick-session-header h2 {
  margin: 0 0 5px;
  overflow-wrap: anywhere;
  font-size: 19px;
}

.quick-session-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.quick-participant-summary {
  display: flex;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-participant-summary span {
  min-width: 0;
  padding: 5px 7px;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.quick-standings {
  min-width: 0;
  margin-bottom: 14px;
  border-top: 3px solid var(--brand);
  border-bottom: 1px solid var(--line-strong);
}

.quick-standings-header {
  display: flex;
  min-width: 0;
  padding: 11px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #edf4ef;
  border-inline: 1px solid var(--line-strong);
}

.quick-standings-header > div {
  min-width: 0;
}

.quick-standings-header span {
  color: var(--brand);
  font-size: 9px;
  font-weight: 820;
}

.quick-standings-header h3 {
  margin: 2px 0 0;
  font-size: 15px;
}

.quick-standings-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.quick-standings-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.quick-standings table {
  width: 100%;
  min-width: 900px;
  border-spacing: 0;
  background: #ffffff;
  font-size: 11px;
}

.quick-standings th,
.quick-standings td {
  height: 38px;
  padding: 7px 10px;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-standings th:last-child,
.quick-standings td:last-child {
  border-right: 0;
}

.quick-standings th {
  color: #526058;
  background: #f5f7f6;
  font-size: 10px;
  white-space: nowrap;
}

.quick-standings th:nth-child(2),
.quick-standings td:nth-child(2),
.quick-standings th:last-child,
.quick-standings td:last-child {
  text-align: left;
}

.quick-standings tr.leader td {
  color: var(--brand-deep);
  background: #f2f8f4;
}

.quick-standings td strong {
  font-size: 13px;
}

.qualification-badge {
  display: inline-flex;
  min-height: 24px;
  padding: 3px 7px;
  align-items: center;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.qualification-badge.qualified {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.qualification-badge.pending {
  color: #745119;
  background: #fff0d7;
}

.session-status {
  display: inline-flex;
  min-height: 28px;
  padding: 4px 9px;
  flex: 0 0 auto;
  align-items: center;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border: 1px solid #c5ddcf;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 760;
}

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

.quick-pairing-card {
  min-width: 0;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.quick-pairing-card.completed {
  border-color: #bcd4c5;
  box-shadow: inset 0 3px 0 var(--brand);
}

.quick-pairing-head {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-pairing-head strong {
  font-size: 13px;
}

.quick-pairing-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.big-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.big-score-team {
  display: grid;
  min-width: 0;
  gap: 10px;
  justify-items: center;
}

.big-score-team h3 {
  display: grid;
  width: 100%;
  min-height: 40px;
  margin: 0;
  place-items: center;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: 14px;
}

.big-score-team.winner h3 {
  color: var(--brand);
}

.score-stepper {
  display: grid;
  grid-template-columns: 40px 54px 40px;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.score-stepper button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: var(--brand-deep);
  background: var(--surface-tint);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 740;
}

.score-stepper button:last-child {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.score-stepper span {
  display: grid;
  width: 54px;
  height: 48px;
  place-items: center;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 27px;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}

.big-score-colon {
  color: var(--muted);
  text-align: center;
  font-size: 24px;
  font-weight: 800;
}

.quick-score-note {
  margin: 13px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.quick-score-actions {
  display: flex;
  margin-top: 13px;
  justify-content: center;
}

.quick-confirm-button {
  min-width: 118px;
  min-height: 38px;
  padding: 0 14px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border: 1px solid #b7d5c3;
  border-radius: 5px;
  font-weight: 740;
}

.quick-pairing-card.completed .quick-confirm-button {
  color: var(--muted);
  background: #ffffff;
  border-color: var(--line-strong);
}

.summary-cards {
  display: flex;
  max-width: 820px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.summary-cards span {
  padding: 5px 8px;
  color: #425149;
  background: #e7ece8;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.admin-session-bar {
  display: flex;
  min-height: 48px;
  margin: -8px 0 16px;
  padding: 8px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #425149;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.admin-session-bar button {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 76px;
  white-space: nowrap;
}

.review-actions {
  display: flex;
  margin-top: 11px;
  flex-wrap: wrap;
  gap: 7px;
}

.review-actions button {
  min-height: 34px;
  margin: 0;
  padding: 0 11px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 720;
}

.review-actions .approve-button {
  color: #ffffff;
  background: var(--brand);
  border: 1px solid var(--brand);
}

.review-actions .reject-button {
  color: #8e2f22;
  background: #fff7f5;
  border: 1px solid #e8b6ab;
}

.scoreboard {
  overflow: hidden;
  color: #ffffff;
  background: #101b17;
  border: 1px solid #24362e;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(16, 27, 23, 0.2);
}

.scoreboard[hidden] {
  display: none;
}

.score-topbar {
  display: flex;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #172720;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.score-topbar h2 {
  max-width: 660px;
  margin: 0;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 21px;
}

.score-topbar .eyebrow {
  margin-bottom: 4px;
  color: var(--lime);
}

.badge-row,
.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge-row span,
.item-tags span {
  display: inline-flex;
  min-height: 23px;
  padding: 3px 7px;
  align-items: center;
  color: #52615a;
  background: #edf1ee;
  border: 1px solid #dde4df;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 720;
}

.badge-row span {
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.item-tags .hot {
  color: #7f311f;
  background: #ffe8df;
  border-color: #f5c8b8;
}

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

.team-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 286px;
  padding: 22px;
  grid-template-rows: auto 1fr auto auto;
  background: #101b17;
  border-right: 1px solid rgba(255, 255, 255, 0.11);
}

.team-card:last-child {
  border-right: 0;
}

.team-card.active {
  background: #162a21;
  box-shadow: inset 0 4px 0 var(--lime);
}

.team-name-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.team-name-row h3 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 19px;
}

.serve-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  background: rgba(255, 255, 255, 0.17);
  border-radius: 50%;
}

.serve-dot.on {
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(211, 243, 111, 0.13);
}

.point {
  display: grid;
  min-height: 112px;
  margin: 10px 0;
  place-items: center;
  color: #ffffff;
  font-size: 78px;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.mini-stats {
  display: flex;
  margin-bottom: 14px;
  justify-content: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

.score-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--brand-deep);
  background: var(--lime);
  border: 0;
  font-size: 15px;
}

.score-button:hover {
  background: #e2fb91;
}

.score-button::before {
  content: "+";
  font-size: 20px;
}

.score-button span {
  font-size: 20px;
}

.sets-table {
  padding: 16px 20px;
  overflow-x: auto;
  background: #f9fbf9;
  color: var(--ink);
}

.sets-row {
  display: grid;
  min-width: 520px;
  grid-template-columns: var(--set-columns);
  border-bottom: 1px solid var(--line);
}

.sets-row span {
  display: grid;
  min-height: 40px;
  padding: 6px 8px;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.sets-row span:first-child {
  justify-items: start;
  font-weight: 750;
}

.sets-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.sets-row .current {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.sets-row .won {
  color: #ffffff;
  background: var(--brand);
}

.action-row {
  display: grid;
  padding: 14px 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  background: #f9fbf9;
  border-top: 1px solid var(--line);
}

.action-row button {
  min-width: 0;
  padding: 0 10px;
  color: #3b4942;
  background: #ffffff;
  border: 1px solid var(--line-strong);
}

.action-row button:last-child {
  color: #8e2f22;
  border-color: #e8b6ab;
}

.history-panel {
  padding: 18px 20px;
  color: var(--ink);
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.history-panel ol {
  max-height: 220px;
  margin: 0;
  padding-left: 24px;
  overflow-y: auto;
}

.history-panel li {
  padding: 7px 5px;
  color: var(--muted);
  border-bottom: 1px solid #eef1ef;
  font-size: 12px;
}

.list,
.board-list {
  display: grid;
  gap: 9px;
}

.board-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.public-draw-section {
  margin: 30px 0 26px;
}

.draw-board-list,
#drawList {
  display: grid;
  gap: 22px;
}

.draw-style-manager > h2 {
  margin-bottom: 15px;
}

#drawStyleForm {
  display: grid;
  gap: 14px;
}

.draw-style-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 9px;
}

.draw-style-option {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 150px;
  padding: 12px;
  align-content: start;
  gap: 11px;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.draw-style-option:hover {
  border-color: #8aa799;
}

.draw-style-option.selected {
  border-color: var(--brand);
  box-shadow: inset 0 3px 0 var(--brand), 0 0 0 2px rgba(20, 108, 67, 0.08);
}

.draw-style-option input {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.draw-style-option-copy {
  display: grid;
  min-width: 0;
  padding-right: 24px;
  gap: 3px;
}

.draw-style-option-copy strong {
  font-size: 14px;
}

.draw-style-option-copy small {
  min-height: 30px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.draw-style-thumbnail {
  display: grid;
  min-width: 0;
  min-height: 52px;
  padding: 8px;
  grid-template-columns: 36px minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  overflow: hidden;
  border-radius: 4px;
  font-size: 10px;
}

.draw-style-thumbnail i,
.draw-style-thumbnail em {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.draw-style-thumbnail b {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumbnail-classic {
  color: #183226;
  background: #edf5f0;
  border-left: 4px solid var(--brand);
}

.thumbnail-compact {
  color: #29342f;
  background: #f4f5f4;
  border-top: 1px solid #aeb9b3;
  border-bottom: 1px solid #aeb9b3;
}

.thumbnail-court {
  color: #173d2a;
  background: #dcefe2;
  box-shadow: inset 0 0 0 2px #ffffff;
}

.thumbnail-broadcast {
  color: #ffffff;
  background: #121a18;
  border-bottom: 3px solid #d7ef55;
}

.thumbnail-broadcast i,
.thumbnail-broadcast em {
  color: #d7ef55;
}

.draw-style-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.draw-style-actions .primary-button {
  min-height: 40px;
  padding: 0 15px;
}

.draw-style-preview {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.draw-board {
  min-width: 0;
  overflow: hidden;
  background: transparent;
  border-top: 3px solid var(--brand);
}

.draw-board-header {
  display: flex;
  min-width: 0;
  padding: 15px 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  background: #f2f6f3;
  border: 1px solid var(--line);
  border-top: 0;
}

.draw-board-header > div {
  min-width: 0;
}

.draw-board-eyebrow {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  color: var(--brand);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
}

.draw-board-header h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.draw-board-meta {
  display: flex;
  margin-top: 7px;
  flex-wrap: wrap;
  gap: 5px;
}

.draw-board-meta span,
.draw-style-name {
  padding: 4px 6px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
}

.draw-board-style-control {
  display: grid;
  width: 168px;
  flex: 0 0 auto;
  gap: 5px;
}

.draw-board-style-control span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.draw-board-style-control select {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 12px;
}

.draw-match-list {
  display: grid;
  min-width: 0;
}

.draw-match-row,
.draw-competitor,
.draw-match-number {
  min-width: 0;
}

.draw-match-number strong,
.draw-match-number small {
  display: block;
}

.draw-match-number strong {
  font-size: 11px;
}

.draw-match-number small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.draw-competitor {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.draw-competitor > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 820;
}

.draw-competitor strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.draw-versus {
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  font-weight: 820;
}

.draw-style-classic .draw-match-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 9px;
  padding: 10px 0;
}

.draw-style-classic .draw-match-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  grid-template-rows: minmax(46px, auto) minmax(46px, auto);
  background: #ffffff;
  border: 1px solid var(--line);
}

.draw-style-classic .draw-match-number {
  display: grid;
  padding: 8px;
  grid-row: 1 / 3;
  align-content: center;
  text-align: center;
  background: var(--surface-tint);
  border-right: 1px solid var(--line);
}

.draw-style-classic .draw-competitor {
  padding: 9px 11px;
}

.draw-style-classic .draw-competitor-b {
  border-top: 1px solid var(--line);
}

.draw-style-classic .draw-versus {
  display: none;
}

.draw-style-compact {
  border-top-color: #76867e;
}

.draw-style-compact .draw-board-header {
  padding: 11px 13px;
  background: #ffffff;
}

.draw-style-compact .draw-board-header h3 {
  font-size: 16px;
}

.draw-style-compact .draw-match-list {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.draw-style-compact .draw-match-row {
  display: grid;
  min-height: 52px;
  grid-template-columns: 66px minmax(0, 1fr) 32px minmax(0, 1fr);
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.draw-style-compact .draw-match-number {
  padding: 8px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.draw-style-compact .draw-competitor {
  padding: 8px 10px;
  grid-template-columns: minmax(0, 1fr);
}

.draw-style-compact .draw-competitor > span {
  display: none;
}

.draw-style-compact .draw-competitor strong {
  text-align: center;
}

.draw-style-court {
  border-top-color: #e05a47;
  background: #dfeee3;
  box-shadow: inset 0 0 0 2px #ffffff;
}

.draw-style-court .draw-board-header {
  margin: 2px 2px 0;
  color: #133523;
  background: #cde4d4;
  border-color: #ffffff;
}

.draw-style-court .draw-board-eyebrow {
  color: #a43527;
}

.draw-style-court .draw-match-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
  padding: 2px;
}

.draw-style-court .draw-match-row {
  display: grid;
  min-height: 108px;
  padding: 34px 12px 12px;
  position: relative;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: center;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 0 0 1px #ffffff;
}

.draw-style-court .draw-match-number {
  position: absolute;
  top: 9px;
  left: 12px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #a43527;
}

.draw-style-court .draw-match-number small {
  margin: 0;
}

.draw-style-court .draw-competitor {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.draw-style-court .draw-competitor > span {
  color: #ffffff;
  background: #1b6b43;
}

.draw-style-broadcast {
  padding: 0 14px 14px;
  color: #ffffff;
  background: #111a17;
  border-top-color: #d7ef55;
}

.draw-style-broadcast .draw-board-header {
  padding-right: 2px;
  padding-left: 2px;
  color: #ffffff;
  background: #111a17;
  border-color: #2c3a35;
}

.draw-style-broadcast .draw-board-eyebrow,
.draw-style-broadcast .draw-match-number strong,
.draw-style-broadcast .draw-versus {
  color: #d7ef55;
}

.draw-style-broadcast .draw-board-header h3,
.draw-style-broadcast .draw-competitor strong {
  color: #ffffff;
}

.draw-style-broadcast .draw-board-meta span,
.draw-style-broadcast .draw-style-name {
  color: #c4d0ca;
  background: #1d2925;
  border-color: #34463f;
}

.draw-style-broadcast .draw-board-style-control span,
.draw-style-broadcast .draw-match-number small {
  color: #9cafA5;
}

.draw-style-broadcast .draw-match-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  border-top: 1px solid #33443e;
}

.draw-style-broadcast .draw-match-row {
  display: grid;
  min-height: 70px;
  grid-template-columns: 58px minmax(0, 1fr) 38px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid #33443e;
}

.draw-style-broadcast .draw-match-number {
  padding: 10px 7px;
  text-align: center;
  border-right: 1px solid #33443e;
}

.draw-style-broadcast .draw-competitor {
  padding: 9px 12px;
}

.draw-style-broadcast .draw-competitor > span {
  color: #101713;
  background: #6fe1d2;
}

.draw-style-broadcast .draw-competitor-b > span {
  background: #f1c65c;
}

.draw-board-preview {
  max-width: 980px;
}

.custom-draw-form textarea {
  min-height: 164px;
  resize: vertical;
  line-height: 1.65;
}

.custom-draw-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.custom-draw-actions button {
  min-height: 42px;
  padding: 0 15px;
}

.draw-type-roundRobin .draw-structure,
.draw-type-elimination .draw-structure,
.draw-type-championship .draw-structure,
.draw-type-courtSchedule .draw-structure {
  display: block;
  min-width: 0;
  padding: 14px;
  border: 0;
}

.draw-entry-actions {
  display: flex;
  padding: 12px 14px 15px;
  justify-content: flex-end;
  background: #f7f9f8;
  border: 1px solid var(--line);
  border-top: 0;
}

.draw-entry-actions button {
  min-height: 40px;
  padding: 0 15px;
}

.draw-entry-slot {
  display: grid;
  min-width: 0;
  grid-template-columns: 30px minmax(104px, 1fr);
  align-items: center;
  gap: 7px;
}

.draw-entry-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #ffffff;
  background: var(--brand);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 820;
}

.draw-entry-slot input {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.draw-entry-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.draw-entry-name.empty {
  color: #8c9892;
  font-weight: 600;
}

.round-robin-scroll,
.knockout-scroll,
.championship-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.round-robin-scroll {
  border: 1px solid var(--line-strong);
}

.round-robin-table {
  width: max-content;
  min-width: 100%;
  border-spacing: 0;
  color: var(--ink);
  background: #ffffff;
  font-size: 11px;
}

.round-robin-table th,
.round-robin-table td {
  height: 46px;
  padding: 6px 8px;
  text-align: center;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.round-robin-table tr:last-child > * {
  border-bottom: 0;
}

.round-robin-table tr > *:last-child {
  border-right: 0;
}

.round-robin-table thead th {
  height: 38px;
  color: #435148;
  background: #edf3ef;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.round-robin-table th:first-child {
  position: sticky;
  z-index: 2;
  left: 0;
  width: 238px;
  min-width: 238px;
  text-align: left;
  background: #ffffff;
  box-shadow: 1px 0 0 var(--line-strong);
}

.round-robin-table thead th:first-child {
  z-index: 3;
  background: #e5eee8;
}

.round-robin-table thead th:not(:first-child),
.round-robin-table td {
  min-width: 54px;
}

.round-robin-table thead th:nth-last-child(-n + 4),
.round-robin-table tbody td:nth-last-child(-n + 4) {
  min-width: 66px;
}

.round-robin-table .matrix-result {
  color: #7f8b85;
  font-weight: 700;
}

.round-robin-table .matrix-diagonal {
  background-color: #f3f5f4;
  background-image: linear-gradient(to top right, transparent 48.5%, #9ca8a1 49%, #9ca8a1 51%, transparent 51.5%);
}

.knockout-scroll,
.championship-scroll {
  padding-bottom: 9px;
}

.bracket-columns {
  display: flex;
  width: max-content;
  min-width: 100%;
  height: var(--bracket-height);
  align-items: stretch;
}

.bracket-side-right {
  flex-direction: row-reverse;
}

.bracket-round {
  display: flex;
  width: 188px;
  min-width: 188px;
  flex: 0 0 188px;
  flex-direction: column;
  border-left: 1px solid #e2e7e4;
}

.bracket-round:last-child {
  border-right: 1px solid #e2e7e4;
}

.bracket-round h4 {
  display: grid;
  height: 38px;
  margin: 0;
  padding: 0 10px;
  place-items: center;
  color: #526058;
  background: #eef3f0;
  border-bottom: 1px solid var(--line-strong);
  font-size: 10px;
  text-align: center;
}

.bracket-round-nodes {
  display: flex;
  min-height: 0;
  padding: 5px 0;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
}

.bracket-entry-node,
.bracket-advance-node {
  position: relative;
  display: grid;
  min-height: 40px;
  margin: 0 13px;
  padding: 5px 7px;
  align-items: center;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #bfcac4;
  border-left: 3px solid var(--brand);
  border-radius: 4px;
}

.bracket-advance-node {
  place-items: center;
  color: #65726b;
  background: #f5f7f6;
  border-left-width: 1px;
  font-size: 10px;
  text-align: center;
}

.bracket-advance-node.champion-node {
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-color: #86aa97;
  font-weight: 800;
}

.bracket-side-left .bracket-round:not(:last-child) :is(.bracket-entry-node, .bracket-advance-node)::after,
.bracket-side-right .bracket-round:not(:last-child) :is(.bracket-entry-node, .bracket-advance-node)::after {
  position: absolute;
  top: 50%;
  width: 13px;
  content: "";
  border-top: 1px solid #87958d;
}

.bracket-side-left .bracket-round:not(:last-child) :is(.bracket-entry-node, .bracket-advance-node)::after {
  right: -14px;
}

.bracket-side-right .bracket-round:not(:last-child) :is(.bracket-entry-node, .bracket-advance-node)::after {
  left: -14px;
}

.bracket-entry-node .draw-entry-slot {
  grid-template-columns: 25px minmax(104px, 1fr);
}

.bracket-entry-node .draw-entry-number {
  width: 25px;
  height: 25px;
}

.bracket-entry-node .draw-entry-slot input {
  min-height: 30px;
  padding: 4px 6px;
}

.championship-tree {
  display: flex;
  width: max-content;
  min-width: 100%;
  align-items: center;
}

.championship-tree .bracket-columns {
  min-width: 0;
}

.championship-tree .bracket-round {
  width: 130px;
  min-width: 130px;
  flex-basis: 130px;
}

.championship-tree :is(.bracket-entry-node, .bracket-advance-node) {
  margin-inline: 5px;
  padding: 4px;
}

.championship-tree .bracket-entry-node .draw-entry-slot {
  grid-template-columns: 22px minmax(68px, 1fr);
  gap: 4px;
}

.championship-tree .bracket-entry-node .draw-entry-number {
  width: 22px;
  height: 24px;
}

.championship-tree .bracket-entry-node .draw-entry-slot input {
  min-height: 28px;
  padding-inline: 5px;
}

.championship-center {
  display: grid;
  width: 80px;
  min-width: 80px;
  min-height: 142px;
  padding: 14px 8px;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: var(--brand-deep);
  background: #edf5f0;
  border-block: 1px solid #8fad9d;
  text-align: center;
}

.championship-cup {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #254f3a;
  background: var(--lime);
  border-radius: 50%;
  font-size: 20px;
}

.championship-center strong {
  font-size: 13px;
}

.championship-center small {
  color: var(--muted);
  font-size: 10px;
}

.draw-type-courtSchedule .draw-structure {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.court-schedule-grid {
  display: grid;
  width: max-content;
  min-width: 100%;
  grid-auto-columns: minmax(248px, 1fr);
  grid-auto-flow: column;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.court-schedule-column {
  min-width: 0;
  background: #ffffff;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.court-schedule-column h4 {
  display: grid;
  min-height: 38px;
  margin: 0;
  padding: 7px 10px;
  place-items: center;
  color: #ffffff;
  background: var(--brand-deep);
  font-size: 11px;
  text-align: center;
}

.court-schedule-matches {
  display: grid;
}

.court-schedule-match {
  display: grid;
  min-height: 132px;
  padding: 10px;
  align-content: center;
  gap: 5px;
  border-bottom: 1px solid var(--line);
}

.court-schedule-match:last-child {
  border-bottom: 0;
}

.court-schedule-match time {
  display: block;
  color: var(--clay);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.court-schedule-match .draw-entry-slot {
  grid-template-columns: 27px minmax(112px, 1fr);
}

.court-schedule-match .draw-entry-number {
  width: 27px;
  height: 27px;
}

.court-schedule-vs {
  color: #748078;
  font-size: 9px;
  font-weight: 820;
  text-align: center;
}

.draw-style-court .draw-entry-number {
  background: #a43527;
}

.draw-style-broadcast .draw-entry-actions {
  background: #111a17;
  border-color: #33443e;
}

.draw-style-broadcast .draw-entry-number {
  color: #101713;
  background: #d7ef55;
}

.draw-style-broadcast .draw-entry-slot input {
  color: #ffffff;
  background: #18231f;
  border-color: #40534b;
}

.draw-style-broadcast .draw-entry-name {
  color: #ffffff;
}

.draw-style-broadcast .round-robin-scroll,
.draw-style-broadcast .round-robin-table th,
.draw-style-broadcast .round-robin-table td,
.draw-style-broadcast .court-schedule-grid,
.draw-style-broadcast .court-schedule-column {
  border-color: #40534b;
}

.draw-style-broadcast .round-robin-table,
.draw-style-broadcast .round-robin-table th:first-child,
.draw-style-broadcast .court-schedule-column {
  color: #ffffff;
  background: #141f1b;
}

.draw-style-broadcast .round-robin-table thead th,
.draw-style-broadcast .round-robin-table thead th:first-child,
.draw-style-broadcast .bracket-round h4 {
  color: #d7ef55;
  background: #1d2925;
  border-color: #40534b;
}

.draw-style-broadcast .round-robin-table .matrix-diagonal {
  background-color: #22302b;
  background-image: linear-gradient(to top right, transparent 48.5%, #789087 49%, #789087 51%, transparent 51.5%);
}

.draw-style-broadcast .bracket-round {
  border-color: #40534b;
}

.draw-style-broadcast :is(.bracket-entry-node, .bracket-advance-node) {
  color: #ffffff;
  background: #18231f;
  border-color: #4c6259;
}

.draw-style-broadcast .bracket-advance-node.champion-node,
.draw-style-broadcast .championship-center {
  color: #d7ef55;
  background: #22312b;
  border-color: #6f897e;
}

.draw-style-broadcast .championship-center small,
.draw-style-broadcast .court-schedule-vs {
  color: #aebdb6;
}

.draw-style-broadcast .court-schedule-column h4 {
  color: #102018;
  background: #d7ef55;
}

.draw-style-broadcast .court-schedule-match {
  border-color: #33443e;
}

.list-item {
  min-width: 0;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.list-item strong {
  display: block;
  margin-bottom: 7px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.list-item p {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.list-item > button {
  min-height: 38px;
  margin-top: 12px;
  padding: 0 12px;
}

.compact-list .list-item {
  padding: 13px 14px;
  border-left: 3px solid var(--brand);
}

.compact-list .list-item:nth-child(2n) {
  border-left-color: var(--clay);
}

.compact-list .list-item p {
  margin-top: 5px;
}

.qr-panel {
  text-align: center;
}

.qr-panel img {
  display: block;
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin: 6px auto 14px;
  object-fit: contain;
  background: #ffffff;
  border: 8px solid #ffffff;
  box-shadow: 0 0 0 1px var(--line);
}

.qr-panel .link-button {
  width: 100%;
  margin-top: 12px;
}

.popup-mask {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(10, 21, 16, 0.62);
}

.popup-mask[hidden] {
  display: none;
}

.popup-card {
  width: min(440px, 100%);
  padding: 26px;
  background: #ffffff;
  border-top: 5px solid var(--brand);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(6, 18, 12, 0.3);
}

.popup-card h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.popup-card p:not(.eyebrow) {
  color: var(--muted);
}

.popup-card button {
  width: 100%;
  margin-top: 8px;
}

.toast-region {
  position: fixed;
  z-index: 120;
  top: 18px;
  right: 20px;
  display: grid;
  width: min(360px, calc(100% - 34px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  color: #ffffff;
  background: #29352f;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(10, 24, 18, 0.2);
  font-size: 13px;
  font-weight: 700;
}

.toast-success {
  border-left-color: var(--lime);
}

.toast-warning,
.toast-error {
  border-left-color: var(--coral);
}

.event-live-hub {
  margin-bottom: 22px;
}

.event-hub-tools,
.event-command-tools,
.event-live-card-head,
.event-live-card-head > div,
.event-workspace-toolbar,
.event-state-actions,
.event-review-controls,
.event-match-scoring {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.event-command-tools {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.event-hub-tools {
  color: var(--muted);
  font-size: 12px;
}

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

.event-live-card {
  min-width: 0;
  padding: 17px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 6px;
  box-shadow: 0 5px 18px rgba(23, 33, 29, 0.05);
}

.event-live-card.has-schedule {
  grid-column: 1 / -1;
}

.event-live-card-head {
  justify-content: space-between;
}

.event-live-card-head > div {
  flex-wrap: wrap;
}

.event-live-card-head strong {
  font-size: 16px;
}

.event-live-card-head small {
  width: 100%;
  margin-left: 15px;
  color: var(--muted);
}

.event-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: var(--lime);
  border: 1px solid var(--brand);
  border-radius: 50%;
}

.status-pill,
.event-workflow-badge,
.event-result-status,
.event-my-entry {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 25px;
  padding: 3px 8px;
  align-items: center;
  color: #24547c;
  background: #e7f0f8;
  border: 1px solid #c5d9ea;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 720;
}

.formal-event-board {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.formal-event-board summary {
  color: var(--brand-deep);
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
}

.formal-event-tools {
  display: flex;
  margin: 12px 0;
  gap: 8px;
}

.formal-match-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.formal-match-row {
  display: grid;
  min-width: 0;
  padding: 9px;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.formal-match-row > span,
.formal-match-row > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.formal-appeal-control {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 7px;
}

.formal-appeal-control input,
.formal-appeal-control button {
  min-height: 35px;
  font-size: 11px;
}

.formal-match-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.formal-match-row em {
  color: var(--clay);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.formal-board-broadcast {
  margin-top: 14px;
  padding: 13px;
  color: #ffffff;
  background: #14231f;
  border: 0;
  border-radius: 5px;
}

.formal-board-broadcast summary,
.formal-board-broadcast .formal-standing-table h3 {
  color: var(--lime);
}

.formal-board-broadcast .formal-match-row {
  color: #ffffff;
  background: #20352e;
  border-color: #3c564d;
}

.formal-standing-table {
  margin-top: 14px;
}

.formal-standing-table h3 {
  margin-bottom: 7px;
  font-size: 13px;
}

.formal-standing-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.formal-standing-table table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: #ffffff;
}

.formal-overall-standing table {
  min-width: 720px;
}

.formal-overall-standing tr.is-qualified {
  background: var(--surface-tint);
  box-shadow: inset 3px 0 0 var(--brand);
}

.formal-overall-standing td small {
  margin-left: 4px;
  padding: 2px 4px;
  color: #ffffff;
  background: var(--brand);
  border-radius: 3px;
}

.formal-standing-table th,
.formal-standing-table td {
  padding: 7px;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
}

.event-live-meta {
  display: flex;
  margin: 13px 0;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 12px;
}

.event-live-meta span:not(:last-child)::after {
  margin-left: 12px;
  color: var(--line-strong);
  content: "·";
}

.event-signup-row {
  display: grid;
  margin-top: 12px;
  grid-template-columns: minmax(120px, 1fr) minmax(115px, 0.8fr) minmax(130px, 1fr) auto;
  gap: 8px;
}

.event-signup-row select,
.event-signup-row button {
  min-height: 38px;
}

.event-my-entry-row {
  display: flex;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.event-my-entry {
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-color: #b9dbc7;
}

.event-command-center {
  border-top: 4px solid var(--blue);
}

.event-create-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.event-workspace-toolbar {
  margin: 18px 0 12px;
  align-items: end;
}

.event-workspace-toolbar label {
  width: min(520px, 100%);
}

.event-edit-disclosure {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.event-edit-disclosure summary {
  padding: 12px 14px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 760;
}

.event-edit-form {
  padding: 4px 14px 16px;
}

.event-state-track {
  display: grid;
  margin: 10px 0;
  grid-template-columns: repeat(9, minmax(72px, 1fr));
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.event-state-track span {
  min-width: 72px;
  padding: 9px 6px;
  color: var(--muted);
  background: #f7f8f6;
  border-right: 1px solid var(--line);
  text-align: center;
  font-size: 10px;
}

.event-state-track span:last-child {
  border-right: 0;
}

.event-state-track span.completed {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.event-state-track span.active {
  color: #ffffff;
  background: var(--brand);
  font-weight: 780;
}

.event-state-actions {
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.event-state-actions input {
  width: min(360px, 100%);
}

.event-manual-group-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.event-manual-group-list[hidden] {
  display: none;
}

.event-manual-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.8fr);
  align-items: center;
  gap: 10px;
}

.event-manual-group-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-admin-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
}

.event-admin-section {
  min-width: 0;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.event-elimination-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
}

.event-appeal-section {
  margin-top: 20px;
}

.event-appeal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.event-appeal-item p {
  margin: 4px 0 0;
}

.event-appeal-resolution,
.event-appeal-actions {
  grid-column: 1 / -1;
}

.event-appeal-actions {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto;
  gap: 8px;
}

.event-registration-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.event-registration-item p {
  margin: 4px 0 0;
}

.event-registration-summary {
  display: grid;
  margin-bottom: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f8f6;
}

.event-registration-summary span {
  min-width: 0;
  padding: 9px 7px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  text-align: center;
  font-size: 10px;
}

.event-registration-summary span:last-child {
  border-right: 0;
}

.event-registration-summary strong {
  color: var(--brand-deep);
  font-size: 14px;
}

.club-roster-rule-note {
  margin: 0;
  padding: 9px 11px;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
}

.event-club-roster-summary {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  border-top: 1px solid var(--line);
}

.event-registration-summary .event-club-roster-summary span {
  border-bottom: 0;
  font-size: 11px;
}

.event-review-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 80px minmax(140px, 1fr) auto auto auto;
}

.event-check-in-controls {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.event-replacement-controls {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
}

.event-replacement-controls button {
  width: 100%;
  grid-column: 1 / -1;
  white-space: nowrap;
}

.event-match-section {
  margin-top: 20px;
}

.event-match-board {
  display: grid;
  gap: 8px;
}

.event-match-stage-header {
  display: flex;
  margin-top: 12px;
  padding: 11px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-left: 4px solid var(--brand);
  background: var(--surface-tint);
}

.event-match-stage-header:first-child {
  margin-top: 0;
}

.event-match-stage-header div {
  display: grid;
}

.event-match-stage-header small,
.event-match-stage-header span {
  color: var(--muted);
  font-size: 10px;
}

.event-stage-plan-form {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.event-stage-plan-form .form-note {
  grid-column: 1 / -1;
}

.event-fixed-pair-editor {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  background: #ffffff;
}

.event-fixed-pair-list {
  display: grid;
  margin: 10px 0;
  gap: 8px;
}

.event-fixed-pair-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.event-fixed-pair-row strong {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand-deep);
  font-size: 11px;
}

.event-match-row {
  display: grid;
  min-width: 0;
  padding: 10px;
  grid-template-columns: 54px minmax(220px, 1fr) minmax(130px, 0.5fr);
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.event-match-index {
  display: grid;
  text-align: center;
}

.event-match-index small {
  color: var(--brand);
  font-size: 9px;
  font-weight: 750;
}

.event-match-index span,
.event-match-meta,
.event-result-status {
  color: var(--muted);
  font-size: 10px;
}

.event-match-index strong {
  color: var(--brand);
  font-size: 20px;
}

.event-match-board-classic .event-match-row {
  border-left: 4px solid var(--brand);
}

.event-match-board-classic .event-match-knockout {
  border-left-color: var(--gold);
}

.event-match-board-compact {
  gap: 4px;
}

.event-match-board-compact .event-match-row {
  padding-block: 6px;
}

.event-match-board-court,
.event-match-board-broadcast {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-match-board-court .event-match-row,
.event-match-board-broadcast .event-match-row {
  grid-template-columns: 48px minmax(0, 1fr);
  border-top: 4px solid #2c876d;
}

.event-match-board-court .event-match-meta,
.event-match-board-broadcast .event-match-meta {
  grid-column: 2;
}

.event-match-board-court .event-match-scoring,
.event-match-board-broadcast .event-match-scoring {
  grid-column: 1 / -1;
}

.event-match-board-court .event-match-knockout {
  border-top-color: #b68b22;
}

.event-match-board-broadcast .event-match-row {
  color: #ffffff;
  background: #102e4c;
  border-color: #d4a928;
}

.event-match-board-broadcast .event-match-index small,
.event-match-board-broadcast .event-match-index strong,
.event-match-board-broadcast .event-match-teams em {
  color: #f1c84b;
}

.event-match-board-broadcast .event-match-index span,
.event-match-board-broadcast .event-match-meta,
.event-match-board-broadcast .event-result-status {
  color: #d7e2ec;
}

.event-match-teams {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.event-match-teams strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.event-match-teams em {
  color: var(--clay);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.event-match-meta {
  display: grid;
}

.event-match-scoring {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(100px, 0.8fr) minmax(88px, 0.65fr) 80px minmax(150px, 1.2fr) auto auto;
}

.event-match-scoring input,
.event-match-scoring select,
.event-match-scoring button {
  min-height: 36px;
  font-size: 11px;
}

.event-result-status {
  grid-column: 1 / -1;
  color: var(--brand-deep);
  background: var(--surface-tint);
  border-color: var(--line);
}

.ranking-season-center {
  border-top: 4px solid var(--clay);
}

.ranking-heading-tools,
.ranking-workspace-toolbar {
  display: flex;
  min-width: 0;
  align-items: end;
  justify-content: flex-end;
  gap: 9px;
}

.ranking-heading-tools {
  flex-wrap: wrap;
}

.ranking-season-create-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.ranking-season-create-form .form-note {
  grid-column: 1 / -1;
}

.ranking-check-field {
  display: flex;
  min-height: 42px;
  padding: 8px 10px;
  grid-column: span 2;
  align-items: center;
  gap: 9px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.ranking-check-field input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
}

.ranking-check-field span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.ranking-workspace-toolbar {
  margin: 18px 0 12px;
  justify-content: flex-start;
}

.ranking-workspace-toolbar label {
  width: min(520px, 100%);
}

.ranking-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #f7f8f6;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.ranking-metric-strip > div {
  display: grid;
  min-width: 0;
  padding: 11px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.ranking-metric-strip > div:last-child {
  border-right: 0;
}

.ranking-metric-strip span {
  color: var(--muted);
  font-size: 10px;
}

.ranking-metric-strip strong {
  color: var(--brand-deep);
  font-size: 18px;
}

.ranking-event-include-form {
  display: grid;
  margin: 17px 0 20px;
  padding-bottom: 18px;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
  align-items: end;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.ranking-event-include-form button {
  min-height: 42px;
  white-space: nowrap;
}

.ranking-event-include-form .form-note {
  grid-column: 1 / -1;
}

.ranking-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 22px;
}

.ranking-standing-section,
.ranking-source-section {
  min-width: 0;
}

.ranking-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  background: #ffffff;
}

.ranking-table th,
.ranking-table td {
  padding: 9px 8px;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.ranking-table th {
  color: #405048;
  background: #f4f6f2;
  font-weight: 760;
}

.ranking-table td:nth-child(2) {
  min-width: 150px;
  text-align: left;
}

.ranking-player-name,
.ranking-table td small {
  display: block;
}

.ranking-table td small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.ranking-unqualified {
  color: var(--muted);
  background: #fafafa;
}

.ranking-event-list,
.ranking-ledger-list {
  display: grid;
  gap: 7px;
}

.ranking-ledger-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ranking-event-row,
.ranking-ledger-row {
  display: grid;
  min-width: 0;
  padding: 9px 0;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.ranking-event-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ranking-ledger-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.ranking-event-row > span,
.ranking-ledger-row > span {
  display: grid;
  min-width: 0;
}

.ranking-event-row strong,
.ranking-ledger-row strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.ranking-event-row small,
.ranking-ledger-row small,
.ranking-ledger-row em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.ranking-ledger-row b {
  color: var(--brand);
  font-size: 13px;
}

.ranking-ledger-row.is-history {
  opacity: 0.58;
}

.ranking-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  background: #f7f8f6;
  border-left: 3px solid var(--line-strong);
  font-size: 12px;
}

@media (max-width: 1180px) {
  .topbar {
    width: 220px;
  }

  .view,
  .notice,
  .message-strip {
    width: calc(100% - 220px);
    margin-left: 220px;
  }

  .view {
    padding-inline: 24px;
  }

  .message-strip {
    padding-inline: 24px;
  }

  .compact-toolbar,
  .match-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .event-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-season-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-match-row {
    grid-template-columns: 48px minmax(200px, 1fr) minmax(130px, 0.6fr);
  }

  .event-match-scoring {
    grid-column: 2 / -1;
  }
}

@media (max-width: 900px) {
  .event-match-board-court,
  .event-match-board-broadcast {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: sticky;
    inset: 0 0 auto;
    display: grid;
    width: 100%;
    height: 70px;
    padding: 10px 15px;
    grid-template-columns: minmax(0, 1fr) 126px;
    align-items: center;
    overflow: visible;
  }

  .brand-lockup {
    margin: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .brand-mark::before,
  .brand-mark::after {
    width: 27px;
    height: 27px;
  }

  .topbar h1 {
    max-width: none;
    font-size: 17px;
  }

  .topbar .eyebrow {
    font-size: 9px;
  }

  .language-switch {
    display: block;
    margin: 0;
  }

  .language-switch > span {
    display: none;
  }

  .language-switch select {
    min-height: 38px;
  }

  .sidebar-status {
    display: none;
  }

  .nav-tabs {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: 69px;
    padding: 6px 5px max(6px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    background: #ffffff;
    border-top: 1px solid var(--line-strong);
    box-shadow: 0 -6px 22px rgba(14, 34, 26, 0.09);
  }

  .nav-tabs button {
    display: grid;
    min-width: 0;
    min-height: 54px;
    padding: 3px 2px;
    place-items: center;
    gap: 0;
    color: #65716b;
    text-align: center;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.1;
  }

  .nav-tabs button::before {
    width: 20px;
    height: 20px;
    color: #65716b;
    font-size: 14px;
  }

  .nav-tabs button.active {
    color: var(--brand);
    background: var(--brand-soft);
    box-shadow: none;
  }

  .nav-tabs button.active::before {
    color: var(--brand);
  }

  body.dedicated-admin-entry .nav-tabs {
    display: none;
  }

  .view,
  .notice,
  .message-strip {
    width: 100%;
    margin-left: 0;
  }

  .view {
    padding: 22px 17px 96px;
  }

  .notice {
    margin-top: 0;
    padding: 11px 17px;
  }

  .message-strip {
    padding: 14px 17px 0;
  }

  .message-card {
    grid-template-columns: 1fr auto;
  }

  .message-card p {
    grid-column: 1 / -1;
  }

  .matchday-banner {
    grid-template-columns: 1fr 250px;
  }

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-main {
    grid-row: auto;
  }

  .admin-grid,
  .data-grid,
  .register-layout,
  .account-layout,
  .business-grid {
    grid-template-columns: 1fr;
  }

  .event-live-list,
  .event-admin-columns,
  .ranking-content-grid {
    grid-template-columns: 1fr;
  }

  .formal-match-list {
    grid-template-columns: 1fr;
  }

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

  .activity-stat:nth-child(2) {
    border-right: 0;
  }

  .activity-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .activity-detail-grid {
    grid-template-columns: 1fr;
  }

  .page-head {
    min-height: 52px;
  }

  .page-head h2 {
    font-size: 22px;
  }

  .summary-cards {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .feature-toggle-grid {
    grid-template-columns: 1fr;
  }

  .message-card {
    grid-template-columns: 1fr;
  }

  .message-card p {
    grid-column: auto;
  }

  .page-head h2 {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .event-live-card {
    padding: 14px;
  }

  .event-live-card-head,
  .event-workspace-toolbar,
  .ranking-workspace-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .event-hub-tools {
    width: 100%;
    justify-content: space-between;
  }

  .event-signup-row,
  .event-create-form,
  .ranking-season-create-form,
  .ranking-event-include-form,
  .event-review-controls,
  .event-replacement-controls,
  .event-match-row,
  .event-match-scoring {
    grid-template-columns: 1fr;
  }

  .event-replacement-controls button {
    grid-column: auto;
  }

  .event-registration-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-registration-summary span:nth-child(2) {
    border-right: 0;
  }

  .event-registration-summary span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .event-club-roster-summary {
    grid-template-columns: 1fr;
  }

  .event-registration-summary .event-club-roster-summary span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .event-registration-summary .event-club-roster-summary span:last-child {
    border-bottom: 0;
  }

  .formal-appeal-control,
  .event-appeal-actions {
    grid-template-columns: 1fr;
  }

  .event-signup-row button,
  .event-state-actions input,
  .event-workspace-toolbar label,
  .ranking-workspace-toolbar label,
  .ranking-event-include-form button {
    width: 100%;
  }

  .ranking-check-field {
    grid-column: auto;
  }

  .ranking-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-metric-strip > div:nth-child(2) {
    border-right: 0;
  }

  .ranking-metric-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .activity-pattern-line {
    grid-template-columns: 1fr;
  }

  .activity-pattern-line > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .event-state-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-state-actions input {
    grid-column: 1 / -1;
  }

  .event-match-scoring {
    grid-column: auto;
  }

  .event-result-status {
    grid-column: auto;
  }

  .event-match-teams {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .score-mode-nav {
    width: 100%;
  }

  .activity-toolbar,
  .activity-player-line,
  .member-account-header,
  .booking-connection {
    display: grid;
    align-items: start;
  }

  .member-account-grid {
    grid-template-columns: 1fr;
  }

  .member-account-field:nth-child(n) {
    padding-inline: 0;
    border-left: 0;
  }

  .member-account-actions .ghost-button {
    width: 100%;
  }

  .profile-nav {
    display: grid;
    overflow: visible;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-nav button {
    min-width: 0;
    height: 52px;
    min-height: 52px;
    padding: 6px 8px;
    white-space: normal;
    line-height: 1.2;
  }

  .account-login-panel {
    order: -1;
  }

  .ownership-actions,
  .ownership-actions input,
  .ownership-actions button,
  #clubOwnershipTransferForm .danger-button {
    width: 100%;
  }

  .membership-editor {
    grid-template-columns: 1fr;
  }

  .membership-editor .wide-field {
    grid-column: auto;
  }

  .activity-toolbar label {
    min-width: 0;
  }

  .activity-stat {
    min-height: 96px;
    padding: 11px;
  }

  .activity-stat strong {
    font-size: 15px;
  }

  .quick-session-header {
    display: grid;
    gap: 8px;
  }

  .quick-seed-list {
    grid-template-columns: 1fr;
  }

  .quick-seed-item {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .quick-seed-item .quick-age-control {
    grid-column: 1 / -1;
  }

  .quick-standings-header {
    display: grid;
  }

  .quick-standings-header p {
    text-align: left;
  }

  .session-status {
    justify-self: start;
  }

  .quick-pairings {
    grid-template-columns: 1fr;
  }

  .quick-pairing-card {
    padding: 13px 11px;
  }

  .big-score-row {
    grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr);
    gap: 3px;
  }

  .score-stepper {
    grid-template-columns: 40px 46px 40px;
    gap: 3px;
  }

  .score-stepper button {
    width: 40px;
    height: 42px;
  }

  .score-stepper span {
    width: 46px;
    height: 44px;
    font-size: 24px;
  }

  .big-score-team h3 {
    font-size: 13px;
  }

  .page-head {
    margin-bottom: 15px;
    align-items: flex-start;
  }

  .page-head .summary-cards {
    display: none;
  }

  .matchday-banner {
    min-height: 232px;
    grid-template-columns: 1fr;
  }

  .banner-copy {
    padding: 24px 21px;
  }

  .banner-copy h2 {
    font-size: 24px;
  }

  .court-visual {
    position: absolute;
    right: -22px;
    bottom: -10px;
    width: 218px;
    min-height: 132px;
    opacity: 0.5;
    transform: rotate(-4deg);
  }

  .banner-copy {
    max-width: calc(100% - 70px);
  }

  .banner-copy p {
    max-width: 280px;
  }

  .metric-card {
    padding: 14px;
  }

  .metric-card strong {
    font-size: 24px;
  }

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

  .quick-actions button {
    min-height: 78px;
    padding: 11px;
    grid-template-columns: 27px minmax(0, 1fr);
    column-gap: 8px;
  }

  .quick-actions button > span {
    width: 27px;
    height: 27px;
  }

  .toolbar,
  .compact-toolbar,
  .match-form,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .quick-builder-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-builder-form .wide-field,
  .quick-builder-form #quickSessionSubmit {
    grid-column: 1 / -1;
  }

  .quick-builder-form textarea {
    min-height: 96px;
  }

  .compact-heading,
  .preferred-club-row,
  .club-context-grid,
  .club-admin-split,
  .club-invite-preview {
    display: grid;
    grid-template-columns: 1fr;
  }

  .compact-select-label {
    width: 100%;
    min-width: 0;
  }

  .preferred-club-row .primary-button {
    width: 100%;
  }

  .club-invite-preview img {
    width: min(220px, 100%);
    height: auto;
    aspect-ratio: 1;
    justify-self: center;
  }

  .quick-seed-heading {
    display: grid;
  }

  .custom-draw-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .custom-draw-actions button,
  .draw-entry-actions button {
    width: 100%;
  }

  .draw-board-style-control {
    width: 100%;
  }

  .draw-type-roundRobin .draw-structure,
  .draw-type-elimination .draw-structure,
  .draw-type-championship .draw-structure,
  .draw-type-courtSchedule .draw-structure {
    padding: 10px;
  }

  .round-robin-table th:first-child {
    width: 194px;
    min-width: 194px;
  }

  .bracket-round {
    width: 166px;
    min-width: 166px;
    flex-basis: 166px;
  }

  .bracket-entry-node,
  .bracket-advance-node {
    margin-inline: 10px;
  }

  .championship-center {
    width: 72px;
    min-width: 72px;
  }

  .court-schedule-grid {
    grid-auto-columns: 220px;
  }

  .match-picker {
    position: static;
  }

  .board-list {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 16px;
  }

  .score-topbar {
    display: grid;
    padding: 15px;
  }

  .score-topbar h2 {
    font-size: 17px;
  }

  .team-card {
    min-height: 246px;
    padding: 15px 11px;
  }

  .team-name-row h3 {
    font-size: 14px;
  }

  .point {
    min-height: 94px;
    font-size: 55px;
  }

  .mini-stats {
    display: grid;
    min-height: 40px;
    margin-bottom: 9px;
    place-items: center;
    gap: 1px;
    text-align: center;
    font-size: 10px;
  }

  .score-button {
    min-height: 52px;
    padding: 0 7px;
    font-size: 12px;
  }

  .sets-table {
    padding: 12px 14px;
  }

  .action-row {
    padding: 12px 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-panel {
    padding: 16px 14px;
  }

  .segmented-control,
  .admin-workspace-nav {
    margin-inline: -2px;
  }

  .segmented-control button,
  .admin-workspace-nav button {
    padding: 0 12px;
  }

  .admin-workspace-nav {
    display: grid;
    margin-inline: 0;
    padding: 4px;
    overflow: visible;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .admin-workspace-nav button {
    width: 100%;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    padding: 4px 5px;
    white-space: normal;
    line-height: 1.25;
    font-size: 12px;
  }

  .popup-card {
    padding: 21px;
  }
}

@media (max-width: 390px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 8px;
  }

  .brand-mark {
    display: none;
  }

  .topbar h1 {
    font-size: 15px;
  }

  .metric-card small,
  .quick-actions small {
    white-space: normal;
  }

  .banner-copy {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ROADMAP-6: orders, simulated payments, refunds and club plans */
.commerce-member-center,
.commerce-admin-center {
  border-top: 4px solid var(--clay);
}

.commerce-heading,
.commerce-heading-actions,
.commerce-admin-toolbar,
.commerce-admin-tabs,
.commerce-item-head,
.commerce-item-meta,
.commerce-item-actions,
.commerce-plan-head,
.commerce-usage-line,
.commerce-finance-actions {
  display: flex;
  align-items: center;
}

.commerce-reconciliation-items {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.commerce-reconciliation-row {
  align-items: center;
  background: #f6f8f7;
  border: 1px solid #dfe5e2;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  min-width: 0;
  padding: 10px;
}

.commerce-reconciliation-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.commerce-reconciliation-row button {
  min-height: 34px;
}

.commerce-heading {
  justify-content: space-between;
  gap: 16px;
}

.commerce-heading-actions,
.commerce-item-actions,
.commerce-finance-actions {
  gap: 9px;
}

.commerce-simulator-badge {
  display: inline-flex;
  min-height: 28px;
  padding: 0 10px;
  align-items: center;
  color: #765017;
  background: #fff4d9;
  border: 1px solid #ead6a3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 780;
}

.commerce-metrics {
  display: grid;
  margin: 18px 0 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.commerce-metric {
  min-width: 0;
  padding: 15px 16px;
  background: #fff;
  border-left: 1px solid var(--line);
}

.commerce-metric:first-child {
  border-left: 0;
}

.commerce-metric span,
.commerce-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.commerce-metric strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.commerce-member-layout,
.commerce-admin-overview {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.4fr);
  gap: 24px;
}

.commerce-column,
.commerce-admin-overview > section {
  min-width: 0;
}

.commerce-column .subsection-heading,
.commerce-admin-overview .subsection-heading,
.commerce-refund-band .subsection-heading,
.commerce-plan-band .subsection-heading {
  margin-top: 0;
}

.commerce-refund-band,
.commerce-plan-band {
  margin-top: 22px;
}

.commerce-list {
  display: grid;
  gap: 9px;
}

.commerce-item {
  min-width: 0;
  padding: 14px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.commerce-item-head,
.commerce-plan-head {
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.commerce-item h4,
.commerce-plan h4 {
  margin: 0;
  font-size: 14px;
}

.commerce-item p,
.commerce-plan p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.commerce-item-meta {
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 12px;
}

.commerce-item-meta strong {
  color: var(--ink);
  font-size: 14px;
}

.commerce-item-actions {
  margin-top: 12px;
  flex-wrap: wrap;
}

.commerce-item-actions button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.commerce-status {
  display: inline-flex;
  min-height: 26px;
  padding: 0 8px;
  align-items: center;
  color: #3f5c50;
  background: #eef2ef;
  border: 1px solid #d8e0db;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 780;
}

.commerce-status-paid,
.commerce-status-succeeded,
.commerce-status-matched,
.commerce-status-completed,
.commerce-status-active {
  color: #12633d;
  background: #e3f3e9;
  border-color: #bee1ca;
}

.commerce-status-pending_payment,
.commerce-status-processing,
.commerce-status-requested,
.commerce-status-scheduled {
  color: #82520f;
  background: #fff3d8;
  border-color: #ead4a0;
}

.commerce-status-payment_review,
.commerce-status-difference,
.commerce-status-failed,
.commerce-status-rejected {
  color: #963f2c;
  background: #fbe9e3;
  border-color: #efc9bd;
}

.commerce-status-refunded,
.commerce-status-partially_refunded {
  color: #265d85;
  background: #e7f1f8;
  border-color: #c8ddea;
}

.commerce-plan-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.commerce-plan {
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.commerce-plan-current {
  border-color: #7eaf93;
  box-shadow: inset 0 3px 0 var(--brand);
}

.commerce-plan-price {
  margin-top: 14px;
  color: var(--brand-deep);
  font-size: 20px;
  font-weight: 820;
}

.commerce-plan-price small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.commerce-plan-actions {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.commerce-plan-actions button {
  min-height: 38px;
  padding: 0 8px;
  font-size: 12px;
}

.commerce-message {
  margin-top: 18px;
}

.commerce-admin-toolbar {
  margin: 18px 0 12px;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.commerce-admin-toolbar label {
  min-width: 230px;
}

.commerce-admin-toolbar label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.commerce-admin-toolbar select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.commerce-admin-tabs {
  padding: 3px;
  gap: 3px;
  background: #e8ede9;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.commerce-admin-tabs button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 760;
}

.commerce-admin-tabs button.active {
  color: var(--brand-deep);
  background: #fff;
  box-shadow: 0 1px 5px rgba(20, 52, 40, 0.1);
}

.commerce-admin-section {
  padding-top: 10px;
}

.commerce-entitlement-panel {
  padding: 15px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.commerce-entitlement-title {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.commerce-entitlement-title strong {
  font-size: 16px;
}

.commerce-usage-list {
  display: grid;
  gap: 10px;
}

.commerce-usage-line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 64px;
  gap: 9px;
  font-size: 12px;
}

.commerce-usage-track {
  height: 7px;
  overflow: hidden;
  background: #dfe6e1;
  border-radius: 999px;
}

.commerce-usage-track i {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
}

.commerce-offer-form,
.commerce-settlement-form {
  margin-bottom: 18px;
}

.commerce-finance-actions {
  margin-top: 18px;
  align-items: end;
  justify-content: space-between;
}

.commerce-settlement-form {
  display: grid;
  margin: 0;
  flex: 1 1 560px;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.commerce-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  font-size: 12px;
}

@media (max-width: 980px) {
  .commerce-member-layout,
  .commerce-admin-overview {
    grid-template-columns: 1fr;
  }

  .commerce-plan-list {
    grid-template-columns: 1fr;
  }

  .commerce-admin-toolbar,
  .commerce-finance-actions {
    display: grid;
    align-items: stretch;
  }

  .commerce-admin-toolbar label {
    min-width: 0;
  }

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

  .commerce-admin-tabs button {
    min-width: 0;
    padding: 0 6px;
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .commerce-heading {
    display: grid;
    align-items: start;
  }

  .commerce-heading-actions {
    justify-content: space-between;
  }

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

  .commerce-metric:nth-child(odd) {
    border-left: 0;
  }

  .commerce-metric:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

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

  .commerce-reconciliation-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .commerce-reconciliation-row > div {
    justify-content: stretch;
  }

  .commerce-reconciliation-row button {
    flex: 1 1 120px;
  }

  .commerce-admin-tabs button {
    min-height: 46px;
  }

  .commerce-item-head,
  .commerce-plan-head,
  .commerce-item-actions {
    display: grid;
    align-items: start;
  }

  .commerce-item-actions button,
  .commerce-plan-actions button,
  .commerce-finance-actions > button {
    width: 100%;
  }

  .commerce-settlement-form {
    grid-template-columns: 1fr;
  }

  .commerce-plan-actions {
    grid-template-columns: 1fr;
  }

  .commerce-usage-line {
    grid-template-columns: 64px minmax(0, 1fr) 56px;
  }
}

/* 2026 visual system: court, championship and night */
:root {
  --app-bg: #eef2ef;
  --sidebar-bg: #123d31;
  --sidebar-muted: rgba(255, 255, 255, 0.66);
  --panel-elevated: #ffffff;
  --theme-accent: #d5f36d;
  --theme-blue: #3174a9;
  --theme-gold: #c89635;
  --theme-clay: #c96847;
  --on-brand: #ffffff;
}

:root[data-ace-theme="championship"] {
  --ink: #162235;
  --muted: #596579;
  --line: #dce2ea;
  --line-strong: #c8d1dc;
  --surface: #ffffff;
  --surface-soft: #f4f6f9;
  --surface-tint: #edf2f8;
  --brand: #1f64a9;
  --brand-deep: #173858;
  --brand-soft: #e6eff9;
  --lime: #f2c755;
  --clay: #c86243;
  --blue: #2869a8;
  --app-bg: #f1f3f7;
  --sidebar-bg: #163957;
  --theme-accent: #f2c755;
  --theme-blue: #2869a8;
  --theme-gold: #c08a25;
  --theme-clay: #c86243;
}

:root[data-ace-theme="night"] {
  --ink: #edf4f8;
  --muted: #9fb2c5;
  --line: #30465c;
  --line-strong: #405a73;
  --surface: #132235;
  --surface-soft: #0b1420;
  --surface-tint: #1c2e42;
  --brand: #56b4dd;
  --brand-deep: #0f2f4d;
  --brand-soft: #1d3d55;
  --lime: #dbea62;
  --clay: #ef8065;
  --blue: #74bee1;
  --warning: #d9ad4c;
  --app-bg: #0b1420;
  --sidebar-bg: #081b2f;
  --panel-elevated: #132235;
  --theme-accent: #dbea62;
  --theme-blue: #74bee1;
  --theme-gold: #d9ad4c;
  --theme-clay: #ef8065;
  --on-brand: #0b1d2c;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

:root[data-ace-theme="australian"] {
  --ink: #132a3a; --muted: #526978; --line: #cfdee8; --line-strong: #b9cedb;
  --surface: #ffffff; --surface-soft: #eef5f9; --surface-tint: #e1edf4;
  --brand: #00609c; --brand-deep: #073a5c; --brand-soft: #dcecf6;
  --lime: #d8f05a; --clay: #e1693c; --blue: #00609c; --app-bg: #eaf3f8;
  --sidebar-bg: #06446b; --theme-accent: #d8f05a; --theme-blue: #0072b8; --theme-gold: #d4a63b; --theme-clay: #e1693c;
}

:root[data-ace-theme="clay"] {
  --ink: #30221d; --muted: #716059; --line: #dfd1ca; --line-strong: #cebcb3;
  --surface: #ffffff; --surface-soft: #f7f1ee; --surface-tint: #eee3de;
  --brand: #9c3f28; --brand-deep: #54291f; --brand-soft: #f2dfd7;
  --lime: #f1d45a; --clay: #9c3f28; --blue: #386f91; --app-bg: #f4ece8;
  --sidebar-bg: #6f2f20; --theme-accent: #f1d45a; --theme-blue: #386f91; --theme-gold: #bc862c; --theme-clay: #bc4d2f;
}

:root[data-ace-theme="grass"] {
  --ink: #182a1e; --muted: #5a6b60; --line: #cfdcd2; --line-strong: #bacbbf;
  --surface: #ffffff; --surface-soft: #eef4ef; --surface-tint: #dfeae1;
  --brand: #17643d; --brand-deep: #183f2a; --brand-soft: #dceade;
  --lime: #e4dc70; --clay: #ab5361; --blue: #366f8d; --app-bg: #eaf1eb;
  --sidebar-bg: #1d4d32; --theme-accent: #e4dc70; --theme-blue: #366f8d; --theme-gold: #b58c32; --theme-clay: #ab5361;
}

:root[data-ace-theme="china"] {
  --ink: #302022; --muted: #705d60; --line: #dfcfd1; --line-strong: #cfb8bc;
  --surface: #ffffff; --surface-soft: #f7f1f1; --surface-tint: #efe2e3;
  --brand: #a51f35; --brand-deep: #5b1724; --brand-soft: #f3dfe2;
  --lime: #f0cd55; --clay: #c24736; --blue: #326c9c; --app-bg: #f4ebec;
  --sidebar-bg: #75192a; --theme-accent: #f0cd55; --theme-blue: #326c9c; --theme-gold: #bd8b2e; --theme-clay: #c24736;
}

html,
body {
  background: var(--app-bg);
}

.topbar {
  background: var(--sidebar-bg);
}

.visual-theme-control {
  display: grid;
  margin-bottom: 22px;
  gap: 7px;
}

.visual-theme-control > span {
  color: var(--sidebar-muted);
  font-size: 12px;
}

.visual-theme-options {
  display: grid;
  padding: 3px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
}

.visual-theme-options button {
  display: grid;
  min-width: 0;
  min-height: 48px;
  padding: 5px 2px;
  place-items: center;
  gap: 2px;
  color: rgba(255, 255, 255, 0.66);
  background: transparent;
  border: 0;
  border-radius: 5px;
}

.visual-theme-options button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.visual-theme-options i {
  display: block;
  width: 20px;
  height: 13px;
  background: #247457;
  border: 2px solid #ffffff;
  border-radius: 2px;
}

.visual-theme-options button[data-visual-theme="championship"] i {
  background: #f7f9fc;
  border-color: #3b6fa5;
}

.visual-theme-options button[data-visual-theme="night"] i {
  background: #14211d;
  border-color: #d8f36f;
}

.visual-theme-options b {
  font-size: 10px;
  font-weight: 720;
}

body:not(.dedicated-admin-entry) .admin-side-nav {
  display: none !important;
}

.admin-side-nav {
  display: grid;
  margin-top: 2px;
  gap: 3px;
}

.admin-side-label {
  margin: 0 11px 5px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-side-nav button {
  display: grid;
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 680;
}

.admin-side-nav button i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--theme-accent);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  font-size: 12px;
  font-style: normal;
}

.admin-side-nav button:hover,
.admin-side-nav button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.admin-side-nav button.active {
  box-shadow: inset 3px 0 0 var(--theme-accent);
}

body.dedicated-admin-entry .topbar {
  width: 276px;
  padding: 24px 18px 18px;
}

body.dedicated-admin-entry .view,
body.dedicated-admin-entry .notice,
body.dedicated-admin-entry .message-strip {
  width: calc(100% - 276px);
  margin-left: 276px;
}

body.dedicated-admin-entry #adminView {
  max-width: none;
  padding: 26px 30px 72px;
}

.admin-page-head {
  min-height: 72px;
  margin-bottom: 18px;
  align-items: center;
}

.admin-page-head > div:first-child {
  min-width: 260px;
}

.admin-page-head h2 {
  font-size: 27px;
}

.admin-page-head .summary-cards {
  max-width: 780px;
}

.admin-page-head .summary-cards span {
  color: var(--muted);
  background: var(--surface-tint);
  border: 1px solid var(--line);
}

.admin-login-stage {
  display: grid;
  width: min(1080px, 100%);
  min-height: 510px;
  margin: 24px auto 0;
  padding: 0;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  border-color: color-mix(in srgb, var(--brand) 18%, var(--line));
  box-shadow: 0 24px 70px rgba(13, 46, 35, 0.12);
}

.admin-login-visual {
  position: relative;
  min-width: 0;
  padding: 52px 48px 40px;
  overflow: hidden;
  color: #ffffff;
  background: var(--sidebar-bg);
}

.admin-login-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
}

.admin-login-copy .section-kicker {
  color: var(--theme-accent);
}

.admin-login-copy h2 {
  max-width: 510px;
  margin: 8px 0 18px;
  color: #ffffff;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 760;
  line-height: 1.18;
}

.admin-login-copy > p {
  max-width: 500px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.75;
}

.admin-login-facts {
  display: flex;
  margin-top: 30px;
  gap: 26px;
}

.admin-login-facts span {
  display: grid;
  padding-left: 12px;
  gap: 1px;
  border-left: 2px solid var(--theme-accent);
}

.admin-login-facts strong {
  color: #ffffff;
  font-size: 22px;
}

.admin-login-facts small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.admin-login-court {
  position: absolute;
  right: -38px;
  bottom: -44px;
  left: 44px;
  height: 208px;
  opacity: 0.52;
  transform: perspective(700px) rotateX(55deg) rotateZ(-5deg);
  transform-origin: bottom center;
}

.admin-court-frame {
  position: absolute;
  inset: 8px 30px;
  border: 3px solid rgba(255, 255, 255, 0.82);
}

.admin-court-frame i {
  position: absolute;
  display: block;
  background: rgba(255, 255, 255, 0.82);
}

.admin-court-singles {
  right: 0;
  left: 0;
  height: 2px;
}

.admin-court-singles-top { top: 13%; }
.admin-court-singles-bottom { bottom: 13%; }

.admin-court-service {
  top: 13%;
  bottom: 13%;
  width: 2px;
}

.admin-court-service-left { left: 25%; }
.admin-court-service-right { right: 25%; }

.admin-court-center {
  top: 50%;
  right: 25%;
  left: 25%;
  height: 2px;
}

.admin-court-net {
  z-index: 2;
  top: -4%;
  bottom: -4%;
  left: 50%;
  width: 4px;
  box-shadow: 0 0 0 2px rgba(10, 32, 25, 0.3);
}

.admin-login-form {
  display: grid;
  padding: 54px 44px;
  align-content: center;
  gap: 17px;
  background: var(--panel-elevated);
}

.admin-login-form-head {
  margin-bottom: 8px;
}

.admin-login-form-head h2 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: 25px;
}

.admin-login-form-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-login-form label > span {
  color: var(--muted);
}

.admin-login-form input {
  min-height: 48px;
  padding-inline: 14px;
  background: var(--surface-soft);
}

.admin-login-form .primary-button {
  min-height: 48px;
  margin-top: 3px;
}

.admin-login-form .form-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

body.dedicated-admin-entry .admin-workspace-nav {
  display: none;
}

body.dedicated-admin-entry:not(.admin-authenticated) .admin-page-head .summary-cards {
  display: none;
}

:root[data-ace-theme="championship"] .primary-button:hover,
:root[data-ace-theme="championship"] .link-button:hover {
  background: #174f87;
  border-color: #174f87;
}

:root[data-ace-theme="night"] .primary-button:hover,
:root[data-ace-theme="night"] .link-button:hover {
  background: #78c3e5;
  border-color: #78c3e5;
}

:root[data-ace-theme="australian"] .primary-button:hover,
:root[data-ace-theme="australian"] .link-button:hover,
:root[data-ace-theme="clay"] .primary-button:hover,
:root[data-ace-theme="clay"] .link-button:hover,
:root[data-ace-theme="grass"] .primary-button:hover,
:root[data-ace-theme="grass"] .link-button:hover,
:root[data-ace-theme="china"] .primary-button:hover,
:root[data-ace-theme="china"] .link-button:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}

.admin-session-bar {
  min-height: 44px;
  margin: 0 0 14px;
  padding: 7px 11px 7px 15px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(18, 49, 38, 0.04);
}

.admin-command-center {
  margin-bottom: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.admin-command-head {
  display: flex;
  min-height: 46px;
  margin-bottom: 14px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-command-head h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.admin-command-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.admin-command-grid > button {
  display: grid;
  min-width: 0;
  min-height: 112px;
  padding: 15px;
  grid-template-columns: 40px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.admin-command-grid > button:hover {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  box-shadow: 0 8px 20px rgba(18, 49, 38, 0.08);
  transform: translateY(-1px);
}

.admin-command-grid > button > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.admin-command-grid small,
.admin-command-grid em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.admin-command-grid strong {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.2;
}

.admin-command-grid > button > b {
  color: var(--muted);
  font-size: 20px;
}

.admin-command-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 800;
}

.admin-command-icon.tone-clay { color: #8f3e27; background: #f8e5dd; }
.admin-command-icon.tone-blue { color: #285f91; background: #e2edf7; }
.admin-command-icon.tone-green { color: #236344; background: #dfeee5; }
.admin-command-icon.tone-gold { color: #7f5a18; background: #f5ebd4; }

:root[data-ace-theme="night"] input,
:root[data-ace-theme="night"] select,
:root[data-ace-theme="night"] textarea,
:root[data-ace-theme="night"] .ghost-button,
:root[data-ace-theme="night"] .summary-cards span,
:root[data-ace-theme="night"] .segmented-control button.active,
:root[data-ace-theme="night"] .admin-workspace-nav button.active {
  color: var(--ink);
  background: var(--surface-tint);
  border-color: var(--line-strong);
}

:root[data-ace-theme="night"] label > span,
:root[data-ace-theme="night"] .toolbar label > span {
  color: var(--muted);
}

:root[data-ace-theme="night"] .admin-command-icon.tone-clay { color: #f0a284; background: #45291f; }
:root[data-ace-theme="night"] .admin-command-icon.tone-blue { color: #91bde0; background: #1c3548; }
:root[data-ace-theme="night"] .admin-command-icon.tone-green { color: #83cda4; background: #1d3c2e; }
:root[data-ace-theme="night"] .admin-command-icon.tone-gold { color: #edc678; background: #43361e; }
:root[data-ace-theme="night"] .message-card { color: var(--ink); background: var(--surface); border-color: var(--line-strong); border-left-color: var(--clay); }
:root[data-ace-theme="night"] .message-card span { color: var(--clay); }
:root[data-ace-theme="night"] .message-card p { color: var(--muted); }
:root[data-ace-theme="night"] .icon-button { color: var(--brand); background: var(--surface); border-color: var(--line-strong); }
:root[data-ace-theme="night"] .admin-live-item-status { color: var(--clay); }

.front-admin-return {
  min-height: 38px;
  margin: 0 0 12px;
  gap: 7px;
}

@media (max-width: 1180px) {
  body.dedicated-admin-entry .topbar {
    width: 240px;
  }

  body.dedicated-admin-entry .view,
  body.dedicated-admin-entry .notice,
  body.dedicated-admin-entry .message-strip {
    width: calc(100% - 240px);
    margin-left: 240px;
  }

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

  .admin-page-head {
    display: grid;
  }

  .admin-page-head .summary-cards {
    max-width: none;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .visual-theme-control {
    margin: 0;
  }

  .visual-theme-control > span,
  .visual-theme-options b {
    display: none;
  }

  .visual-theme-options {
    width: 108px;
  }

  .visual-theme-options button {
    min-height: 34px;
  }

  body.dedicated-admin-entry .topbar {
    position: sticky;
    width: 100%;
    height: auto;
    min-height: 70px;
    padding: 10px 14px;
    grid-template-columns: minmax(0, 1fr) 118px 108px;
    gap: 10px;
  }

  body.dedicated-admin-entry .language-switch {
    display: block;
  }

  body.dedicated-admin-entry .admin-side-nav {
    position: fixed;
    z-index: 48;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    height: 68px;
    margin: 0;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    overflow-x: auto;
    gap: 3px;
    background: var(--sidebar-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .admin-side-label {
    display: none;
  }

  body.dedicated-admin-entry .admin-side-nav button {
    width: 78px;
    min-width: 78px;
    min-height: 54px;
    padding: 4px 3px;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 1px;
    text-align: center;
    font-size: 9px;
  }

  body.dedicated-admin-entry .admin-side-nav button i {
    width: 22px;
    height: 22px;
  }

  body.dedicated-admin-entry .admin-side-nav button.active {
    box-shadow: inset 0 -3px 0 var(--theme-accent);
  }

  body.dedicated-admin-entry .view,
  body.dedicated-admin-entry .notice,
  body.dedicated-admin-entry .message-strip {
    width: 100%;
    margin-left: 0;
  }

  body.dedicated-admin-entry #adminView {
    padding: 20px 16px 92px;
  }

  body.dedicated-admin-entry:not(.admin-authenticated) #adminView {
    padding-bottom: 28px;
  }

  .admin-login-stage {
    min-height: 0;
    margin-top: 10px;
    grid-template-columns: 1fr;
  }

  .admin-login-visual {
    min-height: 285px;
    padding: 32px 30px;
  }

  .admin-login-copy h2 {
    max-width: 560px;
    font-size: 29px;
  }

  .admin-login-court {
    left: 42%;
    height: 170px;
  }

  .admin-login-form {
    padding: 34px 30px 38px;
  }
}

@media (max-width: 640px) {
  body.dedicated-admin-entry .front-admin-return {
    width: 100%;
    justify-content: center;
  }

  body.dedicated-admin-entry .topbar {
    grid-template-columns: minmax(0, 1fr) 103px;
  }

  body.dedicated-admin-entry .visual-theme-control {
    grid-column: 1 / -1;
  }

  body.dedicated-admin-entry .visual-theme-options {
    width: 100%;
  }

  .admin-page-head h2 {
    font-size: 23px;
  }

  .admin-page-head .summary-cards {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-page-head .summary-cards span {
    min-width: 0;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-login-visual {
    min-height: 250px;
    padding: 28px 22px;
  }

  .admin-login-copy h2 {
    font-size: 25px;
  }

  .admin-login-copy > p {
    font-size: 12px;
  }

  .admin-login-facts {
    margin-top: 20px;
    gap: 14px;
  }

  .admin-login-court {
    display: none;
  }

  .admin-login-form {
    padding: 28px 22px 32px;
  }

  .admin-command-head {
    display: grid;
    gap: 0;
  }

  .admin-command-head p {
    margin: 0 0 12px;
  }

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

  .admin-command-grid > button {
    min-height: 94px;
  }

  .admin-session-bar {
    align-items: flex-start;
  }

  .admin-session-bar span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* Final cascade for the compact admin shell. */
.visual-theme-control {
  display: grid;
  margin-bottom: 18px;
  gap: 6px;
}

.visual-theme-control > span:first-child {
  display: block;
  color: var(--sidebar-muted);
  font-size: 11px;
}

.topbar .language-switch > span {
  color: var(--sidebar-muted);
}

.message-card span {
  color: #9a4128;
}

.admin-side-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.admin-side-nav {
  display: grid;
  align-content: start;
  gap: 2px;
}

.admin-side-group {
  display: block;
  margin: 12px 12px 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  font-weight: 760;
}

.admin-side-nav button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 38px;
  padding: 0 12px 0 24px;
  grid-template-columns: none;
  align-items: center;
  gap: 0;
  color: rgba(255, 255, 255, 0.68);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
}

.admin-side-nav button::before {
  content: "";
  position: absolute;
  left: 11px;
  display: block;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 50%;
}

.admin-side-nav button.active {
  box-shadow: inset 2px 0 0 var(--theme-accent);
}

.admin-side-nav button.active::before {
  background: var(--theme-accent);
}

body.dedicated-admin-entry .topbar {
  width: 248px;
  padding: 22px 16px 18px;
}

body.dedicated-admin-entry .view,
body.dedicated-admin-entry .notice,
body.dedicated-admin-entry .message-strip {
  width: calc(100% - 248px);
  margin-left: 248px;
}

body.dedicated-admin-entry #adminView {
  max-width: none;
  padding: 22px 28px 72px;
}

body.dedicated-admin-entry:not(.admin-authenticated) .admin-page-head {
  display: none;
}

.admin-page-head {
  display: flex;
  min-height: 64px;
  margin: 0 0 14px;
  padding: 0 0 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.admin-page-head > div:first-child {
  min-width: 0;
}

.admin-page-head h2 {
  font-size: 22px;
}

.admin-page-head .summary-cards,
.admin-summary-data {
  display: none !important;
}

body.dedicated-admin-entry .admin-workspace-nav {
  display: none;
}

@media (max-width: 1180px) {
  body.dedicated-admin-entry .topbar {
    width: 220px;
  }

  body.dedicated-admin-entry .view,
  body.dedicated-admin-entry .notice,
  body.dedicated-admin-entry .message-strip {
    width: calc(100% - 220px);
    margin-left: 220px;
  }
}

@media (max-width: 900px) {
  body.dedicated-admin-entry .topbar {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 118px 150px;
  }

  body.dedicated-admin-entry .view,
  body.dedicated-admin-entry .notice,
  body.dedicated-admin-entry .message-strip {
    width: 100%;
    margin-left: 0;
  }

  body.dedicated-admin-entry .admin-side-nav {
    display: flex;
    height: 62px;
  }

  body.dedicated-admin-entry .admin-side-nav button {
    width: 92px;
    min-width: 92px;
    min-height: 48px;
    padding: 4px 7px;
    justify-content: center;
    font-size: 10px;
  }

  body.dedicated-admin-entry .admin-side-nav button::before,
  .admin-side-group {
    display: none;
  }
}

@media (max-width: 640px) {
  body.dedicated-admin-entry .topbar {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  body.dedicated-admin-entry .visual-theme-control {
    grid-column: 1 / -1;
  }

  .visual-theme-control > span:first-child {
    display: none;
  }

  .admin-page-head {
    display: flex;
  }
}

/* Final admin operations cleanup. */
body.dedicated-admin-entry .message-strip,
body.dedicated-admin-entry .sidebar-status {
  display: none !important;
}

body.dedicated-admin-entry :where(
  .primary-button,
  .ghost-button,
  .danger-button,
  .icon-button,
  .admin-top-icon,
  .admin-page-actions > button,
  .booking-admin-tabs button,
  .booking-admin-row-actions button
) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

body.dedicated-admin-entry :where(
  .primary-button,
  .ghost-button,
  .danger-button,
  .admin-page-actions > button,
  .booking-admin-tabs button,
  .booking-admin-row-actions button
) > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: inherit;
}

body.dedicated-admin-entry .booking-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: end;
}

.booking-managed-venue-control {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 340px) max-content;
  align-items: end;
  justify-content: start;
  gap: 8px;
}

.booking-managed-venue-control label {
  min-width: 0;
}

.booking-managed-venue-control select {
  width: 100%;
}

.booking-venue-delete {
  width: auto;
  min-width: 92px;
  min-height: 42px;
  white-space: nowrap;
}

.booking-venue-delete[hidden] {
  display: none !important;
}

.booking-venue-delete:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

@media (max-width: 1050px) {
  body.dedicated-admin-entry .booking-admin-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .booking-managed-venue-control {
    grid-template-columns: minmax(0, 1fr) max-content;
  }
}

@media (max-width: 640px) {
  .booking-managed-venue-control {
    grid-template-columns: 1fr;
  }

  .booking-venue-delete {
    width: 100%;
  }
}

/* Dedicated admin: keep language and color compact, aligned, and collision-free. */
.topbar-preferences {
  display: contents;
}

body.dedicated-admin-entry.admin-authenticated .topbar-preferences {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body.dedicated-admin-entry.admin-authenticated .topbar-preferences .language-switch,
body.dedicated-admin-entry.admin-authenticated .topbar-preferences .visual-theme-control {
  position: relative !important;
  inset: auto !important;
  width: auto !important;
  min-width: 0;
  height: 34px;
  margin: 0 !important;
  padding: 0;
  display: block !important;
  grid-column: auto !important;
  align-self: auto !important;
  gap: 0 !important;
}

body.dedicated-admin-entry.admin-authenticated .topbar-preferences .language-switch > span,
body.dedicated-admin-entry.admin-authenticated .topbar-preferences .visual-theme-control > span:first-child {
  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;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

body.dedicated-admin-entry.admin-authenticated .topbar-preferences select {
  width: 100% !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 !important;
  border-radius: 5px;
  font-size: 11px !important;
  line-height: 1;
}

body.dedicated-admin-entry.admin-authenticated .topbar-preferences .language-switch select {
  padding: 0 26px 0 10px !important;
}

body.dedicated-admin-entry.admin-authenticated .topbar-preferences .visual-theme-select-wrap {
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px !important;
  display: flex !important;
  align-items: center;
}

body.dedicated-admin-entry.admin-authenticated .topbar-preferences .visual-theme-select-wrap select {
  padding: 0 23px 0 28px !important;
}

body.dedicated-admin-entry.admin-authenticated .topbar-preferences .visual-theme-swatch {
  top: 50%;
  left: 9px;
  width: 12px;
  height: 12px;
  border-width: 2px;
  transform: translateY(-50%);
}

/* Members and clubs: compact operational workspace. */
.brand-lockup[role="button"] {
  cursor: pointer;
  border-radius: 6px;
  outline: none;
}

.brand-lockup[role="button"]:focus-visible {
  box-shadow: 0 0 0 2px var(--brand), 0 0 0 4px rgba(255, 255, 255, 0.72);
}

body.dedicated-admin-entry.admin-authenticated .brand-lockup[role="button"]:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.dedicated-admin-entry.admin-authenticated.admin-members-workspace-active .admin-page-actions {
  display: none;
}

body.dedicated-admin-entry.admin-authenticated .members-management-workspace {
  min-width: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 12px;
}

.members-workspace-bar {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 10px 0 0;
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
}

.members-workspace-tabs {
  min-width: 0;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}

.members-workspace-tabs::-webkit-scrollbar {
  display: none;
}

.members-workspace-tabs button {
  position: relative;
  min-width: 92px;
  height: 46px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--admin-border);
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.members-workspace-tabs button::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 3px;
  content: "";
  background: transparent;
}

.members-workspace-tabs button.active {
  color: var(--ink);
  background: var(--admin-panel-soft);
}

.members-workspace-tabs button.active::after {
  background: var(--admin-accent);
}

.members-workspace-tabs button b {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-accent);
  background: var(--admin-accent-soft);
  border-radius: 10px;
  font-size: 10px;
  line-height: 1;
}

.members-workspace-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.members-workspace-scope {
  min-width: 0;
  max-width: 180px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.members-workspace-scope i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: var(--admin-accent);
  border-radius: 50%;
}

.members-workspace-scope > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.members-workspace-tools .icon-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
}

.members-overview-pane,
.members-workspace-pane {
  min-width: 0;
}

.members-overview-pane[hidden],
.members-workspace-pane[hidden] {
  display: none !important;
}

.members-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  overflow: hidden;
}

.members-kpi-strip button {
  min-width: 0;
  min-height: 76px;
  padding: 12px 16px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--admin-border);
  border-radius: 0;
  text-align: left;
}

.members-kpi-strip button:last-child {
  border-right: 0;
}

.members-kpi-strip button:hover {
  background: var(--admin-panel-soft);
}

.members-kpi-strip span {
  color: var(--muted);
  font-size: 11px;
}

.members-kpi-strip strong {
  font-size: 22px;
  line-height: 1;
}

.members-overview-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.members-overview-actions button {
  min-width: 0;
  min-height: 48px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  color: var(--ink);
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
}

.members-overview-actions button:hover {
  color: var(--admin-accent);
  border-color: var(--admin-accent);
}

.members-overview-actions button > span {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  color: var(--admin-accent);
  background: var(--admin-accent-soft);
  border-radius: 4px;
  font-size: 14px;
}

.members-overview-actions b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.members-split-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
  align-items: start;
  gap: 12px;
}

.members-directory-surface,
.members-editor-disclosure {
  min-width: 0;
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
}

.members-directory-head {
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--admin-border);
}

.members-directory-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.members-directory-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.members-directory-head > div:first-child > span {
  color: var(--muted);
  font-size: 11px;
}

.members-filter-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 108px;
  align-items: center;
  gap: 6px;
}

.members-filter-row.member-filter-row {
  grid-template-columns: minmax(170px, 1fr) 128px 104px;
}

.members-search-control {
  position: relative;
  min-width: 0;
  display: block;
}

.members-search-control > span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 10px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.members-search-control input,
.members-filter-row select {
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  margin: 0;
  border-radius: 5px;
  font-size: 11px;
}

.members-search-control input {
  padding-left: 30px;
}

.members-column-head {
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(120px, 0.8fr) minmax(150px, 1fr) minmax(132px, auto);
  align-items: center;
  gap: 12px;
  color: var(--muted);
  background: var(--admin-panel-soft);
  border-bottom: 1px solid var(--admin-border);
  font-size: 10px;
  font-weight: 700;
}

.members-directory-slot > .panel,
.members-editor-slot > .panel {
  margin: 0;
  padding: 0;
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.members-directory-slot > .panel > h2,
.members-editor-slot > .panel > h2 {
  display: none;
}

.members-record-list {
  display: grid;
  gap: 0;
}

.members-record-list > .list-item {
  margin: 0;
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: none;
}

.members-record-list > .list-item:last-child {
  border-bottom: 0;
}

.members-record-row {
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(120px, 0.8fr) minmax(150px, 1fr) minmax(132px, auto);
  align-items: center;
  gap: 7px 12px;
}

.members-record-identity,
.members-record-meta,
.members-record-contact {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.members-record-identity strong,
.members-record-meta span,
.members-record-contact span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.members-record-identity small,
.members-record-meta small,
.members-record-contact small,
.members-record-note {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.members-record-habits {
  color: var(--ink-soft, var(--muted));
}

.members-record-status {
  min-width: 0;
  margin: 0;
  justify-content: flex-end;
}

.members-record-status span {
  font-size: 9px;
  white-space: nowrap;
}

.members-record-note,
.members-record-row > .review-actions,
.members-record-row > input {
  grid-column: 1 / -1;
}

.members-editor-disclosure {
  overflow: hidden;
}

.members-editor-disclosure > summary {
  min-height: 50px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.members-editor-disclosure > summary::-webkit-details-marker {
  display: none;
}

.members-editor-disclosure > summary::after {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  content: "+";
  color: var(--admin-accent);
  background: var(--admin-accent-soft);
  border-radius: 4px;
  font-size: 18px;
}

.members-editor-disclosure[open] > summary {
  border-bottom: 1px solid var(--admin-border);
}

.members-editor-disclosure[open] > summary::after {
  content: "−";
}

.members-editor-disclosure > summary > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.members-editor-disclosure > summary b {
  font-size: 13px;
}

.members-editor-disclosure > summary small {
  color: var(--muted);
  font-size: 10px;
}

.members-editor-slot {
  padding: 12px;
}

.members-editor-slot .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.members-editor-slot .form-grid > button {
  min-height: 40px;
}

.members-review-pane {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  align-items: start;
  gap: 12px;
}

.members-review-stack:not(:has(> .panel:not([hidden]))) {
  display: none;
}

.members-review-stack > .panel {
  margin: 0;
}

@media (max-width: 1050px) {
  .members-workspace-scope {
    display: none;
  }

  .members-split-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .members-directory-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .members-filter-row,
  .members-filter-row.member-filter-row {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .members-workspace-bar {
    padding-right: 8px;
    gap: 6px;
  }

  .members-workspace-tabs button {
    min-width: 86px;
    padding: 0 10px;
    font-size: 11px;
  }

  .members-kpi-strip,
  .members-overview-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .members-kpi-strip button:nth-child(2) {
    border-right: 0;
  }

  .members-kpi-strip button:nth-child(-n + 2) {
    border-bottom: 1px solid var(--admin-border);
  }

  .members-split-layout {
    grid-template-columns: 1fr;
  }

  .members-editor-disclosure {
    order: 2;
  }

  .members-directory-surface {
    order: 1;
  }
}

@media (max-width: 640px) {
  .members-workspace-bar {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 0;
  }

  .members-workspace-tools {
    display: none;
  }

  .members-workspace-tabs button {
    min-width: 0;
    padding: 0 7px;
    flex: 1 1 0;
  }

  .members-workspace-tabs button b {
    display: none;
  }

  .members-workspace-tabs {
    width: 100%;
    overflow-x: hidden;
  }

  .members-workspace-tabs button > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .members-kpi-strip button {
    min-height: 66px;
    padding: 10px 12px;
  }

  .members-kpi-strip strong {
    font-size: 19px;
  }

  .members-overview-actions button {
    min-height: 46px;
    padding: 7px 9px;
  }

  .members-directory-head {
    padding: 10px;
  }

  .members-filter-row,
  .members-filter-row.member-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .members-search-control {
    grid-column: 1 / -1;
  }

  .members-column-head {
    display: none;
  }

  .members-record-row {
    grid-template-columns: minmax(0, 1fr) minmax(108px, 34%);
    gap: 8px 10px;
  }

  .members-record-identity {
    grid-column: 1;
  }

  .members-record-habits {
    display: none;
  }

  .members-record-status {
    grid-column: 2;
    grid-row: 1;
    max-width: 112px;
  }

  .player-record-list .members-record-status span:not(:first-child),
  .club-record-list .members-record-status span:nth-child(2) {
    display: none;
  }

  .members-record-meta {
    grid-column: 1;
    grid-row: 2;
  }

  .members-record-contact {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }

  .members-editor-slot .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Feedback operations */
.feedback-admin-center {
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--admin-panel);
}

.feedback-admin-heading {
  min-height: 96px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--admin-border);
  background: color-mix(in srgb, var(--admin-accent) 8%, var(--admin-panel));
}

.feedback-admin-heading > div {
  min-width: 0;
}

.feedback-admin-heading h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.feedback-admin-heading p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.feedback-admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--admin-border);
}

.feedback-admin-metrics article {
  min-width: 0;
  min-height: 96px;
  padding: 17px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 3px 12px;
  border-right: 1px solid var(--admin-border);
  background: var(--admin-panel);
}

.feedback-admin-metrics article:last-child {
  border-right: 0;
}

.feedback-admin-metrics span,
.feedback-admin-metrics small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.feedback-admin-metrics strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: var(--admin-accent);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.feedback-admin-metrics .attention strong {
  color: var(--admin-warning);
}

.feedback-admin-toolbar {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 170px 190px minmax(260px, 1fr);
  align-items: end;
  gap: 12px;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-panel-soft);
}

.feedback-admin-toolbar > label,
.feedback-admin-control-grid label,
.feedback-admin-note {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.feedback-admin-toolbar select,
.feedback-admin-toolbar input,
.feedback-admin-control-grid select,
.feedback-admin-note textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--admin-border);
  border-radius: 5px;
  color: var(--ink);
  background: var(--admin-panel);
}

.feedback-admin-search > span:last-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.feedback-admin-search input {
  border-radius: 5px 0 0 5px;
}

.feedback-admin-search button {
  min-width: 76px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--admin-accent);
  border-radius: 0 5px 5px 0;
  color: var(--on-brand);
  background: var(--admin-accent);
  font-weight: 800;
}

.feedback-admin-layout {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(330px, 40%) minmax(0, 1fr);
}

.feedback-admin-queue {
  min-width: 0;
  border-right: 1px solid var(--admin-border);
  background: var(--admin-panel-soft);
}

.feedback-admin-subhead {
  min-height: 72px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-panel);
}

.feedback-admin-subhead h3,
.feedback-admin-subhead p {
  margin: 0;
}

.feedback-admin-subhead h3 {
  font-size: 16px;
}

.feedback-admin-subhead p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.feedback-admin-subhead > strong {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--on-brand);
  background: var(--admin-accent);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.feedback-admin-list {
  max-height: 760px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.feedback-admin-ticket {
  width: 100%;
  min-height: 132px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--admin-border);
  border-radius: 0;
  color: var(--ink);
  background: var(--admin-panel);
  text-align: left;
  transition: background .12s ease, box-shadow .12s ease;
}

.feedback-admin-ticket:hover,
.feedback-admin-ticket:focus-visible {
  background: color-mix(in srgb, var(--admin-accent) 7%, var(--admin-panel));
}

.feedback-admin-ticket.selected {
  background: var(--admin-accent-soft);
  box-shadow: inset 0 0 0 1px var(--admin-accent);
}

.feedback-admin-ticket > strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.feedback-admin-ticket-top,
.feedback-admin-ticket-meta,
.feedback-admin-ticket-foot {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feedback-admin-ticket-top > b {
  color: var(--admin-accent);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.feedback-admin-ticket-meta {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 12px;
}

.feedback-admin-ticket-meta i {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-admin-ticket-foot {
  color: var(--muted);
  font-size: 11px;
}

.feedback-admin-ticket-foot em {
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--muted);
  background: var(--admin-panel-soft);
  font-style: normal;
  font-weight: 800;
}

.feedback-admin-ticket-foot em[data-priority="HIGH"],
.feedback-admin-ticket-foot em[data-priority="URGENT"] {
  color: var(--admin-warning);
  background: var(--admin-warning-soft);
}

.feedback-admin-status {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--muted);
  background: var(--admin-panel-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.feedback-admin-status[data-status="OPEN"] {
  color: var(--admin-warning);
  background: var(--admin-warning-soft);
}

.feedback-admin-status[data-status="IN_PROGRESS"] {
  color: var(--admin-info);
  background: color-mix(in srgb, var(--admin-info) 14%, var(--admin-panel));
}

.feedback-admin-status[data-status="RESOLVED"] {
  color: var(--admin-accent);
  background: var(--admin-accent-soft);
}

.feedback-admin-detail {
  min-width: 0;
  padding: 24px;
  background: var(--admin-panel);
  transition: opacity .12s ease;
}

.feedback-admin-detail.is-loading {
  opacity: .55;
  pointer-events: none;
}

.feedback-admin-empty {
  min-height: 300px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.feedback-admin-empty > span {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--admin-border);
  border-radius: 50%;
  color: var(--admin-accent);
  background: var(--admin-panel-soft);
  font-size: 22px;
  font-weight: 850;
}

.feedback-admin-empty strong {
  color: var(--ink);
  font-size: 16px;
}

.feedback-admin-empty p {
  max-width: 390px;
  margin: 0;
  line-height: 1.55;
}

.feedback-admin-ticket-head {
  padding-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--admin-border);
}

.feedback-admin-ticket-head > div {
  min-width: 0;
}

.feedback-admin-ticket-number {
  color: var(--admin-accent);
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.feedback-admin-ticket-head h3 {
  margin: 7px 0 4px;
  font-size: 20px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.feedback-admin-ticket-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.feedback-admin-context {
  padding: 18px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 20px;
  border-bottom: 1px solid var(--admin-border);
}

.feedback-admin-context > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feedback-admin-context span {
  color: var(--muted);
  font-size: 11px;
}

.feedback-admin-context strong {
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.feedback-admin-content-block {
  padding: 20px 0;
  border-bottom: 1px solid var(--admin-border);
}

.feedback-admin-content-block h4 {
  margin: 0 0 12px;
  font-size: 14px;
}

.feedback-admin-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.feedback-admin-attachments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.feedback-admin-attachment {
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 5px;
  background: var(--admin-panel-soft);
}

.feedback-admin-attachment img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.feedback-admin-conversation {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-admin-message {
  max-width: 88%;
  padding: 12px 14px;
  align-self: flex-end;
  border-radius: 7px 7px 2px 7px;
  color: var(--on-brand);
  background: var(--admin-accent);
}

.feedback-admin-message.admin {
  align-self: flex-start;
  border: 1px solid var(--admin-border);
  border-radius: 7px 7px 7px 2px;
  color: var(--ink);
  background: var(--admin-panel-soft);
}

.feedback-admin-message > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.feedback-admin-message strong,
.feedback-admin-message time {
  font-size: 10px;
}

.feedback-admin-message time {
  opacity: .72;
}

.feedback-admin-message p {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.feedback-admin-muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.feedback-admin-controls {
  margin: 22px -24px -24px;
  padding: 20px 24px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 20px;
  background: var(--admin-panel-soft);
}

.feedback-admin-controls form {
  min-width: 0;
}

.feedback-admin-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.feedback-admin-note {
  margin-top: 12px;
}

.feedback-admin-note textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.feedback-admin-controls form > button {
  min-height: 44px;
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .feedback-admin-layout {
    grid-template-columns: minmax(300px, 38%) minmax(0, 1fr);
  }

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

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

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

  .feedback-admin-search {
    grid-column: 1 / -1;
  }

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

  .feedback-admin-queue {
    border-right: 0;
    border-bottom: 1px solid var(--admin-border);
  }

  .feedback-admin-list {
    max-height: 390px;
  }
}

@media (max-width: 640px) {
  .feedback-admin-heading {
    padding: 17px 15px;
  }

  .feedback-admin-heading p {
    font-size: 12px;
  }

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

  .feedback-admin-metrics article {
    min-height: 82px;
    padding: 12px;
  }

  .feedback-admin-metrics article:nth-child(2) {
    border-right: 0;
  }

  .feedback-admin-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--admin-border);
  }

  .feedback-admin-toolbar {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .feedback-admin-search {
    grid-column: auto;
  }

  .feedback-admin-toolbar select,
  .feedback-admin-toolbar input,
  .feedback-admin-control-grid select,
  .feedback-admin-note textarea {
    font-size: 16px;
  }

  .feedback-admin-detail {
    padding: 18px 15px;
  }

  .feedback-admin-ticket-head {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-admin-ticket-head .feedback-admin-status {
    align-self: flex-start;
  }

  .feedback-admin-context,
  .feedback-admin-control-grid {
    grid-template-columns: 1fr;
  }

  .feedback-admin-controls {
    margin: 20px -15px -18px;
    padding: 18px 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-admin-ticket,
  .feedback-admin-detail {
    transition: none;
  }
}
