/* Yazı tipi: uygulama ve site her yerde Geist; marka yazısı League Spartan (tokens.css). */
.page-title { letter-spacing: -0.02em; }

/* ==========================================================
   KPR — Uygulama stilleri (token'lar: css/tokens.css)
   ========================================================== */
:root { --tabbar-h: 62px; }

/* ---- Kabuk ---- */
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font: 700 var(--fs-lg) var(--font-brand); letter-spacing: 0.01em; }
.site-link { position: relative; margin-left: auto; white-space: nowrap; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 500; text-decoration: none; padding: 6px 10px; border-radius: var(--r-sm); }
.site-link:hover { color: var(--text); background: var(--surface); }
/* Tanıtım sayfası bağlantısı her ekranda ve ana ekrana kurulu uygulamada da görünür (Erim'in kararı, 7 Eki 2026) */
.topbar .site-link ~ .top-pill { margin-left: 0; }
/* Syllabus ekle: her ekrandan tek dokunuş */
.add-syllabus {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--r-pill); cursor: pointer;
  background: color-mix(in srgb, var(--cyan) 14%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 45%, transparent);
  color: var(--cyan); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
}
.add-syllabus svg { width: 16px; height: 16px; stroke-width: 2.2; }
.add-syllabus:hover { background: color-mix(in srgb, var(--cyan) 22%, transparent); }
.add-syllabus:not([hidden]) + .icon-btn { margin-left: 0; }
body.onboarding .add-syllabus { display: none; }

.icon-btn {
  margin-left: auto;
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: none; border: 1px solid transparent; color: var(--text-muted);
  cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn[aria-current="page"] { color: var(--cyan); background: var(--surface); }
.icon-btn.sm { width: 36px; height: 36px; margin: 0; }
.icon-btn.sm svg { width: 18px; height: 18px; }

#view { flex: 1; padding: 22px 16px calc(var(--tabbar-h) + var(--safe-b) + 96px); outline: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--bg-2) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.tabbar-inner { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; max-width: 560px; }
.tab {
  height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: var(--fs-2xs); font-weight: 500; color: var(--text-muted); text-decoration: none;
}
.tab { position: relative; }
.tab:not(.tab-accent) .tab-ic { width: 56px; height: 30px; border-radius: var(--r-pill); transition: background 0.15s; }
/* Seçili sekme belirgin (Erim geri bildirimi): simgenin arkasında renkli hap, kalın etiket, üstte çizgi */
.tab[aria-current="page"] { color: var(--cyan); font-weight: 700; }
.tab[aria-current="page"] svg { stroke-width: 2.4; }
.tab[aria-current="page"]:not(.tab-accent) .tab-ic { background: color-mix(in srgb, var(--cyan) 20%, transparent); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 50%; width: 32px; height: 3px; transform: translateX(-50%); border-radius: 0 0 var(--r-sm) var(--r-sm); background: var(--cyan); }
.tab-accent[aria-current="page"] { color: var(--violet); }
.tab-accent[aria-current="page"]::before { background: var(--violet); }

.fab {
  position: fixed; z-index: 11;
  right: max(16px, calc(50% - 280px + 16px));
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
  width: 56px; height: 56px; border-radius: var(--r-lg); border: none;
  background: var(--gradient); color: var(--on-accent);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 20px var(--shadow-1);
}
.fab svg { width: 26px; height: 26px; stroke-width: 2.4; }
/* Geniş ana düğme: "Syllabus ekle" (Bugün, Dersler) */
.fab:not(.fab-wide) { width: 48px; height: 48px; background: var(--surface); color: var(--cyan); border: 1px solid var(--border); } /* görev ekle: syllabus'tan küçük ve ikincil */
.fab:not(.fab-wide) svg { width: 22px; height: 22px; }
.fab.fab-wide { width: auto; height: 52px; padding: 0 20px 0 16px; gap: 8px; display: inline-flex; align-items: center; border-radius: var(--r-pill); font-size: var(--fs-md); font-weight: 600; }
.fab.fab-wide svg { width: 20px; height: 20px; stroke-width: 2.2; }
/* Bölüm başlığındaki küçük "Görev ekle" */
.head-actions { display: inline-flex; align-items: center; gap: 14px; }
.mini-add { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.mini-add svg { width: 14px; height: 14px; stroke-width: 2.4; }
.fab[hidden] { display: none; }

body.onboarding .tabbar,
body.onboarding .fab,
body.onboarding #top-pill { display: none; }
body.onboarding #view { padding-bottom: 32px; }

/* ---- Sayfa başlıkları ---- */
.page-head { margin-bottom: 22px; }
.eyebrow { margin: 0 0 4px; font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); text-transform: capitalize; }
.page-title { font: 700 var(--fs-2xl)/1.2 var(--font-display); letter-spacing: -0.01em; margin: 0; }

.page-sub { margin: 4px 0 0; color: var(--text-muted); font-size: var(--fs-md); }

.section { margin-bottom: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 {
  margin: 0; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
}
.link { color: var(--cyan); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; }
.muted-note { color: var(--text-muted); font-size: var(--fs-md); margin: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

/* ---- Özet kutucukları ---- */

/* ---- Ders saati satırı ---- */
.session {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 12px 14px 12px 18px;
}
.session::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.session-time { display: flex; flex-direction: column; font: 600 var(--fs-md)/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.session-time small { font: 500 var(--fs-xs) var(--font-body); color: var(--text-muted); margin-top: 2px; }
.session-name { font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.session-meta { font-size: var(--fs-xs); color: var(--text-muted); }
.session.now { border-color: var(--cyan); }
.session.past { opacity: 0.5; }

.badge {
  font-size: var(--fs-2xs); font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--cyan) 15%, transparent); color: var(--cyan);
}

/* ---- Görev satırı ---- */
.task {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 12px;
}
.check {
  flex: none; width: 26px; height: 26px; padding: 0;
  border-radius: var(--r-sm); border: 1.8px solid var(--text-muted); background: none;
  display: grid; place-items: center; cursor: pointer;
}
.check svg { width: 16px; height: 16px; stroke-width: 3; opacity: 0; }
.check:hover { border-color: var(--cyan); }
.task.done .check { background: var(--gradient); border-color: transparent; color: var(--on-accent); }
.task.done .check svg { opacity: 1; }
.task-body {
  flex: 1; min-width: 0; padding: 2px 0;
  background: none; border: 0; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
}
.task-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task.done .task-title { text-decoration: line-through; color: var(--text-muted); }
.task-meta { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); min-width: 0; }
.task-meta .course-ref { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-when { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.task-when b { font-size: var(--fs-xs); font-weight: 600; }
.task-when small { font-size: var(--fs-2xs); color: var(--text-muted); }
.task.overdue .task-when b { color: var(--danger); }
.task.soon .task-when b { color: var(--warn); }

.tag { flex: none; font-size: var(--fs-2xs); font-weight: 600; padding: 1px 7px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-muted); }
/* Görev türü etiketleri nötr (.tag); sadece sınav kırmızı tonlu. Aciliyet sağdaki tarih renginden okunur. */
.tag-sinav { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger-text); }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* ---- Ders kartı ---- */
.course {
  position: relative; overflow: hidden;
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 16px 16px 20px;
}
.course::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.course-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.course-name { display: block; font: 600 var(--fs-lg)/1.3 var(--font-display); }
.course-meta { display: block; font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }
.course-next { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; font-size: var(--fs-sm); color: var(--text-muted); min-width: 0; }
.course-next b { flex: none; font-weight: 600; color: var(--text); }
.course-next span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-next.soon b { color: var(--warn); }
.course-next.exam b { color: var(--danger); }
.course-times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pill { flex: none; font-size: var(--fs-2xs); padding: 3px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---- Boş durum ---- */
.empty { text-align: center; padding: 28px 20px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-muted); }
.empty strong { display: block; color: var(--text); font: 600 var(--fs-lg) var(--font-display); margin-bottom: 4px; }
.empty p { margin: 0 0 16px; font-size: var(--fs-sm); }

/* ---- Gün seçici ve segment kontrol ---- */
  flex: 1 0 44px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 9px 6px 7px; border-radius: var(--r-md); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600;
}
.day-title { display: flex; align-items: center; gap: 8px; font: 600 var(--fs-lg) var(--font-display); margin: 0 0 12px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.seg button, .seg label { display: block; text-align: center; padding: 8px 6px; border-radius: var(--r-sm); border: 0; background: none; color: var(--text-muted); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.seg button[aria-pressed="true"], .seg input:checked + label { background: var(--surface-2); color: var(--text); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:focus-visible + label { outline: 2px solid var(--cyan); }
.seg.in-form { margin: 0; background: var(--bg); }
.seg-item { position: relative; }

/* ---- Alt sayfa (dialog) ---- */
dialog.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh;
  margin: auto auto 0; padding: 0;
  background: var(--surface); color: var(--text);
  border: 0; border-top: 1px solid var(--border); border-radius: 22px 22px 0 0;
}
dialog.sheet::backdrop { background: color-mix(in srgb, var(--scrim) 66%, transparent); }
dialog.sheet[open] { animation: sheet-up 0.22s ease-out; }
@keyframes sheet-up { from { transform: translateY(28px); opacity: 0; } }
@media (min-width: 640px) {
  dialog.sheet { margin: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
}
.sheet-form { display: flex; flex-direction: column; max-height: inherit; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.sheet-head h2 { margin: 0; font: 700 var(--fs-lg) var(--font-display); }
.sheet-body { padding: 10px 20px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 20px calc(16px + var(--safe-b)); border-top: 1px solid var(--border); }
.sheet-foot .btn-primary { flex: 1; }

/* ---- Form alanları ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span, .field > legend { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); padding: 0; }
.field > legend { margin-bottom: 8px; }
.field .hint { font-weight: 400; }
input, select, textarea {
  width: 100%; min-width: 0;
  font: inherit; font-size: 16px; /* iOS'ta odaklanınca yakınlaştırmayı engeller */
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 12px;
}
textarea { resize: vertical; min-height: 72px; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); outline: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); border: 3px solid var(--surface); cursor: pointer; }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--text); }
.swatch input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 3px; }

