body.app-page {
  background: linear-gradient(
    160deg,
    var(--bg-top) 0%,
    var(--bg-mid) 55%,
    #03040c 100%
  );
  height: 100vh;
  overflow: hidden;
}
.app-page .container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 28px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  position: relative;
}
@media (max-width: 1100px), (max-height: 820px) {
  body.app-page {
    min-height: 100vh;
    overflow: auto;
  }
  .app-page .container {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
}
.app-page .container::after {
  content: "";
  position: absolute;
  inset: 32px;
  border-radius: calc(var(--radius) * 1.2);
  border: 1px solid rgba(244, 184, 96, 0.08);
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.35;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: rgba(12, 16, 28, 0.55);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(
    135deg,
    rgba(244, 184, 96, 0.65),
    rgba(169, 132, 255, 0.45)
  );
  border-radius: 999px;
  border: 2px solid rgba(8, 10, 18, 0.6);
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    135deg,
    rgba(244, 184, 96, 0.85),
    rgba(169, 132, 255, 0.55)
  );
}
.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.panel {
  --glass-edge-strong-local: var(--glass-edge-strong);
  --glass-edge-soft-local: var(--glass-edge-soft);
  --glass-prism-warm-local: var(--glass-prism-warm);
  --glass-prism-cool-local: var(--glass-prism-cool);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 32px var(--glass-bloom-cool),
    inset 0 0 24px var(--glass-bloom-warm),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(5, 6, 15, 0.45);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: calc(var(--radius) - 1px);
  background:
    linear-gradient(
      115deg,
      var(--glass-edge-strong-local),
      transparent 55%
    ),
    linear-gradient(
      300deg,
      var(--glass-edge-soft-local),
      transparent 60%
    );
  mix-blend-mode: screen;
  opacity: 0.7;
  -webkit-mask-image: radial-gradient(circle at center, transparent 62%, black 100%);
  mask-image: radial-gradient(circle at center, transparent 62%, black 100%);
}
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 12% 15%,
      var(--glass-prism-warm-local),
      transparent 48%
    ),
    radial-gradient(
      circle at 82% 20%,
      var(--glass-prism-cool-local),
      transparent 45%
    ),
    radial-gradient(
      circle at 50% 86%,
      rgba(255, 255, 255, 0.1),
      transparent 58%
    );
  mix-blend-mode: screen;
  opacity: 0.55;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.26, 1),
    opacity 0.8s ease;
  will-change: transform;
}
.panel > * {
  position: relative;
}

@media (hover: hover) {
  .panel:hover::after {
    transform: translate3d(
      calc(var(--glass-parallax-distance) * 0.4),
      calc(var(--glass-parallax-distance) * -0.5),
      0
    );
    opacity: 0.82;
  }
}
@media (prefers-reduced-motion: reduce) {
  .panel::after {
    transition: none;
  }
  .panel:hover::after {
    transform: none;
  }
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 0;
  gap: 16px;
  flex-wrap: wrap;
}
.panel-heading-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
  min-width: 0;
}
.panel-heading-tools {
  display: flex;
  flex-direction: row;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  min-width: 260px;
  flex-wrap: wrap;
}
/* Keep Teams panel header controls on one line (wide view) */
.teams-panel .panel-header .panel-heading-tools {
  flex-wrap: nowrap;
  align-items: center;
}
.teams-panel .panel-header .filter-group {
  flex: 1 1 auto;
  align-items: center;
}
.teams-panel .panel-header .bulk-action-group {
  flex: 0 1 auto;
  align-items: center;
}
/* Keep Teams panel controls on a single row */
.teams-panel .panel-header .panel-heading-tools {
  flex-wrap: nowrap;
  align-items: center;
}
.panel-heading-tools .filter-group {
  margin-right: auto;
  justify-content: flex-start;
}
.filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.bulk-action-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.panel-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.28px;
  color: var(--text);
  text-transform: uppercase;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.panel-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.5;
  max-width: 560px;
}
.panel-body {
  padding: 18px 12px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.overview-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 32px;
  background: radial-gradient(
      circle at 12% 16%,
      rgba(244, 184, 96, 0.18),
      transparent 32%
    ),
    var(--panel);
}
.overview-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.overview-primary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.primary-actions .btn {
  height: 44px;
  font-size: 13px;
  padding: 0 18px;
}
.overview-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  flex: 1;
}
/* Adjust metric widths on wide screens: widen Last Allocation by ~33%, shrink Score Mode by ~33% */
@media (min-width: 980px) {
  .metrics-grid {
    grid-template-columns: 1fr 1.33fr 0.67fr;
  }
}

