:root {
  --beach-bg: url("img/2025/Storbild beach.jpg");
  --beach-bg-mobile: url("img/2025/mobil beach.jpg");
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.35);
  --shadow-xl: 0 25px 65px rgba(15, 23, 42, 0.35);
  --accent-blue: #1d4ed8;
  --accent-gold: #fbbf24;
  --text-dark: #111827;
  --text-muted: #e2e8f0;
  font-family: "Helvetica Neue", "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background-color: #020617;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: inherit;
  color: var(--text-dark);
}

body.beach-shell {
  position: relative;
  background-image: var(--beach-bg);
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 3.5rem);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1600px, 96%);
  max-width: 96vw;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 32px;
  padding: clamp(1.25rem, 2.5vw, 2.75rem);
  box-shadow: 0 15px 45px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(20px);
}

.brand-logo {
  position: fixed;
  top: clamp(1rem, 2vw, 1.75rem);
  left: clamp(1rem, 3vw, 2.5rem);
  width: clamp(120px, 12vw, 180px);
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.45));
}

@media (max-width: 768px) {
  body.beach-shell {
    background-image: var(--beach-bg-mobile);
    padding: 1rem;
  }

  .app-shell {
    border-radius: 20px;
    padding: 1rem;
  }
}

header {
  text-align: left;
  margin-bottom: clamp(1rem, 2vw, 2rem);
  color: #000;
  text-shadow: none;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 0.75rem;
}

header h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 2.95rem);
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  opacity: 0.9;
}

main {
  display: block;
}

.layout-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(380px, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}

/* When tournament panel is active, hide the primary column and center the tournament panel */
.layout-two-col:has(#tournament-panel:not(.hidden)) {
  display: flex;
  justify-content: center;
}

.layout-two-col:has(#tournament-panel:not(.hidden)) .layout-column.primary {
  display: none;
}

.layout-two-col:has(#tournament-panel:not(.hidden)) .layout-column.secondary {
  width: auto;
  max-width: 100%;
}

/* Tournament panel should size to content */
#tournament-panel {
  width: fit-content;
  max-width: 100%;
}

.layout-column {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.layout-column.secondary {
  position: relative;
}

@media (max-width: 1280px) {
  .layout-two-col {
    grid-template-columns: 1fr;
  }
}

.card {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  padding: clamp(1rem, 2vw, 1.75rem);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(14px);
}

.card-header h2 {
  margin: 0;
  font-size: 1.3rem;
  position: relative;
  padding-left: 1.2rem;
}

.card-header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-gold), #fdba74);
}

button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.4);
}

button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

button.secondary {
  background: linear-gradient(135deg, #475569, #1f2937);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.3);
}

button.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.35);
}

button.placeholder {
  background: transparent;
  color: #475569;
  border: 2px dashed rgba(71, 85, 105, 0.5);
  box-shadow: none;
}

#roster-table th:first-child,
#roster-table td:first-child {
  width: auto;
  min-width: 2.5rem;
  text-align: center;
}

header,
footer {
  text-align: center;
  margin-bottom: 1.5rem;
}

.subtitle {
  color: #6b7280;
  margin-top: 0.25rem;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 15px 25px -5px rgba(15, 23, 42, 0.15);
}

.subcard {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.3);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.button-group .action-btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

/* Collapsible sections for tournament management */
.collapsible-section {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 0;
  margin-bottom: 1rem;
  border: 1px solid #e5e7eb;
}

.collapsible-section summary {
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
}

.collapsible-section summary::-webkit-details-marker {
  display: none;
}

.collapsible-section summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 0.75rem;
  transition: transform 0.2s ease;
  color: #6b7280;
}

.collapsible-section[open] summary::before {
  transform: rotate(90deg);
}

.collapsible-section summary:hover {
  background-color: #f3f4f6;
}

.collapsible-section .section-content {
  padding: 0 1.25rem 1.25rem 1.25rem;
}

