/* =========================================================
   File: assets/css/custom-overrides.css
   Purpose: Premium UI Enhancements (Toastr + DataTable + UI Fixes)
   ========================================================= */


/* =========================================================
   PREMIUM ANIMATED TOASTR
   ========================================================= */

#toast-container {
    z-index: 999999 !important;
    pointer-events: auto;
}

#toast-container.toast-top-right {
    top: 14px !important;
    right: 14px !important;
}

#toast-container > .toast {
    position: relative;
    overflow: hidden;
    width: 360px;
    margin-bottom: 12px;
    padding: 16px 18px 16px 76px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18) !important;
    background-image: none !important;
    opacity: 1 !important;
    color: #1f2937 !important;
    font-size: 13px;
    line-height: 1.45;
    backdrop-filter: blur(3px);
    animation: toastDropTilt 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
    transform-origin: top right;
}

#toast-container > .toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
}

#toast-container > .toast::after {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%) scale(0.4);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: toastIconPop 0.38s ease-out 0.30s forwards;
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827 !important;
}

.toast-message {
    font-size: 12px;
    color: #4b5563 !important;
}


/* ===== TOAST TYPES ===== */

#toast-container > .toast-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
}

#toast-container > .toast-success::before {
    background: #22c55e;
}

#toast-container > .toast-success::after {
    content: "✓";
    color: #16a34a;
}

#toast-container > .toast-error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
}

#toast-container > .toast-error::before {
    background: #ef4444;
}

#toast-container > .toast-error::after {
    content: "✕";
    color: #dc2626;
}

#toast-container > .toast-warning {
    background: linear-gradient(135deg, #fff7ed, #ffedd5) !important;
}

#toast-container > .toast-warning::before {
    background: #f97316;
}

#toast-container > .toast-warning::after {
    content: "!";
    color: #ea580c;
}

#toast-container > .toast-info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
}

#toast-container > .toast-info::before {
    background: #3b82f6;
}

#toast-container > .toast-info::after {
    content: "i";
    color: #2563eb;
}
/* =========================================================
   DATATABLE WRAPPER + TOOLBAR
   ========================================================= */

.theme-datatable-wrapper {
    padding: 0 !important;
    overflow: visible !important;
}

.theme-datatable-wrapper .dataTables_wrapper {
    padding: 0.75rem;
    overflow: visible !important;
}

.theme-datatable-wrapper .table-responsive,
.theme-datatable-wrapper .dataTables_scroll,
.theme-datatable-wrapper .dataTables_scrollBody {
    overflow: visible !important;
}

.theme-datatable-wrapper .dataTables_length,
.theme-datatable-wrapper .dataTables_filter,
.theme-datatable-wrapper .dataTables_info,
.theme-datatable-wrapper .dataTables_paginate {
    margin: 0 !important;
}

.theme-dt-toolbar {
    margin-bottom: 10px !important;
}

.theme-dt-toolbar > [class*="col-"] {
    display: flex !important;
    align-items: center !important;
    min-height: 42px;
}

.theme-dt-toolbar .dt-toolbar-left {
    justify-content: flex-start !important;
}

.theme-dt-toolbar .dt-toolbar-center {
    justify-content: center !important;
}

.theme-dt-toolbar .dt-toolbar-right {
    justify-content: flex-end !important;
}

.theme-dt-toolbar .dataTables_length {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100%;
}

.theme-dt-toolbar .dataTables_filter {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: 100%;
}

.theme-dt-toolbar .dataTables_filter label,
.theme-dt-toolbar .dataTables_length label {
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #344054 !important;
}


/* =========================================================
   DATATABLE SEARCH + LENGTH FOCUS
   DYNAMIC THEME READY
   ========================================================= */