.srows { display: flex; flex-direction: column; gap: 8px; }
.srow { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-md); }
.srow select, .srow input { padding: 8px 8px; }
.srow [data-f="room"] { grid-column: 1 / -1; }
/* Boş liste mesajı her listenin kendi data-empty metni (çevrilmiş; importer.js, forms.js) */
.srows:empty::before { content: attr(data-empty); font-size: var(--fs-sm); color: var(--text-muted); }

/* ---- Bildirim (toast) ---- */
.toast {
  position: fixed; z-index: 50; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 84px);
  display: flex; align-items: center; gap: 14px;
  max-width: calc(100% - 32px); padding: 10px 12px 10px 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: 0 12px 32px var(--shadow-2);
  font-size: var(--fs-sm); white-space: nowrap;
  animation: toast-in 0.2s ease-out;
}
.toast[hidden] { display: none; }
.toast button { background: none; border: 0; padding: 4px; color: var(--cyan); font-weight: 600; cursor: pointer; }
@keyframes toast-in { from { transform: translate(-50%, 10px); opacity: 0; } }

/* ---- Kurulum kartı ---- */
.install-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.install-card .brand-mark { flex: none; }
.install-card div { flex: 1; min-width: 0; }
.install-card strong { display: block; font-size: var(--fs-md); }
.install-card p { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--text-muted); }

/* ---- Karşılama ---- */
.welcome { min-height: calc(100dvh - 150px); display: flex; flex-direction: column; justify-content: center; }
.hero-mark {
  width: 64px; height: 64px; border-radius: var(--r-lg); margin-bottom: 24px;
  background: var(--gradient); color: var(--on-accent);
  display: grid; place-items: center; font: 700 var(--fs-2xl) var(--font-display);
}
.welcome h1 { font: 700 var(--fs-3xl)/1.12 var(--font-display); letter-spacing: -0.02em; margin: 0 0 12px; }
.welcome > p { color: var(--text-muted); margin: 0; font-size: var(--fs-md); }
.features { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 12px; }
.features li { display: flex; align-items: center; gap: 12px; font-size: var(--fs-md); }
.features svg { width: 36px; height: 36px; padding: 8px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); color: var(--cyan); }
.welcome form { display: flex; flex-direction: column; gap: 12px; }

/* ---- Ayarlar ---- */
.group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.group-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.group-row:last-child { border-bottom: 0; }
.group-row > div { min-width: 0; }
.group-row strong { display: block; font-size: var(--fs-md); font-weight: 600; }
.group-row p { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--text-muted); }
.group-row input { max-width: 200px; }
.status-ok { color: var(--ok); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.footnote { text-align: center; color: var(--text-muted); font-size: var(--fs-xs); margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================
   Syllabus içe aktarma, ders detayı, not hesaplayıcı
   ========================================================== */
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }


.lead-text { margin: 0; color: var(--text-muted); font-size: var(--fs-md); }
.lead-text b { color: var(--text); }
.fine { margin: 0; color: var(--text-dim); font-size: var(--fs-xs); line-height: 1.45; }
.mini-title { margin: 6px 0 -4px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 26px 16px; border: 1.5px dashed var(--border); border-radius: var(--radius); background: var(--bg);
}
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.drop.has-file { border-style: solid; border-color: var(--cyan); }
.drop:focus-within { outline: 2px solid var(--cyan); outline-offset: 2px; }
.drop-icon { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface-2); color: var(--cyan); }
.drop strong { font-size: var(--fs-md); word-break: break-all; }
.drop small { color: var(--text-muted); font-size: var(--fs-xs); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.45; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.consent a { color: var(--cyan); }
.ai-offer, .grade-choice { display: grid; gap: 10px; }
.ai-offer p { margin: 0; }
.ai-offer .btn { justify-self: start; }
.grade-choice-q { margin: 0; font-weight: 600; }

.reading { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 10px 0 6px; }
.reading-orb { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%); animation: pulse 1.6s ease-in-out infinite; }
.reading-orb .brand-mark { width: 44px; height: 44px; border-radius: var(--r-md); font-size: var(--fs-xl); }
@keyframes pulse { 50% { transform: scale(1.08); } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; max-width: 320px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text-dim); }
.steps li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.steps li.active { color: var(--text); }
.steps li.active::before { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 20%, transparent); }
.steps li.done { color: var(--text-muted); }
.steps li.done::before { background: var(--text-muted); }

.error-box, .info-box, .warn-box { margin: 0; padding: 12px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); }
.error-box { background: color-mix(in srgb, var(--danger) 10%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.info-box { background: color-mix(in srgb, var(--cyan) 8%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); }
.warn-box { background: color-mix(in srgb, var(--warn) 8%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); padding-left: 30px; color: var(--warn-soft-text); }
.warn-box li + li { margin-top: 4px; }

.irows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.irow { display: flex; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-md); }
.irow.no-date { border-style: dashed; }
.irow-check input { width: 20px; height: 20px; margin: 8px 0 0; accent-color: var(--accent); }
.irow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.irow-top { display: grid; grid-template-columns: 92px 1fr; gap: 6px; }
.irow-when { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px; }
.irow select, .irow input { padding: 8px; }
.irow-hint { color: var(--warn); font-size: var(--fs-xs); }
.irow-src { color: var(--text-dim); font-size: var(--fs-xs); font-style: italic; overflow-wrap: anywhere; }

.grow { display: grid; grid-template-columns: 1fr 96px auto auto; gap: 6px; align-items: center; }
.grow input { padding: 8px; }
.g-bonus { order: 3; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: var(--fs-2xs); color: var(--text-muted); }
.grow [data-remove-row] { order: 4; }
.g-bonus input { width: auto; padding: 0; }
.pct { position: relative; display: block; }
.pct input { padding-right: 26px; }
.pct span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: var(--fs-sm); pointer-events: none; }