.metric {
  position: relative;
  background: linear-gradient(
    160deg,
    rgba(11, 18, 33, 0.92) 0%,
    rgba(17, 26, 44, 0.82) 100%
  );
  border: 1px solid rgba(244, 184, 96, 0.18);
  border-radius: 18px;
  height: 44px; /* match search input height */
  padding: 0 14px; /* remove vertical padding to keep 44px total */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 44px;
  box-shadow: var(--shadow-soft);
}
.metric::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(
    145deg,
    rgba(244, 184, 96, 0.18),
    rgba(80, 115, 235, 0.12),
    transparent 68%
  );
  opacity: 0.6;
  pointer-events: none;
}
.metric-label {
  font-size: 11px;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: var(--text-soft);
}
.metric-value {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.metric-caption {
  font-size: 11px;
  color: rgba(229, 233, 246, 0.7);
}
.metric-content {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
  text-align: left;
}
.metric-content .metric-value {
  font-weight: 700;
  text-align: left;
}
.metric-content .metric-caption {
  text-align: left;
}
.search-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 240px;
}
.search-input-wrap {
  position: relative;
}
.search-input-wrap input {
  width: 100%;
  padding-left: 42px;
  height: 44px;
  border-radius: 14px;
  background: rgba(16, 24, 38, 0.78);
  box-shadow: inset 0 0 0 1px rgba(122, 148, 186, 0.22);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.search-input-wrap input:hover {
  box-shadow: inset 0 0 0 1px rgba(244, 184, 96, 0.32);
}
.search-input-wrap input:focus {
  box-shadow: 0 0 0 3px rgba(244, 184, 96, 0.18),
    inset 0 0 0 1px rgba(244, 184, 96, 0.45);
  background: rgba(18, 26, 42, 0.94);
}
.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
}
.icon-search {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gradient-gold);
  mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.742 10.344h-.646l-.228-.22a4.471 4.471 0 001.086-2.94A4.5 4.5 0 107.5 11.5c1.117 0 2.142-.41 2.94-1.086l.22.228v.646l3.5 3.492 1.052-1.052-3.472-3.384zm-4.242 0C6.012 10.344 4.5 8.832 4.5 7s1.512-3.344 3.344-3.344S11.188 5.168 11.188 7 9.676 10.344 7.5 10.344z' fill='%23fff'/%3E%3C/svg%3E")
    center/contain no-repeat;
  opacity: 0.78;
}
.field-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.48px;
  text-transform: uppercase;
  color: rgba(236, 240, 255, 0.62);
  font-weight: 600;
}
.field-label input,
.field-label textarea,
.field-label select {
  margin-top: 4px;
}
.field-help {
  margin: 0;
  font-size: 12px;
  color: rgba(222, 229, 247, 0.5);
  line-height: 1.45;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(222, 229, 247, 0.55);
}
.form-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(244, 184, 96, 0.35),
    transparent
  );
  margin: 6px 0 2px;
}
.section-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.32px;
  color: rgba(244, 184, 96, 0.82);
  text-transform: uppercase;
}
.input-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.input-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.template-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.template-row .button-row {
  justify-content: flex-start;
}
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.auto-fetch-btn {
  position: relative;
  overflow: hidden;
  --progress: 0%;
}
.auto-fetch-btn .btn-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.auto-fetch-btn::before,
.auto-fetch-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.auto-fetch-btn::before {
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 0;
}
.auto-fetch-btn::after {
  width: var(--progress, 0%);
  background: linear-gradient(90deg, #ffd966, #ff9c4d);
  opacity: 0;
  transition: width 0.3s ease, opacity 0.2s ease;
  z-index: 0;
}
.auto-fetch-btn.auto-fetch-running {
  cursor: progress;
}
.auto-fetch-btn.auto-fetch-running::before {
  opacity: 0.25;
}
.auto-fetch-btn.auto-fetch-running::after {
  opacity: 0.45;
}
.control-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  width: 66vw;
  max-width: 66vw;
  margin: 0 auto;
  padding-bottom: 6px;
  position: relative;
}
.control-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  padding-bottom: 4px;
  transition: grid-template-columns 0.24s ease, gap 0.24s ease;
}
.control-layout.expanded {
  grid-template-columns: minmax(0, 1fr) 80px;
}
.control-layout.expanded [data-setup-body] {
  overflow: hidden;
  padding: 0;
}
.control-layout.expanded [data-setup-body] > * {
  display: none;
}
.control-layout--tabs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}
.control-view.is-start-screen .control-layout,
#controlView.is-start-screen .control-layout {
  display: none;
}
.control-view.is-start-screen .control-wrap,
#controlView.is-start-screen .control-wrap {
  width: min(1200px, 100%);
  max-width: 100%;
}
#controlView.is-start-screen .control-wrap::after {
  border: none;
}
#controlView.is-start-screen {
  position: relative;
  isolation: isolate;
}
#controlView.is-start-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 38%,
    rgba(2, 6, 18, 0) 0%,
    rgba(2, 6, 18, 0) 55%,
    rgba(2, 6, 18, 0.22) 80%,
    rgba(2, 6, 18, 0.4) 100%
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}
#controlView.is-start-screen > * {
  position: relative;
  z-index: 1;
}
.break-start-screen {
  width: 100%;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
  position: relative;
  isolation: isolate;
}
.break-start-screen[hidden] {
  display: none !important;
}
.break-start-screen > * {
  position: relative;
  z-index: 1;
}
.break-start-card {
  width: min(900px, 100%);
  border-radius: 0;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.break-start-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.break-start-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: rgba(244, 184, 96, 0.72);
}
.break-start-title {
  margin: 6px 0 0;
  font-size: 32px;
  letter-spacing: 0.01em;
}
.break-start-caption {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: rgba(236, 240, 255, 0.56);
}
.break-start-copy {
  margin: 6px 0 0;
  color: rgba(236, 240, 255, 0.75);
}
.break-start-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 16px;
  border-radius: calc(var(--radius) * 0.9);
  background: rgba(12, 16, 28, 0.78);
  border: 1px solid rgba(120, 149, 188, 0.2);
}
.break-start-action {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-transform: none;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.break-start-action-label {
  text-transform: uppercase;
  font-size: 12px;
}
.break-start-action-meta {
  text-transform: none;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(236, 240, 255, 0.65);
}
.btn.accent .break-start-action-meta {
  color: rgba(27, 18, 4, 0.8);
}
.break-start-meta {
  margin: 0;
  font-size: 12px;
  color: rgba(236, 240, 255, 0.68);
}
.control-tabs {
  display: flex;
  gap: 12px;
  padding: 8px;
  border-radius: calc(var(--radius) * 0.9);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}
.control-tab {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: calc(var(--radius) * 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 19, 32, 0.88);
  color: rgba(228, 237, 255, 0.78);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
}
.control-tab .tab-title {
  font-weight: 600;
  font-size: 15px;
}
.control-tab .tab-description {
  font-size: 13px;
  opacity: 0.75;
}
.control-tab.is-active {
  border-color: rgba(244, 184, 96, 0.65);
  background: rgba(244, 184, 96, 0.15);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(244, 184, 96, 0.2);
}
.control-tab:focus-visible {
  outline: 2px solid rgba(244, 184, 96, 0.85);
  outline-offset: 4px;
}
.tab-panels {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.tab-panel {
  display: none;
  flex: 1;
  min-height: 0;
}
.tab-panel.is-active {
  display: block;
}
.tab-panel[hidden] {
  display: none !important;
}
.panel-heading-tools .bulk-action-group {
  margin-left: auto;
  justify-content: flex-end;
  gap: 8px;
}
.teams-panel .panel-body {
  padding-top: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 12px;
}
.teams-panel .panel-header {
  padding-bottom: 6px;
}
.starter-team-panel {
  border-radius: calc(var(--radius) * 0.65);
  border: 1px solid rgba(120, 149, 188, 0.35);
  background: linear-gradient(
      140deg,
      rgba(9, 12, 20, 0.92),
      rgba(17, 23, 38, 0.88)
    ),
    radial-gradient(circle at top right, rgba(244, 184, 96, 0.12), transparent 55%);
  box-shadow: 0 22px 60px rgba(2, 6, 18, 0.65);
  overflow: visible;
  position: relative;
}
.starter-team-panel .panel-header {
  padding: 20px 24px 10px;
  border-bottom: 1px solid rgba(244, 184, 96, 0.12);
  backdrop-filter: blur(6px);
}
.starter-team-panel .panel-body {
  padding: 0;
  gap: 0;
  overflow: visible;
  max-width: 100%;
}
.starter-step .starter-team-panel {
  background: transparent;
  border: none;
  box-shadow: none;
}
.starter-step .starter-team-panel::before,
.starter-step .starter-team-panel::after {
  content: none;
}
.starter-step .starter-team-panel .panel-body {
  background: linear-gradient(
      140deg,
      rgba(9, 12, 20, 0.92),
      rgba(17, 23, 38, 0.88)
    ),
    radial-gradient(circle at top right, rgba(244, 184, 96, 0.12), transparent 55%);
  border-radius: calc(var(--radius) * 0.65);
  padding: 0;
}
.starter-team-panel .panel-heading-tools .chip-btn,
.starter-team-panel .panel-heading-tools input,
.starter-team-panel .panel-heading-tools button {
  border-radius: 999px;
  background: rgba(17, 25, 41, 0.85);
  border: 1px solid rgba(244, 184, 96, 0.12);
  color: rgba(236, 240, 255, 0.9);
}
.starter-team-panel .panel-heading-tools .chip-btn.active {
  background: rgba(244, 184, 96, 0.16);
  border-color: rgba(244, 184, 96, 0.5);
  color: var(--text);
}
.starter-team-panel .panel-heading-tools .search-input-wrap {
  border-radius: 999px;
  background: rgba(9, 14, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.starter-team-panel .panel-heading-tools #search {
  border: none;
  background: transparent;
}
.starter-team-panel .table-wrap {
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  max-height: 540px;
  overflow: auto;
  overflow-x: auto;
  padding: 0;
  margin: 0;
  width: 100%;
}
.starter-team-panel .team-table {
  min-width: 100%;
  width: max-content;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0;
  table-layout: auto;
}
.starter-team-panel .team-table thead th {
  background: rgba(244, 184, 96, 0.08);
  backdrop-filter: blur(2px);
  position: sticky;
  top: 0;
  z-index: 1;
}
.starter-team-panel .team-table td,
.starter-team-panel .team-table th {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.starter-team-panel .team-table input {
  background: rgba(14, 18, 30, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.starter-team-panel .badge-set,
.starter-team-panel .badge-clear,
.starter-team-panel .desc-set {
  border-radius: 10px;
  border: 1px solid rgba(244, 184, 96, 0.3);
  background: rgba(244, 184, 96, 0.15);
  color: var(--text);
  padding: 4px 10px;
}
.starter-team-panel .badge-clear {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}
.setup-body {
  flex: 1;
  overflow: auto;
  padding: 0;
  margin: 0;
  gap: 10px;
  width: 100%;
  align-self: stretch;
  max-width: none;
}
.setup-mode-panels {
  width: 100%;
}
.setup-mode-panel {
  width: 100%;
}
.panel-grid {\n  display: flex;\n  flex-direction: column;\n  gap: 18px;\n  min-height: 0;\n}\n\n.setup-mode-panel .panel,
.setup-mode-panel .mode-subpanel,
.setup-mode-panel .starter-step,
.setup-mode-panel .starter-flow,
.setup-mode-panel .starter-team-panel {
  width: 100%;
}

/* ------------------------
   Setup wizard shell
   ------------------------ */
.wizard-header {
  width: 100%;
  padding: 24px;
  border-radius: calc(var(--radius) * 1.05);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.wizard-header__info {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 16px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.wizard-header__eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(228, 237, 255, 0.6);
}
.wizard-header__title {
  margin: 0;
  font-size: 1em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 184, 96, 0.92);
}
.wizard-header__progress {
  margin: 0;
  color: rgba(228, 237, 255, 0.85);
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}
.wizard-header__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.wizard-step {
  border-radius: calc(var(--radius) * 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 20, 32, 0.75);
  padding: 12px 14px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(235, 240, 255, 0.82);
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
}
.wizard-step__number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.08);
}
.wizard-step__label {
  font-size: 13px;
  line-height: 1.3;
}
.wizard-step--active {
  border-color: rgba(244, 184, 96, 0.65);
  background: rgba(244, 184, 96, 0.12);
  box-shadow: 0 8px 24px rgba(244, 184, 96, 0.2);
  color: var(--text);
}
.wizard-step--active .wizard-step__number {
  background: var(--accent);
  color: #041018;
}
.wizard-step--complete {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.12);
  color: #d5ffe5;
}
.wizard-step--complete .wizard-step__number {
  background: #22c55e;
  color: #041018;
}
.wizard-step--pending {
  opacity: 0.65;
}
.wizard-header__step-panels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wizard-header__auto-fetch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: calc(var(--radius) * 0.65);
  border: 1px solid rgba(244, 184, 96, 0.25);
  background: linear-gradient(
    135deg,
    rgba(10, 16, 28, 0.88),
    rgba(18, 26, 42, 0.82)
  );
  box-shadow: var(--shadow-soft);
  color: rgba(235, 240, 255, 0.86);
  overflow: hidden;
}
.wizard-header__auto-fetch::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--progress, 0%);
  background: linear-gradient(
    90deg,
    rgba(244, 184, 96, 0.14),
    rgba(255, 156, 77, 0.25)
  );
  opacity: 0.9;
  pointer-events: none;
}
.wizard-header__auto-fetch::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    rgba(244, 184, 96, 0.18),
    transparent 55%
  );
  opacity: 0.6;
  pointer-events: none;
}
.wizard-header__auto-fetch.is-waiting {
  border-color: rgba(122, 148, 186, 0.35);
}
.auto-fetch-status__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f4b860;
  box-shadow: 0 0 10px rgba(244, 184, 96, 0.55);
  position: relative;
  z-index: 1;
  animation: autoFetchPulse 1.6s ease-in-out infinite;
}
.wizard-header__auto-fetch.is-waiting .auto-fetch-status__dot {
  background: rgba(174, 196, 235, 0.75);
  box-shadow: 0 0 10px rgba(174, 196, 235, 0.45);
}
.auto-fetch-status__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}
.auto-fetch-status__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(244, 184, 96, 0.95);
}
.wizard-header__auto-fetch.is-waiting .auto-fetch-status__label {
  color: rgba(198, 214, 244, 0.9);
}
.auto-fetch-status__detail {
  font-size: 12px;
  color: rgba(228, 237, 255, 0.78);
}
.auto-fetch-status__hint {
  margin-left: auto;
  font-size: 11px;
  color: rgba(228, 237, 255, 0.6);
  position: relative;
  z-index: 1;
}
@keyframes autoFetchPulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  60% {
    transform: scale(1.25);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.75;
  }
}
@media (max-width: 820px) {
  .wizard-header__auto-fetch {
    flex-wrap: wrap;
  }
  .auto-fetch-status__hint {
    margin-left: 0;
    width: 100%;
  }
}
.wizard-header__step-panel {
  border-radius: calc(var(--radius) * 0.85);
  border: none;
  background: linear-gradient(
    145deg,
    rgba(6, 11, 20, 0.7),
    rgba(14, 20, 32, 0.78)
  );
  padding: 0;
  box-shadow: 0 12px 32px rgba(3, 8, 18, 0.35);
  backdrop-filter: blur(10px);
}
.wizard-header__step-panel.starter-step-panel-full {
  padding: 0;
}
.wizard-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.wizard-header__actions .btn {
  flex: 1 1 150px;
}
.wizard-header__status {
  display: none;
}
.wizard-status-chip {
  display: none;
}
.starter-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(13, 18, 30, 0.9);
  border-radius: calc(var(--radius) * 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 20px;
}
.starter-step .step-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.step-number {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(244, 184, 96, 0.2);
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.starter-step .step-heading h4 {
  margin: 0;
  font-size: 17px;
  color: var(--text);
}
.starter-step .step-heading p,
.starter-step .field-help {
  margin: 4px 0 0;
  color: rgba(228, 237, 255, 0.75);
  font-size: 14px;
  line-height: 1.4;
}
.starter-step--panel {
  padding: 0;
  border: none;
  background: transparent;
}

.paste-table__input {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.paste-table__input textarea {
  width: 100%;
}

.paste-table__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.paste-table__empty {
  text-align: center;
  padding: 16px;
  color: var(--text-soft);
}

.form-hint--error {
  color: var(--danger);
}

.paste-team-table td.cell-error input {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
}

.paste-team-table tr.row-error {
  outline: 1px solid rgba(248, 113, 113, 0.35);
  outline-offset: -2px;
}

.paste-team-table th.row-action-col,
.paste-team-table td.row-action-col {
  width: 44px;
  min-width: 44px;
  text-align: center;
  padding: 0 4px;
}

.paste-team-table .icon-btn {
  width: 28px;
  height: 28px;
  padding: 4px;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.paste-team-table .icon-btn svg {
  width: 16px;
  height: 16px;
}

.subpanel-header {
  padding: 6px 8px 4px;
}


.mode-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.mode-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--radius) * 0.8);
  padding: 18px;
  background: rgba(12, 17, 28, 0.9);
  text-align: left;
  color: rgba(230, 236, 255, 0.82);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
}
.mode-card:focus-visible {
  outline: 2px solid rgba(244, 184, 96, 0.85);
  outline-offset: 4px;
}
.mode-card .mode-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(228, 237, 255, 0.6);
}
.mode-card .mode-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.mode-card .mode-copy {
  margin: 0;
  font-size: 14px;
  color: rgba(228, 237, 255, 0.75);
}
.mode-card .mode-points {
  margin: 0;
  padding-left: 18px;
  color: rgba(228, 237, 255, 0.7);
  font-size: 13px;
  line-height: 1.4;
}
.mode-card.is-active {
  border-color: rgba(244, 184, 96, 0.65);
  background: rgba(244, 184, 96, 0.15);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(244, 184, 96, 0.25);
}
.mode-card.is-active .mode-eyebrow {
  color: var(--accent);
}

