/* Default jquery-loading styles */

.loading-overlay {
  display: table;
  opacity: 0.7;
}

.loading-overlay-content {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 1.15em;
  font-weight: bold;
  text-align: center;
  display: table-cell;
  vertical-align: middle;
}

.loading-overlay.loading-theme-light {
  background-color: #fff;
  color: #000;
}

.loading-overlay.loading-theme-dark {
  background-color: #000;
  color: #fff;
}

.fieldset {
  border: 1px solid #9f9f9f  !important;
  padding: 10px !important;
}

.legend {
  border: 1px solid #9f9f9f;
}

.Stock_UnderLimit
{
font-weight: bold;
color:Blue;
font-style: italic;
/* background-color: #AED6F1; */
}

.OutOfStock
{
font-weight: bold;
color:red;
font-style: italic;
/* background-color: #FADBD8; */
}

.Inactive
{
font-weight: bold;
color:red;
font-style: italic;
/* background-color: #FADBD8; */
}

.Invoice_return_row
{
font-weight: bold;
color:magenta;
font-style: italic;
}

.Expired
{
font-weight: bold;
color:red;
font-style: italic;
}

.Remaining
{
color:blue;
}

.fade {
opacity: 1000;
}


.bg {
background-color: #e5e5f7;
opacity: 0.8;
background: linear-gradient(135deg, #444cf755 25%, transparent 25%) -10px 0/ 20px 20px, linear-gradient(225deg, #444cf7 25%, transparent 25%) -10px 0/ 20px 20px, linear-gradient(315deg, #444cf755 25%, transparent 25%) 0px 0/ 20px 20px, linear-gradient(45deg, #444cf7 25%, #e5e5f7 25%) 0px 0/ 20px 20px;
}

.Invoice_LessThenSysPrice_row
{
font-weight: bold;
color:orange;
font-style: italic;
}

/* =========================================================
   Dark Mode — unified theme
   Palette:
     --bg-0   #1e2124  (page)
     --bg-1   #2b2f33  (panels / content-wrapper)
     --bg-2   #343a40  (cards / modals)
     --bg-3   #3d444b  (inputs, table zebra)
     --bg-4   #4a525a  (hover)
     --brd    #4a525a  (borders)
     --txt    #e6e6e6  (body text)
     --mut    #a9b0b7  (muted/placeholder)
     --lnk    #6ab7ff  (links)
   ========================================================= */

/* Avoid FOUC before the theme class attaches */
body { visibility: hidden; opacity: 0; transition: opacity .25s ease-in-out; }
body.loaded { visibility: visible; opacity: 1; }

body.dark-mode {
    background-color: #1e2124 !important;
    color: #e6e6e6 !important;
}

/* Layout containers */
body.dark-mode .content-wrapper,
body.dark-mode .main-footer,
body.dark-mode .main-header.navbar-white,
body.dark-mode .main-header.navbar-light {
    background-color: #2b2f33 !important;
    color: #e6e6e6 !important;
    border-color: #4a525a !important;
}
body.dark-mode .navbar { background-color: #1a1d20 !important; }
body.dark-mode .main-sidebar,
body.dark-mode .sidebar,
body.dark-mode .brand-link { background-color: #1a1d20 !important; }
body.dark-mode .nav-sidebar > .nav-item > .nav-link { color: #cfd3d7 !important; }
body.dark-mode .nav-sidebar > .nav-item > .nav-link.active { background-color: #3d8bfd !important; color:#fff !important; }
body.dark-mode .nav-sidebar > .nav-item > .nav-link:hover { background-color: #2b2f33 !important; }

/* Cards */
body.dark-mode .card,
body.dark-mode .info-box { background-color: #2b2f33 !important; color: #e6e6e6 !important; border-color: #4a525a !important; }
body.dark-mode .card-header,
body.dark-mode .card-footer { background-color: #343a40 !important; border-color: #4a525a !important; color: #e6e6e6 !important; }
body.dark-mode .card .card-title { color: #e6e6e6 !important; }

/* Tables (GridView + plain) */
body.dark-mode table,
body.dark-mode .table { color: #e6e6e6 !important; background-color: transparent !important; }
body.dark-mode .table thead th { background-color: #343a40 !important; color:#fff !important; border-color: #4a525a !important; }
body.dark-mode .table td,
body.dark-mode .table th { border-color: #4a525a !important; }
body.dark-mode .table-striped tbody tr:nth-of-type(odd) { background-color: #30343a !important; }
body.dark-mode .table-striped tbody tr:nth-of-type(even) { background-color: #2b2f33 !important; }
body.dark-mode .table tbody tr:hover { background-color: #3d444b !important; }
body.dark-mode .grid-view .filters input,
body.dark-mode .grid-view .filters select { background-color: #3d444b !important; color:#fff !important; border: 1px solid #4a525a !important; }

/* Modals */
body.dark-mode .modal-content { background-color: #2b2f33 !important; color:#e6e6e6 !important; border: 1px solid #4a525a !important; }
body.dark-mode .modal-header,
body.dark-mode .modal-footer { background-color: #343a40 !important; border-color: #4a525a !important; }
body.dark-mode .close,
body.dark-mode .modal-header .close { color:#e6e6e6 !important; text-shadow: none !important; opacity:.9; }

/* Form controls */
body.dark-mode .form-control,
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background-color: #3d444b !important;
    color: #fff !important;
    border: 1px solid #4a525a !important;
}
body.dark-mode .form-control:focus,
body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    background-color: #3d444b !important;
    color: #fff !important;
    border-color: #6ab7ff !important;
    box-shadow: 0 0 0 .15rem rgba(106,183,255,.25) !important;
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder { color: #a9b0b7 !important; }
body.dark-mode .input-group-text {
    background-color: #343a40 !important;
    color: #e6e6e6 !important;
    border-color: #4a525a !important;
}
body.dark-mode label,
body.dark-mode legend { color: #e6e6e6 !important; }
body.dark-mode .form-control[readonly],
body.dark-mode input[readonly] { background-color: #2e3338 !important; color:#d6d6d6 !important; }
body.dark-mode .form-control:disabled,
body.dark-mode input:disabled { background-color: #2b2f33 !important; color:#8f8f8f !important; }

/* Keep Bootstrap's coloured buttons looking coloured — DO NOT flatten .btn.
   Only style the unqualified default button. */
body.dark-mode .btn-default,
body.dark-mode .btn-light,
body.dark-mode .btn-secondary,
body.dark-mode .btn.btn-block:not([class*="bg-gradient-"]):not([class*="btn-success"]):not([class*="btn-danger"]):not([class*="btn-warning"]):not([class*="btn-info"]):not([class*="btn-primary"]):not([class*="btn-orange"]) {
    background-color: #4a525a !important;
    color: #fff !important;
    border-color: #5a636b !important;
}
body.dark-mode .btn-outline-secondary { color:#e6e6e6 !important; border-color:#6a737b !important; }
body.dark-mode .btn-outline-secondary:hover { background-color:#4a525a !important; color:#fff !important; }

/* Dropdowns (Bootstrap + AdminLTE user menu etc.) */
body.dark-mode .dropdown-menu { background-color: #2b2f33 !important; border: 1px solid #4a525a !important; }
body.dark-mode .dropdown-menu .dropdown-item { color:#e6e6e6 !important; }
body.dark-mode .dropdown-menu .dropdown-item:hover,
body.dark-mode .dropdown-menu .dropdown-item:focus { background-color:#3d444b !important; color:#fff !important; }
body.dark-mode .dropdown-divider { border-top-color: #4a525a !important; }

/* Select2 (default + Krajee theme) */
body.dark-mode .select2-container--default .select2-selection,
body.dark-mode .select2-container--krajee .select2-selection,
body.dark-mode .select2-container--bootstrap .select2-selection {
    background-color: #3d444b !important;
    border-color: #4a525a !important;
    color: #fff !important;
}
body.dark-mode .select2-container--default .select2-selection__rendered,
body.dark-mode .select2-container--krajee .select2-selection__rendered,
body.dark-mode .select2-container--bootstrap .select2-selection__rendered { color: #fff !important; }
body.dark-mode .select2-container--default .select2-selection__placeholder,
body.dark-mode .select2-container--krajee .select2-selection__placeholder { color: #a9b0b7 !important; }
body.dark-mode .select2-dropdown,
body.dark-mode .select2-dropdown--below,
body.dark-mode .select2-dropdown--above {
    background-color: #2b2f33 !important;
    color: #e6e6e6 !important;
    border-color: #4a525a !important;
}
body.dark-mode .select2-results,
body.dark-mode .select2-results__options { background-color: #2b2f33 !important; }
/* Every result row — including odd/even stripes used by Krajee theme */
body.dark-mode .select2-results__option,
body.dark-mode .select2-results__option:nth-child(odd),
body.dark-mode .select2-results__option:nth-child(even),
body.dark-mode ul.select2-results__options li,
body.dark-mode ul.select2-results__options li:nth-child(odd),
body.dark-mode ul.select2-results__options li:nth-child(even) {
    background-color: #2b2f33 !important;
    color: #e6e6e6 !important;
}
/* Slight zebra so rows are distinguishable without fighting dark theme */
body.dark-mode ul.select2-results__options li:nth-child(even) {
    background-color: #30343a !important;
}
/* Hover / keyboard-selected row */
body.dark-mode .select2-results__option--highlighted[aria-selected],
body.dark-mode .select2-results__option--highlighted,
body.dark-mode ul.select2-results__options li.select2-results__option--highlighted {
    background-color: #3d8bfd !important;
    color: #fff !important;
}
/* Already-selected row (greyed/italic in Krajee) */
body.dark-mode .select2-results__option[aria-selected="true"] {
    background-color: #3d444b !important;
    color: #e6e6e6 !important;
}
/* Group labels / disabled results */
body.dark-mode .select2-results__group {
    background-color: #343a40 !important;
    color: #e6e6e6 !important;
}
body.dark-mode .select2-results__option[aria-disabled="true"] {
    color: #8f959a !important;
}
body.dark-mode .select2-search__field {
    background-color: #3d444b !important;
    color: #fff !important;
    border: 1px solid #4a525a !important;
}
body.dark-mode .select2-search--dropdown { background-color: #2b2f33 !important; }

/* Pagination */
body.dark-mode .pagination .page-link {
    background-color: #2b2f33 !important;
    border-color: #4a525a !important;
    color: #e6e6e6 !important;
}
body.dark-mode .pagination .page-item.active .page-link {
    background-color: #3d8bfd !important;
    border-color: #3d8bfd !important;
    color: #fff !important;
}
body.dark-mode .pagination .page-item.disabled .page-link {
    background-color: #2b2f33 !important;
    color: #6c757d !important;
}

/* List groups, alerts, breadcrumbs */
body.dark-mode .list-group-item { background-color: #2b2f33 !important; color:#e6e6e6 !important; border-color:#4a525a !important; }
body.dark-mode .breadcrumb { background-color: transparent !important; }
body.dark-mode .breadcrumb-item,
body.dark-mode .breadcrumb-item a { color:#cfd3d7 !important; }
body.dark-mode .breadcrumb-item.active { color:#e6e6e6 !important; }

/* Login page */
body.dark-mode .login-box,
body.dark-mode .login-card,
body.dark-mode .login-box .card,
body.dark-mode .login-logo a { background-color: #2b2f33 !important; color:#e6e6e6 !important; }

/* Links */
body.dark-mode a { color: #6ab7ff; }
body.dark-mode a:hover { color: #9fd0ff; }
/* But keep buttons styled as buttons, not as raw links */
body.dark-mode .btn,
body.dark-mode .nav-link,
body.dark-mode .page-link,
body.dark-mode .dropdown-item { color: inherit; }

/* Preserve the semantic row classes (already defined above) */
body.dark-mode .Inactive,
body.dark-mode .OutOfStock,
body.dark-mode .Expired { color: #ff6b6b !important; }
body.dark-mode .Stock_UnderLimit { color: #6ab7ff !important; }
body.dark-mode .Invoice_return_row { color: #d97bff !important; }
body.dark-mode .Invoice_LessThenSysPrice_row { color: #ffc266 !important; }

/* Scrollbars (WebKit) */
body.dark-mode ::-webkit-scrollbar { width: 10px; height: 10px; }
body.dark-mode ::-webkit-scrollbar-track { background: #1e2124; }
body.dark-mode ::-webkit-scrollbar-thumb { background: #4a525a; border-radius: 5px; }
body.dark-mode ::-webkit-scrollbar-thumb:hover { background: #5a636b; }

#salereportModal .modal-dialog {
    height: 90vh;               /* 90% of viewport height */
    display: flex;
    flex-direction: column;
}

#salereportModal .modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#salereportModal .modal-header,
#salereportModal .modal-footer {
    flex-shrink: 0;             /* keep fixed size */
}

#salereportModal .modal-body {
    flex: 1;                    /* take all remaining space */
    overflow-y: auto;           /* scroll only inside body */
}