.more { border: 1px solid var(--border); border-radius: var(--r-md); }
.more summary { cursor: pointer; padding: 12px 14px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; float: right; font-weight: 400; }
.more[open] summary::after { content: "–"; }
.more-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 14px; }
.hint { font-weight: 400; color: var(--text-dim); }

.detail-head { position: relative; padding-left: 26px; }
.detail-head::before { content: ""; position: absolute; left: 20px; top: 20px; bottom: 8px; width: 4px; border-radius: var(--r-sm); background: var(--c); }
.detail-head > div { padding-left: 10px; min-width: 0; }
.detail-code { margin: 2px 0 0; color: var(--text-muted); font-size: var(--fs-sm); }

.kv { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: var(--fs-sm); border-bottom: 1px solid var(--border); }
.kv li:last-child { border-bottom: 0; }
.kv b { font-weight: 500; color: var(--text-muted); flex: none; }
.kv span, .kv a { text-align: right; overflow-wrap: anywhere; }
.kv a { color: var(--cyan); }

.calc { display: grid; gap: 6px; }
.calc-row { display: grid; grid-template-columns: 1fr 96px; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.calc-row small { color: var(--text-muted); margin-left: 4px; }
.calc-row input { padding: 8px 10px; text-align: right; }
.calc-row.target { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--border); }
.calc-result { margin-top: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg); font-size: var(--fs-sm); }
.calc-result p { margin: 0; }
.calc-result p + p { margin-top: 6px; }
.calc-result .need { font-size: var(--fs-lg); color: var(--cyan); }
.calc-note { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.total-ok { display: flex; align-items: center; gap: 10px; }
.total-ok[hidden] { display: none; }
.total-ok input { width: auto; flex: none; margin: 0; }
.warn-text { color: var(--warn); }

.source-quote { position: relative; overflow: hidden; margin: 0; padding: 10px 12px 10px 15px; background: var(--bg); border-radius: var(--r-md); font-size: var(--fs-xs); color: var(--text-muted); font-style: italic; }
.source-quote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.source-quote b { display: block; font-style: normal; font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
/* ==========================================================
   v2.1 — Uyarılar, bildirimler, devamsızlık, ortalama
   ========================================================== */
.gap-t { margin-top: 10px; }
.gap-b { margin: 0 0 10px; }
.status-warn, .status-muted { color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.num-in { max-width: 90px; text-align: right; }

/* Uyarı kartları */
.alert {
  --lc: var(--cyan);
  display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 4px 4px 4px 0;
}
.alert.danger { --lc: var(--danger); }
.alert.warn { --lc: var(--warn); }
.alert-body { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 8px 4px 8px 12px; text-align: left; background: none; border: 0; cursor: pointer; }
.alert-body strong { display: block; font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
.alert-body small { display: block; font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.alert-icon { flex: none; width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center; background: color-mix(in srgb, var(--lc, var(--cyan)) 16%, transparent); color: var(--lc, var(--cyan)); }
.alert-icon svg { width: 17px; height: 17px; }
.alert-icon.ok { --lc: var(--cyan); }
.notify-card { margin-bottom: 14px; }

/* Bugünkü derste "Gelmedim" */
.session-wrap { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: stretch; }
.abs-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  border-radius: var(--r-md); padding: 0 12px; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; white-space: nowrap;
}
.abs-btn:hover { color: var(--text); border-color: var(--text-muted); }
.abs-btn.on { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.session.absent { opacity: 0.55; }
.session.absent .session-name { text-decoration: line-through; text-decoration-color: var(--danger); }

/* Ders detayında devamsızlık */
.abs { display: flex; flex-direction: column; gap: 10px; }
.abs-text { margin: 0; font-size: var(--fs-sm); font-weight: 600; }
.abs-text.warn { color: var(--warn); }
.abs-text.last, .abs-text.over { color: var(--danger); }
.bar { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--cyan); }
.bar.warn i { background: var(--warn); }
.bar.last i, .bar.over i { background: var(--danger); }
.abs-add { display: flex; gap: 6px; }
.abs-add input[type="date"] { flex: 1; min-width: 0; padding: 8px; }
.abs-add select { width: 96px; padding: 8px; }
.abs-add .btn { padding: 8px 12px; }
.abs-list li { align-items: center; }

/* Aç/kapa anahtarı */
.switch {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 44px; height: 26px; padding: 0; margin: 0; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border); position: relative; cursor: pointer;
}
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-muted); transition: transform 0.15s; }
.switch:checked { background: var(--cyan); border-color: transparent; }
.switch:checked::after { transform: translateX(18px); background: var(--switch-knob); }

/* Ortalama ekranı */
.gpa-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 28px; display: flex; flex-direction: column; gap: 14px; }
.gpa-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gpa-top .eyebrow { text-transform: none; }
.gpa-big { font: 700 var(--fs-3xl)/1 var(--font-display); font-variant-numeric: tabular-nums; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gpa-big small { font: 500 var(--fs-md) var(--font-body); color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); margin-left: 6px; }
.standing { flex: none; font-size: var(--fs-2xs); font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); }
.standing.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.standing.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.standing.danger { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }

