/* ═══════════════════════════════════════════════════════════════
   RehberAI — Vue App Shell Styles
   Eski monolitik app.css'in üzerine eklenir.
   ═══════════════════════════════════════════════════════════════ */

/* ── Vue app kökü ──────────────────────────────────────────────── */
#ra-app { min-height: 100vh; display: flex; flex-direction: column; }

/* Eski monolitten gelen display:none override — Vue componentlerde her zaman görünür */
.main-content .page { display: block !important; animation: none; }

/* ═══ LOGIN ════════════════════════════════════════════════════════ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  padding: 24px;
}

.login-card {
  background: var(--bg);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.logo-icon { font-size: 28px; }
.logo-text  { font-size: 20px; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; }

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.login-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 28px;
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  margin: -4px 0 12px;
  background: var(--danger-bg);
  padding: 8px 12px;
  border-radius: 6px;
}

.btn-block { width: 100%; justify-content: center; margin-top: 4px; }

.login-kvkk {
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.5;
}

/* ═══ APP LAYOUT ═══════════════════════════════════════════════════ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar .logo-text { color: #fff; font-size: 18px; }
.sidebar .logo-icon { font-size: 24px; }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  position: relative;
  user-select: none;
}

.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}

.nav-icon  { font-size: 17px; width: 22px; text-align: center; }
.nav-label { flex: 1; font-size: 13.5px; }
.nav-badge {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info { flex: 1; min-width: 0; }
.user-name  { display: block; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { display: block; font-size: 11px; color: rgba(255,255,255,0.5); }

.btn-logout {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.65);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-logout:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ── Main ──────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--bg-page);
}

/* ═══ PAGE PANELS ══════════════════════════════════════════════════ */
.page-panel {
  padding: 28px 32px;
  width: 100%;
  box-sizing: border-box;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title { font-size: 22px; font-weight: 700; color: var(--text); }
.page-sub   { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

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

/* ═══ BUTTONS ══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-soft); }

.btn-ai      { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.btn-ai:hover:not(:disabled) { opacity: 0.9; }

.btn-success { background: #10b981; color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; }

.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.btn-ghost   { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-soft); }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ═══ FORMS ════════════════════════════════════════════════════════ */
.form-group  { display: flex; flex-direction: column; gap: 5px; }
.form-label  { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
.form-input  {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10,37,64,0.1);
}

.form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.form-actions { display: flex; gap: 10px; margin-top: 12px; justify-content: flex-end; }

.search-input { width: 220px; }

.mb-2 { margin-bottom: 8px; }

/* ═══ MODALS ═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-box {
  background: var(--bg);
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-sm { max-width: 380px; }
.modal-lg { max-width: 680px; }

.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.modal-desc  { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }

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

/* ═══ TABLES ═══════════════════════════════════════════════════════ */
.table-wrap   { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.data-table   { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  padding: 11px 14px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-row); }
.data-table tbody tr { cursor: pointer; transition: background 0.1s; }

/* ═══ BADGES ═══════════════════════════════════════════════════════ */
.risk-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.b-high   { background: #fef2f2; color: #dc2626; }
.b-medium { background: #fffbeb; color: #d97706; }
.b-low    { background: #ecfdf5; color: #16a34a; }

.risk-badge-sm {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 600;
}

/* ═══ PAGINATION ═══════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}
.page-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn:hover:not(:disabled) { background: var(--bg-soft); }
.page-info { font-size: 13px; color: var(--text-muted); min-width: 80px; text-align: center; }

/* ═══ EMPTY STATE & SPINNER ════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
  gap: 10px;
}
.empty-icon { font-size: 48px; }
.empty-state p { font-size: 14px; }
.empty-state small { font-size: 12px; color: var(--text-soft); }

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

/* ═══ TOAST ════════════════════════════════════════════════════════ */
.toast-msg {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  white-space: nowrap;
}
.toast-fade-enter-active,
.toast-fade-leave-active { transition: opacity 0.25s, transform 0.25s; }
.toast-fade-enter-from   { opacity: 0; transform: translateX(-50%) translateY(8px); }
.toast-fade-leave-to     { opacity: 0; transform: translateX(-50%) translateY(8px); }

/* ═══ DASHBOARD ════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.stat-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.stat-icon  { font-size: 20px; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-sub   { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; }

.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item { display: flex; gap: 12px; align-items: flex-start; }
.activity-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); margin-top: 5px; flex-shrink: 0; }
.activity-text { font-size: 13px; color: var(--text); }
.activity-time { font-size: 11px; color: var(--text-soft); margin-top: 2px; }

/* Donut */
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.donut-svg  { transform: rotate(-90deg); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Priority table */
.priority-list { display: flex; flex-direction: column; gap: 0; }
.priority-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.priority-item:last-child { border-bottom: none; }
.priority-pseudo { flex: 1; font-size: 13px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.priority-class  { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* Onboarding */
.onboarding-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  border-radius: 14px;
  padding: 36px;
  text-align: center;
  margin-bottom: 24px;
}
.onboarding-card h2 { font-size: 22px; margin-bottom: 8px; }
.onboarding-card p  { color: rgba(255,255,255,0.75); margin-bottom: 24px; }
.onboarding-steps { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.step-item {
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 16px;
  width: 160px;
  text-align: left;
}
.step-num  { font-size: 20px; font-weight: 800; opacity: 0.5; }
.step-title{ font-size: 13px; font-weight: 600; margin: 6px 0 4px; }
.step-desc { font-size: 12px; opacity: 0.7; }

/* ═══ STUDENTS ═════════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}
.filter-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--bg); cursor: pointer; }

/* Slide-in detail panel */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 900;
}
.detail-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 480px;
  max-width: 95vw;
  background: var(--bg);
  z-index: 901;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.detail-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.detail-title { font-size: 16px; font-weight: 700; }
.detail-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); padding: 4px; }
.detail-body  { flex: 1; overflow-y: auto; padding: 20px 24px; }

.detail-scores { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.score-item { display: flex; align-items: center; gap: 10px; }
.score-name { font-size: 12px; color: var(--text-muted); width: 90px; flex-shrink: 0; }
.score-track { flex: 1; height: 6px; background: var(--bg-soft); border-radius: 3px; overflow: hidden; }
.score-fill  { height: 100%; border-radius: 3px; transition: width 0.4s; }
.score-num   { font-size: 12px; font-weight: 600; width: 36px; text-align: right; flex-shrink: 0; }

.section-title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); margin: 18px 0 10px; }

.mini-note {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 8px;
}
.mini-note-cat  { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 3px; }
.mini-ai-card   { background: var(--bg-soft); border-left: 3px solid #8b5cf6; border-radius: 0 8px 8px 0; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.mini-ai-head   { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.mini-ai-verdict{ font-size: 11px; font-weight: 600; }

/* ═══ AI PANEL ═════════════════════════════════════════════════════ */
.filter-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
.tab-btn:hover:not(.active) { background: var(--bg-soft); }

.gen-bar { display: flex; align-items: center; gap: 8px; }

.ai-list { display: flex; flex-direction: column; gap: 14px; }

.ai-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.ai-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-soft);
  gap: 10px;
  flex-wrap: wrap;
}

.ai-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-student-id { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.ai-type-badge { background: var(--info-bg); color: var(--info); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; }

.ai-card-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.conf-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 12px; }
.conf-high { background: #ecfdf5; color: #16a34a; }
.conf-med  { background: #fffbeb; color: #d97706; }
.conf-low  { background: #fef2f2; color: #dc2626; }

.verdict-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; }
.v-pending  { background: #eff6ff; color: #2563eb; }
.v-accepted { background: #ecfdf5; color: #16a34a; }
.v-rejected { background: #fef2f2; color: #dc2626; }

.ai-card-body { padding: 14px 16px; }
.ai-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ai-body  { font-size: 13px; color: var(--text-muted); line-height: 1.6; white-space: pre-line; }

.ai-card-foot {
  padding: 10px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ai-date    { font-size: 12px; color: var(--text-soft); }
.ai-actions { display: flex; gap: 8px; }
.ai-verdict-note { font-size: 12px; color: var(--text-muted); }

/* ═══ NOTES ════════════════════════════════════════════════════════ */
.note-form-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.notes-list { display: flex; flex-direction: column; gap: 12px; }
.note-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.note-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.note-date    { font-size: 11.5px; color: var(--text-soft); }
.note-content { font-size: 13.5px; line-height: 1.6; white-space: pre-line; }
.note-author  { font-size: 12px; color: var(--text-muted); margin-top: 8px; font-style: italic; }

.cat-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; }
.cat-akd   { background: #eff6ff; color: #2563eb; }
.cat-sos   { background: #ecfdf5; color: #16a34a; }
.cat-dav   { background: #fffbeb; color: #d97706; }
.cat-aile  { background: #f5f3ff; color: #7c3aed; }
.cat-diger { background: var(--bg-soft); color: var(--text-muted); }

/* ═══ CHAT ═════════════════════════════════════════════════════════ */
.chat-page { height: 100%; display: flex; flex-direction: column; }

.chat-start-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.chat-start-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.chat-icon { font-size: 56px; margin-bottom: 16px; }
.chat-start-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.chat-start-card p  { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }
.chat-start-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg { display: flex; gap: 12px; align-items: flex-start; }
.msg-user { flex-direction: row-reverse; }

.msg-avatar { font-size: 22px; flex-shrink: 0; margin-top: 2px; }

.msg-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.65;
}

.msg-user      .msg-bubble { background: var(--navy); color: #fff; border-radius: 14px 4px 14px 14px; }
.msg-assistant .msg-bubble { background: var(--bg); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; }

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
}
.typing-indicator span {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--text-soft);
  border-radius: 50%;
  animation: typing-bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}

.chat-input-bar {
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--bg);
  flex-shrink: 0;
}

.chat-textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.chat-textarea:focus { outline: none; border-color: var(--navy); }

.send-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  flex-shrink: 0;
}

/* ═══ SKILLS ═══════════════════════════════════════════════════════ */
.skills-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.skills-sidebar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  position: sticky;
  top: 20px;
}

.skills-student-list { display: flex; flex-direction: column; gap: 2px; }

.skills-student-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.skills-student-item:hover  { background: var(--bg-soft); }
.skills-student-item.active { background: var(--navy); color: #fff; }
.skills-student-item.active .skills-class { color: rgba(255,255,255,0.6); }

.skills-pseudo { flex: 1; font-size: 13px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skills-class  { font-size: 11.5px; color: var(--text-muted); flex-shrink: 0; }

.skills-detail {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.skills-header { margin-bottom: 24px; }
.skills-header h3 { font-size: 18px; font-weight: 700; }
.skills-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--text-muted); }

/* Chart tabs */
.chart-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.chart-tab-btn { padding: 5px 18px; border: 1.5px solid #cbd5e1; border-radius: 20px; background: transparent; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: all 0.18s; }
.chart-tab-btn.active { background: #3b82f6; border-color: #3b82f6; color: #fff; font-weight: 600; }
.chart-tab-btn:hover:not(.active) { border-color: #3b82f6; color: #3b82f6; }

/* Radar chart */
.radar-wrap { display: flex; justify-content: center; align-items: center; padding: 8px 0 20px; }

.score-bars { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.score-row  { display: flex; align-items: center; gap: 12px; }
.score-label { display: flex; align-items: center; gap: 6px; width: 130px; flex-shrink: 0; font-size: 13px; }
.score-icon  { font-size: 15px; }
.score-bar-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }
.score-bar-bg   { flex: 1; height: 8px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }
.score-val      { font-size: 13px; font-weight: 600; width: 40px; text-align: right; color: var(--text-muted); }

.risk-comment { margin-bottom: 20px; }
.risk-comment h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); margin-bottom: 10px; }
.risk-comment-box {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  align-items: flex-start;
}
.risk-comment-box.b-high   { background: var(--danger-bg); border-color: #fca5a5; }
.risk-comment-box.b-medium { background: var(--amber-bg);  border-color: #fcd34d; }
.risk-comment-box.b-low    { background: var(--green-bg);  border-color: #6ee7b7; }
.risk-comment-icon { font-size: 24px; flex-shrink: 0; }
.risk-comment-box p { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin-top: 4px; }

.skills-extra { display: flex; gap: 10px; flex-wrap: wrap; }
.extra-chip   { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: 12.5px; color: var(--text-muted); }

/* ═══ RESPONSIVE ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar    { width: 60px; }
  .nav-label  { display: none; }
  .logo-text  { display: none; }
  .user-name, .user-role { display: none; }
  .sidebar-footer { justify-content: center; }

  .dashboard-grid  { grid-template-columns: 1fr; }
  .skills-layout   { grid-template-columns: 1fr; }
  .skills-sidebar  { position: static; max-height: 220px; }
  .detail-panel    { width: 100%; }
}

@media (max-width: 600px) {
  .page-panel  { padding: 16px; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
}

/* ═══ MODALS ════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 17, 40, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 24px;
}

.modal-box {
  background: var(--bg);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
  display: flex;
  flex-direction: column;
  animation: modal-in 0.18s cubic-bezier(0.4,0,0.2,1);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.12s;
}
.modal-close:hover { background: var(--bg-soft); }

.modal-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
}

/* ═══ PAGE WRAPPER ═════════════════════════════════════════════════ */
.page {
  padding: 28px 32px;
  min-height: 100%;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

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

/* ═══ BUTTON — secondary ════════════════════════════════════════════ */
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-soft); }

/* ═══ STAT GRID — pill-shaped delta badges (app.css only sets color) */
.delta {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
}
.delta.neutral { background: var(--bg-soft); }
.delta.up      { background: #fef2f2; }
.delta.down    { background: #ecfdf5; }

/* ═══ CARD COMPONENTS ══════════════════════════════════════════════ */
/* card-head already styled in app.css — only override card-title margin */
.card-head .card-title { margin-bottom: 0; }

/* ═══ FEED — AI icon color override (purple vs app.css blue) ═══════ */
.feed-icon.fi-ai { background: #f5f3ff; color: #7c3aed; }

/* ═══ DONUT CHART — center overlay (app.css uses different selector) */
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.dc-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
}

.dc-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 5px;
}

/* legend val alignment */
.val { min-width: 60px; text-align: right; }

/* ═══ TABLE (.table) ════════════════════════════════════════════════ */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: 13px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover { background: var(--bg-row); }

/* ═══ BADGE BASE ════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  background: var(--bg-soft);
  color: var(--text-muted);
}

/* b-med = medium risk amber (alias for b-medium) */
.b-med { background: #fffbeb; color: #d97706; }

/* ═══ RESPONSIVE FIXES ══════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2    { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .page      { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page-head { flex-direction: column; }
}

/* ═══ KAYIT FORMU (öğrenci ekleme sayfası) ═══════════════════════ */
.reg-form .form-row   { margin-bottom: 10px; gap: 12px; }
.reg-form .form-group label { margin-bottom: 3px; font-size: 10px; }
.reg-form .input,
.reg-form .select     { padding: 7px 10px; font-size: 12.5px; }
.reg-form textarea.input { padding: 7px 10px; }
.reg-form .card       { border-radius: 10px; }

/* ═══ WIZARD STEP INDICATOR ═══════════════════════════════════════ */
.step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.step-dot.done   { background: #10b981; color: #fff; }
.step-dot.active { background: var(--navy); color: #fff; box-shadow: 0 0 0 3px rgba(10,37,64,.15); }
.step-dot.future { background: var(--bg-soft); color: var(--text-muted); border: 2px solid var(--border); }

.step-line        { flex: 1; height: 2px; background: var(--border); transition: background 0.3s; }
.step-line.done   { background: #10b981; }
.step-line.future { background: var(--border); }

.step-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 10px; padding-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}

.req { color: #ef4444; margin-left: 2px; }

.feed-item-click:hover { background: var(--bg-soft); border-radius: 8px; }

/* ═══ BEHAVIOR LOG ═════════════════════════════════════════════════ */

/* Tag grid — hızlı seçim ızgarası */
.bl-tag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.bl-tag-item {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
  transition: all .12s ease;
}

.bl-tag-item:hover { border-color: var(--primary); color: var(--primary); background: #f0f7ff; }
.bl-tag-item.selected { border-color: var(--primary); background: var(--primary); color: white; }

/* Severity radio butonları */
.bl-sev-radio { transition: all .12s ease; }
.bl-sev-radio:not([class*="sel-"]) { border-color: var(--border) !important; color: var(--text-muted); background: white; }
.sel-bilgi  { border-color: #0ea5e9 !important; background: #e0f2fe !important; color: #0369a1 !important; }
.sel-dikkat { border-color: #f59e0b !important; background: #fef3c7 !important; color: #92400e !important; }
.sel-acil   { border-color: #ef4444 !important; background: #fee2e2 !important; color: #b91c1c !important; }

/* Severity badge — list view */
.bl-sev-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
  flex-shrink: 0;
}
.sev-bilgi  { background: #e0f2fe; color: #0369a1; }
.sev-dikkat { background: #fef3c7; color: #92400e; }
.sev-acil   { background: #fee2e2; color: #b91c1c; }

/* Tag chip — log list */
.bl-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}

/* Log kart hover */
.bl-card { transition: box-shadow .15s; }
.bl-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

/* Filtre chip'i severity varyantları */
.filter-chip.bl-dikkat.active { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.filter-chip.bl-acil.active   { background: #fee2e2; color: #b91c1c; border-color: #ef4444; }

/* ── Erken Uyarı Listesi ─────────────────────────────────────── */
.warn-list { display: flex; flex-direction: column; gap: 8px; }
.warn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff5f5;
  border: 1px solid #fecaca;
}
.warn-id   { font-weight: 700; font-size: 13px; color: var(--navy); min-width: 80px; }
.warn-cls  { font-size: 12px; color: var(--text-muted); min-width: 50px; }
.warn-counts { display: flex; gap: 6px; flex-wrap: wrap; }
.warn-tags { display: flex; gap: 4px; flex-wrap: wrap; }

/* ── AdminStats Sayfa Stiller ───────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.stat-section .section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 16px;
}

/* Bar chart */
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row   { display: flex; align-items: center; gap: 10px; }
.bar-lbl   { font-size: 12px; font-weight: 500; color: var(--text-muted); min-width: 80px; }
.bar-val   { font-size: 12px; font-weight: 700; color: var(--navy); min-width: 60px; text-align: right; }
.bar-track { flex: 1; height: 10px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 99px; transition: width .4s; }
.bar-danger { background: #dc2626; }
.bar-warn   { background: #d97706; }
.bar-ok     { background: #16a34a; }

/* Donut AdminStats */
.donut-legend { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: 12px; color: var(--text); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot-green { background: var(--green); }
.dot-red   { background: #dc2626; }

/* AdminStats stat card varyantları */
.stat-card.stat-danger { border-left: 4px solid #dc2626; }
.stat-card.stat-warn   { border-left: 4px solid #d97706; }
.stat-card.stat-ok     { border-left: 4px solid #16a34a; }

/* ── Korelasyon Motoru ──────────────────────────────────────────── */
.corr-list { display: flex; flex-direction: column; gap: 10px; }
.corr-row  { border: 1px solid #ede9fe; border-left: 4px solid #7c3aed; border-radius: 8px; padding: 12px 14px; background: #faf5ff; }
.corr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.corr-count { font-size: 11px; font-weight: 700; background: #7c3aed; color: #fff; padding: 2px 8px; border-radius: 20px; }
.corr-signals { display: flex; gap: 6px; flex-wrap: wrap; }
.corr-signal  { font-size: 11px; padding: 3px 10px; border-radius: 20px; background: #ede9fe; color: #5b21b6; font-weight: 500; }

