/**
 * Zuwad Plugin - Supervisor Dashboard Styles
 * 
 * This file contains styles for the supervisor dashboard functionality
 * Organization:
 * - Dashboard layout and containers
 * - Cards and panels
 * - Tables and data presentation
 * - Status indicators
 * - Form elements
 * - Modal components
 * - Responsive adjustments
 */

/* =====================
   Dashboard Layout
   ===================== */

/* Independent Loading States */
.supervisor-teachers-container {
  position: relative;
  min-height: 200px;
}

.supervisor-teachers-container.loading {
  opacity: 0.7;
}

.supervisor-teachers-container.loaded {
  opacity: 1;
}

#teacher-calendar-container {
  position: relative;
  min-height: 400px;
}

.calendar-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

/* Ensure containers don't affect each other */
.supervisor-teachers-container,
#teacher-calendar-container {
  isolation: isolate;
  contain: layout style;
}

/* Teacher Cards */
/* Filters Container */
.teacher-filters-container {
  margin: 20px auto;
  max-width: 1200px;
  padding: 0 20px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: end;
  justify-content: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.filter-group label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #6a041a;
  font-size: 14px;
}

.filter-select {
  padding: 8px 12px;
  border: 2px solid #6a041a;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: #333;
  transition: all 0.3s ease;
  direction: rtl;
}

.filter-select:focus {
  outline: none;
  border-color: #9e0629;
  box-shadow: 0 0 5px rgba(158, 6, 41, 0.4);
}

/* Responsive filters */
@media (max-width: 768px) {
  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    min-width: 100%;
  }
}

/* Search Container */
.teacher-search-container {
  margin: 20px auto;
  max-width: 600px;
  padding: 0 20px;
}

#teacher-search {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #6a041a;
  border-radius: 8px;
  font-size: 16px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  direction: rtl;
}

#teacher-search:focus {
  outline: none;
  border-color: #9e0629;
  box-shadow: 0 0 8px rgba(158, 6, 41, 0.4);
}

#teacher-search::placeholder {
  color: #999;
  opacity: 0.8;
}

/* Teacher Cards */
.supervisor-teachers-container {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(200px, 1fr)
  ); /* Default grid layout for larger screens */
  gap: 20px;
  padding: 20px;
  justify-items: center;
  margin: 0 auto;
  min-height: 300px; /* Ensure container has minimum height even when empty */
  position: relative; /* For loading spinner positioning */
}

/* Loading state */
.supervisor-teachers-container.loading {
  opacity: 0.7;
}

.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(106, 4, 26, 0.2);
  border-radius: 50%;
  border-top-color: #6a041a;
  animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* No results message */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  font-size: 18px;
  color: #666;
}

.teacher-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  /* padding: 20px; */
  width: 100%; /* Ensure cards take full width within their grid cells */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  cursor: pointer;
  text-align: center;
  overflow: hidden;
}

.teacher-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  background-color: #f8f8f8;
}

.teacher-card h3 {
  margin: 0 0 15px;
  font-size: 1em;
  color: #6a041a;
  font-weight: bold;
}

