/* ═══ ÜRETİME HAZIRLIK (28.11.2026) — tek ekran: yapay zekânın tekliften okudukları, teknik ekipten beklenen
   bilgiler, ihtiyaç listesi ve satın almanın işareti (var / yok / tedarik edilecek).
   Tasarım sistemi bileşenleri (ds-*: tasarim.css) üzerine yalnız yerleşim. Köşesiz, açık zemin, renkler ds değişkenlerinden
   (koyu temada kendiliğinden döner). Masaüstünde satır ızgara; telefonda (≤768 px) satır karta döner, üç işaret düğmesi
   kartın altında yan yana ve parmakla basılacak boyda. tasarim.css bu dosyadan SONRA yüklenir: düğme kuralları iki sınıfla. ═══ */
.uh-pencere { display: flex; flex-direction: column; gap: 12px; color: var(--ds-yazi); }
.uh-ust { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.uh-kimlik { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.uh-baslik { font-size: 1.12rem; font-weight: 600; }
.uh-kunye { color: var(--ds-soluk); font-size: 0.98rem; }
.uh-kunye strong { color: var(--ds-yazi); font-weight: 600; }
.uh-dugmeler { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Okuma sürerken: yazının altında ilerleme çizgisi. Dönen halka köşesiz tasarımda kare çıkıyor ve onay kutusuna benziyordu. */
.uh-okunuyor { display: grid; gap: 8px; }
.uh-ilerleme { position: relative; height: 4px; background: var(--ds-cizgi); overflow: hidden; }
.uh-ilerleme::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 35%; background: var(--ds-mavi-ana); animation: uh-ilerle 1.4s ease-in-out infinite; }
@keyframes uh-ilerle { from { left: -35%; } to { left: 100%; } }

.uh-sayaclar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.uh-sayac { border: 1px solid var(--ds-cizgi); background: var(--ds-kart-2); padding: 8px 12px; min-width: 0; }
.uh-sayac span { display: block; font-size: 0.9rem; color: var(--ds-soluk); }
.uh-sayac strong { font-size: 1.3rem; font-weight: 600; }
.uh-sayac.uh-tamam { border-color: var(--ds-yesil); background: var(--ds-yesil-z); }
.uh-sayac.uh-tamam strong { color: var(--ds-yesil); }
.uh-sayac.uh-bekliyor { border-color: var(--ds-turuncu); background: var(--ds-turuncu-z); }

.uh-bolum { border: 1px solid var(--ds-cizgi); background: var(--ds-kart); }
.uh-bolum-ust { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--ds-baslik-zemin); border-bottom: 1px solid var(--ds-cizgi); font-weight: 600; }
.uh-bolum-ust .uh-ipucu { flex: 1 1 220px; font-weight: 400; font-size: 0.92rem; color: var(--ds-soluk); }
.uh-bos { padding: 12px; color: var(--ds-soluk); }

/* ── Alanlar: ad | değer | dayanak | işlem ── */
.uh-alan { display: grid; grid-template-columns: 180px minmax(170px, 290px) minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--ds-cizgi-izgara); }
.uh-alan:last-child { border-bottom: 0; }
.uh-alan-ad { color: var(--ds-soluk); }
.uh-alan-deger { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; min-width: 0; }
.uh-alan-deger .ds-girdi { width: 100%; max-width: 220px; }
.uh-secenekler { display: flex; gap: 6px; flex-wrap: wrap; }
.uh-dayanak { color: var(--ds-soluk); font-size: 0.92rem; overflow-wrap: anywhere; min-width: 0; }
.uh-dayanak q { quotes: "“" "”"; }
.uh-arac-durum { font-size: 0.86rem; color: var(--ds-soluk); font-weight: 400; }
.uh-arac-durum.uh-yazili { color: var(--ds-yesil); }
.uh-arac-durum.uh-farkli { color: var(--ds-turuncu); }
.uh-pencere .uh-yazi-dugme { border: 0; background: transparent; color: var(--ds-mavi-ana); cursor: pointer; padding: 2px 4px; font: inherit; font-size: 0.92rem; }
.uh-pencere .uh-yazi-dugme:hover { text-decoration: underline; }
.uh-pencere .uh-yazi-dugme:disabled { color: var(--ds-soluk-2); cursor: default; text-decoration: none; }

