a {
    text-decoration: none !important;
}
/* Brand palette for panel (AUTOBARN logo: red + blue) */
:root {
    --brand-primary: #e31b23;          /* logo red */
    /* Light maroon theme for primary actions */
    --brand-accent: #b65a6a;           /* light maroon */
    --brand-accent-hover: #a84f5e;     /* slightly darker on hover */
    --brand-accent-soft: #faeef1;      /* very light maroon (backgrounds) */
    --brand-primary-soft: rgba(227, 27, 35, 0.12); /* subtle red tint */
    --brand-bg-light: #f5f8ff;         /* page/table light background */
    --brand-sidebar: #315483;          /* sidebar blue */
}

/* ---------- Global loader (Page loading) ---------- */
.page-loader.patel-loader {
    background: rgba(49, 84, 131, 0.22) !important; /* brand sidebar blue tint */
}
.page-loader.patel-loader .patel-loader-spinner {
    width: 3rem;
    height: 3rem;
    border-width: .25rem;
    border-right-color: rgba(255, 255, 255, 0.25);
    border-bottom-color: rgba(255, 255, 255, 0.25);
    border-left-color: rgba(255, 255, 255, 0.25);
    border-top-color: var(--brand-primary) !important; /* red accent */
}
.page-loader.patel-loader .patel-loader-text {
    color: #ffffff !important;
    letter-spacing: .2px;
}

/* Hide DataTables' built-in "Processing..." overlay (we use the global loader instead) */
div.dataTables_processing {
    display: none !important;
}

/* Supplier Payment: make the "Payment Information" row controls perfectly aligned */
.supplier-payment-info-row .form-control.supplier-payment-info-control,
.supplier-payment-info-row select.form-control {
    height: 40px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    box-sizing: border-box;
}
.supplier-payment-info-row input[type="date"].form-control.supplier-payment-info-control {
    line-height: 1.2 !important;
}

/* ---------- Product edit: Product / Inventory tabs (make attractive pill UI) ---------- */
#tab_menu.nav-tabs {
    background: #ffffff;
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(23, 23, 23, 0.06);
}
#tab_menu .nav-item {
    margin-right: 8px;
}
#tab_menu .nav-link {
    border: 0 !important;
    border-radius: 999px !important;
    padding: 10px 18px !important;
    line-height: 1.1;
    font-weight: 600;
    color: #475569 !important;
    background: #f1f5f9 !important;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
#tab_menu .nav-link:hover {
    background: #e9eef5 !important;
    color: #111827 !important;
    transform: translateY(-1px);
}
#tab_menu .nav-link.active {
    background: var(--brand-accent) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(182, 90, 106, 0.28);
}

/* Small tables in Product Price Details (segment price / discount) */
#product_segment_price_table th,
#product_quantity_table th,
#product_segment_bulk_discount_table th,
#product_unit_pack_table th {
    background: var(--brand-accent-soft) !important;
    color: #111827 !important;
    font-weight: 700 !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}
#product_segment_price_table td,
#product_quantity_table td,
#product_segment_bulk_discount_table td,
#product_unit_pack_table td {
    vertical-align: middle;
}
.error {
    display: inline-block;
    color: red;
    text-transform: capitalize;
}

.error:first-letter {
    text-transform: capitalize;
}
.app-sidebar .menu .menu-item .menu-link span.menu-icon svg {
    width: 23px !important;
    height: 23px !important;
}
.app-sidebar .menu .menu-item .menu-link .menu-title {
    font-size: 14px !important;
}