.crow {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 78px 118px; gap: 8px; align-items: end;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px 10px 16px;
}
.crow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.crow-name { min-width: 0; align-self: center; }
.crow-name b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow-name small { display: block; font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow-f { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.crow-f > span { font-size: var(--fs-2xs); color: var(--text-muted); font-weight: 600; }
.crow-f input, .crow-f select { padding: 7px 8px; font-size: var(--fs-sm); }
.crow-f.wide { grid-column: 1 / -1; }

.term { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.term + .term { margin-top: 10px; }
.term-head { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.term-head strong { font-size: var(--fs-sm); }
.term-head span { font: 600 var(--fs-sm) var(--font-display); color: var(--cyan); font-variant-numeric: tabular-nums; }
.term-list { list-style: none; margin: 0; padding: 0; }
.term-list li + li { border-top: 1px solid var(--border); }
.term-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 14px; background: none; border: 0; text-align: left; cursor: pointer; }
.term-list button:hover { background: var(--surface-2); }
.term-name { flex: 1; min-width: 0; }
.term-name b { font-weight: 600; font-size: var(--fs-sm); }
.term-name small { display: block; font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-cr { font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.gtag { flex: none; min-width: 34px; text-align: center; font: 700 var(--fs-xs) var(--font-display); padding: 3px 7px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-muted); }
.gtag.gecti { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.gtag.kosullu { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.gtag.kaldi { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }

@media (max-width: 380px) {
  .crow { grid-template-columns: 1fr 1fr; }
  .crow-name { grid-column: 1 / -1; }
  .tab span { font-size: var(--fs-2xs); }
}

/* UMIS benzeri dönem tablosu */
.u-term { font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.u-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.u-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); table-layout: fixed; }
.u-numc { width: 64px; }
.u-gradec { width: 86px; }
.u-table col.u-name { width: auto; }
.u-table th { text-align: left; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.u-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.u-table tbody tr:last-child td { border-bottom: 0; }
.u-table tbody tr td:first-child { box-shadow: inset 4px 0 0 var(--c, transparent); padding-left: 12px; }
.u-table th:first-child, .u-table tfoot td:first-child { padding-left: 12px; }
.u-table tfoot td { border-top: 1px solid var(--border); border-bottom: 0; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.u-code b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-code { overflow: hidden; }
.u-name-sm { display: none; font-size: var(--fs-2xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-num { text-align: center; }
.u-num input { width: 100%; padding: 6px 2px; text-align: center; font-variant-numeric: tabular-nums; }
.u-grade select { width: 100%; padding: 6px 4px; font-weight: 600; }
.u-table td.u-num, .u-table td.u-grade { padding-left: 4px; padding-right: 4px; }
.u-sub td { padding: 0 8px 10px 12px; font-size: var(--fs-xs); color: var(--text-muted); box-shadow: none !important; }
.u-sub label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.u-sub select { max-width: 170px; padding: 5px 6px; font-size: var(--fs-xs); }
.u-table tbody tr:has(+ .u-sub) td { border-bottom: 0; }
.u-calc { margin-top: 12px; }
.u-result { margin-top: 12px; }
@media (max-width: 559px) {
  .u-table .u-name, .u-table col.u-name { display: none; }
  .u-name-sm { display: block; }
  .u-numc { width: 50px; }
  .u-gradec { width: 70px; }
  .u-wide { display: none; }
  .u-table th { padding: 10px 4px; }
}

/* ==========================================================
   Dönem paneli (term.js)
   ========================================================== */
.btn-sm { padding: 7px 12px; font-size: var(--fs-xs); border-radius: var(--r-md); }
.term-hint { margin: 0 0 26px; font-size: var(--fs-xs); color: var(--text-muted); }
.term-note { margin: 10px 2px 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--text-muted); }

.card-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.target-res { margin: 12px 0 0; font-size: var(--fs-sm); }
.target-res .need { font-size: var(--fs-lg); color: var(--cyan); }

.abs-text.none { color: var(--text-muted); font-weight: 500; }
.abs-meta { margin: 0; font-size: var(--fs-xs); color: var(--text-muted); }
/* Harf tahmini */
.scale-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.scale-grid label { display: grid; gap: 4px; font-size: var(--fs-xs); color: var(--text-muted); }
.scale-grid label span { font-weight: 600; color: var(--text); }
.scale-grid input { padding: 8px 10px; text-align: right; width: 100%; box-sizing: border-box; }
.need-list { margin: 6px 0 0; }

/* Kırmızı bayraklar */
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flag { --fc: var(--text-muted); position: relative; overflow: hidden; padding: 10px 12px 10px 15px; border-radius: var(--r-md); background: var(--bg); }
.flag::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--fc); }
.flag.kritik { --fc: var(--danger); }
.flag.dikkat { --fc: var(--warn); }
.flag.bilgi { --fc: var(--cyan); }
.flag-tag { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-muted); }
.flag.kritik .flag-tag { color: var(--danger); }
.flag.dikkat .flag-tag { color: var(--warn); }
.flag-rule { margin: 4px 0 0; font-size: var(--fs-sm); font-weight: 500; }
.flag-cons { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.flag-foot { margin: 6px 0 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.flag-foot .link { flex: none; }
.flag-badge { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.badges { display: grid; gap: 4px; justify-items: end; flex: none; }
.badges .badge { white-space: nowrap; }

/* Dönem akışı: özet cümlesi ve seçili hafta */
.flow-start { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); }
.flow-start > span { min-width: 0; }
.flow-start b { display: block; font-weight: 600; color: var(--text); }
.flow-start small { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--text-muted); }
.flow-start.guessed { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); }
.flow-start.guessed small { color: var(--warn); }
.flow-start .date-field { flex: none; max-width: 180px; }

/* Bugün: sıradaki teslim */

/* ==========================================================
   v2.10 — 5 sekmeli menü: Bugün · Dersler · Asistan · Dönem · Seçmeli
   ========================================================== */
.tab-ic { display: grid; place-items: center; }
/* Asistan ortada, daire içinde vurgu renginde */
.tab-accent .tab-ic {
  width: 40px; height: 40px; margin-top: -14px; border-radius: 50%;
  background: var(--violet); color: var(--on-violet);
  box-shadow: 0 6px 16px var(--shadow-1);
}
.tab-accent .tab-ic svg { width: 21px; height: 21px; stroke-width: 2.1; }
.tab-accent[aria-current="page"] .tab-ic { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--violet); }

/* Bugün: [Bugün | Hafta] anahtarı */
.today-seg { margin-top: -8px; }
.week-more { margin: 18px 0 0; text-align: center; }

/* Dönem: yapışkan bölüm şeridi (üst menünün hemen altında) */
.sec-nav {
  position: sticky; top: calc(61px + var(--safe-t)); z-index: 5;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: -6px -16px 18px; padding: 8px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.sec-nav::-webkit-scrollbar { display: none; }
.sec-nav button {
  flex: none; padding: 7px 14px; border-radius: var(--r-pill); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  font-weight: 600; font-size: var(--fs-xs);
}
.sec-nav button:hover { color: var(--text); border-color: var(--text-muted); }

/* Dönem → Ortalama: alt bloklar */
.gpa-kv { margin-bottom: 18px; }
.sub-block { margin-top: 18px; }
.sub-title { margin: 0; font: 600 var(--fs-md) var(--font-display); color: var(--text); }
.fold { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.fold summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 13px 16px;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "▾"; color: var(--text-muted); margin-left: 8px; transition: transform 0.15s; }
.fold[open] summary::after { transform: rotate(180deg); }
.fold summary small { margin-left: auto; color: var(--text-muted); font-size: var(--fs-xs); }
.fold-body { padding: 0 14px 14px; }

/* Asistan (iskelet) */
.ask-box {
  position: relative; display: flex; gap: 8px; align-items: center;
  padding: 10px; margin-bottom: 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.ask-field { flex: 1; min-width: 0; }
.ask-field input { width: 100%; min-width: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 12px; color: var(--text); font: inherit; }
.ask-example {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.ask-example svg { width: 18px; height: 18px; color: var(--violet); }
.ask-example:hover { border-color: var(--violet); }

/* Seçmeli Keşfi */
.interest-card { display: flex; flex-direction: column; gap: 10px; }
.interest-card .btn { align-self: flex-start; }
.interest-card .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 4px; }
.pick-chip {
  padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-muted);
  font-weight: 600; font-size: var(--fs-sm);
}
.pick-chip[aria-pressed="true"] { background: var(--surface-2); border-color: var(--cyan); color: var(--text); }
.interest-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.interest-tags:hover { border-color: var(--text-muted); }
.match-tag { padding: 2px 9px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.empty-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; border-radius: 50%; background: var(--surface-2); color: var(--cyan); }
/* Öneri satırı: kod · ad · uyum (tek satır) */
.el-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.el-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; font-size: var(--fs-sm); }
.el-row + .el-row { border-top: 1px solid var(--border); }
.el-row b { flex: none; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; }
.el-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-row em { flex: none; font-style: normal; font-weight: 700; color: var(--cyan); font-variant-numeric: tabular-nums; }
/* Aday karşılaştırma kartları */
.cands { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cand { padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.cand p { margin: 4px 0 0; }
.cand-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cand-title { min-width: 0; display: flex; flex-direction: column; }
.cand-title b { font-weight: 700; }
.cand-title span { color: var(--text-muted); font-size: var(--fs-sm); }
.cand-stats { font-size: var(--fs-sm); color: var(--text); }
/* Seçmeli Keşfi: adayın uyum oranı (elective-fit.js) */
.cand .cand-fit { margin: 8px 0 6px; display: grid; gap: 4px; }
.cand-fit > p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; }
.cand-fit em { font: 700 var(--fs-xl)/1 var(--font-display); font-style: normal; color: var(--cyan); font-variant-numeric: tabular-nums; }
.cand-fit > p > span:not(.match-tag) { font-size: var(--fs-sm); color: var(--text-muted); }
.cand-fit q { display: block; padding-left: 10px; border-left: 2px solid var(--border); color: var(--text-muted); font-size: var(--fs-xs); font-style: italic; line-height: 1.45; }
.cand-fit q::before, .cand-fit q::after { content: ""; }
.cand-fit small { color: var(--text-dim); font-size: var(--fs-xs); }
p.cand-fit.muted { font-size: var(--fs-sm); color: var(--text-dim); }
.cand-fit.is-low em { color: var(--text-muted); }
.cand-grading { font-size: var(--fs-xs); color: var(--text-muted); }
.cand-rule { font-size: var(--fs-xs); color: var(--danger); }
.el-upload { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.el-upload.is-busy { opacity: 0.6; cursor: progress; }
.page-head .info-note { margin-top: 6px; }

/* ==========================================================
   v2.11
   ========================================================== */
/* Kontrol ekranı: haftalık konular */
.wk-edit summary { cursor: pointer; list-style: none; }
.wk-edit summary::-webkit-details-marker { display: none; }
.wk-edit summary::after { content: " ▾"; }
.wk-edit[open] summary::after { content: " ▴"; }
.wrows { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wrow { display: flex; align-items: center; gap: 8px; }
.wrow-n { flex: none; width: 34px; font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); }
.wrow input { flex: 1; min-width: 0; }

/* Ders ekranı (ders.js) */
.cd .sheet-body { display: flex; flex-direction: column; gap: 14px; }
.cd-next { position: relative; overflow: hidden; flex: none; padding: 12px 14px 12px 18px; border-radius: var(--r-md); background: var(--bg); }
.cd-next::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.cd-next-line { margin: 0; font-size: var(--fs-md); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cd-next-line b { color: var(--text); }
.cd-next-title { margin: 2px 0 0; font-weight: 600; }
.cd-next-title small { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.cd-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-cell { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg); font-size: var(--fs-sm); }
.cd-cell small { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cd-cell a { color: var(--cyan); overflow-wrap: anywhere; }
.cd-cell span { overflow-wrap: anywhere; }
.cd-cell .muted { color: var(--text-muted); font-size: var(--fs-xs); }
.tag-online, .tag-exam { font-style: normal; font-size: var(--fs-2xs); font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); }
.tag-online { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 12%, transparent); }
.tag-exam { flex: none; color: var(--danger-text); background: color-mix(in srgb, var(--danger) 15%, transparent); }
.cd-more, .cd-plan-sum {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  padding: 11px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: var(--fs-sm);
}
.cd-more span, .cd-plan-sum span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-plan-sum { background: var(--bg); font-weight: 500; }
.cd-sec { display: flex; flex-direction: column; gap: 8px; }
.cd-sec .mini-title { margin: 0; }
/* Bölümler arası boşluk diğer ekranlardaki .section ile aynı: 12px (gövde aralığı) + 16px = 28px */
.cd .sheet-body > .cd-info, .cd .sheet-body > .cd-sec { margin-top: 16px; }
.cd-note { margin: 0; font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.45; }
.cd-plan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cd-plan li { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: var(--r-md); font-size: var(--fs-sm); }
.cd-plan li b { flex: none; width: 30px; color: var(--text-muted); font-size: var(--fs-xs); }
.cd-plan li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cd-plan li small { color: var(--text-muted); }
.cd-plan li.now { background: var(--surface-2); outline: 1px solid var(--cyan); }
.cd-plan li.now b { color: var(--cyan); }
.tl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: var(--fs-md); }
.tl-row select { width: 96px; }
.tl-res { margin-top: 8px; }
.cd-src { text-align: center; margin-top: 4px; }

/* Görev formu (v2.12): radyo çipleri, hepsi ilk ekranda */
.task-form .sheet-body { gap: 14px; }
.pchips { display: flex; gap: 6px; }
.pchips.one-row { flex-wrap: wrap; }
.pchips.one-row .pchip { flex: 1 0 auto; min-width: 0; }
.pchips.scroll-row { overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px; }
.pchips.scroll-row::-webkit-scrollbar { display: none; }
.pchip { position: relative; flex: none; }
.pchip input { position: absolute; opacity: 0; pointer-events: none; }
.pchip span {
  display: block; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 8px 12px; border-radius: var(--r-pill); cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); font-weight: 600; font-size: var(--fs-sm);
}
.pchips.one-row .pchip span { padding: 8px 4px; }
.pchip input:checked + span { background: var(--surface-2); border-color: var(--cyan); color: var(--text); }
.pchip input:focus-visible + span { outline: 2px solid var(--cyan); }
.field-label { display: block; margin-bottom: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.title-field input { font: 600 var(--fs-lg) var(--font-display); padding: 12px 14px; }
.title-field input::placeholder { font: 400 var(--fs-md) var(--font-body); color: var(--text-muted); }
.due-pick { margin-top: 8px; }
.time-link { margin-top: 8px; font-size: var(--fs-xs); }
.time-pick { margin-top: 8px; max-width: 140px; }
textarea.grow { resize: none; overflow: hidden; min-height: 44px; }
.fixed-type { margin: 0; display: flex; align-items: center; gap: 8px; }
.fixed-type .tag { font-size: var(--fs-xs); padding: 3px 10px; }
.fixed-type small { color: var(--text-muted); }
.task-form .sheet-foot { position: sticky; bottom: 0; background: var(--surface); }



/* Dönem → GNO kartı */
.gno-foot { margin: 0; font-size: var(--fs-xs); color: var(--text-muted); }
.gno-foot:empty { display: none; }


/* Asistan sohbeti (oturumluk; düz metin) */
.chat { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: var(--r-md); font-size: var(--fs-sm); }
.msg p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.msg.q { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--border); border-bottom-right-radius: 4px; }
.msg.a { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg-src { display: block; margin-top: 6px; font-size: var(--fs-2xs); color: var(--text-muted); }
.msg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ==========================================================
   v2.12 — Ortak not girişi (grade-sheet.js)
   ========================================================== */
dialog.gsheet {
  margin: auto auto 0; padding: 0; border: 0; width: 100%; max-width: 480px; max-height: 92dvh;
  background: transparent; color: var(--text); overflow: visible;
}
dialog.gsheet::backdrop { background: color-mix(in srgb, var(--scrim) 72%, transparent); }
dialog.gsheet[open] .gs-panel { animation: sheet-up 0.22s ease-out; }
.gs-panel {
  display: flex; flex-direction: column; align-items: stretch; gap: 12px;
  padding: 6px 18px calc(16px + var(--safe-b)); border-radius: 22px 22px 0 0;
  background: var(--surface); border: 1px solid var(--border); border-bottom: 0;
  transition: transform 0.15s;
}
.gs-grip { align-self: center; width: 64px; height: 22px; display: grid; place-items: center; background: none; border: 0; cursor: grab; touch-action: none; }
.gs-grip i { width: 40px; height: 4px; border-radius: var(--r-sm); background: var(--border); }
.gs-ctx { margin: 0; text-align: center; font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
.gs-value { margin: 0; text-align: center; font-variant-numeric: tabular-nums; }
.gs-value b { font: 700 var(--fs-3xl)/1.1 var(--font-display); }
.gs-value span { color: var(--text-muted); font-size: var(--fs-lg); }
.gs-impact { margin: -4px 0 0; text-align: center; font-size: var(--fs-sm); color: var(--cyan); }
.gs-quick { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.gs-quick button { min-width: 52px; padding: 7px 10px; border-radius: var(--r-pill); cursor: pointer; background: var(--bg); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.gs-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gs-keys button {
  height: 52px; border-radius: var(--r-md); cursor: pointer; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font: 600 var(--fs-xl) var(--font-display);
}
.gs-keys button:active { background: var(--border); }
.gs-keys button:disabled { opacity: 0.3; cursor: default; }
.gs-save { height: 50px; font-size: var(--fs-md); }
.gs-save:disabled { opacity: 0.45; }
.gs-clear { align-self: center; color: var(--text-muted); }
.gs-letters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gs-letters button {
  height: 52px; border-radius: var(--r-md); cursor: pointer; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font: 700 var(--fs-lg) var(--font-display);
}
.gs-letters button[aria-pressed="true"] { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 14%, transparent); }


/* Ders ekranı (v2.12): kural kaynağı dokununca, plan satırı, boş plan çağrısı */
.flag { position: relative; }
.flag-src { margin-top: 6px; }
.flag-src summary { cursor: pointer; list-style: none; font-size: var(--fs-xs); color: var(--cyan); }
.flag-src summary::-webkit-details-marker { display: none; }
.flag-src small { display: block; margin-top: 4px; }
.flag-hide { position: absolute; top: 9px; right: 12px; font-size: var(--fs-2xs); color: var(--text-muted); }
.cd-plan li span small { display: block; color: var(--text-muted); font-size: var(--fs-xs); }
.cd-plan-sum b { color: var(--text); }

/* Ders ekranı: değerlendirme satırları (dokununca ortak not girişi) */
.grade-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.grade-row {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--border); color: var(--text); font: inherit;
}
.grade-row:hover { border-color: var(--text-muted); }
.gr-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-md); }
.gr-add { color: var(--cyan); font-size: var(--fs-xs); font-weight: 600; }
.gr-score { font: 700 var(--fs-lg) var(--font-display); font-variant-numeric: tabular-nums; }
.gr-w { flex: none; min-width: 52px; text-align: center; padding: 4px 8px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); font: 700 var(--fs-md) var(--font-display); font-variant-numeric: tabular-nums; }
.grade-row.has .gr-w { background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--cyan); }
button.tl-row { width: 100%; padding: 10px 14px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--border); color: var(--text); cursor: pointer; font: inherit; }
.tl-letter { font: 700 var(--fs-lg) var(--font-display); color: var(--cyan); }
.scale-cell { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--border); color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.scale-cell span { font-size: var(--fs-2xs); color: var(--text-muted); font-weight: 600; }
.scale-cell b { font: 700 var(--fs-md) var(--font-display); font-variant-numeric: tabular-nums; }
.u-pick { min-width: 56px; padding: 7px 10px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--border); color: var(--text); font: 700 var(--fs-md) var(--font-display); cursor: pointer; }
.u-pick:hover { border-color: var(--cyan); }
.tgt-pick { font-size: var(--fs-lg); color: var(--cyan); }
.att-opt { width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--border); color: var(--text); font: inherit; }
.att-opt:hover { border-color: var(--cyan); }
.att-opt small { color: var(--text-muted); }

