:root {
  --bg: #f0f4fc;
  --surface: #ffffff;
  --primary: #1b3f85;
  --primary-soft: #2e5ec3;
  --logo-bg: #273b93;
  --text: #0e1f40;
  --muted: #5a6e92;
  --border: #dde4f2;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

.container {
  width: min(1140px, 94%);
  margin: 0 auto;
}

/* HEADER */
.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 30;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 8px 0;
  gap: 16px;
  border-bottom: none;
}

.brand { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  text-decoration: none;
  color: inherit;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: auto;
  height: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.brand-kicker { margin: 0; color: var(--muted); font-size: 10px; font-weight: 500; }
.brand-name   { font-size: 16px; font-weight: 800; line-height: 1.2; display: block; color: var(--primary); }
.brand-text { display: flex; flex-direction: column; gap: 2px; }

.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a {
  text-decoration: none;
  color: #253f7a;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}
.main-nav a:hover { border-color: var(--primary-soft); }

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  font-size: 18px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

/* HERO */
.hero { padding: 20px 0 0; }

.hero-inner {
  border-radius: 20px;
  width: min(1140px, 94%);
  margin: 0 auto;
  overflow: hidden;
}

.hero-poster {
  display: block;
  width: 100%;
  height: auto;
}

/* CATEGORY CARDS */
.section { padding: 40px 0; }
.section.alt {
  background: #e9eef9;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { text-align: center; margin-bottom: 26px; }
.section-head h3 { margin: 0 0 6px; font-size: 28px; }
.section-head p  { margin: 0; color: var(--muted); }

.page-title {
  text-align: center;
  margin: 26px 0 8px;
  font-size: 34px;
  color: var(--primary);
}

.page-subtitle {
  text-align: center;
  margin: 0 0 24px;
  color: var(--muted);
}

.cat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(14,31,64,.06);
  transition: box-shadow .2s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.cat-card:hover { box-shadow: 0 8px 28px rgba(14,31,64,.12); }

.cat-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: inherit;
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(15, 45, 102, 0.12);
  transition: transform .18s ease, text-shadow .18s ease;
  flex-shrink: 0;
}

.cat-card:hover .cat-icon {
  transform: translateY(-1px) scale(1.05);
}

.cat-icon.volleyball {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(95, 82, 195, 0.28);
}

.cat-icon.basketball {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(214, 113, 22, 0.3);
}

.cat-icon.tabletennis {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(24, 113, 171, 0.28);
}

.cat-icon.darts {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(191, 44, 74, 0.28);
}

.cat-icon.chess {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(50, 50, 50, 0.25);
}

.cat-card h4 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cat-card p  { margin: 0; color: var(--muted); font-size: 13px; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.tag.women  { background: #f3e8ff; color: #7c3aed; }
.tag.men    { background: #dbeafe; color: #1d4ed8; }
.tag.mixed  { background: #d1fae5; color: #065f46; }

/* SCHEDULE TABLE */
#schedule { display: none; }

.schedule-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
.schedule-table th {
  background: var(--primary);
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
.schedule-table td {
  padding: 13px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.schedule-table tr:last-child td { border-bottom: 0; }
.schedule-table tbody tr:hover { background: #f5f8ff; }

.page-title--left,
.page-subtitle--left {
  text-align: left;
}

.schedule-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.schedule-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.schedule-sidebar h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.05;
  color: var(--primary);
}

.sport-menu {
  display: grid;
  gap: 8px;
}

.sport-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #203d73;
  background: #f4f7ff;
  border: 1px solid #e6ebf8;
  border-radius: 10px;
  padding: 10px 10px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
  white-space: normal;
}

.sport-menu-item.active {
  background: #dbe6ff;
  border-color: #9fb8ef;
  color: #0f2d66;
  box-shadow: 0 0 0 1px rgba(27, 63, 133, 0.12);
}

.sport-menu-item.active .sport-menu-icon {
  transform: scale(1.08);
}

.sport-menu-icon {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(15, 45, 102, 0.12);
  transition: transform .18s ease, text-shadow .18s ease;
}

.sport-menu-item:hover .sport-menu-icon {
  transform: translateY(-1px) scale(1.05);
}

.sport-menu-item[data-sport^="volleyball"] .sport-menu-icon {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(95, 82, 195, 0.28);
}

.sport-menu-item[data-sport^="basketball"] .sport-menu-icon {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(214, 113, 22, 0.3);
}

.sport-menu-item[data-sport^="tabletennis"] .sport-menu-icon {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(24, 113, 171, 0.28);
}

.sport-menu-item[data-sport^="darts"] .sport-menu-icon {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(191, 44, 74, 0.28);
}

.sport-menu-item[data-sport^="esport"] .sport-menu-icon {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(71, 70, 178, 0.3);
}

.schedule-main-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.schedule-main-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.schedule-main-head h2 {
  margin: 0;
  font-size: clamp(30px, 2.4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.3px;
  color: var(--primary);
  max-width: 68%;
  word-break: keep-all;
}

.schedule-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.status-filter-select {
  padding: 8px 12px;
  border: 1px solid #d4d9e5;
  border-radius: 8px;
  background: white;
  color: #0f2858;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-filter-select:hover {
  border-color: var(--primary);
}

.status-filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 40, 88, 0.1);
}

.schedule-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-view-panel {
  margin-top: 14px;
}

#scheduleFilterBar {
  margin-bottom: 10px;
}

.schedule-switch-btn {
  border: 0;
  border-radius: 7px;
  padding: 8px 12px;
  background: #f2f5ff;
  color: #2a4177;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.schedule-switch-btn.active {
  background: var(--primary);
  color: #fff;
}

.schedule-board-wrap {
  overflow-x: auto;
}

.knockout-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
  align-items: start;
}

.knockout-col {
  background: #f7f9ff;
  border: 1px solid #dbe3f5;
  border-radius: 14px;
  padding: 14px;
}

.knockout-col h4 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 30px;
  line-height: 1.15;
}

.knockout-list {
  display: grid;
  gap: 12px;
  min-height: 140px;
}

.knockout-card {
  --ko-col-width: 84px;
  border: 1px solid #d0d7e6;
  border-radius: 16px;
  padding: 10px 12px;
  background: #fff;
}

.knockout-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: #102a58;
  font-size: 14px;
}

.knockout-status {
  background: #16a34a;
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 12px;
}

.knockout-teams {
  display: grid;
  grid-template-columns: minmax(var(--ko-col-width), 1fr) auto minmax(var(--ko-col-width), 1fr);
  align-items: center;
  gap: 4px;
  max-width: calc(var(--ko-col-width) * 2 + 26px);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 6px;
}

.knockout-teams .team-pill {
  display: block;
  width: 100%;
  text-align: center;
  padding: 2px 6px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.knockout-scores {
  display: grid;
  grid-template-columns: minmax(var(--ko-col-width), 1fr) minmax(var(--ko-col-width), 1fr);
  align-items: center;
  gap: 8px;
  max-width: calc(var(--ko-col-width) * 2 + 12px);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 6px;
}

.knockout-scores span {
  width: 100%;
  min-width: 0;
  text-align: center;
  border-radius: 10px;
  background: #bcc0c6;
  color: #1d2d47;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  padding: 6px 6px;
}

.knockout-scores span.score-win {
  background: #16a34a;
  color: #fff;
}

.knockout-location {
  text-align: center;
  color: #314f86;
  font-size: 16px;
}

.knockout-empty {
  margin: 0;
  padding: 14px 12px;
  border: 1px dashed #c8d4ee;
  border-radius: 10px;
  background: #fff;
  color: #5b6f97;
  font-size: 15px;
  text-align: center;
}

.schedule-board {
  width: 100%;
  border-collapse: collapse;
}

.schedule-board thead th {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 2px solid #1f345e;
  color: #132a55;
  font-size: 14px;
}

.schedule-board tbody td {
  padding: 14px 10px;
  border-bottom: 1px solid #e3e8f5;
  font-size: 14px;
  vertical-align: top;
}

.match-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.team-vs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.team-vs--under-score {
  margin-top: 6px;
}

.team-pill {
  border-radius: 7px;
  background: #57ba45;
  color: #1b2e63;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.vs-colon {
  color: #5071ad;
  font-weight: 800;
}

.team-score {
  margin-top: 6px;
  display: inline-flex;
  gap: 8px;
}

.team-score span {
  min-width: 46px;
  text-align: center;
  border-radius: 10px;
  background: #bcc0c6;
  color: #1d2d47;
  font-weight: 800;
  font-size: 12px;
  padding: 3px 8px;
}

.team-score span.score-win {
  background: #57ba45;
  color: #1b2e63;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 138px;
  border-radius: 12px;
  background: #4fa3ff;
  color: #fff;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
}

.group-standings {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.group-standings-head h3 {
  margin: 0;
  color: var(--primary);
  font-size: 28px;
}

.group-standings-head p {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

#groupStandingsBody {
  display: grid;
  gap: 12px;
}

.group-card-title {
  margin: 0 0 8px;
  color: #0f3677;
  font-size: 40px;
  line-height: 1;
}

.group-table-wrap {
  overflow-x: auto;
  border: 1px solid #c7d2d0;
  border-radius: 0;
}

.group-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: #c8dcd3;
}

.group-table thead th {
  background: #e8eaec;
  color: #000;
  font-size: 13px;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #232323;
}

.group-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #aec2bb;
  font-size: 15px;
}

.group-table tbody tr:last-child td {
  border-bottom: 0;
}

.group-table tbody td:nth-child(2),
.group-table tbody td:nth-child(3),
.group-table tbody td:nth-child(4),
.group-table thead th:nth-child(2),
.group-table thead th:nth-child(3),
.group-table thead th:nth-child(4) {
  text-align: center;
}

.group-empty-msg {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* TEAMS */
#teams { display: none; }

.team-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.team-link {
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.team-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(14,31,64,.10);
  border-color: #bfd0f2;
}

.team-link div {
  flex: 1;
}

.team-link-arrow {
  color: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.team-page-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  margin-bottom: 22px;
}

.team-page-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 14px;
  display: block;
}

.team-page-logo.team-page-logo--wide {
  width: 220px;
  height: 140px;
}

.team-page-title {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 38px);
  color: var(--primary);
}

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

.team-sports {
  display: grid;
  gap: 18px;
}

.team-sport-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}

