/* ============================================================
   Sayfa CSS: sihirbaz (.sw-*) — Müşteriye Satış + Tedarikçiden Alış
   İki ekran da 4 adımlı tam sayfa sihirbaz. Ölçüler tasarım
   referansından (design_handoff_satis_alis) birebir alınmıştır;
   renk/punto/yarıçap yalnız variables.css token'larıyla verilir.
   Ekrana özgü ufak farklar musteriye_satis.css / tedarikciden_alis.css'te.
   ============================================================ */

/* Sihirbaz tam genişlik ister: app-content'in kendi iç boşluğunu iptal et. */
.app-content:has(.sw) { padding: 0; max-width: none; }

.sw {
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--topbar-height));
}

/* — Üst başlık — */
.sw-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 18px 0 0; }
.sw-in { max-width: 1040px; margin: 0 auto; padding: 0 40px; box-sizing: border-box; width: 100%; }
.sw-head-row { display: flex; align-items: flex-start; gap: 16px; }
.sw-head-row .page-head { flex: 1; margin-bottom: 0; }
.sw-docno { border-radius: var(--radius-sm); }
/* Rozet + «×» ikilisi: yarım taslağı silip listeye dönme kısayolu (30.08.2026). */
.sw-docno-wrap { display: flex; align-items: center; gap: 6px; flex: none; }
.sw-docno-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; flex: none; padding: 0; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-muted);
}
.sw-docno-x svg { width: 14px; height: 14px; }
.sw-docno-x:hover { border-color: var(--red); background: var(--red-soft); color: var(--red); }
/* Rozetin ALTINA inen mini anahtar (satışta «Eksik teslimat» sütunu, 02.09.2026).
   Sütun sağa yaslı → anahtar üstteki rozetle aynı hizada, başlık anahtarın sağında. */
.sw-docno-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.sw-tog { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.sw-tog input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-tog-ad { font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.sw-tog input:checked + .sw-sw { background: var(--brand); }
.sw-tog input:checked ~ .sw-tog-ad { color: var(--brand); }
.sw-tog input:focus-visible + .sw-sw { box-shadow: 0 0 0 3px var(--brand-glow); }

/* — Adım pilleri — */
.sw-steps {
  display: flex; background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px; gap: 4px;
  margin: 14px 0 16px; width: fit-content; max-width: 100%; overflow-x: auto;
}
.sw-step {
  border: 0; cursor: pointer; display: flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-weight: 800; font-size: var(--fs-sm);
  white-space: nowrap; background: transparent; color: var(--text-muted);
}
.sw-step.is-past { color: var(--navy); }
.sw-step.is-active { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.sw-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex: none; border-radius: var(--radius-full);
  background: var(--navy); color: #fff; font-size: 11px; font-weight: 800;
}
.sw-step.is-active .sw-step-n { background: #fff; color: var(--brand); }

/* — Gövde — */
.sw-main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px 40px; box-sizing: border-box; }
.sw-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 24px;
}
.sw-h {
  font-size: var(--fs-sm); font-weight: 800; color: var(--navy);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px;
}
.sw-h-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sw-h-row .sw-h { flex: 1; margin-bottom: 0; }
.sw-h-not { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text-muted); }

/* — Adım 1: tarih kutusu — */
.sw-date-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sw-date {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 8px 14px;
}
.sw-date label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
.sw-date .input { width: 150px; min-height: 34px; }