/* Dönem akışı (v2.12): belli olan pay + önemli haftalar */
.fw-bar { height: 6px; margin-top: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.fw-bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--gradient); }
.fw-sub { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.fw-items { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fw-item { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; cursor: pointer; padding: 7px 10px; border-radius: var(--r-md); background: var(--bg); border: 0; color: var(--text); font: inherit; font-size: var(--fs-sm); }
.fw-item span { min-width: 0; }
.fw-item small { display: block; color: var(--text-muted); font-size: var(--fs-2xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-item em { flex: none; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.fw-past-btn { margin-top: 12px; width: 100%; padding: 10px 14px; border-radius: var(--r-md); background: none; border: 1px dashed var(--border); color: var(--text-muted); cursor: pointer; font: inherit; font-size: var(--fs-sm); }
/* İlk görünüm sığsın: kompakt bilgi kartı ve kurallar */
.cd .sheet-body { gap: 12px; }
.cd-cell { padding: 8px 10px; font-size: var(--fs-xs); }
.cd-flags-head { margin-bottom: 0; }
.cd .flag { padding: 9px 12px; }
.cd .flag-rule { font-size: var(--fs-sm); }
.cd .flag-cons { font-size: var(--fs-xs); }


/* ==========================================================
   v2.13 — Bugün ekranı (odak kartı, hafta şeridi, uyarılar, ders satırı)
   Renk anlamı: kırmızı = sınav / kritik, sarı = yaklaşan teslim, yeşil = tamam, camgöbeği = vurgu
   ========================================================== */
.warn-text { color: var(--warn); }
.danger-text { color: var(--danger); }

.page-head .page-sub { margin-top: 6px; }

/* Bugün | Hafta: tam genişlik değil, küçük anahtar */
.seg.today-seg { display: inline-grid; grid-auto-columns: 84px; margin-bottom: 16px; padding: 3px; border-radius: var(--r-md); }
.seg.today-seg button { padding: 6px 4px; border-radius: var(--r-sm); font-size: var(--fs-sm); }

/* Hafta şeridi */
.wk { margin-bottom: 14px; padding: 12px 10px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.wk-head { display: flex; justify-content: space-between; gap: 10px; padding: 0 6px 10px; font-size: var(--fs-xs); color: var(--text-muted); }
.wk-head b { color: var(--text); font-weight: 600; }
.wk-head .warn-text { color: var(--warn); }
.wk-head .danger-text { color: var(--danger); }
.wk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.wk-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 4px; border: 0; border-radius: var(--r-md); background: none; cursor: pointer; }
.wk-day:hover { background: var(--surface-2); }
.wk-dn { font-size: var(--fs-2xs); font-weight: 500; color: var(--text-muted); }
.wk-num { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font: 600 var(--fs-md) var(--font-display); font-variant-numeric: tabular-nums; }
.wk-day.is-past .wk-num { color: var(--text-dim); }
.wk-day.is-today .wk-num { background: var(--cyan); color: var(--on-accent); }
.wk-day.is-today .wk-dn { color: var(--cyan); }
/* Hafta görünümünde seçili gün: halka (bugün dolu daire olarak kalır) */
.wk-day.is-sel .wk-num { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--cyan); }
.wk-day.is-sel .wk-dn { color: var(--text); }
.wk-dots { display: flex; gap: 3px; height: 5px; }
.wk-dots i, .wk-legend i { display: block; width: 5px; height: 5px; border-radius: 50%; }
.ex { background: var(--danger); }
.due { background: var(--warn); }
.cls { background: var(--text-dim); }
.wk-legend { display: flex; justify-content: center; gap: 14px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--border); font-size: var(--fs-2xs); color: var(--text-muted); }
.wk-legend span { display: inline-flex; align-items: center; gap: 5px; }

/* Odak kartı: sıradaki iş */
.focus { --tone: var(--text); position: relative; margin-bottom: 28px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); display: grid; gap: 12px; }
.focus.warn { --tone: var(--warn); }
.focus.danger { --tone: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.focus-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.focus-label { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.focus-course { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); }
.focus-course i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.focus-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.focus-title { all: unset; cursor: pointer; min-width: 0; font: 700 var(--fs-xl)/1.2 var(--font-display); overflow-wrap: anywhere; }
.focus-title small { display: block; margin-top: 4px; font: 400 var(--fs-sm) var(--font-body); color: var(--text-muted); }
.focus-when { flex: none; text-align: right; }
.focus-when b { display: block; font: 700 var(--fs-xl)/1.2 var(--font-display); color: var(--tone); font-variant-numeric: tabular-nums; }
.focus-when small { font-size: var(--fs-xs); color: var(--text-muted); }
.focus-done { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 10px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.focus-done svg { width: 16px; height: 16px; color: var(--ok); }
.focus-done:hover { border-color: var(--ok); }
.focus-exam { all: unset; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.focus-exam > span:first-child { color: var(--text-muted); }
.focus-exam > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.focus-exam > span:nth-child(2) b { color: var(--text); font-weight: 600; }

/* Uyarılar: tek kenar şeridi yok; seviye ikonda */
.alert.danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.alert-icon { border-radius: var(--r-sm); }

/* Ders satırı: "Gitmedim" kartın içinde, sağda */
.session-wrap { display: block; position: relative; }
.session-wrap .session { padding-right: 104px; }
.session-wrap .abs-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-2); }
.session.past { opacity: 0.55; }
.session-wrap .session.past { opacity: 1; }
.session-wrap .session.past .session-time,
.session-wrap .session.past .session-name,
.session-wrap .session.past .session-meta { opacity: 0.55; }
.badge.soft { background: var(--surface-2); color: var(--text-muted); }
.muted-note b { color: var(--text); font-weight: 600; }

/* ---- v2.13 — Dönem sekmeleri, devam şartı satırı, açıklama notu ---- */
.att-unset { margin-top: 8px; padding: 14px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--r-md); }
.att-unset p { margin: 0 0 10px; }
.att-unset b { display: block; font-size: var(--fs-sm); }
.att-unset small { color: var(--text-muted); font-size: var(--fs-xs); }
.att-unset-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.chip-btn i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip-btn:hover { border-color: var(--cyan); }
.info-note { margin-top: 12px; font-size: var(--fs-xs); color: var(--text-muted); }
.info-note summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-weight: 500; }
.info-note summary::-webkit-details-marker { display: none; }
.info-note summary:hover { color: var(--text); }
.info-note p { margin: 8px 0 0; padding: 10px 12px; line-height: 1.55; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }

/* ---- Dersler: ince yükleme satırı ---- */

/* ---- Seçmeli önizleme ---- */
.preview-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; font-size: var(--fs-xs); color: var(--text-muted); }
.el-preview { margin-top: 12px; padding: 10px 12px 4px; border: 1px dashed var(--border); border-radius: var(--r-md); }
.el-row.is-preview { color: var(--text-muted); }
.el-row.is-preview em { color: var(--text-muted); }

