/* azatech – Sayfa ekleri: Takvim sağ paneli, Müşteri listesi ayrıntıları, Fiyat listesi görselleri ve görsel büyütücü.
 * Renk TANIMLAMAZ: yalnız tema değişkenleri (--panel, --line, --mut, --ink, --navy, --red, --green). Kaydırma çubuğu kutu.css'teki ortak temayı kullanır (burada ayrıca renk verilmez).
 * Kutu görünümü kutu.css'teki .kutu / .kutu-bas ile aynıdır; burada yalnız bu ekranlara özgü yerleşim vardır. */

/* ============ TAKVİM: sağ panel ============ */
/* Panel: başlık sabit, içerik kendi içinde kaydırılır (sayfa uzamaz, dış kenarda ayrı çubuk çıkmaz) */
.tv-app .tv-gun { display: flex; flex-direction: column; position: static; max-height: none; overflow: visible; padding: 16px 0 0; }
.tv-app .tv-gun .kutu-bas { padding: 0 18px; margin-bottom: 10px; }
.tv-app .tv-gun .kutu-bas h3 { font-size: 18px; text-transform: capitalize; }
.tv-gun-ic { padding: 0 18px 16px; }
.tv-gun-ic h4 { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 8px; font-size: 13px; font-weight: 650; color: var(--ink); }
.tv-gun-ic h4 small { color: var(--mut); font-weight: 500; }
.tv-gun-ic h4:first-child { margin-top: 4px; }

