@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&display=swap");

/* =============================================================================================================
   Panacea Express admin: one calm, flat look.
   White surfaces, one green, hairline borders. No gradients, no glass, no shadows, no blue.
   Loaded AFTER theme.min.css on every page, so it re-points the theme's colour variables and then tidies the
   components that carry their own colours. Statuses keep amber (waiting) and red (problem) because those carry meaning.
   ============================================================================================================= */

:root {
  --ui-green: #0a7c44;
  --ui-green-pressed: #086a3a;
  --ui-green-tint: #edf5f0;
  --ui-green-line: #b9dfc9;
  --ui-amber: #8a5a00;
  --ui-amber-tint: #fff6e0;
  --ui-red: #c62828;
  --ui-red-tint: #fdf0f0;

  --ui-ink: #17241d;
  --ui-text: #3a4740;
  --ui-muted: #6a766f;
  --ui-faint: #8d9a93;
  --ui-line: #dde3df;
  --ui-line-strong: #c3ccc7;
  --ui-fill: #f6f8f7;
  --ui-fill-2: #edf1ee;

  --ui-radius: 8px;
  --ui-radius-lg: 12px;
  --ui-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ui-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;

  /* Re-point the theme's palette (Freshcart) so every component that uses it follows. */
  --fc-primary: #0a7c44;
  --fc-primary-rgb: 10, 124, 68;
  --fc-blue: #0a7c44;
  --fc-success: #0a7c44;
  --fc-success-rgb: 10, 124, 68;
  --fc-info: #4a5750;
  --fc-info-rgb: 74, 87, 80;
  --fc-cyan: #0a7c44;
  --fc-indigo: #0a7c44;
  --fc-purple: #0a7c44;
  --fc-pink: #c62828;
  --fc-teal: #0a7c44;
  --fc-secondary: #8d9a93;
  --fc-secondary-rgb: 141, 154, 147;
  --fc-warning: #b86d00;
  --fc-warning-rgb: 184, 109, 0;
  --fc-danger: #c62828;
  --fc-danger-rgb: 198, 40, 40;
  --fc-red: #c62828;
  --fc-light: #f6f8f7;
  --fc-light-rgb: 246, 248, 247;
  --fc-dark: #17241d;
  --fc-dark-rgb: 23, 36, 29;
  --fc-gray: #6a766f;
  --fc-gray-dark: #17241d;
  --fc-gray-100: #f6f8f7;
  --fc-gray-200: #edf1ee;
  --fc-gray-300: #dde3df;
  --fc-gray-400: #c3ccc7;
  --fc-gray-400-rgb: 195, 204, 199;
  --fc-gray-500: #8d9a93;
  --fc-gray-600: #6a766f;
  --fc-gray-700: #4a5750;
  --fc-gray-800: #2b3830;
  --fc-gray-900: #17241d;
  --fc-light-primary: #edf5f0;
  --fc-light-primary-rgb: 237, 245, 240;
  --fc-light-secondary: #edf1ee;
  --fc-light-secondary-rgb: 237, 241, 238;
  --fc-light-success: #edf5f0;
  --fc-light-success-rgb: 237, 245, 240;
  --fc-light-info: #edf1ee;
  --fc-light-info-rgb: 237, 241, 238;
  --fc-light-warning: #fff6e0;
  --fc-light-warning-rgb: 255, 246, 224;
  --fc-light-danger: #fdf0f0;
  --fc-light-danger-rgb: 253, 240, 240;
  --fc-dark-primary: #064d2a;
  --fc-dark-primary-rgb: 6, 77, 42;
  --fc-dark-success: #064d2a;
  --fc-dark-info: #2b3830;
  --fc-dark-warning: #664d03;
  --fc-dark-danger: #7a1c1c;
}

/* ---------------------------------------------------------------- page */
html,
body {
  background: #fff !important;
  color: var(--ui-text);
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
}

body {
  background-image: none !important;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--ui-ink);
  font-family: var(--ui-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: var(--ui-green);
}