.collapsible-section .section-content .hint {
  margin-top: 0;
  margin-bottom: 1rem;
}
.button-group .action-btn.pause {
  background-color: #f59e0b;
  border-color: #d97706;
}

.button-group .action-btn.unpause {
  background-color: #16a34a;
  border-color: #15803d;
}

.button-group .action-btn.retire {
  background-color: #dc2626;
  border-color: #b91c1c;
}

.button-group .action-btn.unretire {
  background-color: #6366f1;
  border-color: #4f46e5;
}

.player-row.paused {
  background-color: #fff7ed;
}

.player-row.retired {
  background-color: #fee2e2;
  opacity: 0.7;
}

.player-row.done {
  background-color: #dcfce7;
}

button {
  background-color: #2563eb;
  color: #fff;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

button.primary {
  background-color: #16a34a;
  border-color: #15803d;
}

button.secondary {
  background-color: #6b7280;
  border-color: #4b5563;
}

button.danger {
  background-color: #dc2626;
  border-color: #b91c1c;
}

/* Prevent buttons from stretching full width unless in specific contexts */
form button[type="submit"]:not(.full-width) {
  width: fit-content;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

pre {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.85rem;
  min-height: 120px;
}

ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9rem;
  color: #475569;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  padding: 0.45rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
}

input[type="text"],
input[type="file"],
select,
textarea {
  width: 100%;
  max-width: 28rem;
}

input[type="number"] {
  width: 100%;
  max-width: 10rem;
}

input[type="range"] {
  width: 100%;
  max-width: none;
}

.grid.two-col,
.grid.three-col,
.grid.four-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-section {
  border-top: 1px solid #e5e7eb;
  margin-top: 1rem;
  padding-top: 1rem;
}

.form-section:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.form-section h3 {
  margin: 0 0 0.4rem;
}

.form-section .hint {
  margin-top: -0.3rem;
  margin-bottom: 0.4rem;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: #374151;
}

.checkbox-field input {
  width: auto;
}

.weight-grid input:disabled {
  background: #f3f4f6;
  cursor: not-allowed;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  cursor: pointer;
  background: #f3f4f6;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.chip:hover {
  background: #e5e7eb;
}

.chip.selected {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

/* Neutral court chips in settings panel */
#active-courts .chip {
  --chip-color: #e5e7eb;
  background: #f3f4f6;
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#active-courts .chip.selected {
  --chip-color: #3b82f6;
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}

.hidden {
  display: none !important;
}

#create-panel:not(.entry-mode-new) #create-form {
  display: none !important;
}

.toggle-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.file-label {
  border: 1px dashed #94a3b8;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  color: #334155;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.file-label input {
  display: none;
}

.hint {
  color: #6b7280;
  font-size: 0.9rem;
}

.hint.error {
  color: #b91c1c;
}

#tournament-select {
  width: 100%;
  margin: 0.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.6rem 0.5rem;
  text-align: left;
}

th {
  background: rgba(241, 245, 249, 0.8);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Roster table container - no height limit, show full roster */
#roster-table-container {
}

#roster-table thead {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 10;
}

#rounds-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.5rem;
}

/* Better scrollbar styling */
#rounds-list::-webkit-scrollbar {
  width: 8px;
}

#rounds-list::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.1);
  border-radius: 4px;
}

#rounds-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}

#rounds-list::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

.round-card {
  border-radius: 1rem;
  padding: 0.9rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(14, 165, 233, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.12);
}

.round-card h4 {
  margin: 0 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.round-card h4::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #facc15, #f97316);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.8);
}

.round-card ul {
  margin: 0;
  padding-left: 1rem;
  color: #0f172a;
  font-size: 0.92rem;
}

.advanced-panel {
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
}

.advanced-panel summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.advanced-panel fieldset {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.advanced-panel[open] summary {
  margin-bottom: 0.75rem;
}

fieldset:disabled {
  opacity: 0.6;
}

#profiles-panel {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

#profiles-panel.visible {
  display: flex;
}