/* ------------------------
   Teams panel compact controls
   ------------------------ */
.teams-panel .filter-group {
  gap: 6px;
}
.teams-panel .filter-group .chip-btn {
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.teams-panel .bulk-action-group {
  gap: 6px;
  align-items: center;
}
/* Ensure action chips match filter chip height without altering filter chips */
.teams-panel .bulk-action-group .chip-btn {
  padding: 7px 16px;
  font-size: 13px;
  white-space: nowrap;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.teams-panel .panel-header .panel-heading-tools {
  gap: 10px;
  flex-wrap: nowrap;
}
.teams-panel .panel-header .filter-group,
.teams-panel .panel-header .bulk-action-group {
  flex: 0 1 auto;
}


/* Setup & Import spacing adjustments */
.setup-body .form-group {
  margin-bottom: 8px;
}
.setup-body .form-divider {
  margin: 4px 0 0;
}

/* Accordion bodies */
.acc-body[hidden] {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
.acc-body {
  transition: max-height 0.24s ease, opacity 0.2s ease;
}
.acc-body.open {
  max-height: 1200px;
  opacity: 1;
}
.acc-toggle {
  cursor: pointer;
}

/* Toggle row for display options */
.toggle-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Allow wrapping on smaller windows */
@media (max-width: 1024px) {
  .teams-panel .panel-header .panel-heading-tools {
    flex-wrap: wrap;
  }
}
.setup-body .form-group {
  margin-bottom: 12px;
  background: rgba(14, 20, 34, 0.65);
  border: 1px solid rgba(109, 130, 170, 0.22);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 14px 26px rgba(6, 9, 16, 0.32);
}
.setup-body .form-group .field-label {
  color: rgba(236, 240, 255, 0.7);
}
.setup-body .form-divider {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(244, 184, 96, 0.25),
    transparent
  );
}
.table-wrap {
  margin-top: 4px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(109, 130, 170, 0.24);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(13, 19, 32, 0.9),
    rgba(8, 10, 18, 0.92)
  );
  box-shadow: inset 0 1px 0 rgba(244, 184, 96, 0.12),
    0 20px 32px rgba(6, 8, 15, 0.55);
}
.table-wrap.tall {
  overflow-x: auto;
}
input,
button,
select,
textarea {
  background: rgba(15, 22, 36, 0.78);
  border: 1px solid rgba(126, 152, 188, 0.28);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease;
}
input::placeholder,
textarea::placeholder {
  color: rgba(215, 224, 245, 0.45);
  letter-spacing: 0.02em;
}
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(244, 184, 96, 0.45);
  box-shadow: 0 0 0 3px rgba(244, 184, 96, 0.18);
  background: rgba(18, 26, 42, 0.92);
}
button {
  cursor: pointer;
}
.chip-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  background: rgba(20, 29, 47, 0.7);
  color: rgba(235, 239, 252, 0.78);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.16s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip-btn:hover {
  background: rgba(28, 40, 64, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(9, 12, 22, 0.32);
}
.chip-btn:focus-visible {
  outline: 2px solid rgba(244, 184, 96, 0.85);
  outline-offset: 4px;
}
.chip-btn.active {
  background: var(--gradient-gold);
  color: #1b1204;
  box-shadow: 0 16px 28px rgba(244, 184, 96, 0.4);
}
.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(12, 16, 28, 0.7);
  font-size: 12px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.74);
}
.ann-custom-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}
.ann-input {
  width: 100%;
}
.chip-btn.active .chip-count {
  background: rgba(17, 11, 4, 0.18);
  color: #1b1204;
  font-weight: 700;
}
.pill {
  background: rgba(16, 25, 40, 0.75);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(235, 238, 251, 0.75);
  box-shadow: inset 0 0 0 1px rgba(109, 130, 170, 0.25);
}
.muted {
  color: var(--muted);
}
.grid {
  display: grid;
  gap: 12px;
}

