:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --border: #e2e5ea;
  --text: #1f2430;
  --muted: #6b7280;
  --accent: #1d4ed8;
  --accent-soft: #eef2ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header.site {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
}
header.site nav {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  height: 52px;
}
header.site .brand { font-weight: 700; margin-right: .5rem; }
header.site a {
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
header.site a:hover { color: var(--text); }
header.site a.active { color: var(--accent); border-bottom-color: var(--accent); }

main {
  max-width: 1000px;
  margin: 1.5rem auto 4rem;
  padding: 0 1.25rem;
}

h1 { font-size: 1.4rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .6rem; }
h3 { font-size: .98rem; margin: 1.25rem 0 .4rem; color: var(--muted); }

.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 .4rem; color: var(--border); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.list { list-style: none; padding: 0; margin: 0; }
.list li { border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .8rem .25rem;
  text-decoration: none;
  color: var(--text);
}
.list a:hover { background: var(--accent-soft); }
.list .sub { color: var(--muted); font-size: .85rem; }

/* Toplu güncelleme / yönetim program listesi */
.list li.grup {
  background: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding-right: .35rem;
}
.list li.grup span {
  flex: 1;
  padding: .5rem .25rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.list li.prog-li {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding-right: .35rem;
}
.list li.prog-li label.prog-satir { flex: 1; }
.list .sil-prog,
.list .sil-birim {
  flex: none;
  padding: .3rem .6rem;
  font-size: .78rem;
  background: transparent;
  color: #b91c1c;
  border: 1px solid var(--border);
}
.list .sil-prog:hover,
.list .sil-birim:hover {
  background: #fee2e2;
  border-color: #fecaca;
  filter: none;
}
label.prog-satir {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .25rem;
  cursor: pointer;
}
label.prog-satir:hover { background: var(--accent-soft); }
label.prog-satir .prog-ad { flex: 1; }
label.prog-satir .durum { font-size: .82rem; white-space: nowrap; }
label.prog-satir .durum.ok { color: #15803d; }
label.prog-satir input:disabled + .prog-ad { opacity: .6; }
.badge {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: .1rem .6rem;
  font-size: .78rem;
  white-space: nowrap;
}

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: #fafbfc; }
tr:hover td { background: #fafbfc; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
tfoot td { font-weight: 600; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

input[type=text], input[type=search] {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  background: var(--panel);
  color: var(--text);
}
button {
  padding: .55rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: .95rem;
  cursor: pointer;
}
button:hover { filter: brightness(1.05); }
button:disabled { opacity: .6; cursor: default; }

/* Genişletilebilir ders satırları + katkı matrisi */
.ders-satir { cursor: pointer; }
.ders-satir.pasif { cursor: default; }
.ders-satir .ok { display: inline-block; color: var(--muted); transition: transform .15s; font-size: .8em; }
.ders-satir.acik .ok { transform: rotate(90deg); }
.ders-detay > td { background: #fafbfc; padding: .8rem 1rem; }
.ders-oc { font-size: .88rem; margin-top: .6rem; }
.ders-oc:first-child { margin-top: 0; }
.ders-oc ol { margin: .25rem 0 0; padding-left: 1.25rem; }
.ders-oc li { margin: .15rem 0; }

table.matris { font-size: .78rem; width: auto; min-width: 100%; }
table.matris th, table.matris td { text-align: center; padding: .3rem .5rem; white-space: nowrap; border-bottom: 1px solid var(--border); }
table.matris tbody th { text-align: left; color: var(--text); font-weight: 600; background: #fafbfc; }
table.matris thead th { cursor: help; }
table.matris tr:hover td { background: transparent; }
.matris .k0 { color: var(--border); }
.matris .k1 { background: #fee2e2; }
.matris .k2 { background: #fef3c7; }
.matris .k3 { background: #fef9c3; }
.matris .k4 { background: #dcfce7; }
.matris .k5 { background: #bbf7d0; }

/* Öğrenci yükle bölümü */
#ogrenciBolum h3 { color: var(--text); margin: 1.25rem 0 .5rem; }
#ogrenciBolum tr.birim-satir td {
  background: #fafbfc;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.kod-input {
  padding: .3rem .4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .9rem;
}
.es-select {
  padding: .35rem .5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  background: var(--panel);
}
.mini { font-size: .82rem; }

/* Sınav sonucu yükle */
.sin-alan { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; color: var(--muted); }
.sin-alan select, .sin-alan input {
  padding: .45rem .55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  background: var(--panel);
  color: var(--text);
}
#ogrenciBolum h3, #sinavBolum h3 { color: var(--text); }

.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 2rem 0; text-align: center; }
.error { color: #b91c1c; }
pre { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: 8px; overflow-x: auto; font-size: .85rem; }
.row { display: flex; gap: .6rem; align-items: center; }
.prose { white-space: pre-wrap; font-size: .9rem; }