/* ---- Asistan örnek cevap ---- */
.ask-sample .chat { margin: 0; }

/* Karşılama ekranında logo: arka plan kutusu yok, işaretin kendisi */
.hero-mark { background: none !important; box-shadow: none !important; width: 88px; height: 88px; }
.hero-mark img { width: 100%; height: 100%; display: block; }

/* ---- İlk açılış: ders yokken tek eylem (components.js → startCard) ---- */
.start { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 28px 20px 22px; margin-bottom: 28px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--cyan) 40%, var(--border)); border-radius: var(--r-lg); }
.start-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--cyan); }
.start-icon svg { width: 26px; height: 26px; }
.start h2 { margin: 0; font: 700 var(--fs-xl)/1.25 var(--font-display); }
.start p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); max-width: 32ch; }
.start-btn { margin-top: 6px; padding: 14px 18px; font-size: var(--fs-md); }
.start-alt { color: var(--text-muted); font-size: var(--fs-xs); padding: 4px; }

/* Bugün: katlı uyarılar (today.js → alertsBlock) */
.alerts-fold { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); font: inherit; --lc: var(--warn); }
.alerts-fold.danger { --lc: var(--danger); }
.alerts-fold > span:nth-child(2) { flex: 1; min-width: 0; }
.alerts-fold strong { display: block; font-size: var(--fs-sm); font-weight: 600; }
.alerts-fold small { display: block; font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold-caret { flex: none; color: var(--text-muted); }
.alerts-open { margin-top: 8px; }

/* ---- Dönem (v2.15): Hedef GNO · Devamsızlık · Dönem akışı ---- */
.tgt-card { display: flex; flex-direction: column; gap: 10px; }
.tgt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.tgt-row span { color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500; }
.tgt-pick { font-size: var(--fs-xl); color: var(--cyan); min-width: 84px; }
.tgt-card .target-res { margin: 0; }
.tgt-ask { margin: 0; font-size: var(--fs-sm); }
.tgt-ask small { display: block; margin-top: 2px; color: var(--text-muted); font-size: var(--fs-xs); }
.tgt-card .empty-actions { justify-content: flex-start; }
.tgt-stats { margin: 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.7; }
.tgt-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.tgt-stats .standing { font-style: normal; padding: 1px 7px; }

.att-list { gap: 6px; }
.att-row { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); font: inherit; }
.att-row:hover { border-color: var(--text-dim); }
.att-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.att-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-name i, .fw-item i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.fw-item i { display: inline-block; margin-right: 6px; vertical-align: 1px; }
.att-top .abs-text { flex: none; font-size: var(--fs-xs); }
.att-row .bar { height: 6px; }