@media (max-width: 1080px) {
  .panel-heading-tools {
    align-items: flex-start;
  }
  .filter-group,
  .bulk-action-group {
    justify-content: flex-start;
  }
}
@media (max-width: 980px) {
  .control-layout.expanded {
    grid-template-columns: 1fr;
  }
}

.title-input {
  font-size: 20px;
  font-weight: 800;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(
    140deg,
    rgba(25, 34, 56, 0.95),
    rgba(17, 25, 41, 0.88)
  );
  border: 1px solid rgba(244, 184, 96, 0.28);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 44px;
}
.team-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  min-width: 100%;
}
.team-table thead {
  background-image: linear-gradient(
    135deg,
    rgba(23, 32, 53, 0.92),
    rgba(17, 24, 38, 0.88)
  ),
    url("../img/glass-overlay.png");
  background-size: auto, 140px 140px;
  background-repeat: no-repeat, repeat;
  background-blend-mode: normal, screen;
  box-shadow: 0 12px 24px rgba(6, 9, 17, 0.45);
}
.team-table th,
.team-table td {
  padding: 9px 14px; /* compact: reduce vertical padding by ~25% */
  border-bottom: 1px solid rgba(38, 52, 82, 0.45);
  font-size: 14px;
  line-height: 1.4;
  vertical-align: middle;
}
.team-table .column-hidden {
  display: none;
}
.team-table th {
  position: sticky;
  top: 0;
  background-image: linear-gradient(
    135deg,
    rgba(24, 33, 54, 0.95),
    rgba(17, 24, 38, 0.92)
  ),
    url("../img/glass-overlay.png");
  background-size: auto, 140px 140px;
  background-repeat: no-repeat, repeat;
  background-blend-mode: normal, screen;
  z-index: 2;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.6);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(224, 230, 246, 0.7);
  border-bottom: 1px solid rgba(244, 184, 96, 0.28);
}
.team-table td {
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
  color: rgba(230, 236, 250, 0.86);
}
.team-table .column-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.team-table .column-help {
  appearance: none;
  border: 1px solid rgba(244, 184, 96, 0.4);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  line-height: 1;
  color: rgba(244, 184, 96, 0.9);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}