/* — Cari arama + sonuç satırları — */
.sw-search { display: flex; gap: 10px; align-items: center; }
.sw-search .input { min-height: 42px; }
.sw-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.sw-row {
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border-radius: var(--radius); text-align: left; width: 100%;
  font-family: var(--font-sans);
}
.sw-row:hover { border-color: var(--border-strong); }
.sw-row.is-sel { border-color: var(--brand); background: var(--brand-tint); }
.sw-ini {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  background: var(--navy-tint); color: var(--navy);
  border-radius: var(--radius); font-weight: 800; font-size: var(--fs-md);
}
.sw-row.is-sel .sw-ini { background: var(--navy); color: #fff; }
.sw-row-txt { flex: 1; min-width: 0; }
.sw-row-ad { display: block; font-weight: 700; color: var(--text); font-size: var(--fs-base); }
.sw-row.is-sel .sw-row-ad { font-weight: 800; color: var(--navy); font-size: var(--fs-md); }
.sw-row-meta { font-size: var(--fs-xs); color: var(--text-muted); }
.sw-secili {
  font-size: var(--fs-xs); font-weight: 800; color: #fff; background: var(--navy);
  border-radius: 8px; padding: 4px 10px; letter-spacing: .03em; white-space: nowrap;
}
.sw-badge-sq { border-radius: var(--radius-sm); }
.sw-badge-brand { border-radius: var(--radius-sm); background: var(--brand); color: #fff; }
/* Yarım kalan faturalar kartı (03.11.2026): satır + yanında sil «×». */
.sw-yarim { margin-bottom: 12px; border-color: var(--yellow); }
.sw-yarim-row { display: flex; align-items: center; gap: 8px; }
.sw-yarim-row .sw-row { flex: 1; min-width: 0; }
.sw-bos { padding: 26px 12px; text-align: center; font-size: var(--fs-sm); color: var(--text-muted); }

/* — Adım 2: yapışkan ekleme satırı —
   Sarmalayıcı yapışkan + konumlu: öneri kutusu buna göre konumlanır. */
.sw-add-wrap {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface); padding: 10px 0; margin: -10px 0 0;
  box-shadow: 0 8px 12px -10px rgba(20, 26, 54, .18);
}
.sw-add { display: flex; gap: 10px; align-items: center; }
.sw-add .input { min-height: 42px; }
.sw-wedge {
  flex: none; font-size: 11px; font-weight: 700; color: var(--text-faint);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 5px 9px;
  white-space: nowrap;
}
/* Ürün arama sonuç kutusu — arama girişine bağlı AÇILIR LİSTE.
   Akışta durursa tablonun tepesine yapışıp kartın iki kenarına dayanıyordu;
   mutlak konumla giriş kutusunun altına, iki yandan içeri girintili açılır. */
.sw-sug {
  position: absolute; top: 100%; left: 6px; right: 6px; z-index: 40; margin-top: 2px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-md);
  /* max-height JS ile görünür alana göre yazılır (core/sihirbaz.js →
     sugYerlestir); buradaki değer yalnız ilk çizim/JS yoksa geçerli. */
  max-height: 320px; overflow: auto; overscroll-behavior: contain;
}
/* Altta yer kalmadıysa yukarı açılır (dar/alçak ekran). */
.sw-sug.is-up { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 2px; }
.sw-sug-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 0; border-bottom: 1px solid var(--border); background: transparent;
  cursor: pointer; padding: 10px 14px; font-family: var(--font-sans);
}
.sw-sug-row:last-child { border-bottom: 0; }
.sw-sug-row:hover { background: var(--surface-alt); }
/* Kolon: ad ve varyant satırı alt alta (inline span'de margin-top çalışmaz). */
.sw-sug-sol { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sw-sug-ad {
  display: block; font-weight: 600; color: var(--navy); font-size: var(--fs-sm);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sw-sug-kod { font-weight: 800; }
.sw-sug-meta { display: block; font-size: var(--fs-xs); color: var(--text-muted); }
.sw-sug-fiyat { margin-left: auto; font-weight: 800; color: var(--navy); font-size: var(--fs-sm); white-space: nowrap; }

/* — Adım 2: kalem tablosu — */
.sw-tbl { width: 100%; border-collapse: collapse; margin-top: 10px; }
.sw-tbl th {
  font-size: 11px; letter-spacing: .04em; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; padding: 12px 10px; border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
}
.sw-tbl th.sw-r, .sw-tbl td.sw-r { text-align: right; }
.sw-tbl th.sw-c, .sw-tbl td.sw-c { text-align: center; }
/* Teslim-alındı sütunu: yalnız kutucuk kadar yer kaplar — tabloyu daraltmasın. */
.sw-tbl th.sw-c-cb, .sw-tbl td.sw-c-cb {
  width: 34px; padding-left: var(--space-1); padding-right: var(--space-1); white-space: nowrap;
}
/* Ürün başlığı: ürün koduna göre sıralama düğmesi (▲ artan / ▼ azalan). */
.sw-sira-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer;
}
.sw-sira-btn:hover, .sw-sira-btn.is-aktif { color: var(--navy); }
.sw-sira-ok { display: inline-flex; flex-direction: column; font-size: 10px; line-height: 10px; color: var(--text-faint); }
.sw-sira-ok .on { color: var(--brand); }
.sw-tbl td { padding: 14px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.sw-tbl .input { min-height: 38px; }
.sw-k-ad { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--navy); }
.sw-k-kod { font-size: var(--fs-xs); color: var(--text-faint); margin-top: 2px; }
.sw-k-kod a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.sw-k-kod a:hover { color: var(--brand); }
.sw-k-not { font-size: var(--fs-xs); color: var(--brand); margin-top: 4px; white-space: pre-wrap; }
/* PDF'ten gelip sistemde bulunamayan kalem — ürün adının yanında rozetle söylenir.
   ⛔ Satır zemini KULLANILMAZ: açık sarı zemin «teslim alındı» işaretinin dilidir. */
.sw-rozet-yeni {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  border: 1px solid var(--yellow); border-radius: var(--radius-full, 999px);
  background: var(--yellow-soft); color: var(--yellow);
  font-size: 10px; font-weight: 800; letter-spacing: .04em; vertical-align: 2px;
  white-space: nowrap;
}
.sw-k-yok { font-size: var(--fs-xs); color: var(--yellow); margin-top: 4px; }
.sw-k-ekle {
  border: 1px solid currentColor; border-radius: var(--radius-sm); background: transparent;
  color: inherit; cursor: pointer; font: inherit; font-weight: 700; padding: 1px 8px;
}
.sw-k-ekle:hover { background: var(--surface); }
.sw-k-eksik { font-size: var(--fs-xs); color: var(--red); font-weight: 600; margin-top: 3px; }
.sw-kampanya {
  flex: none; display: inline-flex; align-items: center; height: 15px;
  background: var(--brand); color: #fff; font-size: 8.5px; font-weight: 800;
  letter-spacing: .04em; line-height: 1; padding: 0 6px; border-radius: var(--radius-full);
}
.sw-ico-btn {
  border: 0; background: transparent; cursor: pointer; color: var(--text-faint);
  padding: 0 2px; display: inline-flex; align-items: center;
}
.sw-ico-btn:hover { color: var(--brand); }
/* Satır kademe düğmeleri (L/T/D) — fiyat geçmişi ikonunun yanında, ONUNLA AYNI BOYDA.
   Üstteki toplu segment belgenin kademesini çevirir; bunlar YALNIZ o kalemi çeker
   (kullanıcı: "toptancıya sadece bir ürünü dip fiyata veriyoruz", 08.09.2026). */
.sw-kd-btn {
  flex: none; width: 15px; height: 15px; padding: 0; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; font-size: 9.5px; font-weight: 800; line-height: 1;
}
.sw-kd-btn:hover { border-color: var(--brand); background: var(--brand-tint); }
.sw-kd-btn.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.sw-tutar { min-height: 38px; display: flex; align-items: center; justify-content: flex-end; font-weight: 800; color: var(--navy); }
.sw-net { min-height: 38px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.sw-net-b { font-weight: 500; color: var(--text); }
.sw-alt { font-size: var(--fs-xs); color: var(--text-faint); margin-top: 3px; }
/* Satırdaki tedarikçi iskontosu — Net hücresinin altında rozet. Oran eskiden kod
   satırının kuyruğunda gri yazıyordu ve fark edilmiyordu (30.08.2026). */
.sw-isk-chip {
  display: inline-block; margin-top: 3px; padding: 1px 7px;
  border: 1px solid var(--green); border-radius: var(--radius-full, 999px);
  background: var(--green-soft); color: var(--green);
  font-size: 10px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
}
.sw-brut-eski { font-size: var(--fs-xs); color: var(--text-faint); margin-top: 3px; text-decoration: line-through; }
.sw-eylem { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 2px; }
.sw-eylem button { padding: 5px; }
/* «Teslim ettim» kutucuğu — İşlemler sütununun başında (kullanıcı isteği 02.09.2026).
   İşareti satır zemini söyler; alıştaki «teslim alındı» kutucuğunun ikizidir. */
.sw-eylem .sw-teslim-cb {
  width: 16px; height: 16px; margin: 0 4px 0 0; flex: none;
  accent-color: var(--brand); cursor: pointer;
}
.sw-tbl-alt { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.sw-tbl-say { font-size: var(--fs-xs); color: var(--text-muted); }
.sw-tbl-alt .btn { margin-left: auto; }

/* — Segment (kademe / brüt-net / tekli-çoklu / kdv oranı) — */
.sw-seg {
  display: inline-flex; background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 3px; gap: 2px;
}
.sw-seg button {
  border: 0; cursor: pointer; padding: 6px 13px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-xs);
  background: transparent; color: var(--text-muted); white-space: nowrap;
}
.sw-seg button.is-on { background: var(--brand); color: #fff; }
.sw-seg--pay button { padding: 7px 18px; font-weight: 800; }
.sw-seg-et { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }

/* — Satış tipi (Perakende / Toptan) — kayıtlı cari seçiliyken PASİF —
   Kullanıcı kararı (30.08.2026): tablonun İÇİNDE değil, tablonun ÜSTÜNDEKİ
   satırın SAĞ ucunda dursun; solda Satış Tarihi kutusu kalsın. */
.sw-date-row .sw-seg-et { margin-left: auto; }
.sw-seg--mod {
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.sw-seg--mod.is-kilit { opacity: .45; }
.sw-seg--mod button[disabled] { cursor: not-allowed; }
@media (max-width: 720px) {
  .sw-date-row { flex-wrap: wrap; }
  .sw-date-row .sw-seg-et { margin-left: 0; }
}

/* — Adım 1: cari olmadan satış NOTU —
   ⛔ 30.08.2026: buradaki «Perakende / Toptan Satış» düğme kutusu KALDIRILDI.
   Seçim tek yerde: tarih satırının sağ ucundaki «Satış tipi» radyosu. Geriye
   yalnız seçim yapılınca çıkan tek satırlık bilgi notu kaldı. */
.sw-kayitsiz-not {
  margin-top: 12px; padding: 10px 14px;
  font-size: var(--fs-xs); color: var(--text-muted);
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-alt);
}

/* — Adım 3: ödeme kutucukları — */
.sw-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sw-pay {
  position: relative; width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: var(--radius); padding: 14px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 2px; font-family: var(--font-sans);
}
.sw-pay.is-on { border-color: var(--brand); background: var(--brand-tint); }
.sw-pay-ad { font-weight: 800; color: var(--navy); font-size: var(--fs-base); }
.sw-pay-ac { font-size: var(--fs-xs); color: var(--text-muted); }
.sw-pay-sira {
  position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 800;
}
.sw-pay-tek { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sw-pay-coklu { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.sw-pay-satir-bas { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sw-pay-satir-bas span { font-size: var(--fs-sm); font-weight: 800; color: var(--navy); }
.sw-pay-satir-bas .sw-ico-btn { margin-left: auto; }
.sw-pay-satir-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sw-ro {
  display: flex; align-items: center; justify-content: flex-end;
  min-height: 38px; padding: 6px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-alt);
  font-weight: 700; color: var(--navy);
}
.sw-hint { display: block; font-size: var(--fs-xs); color: var(--text-faint); margin-top: 4px; }
.sw-kalan {
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--fs-sm); padding: 10px 14px; background: var(--brand-tint);
  border: 1px solid var(--brand-glow); border-radius: var(--radius); color: var(--brand-dark);
}
.sw-kalan b { font-weight: 800; font-size: var(--fs-md); }
.sw-kalan-et { font-weight: 600; }
.sw-kalan-alt { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-muted); padding: 0 2px; }
.sw-pay-ipucu { font-size: var(--fs-xs); color: var(--text-faint); }

/* — Çek/senet ek alanları — */
.sw-cek { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 10px; }
.sw-cek .field { margin-bottom: 0; }

/* — KDV anahtarı — */
.sw-sw-label {
  display: flex; align-items: center; gap: 12px; margin-top: 20px;
  padding-top: 18px; border-top: 1px solid var(--border); cursor: pointer;
}
.sw-sw-label input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-sw {
  position: relative; width: 42px; height: 24px; flex: none;
  border-radius: var(--radius-full); background: var(--border-strong); transition: background .15s;
}
.sw-sw i {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: left .15s;
}
.sw-sw-label input:checked + .sw-sw { background: var(--brand); }
.sw-sw-label input:checked + .sw-sw i { left: 21px; }
/* Mini boy — başlık şeridindeki anahtar için. */
.sw-sw--mini { width: 32px; height: 18px; }
.sw-sw--mini i { top: 2px; left: 2px; width: 14px; height: 14px; }
.sw-tog input:checked + .sw-sw--mini i { left: 16px; }
.sw-sw-ad { font-size: var(--fs-sm); font-weight: 700; color: var(--navy); }
.sw-sw-ac { font-size: var(--fs-xs); color: var(--text-muted); }
.sw-kdv-oran {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius);
}
.sw-kdv-oran .sw-seg { background: var(--surface); }
.sw-kdv-oran .sw-seg button { padding: 6px 14px; font-weight: 800; }
.sw-kdv-oran-ad { font-size: var(--fs-sm); font-weight: 700; color: var(--navy); }
.sw-kdv-oran-not { margin-left: auto; text-align: right; font-size: var(--fs-xs); color: var(--text-muted); max-width: 340px; }

/* — Uyarı bandı — */
.sw-uyari {
  display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 11px 14px;
  background: var(--red-soft); border: 1px solid var(--red); border-radius: var(--radius);
  color: var(--red); font-size: var(--fs-sm); font-weight: 600;
}
.sw-uyari svg { width: 17px; height: 17px; flex: none; }

/* — Açık hesap limiti bandı —
   Uyarı bandının kardeşi ama aynısı DEĞİL: limit aşımı bir hata değil, bilinçli
   verilebilecek bir karardır. Sınırın altındayken sakin (bilgi), aşıldığında
   kırmızı. Aynı .sw-uyari kullanılsaydı her açık hesap satışı hataymış gibi
   görünürdü. */
.sw-limit {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600; flex-wrap: wrap;
}
.sw-limit-v { margin-left: auto; color: var(--text); font-weight: 800; white-space: nowrap;
              font-variant-numeric: tabular-nums; }
.sw-limit.is-asim { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.sw-limit.is-asim .sw-limit-v { color: var(--red); }
.sw-limit svg { width: 17px; height: 17px; flex: none; }

/* — Adım 4: özet — */
.sw-ozet {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.sw-ozet-bas {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; padding: 18px 24px; display: flex; justify-content: space-between;
  align-items: center; gap: 16px;
}
.sw-ozet-ad { font-weight: 800; font-size: var(--fs-lg); }
.sw-ozet-meta { font-size: var(--fs-xs); color: rgba(255, 255, 255, .65); }
.sw-ozet-cip {
  flex: none; display: inline-flex; align-items: center;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24);
  color: #fff; font-size: var(--fs-xs); font-weight: 700; padding: 6px 12px;
  border-radius: var(--radius-sm); white-space: nowrap;
}
.sw-ozet-govde { padding: 20px 24px; }
.sw-ozet-k {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: var(--fs-sm); padding: 6px 0; border-bottom: 1px solid var(--border);
}
.sw-ozet-k b { font-weight: 600; }
.sw-ozet-adet { color: var(--text-faint); }
.sw-ozet-sat { display: flex; justify-content: space-between; gap: 16px; font-size: var(--fs-sm); padding: 2px 0; }
/* Özet indirim satırları: etiket solda, tutar sağda. `--brut` liste toplamı (indirimin
   TABANI), `--toplam` ise liste toplamı üzerinden toplam indirim (₺ + %) — müşterinin
   "hangi tutardan ne kadar indirim aldım?" sorusu özetten okunabilsin (kullanıcı 07.09.2026). */
.sw-ozet-isk {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: var(--fs-sm); padding: 2px 0; color: var(--green);
}
.sw-ozet-isk--ilk { padding: 8px 0 2px; }
.sw-ozet-brut { color: var(--text-muted); }
.sw-ozet-isk--toplam {
  border-top: 1px dashed var(--border); margin-top: 4px; padding-top: 6px; font-weight: 700;
}
.sw-ozet-kdv { color: var(--text-muted); }
.sw-ozet-kdv b { font-weight: 600; color: var(--text); }
.sw-ozet-borc { color: var(--brand); }
.sw-ozet-borc b { font-weight: 700; }
.sw-ek { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; }
.sw-ek-link {
  border: 0; background: transparent; cursor: pointer; padding: 0;
  font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 700;
  color: var(--brand); text-decoration: underline;
}
.sw-ek-sag { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.sw-ek-sag .input { width: 120px; text-align: right; min-height: 34px; }
.sw-ek-tl { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 700; }
.sw-ek-ad { font-size: var(--fs-sm); }
.sw-ek-not { font-size: var(--fs-xs); color: var(--text-faint); }
.sw-toplam {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 2px solid var(--border); margin-top: 10px; padding-top: 12px;
}
.sw-toplam-et {
  font-size: var(--fs-sm); font-weight: 800; color: var(--navy);
  text-transform: uppercase; letter-spacing: .03em;
}
.sw-toplam-tut { font-size: 16px; font-weight: 800; color: var(--brand); }
.sw-bakiye {
  display: grid; grid-template-columns: auto auto; justify-content: end; align-items: baseline;
  column-gap: 16px; row-gap: 8px; margin-top: 6px;
}
.sw-bakiye-v { font-size: 16px; font-weight: 500; color: var(--text); }
.sw-bakiye-son { border-top: 1px solid var(--border); padding-top: 10px; }
.sw-bakiye-son.sw-bakiye-v { font-weight: 800; color: var(--brand); }
.sw-not-tetik { display: flex; justify-content: flex-end; margin-top: 12px; }
.sw-not-tetik button {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted);
}
.sw-not-tetik button.is-dolu { color: var(--brand); }
.sw-not-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 16px 20px; margin-top: 10px;
}
.sw-not-panel .field { margin-bottom: 0; }
.sw-not-panel textarea { min-height: 62px; resize: vertical; }

/* Carisiz satışta isteğe bağlı telefon — not panelinin ikizi, ama KATLANMAZ:
   kasiyer alanı görsün ki sorsun (26.09.2026). */
.sw-tel-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 16px 20px; margin-top: 10px;
}
.sw-tel-panel .field { margin-bottom: 0; }
.sw-tel-panel .input { max-width: 260px; }

/* — Sabit alt bar — */
.sw-bar {
  position: sticky; bottom: 0; z-index: 35;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: var(--shadow-md); padding: 12px 40px;
}
.sw-bar-in { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 20px; }
.sw-bar-et {
  font-size: 10px; letter-spacing: .08em; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
}
.sw-bar-tut { font-size: var(--fs-xl); font-weight: 800; color: var(--brand); line-height: 1.1; }
.sw-bar-orta { font-size: var(--fs-xs); color: var(--text-muted); }
.sw-bar-sag { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* — Dropdown (hesap / tür seçimi; yer yoksa yukarı açılır) — */
.sw-dd { position: relative; }
.sw-dd-btn {
  width: 100%; box-sizing: border-box; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; min-height: 38px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); font-family: var(--font-sans); font-size: var(--fs-base);
  cursor: pointer; text-align: left;
}
.sw-dd-btn svg { width: 16px; height: 16px; flex: none; color: var(--text-muted); transition: transform .12s; }
.sw-dd.is-open .sw-dd-btn svg { transform: rotate(180deg); }
.sw-dd-menu {
  position: absolute; left: 0; right: 0; z-index: var(--z-dropdown);
  top: calc(100% + 4px); bottom: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 4px; max-height: 220px; overflow: auto;
}
.sw-dd.is-up .sw-dd-menu { top: auto; bottom: calc(100% + 4px); }
.sw-dd-opt {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  cursor: pointer; padding: 9px 10px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: var(--fs-sm); color: var(--text); font-weight: 500;
}
.sw-dd-opt:hover { background: var(--surface-alt); }
.sw-dd-opt.is-on { color: var(--brand); font-weight: 700; }
.sw-dd-bos { padding: 9px 10px; font-size: var(--fs-sm); color: var(--text-muted); }

/* — Çekmece (fiyat geçmişi) — */
.sw-ort { position: fixed; inset: 0; background: rgba(46, 43, 95, .35); z-index: 60; }
.sw-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 94vw; z-index: 61;
  background: var(--surface); box-shadow: var(--shadow-xl); display: flex; flex-direction: column;
}
.sw-drawer-bas {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.sw-drawer-bas b { font-weight: 800; color: var(--navy); font-size: var(--fs-md); }
.sw-drawer-tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--border); }
.sw-drawer-tabs button {
  border: 0; background: transparent; cursor: pointer; font-family: var(--font-sans);
  font-weight: 700; font-size: var(--fs-sm); padding: 9px 14px;
  border-bottom: 2px solid transparent; color: var(--text-muted);
}
.sw-drawer-tabs button.is-on { border-bottom-color: var(--brand); color: var(--brand); }
.sw-drawer-govde { flex: 1; overflow: auto; padding: 8px 24px 20px; }
.sw-ph-ozet { font-size: var(--fs-xs); color: var(--text-muted); padding: 10px 0 8px; border-bottom: 1px solid var(--border); }
.sw-ph-tbl { width: 100%; border-collapse: collapse; }
.sw-ph-tbl th {
  font-size: 10px; letter-spacing: .05em; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; padding: 10px 0 8px; text-align: left;
}
.sw-ph-tbl td { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.sw-ph-tbl th.sw-r, .sw-ph-tbl td.sw-r { text-align: right; }
.sw-ph-ipucu { margin-top: 4px; color: var(--brand); font-weight: 600; }
.sw-ph-tbl tr.sw-ph-al { cursor: pointer; }
.sw-ph-tbl tr.sw-ph-al:hover td { background: var(--surface-alt); }
/* İade modalı üstünde açılan geçmiş çekmecesi (satislar.js): modal 100, toast 200 arası. */
.sw-ph-modal-ust .sw-ort { z-index: 160; }
.sw-ph-modal-ust .sw-drawer { z-index: 161; }
.ret-ph-btn { vertical-align: middle; margin-left: 4px; }
.ret-fiyat-geri { border: 0; background: none; padding: 0 2px; cursor: pointer; color: var(--brand); font-size: 13px; line-height: 1; }
.srt-price--asim { border-color: var(--danger, #dc2626) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger, #dc2626) 20%, transparent); }
.sw-ph-bos { padding: 40px 12px; text-align: center; font-size: var(--fs-sm); color: var(--text-muted); }

/* — Dar ekran — */
@media (max-width: 720px) {
  .sw-in, .sw-main { padding-left: var(--space-4); padding-right: var(--space-4); }
  .sw-bar { padding: 12px var(--space-4); }
  .sw-pay-grid, .sw-pay-tek, .sw-pay-satir-grid, .sw-cek { grid-template-columns: 1fr; }
  .sw-bar-orta { display: none; }
  .sw-kdv-oran { flex-wrap: wrap; }
  .sw-kdv-oran-not { margin-left: 0; text-align: left; }
}

/* Mal kabul kutucuğu — YALNIZ PDF'ten aktarılan faturada. Koliler tek tek geldiği
   için kalem işaretlenince satır açık sarıya döner (belge modalıyla aynı dil). */
.sw-geldi-cb { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.sw-k-geldi > td { background: var(--yellow-soft); }
.sw-k-teslim > td { background: var(--yellow-soft); }

/* ══ Tedarikçi iskontosu bilgi kutusu + «İskonto uygula» ═══════════════════
   06.10.2026 kullanıcı kararı: Brüt/Net sekmesi ve «Bu faturada iskonto var mı?»
   çubuğu kaldırıldı. Kartta oran varsa arama kutusunun ÜSTÜNDE açık sarı bilgi
   kutusu çıkar (yalnız bilgi); oran «İskonto uygula» ile faturaya işlenir. */
.sw-isk-bilgi {
  margin: var(--space-3) 0 var(--space-3); padding: var(--space-2) var(--space-3);
  background: var(--yellow-soft); border: 1px solid var(--yellow);
  border-radius: var(--radius-sm); font-size: var(--fs-sm); color: var(--text);
}
.sw-isk-bilgi b { font-size: var(--fs-md); }
.sw-isk-uygula[disabled] { opacity: .6; cursor: default; }

/* ── Ürün seçim çekmecesi (alışta «Tedarikçi ürünlerini görüntüle») ──
   Kabuk sw-drawer'ın kendisi; burada yalnız arama başlığı, satır düzeni ve
   toplu ekleme çubuğu var. Çekmece phCizim'den GENİŞ: kod+ad+varyant+stok
   tek satıra sığmalı, yoksa her satır iki kez sarıyor. */
.sw-drawer--us { width: 560px; }
.sw-us-ara {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px; border-bottom: 1px solid var(--border);
}
.sw-us-ara .input { flex: 1; }
.sw-us-sayi { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }
.sw-us-govde { padding: 4px 12px 12px; }
.sw-us-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer;
  border-bottom: 1px solid var(--border); text-align: left;
}
.sw-us-row:hover { background: var(--surface-alt); }
.sw-us-row input[type="checkbox"] { flex: none; width: 16px; height: 16px; cursor: pointer; }
.sw-us-sol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sw-us-ad {
  font-size: var(--fs-sm); color: var(--navy);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sw-us-meta { font-size: var(--fs-xs); color: var(--text-muted); }
.sw-us-sag {
  flex: none; display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); font-weight: 700; color: var(--navy);
}
.sw-us-rozet {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent);
  padding: 2px 6px; border-radius: 999px;
}
.sw-us-row.is-sepette .sw-us-ad { color: var(--text-muted); }
.sw-us-alt {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface-alt);
}

/* ── Öneri listesi grup başlığı (tedarikçi ürünleri / diğer ürünler) ── */
.sw-sug-grup {
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-muted); padding: 9px 12px 5px; background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
.sw-sug-grup--ted { color: var(--brand); }