.profiles-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1rem;
}

.profiles-list {
  border-right: 1px solid #e5e7eb;
  padding-right: 1rem;
  max-height: 520px;
  overflow-y: auto;
}

.profiles-list ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profiles-list li {
  padding: 0.6rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.1s ease;
}

.profiles-list li:hover {
  background: #eef2ff;
}

.profiles-list li.active {
  border-color: #2563eb;
  background: #dbeafe;
}

.profile-editor form {
  padding: 0;
}

.inline-details summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.inline-details {
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
  background: #fefefe;
}

.inline-details .form-section {
  border-top: none;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.schedule-editor {
  margin-bottom: 1.25rem;
  border: 1px dashed #cbd5f5;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.schedule-fields {
  display: none;
  margin-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.5rem;
}

.schedule-fields.active {
  display: block;
}

.schedule-fields textarea {
  min-height: 80px;
}

.criteria-stats {
  margin: 0.5rem 0;
  font-size: 0.85rem;
  color: #0f172a;
}

.criteria-stats div {
  margin-bottom: 0.2rem;
}

.step-section {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
  background: #fdfefe;
}

.step-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  position: relative;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding-bottom: 0.65rem;
}

.step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
  position: relative;
}

/* Checkmark for completed steps */
.step-section.completed .step-number {
  background: #22c55e;
  font-size: 0;  /* Hide the number text */
}

.step-section.completed .step-number::after {
  content: "✓";
  font-size: 1.1rem;
  font-weight: 700;
}

.step-section.completed .step-header {
  cursor: pointer;
}

.step-section.completed .step-header::after {
  content: "▼";
  margin-left: auto;
  color: #64748b;
  font-size: 0.85rem;
}

.step-section.completed.collapsed .step-header::after {
  content: "▶";
}

.step-section.collapsed > :not(.step-header) {
  display: none;
}

.radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-option {
  border: 1px solid #cbd5f5;
  border-radius: 0.75rem;
  padding: 0.85rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.radio-option input[type="radio"] {
  width: auto;
  margin-top: 0.25rem;
}

.radio-option.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.radio-option::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(59, 130, 246, 0.12));
  opacity: 0;
  transition: opacity 0.15s ease;
}

.radio-option.active::after {
  opacity: 1;
}

.radio-option.disabled {
  opacity: 0.5;
}

.radio-label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  width: 100%;
}

.sorting-options .radio-option {
  flex-direction: row;
  align-items: flex-start;
}

.sorting-options .radio-option input[type="radio"] {
  margin-top: 0.3rem;
}

.sorting-options .radio-label {
  width: auto;
}

.profile-list .radio-option {
  flex-direction: row;
  align-items: flex-start;
}

.profile-list .radio-option input[type="radio"] {
  margin-top: 0.3rem;
}

.profile-list .radio-label {
  width: auto;
}

.entry-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.entry-panel {
  border: 1px dashed #cbd5f5;
  border-radius: 0.65rem;
  padding: 0.75rem;
  background: #f8fafc;
}

.placeholder-note {
  font-size: 0.8rem;
  color: #b45309;
}

.info-banner {
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #eef2ff;
  color: #1d4ed8;
  font-weight: 600;
  margin: 0.5rem 0;
}

.info-banner.warning {
  background: #fef3c7;
  color: #92400e;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.stack-option {
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  padding: 0.85rem;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}
.stack-option button {
  margin: 0;
}
.stack-option .file-label {
  margin: 0;
}
.stack-option.column {
  flex-direction: column;
  align-items: flex-start;
}
.stack-sublist {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}
.sub-option {
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  padding: 0.6rem 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  background: #fdfefe;
}
.sub-option button {
  margin: 0;
}
.roster-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.roster-chips button {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.85);
  color: #1e293b;
  box-shadow: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.roster-chips button:hover {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}
