/* ==========================================================================
   KobiCar ERP - Marka tema katmani (Tabler uzerine)
   Tek kaynak: renkler, tipografi, koyu menu, yardimci siniflar.
   Ilke: Tabler CSS degiskenlerini ezerek calis; !important yalnizca
   Tabler'in hazir utility siniflarini (bg-*, text-*) ezmek zorunlu oldugunda.
   ========================================================================== */

/* 1. Marka renk paleti ---------------------------------------------------- */
/* kobicar.com sitesiyle uyumlu: aksan YESIL (#00b172), yapi NAVY (#0f256e).
   Turuncu (#ff390d) yalniz LOGO markasidir; logo blade'lerinde korunur. */
:root {
    --kc-marka: #00b172;          /* site --green: aksan (buton/link/aktif) */
    --kc-marka-koyu: #009c64;     /* site --green-h: hover */
    --kc-marka-acik: #5fd0a8;     /* acik yesil: form odak kenari */
    --kc-marka-zemin: rgba(0, 177, 114, 0.10);
    --kc-notr: #7a8294;
    --kc-menu: #071133;           /* site navy ailesi: koyu ust/yan menu */
    --kc-menu-acik: #071133;      /* acik navy: menu dropdown yuzeyi */
    --kc-ink: #191e28;            /* site --ink-900 */
}

/* 2. Tabler ana renk degiskenlerini marka ile ezimle (cascade, !important yok) */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --tblr-primary: var(--kc-marka);
    --tblr-primary-rgb: 0, 177, 114;
    --tblr-primary-fg: #ffffff;
    --tblr-link-color: var(--kc-marka);
    --tblr-link-color-rgb: 0, 177, 114;
    --tblr-link-hover-color: var(--kc-marka-koyu);
    --tblr-focus-ring-color: rgba(0, 177, 114, 0.25);
    /* Mavi turevlerini notr/marka yap: bilesenlerden gelen mavi kaybolur */
    --tblr-blue: var(--kc-marka);
    --tblr-blue-rgb: 0, 177, 114;
    --tblr-azure: var(--kc-notr);
    --tblr-azure-rgb: 122, 130, 148;
    --tblr-indigo: var(--kc-notr);
    --tblr-indigo-rgb: 122, 130, 148;
}

/* 3. Butonlar --------------------------------------------------------------- */
.btn-primary {
    --tblr-btn-bg: var(--kc-marka);
    --tblr-btn-border-color: var(--kc-marka);
    --tblr-btn-hover-bg: var(--kc-marka-koyu);
    --tblr-btn-hover-border-color: var(--kc-marka-koyu);
    --tblr-btn-active-bg: var(--kc-marka-koyu);
    --tblr-btn-active-border-color: var(--kc-marka-koyu);
    --tblr-btn-disabled-bg: var(--kc-marka);
    --tblr-btn-disabled-border-color: var(--kc-marka);
}
.btn-outline-primary {
    --tblr-btn-color: var(--kc-marka);
    --tblr-btn-border-color: var(--kc-marka);
    --tblr-btn-hover-bg: var(--kc-marka);
    --tblr-btn-hover-border-color: var(--kc-marka);
}

/* 4. Form odagi + secim ---------------------------------------------------- */
.form-control:focus,
.form-select:focus {
    border-color: var(--kc-marka-acik);
    box-shadow: 0 0 0 0.25rem rgba(0, 177, 114, 0.15);
}
.form-check-input:checked {
    background-color: var(--kc-marka);
    border-color: var(--kc-marka);
}
.form-check-input:focus {
    border-color: var(--kc-marka-acik);
    box-shadow: 0 0 0 0.25rem rgba(0, 177, 114, 0.15);
}

/* 5. Tipografi: govde Inter, basliklar Plus Jakarta Sans ------------------- */
body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3, .h1, .h2, .h3,
.page-title, .card-title, .navbar-brand {
    font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
}

/* 6. Layout: Tabler'in scrollbar telafisi paneli daraltiyordu, iptal ------- */
@media (min-width: 992px) {
    :root, :host {
        margin-left: 0;
        margin-right: 0;
    }
}

