/* =========================================================================
   fb-datatable.css — merkezi _FbDataTable bileşeninin ortak stili
   (Pages/Partials/_FbDataTable.razor + wwwroot/js/fb-datatable.js)
   ========================================================================= */

/* ---- Grid yazı ölçeği (tek ayar) ----------------------------------------
   --fb-dt-fs-delta tüm grid metinlerini (hücre, başlık, düzenleme kutuları,
   filtre panelleri, sayfalama, rozetler) birlikte büyütür/küçültür.
   Popover'lar body'ye eklendiği için değişkenler :root üzerinde tanımlıdır.
   Kök yazı boyutu 13px (Metronic), yani 1px ≈ 0.077rem.                      */
:root {
    --fb-dt-fs-delta: 1px;

    --fb-dt-fs: calc(0.925rem + var(--fb-dt-fs-delta));    /* hücre metni (taban) */
    --fb-dt-fs-sm: calc(0.85rem + var(--fb-dt-fs-delta));  /* başlık, arama satırı, sayfalama, bilgi */
    --fb-dt-fs-md: calc(0.9rem + var(--fb-dt-fs-delta));   /* düzenleme kutuları, filtre/lookup panelleri */
    --fb-dt-fs-xs: calc(0.8rem + var(--fb-dt-fs-delta));   /* rozet, ipucu, hücre içi küçük ikon/metin */
    --fb-dt-fs-lg: calc(1rem + var(--fb-dt-fs-delta));     /* lookup temizle ikonu */
}


/* Arama kutusu: sabit genişlik, odakta büyümez (_Master'daki .search-input:focus kuralını ezer) */
.search-input.dt-search-fixed {
    width: 220px;
}

.search-input.dt-search-fixed:focus {
    width: 220px !important;
    box-shadow: none;
}

