/* Estilos generales */
:root {
    --primary-color: #2c6ad5;
    --primary-dark: #1d4e9e;
    --secondary-color: #fff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #f4f7fc;
    --card-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  }
  
  body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
  }
  
  .container {
    padding-top: 10px;
    padding-bottom: 20px;
  }

  .custom-green-button {
  background-color: rgb(93, 233, 252);
  border-color: rgb(63, 140, 255);
  color: rgb(41, 41, 41); /* O el color de texto que prefieras */
  }

  .custom-green-button:hover {
  background-color: rgb(117, 117, 117);
  border-color: rgb(255, 255, 255);
  color: rgb(255, 255, 255);
  }
  
  /* Barra de navegación */
  .navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1rem;
  }
  
  .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
  }
  
  .navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
  }
  
  .navbar-nav .nav-link:hover {
    color: var( --light-color);
    transform: translateY(-2px);
  }
  
  .navbar-nav .nav-link.active {
    color: var(--light-color);
    border-bottom: 2px solid var(--light-color);
  }
  
  /* Tarjetas */
  .card {
    border: none;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
  }
  
  .card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.2rem 1.5rem;
  }
  
  .card-title {
    font-weight: 600;
    margin-bottom: 0;
    color: var(--primary-dark);
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .card-footer {
    background-color: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
  }
  
  /* Botones */
  .btn {
    border-radius: 5px;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    transition: all 0.3s ease;
  }
  
  .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(44, 106, 213, 0.3);
  }
  
  .btn-success {
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  }
  
  .btn-danger {
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
  }
  
  .btn-success:hover, .btn-danger:hover {
    transform: translateY(-2px);
  }
  
  /* Formularios */
  .form-control {
    border-radius: 5px;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }
  
  .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 106, 213, 0.25);
  }
  
  .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
  }
  
  /* Tablas */
  .reservation-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  }
  
  .reservation-table th {
    background-color: #f1f5ff;
    color: var(--primary-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.75rem;
  }
  
  .reservation-table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
  }
  
  .reservation-table tr:last-child td {
    border-bottom: none;
  }
  
  .reservation-table tr:hover td {
    background-color: #f9fbff;
  }
  
  .reservation-table td.selected {
    background-color: #e5efff;
    border: 2px solid var(--primary-color);
  }

  .reservation-table th,
  .reservation-table td {
    width: 14.28%; /* 100% ÷ 7 días = 14.28% */
  }

  .reservation-table th:first-child,
  .reservation-table td:first-child {
    width: 80px; /* Ancho fijo para la columna de horas */
  }
  
  /* Badges y alerts */
  .badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    border-radius: 4px;
  }
  
  .alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  }
  
  /* Estilos para estados de reserva */
  .reservation-active {
    border-left: 4px solid var(--success-color);
    background-color: rgba(40, 167, 69, 0.05);
  }
  
  .reservation-canceled {
    border-left: 4px solid var(--danger-color);
    background-color: rgba(220, 53, 69, 0.05);
    opacity: 0.7;
  }
  
  .reservation-completed {
    border-left: 4px solid var(--secondary-color);
    background-color: rgba(108, 117, 125, 0.05);
  }
  
  /* Contenedor de login */
  .login-container {
    max-width: 450px;
    margin: 60px auto;
  }
  
  .login-logo {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .login-logo h2 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
  }
  
  /* Asegurar que el icono de tenis siempre sea visible */
  .login-logo i.fa-table-tennis {
    display: block !important;
    margin: 0 auto !important;
    font-size: 3rem !important;
    color: var(--primary-color) !important;
    margin-bottom: 15px !important;
  }
  
  /* Asegurar que el título siempre sea visible */
  .login-logo h2 {
    display: block !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    margin-bottom: 5px !important;
  }
  
  /* Asegurar que el nombre de la unidad siempre sea visible */
  .login-logo p.text-muted {
    display: block !important;
    color: #6c757d !important;
    margin-bottom: 0 !important;
  }
  
  /* Diseño para el panel principal */
  .stats-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
  }
  
  .stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    color: white;
    font-size: 1.8rem;
  }
  
  .stats-icon.stats-primary {
    background-color: var(--primary-color);
  }
  
  .stats-icon.stats-success {
    background-color: var(--success-color);
  }
  
  .stats-icon.stats-danger {
    background-color: var(--danger-color);
  }
  
  .stats-icon.stats-warning {
    background-color: var(--warning-color);
  }
  
  .stats-info h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
  }
  
  .stats-info p {
    color: var(--secondary-color);
    margin-bottom: 0;
  }
  
  /* Animaciones */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .card, .alert, .btn {
    animation: fadeIn 0.5s ease-out;
  }
  
  /* Estilos para el reloj */
  #clock {
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    background-color: var(--light-color);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
    color: var(--primary-dark);
  }
  
  /* Estilos para dispositivos móviles */
  @media (max-width: 768px) {
    .reservation-table {
      font-size: 0.85rem;
    }
    
    .reservation-table .btn {
      padding: 0.25rem 0.5rem;
      font-size: 0.75rem;
    }
    
    .card-title {
      font-size: 1.25rem;
    }
    
    .stats-icon {
      width: 50px;
      height: 50px;
      font-size: 1.5rem;
    }
    
    .stats-info h4 {
      font-size: 1.5rem;
    }
  }
  
  /* Estilos para barra de desplazamiento */
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: #aaa;
  }

  /* Asegurar que todos los botones de reserva tengan la misma altura */
