/* CTP Dijital Pazarlama Eğitim Platformu */

:root {
  --navy: #2D3A4A;
  --blue: #29ABE2;
  --blue-dark: #1E8EBF;
  --blue-light: #E8F6FC;
  --gray-bg: #F5F7FA;
  --gray-border: #E2E8F0;
  --gray-text: #64748B;
  --white: #FFFFFF;
  --green: #22C55E;
  --green-light: #DCFCE7;
  --red: #EF4444;
  --red-light: #FEE2E2;
  --orange: #F59E0B;
  --orange-light: #FEF3C7;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --transition: 0.2s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--navy);
  background: var(--gray-bg);
  line-height: 1.7;
  font-size: 16px;
}

/* ─── HEADER ─── */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo { height: 36px; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  color: var(--gray-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.header-nav a:hover { color: var(--blue); }

.header-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-text);
}

.header-progress-bar {
  width: 120px;
  height: 6px;
  background: var(--gray-border);
  border-radius: 3px;
  overflow: hidden;
}

.header-progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ─── LAYOUT ─── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-content {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ─── HERO (Ana Sayfa) ─── */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--navy);
}

.hero p {
  font-size: 1.1rem;
  color: var(--gray-text);
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ─── EKİP SEÇİMİ ─── */
.team-select {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto 60px;
}

.team-card {
  background: var(--white);
  border: 2px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--navy);
}

.team-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.team-card.active {
  border-color: var(--blue);
  background: var(--blue-light);
}

.team-card-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.team-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.team-card p {
  font-size: 0.85rem;
  color: var(--gray-text);
  line-height: 1.5;
}

/* ─── SEVİYE HARİTASI ─── */
.level-section {
  margin-bottom: 48px;
}

.level-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
}

.level-badge.l1 { background: var(--blue); }
.level-badge.l2 { background: var(--orange); }
.level-badge.l3 { background: var(--red); }

.level-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

.level-header .level-subtitle {
  font-size: 0.85rem;
  color: var(--gray-text);
  font-weight: 400;
}

/* ─── MODÜL KARTLARI ─── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.module-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--navy);
  transition: all var(--transition);
}

.module-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}

.module-card.locked {
  opacity: 1;
}

.module-card.completed {
  border-left: 4px solid var(--green);
}

.module-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.module-card.completed .module-number {
  background: var(--green-light);
  color: var(--green);
}

.module-card.locked .module-number {
  background: var(--blue-light);
  color: var(--blue);
}

.module-info { flex: 1; }

.module-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.module-info p {
  font-size: 0.8rem;
  color: var(--gray-text);
}

.module-status {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ─── DERS İÇERİK SAYFASI ─── */
.lesson-header {
  margin-bottom: 40px;
}

.lesson-breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-text);
  margin-bottom: 12px;
}

.lesson-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.lesson-breadcrumb a:hover { text-decoration: underline; }

.lesson-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.lesson-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--gray-text);
}

/* ─── İÇERİK STİLLERİ ─── */
.lesson-content h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 40px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-border);
}

.lesson-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.lesson-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 12px;
}

.lesson-content p {
  margin-bottom: 16px;
}

.lesson-content ul, .lesson-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.lesson-content li {
  margin-bottom: 6px;
}

.lesson-content strong {
  font-weight: 600;
}

.lesson-content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 20px 0;
  box-shadow: var(--shadow);
}

/* ─── BİLGİ KUTULARI ─── */
.info-box {
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 0.95rem;
}

.info-box.analogy {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
}

.info-box.warning {
  background: var(--orange-light);
  border-left: 4px solid var(--orange);
}

.info-box.tip {
  background: var(--green-light);
  border-left: 4px solid var(--green);
}

.info-box-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/* ─── EK KUTU VARYANTLARI ───
 * .dont    → anti-örnek / "şu durumda kullanma" (kırmızı)
 * .signal  → öz-kontrol / "yanlış yolda mısın?" sinyali (navy, kesik çizgi)
 * Renk değişkenleri kullanıldığı için dark mode ile otomatik uyumludur.
 */
.info-box.dont {
  background: var(--red-light);
  border-left: 4px solid var(--red);
}

.info-box.signal {
  background: var(--gray-bg);
  border-left: 4px dashed var(--navy);
}

/* .depends → "Tek doğru yok / duruma göre": birden fazla geçerli yaklaşımın
 * bağlama göre seçildiği karar noktaları. CTP felsefesinin görsel kimliği. */
.info-box.depends {
  background: var(--blue-light);
  border-left: 4px solid var(--navy);
}
.info-box.depends table {
  margin: 12px 0 4px;
}

/* ─── KRİTİK NOKTA VURGUSU ───
 * "Buraya ekstra dikkat" hissi: gölge + kalın kenar + hafif kalın metinle öne çıkar.
 */
.key-point {
  background: var(--orange-light);
  border-left: 5px solid var(--orange);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.key-point-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 0.9rem;
  color: var(--navy);
}

/* ─── MENTÖR TAVSİYESİ KUTUSU ───
 * 15 yıllık sahadan notlar: derslerin içinde "kitabın söylemediği" tecrübe aktarımı.
 */