.team-sport-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.team-sport-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--primary);
}

.team-sport-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf3ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

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

.athlete-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #fbfdff;
  text-align: center;
}

.athlete-photo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

.athlete-photo.athlete-photo--wide {
  width: 128px;
}

.athlete-card strong {
  display: block;
  margin: 0 0 4px;
  font-size: 14px;
}

.athlete-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.athlete-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  color: var(--primary-soft);
  font-size: 12px;
  font-weight: 600;
}

.team-empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
}

.admin-login-panel,
.admin-app {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.admin-login-panel h2 {
  margin: 0 0 8px;
  color: var(--primary);
}

.admin-login-panel p {
  margin: 0 0 12px;
  color: var(--muted);
}

.admin-form-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-form-row input {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
}

.admin-msg {
  color: #c1121f;
  font-size: 13px;
  margin-top: 8px;
}

.admin-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-tab-btn,
.admin-ghost-btn,
.admin-grid-form button,
.admin-form-row button,
.admin-actions-row button {
  border: 1px solid var(--border);
  background: #f4f7ff;
  color: #193b7d;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.admin-ghost-btn {
  margin-left: auto;
}

.admin-tab-section {
  display: none;
}

.admin-tab-section.active {
  display: block;
}

.admin-tab-section h3 {
  margin: 6px 0 12px;
  color: var(--primary);
}

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

.admin-grid-form input,
.admin-grid-form select,
.admin-grid-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.admin-grid-form textarea {
  grid-column: span 2;
}

.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.admin-modal-overlay[hidden] {
  display: none;
}

.admin-modal {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

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

.admin-modal-head h3 {
  margin: 0;
  color: var(--primary);
}

.admin-modal-close {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: #64748b;
}

.admin-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

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

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-field > span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  background: #0f172a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.status-done {
  background: #dcfce7;
  color: #166534;
}

.status-badge.status-live {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.status-upcoming {
  background: #e2e8f0;
  color: #475569;
}

.sport-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.sport-tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sport-tab small {
  color: #94a3b8;
  font-size: 11px;
}

.sport-tab:hover {
  border-color: var(--primary);
}

.sport-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.sport-tab.active small {
  color: rgba(255, 255, 255, 0.75);
}

.sport-tab-count {
  display: inline-block;
  background: #e2e8f0;
  color: #475569;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  margin-left: 2px;
}

.sport-tab.active .sport-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.zone-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.zone-tab {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.zone-tab:hover {
  border-color: var(--primary);
}

.zone-tab.active {
  background: #eff6ff;
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.zone-tab-add {
  border-style: dashed;
  color: #64748b;
}

.zone-tab-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 0 4px;
}

.zone-tab-stage {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.zone-tab-stage:hover {
  border-color: #f59e0b;
}

.zone-tab-stage.active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
  font-weight: 700;
}

.zone-tab-count {
  display: inline-block;
  background: rgba(100, 116, 139, 0.15);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  margin-left: 2px;
}

.zone-tab.active .zone-tab-count {
  background: rgba(255, 255, 255, 0.35);
}

.schedule-context {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 12px;
}

.zone-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.zone-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.zone-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}

.zone-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.zone-card-letter {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.zone-card-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.zone-card-meta strong {
  font-size: 14px;
  color: #0f172a;
}

.zone-card-meta small {
  font-size: 12px;
  color: #64748b;
}

.zone-card-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.zone-card-teams span {
  background: #eff6ff;
  color: var(--primary);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
}

.zone-card-teams em {
  font-size: 12px;
  color: #94a3b8;
}

.zone-tab-teams {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
}

.wizard-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.wizard-menu {
  position: absolute;
  top: calc(100% + 6px);
  z-index: 500;
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wizard-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: #0f172a;
}

.wizard-menu button:hover {
  background: #f1f5f9;
}

.wizard-menu button.active {
  background: #eff6ff;
  color: var(--primary);
  font-weight: 700;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.wizard-step:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.wizard-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wizard-step.active .wizard-step-num {
  background: var(--primary);
  color: #fff;
}

.wizard-step.done .wizard-step-num {
  background: #22c55e;
  color: #fff;
}

.wizard-step-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.wizard-step-label small {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wizard-step.active {
  background: #eff6ff;
}

.wizard-arrow {
  color: #cbd5e1;
  font-size: 18px;
  font-weight: 700;
}

.wizard-bar-spacer {
  flex: 1;
}

.standings-note {
  font-weight: 500;
  font-size: 12px;
  color: #64748b;
  margin-left: 8px;
}

.standings-table td,
.standings-table th {
  text-align: center;
}

.standings-table td:nth-child(2),
.standings-table th:nth-child(2) {
  text-align: left;
}

.standings-leader {
  background: #f0fdf4;
}

.standings-leader td:nth-child(2) {
  font-weight: 800;
  color: #166534;
}

.standings-qualify {
  background: #dcfce7;
  color: #166534;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  margin-left: 6px;
}

.bracket-sport-label {
  font-size: 15px;
  font-weight: 800;
  color: #92400e;
  margin: 0;
}

.bracket-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* ── NBA маягийн шигшээний мод ── */
.btree {
  display: flex;
  align-items: stretch;
  gap: 26px;
  overflow-x: auto;
  padding: 10px 4px 16px;
  margin-bottom: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.btree-col {
  flex: 1;
  min-width: 168px;
  display: flex;
  flex-direction: column;
}

.btree-col-head {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 6px 0 10px;
}

.btree-col.center .btree-col-head {
  color: #92400e;
  font-size: 13px;
}

.btree-col-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 20px;
  padding: 4px 0;
}

.btree-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  overflow: visible;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.btree-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.15);
}

.btree-card.live {
  border-color: #f59e0b;
  background: #fffbeb;
}

/* Сэрээ холболт: хос картын шугам нийлж дараагийн шат руу нэг шугамаар гарна */
.btree-col .btree-col-cards {
  gap: 0;
}

.btree-pair {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
  padding: 10px 0;
}

.btree-col.left .btree-pair {
  padding-right: 24px;
}

/* Карт бүрээс гарах богино шугам */
.btree-col.left .btree-pair > .btree-card::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  width: 12px;
  height: 2px;
  background: #94a3b8;
}

/* Хоёр шугамыг холбох босоо шугам */
.btree-col.left .btree-pair:not(.single)::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 25%;
  height: 50%;
  width: 2px;
  background: #94a3b8;
}

/* Дараагийн шат руу гарах голын шугам */
.btree-col.left .btree-pair::after {
  content: "";
  position: absolute;
  right: -26px;
  top: 50%;
  width: 36px;
  height: 2px;
  background: #94a3b8;
}

.btree-col.left .btree-pair.single > .btree-card::after {
  display: none;
}

.btree-col.center .btree-card {
  border-width: 2px;
  border-color: #f59e0b;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.18);
}

.btree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}