.tl { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tl.past { margin-top: 8px; opacity: 0.75; }
.tl-week { padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.tl-week.busy { border-color: color-mix(in srgb, var(--cyan) 55%, var(--border)); background: color-mix(in srgb, var(--cyan) 6%, var(--surface)); }
.tl-week.now { box-shadow: 0 0 0 1px var(--text-dim) inset; }
.tl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tl-head b { font: 600 var(--fs-md) var(--font-display); }
.tl-head small { display: block; color: var(--text-muted); font-size: var(--fs-xs); }
.tl-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 600; vertical-align: 2px; }
.tl-tag.busy { background: color-mix(in srgb, var(--cyan) 16%, transparent); color: var(--cyan); }
.tl-tag.exam { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger-text); }
.tl-share { flex: none; font-weight: 700; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; color: var(--text-muted); }
.tl-week.busy .tl-share { color: var(--cyan); }
.tl-calm { padding: 6px 12px; border-radius: var(--r-md); border: 1px dashed var(--border); color: var(--text-dim); font-size: var(--fs-xs); }
.back-link { display: inline-block; margin-bottom: 8px; }
/* ?bolum=akis gibi adreslerle kaydırınca bölüm başlığı üst çubuğun altında kalmasın */
#hedef, #devamsizlik, #akis { scroll-margin-top: calc(72px + var(--safe-t)); }

/* ---- Dokunma alanı ≥ 44px (Apple HIG) ----
   Küçük denetimler aynı görünür; görünmez bir katman dokunulan alanı en az 44×44px'e büyütür.
   .abs-btn ve .flag-hide zaten konumlu (absolute); :where sayesinde onların konumu korunur. */
:where(.brand, .add-syllabus, .icon-btn, .check, .pick-chip, .link, .u-pick, .focus-done, .chip-btn, .mini-add, .site-link, .info-note summary, .flag-src summary, .footnote a, a[href^="mailto:"], .seg button, .total-ok) { position: relative; } /* :where — kendi konumu olan (ör. .flag-hide) bozulmaz */
.focus-exam { position: relative; } /* all: unset sonrası */
:is(.brand, .add-syllabus, .icon-btn, .check, .pick-chip, .link, .u-pick, .focus-done, .focus-exam, .abs-btn, .chip-btn, .mini-add, .site-link, .info-note summary, .flag-src summary, .footnote a, a[href^="mailto:"], .seg button, .total-ok)::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
}
.u-num input, .num-in { min-height: 44px; }
.u-num input { min-width: 44px; }

/* Hocaya mail (mail.js) */
.cd-mail { align-self: flex-start; margin-top: 4px; font-size: var(--fs-xs); }
.mail-form textarea { resize: vertical; min-height: 180px; font: inherit; line-height: 1.5; }
.mail-form .pick-chips { margin-top: 6px; }

/* ---- Sağ üst kapsül: Ara + Profil (Ayarlar Profil'in içinde) ---- */
.top-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); }
.pill-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--r-pill); background: none; color: var(--text-muted); cursor: pointer; position: relative; }
.pill-btn:hover { color: var(--text); background: var(--surface-2); }
.pill-btn svg { width: 20px; height: 20px; }
.pill-btn::after { content: ""; position: absolute; inset: -2px; } /* dokunma alanı 44px */