/* 7. Koyu ust menu + acilir menu: lacivert yerine antrasit ----------------- */
.navbar.navbar-overlap[data-bs-theme="dark"],
.navbar-vertical[data-bs-theme="dark"] {
    --tblr-navbar-bg: var(--kc-menu);
    background-color: var(--kc-menu);
}
/* Ust menudeki acilir dropdown'lar BEYAZ (blade'de data-bs-theme="light").
   Koyu-antrasit ezmesi sadece kendi temasi OLMAYAN dropdown'lara (icerik
   sayfasi gece modu) uygulanir; boylece navbar dropdown'lari beyaz kalir
   ve eski lacivert/mavi sorunu geri gelmez. */
[data-bs-theme="dark"] .dropdown-menu:not([data-bs-theme]) {
    --tblr-dropdown-bg: var(--kc-menu-acik);
    --tblr-bg-surface: var(--kc-menu-acik);
    background-color: var(--kc-menu-acik);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-bs-theme="dark"] .dropdown-menu:not([data-bs-theme]) .dropdown-item { color: #d6dae2; }
[data-bs-theme="dark"] .dropdown-menu:not([data-bs-theme]) .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-menu:not([data-bs-theme]) .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}
/* Beyaz navbar dropdown'unda aktif oge marka aksanli. */
.dropdown-menu[data-bs-theme="light"] .dropdown-item.active,
.dropdown-menu[data-bs-theme="light"] .dropdown-item:active {
    background-color: var(--kc-marka-zemin);
    color: var(--kc-marka-koyu);
}
.dropdown-menu[data-bs-theme="light"] .dropdown-item.active i { color: var(--kc-marka); }

/* 8. Menu ortalama: sadece acilir collapse icindeki menu, kullanici sagda kalir */
@media (min-width: 768px) {
    .navbar-overlap .navbar-collapse > .d-flex {
        justify-content: center;
    }
}

/* 9. Subheader: net, kurumsal, marka aksanli (kart ustu kucuk basliklar) --- */
.subheader {
    color: var(--kc-ink);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.6875rem;
    opacity: 0.85;
}
.page-pretitle {
    letter-spacing: 0.06em;
}