a:hover {
  color: var(--ui-green-pressed);
}

/* Content fills the space beside the sidebar and never pushes the page wider than the window.
   (A wide table used to stretch <main>, which pushed the cards past the right edge.) */
.main-wrapper {
  min-width: 0;
}

main.main-content-wrapper {
  flex: 1 1 0;
  min-width: 0;
  padding-top: calc(72px + 1.5rem); /* the top bar is fixed and 72px tall */
  padding-bottom: 2rem;
  background: #fff;
}

main.main-content-wrapper > .container,
main.main-content-wrapper > .container-fluid {
  width: 100%;
  max-width: 1480px;
  min-width: 0;
}

.row > * {
  min-width: 0;
}

.card,
.card-body,
.table-responsive {
  min-width: 0;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------------- top bar */
.navbar-glass,
.navbar-glass.navbar {
  background: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-line) !important;
  box-shadow: none !important;
}

.navbar-glass .btn-ghost-secondary,
.navbar-glass .btn-icon {
  color: var(--ui-muted);
}

.navbar-glass .btn-ghost-secondary:hover {
  background: var(--ui-fill-2);
  color: var(--ui-ink);
}

.notification-badge,
.navbar-glass .badge.bg-danger {
  background: var(--ui-green) !important;
  color: #fff;
}

/* ---------------------------------------------------------------- sidebar */
.navbar-vertical-nav,
.navbar-vertical,
.navbar-offcanvac {
  background: #fff !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border-right: 1px solid var(--ui-line) !important;
}

.navbar-vertical-nav .nav-link,
.navbar-offcanvac .nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 40px;
  margin: 1px 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--ui-radius);
  color: var(--ui-text);
  font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.navbar-vertical-nav .nav-link i,
.navbar-vertical-nav .nav-link svg,
.navbar-offcanvac .nav-link i,
.navbar-offcanvac .nav-link svg {
  color: var(--ui-faint);
}

.navbar-vertical-nav .nav-link:hover,
.navbar-offcanvac .nav-link:hover {
  background: var(--ui-fill-2);
  color: var(--ui-ink);
}

.navbar-vertical-nav .nav-link.active,
.navbar-vertical-nav .nav-link[aria-expanded="true"],
.navbar-offcanvac .nav-link.active,
.navbar-offcanvac .nav-link[aria-expanded="true"] {
  background: var(--ui-green-tint);
  color: var(--ui-green);
  font-weight: 600;
}

.navbar-vertical-nav .nav-link.active i,
.navbar-vertical-nav .nav-link[aria-expanded="true"] i,
.navbar-offcanvac .nav-link.active i,
.navbar-offcanvac .nav-link[aria-expanded="true"] i {
  color: var(--ui-green);
}

.navbar-vertical-nav .nav-heading,
.navbar-vertical-nav .nav-item > .small {
  color: var(--ui-muted);
}

/* ---------------------------------------------------------------- cards and surfaces */
.card,
.glass-card,
.glass-card.modal-content {
  background: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-radius-lg) !important;
  box-shadow: none !important;
}

.glass-card {
  padding: 2rem;
}

.glass-card.modal-content {
  padding: 0;
}

/* sign-in page: a plain white page with one flat card */
.login-page {
  background: var(--ui-fill);
}

.login-card {
  background: #fff;
}

.card-lg,
.card.card-lg {
  border-radius: var(--ui-radius-lg) !important;
}

.card-header,
.card-footer {
  background: #fff;
  border-color: var(--ui-line);
}

.bg-light {
  background-color: var(--ui-fill) !important;
}

.shadow,
.shadow-sm,
.shadow-lg,
.shadow-none {
  box-shadow: none !important;
}

hr,
.border-bottom,
.border-top,
.border,
.dropdown-divider,
.list-group-item {
  border-color: var(--ui-line) !important;
}

