/* Öğretmen Düzenle Modal Stilleri */

.loading-state {
  text-align: center;
  padding: 40px 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-state p {
  color: #666;
  font-size: 16px;
  margin: 0;
}

.error-state {
  text-align: center;
  padding: 40px 20px;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.error-state p {
  color: #dc3545;
  font-size: 16px;
  margin-bottom: 20px;
}

.btn-retry {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.btn-retry:hover {
  background-color: #c82333;
}

/* Modal genel stilleri */
.teacher-modal-overlay {
  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;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.teacher-modal-overlay.active {
  opacity: 1;
}

.teacher-modal {
  background: white;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.teacher-modal-overlay.active .teacher-modal {
  transform: scale(1);
}

/* Student Modal Header */
.teacher-modal-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px 8px 0 0;
  position: relative;
}

.teacher-modal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  position: relative;
}

.teacher-modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Avatar Action Buttons */
.avatar-actions {
  position: absolute;
  right: -8px;
  bottom: -8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
}

.avatar-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  background: #28a745;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.avatar-action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.avatar-action-btn.upload-btn {
  background: #007bff;
}

.avatar-action-btn.upload-btn:hover {
  background: #0056b3;
}

.avatar-action-btn.delete-btn {
  background: #dc3545;
}

.avatar-action-btn.delete-btn:hover {
  background: #c82333;
}

.teacher-modal-info {
  flex: 1;
  color: white;
}

.teacher-modal-info h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
}

.teacher-modal-info p {
  margin: 0;
  opacity: 0.9;
  font-size: 14px;
}

.close-modal-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: white;
  transform: rotate(90deg);
}

/* Modal Content */
.teacher-modal-content {
  padding: 24px;
}

.modal-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e8e8e8;
}

.modal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.modal-section h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.section-icon {
  font-size: 22px;
  display: inline-block;
}

.edit-teacher-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
  background-color: #f8f9fa;
}

.edit-teacher-modal-header h3 {
  margin: 0;
  color: #333;
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: #333;
}

.edit-teacher-modal-content {
  padding: 20px;
}

.form-section {
  margin-bottom: 30px;
}

.form-section h4 {
  margin: 0 0 15px 0;
  color: #333;
  border-bottom: 2px solid #007bff;
  padding-bottom: 5px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 5px;
  color: #555;
  font-size: 13px;
}

.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.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);
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.edit-teacher-modal-footer,
.teacher-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e8e8e8;
  background-color: #f9fafb;
}