/* ── İhtiyaç listesi ── */
.uh-suzgec { display: inline-flex; border: 1px solid var(--ds-cizgi-girdi); }
.uh-pencere .uh-suzgec button { border: 0; background: var(--ds-kart); color: var(--ds-yazi); padding: 0 12px; min-height: var(--ds-dugme); cursor: pointer; font: inherit; font-weight: 400; }
.uh-pencere .uh-suzgec button + button { border-left: 1px solid var(--ds-cizgi-girdi); }
.uh-pencere .uh-suzgec button.uh-secili { background: var(--ds-secili); color: var(--ds-mavi-ana); font-weight: 600; }
.uh-grup { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px; background: var(--ds-kart-2); border-bottom: 1px solid var(--ds-cizgi); font-weight: 600; }
.uh-grup span { font-weight: 400; font-size: 0.92rem; color: var(--ds-soluk); }
.uh-satir { display: grid; grid-template-columns: minmax(0, 1fr) 118px 70px auto auto; gap: 4px 12px; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--ds-cizgi-izgara); }
.uh-satir.uh-isaretli-var { background: var(--ds-yesil-z); }
.uh-kalem { min-width: 0; overflow-wrap: anywhere; }
.uh-kalem strong { font-weight: 600; }
.uh-ozellik { color: var(--ds-soluk); margin-left: 6px; }
.uh-adet { font-weight: 600; white-space: nowrap; }
.uh-adet small { display: block; font-weight: 400; font-size: 0.86rem; color: var(--ds-soluk); }
/* Adet satırın kendisinde yazılır (29.11.2026): adede tıklanınca ya da adedi belli olmayan satırda hep açık kutu */
.uh-pencere .uh-adet-dugme { border: 1px dashed var(--ds-cizgi-girdi); background: transparent; color: var(--ds-yazi); cursor: pointer;
    font: inherit; font-weight: 600; padding: 2px 6px; min-height: 28px; }
.uh-pencere .uh-adet-dugme:hover:not(:disabled) { border-style: solid; border-color: var(--ds-mavi-ana); color: var(--ds-mavi-ana); }
.uh-pencere .uh-adet-dugme:disabled { cursor: default; }
.uh-adet-gir { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; }
.uh-pencere .uh-adet-gir .ds-girdi { width: 62px; min-height: 28px; height: 28px; padding: 0 6px; text-align: right; font-weight: 600; }
.uh-pencere .uh-adet-gir.uh-adet-bos .ds-girdi { border-color: var(--ds-kirmizi); background: var(--ds-kirmizi-z); }
.uh-pencere .ds-btn.uh-kucuk { min-height: 28px; height: 28px; padding: 0 10px; font-size: 0.92rem; }
.uh-isaret { display: flex; gap: 4px; }
.uh-pencere .uh-isaret button { min-height: var(--ds-dugme); padding: 0 10px; border: 1px solid var(--ds-cizgi-girdi); background: var(--ds-kart); color: var(--ds-yazi); cursor: pointer; font: inherit; white-space: nowrap; }
.uh-pencere .uh-isaret button:hover:not(:disabled) { background: var(--ds-ustune); }
.uh-pencere .uh-isaret button:disabled { cursor: default; color: var(--ds-soluk-2); }
.uh-pencere .uh-isaret button.uh-var { color: var(--ds-yesil); background: var(--ds-yesil-z); border-color: var(--ds-yesil); font-weight: 600; }
.uh-pencere .uh-isaret button.uh-yok { color: var(--ds-kirmizi); background: var(--ds-kirmizi-z); border-color: var(--ds-kirmizi); font-weight: 600; }
.uh-pencere .uh-isaret button.uh-tedarik { color: var(--ds-turuncu); background: var(--ds-turuncu-z); border-color: var(--ds-turuncu); font-weight: 600; }
.uh-islem { display: flex; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.uh-pencere .uh-simge { width: 28px; height: 28px; border: 0; background: transparent; color: var(--ds-soluk-2); cursor: pointer; font-size: 0.95rem; }
.uh-pencere .uh-simge:hover { color: var(--ds-yazi); background: var(--ds-ustune); }
.uh-pencere .uh-simge.uh-sil:hover { color: var(--ds-kirmizi); background: var(--ds-kirmizi-z); }
.uh-ayrinti { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 0.92rem; color: var(--ds-soluk); padding-bottom: 2px; }
.uh-ayrinti .uh-soru { color: var(--ds-kirmizi); }
/* Teklif değişince satıra konan işaret ("Yeni", "Değişti", "Teklifte artık yok") ve neyin değiştiği */
.uh-ayrinti .uh-degisiklik { color: var(--ds-turuncu); font-weight: 600; }
.uh-kalem .uh-degisti { margin-left: 6px; }
.uh-ayrinti label { display: inline-flex; align-items: center; gap: 6px; }
.uh-ayrinti .ds-girdi { min-width: 180px; }
.uh-duzenle { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(140px, 1.4fr) minmax(140px, 2fr) 90px 100px 170px auto; gap: 8px; align-items: end; padding: 4px 0 6px; }
.uh-duzenle label { display: flex; flex-direction: column; gap: 2px; font-size: 0.86rem; color: var(--ds-soluk); min-width: 0; }
.uh-alt { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--ds-cizgi); }
.uh-iz { font-size: 0.92rem; color: var(--ds-soluk); }

