/* İplik Depo ekranlarına (views-iplik.js) özel stiller; sınıflar ip- önekli. Sahibi: İplik geliştiricisi.
 * Ortak XPPS tablo ve düzen sınıfları (.xt, .xt-wrap, .fbar, .page-head, tr.iptalli, .pager …) styles.css'tedir. */

/* XPPS gri düğme (#6b7280) ve turuncu iptal düğmesi */
.btn.ip-gri { background: #6b7280; border-color: #6b7280; color: #fff; }
.btn.ip-gri:hover { filter: brightness(1.08); background: #6b7280; }
.btn.ip-turuncu { background: #c2620f; border-color: #c2620f; color: #fff; }

/* I1: arama kartı (solda arama, sağda depo toplamı) */
.ip-arama { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.ip-ara-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ip-ara-form .field { margin: 0; min-width: 220px; }
.ip-ara-form .btn { min-height: 44px; }
.ip-toplam { font-size: 16px; }
.ip-toplam strong { color: #b91c1c; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .ip-toplam strong { color: #f08a8a; }

/* I1: her lot ayrı kart + tablo (yatay kaydırmalı); 1. başlık lacivert, alt satır kırmızı "GENEL TOPLAM:" */
.card.ip-lot { padding: 0; overflow-x: auto; margin-bottom: 14px; }
table.ip-lot-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.ip-lot-t th, .ip-lot-t td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ip-lot-t thead th { background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.ip-lot-t thead th.ip-lot-h { background: #1e3a5f; color: #fff; text-align: center; font-size: 14.5px; }
.ip-lot-t td.t { font-variant-numeric: tabular-nums; }
.ip-lot-t tr.ip-lot-tot td { color: #b91c1c; font-weight: 600; border-bottom: 0; }
.ip-lot-t tr.ip-lot-tot td:last-child { font-weight: 700; }
:root[data-theme="dark"] .ip-lot-t tr.ip-lot-tot td { color: #f08a8a; }

/* I2: XPPS'te bütün hücreler sola yaslı; Hareket renkleri (Devir mavi, Giriş yeşil, Çıkış kırmızı) */
.xt.ip-hareket td.t { font-variant-numeric: tabular-nums; }
.ip-devir { color: #1d4ed8; font-weight: 600; }
.ip-giris { color: #047857; font-weight: 600; }
.ip-cikis { color: #b91c1c; font-weight: 600; }
:root[data-theme="dark"] .ip-devir { color: #8fb1ff; }
:root[data-theme="dark"] .ip-giris { color: #5fd0a6; }
:root[data-theme="dark"] .ip-cikis { color: #f08a8a; }
.xt tr.iptalli td.acts, .xt tr.iptalli td.acts a { text-decoration: none; }
.xt .acts a.c-warn { color: var(--warn); }

/* I3 / I4: tarih + vardiya seçimi (büyük kutular, tablet) */
.ip-ekran { padding-bottom: 8px; }
.ip-secim { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.ip-ust { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
input.ip-buyuk { font-size: 18px; padding: 12px 14px; min-height: 52px; width: auto; }
.ip-vardiya { display: flex; gap: 8px; flex-wrap: wrap; }
.ip-vardiya label { position: relative; display: inline-flex; align-items: center; padding: 13px 18px; border-radius: 8px; border: 2px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 15px; font-weight: 600; color: var(--text-2); min-height: 50px; }
.ip-vardiya input { position: absolute; opacity: 0; width: 0; height: 0; }
.ip-vardiya label.secili { background: #1e3a5f; border-color: #1e3a5f; color: #fff; }
.ip-vardiya label:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.ip-bilgi { margin: 14px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.ip-devir-not { margin: 0; max-width: 760px; flex: 1 1 320px; }

/* I3 / I4 satır tablosu: büyük kutular, başlıklar küçük büyük harf, hatalı satır açık kırmızı, uyarı satırın altında */
.card.ip-tablo-sar { overflow-x: auto; }
table.ip-giris { width: 100%; border-collapse: collapse; }
.ip-giris th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; text-align: left; padding: 8px 6px;
  border-bottom: 2px solid var(--border); white-space: nowrap; }
.ip-giris td { padding: 4px 6px; vertical-align: top; }
.ip-giris select, .ip-giris input { width: 100%; font-size: 15px; padding: 9px 8px; min-height: 46px; border-radius: 7px; }
.ip-giris input.sayi { text-align: right; }
.ip-giris tr.hatali td { background: var(--bad-soft); }
.ip-giris tr.ip-satir-uyari td { color: var(--bad); font-size: 12px; font-weight: 600; padding: 2px 6px 8px; }
.ip-c-lot { min-width: 120px; } .ip-c-ne { min-width: 110px; } .ip-c-konik { min-width: 150px; }
.ip-c-adet { width: 84px; } .ip-c-sep { min-width: 110px; } .ip-c-kg { width: 112px; }
/* tablo hücresinde min-width tutmaz: dar ekranda sayı kutuları kutunun kendisiyle korunur */
.ip-giris td.ip-c-adet input { min-width: 64px; } .ip-giris td.ip-c-kg input { min-width: 96px; }
.ip-c-dlot { min-width: 210px; } .ip-c-dne { min-width: 140px; } .ip-c-dsep { min-width: 170px; }
.ip-giris .ip-palet { background: var(--surface-2); }

/* Sabit Kaydet çubuğu (XPPS: sayfanın altına sabit, büyük düğme 56 px); telefonda alt menünün üstünde */
.ip-bar { position: sticky; bottom: calc(var(--nav-h, 64px) + env(safe-area-inset-bottom)); z-index: 5; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px; margin-top: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 -2px 10px rgba(0, 0, 0, .08); }
@media (min-width: 900px) { .ip-bar { bottom: 0; } }
.ip-ozet { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.btn.ip-kaydet { font-size: 18px; padding: 14px 30px; min-height: 56px; font-weight: 600; }

/* I4: girilmiş devirler */
.ip-devirler { margin-top: 20px; }
.ip-devirler .xt-wrap { max-height: 60vh; }

/* I5 / I6 / I7: kart 560 px, alanlar alt alta */
.card.ip-kart { max-width: 560px; }
.ip-aciklama { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
input.ip-salt { background: var(--surface-2); color: var(--text-2); }
.ip-dugmeler > .btn { flex: 0 0 auto; }
.ip-iz { margin-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.6; }

@media print {
  .ip-bar, .ip-arama form { display: none; }
}