.animate-entry {
  animation: none !important;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  border-radius: var(--ui-radius);
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: none !important;
  transform: none !important;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn-primary,
.btn-glass-primary {
  background: var(--ui-green) !important;
  background-image: none !important;
  border: 1px solid var(--ui-green) !important;
  color: #fff !important;
  padding: 0.5rem 1rem;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-glass-primary:hover {
  background: var(--ui-green-pressed) !important;
  border-color: var(--ui-green-pressed) !important;
  color: #fff !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
  background: #b9d9c6 !important;
  border-color: #b9d9c6 !important;
}

.btn-sm,
.btn-primary.btn-sm,
.btn-glass-primary.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8125rem;
}

.btn-outline-primary {
  background: #fff;
  border: 1px solid var(--ui-line-strong);
  color: var(--ui-ink);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--ui-fill);
  border-color: var(--ui-ink);
  color: var(--ui-ink);
}

.btn-outline-primary.active,
.btn-check:checked + .btn-outline-primary {
  background: var(--ui-green);
  border-color: var(--ui-green);
  color: #fff;
}

.btn-secondary,
.btn-light,
.btn-glass-secondary,
.btn-outline-secondary {
  background: #fff !important;
  border: 1px solid var(--ui-line-strong) !important;
  color: var(--ui-ink) !important;
  padding: 0.5rem 1rem;
}

.btn-secondary:hover,
.btn-light:hover,
.btn-glass-secondary:hover,
.btn-outline-secondary:hover {
  background: var(--ui-fill) !important;
  border-color: var(--ui-ink) !important;
}

.btn-danger,
.btn-glass-danger,
.btn-outline-danger {
  background: var(--ui-red) !important;
  background-image: none !important;
  border: 1px solid var(--ui-red) !important;
  color: #fff !important;
  padding: 0.5rem 1rem;
}

.btn-outline-danger {
  background: #fff !important;
  color: var(--ui-red) !important;
}

.btn-danger:hover,
.btn-glass-danger:hover {
  background: #a82020 !important;
  border-color: #a82020 !important;
}

/* "info" and "warning" buttons: flat, from the same palette (no blue, no orange gradient). */
.btn-info,
.btn-glass-info,
.btn-outline-info {
  background: var(--ui-green-tint) !important;
  background-image: none !important;
  border: 1px solid var(--ui-green-line) !important;
  color: var(--ui-green) !important;
  padding: 0.5rem 1rem;
}

.btn-info:hover,
.btn-glass-info:hover {
  background: #e1efe7 !important;
}

.btn-warning,
.btn-glass-warning,
.btn-outline-warning {
  background: var(--ui-amber-tint) !important;
  background-image: none !important;
  border: 1px solid #f0d59a !important;
  color: var(--ui-amber) !important;
  padding: 0.5rem 1rem;
}

.btn-link {
  color: var(--ui-green);
}

.btn-ghost-secondary {
  color: var(--ui-muted);
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ui-green);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- forms */
.form-control,
.form-select,
.glass-input,
.input-group-text {
  min-height: 40px;
  background-color: #fff !important;
  backdrop-filter: none !important;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius);
  box-shadow: none !important;
  color: var(--ui-ink);
  padding: 0.5rem 0.75rem;
  transition: border-color 0.12s ease;
}

.form-control::placeholder {
  color: var(--ui-faint);
}

.form-control:focus,
.form-select:focus,
.glass-input:focus {
  background-color: #fff !important;
  border-color: var(--ui-green);
  box-shadow: 0 0 0 3px rgba(10, 124, 68, 0.16) !important;
  outline: none;
}

.form-control:disabled,
.form-control[readonly] {
  background-color: var(--ui-fill) !important;
  color: var(--ui-muted);
}

.form-label,
label {
  color: var(--ui-text);
  font-weight: 500;
}

.form-check-input {
  border: 1.5px solid var(--ui-line-strong);
  box-shadow: none !important;
}

.form-check-input:checked {
  background-color: var(--ui-green);
  border-color: var(--ui-green);
}

.form-check-input:focus {
  border-color: var(--ui-green);
}

.form-switch .form-check-input:checked {
  background-color: var(--ui-green);
}