.team-table .column-help:hover,
.team-table .column-help:focus {
  background: rgba(244, 184, 96, 0.15);
  outline: none;
}
.team-table .column-help::after {
  content: attr(data-help);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: block;
  background: rgba(6, 11, 20, 0.95);
  color: rgba(244, 244, 255, 0.95);
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 0;
  border-radius: 8px;
  border: 0 solid rgba(244, 184, 96, 0.35);
  width: 0;
  max-width: 0;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 999;
  overflow: hidden;
}
.team-table .column-help::before {
  content: "";
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 0;
  border-style: solid;
  border-color: transparent;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.team-table .column-help:hover::after,
.team-table .column-help:focus::after,
.team-table .column-help:hover::before,
.team-table .column-help:focus::before {
  opacity: 1;
}
.team-table .column-help:hover::after,
.team-table .column-help:focus::after {
  width: max-content;
  max-width: min(360px, 90vw);
  padding: 6px 10px;
  border-width: 1px;
  pointer-events: auto;
}
.team-table .column-help:hover::before,
.team-table .column-help:focus::before {
  border-width: 5px;
  border-color: transparent transparent rgba(244, 184, 96, 0.35) transparent;
}

/* Use JS tooltips so they aren't clipped by scroll containers (e.g. `.table-wrap`). */
.js-tooltips .team-table .column-help::after,
.js-tooltips .team-table .column-help::before {
  display: none;
}

.column-help-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5000;
  max-width: min(360px, 90vw);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(244, 184, 96, 0.35);
  background: rgba(6, 11, 20, 0.95);
  color: rgba(244, 244, 255, 0.95);
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 18px 36px rgba(2, 6, 14, 0.58);
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.column-help-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.column-help-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent rgba(244, 184, 96, 0.35) transparent;
}
.column-help-tooltip.is-flipped::before {
  top: auto;
  bottom: -6px;
  border-color: rgba(244, 184, 96, 0.35) transparent transparent transparent;
}
/* Prevent wrapping for team name and row buttons without changing table layout */
.team-table td.name-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.team-table tbody button {
  white-space: nowrap;
}
.team-table th.select-col,
.team-table td.select-col {
  width: 42px;
  text-align: center;
}
.team-table th.badge-col,
.team-table td.badge-col {
  width: 120px;
}
.team-table th.score-col,
.team-table td.score-col {
  width: 78px;
}
.team-table th.autos-col,
.team-table td.autos-col {
  width: 78px;
}
.team-table th.case-col,
.team-table td.case-col {
  width: 92px;
  white-space: nowrap;
}
.team-table th.desc-col,
.team-table td.desc-col {
  width: 128px;
}
.team-table th.sold-col,
.team-table td.sold-col {
  width: 68px;
  text-align: center;
}
.team-table td.name-cell {
  font-weight: 600;
  max-width: 280px;
}
.team-table td.badge-col {
  text-align: right;
}
.team-table td.desc-col {
  text-align: left;
}
.team-table input[type="number"] {
  width: 60px;
  padding: 6px 8px;
  font-size: 14px;
  text-align: center;
}
.team-table td[data-column="score"],
.team-table td[data-column="autos"],
.team-table td[data-column="star"],
.team-table td[data-column="rookie"],
.team-table td[data-column="popularity"],
.team-table td[data-column="caseHits"],
.team-table td[data-column="patches"],
.team-table td[data-column="players"],
.team-table td[data-column="types"] {
  text-align: center;
}
.team-table td[data-column="score"] input,
.team-table td[data-column="autos"] input,
.team-table td[data-column="star"] input,
.team-table td[data-column="rookie"] input,
.team-table td[data-column="popularity"] input,
.team-table td[data-column="caseHits"] input,
.team-table td[data-column="patches"] input,
.team-table td[data-column="players"] input,
.team-table td[data-column="types"] input {
  display: block;
  margin: 0 auto;
}
.team-table td[data-column="tagline"],
.team-table td[data-column="rookieText"] {
  text-align: center;
}
.team-table td[data-column="tagline"] input,
.team-table td[data-column="rookieText"] input {
  display: block;
  margin: 0 auto;
  text-align: center;
}
/* Center header text for table columns */
.team-table thead th {
  text-align: center;
}
.team-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.team-table .badge-cell {
  white-space: nowrap;
  text-align: right;
  font-size: 12px;
}
.team-table .desc-cell {
  white-space: normal;
  text-align: left;
  font-size: 12px;
}
.cell-actions button {
  background: rgba(20, 28, 46, 0.8);
  color: var(--text);
  border: 1px solid rgba(114, 137, 178, 0.35);
  border-radius: 9px;
  padding: 2px 6px; /* compact */
  font-size: 11px;
  margin-left: 4px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease,
    transform 0.16s ease;
}
.cell-actions button:hover {
  background: rgba(28, 38, 60, 0.95);
  border-color: rgba(244, 184, 96, 0.38);
  transform: translateY(-1px);
}
.cell-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}
.badge-cell .badge-set,
.badge-cell .badge-clear {
  min-width: 54px;
  height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.badge-cell .badge-set {
  margin-left: 0;
}
.badge-cell .badge-clear {
  margin-left: 6px;
}
.cell-actions .desc-preview {
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
  margin-left: 8px;
  margin-top: 0;
  display: inline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.row-sold {
  opacity: 0.45;
}
.team-table tbody tr {
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.team-table tbody tr:hover {
  background: rgba(27, 38, 60, 0.78);
  box-shadow: 0 14px 26px rgba(7, 10, 18, 0.38);
}
.team-table tbody tr.row-selected {
  background: rgba(32, 46, 72, 0.92);
  box-shadow: inset 0 0 0 1px rgba(244, 184, 96, 0.38),
    0 16px 30px rgba(5, 9, 16, 0.4);
}
.team-table tbody tr.row-selected.row-sold {
  opacity: 0.65;
}
.tier-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.popularity-title {
  display: none;
}
.tier-tile-scroll {
  max-height: 360px;
  overflow-y: auto;
  padding: 2px 2px 4px 0;
}
.tier-count-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.tier-pill {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(16, 24, 38, 0.8);
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}
.tier-pill.is-top {
  border-color: rgba(244, 184, 96, 0.6);
  color: rgba(244, 184, 96, 0.9);
}
.tier-pill.is-mid {
  border-color: rgba(99, 179, 237, 0.5);
  color: rgba(137, 207, 255, 0.9);
}
.tier-pill.is-low {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(228, 237, 255, 0.75);
}
.tier-pill.is-active {
  background: rgba(244, 184, 96, 0.12);
  border-color: rgba(244, 184, 96, 0.8);
}
.attribute-filter {
  display: flex;
  gap: 8px;
  align-items: center;
}
.attribute-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(520px, 100%);
}
.attribute-controls .tier-count-grid {
  justify-content: flex-start;
  flex: 1 1 260px;
}
.attribute-controls .attribute-filter {
  flex: 1 1 240px;
  justify-content: flex-end;
  margin-left: auto;
}
@media (max-width: 720px) {
  .attribute-controls {
    align-items: stretch;
    justify-content: flex-start;
  }
  .attribute-controls .attribute-filter {
    margin-left: 0;
  }
}
.attribute-filter input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(9, 14, 24, 0.85);
  padding: 8px 14px;
  color: rgba(228, 237, 255, 0.9);
}
.attribute-filter input:focus {
  outline: none;
  border-color: rgba(244, 184, 96, 0.6);
}
.attribute-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.attribute-grid-scroll {
  max-height: min(520px, 56vh);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.attribute-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(
    160deg,
    rgba(11, 18, 33, 0.92) 0%,
    rgba(17, 26, 44, 0.82) 100%
  );
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease,
    background 0.14s ease;
}
.attribute-card:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 184, 96, 0.22);
  box-shadow: 0 18px 44px rgba(3, 8, 18, 0.35);
}
.attribute-card__header {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.attribute-card__chip {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(244, 184, 96, 0.4);
  color: rgba(244, 184, 96, 0.85);
  background: rgba(244, 184, 96, 0.1);
  flex: 0 0 auto;
}
.attribute-card__chip.is-top {
  border-color: rgba(244, 184, 96, 0.5);
  color: rgba(244, 184, 96, 0.92);
  background: rgba(244, 184, 96, 0.12);
}
.attribute-card__chip.is-mid {
  border-color: rgba(99, 179, 237, 0.45);
  color: rgba(137, 207, 255, 0.92);
  background: rgba(99, 179, 237, 0.12);
}
.attribute-card__chip.is-low {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(228, 237, 255, 0.78);
  background: rgba(16, 24, 38, 0.55);
}
.attribute-card__name {
  font-weight: 600;
  color: rgba(239, 244, 255, 0.95);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attribute-card__inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.attribute-card__inputs label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(229, 237, 255, 0.78);
  text-align: center;
}
.attribute-card__inputs label > span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(228, 237, 255, 0.7);
  text-align: center;
}
.attribute-card__inputs input {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 18, 30, 0.9);
  color: rgba(239, 244, 255, 0.95);
  padding: 6px 8px;
  text-align: center;
}
.pill-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 14, 24, 0.72);
}
.pill-input:focus-within {
  border-color: rgba(244, 184, 96, 0.5);
  box-shadow: 0 0 0 3px rgba(244, 184, 96, 0.18);
}
.pill-input button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 24, 38, 0.7);
  color: rgba(239, 244, 255, 0.9);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease,
    color 0.12s ease;
}
.pill-input button:active {
  transform: translateY(1px);
}
.pill-input button:focus-visible {
  outline: 3px solid rgba(244, 184, 96, 0.85);
  outline-offset: 2px;
}
.pill-input button:hover {
  border-color: rgba(244, 184, 96, 0.6);
  color: var(--accent);
  background: rgba(244, 184, 96, 0.14);
}
.pill-input input {
  flex: 1;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: rgba(239, 244, 255, 0.95);
}
.tier-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 14px 18px;
  border-radius: calc(var(--radius) * 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 18, 30, 0.85);
}
.tier-legend ol {
  margin: 6px 0 0;
  padding-left: 20px;
  color: rgba(228, 237, 255, 0.75);
  font-size: 13px;
  line-height: 1.4;
}
.tier-legend p {
  margin: 6px 0 0;
  color: rgba(228, 237, 255, 0.78);
  font-size: 13px;
  line-height: 1.45;
}
.tier-tile-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.tier-tile {
  border: 1px solid rgba(109, 130, 170, 0.35);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(12, 18, 30, 0.85);
  appearance: none;
  cursor: pointer;
  width: 100%;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
  outline: none;
}
.tier-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(4, 8, 16, 0.45);
}
.tier-tile:focus-visible {
  box-shadow: 0 0 0 2px rgba(244, 184, 96, 0.5),
    0 16px 30px rgba(4, 8, 16, 0.45);
}
.tier-tile--top {
  border-color: rgba(244, 184, 96, 0.8);
  background: linear-gradient(
      135deg,
      rgba(244, 184, 96, 0.12),
      transparent 70%
    ),
    rgba(14, 18, 30, 0.9);
}
.tier-tile--mid {
  border-color: rgba(99, 179, 237, 0.65);
  background: linear-gradient(
      135deg,
      rgba(99, 179, 237, 0.18),
      transparent 70%
    ),
    rgba(14, 18, 30, 0.9);
}
.tier-tile--low {
  border-color: rgba(255, 255, 255, 0.08);
}
.tier-tile__row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 6px;
}
.tier-tile__chip {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(244, 184, 96, 0.4);
  color: rgba(244, 184, 96, 0.85);
  background: rgba(244, 184, 96, 0.08);
}
.tier-tile--mid .tier-tile__chip {
  border-color: rgba(99, 179, 237, 0.5);
  color: rgba(99, 179, 237, 0.9);
  background: rgba(99, 179, 237, 0.12);
}
.tier-tile--low .tier-tile__chip {
  border-color: rgba(229, 237, 255, 0.3);
  color: rgba(229, 237, 255, 0.8);
  background: rgba(229, 237, 255, 0.08);
}
.tier-tile__name {
  font-weight: 600;
  font-size: 14px;
  color: rgba(239, 244, 255, 0.95);
  width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tier-tile__status {
  font-size: 13px;
  color: rgba(229, 237, 255, 0.78);
  width: 100%;
  word-break: break-word;
}
.team-table tr.row-tier-top {
  background: linear-gradient(
      90deg,
      rgba(244, 184, 96, 0.18),
      transparent 70%
    ),
    rgba(20, 30, 50, 0.9);
  border-left: 3px solid rgba(244, 184, 96, 0.8);
}
.team-table tr.row-tier-mid {
  background: linear-gradient(
      90deg,
      rgba(99, 179, 237, 0.2),
      transparent 70%
    ),
    rgba(16, 24, 38, 0.9);
  border-left: 3px solid rgba(99, 179, 237, 0.7);
}
.team-table tr.row-tier-top:hover,
.team-table tr.row-tier-mid:hover {
  box-shadow: 0 18px 32px rgba(5, 9, 16, 0.45);
}
.right {
  text-align: right;
}
.team-table td.right[data-column="score"],
.team-table td.right[data-column="autos"],
.team-table td.right[data-column="star"],
.team-table td.right[data-column="rookie"],
.team-table td.right[data-column="popularity"],
.team-table td.right[data-column="caseHits"],
.team-table td.right[data-column="patches"],
.team-table td.right[data-column="players"],
.team-table td.right[data-column="types"] {
  text-align: center;
}
.grow {
  flex: 1;
}
.kbd {
  font: 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas;
  background: rgba(15, 22, 36, 0.9);
  border: 1px solid rgba(120, 146, 187, 0.35);
  padding: 2px 6px;
  border-radius: 6px;
  color: rgba(235, 240, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(244, 184, 96, 0.12);
}
@media (max-width: 1280px) {
  .container {
    height: auto;
    overflow: visible;
  }
  body {
    overflow: auto;
  }
  .control-wrap {
    height: auto;
  }
  .control-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .primary-actions {
    justify-content: flex-start;
  }
  .overview-grid {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
}
@media (max-width: 820px) {
  .container {
    padding: 20px 18px;
    height: auto;
  }
  .title-input {
    font-size: 20px;
  }
  .metric {
    height: 44px;
    padding: 0 14px;
  }
  .panel-header,
  .panel-body {
    padding-left: 10px;
    padding-right: 10px;
  }
  .overview-panel {
    padding: 24px;
  }
  .nav-inner {
    flex-direction: column;
    height: auto;
    gap: 16px;
    padding: 12px 20px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .nav-cta {
    flex-wrap: wrap;
    justify-content: center;
  }
}
@media (max-width: 600px) {
  .primary-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .primary-actions .btn {
    width: 100%;
  }
  .input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .button-row {
    width: 100%;
  }
  .button-row .btn {
    flex: 1;
  }
}

.btn.text {
  background: transparent;
  border: none;
  color: var(--accent);
  font-weight: 600;
  padding: 0 8px;
  min-height: 0;
  line-height: 1.3;
}
.btn.text:hover {
  text-decoration: underline;
}

/* Auth overlay */
.auth-status {
  position: fixed !important;
  top: 15px !important;
  left: 15px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  width: 120px !important;
  font-size: 13px;
  color: inherit;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: none;
  pointer-events: none;
  z-index: 9999;
}
.auth-status.hidden {
  display: none !important;
}
.auth-status .auth-user {
  display: none;
}
.auth-status .auth-logout {
  width: 100% !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  text-align: left !important;
  pointer-events: auto !important;
  border: 1px solid rgba(244, 184, 96, 0.24) !important;
  box-shadow: var(--shadow-soft);
  background: linear-gradient(
    135deg,
    rgba(28, 39, 68, 0.95),
    rgba(16, 24, 40, 0.9)
  ) !important;
  color: var(--text) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, box-shadow 0.18s ease,
    border-color 0.18s ease, background 0.18s ease !important;
}
.auth-status .auth-logout:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 184, 96, 0.4) !important;
  box-shadow: 0 12px 24px rgba(9, 12, 22, 0.4);
}

.auth-gate {
  position: fixed !important;
  inset: 0 !important;
  min-height: 100vh;
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 15, 0.82);
  backdrop-filter: blur(10px);
  z-index: 10000;
}
.auth-gate.hidden {
  display: none !important;
}
body.auth-transitioning .auth-gate {
  display: none !important;
}
.auth-gate-card {
  background: rgba(16, 24, 40, 0.98);
  border: 1px solid rgba(244, 184, 96, 0.4);
  border-radius: 18px;
  padding: 24px 26px;
  width: min(92vw, 440px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  color: var(--text);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-gate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-gate-close {
  appearance: none;
  border: 1px solid rgba(244, 184, 96, 0.28);
  background: rgba(12, 18, 30, 0.85);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease, background 0.18s ease;
}
.auth-gate-close:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 184, 96, 0.5);
  box-shadow: 0 12px 24px rgba(9, 12, 22, 0.4);
}
.auth-gate-close:focus-visible {
  outline: 2px solid rgba(244, 184, 96, 0.75);
  outline-offset: 2px;
}
.auth-gate-card h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}
.auth-gate-card p {
  margin: 0 0 6px;
  font-size: 13px;
  color: rgba(230, 234, 246, 0.7);
  line-height: 1.5;
}
.auth-gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-gate-actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}
.auth-gate-actions .btn {
  justify-content: center;
  flex: 1;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 4, 12, 0.6);
  z-index: 11001;
}
.auth-modal-card {
  background: rgba(16, 24, 40, 0.98);
  border: 1px solid rgba(244, 184, 96, 0.4);
  border-radius: 18px;
  padding: 20px 24px;
  width: min(92vw, 420px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-modal-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}
.auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-modal-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: rgba(230, 234, 246, 0.7);
}
.auth-modal-input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(244, 184, 96, 0.35);
  background: rgba(12, 18, 30, 0.8);
  color: #eef3ff;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.auth-modal-input::placeholder {
  color: rgba(230, 234, 246, 0.5);
}
.auth-modal-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(244, 184, 96, 0.18);
  border-color: rgba(244, 184, 96, 0.55);
}
.auth-modal-error {
  min-height: 14px;
  margin: 0;
  font-size: 12px;
  color: #f87171;
}
.auth-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.auth-modal-actions .btn {
  justify-content: center;
}

