/* ============================================================================
 * Stabler · Modernist Tabler — paylaşılan tasarım katmanı
 * ----------------------------------------------------------------------------
 * Kaynak: Claude Design "Tender Panel Tasarım Geliştirmesi" (31.07.2026),
 *         dört ekran: Operasyon Masası · Direktör panosu · Tender CRM · BPM.
 *
 * TEMEL KARAR — bu dosyanın neden küçük olduğu:
 * Tasarım Tabler'ın KENDİ paletini kullanıyor (#206bc4 primary, #1a2234 sidebar,
 * #d63939 danger, #f6f8fb zemin). Yani renk sistemi Stabler'da zaten var.
 * Değişen üç şey: TİPOGRAFİ (Archivo), GEOMETRİ (kare köşe) ve YOĞUNLUK.
 * Bu yüzden burada yeni bir renk sistemi YOK — Tabler değişkenleri tüketiliyor.
 *
 * YAYILMA YARIÇAPI — opt-in:
 * Her şey `.stbl-ds` sarmalayıcısına scope'lu. Taşınmamış ekran hiçbir kural
 * görmez. Bir ekranı taşımak = kök elemana class="stbl-ds" eklemek.
 * `.stbl-ds` DIŞINA kural yazmak yasak (kaynak testi bunu korur).
 *
 * Yükleme sırası: Tabler → stabler.css → BU DOSYA.
 * ========================================================================== */

/* ── Tipografi · self-host, Google Fonts'a istek YOK ──────────────────────────
 * Archivo'da Kiril YOK (doğrulandı: @fontsource/archivo v5 = latin only).
 * Stabler ru + uzc sunuyor. Çözüm: Kiril aralığı Inter'e düşer — Inter zaten
 * Tabler'ın gövde yazı tipi, yani ru/uzc kullanıcısı yabancı bir aile görmez,
 * uygulamanın kendi tipografisini görür. unicode-range ile tarayıcı yalnızca
 * gerekli dosyayı indirir.
 * ------------------------------------------------------------------------- */
