/* PERON SOFT — Depolar (çoklu depo · transfer) + Yarı Mamul Hammadde Ağacı pencereleri (1.401.0).
   Kapsam kendi sınıflarıdır (.dp-* · .ha-*); global sınıflara (.peron-table, .peron-input, .peron-btn) çıplak kural
   YAZILMAZ. Renk yalnız token: gece modu tokenlerle gelir. Temel kurallar dar ekran içindir; geniş düzen yalnız
   min-width sorgularıyla eklenir. Girdi puntosu panelin ortak kurallarından gelir (telefonda 16px). */

/* ═══ ORTAK ═══════════════════════════════════════════════════════════════ */
.dp-alt { display: block; margin-top: 2px; font-size: 10.5px; line-height: 1.35; color: var(--text-muted); }
.dp-alt.is-eksi, .dp-satir.is-eksi .dp-mik, td.is-eksi { color: var(--rose-ink); }
.dp-soluk { color: var(--text-muted); }
.dp-not { margin: 0 0 12px; font-size: 11.5px; line-height: 1.5; color: var(--text-muted); max-width: 78ch; }
.dp-hata {
    box-sizing: border-box; margin: 8px 0; padding: 8px 12px; border: 1px solid var(--rose-surface-border);
    border-radius: var(--r-md); background: var(--rose-surface); color: var(--rose-ink); font-size: 12px; line-height: 1.45;
}
.dp-hata[hidden], .dp-tr[hidden], .dp-kart[hidden], #ha-fiyatsiz[hidden] { display: none; }
.dp-rozet {
    display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px solid var(--pri-border); border-radius: var(--r-sm);
    background: var(--pri-light); color: var(--pri-text); font-size: 9.5px; font-style: normal; font-weight: 600;
    line-height: 16px; white-space: nowrap; vertical-align: 1px;
}
.dp-rozet.is-pasif { border-color: var(--border); background: var(--border-light); color: var(--text-muted); }

/* ═══ DEPO SEÇİCİSİ (giriş / çıkış / teslim pencereleri) ══════════════════ */
.dp-sec { margin-bottom: 12px; }