@media (max-width: 520px) {
  .auth-gate-actions {
    flex-direction: column;
  }
  .auth-modal-actions {
    flex-direction: column;
  }
}

/* Blur/dim content when auth is required */
body.requires-auth #controlView {
  filter: blur(4px);
  opacity: 0.3;
  pointer-events: none;
  user-select: none;
}
body.requires-auth .auth-status {
  display: none !important;
}

/* Ensure auth modal sits above the gate */
#authModal {
  z-index: 11001 !important;
}
#controlView {
  overflow: hidden;
  height: 100%;
  margin-top: 0 !important;
  padding-top: 0 !important;
  display: flex;
  flex-direction: column;
}

/* Segmented toggle for score mode */
.seg-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  border: 1px solid rgba(244, 184, 96, 0.6);
  background: rgba(16, 24, 38, 0.78);
  box-shadow: inset 0 0 0 1px rgba(122, 148, 186, 0.18);
}
.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  height: 100%;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.seg-btn:hover {
  background: rgba(244, 184, 96, 0.12);
}
.seg-btn.active {
  background: var(--gradient-gold);
  border-left: 1px solid rgba(244, 184, 96, 0.6);
  border-right: 1px solid rgba(244, 184, 96, 0.6);
  color: #1b1204;
  box-shadow: 0 16px 30px rgba(244, 184, 96, 0.35);
}
.seg-btn:first-child.active {
  border-left: 0;
}
.seg-btn:last-child.active {
  border-right: 0;
}
/* Constrain the score toggle metric to align with 44px search input */
#scoreModeMetric .metric-content {
  height: 44px;
}
#scoreModeMetric {
  padding: 0;
}
#scoreModeMetric .metric-content {
  gap: 0;
  padding: 0;
}
#scoreModeToggle {
  width: 100%;
}
#scoreModeMetric .seg-toggle {
  width: 100%;
}
#scoreModeMetric .seg-btn {
  flex: 1;
}