/* Araç bazında alanlar (bugünkü tablo) açılır bölümde */
.uh-araclar > summary { cursor: pointer; padding: 8px 12px; background: var(--ds-baslik-zemin); font-weight: 600; list-style-position: inside; }
.uh-araclar[open] > summary { border-bottom: 1px solid var(--ds-cizgi); }
.uh-araclar > summary span { font-weight: 400; color: var(--ds-soluk); font-size: 0.92rem; margin-left: 8px; }

/* Sipariş matrisi (IsEmriGirisi): değeri yapay zekânın / teklifin önerisiyle aynı olan hücre mor çerçeveli; değiştirince kalkar */
.ie-govde .ie-in.ie-yz { box-shadow: inset 0 0 0 1px var(--ds-mor); background-color: var(--ds-mor-z); }
.ie-govde .tr-date.ie-yz { box-shadow: inset 0 0 0 1px var(--ds-mor); }

/* Ayrı pencere (Teklif Listesi, Satın Alma): perdeye tıklayınca KAPANMAZ */
.uh-perde { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; background: rgba(29, 45, 62, 0.45); overflow-y: auto; }
.uh-kutu { width: min(1080px, 100%); background: var(--ds-kart); border: 1px solid var(--ds-cizgi); box-shadow: var(--ds-golge-pencere); padding: 16px; }