/* Orders filter button text/icon in logo blue */
#toggle_filters_btn,
#toggle_filters_btn i {
    color: var(--brand-accent) !important;
}
.app-sidebar-logo .app-sidebar-logo-default span,
.app-sidebar-logo-default span {
    /* Sidebar brand text should be white (do not override Bootstrap's .text-white) */
    color: #fff !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}
.app-sidebar .menu .menu-item .menu-link .menu-icon,
.app-sidebar .menu .menu-item .menu-link .menu-bullet {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 10px !important;
    line-height: 1 !important;
}
/* Ensure all icon types (svg, font, keenicons) scale consistently and inherit color */
.app-sidebar .menu .menu-item .menu-link .menu-icon svg,
.app-sidebar .menu .menu-item .menu-link .menu-icon i,
.app-sidebar .menu .menu-item .menu-link .menu-icon .ki-duotone,
.app-sidebar .menu .menu-item .menu-link .menu-icon .ki-outline,
.app-sidebar .menu .menu-item .menu-link .menu-icon .ki-solid {
    width: 20px !important;
    height: 20px !important;
    font-size: 20px !important;
    color: currentColor !important;
    fill: currentColor !important;
}
.app-sidebar .menu .menu-item .menu-link:hover {
    /* transition: color 0.2s ease; */
    /* color: var(--bs-primary-inverse); */
    background-color: var(--brand-accent) !important;
}
.app-sidebar .menu .menu-item .menu-link.active {
    background-color: var(--brand-accent) !important;
}

.table_fixed {
    table-layout: fixed;
}

.img-50 {
    max-height: 50px;
    max-width: 50px;
}

.font_awesome_icon {
    fill: white;
    height: 15px;
}
.iti.iti--allow-dropdown.iti--separate-dial-code.iti--show-flags {
    width: 100%;
}
.hide {
    display: none;
}

.btn.btn-primary,
.btn-check:checked + .btn.btn-primary,
.btn-check:active + .btn.btn-primary,
.btn.btn-primary:focus:not(.btn-active),
.btn.btn-primary:hover:not(.btn-active),
.btn.btn-primary:active:not(.btn-active),
.btn.btn-primary.active,
.btn.btn-primary.show,
.show > .btn.btn-primary {
    /* Primary buttons should be brand blue */
    background-color: var(--brand-accent) !important;
    border: none !important; /* remove border */
}

.btn.btn-primary:hover:not(.btn-active),
.btn.btn-primary:active:not(.btn-active),
.btn-check:active + .btn.btn-primary,
.btn.btn-primary:focus:not(.btn-active) {
    background-color: var(--brand-accent-hover) !important;
    border: none !important; /* remove border */
}

/* Light buttons (Reset/Cancel) should follow the same maroon theme */
.btn.btn-light,
.btn.btn-light:hover,
.btn.btn-light:focus,
.btn.btn-light:active {
    background-color: var(--brand-accent-soft) !important;
    color: var(--brand-accent) !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

/* Global refresh/reset buttons across pages */
.btn.cancelBtn,
.cancelBtn.btn,
.btn.cancelBtn:hover,
.cancelBtn.btn:hover,
.btn.cancelBtn:focus,
.cancelBtn.btn:focus,
.btn.cancelBtn:active,
.cancelBtn.btn:active {
    background-color: var(--brand-accent) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

.btn.cancelBtn i,
.cancelBtn.btn i {
    color: #fff !important;
}

.btn.btn-danger,
.btn-check:checked + .btn.btn-danger,
.btn-check:active + .btn.btn-danger,
.btn.btn-danger:focus:not(.btn-active),
.btn.btn-danger:hover:not(.btn-active),
.btn.btn-danger:active:not(.btn-active),
.btn.btn-danger.active,
.btn.btn-danger.show,
.show > .btn.btn-danger {
    /* Danger buttons stay brand red */
    background-color: var(--brand-primary) !important;
}
.th_background {
    /* Use soft brand header background by default */
    background-color: var(--brand-accent-soft) !important;
    color: var(--brand-accent) !important;
}
.table_text_color {
    color: #484848;
}
tr:nth-child(even) {
    background-color: var(--brand-bg-light) !important;
}
.dropdown_menu {
    background-color: var(--brand-accent-soft) !important;
    border: none;
}
.dropdown_menu .select2-selection__rendered,
.text_color {
    /* Do not force colored placeholder/text */
    color: inherit !important;
}

/* Keep placeholders neutral (no colored placeholder) */
input::placeholder,
textarea::placeholder {
    color: #a1a5b7 !important;
    opacity: 1;
}
.select2-container .select2-selection__placeholder {
    color: #a1a5b7 !important;
}

/* Products: export buttons with unique colors */
.btn-product-pdf {
    background-color: #fde8ec !important; /* soft red */
    color: #b42318 !important;
    border: none !important;
}
.btn-product-pdf:hover,
.btn-product-pdf:focus,
.btn-product-pdf:active {
    background-color: #fbd2da !important;
    color: #b42318 !important;
    border: none !important;
    box-shadow: none !important;
}

.btn-product-excel {
    background-color: #e8f7ef !important; /* soft green */
    color: #067647 !important;
    border: none !important;
}
.btn-product-excel:hover,
.btn-product-excel:focus,
.btn-product-excel:active {
    background-color: #d2f0e0 !important;
    color: #067647 !important;
    border: none !important;
    box-shadow: none !important;
}

/* ---------- Global page toolbar (used in Products/Customers) ---------- */
.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}
.products-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 280px;
}
.products-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.products-toolbar .table_search {
    width: 220px;
}
.products-toolbar .toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.products-toolbar .btn {
    border-radius: 8px;
}
.products-toolbar .btn.btn-sm {
    padding: 0.55rem 0.9rem;
}

/* Filter panel labels in logo blue */
.filters-toolbar label {
    color: var(--brand-accent) !important;
}
/* Headings and table header striping to match brand */
.th_background,
thead tr.th_background,
thead tr th.th_background {
    background-color: var(--brand-accent-soft) !important;
    color: var(--brand-accent) !important;
}
/* Pills/tabs on listing pages (Orders status filters) */
.nav-pills .nav-link {
    background-color: #ffffff !important;
    border: 1px solid var(--brand-accent) !important;
    color: var(--brand-primary) !important;
}
.nav-pills .nav-link:hover {
    background-color: var(--brand-accent) !important;
    color: #ffffff !important;
}
.nav-pills .nav-link.active {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
}
.space {
    white-space: nowrap;
}
.table:not(.table-bordered) tr:first-child,
.table:not(.table-bordered) th:first-child,
.table:not(.table-bordered) td:first-child {
    padding-left: 10px;
}
a.nav-link.text-active-primary.pb-4.order-nav {
    height: 44px;
    display: grid;
    place-items: center;
    padding-top: 10px;
    margin: 8px 20px !important;
    color: var(--brand-primary);
    margin: 8px !important;
    border-bottom: none;
}
a.nav-link.text-active-primary.pb-4.order-nav:hover:not(.disabled) {
    border-bottom-width: 0px;
    border-bottom: none;
}
.order-nav.active {
    color: #ffffff !important;
    border-bottom: none !important;
    border-radius: 25px;
    background-color: var(--brand-primary) !important;
}
.nav-btn {
    background-color: #e6e6e6 !important;
    border-radius: 25px;
    border-top-right-radius: 25px !important;
    border-top-left-radius: 25px !important;
}
.accordion-button:not(.collapsed)::after {
    background-image: var(--bs-accordion-btn-icon) !important;
}
.search-btn {
    background-color: var(--brand-primary) !important;
}
.btn-check:checked + .btn.btn-secondary,
.btn-check:active + .btn.btn-secondary,
.btn.btn-secondary:focus:not(.btn-active),
.btn.btn-secondary:hover:not(.btn-active),
.btn.btn-secondary:active:not(.btn-active),
.btn.btn-secondary.active,
.btn.btn-secondary.show,
.show > .btn.btn-secondary {
    background-color: var(--brand-primary) !important;
}
button#reset {
    background-color: var(--brand-primary) !important;
    padding: 8px !important;
}
button#filter {
    padding: 8px !important;
}