.btree-row span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btree-row b {
  min-width: 22px;
  text-align: center;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 13px;
}

.btree-row.win {
  font-weight: 800;
  color: #0f172a;
}

.btree-row.win b {
  background: #dcfce7;
  color: #166534;
}

.btree-row.lose {
  color: #94a3b8;
}

.btree-row.lose b {
  background: #f8fafc;
  color: #94a3b8;
}

.btree-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.btree-logo-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
}

.btree-foot {
  padding: 5px 10px;
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  border-radius: 0 0 9px 9px;
}

.btree-foot b {
  color: #166534;
}

.bracket-actions-row {
  margin-bottom: 14px;
}

/* Хоосон байрлал — тоглолт хараахан үүсээгүй нүд */
.btree-empty-card {
  border-style: dashed;
  border-color: #cbd5e1;
  background: #fcfdfe;
  box-shadow: none;
  cursor: pointer;
}

.btree-empty-card .btree-row {
  color: #b6c2d1;
}

.btree-empty-card .btree-row b {
  background: transparent;
  color: #cbd5e1;
}

.btree-empty-card .btree-foot {
  color: #94a3b8;
  text-align: center;
}

.btree-empty-card:hover {
  border-color: var(--primary);
  background: #f0f7ff;
}

.btree-empty-card:hover .btree-foot {
  color: var(--primary);
}

.btree-col.center .btree-empty-card {
  border-color: #fcd34d;
  background: #fffdf5;
}

.btree-seed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 17px;
  padding: 0 4px;
  border-radius: 5px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  flex-shrink: 0;
}

.btree-slot-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 6px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
}

.btree-slot-select:focus {
  border-color: var(--primary);
  outline: none;
}

.btree-tpl {
  color: var(--primary);
  font-weight: 800;
}

.btree-bye-badge {
  background: #f59e0b;
  color: #fff;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  flex-shrink: 0;
}

/* Гоц (bye) багийн карт — 1-р тойрог алгасна */
.btree-bye-card {
  border-color: #fcd34d;
  background: #fffbeb;
  cursor: default;
}

.btree-bye-card .btree-row {
  border-bottom: none;
}

.btree-bye-card .btree-foot {
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

/* Нүүр хуудас: одоо явагдаж буй тоглолтууд */
.live-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px 16px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.live-row:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
}

.live-row.is-live {
  border-color: #fcd34d;
  background: #fffbeb;
}

.live-sport {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  min-width: 200px;
}

.live-teams {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.live-teams b {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 2px 10px;
  margin: 0 6px;
}

.live-row.is-live .live-teams b {
  background: #fde68a;
}

.live-status {
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
}

.bracket-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748b;
  margin: 0 0 10px;
}

/* Тэмцээн цэс: Төрөл сонгох ба ажлын хэсгүүд тусдаа панелд */
.sport-select-panel,
.sub-select-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.sport-select-panel h4,
.sub-select-panel h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--primary);
}

.sub-select-panel h4 small {
  font-weight: 500;
  color: #94a3b8;
}

.sub-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sub-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
}

.sub-tab-btn small {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

.sub-tab-btn.active small {
  color: rgba(255, 255, 255, 0.8);
}

.sub-tab-btn:hover {
  border-color: var(--primary);
}

.sub-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.sub-section {
  display: none;
}

.sub-section.active {
  display: block;
}

.bracket {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.bracket-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
  justify-content: center;
}

.bracket-col.active {
  border-color: #f59e0b;
  background: #fffbeb;
}

.bracket-col-head {
  font-size: 14px;
  font-weight: 800;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bracket-col-head small {
  font-weight: 500;
  color: #b45309;
}

.bracket-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bracket-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.bracket-card.live {
  border-color: #f59e0b;
  background: #fffbeb;
}

.bracket-team {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 14px;
}

.bracket-team b {
  min-width: 24px;
  text-align: center;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 1px 6px;
}

.bracket-team.win {
  font-weight: 800;
  color: #166534;
}

.bracket-team.win b {
  background: #dcfce7;
  color: #166534;
}

.bracket-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 5px;
}

.bracket-empty {
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  padding: 14px 0;
}

.bracket-col-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bracket-add,
.bracket-auto {
  border: 1px dashed var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #475569;
}

.bracket-add:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.bracket-auto {
  border-style: solid;
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}

.bracket-auto:hover {
  background: #fde68a;
}

@media (max-width: 860px) {
  .bracket {
    grid-template-columns: 1fr;
  }
}

.zone-unassigned {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.zone-unassigned-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 14px;
}

.zone-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.zone-box {
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.zone-box:hover {
  border-color: #93c5fd;
}

.zone-box.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.zone-box-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.zone-box-head strong {
  font-size: 14px;
  color: #0f172a;
}

.zone-box-active-tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: #eff6ff;
  border-radius: 999px;
  padding: 2px 8px;
}

.zone-box-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 36px;
}

