/* ============================================================================
   OneClickPOSWeb — Order-module design language, layered over SB Admin 2.
   Pure visual override: every selector below targets classes/ids/attributes
   that already exist in the shipped markup and in sb-admin-2.min.css — no
   HTML structure, class names, data-toggle attributes, or JS behavior is
   touched by this file. Loaded after sb-admin-2.min.css in _Layout.cshtml's
   <head>, so same-specificity rules win by source order; #-prefixed
   selectors are used wherever a class-only SB Admin 2 rule needs outranking.
   Token values match OneClickPOSOrder/wwwroot/css/app.css's :root block.
   ============================================================================ */

:root {
  --ocp-page: #F3F6F8;
  --ocp-surface: #FFFFFF;
  --ocp-ink: #16202A;
  --ocp-ink-soft: #47576A;
  --ocp-muted: #7E8FA0;
  --ocp-line: #E1E8ED;
  --ocp-brand: #0B6E9E;
  --ocp-brand-dark: #075277;
  --ocp-brand-soft: #DCEEF6;
  --ocp-nav-bg: #16202A;
  --ocp-nav-bg-2: #101822;
  --ocp-nav-line: rgba(255, 255, 255, .08);
  --ocp-nav-text: rgba(255, 255, 255, .68);
  --ocp-nav-text-dim: rgba(255, 255, 255, .38);
  --ocp-shadow: 0 1px 2px rgba(26, 25, 23, .04), 0 3px 10px rgba(26, 25, 23, .05);
  --ocp-success: #0a7a53;
  --ocp-success-soft: #DCFCE7;
  --ocp-warning: #B45309;
  --ocp-warning-soft: #FEF3C7;
  --ocp-danger: #B91C1C;
  --ocp-danger-soft: #FDECEC;
  --ocp-plum: #6D28D9;
  --ocp-plum-soft: #EFE9FE;
  --ocp-teal: #0E7490;
  --ocp-teal-soft: #E0F7FA;
}

/* ---- Base: page background + typography, site-wide ---- */
body {
  background-color: var(--ocp-page) !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif !important;
}
#wrapper #content-wrapper {
  background-color: var(--ocp-page) !important;
}

/* ---- Sidebar shell ---- */
#accordionSidebar {
  background: linear-gradient(180deg, var(--ocp-nav-bg) 0%, var(--ocp-nav-bg-2) 100%) !important;
}
#accordionSidebar .sidebar-brand-icon {
  color: #fff;
}
#accordionSidebar .sidebar-brand-text {
  font-weight: 700;
  letter-spacing: .01em;
}
#accordionSidebar hr.sidebar-divider {
  border-top: 1px solid var(--ocp-nav-line);
  opacity: 1;
}
#accordionSidebar .sidebar-heading {
  color: var(--ocp-nav-text-dim);
  font-weight: 800;
  letter-spacing: .06em;
}

/* Nav links — text/icon color, hover, active pill (inset via margin so the
   existing full-width <a> reads as a rounded chip without changing markup). */
#accordionSidebar .nav-item .nav-link {
  color: var(--ocp-nav-text);
  font-weight: 600;
  margin: 1px 10px;
  width: calc(100% - 20px);
  border-radius: 12px;
}
#accordionSidebar .nav-item .nav-link i {
  color: var(--ocp-nav-text);
  opacity: .9;
}
#accordionSidebar .nav-item .nav-link:hover,
#accordionSidebar .nav-item .nav-link:focus {
  color: #fff;
  background-color: rgba(255, 255, 255, .06);
}
#accordionSidebar .nav-item .nav-link:hover i,
#accordionSidebar .nav-item .nav-link:focus i {
  color: #fff;
}
#accordionSidebar .nav-item.active .nav-link {
  background-color: rgba(255, 255, 255, .06);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 3px 0 0 var(--ocp-brand);
}
#accordionSidebar .nav-item.active .nav-link i {
  color: #fff;
}
#accordionSidebar .nav-item .nav-link[data-toggle="collapse"]:not(.collapsed) {
  background-color: rgba(255, 255, 255, .06);
}

