/* ============================================
   SBY - Eğitim Modülü Stilleri
   ============================================ */

/* ── LAYOUT ── */
.edu-layout { display: flex; gap: 1.5rem; height: calc(100vh - 4rem); }
.edu-sidebar { width: 220px; min-width: 220px; display: flex; flex-direction: column; gap: 0.5rem; }
.edu-main { flex: 1; overflow-y: auto; }

/* ── NAV ── */
.edu-nav-btn {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: var(--transition);
  border: none; background: transparent;
  color: var(--text); width: 100%; text-align: left;
}
.edu-nav-btn:hover { background: var(--bg2); }
.edu-nav-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-dk)); color: #fff; }
.edu-nav-btn .icon { font-size: 1.1rem; width: 22px; text-align: center; }

/* ── NOT GİRİŞİ ── */
.grades-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.grades-table th { background: var(--bg2); padding: 0.75rem 1rem; text-align: left; font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.grades-table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); }
.grades-table tr:last-child td { border-bottom: none; }
.grades-table tr:hover td { background: var(--bg2); }

.subject-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 700; font-size: 0.9rem;
}
.grade-input {
  width: 70px; padding: 0.3rem 0.5rem;
  border: 2px solid var(--border); border-radius: 6px;
  font-weight: 700; font-size: 0.95rem; text-align: center;
  transition: var(--transition);
}
.grade-input:focus { border-color: var(--primary); outline: none; }
.grade-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.82rem; font-weight: 700;
}
.grade-badge.high   { background: #e8f5e9; color: #2e7d32; }
.grade-badge.mid    { background: #fff8e1; color: #f57c00; }
.grade-badge.low    { background: #fde8e8; color: #c62828; }

/* ── İSTATİSTİK KARTLARI ── */
.edu-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.edu-stat-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.1rem; box-shadow: var(--shadow); text-align: center;
}
.edu-stat-card .icon { font-size: 1.8rem; margin-bottom: 0.35rem; }
.edu-stat-card .val  { font-size: 1.6rem; font-weight: 900; color: var(--primary); line-height: 1; }
.edu-stat-card .lbl  { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── PERFORMANS ÇUBUKLARI ── */
.perf-list { display: flex; flex-direction: column; gap: 0.75rem; }
.perf-item { display: flex; align-items: center; gap: 0.75rem; }
.perf-subject { font-weight: 700; font-size: 0.9rem; min-width: 140px; }
.perf-bar-bg  { flex: 1; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.perf-bar-fill { height: 100%; border-radius: 5px; transition: width 0.8s ease; }
.perf-pct { font-size: 0.82rem; font-weight: 700; min-width: 38px; text-align: right; }

/* ── SORU EKRANI ── */
.question-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1rem;
}
.question-meta {
  display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.q-badge {
  font-size: 0.75rem; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; background: var(--bg2); color: var(--text-muted);
}
.question-text { font-size: 1.05rem; font-weight: 600; margin-bottom: 1.25rem; line-height: 1.55; }
.question-options { display: flex; flex-direction: column; gap: 0.5rem; }
.q-option {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  border: 2px solid var(--border); cursor: pointer;
  transition: var(--transition); background: var(--bg2);
  font-size: 0.95rem; text-align: left; width: 100%;
}
.q-option:hover { border-color: var(--primary); background: var(--primary-lt); }
.q-option.selected { border-color: var(--primary); background: var(--primary-lt); }
.q-option.correct  { border-color: #2e7d32; background: #e8f5e9; color: #2e7d32; }
.q-option.wrong    { border-color: #c62828; background: #fde8e8; color: #c62828; }
.q-option .opt-letter { font-weight: 900; font-size: 1rem; min-width: 22px; }

.explanation-box {
  margin-top: 1rem; padding: 0.85rem 1rem;
  background: #f0f4ff; border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem; line-height: 1.55;
}

/* ── AI SOHBET ── */
.ai-chat-layout { display: flex; flex-direction: column; height: calc(100vh - 6rem); }
.ai-chat-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem; background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  flex-shrink: 0;
}
.ai-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.ai-chat-messages {
  flex: 1; overflow-y: auto; padding: 1.25rem;
  background: var(--bg); display: flex; flex-direction: column; gap: 0.85rem;
}
.ai-msg { display: flex; gap: 0.75rem; align-items: flex-start; }
.ai-msg.user { flex-direction: row-reverse; }
.ai-msg-bubble {
  max-width: 70%; padding: 0.75rem 1rem; border-radius: 18px;
  font-size: 0.95rem; line-height: 1.55;
}
.ai-msg.assistant .ai-msg-bubble { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,0.06); border-bottom-left-radius: 4px; }
.ai-msg.user .ai-msg-bubble { background: linear-gradient(135deg, var(--primary), var(--primary-dk)); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; align-self: flex-end; }

.ai-chat-input {
  display: flex; gap: 0.5rem; padding: 0.85rem 1rem;
  background: var(--surface); border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius); flex-shrink: 0;
}
.ai-chat-input textarea {
  flex: 1; border-radius: 20px; padding: 0.6rem 1rem;
  resize: none; min-height: 42px; max-height: 100px; font-size: 0.95rem;
}
.ai-send-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff; font-size: 1.1rem; padding: 0; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(155,89,182,0.3);
}
.ai-send-btn:hover { transform: scale(1.08); }

.ai-typing { display: flex; gap: 4px; align-items: center; padding: 0.5rem 0; }
.ai-typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: typing 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

/* ── SORU ÜRETME PANELİ ── */
.question-gen-panel {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1.25rem;
}
.gen-controls { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; }
.gen-controls .form-group { margin: 0; min-width: 140px; flex: 1; }
.gen-controls label { font-size: 0.78rem; }

/* ── DENEME SINAVI ── */
.exam-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow);
  margin-bottom: 0.75rem; display: flex; align-items: center; gap: 1rem;
}
.exam-date { font-size: 0.8rem; color: var(--text-muted); min-width: 80px; }
.exam-name { font-weight: 700; flex: 1; }
.exam-scores { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.exam-score-pill { font-size: 0.75rem; font-weight: 700; padding: 2px 7px; border-radius: 12px; background: var(--bg2); }

@media (max-width: 768px) {
  .edu-layout { flex-direction: column; height: auto; }
  .edu-sidebar { width: 100%; flex-direction: row; overflow-x: auto; flex-wrap: nowrap; min-width: unset; }
  .edu-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
