/* Subjects Management Styles */

.subjects-header {
  margin-bottom: 2rem;
}

.subjects-header h2 {
  color: #2575fc;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Filter Section */
.filter-section {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.filter-section h2 {
  text-align: center;
  color: #2575fc;
  font-weight: 600;
  margin-bottom: 2rem;
  text-transform: uppercase;
  font-size: 1.5rem;
}

.filter-section .form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

.filter-section .btn-primary {
  padding: 0.75rem 2.5rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.filter-section .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 117, 252, 0.3);
}

/* Table Container */
.table-container {
  overflow-x: auto;
  margin-top: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
}

.table-container table {
  margin-bottom: 0;
}

.table thead th {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  text-align: center;
  font-weight: 600;
  border: none;
  padding: 1rem;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.table tbody td {
  text-align: center;
  vertical-align: middle;
  padding: 1rem;
  border-color: #e9ecef;
}

.table tbody td b,
.table tbody td strong {
  color: #2575fc;
  font-weight: 600;
}

.table tbody tr:hover {
  background-color: #f8f9ff;
  transition: background-color 0.2s ease;
}

/* Subject Details in Table */
.subject-details {
  text-align: left;
  line-height: 1.8;
}

.subject-details br {
  margin-bottom: 0.25rem;
}

/* Download/Export Buttons */
.download-section {
  text-align: center;
  margin: 2rem 0;
}

.btn-download {
  margin: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-download i {
  margin-right: 0.5rem;
}

/* Form Section */
.form-section {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.form-section h4 {
  color: #2575fc;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e9ecef;
}

.form-section .form-label {
  font-weight: 600;
  color: #495057;
}

.form-section .form-control,
.form-section .form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 0.75rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-section .form-control:focus,
.form-section .form-select:focus {
  border-color: #2575fc;
  box-shadow: 0 0 0 0.2rem rgba(37, 117, 252, 0.15);
}

.form-section hr {
  margin: 2.5rem 0;
  border-top: 2px solid #e9ecef;
}

.form-section .btn {
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.form-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-section small {
  color: #6c757d;
  font-size: 0.875rem;
}

/* File Upload Styling */
.form-section input[type="file"] {
  cursor: pointer;
  padding: 0.5rem;
}

.form-section input[type="file"]:hover {
  background-color: #f8f9fa;
}

/* Modal Styles */
.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  border-radius: 12px 12px 0 0;
  padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
  font-weight: 600;
  font-size: 1.25rem;
}

.modal-header .close {
  color: white;
  opacity: 1;
  text-shadow: none;
}

.modal-body {
  padding: 2rem;
}

.modal-body .form-label {
  font-weight: 600;
  color: #495057;
}

.modal-body .text-info {
  color: #2575fc !important;
}

.modal-body .form-control,
.modal-body .form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 0.75rem;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
  border-color: #2575fc;
  box-shadow: 0 0 0 0.2rem rgba(37, 117, 252, 0.15);
}

.modal-body .btn-success {
  width: 100%;
  padding: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 1rem;
}

/* Action Buttons */
.fixed-size-btn {
  min-width: 80px;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.fixed-size-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Success Alert */
#successAlert {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Select2 Overrides */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  min-height: 45px;
  display: flex;
  align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 45px;
  padding-left: 0.75rem;
}

.select2-container--default.select2-container--focus .select2-selection {
  border-color: #2575fc;
  box-shadow: 0 0 0 0.2rem rgba(37, 117, 252, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
  .table-container {
    padding: 1rem;
  }
  
  .filter-section,
  .form-section {
    padding: 1.5rem;
  }
  
  .btn-download {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
  }
  
  .table tbody td {
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
  }
  
  .fixed-size-btn {
    min-width: 70px;
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
  }
}

@media (max-width: 576px) {
  .filter-section h2 {
    font-size: 1.25rem;
  }
  
  .table thead th {
    font-size: 0.8rem;
    padding: 0.75rem 0.5rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
}