/* Score input read-only visuals */
.score-input[readonly] {
  pointer-events: none;
  opacity: 0.7;
  cursor: default;
  background: rgba(16, 24, 38, 0.4);
}
.icon-grid {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-image: linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-size: 6px 6px;
  background-repeat: no-repeat;
  background-position: 0 0, 10px 0, 0 10px, 10px 10px;
  border-radius: 2px;
}
.session-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.session-actions__group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  .session-actions__group {
    grid-template-columns: 1fr;
  }
}
.session-actions__group .btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}
.session-actions__group #openDisplay {
  grid-column: 1 / -1;
}
.management-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px 24px 26px;
}
.management-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
}
.management-panel .panel-header {
  align-items: flex-start;
}
.management-panel .panel-header .metrics-grid {
  flex: 1 1 420px;
  max-width: 560px;
}
@media (min-width: 980px) {
  .management-panel .panel-header .metrics-grid {
    grid-template-columns: 1fr 1.33fr;
  }
}
.management-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.management-column-heading {
  padding: 6px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.management-column-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(228, 237, 255, 0.6);
  font-weight: 600;
}
.management-column-help {
  margin: 0;
  color: rgba(228, 237, 255, 0.75);
  font-size: 13px;
  line-height: 1.4;
}
@media (max-width: 1200px) {
  .management-columns {
    grid-template-columns: 1fr;
  }
  .management-column--actions {
    order: -1;
  }
}
.management-card {
  background: rgba(13, 18, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--radius) * 0.8);
  padding: 18px 12px;
  box-shadow: 0 18px 44px rgba(3, 8, 18, 0.35);
}
.management-card .subpanel-header {
  margin-bottom: 14px;
}
.management-card.metrics-card {
  padding: 16px 12px;
}
.management-card.metrics-card .metric {
  height: auto;
  min-height: 72px;
  padding: 12px 16px;
}
.live-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.management-actions-stack .live-status-chips {
  margin-top: 0;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(16, 24, 38, 0.68);
  border: 1px solid rgba(116, 136, 179, 0.35);
  color: var(--text);
  letter-spacing: 0.02em;
}
.status-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(109, 142, 255, 0.9);
  box-shadow: 0 0 6px rgba(109, 142, 255, 0.5);
}
.status-chip.is-live::before {
  background: var(--ok);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}