/* SB Admin 2 only floats a submenu (position:absolute, doesn't disturb
   layout) when the sidebar is toggled down to icon-only width; at full
   width/desktop it defaults to an inline accordion instead, which pushes the
   sidebar's own height (and, once its min-width from .collapse-inner below
   exceeds the space Flexbox gave it, the sidebar's width too) every time a
   submenu opens. Floating it unconditionally at desktop keeps the sidebar's
   box fixed no matter what's expanded, same as the icon-only/old-theme
   behavior. */
@media (min-width: 768px) {
  #accordionSidebar .nav-item .collapse {
    position: absolute !important;
    left: 100% !important;
    top: 0 !important;
    z-index: 1030 !important;
    margin-left: 4px;
  }
  #accordionSidebar .nav-item .collapsing {
    display: none !important;
    transition: none !important;
  }
}

/* Collapsed submenu panels — a floating card, so it gets the heavier "float"
   shadow rather than the flatter one inline cards use, plus real breathing
   room instead of SB Admin 2's tight .5rem/0.85rem defaults. */
#accordionSidebar .collapse-inner {
  background-color: var(--ocp-surface) !important;
  box-shadow: 0 4px 16px rgba(16, 32, 42, .12), 0 12px 32px rgba(16, 32, 42, .10);
  border: 1px solid var(--ocp-line);
  border-radius: 14px !important;
  padding: 10px 0 !important;
  min-width: 13rem !important;
}
#accordionSidebar .collapse-header {
  color: var(--ocp-muted);
  font-weight: 800;
  font-size: .68rem;
  letter-spacing: .06em;
  padding: .6rem 1.15rem .3rem !important;
}
#accordionSidebar .collapse-divider {
  height: 1px;
  background: var(--ocp-line);
  margin: .5rem .9rem;
}
#accordionSidebar .collapse-item {
  color: var(--ocp-ink-soft);
  font-weight: 600;
  font-size: .86rem;
  border-radius: 9px;
  margin: 1px 8px;
  width: calc(100% - 16px);
  padding: .55rem .85rem !important;
}
#accordionSidebar .collapse-item:hover,
#accordionSidebar .collapse-item:active {
  background-color: var(--ocp-brand-soft);
  color: var(--ocp-brand-dark);
}
#accordionSidebar .collapse-item.active {
  color: var(--ocp-brand) !important;
  font-weight: 700;
}

/* Sidebar collapse toggle (desktop icon-only mode) */
#accordionSidebar #sidebarToggle {
  background-color: rgba(255, 255, 255, .08);
}
#accordionSidebar #sidebarToggle::after {
  color: #fff;
}
#accordionSidebar #sidebarToggle:hover {
  background-color: rgba(255, 255, 255, .16);
}

/* ---- Topbar ---- */
.topbar {
  background-color: var(--ocp-surface) !important;
  box-shadow: var(--ocp-shadow) !important;
  border-bottom: 1px solid var(--ocp-line);
}
.topbar .dropdown-item {
  color: var(--ocp-ink-soft);
}
.topbar .dropdown-item:hover {
  background-color: var(--ocp-brand-soft);
  color: var(--ocp-brand-dark);
}
/* The language picker's items are <button>s (a plain multi-submit-button
   form, so switching language works with no JS of its own) — reset native
   button chrome so they render identically to the <a class="dropdown-item">
   items used elsewhere in this same menu style. */
.dropdown-menu button.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  font: inherit;
}

/* ---- Footer ---- */
footer.sticky-footer {
  background-color: var(--ocp-surface) !important;
  border-top: 1px solid var(--ocp-line);
}
footer.sticky-footer .copyright,
footer.sticky-footer .copyright a {
  color: var(--ocp-muted);
}

/* ---- Primary buttons + links: brand color instead of SB Admin 2 blue ---- */
.btn-primary {
  background-color: var(--ocp-brand) !important;
  border-color: var(--ocp-brand) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--ocp-brand-dark) !important;
  border-color: var(--ocp-brand-dark) !important;
}
a {
  color: var(--ocp-brand);
}
a:hover {
  color: var(--ocp-brand-dark);
}

