html,
body {
  height: 100%;
}

body {
  margin: 0;
  background-color: #212121;
  color: #fff;
}

.page-wrapper {
  min-height: 100%;
}

.text-page,
.titulo-deporte {
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
}

.sport-card {
  background: transparent;
  border: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sport-card:hover,
.sport-card.active {
  opacity: 1;
  transform: translateY(-3px);
}

.calendar-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(138, 208, 0, 0.4);
  border-radius: 8px;
  padding: 1rem;
}

.calendar-panel .form-control {
  background: #212121;
  color: #fff;
  border-color: #7bc800;
}

.legend {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid #111;
}

.legend-free {
  background: #7bc800c9;
  color: #111;
}

.legend-eventual {
  background: #f7ff0bc9;
  color: #111;
}

.legend-fixed {
  background: #50790ec9;
  color: #fff;
}

.grid-shell {
  max-width: 1120px;
  margin-inline: auto;
}

.title-rail {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding-inline: 0.25rem;
}

#gridTitle {
  transform: none;
  white-space: normal;
  writing-mode: initial;
  margin: 0;
}

.subtitle {
  writing-mode: initial;
  transform: none;
  white-space: normal;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-align: right;
}

.table-wrap {
  display: flex;
  justify-content: center;
}

.table-wrap .table-responsive {
  width: auto;
  max-width: 100%;
}

#gridTable {
  width: auto;
  min-width: 680px;
  margin-bottom: 0;
  margin-inline: auto;
}

#gridTable th,
#gridTable td {
  text-align: center;
  font-weight: 700;
  border: 1px solid #000000cc;
  vertical-align: middle;
}

#gridTable td {
  min-height: 30px;
  line-height: 1.05;
  background-color: #7bc800c9;
  color: #111;
}

.grid-cell-fixed {
  background-color: #50790ec9 !important;
  color: #fff !important;
}

.grid-cell-eventual {
  background-color: #f7ff0bc9 !important;
  color: #111 !important;
}

.grid-cell-free {
  background-color: #7bc800c9 !important;
  cursor: pointer;
}

.grid-cell-free:hover {
  filter: brightness(0.92);
}

@media (max-width: 1200px) {
  .title-rail {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding-inline: 0.35rem;
  }

  #gridTable {
    min-width: 620px;
  }
}

@media (max-width: 768px) {
  .title-rail {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .subtitle {
    text-align: left;
  }

  #gridTable {
    min-width: 560px;
  }
}
