/* Tema oscuro - Argentina Mesas */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: #1a1a1a;
  color: #ffffff;
  margin: 0;
  padding: 0;
}

/* Tabla */
.custom-table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 20px;
  background-color: #505050;
}

.custom-table th,
.custom-table td {
  border: 1px solid #555;
  padding: 8px;
  text-align: center;
}

.custom-table th {
  background-color: #222222;
  color: #ffffff;
}

.custom-table td {
  background-color: #444444;
}

.custom-table td .date {
  font-size: 1.1em;
  color: #6897BB;
}

.custom-table td span {
  color: #e91e63;
  font-weight: bold;
  font-size: 0.8em;
}

.custom-table td .date,
.custom-table td .finalfecha,
.custom-table td .time-remaining {
  color: #ffffff;
  font-size: 0.9em;
}

.custom-table td .finalfecha {
  color: #A9B7C6;
  font-size: 1em;
}

.custom-table td .time-remaining {
  color: #CC7832;
}

/* Bloques Mesa 1, 2, 3 */
.sistemas-info {
  box-sizing: border-box;
  padding: 20px;
  display: flex;
  gap: 20px;
}

.mesa {
  background-color: #333333;
  border-radius: 10px;
  padding: 15px;
  box-sizing: border-box;
}

.mesa__title {
  color: #ff6666;
  font-size: 1.2em;
  margin-bottom: 10px;
}

.mesa__list {
  padding-left: 0;
  list-style-type: none;
  margin: 0;
}

.mesa__list li {
  margin-bottom: 5px;
  font-size: 0.9em;
}

.icon {
  margin-right: 5px;
}

/* Selector de período */
.periodo-selector {
  margin: 20px 0;
}

.periodo-selector label {
  color: #ffffff;
}

.periodo-selector select {
  padding: 8px;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
  border: 1px solid #555;
}

/* Toggle de vista (tabla / calendario) */
.vista-toggle {
  margin: 12px 0;
}

.toggle-btn {
  background-color: #333333;
  color: #ffffff;
  border: 1px solid #555555;
  border-radius: 6px;
  padding: 8px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9em;
  cursor: pointer;
}

.toggle-btn:hover {
  border-color: #ff6666;
  color: #ff6666;
}

.vista--oculta {
  display: none;
}

/* Calendario */
.calendario-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.calendario-nav-btn {
  background-color: #333333;
  color: #ffffff;
  border: 1px solid #555555;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 1.1em;
  cursor: pointer;
}

.calendario-nav-btn:hover:not(:disabled) {
  border-color: #ff6666;
  color: #ff6666;
}

.calendario-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.calendario-titulo {
  font-size: 1.1em;
  font-weight: bold;
  min-width: 160px;
  text-align: center;
}

.calendario-leyenda {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
  font-size: 0.85em;
  color: #A9B7C6;
}

.leyenda-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.leyenda-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.calendario-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 20px;
}

.calendario-dia-header {
  text-align: center;
  font-weight: bold;
  color: #ffffff;
  background-color: #222222;
  padding: 6px 0;
  border-radius: 4px;
  font-size: 0.85em;
}

.calendario-dia {
  background-color: #444444;
  border: 1px solid #555555;
  border-radius: 4px;
  min-height: 60px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.calendario-dia--vacio {
  background-color: transparent;
  border: none;
}

.calendario-dia-numero {
  font-size: 0.9em;
  color: #ffffff;
}

.calendario-dia--hoy {
  border-color: #ff6666;
  box-shadow: 0 0 0 1px #ff6666;
}

.evento {
  font-size: 0.7em;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 3px;
  color: #1a1a1a;
}

.evento--inscripcion,
.leyenda-color.evento--inscripcion {
  background-color: #CC7832;
}

.evento--examen,
.leyenda-color.evento--examen {
  background-color: #6897BB;
}

/* Mensaje de error */
.mensaje-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin: 1rem;
  border-left: 4px solid #e74c3c;
}

/* Responsive */
@media (orientation: landscape) {
  .sistemas-info {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .mesa {
    flex: 0 1 calc(33.333% - 10px);
    min-width: 0;
    max-width: calc(33.333% - 10px);
  }
}

@media (orientation: portrait) {
  .sistemas-info {
    flex-direction: column;
    align-items: stretch;
  }

  .mesa {
    width: 100%;
    max-width: 100%;
  }
}

@media screen and (min-width: 992px) {
  .sistemas-info {
    justify-content: space-between;
  }
}

@media screen and (max-width: 600px) {
  .custom-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .custom-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .custom-table tr {
    border: 1px solid #555;
  }

  .custom-table td {
    display: block;
    text-align: center;
    border-bottom: 1px solid #555;
    position: relative;
  }

  .custom-table td::before {
    content: attr(data-title);
    position: absolute;
    top: -10px;
    left: 0;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8em;
    color: #A9B7C6;
  }

  .calendario-grid {
    gap: 2px;
  }

  .calendario-dia {
    min-height: 44px;
    padding: 3px;
    gap: 2px;
  }

  .calendario-dia-header {
    font-size: 0.7em;
    padding: 4px 0;
  }

  .calendario-dia-numero {
    font-size: 0.75em;
  }

  .evento {
    font-size: 0.6em;
    padding: 1px 3px;
  }

  .calendario-titulo {
    font-size: 0.95em;
    min-width: 120px;
  }
  
  .form-inline {
  display: inline;
  }
}