.teacher-card p {
  margin: 10px 0;
  color: #666;
  font-size: 1em;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .supervisor-teachers-container {
    grid-template-columns: repeat(
      auto-fill,
      minmax(180px, 1fr)
    ); /* Adapt columns for tablets */
  }

  .teacher-card {
    padding: 15px;
  }

  .teacher-card h3 {
    font-size: 1.4em;
  }

  .teacher-card p {
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  /* .supervisor-teachers-container {
    grid-template-columns: repeat(2, 1fr); /* Ensure two cards per row on small screens */
  /* } */
  */ .teacher-card {
    padding: 15px;
  }

  .teacher-card h3 {
    font-size: 1.4em;
  }

  .teacher-card p {
    font-size: 0.9em;
  }

  .teacher-pagination-container {
    padding: 0 10px;
  }
}

/* Pagination */
.teacher-pagination-container {
  margin: 20px auto 40px;
  text-align: center;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.pagination-button {
  background-color: #6a041a;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 15px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.pagination-button:hover:not(.disabled) {
  background-color: #9e0629;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination-button.disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

#pagination-info {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  border-radius: 10px;
  width: 90%;
  max-width: 1600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 50px;
  position: relative;
  margin: auto; /* Center the modal */
  top: 50%; /* Center vertically */
  transform: translateY(-50%);
  border: 2px solid #6a041a; /* Your site's color */
}

.close-modal {
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  color: #6a041a; /* Your site's color */
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.8em;
  color: #6a041a; /* Your site's color */
}

/* General Widget Container */
.widgets-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Widget Row Styling */
.widget-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

/* Month and Year Selector */
.month-year-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background-color: #e3f2fd; /* Light blue background */
  border: 1px solid #90caf9; /* Light blue border */
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.month-year-selector select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  background-color: #fff;
  cursor: pointer;
  transition: border-color 0.3s;
}

.month-year-selector select:hover {
  border-color: #da9c00ff; /* Blue border on hover */
}

/* Widget Styling */
.widget {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.widget:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.widget h4 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.widget p {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  color: #da9c00ff; /* Blue color for numbers */
}
/* 
Specific Widget Colors
#widget-students-container {
    background-color: #f3e5f5; 
    border-color: #ce93d8;
}

#widget-all-time-lessons-container {
    background-color: #fff3e0; 
    border-color: #ffcc80;
}

#widget-all-time-hours-container {
    background-color: #e0f7fa;  
    border-color: #80deea;
}

#widget-current-month-lessons-container {
    background-color: #f1f8e9;
    border-color: #c5e1a5;
}

#widget-current-month-hours-container {
    background-color: #ffebee;
    border-color: #ef9a9a;
}

#widget-student-delays-container {
    background-color: #e8f5e9;
    border-color: #a5d6a7;
}

#widget-teacher-delays-container {
    background-color: #fffde7;
    border-color: #fff59d;
}

#widget-compensation-delays-container {
    background-color: #fbe9e7;
    border-color: #ffab91;
}

#widget-compensation-absences-container {
    background-color: #e3f2fd;
    border-color: #90caf9;
} */

/* Responsive Design */
@media (max-width: 768px) {
  .widget-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .month-year-selector {
    flex-direction: column;
    gap: 10px;
  }
}

/* Students Table */
/* Students Table */
#students-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px; /* Smaller font size for compactness */
  table-layout: fixed; /* Force fixed column widths */
  background-color: #fff;
  border-radius: 20px;
}

#students-table th,
#students-table td {
  border: 1px solid #e0e0e0;
  padding: 8px; /* Reduced padding */
  text-align: center;
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden; /* Hide overflow text */
  text-overflow: ellipsis; /* Add ellipsis for overflow text */
}

#students-table th {
  background-color: #6a041a; /* Your site's color */
  color: #fff; /* White text for headers */
  font-weight: bold;
}

#students-table tbody tr {
  height: 40px; /* Fixed height for rows */
}

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

/* Custom column widths using data attributes - more reliable than nth-child */
#students-table th[data-column="id"],
#students-table td[data-column="id"] {
  width: 80px; /* م (ID) column */
}

#students-table th[data-column="name"],
#students-table td[data-column="name"] {
  width: 150px; /* الاسم (Name) column */
}

/* Phone column - only visible to administrators */
body:not(.non-admin-user) #students-table th[data-column="phone"],
body:not(.non-admin-user) #students-table td[data-column="phone"] {
  width: 130px; /* الهاتف (Phone) column - visible to admins only */
}

/* For non-admin users, the phone column doesn't exist, so no need to hide anything */

/* Use data attributes for more reliable column targeting */
/* Custom column widths using data attributes - reliable regardless of conditional columns */
#students-table th[data-column="id"],
#students-table td[data-column="id"] {
  width: 80px; /* م (ID) column */
}

#students-table th[data-column="name"],
#students-table td[data-column="name"] {
  width: 150px; /* الاسم (Name) column */
}

/* Phone column - only visible to administrators */
body:not(.non-admin-user) #students-table th[data-column="phone"],
body:not(.non-admin-user) #students-table td[data-column="phone"] {
  width: 130px; /* الهاتف (Phone) column - visible to admins only */
}

#students-table th[data-column="lessons_name"],
#students-table td[data-column="lessons_name"] {
  width: 120px; /* المادة (Subject) column */
}

#students-table th[data-column="age"],
#students-table td[data-column="age"] {
  width: 80px; /* العمر (Age) column */
}

#students-table th[data-column="country"],
#students-table td[data-column="country"] {
  width: 60px; /* البلد (Country) column */
}

#students-table th[data-column="lessons_number"],
#students-table td[data-column="lessons_number"] {
  width: 80px; /* الحصص (Lessons Number) column */
}

#students-table th[data-column="lesson_duration"],
#students-table td[data-column="lesson_duration"] {
  width: 60px; /* المدة (Lesson Duration) column */
}

#students-table th[data-column="currency"],
#students-table td[data-column="currency"] {
  width: 60px; /* العملة (Currency) column */
}