.mentor-tip {
  background: linear-gradient(135deg, #f7f3eb 0%, #efe6d4 100%);
  border-left: 5px solid #b89866;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px 18px 22px;
  margin: 28px 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(184, 152, 102, 0.08);
}

.mentor-tip::before {
  content: '🎓 MENTÖR TAVSİYESİ';
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #8a6d3b;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.mentor-tip p {
  font-size: 0.94rem;
  line-height: 1.7;
  color: #3d2e1a;
  margin: 0 0 10px;
  font-style: italic;
}

.mentor-tip p:last-of-type {
  margin-bottom: 6px;
}

.mentor-tip .mentor-tip-sign {
  display: block;
  font-size: 0.78rem;
  color: #8a6d3b;
  font-style: normal;
  text-align: right;
  margin-top: 8px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.mentor-tip .mentor-tip-sign::before {
  content: '— ';
}

/* Dark mode uyumu */
body.dark-mode .mentor-tip {
  background: linear-gradient(135deg, #3a3226 0%, #2e2820 100%);
  border-left-color: #c8a979;
}
body.dark-mode .mentor-tip::before { color: #d4b27f; }
body.dark-mode .mentor-tip p { color: #e8dcc6; }
body.dark-mode .mentor-tip .mentor-tip-sign { color: #c8a979; }

/* ─── ARA SINAV KARTI ─── */
.module-card.ara-sinav {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 2px dashed var(--orange);
}

.module-card.ara-sinav:hover {
  background: linear-gradient(135deg, #FDE68A 0%, #FCD34D 100%);
  border-style: solid;
}

.module-card.ara-sinav .module-number {
  background: var(--orange);
  color: var(--white);
}

.module-card.ara-sinav .module-info h3 {
  color: #92400E;
}

/* ─── BUNU NEREDE KULLANACAĞIM KUTUSU ─── */
.relevance-box {
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.relevance-box-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue-dark);
  margin-bottom: 12px;
}

.relevance-box .team-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.93rem;
  line-height: 1.6;
}

.relevance-box .team-item:last-child {
  margin-bottom: 0;
}

.relevance-box .team-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.team-badge.seo { background: #DCFCE7; color: #166534; }
.team-badge.ads { background: #E8F6FC; color: #1E8EBF; }
.team-badge.meta { background: #F3E8FF; color: #7C3AED; }

/* ─── KARAR AĞACI ─── */
.decision-tree {
  background: var(--white);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.decision-tree-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.decision-scenario {
  background: var(--orange-light);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  font-weight: 500;
}

.decision-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.decision-option {
  background: var(--gray-bg);
  border: 2px solid var(--gray-border);
  border-radius: 8px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.93rem;
}

.decision-option:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.decision-option.selected-correct {
  border-color: var(--green);
  background: var(--green-light);
}

.decision-option.selected-wrong {
  border-color: var(--red);
  background: var(--red-light);
}

.decision-feedback {
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.93rem;
  display: none;
}

.decision-feedback.correct {
  background: var(--green-light);
  border-left: 4px solid var(--green);
  display: block;
}

.decision-feedback.wrong {
  background: var(--red-light);
  border-left: 4px solid var(--red);
  display: block;
}

/* ─── KENDİN DENE SİMÜLASYON ─── */
.simulation-box {
  background: var(--white);
  border: 2px solid #6366F1;
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.simulation-box-title {
  font-weight: 700;
  font-size: 1rem;
  color: #6366F1;
  margin-bottom: 16px;
}

.simulation-box label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--navy);
}

.simulation-box input,
.simulation-box select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  font-size: 0.93rem;
  margin-bottom: 12px;
  font-family: inherit;
}

.simulation-box input:focus,
.simulation-box select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(41,171,226,0.15);
}

.simulation-result {
  background: var(--gray-bg);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

.simulation-box .btn {
  margin-top: 8px;
}

/* ─── DERS ÇIKARIM KUTUSU ─── */
.lesson-takeaway {
  background: linear-gradient(135deg, #F0EBFF 0%, #E8F4FD 100%);
  border: 2px solid #8B5CF6;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 48px 0 16px;
  position: relative;
  overflow: hidden;
}

.lesson-takeaway::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8B5CF6, var(--blue));
  border-radius: var(--radius) var(--radius) 0 0;
}

.lesson-takeaway-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #6D28D9;
  margin-bottom: 12px;
}

.lesson-takeaway ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}

.lesson-takeaway li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 8px;
}

.lesson-takeaway li::before {
  content: '✓';
  position: absolute;
  left: -18px;
  color: #8B5CF6;
  font-weight: 700;
}

/* ─── QUIZ ─── */
.quiz-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid var(--gray-border);
}

.quiz-cta-box {
  margin-top: 60px;
  padding: 32px;
  background: linear-gradient(135deg, var(--blue-light) 0%, #FFFFFF 100%);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  text-align: center;
}

.quiz-cta-box h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--navy);
  border: none;
  padding: 0;
}

.quiz-cta-box p {
  color: var(--gray-text);
  margin-bottom: 20px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.quiz-notice {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--orange-light);
  border-left: 4px solid var(--orange);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--navy);
}

.quiz-loading,
.quiz-error {
  padding: 40px;
  text-align: center;
  color: var(--gray-text);
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
}

.quiz-error {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-light);
}