/* ---- Mobile: SB Admin 2's own responsive rules (sidebar off-canvas below
   768px, icon-only collapse above) are untouched — this just carries the
   same tokens through them so colors/typography stay consistent instead of
   the sidebar text becoming readable-but-still-navy-blue mid-collapse. ---- */
@media (max-width: 767.98px) {
  #accordionSidebar .nav-item .nav-link {
    margin: 1px 8px;
    width: calc(100% - 16px);
  }
}

/* ============================================================================
   Common Bootstrap components, site-wide — cards, buttons, forms, tables,
   badges, alerts, dropdowns, pagination. Every ~30 content pages build on
   these same Bootstrap 4 classes, so restyling them once here carries the
   design language to all of them through this one shared file, the same way
   the sidebar/topbar above does. Still pure visual override: no class names
   or markup structure assumed beyond what SB Admin 2 already ships.
   ============================================================================ */

.card {
  border-color: var(--ocp-line);
  border-radius: 14px;
  box-shadow: var(--ocp-shadow);
}
.card-header {
  background-color: var(--ocp-surface);
  border-bottom-color: var(--ocp-line);
}

.btn {
  border-radius: 10px;
}
.btn-success { background-color: #10B981 !important; border-color: #10B981 !important; }
.btn-danger  { background-color: #DC2626 !important; border-color: #DC2626 !important; }
.btn-warning { background-color: #D97706 !important; border-color: #D97706 !important; color: #fff !important; }
.btn-info    { background-color: var(--ocp-brand) !important; border-color: var(--ocp-brand) !important; }
.btn-secondary { background-color: var(--ocp-ink-soft) !important; border-color: var(--ocp-ink-soft) !important; }
.btn-outline-primary { color: var(--ocp-brand); border-color: var(--ocp-brand); }
.btn-outline-primary:hover { background-color: var(--ocp-brand); border-color: var(--ocp-brand); }

.form-control, .custom-select {
  border-color: var(--ocp-line);
  border-radius: 10px;
  background-color: var(--ocp-surface);
  color: var(--ocp-ink);
}
.form-control:focus, .custom-select:focus {
  border-color: var(--ocp-brand);
  box-shadow: 0 0 0 0.2rem var(--ocp-brand-soft);
}
.form-control::placeholder { color: var(--ocp-muted); opacity: 1; }

/* Field labels get the same small-caps-tracked treatment as table headers below —
   one consistent "label" idiom across the whole UI instead of each surface having
   its own ad-hoc styling. */
.form-group > label, form label:not(.custom-control-label):not(.collapse-header) {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ocp-ink-soft);
  margin-bottom: .4rem;
}

.table thead th {
  border-bottom-color: var(--ocp-line);
  color: var(--ocp-ink-soft);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.table td, .table th, .table-bordered, .table-bordered th, .table-bordered td {
  border-color: var(--ocp-line);
}
.table-hover tbody tr:hover {
  background-color: var(--ocp-brand-soft);
}

.badge-primary { background-color: var(--ocp-brand); }
.badge-success { background-color: #10B981; }
.badge-danger  { background-color: #DC2626; }
.badge-warning { background-color: #D97706; color: #fff; }
.badge-info    { background-color: var(--ocp-brand); }

.alert-primary { background-color: var(--ocp-brand-soft); border-color: var(--ocp-brand-soft); color: var(--ocp-brand-dark); }
.alert-success { background-color: #DCFCE7; border-color: #DCFCE7; color: #0a7a53; }
.alert-danger  { background-color: #FDECEC; border-color: #FDECEC; color: #B91C1C; }
.alert-warning { background-color: #FEF3C7; border-color: #FEF3C7; color: #B45309; }
.alert-info    { background-color: var(--ocp-brand-soft); border-color: var(--ocp-brand-soft); color: var(--ocp-brand-dark); }
.alert-secondary, .alert-light { background-color: #EEF1F4; border-color: #EEF1F4; color: var(--ocp-ink-soft); }

.dropdown-menu {
  border-color: var(--ocp-line);
  box-shadow: var(--ocp-shadow);
  border-radius: 12px;
}
.dropdown-item:hover, .dropdown-item:focus {
  background-color: var(--ocp-brand-soft);
  color: var(--ocp-brand-dark);
}

.page-link {
  color: var(--ocp-brand);
  border-color: var(--ocp-line);
}
.page-item.active .page-link {
  background-color: var(--ocp-brand);
  border-color: var(--ocp-brand);
}

.modal-content {
  border-radius: 14px;
  border: none;
  box-shadow: 0 8px 30px rgba(16, 32, 42, .18);
}
.modal-header {
  border-bottom-color: var(--ocp-line);
}
.modal-footer {
  border-top-color: var(--ocp-line);
}

/* ============================================================================
   KPI ("stat") cards — SB Admin 2's idiom is a 4px colored bar on the card's
   left edge plus a large pale icon parked on the right. The mockup's is a
   small colored icon CHIP on the left instead, no accent bar. Reproduced here
   as layout only — flips the existing two-column flex row (already how
   Bootstrap's `.row.no-gutters` renders: text column + `.col-auto` icon
   column) and re-styles the existing <i> icon element directly into a chip.
   No markup/HTML changes anywhere — every KPI card on every page picks this
   up automatically since it targets the SB Admin 2 classes already present.
   ============================================================================ */
.card[class*="border-left-"] {
  border-left: none !important;
  border-radius: 16px;
}
.card[class*="border-left-"] > .card-body > .row.no-gutters.align-items-center {
  flex-direction: row-reverse;
  gap: 14px;
}
.card[class*="border-left-"] > .card-body > .row.no-gutters > .col-auto {
  flex: 0 0 auto;
}
.card[class*="border-left-"] > .card-body i.fas,
.card[class*="border-left-"] > .card-body i.far {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.05rem !important;
  background: var(--ocp-brand-soft);
  color: var(--ocp-brand-dark) !important;
}
.card.border-left-success > .card-body i.fas { background: #DCFCE7; color: #0a7a53 !important; }
.card.border-left-warning > .card-body i.fas { background: #FEF3C7; color: #B45309 !important; }
.card.border-left-danger  > .card-body i.fas { background: #FDECEC; color: #B91C1C !important; }
.card.border-left-secondary > .card-body i.fas { background: #EEF1F4; color: var(--ocp-ink-soft) !important; }
/* The little uppercase stat label (text-xs/text-uppercase) gets the same
   small-caps-tracked treatment as every other label on the site. */
.card[class*="border-left-"] .text-xs.text-uppercase {
  color: var(--ocp-muted) !important;
  font-size: .68rem !important;
  letter-spacing: .05em;
}
.card[class*="border-left-"] .h5 {
  color: var(--ocp-ink) !important;
  font-size: 1.2rem;
}

/* ============================================================================
   Dark mode — toggle button lives in the topbar (nav-item#themeToggle),
   applies html[data-theme="dark"] via a small inline script in _Layout.cshtml
   that also persists the choice in localStorage. Same token values as
   OneClickPOSOrder/wwwroot/css/app.css's dark-mode media-query block.
   ============================================================================ */
html[data-theme="dark"] {
  --ocp-page: #0E1620;
  --ocp-surface: #17222E;
  --ocp-ink: #EAF0F5;
  --ocp-ink-soft: #B9C6D3;
  --ocp-muted: #7E8FA0;
  --ocp-line: #263542;
  --ocp-brand: #4FA8D8;
  --ocp-brand-dark: #0B6E9E;
  --ocp-brand-soft: #0F2C3A;
  --ocp-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 3px 12px rgba(0, 0, 0, .32);
}
html[data-theme="dark"] body,
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] #accordionSidebar .collapse-inner {
  color: var(--ocp-ink);
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .custom-select,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .table {
  background-color: var(--ocp-surface);
  color: var(--ocp-ink);
}
html[data-theme="dark"] .table thead th {
  color: var(--ocp-ink-soft);
}
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
  border-color: var(--ocp-line);
  color: var(--ocp-ink);
}
html[data-theme="dark"] .text-gray-800,
html[data-theme="dark"] .text-dark {
  color: var(--ocp-ink) !important;
}
html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-muted {
  color: var(--ocp-muted) !important;
}
html[data-theme="dark"] .card.bg-white,
html[data-theme="dark"] .bg-white {
  background-color: var(--ocp-surface) !important;
}
/* KPI icon chips — the light pastel chip colors need their own dark-mode
   variants (same values OneClickPOSOrder's own dark palette uses for these
   semantic colors), since they're literal per-status hex, not the --ocp-*
   tokens that already flip automatically above. */
html[data-theme="dark"] .card.border-left-success > .card-body i.fas { background: #103524; color: #34D399 !important; }
html[data-theme="dark"] .card.border-left-warning > .card-body i.fas { background: #3A2A08; color: #FBBF24 !important; }
html[data-theme="dark"] .card.border-left-danger  > .card-body i.fas { background: #3A1512; color: #F87171 !important; }
html[data-theme="dark"] .card.border-left-secondary > .card-body i.fas { background: rgba(255,255,255,.06); color: var(--ocp-ink-soft) !important; }
html[data-theme="dark"] {
  --ocp-success: #34D399;
  --ocp-success-soft: #103524;
  --ocp-warning: #FBBF24;
  --ocp-warning-soft: #3A2A08;
  --ocp-danger: #F87171;
  --ocp-danger-soft: #3A1512;
  --ocp-plum: #C4B5FD;
  --ocp-plum-soft: #2C2150;
  --ocp-teal: #67E8F9;
  --ocp-teal-soft: #0B3A42;
}

/* Topbar theme toggle button (and the language picker beside it, kept the same color/shape) */
#themeToggle, #langDropdown {
  border: none;
  background: transparent;
  color: var(--ocp-ink-soft);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#themeToggle:hover, #langDropdown:hover {
  background-color: var(--ocp-brand-soft);
  color: var(--ocp-brand-dark);
}
#themeToggle .icon-moon { display: none; }
html[data-theme="dark"] #themeToggle .icon-sun { display: none; }
html[data-theme="dark"] #themeToggle .icon-moon { display: inline; }

/* ============================================================================
   Dashboard date-range filter (Dashboard/Index.cshtml + Dashboard/Company.cshtml
   share the exact same #dashboardForm markup — a Bootstrap 3-column row: label+
   date input, label+date input, block refresh button). Reflowed into the
   mockup's single compact pill — same inputs/button/asp-for bindings, just
   laid out differently. Pure layout, same as the KPI-card reflow above. ---- */
#dashboardForm > .form-group > .row.align-items-end {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--ocp-surface);
  border-radius: 999px;
  box-shadow: var(--ocp-shadow);
  padding: 6px 8px 6px 22px;
  width: fit-content;
  max-width: 100%;
}
#dashboardForm .col-md-5,
#dashboardForm .col-md-2 {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  padding: 0;
}
#dashboardForm .form-group.text-center {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
#dashboardForm label {
  margin-bottom: 0 !important;
  font-size: .68rem !important;
  white-space: nowrap;
}
#dashboardForm input[type="date"] {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: auto;
  min-width: 108px;
  font-weight: 700;
  font-size: .85rem;
  color: var(--ocp-ink);
}
#dashboardForm .col-md-5:first-of-type {
  border-right: 1px solid var(--ocp-line);
  padding-right: 16px !important;
}
#dashboardForm .btn.btn-user.btn-block {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  border-radius: 50% !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
}
#dashboardForm .btn i {
  margin: 0 !important;
}

/* ============================================================================
   Login.cshtml — standalone page (Layout=""), so it loads this stylesheet
   directly rather than inheriting it via _Layout.cshtml. Same rule as
   everywhere else: targets only classes the page already uses.
   ============================================================================ */
body.bg-gradient-primary {
  /* Old theme's plain 2-stop gradient reads richer than a flat brand-color
     fill because of its dark cap at the very top (#2c353c fading into the
     blue by 10%) — deep contrast at one end, not just two flat colors.
     Reproduced with the same shape (dark ink cap → brand blue → a deeper
     brand tone), plus two soft out-of-frame glows for a bit of ambient depth
     instead of a perfectly flat gradient field. */
  background:
    radial-gradient(700px circle at 12% -10%, rgba(255, 255, 255, .10), transparent 55%),
    radial-gradient(900px circle at 105% 105%, rgba(0, 0, 0, .18), transparent 60%),
    linear-gradient(165deg, var(--ocp-ink) 0%, var(--ocp-brand) 22%, var(--ocp-brand-dark) 100%) !important;
  min-height: 100vh;
}
.bg-login-image {
  /* The shipped rule (`url("~/img/...")`) 404s from a plain CSS file — the
     tilde only resolves inside Razor — so this panel already rendered blank
     before this stylesheet existed. Filling it with the brand gradient
     instead of leaving it blank/broken either way. */
  background: linear-gradient(160deg, var(--ocp-brand) 0%, var(--ocp-brand-dark) 100%) !important;
  position: relative;
}
/* The real logo (black "One Click" + navy "Solutions" wordmark) has no
   contrast against the brand-blue gradient behind it, so it sits on its own
   white card rather than directly on the gradient — same "elevated card
   floating on a colored panel" idiom the mockup used for the brand mark. */
.bg-login-image::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  background: #fff url("/OneClickPOSLogo.png") center / 78% no-repeat;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(16, 32, 42, .28);
}
/* Bootstrap's own `d-none d-lg-block` on this column hides the logo panel
   below the lg breakpoint (it was written assuming the image was decorative
   filler). It's the actual brand mark now, so show it on mobile too, as a
   shorter banner stacked above the form instead of matching the form's full
   height. */
@media (max-width: 991.98px) {
  .bg-login-image {
    display: block !important;
    min-height: 200px;
  }
  .bg-login-image::before {
    width: 55%;
    max-width: 180px;
  }
}
form.user .form-control-user {
  border-color: var(--ocp-line);
}
form.user .form-control-user:focus {
  border-color: var(--ocp-brand);
  box-shadow: 0 0 0 0.2rem var(--ocp-brand-soft);
}
form.user .btn-user.btn-primary {
  background-color: var(--ocp-brand) !important;
  border-color: var(--ocp-brand) !important;
}
form.user .btn-user.btn-primary:hover {
  background-color: var(--ocp-brand-dark) !important;
  border-color: var(--ocp-brand-dark) !important;
}
.card.o-hidden {
  border-radius: 20px !important;
  box-shadow: 0 4px 16px rgba(11, 110, 158, .18), 0 12px 32px rgba(16, 32, 42, .14) !important;
}

/* ============================================================================
   Report/Stock.cshtml — dense per-branch stock matrix. Name column is pinned
   so the product stays identifiable while the (often very wide) per-branch
   columns scroll inside the existing .table-responsive wrapper. Every cell
   that used to get a raw inline HTML color name (LimeGreen/Yellow/Violet/
   DarkBlue/LightSkyBlue/red) when its value crossed the same >0 (or <0, for
   Closing Stock) condition the .cshtml already computed now gets a small
   chip in the app's own palette instead of a full-cell color fill — same
   conditions, same values, just a class name in place of an inline style.
   Name-column/stock-chip classes are bare (not ID-scoped) — Dashboard/Index's
   collapsible "Stock Movement Report" table (#StockMovementTable) has the
   identical In/Production/Client/VD movement columns with the same >0-gated
   inline colors and reuses these same classes.
   ============================================================================ */
th.name-col,
td.name-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--ocp-surface);
  box-shadow: 2px 0 0 var(--ocp-line);
  text-align: left !important;
  font-weight: 600;
  color: var(--ocp-ink-soft);
}
thead th.name-col {
  background: var(--ocp-page);
  z-index: 3;
  font-weight: 800;
  color: var(--ocp-ink);
}
#dataTable-stock th.branch-label {
  background: var(--ocp-brand-soft) !important;
  color: var(--ocp-brand-dark) !important;
  border-radius: 8px;
}
#dataTable-stock tr.cat-row td {
  background: var(--ocp-ink) !important;
  color: #fff !important;
  border-color: var(--ocp-ink) !important;
  font-weight: 800;
  text-align: left !important;
}
#dataTable-stock tr.subcat-row td {
  background: var(--ocp-ink-soft) !important;
  color: #fff !important;
  border-color: var(--ocp-ink-soft) !important;
  font-weight: 700;
  text-align: left !important;
}
#dataTable-stock td.stock-label {
  background: var(--ocp-brand-soft) !important;
  color: var(--ocp-brand-dark) !important;
  font-weight: 800;
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 8px;
}
.stock-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: .18rem .5rem;
  border-radius: 7px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stock-chip.in { background: var(--ocp-success-soft); color: var(--ocp-success); }