#students-table th[data-column="amount"],
#students-table td[data-column="amount"] {
  width: 60px; /* المبلغ (Amount) column */
}

#students-table th[data-column="payment_status"],
#students-table td[data-column="payment_status"] {
  width: 110px; /* حالة الدفع (Payment Status) column */
}

#students-table th[data-column="notes"],
#students-table td[data-column="notes"] {
  width: 130px; /* ملاحظات (Notes) column */
}

#students-table th[data-column="renewal_date"],
#students-table td[data-column="renewal_date"] {
  width: 130px; /* تاريخ التسديد (Renewal Date) column */
}

#students-table th[data-column="remaining_lessons"],
#students-table td[data-column="remaining_lessons"] {
  width: 50px; /* الدروس المتبقية (Remaining Lessons) column */
}

#students-table th[data-column="actions"],
#students-table td[data-column="actions"] {
  width: 90px; /* تعديل (Actions) column */
}

/* Responsive Design */
@media (max-width: 768px) {
  #students-table {
    font-size: 12px; /* Even smaller font size for mobile */
  }

  #students-table th,
  #students-table td {
    padding: 6px; /* Further reduced padding for mobile */
  }

  /* Adjust column widths for mobile using data attributes */
  #students-table th[data-column="notes"],
  #students-table td[data-column="notes"] {
    width: 100px; /* Smaller width for mobile */
  }

  #students-table th[data-column="renewal_date"],
  #students-table td[data-column="renewal_date"] {
    width: 100px; /* Smaller width for mobile */
  }

  #students-table th[data-column="remaining_lessons"],
  #students-table td[data-column="remaining_lessons"] {
    width: 50px; /* Smaller width for mobile */
  }

  #students-table th[data-column="actions"],
  #students-table td[data-column="actions"] {
    width: 90px; /* Smaller width for mobile */
  }
}

/* Edit, delete, and competition Buttons */
#students-table .edit-student,
#students-table .delete-student,
#students-table .competition-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin: 0 5px;
  padding: 5px;
}

#students-table .edit-student:hover {
  color: #6a041a; /* Your site's color */
}

#students-table .delete-student:hover {
  color: #ff0000; /* Red color for delete */
}

#students-table .competition-btn:hover {
  color: #ffd700; /* Gold color for competition */
  transform: scale(1.1);
}

/* Student Modal */
#student-modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

#student-modal .form-container {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  position: relative;
  margin: auto; /* Center the modal */
  max-height: 90%;
  overflow: auto;
}

#student-modal .close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 20px;
}

#student-modal .form-row {
  display: flex;
  gap: 20px;
}

#student-modal .form-column {
  flex: 1;
}

#student-modal label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

#student-modal input,
#student-modal select,
#student-modal textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#student-modal .button {
  background-color: #6a041a; /* Your site's color */
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#student-modal .button:hover {
  background-color: #5a0315; /* Darker shade */
}

/* SweetAlert2 custom styles */
.swal2-styled.swal2-confirm {
  background-color: #8b0628 !important;
}

.swal2-styled.swal2-cancel {
  background-color: #666 !important;
}

/* ====================== */
.teacher-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #8b0628;
  color: white;
  border-radius: 5px 5px 0 0;
}

.teacher-card-header h3 {
  margin: 0;
  color: white;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.status-circles {
  display: flex;
  gap: 8px;
  align-items: center;
}

.status-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid white;
}

.status-circle.green {
  background-color: #107813;
}
.status-circle.whitegreen {
  background-color: #66c869;
}
.status-circle.blue {
  background-color: #2196f3;
}

.edit-section {
  cursor: pointer;
}

.edit-teacher {
  font-size: 16px;
}

/* Update existing teacher card styles */
.teacher-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  margin: 10px;
  background: white;
  height: fit-content;
}

.teacher-card p {
  margin: 10px;
}

.status-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 20%;
  background-color: #ffbe16;
  color: #333;
  font-weight: bold;
  margin-right: 5px;
  font-size: 12px;
}

.status-circle.darkyellow {
  background-color: rgb(224, 231, 0);
}

.status-circle.darkred {
  background-color: rgb(225, 16, 16);
}

.status-circle.black {
  background-color: #000000;
}

/* Pagination Styles */
.zuwad-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px 0;
  font-family: inherit;
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.loading-spinner {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px;
}

.loading-spinner.initial-load {
  display: flex;
  min-height: 200px;
  position: relative;
  transform: none;
  top: auto;
  left: auto;
  width: 100%;
  height: 200px;
  align-items: center;
  justify-content: center;
}