.fb-dt-header .dt-buttons .btn,
.fb-dt-header .card-title > .btn {
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Kapsayıcı */
.fb-dt {
    position: relative;
    font-size: var(--fb-dt-fs);
}

.fb-dt div.dt-container {
    padding: 0;
}

/* Başlık ve gövde tabloları aynı colgroup genişliklerini birebir uygulasın (hiza kayması olmasın) */
.fb-dt table.dataTable {
    margin: 0 !important;
    table-layout: fixed;
}

.fb-dt table.dataTable > thead > tr > th {
    position: relative;
    white-space: normal;
    overflow: hidden;
    vertical-align: middle;
    padding-top: 4px;
    padding-bottom: 4px;
    padding-left: 6px;
    font-size: var(--fb-dt-fs-sm);
    font-weight: 600;
    background-color: var(--bs-gray-100, #f9f9f9);
    border-bottom: 1px solid var(--bs-gray-300, #e1e3ea);
}

/* Filtre ikonu olan başlıkta sağda ikon + sıralama oku + tutamaç için yer ayrılır */
.fb-dt table.dataTable > thead > tr > th.dt-has-hf {
    padding-right: 30px;
}

/* Başlık metni ikonların üstüne binmesin; sığmazsa kelime bütünlüğü bozulmadan alt satıra kayar */
.fb-dt table.dataTable > thead > tr > th span.dt-column-title {
    display: block;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    line-height: 1.15;
}

.fb-dt table.dataTable > thead > tr.dt-hs-row > th {
    padding: 2px 4px;
}

/* Satır arka planı tr'de tanımlı: dondurulmuş hücreler bunu miras alır (opak), durum sınıfları (added/modified/...) da tr'de */
.fb-dt {
    --fb-dt-stripe-bg: #f6f8fb;
    --fb-dt-hover-bg: #e3eefc;
}

[data-bs-theme="dark"] .fb-dt {
    --fb-dt-stripe-bg: rgba(255, 255, 255, 0.025);
    --fb-dt-hover-bg: rgba(62, 151, 255, 0.14);
}

.fb-dt table.dataTable > tbody > tr {
    background-color: var(--bs-body-bg, #fff);
    transition: background-color 0.12s ease;
}

/* Zebra + hover tr'de: dondurulmuş hücreler (inherit) aynı rengi alır; td'de !important rengi olan
   durum satırları (iptal, aktif satır vb.) kendi rengini korur, seçili satırın gölgesi üstte kalır */
.fb-dt table.dataTable > tbody > tr:nth-child(even) {
    background-color: var(--fb-dt-stripe-bg);
}

.fb-dt table.dataTable > tbody > tr:hover {
    background-color: var(--fb-dt-hover-bg);
}

.fb-dt table.dataTable > tbody > tr > td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    padding: 2px 6px;
    border-right: 1px solid var(--bs-gray-200, #f1f1f2);
}

/* FixedColumns: dondurulmuş hücreler şeffaf kalmasın */
.fb-dt table.dataTable > tbody > tr > td.dtfc-fixed-start,
.fb-dt table.dataTable > tbody > tr > td.dtfc-fixed-end,
.fb-dt table.dataTable > tbody > tr > td.dtfc-fixed-left,
.fb-dt table.dataTable > tbody > tr > td.dtfc-fixed-right {
    background-color: inherit !important;
}

.fb-dt table.dataTable > tbody > tr > td.rev-row.dtfc-fixed-start,
.fb-dt table.dataTable > tbody > tr > td.rev-row.dtfc-fixed-end {
    background-color: #FFD65A !important;
}

.fb-dt table.dataTable > thead > tr > th.dtfc-fixed-start,
.fb-dt table.dataTable > thead > tr > th.dtfc-fixed-end,
.fb-dt table.dataTable > thead > tr > th.dtfc-fixed-left,
.fb-dt table.dataTable > thead > tr > th.dtfc-fixed-right {
    background-color: var(--bs-gray-100, #f9f9f9) !important;
}

.fb-dt table.dataTable > thead > tr.dt-hs-row > th.dtfc-fixed-start,
.fb-dt table.dataTable > thead > tr.dt-hs-row > th.dtfc-fixed-end {
    background-color: var(--bs-body-bg, #fff) !important;
}

/* Düzenlenebilir hücre: sağda ~8px boş şerit AutoFill tutamacı için input dışında kalır */
.fb-dt table.dataTable > tbody > tr > td.dt-editable {
    padding: 1px 10px 1px 2px;
}

.fb-dt .dt-in {
    width: 100%;
    min-width: 40px;
    height: 26px;
    min-height: 26px; /* Metronic .form-control-sm min-height'ini ezer */
    padding: 0 0.4rem;
    font-size: var(--fb-dt-fs-md);
    line-height: 1.2;
    border-color: var(--bs-gray-300, #e1e3ea);
}

/* Sayı hücrelerinde artır/azalt okları gizlenir */
.fb-dt input[type="number"].dt-in::-webkit-outer-spin-button,
.fb-dt input[type="number"].dt-in::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fb-dt input[type="number"].dt-in {
    -moz-appearance: textfield;
    appearance: textfield;
}

.fb-dt select.dt-in {
    padding-right: 1.6rem;
    background-position: right 0.4rem center;
}

.fb-dt .dt-in:focus {
    border-color: var(--bs-primary, #009ef7);
    box-shadow: none;
}

.fb-dt .dt-in.is-invalid {
    border-color: var(--bs-danger, #f1416c);
    background-image: none;
    padding-right: 0.4rem;
}

.fb-dt tr.deleted-row .dt-in {
    text-decoration: line-through;
}

/* Odakta iki satıra açılan alan (ExpandOnFocus). Sadece bu kolonların hücrelerinde konumlandırma
   değiştirilir; FixedColumns'ın sticky hücrelerine dokunulmaz. */
.fb-dt table.dataTable > tbody > tr > td.dt-expand-cell {
    position: relative;
    overflow: visible;
}

.fb-dt textarea.dt-in {
    height: 26px;
    min-height: 26px;
    padding: 2px 0.4rem;
    overflow: hidden;
    resize: none;
    line-height: 1.3;
    white-space: nowrap;
}

/* Odakta: akıştan çıkar (satır yüksekliği değişmez), alttaki satırın üstüne biner */
.fb-dt textarea.dt-in:focus {
    position: absolute;
    top: 1px;
    left: 2px;
    right: 10px;
    z-index: 30;
    width: auto;
    height: 50px;
    min-height: 50px;
    overflow: auto;
    white-space: normal;
    background-color: var(--bs-body-bg, #fff);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.2);
}

/* Seçim (checkbox) ve işlemler kolonları */
.fb-dt td.dt-select-cell,
.fb-dt th.dt-select-cell {
    text-align: center;
}

.fb-dt .dt-actions .btn {
    margin: 0 1px;
}

/* DataTables sayısal görünen değerleri (örn. "-1.50") otomatik sağa dayıyor; hizayı sola sabitliyoruz */
.fb-dt table.dataTable th.dt-type-numeric,
.fb-dt table.dataTable td.dt-type-numeric,
.fb-dt table.dataTable th.dt-type-date,
.fb-dt table.dataTable td.dt-type-date {
    text-align: left;
}

/* Açıkça ortalanan kolonlar (DtColumn.Center) korunur — bu kural sonra geldiği için kazanır */
.fb-dt table.dataTable td.dt-center,
.fb-dt table.dataTable th.dt-center {
    text-align: center;
}

/* Kolon başı tikli filtre ikonu: sıralama ikonunun solunda, hücre genişliğini etkilemez */
.fb-dt .dt-hf-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a1a5b7;
    font-size: var(--fb-dt-fs-xs);
    line-height: 1;
}

.fb-dt .dt-hf-btn:hover {
    color: var(--bs-gray-700, #5e6278);
}

.fb-dt .dt-hf-btn.dt-hf-active {
    color: var(--bs-primary, #009ef7);
}

/* Kolon başı arama satırı (varsayılan kapalı; toolbar ikonuyla açılır) */
.fb-dt.dt-hs-hidden table.dataTable > thead > tr.dt-hs-row {
    display: none;
}

.fb-dt table.dataTable > thead > tr.dt-hs-row > th {
    background-color: var(--bs-body-bg, #fff);
}

.fb-dt table.dataTable > thead > tr.dt-hs-row > th .dt-column-order {
    display: none;
}

.fb-dt .dt-hs {
    width: 100%;
    height: 24px;
    padding: 0 0.4rem;
    font-size: var(--fb-dt-fs-sm);
    font-weight: 400;
}

/* Tikli filtre popover'ı (body'ye eklenir) */
.dt-hf-pop {
    position: fixed;
    z-index: 100000;
    width: 290px;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #181c32);
    border: 1px solid var(--bs-border-color, #e1e3ea);
    border-radius: 0.475rem;
    padding: 0.5rem;
    font-size: var(--fb-dt-fs-md);
    box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.075);
}

.dt-hf-pop .dt-hf-all {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin: 0.4rem 2px 0;
    font-weight: 600;
    cursor: pointer;
}

.dt-hf-list {
    max-height: 260px;
    overflow: auto;
    margin: 0.35rem 0;
    border-top: 1px solid var(--bs-gray-200, #f1f1f2);
    border-bottom: 1px solid var(--bs-gray-200, #f1f1f2);
    padding: 0.25rem 0;
}

.dt-hf-item {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    padding: 1px 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dt-hf-item[hidden] {
    display: none;
}

.dt-hf-item .dt-hf-txt {
    overflow: hidden;
    text-overflow: ellipsis;
}

.dt-hf-item .dt-hf-cnt {
    color: #a1a5b7;
    margin-left: auto;
    padding-left: 0.5rem;
}

.dt-hf-foot {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.dt-hf-hint {
    color: #a1a5b7;
    font-size: var(--fb-dt-fs-xs);
    padding: 2px;
}

/* Sayfalama alanı (DT2 + Bootstrap5: .dt-container > div.row.mt-2) — tek satır, dikey ortalı, kompakt */
.fb-dt div.dt-container > div.row {
    margin-top: 0 !important; /* Bootstrap .mt-2 !important olduğu için gerekli */
    --bs-gutter-y: 0;
    row-gap: 0;
}

.fb-dt div.dt-container > div.row:last-child {
    align-items: center;
    padding: 8px 8px 3px; /* pager tablonun altina yapismasin: ust dolgu artirildi, toplam yukseklik ayni */
    border-top: 1px solid var(--bs-gray-200, #f1f1f2);
}

.fb-dt div.dt-container div.dt-layout-start,
.fb-dt div.dt-container div.dt-layout-end {
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

/* Sayfa boyutu seçici (Metronic sarmalayıcısı: .dt-layout-start > div) */
.fb-dt div.dt-container div.dt-layout-start > div:first-child {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 !important;
}

.fb-dt div.dt-container select[name$="_length"] {
    width: auto;
    height: 28px;
    min-height: 28px;
    padding: 0 2rem 0 0.6rem;
    font-size: var(--fb-dt-fs-sm);
    background-position: right 0.6rem center;
}

.fb-dt div.dt-container div.dt-info {
    margin: 0 0 0 0.75rem;
    padding: 0;
    font-size: var(--fb-dt-fs-sm);
    color: var(--bs-gray-700, #5e6278);
}

.fb-dt div.dt-container div.dt-paging {
    margin: 0;
    padding: 0; /* Metronic 13px dikey dolgu veriyor */
}

.fb-dt div.dt-container div.dt-paging .pagination {
    margin: 0;
}

/* Sayfa numaraları arası boşluk kompakt */
.fb-dt div.dt-container div.dt-paging .pagination .page-item {
    margin: 0 1px;
}

.fb-dt div.dt-container div.dt-paging .page-link,
.fb-dt div.dt-container div.dt-paging .dt-paging-button {
    padding: 0.2rem 0.55rem;
    min-width: 28px;
    height: 28px;
    font-size: var(--fb-dt-fs-sm);
    line-height: 1.4;
}

/* Kolon genişletme tutamacı (modül içi uygulama; DT2 colgroup'larını günceller) */
.fb-dt table.dataTable > thead > tr:first-child > th > .dt-rs-grip {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 7px;
    cursor: col-resize;
    z-index: 4;
    border-right: 2px solid transparent;
}

.fb-dt table.dataTable > thead > tr:first-child > th > .dt-rs-grip:hover {
    border-right-color: var(--bs-primary, #009ef7);
}

body.dt-rs-active {
    cursor: col-resize !important;
    user-select: none;
}

/* AutoFill seçim kutusu inputların üstünde kalsın */
div.dt-autofill-select {
    z-index: 1002;
}

div.dt-autofill-handle {
    z-index: 1003;
}

/* Lookup (aranabilir açılır liste) — tek paylaşımlı panel, body'ye eklenir; input metin kaldığı için AutoFill aynen çalışır */
.dt-lk-pop {
    position: fixed;
    z-index: 100001;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #181c32);
    border: 1px solid var(--bs-border-color, #e1e3ea);
    border-radius: 0.475rem;
    box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.075);
    max-height: 280px;
    overflow: auto;
    font-size: var(--fb-dt-fs-md);
    padding: 0.25rem 0;
}

.dt-lk-item {
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dt-lk-item.active,
.dt-lk-item:hover {
    background: var(--bs-gray-100, #f9f9f9);
}

.dt-lk-sub {
    color: #a1a5b7;
    margin-left: 0.5rem;
    font-size: var(--fb-dt-fs-xs);
}

.dt-lk-hint {
    padding: 4px 10px;
    color: #a1a5b7;
    font-size: var(--fb-dt-fs-xs);
}

/* Lookup hücresi: temizleme (x) butonu */
.fb-dt .dt-lk-wrap {
    position: relative;
    display: block;
}

.fb-dt .dt-lk-wrap .dt-in {
    padding-right: 1.1rem;
}

.fb-dt .dt-lk-clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a1a5b7;
    font-size: var(--fb-dt-fs-lg);
    line-height: 1;
    padding: 0 2px;
}

.fb-dt .dt-lk-clear:hover {
    color: var(--bs-danger, #f1416c);
}

/* ---- FBKariyer satır durumları: iptal edilmiş weld/izometrik ve revizyon uyuşmazlığı ----
   _Master.cshtml'deki global .canceled-row (#DE3163) DT içinde ezilir; dondurulmuş hücreler
   (dtfc-fixed-*) opak arka plan aldığından satır rengi onlara da ayrıca verilir. */
.fb-dt table.dataTable > tbody > tr.canceled-row > td,
.fb-dt table.dataTable > tbody > tr.canceled-row > td.dtfc-fixed-start,
.fb-dt table.dataTable > tbody > tr.canceled-row > td.dtfc-fixed-end {
    background-color: #f8d7da !important;
    text-decoration: line-through;
}

.fb-dt table.dataTable > tbody > tr.rev-mismatch-row > td,
.fb-dt table.dataTable > tbody > tr.rev-mismatch-row > td.dtfc-fixed-start,
.fb-dt table.dataTable > tbody > tr.rev-mismatch-row > td.dtfc-fixed-end {
    background-color: #ffe28c !important;
}

/* ---- Sabit kolon genişliği (DtOptions.FitColumns) ----
   Kolon genişlikleri JS (applyFitWidths) tarafından def değerlerine sabitlenir; tablo genişliği
   kolon toplamına eşitlenir, artan alan sağda boş bırakılır (DataTables'ın kapsayıcıya esnetmesi engellenir).
   table-layout:fixed genel kuralda; burada tablo genişliğinin inline değerinin geçerli kalması için
   ek bir !important kuralı YOKTUR. */

/* ================================================================== */
/* Genişletme: zorunlu başlık, tarih/sayı editörü, çok satırlı alan,   */
/* rozet hücresi, hücre butonları, tıklanabilir hücre, seçim kilidi.   */
/* Ölçüler mevcut kurgu ile uyumludur (.dt-in 26px, ikon 25px/fs-8).   */
/* ================================================================== */

/* ---- Zorunlu kolon başlığı yıldızı ---- */
.fb-dt table.dataTable > thead > tr > th .dt-req {
    margin-left: 2px;
    font-weight: 700;
}

/* ---- Tarih hücresi (dd.MM.yyyy maskeli metin girişi) ---- */
.fb-dt input.dt-date {
    text-align: center;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

.fb-dt input.dt-date::placeholder {
    color: #b5b5c3;
    letter-spacing: normal;
}

/* Tarih hücresi: metin girişi + sağda takvim ikonu. İkon, gizli native date input'un
   seçicisini açar; gizli input yalnızca seçiciyi taşır, görünmez ve yer kaplamaz. */
.fb-dt .dt-datewrap {
    position: relative;
    display: block;
    width: 100%;
}

.fb-dt .dt-datewrap input.dt-date {
    padding-right: 20px; /* ikonun altına metin girmesin */
}

.fb-dt input.dt-datepick {
    position: absolute;
    right: 2px;
    bottom: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.fb-dt button.dt-datebtn {
    position: absolute;
    top: 50%;
    right: 1px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #a1a5b7;
    line-height: 1;
    font-size: var(--fb-dt-fs-xs);
    cursor: pointer;
}

.fb-dt button.dt-datebtn:hover {
    color: var(--bs-primary, #009ef7);
}

.fb-dt button.dt-datebtn:disabled {
    color: #d5d7e0;
    cursor: default;
}

/* ---- Sayı hücresi: sağa dayalı, tabular rakam ---- */
.fb-dt input.dt-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---- Kalıcı çok satırlı alan (DtEditor.TextArea) ---- */
/* Hücre yüksekliği içerikle büyür; ExpandOnFocus'un absolute kurgusu kullanılmaz. */
.fb-dt textarea.dt-ta-grow {
    height: 26px;
    min-height: 26px;
    max-height: 94px; /* TextAreaMaxRows=4 karşılığı; JS de aynı sınırı uygular */
    padding: 2px 0.4rem;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-y: auto;
    resize: none;
}

.fb-dt textarea.dt-ta-grow:focus {
    position: static; /* .dt-ta:focus absolute kuralını geri alır */
    width: 100%;
    box-shadow: none;
}

.fb-dt textarea.dt-ta-grow[readonly] {
    background-color: var(--bs-gray-100, #f9f9f9);
    color: var(--bs-gray-700, #5e6278);
}

/* TextArea kolonlarında satır yüksekliği değişebildiğinden hücre üstten hizalanır */
.fb-dt table.dataTable > tbody > tr > td.dt-ta-cell {
    vertical-align: top;
    white-space: normal;
    padding-top: 2px;
}

/* ---- Rozet hücresi (DtColumn.Badge) ---- */
.fb-dt .dt-badge {
    display: inline-block;
    max-width: 100%;
    padding: 2px 0.5rem;
    font-size: var(--fb-dt-fs-xs);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* ---- Hücre butonları (içerik solda, ikonlar sağda) ---- */
.fb-dt .dt-cellwrap {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.fb-dt .dt-cellwrap > .dt-cellval {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-dt .dt-cellbtn {
    flex: 0 0 auto;
    padding: 0;
}

/* İkonun yanında sayı/kısa metin (dosya sayısı, test paketi no) */
.fb-dt .dt-cellbtn:has(.dt-cellbtn-txt) {
    width: auto;
    min-width: 25px;
    padding: 0 0.35rem;
}

.fb-dt .dt-cellbtn-txt {
    margin-left: 0.25rem;
    font-size: var(--fb-dt-fs-xs);
    line-height: 1;
}

/* Butonlu düzenlenebilir hücrede AutoFill tutamacı için sağ şerit korunur */
.fb-dt table.dataTable > tbody > tr > td.dt-editable.dt-hasbtn {
    padding-right: 12px;
}

/* ---- Tıklanabilir salt-okunur hücre (DtColumn.ClickAction) ---- */
.fb-dt .dt-cell-link {
    color: var(--bs-primary, #009ef7);
    text-decoration: none;
    cursor: pointer;
}

.fb-dt .dt-cell-link:hover {
    text-decoration: underline;
}

/* ---- Seçilemez satır (DtOptions.SelectableRule) ---- */
.fb-dt td.dt-select-cell.dt-noselect {
    cursor: not-allowed;
    opacity: 0.45;
}

.fb-dt td.dt-select-cell.dt-noselect input {
    pointer-events: none;
}

/* İptal edilmiş (RevisionStatus=Canceled) satır — soluk kırmızı zemin.
   .canceled-row'dan farkı: üstü çizili değildir, çünkü satır hâlâ düzenlenebilir
   (kullanıcı iptali geri alabilir). Spool/MTO sekmelerinden merkeze taşındı. */
.fb-dt table.dataTable > tbody > tr.spool-row-canceled > td,
.fb-dt table.dataTable > tbody > tr.mto-row-canceled > td,
.fb-dt table.dataTable > tbody > tr.weld-row-canceled > td {
    background-color: rgba(249, 122, 122, 0.1) !important;
}

/* Spool sync'inden otomatik gelen satır — hafif mavi zemin (durum rengiyle birlikte uygulanır) */
.fb-dt table.dataTable > tbody > tr.weld-row-sync > td {
    background-color: rgba(0, 149, 228, 0.04) !important;
}

/* NDE'de geçersiz kılınan (Repair/Cut-Out/Rejected) kaynak — diğer tüm satır renklerini ezer.
   Renk/soluk metin, el yazımı gridlerdeki .nde-row-invalid ile birebir aynıdır (pondera.css). */
.fb-dt table.dataTable > tbody > tr.nde-row-invalid > td {
    background-color: #fbe7e9 !important;
    color: #a1a5b7;
}

/* SpoolStatus: boya sistemi veya izolasyon kodu uygulanmayan (N/A / -) satır — tamamen girişe kapalı */
.fb-dt table.dataTable > tbody > tr.spst-row-locked > td {
    background-color: #f4f4f4 !important;
    color: #a1a5b7;
}

/* Joint NDE Release: kaynağın birleşik test durumuna göre satır rengi
   (el yazımı griddeki .jnr-row-* + Bootstrap table-* ikilisinin karşılığı) */
.fb-dt table.dataTable > tbody > tr.jnr-row-released > td {
    background-color: var(--bs-success-bg-subtle, #d1e7dd) !important;
}
.fb-dt table.dataTable > tbody > tr.jnr-row-ongoing > td {
    background-color: var(--bs-primary-bg-subtle, #cfe2ff) !important;
}
.fb-dt table.dataTable > tbody > tr.jnr-row-rejected > td {
    background-color: var(--bs-danger-bg-subtle, #f8d7da) !important;
}
.fb-dt table.dataTable > tbody > tr.jnr-row-notstarted > td {
    background-color: var(--bs-secondary-bg-subtle, #e2e6ea) !important;
}

/* RFI sekmeleri: bağlı kaynak ağzı iptal edilmiş satır — soluk kırmızı zemin, girişe kapalı */
.fb-dt table.dataTable > tbody > tr.rfi-row-canceled > td {
    background-color: rgba(249, 122, 122, 0.1) !important;
}

/* Ana/ayrıntı düzeninde tıklanarak seçilen satır (bkz. DtOptions.RowClick) */
.fb-dt tbody tr.dt-row-active > td {
    background-color: var(--bs-primary-light) !important;
    box-shadow: inset 3px 0 0 0 var(--bs-primary);
}

.fb-dt tbody tr.dt-row-active > td:not(:first-child) {
    box-shadow: none;
}

.fb-dt table.dt-rowclick tbody tr {
    cursor: pointer;
}

/* Metin kenara yapışmasın: hücre ve başlıklarda sol dolgu; ilk kolonda biraz daha fazla.
   (Metronic .table first-child dolguyu sıfırlar; düzenlenebilir hücre ve seçim kutusu hariç) */
.fb-dt table.dataTable > thead > tr > th,
.fb-dt table.dataTable > tbody > tr > td {
    padding-left: 10px;
}

.fb-dt table.dataTable > thead > tr > th:first-child:not(.dt-select-cell),
.fb-dt table.dataTable > tbody > tr > td:first-child:not(.dt-select-cell):not(.dt-editable) {
    padding-left: 14px !important;
}

/* Toolbar satırı: soldan/sağdan tablo metniyle aynı hizada başlasın (ilk kolon dolgusu 14px) */
.card-header.fb-dt-header {
    padding-left: 14px !important;
    padding-right: 14px !important;
}