.btn-cancel,
.btn-save,
.cancel-btn,
.save-btn {
  padding: 11px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-cancel,
.cancel-btn {
  background-color: #6c757d;
  color: white;
}

.btn-cancel:hover,
.cancel-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-save,
.save-btn {
  background-color: #28a745;
  color: white;
}

.btn-save:hover,
.save-btn:hover {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Responsive tasarım */
@media (max-width: 768px) {
  .teacher-modal {
    width: 95%;
    margin: 10px;
  }
  
  .teacher-modal-header {
    padding: 20px;
    gap: 16px;
  }
  
  .teacher-modal-avatar {
    width: 64px;
    height: 64px;
  }
  
  .avatar-action-btn {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .checkbox-group {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .edit-teacher-modal-footer,
  .teacher-modal-footer {
    flex-direction: column;
  }
  
  .btn-cancel,
  .btn-save,
  .cancel-btn,
  .save-btn {
    width: 100%;
  }
}

/* Öğrenci düzenleme formu stilleri */
.student-edit-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

.student-edit-form .form-group {
  display: flex;
  flex-direction: column;
}

.student-edit-form .form-group label {
  font-size: 12px;
  font-weight: 500;
  color: #666;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.student-edit-form .form-input,
.student-edit-form .form-select,
.student-edit-form .form-textarea {
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  transition: all 0.2s ease;
}

.student-edit-form .form-input:focus,
.student-edit-form .form-select:focus,
.student-edit-form .form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.student-edit-form .form-textarea {
  resize: vertical;
  min-height: 60px;
}

.student-edit-form .form-select {
  cursor: pointer;
}

/* Multi-select dropdown stilleri */
.student-edit-form select[multiple],
.student-edit-form .form-select[multiple],
select#studentOgretmen[multiple],
select#studentGunTercihi[multiple],
select#studentSaatTercihi[multiple] {
  min-height: 120px !important;
  padding: 8px !important;
  color: #333 !important;
  line-height: 1.5 !important;
  font-size: 14px !important;
  background: white !important;
}

.student-edit-form select[multiple] option,
.student-edit-form .form-select[multiple] option,
select#studentOgretmen option,
select#studentGunTercihi option,
select#studentSaatTercihi option {
  padding: 6px 10px !important;
  margin: 2px 0 !important;
  border-radius: 4px !important;
  color: #333 !important;
  background: white !important;
  font-size: 14px !important;
}

.student-edit-form select[multiple] option:checked,
.student-edit-form .form-select[multiple] option:checked,
select#studentOgretmen option:checked,
select#studentGunTercihi option:checked,
select#studentSaatTercihi option:checked {
  background: #667eea !important;
  color: white !important;
  font-weight: 600 !important;
}

.student-edit-form select[multiple] option:hover,
.student-edit-form .form-select[multiple] option:hover,
select#studentOgretmen option:hover,
select#studentGunTercihi option:hover,
select#studentSaatTercihi option:hover {
  background: #e8ecfc !important;
  color: #667eea !important;
}

/* Responsive form ayarları */
@media (max-width: 768px) {
  .student-edit-form .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Avatar Crop Modal Stilleri */
.avatar-crop-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.avatar-crop-modal-overlay.active {
  opacity: 1;
}

.avatar-crop-modal {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  padding: 30px;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.avatar-crop-modal-overlay.active .avatar-crop-modal {
  transform: scale(1);
}

.avatar-crop-modal h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
  text-align: center;
}

.avatar-crop-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 400px;
  margin: 0 auto 20px;
  background: #f5f5f5;
  border-radius: 12px;
  overflow: hidden;
  cursor: move;
  user-select: none;
}

.avatar-crop-image {
  position: absolute;
  max-width: none;
  transition: none;
}

.avatar-crop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.avatar-crop-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  border: 3px solid #007bff;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.avatar-crop-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.zoom-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zoom-control label {
  font-weight: 500;
  color: #333;
  min-width: 80px;
}

.zoom-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
}

.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.zoom-slider::-webkit-slider-thumb:hover {
  background: #0056b3;
}

.zoom-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}

.zoom-slider::-moz-range-thumb:hover {
  background: #0056b3;
}

.avatar-crop-hint {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
}

.avatar-crop-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-crop-cancel,
.btn-crop-save {
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-crop-cancel {
  background-color: #6c757d;
  color: white;
}

.btn-crop-cancel:hover {
  background-color: #5a6268;
}

.btn-crop-save {
  background-color: #28a745;
  color: white;
}

.btn-crop-save:hover {
  background-color: #218838;
}

@media (max-width: 768px) {
  .avatar-crop-modal {
    width: 95%;
    padding: 20px;
  }
  
  .avatar-crop-container {
    height: 350px;
  }
  
  .avatar-crop-circle {
    width: 250px;
    height: 250px;
  }
  
  .avatar-crop-buttons {
    flex-direction: column;
  }
  
  .btn-crop-cancel,
  .btn-crop-save {
    width: 100%;
  }
}

/* Special student star */
.special-student .special-star {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 18px;
  background: #ffd700;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Öğrenci Modal Tab Stilleri */
.student-modal-tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid #ddd;
  background: #f8f9fa;
}

.student-tab-btn {
  padding: 12px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.student-tab-btn:hover {
  background: #e9ecef;
  color: #333;
}

.student-tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background: white;
}

.student-tab-content {
  display: none;
  padding: 0;
}

.student-tab-content.active {
  display: block;
}

/* 3 Sütunlu Form Grid */
.student-edit-form .form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .student-modal-tabs {
    flex-wrap: wrap;
    padding: 8px;
  }
  
  .student-tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    font-size: 12px;
    text-align: center;
  }
  
  .student-edit-form .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Durum Yönetimi Modal Stilleri */
.durum-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}

.durum-item:hover {
  background: #f5f5f5;
}

.durum-item:last-child {
  border-bottom: none;
}