.status-chip.is-paused::before {
  background: var(--warn);
  box-shadow: 0 0 6px rgba(250, 204, 33, 0.5);
}
.management-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.management-actions-stack .save-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.management-actions-stack .save-toolbar .btn {
  flex: 1 1 160px;
  justify-content: center;
}
.management-card.management-actions-card .save-toolbar--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.management-card.management-actions-card .save-toolbar--grid .btn {
  width: 100%;
}
@media (max-width: 560px) {
  .management-card.management-actions-card .save-toolbar--grid {
    grid-template-columns: 1fr;
  }
}
.management-actions-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.management-actions-meta .btn {
  flex: 1 1 180px;
  justify-content: center;
}
.autosave-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.02em;
  background: rgba(22, 30, 44, 0.8);
  border: 1px solid rgba(244, 184, 96, 0.25);
  color: var(--text);
}
.autosave-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}
.autosave-pill.is-stale::before {
  background: var(--warn);
  box-shadow: 0 0 6px rgba(250, 204, 33, 0.6);
}
.autosave-pill.small {
  font-size: 11px;
  padding: 4px 10px;
}

.management-panel .subpanel-header {
  padding-top: 1px;
  padding-bottom: 1px;
}
.management-panel .subpanel-header h3,
.management-panel .subpanel-header h4 {
  margin: 0;
}
.management-panel .subpanel-header .subpanel-copy {
  margin: 4px 0 0;
}

.management-panel .management-column-heading {
  padding-top: 1px;
  padding-bottom: 0;
}

.management-column--actions section[data-management-accordion-item] > .subpanel-header {
  margin-bottom: 0;
  padding-left: 0;
  padding-right: 0;
}
.management-column--actions [data-management-accordion-toggle] {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.management-column--actions [data-management-accordion-toggle]::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-left: auto;
  margin-top: 4px;
  border-right: 2px solid rgba(228, 237, 255, 0.55);
  border-bottom: 2px solid rgba(228, 237, 255, 0.55);
  transform: rotate(45deg);
  transition: transform 0.18s ease, opacity 0.18s ease;
  opacity: 0.85;
  flex: 0 0 auto;
}
.management-column--actions section.is-collapsed > [data-management-accordion-toggle]::after {
  transform: rotate(-45deg);
}
.management-column--actions [data-management-accordion-toggle]:focus-visible {
  outline: 3px solid rgba(244, 184, 96, 0.85);
  outline-offset: 3px;
  border-radius: 12px;
}
.management-column--actions .management-accordion-body {
  margin-top: 14px;
}

/* Display card layout */
.display-card .display-subpanel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.display-card .display-subpanel-header > div:first-child {
  flex: 1 1 220px;
  min-width: 220px;
}
.display-card .display-subpanel-header .toggle-row {
  flex: 1 1 280px;
  justify-content: flex-start;
  align-items: center;
  margin-left: 0;
}
.display-card .display-subpanel-divider {
  margin: 0;
}
.display-card .ann-custom-controls {
  max-width: 520px;
  padding: 0 8px 4px;
}
.display-card .announce-btn[data-ann-id="b4"] {
  max-width: 240px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .display-card .display-subpanel-header > div:first-child {
    min-width: 0;
  }
  .display-card .display-subpanel-header .toggle-row {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  .display-card .announce-btn[data-ann-id="b4"] {
    max-width: 100%;
  }
}

.management-card.team-status-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.team-status-card .team-status-grid {
  overflow: auto;
  max-height: clamp(280px, 56vh, 780px);
  padding-right: 4px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.team-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  .team-status-grid {
    grid-template-columns: 1fr;
  }
}
.team-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 26, 0.65);
  color: rgba(236, 240, 255, 0.9);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease,
    background 0.14s ease;
}
.team-status-item:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 184, 96, 0.28);
  box-shadow: 0 14px 30px rgba(3, 8, 18, 0.35);
  background: rgba(14, 20, 32, 0.75);
}
.team-status-item:focus-visible {
  outline: 3px solid rgba(244, 184, 96, 0.85);
  outline-offset: 3px;
}
.team-status-item .team-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(245, 247, 251, 0.92);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.team-status-item .team-name.team-name--badge {
  display: flex;
  align-items: center;
  -webkit-line-clamp: initial;
  -webkit-box-orient: initial;
}
.team-status-item .team-name .team-badge {
  height: 2em;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.team-status-item .team-state {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(16, 24, 38, 0.75);
  border: 1px solid rgba(122, 148, 186, 0.22);
  color: rgba(235, 240, 255, 0.78);
}
.team-status-item.is-available {
  border-color: rgba(74, 222, 128, 0.18);
}
.team-status-item.is-available .team-state {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(74, 222, 128, 0.1);
  color: rgba(213, 255, 229, 0.95);
}
.team-status-item.is-sold {
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(32, 12, 18, 0.55);
  opacity: 0.82;
}
.team-status-item.is-sold .team-state {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.12);
  color: rgba(254, 226, 226, 0.95);
}
