:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #16181d;
  --muted: #5b6270;
  --accent: #2f6bff;
  --accent-dark: #1f4fd0;
  --border: #e2e5ea;
  --danger: #d33c3c;
  --success: #1f9d55;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: #101728;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
}
.topbar .brand { color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; }
.topbar nav a { color: #cdd6e4; margin-left: 18px; font-size: 14px; }
.topbar nav a:hover { color: #fff; text-decoration: none; }

.container { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 20px; }

.footer {
  border-top: 1px solid var(--border);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px;
  margin-bottom: 20px;
}
.card h1, .card h2 { margin-bottom: 14px; }

.auth-card { max-width: 420px; margin: 48px auto; }

label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; margin-top: 0; }
.btn-danger { background: var(--danger); }
.btn-secondary { background: #64708a; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.alert-error { background: #fdecec; color: #9b2222; border: 1px solid #f5c6c6; }
.alert-success { background: #e8f7ee; color: #17683a; border: 1px solid #bfe8cf; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.data th { background: #f0f2f5; font-weight: 600; }
table.data tr:hover td { background: #f8f9fb; }

.muted { color: var(--muted); font-size: 13px; }
.mt { margin-top: 18px; }

.progressbar { background: #e8ebf0; border-radius: 6px; height: 10px; overflow: hidden; }
.progressbar > div { background: var(--success); height: 100%; }

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

.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Kurs sayfasi */
.course-hero { background: linear-gradient(135deg, #101728 0%, #1b2a4a 100%); color: #fff; border-radius: 12px; padding: 30px; margin-bottom: 24px; }
.course-hero h1 { margin: 0 0 8px; }
.course-hero p { color: #b9c4d8; max-width: 640px; }
.course-hero .progress-line { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.course-hero .progressbar { flex: 1; background: rgba(255,255,255,.15); height: 10px; }
.course-hero .progressbar > div { background: #4ade80; }
.course-hero .progress-label { font-size: 14px; font-weight: 600; color: #d7e0ef; white-space: nowrap; }

.module-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.module-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: #f0f2f6; border-bottom: 1px solid var(--border); }
.module-head h2 { font-size: 17px; margin: 0; }
.module-head .module-no { color: var(--muted); font-weight: 600; margin-right: 8px; }
.module-progress { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.module-progress.done { color: var(--success); }

.lesson-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; text-decoration: none; color: var(--text); border-bottom: 1px solid #eef0f4; transition: background .12s; }
.lesson-row:last-child { border-bottom: none; }
.lesson-row:hover { background: #f6f8fb; text-decoration: none; }
.lesson-status { flex-shrink: 0; width: 28px; height: 28px; }
.lesson-title { flex: 1; min-width: 0; font-size: 15px; }
.lesson-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.lesson-row .chev { flex-shrink: 0; color: #c3cad6; font-size: 18px; transition: transform .12s, color .12s; }
.lesson-row:hover .chev { color: var(--accent); transform: translateX(3px); }
.lesson-row.quiz-row { background: #fbf9f2; }
.lesson-row.quiz-row:hover { background: #f6f2e4; }

.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.page-head h1 { margin: 0; }
.head-search { display: flex; gap: 8px; align-items: center; margin: 0 auto; }
.head-search input { width: 230px; padding: 7px 11px; font-size: 14px; }
.head-search select { width: auto; padding: 7px 8px; font-size: 14px; }
.head-link { font-size: 14px; color: var(--muted); }
.head-link:hover { color: var(--accent); }

.social-links { display: flex; gap: 14px; align-items: center; }
.social-links a { color: var(--muted); display: inline-flex; }
.social-links a:hover { color: var(--accent); }

/* Trafik grafigi */
.traffic-chart { display: flex; align-items: flex-end; gap: 3px; height: 175px; }
.tc-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.tc-bar { width: 100%; max-width: 26px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 4px 4px 0 0; overflow: hidden; }
.tc-int { background: var(--accent); }
.tc-ext { background: #34c471; }
.tc-label { font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; }

/* Profil */
.profile-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; align-items: start; margin-top: 18px; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.avatar-row { display: flex; gap: 18px; align-items: flex-start; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-initials { background: #2f6bff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: middle; }

/* Landing */
.landing-hero { background: linear-gradient(135deg, #101728 0%, #1e315c 60%, #2f6bff 130%); color: #fff; border-radius: 16px; padding: 64px 40px; text-align: center; }
.landing-hero h1 { font-size: 40px; line-height: 1.2; margin-bottom: 14px; }
.landing-hero p { color: #c3cee2; font-size: 18px; max-width: 620px; margin: 0 auto 26px; }
.landing-hero .btn { font-size: 16px; padding: 13px 30px; }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.section-title { text-align: center; margin: 46px 0 8px; font-size: 27px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 26px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; text-align: center; }
.feature-card .fi { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 12px; background: #e8efff; display: flex; align-items: center; justify-content: center; }
.course-card { display: flex; flex-direction: column; }
.course-card .price { font-size: 22px; font-weight: 700; margin-top: auto; padding-top: 14px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-green { background: #e8f7ee; color: #17683a; }
.badge-gray { background: #eef0f3; color: #5b6270; }
.badge-blue { background: #e8efff; color: #1f4fd0; }