.reservation-table .btn,
.tab-content .btn {
    height: 38px;           /* Altura fija para todos los botones */
    display: flex;          /* Usar flexbox para centrar contenido */
    align-items: center;    /* Centrar verticalmente */
    justify-content: center; /* Centrar horizontalmente */
    text-align: center;     /* Asegurar texto centrado */
    padding: 0.375rem 0.75rem; /* Padding estándar de Bootstrap */
    white-space: nowrap;    /* Evitar saltos de línea */
}
  


  /* Estilos para el selector de días */
.calendar-view {
  padding-bottom: 30px;
}

.day-selector {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 30px;
  scrollbar-width: none; /* Firefox */
}

.day-selector::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.day-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  color: #495057;
  text-decoration: none;
  z-index: 2;
}

.prev-arrow {
  left: 0;
}

.next-arrow {
  right: 0;
}

.day-item {
  flex: 0 0 80px;
  margin: 0 5px;
  padding: 10px 0;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.day-item.active {
  background-color: #3f51b5;
  color: white;
  box-shadow: 0 3px 10px rgba(63, 81, 181, 0.2);
}

.day-item.today {
  border: 2px solid #3f51b5;
}

.day-number {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.day-name {
  font-size: 0.8rem;
  text-transform: uppercase;
}

/* Estilos para las franjas horarias */
.time-slots {
  padding: 10px 0 30px;
}

.time-slot {
  display: block;
  width: 100%;
  padding: 15px 10px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  background: #ffffff;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  cursor: pointer;
  text-decoration: none;
}

.time-slot span {
  display: block;
  font-weight: bold;
  color: #495057;
  font-size: 1.1rem;
}

.time-slot small {
  display: block;
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 3px;
}

.time-slot.available {
  border: 1px solid #28a745;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.15);
}

.time-slot.available:hover {
  background-color: #28a745;
}

.time-slot.available:hover span {
  color: white;
}

.time-slot.reserved {
  background-color: #eee;
  border: 1px solid #dc3545;
  cursor: not-allowed;
}

.time-slot.reserved-mine {
  background-color: #e8f4ff;
  border: 1px solid #007bff;
  cursor: not-allowed;
}

.time-slot.disabled {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  opacity: 0.7;
  cursor: not-allowed;
}

.time-slot.locked {
  background-color: #f8f9fa;
  border: 1px dashed #adb5bd;
  cursor: not-allowed;
}

/* Estilos para la leyenda */
.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  margin-right: 10px;
}

.legend-color.available {
  border: 1px solid #28a745;
}

.legend-color.reserved {
  border: 1px solid #dc3545;
  background-color: #eee;
}

.legend-color.reserved-mine {
  border: 1px solid #007bff;
  background-color: #e8f4ff;
}

.legend-color.disabled {
  border: 1px solid #e9ecef;
  background-color: #f8f9fa;
  opacity: 0.7;
}

/* Asegurar buen contraste en los botones de navegación activos */
.nav-pills .nav-link.active.text-white {
  color: #fff !important;
}

/* Estilo para el botón activo */
.nav-pills .nav-link.active {
  background-color: #00c372;
}

/* Ajuste para dispositivos muy pequeños */
@media (max-width: 360px) {
  .nav-pills .nav-link {
      font-size: 0.85rem;
      padding: 0.4rem 0.2rem;
  }
}

/* ===================================
   NAVEGACIÓN MÓVIL - FOOTER FIJO
   =================================== */

/* Footer de navegación móvil */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Items de navegación móvil */
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #6c757d;
  transition: all 0.3s ease;
  padding: 5px 8px;
  border-radius: 8px;
  min-width: 50px;
  flex: 1;
  max-width: 70px;
}