.page-item.active .page-link {
    background-color: var(--brand-primary) !important ;
}
.page-link {
    color: var(--brand-primary) !important;
    border-color: var(--brand-accent) !important;
}
.page-link:hover {
    background-color: var(--brand-accent) !important;
    color: #ffffff !important;
    border-color: var(--brand-accent) !important;
}
select#statusFilter {
    color: #1a1a1a !important;
}
.product-bg-color {
    background-color: var(--brand-bg-light) !important;
    border-radius: 8px;
    padding-left: 10px;
}
.save_btn {
    padding: 8px 20px !important;
}
.accordion-button {
    /* Purchase order accordions + other accordions: use maroon theme, not bright red */
    background-color: var(--brand-accent) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: bolder !important;
}

/* Collapsed accordion header: lighter background for better UI */
.accordion-button.collapsed {
    background-color: var(--brand-accent-soft) !important;
    color: #1a1a1a !important;
}
.accordion-button:not(.collapsed)::after,
.accordion-button::after {
    background-image: url(/images/accordian.png?958d53a919c9babca931b5c36a9afce3) !important;
}
.fs_15 {
    font-size: 15px !important;
}
.p_5 {
    padding: 5px;
}
.note_div {
    border: 1px solid #ebeff2;
}
.billing-total-price {
    background-color: var(--brand-bg-light) !important;
}
.placeholder {
    background-color: var(--brand-bg-light) !important;
    border-bottom: none !important;
}
.table_padding {
    padding: 5px 3px !important;
}
thead tr th.paddingX_3 {
    padding-right: 3px !important;
    padding-left: 3px !important;
}
.w-table {
    width: 75px;
}
.table-margin {
    margin-right: 0px !important;
    margin-left: 0px !important;
}
.fs_15 {
    font-size: 15px !important;
}
.p_5 {
    padding: 5px;
}
.form-check-button {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
}
.form-check.form-check-solid .form-check-input:not(:checked) {
    background-color: #b8b8b8 !important;
}
.p_table {
    padding: 4px 7px !important;
}
.form-check-btn:checked {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
    background-position-x: 21px !important;
}
.form-switch .form-check-btn {
    background-image: url(/images/switch-bg1.png?85ed8e03d12a071c6b4fb48ef6e76b27);
    background-color: #b8b8b8;
    background-size: 17px;
    background-position-x: 3px;
}
.tab_width {
    width: 49.33%;
}
.table.gy-5 td {
    padding: 5px 0.75rem;
}
th.sorting_disabled,
th.sorting,
th.text-white.fw-bolder.fs_15,
button.accordion-button {
    padding: 0.85rem 0.75rem !important;
}
button#billing-btn,
a#back-btn,
button.btn.btn-primary.submit_payment,
a.btn.btn-light.btn-active-light-primary.me-2 {
    padding: 10px !important;
}
button.btn.btn-primary.btn-rounded.addnewproduct.plus_btn {
    padding: 0 !important;
}
select.form-select.form-select-sm.form-select-solid {
    border: 1px solid #abafbd !important;
}
.table-responsive::-webkit-scrollbar {
    height: 12px !important;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #abafbd !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: var(--brand-primary) !important;
    border-radius: 0.475rem;
}
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #abafbd !important;
}
.alert.alert-dismissible div {
    font-size: 15px;
}
.total_amount {
    width: 100px !important;
}
div#kt_scrolltop {
    background-color: var(--brand-primary) !important;
    opacity: 0.9;
}
span.ki-duotone.ki-arrow-up {
    color: #ffffff !important;
}
@media screen and (max-width: 992px) {
    .create-btn {
        margin-top: 9px !important;
    }
}
@media screen and (max-width: 768px) {
    .create-btn {
        font-size: 11px;
        padding: 8px !important;
        height: 31px !important;
        margin-top: 15px !important;
    }
}
@media screen and (max-width: 576px) {
    .app-header {
        height: auto !important;
    }
    .create-btn {
        margin-bottom: 15px !important;
        width: 90px;
    }
    .logo-height {
        height: 40px !important;
    }
}
@media screen and (max-width: 450px) {
    #product_tbody_id
        tr
        td
        span.select2.select2-container.select2-container--bootstrap5.product-css.select2-container--below,
    #product_tbody_id tr td span.product-css {
        width: 240px !important;
    }
}

