/* ============================================================
   PlusKampus — Öğrenci Platformu CSS
   Minimal & Modern — Top Navbar Layout
   ============================================================ */

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

:root {
  --bg: #f8fafc;
  --navbar-bg: #0f172a;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #22c55e;
  --success-light: #f0fdf4;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #06b6d4;
  --info-light: #ecfeff;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);
  --navbar-height: 58px;
  --transition: all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* --- Navbar --- */
.navbar {
  height: var(--navbar-height);
  background: var(--navbar-bg);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.navbar-brand {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-right: 32px;
  white-space: nowrap;
  text-decoration: none !important;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  font-size: 0.83rem;
  font-weight: 450;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none !important;
}

.nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-link.active { color: #fff; background: rgba(59,130,246,0.25); }
.nav-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.nav-badge {
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}

.navbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-icon-btn {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-decoration: none !important;
}

.navbar-icon-btn:hover { border-color: rgba(255,255,255,0.3); color: #fff; background: rgba(255,255,255,0.08); }
.navbar-icon-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.navbar-icon-btn .badge { position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; background: var(--danger); border: 2px solid var(--navbar-bg); border-radius: 50%; font-size: 0.55rem; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; }

.navbar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
  transition: var(--transition);
}

.navbar-avatar:hover { border-color: rgba(255,255,255,0.5); }

/* --- Mobile hamburger --- */
.hamburger {
  display: none;
  width: 34px; height: 34px;
  border: none; background: transparent;
  color: rgba(255,255,255,0.7);
  align-items: center; justify-content: center;
  cursor: pointer;
  margin-right: 8px;
}
.hamburger svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* --- Mobile Menu --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--navbar-height);
  left: 0; right: 0;
  background: var(--navbar-bg);
  z-index: 99;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 8px 16px 16px;
}

.mobile-menu.open { display: block; }
.mobile-menu .nav-link { color: rgba(255,255,255,0.7); width: 100%; margin-bottom: 2px; }

/* --- Page Content --- */
.page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
}

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

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 2px;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg { width: 15px; height: 15px; stroke: var(--primary); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.card-body { padding: 20px; }

/* --- Stats Grid --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan { background: var(--info-light); color: var(--info); }
.stat-icon.gray { background: var(--surface-2); color: var(--text-3); }
.stat-info .value { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1; letter-spacing: -0.5px; }
.stat-info .label { font-size: 0.73rem; color: var(--text-3); margin-top: 3px; }

/* --- Grid --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* --- Table --- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th { text-align: left; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }
.td-main { font-weight: 500; color: var(--text) !important; }

/* --- Badges --- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--success-light); color: #16a34a; }
.badge-orange { background: var(--warning-light); color: #b45309; }
.badge-red { background: var(--danger-light); color: #dc2626; }
.badge-gray { background: var(--surface-2); color: var(--text-3); }
.badge-cyan { background: var(--info-light); color: #0891b2; }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 0.825rem; font-weight: 500; border: 1px solid transparent; transition: var(--transition); cursor: pointer; white-space: nowrap; text-decoration: none !important; line-height: 1; }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 5px 11px; font-size: 0.775rem; }
.btn-lg { padding: 11px 22px; font-size: 0.925rem; }
.btn-group { display: flex; gap: 8px; align-items: center; }

/* --- Forms --- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.form-control { width: 100%; padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--text); background: var(--surface); transition: var(--transition); outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-control::placeholder { color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.72rem; color: var(--text-3); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* --- Alert --- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 18px; border: 1px solid transparent; }
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alert-success { background: var(--success-light); color: #166534; border-color: #bbf7d0; }
.alert-error { background: var(--danger-light); color: #991b1b; border-color: #fecaca; }
.alert-warning { background: var(--warning-light); color: #92400e; border-color: #fde68a; }
.alert-info { background: var(--info-light); color: #155e75; border-color: #a5f3fc; }

/* --- Modal --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; transform: scale(0.95); transition: transform 0.2s ease; }
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-close { width: 30px; height: 30px; border: none; background: var(--surface-2); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-3); transition: var(--transition); }
.modal-close:hover { color: var(--text); }
.modal-close svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* --- Dropdown --- */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 200; overflow: hidden; display: none; }
.dropdown-menu.open { display: block; animation: fadeInDown 0.15s ease; }
.dropdown-item { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 0.83rem; color: var(--text-2); cursor: pointer; transition: var(--transition); text-decoration: none !important; }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }
.dropdown-item.danger { color: var(--danger); }

/* --- Exam Timer --- */
.exam-timer {
  position: fixed;
  top: 70px;
  right: 24px;
  background: var(--navbar-bg);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exam-timer svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.exam-timer.warning { background: var(--warning); }
.exam-timer.danger { background: var(--danger); animation: pulse 1s infinite; }

/* --- Lesson Card --- */
.lesson-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.lesson-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* --- Progress Bar --- */
.progress-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.6s ease; }

/* --- Score Ring --- */
.score-ring { position: relative; width: 70px; height: 70px; flex-shrink: 0; }
.score-ring text { font-family: 'Inter', sans-serif; font-weight: 700; fill: var(--text); }

/* --- Auth Page --- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); padding: 20px; }
.auth-card { background: #fff; border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 25px 50px rgba(0,0,0,0.25); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .name { font-size: 1.4rem; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.auth-logo .sub { font-size: 0.78rem; color: var(--text-3); margin-top: 2px; }
.auth-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.auth-subtitle { font-size: 0.82rem; color: var(--text-3); margin-bottom: 24px; }

/* --- Misc --- */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.text-muted { color: var(--text-3); }
.text-sm { font-size: 0.8rem; }
.font-mono { font-family: 'SFMono-Regular', Consolas, monospace; }
.ml-auto { margin-left: auto; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-3); }
.empty-state svg { width: 36px; height: 36px; margin: 0 auto 12px; stroke: var(--border); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-state p { font-size: 0.9rem; }
.activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; font-size: 0.65rem; }
.avatar-lg { width: 52px; height: 52px; font-size: 1rem; }

/* --- Animations --- */
@keyframes fadeInDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.7} }
.fade-in { animation: fadeIn 0.3s ease; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .navbar-nav { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
  .page-wrapper { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .exam-timer { right: 12px; font-size: 1rem; }
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