@font-face {
  font-family: "Stabler Display";
  src: url("../fonts/archivo-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: "Stabler Display";
  src: url("../fonts/inter-cyrillic-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Stabler Sans";
  src: url("../fonts/archivo-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: "Stabler Sans";
  src: url("../fonts/archivo-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: "Stabler Sans";
  src: url("../fonts/inter-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Stabler Sans";
  src: url("../fonts/inter-cyrillic-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ── Semantik katman ─────────────────────────────────────────────────────── */
.stbl-ds {
  /* renk — hepsi Tabler'dan, fallback'ler tasarımdan ölçülmüş değerler */
  --ds-bg:        var(--tblr-body-bg, #f6f8fb);
  --ds-surface:   var(--tblr-bg-surface, #ffffff);
  --ds-tx:        var(--tblr-body-color, #1d273b);
  --ds-tx2:       var(--tblr-secondary, #667382);
  /* Üçüncü kademe metin. Tabler'da karşılığı yok (--tblr-secondary ikinci
   * kademe, ondan sonrası tanımsız), bu yüzden sabit. Değer orijinal
   * tasarımın canlı render'ından ölçüldü: rgb(144,153,166). */
  --ds-tx3:       #9099a6;
  --ds-ln:        var(--tblr-border-color, #e3e5e8);
  --ds-ln2:       #c7ccd4;
  --ds-acc:       var(--tblr-primary, #206bc4);
  --ds-acc-tint:  #eef2f7;
  --ds-ink:       #1a2234;          /* sidebar / dolu alan */
  --ds-ink-2:     #162038;

  /* severity — üç kodlu taşınır: renk + biçim + etiket. Renk tek başına bilgi
     taşımaz (erişilebilirlik ve renk körlüğü gereği). */
  --ds-crit:      var(--tblr-danger, #d63939);
  --ds-crit-tx:   #b32424;
  --ds-crit-t:    #fbe7e7;
  --ds-today:     var(--tblr-orange, #f76707);
  /* Metin tonları. Orijinal tasarım KENAR için parlak Tabler rengini, METİN için
   * koyu kontrast varyantını kullanıyor — ölçülen değerler #9a4d06 ve #b32424.
   * Parlak turuncuyu beyaz üstünde metin olarak kullanmak 2.3:1 kontrast veriyor;
   * koyu varyant 7:1. Bu yüzden ayrı token: dolgu/kenar parlak, yazı koyu.
   *
   * Bu ikisi bilerek SABİT — katmandaki tek istisna. Tabler'ın kendi
   * --tblr-*-text-emphasis rampası kontrol edildi (1.0.0-beta20):
   *   · --tblr-danger-text-emphasis = #561717 — bordoya yakın; o rampa uyarı
   *     kutusu ZEMİNİ için üretilmiş, gövde metni için değil. Kullansak
   *     kritik sayılar neredeyse siyah çıkardı.
   *   · --tblr-orange-text-emphasis HİÇ TANIMLI DEĞİL — Tabler emphasis'i
   *     yalnız semantik set için üretiyor (primary/success/warning/danger…),
   *     orange gibi ham palet renkleri için değil.
   * Yani var() zinciri birinde yanlış değer, ötekinde hiç değer verirdi. */
  --ds-today-tx:  #9a4d06;
  --ds-today-t:   #fdf0e4;
  --ds-soon:      var(--tblr-primary, #206bc4);
  --ds-soon-t:    var(--ds-acc-tint);
  --ds-info:      #8b95a5;
  --ds-info-t:    #eef0f3;
  --ds-ok:        var(--tblr-green, #2fb344);

  /* tipografi */
  --ds-font:      "Stabler Sans", var(--tblr-font-sans-serif, Inter), system-ui, sans-serif;
  --ds-font-head: "Stabler Display", "Stabler Sans", var(--tblr-font-sans-serif, Inter), system-ui, sans-serif;
  --ds-mono:      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* geometri ve yoğunluk */
  --ds-gap:       12px;
  --ds-pad:       16px;
  --ds-radius:    0;

  background: var(--ds-bg);
  color: var(--ds-tx);
  font-family: var(--ds-font);
  font-size: 15px;
  line-height: 1.5;
}

/* Kutu modeli — katman kendi kendine yetmeli.
 * Tabler zaten global `border-box` veriyor, yani üretimde bu bir no-op.
 * Ama katmanın doğruluğu başka bir stylesheet'e bağlı olmamalı: onsuz
 * `width` + `border` toplanır ve ölçüler tasarımdan 2px kayar (drawer 542 → 544).
 */
.stbl-ds, .stbl-ds *, .stbl-ds *::before, .stbl-ds *::after { box-sizing: border-box; }

/* Kare köşe — Tabler'ın yarıçapını yalnızca bu kapsamda sıfırla. */
.stbl-ds .card, .stbl-ds .btn, .stbl-ds .form-control, .stbl-ds .form-select,
.stbl-ds .badge, .stbl-ds .alert, .stbl-ds .dropdown-menu, .stbl-ds .nav-link,
.stbl-ds .progress, .stbl-ds .input-group > * { border-radius: var(--ds-radius) !important; }

/* ── UA sıfırlama · katmanın kendi buton bileşenleri ─────────────────────────
 * Bu bileşenler <button> olarak render ediliyor. Tarayıcının varsayılan
 * `2px outset` kenarlığı sıfırlanmazsa kutular tasarımdakinden kalın görünür.
 * Sıfırlama YALNIZCA bu katmanın sınıflarına uygulanır — Tabler'ın .btn'ine
 * dokunulmaz. (Bu bir regresyon kaynağıydı: kenarlıklar 2px siyah çıkıyordu.)
 * ------------------------------------------------------------------------- */
.stbl-ds .ds-kpi, .stbl-ds .ds-stage, .stbl-ds .ds-row,
.stbl-ds .ds-band, .stbl-ds .ds-card { border-style: solid; border-color: var(--ds-ln); }

/* İkinci tarayıcı-varsayılanı tuzağı, kenarla aynı kökten: <button>'ın UA
 * stili `align-items: center` veriyor. Izgarada kısa olan kutu komşusu kadar
 * uzayınca içeriği dikeyde ortalanıyor ve iki kutu farklı hizada duruyor.
 *
 * `align-items: flex-start` YETMİYOR — ölçüldü: hesaplanan değer doğru
 * geliyor ama Chrome butonun içeriğini kendi anonim kutusunda ortalamayı
 * sürdürüyor; bu davranış standart bir özellikle kontrol edilmiyor. Tek
 * güvenilir yol kutuyu açıkça dikey flex yapmak.
 *
 * Yalnız bu ikisi: .ds-row ve .ds-band aşağıda kendi yerleşimlerini açıkça
 * veriyor (satır grid, bant yatay flex). Onları da buraya katmak, doğruluğu
 * kural SIRASINA bağlayan örtük bir bağımlılık olurdu. */
.stbl-ds .ds-kpi, .stbl-ds .ds-stage {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
}

/* ── Başlıklar ───────────────────────────────────────────────────────────── */
.stbl-ds h1, .stbl-ds h2, .stbl-ds h3, .stbl-ds .ds-h {
  font-family: var(--ds-font-head);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ds-tx);
  margin: 0;
}
.stbl-ds h1 { font-size: 38px; }
.stbl-ds h2 { font-size: 22px; }
.stbl-ds h3 { font-size: 16px; }

/* ── Mono etiket · sistemin imzası ───────────────────────────────────────────
 * Kayıt no, alan adı, pano kaynağı, kolon başlığı. ÇEVRİLMEZ — kaynak kimliği.
 * ------------------------------------------------------------------------- */
.stbl-ds .ds-label {
  font-family: var(--ds-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ds-tx3);
}
.stbl-ds .ds-mono { font-family: var(--ds-mono); font-size: 12.5px; color: var(--ds-tx2); }
.stbl-ds .ds-num  { font-family: var(--ds-mono); font-variant-numeric: tabular-nums; }

/* ── Sayfa başlığı ───────────────────────────────────────────────────────── */
.stbl-ds .ds-page-head { padding: 22px 0 18px; }
.stbl-ds .ds-page-head .ds-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--ds-tx2); margin-top: 6px;
}
.stbl-ds .ds-page-head .ds-meta > span + span::before {
  content: "|"; color: var(--ds-ln2); margin-right: 10px;
}

/* ── Modül üst navigasyonu ───────────────────────────────────────────────── */
.stbl-ds .ds-modnav {
  display: flex; align-items: center; gap: 4px;
  background: var(--ds-surface); border-bottom: 1px solid var(--ds-ln);
  padding: 0 var(--ds-pad); overflow-x: auto;
}
.stbl-ds .ds-modnav .ds-modnav-brand {
  font-family: var(--ds-font-head); font-weight: 800; font-size: 21px;
  padding-right: 20px; white-space: nowrap;
}
.stbl-ds .ds-modnav a {
  padding: 18px 14px; font-size: 14.5px; color: var(--ds-tx2);
  text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap;
}
.stbl-ds .ds-modnav a:hover { color: var(--ds-tx); }
.stbl-ds .ds-modnav a.active {
  color: var(--ds-tx); font-weight: 600; border-bottom-color: var(--ds-acc);
}

/* ── KPI şeridi ──────────────────────────────────────────────────────────────
 * Üst kenarda 3px anlam çubuğu; sayı mono ve büyük; altında sorgu kanıtı.
 * ------------------------------------------------------------------------- */
.stbl-ds .ds-kpis { display: grid; gap: 1px; background: var(--ds-ln); border: 1px solid var(--ds-ln); }
.stbl-ds .ds-kpis[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Üç sütun: altı sayaç taşıyan ekranlar (Direktör panosu) için 3×2.
 * Altısını tek sıraya dizmek kart başına ~200px bırakıyor; .ds-kpi-val
 * o genişlikte okunmuyor. */
.stbl-ds .ds-kpis[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stbl-ds .ds-kpi {
  background: var(--ds-surface); padding: 14px 16px 15px;
  border: 0; border-top: 3px solid var(--ds-ln2); text-align: left;
  font: inherit; color: inherit; cursor: pointer; min-height: 104px;
}
.stbl-ds .ds-kpi:hover { background: #fafbfc; }
.stbl-ds .ds-kpi[aria-pressed="true"] { background: var(--ds-ink); color: #fff; }
.stbl-ds .ds-kpi[aria-pressed="true"] .ds-kpi-note,
.stbl-ds .ds-kpi[aria-pressed="true"] .ds-label { color: rgba(255,255,255,.62); }
.stbl-ds .ds-kpi-val {
  font-family: var(--ds-mono); font-size: 34px; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -0.02em;
}
.stbl-ds .ds-kpi-cap { font-family: var(--ds-font-head); font-weight: 800; font-size: 15px; margin-left: 8px; }
.stbl-ds .ds-kpi-note { font-size: 12.5px; color: var(--ds-tx2); margin-top: 9px; }
.stbl-ds .ds-kpi[data-sev="crit"]  { border-top-color: var(--ds-crit); }
.stbl-ds .ds-kpi[data-sev="crit"]  .ds-kpi-val { color: var(--ds-crit-tx); }
.stbl-ds .ds-kpi[data-sev="today"] { border-top-color: var(--ds-today); }
.stbl-ds .ds-kpi[data-sev="today"] .ds-kpi-val { color: var(--ds-today-tx); }
.stbl-ds .ds-kpi[data-sev="soon"]  { border-top-color: var(--ds-soon); }
.stbl-ds .ds-kpi[data-sev="ok"]    { border-top-color: var(--ds-ok); }
.stbl-ds .ds-kpi[data-sev="ok"]    .ds-kpi-val { color: var(--ds-ok); }

/* ── Panel ───────────────────────────────────────────────────────────────── */
.stbl-ds .ds-panel { background: var(--ds-surface); border: 1px solid var(--ds-ln); }
.stbl-ds .ds-panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 14px var(--ds-pad); border-bottom: 1px solid var(--ds-ln);
}

/* ── Bant başlığı ────────────────────────────────────────────────────────── */
.stbl-ds .ds-band {
  display: flex; align-items: center; gap: 10px;
  padding: 8px var(--ds-pad); background: #fbfcfd; border: 0;
  border-top: 1px solid var(--ds-ln); border-bottom: 1px solid var(--ds-ln);
  font: inherit; width: 100%; text-align: left; cursor: pointer;
}
.stbl-ds .ds-band .ds-band-rule { flex: 1; height: 1px; background: var(--ds-ln); }
.stbl-ds .ds-band-note { font-size: 12.5px; color: var(--ds-tx2); }

/* Bant ve satır etiketinin rengi data-sev'den türer. Referans sayfası bunu
 * satır içi style ile yazmıştı; üretim şablonuna hex gömmemek için kural
 * hâline getirildi — kiracı teması değişince renk de değişsin. */
.stbl-ds .ds-band[data-sev="crit"]  .ds-label { color: var(--ds-crit-tx); }
.stbl-ds .ds-band[data-sev="today"] .ds-label { color: var(--ds-today-tx); }
.stbl-ds .ds-band[data-sev="soon"]  .ds-label { color: var(--ds-soon); }
.stbl-ds .ds-band[data-sev="info"]  .ds-label { color: var(--ds-info); }
.stbl-ds .ds-row[data-sev="crit"]  .ds-row-due { color: var(--ds-crit-tx); }
.stbl-ds .ds-row[data-sev="today"] .ds-row-due { color: var(--ds-today-tx); }
.stbl-ds .ds-row[data-sev="soon"]  .ds-row-due { color: var(--ds-soon); }
.stbl-ds .ds-row[data-sev="info"]  .ds-row-due { color: var(--ds-info); }

/* ── İş satırı · ekranın çekirdek bileşeni ───────────────────────────────────
 * Zorunlu beş bilgi: ne (title) · neden bugün (why) · kim (owner) · ne zaman
 * (due.rel + due.abs) · nereye gider (route). `why` boşsa satır RENDER EDİLMEZ.
 * ------------------------------------------------------------------------- */
.stbl-ds .ds-row {
  display: grid; grid-template-columns: 62px 1fr auto 26px;
  gap: 0 14px; align-items: start;
  padding: 14px var(--ds-pad); border: 0; border-bottom: 1px solid var(--ds-ln);
  width: 100%; text-align: left; font: inherit; color: inherit;
  background: transparent; cursor: pointer;
}
.stbl-ds .ds-row:last-child { border-bottom: 0; }
.stbl-ds .ds-row:hover { background: #fafbfc; }
.stbl-ds .ds-row:focus-visible { outline: 2px solid var(--ds-acc); outline-offset: -2px; }

/* severity işareti — kare + üç harfli etiket (renk tek başına değil) */
.stbl-ds .ds-sev { display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.stbl-ds .ds-sev i { width: 11px; height: 11px; flex: none; display: block; }
.stbl-ds .ds-sev span { font-family: var(--ds-mono); font-size: 10px; letter-spacing: .1em; }
.stbl-ds [data-sev="crit"]  .ds-sev i { background: var(--ds-crit); }
.stbl-ds [data-sev="crit"]  .ds-sev span { color: var(--ds-crit-tx); }
.stbl-ds [data-sev="today"] .ds-sev i { background: var(--ds-today); }
.stbl-ds [data-sev="today"] .ds-sev span { color: var(--ds-today-tx); }
.stbl-ds [data-sev="soon"]  .ds-sev i { border: 1.5px solid var(--ds-soon); }
.stbl-ds [data-sev="soon"]  .ds-sev span { color: var(--ds-soon); }
.stbl-ds [data-sev="info"]  .ds-sev i { border: 1px dotted var(--ds-info); }
.stbl-ds [data-sev="info"]  .ds-sev span { color: var(--ds-info); }

.stbl-ds .ds-row-title { font-family: var(--ds-font-head); font-weight: 800; font-size: 16px; line-height: 1.25; }
.stbl-ds .ds-row-why   { font-size: 13.5px; color: var(--ds-tx2); margin-top: 4px; }
.stbl-ds .ds-row-ev    { font-family: var(--ds-mono); font-size: 11.5px; color: var(--ds-tx3); margin-top: 7px; }
.stbl-ds .ds-row-right { text-align: right; font-size: 13px; white-space: nowrap; }
.stbl-ds .ds-row-owner { color: var(--ds-tx2); }
.stbl-ds .ds-row-owner[data-unassigned="true"] { color: var(--ds-crit-tx); }
.stbl-ds .ds-row-due   { font-family: var(--ds-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; }
.stbl-ds .ds-row-due-abs { font-family: var(--ds-mono); font-size: 11px; color: var(--ds-tx3); display: block; }
.stbl-ds .ds-row-go { color: var(--ds-tx3); align-self: center; font-size: 17px; }

/* lider satır — sıralamanın ilk kaydı; ayrı skor yok */
.stbl-ds .ds-row--lead {
  border-left: 3px solid var(--ds-crit); background: var(--ds-crit-t);
  padding: 18px var(--ds-pad) 18px 13px; grid-template-columns: 1fr auto;
}
.stbl-ds .ds-row--lead .ds-row-title { font-size: 24px; }
.stbl-ds .ds-row--lead[data-sev="today"] { border-left-color: var(--ds-today); background: var(--ds-today-t); }

/* ── Segment ölçer · "3/5 teklif toplandı" ───────────────────────────────────
 * need ≤ 12 ise kare dizisi, değilse yalnızca mono metin (spec kuralı).
 * ------------------------------------------------------------------------- */
.stbl-ds .ds-meter { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.stbl-ds .ds-meter-seg { display: flex; gap: 3px; }
.stbl-ds .ds-meter-seg i { width: 9px; height: 9px; display: block; border: 1px solid var(--ds-ln2); }
.stbl-ds .ds-meter-seg i[data-on="1"] { background: var(--ds-today); border-color: var(--ds-today); }
.stbl-ds .ds-meter[data-full="1"] .ds-meter-seg i[data-on="1"] { background: var(--ds-ok); border-color: var(--ds-ok); }
.stbl-ds .ds-meter-txt { font-family: var(--ds-mono); font-size: 11.5px; color: var(--ds-tx2); }

/* ── Dolu karar kutusu ───────────────────────────────────────────────────── */
.stbl-ds .ds-fill { background: var(--ds-acc); color: #fff; padding: 20px var(--ds-pad); }
.stbl-ds .ds-fill .ds-label { color: rgba(255,255,255,.7); }
.stbl-ds .ds-fill h2, .stbl-ds .ds-fill .ds-h { color: #fff; }
.stbl-ds .ds-fill p { color: rgba(255,255,255,.88); font-size: 13.5px; margin: 8px 0 0; }
.stbl-ds .ds-fill .ds-fill-n { font-family: var(--ds-mono); font-size: 40px; font-weight: 600; line-height: 1; }

/* ── Yük çubukları ───────────────────────────────────────────────────────── */
.stbl-ds .ds-load { display: flex; align-items: center; gap: 12px; padding: 11px var(--ds-pad); }
.stbl-ds .ds-load-name { flex: 1; font-size: 13.5px; }
.stbl-ds .ds-load-bar { flex: none; width: 100%; height: 4px; background: var(--ds-ln); margin-top: 6px; }
.stbl-ds .ds-load-bar i { display: block; height: 100%; background: var(--ds-acc); }
.stbl-ds .ds-load[data-warn="1"] .ds-load-name { color: var(--ds-crit-tx); font-weight: 600; }
.stbl-ds .ds-load[data-warn="1"] .ds-load-bar i { background: var(--ds-crit); }
.stbl-ds .ds-load-n { font-family: var(--ds-mono); font-variant-numeric: tabular-nums; font-size: 13px; }

/* ── 7 günlük şerit ──────────────────────────────────────────────────────── */
.stbl-ds .ds-week { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.stbl-ds .ds-week-day { padding: 10px 8px 11px; border-left: 1px solid var(--ds-ln); }
.stbl-ds .ds-week-day:first-child { border-left: 0; }
.stbl-ds .ds-week-day[data-today="1"] { background: var(--ds-crit-t); }
.stbl-ds .ds-week-day[data-quiet="1"] { opacity: .55; }
.stbl-ds .ds-week-n { font-family: var(--ds-mono); font-size: 17px; font-weight: 600; }

/* ── Kanban (Tender CRM) ─────────────────────────────────────────────────── */
.stbl-ds .ds-kanban { display: flex; gap: var(--ds-gap); align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.stbl-ds .ds-col { flex: 0 0 268px; background: var(--ds-surface); border: 1px solid var(--ds-ln); }
.stbl-ds .ds-col-head {
  display: flex; align-items: baseline; gap: 9px;
  padding: 12px 14px; border-top: 3px solid var(--ds-ln2); border-bottom: 1px solid var(--ds-ln);
}
.stbl-ds .ds-col-head .ds-col-n { font-family: var(--ds-mono); font-size: 17px; font-weight: 600; }
.stbl-ds .ds-col-head .ds-col-t { font-family: var(--ds-font-head); font-weight: 800; font-size: 15px; flex: 1; }
.stbl-ds .ds-col-rule { padding: 6px 14px; border-bottom: 1px solid var(--ds-ln); }
.stbl-ds .ds-card { padding: 13px 14px; border-bottom: 1px solid var(--ds-ln); cursor: pointer; }
.stbl-ds .ds-card:last-child { border-bottom: 0; }
.stbl-ds .ds-card:hover { background: #fafbfc; }
.stbl-ds .ds-card-t { font-family: var(--ds-font-head); font-weight: 800; font-size: 14.5px; line-height: 1.3; }
.stbl-ds .ds-card-id { font-family: var(--ds-mono); font-size: 11px; color: var(--ds-acc); margin-top: 5px; }
.stbl-ds .ds-card-org { font-size: 12.5px; color: var(--ds-tx2); margin-top: 5px; }
.stbl-ds .ds-card-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.stbl-ds .ds-progress { height: 3px; background: var(--ds-ln); margin-top: 4px; }
.stbl-ds .ds-progress i { display: block; height: 100%; background: var(--ds-acc); }

/* ── Tablo ───────────────────────────────────────────────────────────────── */
.stbl-ds .ds-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stbl-ds .ds-table th {
  font-family: var(--ds-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ds-tx3); font-weight: 400; text-align: left;
  padding: 9px var(--ds-pad); border-bottom: 1px solid var(--ds-ln2); background: #fbfcfd;
}
.stbl-ds .ds-table td { padding: 11px var(--ds-pad); border-bottom: 1px solid var(--ds-ln); }
.stbl-ds .ds-table tbody tr:hover { background: #fafbfc; }
/* Sayılar asla sarmaz: "316 800 000 / UZS" diye ikiye bölünen bir tutar
 * okunmuyor. Tablo dar ekranda kendi içinde yatay kayar. */
.stbl-ds .ds-table .ds-td-num {
  text-align: right; font-family: var(--ds-mono);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stbl-ds .ds-table a { color: var(--ds-acc); font-family: var(--ds-mono); font-size: 12px; text-decoration: none; }

/* ── Çip / rozet — mono, kare, sessiz ────────────────────────────────────── */
.stbl-ds .ds-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--ds-mono); font-size: 10.5px; letter-spacing: .06em;
  padding: 3px 7px; border: 1px solid var(--ds-ln2); color: var(--ds-tx2); background: #fff;
  /* Çip asla sarmaz — "Deadline / near" diye ikiye bölünen bir etiket
   * satır yüksekliğini bozuyor ve okunmuyor. */
  white-space: nowrap;
}
.stbl-ds .ds-chip::before { content: ""; width: 7px; height: 7px; flex: none; background: currentColor; }
.stbl-ds .ds-chip[data-tone="crit"]  { color: var(--ds-crit-tx);  border-color: var(--ds-crit);  background: var(--ds-crit-t); }
.stbl-ds .ds-chip[data-tone="today"] { color: var(--ds-today-tx); border-color: var(--ds-today); background: var(--ds-today-t); }
.stbl-ds .ds-chip[data-tone="ok"]    { color: var(--ds-ok);    border-color: var(--ds-ok);    background: #e8f7ea; }
.stbl-ds .ds-chip[data-tone="soon"]  { color: var(--ds-soon);  border-color: var(--ds-soon);  background: var(--ds-soon-t); }

/* ── Kontroller ──────────────────────────────────────────────────────────── */
.stbl-ds .ds-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--ds-font-head); font-weight: 800; font-size: 14px;
  min-height: 40px; padding: 9px 15px; cursor: pointer;
  border: 1px solid var(--ds-ln2); background: #fff; color: var(--ds-tx);
}
.stbl-ds .ds-btn:hover { background: #f4f6f9; }
.stbl-ds .ds-btn--primary { background: var(--ds-acc); border-color: var(--ds-acc); color: #fff; }
.stbl-ds .ds-btn--primary:hover { background: #1b5ca8; }
.stbl-ds .ds-btn:focus-visible { outline: 2px solid var(--ds-acc); outline-offset: 2px; }
.stbl-ds .ds-seg { display: inline-flex; border: 1px solid var(--ds-ln2); }
.stbl-ds .ds-seg button {
  font: inherit; font-size: 14px; padding: 9px 16px; min-height: 40px;
  background: #fff; border: 0; cursor: pointer; color: var(--ds-tx2);
}
.stbl-ds .ds-seg button[aria-pressed="true"] { background: var(--ds-ink); color: #fff; font-weight: 600; }
.stbl-ds .ds-input {
  font: inherit; font-size: 14px; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--ds-ln2); background: #fff; color: var(--ds-tx); width: 100%;
}
.stbl-ds .ds-input:focus { outline: 2px solid var(--ds-acc); outline-offset: -1px; }

/* ── Durumlar ────────────────────────────────────────────────────────────── */
.stbl-ds .ds-empty { padding: 42px var(--ds-pad); text-align: center; color: var(--ds-tx2); }
.stbl-ds .ds-empty[data-tone="ok"] { color: var(--ds-ok); }
.stbl-ds .ds-skel { background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 50%, #eef0f3 75%);
  background-size: 200% 100%; animation: ds-shimmer 1.3s linear infinite; height: 13px; }
@keyframes ds-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .stbl-ds .ds-skel { animation: none; } }

/* ── Dar ekran ───────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .stbl-ds .ds-kpis[data-cols="4"],
  .stbl-ds .ds-kpis[data-cols="3"] { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stbl-ds h1 { font-size: 28px; }
  .stbl-ds .ds-row { grid-template-columns: 54px 1fr 22px; }
  .stbl-ds .ds-row-right { grid-column: 2; text-align: left; margin-top: 8px; white-space: normal; }
  .stbl-ds .ds-row--lead .ds-row-title { font-size: 20px; }
}

/* ============================================================================
 * Direktör panosu — 02-direktor-panosu.html karşılıkları
 * Eklenen bileşenler: aşama grubu · aşama hücresi · huni satırı · kayıp satırı.
 * Renkler yine Tabler'dan; yeni değişken tanımlanmadı.
 * ========================================================================== */

/* KPI'nın sorgu ayağı — "sayı neyi saydığını söyler" kuralı */
.stbl-ds .ds-kpi-q {
  font-family: var(--ds-mono); font-size: 10.5px; color: var(--ds-tx3);
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--ds-ln);
}
.stbl-ds .ds-kpi[data-sev="neutral"] { border-top-color: var(--ds-tx); }

/* ── Aşama grubu · koyu bant ─────────────────────────────────────────────── */
.stbl-ds .ds-stage-group {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ds-tx); color: #fff; padding: 7px 14px;
}
.stbl-ds .ds-stage-group .ds-label { color: rgba(255,255,255,.72); }
.stbl-ds .ds-stage-group .ds-stage-count {
  font-family: var(--ds-mono); font-size: 10.5px; color: rgba(255,255,255,.72);
}

/* ── Aşama hücreleri ─────────────────────────────────────────────────────── */
.stbl-ds .ds-stage-grid {
  display: grid; gap: 1px; background: var(--ds-ln);
  border-bottom: 1px solid var(--ds-ln);
}
.stbl-ds .ds-stage-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0,1fr)); }
.stbl-ds .ds-stage-grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0,1fr)); }
.stbl-ds .ds-stage-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stbl-ds .ds-stage {
  background: var(--ds-surface); padding: 14px 16px 15px; border: 0;
  text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%;
}
.stbl-ds .ds-stage:hover { background: #fafbfc; }
.stbl-ds .ds-stage:focus-visible { outline: 2px solid var(--ds-acc); outline-offset: -2px; }
.stbl-ds .ds-stage-n {
  font-family: var(--ds-mono); font-size: 26px; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.stbl-ds .ds-stage-t { font-family: var(--ds-font-head); font-weight: 800; font-size: 15px; margin-left: 8px; }
.stbl-ds .ds-stage-rule { font-family: var(--ds-mono); font-size: 10.5px; color: var(--ds-tx3); margin-top: 9px; }
.stbl-ds .ds-stage[data-tone="ok"]   .ds-stage-n { color: var(--ds-ok); }
.stbl-ds .ds-stage[data-tone="crit"] .ds-stage-n { color: var(--ds-crit-tx); }
.stbl-ds .ds-stage[data-tone="mute"] .ds-stage-n { color: var(--ds-tx3); }

/* ── Dönüşüm hunisi ──────────────────────────────────────────────────────── */
.stbl-ds .ds-funnel-row {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 14px;
  align-items: center; padding: 11px var(--ds-pad); border-bottom: 1px solid var(--ds-ln);
}
.stbl-ds .ds-funnel-row:last-child { border-bottom: 0; }
.stbl-ds .ds-funnel-n {
  font-family: var(--ds-mono); font-size: 19px; font-weight: 600;
  font-variant-numeric: tabular-nums; text-align: right;
}
.stbl-ds .ds-funnel-t { font-size: 14.5px; }
.stbl-ds .ds-funnel-bar { height: 9px; background: var(--ds-ln); margin-top: 6px; }
.stbl-ds .ds-funnel-bar i { display: block; height: 100%; background: var(--ds-tx); }
.stbl-ds .ds-funnel-row[data-tone="ok"] .ds-funnel-n { color: var(--ds-ok); }
.stbl-ds .ds-funnel-row[data-tone="ok"] .ds-funnel-bar i { background: var(--ds-ok); }
.stbl-ds .ds-funnel-meta { text-align: right; font-size: 12px; color: var(--ds-tx2); white-space: nowrap; }
.stbl-ds .ds-funnel-drop { font-family: var(--ds-mono); font-size: 11.5px; color: var(--ds-crit-tx); display: block; }
.stbl-ds .ds-funnel-foot {
  display: flex; align-items: baseline; gap: 12px; padding: 13px var(--ds-pad);
  background: var(--ds-acc-tint); border-top: 1px solid var(--ds-ln);
}
.stbl-ds .ds-funnel-foot .ds-funnel-n { color: var(--ds-acc); font-size: 22px; }

/* ── "Nerede kaybediyoruz" ───────────────────────────────────────────────────
 * Huni düşüşünün gerekçesi. Sayı negatif ve mono; başlık altında kanıt satırı.
 * ------------------------------------------------------------------------- */
.stbl-ds .ds-loss {
  display: grid; grid-template-columns: 46px 1fr; gap: 14px;
  padding: 13px var(--ds-pad); border-bottom: 1px solid var(--ds-ln);
}
.stbl-ds .ds-loss:last-child { border-bottom: 0; }
.stbl-ds .ds-loss-n {
  font-family: var(--ds-mono); font-size: 19px; font-weight: 600;
  color: var(--ds-crit-tx); text-align: right; font-variant-numeric: tabular-nums;
}
.stbl-ds .ds-loss[data-tone="today"] .ds-loss-n { color: var(--ds-today-tx); }
.stbl-ds .ds-loss-t { font-family: var(--ds-font-head); font-weight: 800; font-size: 14.5px; }
.stbl-ds .ds-loss-why { font-size: 13px; color: var(--ds-tx2); margin-top: 4px; }
.stbl-ds .ds-loss-ev { font-family: var(--ds-mono); font-size: 11px; color: var(--ds-tx3); margin-top: 6px; }

/* ── Panel altbilgisi — kaynak beyanı ────────────────────────────────────── */
.stbl-ds .ds-panel-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--ds-pad); border-top: 1px solid var(--ds-ln);
  font-family: var(--ds-mono); font-size: 10.5px; color: var(--ds-tx3);
}

@media (max-width: 992px) {
  .stbl-ds .ds-stage-grid[data-cols="3"],
  .stbl-ds .ds-stage-grid[data-cols="4"] { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ============================================================================
 * Formlar ve yandan kayan panel (drawer)
 * Kaynak: "Satis Siparisi Formu" + "Tender CRM" (drawer açık hâli).
 * Ölçüler orijinal render'dan alındı: kontrol 44px · pad 10/12 · kenar 1px
 * #c7ccd4 · drawer 542px · sol kenar 2px #1a2234 · backdrop rgba(24,36,51,.42)
 * ========================================================================== */

/* ── Numaralı form bölümü ────────────────────────────────────────────────── */
.stbl-ds .ds-form-section { background: var(--ds-surface); border: 1px solid var(--ds-ln); margin-bottom: 14px; }
.stbl-ds .ds-form-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px var(--ds-pad); border-bottom: 1px solid var(--ds-ln); background: #fbfcfd;
}
.stbl-ds .ds-form-body { padding: var(--ds-pad); }
.stbl-ds .ds-form-grid { display: grid; gap: 14px var(--ds-gap); }
.stbl-ds .ds-form-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0,1fr)); }
.stbl-ds .ds-form-grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0,1fr)); }

/* ── Alan · etiket + kontrol + ipucu ─────────────────────────────────────────
 * İpucu satırı dekoratif değil: alanın hangi kuralı taşıdığını söyler
 * ("limit 400 000 000 · borç yok · vade 30 gün"). Tasarımın imzası budur.
 * ------------------------------------------------------------------------- */
.stbl-ds .ds-field { min-width: 0; }
.stbl-ds .ds-field > label,
.stbl-ds .ds-field-label {
  display: block; font-family: var(--ds-mono); font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ds-tx3); margin-bottom: 6px;
}
.stbl-ds .ds-field-req { color: var(--ds-crit-tx); }
.stbl-ds .ds-field-hint { font-family: var(--ds-mono); font-size: 11px; color: var(--ds-tx3); margin-top: 6px; }
.stbl-ds .ds-field-err  { font-size: 12px; color: var(--ds-crit-tx); margin-top: 6px; }
.stbl-ds .ds-input[aria-invalid="true"] { border-color: var(--ds-crit); }
.stbl-ds textarea.ds-input { min-height: 80px; resize: vertical; }

/* ── Adet sayacı ─────────────────────────────────────────────────────────── */
.stbl-ds .ds-stepper { display: inline-flex; border: 1px solid var(--ds-ln2); background: #fff; }
.stbl-ds .ds-stepper button {
  width: 38px; min-height: 42px; border: 0; background: #fff; cursor: pointer;
  font: inherit; font-size: 16px; color: var(--ds-tx2);
}
.stbl-ds .ds-stepper button:hover { background: #f4f6f9; }
.stbl-ds .ds-stepper input {
  width: 56px; min-height: 42px; border: 0; border-left: 1px solid var(--ds-ln);
  border-right: 1px solid var(--ds-ln); text-align: center; font-family: var(--ds-mono);
  font-size: 14px; font-variant-numeric: tabular-nums;
}

/* ── Birim (UOM) seçici ──────────────────────────────────────────────────── */
.stbl-ds .ds-uom { display: inline-flex; border: 1px solid var(--ds-ln2); }
.stbl-ds .ds-uom button {
  min-height: 42px; padding: 8px 16px; border: 0; background: #fff; cursor: pointer;
  font-family: var(--ds-font-head); font-weight: 800; font-size: 13.5px; color: var(--ds-tx2);
}
.stbl-ds .ds-uom button[aria-pressed="true"] { background: var(--ds-ink); color: #fff; }
.stbl-ds .ds-uom-note { font-family: var(--ds-mono); font-size: 10.5px; color: var(--ds-tx3); margin-top: 6px; }

/* ── Kalem satırı · stok uygunluk ────────────────────────────────────────── */
.stbl-ds .ds-avail { font-family: var(--ds-mono); font-size: 11px; display: flex; align-items: center; gap: 7px; }
.stbl-ds .ds-avail::before { content: ""; width: 9px; height: 9px; flex: none; background: var(--ds-ok); }
.stbl-ds .ds-avail[data-short="1"] { color: var(--ds-crit-tx); }
.stbl-ds .ds-avail[data-short="1"]::before { background: var(--ds-crit); }
.stbl-ds .ds-avail-bar { height: 3px; background: var(--ds-ln); margin-top: 5px; }
.stbl-ds .ds-avail-bar i { display: block; height: 100%; background: var(--ds-ok); }

/* ── Özet paneli ─────────────────────────────────────────────────────────── */
.stbl-ds .ds-summary-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px var(--ds-pad); font-size: 14px;
}
.stbl-ds .ds-summary-row .ds-num { font-size: 14px; }
.stbl-ds .ds-summary-row[data-total="1"] {
  border-top: 1px solid var(--ds-ln2); padding-top: 12px; padding-bottom: 12px;
}
.stbl-ds .ds-summary-row[data-total="1"] .ds-num { font-size: 21px; font-weight: 600; }
.stbl-ds .ds-summary-row[data-total="1"] > span:first-child {
  font-family: var(--ds-font-head); font-weight: 800; font-size: 16px;
}

/* ============================================================================
 * Drawer — yandan kayan panel
 * Kart/satır tıklanınca açılır. Sayfa yeniden yüklenmez, bağlam kaybolmaz.
 * Erişilebilirlik: role="dialog" aria-modal="true"; Esc kapatır ve odak
 * tetikleyen öğeye döner; açıkken odak panel içinde tutulur (focus trap).
 * ========================================================================== */
.stbl-ds .ds-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(24, 36, 51, .42); z-index: 40;
  border: 0; padding: 0; cursor: pointer;
}
.stbl-ds .ds-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41;
  width: 542px; max-width: 100vw; background: var(--ds-surface);
  border-left: 2px solid var(--ds-ink);
  box-shadow: -12px 0 32px rgba(24, 36, 51, .18);
  display: flex; flex-direction: column; overflow: hidden;
}
.stbl-ds .ds-drawer[data-size="lg"] { width: 760px; }
.stbl-ds .ds-drawer[data-size="sm"] { width: 420px; }
.stbl-ds .ds-drawer-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px var(--ds-pad) 16px; border-bottom: 1px solid var(--ds-ln);
}
.stbl-ds .ds-drawer-kicker { font-family: var(--ds-mono); font-size: 11px; color: var(--ds-acc); }
.stbl-ds .ds-drawer-title { font-family: var(--ds-font-head); font-weight: 800; font-size: 22px; line-height: 1.2; margin-top: 6px; }
.stbl-ds .ds-drawer-close {
  flex: none; width: 34px; height: 34px; border: 1px solid var(--ds-ln2);
  background: #fff; cursor: pointer; font-size: 15px; color: var(--ds-tx2); line-height: 1;
}
.stbl-ds .ds-drawer-close:hover { background: #f4f6f9; }
.stbl-ds .ds-drawer-body { flex: 1; overflow-y: auto; }
.stbl-ds .ds-drawer-foot {
  padding: 14px var(--ds-pad); border-top: 1px solid var(--ds-ln);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

/* ── Tanım listesi — drawer'ın gövdesi ───────────────────────────────────── */
.stbl-ds .ds-deflist { width: 100%; border-collapse: collapse; }
.stbl-ds .ds-deflist th {
  width: 148px; text-align: left; vertical-align: top;
  font-family: var(--ds-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ds-tx3); font-weight: 400;
  padding: 11px var(--ds-pad); border-bottom: 1px solid var(--ds-ln); background: #fbfcfd;
}
.stbl-ds .ds-deflist td {
  font-size: 13.5px; padding: 11px var(--ds-pad); border-bottom: 1px solid var(--ds-ln);
}

/* ── Aşama ilerlemesi ────────────────────────────────────────────────────── */
.stbl-ds .ds-steps { display: flex; border: 1px solid var(--ds-ln); }
.stbl-ds .ds-step {
  flex: 1; min-width: 0; padding: 11px 8px; text-align: center;
  font-family: var(--ds-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ds-tx3); border-left: 1px solid var(--ds-ln); background: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stbl-ds .ds-step:first-child { border-left: 0; }
.stbl-ds .ds-step[aria-current="step"] { background: var(--ds-ink); color: #fff; }
.stbl-ds .ds-step[data-done="1"] { color: var(--ds-tx2); background: var(--ds-acc-tint); }

@media (max-width: 640px) {
  .stbl-ds .ds-drawer,
  .stbl-ds .ds-drawer[data-size="lg"],
  .stbl-ds .ds-drawer[data-size="sm"] { width: 100vw; border-left: 0; }
  .stbl-ds .ds-form-grid[data-cols="2"],
  .stbl-ds .ds-form-grid[data-cols="3"] { grid-template-columns: 1fr; }
  .stbl-ds .ds-deflist th { width: 118px; }
}

/* ============================================================================
 * Ölçüden miktar üreten satır modelleri + SO şablon seçimi
 * Kaynak: "SO Formu Varyantlari - Olcu ve UOM" (1A ve 1B).
 * Ölçüler orijinalden: ölçü girişi 38px · sağa hizalı · mono 13.5px ·
 * hesaplanan miktar 16px/600 mono · faturalanan #9a4d06.
 *
 * MODEL SEÇİMİ TENANT BAŞINA: her şirket farklı şablon kullanıyor. Şablon
 * satır giriş modelini VE görünen sütunları belirler; kalem verisi girildikten
 * sonra değiştirilmesi veri kaybı riski taşır (uyarı zorunlu).
 * ========================================================================== */

/* ── Şablon seçici ───────────────────────────────────────────────────────────
 * Radyo-kart: her seçenek ne yaptığını ve ne zaman doğru olduğunu yazar.
 * Salt görsel bir dropdown değil — yanlış şablon yanlış veri modeli demek.
 * ------------------------------------------------------------------------- */
.stbl-ds .ds-tpl { display: grid; gap: 1px; background: var(--ds-ln); border: 1px solid var(--ds-ln); }
.stbl-ds .ds-tpl[data-cols="3"] { grid-template-columns: repeat(3, minmax(0,1fr)); }
.stbl-ds .ds-tpl-opt {
  background: var(--ds-surface); padding: 14px 15px; text-align: left;
  border: 0; border-top: 3px solid transparent; font: inherit; color: inherit; cursor: pointer;
}
.stbl-ds .ds-tpl-opt:hover { background: #fafbfc; }
.stbl-ds .ds-tpl-opt[aria-pressed="true"] { border-top-color: var(--ds-acc); background: var(--ds-acc-tint); }
.stbl-ds .ds-tpl-opt[aria-pressed="true"] .ds-tpl-name { color: var(--ds-acc); }
.stbl-ds .ds-tpl-name { font-family: var(--ds-font-head); font-weight: 800; font-size: 15px; }
.stbl-ds .ds-tpl-when { font-size: 12.5px; color: var(--ds-tx2); margin-top: 5px; }
.stbl-ds .ds-tpl-rule { font-family: var(--ds-mono); font-size: 10.5px; color: var(--ds-tx3); margin-top: 8px; }
.stbl-ds .ds-tpl-scope {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px var(--ds-pad); background: #fbfcfd; border: 1px solid var(--ds-ln); border-top: 0;
  font-family: var(--ds-mono); font-size: 10.5px; color: var(--ds-tx3);
}

/* ── 1A · Ölçü sütunlu satır ─────────────────────────────────────────────── */
.stbl-ds .ds-dims { display: flex; gap: 10px; flex-wrap: wrap; }
.stbl-ds .ds-dim { min-width: 0; }
.stbl-ds .ds-dim-label {
  display: block; font-family: var(--ds-mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ds-tx3); margin-bottom: 5px;
}
.stbl-ds .ds-dim-input {
  min-height: 38px; width: 106px; padding: 8px 10px; text-align: right;
  font-family: var(--ds-mono); font-size: 13.5px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--ds-ln2); background: #fff; color: var(--ds-tx);
}
.stbl-ds .ds-dim-input[data-w="sm"] { width: 86px; }
.stbl-ds .ds-dim-input:focus { outline: 2px solid var(--ds-acc); outline-offset: -1px; }
.stbl-ds .ds-dim-note { font-family: var(--ds-mono); font-size: 10.5px; color: var(--ds-tx3); margin-top: 7px; }

/* hesaplanan miktar — kullanıcı yazmaz, sistem türetir; bu yüzden input değil */
.stbl-ds .ds-calc { text-align: right; }
.stbl-ds .ds-calc-val {
  font-family: var(--ds-mono); font-size: 16px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--ds-tx);
}
.stbl-ds .ds-calc-note { font-family: var(--ds-mono); font-size: 10.5px; color: var(--ds-tx3); margin-top: 4px; }

/* ── 1B · Kesim listeli kalem kartı ──────────────────────────────────────── */
.stbl-ds .ds-cut { background: var(--ds-surface); border: 1px solid var(--ds-ln); margin-bottom: 12px; }
.stbl-ds .ds-cut-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 13px var(--ds-pad); border-bottom: 1px solid var(--ds-ln);
}
.stbl-ds .ds-cut-name { font-family: var(--ds-font-head); font-weight: 800; font-size: 15px; }
.stbl-ds .ds-cut-table { width: 100%; border-collapse: collapse; }
.stbl-ds .ds-cut-table th {
  font-family: var(--ds-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ds-tx3); font-weight: 400; text-align: left;
  padding: 8px var(--ds-pad); border-bottom: 1px solid var(--ds-ln); background: #fbfcfd;
}
.stbl-ds .ds-cut-table td { padding: 9px var(--ds-pad); border-bottom: 1px solid var(--ds-ln); }
.stbl-ds .ds-cut-table .ds-cut-n {
  font-family: var(--ds-mono); font-size: 11.5px; color: var(--ds-tx3); width: 34px;
}
.stbl-ds .ds-cut-table .ds-cut-area {
  text-align: right; font-family: var(--ds-mono); font-size: 13.5px;
  font-variant-numeric: tabular-nums; width: 96px;
}
.stbl-ds .ds-cut-del {
  border: 0; background: none; cursor: pointer; color: var(--ds-tx3);
  font-size: 15px; width: 30px; line-height: 1;
}
.stbl-ds .ds-cut-del:hover { color: var(--ds-crit-tx); }
.stbl-ds .ds-cut-add {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px var(--ds-pad); border-bottom: 1px solid var(--ds-ln); flex-wrap: wrap;
}

/* net / faturalanan / tutar — üçü ayrı çünkü kesim payı ikisini ayırıyor */
.stbl-ds .ds-cut-foot { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.stbl-ds .ds-cut-foot > div { padding: 12px var(--ds-pad); border-left: 1px solid var(--ds-ln); }
.stbl-ds .ds-cut-foot > div:first-child { border-left: 0; }
.stbl-ds .ds-cut-foot .ds-cut-v {
  font-family: var(--ds-mono); font-size: 17px; font-weight: 600;
  font-variant-numeric: tabular-nums; margin-top: 4px;
}
.stbl-ds .ds-cut-foot [data-billed="1"] .ds-cut-v { color: #9a4d06; }

/* ── Hesap kuralları kutusu — formülü ekranda tut ────────────────────────── */
.stbl-ds .ds-formula {
  padding: 12px var(--ds-pad); border-top: 1px solid var(--ds-ln);
  font-size: 12.5px; color: var(--ds-tx2);
}
.stbl-ds .ds-formula code, .stbl-ds .ds-formula .ds-mono { color: var(--ds-tx); }

@media (max-width: 992px) {
  .stbl-ds .ds-tpl[data-cols="3"] { grid-template-columns: 1fr; }
  .stbl-ds .ds-cut-foot { grid-template-columns: 1fr; }
  .stbl-ds .ds-cut-foot > div { border-left: 0; border-top: 1px solid var(--ds-ln); }
  .stbl-ds .ds-cut-foot > div:first-child { border-top: 0; }
}

/* ============================================================================
 * Tender süreç akışı (BPM) — kulvarlı diyagram
 * Kaynak: "Tender BPM Workflow". Ölçüler orijinalden: kulvar 300px ·
 * düğüm 250×73 · üst kenar 3px · SLA dışı #d63939 · elmas 25×25 kenar 2px.
 *
 * YERLEŞİM KARARI — bilinçli sapma:
 * Orijinal tasarım düğümleri mutlak konumla yerleştiriyor (tasarım aracının
 * doğal çıktısı). Diyagramın kendisi SVG. Kulvar başlığı, düğüm, karar
 * kapısı, olay ve bağlayıcıların tamamı tek <svg> içinde çizilir — HTML/CSS
 * ızgarası yok. Sebep: dirsekli bağlayıcı, geri dönüş oku ve elmas kapı DOM'da
 * ancak taklit edilebiliyordu; SVG'de birebir çizilir.
 * SVG elle YAZILMAZ: tools/build_flow_svg.py içindeki LANES/NODES/GATES/EVENTS
 * verisinden üretilir. Üründe bu jeneratörün karşılığı Vue içinde aynı veriyi
 * API'den alır; koordinat elle tutulmaz.
 * Burada CSS'e düşen iş sadece çerçeve, kaydırma ve lejant.
 * ========================================================================== */

.stbl-ds .ds-flow { border: 1px solid var(--ds-ln); background: var(--ds-surface); overflow-x: auto; }

/* Diyagram sarmalayıcı. min-width, dar ekranda SVG'nin okunmaz hale gelecek
 * kadar küçülmesini engeller: küçülmek yerine .ds-flow içinde yatay kayar. */
.stbl-ds .ds-flow-svg { min-width: 1180px; }
.stbl-ds .ds-flow-svg > svg { display: block; width: 100%; height: auto; }

/* ── Lejant ──────────────────────────────────────────────────────────────── */
.stbl-ds .ds-flow-legend {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
  padding: 11px var(--ds-pad); border-top: 1px solid var(--ds-ln);
  font-family: var(--ds-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ds-tx3);
}
.stbl-ds .ds-flow-legend span { display: inline-flex; align-items: center; gap: 7px; }
/* Lejant örnekleri (tek kullanım yeri burası — diyagramın kendisi SVG). */
.stbl-ds .ds-diamond {
  width: 25px; height: 25px; border: 2px solid var(--ds-tx); transform: rotate(45deg);
  background: var(--ds-surface); flex: none;
}
.stbl-ds .ds-event {
  width: 44px; height: 44px; border: 2px solid var(--ds-tx); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex: none;
  font-family: var(--ds-mono); font-size: 15px; font-weight: 600; background: var(--ds-surface);
}
.stbl-ds .ds-lg-node { width: 18px; height: 3px; background: var(--ds-tx); display: block; }
.stbl-ds .ds-lg-loop { width: 18px; border-top: 1.5px dashed var(--ds-crit); display: block; }
.stbl-ds .ds-lg-sla  { width: 11px; height: 11px; background: var(--ds-crit); display: block; }

/* ── Adım performansı · SLA durumu ───────────────────────────────────────── */
.stbl-ds .ds-sla { font-family: var(--ds-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.stbl-ds .ds-sla[data-state="in"]     { color: var(--ds-ok); }
.stbl-ds .ds-sla[data-state="edge"]   { color: var(--ds-today-tx); }
.stbl-ds .ds-sla[data-state="out"]    { color: var(--ds-crit-tx); }
.stbl-ds .ds-wait { font-family: var(--ds-mono); font-variant-numeric: tabular-nums; }
.stbl-ds .ds-wait[data-state="edge"] { color: var(--ds-today-tx); }
.stbl-ds .ds-wait[data-state="out"]  { color: var(--ds-crit-tx); }

/* ── Süreç kuralı satırı ─────────────────────────────────────────────────── */
.stbl-ds .ds-rule {
  display: grid; grid-template-columns: 30px 1fr; gap: 13px;
  padding: 13px var(--ds-pad); border-bottom: 1px solid var(--ds-ln);
}
.stbl-ds .ds-rule:last-child { border-bottom: 0; }
.stbl-ds .ds-rule-icon { display: flex; justify-content: center; padding-top: 3px; }
.stbl-ds .ds-rule-t { font-family: var(--ds-font-head); font-weight: 800; font-size: 14.5px; }
.stbl-ds .ds-rule-b { font-size: 13px; color: var(--ds-tx2); margin-top: 5px; }

@media (max-width: 992px) {
  .stbl-ds .ds-flow-svg { min-width: 900px; }
}

/* ==========================================================================
 * KÖPRÜ — Tabler bileşenleri, taşınmış ekranların İÇİNDE
 *
 * Paylaşılan form bileşenleri (Select, DateInput, MoneyInput, Typeahead,
 * LineItemsEditor, FormPage) 93'e varan ekranda kullanılıyor. Onları
 * değiştirmek her formu aynı anda değiştirirdi ve göçün kademeli olma
 * garantisini yok ederdi.
 *
 * Bu yüzden bileşenlere HİÇ dokunulmuyor. Hepsi Tabler'ın .form-control /
 * .form-select tabanı üzerine kurulu; burada o sınıflar YALNIZCA .stbl-ds
 * altında yeniden giydiriliyor. Taşınmamış ekran tek bir kuralı bile
 * görmüyor — yayılma yarıçapı hâlâ sıfır.
 *
 * Bir form ekranını taşımak = kök elemana class="stbl-ds" eklemek.
 * ========================================================================== */

.stbl-ds .form-label {
  font-family: var(--ds-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ds-tx2); margin-bottom: 6px; font-weight: 400;
}
.stbl-ds .form-label.required::after,
.stbl-ds .form-label .required { color: var(--ds-crit-tx); }

.stbl-ds .form-control,
.stbl-ds .form-select {
  min-height: 44px; border: 1px solid var(--ds-ln2); border-radius: 0;
  background: var(--ds-surface); color: var(--ds-tx);
  font-family: var(--ds-font-body); font-size: 14px; padding: 10px 12px;
  box-shadow: none;
}
.stbl-ds .form-control:focus,
.stbl-ds .form-select:focus {
  border-color: var(--ds-acc); box-shadow: none;
  outline: 2px solid var(--ds-acc); outline-offset: -2px;
}
.stbl-ds .form-control::placeholder { color: var(--ds-tx3); }
.stbl-ds .form-control:disabled,
.stbl-ds .form-select:disabled { background: var(--ds-bg); color: var(--ds-tx3); }
.stbl-ds .form-control-sm,
.stbl-ds .form-select-sm { min-height: 34px; padding: 5px 9px; font-size: 12.5px; }

/* Tutar alanları hizalı okunmalı — MoneyInput zaten mono/sağa yaslı sınıf
 * veriyor, burada yalnız tablo rakamı gibi davranmasını sağlıyoruz. */
.stbl-ds .form-control.font-monospace {
  font-family: var(--ds-mono); font-variant-numeric: tabular-nums;
}

/* Girdi grubu: yuvarlak köşe yok, ek parça kenarı girdiyle aynı. */
.stbl-ds .input-group { border-radius: 0; }
.stbl-ds .input-group > .form-control,
.stbl-ds .input-group > .form-select { border-radius: 0; }
.stbl-ds .input-group-text {
  border: 1px solid var(--ds-ln2); border-radius: 0; background: var(--ds-bg);
  font-family: var(--ds-mono); font-size: 11.5px; color: var(--ds-tx2);
}

.stbl-ds .btn {
  border-radius: 0; font-family: var(--ds-font-body); font-weight: 600;
  font-size: 13.5px; min-height: 44px; padding: 10px 16px; box-shadow: none;
  border: 1px solid var(--ds-ln2); background: var(--ds-surface); color: var(--ds-tx);
}
.stbl-ds .btn:hover { background: #f4f6f9; }
.stbl-ds .btn-sm { min-height: 34px; padding: 6px 12px; font-size: 12.5px; }
.stbl-ds .btn-primary {
  background: var(--ds-acc); border-color: var(--ds-acc); color: #fff;
}
.stbl-ds .btn-primary:hover { background: #1b5aa6; border-color: #1b5aa6; }
.stbl-ds .btn-icon { padding: 6px; min-height: 34px; }
/* Hayalet ve bağlantı varyantları KENARSIZ kalır. Genel .btn kuralına kenar
 * verince satır içi ikon butonları (sil, taşı) boş kutulara dönüyordu —
 * ikonun etrafında çerçeve, tıklanacak şeyi gizliyor. */
.stbl-ds .btn-ghost-secondary,
.stbl-ds .btn-ghost-primary,
.stbl-ds .btn-ghost-danger,
.stbl-ds .btn-link {
  border-color: transparent; background: transparent;
}
.stbl-ds .btn-ghost-secondary:hover,
.stbl-ds .btn-ghost-primary:hover,
.stbl-ds .btn-ghost-danger:hover { background: #f4f6f9; border-color: transparent; }
.stbl-ds .btn-ghost-danger { color: var(--ds-crit-tx); }

/* Kart = panel. Gölge yok, köşe yok — katmanın tamamı böyle. */
.stbl-ds .card {
  border: 1px solid var(--ds-ln); border-radius: 0; box-shadow: none;
  background: var(--ds-surface);
}
.stbl-ds .card-header {
  border-bottom: 1px solid var(--ds-ln); background: var(--ds-surface);
  padding: 13px var(--ds-pad); min-height: 0;
}
.stbl-ds .card-title {
  font-family: var(--ds-font-head); font-weight: 800; font-size: 16px;
  color: var(--ds-tx); margin: 0;
}
.stbl-ds .card-body { padding: var(--ds-pad); }
.stbl-ds .card-footer {
  border-top: 1px solid var(--ds-ln); background: var(--ds-surface); padding: 12px var(--ds-pad);
}

.stbl-ds .table { font-size: 13.5px; margin-bottom: 0; }
.stbl-ds .table > thead > tr > th {
  font-family: var(--ds-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ds-tx2); font-weight: 400;
  border-bottom: 1px solid var(--ds-ln); background: var(--ds-surface);
  padding: 10px var(--ds-pad);
}
.stbl-ds .table > tbody > tr > td {
  padding: 11px var(--ds-pad); border-bottom: 1px solid var(--ds-ln); color: var(--ds-tx);
}
.stbl-ds .table > tbody > tr:hover > td { background: #fafbfc; }

/* Rozet = çip. Tabler'ın renk yardımcıları (bg-*-lt) korunuyor, yalnız
 * biçim ve tipografi katmana çekiliyor. */
.stbl-ds .badge {
  border-radius: 0; font-family: var(--ds-mono); font-size: 10.5px;
  letter-spacing: .06em; padding: 3px 7px; font-weight: 400;
}

.stbl-ds .alert {
  border-radius: 0; border: 1px solid; border-left-width: 3px;
  box-shadow: none; font-size: 13px; padding: 11px 14px;
}

/* Ölçüden miktar üreten kalem (Item.custom_dimension_mode = Linear/Area/Volume).
 * Motor zaten üretimde: _dimensions.py hesaplar, dimensions_hook.py kayıtta
 * yeniden hesaplar, LineItemsEditor girişleri çizer. Buradaki tek iş o
 * girişleri tasarımın diline getirmek — hesap kuralına dokunulmuyor.
 *
 * Dikey yığın yerine yatay: boy/en/adet yan yana okununca "2760 × 1000 × 6"
 * tek bir ölçü ifadesi gibi görünüyor, alt alta dizilince üç ayrı alan gibi. */
.stbl-ds .ds-dims { flex-direction: row !important; flex-wrap: wrap; gap: 6px !important; }
.stbl-ds .ds-dims > .form-control {
  flex: 1 1 62px; min-width: 62px; min-height: 34px;
  padding: 5px 8px; font-size: 12.5px; text-align: right;
}
/* Sonuç satırı tam genişlikte, altta: girdiler DEĞİŞKEN, bu ÇIKTI. */
.stbl-ds .ds-dims > .ds-calc {
  flex: 1 0 100%; font-family: var(--ds-mono); font-size: 11.5px;
  color: var(--ds-tx2); padding-top: 2px;
}
.stbl-ds .ds-dims > .ds-calc .font-monospace {
  font-family: var(--ds-mono); font-size: 13px; color: var(--ds-tx);
}