.stock-chip.production { background: var(--ocp-brand-soft); color: var(--ocp-brand-dark); }
.stock-chip.out { background: var(--ocp-warning-soft); color: var(--ocp-warning); }
.stock-chip.client { background: var(--ocp-plum-soft); color: var(--ocp-plum); }
.stock-chip.vd { background: var(--ocp-teal-soft); color: var(--ocp-teal); }
.stock-chip.closing { background: var(--ocp-brand-soft); color: var(--ocp-brand-dark); font-weight: 800; }
.stock-chip.closing.neg { background: var(--ocp-danger-soft); color: var(--ocp-danger); }

/* ============================================================================
   Products/Index.cshtml — catalog table. Barcode/lot moves under the name
   (one fewer standalone column), long descriptions clip to one line instead
   of stretching row height, and the per-row action icons become one compact
   horizontal toolbar instead of stacking vertically. Same <td> data, same
   asp-page links/handlers behind the icons — purely a layout + icon-sizing
   change on top of what the page already renders.
   ============================================================================ */
#dataTable-products td.prod-name-cell { font-weight: 600; color: var(--ocp-ink-soft); }
#dataTable-products td.prod-code-cell { font-size: .78rem; color: var(--ocp-muted); font-variant-numeric: tabular-nums; }
/* Not ID-scoped — this same checkbox-to-badge swap is reused on Banks/Index,
   Suppliers/Pending and Office/SupplierOut (Mobile/GUIA/IVA columns), not
   just this table. */
