/* TABLE BOX */
.tbox{background:#eff4f8;border:1px solid #d9e2ed;border-radius:12px;overflow:hidden;margin-bottom:14px;box-shadow:0 8px 18px rgba(15,23,42,.05);}
.thdr{padding:12px 18px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.ttl{font-size:13px;font-weight:600;}
.srch{background:#f8fafc;border:1px solid #d9e2ed;border-radius:6px;padding:6px 11px;color:#314356;font-size:12px;font-family:var(--sans);width:200px;outline:none;}
.srch:focus{border-color:#b6c9dc;box-shadow:0 0 0 3px rgba(182,201,220,.18);}
.srch::placeholder{color:var(--t3);}
table{width:100%;border-collapse:collapse;}
th{background:#e5edf5;padding:9px 14px;text-align:left;font-size:10px;font-weight:600;color:#8795a8;text-transform:uppercase;letter-spacing:.7px;border-bottom:1px solid #dce5ef;}
td{padding:10px 14px;font-size:12px;border-bottom:1px solid #e6edf5;color:#5f6f82;}
tr:last-child td{border-bottom:none;}
tr.cl:hover td{background:#f5f8fb;cursor:pointer;}

/* ═══ MASTER (Cari Kartlar / Tanımlar) — KOMPAKT TABLO ═══
   Çok spesifik scope: #mm-det görünür durumdayken (display:none değilse)
   ve sadece doğrudan içindeki tabloya uygulanır.
   Modal'lar veya başka sayfalar etkilenmez. */
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .tbox{margin-bottom:8px;border-radius:8px;box-shadow:0 2px 6px rgba(15,23,42,.04);overflow:auto;max-height:calc(100vh - 220px);}
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .tbox table{table-layout:auto;}
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .tbox table > thead > tr > th{padding:5px 8px;font-size:9px;letter-spacing:.5px;white-space:nowrap;position:sticky;top:0;z-index:2;}
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .tbox table > tbody > tr > td{padding:3px 8px;font-size:10.5px;white-space:nowrap;line-height:1.35;}
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .tbox table > tbody > tr > td.wrap{white-space:normal;}
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .tbox table > tbody > tr.cl{transition:background .08s;}

/* Kompakt Geri + başlık + butonlar üst barı (sadece master ekranında) */
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .dhdr{padding:8px 12px;gap:8px;}
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .dhdr > .btn{padding:4px 10px;font-size:11px;}
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .dhdr > #mm-ttl{font-size:13px;}
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .dhdr label{font-size:11px;}

/* Kompakt arama (sadece master ekranında) */
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .srch{padding:5px 10px;font-size:11px;margin-bottom:6px;}

/* Pasif satır - hafif soluk (sadece master tablosunda) */
#mm-det:not([style*="display: none"]):not([style*="display:none"]) > .tbox table > tbody > tr.pasif-row > td{opacity:.55;}

/* ═══ YOĞUNLUK MODLARI — Grid Ayarları'ndan kullanıcı seçer ═══
   .mt-yogunluk-normal      → varsayılan (mevcut kompakt master), padding 3px 8px, font 10.5px
   .mt-yogunluk-kompakt     → daha dar padding ve font (daha çok satır görünür)
   .mt-yogunluk-cokkompakt  → en dar (maksimum satır)
   Yatay sıkıştırma: tabloyu max-content yap ki az kolon = az genişlik (boşluk olmasın). */

/* Kompakt */
#mm-det .tbox.mt-yogunluk-kompakt table{width:max-content;min-width:100%;}
#mm-det .tbox.mt-yogunluk-kompakt table > thead > tr > th{padding:2px 6px;font-size:8.5px;letter-spacing:.4px;}
#mm-det .tbox.mt-yogunluk-kompakt table > tbody > tr > td{padding:1px 6px;font-size:10px;line-height:1.2;}

/* Çok Kompakt */
#mm-det .tbox.mt-yogunluk-cokkompakt table{width:max-content;min-width:100%;}
#mm-det .tbox.mt-yogunluk-cokkompakt table > thead > tr > th{padding:1px 5px;font-size:8px;letter-spacing:.3px;}
#mm-det .tbox.mt-yogunluk-cokkompakt table > tbody > tr > td{padding:0 5px;font-size:9.5px;line-height:1.1;}