/* ---- Tam ekran alt sayfa (Profil) ---- */
dialog.sheet.full { height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; border-radius: 0; }
dialog.sheet.full .sheet-form { height: 100%; max-height: 100%; }
dialog.sheet.full .sheet-body { flex: 1; padding-bottom: calc(24px + var(--safe-b)); }
@media (min-width: 640px) { dialog.sheet.full { height: min(100dvh, 860px); border-radius: var(--r-lg); } }
.pf-head { padding-top: calc(14px + var(--safe-t)); }
.pf-head h2 { flex: 1; }
.pf-body { gap: 20px; }
.pf-body section { display: flex; flex-direction: column; gap: 8px; }
.pf-body .seg { margin-bottom: 0; }
.pf-body .seg button { min-height: 44px; }
.pf-card { display: flex; align-items: center; gap: 14px; }
.pf-avatar { flex: none; width: 64px; height: 64px; border-radius: var(--r-pill); display: grid; place-items: center; background: color-mix(in srgb, var(--cyan) 16%, var(--surface-2)); color: var(--cyan); font: 700 var(--fs-xl) var(--font-display); letter-spacing: 0.02em; }
.pf-avatar svg { width: 30px; height: 30px; }
.pf-who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-who strong { font: 700 var(--fs-lg) var(--font-display); overflow-wrap: anywhere; }
.pf-who small { color: var(--text-muted); font-size: var(--fs-sm); }
.pf-sec { margin: 4px 0 -8px; }
.pf-link { width: 100%; min-height: 56px; text-align: left; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; color: var(--text); font: inherit; text-decoration: none; }
.pf-link:hover { background: var(--surface-2); }
.pf-link svg { flex: none; width: 18px; height: 18px; color: var(--text-muted); }
.pf-note { text-align: center; }
.pf-body .group-row { min-height: 56px; }
.pf-body .group-row select { max-width: 170px; min-height: 44px; }
.pf-body .group-row input[type="time"] { max-width: 130px; min-height: 44px; }
.pf-body .group-row input[type="date"] { min-height: 44px; }
.pf-body .btn { min-height: 44px; }

/* ---- Ara ---- */
.search-head { gap: 8px; }
.search-box { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 44px; border-radius: var(--r-pill); background: var(--bg); border: 1px solid var(--border); }
.search-box svg { width: 18px; height: 18px; color: var(--text-muted); }
.search-box input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 0; outline: none; }
/* Tarayıcının kendi temizle (×) düğmesi kapat düğmesiyle yan yana iki × gösteriyordu */
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-sheet .sheet-body { min-height: 40vh; }
.search-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.search-row { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; text-align: left; cursor: pointer; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); font: inherit; }
.search-row span { min-width: 0; }
.search-row strong { display: block; font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.search-row small { display: block; font-size: var(--fs-xs); color: var(--text-muted); }
.search-row em { flex: none; font-style: normal; font-size: var(--fs-xs); color: var(--text-muted); }
.search-row svg { flex: none; width: 16px; height: 16px; color: var(--text-muted); }

/* ---- Bugün: Kampüste ---- */
.weather-card { display: flex; align-items: center; gap: 16px; }
.weather-temp { flex: none; font: 700 var(--fs-2xl) var(--font-display); font-variant-numeric: tabular-nums; }
.weather-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.weather-info strong { font-size: var(--fs-md); font-weight: 600; }
.weather-info small { font-size: var(--fs-xs); color: var(--text-muted); }
.pf-body .field input, .pf-body .field select { min-height: 44px; }

/* Kart derinliği: açık temada --card-shadow hafif gölge, koyu temada none (Tasarım İyileştirme, Öncelik 2) */
:is(.card-box, .group, .gpa-card, .term, .u-table-wrap, .fold, .focus, .wk, .att-row, .tl-week, .muted-note,
    .cand, .alerts-fold, .start, .session, .task, .course, .crow, .ask-box) { box-shadow: var(--card-shadow); }
.tl-week.now { box-shadow: 0 0 0 1px var(--text-dim) inset, var(--card-shadow); }

/* Tarih kutusu (components.js dateField): görünen yüz + üstünde görünmez yerel seçici */
.date-field { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.date-field.is-empty { color: var(--text-muted); font-weight: 400; }
.date-field:focus-within { outline: 2px solid var(--cyan); outline-offset: 2px; }
.date-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; border: 0; padding: 0; }
.date-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

/* Mikro etkileşim: "Bitti" ve "Gitmedim" anında kısa büyüme (prefers-reduced-motion'da tokens.css kapatır) */
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.task.pop .check, .abs-btn.pop { animation: pop 0.32s ease-out; }
.task.pop .task-title { transition: color 0.3s; }

/* Şube seçimi (kontrol ekranı): her seçenek ≥ 44px dokunma alanı */
.sec-pick { margin-bottom: 12px; }
.sec-pick .consent { min-height: 44px; align-items: center; }

/* Asistan: yapay zekâ cevabı ve önerisi (asistan.js) */
.msg.a.ai { border-color: color-mix(in srgb, var(--violet) 45%, var(--border)); }
.ai-tag { display: inline-block; margin-bottom: 4px; padding: 1px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--violet); font-size: var(--fs-2xs); font-weight: 600; }
.msg-ai-offer { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.msg-ai-offer .btn { justify-self: start; min-height: 44px; }
.msg-ai-wait { margin: 10px 0 0; color: var(--text-muted); font-size: var(--fs-xs); }

/* Seçmeli Keşfi: öneri gerekçesi + listeden alıntı, sınav çakışması */
.el-row.has-why { flex-wrap: wrap; }
.el-why { flex-basis: 100%; margin: 4px 0 0; color: var(--text-muted); font-size: var(--fs-xs); line-height: 1.45; }
.el-why q { display: block; margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--border); font-style: italic; }
.el-why q::before, .el-why q::after { content: ""; }
.el-why small { display: block; margin-top: 4px; color: var(--text-dim); }
.cand-clash { margin: 6px 0 0; color: var(--danger-text); font-size: var(--fs-xs); font-weight: 600; }

/* Ders sayfası: kazanımlar */
.cd-outcomes { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--text-muted); }

/* Devamsızlık: hafta seçimi (ders.js absenceBody) */
.wk-abs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-top: 8px; }
.wk-abs-grid.two { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.wk-abs { min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.wk-abs small { font-size: var(--fs-2xs); color: var(--text-muted); }
.wk-abs.on { background: color-mix(in srgb, var(--warn) 22%, var(--surface)); border-color: var(--warn); }
.wk-abs.is-exam { cursor: default; border-style: dashed; color: var(--text-dim); }

/* Ders sayfası: haftalık konular tablosu */

/* Bugün: dersin altında bu haftanın konusu */
.session-topic { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: var(--fs-xs); color: var(--text-muted); }

/* Ders ekranı: dersin dönem akışı (katlı; açıkken liste kendi içinde kayar) */
.cd-flow-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); font: inherit; }
.cd-flow-head > span:first-child { flex: 1; min-width: 0; }
.cd-flow-head b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.cd-flow-head small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: var(--fs-xs); color: var(--text-muted); }
.cd-fw-list { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.cd-fw { display: flex; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.cd-fw:first-child { border-top: 0; }
.cd-fw.past { opacity: 0.6; }
.cd-fw.now { background: color-mix(in srgb, var(--cyan) 10%, transparent); }
.cd-fw.now .cd-fw-n b { color: var(--cyan); }
.cd-fw > div { flex: 1; min-width: 0; }
.cd-fw p { margin: 0; overflow-wrap: anywhere; }
.cd-fw p small, .cd-fw-items small { display: block; color: var(--text-muted); font-size: var(--fs-xs); }
.cd-fw-n { flex: none; width: 44px; display: flex; flex-direction: column; }
.cd-fw-n b { font-weight: 600; color: var(--text-muted); }
.cd-fw-n small { font-size: var(--fs-2xs); color: var(--text-muted); white-space: nowrap; }
.cd-fw-items { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cd-fw-items li { padding: 4px 8px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--warn) 12%, transparent); font-weight: 600; font-size: var(--fs-xs); }
.cd-fw-items li.exam { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.cd-fw-items li.done { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.cd-fw-items small { font-weight: 400; overflow-wrap: anywhere; }

/* Dönem başlangıcı önerisi (izlencedeki tarihli haftalık plandan; "Kullan" ile ayara yazılır) */
.flow-suggest { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 12px; padding: 0 2px; font-size: var(--fs-sm); color: var(--text-muted); }
.flow-suggest b { color: var(--text); font-weight: 600; }
.flow-suggest .btn { flex: none; }