.iva-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .78rem;
  background: var(--ocp-success-soft);
  color: var(--ocp-success);
}
.iva-pill.off {
  background: var(--ocp-page);
  color: var(--ocp-muted);
}
#dataTable-products td.prod-desc {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ocp-ink-soft);
}
#dataTable-products td.actions-cell {
  white-space: nowrap;
  text-align: center !important;
}
#dataTable-products .actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--ocp-page);
  border: 1px solid var(--ocp-line);
  border-radius: 9px;
  padding: 3px;
}
#dataTable-products .actions a,
#dataTable-products .actions button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ocp-ink-soft) !important;
}
#dataTable-products .actions a:hover,
#dataTable-products .actions button:hover {
  background: var(--ocp-surface);
  color: var(--ocp-brand) !important;
  box-shadow: 0 1px 2px rgba(22, 32, 42, .08);
}

/* ============================================================================
   Suppliers/Pending.cshtml — pending-invoice grid (table id="dataTable-list").
   Supplier name pinned so it stays visible while Due/Overdue/Amount/Payment
   scroll. "Overdue" becomes a graded chip instead of a bare number — same
   GetOverdueClass() severity buckets the page already computed (previously
   applied as a full pastel row background, now scoped to just this one
   cell and restyled with the app's own palette). "Amount Left" is bolded as
   the one figure that actually matters at a glance; Amount/Payment/Amount
   Left right-align via their own class since the page's `text-end`/`fw-bold`
   utility classes are Bootstrap 5 names that don't exist in this Bootstrap 4
   app (dead classes, left as-is — harmless, just inert).
   Class selectors, not ID-scoped: Office/SupplierOut.cshtml's #invoiceTable
   builds the identical shape (same GUIA/Supplier/Overdue/Amount Left/IVA
   columns, same 4-tier overdue severity, client-side via JS) and reuses the
   same classes so both tables share one definition instead of a duplicate.
   ============================================================================ */