.quiz-review-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--blue-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--blue);
  padding-bottom: 1px;
}

.quiz-review-link:hover {
  color: var(--navy);
  border-color: var(--navy);
}

/* ─── ACRONYM TOOLTIP ─── */
.ctp-term {
  border-bottom: 1px dotted var(--blue);
  cursor: help;
  position: relative;
  display: inline;
  outline: none;
}

.ctp-term:hover,
.ctp-term:focus {
  color: var(--blue-dark);
}

.ctp-term:hover::after,
.ctp-term:focus::after {
  content: attr(data-def);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--navy);
  color: var(--white);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  width: max-content;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  text-align: left;
}

.ctp-term:hover::before,
.ctp-term:focus::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--navy);
  z-index: 1001;
  pointer-events: none;
}

@media (max-width: 640px) {
  .ctp-term:hover::after,
  .ctp-term:focus::after {
    max-width: 260px;
    font-size: 0.8rem;
  }
}

/* ─── SITE SEARCH ─── */
.site-search-wrap {
  position: relative;
  margin-right: 8px;
}

#site-search-input {
  width: 380px;
  padding: 8px 14px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  background: var(--gray-bg);
  transition: all var(--transition);
}

#site-search-input:focus {
  border-color: var(--blue);
  background: var(--white);
  width: 440px;
  box-shadow: 0 0 0 3px rgba(41, 171, 226, 0.12);
}

.site-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
}

.site-search-results.is-open {
  display: block;
}

.search-result {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-border);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover,
.search-result.is-active {
  background: var(--blue-light);
}

.search-result-title {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.search-result-preview {
  font-size: 0.8rem;
  color: var(--gray-text);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.search-result-badge {
  padding: 2px 8px;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.search-result mark {
  background: #FEF08A;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.search-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--gray-text);
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  #site-search-input { width: 220px; }
  #site-search-input:focus { width: 260px; }
}

@media (max-width: 720px) {
  #site-search-input {
    width: 140px;
  }
  #site-search-input:focus {
    width: 160px;
  }
  .site-search-results {
    width: calc(100vw - 32px);
    right: -16px;
  }
}

/* ─── MİNİ GÖREV (AI geri bildirim) ─── */
.mini-gorev-tools {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(99, 102, 241, 0.35);
}

.mini-gorev-label {
  display: block;
  font-weight: 600;
  color: #4338CA;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.mini-gorev-input {
  width: 100%;
  min-height: 100px;
  padding: 12px 14px;
  border: 1px solid #C7D2FE;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--navy);
  background: var(--white);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-sizing: border-box;
}

.mini-gorev-input:focus {
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.mini-gorev-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.mini-gorev-count {
  font-size: 0.8rem;
  color: var(--gray-text);
}

.mini-gorev-submit {
  padding: 9px 18px;
  background: #6366F1;
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition);
}

.mini-gorev-submit:hover:not(:disabled) {
  background: #4F46E5;
}

.mini-gorev-submit:disabled {
  background: #CBD5E1;
  cursor: not-allowed;
}

.mini-gorev-feedback:empty {
  display: none;
}

.mini-gorev-feedback {
  margin-top: 16px;
}

.mini-gorev-loading {
  padding: 14px 16px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 8px;
  color: #4338CA;
  font-size: 0.9rem;
  font-style: italic;
}

.mini-gorev-feedback-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #4338CA;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.mini-gorev-feedback.is-saved .mini-gorev-feedback-label {
  color: var(--gray-text);
}

.mini-gorev-feedback-body {
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid #C7D2FE;
  border-left: 4px solid #6366F1;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--navy);
}

.mini-gorev-feedback-body p {
  margin: 0 0 8px 0;
}

.mini-gorev-feedback-body p:last-child {
  margin-bottom: 0;
}

.mini-gorev-feedback-body ul,
.mini-gorev-feedback-body ol {
  margin: 8px 0 8px 20px;
  padding: 0;
}

.mini-gorev-feedback-body li {
  margin-bottom: 4px;
}

.mini-gorev-error {
  padding: 12px 14px;
  background: var(--red-light);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  color: #991B1B;
  font-size: 0.9rem;
}

.quiz-section h2 {
  font-size: 1.3rem;
  margin-bottom: 24px;
  border: none;
  padding: 0;
}

.quiz-question {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.quiz-question-text {
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9rem;
}

.quiz-option:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.quiz-option.selected {
  border-color: var(--blue);
  background: var(--blue-light);
}

.quiz-option.correct {
  border-color: var(--green);
  background: var(--green-light);
}

.quiz-option.wrong {
  border-color: var(--red);
  background: var(--red-light);
}

.quiz-option input[type="radio"] { display: none; }

.quiz-option-marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gray-text);
}

