/* =========================================================================
   TOPLU FİYAT DEĞİŞİKLİĞİ (toplu-fiyat-degisikligi)
   -------------------------------------------------------------------------
   Sayfa CSS'leri header.php'de her sayfada yüklenir: bütün kurallar .tfd-sayfa
   altında, sınıf öneki tfd-. Değerler Geçmiş Adisyonlar / paket servis paneliyle
   aynı aile (panel 14px, kart 11px, buton 9px, çip 8px, rozet 20px; #fe6447).
   Panelde overflow:hidden YOK: alttaki kaydet çubuğu (sticky) ekrana yapışabilsin.
   ========================================================================= */

.tfd-sayfa {
  position: relative;
  padding: 24px;
}

.tfd-sayfa [hidden] {
  display: none !important;
}

.tfd-sayfa .tfd-yol {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #94a3b8;
}

.tfd-sayfa .tfd-yol a {
  color: #64748b;
  text-decoration: none;
}

.tfd-sayfa .tfd-yol a:hover {
  color: #fe6447;
}

.tfd-sayfa .tfd-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* ---- Başlık satırı ---- */
.tfd-sayfa .tfd-panel-ust {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid #eef2f7;
}

.tfd-sayfa .tfd-baslik {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.tfd-sayfa .tfd-sayac {
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 800;
  color: #475569;
}

.tfd-sayfa .tfd-ust-sag {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- Butonlar ---- */
.tfd-sayfa .tfd-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.tfd-sayfa .tfd-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tfd-sayfa .tfd-btn-birincil {
  background: linear-gradient(135deg, #fe6447, #ff7a5c);
  color: #fff;
}

.tfd-sayfa .tfd-btn-birincil:not(:disabled):hover {
  filter: brightness(1.06);
  color: #fff;
}

.tfd-sayfa .tfd-btn-ikincil {
  background: #fff;
  border-color: #e2e8f0;
  border-radius: 8px;
  color: #475569;
}

.tfd-sayfa .tfd-btn-ikincil:not(:disabled):hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tfd-sayfa .tfd-rozet {
  min-width: 20px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

/* ---- İpucu ve notlar ---- */
.tfd-sayfa .tfd-ipucu,
.tfd-sayfa .tfd-not {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid #eef2f7;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  color: #64748b;
}

.tfd-sayfa .tfd-ipucu {
  background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
}

.tfd-sayfa .tfd-ipucu i,
.tfd-sayfa .tfd-not i {
  font-size: 16px;
  line-height: 1.2;
  flex: 0 0 auto;
}

.tfd-sayfa .tfd-not-bilgi {
  background: #eff6ff;
  color: #1e40af;
}

.tfd-sayfa .tfd-not-uyari {
  background: #fffbeb;
  color: #b26a00;
}

/* ---- Filtre çubuğu ---- */
.tfd-sayfa .tfd-arabar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 18px;
  border-bottom: 1px solid #eef2f7;
  background: #fafbfc;
}

.tfd-sayfa .tfd-arama {
  position: relative;
  flex: 1 1 220px;
  max-width: 340px;
}

.tfd-sayfa .tfd-arama i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
  pointer-events: none;
}

.tfd-sayfa .tfd-arama input,
.tfd-sayfa .tfd-girdi {
  box-sizing: border-box;
  height: 36px;
  padding: 7px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tfd-sayfa .tfd-arama input {
  width: 100%;
  padding-left: 32px;
}

.tfd-sayfa .tfd-girdi {
  max-width: 260px;
}

.tfd-sayfa .tfd-arama input:focus,
.tfd-sayfa .tfd-girdi:focus {
  outline: 0;
  border-color: #fe6447;
  box-shadow: 0 0 0 3px rgba(254, 100, 71, 0.14);
}

.tfd-sayfa .tfd-cip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.tfd-sayfa .tfd-cip input {
  accent-color: #fe6447;
  margin: 0;
}

/* ---- Tablo ---- */
.tfd-sayfa .tfd-tablo {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.tfd-sayfa .tfd-tablo thead th {
  padding: 10px 14px;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #94a3b8;
  white-space: nowrap;
  text-align: left;
}

.tfd-sayfa .tfd-tablo td {
  padding: 8px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #0f172a;
}

.tfd-sayfa .tfd-tablo .tfd-sag {
  text-align: right;
}

.tfd-sayfa .tfd-grup td {
  padding: 9px 14px 7px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
  font-size: 12.5px;
  font-weight: 800;
  color: #475569;
}

.tfd-sayfa .tfd-grup-sayi {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 11px;
  color: #64748b;
}

.tfd-sayfa .tfd-satir {
  box-shadow: inset 4px 0 0 transparent;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.tfd-sayfa .tfd-satir:hover,
.tfd-sayfa .tfd-satir.tfd-odak {
  background: #fafbfc;
}

.tfd-sayfa .tfd-satir.tfd-odak {
  box-shadow: inset 4px 0 0 #cbd5e1;
}

.tfd-sayfa .tfd-satir.tfd-degisti {
  background: #fff7f5;
  box-shadow: inset 4px 0 0 #fe6447;
}

.tfd-sayfa .tfd-satir.tfd-gecersiz,
.tfd-sayfa .tfd-satir.tfd-cakisma {
  background: #fef2f2;
  box-shadow: inset 4px 0 0 #dc2626;
}

.tfd-sayfa .tfd-satir.tfd-kilitli {
  background: #fafbfc;
}

.tfd-sayfa .tfd-satir.tfd-kilitli .tfd-urun-ad,
.tfd-sayfa .tfd-satir.tfd-kilitli .tfd-eski {
  color: #94a3b8;
}

@keyframes tfdKaydedildi {
  0%, 50% { background-color: #f0fdf4; box-shadow: inset 4px 0 0 #16a34a; }
  100% { background-color: transparent; box-shadow: inset 4px 0 0 transparent; }
}

.tfd-sayfa .tfd-satir.tfd-kaydedildi {
  animation: tfdKaydedildi 2.2s ease-out;
}

.tfd-sayfa .tfd-urun {
  min-width: 220px;
}

.tfd-sayfa .tfd-urun-ad {
  font-weight: 700;
  color: #0f172a;
}

.tfd-sayfa .tfd-notlar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tfd-sayfa .tfd-etiket {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  background: #f1f5f9;
  color: #64748b;
}

.tfd-sayfa .tfd-etiket-uyari {
  background: #fffbeb;
  color: #b26a00;
}

.tfd-sayfa .tfd-etiket-pasif {
  background: #f1f5f9;
  color: #94a3b8;
}

.tfd-sayfa .tfd-etiket-kilit {
  background: #eef2ff;
  color: #4338ca;
}

.tfd-sayfa .tfd-eski {
  white-space: nowrap;
  font-weight: 600;
  color: #475569;
}

.tfd-sayfa .tfd-yeni-hucre {
  width: 190px;
}

.tfd-sayfa .tfd-girdi-kap {
  position: relative;
  max-width: 170px;
}

.tfd-sayfa .tfd-yeni {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  padding: 7px 30px 7px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tfd-sayfa .tfd-yeni::placeholder {
  font-weight: 600;
  color: #cbd5e1;
}

.tfd-sayfa .tfd-yeni:focus {
  outline: 0;
  border-color: #fe6447;
  box-shadow: 0 0 0 3px rgba(254, 100, 71, 0.14);
}

.tfd-sayfa .tfd-yeni:disabled {
  background: #f8fafc;
  cursor: not-allowed;
}

.tfd-sayfa .tfd-gecersiz .tfd-yeni {
  border-color: #dc2626;
}

.tfd-sayfa .tfd-pb {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12.5px;
  font-weight: 700;
  color: #94a3b8;
  pointer-events: none;
}

.tfd-sayfa .tfd-satir-not:empty {
  display: none;
}

.tfd-sayfa .tfd-satir-not {
  max-width: 260px;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #b91c1c;
}

.tfd-sayfa .tfd-fark {
  white-space: nowrap;
  font-weight: 700;
}

.tfd-sayfa .tfd-bos {
  color: #cbd5e1;
}

.tfd-sayfa .tfd-artan .tfd-fark {
  color: #15803d;
}

.tfd-sayfa .tfd-azalan .tfd-fark {
  color: #b91c1c;
}

.tfd-sayfa .tfd-gecersiz .tfd-fark {
  color: #b91c1c;
  font-size: 12px;
}

.tfd-sayfa .tfd-fark-yuzde {
  margin-left: 4px;
  font-size: 12px;
  opacity: 0.8;
}

.tfd-sayfa .tfd-fark-uyari {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #b26a00;
  white-space: normal;
}

.tfd-sayfa .tfd-sonuc-yok td {
  padding: 28px 14px;
  text-align: center;
  font-weight: 600;
  color: #94a3b8;
}

/* ---- Alttaki kaydet çubuğu ----
   Yer tutucu panelin sonunda boşluğu korur. Yer tutucu ekranın altında kaldıkça
   çubuk .tfd-sabit ile ekranın altına sabitlenir; left/width betikten (panel hizası).
   sticky kullanılmadı: üst kapsayıcıdaki overflow:hidden onu çalıştırmıyor. */
.tfd-sayfa .tfd-altbar-yer {
  height: 60px;
}

.tfd-sayfa .tfd-altbar.tfd-sabit {
  position: fixed;
  bottom: 0;
  z-index: 40;
  border-radius: 0;
  border: 1px solid #e5e7eb;
  border-bottom: 0;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.1);
}

.tfd-sayfa .tfd-altbar {
  box-sizing: border-box;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid #eef2f7;
  border-radius: 0 0 14px 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -3px 12px rgba(15, 23, 42, 0.06);
}

.tfd-sayfa .tfd-altbar-metin {
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
}

.tfd-sayfa .tfd-altbar-metin b {
  color: #fe6447;
  font-weight: 800;
}

/* ---- Boş durum ---- */
.tfd-sayfa .tfd-bos-durum {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 18px;
  color: #94a3b8;
}

.tfd-sayfa .tfd-bos-durum > i {
  font-size: 40px;
}

.tfd-sayfa .tfd-bos-baslik {
  font-size: 15px;
  font-weight: 800;
  color: #475569;
}

/* ---- Onay penceresi içeriği (SweetAlert gövdesi sayfanın dışında) ---- */
.tfd-onay {
  font-size: 14px;
  color: #475569;
}

.tfd-onay-satir {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  font-weight: 700;
}

.tfd-onay-artan {
  color: #15803d;
}

.tfd-onay-azalan {
  color: #b91c1c;
}

.tfd-onay-uyari {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #fffbeb;
  color: #b26a00;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .tfd-sayfa {
    padding: 14px;
  }

  .tfd-sayfa .tfd-ust-sag {
    margin-left: 0;
    width: 100%;
  }

  .tfd-sayfa .tfd-arama,
  .tfd-sayfa .tfd-girdi {
    max-width: none;
    flex: 1 1 100%;
  }

  .tfd-sayfa .tfd-urun {
    min-width: 150px;
  }

  .tfd-sayfa .tfd-yeni-hucre {
    width: 130px;
  }
}