/* Satırın satın alma talebi: numara + talebin şimdiki durumu; tıklanınca kart açılır */
.uh-pencere .uh-talep { border: 1px solid var(--ds-mavi-ana); background: var(--ds-secili); color: var(--ds-mavi-ana); padding: 1px 8px; min-height: 24px; cursor: pointer; font: inherit; font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.uh-pencere .uh-talep:hover:not(:disabled) { text-decoration: underline; }
.uh-pencere .uh-talep:disabled { cursor: default; }
.uh-pencere .uh-talep.uh-talep-geldi { border-color: var(--ds-yesil); background: var(--ds-yesil-z); color: var(--ds-yesil); }
.uh-pencere .uh-talep.uh-talep-iptal { border-color: var(--ds-cizgi-girdi); background: var(--ds-kart-2); color: var(--ds-soluk); }

/* ── Kurallar paneli (hazırlık penceresinin üstünde açılır; perdeye tıklayınca KAPANMAZ) ── */
.uh-perde.uh-perde-ust { z-index: 2100; }
.uh-kutu.uh-kurallar { width: min(980px, 100%); }
.uh-kural, .uh-kod { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 6px 12px; align-items: start; padding: 9px 12px; border-bottom: 1px solid var(--ds-cizgi-izgara); }
.uh-kural:last-child, .uh-kod:last-child { border-bottom: 0; }
.uh-kural.uh-pasif .uh-kural-metin { color: var(--ds-soluk); }
.uh-kural-no { font-weight: 600; white-space: nowrap; }
.uh-kural-metin { min-width: 0; overflow-wrap: anywhere; }
.uh-kural-iz { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 3px; font-size: 0.88rem; color: var(--ds-soluk); }
.uh-tanimsiz { color: var(--ds-soluk); font-style: italic; }
.uh-kural-duzenle { grid-column: 2 / -1; display: grid; gap: 8px; min-width: 0; }
.uh-kural-duzenle label { display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; color: var(--ds-soluk); }
.uh-kural-duzenle textarea.ds-girdi { width: 100%; min-height: 64px; height: auto; padding: 6px 8px; resize: vertical; font: inherit; line-height: 1.4; }
.uh-kural-duzenle details > summary { cursor: pointer; font-size: 0.88rem; color: var(--ds-soluk); margin-bottom: 4px; }
.uh-kural-duzenle label.uh-onay { flex-direction: row; align-items: center; gap: 8px; color: var(--ds-yazi); font-size: 0.95rem; }
.uh-kod-girdi { grid-column: 2 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; }
.uh-kod-girdi .ds-girdi { flex: 1 1 320px; min-width: 0; }

/* Liste rozeti (Teklif Listesi "Hazırlık" sütunu, Satın Alma bekleyenler) */
.uh-rozet { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 22px; padding: 0 6px; border: 1px solid var(--ds-cizgi-girdi); background: var(--ds-kart); color: var(--ds-soluk); font-size: 0.86rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.uh-rozet.uh-r-bekliyor { color: var(--ds-turuncu); background: var(--ds-turuncu-z); border-color: var(--ds-turuncu); }
.uh-rozet.uh-r-yok { color: var(--ds-kirmizi); background: var(--ds-kirmizi-z); border-color: var(--ds-kirmizi); }
.uh-rozet.uh-r-hazir { color: var(--ds-yesil); background: var(--ds-yesil-z); border-color: var(--ds-yesil); }

@media (max-width: 768px) {
    .uh-perde { padding: 0; }
    .uh-kutu { width: 100%; min-height: 100%; border: 0; padding: 12px; }
    .uh-sayaclar { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
    .uh-sayac { padding: 6px 8px; }
    .uh-sayac strong { font-size: 1.1rem; }
    .uh-alan { grid-template-columns: 1fr; gap: 2px; padding: 9px 12px; }
    .uh-satir { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 12px; }
    .uh-satir > .uh-guven { grid-column: 2; grid-row: 2; justify-self: end; }
    .uh-satir > .uh-adet { grid-column: 2; grid-row: 1; text-align: right; }
    .uh-satir > .uh-kalem { grid-column: 1; grid-row: 1 / span 2; }
    .uh-satir > .uh-isaret { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1.6fr; }
    .uh-pencere .uh-isaret button { min-height: 44px; padding: 0 6px; }
    .uh-satir > .uh-islem { grid-column: 1 / -1; justify-content: flex-start; }
    .uh-duzenle { grid-template-columns: 1fr 1fr; }
    .uh-duzenle > label:first-child, .uh-duzenle > label:nth-child(2) { grid-column: 1 / -1; }
    .uh-pencere .uh-talep { white-space: normal; text-align: left; min-height: 32px; }
    .uh-kural, .uh-kod { grid-template-columns: minmax(0, 1fr) auto; }
    .uh-kural > .uh-kural-metin, .uh-kod > .uh-kural-metin, .uh-kural-duzenle, .uh-kod-girdi { grid-column: 1 / -1; }
    .uh-kural > .uh-islem, .uh-kod > .uh-islem { grid-column: 2; grid-row: 1; }
}