.quiz-option.selected .quiz-option-marker {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.quiz-option.correct .quiz-option-marker {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.quiz-option.wrong .quiz-option-marker {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.quiz-feedback {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  display: none;
}

.quiz-feedback.correct {
  background: var(--green-light);
  color: #166534;
  display: block;
}

.quiz-feedback.wrong {
  background: var(--red-light);
  color: #991B1B;
  display: block;
}

.quiz-feedback.good {
  background: var(--orange-light);
  color: #92400E;
  display: block;
}

/* ─── TRUE/FALSE ─── */
.quiz-tf-options {
  flex-direction: row;
  gap: 12px;
}

.quiz-tf-btn {
  flex: 1;
  justify-content: center;
  font-weight: 600;
  padding: 16px;
}

/* ─── ORDERING ─── */
.quiz-ordering {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-ordering-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--white);
  transition: all var(--transition);
}

.quiz-ordering-select {
  width: 50px;
  padding: 4px 6px;
  border: 1px solid var(--gray-border);
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
  background: var(--white);
  flex-shrink: 0;
}

.quiz-ordering-text {
  flex: 1;
}

.quiz-ordering-item.ordering-correct {
  border-color: var(--green);
  background: var(--green-light);
}

.quiz-ordering-item.ordering-wrong {
  border-color: var(--red);
  background: var(--red-light);
}

/* ─── BEST ANSWER ─── */
.quiz-option.good-answer {
  border-color: var(--orange);
  background: var(--orange-light);
}

.quiz-option.good-answer .quiz-option-marker {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--white);
}

/* ─── QUIZ SONUÇ ─── */
.quiz-result {
  text-align: center;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  margin-top: 24px;
  display: none;
}

.quiz-result.show { display: block; }

.quiz-score {
  font-size: 3rem;
  font-weight: 700;
  color: var(--blue);
}

.quiz-score.pass { color: var(--green); }
.quiz-score.fail { color: var(--red); }

.quiz-result p {
  margin: 8px 0 20px;
  color: var(--gray-text);
}

/* ─── BUTONLAR ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--gray-border);
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

/* ─── DERS NAVİGASYON ─── */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-border);
}

/* ─── TABLOLAR ─── */
.lesson-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  font-size: 0.9rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow);
}

.lesson-content thead th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.lesson-content tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-border);
  vertical-align: top;
  line-height: 1.5;
}

.lesson-content tbody tr:last-child td {
  border-bottom: none;
}

.lesson-content tbody tr:nth-child(even) {
  background: var(--gray-bg);
}

.lesson-content tbody tr:hover {
  background: var(--blue-light);
}

.lesson-content tbody td:first-child {
  font-weight: 600;
  white-space: nowrap;
}

/* Responsive tablo — mobilde yatay scroll */
@media (max-width: 768px) {
  .lesson-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .lesson-content tbody td:first-child {
    white-space: normal;
  }
}

/* ─── SVG DİYAGRAMLAR ─── */
.svg-diagram {
  width: 100%;
  margin: 24px 0;
  display: flex;
  justify-content: center;
}

.svg-diagram svg {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.08));
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .team-select {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }

  .lesson-header h1 { font-size: 1.4rem; }

  .header-progress-bar { width: 80px; }

  .page-content { padding: 24px 16px 60px; }
}

@media (max-width: 480px) {
  .lesson-nav { flex-direction: column; gap: 12px; }
  .lesson-nav .btn { width: 100%; justify-content: center; }
}

/* ─── AUTH PAGES (login / register) ─── */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--blue-light) 0%, var(--gray-bg) 100%);
}

.auth-main {
  display: flex;
  justify-content: center;
  padding: 48px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.auth-sub {
  color: var(--gray-text);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.55;
}

.auth-sub strong { color: var(--navy); }

.auth-form { display: flex; flex-direction: column; }

.auth-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 14px;
  margin-bottom: 6px;
  color: var(--navy);
}

.auth-input {
  padding: 11px 14px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--navy);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(41, 171, 226, 0.15);
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--gray-text);
}

.auth-submit {
  margin-top: 20px;
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 1rem;
}

.auth-meta {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray-text);
}

.auth-meta a { color: var(--blue); text-decoration: none; font-weight: 600; }
.auth-meta a:hover { color: var(--blue-dark); }