@media screen and (max-width: 600px) {
    #product_tbody_id
        tr
        td
        span.select2.select2-container.select2-container--bootstrap5.select2-container--focus,
    #product_tbody_id
        tr
        td
        span.select2.select2-container.select2-container--bootstrap5.select2-container--below.select2-container--open,
    span.select2-dropdown.bigdrop.select2-dropdown--below,
    .select2-dropdown .bigdrop .select2-dropdown--above {
        width: 300px !important;
    }
}
@media screen and (max-width: 420px) {
    #product_tbody_id
        tr
        td
        span.select2.select2-container.select2-container--bootstrap5.select2-container--focus,
    #product_tbody_id
        tr
        td
        span.select2.select2-container.select2-container--bootstrap5.select2-container--below.select2-container--open,
    span.select2-dropdown.bigdrop.select2-dropdown--below,
    .select2-dropdown .bigdrop .select2-dropdown--above {
        width: 200px !important;
    }
}
.product_table {
    padding: 0.3rem 1rem !important;
}
.form-control-lg {
    padding: 0.775rem 1rem !important;
}
.select2-container--bootstrap5 .select2-dropdown .select2-results__options {
    max-height: 550px !important;
    overflow-y: auto !important;
}

.select2-container--bootstrap5
    .select2-dropdown
    .select2-results__option.select2-results__option--highlighted {
    background-color: var(--brand-primary) !important;
    color: #ffffff !important;
}
span.select2-dropdown.drop.select2-dropdown--below {
    width: 400px !important;
}
@media screen and (max-width: 600px) {
    span.select2-dropdown.drop.select2-dropdown--below {
        width: 300px !important;
    }
}
@media screen and (max-width: 400px) {
    span.select2-dropdown.drop.select2-dropdown--below {
        width: 200px !important;
    }
    .create-btn {
        font-size: 10px;
        padding: 5px !important;
        height: 25px !important;
        margin-top: 18px !important;
    }
}
@media screen and (max-width: 340px) {
    .create-btn {
        font-size: 9px;
        padding: 4px !important;
        height: 22px !important;
        margin-top: 20px !important;
    }
    .logo-width {
        width: 21px !important;
    }
}
td.dataTables_empty {
    text-align: center;
}