.sheets-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  width: 100%;
}
.sheets-inputs .inline-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 120px;
}
.sheets-inputs .inline-label:first-child {
  flex: 2;
  min-width: 200px;
}
.sheets-inputs .inline-label span {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}
.sheets-inputs input[type="text"] {
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
}
.sheets-inputs button {
  white-space: nowrap;
  align-self: flex-end;
}
#sheets-status {
  margin-top: 0.5rem;
}
#sheets-status.error {
  color: #dc2626;
}
.sorting-options {
  margin-top: 0.75rem;
}
.profile-list .profile-card {
  padding: 1rem;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider-row input[type="range"] {
  flex: 1;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.profile-card {
  border: 1px solid #cbd5f5;
  border-radius: 0.8rem;
  padding: 0.9rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.profile-card.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.profile-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.profile-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  border-radius: 999px;
  background: #e0e7ff;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  color: #312e81;
}

.profile-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.saved-profile-row select {
  width: 100%;
}

.roster-source-grid .placeholder,
.sorting-options .placeholder,
.button-group .placeholder {
  border-style: dashed;
}

.file-label.primary {
  border-color: #2563eb;
  color: #1d4ed8;
}

/* Modern Tournament Dashboard */
.tournament-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.tournament-header .tournament-info {
  width: auto;
}

.tournament-header .actions-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.tournament-header .main-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.tournament-info h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  color: #111827;
}

.stats-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.95rem;
  color: #6b7280;
}

.stats-row span {
  white-space: nowrap;
}

.main-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.round-generator {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.round-generator h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  color: #1e40af;
}

.tournament-over {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
}

.tournament-over p {
  margin: 0;
  color: #92400e;
}

.tournament-over p:first-child {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* Round cap active banner */
.round-cap-banner {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  border: 2px solid #3b82f6;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.round-cap-banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.round-cap-icon {
  font-size: 1.5rem;
}

.round-cap-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.round-cap-info strong {
  color: #1e40af;
  font-size: 0.95rem;
}

.round-cap-detail {
  font-size: 0.85rem;
  color: #3730a3;
}

#round-cap-value {
  color: #1e3a8a;
}

#round-cap-remaining {
  font-weight: 600;
  color: #1e40af;
}

/* Round cap status indicator in tournament header */
.round-cap-status-indicator {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  margin: 0 1rem;
  flex-shrink: 0;
}

.cap-status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #92400e;
}

.cap-status-badge .cap-value {
  background: #f59e0b;
  color: white;
  padding: 0.1rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 1.1rem;
  min-width: 1.5rem;
  text-align: center;
}

.cap-status-details {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #78350f;
}

.cap-status-details strong {
  color: #92400e;
  font-size: 1rem;
}

.cap-divider {
  color: #d97706;
  opacity: 0.5;
}

/* Rounds section header */
.rounds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rounds-header h3 {
  margin: 0;
}

.rounds-header .round-actions {
  display: flex;
  gap: 0.5rem;
}

/* Hide empty preview div */
.next-round-preview:empty {
  display: none;
}

.next-round-preview {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.next-round-preview strong {
  color: #1e40af;
}

.round-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

button.large {
  padding: 0.75rem 2rem;
  font-size: 1.05rem;
}

button.small {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.settings-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0;
  margin-bottom: 2rem;
}

.settings-section summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: #6b7280;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
}

.settings-section summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 0.75rem;
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

.settings-section[open] summary::before {
  transform: rotate(90deg);
}

.settings-section summary:hover {
  background: #f3f4f6;
  border-radius: 0.75rem 0.75rem 0 0;
}

.settings-content {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.setting-group h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  color: #374151;
}

.inline-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.inline-controls input {
  flex: 1;
  max-width: 200px;
}

/* Roster + Rounds side-by-side layout */
.roster-rounds-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: fit-content;
}

@media (min-width: 900px) {
  .roster-rounds-layout {
    grid-template-columns: auto auto;
  }
}

.roster-section {
  margin-bottom: 0;
}