.auth-alert {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-alert-success {
  background: var(--green-light);
  color: #166534;
  border-left: 4px solid var(--green);
}

.auth-alert-error {
  background: var(--red-light);
  color: #991B1B;
  border-left: 4px solid var(--red);
}

.auth-alert ul { margin: 0; padding-left: 20px; }

/* ─── ADMIN PANEL ─── */
.admin-body { background: var(--gray-bg); min-height: 100vh; }

.admin-main { padding: 32px 20px; }

.admin-container {
  max-width: 1100px;
  margin: 0 auto;
}

.admin-title {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.admin-sub {
  color: var(--gray-text);
  margin-bottom: 28px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.admin-stat {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 24px;
}

.admin-stat-warning {
  border-left: 4px solid var(--orange);
  background: linear-gradient(135deg, var(--orange-light) 0%, var(--white) 60%);
}

.admin-stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
}

.admin-stat-label {
  font-size: 0.85rem;
  color: var(--gray-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.admin-stat-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--blue-dark);
  text-decoration: none;
  font-weight: 600;
}

.admin-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-filter {
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.admin-filter:hover { border-color: var(--blue); color: var(--blue); }
.admin-filter.is-active { background: var(--blue); color: var(--white); border-color: var(--blue); }

.admin-table {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.admin-table thead th {
  background: var(--gray-bg);
  text-align: left;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--gray-border);
}

.admin-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-border);
  font-size: 0.92rem;
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inline-form { display: inline-block; margin: 0; }

.btn-mini {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-mini-success { background: var(--green); color: var(--white); }
.btn-mini-success:hover { background: #16A34A; }
.btn-mini-danger { background: var(--red); color: var(--white); }
.btn-mini-danger:hover { background: #DC2626; }

.btn-link {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-blue { background: var(--blue-light); color: var(--blue-dark); }
.badge-green { background: var(--green-light); color: #166534; }
.badge-orange { background: var(--orange-light); color: #92400E; }

.admin-empty {
  padding: 40px;
  text-align: center;
  color: var(--gray-text);
  background: var(--white);
  border: 1px dashed var(--gray-border);
  border-radius: var(--radius);
}

.admin-muted { color: var(--gray-text); }

.admin-pagination { margin-top: 20px; }

.header-nav a.is-active {
  color: var(--blue);
  font-weight: 600;
}

/* ─── FRONTEND AUTH STATUS (public HTML'lerde header'a inject edilir) ─── */
.auth-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--gray-border);
}

.auth-status-name {
  font-size: 0.9rem;
  color: var(--navy);
  font-weight: 600;
}

.auth-status-action {
  font-size: 0.9rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.auth-status-action:hover { color: var(--blue-dark); }

.auth-logout-btn {
  background: none;
  border: 1px solid var(--gray-border);
  color: var(--gray-text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.auth-logout-btn:hover { border-color: var(--red); color: var(--red); }

/* ─── PROFILE SAYFASI ─── */
.profile-grid { max-width: 720px; }

.profile-section {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
}

.profile-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-border);
}

.profile-avatar-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.profile-avatar-big {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--blue-light);
  flex-shrink: 0;
}

.profile-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 2.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid var(--blue);
}

.profile-avatar-actions { flex: 1; min-width: 260px; }

/* ─── HEADER USER WIDGET (auth-status'un kutu şekilli hali) ─── */
.auth-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all var(--transition);
}

.auth-widget:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(41, 171, 226, 0.12);
}

.auth-widget-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.auth-widget-initials {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.auth-widget-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.auth-widget-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.auth-widget-role {
  font-size: 0.72rem;
  color: var(--gray-text);
  font-weight: 500;
  line-height: 1;
}

.auth-widget-menu {
  position: relative;
}

.auth-widget-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-text);
  padding: 4px;
  font-size: 1rem;
  line-height: 1;
  border-radius: 6px;
  transition: background var(--transition);
}

.auth-widget-btn:hover { background: var(--gray-bg); color: var(--navy); }

.auth-widget-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 6px;
  z-index: 200;
  display: none;
}

.auth-widget-dropdown.is-open { display: block; }

.auth-widget-dropdown a,
.auth-widget-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.88rem;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
}

.auth-widget-dropdown a:hover,
.auth-widget-dropdown button:hover {
  background: var(--gray-bg);
}

.auth-widget-dropdown .auth-widget-divider {
  height: 1px;
  background: var(--gray-border);
  margin: 4px 8px;
}

.auth-widget-dropdown .logout-item {
  color: var(--red);
}

/* Guest durumu için basit linkler */
.auth-guest-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-guest-actions .btn-register {
  background: var(--blue);
  color: var(--white);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
}

.auth-guest-actions .btn-register:hover { background: var(--blue-dark); }

/* ─── ANA SAYFA KULLANICI KARTI (SEO/ADS/META yerine) ─── */
.user-hub {
  max-width: 640px;
  margin: 0 auto 60px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.user-hub-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 16px;
  object-fit: cover;
  border: 3px solid var(--blue-light);
}

.user-hub-initials {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

.user-hub-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.user-hub-email {
  font-size: 0.9rem;
  color: var(--gray-text);
  margin-bottom: 24px;
}

.user-hub-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.user-hub-guest-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}

.user-hub-guest-sub {
  color: var(--gray-text);
  margin-bottom: 24px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── CHAT SAYFASI ─── */
.chat-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 140px);
}