/* ---------------------------------------------------------------- tables */
.table {
  --fc-table-bg: transparent;
  color: var(--ui-text);
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ui-line);
  box-shadow: none;
  vertical-align: middle;
}

.table > thead > tr > th,
.table > thead.bg-light > tr > th,
.table thead th {
  background: var(--ui-fill) !important;
  border-bottom: 1px solid var(--ui-line);
  color: var(--ui-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.table > tbody > tr:last-child > * {
  border-bottom: 0;
}

.table-hover > tbody > tr:hover > * {
  background: var(--ui-fill);
  color: var(--ui-text);
}

.table-borderless > :not(caption) > * > * {
  border-bottom: 1px solid var(--ui-line);
}

.table a,
.table .text-reset {
  color: var(--ui-ink) !important;
  font-weight: 600;
}

.table a:hover {
  color: var(--ui-green) !important;
}

.table .icon-shape img,
.table img.icon-shape {
  border-radius: 6px;
  border: 1px solid var(--ui-line);
  background: #fff;
}

/* ---------------------------------------------------------------- badges and statuses */
.badge {
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 0.35em 0.75em;
  box-shadow: none !important;
  backdrop-filter: none !important;
  border: 1px solid transparent;
}

.glass-badge {
  box-shadow: none;
  border: 1px solid var(--ui-line);
}

/* waiting: amber */
.badge.bg-warning {
  background: var(--ui-amber-tint) !important;
  border-color: #f0d59a;
  color: var(--ui-amber) !important;
}

/* confirmed / processing: quiet grey-green */
.badge.bg-info,
.badge.bg-secondary {
  background: var(--ui-fill-2) !important;
  border-color: var(--ui-line-strong);
  color: var(--ui-text) !important;
}

/* dispatched: green outline */
.badge.bg-primary {
  background: var(--ui-green-tint) !important;
  border-color: var(--ui-green-line);
  color: var(--ui-green) !important;
}

/* delivered / paid: solid green */
.badge.bg-success {
  background: var(--ui-green) !important;
  border-color: var(--ui-green);
  color: #fff !important;
}

/* cancelled / problem: red */
.badge.bg-danger {
  background: var(--ui-red-tint) !important;
  border-color: #f0c4c4;
  color: var(--ui-red) !important;
}

.badge.bg-light,
.badge.bg-light-primary {
  background: var(--ui-green-tint) !important;
  color: var(--ui-green) !important;
}

/* utility colours that were blue or slate */
.text-primary,
.text-success {
  color: var(--ui-green) !important;
}

.text-info {
  color: var(--ui-text) !important;
}

.text-muted,
.text-secondary {
  color: var(--ui-muted) !important;
}

.text-dark {
  color: var(--ui-ink) !important;
}

.text-danger {
  color: var(--ui-red) !important;
}

.bg-primary {
  background-color: var(--ui-green) !important;
}

.bg-info {
  background-color: var(--ui-fill-2) !important;
}

.bg-light-primary,
.bg-light-success,
.bg-light-info {
  background-color: var(--ui-green-tint) !important;
}

.bg-light-warning {
  background-color: var(--ui-amber-tint) !important;
}

.bg-light-danger {
  background-color: var(--ui-red-tint) !important;
}

.border-primary {
  border-color: var(--ui-green) !important;
}

/* ---------------------------------------------------------------- menus, modals, alerts */
.dropdown-menu {
  background: #fff;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  box-shadow: none;
  padding: 0.35rem;
}

.dropdown-item {
  border-radius: 6px;
  color: var(--ui-text);
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
  background: var(--ui-fill-2);
  color: var(--ui-ink);
}

.dropdown-menu-lg {
  padding: 0;
  overflow: hidden;
}

.modal-content {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  box-shadow: none;
}

.modal-backdrop {
  --fc-backdrop-bg: #17241d;
}

.modal-header,
.modal-footer {
  border-color: var(--ui-line);
}

.alert {
  border-radius: var(--ui-radius);
  border: 1px solid var(--ui-line);
  box-shadow: none;
}

.alert-primary,
.alert-success,
.alert-info {
  background: var(--ui-green-tint);
  border-color: var(--ui-green-line);
  color: var(--ui-green-pressed);
}

.alert-warning {
  background: var(--ui-amber-tint);
  border-color: #f0d59a;
  color: var(--ui-amber);
}

.alert-danger {
  background: var(--ui-red-tint);
  border-color: #f0c4c4;
  color: var(--ui-red);
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
  background: var(--ui-green-tint);
  border-color: var(--ui-green-line);
  color: var(--ui-green);
}

.page-link {
  color: var(--ui-ink);
  border-color: var(--ui-line);
}

.page-item.active .page-link {
  background: var(--ui-green);
  border-color: var(--ui-green);
  color: #fff;
}

.progress-bar {
  background-color: var(--ui-green);
}

/* ---------------------------------------------------------------- small things the old styles added */
.text-decoration-line-through {
  background: none;
  color: var(--ui-faint) !important;
  padding: 0;
}

.icon-shape {
  box-shadow: none;
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------------------------------------------------------------- list screens: filters and order rows */
.filter-bar {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(130px, 1fr)) minmax(160px, 1.2fr) minmax(140px, 1fr);
  gap: 0.75rem 1rem;
  align-items: end;
}

.filter-bar .form-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ui-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

@media (max-width: 991.98px) {
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-bar__search {
    grid-column: 1 / -1;
  }
}

.order-thumbs {
  display: inline-flex;
}

.order-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-left: -8px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 0 0 1px var(--ui-line);
}

.order-thumbs > :first-child {
  margin-left: 0;
}

.order-thumb--more {
  background: var(--ui-fill-2);
  color: var(--ui-muted);
  font-size: 0.6875rem;
  font-weight: 600;
}

.order-thumb--empty {
  background: var(--ui-fill);
}

#ordersListTable td {
  vertical-align: middle;
}

