:root {
  /* Nötr açık gri tema: siyah ile beyaz arası, sunumlar için yüksek okunabilirlik */
  --bg-main: #e9edf2;
  --bg-surface: #ffffff;
  --bg-soft: #f4f6f9;
  --bg-hover: #eef1f6;
  --border: #d5dbe3;
  --border-strong: #c3cbd6;

  --primary: #4f46e5;
  --primary-soft: rgba(79, 70, 229, 0.10);
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
  --accent: #0891b2;
  --success: #059669;
  --danger: #dc2626;

  --text-main: #1e293b;
  --text-muted: #475569;
  --text-dim: #64748b;

  --sidebar-w: 340px;
  --header-h: 64px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --transition: all 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.bg-orb { display: none; }

/* ---------- Header ---------- */
.portal-header {
  position: relative;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  flex-shrink: 0;
  gap: 12px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 7px 11px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--primary);
}

.brand-icon {
  width: 38px; height: 38px;
  background: var(--primary-gradient);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-text h1 {
  font-size: 1.05rem; font-weight: 700; letter-spacing: -0.3px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text span {
  font-size: 0.74rem; color: var(--text-dim); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.progress-summary {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft);
  padding: 6px 12px;
  border-radius: 30px;
  border: 1px solid var(--border);
}
.progress-track { width: 90px; height: 6px; background: #dde3ea; border-radius: 6px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary-gradient); border-radius: 6px; transition: width .4s ease; width: 0%; }
.progress-text { font-size: 0.8rem; font-weight: 700; color: var(--primary); }

.user-badge {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.85rem; font-weight: 600;
  background: var(--bg-soft);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.btn-logout {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 6px 14px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  font-family: inherit;
  transition: var(--transition);
}
.btn-logout:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* ---------- Layout ---------- */
.app-container { display: flex; flex: 1; overflow: hidden; position: relative; min-height: 0; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  z-index: 40;
  transition: margin-left .26s cubic-bezier(.16, 1, .3, 1), transform .26s cubic-bezier(.16, 1, .3, 1), opacity .2s ease;
}

.sidebar-header { padding: 14px; border-bottom: 1px solid var(--border); }
.sidebar-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sidebar-title { font-size: 0.92rem; font-weight: 700; }

.btn-close-sidebar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.btn-close-sidebar:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.search-input-wrap { position: relative; display: flex; align-items: center; }
.search-input-wrap .search-icon { position: absolute; left: 12px; font-size: .85rem; pointer-events: none; opacity: .55; }
.search-input-wrap input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px 9px 34px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.search-input-wrap input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.chapters-list {
  flex: 1; overflow-y: auto; padding: 10px;
  display: flex; flex-direction: column; gap: 6px;
  -webkit-overflow-scrolling: touch;
}

.chapter-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.chapter-item:hover { background: var(--bg-hover); border-color: var(--border); }
.chapter-item.active { background: var(--primary-soft); border-color: rgba(79, 70, 229, 0.35); }

.ch-number {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.chapter-item.active .ch-number { background: var(--primary); border-color: var(--primary); color: #fff; }
.chapter-item.completed .ch-number { border-color: var(--success); color: var(--success); }
.chapter-item.active.completed .ch-number { color: #fff; }

.ch-info { flex: 1; min-width: 0; }
.ch-title { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-item.active .ch-title { color: var(--primary); }
.ch-sub { font-size: .75rem; color: var(--text-dim); margin-top: 2px; }

.ch-check { font-size: 1rem; color: #b6bfcb; font-weight: 700; }
.chapter-item.completed .ch-check { color: var(--success); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 105;
}
.sidebar-overlay.active { display: block; }

/* ---------- Content ---------- */
.content-area {
  flex: 1;
  display: flex; flex-direction: column;
  background: var(--bg-main);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.viewer-topbar {
  min-height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  flex-shrink: 0;
  gap: 10px;
}

.viewer-title-group { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; }

.mobile-open-drawer {
  display: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: .8rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  font-family: inherit;
}

.viewer-ch-badge {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.25);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .75rem; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
}

.viewer-title { font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.viewer-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.btn-complete {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: .8rem; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
  background: #ecfdf5; color: var(--success); border: 1px solid #a7f3d0;
}
.btn-complete:hover { background: #d1fae5; }
.btn-complete.active { background: var(--success); color: #fff; border-color: var(--success); }

.nav-btn-group { display: flex; gap: 4px; }

.btn-icon {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon:hover { background: var(--bg-hover); border-color: var(--border-strong); }

/* ---------- Presentation viewer ---------- */
.viewer-container {
  flex: 1;
  position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 0;
  background-color: #ffffff;
}

.viewer-iframe { width: 100%; height: 100%; border: none; background: transparent; display: block; flex: 1; }

.viewer-loading {
  position: absolute; inset: 0;
  background: rgba(244, 246, 249, 0.95);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  z-index: 10;
  transition: opacity .3s;
}

.spinner {
  width: 34px; height: 34px;
  border: 3px solid #dde3ea;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Mobile bottom bar ---------- */
.mobile-bottom-bar {
  display: none;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  align-items: center; justify-content: space-between;
  gap: 8px;
  z-index: 30;
  flex-shrink: 0;
}
.btn-mobile-nav {
  flex: 1;
  padding: 11px 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 9px;
  font-size: .85rem; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-mobile-nav.center { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Responsive & Collapsible Sidebar ---------- */
@media (min-width: 921px) {
  .app-container.sidebar-collapsed .sidebar {
    margin-left: calc(-1 * var(--sidebar-w));
    opacity: 0;
    pointer-events: none;
  }
  .app-container.sidebar-collapsed .mobile-open-drawer {
    display: inline-flex !important;
  }
}

@media (max-width: 920px) {
  .mobile-open-drawer { display: inline-flex; }
  .progress-summary { display: none; }

  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0;
    width: min(86vw, 340px);
    z-index: 110;
    transform: translateX(-100%);
    box-shadow: 10px 0 40px rgba(15, 23, 42, 0.25);
    margin-left: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-bottom-bar { display: flex; }
}

@media (max-width: 600px) {
  .portal-header { padding: 0 12px; }
  .brand-icon { width: 34px; height: 34px; font-size: 17px; }
  .brand-text h1 { font-size: .95rem; }
  .brand-text span, .badge-name, .user-badge { display: none; }
  .btn-logout { padding: 5px 10px; font-size: .78rem; }

  .viewer-topbar { padding: 6px 10px; }
  .viewer-ch-badge { display: none; }
  .viewer-title { font-size: .88rem; }
  .btn-complete span:last-child { display: none; }
  .btn-complete { padding: 6px 8px; }
  .nav-btn-group { display: none; }
}

/* ---------- Colab Button & Material Actions ---------- */
.btn-colab {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 13px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
  transition: transform 0.2s, opacity 0.2s;
}
.btn-colab:hover { transform: translateY(-1px); opacity: 0.95; }

.btn-download-mat {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-download-mat:hover { background: var(--bg-hover); }

/* ---------- Week Grouped Sidebar Styles ---------- */
.week-group-header {
  padding: 10px 14px 6px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-mat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  margin: 2px 8px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  gap: 8px;
}
.sidebar-mat-item:hover {
  background: var(--bg-hover);
}
.sidebar-mat-item.active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
  font-weight: 600;
}
.sidebar-mat-icon { font-size: 1rem; flex-shrink: 0; }
.sidebar-mat-title { flex: 1; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-mat-check { font-size: 0.8rem; color: var(--success); opacity: 0; }
.sidebar-mat-item.completed .sidebar-mat-check { opacity: 1; }

/* ---------- In-Browser Jupyter Notebook Viewer ---------- */
.notebook-viewer {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  background: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .notebook-viewer { padding: 14px 12px; }
}
.nb-banner {
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.nb-banner-title { font-weight: 700; font-size: 1rem; color: #1e40af; margin-bottom: 3px; }
.nb-banner-desc { font-size: 0.84rem; color: #334155; }

.nb-cell { margin-bottom: 18px; border-radius: 10px; }
.nb-markdown-cell {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 0.95rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.nb-markdown-cell h1 { font-size: 1.45rem; margin: 8px 0 12px; color: #0f172a; border-bottom: 1px solid #e2e8f0; padding-bottom: 6px; }
.nb-markdown-cell h2 { font-size: 1.25rem; margin: 14px 0 10px; color: #1e293b; }
.nb-markdown-cell h3 { font-size: 1.1rem; margin: 12px 0 8px; color: #334155; }
.nb-markdown-cell p { margin: 8px 0; }
.nb-markdown-cell ul, .nb-markdown-cell ol { margin: 8px 0 8px 24px; }
.nb-markdown-cell code { background: #f1f5f9; padding: 2px 6px; border-radius: 5px; font-family: 'JetBrains Mono', monospace; font-size: 0.86rem; color: #be185d; }
.nb-markdown-cell pre { background: #0f172a; color: #f8fafc; padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; margin: 10px 0; }

.nb-code-cell {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}
.nb-code-header {
  background: #1e293b;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
}
.nb-code-body {
  padding: 14px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: #f1f5f9;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.5;
}
.nb-output-area {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #334155;
  overflow-x: auto;
  max-height: 380px;
}
.nb-output-img { max-width: 100%; height: auto; display: block; margin: 6px 0; border-radius: 6px; }

/* ---------- Colab Guide Modal ---------- */
.colab-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 16px;
}
.colab-modal-box {
  background: #ffffff;
  border-radius: 18px;
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.3);
}
.colab-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.colab-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: #f59e0b; color: #fff;
  font-weight: 700; font-size: 0.82rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ---------- Q&A (Soru-Cevap) Header & Viewer Buttons ---------- */
.btn-qa-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2ff;
  color: var(--primary);
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-qa-header:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
}
.qa-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.2;
}

.btn-ask-topic {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-ask-topic:hover {
  background: #dcfce7;
  border-color: #86efac;
}

/* ---------- Q&A Modal Overlay & Layout ---------- */
.qa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
.qa-modal-box {
  background: #ffffff;
  border-radius: 18px;
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}
.qa-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}
.qa-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qa-modal-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 2px;
}
.qa-modal-title p {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}
.qa-modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s;
}
.qa-modal-close:hover { color: #1e293b; background: #e2e8f0; }

.qa-modal-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 6px 20px;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.qa-tab-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.qa-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.qa-badge-counter {
  background: #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
}
.qa-tab-btn.active .qa-badge-counter {
  background: #e0e7ff;
  color: var(--primary);
}

.qa-tab-panel {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(90vh - 160px);
}

.qa-form-group {
  margin-bottom: 14px;
}
.qa-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}
.qa-input, .qa-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.qa-input:focus, .qa-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.qa-input.readonly {
  background: #f8fafc;
  color: #64748b;
  cursor: default;
}

.qa-form-msg {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  display: none;
}
.qa-form-msg.success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  display: block;
}
.qa-form-msg.error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  display: block;
}

.qa-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* Student Questions List */
.my-questions-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.student-q-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.q-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.q-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
}
.q-card-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}
.q-badge-pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.q-badge-answered {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.q-text-body {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.5;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.q-answer-box {
  background: #f0fdf4;
  border-left: 3px solid #16a34a;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin-top: 8px;
}
.q-answer-meta {
  font-size: 0.74rem;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 4px;
}
.q-answer-text {
  font-size: 0.88rem;
  color: #166534;
  line-height: 1.5;
}

/* Modern Button Styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
  border: none;
}
.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
  filter: brightness(1.05);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary {
  background: var(--bg-soft);
  color: var(--text-main) !important;
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--primary) !important;
}

#cancelQaBtn, #cancelAnnBtn {
  background: #f1f5f9;
  color: #475569 !important;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
#cancelQaBtn:hover, #cancelAnnBtn:hover {
  background: #e2e8f0;
  color: #1e293b !important;
  border-color: #94a3b8;
}

#submitQaBtn, #submitAnnBtn {
  background: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
  transition: all 0.2s ease;
}
#submitQaBtn:hover, #submitAnnBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
  filter: brightness(1.06);
}
#submitQaBtn:active, #submitAnnBtn:active {
  transform: translateY(0);
}

/* Announcement (Duyurular) Styles */
.btn-announcement-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-announcement-header:hover {
  background: #fde68a;
  border-color: #f59e0b;
}
.ann-badge {
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.2;
}

.ann-top-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: #92400e;
}
.ann-top-banner-title {
  font-weight: 700;
}
.ann-top-banner-btn {
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.ann-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.ann-card.important {
  border-left: 4px solid #ef4444;
  background: #fffafa;
}
.ann-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
}
.ann-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}
.ann-card-meta {
  font-size: 0.75rem;
  color: #64748b;
}
.ann-card-body {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
}
.ann-priority-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
}
.ann-priority-badge.important {
  background: #fee2e2;
  color: #b91c1c;
}
.ann-priority-badge.normal {
  background: #f1f5f9;
  color: #475569;
}

.ann-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
.ann-modal-box {
  background: #ffffff;
  border-radius: 18px;
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}
.ann-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}
.ann-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ann-modal-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 2px;
}
.ann-modal-title p {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}
.ann-modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}
.ann-modal-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}
.ann-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: 65vh;
}