.chat-header {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.chat-header h1 { font-size: 1.4rem; margin-bottom: 6px; }

.chat-header p {
  color: var(--gray-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-messages {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  overflow-y: auto;
  min-height: 400px;
  max-height: calc(100vh - 340px);
}

.chat-empty {
  text-align: center;
  color: var(--gray-text);
  padding: 40px 20px;
  font-size: 0.95rem;
}

.chat-empty-suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 20px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.chat-suggestion {
  padding: 12px 14px;
  background: var(--blue-light);
  border: 1px solid var(--blue);
  border-radius: 8px;
  text-align: left;
  font-size: 0.85rem;
  color: var(--blue-dark);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.chat-suggestion:hover { background: var(--blue); color: var(--white); }

.chat-message {
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
}

.chat-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
}

.chat-message.user .chat-message-avatar {
  background: var(--blue);
}

.chat-message.assistant .chat-message-avatar {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
}

.chat-message-body {
  flex: 1;
  min-width: 0;
}

.chat-message-author {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-text);
  margin-bottom: 4px;
}

.chat-message-content {
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--navy);
}

.chat-message-content p { margin-bottom: 8px; }
.chat-message-content p:last-child { margin-bottom: 0; }
.chat-message-content ul, .chat-message-content ol { margin: 8px 0 8px 20px; }
.chat-message-content li { margin-bottom: 4px; }
.chat-message-content code {
  background: var(--gray-bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.chat-typing {
  color: var(--gray-text);
  font-style: italic;
  font-size: 0.9rem;
}

.chat-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 12px;
}

.chat-input {
  flex: 1;
  border: none;
  resize: none;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--navy);
  min-height: 40px;
  max-height: 160px;
  padding: 8px 4px;
  background: transparent;
}

.chat-submit {
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: background var(--transition);
  flex-shrink: 0;
}

.chat-submit:hover:not(:disabled) { background: var(--blue-dark); }
.chat-submit:disabled { background: #CBD5E1; cursor: not-allowed; }

.chat-clear {
  background: none;
  border: 1px solid var(--gray-border);
  color: var(--gray-text);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.chat-clear:hover { border-color: var(--red); color: var(--red); }

.chat-footer-note {
  font-size: 0.78rem;
  color: var(--gray-text);
  text-align: center;
  margin-top: 8px;
}

/* ─── AUTH GATE: Misafir / Kullanıcı görünürlük kuralları ─── */
/* Default: auth-only öğeler gizli (flash önlemek için). JS /api/me kontrolü
   sonrası body'ye .is-authed class'ı eklenir ve öğeler görünür olur. */

.only-authed,
.level-section {
  display: none;
}

body.is-authed .only-authed,
body.is-authed .level-section {
  display: block;
}

body.is-authed .only-guest {
  display: none !important;
}

/* Misafir header'ı sadeleştir: yardımcı sayfa linkleri ve progress gizli */
body:not(.is-authed) .header-progress,
body:not(.is-authed) .header-nav > a {
  display: none !important;
}

/* Misafir için eğitim kartları ve dersler mevcut kullanıcı kutusuyla gizli. */

/* ─── ARAÇ KUTUSU GRID (ana sayfa) ─── */
.tool-grid-section {
  margin-top: 40px;
  margin-bottom: 40px;
}

.tool-grid-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--navy);
}

.tool-grid-sub {
  color: var(--gray-text);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
  transition: all var(--transition);
}

.tool-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tool-card-icon {
  font-size: 2rem;
  margin-bottom: 6px;
  line-height: 1;
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.tool-card p {
  font-size: 0.82rem;
  color: var(--gray-text);
  margin: 0;
  line-height: 1.45;
}

/* ─── PASSWORD MODAL (admin panel) ─── */
.pwd-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.pwd-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(45, 58, 74, 0.55);
  backdrop-filter: blur(2px);
}

.pwd-modal-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.pwd-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pwd-modal-sub {
  color: var(--gray-text);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.pwd-modal-sub strong {
  color: var(--navy);
}

.pwd-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}

.btn-mini-secondary {
  background: var(--gray-bg);
  color: var(--navy);
  border: 1px solid var(--gray-border);
}

.btn-mini-secondary:hover {
  background: var(--blue-light);
  border-color: var(--blue);
  color: var(--blue-dark);
}

/* ─── DARK TEMA ─── */
:root[data-theme="dark"] {
  --navy: #E2E8F0;
  --blue: #38BDF8;
  --blue-dark: #7DD3FC;
  --blue-light: rgba(56, 189, 248, 0.13);
  --gray-bg: #0F172A;
  --gray-border: #334155;
  --gray-text: #94A3B8;
  --white: #1E293B;
  --green: #4ADE80;
  --green-light: rgba(74, 222, 128, 0.13);
  --red: #F87171;
  --red-light: rgba(248, 113, 113, 0.15);
  --orange: #FBBF24;
  --orange-light: rgba(251, 191, 36, 0.13);
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.55);
  color-scheme: dark;
}

/* Dark modda input arka planları, kart'lar, link'ler ayarlanır */
:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select {
  background: #0B1220;
  color: var(--navy);
  border-color: var(--gray-border);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #64748B;
}

:root[data-theme="dark"] .chat-input,
:root[data-theme="dark"] .mini-gorev-input {
  background: #0B1220;
  color: var(--navy);
}

:root[data-theme="dark"] code {
  background: #0B1220;
  color: #7DD3FC;
}

:root[data-theme="dark"] .module-card.completed {
  border-left-color: var(--green);
}

:root[data-theme="dark"] .site-search-results {
  background: #1E293B;
}

:root[data-theme="dark"] .search-result mark {
  background: rgba(251, 191, 36, 0.3);
  color: #FDE68A;
}

:root[data-theme="dark"] .badge-blue {
  background: rgba(56, 189, 248, 0.2);
  color: #7DD3FC;
}

:root[data-theme="dark"] .badge-green {
  background: rgba(74, 222, 128, 0.2);
  color: #86EFAC;
}

:root[data-theme="dark"] .badge-orange {
  background: rgba(251, 191, 36, 0.2);
  color: #FCD34D;
}

:root[data-theme="dark"] .mini-gorev-feedback-body {
  background: #0B1220;
  border-color: #4338CA;
}

:root[data-theme="dark"] .auth-alert-success {
  background: rgba(74, 222, 128, 0.15);
  color: #86EFAC;
}

:root[data-theme="dark"] .auth-alert-error {
  background: rgba(248, 113, 113, 0.15);
  color: #FCA5A5;
}

