/* Desktop readability floor for dense operations screens. */
@media (min-width: 768px) {
  .turbo-admin { font-size: 14px; line-height: 1.6; }
  .turbo-sidebar { font-size: 14px; }
  .turbo-sidebar small,
  .turbo-main small,
  .turbo-main .text-muted { font-size: 12px !important; line-height: 1.65; }

  .turbo-main .btn,
  .turbo-main .form-control,
  .turbo-main .form-select,
  .turbo-main label { font-size: 13px !important; line-height: 1.55; }

  .turbo-main .form-control,
  .turbo-main .form-select,
  .turbo-main select,
  .turbo-main input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 43px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .turbo-page-header h1 { font-size: 27px; line-height: 1.25; }
  .turbo-page-subtitle { font-size: 14px !important; }
  .ts-content-heading h3,
  .ts-panel-head h3,
  .card-title { font-size: 17px !important; line-height: 1.4; }

  .turbo-main .table thead th,
  .turbo-main .table tbody td,
  .turbo-main .ts-data-table tbody td { font-size: 13px !important; line-height: 1.6; }

  .ts-kpi .trend,
  .ts-panel-head p,
  .ts-panel-head .btn,
  .ts-chart-summary span,
  .ts-league strong,
  .ts-status-item strong,
  .ts-status-item em,
  .ts-quick strong,
  .ts-detail-row,
  .ts-detail-tabs span,
  .ts-scoreboard strong,
  .ts-list-tabs a,
  .ts-list-toolbar select,
  .ts-list-toolbar input,
  .ts-list-footer,
  .ts-user-toolbar select,
  .ts-detail-section-title,
  .ts-permission-preview span,
  .ts-permission-preview em,
  .ts-role-description,
  .ts-role-permissions span,
  .ts-internal-account-strip small,
  .ts-internal-account-strip span,
  .ts-internal-account-create .text-muted { font-size: 12px !important; line-height: 1.6; }

  .ts-list-toolbar select,
  .ts-list-toolbar input { min-height: 41px; }
  .ts-data-table tbody td { padding-top: 13px !important; padding-bottom: 13px !important; }
  .ts-filter-panel,
  .turbo-filterbar { gap: 14px !important; }
  .ts-filter-panel > label { min-width: 170px; }
  .turbo-stat-card .label { font-size: 13px !important; }
}

.ts-match-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ts-list-tabs { overflow-x: auto; }
.ts-list-tabs a { flex: 0 0 auto; white-space: nowrap; }
.ts-analytics-filter-panel { padding: 22px 24px; }
.ts-analytics-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
  align-items: end;
}
.ts-analytics-user-filter { grid-column: span 4; }
.ts-analytics-filter-action { min-width: 150px; }
.ts-analytics-overview { align-items: start; }
.ts-analytics-overview > .ts-list-panel { align-self: start; }
.ts-analytics-overview > .ts-list-panel:nth-child(2) { padding-bottom: 22px; }
.turbo-main .ts-dashboard-grid.ts-analytics-balanced-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
}
.ts-analytics-balanced-grid > .ts-list-panel {
  min-width: 0;
  padding: 24px 26px;
}
.ts-analytics-balanced-grid .ts-data-table td {
  padding-left: 14px !important;
  padding-right: 14px !important;
  white-space: normal;
}

/* Match rows use two equal team columns around a fixed centre marker. */
.ts-data-table tbody .ts-match-row > td {
  height: 72px;
  vertical-align: middle;
}
.ts-data-table tbody td .ts-versus.ts-versus--balanced {
  display: grid;
  grid-template-columns: minmax(122px, 1fr) 40px minmax(122px, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 330px;
  min-height: 44px;
  white-space: normal;
}
.ts-data-table tbody td .ts-versus-team {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: 42px;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 220px;
  height: 42px;
  min-width: 0;
}
.ts-data-table tbody td .ts-versus-team--home {
  grid-template-columns: minmax(0, 1fr) 36px;
  justify-self: end;
}
.ts-data-table tbody td .ts-versus-team--away {
  justify-self: start;
}
.ts-data-table tbody td .ts-versus-team--home .ts-club {
  grid-column: 2;
  grid-row: 1;
}
.ts-data-table tbody td .ts-versus-team--home .ts-versus-copy {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
}
.ts-data-table tbody td .ts-versus-team .ts-club {
  width: 36px;
  height: 36px;
  margin: 0;
}
.ts-data-table tbody td .ts-versus-team .ts-club img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ts-data-table tbody td .ts-versus-copy {
  display: grid;
  grid-template-rows: 20px 16px;
  align-content: center;
  min-width: 0;
  height: 42px;
  margin: 0;
  text-align: left;
}
.ts-data-table tbody td .ts-versus-copy strong {
  display: block;
  align-self: end;
  overflow: hidden;
  margin: 0;
  color: #282b36;
  font-size: 13px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ts-data-table tbody td .ts-versus-copy .ts-versus-role {
  display: block;
  align-self: start;
  margin: 0;
  color: #9a9ead !important;
  font-size: 10px !important;
  line-height: 16px !important;
  text-align: left !important;
}
.ts-data-table tbody td .ts-versus-team--home .ts-versus-copy strong,
.ts-data-table tbody td .ts-versus-team--home .ts-versus-copy .ts-versus-role {
  text-align: right !important;
}
.ts-data-table tbody td .ts-versus-divider {
  display: grid;
  place-items: center;
  width: 40px;
  height: 32px;
  margin: 0;
  border: 1px solid #e6e8ef;
  border-radius: 9px;
  color: #777d8f;
  background: #f7f8fa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
}

@media (max-width: 1399px) {
  .ts-match-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ts-analytics-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .ts-analytics-user-filter { grid-column: span 2; }
}

@media (max-width: 1199px) {
  .turbo-main .ts-dashboard-grid.ts-analytics-balanced-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 767px) {
  .ts-match-stats,
  .ts-analytics-filters { grid-template-columns: 1fr; }
  .ts-analytics-user-filter { grid-column: auto; }
}