.order-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 11px;
  cursor: pointer;
  color: #64748b;
}

.order-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.zone-sport-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  min-width: 240px;
}

.teams-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.teams-toolbar h3 {
  margin: 0;
}

.teams-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.teams-toolbar-right input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  width: 260px;
}

.team-grid-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.team-card-admin {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.team-card-admin:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}

.team-card-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.team-card-letter {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #475569;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-card-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
  flex: 1;
}

.team-card-info strong {
  font-size: 14px;
  color: #0f172a;
}

.team-card-info small {
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-card-abbr {
  background: #eff6ff;
  color: var(--primary);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  flex-shrink: 0;
}

.wizard-panel {
  animation: wizard-fade 0.2s ease;
}

@keyframes wizard-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wizard-hint {
  font-size: 14px;
  color: #475569;
  margin: 0 0 12px;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.wizard-nav-top {
  margin: 0 0 10px;
  justify-content: flex-start;
}

.wizard-next {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

.wizard-next:hover {
  filter: brightness(1.1);
}

.stage-cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.stage-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stage-card:hover {
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
}

.stage-card.active {
  background: #f59e0b;
  border-color: #f59e0b;
}

.stage-card.active .stage-card-meta strong,
.stage-card.active .stage-card-meta small {
  color: #fff;
}

.stage-card-icon {
  font-size: 20px;
}

.stage-card-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.stage-card-meta strong {
  font-size: 14px;
  color: #92400e;
}

.stage-card-meta small {
  font-size: 12px;
  color: #b45309;
}

.zone-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.zone-card-add {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  color: #64748b;
  font-weight: 700;
  min-height: 90px;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.schedule-day {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.schedule-day-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f1f5f9;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.status-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.status-chip b {
  font-size: 12px;
  opacity: 0.75;
}

.status-chip:hover {
  border-color: var(--primary);
}

.status-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.status-chip.live.active {
  background: #f59e0b;
  border-color: #f59e0b;
}

.status-chip.done.active {
  background: #22c55e;
  border-color: #22c55e;
}

.team-win {
  font-weight: 800;
  color: #166534;
}

.schedule-day-head small {
  font-weight: 500;
  color: #64748b;
}

.schedule-item {
  display: grid;
  grid-template-columns: 52px 90px 1fr 118px 1fr 170px auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 14px;
}

.schedule-item:hover {
  background: #f8fafc;
}

.schedule-item.live {
  background: #fffbeb;
}

.schedule-item-teams.team-a {
  text-align: right;
}

.schedule-item-scorebox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.score-inline {
  width: 44px;
  padding: 5px 4px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.score-inline:focus {
  border-color: var(--primary);
  outline: none;
}

.schedule-item-quick {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.btn-quick {
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-start {
  background: #22c55e;
  color: #fff;
}

.btn-start:hover {
  background: #16a34a;
}

.btn-finish {
  background: #f59e0b;
  color: #fff;
}

.btn-finish:hover {
  background: #d97706;
}

.btn-reopen {
  background: #e2e8f0;
  color: #475569;
  padding: 6px 9px;
}

.btn-reopen:hover {
  background: #cbd5e1;
}

.sched-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sched-sport select {
  min-width: 280px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

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

.schedule-item-time {
  font-weight: 700;
  color: var(--primary);
}

.schedule-item-zone {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.schedule-item-teams {
  font-weight: 600;
  color: #0f172a;
}

.schedule-item-teams em {
  font-style: normal;
  color: #94a3b8;
  font-size: 12px;
  margin: 0 4px;
}

.schedule-item-score {
  font-weight: 700;
  text-align: center;
}

.schedule-item-loc {
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-item-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .schedule-item {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .schedule-item-teams.team-a {
    text-align: left;
  }
}

/* Гар утас: товчнуудыг хуруунд тохируулж томсгоно */
@media (max-width: 640px) {
  .btn-quick {
    padding: 10px 16px;
    font-size: 14px;
    min-height: 42px;
  }
  .score-inline {
    width: 54px;
    padding: 9px 4px;
    font-size: 16px;
  }
  .order-btn,
  .schedule-item-actions .admin-edit-btn,
  .schedule-item-actions .admin-del-btn {
    min-width: 40px;
    min-height: 40px;
    font-size: 15px;
  }
  .zone-toggle-chip {
    padding: 10px 15px;
    font-size: 14px;
  }
  .wizard-step-label small {
    max-width: 90px;
  }
}

.admin-step {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
}

.admin-step summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-step summary::-webkit-details-marker {
  display: none;
}

.admin-step summary::before {
  content: "▸";
  color: var(--primary);
  transition: transform 0.15s;
}

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

.admin-step[open] summary {
  border-bottom: 1px solid var(--border);
}

.admin-step > *:not(summary) {
  padding: 14px 16px;
}

.admin-step .admin-grid-form {
  margin-bottom: 0;
}

.zone-assign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.zone-assign-col {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.zone-assign-target {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.zone-assign-col h4 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--primary);
}

.zone-assign-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #94a3b8;
}

.zone-pool {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  min-height: 96px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border: 2px dashed transparent;
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}

.zone-pool.dragover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.06);
}

.zone-pool-empty {
  font-size: 13px;
  color: #94a3b8;
  padding: 8px;
}

.zone-assign-compact {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
}

.zone-assign-compact h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--primary);
}

.zone-toggle-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.zone-toggle-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.12s, border-color 0.12s;
}

.zone-toggle-chip:hover {
  border-color: var(--primary);
}

.zone-toggle-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

.zone-toggle-chip.taken {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.zone-toggle-chip.taken:hover {
  background: #fde68a;
  border-color: #f59e0b;
}

.zone-hint-selected {
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 700;
}

/* Өөр Zone-д аль хэдийн орсон баг */
.zone-chip-taken {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.zone-chip-taken:hover {
  background: #fde68a;
  border-color: #f59e0b;
}

.zone-chip-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  margin-left: 6px;
  font-style: normal;
}

.zone-hint-taken {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .zone-assign {
    grid-template-columns: 1fr;
  }
}

.match-dnd {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.match-dnd-pool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 13px;
  color: #64748b;
}

.match-dnd-pool-head input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  width: 220px;
}

.dnd-team-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding: 4px;
  margin-bottom: 12px;
}

.dnd-chip {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  cursor: grab;
  user-select: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.dnd-chip:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.dnd-chip:active {
  cursor: grabbing;
}

.dnd-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.match-dnd-slots {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.dnd-slot {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  min-height: 52px;
  transition: border-color 0.15s, background 0.15s;
}

.dnd-slot.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.dnd-slot.filled {
  border-style: solid;
  border-color: var(--primary);
}

.dnd-slot-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  flex-shrink: 0;
}

.dnd-slot-team {
  font-size: 14px;
  color: #94a3b8;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dnd-slot.filled .dnd-slot-team {
  color: #0f172a;
  font-weight: 600;
}

.dnd-slot-clear {
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.dnd-swap-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.dnd-swap-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

@media (max-width: 640px) {
  .match-dnd-slots {
    flex-direction: column;
  }
  .dnd-swap-btn {
    padding: 8px;
  }
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f3;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  background: #f4f7ff;
  color: #133469;
  font-weight: 700;
}

.admin-table input {
  width: 72px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
}

.admin-table .schedule-edit-input {
  width: 110px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

.admin-table .schedule-edit-input--score {
  width: 64px;
}

.schedule-score-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-danger-btn {
  border: 0;
  border-radius: 8px;
  background: #ffd9de;
  color: #8f0f26;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

.admin-edit-btn {
  border: 0;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  margin-right: 4px;
}

.admin-edit-btn:hover {
  background: #fde68a;
}

.admin-del-btn {
  border: 0;
  border-radius: 8px;
  background: #ffd9de;
  color: #8f0f26;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

.admin-del-btn:hover {
  background: #fecdd3;
}

.admin-athlete-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.admin-no-photo {
  color: #bcc0c6;
  font-size: 18px;
}
.athlete-photo-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #555;
}
.athlete-photo-label input[type="file"] {
  font-size: 12px;
}

/* Хадгалах товчны мөр: гүйлгэх үед дэлгэцийн доод хэсэгт наалдаж үлдэнэ */
.admin-actions-row {
  position: sticky;
  bottom: 12px;
  z-index: 50;
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(4px);
}

.admin-actions-row #saveResultsBtn {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 700;
}

.admin-actions-row #saveResultsBtn:hover {
  filter: brightness(1.1);
}

.team-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.team-logo--yaam {
  width: 90px;
  height: 50px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(15, 40, 88, 0.15));
}

.team-num {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.team-card h4 { margin: 0 0 3px; font-size: 15px; }
.team-card p  { margin: 0; color: var(--muted); font-size: 13px; }

.team-card:has(.team-logo--yaam) {
  border-color: rgba(15, 40, 88, 0.2);
  box-shadow: 0 2px 8px rgba(15, 40, 88, 0.08);
}

.team-card:has(.team-logo--yaam):hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(15, 40, 88, 0.15);
  transform: translateY(-2px);
}

/* RESULTS PLACEHOLDER */
#results { display: none; }

.results-title {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #c9cfdd;
  color: var(--primary);
  font-size: 42px;
  line-height: 1.1;
}

.results-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}

.results-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: var(--surface);
}

.results-table th,
.results-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #d4d9e5;
  font-size: 15px;
  text-align: center;
}

.results-table th {
  color: #0f2858;
  font-weight: 800;
  background: #f0f3fb;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
  text-align: left;
}

.results-table td:first-child {
  font-weight: 700;
  color: #102c60;
}

.results-table td:last-child {
  font-weight: 800;
  color: #0d2a5e;
}

.results-row-absent td {
  color: #999;
  background: #fafafa;
}
.results-row-absent td:first-child { color: #bbb; }
.results-row-absent td:last-child { color: #bbb; }
.absent-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #7c3aed;
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  border-radius: 5px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.results-placeholder {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  color: var(--muted);
}
.results-placeholder span { font-size: 48px; }
.results-placeholder p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; }

/* FINISHED MATCHES SECTION */
.results-matches-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid #e5e8ef;
}

.results-section-title {
  margin: 0 0 24px;
  color: var(--primary);
  font-size: 28px;
  font-weight: 800;
}

.results-sport-group {
  margin-bottom: 32px;
}

.results-sport-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.results-sport-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #0f2858;
  font-size: 20px;
  font-weight: 700;
}

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

.medal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.medal-badge.gold {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #8b6914;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.medal-badge.silver {
  background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
  color: #555;
  box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.medal-badge.bronze {
  background: linear-gradient(135deg, #cd7f32 0%, #e8a87c 100%);
  color: #5c3d1f;
  box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.sport-standings {
  background: var(--surface);
  border: 1px solid #d4d9e5;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.standings-title {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.standings-table th,
.standings-table td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid #e5e8ef;
}

.standings-table th {
  background: #f8f9fb;
  color: #0f2858;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

.standings-table th:nth-child(1) { width: 40px; }
.standings-table th:nth-child(2) { width: auto; text-align: left; }
.standings-table th:nth-child(3),
.standings-table th:nth-child(4),
.standings-table th:nth-child(5),
.standings-table th:nth-child(6),
.standings-table th:nth-child(7),
.standings-table th:nth-child(8),
.standings-table th:nth-child(9) { width: 50px; }

.standings-table td:nth-child(8) {
  font-weight: 600;
  color: #0f2858;
}

.standings-table td.team-name-cell {
  text-align: left;
  font-weight: 600;
}

.standings-table td.goal-diff {
  font-weight: 700;
}

.standings-table td.goal-diff.positive {
  color: #059669;
}

.standings-table td.goal-diff.negative {
  color: #dc2626;
}

.standings-table tr.medal-row {
  background: #f8fdf9;
}

.standings-table tr.medal-1 {
  background: #fffef0;
}

.standings-table tr.medal-2 {
  background: #fafafa;
}

.standings-table tr.medal-3 {
  background: #fff8f0;
}

/* Matrix Table Styles */
.standings-table.matrix-table {
  font-size: 13px;
}

.standings-table.matrix-table th.team-header {
  font-size: 11px;
  padding: 6px 4px;
  min-width: 60px;
  max-width: 80px;
  word-wrap: break-word;
  line-height: 1.2;
}

.standings-table.matrix-table td.h2h-cell {
  padding: 4px 2px;
  min-width: 60px;
  font-size: 12px;
}

.standings-table.matrix-table td.points-cell {
  font-weight: 800;
  font-size: 15px;
  color: #0f2858;
  background: #f0f3fb;
}

.h2h-score {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
}

.h2h-score.h2h-won {
  background: #d1fae5;
  color: #065f46;
}

.h2h-score.h2h-lost {
  background: #fee2e2;
  color: #991b1b;
}

.h2h-score.h2h-draw {
  background: #fef3c7;
  color: #92400e;
}

.sport-icon {
  font-size: 24px;
}

/* Match Details Toggle */
.match-details-section {
  margin-top: 16px;
}

.match-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: #f8f9fb;
  border: 1px solid #d4d9e5;
  border-radius: 8px;
  color: #0f2858;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.match-toggle-btn:hover {
  background: #eef1f7;
  border-color: var(--primary);
  color: var(--primary);
}

.match-toggle-btn .toggle-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.match-toggle-btn .match-count {
  color: var(--muted);
  font-weight: 500;
}

.results-match-list.collapsed {
  display: none;
}

.results-match-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-match-card {
  background: var(--surface);
  border: 1px solid #d4d9e5;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.results-match-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(15, 40, 88, 0.1);
}

.match-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.match-location {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.match-score-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.match-team {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8f9fb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.match-team.winner {
  background: #e6f4ea;
  border: 2px solid #34a853;
}

.team-name {
  font-weight: 600;
  font-size: 14px;
  color: #0f2858;
}

.team-score {
  font-weight: 800;
  font-size: 20px;
  color: var(--primary);
}

.match-team.winner .team-score {
  color: #34a853;
}

.match-vs {
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
}

.results-empty-msg {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 15px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 12px;
}

/* NEWS */
.news-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* NEWS CAROUSEL (index page) */
.news-carousel {
  overflow: hidden;
  position: relative;
}
.news-carousel-track {
  display: flex;
  gap: 0;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.news-carousel-track .news-card {
  flex: 0 0 calc(33.333% - 12px);
  margin-right: 16px;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .news-carousel-track .news-card { flex: 0 0 calc(50% - 8px); }
}
@media (max-width: 600px) {
  .news-carousel-track .news-card { flex: 0 0 calc(100% - 0px); margin-right: 0; }
}
.news-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.news-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #d0d4e4;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.news-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  overflow: hidden;
}
.news-card-img {
  width: calc(100% + 36px);
  margin: -18px -18px 14px -18px;
  height: auto;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.active {
  display: flex;
}
.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 8px 48px rgba(0,0,0,.6);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.news-date { margin: 0 0 6px; color: var(--primary-soft); font-weight: 600; font-size: 12px; }
.news-card h4 { margin: 0 0 8px; font-size: 16px; }
.news-card p  { margin: 0; color: var(--muted); font-size: 14px; }

/* NEWS PAGE - OFFICIAL STYLE */
.news-page {
  background:
    radial-gradient(1200px 520px at -10% -12%, rgba(187, 211, 247, 0.28) 0%, rgba(187, 211, 247, 0) 62%),
    radial-gradient(900px 440px at 106% 0%, rgba(214, 227, 245, 0.32) 0%, rgba(214, 227, 245, 0) 60%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fc 50%, #eef3fa 100%);
}

.news-page main.section {
  position: relative;
  overflow: hidden;
}

.news-page main.section::before {
  content: "";
  position: absolute;
  inset: -80px -120px auto;
  height: 260px;
  background:
    linear-gradient(120deg, rgba(52, 108, 190, 0.12), rgba(15, 68, 145, 0.08)),
    radial-gradient(circle at 25% 34%, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0));
  filter: blur(2px);
  pointer-events: none;
}

.news-page .container {
  position: relative;
  z-index: 1;
}

.news-page .page-title {
  font-size: clamp(30px, 4.5vw, 44px);
  letter-spacing: -0.02em;
}

.news-page .page-subtitle {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  color: #4d5a73;
  line-height: 1.65;
}

.news-page .news-grid {
  gap: 24px;
}

.news-page .news-card {
  position: relative;
  border: 1px solid rgba(27, 74, 142, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.96));
  border-radius: 18px;
  padding: 20px;
  box-shadow:
    0 12px 28px rgba(20, 48, 93, 0.11),
    0 2px 8px rgba(20, 48, 93, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.news-page .news-card::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2358a6, #4383c9);
  opacity: 0.9;
}

.news-page .news-card:hover {
  transform: translateY(-5px);
  border-color: rgba(35, 88, 166, 0.42);
  box-shadow:
    0 18px 34px rgba(20, 48, 93, 0.16),
    0 8px 14px rgba(20, 48, 93, 0.1);
}

.news-page .news-card-img {
  width: calc(100% + 40px);
  margin: -20px -20px 16px -20px;
  height: auto;
  object-fit: contain;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.news-page .news-date {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  margin: 0 0 10px;
  border-radius: 999px;
  background: rgba(45, 105, 186, 0.13);
  color: #1f4f92;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.news-page .news-card h4 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
  color: #173861;
}

.news-page .news-card p {
  margin: 0;
  color: #4c5f7f;
  font-size: 15px;
  line-height: 1.72;
}

@media (max-width: 900px) {
  .news-page .news-grid {
    gap: 16px;
  }

  .news-page .news-card {
    border-radius: 14px;
    padding: 14px;
  }

  .news-page .news-card::after {
    left: 10px;
    right: 10px;
    top: 10px;
  }

  .news-page .news-card-img {
    width: calc(100% + 28px);
    margin: -14px -14px 12px -14px;
  }

  .news-page .news-card h4 {
    font-size: 17px;
  }

  .news-page .news-card p {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* RULES */
#rules { display: none; }

.rules-section { background: #f7f9fc; }

.rules-doc-header {
  text-align: center;
  margin-bottom: 36px;
}
.rules-doc-header .page-title {
  font-size: clamp(16px, 2.5vw, 22px);
  max-width: 720px;
  margin: 0 auto 8px;
}
.rules-file-bar {
  max-width: 820px;
  margin: 0 auto 20px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.rules-file-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.rules-file-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #c8362b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.rules-file-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.rules-file-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.rules-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rules-file-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.rules-file-btn:hover { background: #0d2a6b; border-color: #0d2a6b; }
.rules-file-btn-ghost {
  background: #fff;
  color: var(--primary);
}
.rules-file-btn-ghost:hover { background: #eef3ff; color: #0d2a6b; }

.rules-pdf-viewer {
  max-width: 820px;
  margin: 0 auto 28px;
}
.rules-pdf-viewer[hidden] { display: none; }
.rules-pdf-viewer iframe {
  display: block;
  width: 100%;
  height: min(78vh, 820px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.rules-pdf-fallback {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.rules-pdf-fallback a { color: var(--primary); }

@media (max-width: 620px) {
  .rules-file-bar { flex-direction: column; align-items: stretch; }
  .rules-file-actions { justify-content: stretch; }
  .rules-file-actions .rules-file-btn { flex: 1; justify-content: center; }
  .rules-pdf-viewer iframe { height: 70vh; }
}

.rules-doc {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.rules-chapter {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
}
.rules-chapter h3 {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--primary);
  border-bottom: 2px solid #e9edfa;
  padding-bottom: 8px;
}
.rules-chapter p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}
.rules-chapter p:last-child { margin-bottom: 0; }
.rules-chapter-title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid #e9edfa;
  padding-bottom: 10px;
}
.rules-sport-title {
  margin: 18px 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #1a3a6b;
}
.rules-batlagch {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}
.rules-sublist {
  margin-top: 8px;
  padding-left: 12px;
}
.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}
.rules-table td {
  padding: 8px 14px;
  border: 1px solid #dde3f0;
}
.rules-table tr:nth-child(odd) td { background: #f6f9ff; }
.rules-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rules-list li {
  font-size: 14px;
  line-height: 1.65;
  color: #333;
  padding-left: 12px;
  border-left: 3px solid #e9edfa;
}
.rules-note {
  margin-top: 12px !important;
  color: #666 !important;
  font-size: 13px !important;
}

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

.rule-item {
  background: #f6f9ff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.5;
}

/* PDF VIEWER */
.pdf-viewer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
}

.pdf-viewer-frame {
  width: 100%;
  height: 78vh;
  min-height: 640px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.pdf-viewer-help {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 13px;
}

.pdf-viewer-help a {
  color: var(--primary);
  font-weight: 700;
}

/* FOOTER */
.site-footer {
  background: #0b1e47;
  color: #ccd9f5;
  padding: 24px 0;
  margin-top: 10px;
}
.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-wrap p { margin: 0; font-size: 13px; }
.news-card-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.news-card-imgs img {
  flex: 1 1 calc((100% - 16px) / 3);
  max-width: calc((100% - 16px) / 3);
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: zoom-in;
}

.footer-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .cat-grid, .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules-grid { grid-template-columns: 1fr; }

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

  .schedule-main-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .schedule-main-head h2 {
    font-size: 30px;
  }

  .schedule-filter {
    width: 100%;
    gap: 8px;
  }

  .schedule-filter label {
    display: none;
  }

  .status-filter-select {
    flex: 1;
    min-width: 120px;
  }

  .knockout-board {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .knockout-col h4 {
    font-size: 25px;
  }

  .knockout-scores span {
    font-size: 20px;
  }

  .group-card-title {
    font-size: 32px;
  }

  .group-table thead th {
    font-size: 12px;
  }

  .group-table tbody td {
    font-size: 14px;
    padding: 9px 8px;
  }

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

@media (max-width: 1024px) {
  .menu-toggle { display: grid; place-items: center; }

  .brand-logo {
    height: 46px;
    width: auto;
  }

  .main-nav {
    position: absolute;
    left: 0; right: 0; top: 76px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: none;
    flex-direction: column;
    padding: 10px 0;
    gap: 4px;
  }
  .main-nav.open { display: flex; }
}

@media (max-width: 720px) {
  .brand-logo { height: 40px; width: auto; }

  .cat-grid, .team-grid, .news-grid { grid-template-columns: 1fr; }

  .team-card {
    align-items: flex-start;
  }

  .team-link-arrow,
  .team-sport-tag {
    align-self: flex-start;
  }

  .results-match-list {
    grid-template-columns: 1fr;
  }

  .match-toggle-btn {
    font-size: 13px;
    padding: 10px 16px;
  }

  .results-section-title {
    font-size: 22px;
  }

  .results-sport-title {
    font-size: 18px;
  }

  .results-sport-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .sport-medals {
    width: 100%;
  }

  .standings-table.matrix-table {
    font-size: 11px;
  }

  .standings-table.matrix-table th.team-header {
    font-size: 9px;
    padding: 4px 2px;
    min-width: 45px;
  }

  .standings-table.matrix-table td.h2h-cell {
    padding: 2px 1px;
    min-width: 45px;
  }

  .group-card-title {
    font-size: 26px;
  }

  .knockout-col h4 {
    font-size: 22px;
  }

  .knockout-card {
    --ko-col-width: 72px;
  }

  .knockout-card-head {
    font-size: 14px;
  }

  .knockout-status {
    font-size: 12px;
    padding: 5px 10px;
  }

  .knockout-scores span {
    font-size: 16px;
    min-width: 40px;
  }

  .knockout-location {
    font-size: 14px;
  }

  .group-table {
    min-width: 100%;
  }

  .group-table thead th {
    font-size: 11px;
    padding: 7px 6px;
  }

  .group-table tbody td {
    font-size: 13px;
    padding: 8px 6px;
  }

  .h2h-score {
    font-size: 10px;
    padding: 1px 3px;
  }

  .standings-table {
    font-size: 12px;
  }

  .standings-table th,
  .standings-table td {
    padding: 6px 4px;
  }

  .team-sport-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .sport-menu-item {
    font-size: 13px;
  }

  .schedule-main-panel {
    padding: 10px;
  }

  .schedule-board thead th,
  .schedule-board tbody td {
    font-size: 13px;
    padding: 10px 8px;
  }

  .admin-form-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  .admin-grid-form textarea {
    grid-column: span 1;
  }

  .admin-ghost-btn {
    margin-left: 0;
  }

  .results-title {
    font-size: 32px;
  }

  .results-table th,
  .results-table td {
    font-size: 13px;
    padding: 9px 8px;
  }

  .pdf-viewer-frame {
    height: 68vh;
    min-height: 480px;
  }
}

/* ═══ Гар утасны дэлгэц (mobile responsive) ═══ */
@media (max-width: 700px) {
  /* Шигшээний bracket: багануудыг босоо давхарлана */
  .btree {
    flex-direction: column;
    gap: 12px;
    padding: 10px;
  }

  .btree-col {
    min-width: 0;
  }

  .btree-col-head {
    text-align: left;
    padding: 4px 0 8px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 4px;
    font-size: 13px;
  }

  /* Холбогч шугамууд босоо горимд утгагүй тул нуана */
  .btree-col.left .btree-pair {
    padding-right: 0;
  }

  .btree-col.left .btree-pair::before,
  .btree-col.left .btree-pair::after,
  .btree-col.left .btree-pair > .btree-card::after {
    display: none;
  }

  .btree-pair {
    padding: 4px 0;
    gap: 10px;
  }

  .bracket-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .bracket-actions-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* Админы толгой мөрүүд босоо эвхэгдэнэ */
  .teams-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .teams-toolbar-right {
    flex-direction: column;
    align-items: stretch;
  }

  .teams-toolbar-right input,
  .teams-toolbar-right select,
  .teams-toolbar-right .wizard-next,
  .teams-toolbar-right .admin-ghost-btn {
    width: 100%;
  }

  /* Modal форм нэг багана */
  .admin-modal .admin-grid-form {
    grid-template-columns: 1fr;
  }

  .admin-modal {
    padding: 14px;
    max-height: 94vh;
  }

  /* Тэмцээний дэд цэс: товчнууд тэгш өргөнтэй */
  .sub-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .sub-tab-btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  /* Zone-ын самбар */
  .zone-box-head {
    flex-wrap: wrap;
  }

  .zone-unassigned-head {
    flex-direction: column;
    align-items: stretch;
  }

  /* Нүүр хуудасны амьд мөр */
  .live-sport {
    min-width: 0;
    width: 100%;
  }

  .live-teams {
    font-size: 14px;
  }

  /* Хуваарийн жагсаалтын толгой */
  .schedule-day-head {
    flex-wrap: wrap;
    font-size: 13px;
  }

  /* Байрлалын хүснэгт жижиг үсэгтэй */
  .standings-table th,
  .standings-table td {
    font-size: 12px;
    padding: 6px 6px;
  }
}

/* ═══ Mobile: үлдсэн бүх хэсэг ═══ */
@media (max-width: 700px) {
  /* Админы дээд цэс: нэг мөрөнд хэвтээ гүйлгэнэ */
  .admin-topbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .admin-tab-btn {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
    flex-shrink: 0;
  }

  /* Спортын төрлийн товчнууд — 2 баганат тор */
  .sport-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .sport-tab {
    text-align: left;
    font-size: 13px;
    padding: 9px 10px;
  }

  /* Zone / төлөвийн шүүлтүүрүүд нэг мөрөнд гүйнэ */
  .zone-tabs,
  .status-filter {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .zone-tab,
  .status-chip {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Багуудын карт (админ) нэг багана */
  .team-grid-admin {
    grid-template-columns: 1fr;
  }

  /* Хүснэгтүүд (Дүн г.м) шахагдана */
  .admin-table th,
  .admin-table td {
    font-size: 12px;
    padding: 6px 5px;
  }

  .admin-actions-row {
    flex-wrap: wrap;
    bottom: 8px;
  }

  .admin-actions-row button {
    flex: 1;
    min-height: 42px;
  }

  /* Хуваарийн харагдац солих товчнууд тэгш өргөнтэй */
  .schedule-switch-btn {
    flex: 1;
    font-size: 13px;
    min-height: 40px;
  }

  /* Тоглолтын мөрийн доторх зай */
  .schedule-item {
    padding: 10px;
  }

  .schedule-item-actions {
    margin-left: auto;
  }

  /* Toast гар утсанд бүтэн өргөнтэй */
  .admin-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    text-align: center;
  }
}

/* ═══ Хуваарийн хуудас — гар утас ═══ */
@media (max-width: 960px) {
  /* Спортын цэс: босоо урт жагсаалтын оронд хэвтээ гүйдэг мөр */
  .sport-menu {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 8px;
  }

  .sport-menu-item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 999px;
  }

  .sport-menu-icon {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
}

@media (max-width: 700px) {
  .schedule-main-panel {
    padding: 12px;
  }

  .schedule-main-head h2 {
    font-size: 20px;
  }

  .schedule-switch {
    width: 100%;
    display: flex;
  }

  .schedule-board thead th,
  .schedule-board tbody td {
    font-size: 12px;
    padding: 8px 6px;
  }

  .team-pill {
    font-size: 11px;
    padding: 3px 7px;
  }

  .team-score span {
    font-size: 15px;
  }

  .status-pill {
    font-size: 11px;
    padding: 3px 8px;
  }

  .knockout-col h4 {
    font-size: 18px;
  }

  .group-card-title {
    font-size: 20px;
  }

  .schedule-filter {
    flex-wrap: wrap;
  }

  .status-filter-select {
    width: 100%;
    min-height: 40px;
  }
}

/* ═══ Гар утас: хүснэгтийг карт болгох + ерөнхий нягтрал ═══ */
@media (max-width: 700px) {
  /* Хуваарийн хүснэгт → карт жагсаалт (хэвтээ гүйлгэлт хэрэггүй) */
  .schedule-board-wrap {
    border: none;
    overflow: visible;
  }

  .schedule-board {
    min-width: 0;
  }

  .schedule-board thead {
    display: none;
  }

  .schedule-board,
  .schedule-board tbody {
    display: block;
    width: 100%;
  }

  .schedule-board tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 10px 12px;
    margin-bottom: 10px;
  }

  .schedule-board tbody td {
    display: block;
    border: none;
    padding: 2px 0;
  }

  /* № — цэнхэр тод */
  .schedule-board tbody td:nth-child(1) {
    font-weight: 800;
    color: var(--primary);
    font-size: 14px;
  }

  /* Байршил — саарал жижиг */
  .schedule-board tbody td:nth-child(2) {
    flex: 1;
    font-size: 12px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Төлөв — баруун захад */
  .schedule-board tbody td:nth-child(4) {
    margin-left: auto;
  }

  /* Багууд + оноо — бүтэн мөрөнд голлуулж */
  .schedule-board tbody td:nth-child(3) {
    width: 100%;
    order: 5;
    padding-top: 6px;
  }

  .match-stack {
    align-items: center;
  }

  /* Ерөнхий нягтрал */
  .section {
    padding: 28px 0;
  }

  .container {
    padding: 0 14px;
  }

  .page-title {
    font-size: 24px;
  }

  .page-subtitle {
    font-size: 14px;
  }

  .section-title {
    font-size: 20px;
  }

  .hero-poster {
    max-height: 46vh;
    object-fit: contain;
  }

  /* Footer босоо, голлосон */
  .footer-wrap {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* Байрлалын matrix хүснэгтийн гүйлгэлтийн дохио */
  .group-table-wrap {
    position: relative;
  }
}

/* Маш нарийн дэлгэц (жижиг утас) */
@media (max-width: 400px) {
  .sport-tabs {
    grid-template-columns: 1fr;
  }

  .sub-tabs {
    grid-template-columns: 1fr;
  }

  .live-teams {
    font-size: 13px;
  }

  .btree-row {
    font-size: 12px;
  }

  .schedule-item {
    font-size: 13px;
  }
}

/* ═══ Гар утас: хальж урсахаас хамгаалах ═══ */
@media (max-width: 700px) {
  html, body {
    overflow-x: hidden;
  }

  /* Шүүлтүүрүүд: 2 баганат тор, шошготой */
  .schedule-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .schedule-filter label {
    display: none;
  }

  .schedule-filter .status-filter-select {
    width: 100%;
    min-width: 0;
  }

  /* Bracket өргөнөө хязгаарлана */
  .btree {
    max-width: 100%;
  }

  .btree-card {
    max-width: 100%;
  }
}

/* ═══ Өргөн хүснэгтүүд: дотроо гүйлгэнэ, хуудсыг сунгахгүй ═══ */
.group-table-wrap,
.results-table-wrap,
.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.standings-table.matrix-table th,
.standings-table.matrix-table td {
  white-space: nowrap;
}

@media (max-width: 700px) {
  /* Matrix хүснэгт: илүү шахмал, гүйлгэхэд ойлгомжтой */
  .standings-table.matrix-table {
    font-size: 11px;
  }

  .standings-table.matrix-table th,
  .standings-table.matrix-table td {
    padding: 4px 4px;
  }

  .standings-table.matrix-table .team-name-cell {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
  }

  .group-table-wrap {
    border-radius: 10px;
    border: 1px solid var(--border);
  }

  /* Дүнгийн үндсэн хүснэгт */
  .results-table-wrap table {
    font-size: 12px;
  }
}

/* Гоц багийн нэр бүтэн харагдана (мөр дамжина) */
.btree-bye-card .btree-row span:not(.btree-bye-badge) {
  white-space: normal;
  line-height: 1.25;
}

/* ═══ Mobile fix: grid хүүхдүүд агуулгаараа хуудсыг сунгахгүй ═══ */
@media (max-width: 960px) {
  .schedule-layout > * {
    min-width: 0;
    max-width: 100%;
  }

  .schedule-main-panel,
  .schedule-view-panel {
    min-width: 0;
    max-width: 100%;
  }

  .schedule-main-head,
  .schedule-switch {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .schedule-switch-btn {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* Шүүлтүүрийн select урт нэрээрээ хуудсыг сунгахгүй */
@media (max-width: 700px) {
  .schedule-filter {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Толгойн логонууд утсанд багтана */
@media (max-width: 700px) {
  .nav-wrap {
    flex-wrap: wrap;
    min-width: 0;
    gap: 6px;
  }

  .brand-logo {
    height: 30px !important;
    width: auto;
  }

  .site-header .brand,
  .site-header .brand-logos {
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
  }
}
