.swal2-popup {
    font-size: 1.4rem !important;
}

.bgBlue {
    background-color: #2196f3 !important;
    color: #fff !important;
}

div:where(.swal2-container) {
    z-index: 999999999999 !important;
}

body {
    background-color: var(--mgd-surface-2, #f9f9f9);
}

.d-flex {
    display: flex;
}

.d-flex-sb {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.formInputMargin {
    margin-left: 0;
}

.formInput {
    margin-top: 10px;
}

.optionTag {
    margin-bottom: 2.5px;
    margin-top: 2.5px;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 12px;
}

.pageTitle {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 0px;
}

.pageDescription {
    font-size: 13px;
    color: var(--mgd-text-muted, #78829d);
    margin-top: 0px;
}

#popupContent {
    width: 500px;
    display: none;
    background: var(--mgd-surface, #fff);
    text-align: left;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 2rem;
    box-shadow: 0 0 0 1px rgba(63, 63, 68, 0.05), 0 1px 3px 0 rgba(63, 63, 68, 0.15);
    border-radius: 4px;
}

#popupOverlay {
    position: fixed;
    display: none;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
}

.popUpHeader {
    position: relative
}

.closePopUp {
    position: absolute;
    right: 0px;
    font-size: 16px;
    top: 0px;
    cursor: pointer;
}

.sidebar {
    width: 300px;
    background-color: var(--mgd-surface, #fff);
    color: var(--mgd-text-muted, #78829d);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.logoContainer {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-items {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    text-align: left;
    margin-top: 30px;
    margin-left: 2rem;
    margin-right: 2rem;
}

.menu-items ul {
    margin-left: 0rem;
    margin-right: 0rem;
}

.menu-items ul li,
.submenu li {
    list-style: none;
    display: flex;
    flex-direction: column;
    border-radius: .475rem;
    padding: .65rem 1rem;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    cursor: pointer;
}

.menu-items-active,
.menu-items ul li:hover {
    background-color: var(--mgd-surface-2, #f9f9f9);
}

.menu-items ul li a {
    color: var(--mgd-text-muted, #78829d);
    text-decoration: none;
}

.menu-items ul li a i {
    margin-right: 10px;
}

.menu-items ul li a span {
    flex-grow: 1;
}

.userDropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background-color: var(--mgd-surface, #fff);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 10px;
}

.userDropdownHeader {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    font-weight: 600;
}

.userDropdown ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.userDropdown ul li {
    padding: 15px 20px;
    text-align: left;
}

.userDropdown a {
    color: var(--mgd-text, black);
    text-decoration: none;
    font-weight: 500;
}


.wrapper {
    padding-left: 300px;
    display: flex;
    flex-direction: column;
}

.header {
    position: relative;
    z-index: 2;
    height: 70px;
    box-sizing: border-box;
    background-color: var(--mgd-surface, #fff);
    transition: left 0.3s ease;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.user-profile {
    position: relative;
    display: inline-block;
}

.user-photo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    margin-bottom: 1rem;
}

.content {
    padding: 3rem;
    background-color: var(--mgd-surface-2, #f9f9f9);
    border-radius: 1.5rem;
    text-align: left;
}

.content article {
    margin-left: 0;
    margin-right: 0;
}

/* ===================================================================
   GENEL TABLO TAŞMA ÇÖZÜMÜ
   Geniş tablolar kart/sayfa dışına taşmasın; kendi kapsayıcısı içinde
   yatay kaydırılsın. DataTables tablolarında scroll, wrapper'da olur;
   DataTables olmayan tablolarda ise kartın kendisinde olur (filtre
   kartlarındaki açılır menüler kırpılmasın diye yalnızca tablo içeren
   ve DataTables wrapper'ı OLMAYAN kartlar hedeflenir).
   =================================================================== */
.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
}

.card:has(table):not(:has(.dataTables_wrapper)) {
    overflow-x: auto;
}

/* Tablolar kapsayıcısından daha geniş olabilir; içerik bozulmadan
   kaydırılabilmesi için tabloyu küçülmeye zorlamıyoruz. */
.card table {
    max-width: none;
}

.menu-btn {
    background-color: var(--mgd-surface, #fff) !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: var(--mgd-text, #000000) !important;
    cursor: pointer !important;
    font-size: 22px !important;
}

#sidebarLogo img {
    position: relative;
    top: 2.5px;
}
/* Mobil Görünüm */

@media (max-width: 1024px) {

    .header {
        position: fixed;
        width: 100%;
    }

    .wrapper {
        padding-left: 0;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        padding-top: 0;
        box-shadow: 6px 0 16px rgba(0, 0, 0, 0.15);

    }

    .menu-items {
        margin-top: 0;
    }

    #sidebarLogo {
        display: none;
    }



    .sidebar.hide-desktop {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 4rem 1rem 1rem 1rem;
        margin-top: 70px;
    }



    #mobileLogo img {
        height: 40px;
    }

    .close-sidebar {
        display: flex;
        justify-content: flex-end;
        margin: 20px;
        font-size: 20px;
        box-sizing: border-box;
    }

    #popupContent,
    #popupContent2 {
        width: 85% !important;
    }

    .variantItemColumns {
        overflow-x: auto;
    }

    #createdProductsTable_wrapper {
        overflow-x: auto !important;
    }
}



@media only screen and (min-width: 1024px) {

    .close-sidebar {
        display: none;
    }

    .sidebar.hide-desktop {
        transform: translateX(-100%);
    }

    .wrapper.hide-desktop {
        padding-left: 0;
    }

    #mobileLogo {
        display: none;
    }

}

@media only screen and (min-width: 1025px) and (max-width: 1400px) {
    .sidebar {
        width: 200px;
    }

    .wrapper {
        padding-left: 200px;
    }

    .menu-items {
        margin-left: 0;
        margin-right: 0;
    }

    #sidebarLogo img {
        height: 40px !important;
    }
}

@media only screen and (min-width: 1024px) {
    .tdProductTitle {
        min-width: 200px;
    }
}

.dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-menu .dropdown-item {
    position: relative;
}

.submenu {
    display: none;
}

.submenu li {
    margin-bottom: 0 !important;
    margin-top: 7px;
    padding-left: 0 !important;
    font-size: 13px;
    font-weight: bold;
}

.dropdown-menu .submenu li a {
    display: block;
    text-decoration: none;
}

.dropdown-menu .submenu li a:hover {
    background-color: var(--mgd-surface-2, #f9f9f9);
}

/* ===================================================================
   GLOBAL RESPONSIVE KATMANI
   Tüm vendor sayfalarının paylaştığı framework kalıplarını (filtre
   form gridleri, sayfa başlıkları, sabit genişlikler, modallar) tek
   yerden mobil uyumlu hale getirir. Sayfaya özel kurallar yine ilgili
   dosyada kalır; burada yalnızca ortak iskelet hedeflenir.
   =================================================================== */

/* ---- Tablet ve altı ---- */
@media (max-width: 768px) {

    /* Filtre / form kartlarındaki Skeleton kolonları tek sütuna iner.
       Yalnızca .card-body içindekiler hedeflenir; içerik kolonları
       (dashboard vb.) etkilenmez. */
    .card-body > .columns,
    .card-body > .columns > .columns {
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* product-list / created-products vb. filtre "Ara/Temizle" alanı */
    .filterSearch {
        width: 100% !important;
        padding-top: 10px !important;
    }

    /* Marka vb. TomSelect alanları tam genişlik */
    .ts-wrapper {
        width: 100% !important;
    }

    /* Sayfa başlığı + sağdaki aksiyon butonları dar ekranda sarsın */
    .content > .d-flex-sb,
    .content > .d-flex.d-flex-sb,
    .content > section > .d-flex-sb {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Başlık satırındaki tek başına buton tam genişlik (sıkışmasın) */
    .content > .d-flex-sb > div:last-child:not(:only-child) > .button:only-child,
    .content > .d-flex.d-flex-sb > div:last-child:not(:only-child) > .button:only-child {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Buton grupları taşmadan alt satıra geçsin */
    .button-group {
        flex-wrap: wrap;
    }
}

/* ---- Telefon ---- */
@media (max-width: 600px) {

    /* İçerik kenar boşluğunu biraz daralt (1024px bloğu 1rem veriyor;
       çok dar ekranda daha da sıkıştır) */
    .content {
        padding: 4rem 0.75rem 1rem 0.75rem;
    }

    /* Kalan tüm Skeleton kolonları tek sütun */
    .columns {
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* Sabit genişlikli popup/legacy kutular ekrana sığsın */
    #popupContent,
    #popupContent2 {
        width: 92% !important;
        max-width: 92vw !important;
    }

    /* Inline yazılmış sabit genişlikli modal kutuları (max-width:NNNpx;
       margin:80px auto kalıbı) telefonda kenarlara yapışmasın */
    [id$="ModalOverlay"] > div,
    [class*="modalBox"],
    [class*="modal-box"] {
        margin: 40px 12px !important;
        max-width: calc(100vw - 24px) !important;
    }

    /* Başlıklarda font biraz küçülsün */
    .pageTitle {
        font-size: 18px;
    }

    /* Inline yazılmış çok sütunlu form gridleri telefonda tek sütuna iner.
       Birçok sayfada (hepsijet başvuru/mağaza, sözleşme atama vb.)
       style="grid-template-columns: repeat(2, 1fr)" kalıbı kullanılıyor;
       attribute seçici ile hepsi tek seferde mobil uyumlu hale gelir. */
    [style*="grid-template-columns: repeat(2"],
    [style*="grid-template-columns:repeat(2"],
    [style*="grid-template-columns: repeat(3"],
    [style*="grid-template-columns:repeat(3"],
    [style*="grid-template-columns: repeat(4"],
    [style*="grid-template-columns:repeat(4"],
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}