/* ============ Tasarım belirteçleri ============ */
:root {
  color-scheme: light;
  --brand: #4f46e5;
  --brand-soft: #eef2ff;
  --brand-deep: #1e1b4b;
  --accent: #7c3aed;
  --ok: #059669;
  --warn: #d97706;
  --danger: #dc2626;
  --info: #0284c7;

  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fbfbfe;
  --sidebar: #171634;
  --sidebar-ink: #cdd2ec;
  --ink: #14162b;
  --ink-2: #454a68;
  --muted: #6b7192;
  --line: #e5e7f0;
  --line-strong: #d2d6e6;
  --shadow: 0 1px 2px rgba(20, 22, 43, .04), 0 12px 32px rgba(20, 22, 43, .06);
  --shadow-lg: 0 24px 60px rgba(20, 22, 43, .16);
  --radius: 16px;
  --radius-sm: 10px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --brand: #818cf8;
  --brand-soft: #232244;
  --brand-deep: #c7d2fe;
  --accent: #a78bfa;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --info: #38bdf8;

  --bg: #0d0e1c;
  --surface: #16182e;
  --surface-2: #1b1d36;
  --sidebar: #101124;
  --sidebar-ink: #a9b0d4;
  --ink: #eceefb;
  --ink-2: #b9bedb;
  --muted: #8f96bb;
  --line: #272a48;
  --line-strong: #343858;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 15px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
:is(button, input, select, a, [tabindex]):focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px;
}
.is-hidden { display: none !important; }
.muted { color: var(--muted); }
.kicker { font-size: 10.5px; letter-spacing: .14em; font-weight: 800; color: var(--brand); margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; padding: 18px 2px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--surface); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }

/* ============ Ortak bileşenler ============ */
.logo {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; font-weight: 850; letter-spacing: -.02em;
  box-shadow: 0 8px 22px rgba(99, 102, 241, .35);
}
.logo--sm { width: 36px; height: 36px; border-radius: 11px; font-size: 14px; }

