@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:        #5B3FA6;
  --purple-dark:   #3d2472;
  --purple-mid:    #7B5CC6;
  --purple-light:  #F0ECF8;
  --purple-ultra:  #EDE7F6;
  --blue:          #1565C0;
  --blue-light:    #E3F2FD;
  --green:         #2E7D32;
  --green-light:   #E8F5E9;
  --orange:        #E65100;
  --orange-light:  #FFF3E0;
  --red:           #C62828;
  --red-light:     #FFEBEE;
  --yellow:        #F9A825;
  --yellow-light:  #FFF9C4;
  --pink:          #C2185B;
  --pink-light:    #FCE4EC;
  --gray:          #6B7280;
  --bg:            #F4F2F9;
  --card:          #ffffff;
  --border:        rgba(91,63,166,0.10);
  --shadow:        0 1px 4px rgba(91,63,166,0.08), 0 4px 12px rgba(91,63,166,0.06);
  --shadow-md:     0 4px 16px rgba(91,63,166,0.12), 0 1px 4px rgba(0,0,0,0.06);
  --radius:        14px;
  --topbar-h:      56px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: #1a1a2e;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(91,63,166,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(91,63,166,0.4); }

/* ===== TOPBAR ===== */
.topbar {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 60%, var(--purple-mid) 100%);
  color: white;
  padding: 0 1.5rem;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 16px rgba(61,36,114,0.35);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.topbar .user-info { font-size: 0.83rem; opacity: 0.80; font-weight: 500; }
.topbar .logout-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}
.topbar .logout-btn:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

/* ===== LAYOUT ===== */
.layout { display: flex; min-height: calc(100vh - var(--topbar-h)); }

.sidebar {
  width: 248px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 0.75rem 0 1.5rem;
  flex-shrink: 0;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(91,63,166,0.04);
}

.main { flex: 1; padding: 1.5rem; overflow-y: auto; min-width: 0; }

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid rgba(91,63,166,0.1);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0;
}
.tabs::-webkit-scrollbar { height: 0; }

