/* Doküman yönetimi + doküman ağacı — liste, ayrıntı, revizyon, ağaç grafiği. */

/* Doküman ağacı grafik kutusu — yükseklik ekrana göre ayarlanır */
.agac-kutu { height: 640px; border: 1px solid var(--cizgi); border-radius: var(--r-kutu); background: var(--yuzey-dolu); }
.agac-kutu.kucuk { height: 420px; margin-top: 0; }
@media (max-width: 900px) {
  .agac-kutu { height: 70vh; }
  .agac-kutu.kucuk { height: 50vh; }
}
/* "Nasıl okunur?" açılırındaki ok türü göstergeleri (renkler grafikteki kenar renkleriyle aynı) */
.agac-nokta { font-size: 15px; line-height: 1; }
.agac-nokta.referans { color: #2d6a9f; }
.agac-nokta.metin { color: #8a97a3; }
.agac-nokta.elle { color: #7b4fa0; }
/* Grafik başlığındaki düğüm arama kutusu */
.dok-arama-kutusu { display: flex; align-items: center; gap: 6px; flex: 1 1 320px; justify-content: flex-end; }
.dok-arama-kutusu input { flex: 1 1 auto; max-width: 400px; }

/* ---------- Başlıktaki durum rozeti ---------- */
.dok-baslik .rozet { margin-left: 6px; letter-spacing: 0; vertical-align: middle; }

/* ---------- Süzgeç kartı (liste + ağaç): tek kompakt satır ---------- */
.dok-filtre { padding: 14px 18px; margin-bottom: var(--bosluk-4); align-items: flex-end; }
.dok-filtre .dok-arama { flex: 1 1 220px; }
.dok-filtre .dok-arama input { width: 100%; }
.dok-filtre-dugmeler { display: flex; align-items: center; gap: 4px; }
.dok-filtre-onay { align-self: center; padding-bottom: 2px; }

/* ---------- Listeler ---------- */
table.dok-liste th a { text-decoration: none; }
table.dok-liste th.dok-sec { width: 1.6rem; }
table.dok-liste td.dok-no { white-space: nowrap; }
table.dok-liste td.dok-no a { font-weight: 700; }
table.dok-liste.dar { max-width: 640px; }
/* Hücredeki ikinci satır: tip · bölüm · standart gibi ikincil bilgi */
.dok-alt { margin-top: 2px; font-size: 12.5px; color: var(--ikinci); font-weight: 400; }
.dok-toplu-eylem { margin: var(--bosluk-3) 0 0; }
.dok-satir-eylem { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.dok-satir-eylem form { margin: 0; }
table.dok-liste td form { margin: 0; }
.dok-ipucu { margin-bottom: var(--bosluk-3); }
.dok-ipucu summary { display: inline-block; }
.dok-secilenler { margin: 0; padding-left: 1.2rem; columns: 2 320px; }

/* ---------- Doküman ayrıntısı: bilgi tablosu ---------- */
table.bilgi-tablo { max-width: 780px; }
table.bilgi-tablo th {
  width: 230px; font-variant-caps: normal; letter-spacing: 0; font-size: 13.5px; font-weight: 650;
  padding-top: 11px; padding-bottom: 11px;
}
table.bilgi-tablo tr:hover > td { background: transparent; }

/* ---------- Yönetici araçları (liste) ---------- */
.dok-araclar p { margin: 6px 0 var(--bosluk-4); }
.dok-arac-satiri { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }

/* ---------- Formlar ---------- */
/* Gruplu liste: solda etiket, sağda alan */
form.dok-form .grup > .alan > label {
  margin: 0; flex: 0 1 220px; font-size: 14px; font-weight: 650; color: var(--yazi); display: block;
}
form.dok-form .grup > .alan > input[type=text],
form.dok-form .grup > .alan > input[type=date],
form.dok-form .grup > .alan > input[type=number],
form.dok-form .grup > .alan > input[type=file],
form.dok-form .grup > .alan > select { flex: 1 1 280px; width: auto; max-width: 480px; }
form.dok-form .grup > .alan > .dok-secenekler,
form.dok-form .grup > .alan > .dok-cift { flex: 1 1 280px; max-width: 480px; }
.dok-cift { display: flex; gap: 8px; min-width: 0; }
.dok-cift select { min-width: 0; }
.dok-cift input { flex: 1 1 0; min-width: 0; width: 100%; }
.dok-secenekler { display: flex; flex-wrap: wrap; gap: 6px 16px; }
form.dok-form label.dok-secenek {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; font-size: 14px;
}
/* Çok satırlı formlarda (oluştur / revizyon) metin alanları kartın tam genişliğini kullanır */
form.dok-form.dikey input[type=text], form.dok-form.dikey input[type=date], form.dok-form.dikey input[type=number],
form.dok-form.dikey input[type=file], form.dok-form.dikey select, form.dok-form.dikey textarea { max-width: none; }
form.dok-form .form-satir .form-satir { margin-top: 0; }
form.dok-form .madde-satiri .btn { margin-top: 10px; }
/* Metne yazılacak yer tutucular ([[TABLO:N]] / [[FOTO:N]]) */
code.yer-tutucu { font-weight: 600; }
.dok-onizleme-gorsel { display: block; max-width: 200px; max-height: 150px; margin-bottom: 6px; border-radius: var(--r-giris); }
.dok-iliski-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dok-iliski-form select { flex: 1 1 280px; max-width: 420px; }

@media (max-width: 700px) {
  .dok-filtre-dugmeler { width: 100%; }
  .dok-arama-kutusu { justify-content: stretch; flex-basis: 100%; min-width: 0; }
  .dok-arama-kutusu input { max-width: none; min-width: 0; }
  .dok-cift { flex-direction: column; }
  form.dok-form .grup > .alan > input[type=text],
  form.dok-form .grup > .alan > input[type=date],
  form.dok-form .grup > .alan > input[type=number],
  form.dok-form .grup > .alan > input[type=file],
  form.dok-form .grup > .alan > select,
  form.dok-form .grup > .alan > .dok-secenekler,
  form.dok-form .grup > .alan > .dok-cift { flex: 1 1 100%; max-width: none; }
  table.dok-liste td.saril { min-width: 180px; }
  table.bilgi-tablo th { width: 40%; }
}

/* Belge editörü (OnlyOffice) — templates/ofis/editor.html */
body.ofis-tam main { max-width: none; padding: 4px 10px 0; }
body.ofis-tam .sayfa-dipnot { display: none; }
.ofis-bas { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; min-width: 0; }
.ofis-baslik { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 15px; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ofis-ipucu { cursor: help; color: var(--soluk); }
.ofis-kayit-durum { font-size: 12.5px; color: var(--ikinci); white-space: nowrap; }
.ofis-bilgi { margin-bottom: 6px; padding-top: 6px; padding-bottom: 6px; }
.dok-surum-tablo td form, form.dok-satir-ici { display: inline; }
.dok-duzenleme-satir { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.ofis-cerceve { height: calc(100vh - 110px); min-height: 360px; border-radius: var(--r-kart);
  overflow: hidden; border: 1px solid var(--cizgi); background: #fff; }
.ofis-cerceve > div, .ofis-cerceve iframe { width: 100%; height: 100%; }
/* Süreli doküman yetkisi (göç 58) */
.dok-yetki-liste { margin: .3rem 0 .6rem; padding-left: 1.1rem; }
.dok-yetki-liste li { margin: .15rem 0; }
.dok-yetki-bitti { color: var(--metin-soluk, #888); text-decoration: line-through; }
