/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: #f6f8fa;
  color: #222;
  min-height: 100vh;
}
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: #204188;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 32px 0;
  box-shadow: 2px 0 8px rgba(32, 65, 136, 0.08);
}
.logo {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.logo img {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}
.sidebar nav ul {
  list-style: none;
}
.sidebar nav ul li {
  padding: 16px 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  border-left: 4px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.sidebar nav ul li.active, .sidebar nav ul li:hover {
  background: #16316a;
  border-left: 4px solid #fe6702;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #204188;
}
.header-actions button {
  background: #fe6702;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  margin-left: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.header-actions button:hover {
  background: #ff8c42;
}

.export-btn {
  background: #4CAF50 !important;
  color: white !important;
}

.export-btn:hover {
  background: #45a049 !important;
}

.user-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.user-modal-header h2 {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.reset-password-btn {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%) !important;
  color: white !important;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.reset-password-btn:hover {
  background: linear-gradient(135deg, #FB8C00 0%, #EF6C00 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.reset-password-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.emit-membership-btn {
  background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%) !important;
  color: white !important;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.emit-membership-btn:hover {
  background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.emit-membership-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.reset-modal-confirm-btn {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.reset-modal-confirm-btn:hover {
  background: linear-gradient(135deg, #FB8C00 0%, #EF6C00 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.reset-modal-cancel-btn {
  background: #666;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.reset-modal-cancel-btn:hover {
  background: #555;
  transform: translateY(-2px);
}

.logout-btn {
  background: #f44336 !important;
  color: white !important;
}

.logout-btn:hover {
  background: #d32f2f !important;
}

/* Stats */
.stats {
  display: flex;
  gap: 32px;
  align-items: stretch;
  flex-wrap: wrap;
}

/* Info Banner */
.info-banner {
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.stat-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(32, 65, 136, 0.07);
  padding: 32px 40px;
  min-width: 180px;
  text-align: center;
}
.stat-card h2 {
  font-size: 2.5rem;
  color: #204188;
}
.stat-card p {
  color: #888;
  margin-top: 8px;
}

/* Tables */
.tables {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.table-section {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(32, 65, 136, 0.07);
  padding: 24px;
  flex: 1 1 400px;
  min-width: 340px;
}
.table-section h3 {
  margin-bottom: 16px;
  font-size: 1.2rem;
  color: #204188;
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead {
  background: #f6f8fa;
}
th, td {
  padding: 12px 8px;
  text-align: left;
}
th {
  color: #204188;
  font-weight: 600;
}
tbody tr {
  border-bottom: 1px solid #eee;
}
tbody tr:last-child {
  border-bottom: none;
}
td button {
  background: #fe6702;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}
td button:hover {
  background: #ff8c42;
}

/* Delete button styles */
.delete-btn {
  background: #f44336 !important;
  font-size: 0.85rem !important;
  padding: 4px 10px !important;
}
.delete-btn:hover {
  background: #d32f2f !important;
}

/* Status styles */
.status-programada {
  background: #2196F3;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-completada {
  background: #4CAF50;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-cancelada {
  background: #f44336;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Estilos para resaltar clases disponibles */
.available-classes {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%) !important;
  color: white !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3) !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
  text-align: center !important;
  margin: 8px 0 !important;
  animation: pulse-available 2s infinite !important;
}

@keyframes pulse-available {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Estilos para clases usadas (menos prominentes) */
.used-classes {
  background: #f5f5f5 !important;
  color: #666 !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 0.9rem !important;
  text-align: center !important;
  margin: 4px 0 !important;
}

/* Estilos para total de clases */
.total-classes {
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%) !important;
  color: white !important;
  padding: 10px 14px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin: 6px 0 !important;
}

/* Estilos para la tabla de usuarios */
.table-section.full-width {
  flex: 1 1 100%;
  min-width: 100%;
}

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

.table-section h3 {
  font-size: 1.4rem;
  color: #204188;
  font-weight: 600;
  margin: 0;
}

.filters-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  padding: 12px 16px;
  padding-right: 40px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  width: 250px;
  transition: all 0.2s ease;
  background: white;
}

.filter-input {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  min-width: 150px;
  transition: all 0.2s ease;
  background: white;
}

.search-input:focus,
.filter-input:focus {
  outline: none;
  border-color: #204188;
  box-shadow: 0 0 0 3px rgba(32, 65, 136, 0.1);
}

.search-icon {
  position: absolute;
  right: 12px;
  color: #888;
  font-size: 0.9rem;
}

/* Estilos para filas clickeables */
tbody tr {
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

tbody tr:hover {
  background-color: #f8f9fa;
  cursor: pointer;
}

/* Estilos para el modal de clases */
.modal-content.large-modal {
  min-width: 1000px;
  max-width: 1200px;
  max-height: 95vh;
  overflow-y: auto;
}

.classes-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.category-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(32, 65, 136, 0.1);
}

.category-card h3 {
  margin: 0 0 16px 0;
  font-size: 1.2rem;
  color: #204188;
  font-weight: 600;
  text-align: center;
}

.category-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.stat-label {
  font-weight: 500;
  color: #666;
  font-size: 0.9rem;
}

.stat-value {
  font-weight: 600;
  color: #204188;
  font-size: 1.1rem;
}

/* Estilos específicos para cada tipo de estadística */
.stat-item.total {
  background: transparent !important;
  color: #204188 !important;
  border: 1px solid #e0e0e0 !important;
}

.stat-item.total .stat-label,
.stat-item.total .stat-value {
  color: #204188 !important;
}

.stat-item.used {
  background: #f5f5f5 !important;
  border: 1px solid #ddd !important;
}

.stat-item.used .stat-label,
.stat-item.used .stat-value {
  color: #666 !important;
}

.stat-item.available {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3) !important;
  animation: pulse-available 2s infinite !important;
}

.stat-item.available .stat-label,
.stat-item.available .stat-value {
  color: white !important;
  font-weight: 700 !important;
}

/* Estilos para elementos editables */
.stat-item.editable {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stat-item.editable:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.edit-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
}

.stat-item.editable:hover .edit-btn {
  opacity: 1;
}

.edit-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

/* Estilos para el modal de edición */
.edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.edit-modal.active {
  opacity: 1;
  visibility: visible;
}

.edit-modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  min-width: 300px;
  text-align: center;
}

.edit-modal h3 {
  margin: 0 0 20px 0;
  color: #204188;
  font-size: 1.3rem;
}

.edit-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 20px;
  text-align: center;
}

.edit-input:focus {
  outline: none;
  border-color: #204188;
  box-shadow: 0 0 0 3px rgba(32, 65, 136, 0.1);
}

.edit-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.edit-btn-save,
.edit-btn-cancel {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edit-btn-save {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
}

.edit-btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.edit-btn-cancel {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.edit-btn-cancel:hover {
  background: #e0e0e0;
}

/* Estilos para la página de clases */
.class-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.detail-section h3 {
  margin: 0 0 16px 0;
  color: #204188;
  font-size: 1.1rem;
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.detail-label {
  font-weight: 500;
  color: #666;
  font-size: 0.9rem;
}

.detail-value {
  font-weight: 600;
  color: #204188;
  font-size: 1rem;
}

.seats-container {
  margin-top: 16px;
}

.seats-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 25px;
  max-width: 900px;
  margin: 0 auto;
}

.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  background: white;
  transition: all 0.2s ease;
  cursor: pointer;
}

.seat.available {
  border-color: #4CAF50;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
}

.seat.occupied {
  border-color: #f44336;
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
}

.seat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.seat-number {
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.seat-status {
  font-size: 0.9rem;
  opacity: 0.9;
  text-align: center;
  line-height: 1.2;
  max-width: 90px;
  word-wrap: break-word;
}

.view-btn {
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  margin-right: 4px;
  transition: all 0.2s ease;
}

.view-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

/* Estilos para enlaces en el sidebar */
.sidebar nav ul li a {
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
}

.sidebar nav ul li a:hover {
  color: #204188;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(32, 65, 136, 0.18);
  justify-content: center;
  align-items: center;
}
.modal.active {
  display: flex;
}
.modal-content {
  background: #fff;
  padding: 32px 28px 24px 28px;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(32, 65, 136, 0.15);
  min-width: 320px;
  position: relative;
}
.modal-content h2 {
  margin-bottom: 18px;
  color: #204188;
}
.modal-content .close {
  position: absolute;
  right: 18px;
  top: 18px;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
}
.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-content input, .modal-content select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
}
.modal-content input:focus, .modal-content select:focus {
  border: 1.5px solid #204188;
}
.modal-content button[type="submit"] {
  background: #204188;
  color: #fff;
  border: none;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-content button[type="submit"]:hover {
  background: #16316a;
}

/* Bulk Create Modal - Layout Horizontal */
#bulkCreateModal .modal-content {
  max-width: 950px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

#bulkCreateForm > div:first-child {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

#bulkCreateForm > div:first-child > div:first-child {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

#bulkCreateForm > div:first-child > div:last-child {
  background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #bbdefb;
}

#bulkCreateForm label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#bulkCreateForm input[type="text"],
#bulkCreateForm input[type="number"],
#bulkCreateForm input[type="date"],
#bulkCreateForm input[type="time"],
#bulkCreateForm select {
  width: 100%;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
}

#bulkCreateForm input[type="text"]:focus,
#bulkCreateForm input[type="number"]:focus,
#bulkCreateForm input[type="date"]:focus,
#bulkCreateForm input[type="time"]:focus,
#bulkCreateForm select:focus {
  border-color: #204188;
  box-shadow: 0 0 0 3px rgba(32, 65, 136, 0.1);
}

#bulkCreateForm h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #204188;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #204188;
  font-weight: 700;
}

#bulkPreview {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe9a6 100%);
  padding: 18px;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 1px solid #ffc107;
}

#bulkPreview h3 {
  margin-top: 0;
  font-size: 1rem;
  color: #856404;
  margin-bottom: 12px;
  border-bottom: 2px solid #856404;
  padding-bottom: 8px;
}

#bulkProgress {
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  #bulkCreateForm > div:first-child {
    grid-template-columns: 1fr;
  }
  
  #bulkCreateModal .modal-content {
    width: 95vw;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .dashboard-container {
    flex-direction: column;
  }
  
  .sidebar {
    flex-direction: row;
    width: 100vw;
    height: auto;
    min-height: 60px;
    padding: 8px 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .logo {
    font-size: 1.2rem;
    margin-bottom: 0;
  }
  
  .logo img {
    width: 36px;
    height: 36px;
    margin-bottom: 0;
  }
  
  .sidebar nav ul {
    display: flex;
    flex-direction: row;
    gap: 4px;
    flex-wrap: wrap;
  }
  
  .sidebar nav ul li {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  .main-content {
    padding: 16px 12px;
  }
  
  .header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .header h1 {
    font-size: 1.5rem;
  }
  
  .header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .header-actions button {
    flex: 1;
    min-width: calc(50% - 4px);
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  
  .stats {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .stat-card {
    flex: 1;
    min-width: calc(50% - 8px);
    padding: 20px;
  }
  
  .info-banner {
    flex: 1 1 100% !important;
    margin-left: 0 !important;
    margin-top: 16px;
    padding: 18px 20px !important;
    gap: 15px !important;
  }
  
  .info-banner > div:first-child {
    font-size: 2rem !important;
  }
  
  .info-banner h3 {
    font-size: 1rem !important;
  }
  
  .info-banner p {
    font-size: 0.85rem !important;
  }
  
  .tables {
    flex-direction: column;
    gap: 24px;
  }
  
  .table-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling en iOS */
  }
  
  .table-section::-webkit-scrollbar {
    height: 8px;
  }
  
  .table-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }
  
  .table-section::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
  }
  
  .table-section::-webkit-scrollbar-thumb:hover {
    background: #555;
  }
  
  .table-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-container {
    width: 100%;
  }
  
  .search-input {
    width: 100%;
  }
  
  .filters-container {
    width: 100%;
    flex-direction: column;
  }
  
  .filter-input {
    width: 100%;
  }
  
  table {
    font-size: 0.85rem;
  }
  
  th, td {
    padding: 8px 6px;
    font-size: 0.8rem;
  }
  
  /* Modales responsive */
  .modal-content {
    width: 95%;
    max-width: 95%;
    padding: 20px 16px;
    margin: 10px;
  }
  
  .modal-content.large-modal {
    min-width: auto;
    max-width: 95%;
    width: 95%;
    max-height: 90vh;
  }
  
  .modal-content h2 {
    font-size: 1.3rem;
  }
  
  /* Categorías de clases en modal */
  .classes-categories {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .category-card h3 {
    font-size: 1.1rem;
  }
  
  /* Header del modal de usuario */
  .user-modal-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .user-modal-header h2 {
    min-width: auto;
    width: 100%;
    font-size: 1.2rem;
  }
  
  /* Botón de restablecer contraseña en modal */
  .reset-password-btn {
    font-size: 0.8rem;
    padding: 8px 12px;
    width: 100%;
  }
  
  /* Bookings section */
  .bookings-section {
    margin-top: 20px;
  }
  
  .bookings-section h3 {
    font-size: 1.1rem;
  }
  
  .segment-control {
    flex-direction: column;
    padding: 6px;
  }
  
  .segment-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .bookings-container {
    max-height: 300px;
  }
  
  .booking-card {
    padding: 12px;
  }
  
  .booking-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .booking-date {
    font-size: 0.8rem;
  }
  
  .booking-details {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .booking-detail-item {
    font-size: 0.85rem;
  }
  
  /* Modal de reset password */
  #resetPasswordModal .modal-content {
    max-width: 95%;
    padding: 20px 12px;
  }
  
  #resetPasswordModal h2 {
    font-size: 1.2rem;
  }
  
  #resetPasswordEmail {
    font-size: 0.85rem;
    padding: 10px;
    word-break: break-word;
    line-height: 1.3;
  }
  
  .reset-modal-confirm-btn,
  .reset-modal-cancel-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.9rem;
    min-height: 44px;
  }
  
  /* Edit modal */
  .edit-modal-content {
    min-width: 90%;
    padding: 20px;
  }
  
  .edit-input {
    font-size: 1rem;
  }
  
  /* Stat items en category cards */
  .stat-item {
    padding: 6px 10px;
  }
  
  .stat-label {
    font-size: 0.85rem;
  }
  
  .stat-value {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px 8px;
  }
  
  .header h1 {
    font-size: 1.3rem;
  }
  
  .header-actions button {
    min-width: 100%;
    font-size: 0.8rem;
  }
  
  .stat-card {
    min-width: 100%;
  }
  
  .stat-card h2 {
    font-size: 2rem;
  }
  
  .table-section h3 {
    font-size: 1rem;
  }
  
  th, td {
    padding: 6px 4px;
    font-size: 0.75rem;
  }
  
  .modal-content h2 {
    font-size: 1.1rem;
  }
  
  .category-card {
    padding: 16px;
  }
  
  .category-card h3 {
    font-size: 1rem;
  }
  
  .segment-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .segment-label {
    font-size: 0.85rem;
  }
  
  .segment-count {
    min-width: 20px;
    height: 20px;
    font-size: 0.75rem;
    padding: 0 6px;
  }
  
  .booking-type {
    font-size: 0.95rem;
  }
  
  .booking-date {
    font-size: 0.75rem;
  }
  
  .reset-password-btn {
    font-size: 0.75rem;
    padding: 8px 10px;
    width: 100%;
  }
  
  .reset-modal-confirm-btn,
  .reset-modal-cancel-btn {
    padding: 10px 12px;
    font-size: 0.85rem;
    min-height: 44px;
  }
  
  .user-modal-header {
    margin-bottom: 16px;
  }
  
  .user-modal-header h2 {
    font-size: 1.05rem;
  }
  
  #resetPasswordModal h2 {
    font-size: 1.05rem;
  }
  
  #resetPasswordEmail {
    font-size: 0.8rem;
  }
  
  /* Mejorar legibilidad en pantallas pequeñas */
  .bookings-section h3 {
    font-size: 1rem;
  }
  
  .bookings-category h4 {
    font-size: 0.95rem;
  }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
  /* Mejoras para dispositivos táctiles */
  .header-actions button,
  .action-btn,
  .reset-password-btn,
  .segment-btn,
  .edit-btn {
    min-height: 44px; /* Tamaño mínimo recomendado para touch */
  }
  
  tbody tr {
    min-height: 48px;
  }
  
  th, td {
    padding: 10px 6px;
  }
}