.mobile-nav-item i {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.mobile-nav-item span {
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.1;
}

/* Estado activo del item de navegación */
.mobile-nav-item.active {
  color: var(--primary-color);
  background-color: rgba(44, 106, 213, 0.1);
}

.mobile-nav-item.active i {
  color: var(--primary-color);
}

/* Hover effect para items no activos */
.mobile-nav-item:not(.active):hover {
  color: #495057;
  text-decoration: none;
}

/* ===================================
   AJUSTES RESPONSIVOS
   =================================== */

/* Estilos específicos para móviles */
@media (max-width: 991.98px) {
  /* Ajustar el body para el footer fijo */
  body {
    padding-bottom: 70px; /* Espacio para el footer móvil */
  }
  
  /* Centrar la marca en el navbar móvil */
  .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1rem;
  }
  
  /* Asegurar que el contenido no se solape */
  .container {
    margin-bottom: 20px;
  }
  
  /* Ajustar margen inferior en móviles */
  .mt-5 {
    margin-top: 2rem !important;
  }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 375px) {
  .mobile-nav-item {
    min-width: 45px;
    max-width: 60px;
    padding: 3px 5px;
  }
  
  .mobile-nav-item i {
    font-size: 1.1rem;
  }
  
  .mobile-nav-item span {
    font-size: 0.65rem;
  }
  
  .navbar-brand {
    font-size: 1rem;
  }
}

/* Ajustes para iPhone con notch */
@supports (padding: max(0px)) {
  .mobile-bottom-nav {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}

/* ===================================
   ESTADOS ESPECIALES
   =================================== */

/* Para pantallas en landscape móvil */
@media (max-height: 500px) and (max-width: 991.98px) {
  .mobile-bottom-nav {
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
  }
  
  .mobile-nav-item {
    padding: 2px 5px;
  }
  
  .mobile-nav-item i {
    font-size: 1rem;
    margin-bottom: 1px;
  }
  
  .mobile-nav-item span {
    font-size: 0.6rem;
  }
  
  body {
    padding-bottom: 55px;
  }
}

/* Evitar conflictos con modals y dropdowns */
.modal-open .mobile-bottom-nav,
.dropdown-menu + .mobile-bottom-nav {
  z-index: 999;
}

/* Animaciones suaves para cambios de estado */
.mobile-nav-item {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item:active {
  transform: scale(0.95);
}

/* ===================================
   NAVBAR CON TÍTULO Y SUBTÍTULO MÓVIL
   =================================== */

/* Estructura del brand */
.brand-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-title {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 0.2rem;
    line-height: 1.1;
}

/* Ajustes específicos para móviles */
@media (max-width: 991.98px) {
  /* Aumentar altura del navbar en móviles */
  .mobile-navbar {
    padding: 1.2rem 0 !important;
    min-height: 85px;
  }
  
  /* Mejorar el título en móviles */
  .mobile-brand {
    padding: 0.5rem 0 !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    text-decoration: none !important;
  }
  
  /* Título principal en móviles */
  .brand-title {
    font-size: 1.7rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }
  
  /* Subtítulo en móviles */
  .brand-subtitle {
    font-size: 0.85rem !important;
    font-weight: 300 !important;
    opacity: 0.95 !important;
    margin-top: 0.3rem !important;
    letter-spacing: 0.5px;
  }
  
  /* Asegurar centrado perfecto */
  .mobile-navbar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 65px;
  }
  
  /* Icono del logo en móviles */
  .brand-title .fas.fa-tennis-ball {
    font-size: 1.5rem !important;
    margin-right: 0.5rem !important;
  }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 375px) {
  .mobile-navbar {
    min-height: 80px;
  }
  
  .brand-title {
    font-size: 1.5rem !important;
  }
  
  .brand-subtitle {
    font-size: 0.75rem !important;
  }
  
  .brand-title .fas.fa-tennis-ball {
    font-size: 1.3rem !important;
  }
}

/* ===================================
   MEJORAS PARA NAVBAR MÓVIL
   =================================== */

/* Ajustes específicos para móviles */
@media (max-width: 991.98px) {
  /* Aumentar altura del navbar en móviles */
  .mobile-navbar {
    padding: 1rem 0 !important;
    min-height: 70px;
  }
  
  /* Mejorar el título en móviles */
  .mobile-brand {
    font-size: 1.8rem !important; /* Aumentar tamaño de fuente */
    font-weight: 700 !important;
    padding: 0.5rem 0 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
  }
  
  /* Asegurar centrado perfecto */
  .mobile-navbar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
  }
  
  /* Icono del logo en móviles */
  .mobile-brand .fas.fa-tennis-ball {
    font-size: 1.6rem !important;
    margin-right: 0.5rem !important;
  }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 375px) {
  .mobile-brand {
    font-size: 1.6rem !important;
  }
  
  .mobile-brand .fas.fa-tennis-ball {
    font-size: 1.4rem !important;
  }
}

/* Ajustes para pantallas medianas (tablets en portrait) */
@media (min-width: 576px) and (max-width: 991.98px) {
  .mobile-brand {
    font-size: 2rem !important;
  }
  
  .mobile-brand .fas.fa-tennis-ball {
    font-size: 1.8rem !important;
  }
}