@media screen and (max-width: 1440px) {
    tbody#product_table_tbody
        span.select2.select2-container.select2-container--bootstrap5 {
        width: 250px !important;
    }
    .manufacture_at,
    .expiry_at,
    .exp_alert_at,
    .cost {
        width: 110px;
    }
    .quantity {
        width: 80px;
    }
}
.filter-btn {
    padding: 8px !important;
}
select#statusFilter {
    margin-left: 0rem !important;
    margin-right: -0.75rem !important;
}
.form-control:focus {
    border: 2px solid var(--brand-accent) !important;
}
.btn > i {
    padding-right: 0rem !important;
}

/* Apply global background based on logo palette */
body,
.bg-body,
.app-page,
.app-wrapper,
.app-main,
.app-content {
    background-color: var(--brand-bg-light) !important;
}

/* Remove dark/black sidebar; use logo palette */
.app-sidebar {
    /* Sidebar: light blue background for better logo combination */
    background-color: #315483 !important; /* logo blue sidebar */
    box-shadow: none !important;
}
.app-sidebar .menu .menu-item .menu-link {
    color: #ffffff !important; /* sidebar text white on logo blue */
}
.app-sidebar .menu .menu-item .menu-link .menu-title {
    color: #ffffff !important;
}
.app-sidebar .menu .menu-item .menu-link.active .menu-title {
    color: #ffffff !important;
}

/* Sidebar icons should also be dark for readability on light blue background */
.app-sidebar .menu .menu-item .menu-link .menu-icon,
.app-sidebar .menu .menu-item .menu-link .menu-bullet,
.app-sidebar .menu .menu-item .menu-link .menu-icon i,
.app-sidebar .menu .menu-item .menu-link .menu-icon .ki-duotone,
.app-sidebar .menu .menu-item .menu-link .menu-icon .ki-outline,
.app-sidebar .menu .menu-item .menu-link .menu-icon .ki-solid {
    color: #ffffff !important;
}