/* ---------------------------------------------------------------- top bar: unread count */
.navbar-glass .notification-badge.badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  background: var(--ui-green) !important;
  color: #fff !important;
  font-size: 0.6875rem;
  line-height: 14px;
}

/* ---------------------------------------------------------------- order list: keep rows to one tidy line each */
#ordersListTable > :not(caption) > * > * {
  padding: 0.8rem 0.9rem;
}

#ordersListTable td:first-child,
#ordersListTable td:nth-child(4) {
  white-space: nowrap;
}

#ordersListTable .small {
  white-space: nowrap;
}

img.order-thumb {
  display: block;
  padding: 2px;
}

.badge {
  text-transform: capitalize;
}

/* ---------------------------------------------------------------- dashboard: one green for every stat icon.
   Red and amber stay for real warnings (cancelled, pending, expiring); they are not decoration. */
.icon-shape.bg-light-danger,
.icon-shape.bg-light-warning,
.icon-shape.bg-light-info,
.icon-shape.bg-light-primary,
.icon-shape.bg-light-success {
  background-color: var(--ui-green-tint) !important;
  color: var(--ui-green) !important;
}

.icon-shape .text-dark-danger,
.icon-shape .text-dark-warning,
.icon-shape .text-dark-info {
  color: var(--ui-green) !important;
}

.text-dark-primary,
.text-dark-success {
  color: var(--ui-green-pressed) !important;
}

.text-dark-warning {
  color: var(--ui-amber) !important;
}

.text-dark-danger {
  color: var(--ui-red) !important;
}

.text-dark-info {
  color: var(--ui-text) !important;
}

/* sign-in form: icons sit inside the fields */
.login-card .input-group {
  position: relative;
  flex-wrap: nowrap;
}

.login-card .input-group-text {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 4;
  min-height: 0;
  padding: 0;
  transform: translateY(-50%);
  background: transparent !important;
  border: 0 !important;
}

.login-card .input-group .form-control {
  width: 100%;
  padding-left: 2.5rem !important;
  border-radius: var(--ui-radius) !important;
}