.pagination-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 5px;
  background-color: #fff;
  color: #333;
  border: 1px solid #ddd;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pagination-link:hover {
  background-color: #f5f5f5;
  border-color: #6a041a;
  color: #6a041a;
}

.pagination-link.current {
  background-color: #6a041a;
  color: #fff;
  border-color: #6a041a;
  font-weight: bold;
}

.pagination-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-ellipsis {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 36px;
  height: 36px;
  font-size: 14px;
  color: #666;
}

.pagination-info {
  color: #666;
  font-size: 14px;
}

/* Responsive pagination */
@media (max-width: 480px) {
  .pagination-container {
    flex-wrap: wrap;
  }

  .pagination-link {
    min-width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

/* Competition Modal Styles */
#competition-modal {
  display: none;
  position: fixed;
  z-index: 900;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

#competition-modal .modal-content {
  background-color: #fff;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  margin: auto;
  top: 50%;
  transform: translateY(-50%);
  border: 2px solid #6a041a;
}

.competition-modal-body {
  margin-top: 20px;
}

#student-info-section {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

#student-info-section h4 {
  color: #6a041a;
  margin-bottom: 10px;
  font-size: 18px;
}

#student-info-section p {
  margin: 5px 0;
  font-size: 14px;
}

#competition-registration-section h4 {
  color: #6a041a;
  margin-bottom: 15px;
  font-size: 18px;
}

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

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

.form-group select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  background-color: #fff;
  transition: border-color 0.3s;
}

.form-group select:focus {
  outline: none;
  border-color: #6a041a;
}

.form-group .button {
  background-color: #6a041a;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.form-group .button:hover {
  background-color: #5a0315;
}

/* Competition button in table */
.competition-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.competition-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Family Members / Brothers Display Styles */
.brothers-section {
  margin-top: 15px;
}

.brothers-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

#brothers-list {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  min-height: 40px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
}

#brothers-list:empty::before {
  content: "لا توجد أسماء إخوة مسجلة";
  color: #6c757d;
  font-style: italic;
}

.brother-name {
  display: inline-block;
  background-color: #e3f2fd;
  color: #1976d2;
  padding: 4px 8px;
  margin: 2px 4px 2px 0;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #bbdefb;
}

/* Chicken emojis styling in table */
.chicken-emojis {
  margin-right: 5px;
  font-size: 14px;
}

/* Responsive adjustments for brothers section */
@media (max-width: 768px) {
  .brothers-section {
    margin-top: 12px;
  }

  #brothers-list {
    padding: 10px;
    font-size: 12px;
  }

  .brother-name {
    font-size: 11px;
    padding: 3px 6px;
  }
}

/* Responsive design for competition modal */
@media (max-width: 768px) {
  #competition-modal .modal-content {
    width: 95%;
    padding: 20px;
  }

  #student-info-section p {
    font-size: 13px;
  }
}

/* KPI Info Button Styles */
.kpi-info-btn {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
}

.kpi-info-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
  background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
}

#students-table .kpi-info-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin: 0 5px;
  padding: 5px;
}

#students-table .kpi-info-btn:hover {
  color: #11998e;
  transform: scale(1.1);
}

/* KPI Info Modal Styles */
#kpi-info-modal {
  display: none;
  position: fixed;
  z-index: 900;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

#kpi-info-modal .modal-content.large-modal {
  max-width: 900px;
  padding: 30px;
}

.kpi-info-modal-body {
  margin-top: 20px;
}

.kpi-student-header {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.kpi-student-header p {
  margin: 5px 0;
  font-size: 14px;
}

/* KPI Responses Grid */
.kpi-responses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.kpi-response-item {
  background-color: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  transition: box-shadow 0.2s ease;
}

.kpi-response-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kpi-question-label {
  font-weight: 600;
  color: #6a041a;
  font-size: 13px;
  margin-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 6px;
}

.kpi-answer-value {
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

/* KPI Trait Badge */
.kpi-trait-badge {
  display: inline-block;
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 3px 8px;
  margin: 2px;
  border-radius: 12px;
  font-size: 12px;
  border: 1px solid #c8e6c9;
}

/* Responsive KPI Modal */
@media (max-width: 768px) {
  .kpi-responses-grid {
    grid-template-columns: 1fr;
  }

  #kpi-info-modal .modal-content.large-modal {
    width: 95%;
    padding: 20px;
  }

  .kpi-student-header {
    flex-direction: column;
    gap: 10px;
  }
}

/* Auto-calculated read-only fields (e.g. amount in new-user form) */
input.amount-auto[readonly] {
  background-color: #f5f5f5;
  cursor: not-allowed;
  color: #333;
}