/* Bookings Section */
.bookings-section {
  border-top: 2px solid #e0e0e0;
  padding-top: 20px;
}

/* Segment Control */
.segment-control {
  display: flex;
  background: #f0f2f5;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.segment-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.segment-btn:hover {
  color: #204188;
}

.segment-btn.active {
  background: white;
  color: #204188;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

.segment-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.segment-label {
  font-size: 1rem;
}

.segment-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: #e0e0e0;
  color: #666;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.segment-btn.active .segment-count {
  background: linear-gradient(135deg, #204188 0%, #16316a 100%);
  color: white;
}

.segment-btn:hover .segment-count {
  transform: scale(1.1);
}

/* Bookings Tab Content */
.bookings-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.bookings-tab-content.active {
  display: block;
}

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

.bookings-container {
  max-height: 400px;
  overflow-y: auto;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
}

.booking-card {
  background: white;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.booking-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.booking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.booking-type {
  font-weight: 600;
  font-size: 1.05rem;
  color: #204188;
}

.booking-date {
  font-size: 0.9rem;
  color: #666;
  background: #f0f0f0;
  padding: 4px 10px;
  border-radius: 12px;
}

.booking-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  font-size: 0.9rem;
  color: #555;
}

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

.booking-detail-label {
  font-weight: 500;
  color: #888;
}

.no-bookings {
  text-align: center;
  padding: 30px 20px;
  color: #888;
  font-style: italic;
}

.no-bookings-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  opacity: 0.5;
}

/* Action Buttons */
.action-btn {
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.action-btn:hover::before {
  width: 300px;
  height: 300px;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-class-btn {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  border: 2px solid transparent;
}

.edit-class-btn:hover {
  background: linear-gradient(135deg, #fb8c00 0%, #ef6c00 100%);
  border-color: #ff9800;
}

.delete-class-btn {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
  border: 2px solid transparent;
}

.delete-class-btn:hover {
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
  border-color: #f44336;
} 