th.supplier-col,
td.supplier-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--ocp-surface);
  box-shadow: 2px 0 0 var(--ocp-line);
  font-weight: 600;
  color: var(--ocp-ink-soft);
  text-align: left !important;
}
thead th.supplier-col {
  background: var(--ocp-page);
  z-index: 3;
}
th.num-col,
td.num-col {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}
.amount-left {
  font-weight: 700;
  color: var(--ocp-ink-soft);
}
.due-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  background: var(--ocp-page);
  color: var(--ocp-ink-soft);
}
.due-chip.overdue-yellow { background: var(--ocp-brand-soft); color: var(--ocp-brand-dark); }
.due-chip.overdue-orange { background: var(--ocp-warning-soft); color: var(--ocp-warning); }
.due-chip.overdue-orangeRed { background: var(--ocp-warning-soft); color: var(--ocp-danger); }
.due-chip.overdue-red { background: var(--ocp-danger-soft); color: var(--ocp-danger); }

/* ============================================================================
   Location/Inventory.cshtml — per-branch inventory grid. Same full-row-tint
   pattern as the Overdue work above (row got `.expired`/`.expiring-soon`
   when a product's expiry date crossed the same threshold the page already
   computed) — moved onto a `.due-chip` in just the Expiry cell instead. The
   category-group divider rows (`.group-header`, was a raw black inline
   style) and the low-stock threshold cell (was a raw DarkOrange inline
   style, on an editable click-to-edit cell — only its background changed,
   the data-* attributes and edit behavior are untouched) get the same
   app-palette treatment as Report/Stock's equivalents.
   ============================================================================ */