/* Mermaid diyagramları için dark uyarlama zorlama (orijinal renkler zaten
   CTP paletinden geliyor, dark'ta da okunabilir). */

/* ─── TEMA TOGGLE BUTONU ─── */
.theme-toggle-btn {
  background: var(--gray-bg);
  border: 1px solid var(--gray-border);
  color: var(--navy);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.theme-toggle-btn:hover {
  border-color: var(--blue);
  transform: rotate(15deg);
}

:root[data-theme="dark"] .theme-toggle-btn {
  background: #0B1220;
}

/* ─── CUSTOMERS ─── */
.customers-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.customers-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.customers-filter {
  margin-bottom: 20px;
}

.back-link {
  display: inline-block;
  color: var(--blue);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 10px;
}

.back-link:hover { text-decoration: underline; }

.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.customer-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--navy);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.customer-card-title {
  font-size: 1rem;
  font-weight: 700;
}

.customer-card-desc {
  font-size: 0.85rem;
  color: var(--gray-text);
  line-height: 1.45;
  flex: 1;
}

.customer-card-meta {
  font-size: 0.78rem;
  color: var(--gray-text);
  display: flex;
  gap: 10px;
}

/* ─── NOTLAR (timeline) ─── */
.notes-timeline {
  margin-top: 32px;
}

.note-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.note-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.note-card-author {
  display: flex;
  gap: 10px;
  align-items: center;
}

.note-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.note-card-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.note-card-date {
  font-size: 0.75rem;
  color: var(--gray-text);
}

.note-card-body {
  white-space: pre-wrap;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--navy);
}

/* ─── LOG DETAY ─── */
.log-detail {
  margin-top: 8px;
  font-size: 0.8rem;
}

.log-detail summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 600;
}

.log-detail pre {
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--gray-bg);
  border-radius: 6px;
  font-size: 0.75rem;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─── CHAT: müşteri seçici ─── */
.chat-customer-picker {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.chat-customer-picker label {
  font-size: 0.85rem;
  color: var(--gray-text);
  font-weight: 600;
}

.chat-customer-picker select {
  padding: 7px 12px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--white);
  color: var(--navy);
  font-family: inherit;
  cursor: pointer;
}

.chat-customer-picker select:focus {
  outline: none;
  border-color: var(--blue);
}

/* Koyu temada logoyu beyaza çevir */
:root[data-theme="dark"] .header-logo {
  filter: brightness(0) invert(1);
}

/* Breadcrumb bar — header altı, page-content üstü */
.page-breadcrumb-bar {
  max-width: 920px;
  margin: 20px auto 0;
  padding: 0 24px;
}

.page-breadcrumb-bar .lesson-breadcrumb {
  margin-bottom: 0;
}

/* lesson-header içindeki breadcrumb artık yok, başlık üst boşluğunu azalt */
.lesson-header { padding-top: 0; }

/* ─── KATEGORİ GRID (ana sayfa) ─── */
.category-section {
  margin-top: 40px;
  margin-bottom: 40px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.category-card {
  display: flex;
  gap: 16px;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
  transition: all var(--transition);
  align-items: flex-start;
}

.category-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.category-card-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.category-card-body { flex: 1; min-width: 0; }

.category-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.category-card-body p {
  font-size: 0.85rem;
  color: var(--gray-text);
  margin: 0 0 8px 0;
  line-height: 1.45;
}

.category-card-meta {
  font-size: 0.78rem;
  color: var(--blue-dark);
  font-weight: 600;
}

/* ─── GENİŞ EKRANDA FULL-BLEED DİYAGRAMLAR ve TABLOLAR ─── */
/* Metin 920px dar container'da kalır (okunabilirlik için). Ama Mermaid,
   SVG diyagram ve tablolar gibi görsel içerikler viewport'un %100'üne
   yakınını kullanır — küçük/okunmaz kalmasınlar. */
@media (min-width: 1100px) {
  .lesson-content .mermaid,
  .lesson-content .svg-diagram,
  .lesson-content table,
  .lesson-content .full-bleed {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 48px);
    max-width: none;
  }

  .lesson-content .mermaid svg,
  .lesson-content .svg-diagram svg {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  /* Mermaid SVG içi yazılar default 14px — biraz büyütelim ki rahat okunsun */
  .lesson-content .mermaid svg text,
  .lesson-content .mermaid svg .nodeLabel,
  .lesson-content .mermaid svg foreignObject div {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
}

/* Ultra-wide ekranda (2100px+) sonsuza yayılmasın */
@media (min-width: 2100px) {
  .lesson-content .mermaid,
  .lesson-content .svg-diagram,
  .lesson-content table,
  .lesson-content .full-bleed,
  .lesson-content .timeline-container {
    width: 2000px;
  }
}

/* Timeline wrapper (gantt chart gibi büyük mermaid'ler için) full-bleed */
@media (min-width: 1100px) {
  .lesson-content .timeline-container {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 48px);
    max-width: none;
    overflow-x: auto;
  }

  /* İçindeki .mermaid parent'tan genişliğini alsın — çifte full-bleed olmasın */
  .lesson-content .timeline-container .mermaid {
    position: static;
    transform: none;
    left: auto;
    width: 100%;
  }
}

/* ─── BREADCRUMB BAR İLE İLERLEME BARI ─── */
.page-breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

.page-breadcrumb-bar .lesson-breadcrumb {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--gray-text);
}