/* Satırlar: sol metin (kesilir, ipucu ile tamamı), sağ eylem sütunu hizalı */
.tv-app .tv-l, .tv-app .tv-soguk ul { list-style: none; margin: 0; padding: 0; }
.tv-app .tv-l li, .tv-app .tv-soguk li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; margin: 0 0 6px; background: var(--panel, #fff); }
.tv-met { min-width: 0; }
.tv-met b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; font-weight: 600; line-height: 1.3; overflow: hidden; overflow-wrap: anywhere; }
.tv-met small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 1px; font-size: 12px; line-height: 1.35; color: var(--mut); overflow: hidden; overflow-wrap: anywhere; }
.tv-eylem { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.tv-eylem .ghost { min-width: 78px; justify-content: center; white-space: nowrap; }
.tv-soguk .tv-eylem .ghost { min-width: 84px; }
.tv-app .tv-l li.gec { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: color-mix(in srgb, var(--red) 7%, var(--panel, #fff)); }
.tv-app .tv-l li.bitti { opacity: .6; }
.tv-app .tv-l li.bitti .tv-met b { text-decoration: line-through; }

/* 7+ gün temas yok: uyarı kutusu, süzgeç çipleri, ilk 8 satır; "Tümünü göster" ile iç kaydırmalı */
.tv-app .tv-soguk { border: 1px solid color-mix(in srgb, var(--red) 40%, var(--line)); background: color-mix(in srgb, var(--red) 6%, var(--panel, #fff)); border-radius: var(--r-md, 10px); padding: 10px 12px 8px; margin: 2px 0 12px; }
.tv-soguk-bas { display: grid; gap: 8px; margin-bottom: 8px; }
.tv-soguk-bas > b { color: var(--red); font-size: 13px; font-weight: 650; line-height: 1.35; display: block; margin: 0; }
.tv-sur { gap: 6px; }
.tv-sur .chip { font-size: 12px; padding: 3px 10px; cursor: pointer; }
.tv-l.tv-uzun { max-height: none; }
.tv-tum { display: block; margin: 2px 0 4px auto; font-size: 13px; font-weight: 600; }

/* Takvim hücresi çipleri ve açıklama */
.tv-nok { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--navy); }
.tv-nok.gec { background: var(--red); }
.tv-nok.ac { background: var(--green, #1a7f4b); }
.tv-app .tv-help { gap: 8px 18px; color: var(--mut); }
.tv-app .tv-i { cursor: default; }

@media (max-width: 980px) {
  .tv-app .tv-gun { overflow: visible; }
  .tv-gun-ic { overflow: visible; padding-inline: 14px; }
  .tv-eylem .ghost { min-width: 70px; }
}

/* ============ MÜŞTERİLER: ad / telefon yedek gösterimi ============ */
.crm-body table.tk td.kisi-ad .kisi-yok { color: var(--mut); font-weight: 500; font-style: italic; }
.crm-body table.tk td.tel .tel-not { display: block; font-size: 11.5px; color: var(--mut); }

/* ============ FİYAT LİSTESİ: görseller ============ */
.fl-foto { margin: 0 0 var(--b-3, 12px); }
.fl-foto-ic { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fl-kucuk { appearance: none; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md, 10px); background: var(--panel, #fff); cursor: zoom-in; overflow: hidden; width: 176px; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.fl-kucuk:hover { border-color: var(--navy); }
.fl-kucuk img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: contain; }
.fl-foto-yazi { display: grid; gap: 6px; justify-items: start; }
.fl-foto-yazi b { font-size: 14px; }
.fl-iskelet { display: block; width: 100%; height: 120px; background: linear-gradient(90deg, var(--line) 25%, transparent 50%, var(--line) 75%); background-size: 300% 100%; animation: fl-ik 1.2s linear infinite; opacity: .5; }
@keyframes fl-ik { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.fl-foto-ic.bos { display: block; }
.fl-prev .fl-pv { cursor: zoom-in; border-radius: var(--r-md, 10px); outline-offset: 2px; }
.fl-prev .fl-pv:hover, .fl-prev .fl-pv:focus-visible { box-shadow: 0 0 0 2px var(--navy), 0 2px 10px rgba(0, 0, 0, .12); }
@media (min-width: 861px) { .fl-prev { grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); } }
.pl-photo img, .sayfa-gorsel { cursor: zoom-in; }

/* ============ GÖRSEL BÜYÜTÜCÜ ============ */
html.lb-acik { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; background: rgba(15, 18, 38, .78); }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--panel, #fff); border-bottom: 1px solid var(--line); }
.lb-bar > b { font-size: 15px; color: var(--ink); }
.lb-alan { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px; text-align: center; }
.lb-tuval { position: relative; display: inline-block; text-align: left; background: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); max-width: none; }
.lb-sayfa { position: absolute; top: 0; left: 0; width: 794px; transform-origin: top left; }
.lb-resim { display: block; max-width: none; height: auto; }
.lb.yukleniyor .lb-tuval { min-width: 200px; min-height: 140px; background: var(--panel, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'/%3E") center no-repeat; }
.lb-yok { margin: 0; padding: 30px; color: var(--mut); }
@media (max-width: 640px) { .lb-bar { padding: 8px 12px; } .lb-alan { padding: 8px; } }

/* Müşteriler ve fırsatlar: dar masaüstünde (≤1440 px) yan panel daralır, uzun hücreler kısalır → tabloda yatay kaydırma çıkmaz (1280 px'te 6 sütun sığar) */
@media (max-width: 1440px) and (min-width: 1101px) {
  .crm-body { grid-template-columns: minmax(0, 1fr) clamp(272px, 22vw, 316px); }
  .crm-body table.tk td.mail .cell-trunc, .crm-body table.tk td.sor .cell-trunc { max-width: 13ch; }
  .crm-body table.tk td.kisi-ad { min-width: 12ch; }
  .crm-body table.tk th, .crm-body table.tk td { padding-inline: 8px; }
}
@media (max-width: 1100px) and (min-width: 641px) {
  .crm-body table.tk td.mail .cell-trunc, .crm-body table.tk td.sor .cell-trunc { max-width: 13ch; }
  .crm-body table.tk td.kisi-ad { min-width: 12ch; }
  .crm-body table.tk th, .crm-body table.tk td { padding-inline: 8px; }
}
@media (max-width: 1100px) and (min-width: 641px) {
  /* dar iPad genişliğinde en az önemli sütun (Kayıt tarihi) gizlenir; tarih yan panelde ve kartta görünür */
  .crm-body table.tk th:nth-child(6), .crm-body table.tk td:nth-child(6) { display: none; }
}