/* 10. Marka yardimci siniflari (Tabler utility'lerini ezer -> !important) --- */
.bg-marka { background-color: var(--kc-marka) !important; color: #ffffff !important; }
.bg-marka-lt { background-color: var(--kc-marka-zemin) !important; color: var(--kc-marka-koyu) !important; }
[data-bs-theme="dark"] .bg-marka-lt { background-color: rgba(0, 177, 114, 0.28) !important; color: var(--kc-marka-acik) !important; }
.text-marka { color: var(--kc-marka) !important; }

/* Notr griye dusen Tabler mavi utility'leri (bilesenlerden artakalan) ------ */
.text-azure, .text-blue, .text-indigo { color: var(--kc-notr) !important; }
.bg-azure, .bg-blue, .bg-indigo { background-color: var(--kc-notr) !important; }
.bg-azure-lt, .bg-blue-lt, .bg-indigo-lt {
    background-color: rgba(122, 130, 148, 0.12) !important;
    color: #535b6e !important;
}
[data-bs-theme="dark"] .bg-azure-lt,
[data-bs-theme="dark"] .bg-blue-lt,
[data-bs-theme="dark"] .bg-indigo-lt {
    background-color: rgba(122, 130, 148, 0.28) !important;
    color: #d6dae2 !important;
}

/* ==========================================================================
   11. MOBIL KATMANI (uygulama hissi + bottom-sheet modallar)
   Tamami @media (max-width:575.98px) icinde; masaustunu etkilemez.
   Modallar generic .modal.show .modal-dialog seciciyle yakalanir (hem
   data-bs-toggle hem Alpine/manuel .show modallari). kobicar-mobil.js
   surukleme kolu + asagi-kaydir-kapat davranisini ekler.
   ========================================================================== */
@media (max-width: 575.98px) {
    html, body { overflow-x: hidden; }

    /* --- Bottom-sheet donusumu --- */
    .modal.show .modal-dialog,
    .modal.show .modal-dialog.modal-dialog-centered {
        position: fixed;
        left: 0; right: 0; bottom: 0; top: auto;
        margin: 0 !important;              /* centered margin/auto ez */
        width: 100% !important;            /* modal-sm/lg dar kalmasin */
        max-width: 100% !important;
        min-height: 0 !important;          /* centered min-height ez */
        align-items: flex-end !important;  /* dikey ortalama ez */
        display: block;
        pointer-events: none;              /* backdrop tiki gecsin */
    }
    .modal.show .modal-content {
        pointer-events: auto;
        border-radius: 1rem 1rem 0 0;
        border-bottom: 0;
        max-height: 92vh;
        display: flex;
        flex-direction: column;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        will-change: transform;
        transition: transform .28s cubic-bezier(.22,.61,.36,1);
    }
    /* Giris animasyonu: fade modallar transition ile alttan gelir. */
    .modal.fade:not(.show) .modal-dialog .modal-content { transform: translateY(100%); }
    .modal.fade.show .modal-dialog .modal-content { transform: translateY(0); }
    /* Fade olmayan modallar icin keyframe (cift-animasyon olmasin diye ayri). */
    .modal:not(.fade).show .modal-content { animation: kcSheetUp .28s cubic-bezier(.22,.61,.36,1); }
    @keyframes kcSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

    /* Ic scroll: sadece body kayar, header/footer sabit. */
    .modal.show .modal-header, .modal.show .modal-footer { flex: 0 0 auto; }
    .modal.show .modal-body {
        flex: 1 1 auto; overflow-y: auto;
        -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    }

    /* Surukleme kolu (JS enjekte eder) */
    .kc-sheet-kol {
        flex: 0 0 auto; width: 100%; height: 22px;
        display: flex; align-items: center; justify-content: center;
        cursor: grab; touch-action: none;
    }
    .kc-sheet-kol::before {
        content: ""; width: 40px; height: 4px; border-radius: 999px;
        background: var(--tblr-border-color, #dadfe5);
    }
    .modal.show .kc-sheet-kol + .modal-header { padding-top: .25rem; }

    /* --- Bildirim dropdown 22rem tasmasi --- */
    .navbar .dropdown-menu-card {
        width: calc(100vw - 1.5rem) !important; max-width: 22rem;
        right: .75rem; left: auto;
    }
    .navbar .dropdown-menu-card .list-group,
    .navbar .dropdown-menu-card [style*="max-height"] {
        max-height: 60vh !important;
        -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    }
    .dropdown-menu { max-width: 100vw; }

    /* --- Ust navbar dokunma hedefleri 44px --- */
    .navbar .nav-link, .navbar .btn-tema {
        min-width: 44px; min-height: 44px;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .dropdown-menu-card .btn-link,
    .dropdown-menu-card .card-footer a,
    .alert .btn-close { min-height: 44px; display: inline-flex; align-items: center; }

    /* --- Flash/alert z-index modalin ALTINA + tam genislik + safe-area --- */
    .position-fixed.top-0.end-0[style*="z-index"] {
        z-index: 1030 !important;
        left: .5rem !important; right: .5rem !important;
        top: calc(env(safe-area-inset-top, 0px) + 3.5rem) !important;
        max-width: 100%;
    }

    /* --- nav-tabs / card-header-tabs yatay kaydirilir serit --- */
    .nav-tabs, .card-header-tabs {
        flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    }
    .nav-tabs .nav-link { white-space: nowrap; }

    /* --- Motor ic-ice scroll kutusu mobilde dogal aksa birak --- */
    .table-responsive [style*="max-height"] { max-height: none !important; }

    /* --- Sabit rem input/progress akiskan --- */
    .col-auto > input[style*="width"], .col-auto > select[style*="width"] { width: 100% !important; }
    .progress[style*="7rem"] { width: 100% !important; }

    /* --- Filtre submit butonu tam genislik --- */
    form .col-auto > .btn[type="submit"] { width: 100%; }

    /* --- QR/gorsel olceklensin, IP kirilabilir --- */
    .d-inline-block.border img, .d-inline-block.border svg { max-width: 100%; height: auto; }
    td code { overflow-wrap: anywhere; word-break: break-all; }
}

/* ==========================================================================
   13. GECE MODU: TAM MONOKROM (siyah / beyaz / antrasit).
   Zemin #0c0c0d (neredeyse siyah), yuzey #17181a (antrasit kart),
   ikincil #1f2022, ucuncul #26282b, kenarlik #2e2f33. Renk YOK:
   yesil/mavi aksanlar notr griye/beyaza dusurulur (bkz. bolum 14).
   Yalniz semantik durum sinyalleri (kirmizi=tehlike, kehribar=uyari)
   olculu tonla korunur; okunabilirlik/kontrast icin.
   ========================================================================== */
html[data-bs-theme="dark"] {
    --tblr-body-bg: #0c0c0d;              /* neredeyse siyah zemin */
    --tblr-body-color: #e6e7e9;           /* neredeyse beyaz metin */
    --tblr-bg-surface: #17181a;           /* antrasit kart yuzeyi */
    --tblr-bg-surface-secondary: #1f2022;
    --tblr-bg-surface-tertiary: #26282b;
    --tblr-bg-surface-dark: #060607;
    --tblr-border-color: #2e2f33;
    --tblr-border-color-translucent: rgba(255, 255, 255, 0.07);
    --tblr-active-bg: #26282b;
    --tblr-secondary: #9a9ca1;
    --tblr-secondary-color: #9a9ca1;
    --tblr-tertiary-bg: #1f2022;
    --tblr-secondary-bg: #17181a;
    --tblr-dark: #060607;
    --tblr-light: #26282b;
    /* Marka yesilini gecede notrle: aksan artik beyaz-gri (renk yok) */
    --kc-marka: #e6e7e9;
    --kc-marka-koyu: #ffffff;
    --kc-marka-acik: #6b6d72;
    --kc-marka-zemin: rgba(255, 255, 255, 0.08);
    --tblr-primary: #e6e7e9;
    --tblr-primary-rgb: 230, 231, 233;
    --tblr-primary-fg: #16171a;           /* beyaz butonda koyu yazi */
    --tblr-link-color: #cfd0d3;
    --tblr-link-color-rgb: 207, 208, 211;
    --tblr-link-hover-color: #ffffff;
    --tblr-focus-ring-color: rgba(255, 255, 255, 0.18);
    /* Bilesenlerden gelen tum renk turevleri notr gri */
    --tblr-blue: #9a9ca1;   --tblr-blue-rgb: 154, 156, 161;
    --tblr-azure: #9a9ca1;  --tblr-azure-rgb: 154, 156, 161;
    --tblr-indigo: #9a9ca1; --tblr-indigo-rgb: 154, 156, 161;
    --tblr-green: #c7c9cc;  --tblr-green-rgb: 199, 201, 204;
    --tblr-teal: #9a9ca1;   --tblr-cyan: #9a9ca1;
    --tblr-lime: #c7c9cc;   --tblr-purple: #b7b9bd; --tblr-pink: #b7b9bd;
}
html[data-bs-theme="dark"] body { background: var(--tblr-body-bg); }
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .dropdown-menu:not([data-bs-theme="light"]) {
    background-color: var(--tblr-bg-surface);
    border-color: var(--tblr-border-color);
}
html[data-bs-theme="dark"] .card-header,
html[data-bs-theme="dark"] .card-footer,
html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-footer {
    background-color: transparent;
    border-color: var(--tblr-border-color);
}
html[data-bs-theme="dark"] .table thead th,
html[data-bs-theme="dark"] thead {
    background-color: #121214;
    color: #9a9ca1;
}
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
    background-color: #101012;
    border-color: var(--tblr-border-color);
    color: var(--tblr-body-color);
}
html[data-bs-theme="dark"] .list-group-item {
    background-color: transparent;
    border-color: var(--tblr-border-color);
    color: var(--tblr-body-color);
}
html[data-bs-theme="dark"] .page-header.d-print-none ~ * .card { box-shadow: none; }
/* Gece modunda footer/ikincil metin */
html[data-bs-theme="dark"] .footer { background: transparent; }
/* Subheader gunduzde koyu murekkep; gecede acik gri olmali */
html[data-bs-theme="dark"] .subheader { color: #9ba0ab; }
html[data-bs-theme="dark"] .datagrid-title { color: #8b8f9a; }

/* ==========================================================================
   12. POPUP YUMUSAK ACILIS (masaustu)
   Tum modallar (.modal.show) icin ince olcek+kayma+fade girisi.
   Mobil bottom-sheet kendi animasyonuna sahip (bolum 11), o yuzden yalniz >=576px.
   ========================================================================== */
@media (min-width: 576px) {
    .modal.show .modal-content {
        animation: kcModalGiris .2s cubic-bezier(.2, .7, .3, 1);
    }
    @keyframes kcModalGiris {
        from { opacity: 0; transform: translateY(10px) scale(.985); }
        to   { opacity: 1; transform: none; }
    }
    /* Backdrop de yumusak gelsin */
    .modal-backdrop.show { animation: kcFade .2s ease; }
    @keyframes kcFade { from { opacity: 0; } to { opacity: .4; } }
}

/* Ust menu altindaki cizgi/golge kaldirildi (Ugur istegi) - ust-menu-cizgi-kaldirildi */
.navbar.navbar-overlap[data-bs-theme="dark"]{border-bottom:0 !important;box-shadow:none !important;}

/* ==========================================================================
   14. GECE MODU MONOKROM DENETIMI (siyah/beyaz/antrasit)
   Yalniz html[data-bs-theme="dark"] altinda calisir; gunduz modu (Ugur
   "iyi" dedi) hic etkilenmez. Amac: yesil/mavi/mor/turkuaz vb. TUM
   dekoratif renkleri notr gri/beyaza dusurmek; kontrast + okunabilirlik.
   Korunan tek renk: kirmizi (tehlike) ve kehribar (uyari) olculu tonla.
   ========================================================================== */

/* 14.1 Ust menu: gecede lacivert DEGIL antrasit (gunduz navy kalir) ------- */
html[data-bs-theme="dark"] .navbar.navbar-overlap[data-bs-theme="dark"],
html[data-bs-theme="dark"] .navbar-vertical[data-bs-theme="dark"] {
    --tblr-navbar-bg: #141517;
    background-color: #141517 !important;
}
html[data-bs-theme="dark"] .navbar.navbar-overlap[data-bs-theme="dark"] .nav-link,
html[data-bs-theme="dark"] .navbar.navbar-overlap[data-bs-theme="dark"] .navbar-brand { color: #e6e7e9; }
html[data-bs-theme="dark"] .navbar.navbar-overlap[data-bs-theme="dark"] .nav-item.active .nav-link,
html[data-bs-theme="dark"] .navbar.navbar-overlap[data-bs-theme="dark"] .nav-link:hover { color: #ffffff; }

/* 14.2 Icerik sayfasi (temasiz) acilir menuler: navy yerine antrasit ------ */
html[data-bs-theme="dark"] .dropdown-menu:not([data-bs-theme]) {
    --tblr-dropdown-bg: var(--tblr-bg-surface);
    --tblr-bg-surface: var(--tblr-bg-surface);
    background-color: var(--tblr-bg-surface);
    border-color: var(--tblr-border-color);
}

/* 14.3 Birincil buton: beyaz zemin + koyu yazi (marka yesili yok) --------- */
html[data-bs-theme="dark"] .btn-primary {
    --tblr-btn-bg: #e6e7e9;   --tblr-btn-border-color: #e6e7e9;   --tblr-btn-color: #16171a;
    --tblr-btn-hover-bg: #ffffff; --tblr-btn-hover-border-color: #ffffff; --tblr-btn-hover-color: #000000;
    --tblr-btn-active-bg: #ffffff; --tblr-btn-active-border-color: #ffffff; --tblr-btn-active-color: #000000;
    --tblr-btn-disabled-bg: #3a3b3f; --tblr-btn-disabled-border-color: #3a3b3f; --tblr-btn-disabled-color: #0c0c0d;
}
html[data-bs-theme="dark"] .btn-outline-primary {
    --tblr-btn-color: #e6e7e9; --tblr-btn-border-color: #4a4b50;
    --tblr-btn-hover-bg: #e6e7e9; --tblr-btn-hover-border-color: #e6e7e9; --tblr-btn-hover-color: #16171a;
}
/* Notr/aksiyonsuz butonlar (koyu/saydam zemin): acik metin */
html[data-bs-theme="dark"] .btn { color: var(--tblr-body-color); }
html[data-bs-theme="dark"] .btn-ghost-danger { --tblr-btn-color: #e79a9a; }
/* ACIK ZEMINLI butonlarda KOYU metin (beyaz uzerine beyaz olmasin).
   Ayni ozgulluk + sonra geldigi icin yukaridaki blanket .btn kuralini ezer.
   Ust menuye dokunmaz: navbar butonlari .nav-link/.btn-tema/.btn-action'dir. */
html[data-bs-theme="dark"] .btn-primary,
html[data-bs-theme="dark"] .btn-white,
html[data-bs-theme="dark"] .btn-light { color: #16171a; }
html[data-bs-theme="dark"] .btn-primary:hover,
html[data-bs-theme="dark"] .btn-primary:focus,
html[data-bs-theme="dark"] .btn-white:hover,
html[data-bs-theme="dark"] .btn-light:hover { color: #000000; }

/* 14.4 Form odagi + secim: yesil glow yerine beyaz ----------------------- */
html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
    border-color: #6b6d72;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.12);
}
html[data-bs-theme="dark"] .form-check-input:checked {
    background-color: #e6e7e9; border-color: #e6e7e9;
}
html[data-bs-theme="dark"] .form-check-input:checked[type="checkbox"] { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2316171a' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e"); }
html[data-bs-theme="dark"] .form-check-input:focus {
    border-color: #6b6d72; box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.12);
}

/* 14.5 nav-pills / nav aktif oge: beyaz zemin koyu yazi ------------------ */
html[data-bs-theme="dark"] .nav-pills .nav-link.active,
html[data-bs-theme="dark"] .nav-pills .show > .nav-link {
    background-color: #e6e7e9; color: #16171a;
}
html[data-bs-theme="dark"] .nav-pills .nav-link { color: var(--tblr-body-color); }
html[data-bs-theme="dark"] .list-group-item-action.active,
html[data-bs-theme="dark"] .list-group-item.active {
    background-color: #26282b; border-color: var(--tblr-border-color); color: #ffffff;
}

/* 14.6 DEKORATIF RENKLERI NOTRLE: yesil/mavi/mor/turkuaz/lime/pembe ------- */
/* Acik zeminli rozetler (bg-*-lt) -> notr antrasit rozet */
html[data-bs-theme="dark"] .bg-green-lt,
html[data-bs-theme="dark"] .bg-lime-lt,
html[data-bs-theme="dark"] .bg-teal-lt,
html[data-bs-theme="dark"] .bg-cyan-lt,
html[data-bs-theme="dark"] .bg-blue-lt,
html[data-bs-theme="dark"] .bg-azure-lt,
html[data-bs-theme="dark"] .bg-indigo-lt,
html[data-bs-theme="dark"] .bg-purple-lt,
html[data-bs-theme="dark"] .bg-pink-lt,
html[data-bs-theme="dark"] .bg-marka-lt {
    background-color: rgba(255, 255, 255, 0.09) !important;
    color: #d3d5d8 !important;
}
/* Dolu renk zeminler (avatar bg-marka, badge bg-success/primary vb.) -> notr */
html[data-bs-theme="dark"] .bg-marka,
html[data-bs-theme="dark"] .bg-primary,
html[data-bs-theme="dark"] .bg-green,
html[data-bs-theme="dark"] .bg-lime,
html[data-bs-theme="dark"] .bg-teal,
html[data-bs-theme="dark"] .bg-cyan,
html[data-bs-theme="dark"] .bg-blue,
html[data-bs-theme="dark"] .bg-azure,
html[data-bs-theme="dark"] .bg-indigo,
html[data-bs-theme="dark"] .bg-purple,
html[data-bs-theme="dark"] .bg-pink {
    background-color: #2b2d31 !important; color: #e6e7e9 !important;
}
/* Metin renkleri -> notr acik gri */
html[data-bs-theme="dark"] .text-marka,
html[data-bs-theme="dark"] .text-green,
html[data-bs-theme="dark"] .text-lime,
html[data-bs-theme="dark"] .text-teal,
html[data-bs-theme="dark"] .text-cyan,
html[data-bs-theme="dark"] .text-blue,
html[data-bs-theme="dark"] .text-azure,
html[data-bs-theme="dark"] .text-indigo,
html[data-bs-theme="dark"] .text-purple,
html[data-bs-theme="dark"] .text-pink,
html[data-bs-theme="dark"] .text-primary { color: #c9cbce !important; }
/* Kenarliklar */
html[data-bs-theme="dark"] .border-green,
html[data-bs-theme="dark"] .border-blue,
html[data-bs-theme="dark"] .border-azure,
html[data-bs-theme="dark"] .border-primary { border-color: #4a4b50 !important; }
/* Badge-dot "bagli" gostergesi (gecede yesil yerine acik gri) */
html[data-bs-theme="dark"] .badge.bg-success:not(.badge-dot),
html[data-bs-theme="dark"] .badge.bg-green { background-color: #3a3c40 !important; color: #e6e7e9 !important; }

/* 14.7 SEMANTIK KORUNAN: kirmizi (tehlike) + kehribar (uyari) olculu ----- */
html[data-bs-theme="dark"] .bg-red-lt,
html[data-bs-theme="dark"] .bg-danger-lt {
    background-color: rgba(214, 92, 92, 0.16) !important; color: #e79a9a !important;
}
html[data-bs-theme="dark"] .bg-orange-lt,
html[data-bs-theme="dark"] .bg-yellow-lt,
html[data-bs-theme="dark"] .bg-warning-lt {
    background-color: rgba(210, 168, 92, 0.15) !important; color: #dcbb84 !important;
}
html[data-bs-theme="dark"] .text-orange,
html[data-bs-theme="dark"] .text-yellow,
html[data-bs-theme="dark"] .text-warning { color: #dcbb84 !important; }
html[data-bs-theme="dark"] .text-red,
html[data-bs-theme="dark"] .text-danger { color: #e79a9a !important; }
html[data-bs-theme="dark"] .border-orange { border-color: #6b5a2f !important; }
html[data-bs-theme="dark"] .text-red.card,
html[data-bs-theme="dark"] .border-red { border-color: #6b3535 !important; }

/* 14.8 Alert'ler: notr antrasit zemin, sadece durum metni tonlu ---------- */
html[data-bs-theme="dark"] .alert-success,
html[data-bs-theme="dark"] .alert-info {
    background-color: #1c1d20; border-color: var(--tblr-border-color); color: #e6e7e9;
}
html[data-bs-theme="dark"] .alert-danger {
    background-color: #241a1a; border-color: #4a2e2e; color: #e79a9a;
}
html[data-bs-theme="dark"] .alert-warning {
    background-color: #221e16; border-color: #4a3f2a; color: #dcbb84;
}

/* 14.9 Tablo satir vurgu + hover: notr ----------------------------------- */
html[data-bs-theme="dark"] .table {
    --tblr-table-hover-bg: rgba(255, 255, 255, 0.035);
    --tblr-table-striped-bg: rgba(255, 255, 255, 0.02);
    color: var(--tblr-body-color);
}
html[data-bs-theme="dark"] .table-vcenter td a:not(.btn) { color: #cfd0d3; }
html[data-bs-theme="dark"] .table-vcenter td a:not(.btn):hover { color: #ffffff; }

/* 14.10 Ilerleme cubugu, avatar, kart-link hover: notr ------------------- */
html[data-bs-theme="dark"] .progress { background-color: #26282b; }
html[data-bs-theme="dark"] .progress-bar { background-color: #b7b9bd; }
html[data-bs-theme="dark"] .card-link:hover { border-color: #4a4b50; }
html[data-bs-theme="dark"] .kc-app:hover { background: #26282b; color: #ffffff !important; }
html[data-bs-theme="dark"] .avatar { color: #e6e7e9; }

/* 14.11 Metin ikincil/mavimsi tonlari netlestir -------------------------- */
html[data-bs-theme="dark"] .text-secondary,
html[data-bs-theme="dark"] .text-muted { color: #9a9ca1 !important; }
html[data-bs-theme="dark"] .text-white-50 { color: rgba(230, 231, 233, 0.55) !important; }
html[data-bs-theme="dark"] a { color: var(--tblr-link-color); }
html[data-bs-theme="dark"] a:hover { color: var(--tblr-link-hover-color); }
/* Marka linki gecede notr */
html[data-bs-theme="dark"] .link-marka, html[data-bs-theme="dark"] a.text-marka { color: #cfd0d3 !important; }

/* ==========================================================================
   14.12 GECE MODUNDA BEYAZ (data-bs-theme="light") ADALAR = ust menu acilir
   menuleri (Finans/Operasyon/API submenu, Uygulamalar, Bildirimler, Kullanici).
   SORUN: gece kokunde --tblr-body-color beyaza yakin; Tabler ic tema cakismasi
   yuzunden bu beyaz adalarin ICINDEKI yazi soluk/gorunmez kaliyordu.
   COZUM: adayi acik-temaya SABITLE (koyu metin + beyaz yuzey + notr hover).
   SADECE gece modu; gunduz ust menusu hic etkilenmez. Menu yapisi/rengi
   degismiyor, yalniz okunabilirlik. ust-menu-yapisina-dokunma.
   ========================================================================== */
html[data-bs-theme="dark"] [data-bs-theme="light"] {
    --tblr-body-color: #1f2937;
    --tblr-secondary-color: rgba(31, 41, 55, 0.72);
    --tblr-emphasis-color: #111827;
    color: #1f2937;
}
/* Beyaz yuzeyler (acilir menu + ic kart) gece kokunun koyu ezmesine ragmen beyaz kalir */
html[data-bs-theme="dark"] .dropdown-menu[data-bs-theme="light"],
html[data-bs-theme="dark"] [data-bs-theme="light"] .card {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}
/* Metin ogeleri koyu */
html[data-bs-theme="dark"] [data-bs-theme="light"] .dropdown-item,
html[data-bs-theme="dark"] [data-bs-theme="light"] .list-group-item,
html[data-bs-theme="dark"] [data-bs-theme="light"] .card-title,
html[data-bs-theme="dark"] [data-bs-theme="light"] h1,
html[data-bs-theme="dark"] [data-bs-theme="light"] h2,
html[data-bs-theme="dark"] [data-bs-theme="light"] h3,
html[data-bs-theme="dark"] [data-bs-theme="light"] .kc-app {
    color: #1f2937;
    background-color: transparent;
}
html[data-bs-theme="dark"] [data-bs-theme="light"] .text-secondary,
html[data-bs-theme="dark"] [data-bs-theme="light"] .card-footer a { color: rgba(31, 41, 55, 0.7) !important; }
html[data-bs-theme="dark"] [data-bs-theme="light"] .dropdown-item i,
html[data-bs-theme="dark"] [data-bs-theme="light"] .list-group-item i { color: #4b5563; }
/* Hover/odak + aktif: notr gri (yesil yok), koyu yazi */
html[data-bs-theme="dark"] [data-bs-theme="light"] .dropdown-item:hover,
html[data-bs-theme="dark"] [data-bs-theme="light"] .dropdown-item:focus,
html[data-bs-theme="dark"] [data-bs-theme="light"] .list-group-item-action:hover,
html[data-bs-theme="dark"] [data-bs-theme="light"] .kc-app:hover {
    color: #111827 !important;
    background-color: rgba(0, 0, 0, 0.05);
}
html[data-bs-theme="dark"] .dropdown-menu[data-bs-theme="light"] .dropdown-item.active,
html[data-bs-theme="dark"] .dropdown-menu[data-bs-theme="light"] .dropdown-item.active i {
    background-color: rgba(0, 0, 0, 0.06);
    color: #111827;
}

/* ==========================================================================
   14.13 POPUP ARKAPLANI (backdrop): gece modunda SIYAH, mavimsi degil.
   Tabler backdrop'u var(--tblr-gray-800) kullanir; gece temasinda bu ton
   lacivert-slate (mavimsi). Notr siyaha sabitle + hafif koyulastir.
   Modal + offcanvas + mobil bottom-sheet backdrop'lari kapsar.
   ========================================================================== */
html[data-bs-theme="dark"] .modal-backdrop,
html[data-bs-theme="dark"] .offcanvas-backdrop {
    --tblr-backdrop-bg: #000000;
    --tblr-backdrop-opacity: 0.55;
    background-color: #000000;
}
html[data-bs-theme="dark"] .modal-backdrop.show,
html[data-bs-theme="dark"] .offcanvas-backdrop.show {
    background-color: #000000;
    opacity: 0.55;
    animation: none;
}