.roster-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  color: #111827;
}

/* Roster table container styling */
#roster-table-container {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

#roster-table thead {
  position: sticky;
  top: 0;
  background: #f9fafb;
  z-index: 1;
}

.rounds-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  color: #111827;
}

/* Round Cards - Clean & Modern */
.round-card {
  background: white;
  border-left: 4px solid #3b82f6;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.round-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.round-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.round-header h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #1e40af;
  font-weight: 700;
}

.round-toggle {
  color: #64748b;
  font-size: 0.85rem;
  margin-top: -0.5rem;
}

/* Collapsed round card */
.round-card.collapsed {
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-left-color: #94a3b8;
}

.round-card.collapsed .round-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #475569;
}

.round-card.collapsed .courts-list {
  display: none;
}

.courts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.court-item {
  padding: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #374151;
}

.court-item strong {
  color: #111827;
  font-weight: 600;
}

/* Roster Table Improvements */
#roster-table-container {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#roster-table {
  margin: 0;
  width: auto;
}

#roster-table th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 0.75rem 0.75rem;
}

#roster-table td {
  padding: 0.75rem;
  vertical-align: middle;
}

#roster-table tbody tr:hover {
  background: #f9fafb;
}

#roster-table tbody tr.paused {
  background: #fef3c7;
}

#roster-table tbody tr.retired {
  opacity: 0.5;
  text-decoration: line-through;
}

/* Sortable table headers */
#roster-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

#roster-table th.sortable:hover {
  background: #e2e8f0;
}

#roster-table th .sort-icon {
  display: inline-block;
  width: 1em;
  opacity: 0.3;
  margin-left: 0.25rem;
}

#roster-table th .sort-icon::after {
  content: "⇅";
  font-size: 0.75em;
}

#roster-table th.sort-asc .sort-icon,
#roster-table th.sort-desc .sort-icon {
  opacity: 1;
}

#roster-table th.sort-asc .sort-icon::after {
  content: "▲";
}

#roster-table th.sort-desc .sort-icon::after {
  content: "▼";
}

/* Expandable player history */
.player-name-cell.expandable {
  cursor: pointer;
}

.player-name-cell.expandable:hover {
  color: #2563eb;
}

.expand-icon {
  display: inline-block;
  width: 1em;
  margin-right: 0.35rem;
  font-size: 0.7em;
  transition: transform 0.2s;
  color: #94a3b8;
}

.player-main-row.expanded .expand-icon {
  transform: rotate(90deg);
  color: #2563eb;
}

.player-history-row {
  background: #f1f5f9 !important;
}

.player-history-row:hover {
  background: #f1f5f9 !important;
}

.player-history-content {
  padding: 0.5rem 0.75rem 0.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.history-match {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem;
  background: white;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  border: 1px solid #e2e8f0;
}

.history-round {
  font-weight: 600;
  color: #1e40af;
  min-width: 2rem;
}

.history-court {
  color: #64748b;
  min-width: 5rem;
}

.history-players {
  flex: 1;
  color: #334155;
}

.history-label {
  font-weight: 500;
  color: #64748b;
  margin-right: 0.25rem;
}

.paradise-tag {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  margin-left: 0.35rem;
  font-weight: 500;
}

.no-history {
  color: #94a3b8;
  font-style: italic;
  margin: 0;
  padding: 0.5rem 0;
}

.action-btn {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.action-btn.pause {
  background: #fbbf24;
  color: #78350f;
}

.action-btn.unpause {
  background: #34d399;
  color: #065f46;
}

.action-btn.retire {
  background: #f87171;
  color: #7f1d1d;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Swiss tournament win group headers */
.swiss-group-header {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
}

.swiss-group-header:hover {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
}

.swiss-group-cell {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.9rem;
  border-top: 2px solid #3b82f6;
}

.swiss-group-label {
  font-weight: 700;
  color: #1e40af;
  margin-right: 0.5rem;
}

.swiss-group-count {
  font-weight: 400;
  color: #3b82f6;
  font-size: 0.85rem;
}

/* Inactive (retired/paused) players group header */
.inactive-group-header {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb) !important;
}

.inactive-group-header:hover {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb) !important;
}

.inactive-group-header .swiss-group-cell {
  border-top: 2px solid #9ca3af;
}

.inactive-group-header .swiss-group-label {
  color: #4b5563;
}

.inactive-group-header .swiss-group-count {
  color: #6b7280;
}

/* Generate Test Results button in round header */
.generate-test-results-btn {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  margin-left: 0.5rem;
}

.generate-test-results-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Swiss round view group headers */
.swiss-round-group-header {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  padding: 0.4rem 0.6rem;
  margin: 0.5rem 0 0.25rem 0;
  border-radius: 0.25rem;
  border-left: 3px solid #3b82f6;
}

/* Roster header with actions */
.roster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.roster-header h3 {
  margin: 0;
}

.roster-actions {
  display: flex;
  gap: 0.5rem;
}

/* Inline toplist */
#inline-toplist {
  margin-bottom: 0.75rem;
}