.tab-btn {
  padding: 0.55rem 1.1rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--gray);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
}
.tab-btn.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  background: var(--purple-ultra);
}
.tab-btn:hover:not(.active) {
  color: #333;
  background: rgba(91,63,166,0.05);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeUp 0.2s ease; }

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

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.card-title {
  font-size: 0.97rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.01em;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 0.71rem;
  font-weight: 700;
  font-family: inherit;
}
.badge-red    { background: var(--red-light); color: var(--red); }
.badge-green  { background: var(--green-light); color: var(--green); }
.badge-blue   { background: var(--blue-light); color: var(--blue); }
.badge-gray   { background: #F3F4F6; color: #374151; }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-purple { background: var(--purple-light); color: var(--purple); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.18s;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-mid) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(91,63,166,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(91,63,166,0.4); }
.btn-green   { background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%); color: white; box-shadow: 0 2px 8px rgba(46,125,50,0.25); }
.btn-green:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(46,125,50,0.35); }
.btn-red     { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.btn-red:hover { background: #fecaca; }
.btn-ghost   { background: transparent; color: var(--gray); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--purple-ultra); color: var(--purple); border-color: rgba(91,63,166,0.2); }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.79rem; border-radius: 7px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 0.85rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.83rem;
  margin-bottom: 0.3rem;
  color: #374151;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid #E5E7EB;
  border-radius: 9px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #FAFAFA;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  color: #1a1a2e;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--purple);
  background: white;
  box-shadow: 0 0 0 3px rgba(91,63,166,0.1);
}
.form-group textarea { resize: vertical; min-height: 70px; }
.form-row { display: flex; gap: 0.8rem; }
.form-row .form-group { flex: 1; }

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.data-table th {
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-weight: 700;
  color: #6B7280;
  border-bottom: 2px solid var(--border);
  background: #FAFAFA;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid rgba(91,63,166,0.06);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--purple-ultra); }
.data-table tr:last-child td { border-bottom: none; }

/* ===== SIDEBAR NAV ===== */
.sidebar-student {
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 10px;
  margin: 0 0.5rem 0.3rem;
  cursor: pointer;
  font-size: 0.87rem;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.sidebar-student:hover { background: var(--purple-ultra); border-color: rgba(91,63,166,0.1); }
.sidebar-student.active {
  background: var(--purple-ultra);
  font-weight: 700;
  color: var(--purple);
  border-color: rgba(91,63,166,0.18);
}
.sidebar-student .s-name { font-weight: 600; line-height: 1.2; }
.sidebar-student .s-meta { font-size: 0.75rem; color: var(--gray); margin-top: 1px; }

/* Öğrenci avatar dairesi */
.s-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9CA3AF;
  padding: 0.6rem 1.25rem 0.35rem;
}

/* ===== MEMORY BOX ===== */
.memory-box {
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
  margin: 0.8rem 0;
  border-left: 5px solid;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  background: #E8EAF6;
  border-left-color: #3F51B5;
}
.memory-box .icon { font-size: 1.4rem; flex-shrink: 0; }

/* ===== TOPIC CARD ===== */
.topic-card {
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.7rem;
  border: 1.5px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow 0.2s, transform 0.15s;
}
.topic-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.topic-card .tc-info { flex: 1; }
.topic-card .tc-title { font-weight: 700; font-size: 0.93rem; }
.topic-card .tc-desc  { font-size: 0.81rem; color: var(--gray); margin-top: 2px; }
.topic-card .tc-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* ===== PROGRESS BAR ===== */
.progress-bar { height: 6px; border-radius: 3px; background: #eee; overflow: hidden; margin-top: 4px; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* ===== STATUS CHIP ===== */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.77rem;
  font-weight: 700;
}
.status-new      { background: #FEF3C7; color: #D97706; }
.status-due      { background: var(--red-light); color: var(--red); }
.status-upcoming { background: var(--blue-light); color: var(--blue); }
.status-done     { background: var(--green-light); color: var(--green); }

/* ===== REVIEW SCREEN ===== */
.review-card {
  max-width: 600px;
  margin: 2rem auto;
  background: white;
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--border);
}
.quality-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.2rem;
}
.quality-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 2px solid #E5E7EB;
  background: white;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.18s;
  min-width: 70px;
  font-family: inherit;
}
.quality-btn span { font-size: 0.71rem; font-weight: 700; color: #6B7280; }
.quality-btn:hover { border-color: var(--purple); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(91,63,166,0.15); }
.quality-btn.selected { border-color: var(--purple); background: var(--purple-light); }

/* ===== STREAK BOX ===== */
.streak-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #FFF8E1, #FFF3CD);
  border: 1.5px solid #FFD54F;
  border-radius: 12px;
  padding: 0.75rem 1.2rem;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.streak-box .s-num { font-size: 1.6rem; color: var(--orange); }

/* ===== LOGIN ===== */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(91,63,166,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(123,92,198,0.14) 0%, transparent 60%),
    radial-gradient(ellipse at 60% 80%, rgba(61,36,114,0.12) 0%, transparent 60%),
    linear-gradient(150deg, #F4F2F9 0%, #EDE7F6 50%, #F0F4FF 100%);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(91,63,166,0.08) 0%, transparent 70%);
  top: -200px; right: -200px;
  border-radius: 50%;
  animation: pulse-bg 8s ease-in-out infinite;
}
.login-wrap::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(123,92,198,0.06) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  border-radius: 50%;
  animation: pulse-bg 10s 2s ease-in-out infinite;
}
@keyframes pulse-bg {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
}
.login-card {
  background: white;
  border-radius: 22px;
  padding: 2.8rem 2.2rem 2.4rem;
  width: 360px;
  box-shadow: 0 8px 40px rgba(91,63,166,0.18), 0 1px 4px rgba(0,0,0,0.05);
  border: 1px solid rgba(91,63,166,0.12);
  position: relative;
  z-index: 1;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-logo {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-mid));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
  box-shadow: 0 6px 20px rgba(91,63,166,0.3);
}
.login-card h1 {
  color: #1a1a2e;
  text-align: center;
  margin-bottom: 0.3rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.login-card .subtitle {
  text-align: center;
  color: #9CA3AF;
  font-size: 0.83rem;
  margin-bottom: 1.8rem;
  font-weight: 500;
}
.login-card .error {
  color: var(--red);
  font-size: 0.83rem;
  text-align: center;
  margin-top: 0.5rem;
  min-height: 1.2rem;
  font-weight: 500;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,10,30,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; animation: fadeIn 0.15s ease; }
.modal {
  background: white;
  border-radius: 18px;
  padding: 1.8rem;
  width: 480px;
  max-width: 96vw;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  max-height: 90vh;
  overflow-y: auto;
  animation: popIn 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn {
  from { transform: scale(0.94) translateY(12px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal h2 {
  font-size: 1.08rem;
  margin-bottom: 1.2rem;
  color: var(--purple);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.modal-footer { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.3rem; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 3rem 1rem; color: #9CA3AF; }
.empty-state .icon { font-size: 3rem; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; font-weight: 500; }

/* ===== TOAST ===== */
#toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1F2937;
  color: white;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  font-size: 0.87rem;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(8px);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  max-width: 320px;
}
#toast.show { opacity: 1; transform: translateY(0); }

/* ===== GAMİFİCATİON ===== */
.gami-bar {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 0.9rem 1.2rem; flex-wrap: wrap;
}
.gami-level { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 160px; }
.level-circle {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-mid));
  color: white;
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(91,63,166,0.35);
  letter-spacing: -0.5px;
}
.gami-xp-col { flex: 1; }
.gami-xp-track { height: 10px; background: #E9D8FD; border-radius: 5px; overflow: hidden; }
.gami-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-dark), var(--purple-mid));
  border-radius: 5px;
  transition: width 0.6s ease;
}
.gami-xp-label { font-size: 0.72rem; color: var(--gray); margin-top: 3px; font-weight: 500; }
.gami-streak, .gami-coins { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.gami-big-icon { font-size: 1.5rem; }
.gami-num { font-size: 1.2rem; font-weight: 800; color: #1a1a2e; line-height: 1; }
.gami-sub { font-size: 0.68rem; color: var(--gray); font-weight: 500; }

/* Hafıza kalkanı barları */
.memory-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid #F9F7FF; font-size: 0.85rem; }
.memory-row:last-child { border-bottom: none; }
.ms-name { width: 130px; flex-shrink: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-bar-wrap { flex: 1; height: 8px; background: #EDE9F4; border-radius: 4px; overflow: hidden; }
.ms-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.ms-bar-fill.strong { background: var(--green); }
.ms-bar-fill.medium { background: var(--yellow); }
.ms-bar-fill.weak   { background: var(--red); }
.ms-pct { font-size: 0.75rem; font-weight: 700; width: 34px; text-align: right; flex-shrink: 0; }
.ms-pct.strong { color: var(--green); }
.ms-pct.medium { color: #B45309; }
.ms-pct.weak   { color: var(--red); }

/* Quest kartları */
.quest-card {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  margin-bottom: 0.55rem;
  border-left: 4px solid var(--red);
  background: white;
  transition: box-shadow 0.18s, transform 0.15s;
}
.quest-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.quest-card.new { border-left-color: var(--orange); }
.quest-card.due { border-left-color: var(--red); }
.quest-left { display: flex; align-items: flex-start; gap: 0.6rem; flex: 1; min-width: 0; }
.quest-status-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.quest-title { font-weight: 700; font-size: 0.9rem; }
.quest-meta  { font-size: 0.75rem; color: var(--gray); margin-top: 2px; font-weight: 500; }
.quest-right { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.xp-chip {
  background: linear-gradient(135deg, var(--purple), var(--purple-mid));
  color: white;
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Quest progress */
.quest-track-wrap { display: flex; align-items: center; gap: 0.5rem; flex: 1; max-width: 180px; }
.quest-track { flex: 1; height: 8px; background: #EDE9F4; border-radius: 4px; overflow: hidden; }
.quest-track-fill { height: 100%; background: linear-gradient(90deg, var(--green), #66BB6A); border-radius: 4px; transition: width 0.4s; }
.quest-count { font-size: 0.8rem; font-weight: 700; color: #4B5563; white-space: nowrap; }

/* Zeigarnik */
.zeigarnik {
  background: linear-gradient(135deg, #F3E8FF, #EDE7F6);
  border: 1.5px solid #D8B4FE;
  border-radius: 10px;
  padding: 0.65rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--purple);
  margin-top: 0.8rem;
  line-height: 1.5;
}

/* Ödül popup */
.reward-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(3px);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.reward-card {
  background: white;
  border-radius: 22px;
  padding: 2rem 1.8rem;
  width: 340px;
  max-width: 95vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: popIn2 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn2 {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.reward-header { font-size: 1.1rem; font-weight: 800; color: var(--purple); margin-bottom: 0.3rem; }
.reward-xp-big {
  font-size: 2.8rem; font-weight: 900;
  color: var(--purple); line-height: 1;
  margin: 0.4rem 0;
  animation: bounceIn 0.4s 0.1s both;
}
@keyframes bounceIn {
  0%   { transform: scale(0.5); }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.reward-level-label  { font-size: 0.8rem; color: #666; margin: 0.7rem 0 0.25rem; font-weight: 600; }
.reward-level-track  { height: 12px; background: #EDE9F4; border-radius: 6px; overflow: hidden; margin: 0 auto; max-width: 240px; }
.reward-level-fill   { height: 100%; background: linear-gradient(90deg, var(--purple-dark), var(--purple-mid)); border-radius: 6px; transition: width 0.8s 0.2s ease; }
.reward-xp-sub       { font-size: 0.75rem; color: #9CA3AF; margin-top: 4px; }
.level-up-banner {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white; border-radius: 12px;
  padding: 0.55rem 1rem; font-weight: 800; font-size: 1rem;
  margin: 0.7rem 0; animation: pulse 0.5s ease;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.badge-earned {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #FEF3C7; border: 1.5px solid #FCD34D;
  border-radius: 10px; padding: 0.4rem 0.8rem;
  font-size: 0.84rem; font-weight: 700; margin: 0.3rem auto;
}
.badge-earned .badge-desc { font-weight: 400; color: #666; font-size: 0.75rem; }
.surprise-box {
  background: linear-gradient(135deg, #E8F5E9, #F3E5F5);
  border: 1.5px solid #A7F3D0;
  border-radius: 12px; padding: 0.6rem 1rem;
  font-weight: 700; font-size: 0.9rem;
  margin: 0.5rem 0; color: #1F2937;
}

/* Topbar mini XP */
.topbar-gami { display: flex; align-items: center; gap: 0.5rem; }
.topbar-level-chip {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  border-radius: 12px; padding: 2px 10px;
  font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.topbar-xp-track { width: 64px; height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; overflow: hidden; }
.topbar-xp-fill  { height: 100%; background: #FCD34D; border-radius: 3px; transition: width 0.5s; }

/* ===== WEEKLY PROGRAM ===== */
.week-nav { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.week-nav button {
  background: none; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 4px 11px;
  cursor: pointer; font-size: 0.87rem; font-weight: 600;
  font-family: inherit; transition: background 0.15s;
}
.week-nav button:hover { background: var(--purple-ultra); border-color: rgba(91,63,166,0.2); }
.week-nav .week-label { font-weight: 700; font-size: 0.9rem; flex: 1; }
.week-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.day-col {
  background: white; border-radius: 12px;
  border: 1.5px solid var(--border); padding: 0.5rem;
  min-height: 140px; display: flex; flex-direction: column;
}
.day-col.today { border-color: var(--purple); background: var(--purple-ultra); }
.day-col-header {
  font-size: 0.77rem; font-weight: 700; color: #6B7280;
  margin-bottom: 0.4rem; text-align: center;
  padding-bottom: 0.3rem; border-bottom: 1px solid var(--border);
}
.day-col.today .day-col-header { color: var(--purple); }
.task-list { flex: 1; }
.task-item {
  display: flex; align-items: flex-start; gap: 4px;
  padding: 3px 0; font-size: 0.8rem;
  border-bottom: 1px solid #F3F0FA; line-height: 1.3;
}
.task-item:last-of-type { border-bottom: none; }
.task-item input[type=checkbox] { margin-top: 2px; flex-shrink: 0; cursor: pointer; accent-color: var(--purple); }
.task-item .task-title { flex: 1; word-break: break-word; }
.task-item.done .task-title { text-decoration: line-through; color: #D1D5DB; }
.task-item .del-btn { background: none; border: none; color: #E5E7EB; cursor: pointer; font-size: 0.85rem; padding: 0 2px; flex-shrink: 0; line-height: 1; }
.task-item .del-btn:hover { color: var(--red); }
.task-add { display: flex; gap: 3px; margin-top: 0.4rem; padding-top: 0.35rem; border-top: 1px solid #F3F0FA; }
.task-add input { flex: 1; padding: 3px 6px; border: 1px solid #E5E7EB; border-radius: 6px; font-size: 0.76rem; min-width: 0; font-family: inherit; }
.task-add input:focus { outline: none; border-color: var(--purple); }
.task-add button { background: var(--purple); color: white; border: none; border-radius: 6px; padding: 3px 7px; cursor: pointer; font-size: 0.82rem; flex-shrink: 0; font-family: inherit; }
.task-add button:hover { background: var(--purple-dark); }

@media (max-width: 900px) { .week-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .week-grid { grid-template-columns: 1fr 1fr; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) { .sidebar { display: none; } .main { padding: 1rem; } }

/* ===== STUDENT PANEL — STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}
.stat-card {
  border-radius: 18px; padding: 1.3rem 1rem 1.1rem;
  border: none; text-align: center;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card.sc-level  { background: linear-gradient(145deg, #EDE7F6 0%, #D8C5F0 100%); box-shadow: 0 4px 18px rgba(91,63,166,0.2); }
.stat-card.sc-streak { background: linear-gradient(145deg, #FFF3E0 0%, #FFE0B2 100%); box-shadow: 0 4px 18px rgba(230,81,0,0.18); }
.stat-card.sc-coins  { background: linear-gradient(145deg, #FFFDE7 0%, #FFF59D 100%); box-shadow: 0 4px 18px rgba(249,168,37,0.22); }
.stat-icon  { font-size: 2rem; line-height: 1; margin-bottom: 0.35rem; display: block; }
.stat-value { font-size: 1.8rem; font-weight: 900; line-height: 1.1; display: block; letter-spacing: -0.03em; }
.stat-card.sc-level  .stat-value { color: var(--purple); }
.stat-card.sc-streak .stat-value { color: #BF360C; }
.stat-card.sc-coins  .stat-value { color: #E65100; }
.stat-label { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; display: block; margin-top: 3px; }
.stat-card.sc-level  .stat-label { color: #7C3AED; }
.stat-card.sc-streak .stat-label { color: #C2410C; }
.stat-card.sc-coins  .stat-label { color: #D97706; }
.stat-xp-bar  { height: 6px; background: rgba(91,63,166,0.15); border-radius: 3px; overflow: hidden; margin: 6px 0 3px; }
.stat-xp-fill { height: 100%; background: linear-gradient(90deg, var(--purple-dark), var(--purple-mid)); border-radius: 3px; transition: width 0.7s ease; }
.stat-xp-sub  { font-size: 0.63rem; color: #7C3AED; font-weight: 600; }

/* Today cards grid */
.today-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 1rem; }
.tcard {
  border-radius: 18px; padding: 1.15rem 1.1rem 0.85rem;
  display: flex; flex-direction: column; gap: 0.65rem;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  position: relative; border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  min-height: 175px;
}
.tcard:not(.tdone):hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.14); }
.tcard.tdone { opacity: 0.5; cursor: default; }
.tcard-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.1rem; }
.tcard-icon {
  width: 50px; height: 50px; border-radius: 50%;
  background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem; flex-shrink: 0;
}
.tcard-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px;
  font-size: 0.71rem; font-weight: 700;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
}
.tcard-badge.b-new  { color: #C2410C; }
.tcard-badge.b-due  { color: #B91C1C; }
.tcard-badge.b-done { color: #15803D; }
.tcard-title { font-size: 0.97rem; font-weight: 800; color: #1a1a2e; line-height: 1.35; flex: 1; }
.tcard-footer {
  display: flex; align-items: center;
  padding-top: 0.55rem; border-top: 1px solid rgba(0,0,0,0.1);
  font-size: 0.72rem; font-weight: 600; color: #6B7280;
  margin-top: auto;
}
.tcard-stat  { display: flex; align-items: center; gap: 3px; flex: 1; justify-content: center; white-space: nowrap; }
.tcard-div   { width: 1px; height: 13px; background: rgba(0,0,0,0.12); flex-shrink: 0; }

/* Subject filter pills */
.subj-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.subj-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 20px;
  border: 1.5px solid var(--border); background: white;
  font-size: 0.79rem; font-weight: 600; cursor: pointer;
  transition: all 0.16s; color: #4B5563; white-space: nowrap;
  font-family: inherit;
}
.subj-pill:hover  { background: var(--purple-ultra); border-color: rgba(91,63,166,0.2); color: var(--purple); }
.subj-pill.active { background: var(--purple); color: white; border-color: var(--purple); box-shadow: 0 2px 8px rgba(91,63,166,0.3); }
.subj-pill .pc { background: rgba(0,0,0,0.1); border-radius: 10px; padding: 0 5px; font-size: 0.67rem; }
.subj-pill.active .pc { background: rgba(255,255,255,0.25); }

/* Ana konu akordeonu (Konularım ağacı) */
.topic-group { margin-bottom: 0.6rem; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; background: white; }
.topic-group-hdr {
  width: 100%; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 0.9rem; border: none; background: var(--purple-ultra, #F5F3FF);
  font-family: inherit; font-size: 0.92rem; font-weight: 700; color: #1a1a2e;
  cursor: pointer; text-align: left; transition: background 0.15s;
}
.topic-group-hdr:hover { background: var(--purple-light); }
.grp-caret { color: var(--purple); font-size: 0.8rem; width: 0.9rem; flex-shrink: 0; }
.grp-title { flex: 1; min-width: 0; }
.grp-meta  { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.grp-meta .pc { background: rgba(91,63,166,0.12); color: var(--purple); border-radius: 10px; padding: 1px 7px; font-size: 0.7rem; font-weight: 700; }
.grp-due   { background: #FEE2E2; color: #DC2626; border-radius: 10px; padding: 1px 7px; font-size: 0.7rem; font-weight: 700; }
.topic-group-body { display: none; padding: 0.7rem; background: #FCFCFE; }
.topic-group-body.open { display: block; }

/* Topics grid v2 */
.topics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 0.7rem; }
.tc2 {
  background: white; border-radius: 13px;
  padding: 0.9rem 1rem; border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.45rem;
  transition: transform 0.16s, box-shadow 0.16s;
  position: relative; overflow: hidden;
}
.tc2:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(91,63,166,0.12); }
.tc2::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 13px 0 0 13px; }
.tc2-head    { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.tc2-title   { font-weight: 700; font-size: 0.88rem; flex: 1; line-height: 1.3; }
.tc2-meta    { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 1px; }
.tc2-actions { display: flex; gap: 0.3rem; flex-shrink: 0; }

/* Memory shield grid */
.shield-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 0.85rem; }
.shield-item {
  border-radius: 16px; padding: 1rem 1.2rem 0.9rem;
  border: 2px solid transparent; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: transform 0.15s, box-shadow 0.15s;
}
.shield-item:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(91,63,166,0.12); }
.shi-header  { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.4rem; }
.shi-name    { font-size: 0.9rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.shi-pct-big { font-size: 1.5rem; font-weight: 900; line-height: 1; flex-shrink: 0; }
.shi-bar     { height: 10px; background: rgba(0,0,0,0.08); border-radius: 6px; overflow: hidden; }
.shi-fill    { height: 100%; border-radius: 6px; transition: width 0.6s cubic-bezier(.4,0,.2,1); }
.shi-fill.strong { background: var(--green); }
.shi-fill.medium { background: #D97706; }
.shi-fill.weak   { background: var(--red); }
.shi-label   { font-size: 0.72rem; font-weight: 600; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.04em; }
.shi-pct-big.strong { color: #16A34A; }
.shi-pct-big.medium { color: #D97706; }
.shi-pct-big.weak   { color: var(--red); }

/* Sidebar subject (öğrenci paneli) */
.sidebar-subject {
  padding: 0.45rem 0.75rem; display: flex; align-items: center;
  justify-content: space-between; border-radius: 9px;
  margin: 0 0.5rem 0.2rem; cursor: pointer;
  font-size: 0.86rem; transition: background 0.15s;
  border: 1px solid transparent; background: none; width: calc(100% - 1rem); text-align: left;
  font-family: inherit; color: inherit;
}
.sidebar-subject:hover { background: var(--purple-ultra); border-color: rgba(91,63,166,0.1); }
.sidebar-subject.active { background: var(--purple-ultra); font-weight: 700; color: var(--purple); border-color: rgba(91,63,166,0.18); }
.sidebar-subject .subj-badges { display: flex; gap: 3px; align-items: center; }

/* Calendar v2 */
.cal-wrap { user-select: none; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.cal-header h3 { font-size: 1rem; font-weight: 700; color: var(--purple); }
.cal-nav { background: none; border: 1.5px solid var(--border); border-radius: 20px; padding: 4px 14px; cursor: pointer; font-size: 0.9rem; font-weight: 700; transition: background 0.15s; font-family: inherit; }
.cal-nav:hover { background: var(--purple-ultra); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day-label { text-align: center; font-size: 0.68rem; font-weight: 700; color: #9CA3AF; padding: 4px 0 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.cal2-cell {
  min-height: 64px; border-radius: 10px; padding: 5px 6px;
  border: 1.5px solid transparent; position: relative;
  transition: all 0.15s; background: #FAFAFA;
}
.cal2-cell.other-month { opacity: 0.25; }
.cal2-cell.today { border-color: var(--purple); background: var(--purple-ultra); }
.cal2-cell.has-events { cursor: pointer; }
.cal2-cell.has-events:hover { background: #EDE7F6; border-color: rgba(91,63,166,0.25); }
.cal2-daynum { font-size: 0.75rem; font-weight: 800; color: #374151; line-height: 1; }
.cal2-cell.today .cal2-daynum { color: var(--purple); }
.cal2-dots { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 3px; }
.cal2-dot   { width: 7px; height: 7px; border-radius: 50%; }
.cal2-dot.d-due    { background: var(--red); }
.cal2-dot.d-today  { background: var(--purple); }
.cal2-dot.d-future { background: var(--blue); }
.cal2-dot.d-note   { background: var(--green); }
.cal2-count { font-size: 0.62rem; font-weight: 700; color: #9CA3AF; margin-top: 1px; }
.cal2-popup {
  position: absolute; top: calc(100% + 5px); left: 0; z-index: 60;
  background: white; border: 1.5px solid var(--border);
  border-radius: 12px; padding: 0.5rem 0;
  min-width: 190px; max-width: 240px;
  box-shadow: var(--shadow-md); font-size: 0.82rem;
}
.cal2-popup-title { font-weight: 700; color: #6B7280; padding: 0.2rem 0.8rem 0.4rem; font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); margin-bottom: 0.3rem; }
.cal2-popup-item {
  display: flex; align-items: flex-start; gap: 0.4rem;
  padding: 0.35rem 0.75rem; cursor: pointer;
  transition: background 0.12s; text-decoration: none; color: inherit;
  border-bottom: 1px solid #F9F7FF;
}
.cal2-popup-item:last-child { border-bottom: none; }
.cal2-popup-item:hover { background: var(--purple-ultra); }
.cal2-popup-item .cpi-title { font-weight: 600; font-size: 0.81rem; line-height: 1.3; flex: 1; }
.cal2-popup-item .cpi-subj  { font-size: 0.7rem; color: var(--gray); margin-top: 1px; }

/* Day col v2 */
.day-col2 {
  border-radius: 14px; border: 1.5px solid rgba(91,63,166,0.08);
  padding: 0.8rem 0.75rem; min-height: 240px;
  display: flex; flex-direction: column;
  transition: box-shadow 0.18s, transform 0.15s;
  box-shadow: 0 1px 4px rgba(91,63,166,0.06);
  background: white;
}
.day-col2:hover { box-shadow: 0 4px 16px rgba(91,63,166,0.12); transform: translateY(-1px); }
.day-col2.today { border-color: var(--purple) !important; box-shadow: 0 3px 16px rgba(91,63,166,0.2) !important; }
.day-col2-hdr { font-size: 0.82rem; font-weight: 800; text-align: center; padding-bottom: 0.5rem; margin-bottom: 0.5rem; border-bottom: 1.5px solid rgba(91,63,166,0.1); color: #4B5563; letter-spacing: 0.01em; }
.day-col2.today .day-col2-hdr { color: var(--purple); border-bottom-color: rgba(91,63,166,0.25); }
.task-item2 { display: flex; align-items: flex-start; gap: 4px; padding: 3px 2px; font-size: 0.78rem; border-bottom: 1px solid #F9F7FF; line-height: 1.3; }
.task-item2:last-of-type { border-bottom: none; }
.task-item2 input[type=checkbox] { margin-top: 2px; flex-shrink: 0; cursor: pointer; accent-color: var(--purple); }
.task-item2 .ti-title { flex: 1; word-break: break-word; }
.task-item2.done .ti-title { text-decoration: line-through; color: #D1D5DB; }
.task-item2 .ti-del { background: none; border: none; color: #E5E7EB; cursor: pointer; font-size: 0.85rem; padding: 0 2px; flex-shrink: 0; line-height: 1; }
.task-item2 .ti-del:hover { color: var(--red); }
.task-add2 { display: flex; gap: 3px; margin-top: 0.4rem; padding-top: 0.35rem; border-top: 1px solid #F3F0FA; }
.task-add2 input { flex: 1; padding: 3px 6px; border: 1px solid #E5E7EB; border-radius: 6px; font-size: 0.75rem; min-width: 0; font-family: inherit; }
.task-add2 input:focus { outline: none; border-color: var(--purple); }
.task-add2 button { background: var(--purple); color: white; border: none; border-radius: 6px; padding: 3px 7px; cursor: pointer; font-size: 0.8rem; flex-shrink: 0; font-family: inherit; }
.task-add2 button:hover { background: var(--purple-dark); }

/* Subject color system */
.sc-turkce    { color: #1565C0; } .sb-turkce   ::before { background: #1565C0; }
.sc-matematik { color: #E65100; } .sb-matematik::before { background: #E65100; }
.sc-fizik     { color: #1B5E20; } .sb-fizik    ::before { background: #1B5E20; }
.sc-biyoloji  { color: #4A148C; } .sb-biyoloji ::before { background: #4A148C; }
.sc-kimya     { color: #BF360C; } .sb-kimya    ::before { background: #BF360C; }
.sc-ingilizce { color: #01579B; } .sb-ingilizce::before { background: #01579B; }
.sc-tarih     { color: #4E342E; } .sb-tarih    ::before { background: #4E342E; }
.sc-cografya  { color: #2E7D32; } .sb-cografya ::before { background: #2E7D32; }
.sc-genel     { color: #5B3FA6; } .sb-genel    ::before { background: #5B3FA6; }

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(3,1fr); gap: 0.4rem; }
  .topics-grid { grid-template-columns: 1fr; }
}

/* ===== ÖĞRETMEN — TODAY ÖZET STRIP ===== */
.today-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.tss-card {
  border-radius: 14px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border: 1.5px solid transparent;
  transition: transform 0.18s, box-shadow 0.18s;
}
.tss-card:hover { transform: translateY(-2px); }
.tss-card.tss-total { background: linear-gradient(135deg, #EDE7F6, #DDD6FE); box-shadow: 0 3px 12px rgba(91,63,166,0.15); }
.tss-card.tss-due   { background: linear-gradient(135deg, #FEE2E2, #FECACA); box-shadow: 0 3px 12px rgba(198,40,40,0.12); }
.tss-card.tss-done  { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); box-shadow: 0 3px 12px rgba(46,125,50,0.12); }
.tss-icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.tss-num  { font-size: 1.6rem; font-weight: 900; line-height: 1; letter-spacing: -0.03em; }
.tss-lbl  { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; opacity: 0.7; }
.tss-card.tss-total .tss-num { color: var(--purple); }
.tss-card.tss-due   .tss-num { color: var(--red); }
.tss-card.tss-done  .tss-num { color: var(--green); }

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

/* ===== MÜFREDAT AĞACI (öğretmen Dersler sekmesi) ===== */
.tree-grade {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.7rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tree-hdr {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; text-align: left;
  border: none; cursor: pointer; font-family: inherit;
  font-weight: 700; transition: background 0.15s;
}
.tree-grade-hdr {
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--purple-ultra), #F5F3FF);
  color: var(--purple-dark);
}
.tree-grade-hdr:hover { background: var(--purple-light); }
.tw-caret { font-size: 0.75rem; width: 14px; flex-shrink: 0; color: var(--purple-mid); }
.tw-count {
  margin-left: auto; background: rgba(91,63,166,0.12); color: var(--purple);
  border-radius: 10px; padding: 1px 9px; font-size: 0.74rem; font-weight: 700;
}
.tree-body { display: none; }
.tree-body.open { display: block; }

.tree-subject { border-top: 1px solid var(--border); }
.tree-subject:first-child { border-top: none; }
.tree-subject-hdr {
  padding: 0.55rem 1rem 0.55rem 1.6rem;
  font-size: 0.88rem; color: #374151;
  background: #FAFAFA;
}
.tree-subject-hdr:hover { background: var(--purple-ultra); }

.tree-topic {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 2.4rem;
  border-top: 1px solid #F3F0FA;
  font-size: 0.88rem;
}
.tree-topic.subtopic {
  padding-left: 3.4rem;
  background: #FCFBFF;
  font-size: 0.84rem;
}
.tree-topic .tt-title { flex: 1; min-width: 0; font-weight: 600; }
.tree-topic.subtopic .tt-title { font-weight: 500; color: #4B5563; }
.tree-topic .tt-dot { color: var(--green); font-size: 0.7rem; }
.tree-topic .tt-actions { display: flex; gap: 0.3rem; flex-shrink: 0; }
.tree-empty { padding: 0.6rem 2.4rem; color: #9CA3AF; font-size: 0.82rem; }

/* Konu Ekle — gruplu liste başlığı */
.pm-group-hdr { display: flex; align-items: center; gap: 0.2rem; }
.pm-group-hdr .tree-hdr { background: #FAFAFA; border-radius: 8px; }
.pm-group-hdr .tree-hdr:hover { background: var(--purple-ultra); }
.pm-group { margin-bottom: 0.25rem; }
