:root {
  --primary: #1e3a8a;
  --primary-light: #dbeafe;
  --primary-dark: #1e40af;
  --secondary: #334155;
  --accent: #ef4444;
  --text-dark: #1f2937;
  --text-light: #64748b;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius: 10px;
  --transition: all 0.3s ease;
  --success: #10b981;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
}

.header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.main-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  position: relative;
}

.main-title::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
}

.sub-title {
  font-size: 20px;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 0.5px;
  margin-top: 20px;
}

.portal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--secondary);
  margin-top: 10px;
}

/* Login Styles */
.dashboard-container {
  max-width: 800px;
  margin: 0 auto;
}

.login-container {
  background-color: var(--bg-white);
  padding: 20px;
  border-radius: var(--radius);
  margin: 40px auto;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--primary);
  max-width: 500px;
}

.login-title {
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-field {
  display: flex;
  flex-direction: column;
}

.login-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-size: 14px;
}


#coordinatorId {
  padding: 14px;
  width: 100%;
  background-color: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  transition: var(--transition);
  height: 52px;
}

#coordinatorId:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.buttons-container {
  display: flex;
  gap: 16px;
}

#loginBtn, #clearBtn {
  padding: 14px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 16px;
  transition: var(--transition);
  height: 52px;
  width: 100%;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
}

#loginBtn {
  background-color: var(--primary);
  color: white;
  flex: 2;
}

#loginBtn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

#clearBtn {
  background-color: var(--bg-light);
  color: var(--text-dark);
  border-color: var(--border-color);
  flex: 1;
}

#clearBtn:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}

.error-message {
  color: var(--accent);
  padding: 12px;
  margin: 16px 0;
  font-weight: 500;
  font-size: 14px;
  background-color: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius);
  display: none;
}

.loading-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--primary-light);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-text {
  color: var(--primary);
  font-weight: 500;
  font-size: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Information Board */
.information-board {
  background-color: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
  overflow: hidden;
  transition: var(--transition);
}

.information-board:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.information-board-header {
  background-color: var(--primary);
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1;
}

.information-board-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.toggle-instructions {
  background: white;
  border: none;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 500;
  transition: var(--transition);
}

.toggle-instructions:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

.toggle-instructions i {
  margin-left: 5px;
}

.information-content {
  height: 260px;
  overflow-y: auto;
  padding: 0;
  transition: height 0.3s ease;
}

.information-content.hidden {
  height: 0;
  padding: 0;
  overflow: hidden;
}

.instructions-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.instructions-list li {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  margin: 0;
  position: relative;
  padding-left: 40px;
  line-height: 1.5;
  transition: var(--transition);
}

.instructions-list li:hover {
  background-color: var(--bg-light);
}

.instructions-list li:last-child {
  border-bottom: none;
}

.instructions-list li::before {
  content: "•";
  position: absolute;
  left: 20px;
  color: var(--primary);
  font-weight: bold;
  font-size: 16px;
}

/* Filter Section */
.filter-section {
  background-color: var(--bg-white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
}

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-weight: 500;
  color: var(--text-dark);
  font-size: 14px;
}

.filter-select {
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  font-family: 'Poppins', sans-serif;
  width: 100%;
  background-color: var(--bg-light);
}

.multiselect-container {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background-color: var(--bg-light);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.multiselect-header {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.multiselect-options {
  max-height: 150px;
  overflow-y: auto;
  padding: 5px 0;
}

.multiselect-option {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.multiselect-option:hover {
  background-color: var(--primary-light);
}

.filter-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 12px 20px;
  border-radius: var(--radius);
  border: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  flex: 2;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(30, 58, 138, 0.2);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-light);
  flex: 1;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}


/* Update logout button style to match refresh button */
.logout-btn {
  background-color: var(--primary);
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: var(--shadow);
  margin: 15px auto 0;
}

.logout-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.logout-btn::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* Session Table */
.session-table-container {
  background-color: var(--bg-white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  overflow-x: auto;
}

.session-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.session-table th,
.session-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.session-table th {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.session-table tr:hover {
  background-color: var(--bg-light);
}

.session-table tr.reached {
  background-color: rgba(16, 185, 129, 0.1);
}

.session-table tr.reached:hover {
  background-color: rgba(16, 185, 129, 0.2);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--success);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.details-btn {
  background-color: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
}

.details-btn:hover {
  background-color: var(--primary);
  color: white;
}

/* Stats Grid - Update to display cards in a row */
.stats-grid {
  display: grid;
 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background-color: var(--bg-white);
  padding: 24px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  margin-block: 12px;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}


.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: blue;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 32px;
  color: var(--text-light);
  font-size: 13px;
  padding: 16px;
  border-top: 1px solid var(--border-color);
}


.toggle-filters-btn {
  background-color: var(--primary);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: var(--shadow);
  margin: 15px auto 20px !important;
  width: auto !important;
  min-width: 150px;
}

.toggle-filters-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.toggle-filters-btn i {
  font-size: 16px;
}

/* Responsive */
@media (min-width: 768px) {
  .main-title {
    font-size: 36px;
  }
  
  .filter-row {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .filter-group {
    flex: 1;
  }
  
  .information-content {
    height: 200px;
  }
}

@media (min-width: 1024px) {
  .main-title {
    font-size: 42px;
  }
  
  .main-title::after {
    width: 80px;
    height: 5px;
  }
  
  .sub-title {
    font-size: 22px;
  }
}

/* Disabled toggle styling */
.toggle-switch.toggle-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-switch.toggle-disabled input:disabled {
    cursor: not-allowed;
}

.toggle-switch.toggle-disabled .toggle-slider {
    cursor: not-allowed;
}

.enable-column {
    text-align: center;
}

/* Trainer Photo Styles */
.trainer-photo-container {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #faf8f8;
    border-radius: 8px;
}

.trainer-photo {
    width: 150px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

.photo-placeholder,
.photo-error {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-radius: 8px;
    color: #6c757d;
}

.photo-placeholder i,
.photo-error i {
    font-size: 60px;
    margin-bottom: 10px;
}

.photo-placeholder p,
.photo-error p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
}

/* Adjust modal content for better photo display */
.modal-content {
    max-width: 500px;
}

@media (max-width: 768px) {
    .trainer-photo {
        width: 120px;
        height: 140px;
    }
    
    .photo-placeholder,
    .photo-error {
        width: 120px;
        height: 120px;
    }
    
    .photo-placeholder i,
    .photo-error i {
        font-size: 48px;
    }
}
