/* ============================================
   KB LMS - Modern Eğitim Yönetim Sistemi
   ============================================ */

/* Genel Ayarlar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Poppins', sans-serif;
  background-color: #f7fafc;
  color: #2d3748;
  line-height: 1.6;
}

.kb-admin-dashboard {
  max-width: 1400px;
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Gradient Header - Modern Tasarım
   ============================================ */
.gradient-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.gradient-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
  position: relative;
}

.top-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
  z-index: 1;
  position: relative;
}

.top-icons span {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.2rem;
  backdrop-filter: blur(10px);
}

.top-icons span:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.top-icons span:active {
  transform: translateY(-1px) scale(0.98);
}

/* ============================================
   Sekmeli Navigasyon - Modern Tabs
   ============================================ */
.admin-nav {
  display: flex;
  justify-content: space-around;
  background: white;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-nav::-webkit-scrollbar {
  height: 3px;
}

.admin-nav::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.admin-nav::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.tab {
  background: none;
  border: none;
  padding: 1.2rem 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: #718096;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.tab:hover {
  color: #667eea;
  background: linear-gradient(180deg, transparent 0%, rgba(102, 126, 234, 0.05) 100%);
}

.tab.active {
  color: #667eea;
  background: linear-gradient(180deg, transparent 0%, rgba(102, 126, 234, 0.08) 100%);
}

.tab.active::after {
  width: 100%;
}

/* ============================================
   Sekme İçerikleri - Smooth Transitions
   ============================================ */
.tab-content {
  display: none;
  padding: 2rem;
  animation: fadeInUp 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================
   Arama ve Buton Alanı
   ============================================ */
.search-add-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
}

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

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

.btn-add {
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

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

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

/* ============================================
   Kullanıcı Kartları
   ============================================ */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.user-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
}

.user-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.user-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.user-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: #2d3748;
  font-weight: 600;
}

.user-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #718096;
}

.user-card-body {
  margin: 1rem 0;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.user-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #4a5568;
}

.user-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-action {
  flex: 1;
  padding: 0.625rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-view {
  background: #e6f2ff;
  color: #667eea;
}

.btn-view:hover {
  background: #667eea;
  color: white;
}

.btn-edit {
  background: #fff4e6;
  color: #f59e0b;
}

.btn-edit:hover {
  background: #f59e0b;
  color: white;
}

.btn-delete {
  background: #ffe6e6;
  color: #ef4444;
}

.btn-delete:hover {
  background: #ef4444;
  color: white;
}

/* ============================================
   İstatistik Kartları - Modern Cards
   ============================================ */
.stat-card {
  background: white;
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #667eea, #764ba2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card .icon {
  width: 60px;
  height: 60px;
  font-size: 2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.stat-card .label {
  font-size: 0.95rem;
  color: #718096;
  margin-bottom: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.stat-card .value {
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* ============================================
   Ders Kartları - Course Cards
   ============================================ */
.course-card {
  background: white;
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.course-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-radius: 0 0 0 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.course-card:hover::after {
  opacity: 1;
}

.course-card h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #2d3748;
  position: relative;
  z-index: 1;
}

.course-card p {
  font-size: 0.95rem;
  color: #718096;
  margin: 0.75rem 0 1.25rem 0;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ============================================
   Progress Bar - Modern İlerleme Çubuğu
   ============================================ */
.progress-bar {
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin: 1rem 0;
  height: 10px;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-bar div {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-bar div::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: #a0aec0;
  margin-top: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ============================================
   Modül Listesi - Modern List
   ============================================ */
.module-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 1rem;
}

.module-list li {
  background: white;
  margin-bottom: 0;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid #667eea;
  font-weight: 500;
  color: #2d3748;
  position: relative;
  overflow: hidden;
}

.module-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), transparent);
  transition: width 0.3s ease;
}

.module-list li:hover {
  transform: translateX(8px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.15);
  border-left-width: 6px;
}

.module-list li:hover::before {
  width: 100%;
}

/* ============================================
   Modal / Popup
   ============================================ */
.kb-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f7fafc;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #718096;
}

.modal-close:hover {
  background: #ef4444;
  color: white;
  transform: rotate(90deg);
}

.modal-body {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

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

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

.modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-cancel {
  padding: 0.875rem 1.75rem;
  background: #f7fafc;
  color: #718096;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background: #e2e8f0;
  color: #4a5568;
}

.btn-submit {
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

/* ============================================
   Video Kartları
   ============================================ */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.video-thumbnail {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}

.video-card-body {
  padding: 1.25rem;
}

.video-card-body h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #2d3748;
}

.video-card-body p {
  margin: 0;
  font-size: 0.85rem;
  color: #718096;
}

/* ============================================
   Kategori Kartları
   ============================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  text-align: center;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.category-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.category-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
  color: #2d3748;
}

.category-card p {
  margin: 0 0 1rem 0;
  font-size: 0.85rem;
  color: #718096;
}

/* ============================================
   Grafik Alanları - Chart Sections
   ============================================ */
.graph-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.bar-chart, .donut-chart {
  flex: 1;
  min-width: 300px;
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #718096;
  font-weight: 500;
}

.bar-chart:hover, .donut-chart:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

/* ============================================
   Footer - Modern Alt Bilgi
   ============================================ */
.kb-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: #a0aec0;
  background: linear-gradient(180deg, transparent, rgba(102, 126, 234, 0.03));
  border-top: 1px solid #e2e8f0;
  margin-top: 3rem;
}

/* ============================================
   Responsive Tasarım
   ============================================ */
@media (max-width: 768px) {
  .gradient-header {
    padding: 1.25rem 1.5rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .top-icons span {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .admin-nav {
    justify-content: flex-start;
  }

  .tab {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
  }

  .tab-content {
    padding: 1.5rem;
  }

  .tab-content h3 {
    font-size: 1.5rem;
  }

  .stat-card, .course-card {
    padding: 1.5rem;
  }

  .graph-section {
    flex-direction: column;
  }

  .bar-chart, .donut-chart {
    min-width: 100%;
  }

  .search-add-section {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: 100%;
  }

  .btn-add {
    width: 100%;
    justify-content: center;
  }

  .users-grid, .videos-grid, .categories-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .gradient-header {
    padding: 1rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .tab {
    padding: 0.875rem 1.25rem;
    font-size: 0.85rem;
  }

  .tab-content {
    padding: 1rem;
  }

  .stat-card .value {
    font-size: 1.875rem;
  }

  .course-card h4 {
    font-size: 1.15rem;
  }

  .meta {
    gap: 0.75rem;
    font-size: 0.8rem;
  }

  .modal-content {
    padding: 1.5rem;
  }
}


/* ============================================
   ÖĞRENCİ PROFİL KARTI - MODAL TASARIMI
   ============================================ */

/* Öğrenci Profil Modal */
.student-profile-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10001;
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
  padding: 2rem;
}

.student-profile-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