/* ---------------------------------------------------------------- text colours the theme sets per component.
   They were slate-blue (#5c6c75, #3d4f58, #001e2b); re-pointed to the green-grey set. */
:root,
[data-bs-theme],
body,
.card,
.table,
.list-group,
.dropdown-menu,
.navbar,
.nav-tabs,
.modal,
.popover,
.toast,
.accordion {
  --fc-body-color: #3a4740;
  --fc-heading-color: #17241d;
  --fc-border-color: #dde3df;
  --fc-secondary-color: #6a766f;
  --fc-tertiary-color: #8d9a93;
  --fc-card-color: #3a4740;
  --fc-table-color: #3a4740;
  --fc-list-group-color: #3a4740;
  --fc-list-group-action-color: #3a4740;
  --fc-list-group-action-hover-color: #17241d;
  --fc-dropdown-link-color: #3a4740;
  --fc-dropdown-link-hover-color: #17241d;
  --fc-dropdown-header-color: #6a766f;
  --fc-navbar-color: #3a4740;
  --fc-nav-tabs-link-active-color: #17241d;
  --fc-popover-body-color: #3a4740;
  --fc-popover-header-color: #17241d;
  --fc-highlight-color: #17241d;
  --fc-toast-header-color: #6a766f;
}

.col-form-label,
.form-text {
  color: var(--ui-text);
}

.navbar-vertical-nav,
.navbar-vertical,
.navbar-offcanvac {
  color: var(--ui-text);
}

/* loading and empty messages: quiet, never red */
#prodspinner,
[id$="spinner"],
.loading-text {
  color: var(--ui-muted) !important;
  font-size: 0.9375rem;
  text-align: center;
  padding: 1.5rem 0;
}

/* ---------------------------------------------------------------- filter rows on list pages (products, blog, categories, ...)
   Inputs line up on the bottom edge; a small label above a field reads like the order list's. */
.card .row.justify-content-between {
  align-items: flex-end;
  row-gap: 0.75rem;
}

.card .row.justify-content-between > [class*="col-"] > span:first-child,
.card .row.justify-content-between > [class*="col-"] > label.small {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ui-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
}

/* ---------------------------------------------------------------- order page */
#invoice h2#orderID {
  font-size: 1.5rem;
}

/* Bootstrap's text-white would put white text on these pale buttons. */
.btn-glass-info.text-white,
.btn-info.text-white {
  color: var(--ui-green) !important;
}

.btn-glass-warning.text-white,
.btn-warning.text-white {
  color: var(--ui-amber) !important;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.55;
}

.btn-outline-danger:hover {
  background: var(--ui-red-tint) !important;
  color: var(--ui-red) !important;
  border-color: var(--ui-red) !important;
}

/* ---------------------------------------------------------------- loading states */
.btn-spinner {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.5em;
  vertical-align: -0.12em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ui-spin 0.7s linear infinite;
}

.btn.is-loading {
  cursor: progress;
  opacity: 0.85;
}

.skeleton {
  display: inline-block;
  height: 0.85rem;
  border-radius: 4px;
  background: var(--ui-fill-2);
  animation: ui-pulse 1.2s ease-in-out infinite;
}

.is-loading-section {
  position: relative;
  pointer-events: none;
}

.is-loading-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ui-green);
  transform-origin: left;
  animation: ui-progress 1.1s ease-in-out infinite;
}

.is-loading-section .kpi__value,
.is-loading-section .attention,
.is-loading-section .product-list,
.is-loading-section .legend,
.is-loading-section tbody {
  opacity: 0.45;
  transition: opacity 0.15s ease;
}

@keyframes ui-spin {
  to { transform: rotate(360deg); }
}

@keyframes ui-pulse {
  50% { opacity: 0.45; }
}

@keyframes ui-progress {
  0% { transform: scaleX(0); }
  60% { transform: scaleX(0.8); }
  100% { transform: scaleX(1); opacity: 0; }
}

/* Keep the spinner turning for people who prefer less motion: it is information, not decoration. */
@media (prefers-reduced-motion: reduce) {
  .btn-spinner {
    animation: ui-spin 1.6s linear infinite !important;
  }
}

