/* =============================================================================
   EMM Runtime Overrides — kmt-datatable / sayfa <style> sonrası yüklenir
   ============================================================================= */

/* ---- Sidebar genişlik (Syncfusion inline + Adminto 245px üzerine) ---- */
html body .emm-shell.sidebar-open .e-sidebar.e-left,
html body .emm-shell.sidebar-open .e-sidebar,
html body .emm-shell.sidebar-open .e-sidebar .e-sidebar-inner {
    width: var(--emm-shell-sidebar-width, 380px) !important;
    min-width: var(--emm-shell-sidebar-width, 380px) !important;
    max-width: var(--emm-shell-sidebar-width, 380px) !important;
}

/* Syncfusion + sidebar: inset panel + yükseklik flex zinciri */
html body .emm-shell .e-sidebar,
html body .emm-shell .e-sidebar.e-left {
    top: var(--emm-shell-sidebar-inset, 3px) !important;
    left: var(--emm-shell-sidebar-inset-left, 6px) !important;
    height: calc(100vh - (var(--emm-shell-sidebar-inset, 3px) * 2)) !important;
    max-height: calc(100vh - (var(--emm-shell-sidebar-inset, 3px) * 2)) !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.04) !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

html body .emm-shell .e-sidebar .e-sidebar-inner {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

html body .emm-shell .e-sidebar::-webkit-scrollbar,
html body .emm-shell .e-sidebar .e-sidebar-inner::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

html body .emm-shell .sidebar {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    background: #ffffff !important;
    overflow: hidden !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

html body .emm-shell .sidebar > .emm-sidebar-nav,
html body .emm-shell .sidebar > div:last-child {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* ---- Logo bandı: beyaz + logo | ok toggle ---- */
html body .emm-shell .sidebar .emm-sidebar-brand,
html body .emm-shell .sidebar .topnav,
html body .emm-shell .sidebar .topnav.emm-sidebar-brand,
html body .emm-shell .sidebar .navbar,
html body .emm-shell .sidebar .navbar-dark,
html body .emm-shell .sidebar .navbar.navbar-dark {
    background-color: #ffffff !important;
    background-image: none !important;
    color: #0f172a !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    min-height: var(--emm-topbar-height, 64px);
    height: var(--emm-topbar-height, 64px);
    padding: 0 0.85rem !important;
    border-bottom: 1px solid #e8eef5 !important;
    box-shadow: none !important;
    flex-shrink: 0;
}

html body .emm-shell .sidebar .emm-sidebar-brand-logo,
html body .emm-shell .sidebar .emm-sidebar-brand a.emm-sidebar-brand-logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    background: #ffffff !important;
}

/* Logo dosyası siyah zeminliyse: beyaz kutu + yumuşak gölge; tam bandı boyamasın */
html body .emm-shell .sidebar .emm-sidebar-brand img,
html body .emm-shell .sidebar .topnav img.clickable,
html body .emm-shell .sidebar .topnav img {
    max-height: 44px !important;
    max-width: min(220px, 85%) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    background: #ffffff !important;
    border-radius: 6px;
}

html body .emm-shell .sidebar,
html body .emm-shell .e-sidebar,
html body .emm-shell .sidebar .kmt-nav-scroll,
html body .emm-shell .sidebar .kmt-menu-search-wrap,
html body .emm-shell .sidebar .topnav {
    background-color: #ffffff !important;
    background-image: none !important;
    color: #0f172a !important;
}

html body .emm-shell .sidebar {
    border: none !important;
    box-shadow: none !important;
}

html body .emm-shell .sidebar .side-nav .side-nav-link,
html body .emm-shell .sidebar .side-nav .side-nav-link .menu-text,
html body .emm-shell .sidebar .side-nav .side-nav-link .menu-icon,
html body .emm-shell .sidebar .side-nav .side-nav-link .menu-icon i,
html body .emm-shell .sidebar .side-nav .side-nav-link .menu-arrow {
    color: #475569 !important;
}

html body .emm-shell .sidebar .side-nav .side-nav-link .menu-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html body .emm-shell .sidebar .side-nav .side-nav-link:hover {
    color: #eb7b1b !important;
    background-color: rgba(235, 123, 27, 0.08) !important;
    border-color: rgba(235, 123, 27, 0.18) !important;
}

html body .emm-shell .sidebar .side-nav .side-nav-link:hover .menu-text,
html body .emm-shell .sidebar .side-nav .side-nav-link:hover .menu-icon,
html body .emm-shell .sidebar .side-nav .side-nav-link:hover .menu-icon i,
html body .emm-shell .sidebar .side-nav .side-nav-link:hover .menu-arrow {
    color: #eb7b1b !important;
}

html body .emm-shell .sidebar .side-nav .side-nav-link:hover .menu-icon {
    background: rgba(235, 123, 27, 0.15) !important;
}

html body .emm-shell .sidebar .side-nav .side-nav-link.active,
html body .emm-shell .sidebar .kmt-dynamic-nav .side-nav-link.active,
html body .emm-shell .sidebar .side-nav .side-nav-link.active .menu-text,
html body .emm-shell .sidebar .side-nav .side-nav-link.active .menu-icon i {
    color: var(--emm-brand-primary, #003b95) !important;
    background-color: rgba(var(--emm-brand-primary-rgb, 0, 59, 149), 0.12) !important;
    box-shadow: inset 3px 0 0 var(--emm-brand-accent, #eb7b1b);
    font-weight: 600;
}

html body .emm-shell .sidebar .kmt-nav-group.kmt-open > .side-nav-link,
html body .emm-shell .sidebar .kmt-nav-group.kmt-open > .side-nav-link .menu-text {
    color: var(--emm-brand-primary, #003b95) !important;
    background-color: rgba(var(--emm-brand-primary-rgb, 0, 59, 149), 0.06) !important;
}

/* Kaydırılabilir menü — scrollbar gizli; iç yatay padding yok (panel dış inset) */
html body .emm-shell .sidebar > .emm-sidebar-nav,
html body .emm-shell .sidebar > div:last-child {
    padding: 0 !important;
    box-sizing: border-box;
}

html body .emm-shell.sidebar-closed .sidebar > .emm-sidebar-nav,
html body .emm-shell.sidebar-closed .sidebar > div:last-child {
    padding: 0 !important;
}

html body .emm-shell .sidebar .kmt-nav-scroll {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 0 0.75rem !important;
    border-radius: 0 !important;
    background-color: #ffffff !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

html body .emm-shell .sidebar .kmt-nav-scroll::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
}

html body .emm-shell .sidebar .kmt-menu-search-wrap {
    padding: 0.65rem 0.65rem 0.4rem !important;
    border-radius: 0;
}

html body .emm-shell .sidebar .side-nav {
    padding: 0.1rem 0.35rem 0.85rem !important;
}

html body .emm-shell .sidebar .side-nav .side-nav-link {
    flex-wrap: nowrap !important;
    padding: 0.55rem 0.55rem !important;
    gap: 0.55rem !important;
}

html body .emm-shell .sidebar .side-nav .side-nav-link .menu-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

html body .emm-shell .sidebar .side-nav .side-nav-link .menu-icon {
    width: 1.85rem !important;
    height: 1.85rem !important;
    flex: 0 0 1.85rem !important;
    border-radius: 8px !important;
}

html body .emm-shell .sidebar .kmt-menu-search-input {
    border: 1px solid #dbe3f0 !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    max-width: none !important;
    width: 100% !important;
}

html body .emm-shell .sidebar .kmt-menu-search-input:focus {
    border-color: var(--emm-brand-primary, #003b95) !important;
    box-shadow: 0 0 0 3px rgba(var(--emm-brand-primary-rgb, 0, 59, 149), 0.15) !important;
}

/* Bilsoft koyu mavi — Bootstrap / Adminto / DataTables parlak mavisini ezer */
html body {
    --bs-primary: #003b95 !important;
    --bs-primary-rgb: 0, 59, 149 !important;
    --ct-primary: #003b95 !important;
    --ct-primary-rgb: 0, 59, 149 !important;
    --ct-menu-item-hover-color: #003b95 !important;
    --ct-menu-item-active-color: #003b95 !important;
    --emm-table-header-bg: #003b95 !important;
}

html body table.dataTable thead th,
html body table.dataTable:not(.nace-dt) thead th,
html body #fixed-columns-datatable thead th,
html body #fixed-columns-datatable_wrapper table.dataTable thead th,
html body .dt-container #fixed-columns-datatable thead th,
html body .dt-container table.dataTable thead th,
html body .dataTables_scrollHead thead th,
html body .emm-shell .table > thead > tr > th,
html body .emm-shell .e-grid .e-gridheader .e-headercell,
html body .emm-shell .e-grid .e-headercell,
html body .e-grid .e-gridheader .e-headercell,
html body .e-grid .e-headercell {
    background-color: #003b95 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Syncfusion zebra + hover — taxpayer-list */
html body .emm-shell .e-grid .e-gridcontent tbody tr.e-row:nth-of-type(odd) .e-rowcell {
    background-color: #ffffff !important;
}

html body .emm-shell .e-grid .e-gridcontent tbody tr.e-row:nth-of-type(even) .e-rowcell {
    background-color: #f2f2f2 !important;
}

html body .emm-shell .e-grid .e-gridcontent tbody tr.e-row:hover .e-rowcell {
    background-color: rgba(235, 123, 27, 0.14) !important;
}

html body .emm-shell table.dataTable:not(.nace-dt) tbody tr:nth-child(odd) > td,
html body .emm-shell #fixed-columns-datatable tbody tr:nth-child(odd) > td {
    background-color: #ffffff !important;
}

html body .emm-shell table.dataTable:not(.nace-dt) tbody tr:nth-child(even) > td,
html body .emm-shell #fixed-columns-datatable tbody tr:nth-child(even) > td {
    background-color: #f2f2f2 !important;
}

html body .emm-shell table.dataTable:not(.nace-dt) tbody tr:hover > td,
html body .emm-shell #fixed-columns-datatable tbody tr:hover > td {
    background-color: rgba(235, 123, 27, 0.14) !important;
}

/* Bootstrap .table listeleri — Hyper inset mavi gölgeyi kapat */
html body .emm-shell .table > thead > tr > th {
    background-color: #003b95 !important;
    color: #fff !important;
    box-shadow: none !important;
}

html body .emm-shell .table > :not(caption) > * > *,
html body .emm-shell table.table.dataTable > tbody > tr > *,
html body .emm-shell table.table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) > *,
html body .emm-shell table.table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > * {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    --ct-table-bg-type: transparent !important;
    --ct-table-bg-state: transparent !important;
    --ct-table-accent-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
}

html body .emm-shell .table-striped > tbody > tr:nth-of-type(odd) > *,
html body .emm-shell table.dataTable tbody tr:nth-child(odd) > td,
html body .emm-shell table.dataTable tbody tr.odd > td {
    --bs-table-bg-type: #ffffff;
    --ct-table-bg-type: transparent;
    background-color: #ffffff !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

html body .emm-shell .table-striped > tbody > tr:nth-of-type(even) > *,
html body .emm-shell table.dataTable tbody tr:nth-child(even) > td,
html body .emm-shell table.dataTable tbody tr.even > td {
    --bs-table-bg-type: #f2f2f2;
    --ct-table-bg-type: transparent;
    background-color: #f2f2f2 !important;
    background: #f2f2f2 !important;
    box-shadow: none !important;
}

html body .emm-shell .table-hover > tbody > tr:hover > *,
html body .emm-shell table.dataTable tbody tr:hover > td {
    --bs-table-bg-state: rgba(235, 123, 27, 0.14);
    --ct-table-bg-state: transparent;
    background-color: rgba(235, 123, 27, 0.14) !important;
    background: rgba(235, 123, 27, 0.14) !important;
    box-shadow: none !important;
}

/* Sayfa başına kayıt paneli — son yüklenen stiller (page <style> ezmesin) */
html body .emm-shell .dataTables_length,
html body .emm-shell .dt-length,
html body .dt-container .dt-length,
html body .dataTables_wrapper .dataTables_length {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    padding: 0.4rem 0.75rem !important;
    border: 1px solid #d8dee6 !important;
    border-radius: 8px !important;
    background: #f7f8fa !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

html body .emm-shell .dataTables_length select,
html body .emm-shell .dt-length select,
html body .dt-container .dt-length select,
html body .dataTables_wrapper .dataTables_length select {
    min-width: 4.75rem !important;
    height: 32px !important;
    padding: 0.2rem 1.9rem 0.2rem 0.55rem !important;
    border: 1px solid #c5ccd6 !important;
    border-radius: 6px !important;
    background-color: #fff !important;
    font-weight: 600 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

html body .emm-shell .e-grid {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    overflow: hidden;
}

html body .emm-shell .btn-primary,
html body .emm-shell a.btn-primary,
html body .btn.btn-primary {
    background-color: #003b95 !important;
    border-color: #003b95 !important;
    color: #fff !important;
}

/* Ekle / Yeni ... butonları — Bilsoft turuncu */
html body .emm-shell .btn-add,
html body .emm-shell .arial-button.btn-add,
html body .btn.btn-add {
    background-color: #eb7b1b !important;
    border-color: #eb7b1b !important;
    color: #fff !important;
}

html body .emm-shell .btn-primary:hover,
html body .btn.btn-primary:hover {
    background-color: #002d73 !important;
    border-color: #002d73 !important;
}

html body .emm-shell .btn-add:hover:not(:disabled),
html body .emm-shell .arial-button.btn-add:hover:not(:disabled),
html body .btn.btn-add:hover:not(:disabled) {
    background-color: #d46a0f !important;
    border-color: #d46a0f !important;
    color: #fff !important;
}

html body .emm-shell .page-item.active .page-link,
html body .emm-shell .dataTables_paginate .paginate_button.current,
html body .emm-shell .dt-paging .dt-paging-button.current {
    background-color: #003b95 !important;
    border-color: #003b95 !important;
    color: #fff !important;
}

/* length + arama satırı — dikey hiza (DT2 .dt-container) */
html body .emm-shell .dt-container > .kmt-dt-lf-row,
html body .emm-shell .dt-container > .d-flex.justify-content-between.align-items-center {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin-bottom: 0.25rem !important;
}

/* Sayfa başına + arama ile tablo arası kopukluk (Blazor + DT) */
html body .emm-shell .mukellef-rapor-toolbar,
html body .emm-shell [id$="-datatable-toolbar"],
html body .emm-shell #mukellef-list-datatable-toolbar {
    margin-bottom: 0.25rem !important;
}

html body .emm-shell [id$="-datatable-toolbar"] > .d-flex.justify-content-between,
html body .emm-shell #mukellef-list-datatable-toolbar > .d-flex.justify-content-between {
    margin-bottom: 0 !important;
}

html body .emm-shell .mukellef-rapor-table-wrap,
html body .emm-shell .kmt-dt-table-scroll,
html body .emm-shell #datatable-container > table,
html body .emm-shell .dt-container .kmt-dt-table-scroll {
    margin-top: 0 !important;
}

html body .emm-shell .dt-container .dt-layout-row {
    margin-bottom: 0.25rem !important;
}

html body .emm-shell .dt-container > .kmt-dt-lf-row > .dt-length,
html body .emm-shell .dt-container > .kmt-dt-lf-row > .dt-search,
html body .emm-shell .dt-container > .d-flex.justify-content-between > .dt-length,
html body .emm-shell .dt-container > .d-flex.justify-content-between > .dt-search {
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    align-self: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

html body .emm-shell .dt-container > .kmt-dt-lf-row .dt-search input,
html body .emm-shell .dt-container > .d-flex.justify-content-between .dt-search input {
    height: 38px !important;
    min-height: 38px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

html body .emm-shell .dt-container div.dt-search input,
html body .emm-shell .dataTables_wrapper .dataTables_filter input,
html body .emm-shell .mukellef-grid-search,
html body .emm-shell #srcText.mukellef-grid-search {
    width: min(420px, 100%) !important;
    min-width: 280px !important;
    border-color: #cbd5e1 !important;
    box-sizing: border-box !important;
}

/* Arama kutusu sağ kenarı kart kenarına yapışıp kesilmesin */
html body .emm-shell .dt-container div.dt-search,
html body .emm-shell .dataTables_wrapper .dataTables_filter,
html body .emm-shell .dt-container .dt-layout-cell.dt-end {
    padding-right: 0.75rem !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
}

html body .emm-shell .dt-container div.dt-search input,
html body .emm-shell .dataTables_wrapper .dataTables_filter input {
    margin-right: 0.15rem !important;
    max-width: 100% !important;
}

@media (max-width: 991.98px) {
    html body .emm-shell .mukellef-grid-search,
    html body .emm-shell #srcText.mukellef-grid-search,
    html body .emm-shell .dt-container div.dt-search input,
    html body .emm-shell .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        min-width: 0 !important;
    }

    html body .emm-shell .btn-add,
    html body .emm-shell .arial-button.btn-add {
        width: 100% !important;
    }

    html body .emm-shell .mukellef-list-grid-wrap,
    html body .emm-shell #datatable-container,
    html body .emm-shell .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    html body .emm-shell #datatable-container {
        overflow-x: visible !important;
    }

    html body .emm-shell .kmt-dt-table-scroll,
    html body .emm-shell .nace-body-scroll {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    html body .emm-shell .kmt-dt-table-scroll table#fixed-columns-datatable,
    html body .emm-shell .kmt-dt-table-scroll table.fatura-bilgi-table,
    html body .emm-shell .fatura-bilgi-table-host .kmt-dt-table-scroll table {
        width: max(100%, 980px) !important;
        min-width: 980px !important;
        max-width: none !important;
    }
}

/* Bildirim rozeti — Bilsoft mavi, temiz pill */
html body .emm-shell .app-topbar .noti-icon-badge {
    background: #003b95 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    min-width: 1.15rem !important;
    height: 1.15rem !important;
    padding: 0 0.3rem !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border-radius: 999px !important;
    box-shadow: 0 1px 4px rgba(0, 59, 149, 0.28) !important;
}

html body .emm-shell .btn-outline-danger.mukellef-export-btn,
html body .emm-shell .btn-outline-danger:has(.fa-file-pdf) {
    color: #eb7b1b !important;
    border-color: #eb7b1b !important;
}

html body .emm-shell .btn-outline-danger.mukellef-export-btn:hover,
html body .emm-shell .btn-outline-danger:has(.fa-file-pdf):hover {
    background: #eb7b1b !important;
    color: #fff !important;
}

html body .emm-shell #fixed-columns-datatable .btn-success.btn-edit-delete:has(.fa-pen),
html body .emm-shell #fixed-columns-datatable .btn-success.btn-edit-delete:has(.fa-pencil),
html body .emm-shell .btn-edit-delete:has(.fa-pen),
html body .emm-shell .btn-edit-delete:has(.fa-pencil) {
    background: #eb7b1b !important;
    border-color: #eb7b1b !important;
    color: #fff !important;
}

html body .emm-shell .sidebar-toggle-btn:hover {
    background: #eb7b1b !important;
    border-color: #eb7b1b !important;
    color: #fff !important;
}

/* Üst panel + içerik: sağ/sol gutter, üst hiza = menü paneli */
html body .emm-shell .emm-main-column {
    width: 100% !important;
    max-width: 100% !important;
    padding-top: var(--emm-shell-sidebar-inset, 3px) !important;
    padding-bottom: var(--emm-page-padding, 1.5rem) !important;
    padding-left: var(--emm-shell-gutter, clamp(1.25rem, 2.5vw, 1.75rem)) !important;
    padding-right: var(--emm-shell-gutter, clamp(1.25rem, 2.5vw, 1.75rem)) !important;
    gap: 1.15rem !important;
    box-sizing: border-box !important;
}

html body .emm-shell .emm-topbar-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    min-height: var(--emm-topbar-height, 80px) !important;
    height: var(--emm-topbar-height, 80px) !important;
    padding: 0 1rem !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.04) !important;
    top: var(--emm-shell-sidebar-inset, 3px) !important;
}

html body .emm-shell .sidebar .emm-sidebar-brand,
html body .emm-shell .sidebar .topnav.emm-sidebar-brand {
    min-height: var(--emm-topbar-height, 80px) !important;
    height: var(--emm-topbar-height, 80px) !important;
    padding: 0 0.85rem !important;
}

/* Menü kapalı → üst panelden yeniden aç */
html body .emm-shell.sidebar-closed .emm-topbar-menu-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    background: #003b95 !important;
    color: #fff !important;
    border-color: #003b95 !important;
}

html body .emm-shell.sidebar-closed .sidebar .emm-sidebar-brand-logo,
html body .emm-shell.sidebar-closed .sidebar .topnav img {
    display: none !important;
}

html body .emm-shell.sidebar-closed .sidebar .sidebar-toggle-btn {
    display: inline-flex !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto !important;
    background: #003b95 !important;
    color: #fff !important;
    border-color: #003b95 !important;
}

html body .emm-shell.sidebar-open .e-sidebar.e-left,
html body .emm-shell.sidebar-open .e-sidebar,
html body .emm-shell.sidebar-open .e-sidebar .e-sidebar-inner {
    width: var(--emm-shell-sidebar-width, 320px) !important;
    min-width: var(--emm-shell-sidebar-width, 320px) !important;
    max-width: var(--emm-shell-sidebar-width, 320px) !important;
}

html body .emm-shell .app-topbar,
html body .emm-shell header.app-topbar,
html body .emm-shell .emm-topbar {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    margin-left: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    padding-left: 0.25rem !important;
    padding-right: 0.5rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html body .emm-shell .app-topbar .page-container.topbar-menu,
html body .emm-shell .app-topbar .topbar-menu {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

html body .emm-shell .emm-content,
html body .emm-shell .content.emm-content {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
}

html body .emm-shell .emm-welcome {
    width: 100% !important;
    max-width: none !important;
}

/* Toggle: menü logo satırında */
html body .emm-shell .sidebar .sidebar-toggle-btn {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

html body .emm-shell .sidebar .emm-sidebar-brand {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    background: #ffffff !important;
}

html body .emm-shell .emm-topbar-menu-btn {
    display: none !important;
}

html body .emm-shell.sidebar-closed .emm-topbar-menu-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* İçerik genişlik */
html body .emm-shell .emm-main,
html body .emm-shell > .main {
    background: var(--emm-bg, #f5f7fb) !important;
}

html body .emm-shell .emm-content,
html body .emm-shell .content.emm-content {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
}

html body .emm-shell .emm-content > .row.mx-0,
html body .emm-shell .emm-content > .emm-page,
html body .emm-shell .emm-content > .emm-page > .row.mx-0 {
    max-width: none !important;
    width: 100%;
}

html body .emm-shell .emm-content > .row.mx-0 > .col-12 > .card,
html body .emm-shell .emm-content > .emm-page > .row.mx-0 > .col-12 > .card {
    border-radius: 14px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05) !important;
}

@media (min-width: 768px) {
    /* Eski content sarmalayıcıları — emm-main-column padding'ine dokunma */
    html body .emm-shell .emm-main > div.content,
    html body .emm-shell .main > div.content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

html body .emm-shell .app-topbar {
    background: transparent !important;
    border-bottom: none !important;
}

@media (min-width: 1200px) {
    html body .emm-shell .emm-main-column {
        padding-left: clamp(1.5rem, 2.8vw, 2rem) !important;
        padding-right: clamp(1.5rem, 2.8vw, 2rem) !important;
    }
}

/* ---- Mobil: üst panel hizası + mükellef listesi kaydırma/sayfalama ---- */
@media (max-width: 991.98px) {
    html body .emm-shell .emm-topbar-wrap {
        display: flex !important;
        align-items: center !important;
        height: 56px !important;
        min-height: 56px !important;
        max-height: 56px !important;
        padding: 0 0.45rem 0 0.3rem !important;
        gap: 0.2rem !important;
        overflow: visible !important;
    }

    html body .emm-shell .emm-topbar-menu-btn,
    html body .emm-shell.sidebar-closed .emm-topbar-menu-btn,
    html body .emm-shell.sidebar-open .emm-topbar-menu-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 36px !important;
        width: 36px !important;
        height: 36px !important;
        margin: 0 !important;
        align-self: center !important;
    }

    html body .emm-shell .sidebar .emm-sidebar-brand,
    html body .emm-shell .sidebar .topnav.emm-sidebar-brand {
        min-height: 56px !important;
        height: 56px !important;
    }

    html body .emm-shell .emm-topbar-main,
    html body .emm-shell .emm-topbar-main .app-topbar,
    html body .emm-shell .app-topbar .topbar-menu,
    html body .emm-shell .app-topbar .page-container.topbar-menu {
        height: 100% !important;
        min-height: 0 !important;
        display: flex !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    html body .emm-shell .app-topbar .logo {
        display: none !important;
    }

    html body .emm-shell .app-topbar .topbar-menu > .d-flex:first-child:not(:has(.topbar-item)) {
        display: none !important;
    }

    html body .emm-shell .app-topbar .topbar-menu > .d-flex:last-child {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0.1rem !important;
        margin-left: auto !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    html body .emm-shell .app-topbar .topbar-item {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
    }

    html body .emm-shell .app-topbar .topbar-link {
        width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
    }

    html body .emm-shell .app-topbar .nav-user .topbar-link {
        width: auto !important;
        min-width: 34px !important;
        padding: 0 0.15rem !important;
    }

    html body .emm-shell .app-topbar .nav-user img,
    html body .emm-shell .app-topbar .temsilciImage {
        width: 30px !important;
        height: 30px !important;
        margin: 0 !important;
    }

    html body .emm-shell .mukellef-list-grid-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    html body .emm-shell .mukellef-list-grid-wrap .e-grid {
        min-width: 960px !important;
        width: max(100%, 960px) !important;
        max-width: none !important;
    }

    html body .emm-shell .mukellef-list-grid-wrap .e-gridcontent,
    html body .emm-shell .mukellef-list-grid-wrap .e-content {
        overflow-x: visible !important;
    }

    html body .emm-shell .mukellef-list-dt-footer ul.pagination,
    html body .emm-shell .mukellef-list-dt-footer .pagination {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.2rem !important;
        float: none !important;
        width: max-content !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    html body .emm-shell .mukellef-list-dt-footer .pagination .page-item {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        width: auto !important;
        float: none !important;
    }

    html body .emm-shell .mukellef-list-dt-footer .pagination .page-link {
        display: inline-flex !important;
        width: auto !important;
        min-width: 2rem;
        white-space: nowrap !important;
        padding: 0.3rem 0.5rem !important;
    }
}

/* Defter Bilgileri toolbar — mobil üst üste binme kilidi */
html body .emm-shell .defter-list-toolbar {
    display: block !important;
    width: 100% !important;
    clear: both !important;
}

html body .emm-shell .defter-list-add-row,
html body .emm-shell .defter-list-export-row,
html body .emm-shell .defter-list-filters-row {
    display: block !important;
    position: static !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 0 0 0.65rem 0 !important;
    inset: auto !important;
    z-index: auto !important;
}

html body .emm-shell .defter-list-filters-row {
    margin-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.65rem !important;
}

html body .emm-shell .defter-list-add-btn.btn-add {
    display: block !important;
    width: 100% !important;
    position: static !important;
    float: none !important;
}

html body .emm-shell .defter-list-export-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.5rem !important;
}

html body .emm-shell .defter-list-export-btn {
    flex: 1 1 0 !important;
    position: static !important;
    float: none !important;
    margin: 0 !important;
}

html body .emm-shell .defter-list-page-size {
    align-self: flex-start !important;
    width: auto !important;
}

@media (min-width: 992px) {
    html body .emm-shell .defter-list-toolbar {
        display: grid !important;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "add export"
            "filters filters";
        gap: 0.75rem;
        align-items: start;
    }

    html body .emm-shell .defter-list-add-row {
        grid-area: add;
        width: auto !important;
        margin: 0 !important;
    }

    html body .emm-shell .defter-list-add-btn.btn-add {
        width: auto !important;
        display: inline-flex !important;
    }

    html body .emm-shell .defter-list-export-row {
        grid-area: export;
        width: auto !important;
        margin: 0 !important;
        justify-content: flex-end !important;
    }

    html body .emm-shell .defter-list-export-btn {
        flex: 0 0 auto !important;
    }

    html body .emm-shell .defter-list-filters-row {
        grid-area: filters;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin: 0 !important;
    }
}

/* E-Defter Bilgileri — Excel/PDF host + desktop yatay scroll kapalı */
html body .emm-shell .edefter-list-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
}

html body .emm-shell .edefter-list-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin: 0 0 0.75rem 0 !important;
    box-sizing: border-box !important;
    padding-right: 0 !important;
}

html body .emm-shell .edefter-list-toolbar .btn-add,
html body .emm-shell .edefter-list-add-btn.btn-add {
    margin-bottom: 0 !important;
    float: none !important;
    position: static !important;
}

html body .emm-shell .edefter-list-add-row {
    display: flex !important;
    flex: 1 1 auto !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
}

html body .emm-shell .edefter-list-add-btn.btn-add {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
}

html body .emm-shell .edefter-list-export-host {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
    min-width: 0 !important;
}

html body .emm-shell .edefter-list-export-host .kmt-dt-top-toolbar,
html body .emm-shell .edefter-list-export-host div.dt-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
    float: none !important;
    position: static !important;
    width: auto !important;
    margin: 0 !important;
    justify-content: flex-end !important;
}

html body .emm-shell .edefter-list-export-host .kmt-dt-top-toolbar .btn,
html body .emm-shell .edefter-list-export-host .dt-buttons .btn {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
}

html body .emm-shell .edefter-list-table-host {
    display: block !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

html body .emm-shell .edefter-list-table,
html body .emm-shell .edefter-list-table-host table.dataTable {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}

@media (max-width: 991.98px) {
    html body .emm-shell .edefter-list-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    html body .emm-shell .edefter-list-add-row,
    html body .emm-shell .edefter-list-export-host {
        width: 100% !important;
    }

    html body .emm-shell .edefter-list-add-btn.btn-add {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }

    html body .emm-shell .edefter-list-export-host .kmt-dt-top-toolbar,
    html body .emm-shell .edefter-list-export-host div.dt-buttons {
        width: 100% !important;
        justify-content: stretch !important;
    }

    html body .emm-shell .edefter-list-export-host .kmt-dt-top-toolbar .btn,
    html body .emm-shell .edefter-list-export-host .dt-buttons .btn {
        flex: 1 1 calc(50% - 0.35rem) !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    html body .emm-shell .edefter-list-table-host {
        overflow-x: auto !important;
    }
}

@media (min-width: 992px) {
    html body .emm-shell .edefter-list-toolbar {
        flex-wrap: nowrap !important;
        margin-bottom: 0.65rem !important;
    }

    html body .emm-shell .edefter-list-add-btn.btn-add {
        width: auto !important;
        display: inline-flex !important;
    }

    /* Windows / desktop: arama+tooltip kırpılmasın; yatay scroll table-layout ile engellenir */
    html body .emm-shell .edefter-list-table-host,
    html body .emm-shell .edefter-list-table-host .dataTables_wrapper,
    html body .emm-shell .edefter-list-table-host .dt-container {
        overflow: visible !important;
        max-width: 100% !important;
    }
}

/* =============================================================================
   Global mobil güçlendirme (tüm liste sayfaları) — scroll sadece tablonun altında
   ============================================================================= */
@media (max-width: 991.98px) {
    html body .emm-shell #datatable-container,
    html body .emm-shell .dataTables_wrapper,
    html body .emm-shell .dt-container {
        overflow-x: visible !important;
    }

    html body .emm-shell .kmt-dt-table-scroll,
    html body .emm-shell .nace-body-scroll,
    html body .emm-shell .mukellef-list-grid-wrap,
    html body .emm-shell .defter-list-table-wrap,
    html body .emm-shell .mukellef-rapor-table-wrap,
    html body .emm-shell .table-responsive:not(.dt-container) {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-width: 100% !important;
    }

    html body .emm-shell .kmt-dt-table-scroll #fixed-columns-datatable,
    html body .emm-shell .kmt-dt-table-scroll table.dataTable,
    html body .emm-shell .kmt-dt-table-scroll table.table.nowrap,
    html body .emm-shell .defter-list-table-wrap table,
    html body .emm-shell .mukellef-rapor-table-wrap table {
        width: max(100%, 960px) !important;
        min-width: 960px !important;
        max-width: none !important;
    }

    html body .emm-shell .mukellef-list-grid-wrap .e-grid,
    html body .emm-shell [class*="-grid-wrap"] .e-grid {
        min-width: 960px !important;
        width: max(100%, 960px) !important;
        max-width: none !important;
    }

    html body .emm-shell .btn-add,
    html body .emm-shell .arial-button.btn-add {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
        float: none !important;
    }

    html body .emm-shell .kmt-dt-top-toolbar,
    html body .emm-shell div.dt-buttons {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        gap: 0.5rem !important;
        float: none !important;
        position: static !important;
    }

    html body .emm-shell .kmt-dt-top-toolbar .btn,
    html body .emm-shell .dt-buttons .btn {
        flex: 1 1 calc(50% - 0.35rem) !important;
        margin: 0 !important;
    }

    html body .emm-shell .dataTables_filter input,
    html body .emm-shell .dt-search input,
    html body .emm-shell .mukellef-grid-search {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 575.98px) {
    html body .emm-shell .kmt-dt-table-scroll #fixed-columns-datatable,
    html body .emm-shell .kmt-dt-table-scroll table.dataTable,
    html body .emm-shell .mukellef-list-grid-wrap .e-grid,
    html body .emm-shell [class*="-grid-wrap"] .e-grid {
        min-width: 860px !important;
        width: max(100%, 860px) !important;
    }

    html body .emm-shell [class*="-detail-modal"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    html body .emm-shell [class*="-detail-body"] {
        grid-template-columns: 1fr !important;
    }
}