/* ARTOS – Teklif Yaz ekranı: sol form, sağ canlı A4 önizleme / kalemler */
.tab-body[data-tab="teklif-yaz"] { padding: 0; gap: 0; min-height: 0; }
.teklif-ekran { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(420px, 46%) 1fr; }
.teklif-ekran > .empty { grid-column: 1 / -1; margin: 40px; }

/* ---------- Kategori seçimi (teklif türü) ---------- */
.tk-kategori { grid-column: 1 / -1; padding: 48px 40px; overflow: auto; }
.tk-kategori h2 { font-family: var(--display); font-size: 22px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin: 0 0 6px; }
.tk-kategori > p { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.tk-kategori-kartlar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 280px)); gap: 16px; }
.tk-kategori-kartlar button { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: 22px 20px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tk-kategori-kartlar button:hover, .tk-kategori-kartlar button:focus-visible { border-color: var(--red); box-shadow: 0 10px 24px rgba(196,22,28,.10); transform: translateY(-2px); outline: none; }
.tk-kategori-kartlar button b { font-family: var(--display); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.tk-kategori-kartlar button span { font-size: 12px; color: var(--muted); }
.tk-kategori .empty { margin-top: 24px; }
.tk-geri { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0 0 12px; text-align: left; }
.tk-geri:hover { color: var(--red); }
.tk-geri u { text-decoration-color: var(--line-2); text-underline-offset: 3px; }

/* ---------- Form ---------- */
.tk-form { overflow: auto; padding: 20px 24px 40px; border-right: 1px solid var(--line); background: var(--paper); }
.tk-bolum { background: var(--white); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.tk-bolum > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); user-select: none; }
.tk-bolum > summary::-webkit-details-marker { display: none; }
.tk-bolum > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted-2); border-bottom: 2px solid var(--muted-2); transform: rotate(-45deg); margin-right: 12px; transition: transform .15s; flex-shrink: 0; }
.tk-bolum[open] > summary::before { transform: rotate(45deg); }
.tk-bolum > summary > span { flex: 1; }
.tk-bolum-ozet { font-family: var(--body); font-weight: 500; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted-2); }
.tk-ipucu { font-size: 12px; color: var(--muted); padding: 0 16px 8px; margin-top: -4px; }
.tk-alanlar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 4px 16px 16px; }
.tk-alan { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tk-alan.genis { grid-column: 1 / -1; }
.tk-alan label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.tk-alan label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-alan label em { font-style: normal; font-weight: 500; color: var(--muted-2); font-size: 11px; }
.tk-alan.ic label span { color: var(--muted); }
.tk-kontrol { display: flex; align-items: center; gap: 6px; min-width: 0; position: relative; }
.tk-kontrol > input, .tk-kontrol > select, .tk-kontrol > textarea { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 10px; background: var(--white); font-size: 13px; font-family: inherit; color: inherit; }
.tk-kontrol > textarea { height: auto; padding: 8px 10px; resize: vertical; }
.tk-kontrol > input:focus, .tk-kontrol > select:focus, .tk-kontrol > textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(196,22,28,.12); }
.tk-oto-deger { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; padding: 0 10px; border: 1px dashed var(--line-2); border-radius: 9px; background: var(--paper-2); font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-oto-deger.hata { color: var(--red); border-color: #f3b4b4; background: var(--red-tint); font-weight: 600; }
.tk-rozet { font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: var(--paper-2); color: var(--muted); white-space: nowrap; font-style: normal; }
.tk-rozet.oto { background: #eef4ff; color: #2b57b5; }
.tk-rozet.elle { background: var(--red-tint); color: var(--red); }
.tk-rozet.ic { background: var(--paper-2); color: var(--muted-2); }
.tk-mini { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-2); font-size: 14px; flex-shrink: 0; }
.tk-mini:hover { border-color: var(--red); color: var(--red); }
.tk-formul-panel { margin: 8px 0 2px; padding: 10px 12px; border: 1px solid #c8d5ef; border-radius: 9px; background: #f5f8ff; color: var(--ink-2); }
.tk-formul-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #2b57b5; font-size: 12px; }
.tk-formul-panel small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.tk-formul-panel pre { margin: 8px 0 0; max-height: 150px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--ink); }
.tk-formul-kapat { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.tk-formul-kapat:hover { color: var(--red); }

/* kapı kataloğu araması */
.tk-kapi { flex-wrap: wrap; }
.tk-kapi > input { flex: 1 1 100%; }
.tk-kapi-bilgi { flex: 1 1 100%; font-size: 11px; color: var(--muted); min-height: 14px; }
.tk-kapi-bilgi.uyari { color: var(--red); }
.tk-acilir { position: absolute; z-index: 30; top: 38px; left: 0; right: 0; max-height: 320px; overflow: auto; background: var(--white); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 14px 30px rgba(26,20,22,.14); }
.tk-acilir button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; gap: 2px; }
.tk-acilir button:last-child { border-bottom: none; }
.tk-acilir button:hover { background: var(--red-tint); }
.tk-acilir button b { font-weight: 500; color: var(--ink); }
.tk-acilir button small { color: var(--muted); }
.tk-acilir-bos { padding: 10px; font-size: 12px; color: var(--muted); }
/* aramalı select: uzun listelerde select gizlenir, yerine yazdıkça süzen arama kutusu gelir */
.tk-kontrol > select.gizli { display: none; }
.tk-sec-arama { padding-right: 28px; text-overflow: ellipsis; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a89a9c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.tk-acilir button.secili { background: var(--paper-2); font-weight: 600; }
.tk-acilir button.aktif { background: var(--red-tint); }
/* müşteri / kişi seçicileri */
.tk-secici > input { padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a89a9c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.tk-acilir button.yeni { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); }
.tk-acilir button.yeni b { color: var(--red); }
.tk-acilir button.yeni:hover { background: var(--red-tint); }

/* Satışçı notu (iç not): teklif kartında sarı kutu — PDF'e ve müşteriye asla gitmez */
.ic-not { background: #fffbe6; border: 1px solid #f0e2a8; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

/* ---------- Sağ panel ---------- */
.tk-sag { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #e9e4e3; }
.tk-sag-bas { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--white); border-bottom: 1px solid var(--line); }
.tk-sag-sekmeler { display: flex; gap: 4px; background: var(--paper-2); padding: 3px; border-radius: 10px; }
.tk-sag-sekmeler button { height: 32px; padding: 0 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tk-sag-sekmeler button.active { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(26,20,22,.10); }
.tk-sag-sekmeler .count { font-size: 11px; background: var(--red-tint); color: var(--red); border-radius: 999px; padding: 1px 7px; }
.tk-sag-arac { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tk-meta-durum, .tk-meta-sicaklik, .tk-meta-ihtimal { height: 32px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); color: var(--ink-2); padding: 0 8px; font-size: 11px; }
.tk-meta-ihtimal { width: 62px; }
.tk-uyari-sayi { font-size: 12px; font-weight: 600; color: var(--red); background: var(--red-tint); padding: 4px 10px; border-radius: 999px; cursor: help; }
.tk-sag-govde { flex: 1; min-height: 0; position: relative; }
.tk-sag-govde > div { position: absolute; inset: 0; overflow: auto; }

/* A4 önizleme: sayfalar mm cinsinden, kap genişliğine ölçeklenir */
.tk-pdf { padding: 16px; }
.tk-pdf-olcek { transform-origin: top left; width: 210mm; }
.tk-a4 { position: relative; width: 210mm; height: 297mm; background: #fff; box-shadow: 0 6px 24px rgba(26,20,22,.18); margin-bottom: 16px; overflow: hidden; color: #000; font-family: "Aptos Narrow", "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif; line-height: 1.15; }
.tk-a4-alt { position: absolute; left: 17mm; bottom: 11mm; font-size: 3.2mm; color: #000; }
.tk-h { position: absolute; display: flex; padding: 0 0.5mm; box-sizing: border-box; overflow: visible; line-height: 1.12; }
.tk-h[data-al="center"] { justify-content: center; text-align: center; }
.tk-h[data-al="right"] { justify-content: flex-end; text-align: right; }
.tk-h.hata { outline: 0.3mm dashed #c4161c; }
.tk-resim { position: absolute; }
.tk-kenar { position: absolute; background: #000; display: block; }
.tk-sekil { position: absolute; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-weight: 700; text-align: center; white-space: pre; }
.tk-sekil.yuvarlak { border: 0.35mm solid #000; border-radius: 1.4mm; }
.tk-sekil.dolu { background: #fff; }
.tk-sekil.kutu { border: 0.35mm solid #000; }
.tk-sekil.cizgi { background: #000; }

/* Kalemler */
.tk-kalem { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
/* Panel yüksekliği sabit (overflow:auto); çocuklar ezilmesin — .table'ın overflow:hidden'ı
   tabloyu sıfıra kadar daraltıyordu, tablo kaybolup kaydırma çubuğu hiç çıkmıyordu. */
.tk-kalem > * { flex-shrink: 0; }
.tk-uyarilar { background: var(--red-tint); border: 1px solid #f3b4b4; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--red); display: flex; flex-wrap: wrap; gap: 6px 12px; }
.tk-ozet { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tk-ozet > div { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.tk-ozet small { font-size: 11px; color: var(--muted); }
.tk-ozet b { font-size: 15px; font-family: var(--display); }
.tk-ozet b.uyari { color: var(--red); }
.tk-kalem-tablo .tr { grid-template-columns: 130px 1fr 60px 110px 110px; font-size: 12px; padding: 6px 14px; min-height: 0; }
.tk-kalem-tablo .tr.grup { background: var(--paper-2); font-weight: 600; color: var(--red); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.tk-kalem-tablo .tr.grup span { grid-column: 1 / -1; }
.tk-kalem-tablo .kod { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--ink-2); }
.tk-kalem-tablo .ack { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-kalem-tablo .sag { text-align: right; justify-content: flex-end; }
.tk-kalem-tablo input { width: 100px; height: 28px; border: 1px solid var(--line-2); border-radius: 7px; padding: 0 8px; text-align: right; font-size: 12px; background: var(--white); font-family: inherit; }
.tk-kalem-tablo input[data-kaynak=""] { border-color: #f3b4b4; background: var(--red-tint); }
.tk-kalem-tablo input[data-kaynak="elle"] { border-color: var(--red); }
.tk-kalem-tablo input[data-kaynak="katalog"] { border-color: #b9cdf5; }
.tk-kalem-tablo input[data-kaynak="stok"] { border-color: #9ecfa6; background: #f2faf3; }
.tk-toplam { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.tk-toplam > div { display: flex; align-items: center; gap: 10px; }
.tk-toplam > div > span { flex: 1; color: var(--muted); }
.tk-toplam .genel { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-size: 15px; }
.tk-toplam .genel b { font-family: var(--display); }

/* ---------- 2D yerleşim sekmesi (js/yerlesim2d.js) ---------- */
.tk-2d { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.tk-2d-arac { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.tk-2d-arac label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.tk-2d-arac label.tk-2d-onay { flex-direction: row; align-items: center; gap: 6px; height: 30px; }
.tk-2d-arac input[type="number"], .tk-2d-arac select { height: 30px; width: 96px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px; font-size: 12px; background: var(--white); color: var(--ink-2); }
.tk-2d-arac select { width: auto; min-width: 80px; }
.tk-2d-bosluk { flex: 1; }
.tk-2d-durum { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.tk-2d-durum .rozet { padding: 4px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.tk-2d-durum .rozet.ok { background: #e6f4ea; color: #1b7f3b; font-weight: 700; }
.tk-2d-durum .rozet.hata { background: var(--red-tint); color: var(--red); font-weight: 700; }
.tk-2d-cizim { height: calc(100vh - 340px); min-height: 380px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; align-items: center; justify-content: center; transition: opacity .15s; overflow: hidden; }
.tk-2d-cizim.yukleniyor { opacity: .55; }
.tk-2d-cizim svg { width: 100%; height: 100%; display: block; }
.tk-2d-bos { color: var(--muted); font-size: 13px; text-align: center; padding: 40px 20px; line-height: 1.5; }
.tk-2d-bos.hata { color: var(--red); }
.tk-2d-uyari { font-size: 12px; color: var(--red); display: flex; flex-direction: column; gap: 2px; }

/* ============================================================ */
/* YEDEK PARÇA TEKLİFİ (js/teklif-yedek.js)                      */
/* ============================================================ */
.teklif-ekran.yedek { grid-template-columns: minmax(560px, 55%) 1fr; }

/* ---------- kalem tablosu ---------- */
.yk-tablo { display: flex; flex-direction: column; padding: 4px 16px 16px; overflow-x: auto; }
.yk-tr, .yk-not { min-width: 660px; }
.yk-tr { display: grid; grid-template-columns: 124px minmax(170px, 1fr) 44px 60px 36px 82px 82px 54px; gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.yk-tablo.fiyatsiz .yk-tr { grid-template-columns: 124px minmax(170px, 1fr) 44px 60px 36px 54px; }
.yk-th { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line-2); }
.yk-tr .sag { text-align: right; }
.yk-row.yeni { background: #fffdf0; }
.yk-row input { width: 100%; height: 30px; border: 1px solid var(--line-2); border-radius: 7px; padding: 0 8px; font-size: 12px; background: var(--white); font-family: inherit; min-width: 0; }
.yk-row input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 2px rgba(196,22,28,.10); }
.yk-row .yk-miktar, .yk-row .yk-fiyat { text-align: right; }
.yk-row .yk-fiyat[data-oto="1"] { border-color: #b9cdf5; background: #f7faff; }
.yk-hucre { position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; }
/* kalem araması: tablo içinde kırpılmasın diye tek yüzer kutu (js konumlar) */
.yk-yuzer { position: fixed; top: auto; left: auto; right: auto; max-height: 340px; z-index: 80; }
.yk-form input.yk-kilit { background: var(--paper-2); border-style: dashed; color: var(--ink-2); cursor: default; }
.yk-form input.yk-kilit:focus { border-color: var(--line-2); box-shadow: none; }
/* indirim: % / € tip seçimi + değer; bilgi satırı hesaplanan tutarı gösterir */
.yk-indirim { flex-wrap: wrap; }
.yk-indirim > select { flex: 0 0 64px; min-width: 0; }
.yk-indirim > input { flex: 1; }
.yk-buyutec { width: 28px; height: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 7px; background: var(--white); color: var(--muted); cursor: pointer; }
.yk-buyutec:hover { border-color: var(--red); color: var(--red); }
.yk-depo { font-size: 12px; color: var(--ink-2); }
.yk-birim { font-size: 11px; color: var(--muted); }
.yk-tutar { font-size: 12px; font-weight: 600; }
.yk-arac { display: flex; gap: 4px; justify-content: flex-end; }
.yk-mini { width: 26px; height: 26px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--white); color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.yk-mini:hover { border-color: var(--red); color: var(--red); }
.yk-mini.dolu { background: var(--red-tint); border-color: var(--red); color: var(--red); }
.yk-not { padding: 4px 0 8px 130px; border-bottom: 1px solid var(--line); }
.yk-not input { width: 100%; height: 28px; border: 1px dashed var(--line-2); border-radius: 7px; padding: 0 8px; font-size: 12px; background: var(--paper); font-family: inherit; }
.yk-not input:focus { outline: none; border-color: var(--red); background: var(--white); }

/* ---------- büyüteç penceresi ---------- */
.yk-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; }
.yk-modal-arka { position: absolute; inset: 0; background: rgba(26,20,22,.35); }
.yk-modal-kutu { position: relative; width: min(860px, 92vw); max-height: 82vh; display: flex; flex-direction: column; background: var(--white); border-radius: 14px; box-shadow: 0 24px 60px rgba(26,20,22,.3); overflow: hidden; }
.yk-modal-kutu > header { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.yk-modal-kutu > header b { font-family: var(--display); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); flex: 1; }
.yk-modal-sayi { font-size: 12px; color: var(--muted); }
.yk-modal-kutu .search { padding: 0 16px 10px; }
.yk-modal-aramalar { display: flex; gap: 10px; padding: 0 16px 10px; }
.yk-modal-aramalar .yk-ara-kod { flex: 0 0 220px; }
.yk-modal-aramalar .yk-ara-ack { flex: 1; }
.yk-modal-arama { width: 100%; height: 36px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 12px; font-size: 13px; font-family: inherit; }
.yk-modal-arama:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(196,22,28,.12); }
.yk-modal-liste { flex: 1; overflow: auto; border-top: 1px solid var(--line); }
.yk-mtr { display: grid; grid-template-columns: var(--yk-mtr-kolon, 160px minmax(0,1fr) 70px 54px 90px); gap: 8px; padding: 7px 16px; font-size: 12px; border-bottom: 1px solid var(--line); align-items: center; }
.yk-mth { position: sticky; top: 0; background: var(--paper-2); font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom-color: var(--line-2); }
.yk-mth span + span { border-left: 1px solid var(--line-2); padding-left: 8px; }
.yk-mth .sirali { cursor: pointer; user-select: none; }
.yk-mth .sirali:hover { color: var(--ink); }
.yk-mth .sirali.aktif { color: var(--red); }
.yk-mth .yk-ok { font-style: normal; font-size: 9px; margin-left: 3px; }
.yk-mtr.row { cursor: pointer; }
.yk-mtr.row:hover { background: var(--red-tint); }
.yk-mtr.row.sec { background: var(--red-tint); box-shadow: inset 3px 0 0 var(--red); }
.yk-mtr .onay { display: flex; align-items: center; }
.yk-mtr .onay input { pointer-events: none; accent-color: var(--red); width: 14px; height: 14px; }
.yk-mtr .kod { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--ink-2); }
.yk-mtr .ack { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yk-mtr .sag { text-align: right; }
.yk-modal-kutu > footer { padding: 10px 16px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.yk-modal-ipucu { color: var(--muted-2); font-size: 11px; margin-right: auto; }
.yk-modal-secim { font-size: 12px; color: var(--ink-2); }
.yk-modal-secim b { color: var(--red); }
.yk-modal-temizle { border: 0; background: transparent; color: var(--muted); font-size: 12px; text-decoration: underline; cursor: pointer; padding: 0; }
.yk-modal-temizle:hover { color: var(--red); }

/* ---------- A4: yedek parça teklif sayfası ---------- */
.yk-a4 { font-family: "IBM Plex Sans", Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.yk-a4-ic { position: absolute; inset: 11mm 13mm 16mm; display: flex; flex-direction: column; font-size: 3.1mm; color: #1a1416; }
/* Üst bölge — örnek devise uygun 3 kolon: logo+adres+meta | Référence kutusu | Devis N° + Client kutuları */
.yk-ust { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 5mm; align-items: start; }
.yk-logo img { height: 15mm; }
.yk-firma { margin-top: 1.5mm; font-size: 2.7mm; color: #1a1416; line-height: 1.5; }
.yk-firma b { letter-spacing: .02em; }
.yk-meta { margin-top: 2.5mm; font-size: 2.9mm; line-height: 1.7; }
.yk-meta span { color: #6b5f61; }
.yk-ref { border: 0.3mm solid #8f8385; border-radius: 2mm; padding: 2.5mm 3mm; min-height: 30mm; font-size: 2.9mm; margin-top: 9mm; }
.yk-ref small { display: block; color: #6b5f61; margin-bottom: 3mm; }
.yk-devis { display: flex; align-items: baseline; justify-content: space-between; gap: 4mm; border: 0.3mm solid #8f8385; border-radius: 2mm; padding: 2mm 3.5mm; margin-bottom: 3.5mm; }
.yk-devis small { font-size: 2.8mm; color: #6b5f61; }
.yk-devis b { font-size: 4.6mm; color: #c4161c; letter-spacing: .02em; }
.yk-musteri { border: 0.3mm solid #8f8385; border-radius: 2mm; padding: 2.5mm 3.5mm; font-size: 2.9mm; line-height: 1.55; min-height: 26mm; }
.yk-musteri small { display: block; color: #6b5f61; font-size: 2.6mm; }
.yk-musteri b { font-size: 3.4mm; }
.yk-attn { margin-top: 2mm; }
.yk-attn small { display: inline; }
/* DESCRIPTIF PRODUITS bandı (örnekteki gri şerit) */
.yk-band { margin: 5mm 0 0; background: #b9b3b4; color: #1a1416; text-align: center; font-weight: 700; font-size: 3.8mm; letter-spacing: .04em; padding: 1.8mm 0; }
/* table-layout: fixed — uzun not/açıklama kolon genişliklerini bozamaz; metin hücre içinde sarılıp satırı aşağı büyütür */
.yk-tab { width: 100%; border-collapse: collapse; font-size: 2.9mm; table-layout: fixed; }
.yk-tab th { background: #fff; color: #1a1416; font-weight: 700; text-align: left; padding: 1.8mm 2mm; font-size: 2.7mm; border-bottom: 0.35mm solid #1a1416; }
.yk-tab th.sag, .yk-tab td.sag { text-align: right; }
.yk-tab td { padding: 1.6mm 2mm; border: 0.2mm solid #cfc6c7; vertical-align: top; overflow-wrap: anywhere; }
.yk-tab tbody tr:nth-child(even) td { background: #eceaea; }
.yk-tab .kod { font-family: Consolas, monospace; font-size: 2.6mm; border-left: none; }
.yk-tab td:last-child { border-right: none; }
.yk-tab .not { font-size: 2.6mm; color: #6b5f61; font-style: italic; }
.yk-bos-satir { color: #a89a9c; text-align: center; }
/* Observations solda aşağı doğru büyür, toplam kutusu sağda sabit genişlikte kalır.
   minmax(0,1fr): uzun kesintisiz metin kolonu şişirip toplamları sağa itemez. */
.yk-alt-blok { display: grid; grid-template-columns: minmax(0, 1fr) 64mm; gap: 6mm; margin-top: 5mm; align-items: start; }
.yk-obs { min-width: 0; font-size: 2.8mm; }
.yk-obs small { display: block; color: #1a1416; font-size: 2.8mm; margin-bottom: 1mm; }
.yk-obs-kutu { border: 0.3mm solid #8f8385; border-radius: 1mm; padding: 2.5mm 3mm; min-height: 18mm; white-space: pre-wrap; overflow-wrap: anywhere; }
.yk-toplam { align-self: start; font-size: 3mm; border: 0.3mm solid #8f8385; border-radius: 1.5mm; padding: 1.5mm; }
.yk-toplam > div { display: flex; justify-content: space-between; gap: 4mm; padding: 1.6mm 2mm; border-bottom: 0.2mm solid #e6dedf; }
.yk-toplam > div:last-child { border-bottom: none; }
.yk-toplam span { color: #6b5f61; }
.yk-toplam .indirim b { color: #c4161c; }
.yk-toplam .genel { background: #c4161c; color: #fff; border-radius: 1.2mm; border: none; margin-top: 1mm; font-size: 3.3mm; }
.yk-toplam .genel span { color: #fff; }
/* Alt koşullar: solda saklama + iletişim, sağda ödeme koşulları (örnekteki gibi) */
.yk-kosul { margin-top: auto; padding-top: 3mm; display: grid; grid-template-columns: minmax(0, 1fr) 64mm; gap: 6mm; font-size: 2.4mm; color: #6b5f61; line-height: 1.5; }
.yk-kosul p { margin: 0 0 1.4mm; }
.yk-kosul b { color: #1a1416; }
.yk-kosul-sag { font-size: 2.7mm; }

/* CGV sayfası */
.yk-cgv-baslik { text-align: center; background: #b9b3b4; color: #1a1416; font-size: 3.8mm; letter-spacing: .08em; margin: 0 0 4mm; padding: 1.8mm 0; }
.yk-cgv-metin { column-count: 2; column-gap: 6mm; font-size: 2.25mm; line-height: 1.45; text-align: justify; color: #2c2426; }
.yk-cgv-metin h5 { font-size: 2.45mm; color: #c4161c; margin: 0 0 0.8mm; break-after: avoid; }
.yk-cgv-metin p { margin: 0 0 2.4mm; }

@media (max-width: 1100px) { .teklif-ekran.yedek { grid-template-columns: 1fr; } }

/* ---------- Yazdırma: yalnızca A4 sayfalar ---------- */
@media print {
  body[data-yazdir="teklif"] { overflow: visible !important; background: #fff !important; }
  body[data-yazdir="teklif"] .topbar, body[data-yazdir="teklif"] .sekmeler, body[data-yazdir="teklif"] .module-head, body[data-yazdir="teklif"] .tk-form, body[data-yazdir="teklif"] .tk-sag-bas, body[data-yazdir="teklif"] .tk-kalem, body[data-yazdir="teklif"] #bildirim { display: none !important; }
  body[data-yazdir="teklif"] #screen-app, body[data-yazdir="teklif"] .sekme-icerik, body[data-yazdir="teklif"] .view.active, body[data-yazdir="teklif"] .tab-body.active, body[data-yazdir="teklif"] .teklif-ekran, body[data-yazdir="teklif"] .tk-sag, body[data-yazdir="teklif"] .tk-sag-govde, body[data-yazdir="teklif"] .tk-pdf { display: block !important; position: static !important; overflow: visible !important; height: auto !important; padding: 0 !important; margin: 0 !important; background: #fff !important; }
  body[data-yazdir="teklif"] .tk-pdf-olcek { transform: none !important; height: auto !important; }
  body[data-yazdir="teklif"] .tk-a4 { box-shadow: none; margin: 0; page-break-after: always; break-after: page; }
  body[data-yazdir="teklif"] .tk-a4:last-child { page-break-after: auto; break-after: auto; }
  body[data-yazdir="teklif"] .tk-h.hata { outline: none; }
  @page { size: A4 portrait; margin: 0; }
}

@media (max-width: 1100px) { .teklif-ekran { grid-template-columns: 1fr; } .tk-sag { min-height: 600px; } }