#inline-toplist summary {
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 0.375rem;
  font-weight: 600;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#inline-toplist summary:hover {
  background: linear-gradient(135deg, #fde68a, #fcd34d);
}

#toplist-summary {
  font-weight: 400;
  font-size: 0.85rem;
  color: #78350f;
}

.toplist-inline {
  margin-top: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

#toplist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#toplist-table th {
  background: #fef3c7;
  padding: 0.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  color: #78350f;
  border-bottom: 1px solid #fcd34d;
  position: sticky;
  top: 0;
}

#toplist-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

#toplist-table tbody tr:hover {
  background: #fefce8;
}

#toplist-table .rank-1 {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), transparent);
}

#toplist-table .rank-2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.2), transparent);
}

#toplist-table .rank-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.15), transparent);
}

#toplist-table .rank-gold {
  color: #b45309;
  font-weight: 700;
}

#toplist-table .rank-silver {
  color: #6b7280;
  font-weight: 700;
}

#toplist-table .rank-bronze {
  color: #a16207;
  font-weight: 700;
}

/* Wins/Losses columns styling */
#roster-table .wins-col {
  color: #16a34a;
  font-weight: 600;
  text-align: center;
}

#roster-table .losses-col {
  color: #dc2626;
  font-weight: 600;
  text-align: center;
}

#roster-table th:nth-child(4),
#roster-table th:nth-child(5) {
  text-align: center;
  width: 50px;
}

/* QR Code Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.3);
  position: relative;
}

.qr-modal-content {
  text-align: center;
  min-width: 400px;
}

.qr-modal-content h2 {
  margin: 0 0 8px 0;
  color: #1e3a5f;
}

.qr-subtitle {
  color: #6b7280;
  margin: 0 0 24px 0;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.modal-close:hover {
  color: #1e3a5f;
}

.qr-container {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.qr-container canvas,
.qr-container img {
  border: 8px solid white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

.qr-url {
  font-family: monospace;
  font-size: 0.85rem;
  color: #6b7280;
  word-break: break-all;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 8px;
  margin-bottom: 16px;
}

.qr-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

@media print {
  body * {
    visibility: hidden;
  }

  .modal,
  .modal-content,
  .qr-modal-content,
  .qr-modal-content * {
    visibility: visible;
  }

  .modal {
    position: absolute;
    top: 0;
    left: 0;
    background: white;
  }

  .modal-content {
    box-shadow: none;
  }

  .modal-close,
  .qr-actions {
    display: none;
  }
}

/* Round Timer Display */
.round-timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: white;
  border: 2px solid #1e293b;
  border-radius: 12px;
  margin-left: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.round-timer-container.hidden {
  display: none;
}

.round-timer-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.round-timer-display {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2563eb;
  font-family: "SF Mono", "Monaco", "Consolas", monospace;
  letter-spacing: 2px;
}