.btn {
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 16px; font-weight: 650;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; box-shadow: 0 6px 18px rgba(99, 102, 241, .3); }
.btn--primary:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(99, 102, 241, .42); }
.btn--soft { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.btn--soft:hover { border-color: var(--line-strong); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--sm { padding: 7px 12px; font-size: 13px; }

.ghost-btn {
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 8px 12px; color: inherit; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px;
}
.ghost-btn:hover { background: rgba(127, 127, 160, .14); }
.ghost-btn--icon { padding: 8px; }

input, select, .search {
  width: 100%; border: 1px solid var(--line); background: var(--surface-2);
  padding: 11px 13px; border-radius: var(--radius-sm); transition: border-color .12s;
}
input:focus, select:focus { border-color: var(--brand); }
/* Henüz seçim yapılmamış zorunlu alan soluk görünsün. */
select:invalid { color: var(--muted); }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: grid; gap: 18px; align-content: start;
}
.card__head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.card__head .muted { font-size: 13.5px; margin-top: 4px; }
.stack { display: grid; gap: 12px; }
.grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.badge--brand { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.badge--ok { background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: transparent; color: var(--ok); }
.badge--warn { background: color-mix(in srgb, var(--warn) 16%, transparent); border-color: transparent; color: var(--warn); }
.badge--danger { background: color-mix(in srgb, var(--danger) 14%, transparent); border-color: transparent; color: var(--danger); }
.badge--info { background: color-mix(in srgb, var(--info) 14%, transparent); border-color: transparent; color: var(--info); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============ Giriş ============ */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login__brand {
  background: radial-gradient(circle at 18% 8%, #3b3a7a 0, transparent 42%), linear-gradient(150deg, #14133a, #221f5c);
  color: #fff; padding: clamp(36px, 7vw, 92px); display: flex; flex-direction: column; justify-content: center; gap: 22px;
}
.login__brand h1 { font-size: clamp(34px, 4.4vw, 58px); letter-spacing: -.04em; line-height: 1.06; }
.login__brand h1 em { font-style: normal; color: #a5b4fc; }
.login__lede { color: #c3c7e8; max-width: 44ch; line-height: 1.65; }
.login__brand .kicker { color: #8b94d8; }
.pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); padding: 7px 12px; border-radius: 999px; font-size: 12.5px; }
.login__panel { display: grid; place-items: center; padding: 28px; }
.auth { width: min(420px, 100%); gap: 16px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ============ Kabuk ============ */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--sidebar); color: var(--sidebar-ink); padding: 20px 14px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 20px; position: sticky; top: 0; height: 100vh;
}
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.sidebar__brand b { color: #fff; display: block; font-size: 14.5px; }
.sidebar__brand small { font-size: 11px; opacity: .65; }
.nav { display: grid; gap: 3px; align-content: start; }
.nav__item {
  background: transparent; border: 0; border-radius: 10px; padding: 10px 12px; text-align: left;
  color: var(--sidebar-ink); display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 550;
}
.nav__item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav__item.is-active { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; font-weight: 650; }
.nav__ico { width: 18px; text-align: center; opacity: .85; }
.nav__badge { margin-left: auto; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.sidebar__foot { display: grid; gap: 10px; }
.sidebar__foot .ghost-btn { color: var(--sidebar-ink); justify-content: flex-start; }
.sidebar__foot .ghost-btn:hover { background: rgba(255, 255, 255, .08); }
.account { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .06); padding: 9px; border-radius: 12px; }
.account__text { min-width: 0; flex: 1; }
.account__text b { color: #fff; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__text small { font-size: 11px; opacity: .7; }
.avatar { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; flex: none; }
.avatar--text { display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; font-size: 12px; font-weight: 800; }

.main { padding: 26px clamp(18px, 3vw, 38px) 60px; display: grid; gap: 20px; align-content: start; min-width: 0; }
.topbar { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.topbar__side { display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 7px 12px; border-radius: 999px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.live.is-live { color: var(--ok); } .live.is-live i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.live.is-down { color: var(--danger); } .live.is-down i { background: var(--danger); }

.view { display: none; gap: 20px; }
.view.is-active { display: grid; }

/* ============ İstatistik kartları ============ */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 13px; align-items: center; box-shadow: var(--shadow); }
.stat__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; flex: none; }
.stat__ico--blue { background: #e0e7ff; color: #4338ca; }
.stat__ico--violet { background: #f3e8ff; color: #7e22ce; }
.stat__ico--green { background: #d1fae5; color: #047857; }
.stat__ico--amber { background: #fef3c7; color: #b45309; }
html[data-theme="dark"] .stat__ico--blue { background: #26264d; color: #a5b4fc; }
html[data-theme="dark"] .stat__ico--violet { background: #2e2450; color: #d8b4fe; }
html[data-theme="dark"] .stat__ico--green { background: #123a30; color: #6ee7b7; }
html[data-theme="dark"] .stat__ico--amber { background: #3d2f11; color: #fcd34d; }
.stat small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat strong { display: block; font-size: 23px; letter-spacing: -.03em; margin: 1px 0; }
.stat span { font-size: 11.5px; color: var(--muted); }
.stats--compact .stat strong { font-size: 19px; }

/* ============ Katalog ============ */
.toolbar { display: grid; gap: 12px; }
.tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.track-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.track {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface-2);
  display: grid; gap: 10px; align-content: start; text-align: left; transition: border-color .12s, transform .12s;
}
.track:hover { border-color: var(--brand); transform: translateY(-2px); }
.track h3 { font-size: 15px; }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.progress--lg { height: 10px; margin: 4px 0 16px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.track__meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.units { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ============ Ders seçici ============ */
.picker { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 3vh 3vw; }
.picker__backdrop { position: absolute; inset: 0; background: rgba(11, 12, 26, .6); backdrop-filter: blur(3px); }
.picker__panel {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); width: min(1000px, 100%); height: min(680px, 94vh);
  display: grid; grid-template-rows: auto 1fr; overflow: hidden;
}
.picker__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.picker__body { display: grid; grid-template-columns: 320px 1fr; min-height: 0; }
.picker__col { display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.picker__col--tracks { border-right: 1px solid var(--line); background: var(--surface-2); }
.picker__col--tracks .search { margin: 14px; width: calc(100% - 28px); }
.picker__list { overflow-y: auto; padding: 0 14px 14px; display: grid; gap: 6px; align-content: start; }
.picker__lesson-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.picker__col--lessons .picker__list { padding: 14px 20px 20px; }
.picker__group { font-size: 10.5px; letter-spacing: .12em; font-weight: 800; color: var(--muted); padding: 12px 8px 4px; }
.picker-item {
  border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 10px 11px;
  text-align: left; display: grid; gap: 3px; font-size: 13.5px;
}
.picker-item:hover { background: var(--surface); border-color: var(--line); }
.picker-item.is-active { background: var(--brand-soft); border-color: var(--brand); }
.picker-item small { color: var(--muted); font-size: 11.5px; }
.lesson-row {
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 12px; padding: 12px 14px; text-align: left; width: 100%; transition: border-color .12s;
}
.lesson-row:hover:not(:disabled) { border-color: var(--brand); }
.lesson-row:disabled { opacity: .5; cursor: not-allowed; }
.lesson-row__seq { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 12px; flex: none; }
.lesson-row__body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.lesson-row__body b { font-size: 14px; font-weight: 620; }
.lesson-row__links { display: flex; gap: 10px; align-items: center; flex: none; }

/* ============ Haftalık ızgara ============ */
.week { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.week__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.week__head b { font-size: 13.5px; }
.week__legend { margin-left: auto; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.dot--open { background: color-mix(in srgb, var(--ok) 30%, transparent); border: 1px solid var(--ok); }
.dot--picked { background: var(--brand); }
.week__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.day { background: var(--surface); padding: 10px 8px; display: grid; gap: 6px; align-content: start; min-height: 120px; }
.day__label { font-size: 11.5px; font-weight: 700; color: var(--muted); text-align: center; }
.day__label em { font-style: normal; display: block; font-size: 15px; color: var(--ink); }
.day.is-today .day__label em { color: var(--brand); }
.slot {
  border: 1px solid var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok);
  border-radius: 7px; padding: 5px 4px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.slot:hover { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.slot.is-picked { background: var(--brand); border-color: var(--brand); color: #fff; }
.day__none { font-size: 11px; color: var(--muted); text-align: center; padding: 8px 0; }

.manual__row { display: flex; gap: 8px; }
.manual__row input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand);
  border-radius: 999px; padding: 6px 8px 6px 14px; font-size: 13px; font-weight: 620;
}
.chip button { background: rgba(127, 127, 160, .18); border: 0; border-radius: 50%; width: 20px; height: 20px; color: inherit; line-height: 1; display: grid; place-items: center; }
.chip button:hover { background: var(--danger); color: #fff; }

.selected-lesson { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 16px; }
.selected-lesson.is-set { border-style: solid; border-color: var(--brand); background: var(--brand-soft); }
.scan-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 400; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch b { display: block; font-size: 13.5px; font-weight: 700; }
.switch small { color: var(--muted); font-size: 12px; }

/* ============ Liste satırları ============ */
.row {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; background: var(--surface-2);
  display: flex; gap: 15px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
}
.row__body { display: grid; gap: 7px; min-width: 220px; flex: 1; }
.row__body h3 { font-size: 15px; }
.row__meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.row__actions { display: flex; gap: 8px; align-items: center; }
.row__img { width: 74px; height: 54px; border-radius: 10px; object-fit: cover; flex: none; }
.targets { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.targets mark { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); border-radius: 5px; padding: 1px 6px; }

.attempts { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; display: grid; gap: 5px; max-height: 220px; overflow-y: auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.attempt { display: flex; gap: 12px; color: var(--muted); }
.attempt time { flex: none; width: 74px; }
.attempt.is-matched { color: var(--ok); font-weight: 600; }

/* ============ Isı haritası ============ */
.heatmap { overflow-x: auto; }
.heatmap table { border-collapse: separate; border-spacing: 3px; font-size: 11px; }
.heatmap th { font-weight: 650; color: var(--muted); padding: 2px 4px; font-size: 10.5px; }
.heatmap th[scope="row"] { text-align: right; }
.heatmap td { width: 22px; height: 22px; border-radius: 5px; background: var(--line); text-align: center; color: transparent; }
.heatmap td[data-level="0"] { background: var(--line); }
.heatmap td[data-level="1"] { background: color-mix(in srgb, var(--brand) 25%, transparent); }
.heatmap td[data-level="2"] { background: color-mix(in srgb, var(--brand) 50%, transparent); }
.heatmap td[data-level="3"] { background: color-mix(in srgb, var(--brand) 75%, transparent); }
.heatmap td[data-level="4"] { background: var(--brand); }

/* ============ Toast & modal ============ */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140%);
  background: var(--sidebar); color: #fff; padding: 13px 20px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-size: 14px; z-index: 300; max-width: min(90vw, 460px); transition: transform .25s;
}
.toast.is-visible { transform: translate(-50%, 0); }
.toast.is-error { background: var(--danger); }
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(11, 12, 26, .55); }
.modal__card { position: relative; background: var(--surface); border-radius: 18px; padding: 26px; width: min(430px, 100%); display: grid; gap: 14px; box-shadow: var(--shadow-lg); }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ============ Duyarlılık ============ */
@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login__brand { padding: 40px 26px; }
  .picker__body { grid-template-columns: 1fr; grid-template-rows: minmax(160px, 34%) 1fr; }
  .picker__col--tracks { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 780px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; grid-template-rows: auto auto auto; }
  .nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; }
  .nav__item { white-space: nowrap; }
  .week__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main { padding: 20px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ============ Gelişim ============ */
.level-row { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.ring {
  --pct: 0;
  position: relative;
  width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--line) 0);
}
.ring::before { content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.req-list { display: grid; gap: 13px; }
.req { display: grid; gap: 6px; }
.req__top { display: flex; justify-content: space-between; font-size: 13px; }
.req__top b { font-weight: 650; }
.req__top span { color: var(--muted); font-variant-numeric: tabular-nums; }
.req .progress { height: 8px; }
.req.is-done .progress i { background: linear-gradient(90deg, var(--ok), #34d399); }

/* ============ Aktivite takvimi ============ */
.calendar { display: grid; gap: 12px; }
.calendar__scroll { overflow-x: auto; padding-bottom: 6px; }
.calendar__layout { display: grid; grid-template-columns: auto 1fr; gap: 8px; min-width: max-content; }
.calendar__weekdays {
  display: grid; grid-template-rows: repeat(7, var(--cell)); gap: var(--cell-gap);
  align-self: end; font-size: 10.5px; color: var(--muted); padding-right: 2px;
}
.calendar__weekdays span { display: grid; align-items: center; line-height: 1; }
/* Hücre 15px'ten 22px'e çıkarıldı: içine iki haneli gün numarası yazılıyor. */
.calendar__body { --cell: 22px; --cell-gap: 4px; display: grid; gap: 6px; }
.calendar { --cell: 22px; --cell-gap: 4px; }
.calendar__months {
  display: grid; gap: var(--cell-gap); font-size: 11px; color: var(--muted); font-weight: 600;
}
.calendar__grid {
  display: grid; grid-template-rows: repeat(7, var(--cell)); gap: var(--cell-gap);
}
.calendar__cell {
  width: var(--cell); height: var(--cell); border-radius: 5px; background: var(--line);
  border: 1px solid transparent; padding: 0; transition: transform .1s, box-shadow .1s;
  display: grid; place-items: center; line-height: 1; font-size: 10px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--ink-2);
}
/* Dolgulu hücrelerde zemin koyu; numara beyaz olmalı. */
.calendar__cell.is-private, .calendar__cell.is-group, .calendar__cell.is-mixed { color: #fff; }
.calendar__cell.is-future { color: color-mix(in srgb, var(--muted) 45%, transparent); }
.calendar__cell:not(.is-future):hover { transform: scale(1.35); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.calendar__cell.is-today { border-color: var(--ink); }
.calendar__cell.is-selected { outline: 2px solid var(--accent); outline-offset: 1px; }
.calendar__cell.is-future { background: transparent; border-color: var(--line); cursor: default; }
.calendar__legend {
  display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted);
}
.calendar__legend i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }
.calendar__legend .off { background: var(--line); }
.calendar__legend .on { background: var(--brand); }

.cal-tip {
  position: fixed; z-index: 400; pointer-events: none; opacity: 0; transform: translate(-50%, -125%);
  background: var(--sidebar); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
  padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); transition: opacity .1s;
}
.cal-tip.is-visible { opacity: 1; }
.cal-tip small { display: block; font-weight: 400; opacity: .75; font-size: 11px; }

.day-detail {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px;
  background: var(--surface-2); display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.day-detail b { font-size: 14px; }
.day-detail span { font-size: 13px; color: var(--muted); }
.day-detail strong { font-size: 15px; color: var(--brand); }

/* ============ Lig ve rozetler ============ */
.league { display: grid; gap: 14px; }
.league__head { display: flex; align-items: center; gap: 14px; }
.league__medal {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; font-size: 22px;
}
.league__head b { display: block; font-size: 17px; letter-spacing: -.02em; }
.league__head small { color: var(--muted); font-size: 12.5px; }
.league__stats { display: flex; gap: 22px; flex-wrap: wrap; }
.league__stats div { font-size: 12px; color: var(--muted); }
.league__stats strong { display: block; font-size: 19px; color: var(--ink); letter-spacing: -.02em; }

.badge-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.badge-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: var(--surface-2);
  display: flex; gap: 11px; align-items: flex-start;
}
.badge-card__ico {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: var(--brand-soft); color: var(--brand); font-size: 16px;
}
.badge-card--weekly .badge-card__ico { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.badge-card b { display: block; font-size: 13.5px; }
.badge-card small { color: var(--muted); font-size: 11.5px; line-height: 1.45; display: block; margin-top: 3px; }

/* ============ Geri bildirim ============ */
/* Satır başına üç kart. Izgara öğeleri varsayılan olarak esnediği için bir satırdaki
   kartlar en uzun olanla aynı yüksekliğe gelir; içerik align-content:start ile üstte kalır. */
.feedback-list { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feedback {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface-2);
  display: grid; gap: 11px; align-content: start; text-align: left; width: 100%;
  transition: border-color .12s, transform .12s, box-shadow .12s;
}
.feedback-list > .empty { grid-column: 1 / -1; }
button.feedback { cursor: pointer; }
button.feedback:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.feedback__head { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.feedback__who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.feedback__avatar {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: hsl(var(--hue, 160) 60% 45%); color: #fff; font-size: 13px; font-weight: 800;
}
.feedback__who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedback__who small { color: var(--muted); font-size: 12px; }
.feedback__lesson {
  display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 620;
  color: var(--brand); background: var(--brand-soft); border-radius: 8px; padding: 7px 10px; min-width: 0;
}
.feedback__lesson span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedback__excerpt {
  font-size: 13.5px; line-height: 1.65; color: var(--ink-2); white-space: pre-line;
}

/* ============ Tam ekran detay ============ */
.sheet { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 4vh 4vw; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(11, 12, 26, .62); backdrop-filter: blur(3px); }
.sheet__card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); width: min(760px, 100%); max-height: 92vh;
  display: grid; grid-template-rows: auto 1fr; overflow: hidden;
}
.sheet__head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.sheet__nav { display: flex; gap: 4px; }
.sheet__body { overflow-y: auto; padding: 22px; display: grid; gap: 16px; align-content: start; }
.sheet__lesson { display: grid; gap: 8px; }
.sheet__text { font-size: 15px; line-height: 1.75; color: var(--ink-2); display: grid; gap: 14px; }
.sheet__text p { margin: 0; }
.sheet__text p:first-child { color: var(--ink); font-size: 15.5px; }
.sheet__text .correction {
  border-left: 3px solid var(--warn); border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--warn) 8%, transparent); padding: 13px 15px;
}

@media (max-width: 1280px) { .feedback-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 780px) {
  .feedback-list { grid-template-columns: 1fr; }
  .sheet { padding: 0; }
  .sheet__card { border-radius: 0; max-height: 100vh; height: 100vh; width: 100%; }
}

/* ============ Tarama düzenleme ============ */
.sheet__card--form { grid-template-rows: auto 1fr auto; width: min(720px, 100%); }
.sheet__foot {
  display: flex; align-items: center; gap: 10px; padding: 14px 22px;
  border-top: 1px solid var(--line); background: var(--surface-2);
}
.sheet__foot .muted { flex: 1; font-size: 12.5px; }
.edit-block { display: grid; gap: 11px; }
.edit-block__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.edit-block__head b { font-size: 14px; }
.edit-slots { display: grid; gap: 10px; max-height: 220px; overflow-y: auto; padding-right: 4px; }
.edit-day { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start; }
.edit-day__label { font-size: 12px; color: var(--muted); font-weight: 650; padding-top: 6px; }
.edit-day__slots { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============ Takvim: ders tipi renklendirmesi ============ */
.calendar__cell.is-private { background: var(--brand); }
.calendar__cell.is-group { background: var(--info); }
/* Aynı gün hem özel hem grup dersi varsa iki renk köşegen bölünür. */
.calendar__cell.is-mixed {
  background: linear-gradient(135deg, var(--brand) 0 50%, var(--info) 50% 100%);
}
.calendar__cell.is-activity { background: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.calendar__legend .dot-private { background: var(--brand); }
.calendar__legend .dot-group { background: var(--info); }
.calendar__legend .dot-mixed { background: linear-gradient(135deg, var(--brand) 0 50%, var(--info) 50% 100%); }
.calendar__legend .dot-activity { background: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.calendar__legend { flex-wrap: wrap; gap: 6px 14px; }
.calendar__legend b { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }

/* ============ Ders ilerlemesi ============ */
.lesson-summary, .metric-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.lesson-metric, .metric {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px;
  background: var(--surface-2); display: grid; gap: 3px;
}
.lesson-metric strong, .metric strong { font-size: 24px; letter-spacing: -.03em; }
.lesson-metric small, .metric small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.lesson-metric span, .metric span { font-size: 11.5px; color: var(--muted); }
.lesson-metric--done strong, .metric--ok strong { color: var(--ok); }
.lesson-metric--left strong, .metric--warn strong { color: var(--warn); }
.metric--danger strong { color: var(--danger); }

.lesson-tracks { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.lesson-track {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2);
}
.lesson-track__name { font-size: 13.5px; font-weight: 650; }
.lesson-track__meta { font-size: 12px; color: var(--muted); }
.lesson-track__count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lesson-track .progress { grid-column: 1 / -1; height: 5px; }
.lesson-track.is-done .progress i { background: var(--ok); }

.switch--block { align-items: flex-start; padding: 4px 0; }
.notice {
  display: grid; gap: 4px; padding: 13px 15px; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.55;
}
.notice b { font-size: 12.5px; }
.notice--warn {
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
}
.notice--warn span { color: var(--ink-2); }
