/* yanteklif prototip — A4 belge sayfaları.
   Önizleme, PDF ve çıktı aynı HTML'den, aynı milimetre ölçüleriyle çizilir.
   Sayfa = üst bilgi (sabit yükseklik) + gövde (bloklar) + alt bilgi (sabit yükseklik).
   Sayfalama motoru (belge.js) blokları gövdeye sığacak şekilde böler; gövde asla taşmaz. */

.sayfa-kutu {
  width: calc(210mm * var(--olcek, 1));
  height: calc(297mm * var(--olcek, 1));
  flex: none;
  position: relative;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 10px 28px rgba(8, 48, 52, .14);
}
.sayfa-kutu > .sayfa { position: absolute; top: 0; left: 0; transform: scale(var(--olcek, 1)); transform-origin: 0 0; }

.sayfa {
  --renk: #00A87C;
  --renk-koyu: #00664B;
  --renk-acik: #EAF7F2;
  --renk-orta: #8FD5C0;
  --renk-uzeri: #1A2426;
  --yazi: "Inter", Arial, sans-serif;
  --ust-h: 32mm;
  --alt-h: 15mm;
  --kenar: 15mm;
  --kenar-sol: var(--kenar);
  width: 210mm;
  height: 297mm;
  box-sizing: border-box;
  background: #fff;
  color: #1A2426;
  font-family: var(--yazi);
  font-size: 9.3pt;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  font-variant-numeric: normal;
  text-rendering: geometricPrecision;
}
.sayfa *, .sayfa *::before, .sayfa *::after { box-sizing: border-box; }
.sayfa h1, .sayfa h2, .sayfa h3, .sayfa h4 { font-family: inherit; margin: 0; letter-spacing: normal; line-height: 1.2; text-wrap: initial; }
.sayfa p { margin: 0; }
.sayfa img { max-width: 100%; }
.sayfa table { border-spacing: 0; }