/* ---------------------------------------------------------------- overview page (desktop and laptop only) */
.overview {
  max-width: 1480px;
}

.overview__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.overview__title {
  margin: 0;
  font-family: var(--ui-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ui-ink);
}

.overview__sub {
  margin: 0.25rem 0 0;
  color: var(--ui-muted);
}

.overview__updated::before {
  content: "\00b7";
  margin: 0 0.4rem;
}

.overview__updated:empty::before {
  content: none;
}

.overview__controls {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.overview__controls .form-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ui-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.overview__controls .form-select {
  min-width: 170px;
}

.overview__kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.125rem;
  background: #fff;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  color: inherit;
  text-decoration: none;
}

.kpi--link:hover {
  border-color: var(--ui-green);
  text-decoration: none;
}

.kpi__label {
  color: var(--ui-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.kpi__value {
  font-family: var(--ui-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ui-ink);
  overflow-wrap: anywhere;
}

.kpi__note {
  color: var(--ui-muted);
  font-size: 0.75rem;
}

.kpi__note--up {
  color: var(--ui-green);
}

.kpi__note--down {
  color: var(--ui-red);
}

.panel__title {
  margin: 0 0 0.25rem;
  font-family: var(--ui-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ui-ink);
}

.panel__hint {
  margin: 0 0 1rem;
  color: var(--ui-muted);
  font-size: 0.8125rem;
}

.panel__hint-inline {
  color: var(--ui-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--ui-font);
}

.panel__sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.25rem 0 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ui-line);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ui-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.panel__title + .panel__sub {
  margin-top: 0.75rem;
  padding-top: 0;
  border-top: 0;
}

.panel__link {
  color: var(--ui-green);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.legend,
.attention,
.product-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend {
  margin-top: 1rem;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.875rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.legend-label {
  flex: 1 1 auto;
  color: var(--ui-text);
}

.legend-value {
  font-weight: 600;
  color: var(--ui-ink);
}

.attention__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: var(--ui-radius);
  color: inherit;
  text-decoration: none;
}

.attention__row:hover {
  background: var(--ui-fill);
  text-decoration: none;
}

.attention__main,
.attention__side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 0.875rem;
}

.attention__main strong {
  color: var(--ui-ink);
}

.attention__main .text-muted {
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention__side {
  align-items: flex-end;
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--ui-ink);
}

.attention__side small {
  font-weight: 400;
  color: var(--ui-muted);
}

.attention__empty {
  padding: 0.55rem 0;
  color: var(--ui-muted);
  font-size: 0.875rem;
}

.table-branches tbody tr {
  cursor: pointer;
}

.table-branches tbody tr.is-selected td {
  background: var(--ui-green-tint);
}

.bar {
  width: 100%;
  min-width: 90px;
  height: 8px;
  border-radius: 4px;
  background: var(--ui-fill-2);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--ui-green);
}

.product-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--ui-line);
  font-size: 0.875rem;
}

.product-row:last-child {
  border-bottom: 0;
}

.product-row__img {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.product-row__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ui-ink);
  font-weight: 500;
}

.product-row__qty {
  color: var(--ui-muted);
  white-space: nowrap;
}

.product-row__rev {
  min-width: 90px;
  text-align: right;
  font-weight: 600;
  color: var(--ui-ink);
  white-space: nowrap;
}

.stock-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.stock-counts a {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  color: inherit;
  text-decoration: none;
}

.stock-counts a:hover {
  border-color: var(--ui-green);
  text-decoration: none;
}

.stock-counts strong {
  font-family: var(--ui-display);
  font-size: 1.25rem;
  color: var(--ui-ink);
}

.stock-counts span {
  color: var(--ui-muted);
  font-size: 0.75rem;
}

.shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 1399.98px) {
  .overview__kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* A row whose delete is in flight: dimmed and not clickable until it is gone or the delete fails. */
tr.row-busy {
  opacity: 0.5;
  pointer-events: none;
}
