/* ============================================================
   Page: alislar — liste + action-bar (yeni alış artık order-wizard'da)
   ============================================================ */
/* Alışlar action-bar: filtreler solda, butonlar sağda (satış ile simetrik).
   .sales-filters, .cust-cell, .avatar-sm, .prod-badge, .row-act* sınıfları
   satislar.css'te global tanımlı → yeniden kullanılır. */
.purchases-page .action-bar-tools { flex: 1; justify-content: space-between; }

/* ============================================================
   PDF'den Aktar modalı (.pdfi) — yükle → çözümle → düzenle → aktar.
   ============================================================ */
.modal.pdfi-modal { max-width: 940px; width: 94vw; }
.pdfi { display: flex; flex-direction: column; gap: var(--space-4); }
.pdfi-lbl { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }

/* — Yükleme / sürükle-bırak — */
.pdfi-drop {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-6); text-align: center; cursor: pointer;
  background: var(--surface-alt); transition: border-color .15s, background .15s;
}
.pdfi-drop:hover, .pdfi-drop.is-over { border-color: var(--brand); background: var(--brand-glow); }
.pdfi-drop-ico { color: var(--brand); margin-bottom: var(--space-2); }
.pdfi-drop-ico svg { width: 40px; height: 40px; }
.pdfi-drop-title { font-weight: 600; }
.pdfi-drop-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.pdfi-drop-browse { color: var(--brand); text-decoration: underline; }

.pdfi-pill { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pdfi-pill-ico { color: var(--brand); display: inline-flex; }
.pdfi-pill-ico svg { width: 20px; height: 20px; }
.pdfi-pill-name { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdfi-pill-size { font-size: 12px; color: var(--text-muted); }
.pdfi-pill-rm { border: 0; background: none; cursor: pointer; color: var(--text-muted); display: inline-flex; padding: 4px; border-radius: var(--radius-sm); }
.pdfi-pill-rm:hover { color: var(--red); background: var(--red-soft); }
.pdfi-pill-rm svg { width: 16px; height: 16px; }

/* — İlerleme — */
.pdfi-phase#pdfiProgress { align-items: center; text-align: center; padding: var(--space-8) 0; }
.pdfi-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--brand);
  border-radius: 50%; animation: pdfi-spin .8s linear infinite; margin: 0 auto var(--space-3); }
@keyframes pdfi-spin { to { transform: rotate(360deg); } }
.pdfi-prog-msg { font-weight: 600; margin-bottom: var(--space-3); }
.pdfi-prog-bar { height: 6px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; max-width: 360px; margin: 0 auto; }
.pdfi-prog-fill { height: 100%; width: 0; background: var(--brand); transition: width .3s ease; }

/* — Hata — */
.pdfi-error { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4);
  border: 1px solid var(--red); background: var(--red-soft); color: var(--red); border-radius: var(--radius); margin-bottom: var(--space-3); }
.pdfi-error svg { width: 20px; height: 20px; flex-shrink: 0; }

/* — Sonuç: tedarikçi bloğu — */
.pdfi-sec { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-3) var(--space-4); }
.pdfi-supform { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.pdfi-supsearch { position: relative; }
.pdfi-supdd { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 240px; overflow-y: auto; display: none; }
.pdfi-supdd.is-open { display: block; }
.pdfi-supopt { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); cursor: pointer; }
.pdfi-supopt:hover { background: var(--row-hover); }
.pdfi-supopt-av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pdfi-supopt-name { font-weight: 600; font-size: 13px; }
.pdfi-supopt-sub { font-size: 11px; color: var(--text-muted); }
.pdfi-supopt--new { color: var(--brand); font-weight: 600; font-size: 13px; gap: 6px; border-top: 1px solid var(--border); }
.pdfi-supopt--new svg { width: 16px; height: 16px; }

.pdfi-supchip { display: flex; align-items: center; gap: var(--space-3); }
.pdfi-supchip-av { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pdfi-supchip-info { flex: 1; }
.pdfi-supchip-name { font-weight: 600; }
.pdfi-supchip-sub { font-size: 12px; color: var(--text-muted); }
.pdfi-supchip-x { border: 0; background: none; cursor: pointer; color: var(--text-muted); padding: 6px; border-radius: var(--radius-sm); display: inline-flex; }
.pdfi-supchip-x:hover { color: var(--red); background: var(--red-soft); }
.pdfi-supchip-x svg { width: 16px; height: 16px; }

.pdfi-newsup { display: none; margin-top: var(--space-3); }
.pdfi-newsup.is-open { display: block; }
.pdfi-newsup-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); padding: var(--space-3); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.pdfi-newsup-title { grid-column: 1/-1; font-weight: 600; font-size: 13px; }
.pdfi-newsup-acts { grid-column: 1/-1; display: flex; justify-content: flex-end; gap: var(--space-2); }

/* — Marka satırı — */
.pdfi-brandrow { display: flex; align-items: flex-end; gap: var(--space-2); }
.pdfi-brandrow .select { min-width: 260px; }

/* — Ürün tablosu — */
.pdfi-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: 46vh; }
.pdfi-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pdfi-table thead th { position: sticky; top: 0; background: var(--surface-alt); z-index: 1;
  text-align: left; padding: var(--space-2) var(--space-3); font-size: 11px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.pdfi-table td { padding: 6px var(--space-3); border-bottom: 1px solid var(--border); vertical-align: middle; }
.pdfi-table tbody tr:last-child td { border-bottom: 0; }
.pdfi-table tr.is-excluded { opacity: .42; }
.pdfi-c { text-align: center; }
.pdfi-r { text-align: right; }
.pdfi-in { width: 100%; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); }
.pdfi-in:focus { outline: none; border-color: var(--brand); }
.pdfi-in--wide { min-width: 180px; }
.pdfi-in--code { min-width: 90px; }
.pdfi-in--bc { min-width: 120px; }
.pdfi-in--cat { min-width: 130px; }
.pdfi-in--num { width: 84px; text-align: right; }
.pdfi-rowtot { white-space: nowrap; font-weight: 600; }

/* — Özet — */
.pdfi-summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  padding: var(--space-3) var(--space-4); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); }
.pdfi-disc-input { width: 64px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: right; }
.pdfi-sum-total b { color: var(--brand); font-size: 16px; }