.sayfa-ust { flex: none; height: var(--ust-h); padding: 0 var(--kenar) 0 var(--kenar-sol); position: relative; z-index: 1; }
.sayfa-govde { flex: 1 1 0; min-height: 0; overflow: hidden; padding: 5mm var(--kenar) 0 var(--kenar-sol); position: relative; z-index: 1; }
.sayfa-alt {
  flex: none; height: var(--alt-h); padding: 0 var(--kenar) 0 var(--kenar-sol); position: relative; z-index: 1;
  display: flex; align-items: center; gap: 4mm; font-size: 6.8pt; color: #66777A; line-height: 1.3;
}
.sayfa-alt::before { content: ""; position: absolute; top: 2.5mm; left: var(--kenar-sol); right: var(--kenar); height: .25mm; background: #DCE3E1; }
.alt-firma { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5mm; }
.alt-firma > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alt-firma b { color: #34474A; font-weight: 600; }
.alt-sag { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.alt-sayfa { white-space: nowrap; font-weight: 700; color: #34474A; font-size: 7.4pt; }
.alt-yt { white-space: nowrap; color: #9AAAA7; font-size: 6.2pt; }

/* ---- Bloklar ---- */
.blok { display: flow-root; padding-bottom: 4.6mm; }
.blok.sik { padding-bottom: 2.2mm; }
.blok.bitisik { padding-bottom: 0; }

/* Belge başı (teklif) */
.b-bas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5mm; }
.b-belge-adi { font-size: 16pt; font-weight: 700; color: var(--renk-koyu); line-height: 1.12; letter-spacing: -.01em; }
.b-konu { font-size: 9.6pt; color: #4A5759; margin-top: 1mm; }
.b-ust-satir { display: flex; align-items: flex-end; justify-content: space-between; gap: 6mm; margin-bottom: 4mm; }
.b-musteri-logo { max-height: 13mm; max-width: 38mm; object-fit: contain; }
.b-kutu { border: .25mm solid #D8E0DE; border-radius: 2mm; padding: 3mm 3.6mm; min-width: 0; }
.b-kutu-baslik { font-size: 6.6pt; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; color: var(--renk-koyu); margin-bottom: 1.6mm; }
.b-taraf-ad { font-weight: 700; font-size: 9.8pt; line-height: 1.25; margin-bottom: .8mm; }
.b-taraf-satir { font-size: 8.2pt; color: #3E4C4E; overflow-wrap: anywhere; }
.b-bilgi-tablo { width: 100%; border-collapse: collapse; font-size: 8.2pt; }
.b-bilgi-tablo td { padding: .65mm 0; vertical-align: top; }
.b-bilgi-tablo td:first-child { color: #6A7A7C; padding-right: 3mm; white-space: nowrap; width: 1%; }
.b-bilgi-tablo td:last-child { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.b-kur-not { font-size: 7.2pt; color: #6A7A7C; margin-top: 1.4mm; line-height: 1.35; }

/* Bölüm başlığı */
.b-bolum { font-size: 7pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--renk-koyu); display: flex; align-items: center; gap: 3mm; }
.b-bolum::after { content: ""; flex: 1; height: .25mm; background: #D8E0DE; }

/* Kalem tablosu */
.b-tablo { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 8.3pt; }
.b-tablo th {
  background: var(--renk-dolgu, var(--renk)); color: #fff; font-weight: 600; text-align: left; padding: 1.9mm 1.8mm; font-size: 7pt;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1.25; vertical-align: bottom;
}
.b-tablo td { padding: 1.9mm 1.8mm; border-bottom: .2mm solid #E0E7E5; vertical-align: top; overflow-wrap: anywhere; }
.b-tablo tr.cift td { background: var(--renk-acik); }
.b-tablo .s { text-align: right; font-variant-numeric: tabular-nums; }
.b-tablo .o { text-align: center; }
.b-tablo .no { color: #7A8A8C; }
.kalem-ad { font-weight: 600; }
.kalem-acik { color: #67787A; font-size: 7.5pt; margin-top: .5mm; line-height: 1.35; }

/* Toplamlar */
.b-toplam { display: grid; grid-template-columns: minmax(0, 1fr) 74mm; gap: 6mm; align-items: start; }
.b-yaziyla { font-size: 7.8pt; color: #4A5759; line-height: 1.4; padding-top: 1mm; }
.b-yaziyla b { display: block; font-size: 6.6pt; letter-spacing: .09em; text-transform: uppercase; color: var(--renk-koyu); margin-bottom: .8mm; font-style: normal; }
.b-yaziyla .ifade { font-style: italic; }
.b-kdv-not { margin-top: 2.4mm; font-size: 7.6pt; color: #4A5759; }
.b-toplam-tablo { width: 100%; border-collapse: collapse; font-size: 8.6pt; }
.b-toplam-tablo td { padding: 1.05mm 0; }
.b-toplam-tablo td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.b-toplam-tablo td:first-child { color: #4A5759; }
.b-toplam-tablo tr.genel td { border-top: .45mm solid var(--renk); padding-top: 2.2mm; font-weight: 700; font-size: 11pt; color: var(--renk-koyu); }
.b-toplam-tablo tr.tl td { font-size: 7.8pt; color: #66777A; font-weight: 500; padding-top: .4mm; }

/* Madde ve metin */
.madde-baslik { font-weight: 700; font-size: 9.2pt; color: var(--renk-koyu); margin-bottom: 1.3mm; letter-spacing: .01em; }
.madde p { text-align: justify; margin: 0 0 1.7mm; }
.madde p:last-child { margin-bottom: 0; }
.madde p.bent { padding-left: 5mm; text-indent: -5mm; }
.madde p.devam { text-indent: 0; }
.sayfa-kutu[data-tasma] { outline: 3px solid #B23A27; outline-offset: 2px; }
.madde.bolunmus p:last-child { text-align-last: justify; }
.madde.duz p { text-align: left; }
.b-sozlesme-bas { text-align: center; padding: 1mm 8mm 0; }
.b-sozlesme-bas h1 { font-size: 13.5pt; font-weight: 700; color: var(--renk-koyu); letter-spacing: .02em; text-transform: uppercase; line-height: 1.25; }
.b-sozlesme-bas .alt { font-size: 7.8pt; color: #66777A; margin-top: 1.6mm; }
.b-gorsel { text-align: center; }
.b-gorsel img { display: block; margin: 0 auto; max-height: 110mm; object-fit: contain; border-radius: 1mm; }
.b-gorsel figcaption { font-size: 7.4pt; color: #66777A; margin-top: 1.4mm; }

/* Banka hesapları */
.b-banka { width: 100%; border-collapse: collapse; font-size: 8.1pt; table-layout: fixed; }
.b-banka th { text-align: left; font-size: 6.6pt; letter-spacing: .08em; text-transform: uppercase; color: #6A7A7C; font-weight: 700; padding: 0 1.6mm 1.2mm 0; border-bottom: .25mm solid #D8E0DE; }
.b-banka td { padding: 1.5mm 1.6mm 1.5mm 0; border-bottom: .2mm solid #E6ECEA; overflow-wrap: anywhere; }
.b-banka .iban { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; font-size: 7.9pt; letter-spacing: .02em; font-weight: 500; }

/* İmza ve kaşe */
.imza-satir { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8mm; }
.imza-hucre { display: flex; flex-direction: column; gap: .9mm; font-size: 8.2pt; min-width: 0; }
.imza-hucre.gizli { visibility: hidden; }
.imza-taraf { font-size: 6.6pt; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--renk-koyu); }
.imza-firma { font-weight: 600; font-size: 8.3pt; line-height: 1.3; height: 2.6em; overflow: hidden; }
.imza-alan { height: 31mm; position: relative; overflow: hidden; border-radius: 1.6mm; }
.imza-hucre.kutulu .imza-alan { border: .3mm solid #B6C4C1; }
.imza-hucre:not(.kutulu) .imza-alan { border-bottom: .3mm dotted #B6C4C1; border-radius: 0; }
.imza-alan .kase-img { position: absolute; top: 2.2mm; left: 2.2mm; width: calc(100% - 4.4mm); height: calc(100% - 4.4mm); object-fit: contain; mix-blend-mode: multiply; transform: rotate(-2.5deg); }
.imza-alan .imza-img { position: absolute; left: 50%; top: 50%; width: 58%; height: 74%; transform: translate(-40%, -46%); object-fit: contain; mix-blend-mode: multiply; }
.imza-alan .bos-yazi { position: absolute; inset: 0; display: grid; place-items: center; color: #A4B2AF; font-size: 7.2pt; text-align: center; padding: 2mm; }
.imza-ad { font-weight: 600; font-size: 8.4pt; }
.imza-unvan { color: #67787A; font-size: 7.6pt; }
.e-onay {
  position: absolute; inset: 2.2mm; border: .45mm solid #0E8A62; border-radius: 1.6mm; color: #0D6A4C; background: rgba(0, 168, 124, .05);
  display: flex; flex-direction: column; justify-content: center; gap: .5mm; padding: 1.5mm 3mm; font-size: 6.7pt; line-height: 1.3;
}
.e-onay b { font-size: 7.6pt; letter-spacing: .05em; }
.e-onay .ozet { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; font-size: 6pt; color: #3f7f69; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---- Görünüm stilleri ---- */
.ust-logo { height: 14mm; width: auto; max-width: 56mm; object-fit: contain; object-position: left center; display: block; }
.ust-marka { flex: none; display: flex; align-items: center; min-width: 0; }
.ust-bilgi { flex: 1 1 auto; min-width: 0; font-size: 6.9pt; line-height: 1.42; color: #4D5E60; }
.ust-bilgi b { color: #1A2426; font-weight: 700; font-size: 7.7pt; }
.ust-bilgi > div { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.ust-bilgi.orta { flex: none; text-align: center; max-width: 160mm; }
.ust-ayrac { margin: 0 1.2mm; opacity: .6; }
.ust-no { font-weight: 700; }
.ust-unvan-yazi { font-weight: 700; font-size: 12pt; color: var(--renk-koyu); }
.ust-belge { flex: none; text-align: right; display: flex; flex-direction: column; gap: .8mm; }
.ust-belge .tur { font-size: 15pt; font-weight: 800; letter-spacing: .14em; color: var(--renk-koyu); line-height: 1; }
.ust-belge .no { font-size: 7.8pt; color: #5A6B6D; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 1. Klasik */

/* 2. Modern bant */
.st-modern { --ust-h: 32mm; }
.st-modern .sayfa-alt::before { height: .6mm; background: var(--renk); }

/* 3. Kurumsal şerit */
.st-kurumsal { --ust-h: 34mm; }
.st-kurumsal .b-tablo th { background: var(--renk-koyu); }

/* 4. Yalın */
.st-yalin { --ust-h: 25mm; }
.st-yalin .b-tablo th { background: none; color: var(--renk-koyu); border-bottom: .5mm solid var(--renk); padding-left: 0; }
.st-yalin .b-tablo td { padding-left: 0; }
.st-yalin .b-tablo tr.cift td { background: none; }
.st-yalin .b-kutu { border: 0; border-top: .25mm solid #D8E0DE; border-radius: 0; padding: 2.2mm 0 0; }

/* 5. Antetli kâğıt: üst ve alt boşluk antet için boş kalır */
.ust-antet-no { font-size: 7.8pt; font-weight: 600; color: #34474A; letter-spacing: .04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-antetli .sayfa-alt { justify-content: flex-end; }
.st-antetli .sayfa-alt::before { display: none; }
.antet-arka { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; z-index: 0; pointer-events: none; }

/* Renkli zemin üstündeki yazı rengi (açık logo renklerinde koyu yazı) */
.b-tablo th { color: #fff; }

/* Teklif bilgileri şeridi */
.b-serit { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: .25mm solid #D8E0DE; border-radius: 2mm; margin-top: 3mm; }
.b-serit > div { padding: 1.8mm 2.6mm; border-left: .25mm solid #E3E9E7; min-width: 0; }
.b-serit > div:first-child { border-left: 0; }
.b-serit span { display: block; font-size: 6.2pt; letter-spacing: .08em; text-transform: uppercase; color: #6A7A7C; font-weight: 700; }
.b-serit b { display: block; font-size: 8.3pt; font-weight: 600; overflow-wrap: anywhere; }

/* ---- Yeni görünümler ---- */
/* 6. Çerçeveli: sayfa kenarında ince çift çerçeve, ortalanmış başlık */
.st-cerceve { --ust-h: 39mm; --alt-h: 20mm; --kenar: 17mm; }
.st-cerceve::before { content: ""; position: absolute; inset: 7mm; border: .55mm solid var(--renk); border-radius: 1.2mm; z-index: 0; pointer-events: none; }
.st-cerceve::after { content: ""; position: absolute; inset: 8.4mm; border: .2mm solid var(--renk); border-radius: .8mm; z-index: 0; pointer-events: none; }
.st-cerceve .sayfa-alt { justify-content: center; align-items: flex-start; padding-top: 3.5mm; text-align: center; }
.st-cerceve .sayfa-alt::before { left: 40%; right: 40%; top: 1.5mm; background: var(--renk); }
.st-cerceve .alt-firma { flex: none; max-width: 150mm; align-items: center; }
.st-cerceve .alt-sag { align-items: center; }
.st-cerceve .b-tablo th { background: var(--renk-acik); color: var(--renk-koyu); border-bottom: .4mm solid var(--renk); }
.st-cerceve .madde-baslik { text-align: center; border-bottom: .25mm solid var(--renk-orta); padding-bottom: 1mm; margin-bottom: 1.8mm; }

/* 7. Resmî: ortada unvan, çift çizgi, ortalı madde başlıkları */
.st-resmi { --ust-h: 38mm; }
.st-resmi .sayfa-alt { justify-content: center; text-align: center; }
.st-resmi .alt-firma { flex: none; max-width: 150mm; align-items: center; }
.st-resmi .alt-sag { align-items: center; }
.st-resmi .madde-baslik { text-align: center; letter-spacing: .06em; color: #1A2426; }
.st-resmi .b-tablo th { background: none; color: var(--renk-koyu); border-top: .45mm solid var(--renk-koyu); border-bottom: .45mm solid var(--renk-koyu); }
.st-resmi .b-tablo tr.cift td { background: none; }
.st-resmi .b-kutu { border-color: var(--renk-orta); border-radius: 0; }
.st-resmi .b-sozlesme-bas h1 { letter-spacing: .08em; }

/* 8. Köşe: sağ üstte eğik renk bloğu */
.st-kose { --ust-h: 33mm; }
.st-kose::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46mm; height: 3.2mm; background: linear-gradient(75deg, var(--renk) 0, var(--renk) 41mm, transparent 41.2mm); z-index: 2; }
.st-kose .madde-baslik { display: flex; align-items: center; gap: 2mm; }
.st-kose .madde-baslik::before { content: ""; width: 2.4mm; height: 2.4mm; background: var(--renk); transform: rotate(45deg); flex: none; }

/* 9. Kart: üstte renkli zeminli bilgi kartı, yuvarlak tablo başlığı */
.st-kart { --ust-h: 37mm; }
.st-kart .b-tablo th { background: var(--renk-koyu); color: #fff; }
.st-kart .b-tablo th:first-child { border-radius: 1.6mm 0 0 1.6mm; }
.st-kart .b-tablo th:last-child { border-radius: 0 1.6mm 1.6mm 0; }
.st-kart .b-kutu { background: #FAFCFB; border-color: #E3E9E7; border-radius: 3mm; }
.st-kart .madde-baslik { display: inline-block; background: var(--renk-koyu); color: #fff; padding: .9mm 2.6mm; border-radius: 1.4mm; }
.st-kart .b-serit { background: var(--renk-acik); border-color: transparent; border-radius: 3mm; }
.st-kart .b-serit > div { border-left-color: var(--renk-orta); }

/* Var olan görünümlerde madde başlığı farkları */
.st-modern .madde-baslik { background: var(--renk-acik); padding: 1.1mm 2.6mm; border-radius: 1.4mm; }
.st-kurumsal .madde-baslik { color: var(--renk-koyu); }
.st-yalin .madde-baslik { color: #1A2426; font-weight: 600; letter-spacing: .07em; font-size: 8.3pt; }
.st-yalin .b-serit { border: 0; border-top: .25mm solid #D8E0DE; border-bottom: .25mm solid #D8E0DE; border-radius: 0; }

/* ---- Küçük önizleme ve ölçüm alanı ---- */
.kucuk-sayfa { pointer-events: none; }
.olcum-alani { position: fixed; left: -12000px; top: 0; width: 210mm; height: 297mm; visibility: hidden; pointer-events: none; z-index: -1; contain: strict; }
.olcum-alani .sayfa { position: relative; transform: none; }

/* ---- Yazdırma: yalnızca sayfalar, 1:1 ölçek ---- */
#yazdir-alani { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  html, body { height: auto !important; background: #fff !important; padding: 0 !important; margin: 0 !important; }
  body > *:not(#yazdir-alani) { display: none !important; }
  #yazdir-alani { display: block !important; }
  #yazdir-alani .sayfa-kutu {
    --olcek: 1; width: 210mm !important; height: 297mm !important; box-shadow: none !important; margin: 0 !important;
    overflow: hidden; break-after: page; page-break-after: always;
  }
  #yazdir-alani .sayfa-kutu:last-child { break-after: auto; page-break-after: auto; }
  #yazdir-alani .sayfa { transform: none !important; }
  #yazdir-alani .antet-arka.yazdirma { display: none; }
}

/* 10. Ortadan bölünmüş: sayfa iki eşit sütun; üst bilginin sağ yarısı renkli, ortada ince çizgi, altta sağ yarıda renk şeridi */
.st-bolunmus { --ust-h: 38mm; --sutun-ara: 10mm; }
.st-bolunmus .sayfa-govde { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--sutun-ara); }
.st-bolunmus .sayfa-govde::before { content: ""; position: absolute; left: 50%; top: 5mm; bottom: 3mm; width: .3mm; margin-left: -.15mm; background: var(--renk-orta); }
.st-bolunmus .sutun { min-width: 0; }
.st-bolunmus .sayfa-alt::after { content: ""; position: absolute; left: 50%; right: 0; bottom: 0; height: 2.2mm; background: var(--renk); }
.st-bolunmus .b-bas { grid-template-columns: minmax(0, 1fr); gap: 3mm; }
.st-bolunmus .b-ust-satir { gap: 3mm; }
.st-bolunmus .b-serit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-bolunmus .b-serit > div { border-left: 0; border-top: .25mm solid #E3E9E7; }
.st-bolunmus .b-serit > div:nth-child(-n+2) { border-top: 0; }
.st-bolunmus .b-serit > div:nth-child(even) { border-left: .25mm solid #E3E9E7; }
.st-bolunmus .b-serit > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.st-bolunmus .b-toplam { grid-template-columns: minmax(0, 1fr); gap: 3mm; }
.st-bolunmus .b-toplam-tablo { order: -1; }
.st-bolunmus .b-tablo { font-size: 8pt; }
.st-bolunmus .b-banka { font-size: 7.2pt; }
.st-bolunmus .imza-satir { gap: 4mm; }
.st-bolunmus .madde-baslik { color: var(--renk-koyu); }
.kalem-hesap { color: #4A5A5C; font-size: 7.3pt; margin-top: .6mm; font-variant-numeric: tabular-nums; }
.b-banka-dar { font-size: 7.6pt; border: .25mm solid #D8E0DE; border-radius: 2mm; overflow: hidden; }
.b-banka-dar .hesap-adi { padding: 1.4mm 2.4mm; background: #F4F7F6; color: #4A5A5C; font-size: 7pt; }
.b-banka-dar .hesap { padding: 1.6mm 2.4mm; border-top: .25mm solid #E3E9E7; }
.b-banka-dar .iban { font-family: "IBM Plex Mono", monospace; font-size: 7.8pt; margin-top: .4mm; letter-spacing: .02em; white-space: nowrap; }
.b-banka-dar .pb { color: #67787A; font-weight: 600; }
/* Yarım sayfa sütunda iki yana yaslama kelime arasında boşluk açar (Türkçe heceleme yok): sola yaslı */
.st-bolunmus .madde p { text-align: left; }
.st-bolunmus .madde.bolunmus p:last-child { text-align-last: auto; }

/* ================= Üst bilgi tasarımları =================
   Logo her zaman beyaz zeminde ve çerçevesiz; renkli dolgunun üstündeki yazı beyaz.
   Belge türü, numarası ve tarihi her görünümde, her sayfada yazar. */
.ust-meta { display: grid; grid-template-columns: auto auto; column-gap: 2.6mm; row-gap: .4mm; justify-content: end; align-items: baseline; font-size: 7.8pt; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ust-meta span { font-size: 6pt; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; opacity: .72; text-align: right; }
.ust-meta b { font-weight: 700; text-align: right; }

/* 1. Klasik: logo ve bilgiler alt alta, sağda büyük belge adı, altta kalın-ince çift çizgi */
.st-klasik { --ust-h: 38mm; }

/* 2. Modern: sayfa genişliğinde renkli bant (beyaz belge adı ve numara); logo bandın altında beyaz zeminde */
.st-modern { --ust-h: 38mm; }

/* 3. Kurumsal: sağda sayfanın üst kenarından inen renkli belge paneli */
.st-kurumsal { --ust-h: 38mm; }

/* 4. Yalın: çizgisiz, ince ve aralıklı büyük harfli belge adı */
.st-yalin { --ust-h: 30mm; }

/* 5. Çerçeveli: ortalı; logo, süslemeli ayraç, iki satır firma bilgisi, aralıklı belge satırı */
.st-cerceve { --ust-h: 42mm; }
.ust-susleme { display: flex; align-items: center; gap: 2mm; width: 46mm; }
.ust-susleme::before, .ust-susleme::after { content: ""; flex: 1; height: .25mm; background: var(--renk); }
.ust-susleme i { width: 1.8mm; height: 1.8mm; background: var(--renk); transform: rotate(45deg); flex: none; }

/* 6. Resmî: ortalı ünvan, çift çizgi, altında resmî yazışma düzeni (Sayı · belge türü · Tarih) */
.st-resmi { --ust-h: 40mm; }
.ust-cift-cizgi { align-self: stretch; height: 1.7mm; border-top: .35mm solid var(--renk-koyu); border-bottom: .9mm solid var(--renk-koyu); margin-top: .8mm; flex: none; }
.ust-resmi-satir { align-self: stretch; display: flex; justify-content: space-between; align-items: baseline; font-size: 8pt; color: #34474A; font-variant-numeric: tabular-nums; }
.ust-resmi-satir .tur { font-size: 7.4pt; font-weight: 700; letter-spacing: .32em; color: var(--renk-koyu); }

/* 7. Köşe: sağ üstte eğik renkli blok, içinde beyaz belge adı, numara ve tarih */
.st-kose { --ust-h: 35mm; }

/* 8. Kart: açık renkli kart; sağda renkli etiket içinde beyaz belge adı ve numara */
.st-kart { --ust-h: 38mm; }

/* 9. Antetli: antet boşluğu korunur, belge numarası her zaman yazar */
.st-antetli .sayfa-ust { display: flex; align-items: flex-end; justify-content: flex-end; padding-bottom: 2mm; background: none; }

/* 10. Ortadan bölünmüş: sol yarı beyaz (logo ve bilgiler), sağ yarı iki tonlu etiket.
   Izgara satırları: üst boşluk · logo ile belge adı (aynı hizada) · bilgiler · koyu şerit (numara ve tarih) */
.st-bolunmus { --ust-h: 40mm; }
.st-bolunmus .sayfa-ust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 7mm auto minmax(0, 1fr) 10mm; padding: 0; }
.st-bolunmus .bol-zemin { display: block; grid-column: 2; grid-row: 1 / 4; background: var(--renk-dolgu); }
.st-bolunmus .bol-koyu { display: block; grid-column: 2; grid-row: 4; background: var(--renk-koyu); }
.st-bolunmus .sayfa-ust::after { content: ""; position: absolute; left: var(--kenar-sol); right: 50%; bottom: 0; height: .6mm; background: var(--renk-koyu); }
.st-bolunmus .ust-marka { grid-column: 1; grid-row: 2; align-self: center; padding: 0 8mm 0 var(--kenar-sol); }
.st-bolunmus .ust-logo { height: 13mm; }
.st-bolunmus .bol-baslik { grid-column: 2; grid-row: 2; align-self: center; color: #fff; padding: 0 var(--kenar) 0 9mm; display: flex; flex-direction: column; gap: 1.6mm; min-width: 0; }
.st-bolunmus .bol-baslik .tur { font-size: 21pt; font-weight: 800; letter-spacing: .18em; line-height: 1; }
.st-bolunmus .bol-konu { font-size: 8.6pt; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-bolunmus .ust-bilgi { grid-column: 1; grid-row: 3 / 5; align-self: start; padding: 2.6mm 8mm 0 var(--kenar-sol); }
.st-bolunmus .bol-meta { grid-column: 2; grid-row: 4; align-self: center; color: #fff; display: flex; align-items: baseline; gap: 2mm; padding: 0 var(--kenar) 0 9mm; font-size: 7.8pt; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 0; }
.st-bolunmus .bol-meta span { font-size: 6pt; letter-spacing: .14em; font-weight: 600; opacity: .78; text-transform: uppercase; }
.st-bolunmus .bol-meta b { font-weight: 700; margin-right: 5mm; }

/* ================= Teklif şablonlarının üst kısımları =================
   Ortak kural (kullanıcının seçtiği C düzeni gibi): logo üst kenara yapışmaz ve belge adıyla aynı hizada durur;
   konu belge adının altında; numara ve tarih ayrı bir satırda; renkli alanda yazı beyaz. */
.ust-konu { font-size: 8.6pt; line-height: 1.3; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ust-metasatir { display: flex; align-items: baseline; gap: 1.8mm; font-size: 7.8pt; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ust-metasatir span { font-size: 6pt; letter-spacing: .14em; font-weight: 600; text-transform: uppercase; opacity: .75; }
.ust-metasatir b { font-weight: 700; margin-right: 4mm; }
.ust-metasatir b:last-child { margin-right: 0; }
.ust-sol { display: flex; flex-direction: column; gap: 2.2mm; min-width: 0; }
.ust-sol .ust-logo { height: 13mm; }

/* Teklif 1 · Köşe: eğik renkli köşe (belge adı ve konu), altında aynı eğimle koyu şerit (numara ve tarih) */
.st-kose { --ust-h: 38mm; }
.st-kose .sayfa-ust { display: block; padding: 0; }
.st-kose .ust-sol { position: absolute; left: var(--kenar-sol); top: 7mm; right: 106mm; }
.st-kose .kose-sekil { position: absolute; top: 0; right: 0; width: 100mm; height: 27mm; background: linear-gradient(105deg, transparent 0, transparent 13mm, var(--renk-dolgu) 13.2mm); color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 1.8mm; padding: 0 var(--kenar) 0 24mm; text-align: right; }
.st-kose .kose-sekil .tur { font-size: 19pt; font-weight: 800; letter-spacing: .18em; line-height: 1; }
.st-kose .kose-sekil .ust-konu { max-width: 66mm; opacity: .92; }
.st-kose .kose-serit { position: absolute; top: 27mm; right: 0; width: 100mm; height: 9mm; background: linear-gradient(105deg, transparent 0, transparent 6mm, var(--renk-koyu) 6.2mm); color: #fff; display: flex; align-items: center; justify-content: flex-end; padding-right: var(--kenar); }

/* Teklif 2 · Klasik: üst kenarda renk çizgisi; sağda büyük belge adı, italik konu; altta kalın-ince çift çizgi */
.st-klasik { --ust-h: 41mm; }
.st-klasik .sayfa-ust { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; padding-top: 8mm; padding-bottom: 5mm; }
.st-klasik .sayfa-ust::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2.4mm; background: var(--renk); }
.st-klasik .sayfa-ust::after { content: ""; position: absolute; left: var(--kenar-sol); right: var(--kenar); bottom: 0; height: 1.9mm; border-top: .9mm solid var(--renk); border-bottom: .25mm solid var(--renk-orta); }
.st-klasik .ust-sol { flex: 1 1 auto; }
.st-klasik .ust-belge { flex: none; max-width: 84mm; align-items: flex-end; gap: 1.4mm; }
.st-klasik .ust-belge .tur { font-size: 24pt; font-weight: 700; letter-spacing: .14em; color: var(--renk-koyu); line-height: 13mm; }
.st-klasik .ust-konu { font-style: italic; font-size: 9.2pt; color: #4A5A5C; max-width: 84mm; }
.st-klasik .ust-metasatir { color: #34474A; margin-top: .6mm; }

/* Teklif 3 · Kurumsal: sayfanın üst kenarından inen iki tonlu panel (üstte belge adı ve konu, altta numara ve tarih) */
.st-kurumsal { --ust-h: 38mm; }
.st-kurumsal .sayfa-ust { display: block; padding: 0; }
.st-kurumsal .sayfa-ust::after { content: ""; position: absolute; left: var(--kenar-sol); right: calc(var(--kenar) + 76mm); bottom: 0; height: .25mm; background: #CBD6D3; }
.st-kurumsal .ust-sol { position: absolute; left: var(--kenar-sol); top: 6mm; right: calc(var(--kenar) + 78mm); }
.st-kurumsal .ust-panel { position: absolute; top: 0; right: var(--kenar); width: 72mm; height: 34mm; display: grid; grid-template-rows: minmax(0, 1fr) 9mm; border-radius: 0 0 2.4mm 2.4mm; overflow: hidden; color: #fff; }
.st-kurumsal .ust-panel-ust { background: var(--renk-dolgu); display: flex; flex-direction: column; justify-content: center; gap: 1.6mm; padding: 0 5.5mm; min-width: 0; }
.st-kurumsal .ust-panel-ust .tur { font-size: 18pt; font-weight: 800; letter-spacing: .16em; line-height: 1; }
.st-kurumsal .ust-panel-ust .ust-konu { opacity: .92; }
.st-kurumsal .ust-panel-alt { background: var(--renk-koyu); display: flex; align-items: center; padding: 0 5.5mm; min-width: 0; }

/* Teklif 4 · Yalın: renksiz; ince ve geniş aralıklı büyük belge adı, altında konu ve numara; altta tek ince çizgi */
.st-yalin { --ust-h: 36mm; }
.st-yalin .sayfa-ust { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; padding-top: 8mm; padding-bottom: 4mm; }
.st-yalin .sayfa-ust::after { content: ""; position: absolute; left: var(--kenar-sol); right: var(--kenar); bottom: 0; height: .2mm; background: #1A2426; }
.st-yalin .ust-sol { flex: 1 1 auto; }
.st-yalin .ust-sol .ust-logo { height: 11mm; }
.st-yalin .ust-belge { flex: none; max-width: 88mm; align-items: flex-end; gap: 1.2mm; }
.st-yalin .ust-belge .tur { font-size: 22pt; font-weight: 200; letter-spacing: .42em; margin-right: -.42em; color: #1A2426; line-height: 11mm; }
.st-yalin .ust-konu { color: #4A5A5C; }
.st-yalin .ust-metasatir { color: #1A2426; }

/* ================= Sözleşme şablonlarının üst kısımları (teklif şablonlarıyla aynı kurallar) =================
   Bilgiler alt alta; logo belge adıyla aynı hizada ve üst kenara yapışmaz; renkli alanda yazı beyaz; numara ve tarih ayrı satırda. */
.ust-bilgi.orta > div { -webkit-line-clamp: 1; }

/* Sözleşme 1 · Kart: yuvarlak köşeli kart; solda açık zeminde logo ve bilgiler, sağda iki tonlu etiket */
.st-kart { --ust-h: 44mm; }
.st-kart .sayfa-ust { padding: 0; }
.st-kart .ust-kart { position: absolute; left: var(--kenar-sol); right: var(--kenar); top: 7mm; height: 33mm; border-radius: 3.6mm; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 74mm; background: var(--renk-acik); }
.st-kart .kart-sol { display: flex; flex-direction: column; gap: 1.8mm; padding: 6mm 6mm 0 5.5mm; min-width: 0; }
.st-kart .kart-sol .ust-logo { height: 11mm; }
.st-kart .kart-sag { display: grid; grid-template-rows: minmax(0, 1fr) 9mm; color: #fff; min-width: 0; }
.st-kart .kart-ust { background: var(--renk-dolgu); display: flex; flex-direction: column; justify-content: center; gap: 1.6mm; padding: 0 6mm; min-width: 0; }
.st-kart .kart-ust .tur { font-size: 17pt; font-weight: 800; letter-spacing: .16em; line-height: 1; }
.st-kart .kart-ust .ust-konu { opacity: .92; }
.st-kart .kart-alt { background: var(--renk-koyu); display: flex; align-items: center; padding: 0 6mm; min-width: 0; }

/* Sözleşme 2 · Çerçeveli: ortalı; logo, alt alta bilgiler, süslemeli ayraç, aralıklı belge adı, numara ve tarih */
.st-cerceve { --ust-h: 50mm; }
.st-cerceve .sayfa-ust { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1.6mm; padding-bottom: 3.4mm; text-align: center; }
.st-cerceve .ust-marka { justify-content: center; margin-bottom: .6mm; }
.st-cerceve .ust-logo { height: 10mm; object-position: center; }
.st-cerceve .ust-tur-orta { font-size: 11pt; letter-spacing: .4em; margin-right: -.4em; text-transform: uppercase; color: var(--renk-koyu); font-weight: 700; line-height: 1; }
.st-cerceve .ust-metasatir { color: #34474A; }
.st-cerceve .cerceve-satir { align-self: stretch; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6mm; padding: 0 4mm; }
.st-cerceve .cerceve-satir .ust-metasatir:first-child { justify-self: start; }
.st-cerceve .cerceve-satir .ust-metasatir:last-child { justify-self: end; }

/* Sözleşme 4 · Resmî: ortalı logo, büyük harfli ünvan ve alt alta bilgiler, çift çizgi, altında Sayı · belge türü · Tarih */
.st-resmi { --ust-h: 45mm; }
.st-resmi .sayfa-ust { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1.4mm; padding-bottom: 2.4mm; text-align: center; }
.st-resmi .ust-marka { justify-content: center; margin-bottom: .6mm; }
.st-resmi .ust-logo { height: 10mm; object-position: center; }
.st-resmi .ust-bilgi.orta > div:first-child b { font-size: 8.8pt; letter-spacing: .14em; text-transform: uppercase; color: var(--renk-koyu); }

/* Sözleşme 5 · Modern: sayfa genişliğinde renkli bant (belge adı, konu, numara ve tarih beyaz); logo ve bilgiler bandın altında */
.st-modern { --ust-h: 44mm; }
.st-modern .sayfa-ust { display: flex; flex-direction: column; padding: 0; }
.st-modern .ust-bant { flex: none; height: 17mm; background: var(--renk-dolgu); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 8mm; padding: 0 var(--kenar) 0 var(--kenar-sol); }
.st-modern .ust-bant-sol { display: flex; align-items: baseline; gap: 4mm; min-width: 0; }
.st-modern .ust-bant .tur { font-size: 16pt; font-weight: 800; letter-spacing: .24em; line-height: 1; flex: none; }
.st-modern .ust-bant .ust-konu { opacity: .9; }
.st-modern .ust-bant .ust-metasatir span { opacity: .8; }
.st-modern .ust-alt { flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8mm; padding: 5mm var(--kenar) 0 var(--kenar-sol); }
.st-modern .ust-alt .ust-logo { height: 12mm; }
.st-modern .ust-alt .ust-bilgi { flex: 0 1 auto; text-align: right; }
.st-modern .sayfa-ust::after { content: ""; position: absolute; left: var(--kenar-sol); right: var(--kenar); bottom: 0; height: .5mm; background: var(--renk); }
