/* Satış Belgeleri */
.modal-card.sd-wide { width: min(1100px, 100%); }
.sd-top { display: grid; grid-template-columns: 2fr 1fr; gap: 0 12px; }
.sd-section { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.sd-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sd-section-head .btn { width: auto; }
.sd-range { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sd-range input { height: 38px; border: 1px solid #d6dfd9; border-radius: 9px; padding: 0 8px; font: inherit; }
.sd-movs { max-height: 260px; overflow: auto; }
.sd-all { display: block; font-weight: 800; margin-bottom: 8px; }
.sd-day { border-top: 1px solid #f0f3f1; padding: 6px 0; }
.sd-day-head { display: block; margin-bottom: 4px; }
.sd-day-head small { color: var(--muted); }
.sd-mov { display: flex; gap: 8px; align-items: center; padding: 3px 0 3px 22px; font-size: 13px; }
.sd-mov span { margin-left: auto; color: var(--muted); white-space: nowrap; }
.sd-lines input, .sd-lines select { height: 36px; border: 1px solid #d6dfd9; border-radius: 8px; padding: 0 8px; font: inherit; width: 100%; }
.sd-lines .sd-price, .sd-lines .sd-m-price { width: 130px; text-align: right; }
.sd-lines .sd-m-qty { width: 90px; text-align: right; }
.sd-lines .sd-m-desc { min-width: 180px; }
.sd-lines select { width: auto; min-width: 70px; }
.sd-lines input.bad { border-color: #e59a9a; background: #fff6f6; }
.sd-totals { margin: 10px 0 0 auto; max-width: 340px; }
.sd-totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.sd-totals .sd-grand { border-top: 2px solid #1f2a24; margin-top: 4px; padding-top: 8px; font-size: 16px; }
.sd-after { display: flex; gap: 10px; }
.sd-after .btn { flex: 1; }
.sd-row-actions { min-width: 150px; }
.sd-row-actions .btn { margin: 2px 4px 2px 0; }
@media (max-width: 800px) {
  .sd-top { grid-template-columns: 1fr; }
  .sd-lines .sd-price, .sd-lines .sd-m-price { width: 100px; }
}

/* e-Fatura / e-Arşiv (efatura.js) */
.ef-cell { min-width: 120px; }
.badge.ef-ok { background: #edf7f1; color: #138a4b; }
.badge.ef-wait { background: #fff6e0; color: #9a6a00; }
.badge.ef-err { background: #fdecec; color: #c0392b; }
.badge.ef-off { background: #eef0f2; color: #6b7680; }
.ef-test { font-size: 9px; font-weight: 900; color: #9a6a00; border: 1px solid #e8c766; border-radius: 6px; padding: 1px 4px; vertical-align: middle; }
.ef-no { font-size: 11px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.ef-msg { white-space: normal; max-width: 240px; color: #c0392b; }
.ef-none { color: var(--muted); }
.ef-warn { background: #fff6e0; color: #7a5400; border: 1px solid #e8c766; border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; font-weight: 800; font-size: 13px; }
.ef-sum { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; }
.ef-sum div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.ef-sum div + div { border-top: 1px solid #f0f3f1; }
.ef-sum span { color: var(--muted); }
.ef-note { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

/* Faturada irsaliyeden farklı kilo */
.sd-diff { color: #b06a00; font-weight: 800; }
.sd-lines .sd-prod, .ir-lines .ir-prod { min-width: 260px; }

/* İrsaliye (irsaliye.js) */
.ir-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr 1.4fr; gap: 0 12px; }
.ir-pick { display: flex; gap: 6px; }
.ir-pick select { flex: 1; min-width: 0; }
.ir-pick .btn { width: auto; padding: 0 14px; }
.ir-lines td:first-child { width: 30px; color: var(--muted); }
@media (max-width: 800px) { .ir-grid { grid-template-columns: 1fr 1fr; } }

/* Ürün seçme kutusu ve küçük pencereler (urun-sec.js, irsaliye.js) */
.pp-box { position: fixed; z-index: 40100; max-width: min(520px, calc(100vw - 16px)); max-height: 320px; overflow: auto; background: #fff;
  border: 1px solid #cfd9d3; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: 4px; }
.pp-item { padding: 9px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.pp-item b { display: inline-block; min-width: 34px; color: var(--green); }
.pp-item.active, .pp-item:hover { background: #eef7f1; }
.pp-add { color: var(--green); font-weight: 900; border-top: 1px solid #eef2ef; margin-top: 2px; }
.pp-add.strong { background: #e8f5ee; }
.pp-empty { padding: 9px 10px; color: var(--muted); font-size: 13px; }
.pp-overlay { position: fixed; inset: 0; z-index: 40000; background: rgba(15, 25, 20, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pp-card { background: #fff; border-radius: 14px; padding: 18px; width: min(420px, 100%); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.pp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pp-head .btn { width: auto; }
.pp-card > .btn { width: 100%; }
.pp-msg { min-height: 18px; margin-bottom: 8px; color: #c0392b; }
