/* Model-specific styles */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.empty-state p {
  margin-bottom: 20px;
  font-size: 16px;
}

.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.data-table th {
  background-color: #f5f5f5;
  font-weight: 600;
  color: #333;
}

.data-table tbody tr:hover {
  background-color: #f9f9f9;
}

.data-table td button {
  margin-right: 8px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  color: #333;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e0e0e0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.form-group input[type="checkbox"] {
  margin-right: 8px;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}
/* RiderCard Modal Styles */
.rider-card-modal {
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.rider-card-content {
  padding: 20px;
}

/* Rider Information Section */
.rider-info-section {
  background: #f7fafc;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

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

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-label {
  font-size: 0.875rem;
  color: #718096;
  font-weight: 500;
}

.info-value {
  font-size: 1rem;
  color: #2d3748;
  font-weight: 600;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

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

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Section Styles */
.section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.section h3 {
  margin: 0;
  color: #2d3748;
  font-size: 1.25rem;
}

/* Empty State Small */
.empty-state-small {
  text-align: center;
  padding: 30px;
  background: #f7fafc;
  border-radius: 8px;
  border: 2px dashed #cbd5e0;
}

.empty-state-small p {
  color: #718096;
  margin-bottom: 15px;
}

/* Table Styles for RiderCard */
.table-sm {
  font-size: 0.875rem;
}

.table-sm th,
.table-sm td {
  padding: 8px 12px;
}

/* Utility Classes */
.mb-20 {
  margin-bottom: 20px;
}

.mb-30 {
  margin-bottom: 30px;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .rider-card-modal {
    width: 95%;
    max-height: 95vh;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .table-responsive {
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}/* ============================================
   CALENDAR VIEW
   ============================================ */

.calendar-view {
  padding: 20px;
  background: #f5f5f5;
  min-height: 100vh;
}

.calendar-loading,
.calendar-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: white;
  border-radius: 8px;
  padding: 40px;
  margin: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

/* ============================================
   CALENDAR HEADER
   ============================================ */

.calendar-header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-header-top h2 {
  margin: 0;
  color: #333;
}

.calendar-actions {
  display: flex;
  gap: 10px;
}

.calendar-navigation {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

.calendar-title {
  text-align: center;
  margin-bottom: 20px;
}

.calendar-title h3 {
  margin: 0 0 10px 0;
  color: #333;
}

.calendar-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  padding: 5px 15px;
  background: #e9ecef;
  border-radius: 20px;
  font-size: 14px;
}

.stat.blocked {
  background: #fff3cd;
  color: #856404;
}

.calendar-filters {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-size: 12px;
  font-weight: bold;
  color: #666;
}

/* ============================================
   WEEK VIEW
   ============================================ */

.week-view {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.week-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  min-height: 800px;
}

/* ============================================
   TIME COLUMN
   ============================================ */

.time-column {
  background: #f8f9fa;
  border-right: 2px solid #dee2e6;
}

.time-header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-bottom: 2px solid #dee2e6;
  position: sticky;
  top: 0;
  background: #f8f9fa;
  z-index: 10;
}

.time-slot {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #e9ecef;
  font-size: 12px;
  color: #6c757d;
}

/* ============================================
   DAY COLUMN - UPDATED FOR TIME-BASED POSITIONING
   ============================================ */

.day-column {
  border-right: 1px solid #dee2e6;
  position: relative;
  min-height: 820px; /* 14 hours * 60px (6h to 22h) */
}

.day-column:last-child {
  border-right: none;
}

.day-column.today {
  background: #fff9e6;
}

.day-column.past {
  background: #f8f9fa;
  opacity: 0.7;
}

.day-header {
  height: 80px;
  padding: 10px;
  border-bottom: 2px solid #dee2e6;
  text-align: center;
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.day-name {
  font-weight: bold;
  font-size: 14px;
  text-transform: capitalize;
  margin-bottom: 5px;
}

.day-date {
  font-size: 12px;
  color: #6c757d;
}

.today-badge {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  margin-top: 4px;
}

/* UPDATED: Time-based grid */
.day-grid {
  position: relative;
  min-height: 840px; /* 14 hours * 60px */
  background: linear-gradient(to bottom, transparent 59px, #e9ecef 59px);
  background-size: 100% 60px; /* Hour lines every 60px */
}

/* UPDATED: Hour markers overlay */
.hour-markers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hour-marker {
  position: absolute;
  width: 100%;
  height: 1px;
  background: #dee2e6;
  left: 0;
}

.hour-label {
  position: absolute;
  left: 4px;
  top: -10px;
  font-size: 10px;
  color: #6c757d;
  background: white;
  padding: 0 4px;
}

.no-lessons {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #adb5bd;
  font-style: italic;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* UPDATED: Lessons positioned absolutely */
.lessons-container {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* ============================================
   LESSON CARD - UPDATED FOR ABSOLUTE POSITIONING
   ============================================ */

.lesson-card {
  position: absolute;
  left: 4px;
  right: 4px;
  width: calc(100% - 8px);
  background: white;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 4px solid;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  /* top and height will be set inline via style prop */
}

.lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

/* Couleurs par type de cours */
.lesson-card.private {
  border-left-color: #007bff;
  background: #e7f3ff;
}

.lesson-card.group {
  border-left-color: #28a745;
  background: #e8f5e9;
}

.lesson-card.training {
  border-left-color: #ffc107;
  background: #fff8e1;
}

.lesson-card.competition {
  border-left-color: #dc3545;
  background: #ffebee;
}

.lesson-card.event {
  border-left-color: #6f42c1;
  background: #f3e5f5;
}

.lesson-card.blocked {
  border-left-color: #6c757d;
  background: #f8f9fa;
  opacity: 0.8;
}

/* États d'occupation */
.lesson-card.almost-full {
  border-left-width: 6px;
}

.lesson-card.full {
  border-left-width: 6px;
  opacity: 0.8;
}

.lesson-card.modified {
  border-style: dashed;
}

.lesson-card.not-given {
  border: 2px solid #ff9800;
  background: #fff3e0;
}

.lesson-card-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.lesson-type-icon {
  font-size: 16px;
}

.lesson-type-label {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  color: #6c757d;
}

.modified-badge,
.not-given-badge {
  margin-left: auto;
  font-size: 14px;
}

.lesson-card-body {
  font-size: 12px;
}

.lesson-name {
  font-weight: bold;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-time {
  color: #6c757d;
  margin-bottom: 5px;
}

.lesson-time .duration {
  color: #999;
  font-size: 11px;
  font-style: italic;
}

.lesson-participants {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 5px 0;
}

.participant-count {
  font-size: 11px;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  margin-top: 5px;
}

.status-scheduled {
  background: #e3f2fd;
  color: #1976d2;
}

.status-confirmed {
  background: #e8f5e9;
  color: #388e3c;
}

.status-in-progress {
  background: #fff3e0;
  color: #f57c00;
}

.status-completed {
  background: #f3e5f5;
  color: #7b1fa2;
}

.status-cancelled {
  background: #ffebee;
  color: #c62828;
}

.status-blocked {
  background: #e0e0e0;
  color: #424242;
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 8px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
}

.btn-close {
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  color: #000;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid #dee2e6;
  padding: 0 20px;
}

.tab {
  padding: 15px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: #6c757d;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab:hover {
  color: #007bff;
}

.tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #dee2e6;
}

/* ============================================
   LESSON MODAL
   ============================================ */

.lesson-modal {
  max-width: 700px;
}

.details-tab {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail-row {
  display: flex;
  gap: 10px;
}

.detail-row label {
  font-weight: bold;
  min-width: 120px;
  color: #666;
}

.lesson-type-badge {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.lesson-type-badge.private {
  background: #e7f3ff;
  color: #007bff;
}

.lesson-type-badge.group {
  background: #e8f5e9;
  color: #28a745;
}

.lesson-type-badge.training {
  background: #fff8e1;
  color: #ffc107;
}

.lesson-type-badge.competition {
  background: #ffebee;
  color: #dc3545;
}

.lesson-type-badge.event {
  background: #f3e5f5;
  color: #6f42c1;
}

.lesson-type-badge.blocked {
  background: #f8f9fa;
  color: #6c757d;
}

.participants-tab {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.participants-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.participant-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #007bff;
}

.participant-info {
  flex: 1;
}

.participant-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 5px;
}

.participant-name strong {
  font-size: 14px;
}

.participant-horse {
  font-size: 13px;
  color: #666;
  margin-bottom: 5px;
}

.participant-status {
  display: flex;
  gap: 5px;
}

.add-participant-form {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
}

.add-participant-form h4 {
  margin: 0 0 15px 0;
}

/* ============================================
   TEMPLATE MODAL
   ============================================ */

.template-modal {
  max-width: 900px;
}

.template-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.form-section h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #333;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

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

.day-selector {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.day-button {
  padding: 8px 16px;
  border: 2px solid #dee2e6;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.day-button:hover {
  border-color: #007bff;
  color: #007bff;
}

.day-button.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-muted {
  color: #6c757d;
  font-size: 12px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.badge-info {
  background: #d1ecf1;
  color: #0c5460;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

.badge-danger {
  background: #f8d7da;
  color: #721c24;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
  .week-grid {
    grid-template-columns: 60px repeat(7, 1fr);
  }

  .time-slot {
    font-size: 10px;
  }

  .lesson-card {
    padding: 6px;
  }

  .lesson-name {
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .calendar-view {
    padding: 10px;
  }

  .week-grid {
    grid-template-columns: 50px repeat(7, minmax(100px, 1fr));
    overflow-x: auto;
  }

  .calendar-navigation {
    flex-direction: column;
  }

  .calendar-filters {
    flex-direction: column;
  }

  .calendar-stats {
    flex-direction: column;
    align-items: center;
  }

  .modal-content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .lesson-card {
    padding: 4px;
  }

  .lesson-card-header {
    gap: 3px;
  }

  .lesson-type-icon {
    font-size: 14px;
  }
}
/* Template Management Component Styles */
.template-management {
  padding: 20px;
  background: #f5f5f5;
  min-height: 100vh;
}

.template-header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-header h1 {
  margin: 0;
  color: #333;
  font-size: 24px;
}

.template-filters {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-size: 12px;
  font-weight: bold;
  color: #666;
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  background: white;
}

.filter-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.template-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.template-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

.template-card.inactive {
  opacity: 0.7;
  background-color: #f7fafc;
}

.template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.template-info h3 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.lesson-type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  margin-right: 8px;
}

.lesson-type-badge.private {
  background: #e7f3ff;
  color: #007bff;
}

.lesson-type-badge.group {
  background: #e8f5e9;
  color: #28a745;
}

.lesson-type-badge.training {
  background: #fff8e1;
  color: #ffc107;
}

.lesson-type-badge.competition {
  background: #ffebee;
  color: #dc3545;
}

.lesson-type-badge.event {
  background: #f3e5f5;
  color: #6f42c1;
}

.lesson-type-badge.blocked {
  background: #f8f9fa;
  color: #6c757d;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
}

.status-badge.inactive {
  background-color: #fff3cd;
  color: #856404;
}

.template-actions {
  display: flex;
  gap: 8px;
}

.template-description {
  color: #666;
  margin: 0 0 15px 0;
  line-height: 1.5;
  font-size: 14px;
}

.template-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item label {
  font-weight: 500;
  color: #718096;
  font-size: 12px;
  text-transform: uppercase;
}

.detail-item span {
  color: #2d3748;
  font-weight: 600;
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 8px;
  border: 2px dashed #cbd5e0;
  color: #718096;
}

.empty-state p {
  margin-bottom: 20px;
  font-size: 16px;
}

.loading,
.error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: white;
  border-radius: 8px;
  padding: 40px;
  margin: 20px;
}

.error p {
  color: #dc3545;
  margin-bottom: 20px;
  font-size: 16px;
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: #4caf50;
  color: white;
}

.btn-primary:hover {
  background-color: #45a049;
}

.btn-secondary {
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}

.btn-secondary:hover {
  background-color: #e0e0e0;
}

.btn-danger {
  background-color: #f44336;
  color: white;
}

.btn-danger:hover {
  background-color: #d32f2f;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 8px;
  min-width: 400px;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
  margin: 0;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.close-btn:hover {
  color: #333;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.warning {
  color: #f44336;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Icon placeholders - replace with actual icon library */
.icon-plus:before {
  content: '➕';
}
.icon-edit:before {
  content: '✏️';
}
.icon-trash:before {
  content: '🗑️';
}
.icon-pause:before {
  content: '⏸️';
}
.icon-play:before {
  content: '▶️';
}
.icon-close:before {
  content: '✖️';
}

/* Responsive Design */
@media (max-width: 768px) {
  .template-management {
    padding: 1rem;
  }

  .template-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .template-filters {
    flex-direction: column;
  }

  .template-card {
    padding: 1rem;
  }

  .template-header {
    flex-direction: column;
    gap: 1rem;
  }

  .template-actions {
    justify-content: flex-start;
  }

  .template-details {
    grid-template-columns: 1fr;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
}

header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #333;
  padding: 20px 0;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border-bottom: 3px solid #667eea;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  color: #555;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  border: 2px solid transparent;
}

nav a:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  transform: translateY(-1px);
}

nav a.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

main {
  flex: 1;
  padding-bottom: 40px;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card h2 {
  margin-bottom: 24px;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.form-group input::placeholder {
  color: #a0aec0;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-right: 12px;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 2px solid transparent;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
  color: white;
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
  color: white;
}

.btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(113, 128, 150, 0.4);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table th,
.table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #e1e5e9;
}

.table th {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  font-weight: 600;
  color: #4a5568;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr:hover {
  background: #f7fafc;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table .actions button {
  padding: 8px 12px;
  font-size: 12px;
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-horse {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.badge-pony {
  background: linear-gradient(135deg, #ed64a6 0%, #d53f8c 100%);
  color: white;
}

.badge-success {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.badge-secondary {
  background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
  color: white;
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: white;
  font-size: 1.1rem;
}

.loading::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error {
  background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
  color: #742a2a;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #e53e3e;
  font-weight: 500;
}

.success {
  background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
  color: #22543d;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #38a169;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: white;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.8;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 24px;
  opacity: 0.9;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal {
  background: white;
  padding: 32px;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e1e5e9;
}

.modal-header h3 {
  color: #333;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #718096;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: #e53e3e;
  background: #fed7d7;
}

/* Statistics Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

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

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  color: #718096;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-buttons .btn {
  margin: 0;
}

/* Loading Spinner */
.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  
  header .container {
    flex-direction: column;
    align-items: stretch;
  }
  
  header h1 {
    text-align: center;
    font-size: 1.5rem;
  }
  
  nav {
    justify-content: center;
  }
  
  .card {
    padding: 20px;
  }
  
  .table {
    font-size: 0.875rem;
  }
  
  .table th,
  .table td {
    padding: 12px 8px;
  }
  
  .table .actions {
    flex-direction: column;
  }
  
  .modal {
    margin: 20px;
    padding: 24px;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-10 {
  gap: 10px;
}

.gap-20 {
  gap: 20px;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}