/* ═══ STOK KARTI: DEPO DAĞILIMI ═══════════════════════════════════════════ */
.dp-kart { box-sizing: border-box; padding-top: 16px; border-top: 1px solid var(--border); }
.dp-kart-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.dp-kart-baslik { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-primary); }
.dp-kart-baslik svg { width: 15px; height: 15px; flex-shrink: 0; }
.dp-kart-toplam { margin-right: auto; font-size: 11.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp-liste { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--r-md); }
.dp-satir {
    box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    gap: 2px 12px; min-height: 32px; padding: 6px 12px; border-top: 1px solid var(--border);
}
.dp-satir:first-child { border-top: 0; }
.dp-ad { min-width: 0; font-size: 12px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-mik { font-size: 12px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.dp-mik em { font-style: normal; font-weight: 400; color: var(--text-muted); }
.dp-cubuk { grid-column: 1 / -1; grid-row: 2; height: 3px; border-radius: 2px; background: var(--border-light); overflow: hidden; }
.dp-cubuk i { display: block; width: var(--dp-pay, 0%); height: 100%; border-radius: 2px; background: var(--pri); }
.dp-satir.is-bos .dp-ad, .dp-satir.is-bos .dp-mik { font-weight: 400; color: var(--text-muted); }
.dp-satir.is-eksi .dp-cubuk i { background: var(--rose); }

/* Depo tiki (1.401.1): tikli depo = kart o depoda mevcut. Tikli depolar listede, öteki etkin depolar alttaki satırda. */
.dp-ad--tik { display: flex; align-items: center; gap: 4px; }
.dp-ad--tik .dp-rozet { flex-shrink: 0; }
.dp-tik { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 8px; min-width: 0; min-height: 28px; cursor: pointer; }
.dp-tik input { box-sizing: border-box; width: 16px; height: 16px; margin: 0; flex-shrink: 0; accent-color: var(--pri); }
.dp-tik input:disabled { cursor: default; }
.dp-tik span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-ekle-depo { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.dp-ekle-depo-bas { font-size: 11px; font-weight: 600; color: var(--text-muted); }
/* Telefon depo ekranı: depo çipleri üstteki sekme çubuğuna yapışmasın (komşu dokunma hedefleri arası 6px). */
#mob-wh-depo-kap:not(:empty) { padding-top: 4px; }

.dp-tr {
    box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 12px; margin-top: 8px;
    padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--border-light);
}
.dp-tr-alan { min-width: 0; }
.dp-tr-dugme { display: flex; align-items: flex-end; }
.dp-tr .dp-hata { grid-column: 1 / -1; margin: 0; }
/* Transferde lot seçimi (1.402.0): lotu olan üründe miktar lotlara yazılır. */
.dp-tr-lot { grid-column: 1 / -1; min-width: 0; }
.dp-tr-lot[hidden], .dp-g-lot:empty { display: none; }
.dp-lot-bas { margin-bottom: 4px; font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.dp-lot-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.dp-lot-bas > span { font-weight: 400; color: var(--text-muted); }
.dp-lot-bas .dp-lot-yok { margin-left: auto; font-weight: 400; color: var(--text-secondary); }
.dp-lot-liste { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--card-bg); }
.dp-lot-liste li {
    box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; align-items: center;
    gap: 8px; padding: 4px 8px; border-top: 1px solid var(--border);
}
.dp-lot-liste li:first-child { border-top: 0; }
.dp-lot-liste label { min-width: 0; display: flex; flex-direction: column; font-size: 12px; color: var(--text-primary); }
.dp-lot-liste label b { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-lot-liste label em { font-style: normal; font-size: 10.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp-lot-liste .dp-lot-mik { box-sizing: border-box; width: 100%; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.dp-g-lot { grid-column: 1 / -1; min-width: 0; font-size: 10.5px; color: var(--text-muted); overflow-wrap: anywhere; }

/* Stoğu sıfırla: depo seçimi (1.402.0) — "Tümü" en üstte, depolar altında tik olarak. */
.stk-sd { margin: -10px 0 18px; text-align: left; }
.stk-sd-liste { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--r-md); }
.stk-sd-liste li { border-top: 1px solid var(--border); }
.stk-sd-liste li:first-child { border-top: 0; background: var(--border-light); }
.stk-sd-liste label {
    box-sizing: border-box; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center;
    gap: 8px; min-height: 32px; padding: 4px 12px; font-size: 12px; color: var(--text-primary); cursor: pointer;
}
.stk-sd-liste input { box-sizing: border-box; width: 16px; height: 16px; margin: 0; accent-color: var(--pri); }
.stk-sd-liste span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk-sd-liste li:first-child span { font-weight: 600; }
.stk-sd-liste b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stk-sd-liste b em { font-style: normal; font-weight: 400; color: var(--text-muted); }
.stk-sd-hata { margin: 8px 0 0; font-size: 12px; color: var(--rose-ink); }
.stk-sd-hata[hidden] { display: none; }

.dp-gecmis { margin-top: 12px; }
.dp-gecmis-bas, .dp-roller-bas { margin-bottom: 6px; font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.dp-gecmis ul { margin: 0; padding: 0; list-style: none; }
.dp-gecmis li {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 4px 0;
    border-top: 1px solid var(--border); font-size: 11px; color: var(--text-secondary);
}
.dp-g-yon { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.dp-g-mik { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; font-weight: 600; color: var(--text-primary); }
.dp-g-tarih, .dp-g-kim { grid-column: 1 / -1; min-width: 0; font-size: 10.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══ DEPO YÖNETİMİ ═══════════════════════════════════════════════════════ */
.dp-yon { box-sizing: border-box; min-width: 0; }
.dp-yon .dp-t { min-width: 700px; }
.dp-yon .dp-t .dp-rozet { margin: 1px 4px 1px 0; }
.dp-yon col.dp-c-kod { width: 48px; }
.dp-yon col.dp-c-gorev { width: 132px; }
.dp-yon col.dp-c-durum { width: 72px; }
.dp-yon col.dp-c-eylem { width: 316px; }
.dp-yon .dp-t .dp-td-ad, .dp-yon .dp-t .dp-td-gorev { white-space: normal; overflow-wrap: anywhere; }
.dp-yon col.dp-c-mik { width: 132px; }
.dp-yon .dp-t td { vertical-align: middle; }
.dp-yon .dp-td-ad b { font-weight: 600; }
.dp-yon tr.is-pasif .dp-td-ad b { font-weight: 400; color: var(--text-muted); }
.dp-eylem { white-space: nowrap; }
.dp-eylem .peron-btn { margin: 2px 4px 2px 0; }
.dp-eylem .peron-btn[aria-pressed="true"] { background: var(--pri-light); color: var(--pri-text); }
.dp-ekle, .dp-roller, .dp-icerik { box-sizing: border-box; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.dp-ekle { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 12px; align-items: end; }
.dp-ekle-alan { min-width: 0; }
.dp-roller-izgara { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 16px; margin-bottom: 4px; }
.dp-rol { min-width: 0; }
.dp-icerik-kap { max-height: 320px; overflow: auto; }
.dp-yon .dp-it { min-width: 420px; }

/* ═══ HAMMADDE AĞACI ══════════════════════════════════════════════════════ */
.ha-kok { box-sizing: border-box; min-width: 0; }
.ha-ekle { margin-bottom: 12px; }
.ha-ara { max-width: 520px; }
.ha-kok .ha-t { min-width: 680px; }
.ha-kok col.ha-c-kod { width: 88px; }
.ha-kok col.ha-c-mik { width: 92px; }
.ha-kok col.ha-c-birim { width: 56px; }
.ha-kok col.ha-c-fiyat { width: 108px; }
.ha-kok col.ha-c-tutar { width: 104px; }
.ha-kok col.ha-c-sil { width: 40px; }
.ha-kok .ha-t td { vertical-align: middle; }
.ha-ad { display: block; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ha-td-kod, .ha-td-birim { color: var(--text-secondary); }
.ha-td-mik, .ha-td-fiyat, .ha-td-tutar { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ha-kok .ha-t .ha-mik, .ha-kok .ha-t .ha-fiyat { width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
.ha-td-tutar { font-weight: 600; }
.ha-td-sil { text-align: center; }
.ha-sil {
    box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
    padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-muted); cursor: pointer;
}
.ha-sil:hover, .ha-sil:focus-visible { background: var(--rose-surface); color: var(--rose-ink); }
.ha-sil svg { width: 14px; height: 14px; }
.ha-gizli { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ha-bos td { padding: 24px 12px; text-align: center; color: var(--text-muted); }

.ha-ozet {
    box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 24px; margin: 16px 0 12px;
    padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--border-light);
}
.ha-ozet-ana { min-width: 0; }
.ha-ozet-etiket { display: block; font-size: 11px; color: var(--text-muted); }
.ha-ozet-deger { display: block; font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ha-ozet-yan { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 0; align-content: center; }
.ha-ozet-yan > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.ha-ozet-yan dt { min-width: 0; font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ha-ozet-yan dd { margin: 0; font-size: 12px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ha-kural { margin-bottom: 0; }

/* Stok kartındaki "Hammadde Ağacı" düğmesi (kendi sarmalayıcısında, #m-hamagac-sarmal). */
.ha-kart-dugme { min-height: 44px; }
.ha-kart-dugme[hidden] { display: none; }

/* Stok kartı → Tedarikçiler & Fiyatlar: yarı mamulün hammadde ağacından gelen birim değeri (1.401.1). */
.ha-kart-fiyat {
    box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 8px;
    padding: 8px 12px; border: 1px solid var(--pri-border); border-radius: var(--r-md); background: var(--pri-light);
}
.ha-kart-fiyat[hidden] { display: none; }
.ha-kart-fiyat-etiket { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.ha-kart-fiyat-tutar { font-size: 13px; font-weight: 600; color: var(--pri-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ha-kart-fiyat-not { flex: 1 1 220px; min-width: 0; font-size: 11.5px; line-height: 1.45; color: var(--text-secondary); }

/* Stok giriş / çıkış penceresi: düşülecek hammaddelerin önizlemesi. */
.ha-oz {
    box-sizing: border-box; margin: 0 0 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md);
    background: var(--border-light);
}
.ha-oz-tik { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 12px; font-weight: 600; color: var(--text-primary); cursor: pointer; }
.ha-oz-tik input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.ha-oz-t { width: 100%; margin-top: 8px; border-collapse: collapse; table-layout: fixed; font-size: 11.5px; }
.ha-oz-t th { padding: 4px 8px; border-bottom: 1px solid var(--border); font-size: 10.5px; font-weight: 600; color: var(--text-muted); text-align: left; }
.ha-oz-t td { padding: 4px 8px; border-bottom: 1px solid var(--border); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ha-oz-t th:nth-child(n+2), .ha-oz-t td:nth-child(n+2) { width: 30%; text-align: right; font-variant-numeric: tabular-nums; }
.ha-oz.is-kapali .ha-oz-t { opacity: .55; }

/* ═══ GENİŞ DÜZEN ═════════════════════════════════════════════════════════ */
/* Stok kartı hareketleri: dar ekranda depo adı Tür rozetinin altına iner (alan düşer, veri düşmez); 1024px'ten itibaren ayrı kolon. */
.stk-mv-table .dp-mv-kol { display: none; }
.dp-mv-alt { display: block; max-width: 104px; margin-top: 3px; font-size: 10.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 641px) {
    .dp-satir { grid-template-columns: minmax(0, 1fr) minmax(80px, 34%) auto; }
    .dp-cubuk { grid-column: auto; grid-row: auto; }
    .dp-mik { min-width: 96px; }
    .dp-tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 132px; }
    .dp-tr-not { grid-column: 1 / 3; }
    .dp-gecmis li { grid-template-columns: 112px minmax(0, 1fr) auto minmax(0, 1fr); }
    .dp-g-tarih, .dp-g-kim { grid-column: auto; }
    .dp-ekle { grid-template-columns: minmax(0, 1fr) 160px auto; }
    .dp-roller-izgara { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ha-ozet { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}
@media (min-width: 1024px) {
    .dp-yon .dp-t { min-width: 900px; }
    .dp-yon col.dp-c-kod { width: 80px; }
    .dp-yon col.dp-c-gorev { width: 256px; }
    .dp-yon col.dp-c-durum { width: 78px; }
    .dp-yon col.dp-c-eylem { width: 316px; }
    .stk-mv-table .dp-mv-kol { display: table-cell; }
    .dp-mv-alt { display: none; }
    .ha-kok col.ha-c-kod { width: 112px; }
    .ha-kok col.ha-c-mik { width: 108px; }
    .ha-kok col.ha-c-birim { width: 64px; }
    .ha-kok col.ha-c-fiyat { width: 124px; }
    .ha-kok col.ha-c-tutar { width: 116px; }
    .ha-kok col.ha-c-sil { width: 44px; }
}

/* Hareket listelerinde depo adı (stok kartı hareketleri · günlük hareketler · lot geçmişi). */
.dp-hucre { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-soluk { color: var(--text-muted); }
.dp-lot-depo { font-size: 10.5px; font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
.dp-mv-depo { display: inline-block; max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
