/**
 * BAP — Projeler (liste + detay). Sade: temanın yazı tipi ve renkleri, ince çizgili tablo.
 */
.bap-yonetim { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.bap-dugme {
  display: inline-flex; align-items: center; min-height: 42px; padding: .45rem 1rem;
  border: 1px solid #0059c1; border-radius: 6px; background: #fff; color: #0059c1;
  font-weight: 600; text-decoration: none;
}
.bap-dugme:hover { background: #e8f1ff; color: #0059c1; text-decoration: none; }
.bap-dugme--ana { background: #0059c1; color: #fff; }
.bap-dugme--ana:hover { background: #00489d; color: #fff; }

.bap-suzgec {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr) auto;
  gap: .75rem;
  align-items: end;
  margin: 0 0 1rem;
}
.bap-alan label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .25rem; }
.bap-projeler input[type="search"],
.bap-projeler select {
  width: 100%;
  height: 42px;
  padding: 0 .6rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  color: inherit;
  font: inherit;
}
.bap-alan--dugme { display: flex; gap: .75rem; align-items: center; height: 42px; }
.bap-alan--dugme button { height: 42px; padding: 0 1rem; border: 0; border-radius: 4px; background: #0076ff; color: #fff; font: inherit; }
.bap-sonuc { margin: 0 0 .5rem; color: #6c757d; font-size: .9rem; }

.bap-tablo { width: 100%; border-collapse: collapse; font-size: .95rem; }
.bap-tablo th,
.bap-tablo td { padding: .6rem .5rem; border-bottom: 1px solid #e2e2e2; text-align: left; vertical-align: top; }
.bap-tablo thead th { font-size: .85rem; background: #204ba0; color: #fff; border-bottom: 0; white-space: nowrap; }
.bap-tablo td:first-child { color: #00194a; font-weight: 700; font-size: .85rem; }
/* Proje No dar (içeriği kadar), Proje Adı geniş. */
.bap-tablo th:first-child,
.bap-tablo td:first-child { width: 1%; padding-right: .75rem; }
.bap-tablo th:nth-child(2),
.bap-tablo td:nth-child(2) { width: 40%; }
.bap-tablo td:nth-child(4) { font-size: .9rem; }
/* İkincil bilgiler küçük ve gri: göz önce Proje No ve proje adına gider. */
.bap-tablo td:nth-child(5),
.bap-tablo td:nth-child(6),
.bap-tablo td:nth-child(7) { font-size: .85rem; color: #6c757d; }
.bap-tablo td:first-child,
.bap-tablo td:nth-child(6),
.bap-tablo td:nth-child(7) { white-space: nowrap; }
.bap-tablo tr[hidden] { display: none; }
/* Satırlar sırayla beyaz / çok hafif kırık beyaz. */
.bap-tablo tbody tr td { background: #fff; }
.bap-tablo tbody tr.bap-cift td { background: #f9f9f6; }
body.dark-mode .bap-tablo tbody tr td { background: #2a2a2a; }
body.dark-mode .bap-tablo tbody tr.bap-cift td { background: #313131; }
.bap-tablo td:nth-child(2) a { color: #191919; font-weight: 500; text-decoration: none; }
.bap-tablo td:nth-child(2) a:hover,
.bap-tablo td:nth-child(2) a:focus { color: #0059c1; text-decoration: underline; }
.bap-tablo td:last-child a { color: #0059c1; }

.bap-bos { padding: 1rem 0; }
.bap-daha { text-align: center; margin: 1rem 0; }
.bap-daha button { padding: .5rem 1.25rem; border: 1px solid #ced4da; border-radius: 4px; background: #fff; font: inherit; }

body.dark-mode .bap-projeler input[type="search"],
body.dark-mode .bap-projeler select,
body.dark-mode .bap-daha button { background: #333; color: #fff; border-color: #555; }
body.dark-mode .bap-tablo th,
body.dark-mode .bap-tablo td { border-color: #4a4a4a; }
body.dark-mode .bap-tablo td:first-child { color: #9cc3ff; }
body.dark-mode .bap-tablo td:nth-child(2) a { color: #f2f2f2; }
body.dark-mode .bap-tablo td:nth-child(5), body.dark-mode .bap-tablo td:nth-child(6), body.dark-mode .bap-tablo td:nth-child(7) { color: #c4c9d0; }
body.dark-mode .bap-tablo td:nth-child(2) a:hover,
body.dark-mode .bap-tablo td:last-child a { color: #6aa8ff; }

/* Masaüstünde kaydırırken süzgeç satırı ve tablo başlığı üstte kalır.
   --bap-ust: sabit site başlığının (.ymh) alt kenarı; JS ölçer. */
@media (min-width: 992px) {
  .bap-suzgec {
    position: sticky;
    top: var(--bap-ust, 0px);
    z-index: 6;
    background: #fff;
    padding: .75rem 0;
    margin-bottom: 0;
    box-shadow: 0 1px 0 #e2e2e2;
  }
  .bap-tablo thead th {
    position: sticky;
    top: calc(var(--bap-ust, 0px) + var(--bap-suzgec-h, 0px));
    z-index: 5;
  }
  body.dark-mode .bap-suzgec { background: #2a2a2a; box-shadow: 0 1px 0 #4a4a4a; }
}

@media (max-width: 991.98px) {
  .bap-suzgec { grid-template-columns: 1fr 1fr; }
  .bap-alan--ara { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  .bap-suzgec { grid-template-columns: 1fr; }
  .bap-tablo thead { display: none; }
  .bap-tablo,
  .bap-tablo tbody,
  .bap-tablo tr,
  .bap-tablo td { display: block; width: 100%; }
  .bap-tablo tr { padding: .5rem 0; border-bottom: 1px solid #e2e2e2; }
  .bap-tablo tr[hidden] { display: none; }
  .bap-tablo td { border: 0; padding: .15rem 0; white-space: normal !important; }
  .bap-tablo td[data-etiket]::before { content: attr(data-etiket) ": "; font-weight: 600; }
  .bap-tablo td:nth-child(2)::before { content: none; }
  .bap-tablo td:nth-child(2) { font-weight: 600; }
  .bap-tablo td[data-etiket]::before { color: #00194a; }
}

/* Detay */
.bap-proje-detay__bilgi { margin: 0 0 1rem; border-top: 1px solid #e2e2e2; }
.bap-proje-detay__bilgi div { display: flex; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid #e2e2e2; }
.bap-proje-detay__bilgi dt { flex: 0 0 160px; font-weight: 600; }
.bap-proje-detay__bilgi dd { margin: 0; }
.bap-proje-detay__ozet,
.bap-proje-detay__ekler { margin-bottom: 1.5rem; }
@media (max-width: 575.98px) {
  .bap-proje-detay__bilgi div { display: block; }
}
@media print {
  .bap-suzgec, .bap-daha, .bap-yonetim { display: none; }
}

/* Hızlı aramada eşleşen yer: mavi ve altı çizili (zemin yok). */
.bap-tablo mark.bap-vurgu {
  background: none;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #0059c1;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  padding: 0;
}
body.dark-mode .bap-tablo mark.bap-vurgu { text-decoration-color: #6aa8ff; }

.bap-geri { margin: 1rem 0 0; }
/* "Tüm projeler" (btn-outline-secondary): temanın genel a:hover mavisi koyu gri zemine
   biniyordu. Açık modda üzerine gelince açık gri zemin + koyu yazı; karanlık mod olduğu gibi. */
body:not(.dark-mode) .bap-geri .btn-outline-secondary:hover,
body:not(.dark-mode) .bap-geri .btn-outline-secondary:focus {
  background: #f1f3f5;
  border-color: #6c757d;
  color: #212529;
}