.app-sidebar .menu .menu-item .menu-link .menu-icon svg,
.app-sidebar .menu .menu-item .menu-link span.menu-icon svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

.app-sidebar .menu .menu-sub .menu-item .menu-link {
    color: #ffffff !important;
}
.app-sidebar .menu .menu-sub .menu-item .menu-link .menu-title {
    color: #ffffff !important;
}

/* ---------- UI polish (cards, buttons, tables, pills) ---------- */
/* Cards */
.card,
.app-content .card,
.app-toolbar .card {
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(23,23,23,.06) !important;
    border: 1px solid rgba(0,0,0,.03) !important;
    background: var(--brand-bg-card, #ffffff) !important;
}
.card:hover {
    box-shadow: 0 8px 24px rgba(23,23,23,.08) !important;
    transition: box-shadow .25s ease;
}
/* Sidebar links get subtle rounding and transition */
.app-sidebar .menu .menu-item .menu-link {
    border-radius: 6px !important;
    transition: background-color .15s ease, color .15s ease;
}
/* Buttons: keep solid/normal (no highlight/glow/lift) */
.btn.btn-primary,
.btn-primary {
    box-shadow: none !important;
    transform: none !important;
    outline: none !important;
}
.btn.btn-primary:hover,
.btn-primary:hover,
.btn.btn-primary:focus,
.btn-primary:focus,
.btn.btn-primary:active,
.btn-primary:active,
.btn-check:focus + .btn,
.btn:focus {
    box-shadow: none !important;
    outline: none !important;
}
/* Pills/tabs (Orders status filters) */
.nav-pills .nav-link {
    background-color: #ffffff !important;
    border: 1px solid var(--brand-accent) !important;
    color: var(--brand-primary) !important;
    transition: background-color .15s ease, color .15s ease;
}
.nav-pills .nav-link:hover {
    background-color: var(--brand-accent) !important;
    color: #ffffff !important;
}
.nav-pills .nav-link.active {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
}
/* Pagination styling */
.page-link {
    color: var(--brand-primary) !important;
    border-color: var(--brand-accent) !important;
}
.page-link:hover {
    background-color: var(--brand-accent) !important;
    color: #ffffff !important;
    border-color: var(--brand-accent) !important;
}
.page-item.disabled .page-link {
    color: #9aa6b2 !important;
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}
/* Inputs focus color to accent */
.form-control:focus {
    border: 2px solid var(--brand-accent) !important;
    box-shadow: 0 0 0 0.125rem rgba(63, 81, 181, 0.25) !important;
}
/* Table header and row hover */
.table thead,
.table thead tr,
.table thead th {
    /* Light red header (logo red tint) */
    background: var(--brand-accent-soft) !important; /* light blue */
}
.table thead {
    border-top: 3px solid var(--brand-accent) !important;
}
.table thead th {
    color: #000000 !important;
    font-weight: 600 !important;
    border-bottom: 1px solid rgba(63, 81, 181, 0.25) !important;
}

/* Table footer totals should match the header theme */
tfoot.table-totals tr,
tfoot.table-totals td,
tfoot.table-totals th {
    background: var(--brand-accent-soft) !important;
    color: #000000 !important;
    font-weight: 600 !important;
    border-top: 3px solid var(--brand-accent) !important;
    border-bottom: 1px solid rgba(0,0,0,.05) !important;
}
.table tbody tr:hover {
    background: #f7fbff !important;
    transition: background-color .15s ease;
}

/* ---------- Subtle borders + softer background ---------- */
/* Sidebar divider (very subtle) */
.app-sidebar {
    /* Use native border-image gradient to avoid overlay artifacts */
    border-right: 4px solid transparent !important;
    -webkit-border-image: linear-gradient(to bottom, var(--brand-primary, #b71c1c) 40%, var(--brand-accent, #64b5f6) 100%) 1 100% !important;
    border-image: linear-gradient(to bottom, var(--brand-primary, #b71c1c) 40%, var(--brand-accent, #64b5f6) 100%) 1 100% !important;
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.35) !important; /* soft highlight edge */
}
/* Ensure no leftover pseudo accents */
.app-sidebar::before,
.app-sidebar::after {
    content: none !important;
}
/* Softer card/table borders */
.card,
.table,
.table > :not(caption) > * > * {
    border-color: rgba(2, 6, 23, 0.06) !important;
}

/* ---------- Sidebar menu highlight + icon styling ---------- */
.app-sidebar .menu .menu-item .menu-link {
    position: relative;
    border-left: 4px solid transparent !important;
    padding-left: 14px !important; /* space for the accent bar */
}
.app-sidebar .menu .menu-item .menu-link:hover {
    background-color: var(--brand-accent-soft) !important; /* light blue hover */
    border-left-color: var(--brand-accent) !important;
}
.app-sidebar .menu .menu-item .menu-link.active {
    background-color: var(--brand-primary-soft) !important; /* subtle red active */
    border-left-color: var(--brand-primary) !important;
}
/* Icon color harmonized with state */
.app-sidebar .menu .menu-item .menu-link .menu-icon {
    color: #ffffff !important; /* keep sidebar icons white in all states */
    transition: color .15s ease;
}
.app-sidebar .menu .menu-item .menu-link:hover .menu-icon,
.app-sidebar .menu .menu-item .menu-link.active .menu-icon {
    color: #111111 !important; /* hover should be dark */
}
.app-sidebar .menu .menu-item .menu-link.active .menu-icon {
    color: #ffffff !important; /* active stays white */
}
.app-sidebar .menu .menu-item .menu-link .menu-title {
    transition: color .15s ease, font-weight .15s ease;
}
.app-sidebar .menu .menu-item .menu-link.active .menu-title,
.app-sidebar .menu .menu-item .menu-link:hover .menu-title {
    color: #111111 !important; /* hover should be dark */
    font-weight: 600 !important;
}
.app-sidebar .menu .menu-item .menu-link.active .menu-title {
    color: #ffffff !important; /* active stays white */
}

/* Hover state: make SVG icons dark too */
.app-sidebar .menu .menu-item .menu-link:hover .menu-icon svg,
.app-sidebar .menu .menu-item .menu-link:hover span.menu-icon svg {
    fill: #111111 !important;
    stroke: #111111 !important;
}

/* Emphasize the currently open sidebar section (light blue panel) */
.app-sidebar .menu .menu-item.show > .menu-link {
    background-color: var(--brand-accent-soft) !important; /* light blue */
    border-left-color: var(--brand-accent) !important;
    color: #111111 !important; /* expanded parent text should be dark */
}
.app-sidebar .menu .menu-item.show > .menu-link .menu-title,
.app-sidebar .menu .menu-item.show > .menu-link .menu-icon {
    color: #111111 !important; /* expanded parent title/icon dark */
    font-weight: 600 !important;
}

/* If the expanded parent link is also active, keep it white (active state wins) */
.app-sidebar .menu .menu-item.show > .menu-link.active .menu-title,
.app-sidebar .menu .menu-item.show > .menu-link.active .menu-icon {
    color: #ffffff !important;
}

/* Submenu items: clearer highlight, light-blue chip style on active/hover */
.app-sidebar .menu .menu-sub .menu-item .menu-link {
    border-left: 3px solid transparent !important;
    border-radius: 6px !important;
    padding-left: 12px !important;
}
.app-sidebar .menu .menu-sub .menu-item .menu-link:hover {
    background: var(--brand-accent-soft) !important;
    border-left-color: var(--brand-accent) !important;
}
.app-sidebar .menu .menu-sub .menu-item .menu-link.active {
    background: var(--brand-primary-soft) !important;
    border-left-color: var(--brand-primary) !important;
    font-weight: 600 !important;
    color: var(--brand-accent) !important;
}