tr.group-header td {
  background: var(--ocp-ink) !important;
  color: #fff !important;
  border-color: var(--ocp-ink) !important;
  font-weight: 800;
}
.due-chip.expired { background: var(--ocp-danger-soft); color: var(--ocp-danger); }
.due-chip.expiring-soon { background: var(--ocp-warning-soft); color: var(--ocp-warning); }
td.low-stock-cell {
  background: var(--ocp-warning-soft) !important;
}
td.low-stock-cell .editable-threshold {
  color: var(--ocp-warning);
  font-weight: 700;
}

/* ============================================================================
   Location/Reorder.cshtml — Group by/View toolbar. The markup used a
   Bootstrap 5 `ms-3` margin utility for the gap before "View:", which does
   nothing in this Bootstrap 4 app (dead class, same issue as the `text-end`/
   `fw-bold` cases elsewhere) — the label sat jammed against the button group
   with no gap at all. Replaced with a real flex layout.
   ============================================================================ */
.reorder-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .85rem 1.5rem;
}
.reorder-toolbar-label {
  color: var(--ocp-ink-soft);
  font-size: .85rem;
}

/* ============================================================================
   Bootstrap 5 utility-class compatibility shim. This app ships Bootstrap 4
   (sb-admin-2.min.css), but several pages were written with Bootstrap 5
   utility class names (`me-2`, `ms-3`, `fw-bold`, `text-end`, `text-start`)
   — a handful of confirmed real cases so far: Location/Reorder's toolbar
   label spacing, Suppliers/Pending's Bank/Bank+Description toggle-button
   spacing and its Bank-view tables' bold/right-align. Bootstrap 4 doesn't
   define these classes at all, so the browser silently ignores them — no
   error, just a missing style. Rather than hunt down every existing (and
   future) occurrence file-by-file, defining the handful actually in use
   here — matching Bootstrap's own values — fixes all of them at once.
   ============================================================================ */
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-light { font-weight: 300 !important; }
.text-end { text-align: right !important; }
.text-start { text-align: left !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-1 { margin-left: .25rem !important; }
.ms-2 { margin-left: .5rem !important; }
.ms-3 { margin-left: 1rem !important; }