.theme-datatable-wrapper .dataTables_length select,
.theme-datatable-wrapper .dataTables_filter input,
.theme-dt-toolbar .dataTables_length select,
.theme-dt-toolbar .dataTables_filter input {
    box-shadow: none !important;
    outline: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-datatable-wrapper .dataTables_length select,
.theme-dt-toolbar .dataTables_length select {
    min-width: 80px !important;
    height: 32px !important;
    border-radius: 8px !important;
    border: 1px solid #cfe0dc !important;
    background: #ffffff !important;
    color: #344054 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 0 28px 0 10px !important;
    text-align: center;
}

.theme-datatable-wrapper .dataTables_filter input,
.theme-dt-toolbar .dataTables_filter input {
    width: 220px !important;
    height: 32px !important;
    border-radius: 10px !important;
    border: 1px solid #cfe0dc !important;
    background: #ffffff !important;
    color: #344054 !important;
    font-size: 12px !important;
    padding: 0 12px !important;
}

.theme-datatable-wrapper .dataTables_filter input:focus,
.theme-datatable-wrapper .dataTables_length select:focus,
.theme-dt-toolbar .dataTables_filter input:focus,
.theme-dt-toolbar .dataTables_length select:focus {
    outline: none !important;
    box-shadow: none !important;
    background: var(--theme-input-focus-bg) !important;
    color: var(--theme-input-focus-text) !important;
    border-color: var(--theme-input-focus-border) !important;
}

.theme-datatable-wrapper .dataTables_filter input:focus::placeholder,
.theme-dt-toolbar .dataTables_filter input:focus::placeholder {
    color: var(--theme-input-focus-placeholder) !important;
}


/* =========================================================
   DATATABLE BUTTONS
   ========================================================= */

.theme-datatable-wrapper .dt-buttons,
.theme-dt-toolbar .dt-buttons {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    width: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.theme-datatable-wrapper .dt-buttons .btn,
.theme-datatable-wrapper .dt-buttons .dt-button,
.theme-dt-toolbar .dt-buttons .btn,
.theme-dt-toolbar .dt-buttons .dt-button {
    min-height: 30px !important;
    height: 30px !important;
    border-radius: 999px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border: 1px solid #d0d5dd !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #475467 !important;
    box-shadow: 0 2px 6px rgba(16, 24, 40, 0.06) !important;
    transition: all 0.18s ease !important;
}

.theme-datatable-wrapper .dt-buttons .btn:hover,
.theme-datatable-wrapper .dt-buttons .dt-button:hover,
.theme-dt-toolbar .dt-buttons .btn:hover,
.theme-dt-toolbar .dt-buttons .dt-button:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #ffffff 0%, #eef2f6 100%) !important;
    color: #101828 !important;
    border-color: #c7d0db !important;
}

.theme-datatable-wrapper .dt-buttons .buttons-colvis,
.theme-dt-toolbar .dt-buttons .buttons-colvis {
    background: linear-gradient(135deg, #c1121f 0%, #2a0707 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 10px 20px rgba(113, 16, 16, 0.28) !important;
}

.theme-datatable-wrapper .dt-buttons .buttons-colvis:hover,
.theme-dt-toolbar .dt-buttons .buttons-colvis:hover {
    color: #ffffff !important;
    opacity: 0.96;
}

.theme-datatable-wrapper .dt-buttons .buttons-colvis::after,
.theme-dt-toolbar .dt-buttons .buttons-colvis::after {
    content: "▼";
    font-size: 9px;
    margin-left: 6px;
    line-height: 1;
    position: relative;
    top: 2px;
}
/* =========================================================
   DATATABLE TABLE + PAGINATION
   ========================================================= */

.theme-datatable-wrapper table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.theme-datatable-wrapper .theme-datatable.table thead th {
    background: var(--ts-datatable-header-bg, linear-gradient(90deg, #3b82f6 0%, #0f172a 100%)) !important;
    color: var(--ts-datatable-header-text, #ffffff) !important;
    font-size: 12px;
    font-weight: 700;
    border-color: rgba(255, 255, 255, 0.08) !important;
    vertical-align: middle;
    white-space: nowrap;
}

.theme-datatable-wrapper .theme-datatable.table thead th.sorting,
.theme-datatable-wrapper .theme-datatable.table thead th.sorting_asc,
.theme-datatable-wrapper .theme-datatable.table thead th.sorting_desc {
    color: var(--ts-datatable-header-text, #ffffff) !important;
}

.theme-datatable-wrapper .theme-datatable.table tbody td {
    font-size: 12px;
    color: #344054;
    vertical-align: middle;
}

.theme-datatable-wrapper .theme-datatable.table tbody tr:hover {
    background: #fcfcfd;
}

.theme-datatable-wrapper .dataTables_info {
    font-size: 12px !important;
    font-weight: 500;
    color: #667085 !important;
    padding-top: 0 !important;
}

.theme-datatable-wrapper .dataTables_paginate {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
}

.theme-datatable-wrapper .pagination {
    gap: 4px;
    flex-wrap: wrap;
}

.theme-datatable-wrapper .page-item .page-link {
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    border: 1px solid #d0d5dd !important;
    background: #ffffff !important;
    color: #344054 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.theme-datatable-wrapper .page-item .page-link:hover {
    background: #f2f4f7 !important;
    color: var(--theme-primary) !important;
    border-color: #c7d0db !important;
}

.theme-datatable-wrapper .page-item.active .page-link {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 14px rgba(var(--theme-primary-rgb), 0.18) !important;
}

.theme-datatable-wrapper .page-item.disabled .page-link {
    background: #f8fafc !important;
    color: #98a2b3 !important;
    opacity: 1 !important;
}


/* =========================================================
   COLUMN VISIBILITY DROPDOWN
   ========================================================= */

.dt-button-collection {
    min-width: 225px !important;
    padding: 10px !important;
    border-radius: 20px !important;
    background: rgba(248, 252, 252, 0.96) !important;
    border: 1px solid #cfe0dc !important;
    box-shadow: 0 18px 38px rgba(16, 24, 40, 0.18) !important;
    backdrop-filter: blur(10px);
    overflow: hidden !important;
    z-index: 99999 !important;
    position: absolute !important;
}

.dt-button-collection .dropdown-menu {
    border: none !important;
}

.dt-button-collection .dt-button {
    width: 100% !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 0 8px 0 !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    border: 1px solid #bfe3dd !important;
    background: linear-gradient(135deg, #fff5f5 0%, #eefcfa 100%) !important;
    color: #344054 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transition: all 0.18s ease !important;
}

.dt-button-collection .dt-button:last-child {
    margin-bottom: 0 !important;
}

.dt-button-collection .dt-button:hover {
    background: linear-gradient(135deg, #fff0f0 0%, #e8faf6 100%) !important;
    transform: translateY(-1px);
}

.dt-button-collection .dt-button.active {
    border-color: #a9d7cc !important;
    background: linear-gradient(135deg, #fff0f0 0%, #e8faf6 100%) !important;
}


/* =========================================================
   COLUMN VISIBILITY ICONS
   ========================================================= */

.dt-button-collection .dt-button.buttons-columnVisibility {
    position: relative !important;
    padding-right: 38px !important;
}

.dt-button-collection .dt-button .dt-colvis-check {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    transition: all 0.18s ease;
}

.dt-button-collection .dt-button .dt-colvis-check.is-active {
    color: #16a34a;
}

.dt-button-collection .dt-button .dt-colvis-check.is-inactive {
    color: #dc2626;
}


/* =========================================================
   CHECKBOX / ACTION COLUMN FIXES
   ========================================================= */

.theme-datatable thead th:first-child::before,
.theme-datatable thead th:first-child::after,
.theme-datatable thead th:nth-child(2)::before,
.theme-datatable thead th:nth-child(2)::after {
    display: none !important;
}

.theme-datatable-wrapper .form-check-input.theme-check-all,
.theme-datatable-wrapper .form-check-input.theme-row-check,
.theme-datatable-wrapper #checkAllRows,
.theme-datatable-wrapper .theme-row-check {
    width: 16px;
    height: 16px;
    margin-top: 0;
    cursor: pointer;
    box-shadow: none !important;
}

.theme-datatable-wrapper td.text-center,
.theme-datatable-wrapper th.text-center {
    vertical-align: middle;
}


/* =========================================================
   ACTION DROPDOWN
   ========================================================= */

.theme-datatable td {
    overflow: visible !important;
}

.theme-datatable-wrapper .dropdown-menu {
    border-radius: 12px !important;
    border: 1px solid #eaecf0 !important;
    box-shadow: 0 16px 30px rgba(16, 24, 40, 0.14) !important;
    padding: 8px !important;
    min-width: 170px;
}

.theme-datatable-wrapper .dropdown-item {
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 8px 10px !important;
    color: #344054 !important;
}

.theme-datatable-wrapper .dropdown-item:hover {
    background: #f8fafc !important;
    color: var(--theme-primary) !important;
}

.theme-datatable-wrapper .dropdown-item.text-danger:hover {
    background: #fef3f2 !important;
    color: #b42318 !important;
}

.action-dropdown {
    position: absolute !important;
    top: 100%;
    right: 0;
    left: auto !important;
    margin-top: 6px;
    min-width: 150px;
    z-index: 9999;
}


/* =========================================================
   TEXTAREA FOCUS FIX
   ========================================================= */

textarea,
textarea.form-control {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

textarea:focus,
textarea.form-control:focus {
    background: var(--theme-input-focus-bg) !important;
    color: var(--theme-input-focus-text) !important;
    border-color: var(--theme-input-focus-border) !important;
    outline: none !important;
    box-shadow: none !important;
}

textarea:focus::placeholder,
textarea.form-control:focus::placeholder {
    color: var(--theme-input-focus-placeholder) !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {
    .theme-dt-toolbar .dt-toolbar-left,
    .theme-dt-toolbar .dt-toolbar-center,
    .theme-dt-toolbar .dt-toolbar-right {
        justify-content: flex-start !important;
    }

    .theme-dt-toolbar .dt-toolbar-center {
        margin-top: 4px;
        margin-bottom: 4px;
    }
}

@media (max-width: 768px) {
    .theme-datatable-wrapper .dataTables_wrapper {
        padding: 0.6rem;
    }

    .theme-datatable-wrapper .dataTables_filter input {
        width: 100% !important;
    }

    .theme-datatable-wrapper .dt-buttons .btn,
    .theme-datatable-wrapper .dt-buttons .dt-button,
    .theme-dt-toolbar .dt-buttons .btn,
    .theme-dt-toolbar .dt-buttons .dt-button {
        min-height: 32px;
        height: 32px;
        padding: 0 12px !important;
    }
}

@media (max-width: 576px) {
    #toast-container.toast-top-right {
        right: 10px !important;
        left: 10px !important;
        top: 10px !important;
    }

    #toast-container > .toast {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    .theme-datatable-wrapper .page-item .page-link {
        min-width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }

    .theme-dt-toolbar .dataTables_filter input {
        width: 100% !important;
    }

    .theme-dt-toolbar .dt-buttons {
        gap: 6px !important;
    }

    .theme-dt-toolbar .dt-buttons .dt-button,
    .theme-dt-toolbar .dt-buttons .btn {
        min-height: 34px !important;
        height: 34px !important;
        padding: 0 13px !important;
        font-size: 12px !important;
    }
}


/* =========================================================
   GLOBAL INPUT SIZE OVERRIDES
   Purpose:
   - All theme input/select/textarea radius = 8px
   - All theme input/select height = 33px
========================================================= */

.form-control,
.form-select,
select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="tel"],
input[type="url"] {
    min-height: 33px !important;
    height: 33px !important;
    border-radius: 8px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

textarea.form-control,
textarea {
    border-radius: 8px !important;
}

.input-group > .form-control,
.input-group > .form-select,
.input-group > select {
    min-height: 33px !important;
    height: 33px !important;
    border-radius: 8px !important;
}
/* =========================================
   CONTENT SPACING (navbar-fixed aware)
   ========================================= */

/* Legacy / non-fixed layouts: no extra top margin on the wrapper */
body:not(.layout-navbar-fixed) .content-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* layout-navbar-fixed: content must sit below the fixed top bar */
body.layout-navbar-fixed .content-wrapper,
body.layout-fixed.layout-navbar-fixed .content-wrapper {
    margin-top: var(--theme-live-header-height, 48px) !important;
}

body.layout-navbar-fixed .main-footer,
body.layout-fixed.layout-navbar-fixed .main-footer {
    margin-top: var(--theme-live-header-height, 48px) !important;
}

/* Remove extra header gap */
.content-wrapper > .content {
    padding-top: 10px !important;
}

/* Reduce left & right padding */
.content-wrapper .container-fluid {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/* Remove extra margin from first section */
.content-wrapper .content > .container-fluid > div:first-child {
    margin-top: 0 !important;
}

/* Make cards more compact */
.card {
    margin-bottom: 12px !important;
}

/* Reduce spacing between rows */
.row {
    margin-bottom: 0 !important;
}

/* Reduce section gaps */
.content-wrapper .content {
    padding-bottom: 10px !important;
}
/* =========================================
   FORCE INPUT DEFAULT STATE (FINAL FIX)
   ========================================= */

/* Strong override for ALL input types */
body .content-wrapper input:not(:focus),
body .content-wrapper textarea:not(:focus),
body .content-wrapper select:not(:focus),
body .content-wrapper .form-control:not(:focus),
body .content-wrapper .form-select:not(:focus) {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ccc !important;
}

/* Placeholder */
body .content-wrapper input::placeholder,
body .content-wrapper textarea::placeholder {
    color: #999 !important;
}

/* Focus state (your design) */
body .content-wrapper input:focus,
body .content-wrapper textarea:focus,
body .content-wrapper select:focus,
body .content-wrapper .form-control:focus,
body .content-wrapper .form-select:focus {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}

/* Native dropdown popup stays light/readable when closed field is dark */
body .content-wrapper select:focus,
body .content-wrapper .form-select:focus,
select:focus,
.form-select:focus {
    color-scheme: light;
}

/* Fix autofill (important for Chrome) */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-text-fill-color: #000 !important;
    box-shadow: 0 0 0px 1000px #fff inset !important;
}

/* =========================================================
   FINAL DATATABLE SHOW ENTRIES SELECT FIX
   Safe: only affects DataTable length dropdown
========================================================= */

body .content-wrapper .theme-datatable-wrapper .dataTables_length select,
body .content-wrapper .theme-datatable-wrapper .dt-length select,
body .content-wrapper .theme-dt-toolbar .dataTables_length select,
body .content-wrapper .dataTables_wrapper .dataTables_length select {
    min-width: 92px !important;
    width: 92px !important;
    height: 33px !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cccccc !important;
    font-weight: 700 !important;
    padding: 2px 28px 2px 10px !important;
}

body .content-wrapper .theme-datatable-wrapper .dataTables_length select:focus,
body .content-wrapper .theme-dt-toolbar .dataTables_length select:focus,
body .content-wrapper .dataTables_wrapper .dataTables_length select:focus {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #cccccc !important;
    box-shadow: none !important;
    outline: none !important;
}
/* =========================================================
   PREMIUM FLAT DATATABLE SKIN (SAFE ADDON)
   NOTE: keeps the dark gradient header from the original skin,
   but drops the lifted "card row" treatment so every theme
   DataTable matches the Products / Suppliers list behaviour:
   - no row gap (collapsed borders)
   - no row shadow
   - no transform / lift on hover
   - no border-radius on cells
   - flat background color on hover (Bootstrap table-hover style)
========================================================= */

.theme-datatable-wrapper .theme-datatable.table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

.theme-datatable-wrapper .theme-datatable.table thead th {
    background: var(--ts-datatable-header-bg, linear-gradient(90deg, #3b82f6 0%, #0f172a 100%)) !important;
    color: var(--ts-datatable-header-text, #ffffff) !important;
    border: none !important;
    padding: 11px 10px !important;
    letter-spacing: .3px;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.06);
    border-radius: 0 !important;
}

.theme-datatable-wrapper .theme-datatable.table thead th:first-child,
.theme-datatable-wrapper .theme-datatable.table thead th:last-child {
    border-radius: 0 !important;
}

.theme-datatable-wrapper .theme-datatable.table tbody tr {
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color .15s ease-in-out;
    border-radius: 0 !important;
}

.theme-datatable-wrapper .theme-datatable.table tbody td {
    border-top: 1px solid #eef2f7 !important;
    border-bottom: 1px solid #eef2f7 !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
}

.theme-datatable-wrapper .theme-datatable.table tbody td:first-child {
    border-left: 1px solid #eef2f7 !important;
    border-radius: 0 !important;
}

.theme-datatable-wrapper .theme-datatable.table tbody td:last-child {
    border-right: 1px solid #eef2f7 !important;
    border-radius: 0 !important;
}

.theme-datatable-wrapper .theme-datatable.table tbody tr:hover,
.theme-datatable-wrapper .theme-datatable.table.table-hover tbody tr:hover {
    transform: none !important;
    background: var(--bs-table-hover-bg, #f5f9ff) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.theme-datatable-wrapper .theme-datatable.table tbody tr:hover > *,
.theme-datatable-wrapper .theme-datatable.table.table-hover tbody tr:hover > * {
    background-color: var(--bs-table-hover-bg, #f5f9ff) !important;
    color: var(--bs-table-hover-color, inherit) !important;
    box-shadow: none !important;
    transform: none !important;
    border-radius: 0 !important;
}

.theme-datatable-wrapper .page-item.active .page-link {
    background: linear-gradient(135deg,#2563eb,#1d4ed8) !important;
    border-color: #2563eb !important;
}

.theme-datatable-wrapper .dt-buttons .dt-button:hover,
.theme-datatable-wrapper .dt-buttons .btn:hover {
    box-shadow: 0 10px 18px rgba(0,0,0,.10) !important;
}

.theme-datatable-wrapper input[type="checkbox"] {
    transform: scale(1.08);
    accent-color: #2563eb;
}

/* =========================================================
   GLOBAL TABLE HOVER NORMALISATION
   Applies the same flat hover look to:
   - .theme-datatable tables that are NOT wrapped in
     .theme-datatable-wrapper (e.g. Suppliers / Products list)
   - any plain Bootstrap .table-hover
   This guarantees no lift, shadow, or rounded corners on
   row hover anywhere in the app.
========================================================= */

table.theme-datatable.table tbody tr,
.table.table-hover tbody tr {
    transition: background-color .15s ease-in-out;
}

table.theme-datatable.table tbody tr,
table.theme-datatable.table tbody td,
.table.table-hover tbody tr,
.table.table-hover tbody td {
    border-radius: 0 !important;
}

table.theme-datatable.table tbody tr:hover,
table.theme-datatable.table.table-hover tbody tr:hover,
.table.table-hover tbody tr:hover {
    transform: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

table.theme-datatable.table tbody tr:hover > *,
table.theme-datatable.table.table-hover tbody tr:hover > *,
.table.table-hover tbody tr:hover > * {
    background-color: var(--bs-table-hover-bg, #f5f9ff) !important;
    color: var(--bs-table-hover-color, inherit) !important;
    box-shadow: none !important;
    transform: none !important;
    border-radius: 0 !important;
}

/* Theme settings: DataTable header when .theme-datatable is not inside .theme-datatable-wrapper */
table.theme-datatable.table thead th {
    background: var(--ts-datatable-header-bg, linear-gradient(90deg, #3b82f6 0%, #0f172a 100%)) !important;
    color: var(--ts-datatable-header-text, #ffffff) !important;
}

table.theme-datatable.table thead th.sorting,
table.theme-datatable.table thead th.sorting_asc,
table.theme-datatable.table thead th.sorting_desc {
    color: var(--ts-datatable-header-text, #ffffff) !important;
}
/* =========================================================
   PREMIUM DATATABLE SHOW ENTRIES DROPDOWN
========================================================= */

.theme-datatable-wrapper .dataTables_length label {
    gap: 10px !important;
    color: #0f172a !important;
}

.theme-datatable-wrapper .dataTables_length select {
    min-width: 96px !important;
    height: 38px !important;
    border-radius: 14px !important;
    border: 1px solid #dbe5f0 !important;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    padding: 4px 34px 4px 14px !important;
    box-shadow:
        0 8px 18px rgba(15, 23, 42, .08),
        inset 0 1px 0 rgba(255, 255, 255, .9) !important;
    cursor: pointer !important;
    transition: all .18s ease !important;
}

.theme-datatable-wrapper .dataTables_length select:hover {
    border-color: #93c5fd !important;
    box-shadow:
        0 10px 22px rgba(37, 99, 235, .14),
        inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}

.theme-datatable-wrapper .dataTables_length select:focus {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #2563eb !important;
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .14),
        0 10px 24px rgba(15, 23, 42, .10) !important;
    outline: none !important;
}

.theme-datatable-wrapper .dataTables_length select option {
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 700 !important;
}
/* Premium dropdown option hover / selected */
.theme-datatable-wrapper .dataTables_length select option:hover,
.theme-datatable-wrapper .dataTables_length select option:checked,
.theme-datatable-wrapper .dataTables_length select option:selected {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 45%, #0f172a 100%) !important;
    color: #ffffff !important;
}

/* =========================================================
   GLOBAL NATIVE SELECT DROPDOWN — light list, readable text
   (applies app-wide: forms, filters, Flatpickr, DataTables, etc.)
   ========================================================= */
select,
.form-select {
    color-scheme: light;
}

select option,
.form-select option,
optgroup option {
    background-color: #ffffff !important;
    color: #212529 !important;
}

select option:checked,
select option:hover,
.form-select option:checked,
.form-select option:hover {
    background: var(--ts-select-dropdown-active-bg, var(--ts-modal-header-bg, var(--theme-primary, #2563eb))) !important;
    color: var(--ts-select-dropdown-active-text, #ffffff) !important;
}

/* =========================================================
   GLOBAL SELECT DOWN ARROW
   Uses the root variables from theme-core.css and restores the
   arrow after page/table background overrides.
   ========================================================= */
select:not([multiple]):not([size]),
.form-select:not([multiple]):not([size]),
body .content-wrapper select:not([multiple]):not([size]),
body .content-wrapper .form-select:not([multiple]):not([size]),
.theme-datatable-wrapper .dataTables_length select:not([multiple]):not([size]),
.theme-dt-toolbar .dataTables_length select:not([multiple]):not([size]),
.dataTables_wrapper .dataTables_length select:not([multiple]):not([size]) {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: var(--theme-select-arrow-icon) !important;
    background-repeat: no-repeat !important;
    background-position: var(--theme-select-arrow-position) !important;
    background-size: var(--theme-select-arrow-size) !important;
    padding-right: var(--theme-select-arrow-padding-end) !important;
    cursor: pointer;
}

select:not([multiple]):not([size]):focus,
.form-select:not([multiple]):not([size]):focus,
body .content-wrapper select:not([multiple]):not([size]):focus,
body .content-wrapper .form-select:not([multiple]):not([size]):focus {
    background-image: var(--theme-select-arrow-focus-icon) !important;
}

body .content-wrapper .theme-datatable-wrapper .dataTables_length select:not([multiple]):not([size]):focus,
body .content-wrapper .theme-dt-toolbar .dataTables_length select:not([multiple]):not([size]):focus,
body .content-wrapper .dataTables_wrapper .dataTables_length select:not([multiple]):not([size]):focus {
    background-image: var(--theme-select-arrow-icon) !important;
}