.breadcrumb-progress-bar {
  width: 140px;
  height: 6px;
  background: var(--gray-border);
  border-radius: 3px;
  overflow: hidden;
}

.breadcrumb-progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.5s ease;
}

#globalProgressText {
  font-weight: 600;
  color: var(--navy);
  min-width: 38px;
  text-align: right;
}

@media (max-width: 640px) {
  .breadcrumb-progress-bar { width: 80px; }
  #globalProgressText { font-size: 0.75rem; }
}

/* Panel rehberi: İngilizce path'in sağında Türkçe karşılık */
.path-tr {
  color: var(--gray-text);
  font-style: italic;
  font-size: 0.9em;
  margin-left: 4px;
}
.path-tr::before { content: "("; }
.path-tr::after { content: ")"; }

/* ─── "Kaldığın yerden devam et" kartı (ana sayfada) ─── */
.continue-card {
  max-width: 920px;
  margin: 24px auto 0;
  background: linear-gradient(135deg, var(--blue-light) 0%, var(--white) 100%);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.continue-card-icon { font-size: 1.8rem; flex-shrink: 0; }

.continue-card-body { flex: 1; min-width: 0; }

.continue-card-label {
  font-size: 0.8rem;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.continue-card-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}

.continue-card-link:hover { color: var(--blue); }

.continue-card-dismiss {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--gray-text);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 6px;
}

.continue-card-dismiss:hover { background: var(--gray-bg); color: var(--red); }

/* ─── KİŞİSEL NOT WIDGET (ders sayfalarında sağ alt FAB + modal) ─── */
.notes-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(41, 171, 226, 0.4);
  z-index: 990;
  transition: all var(--transition);
}

.notes-fab:hover {
  background: var(--blue-dark);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(41, 171, 226, 0.5);
}

.notes-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2100;
  padding: 20px;
}

.notes-modal-backdrop {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(45, 58, 74, 0.55);
  backdrop-filter: blur(2px);
}

.notes-modal-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.notes-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.notes-modal-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.notes-modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--gray-text);
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}

.notes-modal-context {
  font-size: 0.82rem;
  color: var(--gray-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-border);
}

.notes-modal-context-title { font-weight: 600; color: var(--navy); }

.notes-modal-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  color: var(--navy);
  background: var(--white);
  box-sizing: border-box;
}

.notes-modal-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(41,171,226,0.15);
}

.notes-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.notes-modal-hint {
  font-size: 0.78rem;
  color: var(--gray-text);
}

.notes-modal-hint a { color: var(--blue); }

.notes-modal-feedback {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.notes-modal-feedback.is-success {
  background: var(--green-light);
  color: #166534;
  border-left: 4px solid var(--green);
}

.notes-modal-feedback.is-error {
  background: var(--red-light);
  color: #991B1B;
  border-left: 4px solid var(--red);
}

/* Notlar listesi — context linki */
.note-card-context {
  margin-top: 2px;
  font-size: 0.78rem;
}
.note-card-context a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
.note-card-context a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .notes-fab { bottom: 16px; right: 16px; width: 48px; height: 48px; font-size: 1.3rem; }
}

/* ─── MESAJLAŞMA ─── */
.conv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conv-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
  transition: all var(--transition);
  position: relative;
}

.conv-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}

.conv-card.is-unread {
  border-left: 4px solid var(--blue);
  background: linear-gradient(90deg, var(--blue-light) 0%, var(--white) 8%);
}

.conv-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.conv-card-body { flex: 1; min-width: 0; }

.conv-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.conv-card-who { font-weight: 700; font-size: 0.95rem; }
.conv-card-time { font-size: 0.75rem; color: var(--gray-text); }

.conv-card-subject {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-dark);
  margin-top: 2px;
}

.conv-card-preview {
  font-size: 0.82rem;
  color: var(--gray-text);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.conv-card-badge {
  background: var(--blue);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  align-self: center;
  flex-shrink: 0;
}

/* Thread görünümü */
.msg-thread {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.msg-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  align-items: flex-start;
}

.msg-row.is-mine { flex-direction: row-reverse; }

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.msg-row.is-mine .msg-avatar { background: var(--navy); }

.msg-bubble {
  max-width: 70%;
  background: var(--gray-bg);
  border-radius: 12px;
  padding: 10px 14px;
}

.msg-row.is-mine .msg-bubble {
  background: var(--blue-light);
}

.msg-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.75rem;
  color: var(--gray-text);
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.msg-author { font-weight: 700; color: var(--navy); }

.msg-body {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--navy);
  white-space: pre-wrap;
}

.msg-delete {
  background: none;
  border: none;
  color: var(--gray-text);
  cursor: pointer;
  padding: 0 4px;
  font-size: 0.95rem;
  line-height: 1;
}

.msg-delete:hover { color: var(--red); }

.msg-reply {
  margin-top: 16px;
}

.msg-reply .auth-input { font-family: inherit; }

/* Nav badge — okunmamış mesaj sayacı */
.nav-badge {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}