/* Start Round Button */
.start-round-btn {
  font-size: 0.75rem;
  padding: 4px 12px;
  margin-left: 12px;
}

.round-started-badge {
  font-size: 0.7rem;
  background: #22c55e;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  font-weight: 600;
}

/* Player Links in Rounds */
.player-link {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.player-link:hover {
  color: #3b82f6;
}

/* Substitution Modal */
.substitution-modal-content {
  min-width: 400px;
  max-width: 500px;
}

.substitution-modal-content h2 {
  margin: 0 0 16px 0;
  color: #1e3a5f;
}

.sub-description {
  color: #64748b;
  margin: 0 0 20px 0;
  font-size: 0.95rem;
}

.sub-description strong {
  color: #1e293b;
}

.sub-actions-top {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.sub-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.sub-divider::before,
.sub-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.sub-divider span {
  padding: 0 12px;
}

.sub-player-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-player-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.sub-player-option:hover {
  background: #e0f2fe;
  border-color: #3b82f6;
}

.sub-player-name {
  font-weight: 600;
  color: #1e293b;
}

.sub-player-stats {
  font-size: 0.85rem;
  color: #64748b;
}

.no-players {
  text-align: center;
  color: #94a3b8;
  padding: 24px;
  font-style: italic;
}

/* Player History Modal */
.player-history-modal-content {
  min-width: 400px;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.player-history-modal-content h2 {
  margin: 0 0 16px 0;
  color: #1e3a5f;
}

.history-modal-body {
  overflow-y: auto;
  flex: 1;
}

.history-modal-body .history-match {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
}

.history-modal-body .history-round {
  font-weight: 700;
  color: #1e40af;
  min-width: 32px;
}

.history-modal-body .history-court {
  font-weight: 600;
  color: #374151;
  min-width: 80px;
}

.history-modal-body .history-players {
  flex: 1;
  color: #64748b;
}

.history-modal-body .history-label {
  font-weight: 600;
  color: #94a3b8;
  margin-right: 4px;
}

.history-modal-body .paradise-tag {
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.history-modal-body .result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.history-modal-body .result-win {
  background: #dcfce7;
  color: #166534;
}

.history-modal-body .result-loss {
  background: #fee2e2;
  color: #991b1b;
}

.history-modal-body .no-history {
  text-align: center;
  color: #94a3b8;
  padding: 24px;
  font-style: italic;
}

/* Next Round Weights Section */
#next-round-weights {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

#next-round-weights .hint {
  margin: 0.5rem 0;
  font-size: 0.85rem;
}

.weights-section,
.bands-section {
  margin-bottom: 1rem;
}

.weights-section h5,
.bands-section h5 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #374151;
}

.weights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.5rem;
}

.weight-slider-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid #e2e8f0;
}

.weight-slider-group label {
  flex-shrink: 0;
  width: 140px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
}

.weight-slider-group input[type="range"] {
  flex: 1;
  min-width: 60px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #cbd5e1;
  border-radius: 3px;
  outline: none;
}

.weight-slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}

.weight-slider-group input[type="range"]::-webkit-slider-thumb:hover {
  background: #2563eb;
}

.weight-slider-group input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.weight-slider-group .weight-value {
  flex-shrink: 0;
  width: 36px;
  text-align: right;
  font-weight: 600;
  font-size: 0.85rem;
  color: #1e40af;
}

/* Bands section */
.bands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.5rem;
}

.band-group {
  background: #f8fafc;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  border: 1px solid #e2e8f0;
}

.band-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.3rem;
}

.band-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.band-inputs input[type="number"] {
  width: 70px;
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.3rem;
}

.band-inputs input[type="number"]:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.band-separator {
  color: #94a3b8;
  font-weight: 500;
}

.band-type {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: 0.5rem;
  font-style: italic;
}

.band-type.progressive {
  color: #7c3aed;
}

.weight-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

#next-round-number-badge {
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

