:root {
  --brand: #f58220;
  --brand-dark: #d96500;
  --yellow: #f7c84b;
  --green: #4c8f17;
  --green-dark: #2f6f11;
  --ink: #252019;
  --muted: #7d756c;
  --soft: #f7f9fb;
  --line: #e5e9ef;
  --sidebar: #ffffff;
  --sidebar-accent: #f58220;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --shadow: rgba(36, 52, 71, 0.08);
  --topbar: rgba(255, 255, 255, 0.92);
  --corporate: #243447;
  --corporate-soft: #edf2f7;
}

/* Dedicated cash entry page */
.cash-approval-balance-card {
  position: sticky;
  top: 24px;
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--sidebar);
  border-radius: 5px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--sidebar) 10%, var(--surface)), var(--surface));
  box-shadow: var(--shadow);
}

.cash-approval-balance-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 5px;
  background: var(--sidebar);
  color: #fff;
  font-size: 1.25rem;
}

.cash-approval-balance-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 700;
}

.cash-approval-balance-card strong {
  color: var(--sidebar);
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.1;
}

.cash-approval-balance-card small {
  margin-top: 12px;
  color: var(--muted);
}

.cash-approval-panel {
  padding: 0;
  overflow: hidden;
  border-radius: 5px;
}

.cash-approval-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
}

.cash-approval-heading h2 {
  margin: 0;
  font-size: 1.35rem;
}

.cash-pending-count {
  padding: 7px 11px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--sidebar-accent) 16%, var(--surface));
  color: color-mix(in srgb, var(--sidebar-accent) 80%, var(--ink));
  font-size: .78rem;
  font-weight: 750;
}

.cash-approval-tabs {
  gap: 8px;
  padding: 0 24px 18px;
  border-bottom: 1px solid var(--line);
}

.cash-approval-tabs .nav-link {
  padding: 10px 16px;
  border: 1px solid var(--sidebar);
  border-radius: 5px;
  color: var(--sidebar);
  font-weight: 700;
}

.cash-approval-tabs .nav-link.active {
  background: var(--sidebar);
  color: #fff;
}

.cash-approval-table {
  margin: 0;
}

.cash-approval-table th,
.cash-approval-table td {
  padding: 15px 14px;
}

.cash-approval-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.cash-approval-table .btn {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 5px;
  white-space: nowrap;
}

.cash-approval-table .btn-primary {
  background: var(--sidebar);
  border-color: var(--sidebar);
}

.cash-entry-page {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.cash-entry-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.cash-entry-page-heading h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 750;
}

.cash-entry-page-heading .btn,
.cash-entry-actions .btn {
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 5px;
  font-weight: 650;
}

.cash-entry-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cash-entry-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 5px solid var(--sidebar-accent);
  background: var(--sidebar);
  color: #fff;
}

.cash-entry-card-header h2 {
  margin: 0 0 3px;
  font-size: 1.35rem;
}

.cash-entry-card-header p {
  margin: 0;
  color: rgba(255, 255, 255, .78);
}

.cash-entry-header-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 5px;
  background: rgba(255, 255, 255, .14);
  font-size: 1.2rem;
}

.cash-entry-card-body {
  padding: 28px;
}

.cash-entry-type-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-left: 4px solid var(--sidebar);
  border-radius: 5px;
  background: color-mix(in srgb, var(--sidebar) 7%, var(--surface));
  color: color-mix(in srgb, var(--sidebar) 80%, var(--ink));
}

.cash-floating-field {
  position: relative;
}

.cash-floating-field .cash-floating-icon {
  position: absolute;
  z-index: 3;
  top: 22px;
  left: 17px;
  width: 20px;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}

.cash-floating-field .form-control,
.cash-floating-field .form-select {
  min-height: 66px;
  padding-left: 50px;
  border-radius: 5px;
}

.cash-floating-field .form-floating > label {
  left: 38px;
  color: var(--muted);
}

.cash-floating-field:focus-within .cash-floating-icon {
  color: var(--sidebar);
}

.cash-floating-textarea .cash-floating-icon {
  top: 20px;
}

.cash-floating-textarea textarea.form-control {
  height: 132px;
  resize: vertical;
}

.cash-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--sidebar) 4%, var(--surface));
}

.cash-entry-actions .btn-primary {
  background: var(--sidebar);
  border-color: var(--sidebar);
}

@media (max-width: 640px) {
  .cash-entry-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .cash-entry-page-heading .btn {
    align-self: flex-start;
  }

  .cash-entry-card-header,
  .cash-entry-card-body,
  .cash-entry-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cash-entry-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

/* Tools directory and profile share the simple customer/supplier pattern. */
.tool-profile-custody-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.tool-profile-page .customer-profile-avatar {
  font-size: 2rem;
}

.customer-profile-status.is-available,
.customer-profile-status.is-returned {
  color: #347b42;
}
.customer-profile-status.is-borrowed {
  color: #2371b8;
}
.customer-profile-status.is-maintenance {
  color: #a66d00;
}
.customer-profile-status.is-lost,
.customer-profile-status.is-inactive {
  color: #bb3542;
}

.customer-order-status.is-returned,
.customer-order-status.is-available {
  background: #e7f5e8;
  color: #2f763c;
}
.customer-order-status.is-borrowed {
  background: #e6f1fb;
  color: #246cae;
}
.customer-order-status.is-lost {
  background: #fde9eb;
  color: #b72e3b;
}

.tool-custody-form {
  display: grid;
  gap: 14px;
  text-align: left;
  width: 100%;
}

.tool-custody-form label {
  display: grid;
  gap: 7px;
  color: var(--text-main);
  font-weight: 650;
}

.tool-custody-form .customer-delete-actions {
  margin-top: 4px;
}

.tool-modal-body {
  padding: 28px;
}
.tool-floating-field {
  position: relative;
}
.tool-floating-field > i {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 16px;
  width: 18px;
  color: var(--brand);
  text-align: center;
  transform: translateY(-50%);
  pointer-events: none;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}
.tool-floating-field:focus-within > i {
  color: var(--green-dark);
  transform: translateY(-50%) scale(1.08);
}
.tool-floating-field .form-floating > .form-control,
.tool-floating-field .form-floating > .form-select {
  min-height: 62px;
  padding-left: 48px;
  border-color: color-mix(in srgb, var(--line) 82%, var(--green));
  border-radius: 14px;
  background-color: var(--surface);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.tool-floating-field .form-floating > label {
  left: 34px;
  color: var(--muted);
}
.tool-floating-field .form-floating > .form-control:focus,
.tool-floating-field .form-floating > .form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--green) 15%, transparent);
  transform: translateY(-1px);
}
.tool-floating-textarea > i {
  top: 25px;
}
.tool-floating-textarea textarea.form-control {
  min-height: 110px;
  resize: vertical;
}
.tool-category-manage-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--green-dark);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 750;
}
.tool-category-manage-toggle:hover {
  color: var(--brand-dark);
}
.tool-category-manager {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(420px, 1.3fr);
  gap: 22px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--green) 5%, var(--surface));
  animation: toolCategoryPanelIn 0.25s ease both;
}
.tool-category-manager strong {
  color: var(--green-dark);
}
.tool-category-manager p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.tool-category-manager-controls {
  display: grid;
  gap: 10px;
}
.tool-category-manager-buttons {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.tool-category-manager-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 10px;
  font-weight: 700;
}
@keyframes toolCategoryPanelIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-profile-management-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.tool-profile-management-actions span {
  color: var(--ink);
  font-weight: 800;
}
.tool-profile-management-actions p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.tool-profile-management-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tool-profile-lost-button {
  color: #fff;
  background: #d43b48;
}
.tool-profile-lost-button:hover {
  color: #fff;
  background: #bb2f3c;
  transform: translateY(-2px);
}

@media (max-width: 767.98px) {
  .tool-profile-custody-actions {
    justify-content: stretch;
  }
  .tool-profile-custody-actions .customer-profile-button {
    flex: 1 1 100%;
  }
  .tool-profile-management-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .tool-profile-management-buttons {
    display: grid;
  }
  .tool-modal-body {
    padding: 20px;
  }
  .tool-category-manager {
    grid-template-columns: 1fr;
  }
  .tool-category-manager-buttons {
    display: grid;
  }
}

/* Invoice workspace */
.invoice-document {
  max-width: 1180px;
  margin: 0 auto;
}
.invoice-paper {
  background: var(--surface, #fff);
  border: 1px solid rgba(37, 32, 25, 0.1);
  border-right: 5px solid var(--brand);
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(37, 32, 25, 0.08);
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.invoice-paper:hover {
  box-shadow: 0 22px 55px rgba(37, 32, 25, 0.13);
  transform: translateY(-2px);
}
.invoice-heading {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid rgba(37, 32, 25, 0.08);
}
.invoice-heading h2 {
  color: var(--brand-dark);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0.2rem 0;
}
.invoice-meta {
  display: grid;
  gap: 0.7rem;
  min-width: min(100%, 330px);
}
.invoice-meta label {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.35rem;
  grid-template-columns: 92px 1fr;
  text-transform: uppercase;
}
.invoice-customer-block,
.invoice-footer-block {
  padding: 2rem 0;
}
.invoice-source-panel {
  background: rgba(245, 130, 32, 0.06);
  border: 1px solid rgba(245, 130, 32, 0.18);
  border-radius: 14px;
  margin-top: 1.5rem;
  padding: 1rem;
}
.receiving-order-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-right: 4px solid var(--brand);
  border-radius: 16px;
  color: var(--ink);
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.receiving-order-card:hover {
  border-color: var(--brand);
  box-shadow: 0 14px 30px var(--shadow);
  transform: translateY(-3px);
}
.receiving-order-card small,
.receiving-order-card p {
  color: var(--muted);
  margin: 0;
}
.invoice-block-label {
  color: var(--brand-dark);
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}
.invoice-lines-wrap {
  border-bottom: 1px solid rgba(37, 32, 25, 0.08);
  border-top: 1px solid rgba(37, 32, 25, 0.08);
  padding: 1.5rem 0;
}
.invoice-lines-table thead th {
  background: rgba(245, 130, 32, 0.1);
  border: 0;
  color: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.85rem;
  text-transform: uppercase;
}
.invoice-lines-table td {
  border-bottom-color: rgba(37, 32, 25, 0.07);
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
}
.invoice-unit {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}
.invoice-totals {
  background: rgba(245, 130, 32, 0.06);
  border-radius: 16px;
  padding: 1rem 1.25rem;
}
.invoice-totals > div {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 150px;
  min-height: 48px;
}
.invoice-totals label,
.invoice-totals span {
  color: var(--muted);
  font-weight: 700;
}
.invoice-totals strong {
  text-align: right;
}
.invoice-grand-total {
  border-top: 2px solid rgba(37, 32, 25, 0.12);
  color: var(--brand-dark);
  font-size: 1.25rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}
.invoice-grand-total strong {
  font-size: 1.55rem;
}
.invoice-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 1.25rem;
}

.purchase-order-lines {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-alt);
}

.purchase-order-create-page {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.purchase-order-view-page {
  display: grid;
  width: min(1280px, 100%);
  gap: 24px;
  margin: 0 auto;
}

.purchase-order-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.purchase-order-view-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.purchase-order-view-actions form {
  margin: 0;
}

.purchase-order-view-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  align-items: stretch;
  gap: 24px;
}

.purchase-order-view-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 20px 0 0;
}

.purchase-order-view-meta div {
  min-width: 0;
}

.purchase-order-view-meta dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.purchase-order-view-meta dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.purchase-order-view-notes {
  color: var(--ink);
  line-height: 1.65;
}

.purchase-order-filter-bar,
.receiving-report-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 220px) minmax(210px, 280px);
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.purchase-order-filter-bar .table-search,
.receiving-report-filter-bar .table-search {
  width: 100%;
}

.purchase-order-page-form {
  display: grid;
  gap: 24px;
}

.purchase-order-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.purchase-order-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.searchable-select {
  position: relative;
}

.searchable-select::after {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--muted);
  content: '\f002';
  font-family: 'Font Awesome 6 Free';
  font-size: 0.82rem;
  font-weight: 900;
  pointer-events: none;
  transform: translateY(-50%);
}

.searchable-select-input {
  padding-right: 42px;
}

.searchable-select.is-open .searchable-select-input {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--brand) 20%, transparent);
}

.searchable-select.is-invalid .searchable-select-input {
  border-color: var(--bs-danger);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--bs-danger) 18%, transparent);
}

.searchable-select-native {
  position: absolute !important;
  bottom: 0;
  left: 0;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0 !important;
  opacity: 0;
  white-space: nowrap;
}

.searchable-select-menu {
  position: absolute;
  z-index: 2000;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(18, 78, 53, 0.18);
}

.searchable-select-option {
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.searchable-select-option:hover,
.searchable-select-option:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--brand) 11%, var(--surface));
}

.searchable-select-option.is-selected {
  background: color-mix(in srgb, var(--brand) 16%, var(--surface));
  color: var(--brand-dark);
  font-weight: 700;
}

.searchable-select-empty {
  padding: 14px 10px;
  color: var(--muted);
  text-align: center;
}

.purchase-order-lines-table {
  min-width: 850px;
  margin-bottom: 0;
}

.purchase-order-lines-table thead th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.purchase-order-lines-table .po-product-cell {
  min-width: 330px;
}

.purchase-order-lines-table td:nth-child(2),
.purchase-order-lines-table td:nth-child(3) {
  width: 150px;
}

.purchase-order-lines-table td:nth-child(4) {
  width: 140px;
  text-align: right;
}

.purchase-order-lines-table td:last-child {
  width: 52px;
  text-align: right;
}

.purchase-order-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.purchase-order-totals {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-right: 4px solid var(--brand);
  border-radius: 14px;
  background: var(--surface-alt);
}

.purchase-order-totals > div {
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr minmax(130px, 170px);
  align-items: center;
  gap: 14px;
}

.purchase-order-totals span,
.purchase-order-totals label {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.purchase-order-totals strong {
  text-align: right;
}

.purchase-order-grand-total {
  padding-top: 12px;
  border-top: 2px solid var(--line);
  color: var(--brand-dark);
  font-size: 1.08rem;
}

.purchase-order-grand-total strong {
  font-size: 1.35rem;
}

.po-item-summary {
  display: inline-block;
  max-width: 280px;
  line-height: 1.35;
}

@media (max-width: 767.98px) {
  .purchase-order-page-heading,
  .purchase-order-page-actions,
  .purchase-order-view-header {
    flex-direction: column;
  }

  .purchase-order-page-heading .btn,
  .purchase-order-page-actions .btn,
  .purchase-order-view-actions,
  .purchase-order-view-actions .btn,
  .purchase-order-view-actions form {
    width: 100%;
  }

  .purchase-order-view-summary-grid,
  .purchase-order-view-meta,
  .purchase-order-filter-bar,
  .receiving-report-filter-bar {
    grid-template-columns: 1fr;
  }
}

.restock-lines-table {
  min-width: 1380px;
}

.restock-lines-table .restock-product-cell {
  min-width: 300px;
}

.restock-lines-table .restock-cabinet-cell {
  min-width: 230px;
}

.restock-lines-table td:nth-child(3),
.restock-lines-table td:nth-child(4) {
  width: 145px;
}

.restock-lines-table td:nth-child(5),
.restock-lines-table td:nth-child(6) {
  width: 135px;
}

.restock-lines-table td:nth-child(7) {
  width: 135px;
  text-align: right;
}

.restock-lines-table td:last-child {
  width: 52px;
  text-align: right;
}

.tool-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tool-stat-card {
  --tool-stat-accent: var(--brand);
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-right: 5px solid var(--tool-stat-accent);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 30px var(--shadow);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tool-stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--tool-stat-accent);
  box-shadow: 0 20px 38px var(--shadow);
}

.tool-stat-card.is-available {
  --tool-stat-accent: var(--green);
}
.tool-stat-card.is-borrowed {
  --tool-stat-accent: #2878c8;
}
.tool-stat-card.is-lost {
  --tool-stat-accent: #d83a3a;
}

.tool-stat-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--tool-stat-accent);
  background: color-mix(in srgb, var(--tool-stat-accent) 12%, var(--surface));
  font-size: 1.15rem;
}

.tool-stat-card small,
.tool-stat-card strong {
  display: block;
}

.tool-stat-card small {
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 700;
}

.tool-stat-card strong {
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1;
}

@media (max-width: 1199.98px) {
  .tool-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .tool-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .invoice-heading {
    flex-direction: column;
  }
  .invoice-meta label {
    grid-template-columns: 1fr;
  }
  .invoice-lines-wrap {
    overflow-x: auto;
  }
  .invoice-lines-table {
    min-width: 850px;
  }
}

[data-theme='dark'] {
  --ink: #fff7ea;
  --muted: #c9b9a6;
  --soft: #211812;
  --line: #3a2a1f;
  --sidebar: #17110d;
  --surface: #211812;
  --surface-alt: #2b1f16;
  --shadow: rgba(0, 0, 0, 0.28);
  --topbar: rgba(23, 17, 13, 0.92);
  --corporate: #f8fafc;
  --corporate-soft: #2f241b;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

.dashboard-page {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
}

[data-theme='dark'] body,
[data-theme='dark'] .dashboard-page {
  background: linear-gradient(180deg, #130e0a 0%, #211812 100%);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 15% 18%, rgba(247, 200, 75, 0.28), transparent 32%),
    radial-gradient(circle at 82% 14%, rgba(76, 143, 23, 0.12), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #fff7ea 52%, #fefcf6 100%);
}

[data-theme='dark'] .auth-page {
  background:
    radial-gradient(circle at 15% 18%, rgba(247, 200, 75, 0.16), transparent 32%),
    radial-gradient(circle at 82% 14%, rgba(76, 143, 23, 0.18), transparent 28%),
    linear-gradient(135deg, #130e0a 0%, #211812 54%, #151f0f 100%);
}

.auth-shell {
  width: min(500px, 100%);
}

.auth-brand {
  color: var(--ink);
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(245, 130, 32, 0.14);
}

[data-theme='dark'] .brand-logo {
  background: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

.brand-logo-lg {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  padding: 6px;
}

.auth-brand h1 {
  max-width: 650px;
  margin: 22px 0 16px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.brand-copy {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.05rem;
}

.eyebrow,
.section-kicker {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-brand .eyebrow {
  color: var(--green);
  margin-top: 22px;
}

.auth-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.auth-highlights span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(245, 130, 32, 0.09);
  font-size: 0.9rem;
}

.auth-card .card {
  border-radius: 24px;
  border: 1px solid var(--line) !important;
  background: var(--surface);
  color: var(--ink);
}

.auth-login-logo {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 22px;
  padding: 5px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 14px 30px rgba(245, 130, 32, 0.14);
}

.auth-card-heading .text-secondary {
  max-width: none;
}

.form-control,
.input-group-text,
.btn {
  border-radius: 12px;
}

.form-control,
.form-select,
.input-group-text {
  background-color: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--surface);
  color: var(--ink);
  border-color: var(--brand);
  box-shadow: 0 0 0 0.25rem rgba(245, 130, 32, 0.18);
}

.form-control::placeholder {
  color: var(--muted);
}

.text-secondary {
  color: var(--muted) !important;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: visible;
  background:
    radial-gradient(
      circle at 12% 0%,
      color-mix(in srgb, var(--sidebar) 76%, #ffffff) 0%,
      transparent 34%
    ),
    linear-gradient(165deg, var(--sidebar) 0%, color-mix(in srgb, var(--sidebar) 82%, #000000) 100%);
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  border-right: 5px solid var(--sidebar-accent);
  box-shadow: 12px 0 38px color-mix(in srgb, var(--sidebar) 24%, transparent);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  margin-bottom: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.sidebar-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar-close:not(.d-none) {
  display: inline-grid;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
}

.sidebar-search {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.sidebar-search > i {
  position: absolute;
  left: 13px;
  color: rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.sidebar-search input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  outline: 0;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-size: 0.88rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

.sidebar-search input::placeholder {
  color: rgba(255, 255, 255, 0.66);
}

.sidebar-search input:focus {
  border-color: var(--sidebar-accent);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sidebar-accent) 26%, transparent);
}

.sidebar-search button {
  position: absolute;
  right: 7px;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
}

.sidebar-search button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.sidebar-search button[hidden] {
  display: none;
}

.sidebar-search-empty {
  margin: 12px 4px;
  padding: 14px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  text-align: center;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 400;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav > a.active {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sidebar-nav a.active {
  position: relative;
  background: color-mix(in srgb, var(--sidebar-accent) 7%, #ffffff);
  border-color: rgba(255, 255, 255, 0.72);
  color: color-mix(in srgb, var(--sidebar) 82%, #000000);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.13);
}

.sidebar-nav > a.active::before {
  position: absolute;
  inset: 8px auto 8px -1px;
  width: 4px;
  border-radius: 0 5px 5px 0;
  background: var(--sidebar-accent);
  content: '';
}

.sidebar-group {
  display: grid;
  gap: 6px;
}

.sidebar-group-toggle {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 400;
  text-align: left;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.sidebar-group-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sidebar-nav > .sidebar-group.active > .sidebar-group-toggle {
  position: relative;
  background: color-mix(in srgb, var(--sidebar-accent) 7%, #ffffff);
  border-color: rgba(255, 255, 255, 0.72);
  color: color-mix(in srgb, var(--sidebar) 82%, #000000);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.13);
}

.sidebar-nav > .sidebar-group.active > .sidebar-group-toggle::before {
  position: absolute;
  inset: 8px auto 8px -1px;
  width: 4px;
  border-radius: 0 5px 5px 0;
  background: var(--sidebar-accent);
  content: '';
}

.sidebar-group-caret {
  font-size: 0.72rem;
  transition: transform 0.2s;
}

.sidebar-group-toggle:not(.collapsed) .sidebar-group-caret {
  transform: rotate(180deg);
}

.sidebar-subnav {
  margin: 0 4px;
  padding: 6px 4px 6px 12px;
  border-left: 1px solid color-mix(in srgb, var(--sidebar-accent) 72%, transparent);
}

.sidebar-subnav a {
  min-height: 40px;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 400;
}

.sidebar-subnav a.active {
  position: relative;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
  box-shadow: none;
}

.sidebar-subnav a.active::before {
  position: absolute;
  inset: 9px auto 9px -1px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--sidebar-accent);
  content: '';
}

.sidebar-nested-group {
  gap: 4px;
}

.sidebar-nested-toggle {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.sidebar-nested-group.active > .sidebar-nested-toggle {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.sidebar-nested-group > .sidebar-subnav {
  margin-right: 0;
  padding-left: 10px;
  border-left-color: rgba(255, 255, 255, 0.24);
}

.sidebar-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
}

.sidebar-control {
  width: 48px;
  height: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  text-decoration: none;
  text-align: left;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.sidebar-control:hover,
.sidebar-control.active,
.sidebar-control[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.sidebar-control-icon {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-theme-preview {
  --preview-sidebar: #124e35;
  --preview-accent: #f58220;
  display: grid;
  gap: 8px;
  padding: 18px;
  border-right: 5px solid var(--preview-accent);
  border-radius: 16px;
  background: linear-gradient(
    155deg,
    var(--preview-sidebar),
    color-mix(in srgb, var(--preview-sidebar) 82%, #000)
  );
  color: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--preview-sidebar) 18%, transparent);
}

.sidebar-theme-preview > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 10px;
}

.sidebar-theme-preview .sidebar-theme-preview-brand {
  min-height: auto;
  padding: 0 4px 8px;
  color: #fff;
}

.sidebar-theme-preview > div.active {
  position: relative;
  background: color-mix(in srgb, var(--preview-accent) 7%, #fff);
  color: color-mix(in srgb, var(--preview-sidebar) 82%, #000);
  font-weight: 400;
}

.sidebar-theme-preview > div.active::before {
  position: absolute;
  inset: 8px auto 8px 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--preview-accent);
  content: '';
}

.sidebar-profile-control {
  min-height: 48px;
}

.sidebar-footer .avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}

.sidebar-dropdown {
  margin-bottom: 8px !important;
}

.main-panel {
  min-width: 0;
}

.content-heading {
  margin-bottom: 26px;
}

.module-hero {
  position: relative;
  min-height: 270px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(28px, 6vw, 90px);
  overflow: hidden;
  margin: -28px -28px 30px;
  padding: clamp(38px, 5vw, 68px) clamp(32px, 6vw, 86px);
  border-bottom: 5px solid var(--sidebar-accent);
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(
      120deg,
      color-mix(in srgb, var(--sidebar) 88%, #000) 0%,
      var(--sidebar) 62%,
      color-mix(in srgb, var(--sidebar) 74%, #000) 100%
    );
  color: #fff;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--sidebar) 18%, transparent);
}

.module-hero::after {
  position: absolute;
  right: -90px;
  bottom: -145px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 46px rgba(255, 255, 255, 0.025),
    0 0 0 92px rgba(255, 255, 255, 0.018);
  content: '';
}

.module-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 920px;
}

.module-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: color-mix(in srgb, var(--sidebar-accent) 42%, #fff);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.module-hero h1 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.15rem, 4.3vw, 4rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.module-hero-description {
  max-width: 900px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.92rem, 1.3vw, 1.06rem);
  line-height: 1.65;
}

.module-hero-stat {
  position: relative;
  z-index: 1;
  width: 170px;
  min-width: 170px;
  min-height: 146px;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-align: center;
  backdrop-filter: blur(12px);
}

.module-hero-stat strong {
  color: #fff;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 850;
  line-height: 1;
}

.module-hero-stat span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 700;
}

.module-hero-compact {
  min-height: 132px;
  gap: 0;
  padding: 26px 42px;
}

.module-hero-compact h1 {
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  letter-spacing: -0.035em;
}

/* Customer directory pilot: compact, useful, and lightly branded. */
.page-customers .content-wrap,
.page-suppliers .content-wrap,
.page-tools-inventory .content-wrap {
  padding: 18px;
}

.directory-page-header {
  min-height: 122px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 20px 24px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(20, 32, 46, 0.05);
}

.directory-page-heading {
  min-width: 0;
  display: block;
  align-items: center;
  gap: 16px;
}

.directory-page-icon {
  display: none;
}

.directory-page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 760;
  letter-spacing: -0.035em;
}

.directory-page-heading p {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 1rem;
}

.directory-add-button {
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-bg: var(--sidebar-accent);
  --bs-btn-hover-bg: color-mix(in srgb, var(--sidebar-accent) 88%, #000);
  --bs-btn-active-bg: color-mix(in srgb, var(--sidebar-accent) 82%, #000);
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--sidebar-accent);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--sidebar-accent) 25%, transparent);
  font-weight: 650;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.directory-add-button:hover,
.directory-add-button:focus-visible,
.directory-add-button:active {
  color: #fff !important;
  background-color: color-mix(in srgb, var(--sidebar-accent) 88%, #000) !important;
  filter: brightness(0.95);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px color-mix(in srgb, var(--sidebar-accent) 34%, transparent);
}

.customer-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.customer-stat-filter {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--sidebar) 12%, var(--line));
  border-radius: 16px;
  color: var(--ink);
  background: linear-gradient(
    145deg,
    var(--surface),
    color-mix(in srgb, var(--sidebar) 4%, var(--surface))
  );
  box-shadow: 0 8px 22px color-mix(in srgb, var(--sidebar) 7%, transparent);
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.customer-stat-filter:hover {
  border-color: color-mix(in srgb, var(--sidebar) 38%, var(--line));
  transform: translateY(-2px);
}

.customer-stat-filter.active {
  border-color: color-mix(in srgb, var(--sidebar) 52%, var(--line));
  box-shadow:
    0 10px 24px color-mix(in srgb, var(--sidebar) 12%, transparent),
    inset 0 -3px 0 var(--sidebar-accent);
}

.customer-stat-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--sidebar);
  background: color-mix(in srgb, var(--sidebar) 11%, var(--surface));
}

.customer-stat-filter:nth-child(3) .customer-stat-icon,
.customer-stat-filter:nth-child(4) .customer-stat-icon {
  color: color-mix(in srgb, var(--sidebar-accent) 84%, var(--ink));
  background: color-mix(in srgb, var(--sidebar-accent) 12%, var(--surface));
}

.customer-stat-filter strong,
.customer-stat-filter small {
  display: block;
}

.customer-stat-filter strong {
  font-size: 1.3rem;
  line-height: 1.05;
}

.customer-stat-filter small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-directory-panel {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(20, 32, 46, 0.05);
}

.panel-card.customer-directory-panel .customer-directory-toolbar {
  --customer-toolbar-control-height: 54px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 0;
  background: var(--surface);
}

.customer-search.table-search {
  width: auto;
}

.customer-simple-search {
  height: var(--customer-toolbar-control-height);
  min-height: var(--customer-toolbar-control-height);
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 1.08rem;
}
.customer-simple-search:focus {
  border-color: color-mix(in srgb, var(--sidebar) 45%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sidebar) 8%, transparent);
}

.customer-list-add-button {
  min-width: 190px;
  height: var(--customer-toolbar-control-height);
  min-height: var(--customer-toolbar-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: var(--sidebar);
  font-weight: 650;
}
.customer-list-add-button:hover,
.customer-list-add-button:focus-visible {
  color: #fff;
  background: color-mix(in srgb, var(--sidebar) 86%, #000);
}

.customer-simple-list {
  padding: 0 14px 14px;
}
.customer-simple-row {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 14px 11px 18px;
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 2%, var(--surface));
  text-decoration: none;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}
.customer-simple-row + .customer-simple-row {
  margin-top: 2px;
}
.customer-simple-row strong {
  font-size: 1rem;
  font-weight: 680;
}
.customer-simple-row strong small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.tool-action-row {
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
}
.tool-return-row {
  cursor: default;
}
.tool-return-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.tool-return-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}
.tool-return-button:hover {
  transform: translateY(-2px);
}
.tool-return-button.is-return {
  color: #fff;
  background: var(--green);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--green) 22%, transparent);
}
.tool-return-button.is-lost {
  color: #c8323f;
  border-color: color-mix(in srgb, #c8323f 28%, var(--line));
  background: color-mix(in srgb, #c8323f 7%, var(--surface));
}
@media (max-width: 640px) {
  .tool-return-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .tool-return-actions {
    width: 100%;
  }
  .tool-return-button {
    flex: 1;
  }
}

.tool-borrow-workspace {
  position: relative;
  overflow: hidden;
  padding: 30px;
  animation: toolBorrowPanelIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tool-borrow-workspace::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--sidebar-accent), var(--green), var(--sidebar));
}
.tool-borrow-workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.tool-borrow-kicker {
  color: var(--green-dark);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tool-borrow-workspace-head h2 {
  margin: 5px 0 4px;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 850;
}
.tool-borrow-workspace-head p {
  margin: 0;
  color: var(--muted);
}
.tool-borrow-date {
  width: min(330px, 100%);
  flex: 0 0 min(330px, 100%);
}
.tool-borrow-date > span,
.tool-borrow-field > span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
}
.tool-borrow-date > span i,
.tool-borrow-field > span i {
  color: var(--green);
}
.tool-borrow-fields > div {
  animation: toolBorrowFieldIn 0.42s ease both;
}
.tool-borrow-fields > div:nth-child(2) {
  animation-delay: 0.08s;
}
.tool-borrow-fields > div:nth-child(3) {
  animation-delay: 0.16s;
}
.tool-borrow-field {
  display: block;
}
.tool-borrow-field small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}
.tool-borrow-workspace .form-control,
.tool-borrow-workspace .form-select {
  min-height: 54px;
  border-color: var(--line);
  border-radius: 9px;
  background-color: var(--surface);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}
.tool-borrow-workspace textarea.form-control {
  min-height: 116px;
  resize: vertical;
}
.tool-borrow-workspace .form-control:hover,
.tool-borrow-workspace .form-select:hover {
  border-color: color-mix(in srgb, var(--green) 48%, var(--line));
}
.tool-borrow-workspace .form-control:focus,
.tool-borrow-workspace .form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 13%, transparent);
  transform: translateY(-1px);
}
.tool-borrow-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 26px;
}
.tool-borrow-actions p {
  margin: 0 auto 0 0;
  color: var(--muted);
}
.tool-borrow-submit {
  min-width: 190px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: var(--sidebar);
  font-weight: 800;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--sidebar) 22%, transparent);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
}
.tool-borrow-submit:hover,
.tool-borrow-submit:focus-visible {
  color: #fff;
  background: color-mix(in srgb, var(--sidebar) 86%, #000);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px color-mix(in srgb, var(--sidebar) 30%, transparent);
}
.tool-borrow-submit:active {
  transform: translateY(0);
}
@keyframes toolBorrowPanelIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toolBorrowFieldIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 767.98px) {
  .tool-borrow-workspace {
    padding: 22px 18px;
  }
  .tool-borrow-workspace-head {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }
  .tool-borrow-date {
    width: 100%;
    flex-basis: auto;
  }
  .tool-borrow-submit {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tool-borrow-workspace,
  .tool-borrow-fields > div {
    animation: none;
  }
  .tool-borrow-workspace .form-control,
  .tool-borrow-workspace .form-select,
  .tool-borrow-submit {
    transition: none;
  }
}
.customer-simple-row > span {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, var(--surface));
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}
.customer-simple-row:hover,
.customer-simple-row:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--sidebar) 5%, var(--surface));
  outline: none;
}
.customer-simple-row:hover > span,
.customer-simple-row:focus-visible > span {
  color: #fff;
  background: var(--sidebar);
  transform: translateX(3px);
}
.customer-list-empty {
  margin: 0;
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}

.customer-alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}
.customer-alert > i {
  margin-top: 3px;
}
.customer-alert ul {
  padding-left: 18px;
}

.customer-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.customer-detail-toolbar a {
  color: var(--sidebar);
  font-weight: 650;
  text-decoration: none;
}
.customer-detail-toolbar a i {
  margin-right: 7px;
}
.customer-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
}
.customer-detail-card,
.customer-detail-summary,
.customer-sales-card,
.customer-detail-empty {
  padding: 24px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(20, 32, 46, 0.05);
}
.customer-detail-card h2,
.customer-sales-card h2 {
  margin: 0 0 18px;
  font-size: 1.05rem;
}
.customer-detail-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}
.customer-detail-card dl > div {
  padding: 14px 0;
}
.customer-detail-card dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.customer-detail-card dd {
  margin: 0;
  color: var(--ink);
}
.customer-detail-address {
  grid-column: 1 / -1;
}
.customer-detail-summary {
  display: grid;
  align-content: center;
  gap: 5px;
}
.customer-detail-summary span {
  color: var(--muted);
  font-size: 0.76rem;
}
.customer-detail-summary strong {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 1.45rem;
}
.customer-sales-card {
  margin-top: 18px;
}

@media (max-width: 767.98px) {
  .customer-detail-grid {
    grid-template-columns: 1fr;
  }
  .customer-detail-card dl {
    grid-template-columns: 1fr;
  }
  .customer-detail-address {
    grid-column: auto;
  }
}

.customer-directory-toolbar .input-group-text,
.customer-directory-toolbar .form-control,
.customer-directory-toolbar .form-select,
.customer-view-toggle .btn {
  min-height: 44px;
  border-color: color-mix(in srgb, var(--sidebar) 14%, var(--line));
  background-color: var(--surface);
}

.customer-directory-toolbar .form-control:focus,
.customer-directory-toolbar .form-select:focus {
  border-color: var(--sidebar);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--sidebar) 13%, transparent);
}

.customer-directory-toolbar .form-control.customer-simple-search {
  height: var(--customer-toolbar-control-height);
  min-height: var(--customer-toolbar-control-height);
}

.customer-view-toggle .btn {
  min-width: 44px;
}
.customer-view-toggle .btn.active {
  border-color: var(--sidebar);
  color: #fff;
  background: var(--sidebar);
}

.customer-directory-panel .table-responsive {
  padding: 0 18px 10px;
}
.customer-directory-panel .corporate-table {
  margin-bottom: 0;
}
.customer-directory-panel .corporate-table thead th {
  padding-top: 17px;
  padding-bottom: 14px;
  color: color-mix(in srgb, var(--sidebar) 80%, var(--ink));
  background: transparent;
}
.customer-directory-panel .corporate-table tbody tr {
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}
.customer-directory-panel .corporate-table tbody tr:hover {
  background: color-mix(in srgb, var(--sidebar) 5%, var(--surface));
  box-shadow: inset 3px 0 0 var(--sidebar-accent);
}

.customer-identity {
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.customer-initial {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--sidebar);
  background: color-mix(in srgb, var(--sidebar) 11%, var(--surface));
  font-weight: 750;
}
.customer-identity small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

#customerCardPanel {
  padding: 18px;
}
.customer-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--sidebar) 14%, var(--line));
  border-top: 3px solid var(--sidebar);
  background: linear-gradient(
    150deg,
    var(--surface),
    color-mix(in srgb, var(--sidebar) 5%, var(--surface))
  );
  box-shadow: 0 8px 22px color-mix(in srgb, var(--sidebar) 7%, transparent);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.customer-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--sidebar) 46%, var(--line));
  box-shadow: 0 16px 30px color-mix(in srgb, var(--sidebar) 14%, transparent);
}
.customer-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--sidebar);
  background: color-mix(in srgb, var(--sidebar) 11%, var(--surface));
  font-size: 1.1rem;
}
.customer-card .customer-contact {
  min-height: 48px;
}
.customer-card .btn {
  border-radius: 10px;
}

.customer-modal-dialog {
  max-width: min(1040px, calc(100vw - 36px));
}
.customer-modal-content {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--sidebar) 25%, var(--line));
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(8, 34, 13, 0.28);
}

.customer-modal-content > form {
  min-height: 0;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.customer-modal-header {
  position: relative;
  min-height: 92px;
  justify-content: center;
  padding: 15px 70px;
  border-bottom: 4px solid var(--sidebar-accent);
  background:
    radial-gradient(circle at 5% -30%, rgba(255, 255, 255, 0.08), transparent 32%),
    radial-gradient(
      circle at 98% 135%,
      color-mix(in srgb, var(--sidebar-accent) 18%, transparent),
      transparent 36%
    ),
    linear-gradient(110deg, color-mix(in srgb, var(--sidebar) 83%, #000), var(--sidebar));
}

.customer-modal-heading {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.customer-modal-heading-icon {
  display: none;
}

.customer-modal-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.customer-modal-heading p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
}

.customer-modal-header .btn-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border-radius: 11px;
  background-color: rgba(255, 255, 255, 0.16);
  background-size: 11px;
  filter: invert(1) grayscale(1) brightness(2);
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}
.customer-modal-header .btn-close:hover {
  background-color: rgba(255, 255, 255, 0.28);
  transform: rotate(5deg);
}

.customer-modal-content .modal-body {
  overflow-y: auto;
  padding: 28px 32px;
  background: var(--surface);
}

.customer-business-toggle {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid color-mix(in srgb, var(--sidebar) 18%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--sidebar) 5%, var(--surface));
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.customer-business-toggle:has(.form-check-input:checked) {
  border-color: color-mix(in srgb, var(--sidebar) 54%, var(--line));
  background: color-mix(in srgb, var(--sidebar) 10%, var(--surface));
  box-shadow: inset 4px 0 0 var(--sidebar-accent);
}

.customer-business-toggle .form-check-input {
  width: 2.45rem;
  height: 1.35rem;
  flex: 0 0 auto;
  margin: 0;
  cursor: pointer;
}
.customer-business-toggle .form-check-input:checked {
  border-color: var(--sidebar);
  background-color: var(--sidebar);
}
.customer-business-toggle .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--sidebar) 14%, transparent);
}
.customer-business-toggle .form-check-label {
  display: grid;
  gap: 3px;
  cursor: pointer;
}
.customer-business-toggle .form-check-label strong {
  color: var(--ink);
  font-size: 0.93rem;
}
.customer-business-toggle .form-check-label span {
  color: var(--muted);
  font-size: 0.78rem;
}

.convert-requisition-summary {
  cursor: default;
}
.convert-requisition-summary .customer-modal-heading-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 10px;
  color: var(--sidebar);
  background: color-mix(in srgb, var(--sidebar) 12%, var(--surface));
}
.convert-requisition-summary > div {
  display: grid;
  gap: 3px;
}
.convert-requisition-summary strong {
  color: var(--ink);
  font-size: 0.93rem;
}
.convert-requisition-summary span {
  color: var(--muted);
  font-size: 0.78rem;
}

.customer-input-shell {
  min-height: 82px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--sidebar) 22%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--sidebar) 1.5%, var(--surface));
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.customer-input-shell:hover {
  border-color: color-mix(in srgb, var(--sidebar) 42%, var(--line));
}
.customer-input-shell:focus-within {
  border-color: var(--sidebar);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sidebar) 11%, transparent);
}

.customer-input-shell .form-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 13px 17px 0;
  color: color-mix(in srgb, var(--sidebar) 72%, var(--ink));
  font-size: 0.75rem;
  font-weight: 720;
}
.customer-input-shell .form-label i {
  width: 14px;
  color: var(--sidebar-accent);
  text-align: center;
}
.customer-input-shell .form-control,
.customer-input-shell .form-select {
  min-height: 45px;
  margin: 0;
  padding: 5px 17px 13px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  font-size: 0.96rem;
}
.customer-input-shell .form-control:focus,
.customer-input-shell .form-select:focus {
  border: 0;
  background-color: transparent;
  box-shadow: none;
}
.customer-select-shell .form-select {
  padding-right: 44px;
}
.customer-textarea-shell {
  min-height: 142px;
}
.customer-textarea-shell textarea.form-control {
  min-height: 104px;
  resize: vertical;
}

.customer-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px 24px;
  border-top: 1px solid color-mix(in srgb, var(--sidebar) 12%, var(--line));
  background: color-mix(in srgb, var(--sidebar) 5%, var(--surface));
}
.customer-modal-footer > span {
  display: none;
}
.customer-modal-footer > span i {
  margin-right: 5px;
  color: var(--sidebar);
}
.customer-modal-footer > div {
  display: flex;
  gap: 12px;
}
.customer-modal-footer .btn {
  min-width: 154px;
  min-height: 48px;
  border-radius: 999px;
  font-weight: 700;
}
.customer-save-button {
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--sidebar) 82%, #fff), var(--sidebar));
  box-shadow: 0 9px 18px color-mix(in srgb, var(--sidebar) 18%, transparent);
}
.customer-save-button:hover,
.customer-save-button:focus-visible {
  color: #fff !important;
  background: linear-gradient(
    135deg,
    var(--sidebar),
    color-mix(in srgb, var(--sidebar) 82%, #000)
  ) !important;
  transform: translateY(-1px);
}

@media (max-width: 1199.98px) {
  .panel-card.customer-directory-panel .customer-directory-toolbar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }
}

@media (max-width: 767.98px) {
  .directory-page-header {
    align-items: stretch;
    flex-direction: column;
    padding: 24px;
  }
  .page-customers .directory-page-header,
  .page-suppliers .directory-page-header,
  .page-tools-inventory .directory-page-header {
    padding-left: 64px;
  }
  .directory-add-button {
    align-self: flex-start;
  }
  .panel-card.customer-directory-panel .customer-directory-toolbar {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 575.98px) {
  .directory-page-heading h1 {
    font-size: 1.7rem;
  }
  .directory-page-heading p {
    font-size: 0.82rem;
  }
  .directory-add-button {
    width: 100%;
  }
  .customer-stat-grid {
    gap: 10px;
  }
  .customer-stat-filter {
    gap: 9px;
    padding: 12px 10px;
  }
  .customer-stat-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
  .customer-stat-filter strong {
    font-size: 1.1rem;
  }
  .panel-card.customer-directory-panel .customer-directory-toolbar {
    grid-template-columns: 1fr;
  }
  .customer-list-add-button {
    width: 100%;
  }
  .customer-modal-content {
    border-radius: 18px;
  }
  .customer-modal-header,
  .customer-modal-content .modal-body,
  .customer-modal-footer {
    padding: 16px;
  }
  .customer-modal-heading p {
    display: none;
  }
  .customer-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .customer-modal-footer > span {
    display: none;
  }
  .customer-modal-footer > div,
  .customer-modal-footer .btn {
    flex: 1;
  }
}

.mobile-sidebar-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 35;
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 28px var(--shadow);
}

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.user-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.icon-button {
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: 0 12px 28px var(--shadow);
}

.icon-button:hover {
  border-color: rgba(245, 130, 32, 0.48);
  color: var(--brand-dark);
  transform: translateY(-1px);
}

.theme-toggle {
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.auth-theme-toggle {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 10;
}

.avatar {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--yellow));
  color: #fff;
  font-weight: 800;
}

.notification-button {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  border: 2px solid var(--surface);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
}

.notification-menu {
  width: min(380px, calc(100vw - 32px));
  padding: 10px;
}

.notification-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--line);
}

.notification-menu-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.notification-item {
  display: flex;
  gap: 10px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

.notification-item > i {
  margin-top: 4px;
  color: var(--muted);
}

.notification-item.unread > i,
.notification-item.unread strong {
  color: var(--brand-dark);
}

.notification-item strong,
.notification-item p,
.notification-item small {
  display: block;
}

.notification-item p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.notification-item small {
  color: var(--muted);
  font-size: 0.72rem;
}

.notification-empty {
  padding: 18px 10px;
  color: var(--muted);
  text-align: center;
}

.notification-more {
  margin-top: 8px;
  border-radius: 8px;
  font-weight: 800;
  text-align: center;
}

.content-wrap {
  padding: 28px;
}

/* Dashboard components below are intentionally generic for client-specific reuse. */
.metric-card,
.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 16px 36px var(--shadow);
}

.metric-card {
  min-height: 190px;
}

.report-stat-card {
  position: relative;
  height: 100%;
  min-height: 168px;
  overflow: hidden;
  border-right: 5px solid var(--brand);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-right-color 0.2s ease;
}

.report-stat-card:hover {
  transform: translateY(-5px);
  border-right-color: var(--green);
  box-shadow: 0 22px 44px rgba(36, 52, 71, 0.16);
}

.report-filter-panel {
  border-right: 5px solid var(--brand);
}

.report-preset-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dynamic-report-chart {
  position: relative;
  height: 390px;
}

.storage-cabinet-list {
  display: grid;
  gap: 28px;
}

.storage-cabinet {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 42px var(--shadow);
}

.storage-cabinet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 4px solid var(--cabinet-accent);
  background: var(--surface-alt);
}

.storage-cabinet-head p,
.storage-cabinet-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.cabinet-code {
  min-width: 64px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--cabinet-accent);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  box-shadow: 0 8px 18px rgba(36, 52, 71, 0.15);
}

.storage-cabinet-note {
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.cabinet-scroll {
  overflow-x: auto;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(36, 52, 71, 0.04) 25%, transparent 25%) 0 0 / 18px 18px,
    var(--surface-alt);
}

.cabinet-frame {
  min-width: max-content;
  padding: 14px;
  border: 8px solid #5d4636;
  border-radius: 8px;
  background: linear-gradient(90deg, #6d503b, #8a684e 48%, #624834);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.12),
    0 16px 32px rgba(36, 30, 24, 0.2);
}

.cabinet-shelf-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 8px 8px 14px;
  border-bottom: 10px solid #4e392b;
  background: linear-gradient(180deg, #86664e, #684c39);
}

.cabinet-shelf-row + .cabinet-shelf-row {
  padding-top: 14px;
}

.cabinet-shelf-row:last-child {
  border-bottom: 0;
  padding-bottom: 8px;
}

.shelf-row-label {
  width: 72px;
  min-width: 72px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 7px;
  background: rgba(30, 22, 17, 0.72);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.cabinet-slot-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--cabinet-columns), minmax(135px, 1fr));
  gap: 9px;
}

.cabinet-slot {
  position: relative;
  min-height: 164px;
  padding: 12px;
  overflow: hidden;
  border: 2px solid rgba(93, 70, 54, 0.42);
  border-radius: 7px;
  background: #f8f5ef;
  color: #252019;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.cabinet-slot:hover {
  z-index: 2;
  transform: translateY(-3px);
  border-color: var(--cabinet-accent);
  box-shadow: 0 12px 24px rgba(36, 30, 24, 0.24);
}

.cabinet-slot.occupied {
  border-top: 5px solid var(--cabinet-accent);
  background: linear-gradient(145deg, #fff 0%, #f5f1e9 100%);
}

.cabinet-slot.empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.7);
}

.slot-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #766a60;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.slot-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(93, 70, 54, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.slot-product-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.slot-item-copy {
  min-width: 0;
}

.slot-item strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
}

.slot-item small {
  display: block;
  color: #81766d;
  font-size: 0.72rem;
}

.slot-quantity {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 12%, #fff);
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 900;
}

.slot-quantity small {
  color: inherit;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slot-box-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 8px;
  background: rgba(245, 130, 32, 0.13);
  color: var(--brand-dark);
}

.slot-empty-state {
  min-height: 100px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: #978b80;
  font-size: 0.76rem;
}

.slot-empty-state i {
  font-size: 1.15rem;
}

.slot-action {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
}

.slot-item-action {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 7px;
}

.storage-slot-focus {
  outline: 4px solid var(--yellow);
  outline-offset: 2px;
  animation: storage-pulse 1.4s ease-in-out 2;
}

@keyframes storage-pulse {
  50% {
    box-shadow: 0 0 0 10px rgba(247, 200, 75, 0.28);
  }
}

.storage-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
}

.storage-empty > i {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--corporate-soft);
  color: var(--brand);
  font-size: 1.7rem;
}

.storage-empty p {
  max-width: 560px;
  color: var(--muted);
}

.costing-method-grid {
  display: grid;
  gap: 12px;
}

.costing-method-option {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: start;
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--surface-alt);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.costing-method-option:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 12px 24px var(--shadow);
}

.costing-method-option:has(input:checked) {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(245, 130, 32, 0.1), var(--surface));
  box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.1);
}

.costing-method-option input {
  position: absolute;
  top: 14px;
  right: 14px;
  accent-color: var(--brand);
}

.costing-method-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(245, 130, 32, 0.13);
  color: var(--brand-dark);
}

.costing-method-option > span:last-child {
  display: grid;
  gap: 5px;
  padding-right: 18px;
}

.costing-method-option strong,
.costing-method-option small,
.costing-method-option em {
  display: block;
}

.costing-method-option small {
  color: var(--muted);
  line-height: 1.45;
}

.costing-method-option em {
  color: var(--green-dark);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
}

[data-theme='dark'] .report-stat-card:hover {
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.34);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--line);
}

.dropdown-menu {
  --bs-dropdown-bg: var(--surface);
  --bs-dropdown-color: var(--ink);
  --bs-dropdown-link-color: var(--ink);
  --bs-dropdown-link-hover-bg: var(--soft);
  --bs-dropdown-link-hover-color: var(--brand-dark);
  --bs-dropdown-border-color: var(--line);
}

.text-primary,
.text-info {
  color: var(--brand) !important;
}

.text-success {
  color: var(--green) !important;
}

.bg-primary-subtle,
.bg-info-subtle {
  background-color: rgba(245, 130, 32, 0.13) !important;
}

.bg-success-subtle {
  background-color: rgba(76, 143, 23, 0.13) !important;
}

.bg-warning-subtle {
  background-color: rgba(247, 200, 75, 0.2) !important;
}

.text-bg-primary {
  background-color: var(--brand) !important;
}

.text-bg-success {
  background-color: var(--green) !important;
}

.metric-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
}

.metric-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.metric-card h3 {
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.cycle-stat {
  --cycle-accent: var(--brand);
  position: relative;
  height: 100%;
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cycle-accent) 22%, var(--line));
  border-top: 4px solid var(--cycle-accent);
  border-radius: 10px;
  color: inherit;
  background:
    radial-gradient(
      circle at 100% 0,
      color-mix(in srgb, var(--cycle-accent) 15%, transparent) 0 36%,
      transparent 37%
    ),
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--cycle-accent) 8%, var(--surface)) 0%,
      var(--surface) 74%
    );
  text-decoration: none;
  box-shadow: 0 9px 22px color-mix(in srgb, var(--cycle-accent) 9%, transparent);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.cycle-stat:hover,
.cycle-stat:focus-visible {
  color: inherit;
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--cycle-accent) 55%, var(--line));
  box-shadow: 0 16px 30px color-mix(in srgb, var(--cycle-accent) 18%, transparent);
  outline: none;
}

.cycle-stat:focus-visible {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--cycle-accent) 25%, transparent),
    0 16px 30px color-mix(in srgb, var(--cycle-accent) 18%, transparent);
}

.cycle-stat span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cycle-accent) 13%, var(--surface));
  color: var(--cycle-accent);
  border: 1px solid color-mix(in srgb, var(--cycle-accent) 22%, var(--line));
}

[data-theme='dark'] .cycle-stat span {
  background: var(--surface);
}

.cycle-stat p,
.cycle-stat small {
  margin: 0;
  color: var(--muted);
}

.cycle-stat p {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cycle-stat strong {
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
}

.cycle-stat-low {
  --cycle-accent: var(--brand);
}
.cycle-stat-restock {
  --cycle-accent: color-mix(in srgb, var(--sidebar) 72%, var(--green-dark));
}
.cycle-stat-received {
  --cycle-accent: var(--green);
}
.cycle-stat-sales {
  --cycle-accent: var(--corporate);
}
.cycle-stat-invoice {
  --cycle-accent: var(--sidebar-accent);
}
.cycle-stat-delivery {
  --cycle-accent: var(--brand-dark);
}

.dashboard-workflow-panel {
  border-color: color-mix(in srgb, var(--sidebar) 18%, var(--line));
  background:
    linear-gradient(90deg, var(--sidebar-accent) 0 5px, transparent 5px),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--sidebar) 5%, var(--surface)) 0%,
      var(--surface) 55%
    );
}

/* Dashboard carousel teaches core inventory benefits before the live statistics. */
.benefit-carousel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 42px var(--shadow);
}

.benefit-carousel .carousel-item {
  min-height: 360px;
  background: var(--corporate);
}

.benefit-carousel img {
  height: 360px;
  object-fit: cover;
}

.benefit-carousel.image-carousel .carousel-item {
  background: #ff8a00;
}

.benefit-carousel.image-carousel img {
  height: clamp(360px, 42vw, 620px);
  object-fit: contain;
}

.benefit-carousel .carousel-caption {
  right: auto;
  bottom: 32px;
  left: 32px;
  max-width: min(560px, calc(100% - 64px));
  padding: 0;
  text-align: left;
}

.benefit-carousel .carousel-caption h2 {
  margin: 6px 0 10px;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 3rem);
  font-weight: 800;
  letter-spacing: 0;
}

.benefit-carousel .carousel-caption p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
}

.benefit-carousel .carousel-caption .section-kicker {
  color: var(--yellow);
}

.benefit-carousel .carousel-control-prev,
.benefit-carousel .carousel-control-next {
  width: 56px;
}

.benefit-carousel .carousel-indicators {
  margin-bottom: 16px;
}

.benefit-carousel .carousel-indicators [data-bs-target] {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
}

.benefit-modal .modal-dialog {
  max-width: min(1180px, calc(100vw - 36px));
}

.benefit-modal .modal-content {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.benefit-modal .modal-body {
  padding: 0;
  background: #ff8a00;
}

.modal-image-carousel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.modal-image-carousel .carousel-item {
  background: #ff8a00;
}

.modal-image-carousel img {
  max-height: calc(100vh - 190px);
  object-fit: contain;
}

.modal-image-carousel .carousel-control-prev,
.modal-image-carousel .carousel-control-next {
  width: 64px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent);
}

.modal-image-carousel .carousel-control-next {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.28), transparent);
}

.chart-panel {
  min-height: 354px;
}

.dashboard-bars {
  display: grid;
  gap: 14px;
}

.dashboard-bar-row {
  display: grid;
  gap: 8px;
}

.dashboard-bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.dashboard-bar-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bar-meta strong {
  flex: 0 0 auto;
  color: var(--ink);
}

.dashboard-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.dashboard-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--green));
}

.dashboard-bars.vertical {
  min-height: 240px;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  align-items: end;
  gap: 12px;
  padding-top: 8px;
}

.dashboard-bars.vertical .dashboard-bar-row {
  min-height: 230px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
}

.dashboard-bars.vertical .dashboard-bar-track {
  width: 100%;
  height: 170px;
  display: flex;
  align-items: end;
  border-radius: 10px;
}

.dashboard-bars.vertical .dashboard-bar-track span {
  width: 100% !important;
}

.dashboard-bars.vertical .dashboard-bar-meta {
  min-height: 48px;
  display: grid;
  justify-items: center;
  text-align: center;
}

.dashboard-bars.vertical .dashboard-bar-meta span {
  max-width: 100%;
  white-space: normal;
}

.dashboard-donut-wrap {
  min-height: 250px;
  display: grid;
  place-items: center;
  gap: 18px;
}

.dashboard-donut {
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 calc(var(--healthy-stock) * 1%), var(--brand) 0 100%);
}

.dashboard-donut::after {
  content: '';
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
}

.dashboard-donut span,
.dashboard-donut small {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.dashboard-donut span {
  align-self: end;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.dashboard-donut small {
  align-self: start;
  color: var(--muted);
  font-size: 0.78rem;
}

.dashboard-legend {
  width: 100%;
  display: grid;
  gap: 8px;
}

.dashboard-legend span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
}

.legend-dot.green {
  background: var(--green);
}

.legend-dot.orange {
  background: var(--brand);
}

.dashboard-empty-graph {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-alt);
}

.store-page {
  min-height: 100vh;
  color: var(--ink);
  background: var(--soft);
}

.store-header {
  color: #fff;
  background: linear-gradient(135deg, var(--corporate) 0%, var(--brand-dark) 100%);
}

.store-nav,
.store-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.store-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
}

.store-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.store-brand:hover {
  color: #fff;
}

.store-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-hero {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 70px;
}

.store-hero span,
.store-section-head span,
.product-category {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.store-hero h1 {
  max-width: 760px;
  margin: 10px 0 14px;
  color: #fff;
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: 0;
}

.store-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}

.store-shell {
  padding: 30px 0 54px;
}

.store-category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -56px 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 36px var(--shadow);
}

.store-category-strip a {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.store-category-strip a.active,
.store-category-strip a:hover {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.store-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.store-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.store-section-head h2,
.cart-panel h2 {
  margin: 4px 0 0;
  font-weight: 800;
  letter-spacing: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.product-card,
.cart-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 36px var(--shadow);
}

.product-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
}

.product-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--brand);
  background: var(--surface-alt);
}

.product-image {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-alt);
}

.product-image-placeholder {
  object-fit: cover;
}

.inventory-product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 30px var(--shadow);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.inventory-product-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: 0 20px 40px var(--shadow);
}

.inventory-product-card-image {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}

.inventory-product-card-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 2rem;
}

.inventory-product-card-body {
  padding: 18px;
}

.inventory-product-card-body > p {
  min-height: 42px;
}

.inventory-product-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inventory-product-card-stats span {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-alt);
}

.inventory-product-card-stats small {
  color: var(--muted);
}

.inventory-view-switcher .btn {
  min-width: 112px;
}

.product-directory-panel {
  max-width: none;
}

.product-simple-row {
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  text-decoration: none;
}

.product-row-profile {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.product-row-profile small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.product-row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.product-row-actions .btn {
  min-width: 94px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 5px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .product-row-actions .btn {
    min-width: 44px;
    padding-inline: 12px;
  }

  .product-row-actions .btn span {
    display: none;
  }
}

.inventory-directory-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
}

.inventory-directory-subnav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--ink) 3%, var(--surface));
  font-weight: 600;
  text-decoration: none;
}

.inventory-directory-subnav a:hover,
.inventory-directory-subnav a:focus-visible,
.inventory-directory-subnav a.active {
  color: #fff;
  background: var(--sidebar);
  outline: none;
}

.inventory-storage-subnav {
  margin-bottom: 14px;
  padding: 0;
}

.product-category {
  color: var(--brand-dark);
}

.product-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.product-card p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.product-meta strong {
  color: var(--ink);
}

.product-cart-form {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
}

.cart-panel {
  position: sticky;
  top: 24px;
  padding: 20px;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin: 16px 0;
  font-size: 1.1rem;
}

.checkout-form {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.checkout-form h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.store-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
}

.metric-status {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--corporate-soft);
  color: var(--corporate);
  font-weight: 800;
  line-height: 1;
}

.metric-status.positive {
  background: rgba(76, 143, 23, 0.12);
  color: var(--green);
}

.metric-status.review {
  background: rgba(247, 200, 75, 0.2);
  color: #8a5d00;
}

.priority-list p {
  color: var(--muted);
}

.table > :not(caption) > * > * {
  padding: 16px 12px;
}

.priority-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-item,
.priority-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.task-item:last-child,
.priority-list li:last-child {
  border-bottom: 0;
}

.task-item p,
.priority-list p {
  margin: 4px 0 0;
  font-size: 0.88rem;
}

.corporate-table thead th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom-width: 1px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.table-search {
  width: min(360px, 100%);
}

.table-search .input-group-text {
  color: var(--muted);
}

.table-pagination {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.page-link {
  color: var(--brand-dark);
  background: var(--surface);
  border-color: var(--line);
}

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

.handoff-card {
  display: grid;
  justify-items: start;
  gap: 14px;
  min-height: 100%;
}

.progress-ring {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 0 56%, transparent 57%),
    conic-gradient(var(--green) 0 92%, var(--line) 92% 100%);
}

.progress-ring span {
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 800;
}

.credential-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(76, 143, 23, 0.13), rgba(247, 200, 75, 0.18));
  border: 1px solid var(--line);
}

.permission-grid {
  display: grid;
  gap: 8px;
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.5fr) repeat(4, minmax(62px, 0.5fr));
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-alt);
}

.permission-head {
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.check-cell {
  display: grid;
  place-items: center;
  min-height: 28px;
}

.check-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

@media (max-width: 991px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .store-layout {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content-wrap {
    padding-left: 18px;
    padding-right: 18px;
    padding-top: 78px;
  }

  .module-hero {
    min-height: 250px;
    margin: -78px -18px 26px;
    padding: 86px 24px 32px;
  }

  .module-hero h1 {
    font-size: clamp(2rem, 6vw, 3.25rem);
  }

  .module-hero-stat {
    width: 140px;
    min-width: 140px;
    min-height: 126px;
    padding: 18px;
  }

  .module-hero-compact {
    min-height: 146px;
    margin-top: -78px;
    padding: 84px 24px 22px;
  }
}

@media (max-width: 575px) {
  .auth-page {
    padding: 18px;
  }

  .store-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .store-actions {
    width: 100%;
  }

  .store-actions .btn {
    flex: 1 1 auto;
  }

  .store-hero {
    padding: 34px 0 64px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .cart-line {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .product-cart-form {
    grid-template-columns: 1fr;
  }

  .auth-card .card-body,
  .content-wrap {
    padding: 18px;
  }

  .module-hero {
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 22px;
    margin: -18px -18px 24px;
    padding: 76px 20px 28px;
  }

  .module-hero h1 {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  .module-hero-description {
    margin-top: 14px;
  }

  .module-hero-stat {
    width: 100%;
    min-width: 0;
    min-height: 96px;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: center;
    column-gap: 12px;
  }

  .module-hero-compact {
    min-height: 132px;
    gap: 0;
    padding: 72px 20px 20px;
  }

  .module-hero-compact h1 {
    font-size: 2.35rem;
  }

  .dynamic-report-chart {
    height: 320px;
  }

  .storage-cabinet-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .cabinet-scroll {
    padding: 12px;
  }

  .shelf-row-label {
    width: 54px;
    min-width: 54px;
  }

  .benefit-carousel img,
  .benefit-carousel .carousel-item {
    height: 390px;
  }

  .benefit-carousel .carousel-caption {
    bottom: 44px;
    left: 22px;
    max-width: calc(100% - 44px);
  }
}

/* Public retail storefront */
.store-page {
  min-height: 100vh;
  color: var(--ink);
  background: #f8f8f6;
}

.retail-container {
  width: min(1420px, calc(100% - 48px));
  margin-inline: auto;
}

.retail-topbar {
  color: #fff;
  background: var(--sidebar);
}

.retail-topbar nav {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4vw, 58px);
  overflow-x: auto;
}

.retail-topbar a {
  flex: 0 0 auto;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.retail-topbar a:hover {
  color: var(--yellow);
}

.retail-mainbar {
  min-height: 142px;
  display: grid;
  grid-template-columns: auto minmax(340px, 1fr) auto auto;
  align-items: center;
  gap: clamp(22px, 3vw, 48px);
}

.retail-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}

.retail-brand img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
}

.retail-brand strong,
.retail-brand small {
  display: block;
}

.retail-brand strong {
  max-width: 210px;
  font-size: 1.15rem;
  line-height: 1.15;
}

.retail-brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

.retail-search {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 190px 64px;
  overflow: hidden;
  border: 1px solid #e4e4df;
  border-radius: 999px;
  background: #f5f5f3;
}

.retail-search input,
.retail-search select,
.retail-search button {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.retail-search input {
  padding: 0 24px;
}

.retail-search select {
  padding: 0 18px;
  border-left: 1px solid #deded9;
  color: var(--muted);
  cursor: pointer;
}

.retail-search button {
  color: #fff;
  background: var(--brand);
  font-size: 1.05rem;
}

.retail-search button:hover {
  background: var(--brand-dark);
}

.retail-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.retail-contact > i {
  color: var(--brand);
  font-size: 1.8rem;
}

.retail-contact small,
.retail-contact strong {
  display: block;
  white-space: nowrap;
}

.retail-contact small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.retail-contact strong {
  font-size: 0.96rem;
}

.retail-account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.retail-account-actions > a {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #e1e1dc;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font-size: 1.15rem;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.retail-account-actions > a:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  color: var(--brand-dark);
}

.retail-cart-button span {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #e53c36;
  font-size: 0.66rem;
  font-weight: 800;
}

.store-shell {
  padding: 0 0 64px;
}

.retail-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 30px;
  border: 1px solid #e1e1dc;
  background: #fff;
}

.retail-benefits article {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  border-right: 1px solid #e1e1dc;
}

.retail-benefits article:last-child {
  border-right: 0;
}

.retail-benefits i {
  color: var(--brand-dark);
  font-size: 2.2rem;
}

.retail-benefits strong,
.retail-benefits small {
  display: block;
}

.retail-benefits strong {
  font-size: 0.98rem;
  text-transform: uppercase;
}

.retail-benefits small {
  margin-top: 3px;
  color: var(--muted);
}

.retail-feature-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.retail-category-menu {
  align-self: stretch;
  border: 1px solid #e1e1dc;
  background: #fff;
}

.retail-category-menu a {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #e8e8e4;
  color: #4f4b45;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    padding 0.2s ease;
}

.retail-category-menu a:last-child {
  border-bottom: 0;
}

.retail-category-menu a strong {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: #f1f1ed;
  font-size: 0.7rem;
}

.retail-category-menu a:hover,
.retail-category-menu a.active {
  padding-left: 25px;
  color: var(--brand-dark);
  background: #fff7ef;
}

.retail-category-menu a.active {
  box-shadow: inset 4px 0 0 var(--brand);
}

.retail-hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(380px, 1.18fr);
  align-items: center;
  overflow: hidden;
  border-radius: 2px;
  color: #fff;
  background: linear-gradient(135deg, #285d24 0%, #174422 100%);
}

.retail-hero-copy {
  z-index: 1;
  padding: clamp(32px, 5vw, 72px);
}

.retail-kicker {
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.retail-hero h1 {
  margin: 12px 0 16px;
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 4.6rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.retail-hero p {
  max-width: 500px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
}

.retail-hero .btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  color: var(--green-dark);
  font-weight: 800;
}

.retail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-layout {
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
}

.store-products-panel {
  min-width: 0;
}

.store-section-head {
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 2px solid #e7e7e2;
}

.store-section-head .section-kicker {
  color: var(--brand-dark);
}

.store-result-count {
  color: var(--muted) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-radius: 3px;
  box-shadow: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 18px 38px rgba(37, 32, 25, 0.12);
}

.product-image {
  height: 240px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #f7f5f0;
}

.product-card-body {
  display: grid;
  gap: 8px;
  padding: 18px 18px 12px;
}

.product-category {
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}

.product-card h3 {
  min-height: 44px;
  font-size: 1rem;
  line-height: 1.35;
}

.product-card p {
  min-height: 58px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 0.86rem;
}

.product-meta {
  align-items: center;
  padding: 0 18px 14px;
}

.product-meta strong {
  color: var(--brand-dark);
  font-size: 1.16rem;
}

.product-meta span {
  font-size: 0.7rem;
  text-align: right;
}

.product-meta span i {
  color: var(--green);
}

.product-cart-form {
  grid-template-columns: 76px 1fr;
  padding: 0 18px 18px;
}

.product-cart-form .btn {
  white-space: nowrap;
}

.cart-panel {
  top: 18px;
  padding: 24px;
  border-radius: 3px;
  box-shadow: none;
}

.cart-panel-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.cart-panel-heading > strong {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 0.75rem;
}

.cart-panel-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-dark);
  background: #fff2e3;
}

.cart-panel-heading .section-kicker {
  color: var(--brand-dark);
  font-size: 0.65rem;
}

.cart-panel-heading h2 {
  font-size: 1.18rem;
}

.cart-line {
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  padding: 14px 0;
}

.cart-line > img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #f7f5f0;
}

.cart-line-controls {
  grid-column: 2;
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 10px;
}

.cart-line-controls strong {
  text-align: right;
}

.cart-total {
  padding: 14px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.cart-total strong {
  color: var(--brand-dark);
  font-size: 1.25rem;
}

.checkout-form {
  gap: 9px;
}

.checkout-form h3 {
  margin-bottom: 6px;
  font-size: 1.02rem;
}

.checkout-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.retail-footer {
  padding: 26px 0;
  color: rgba(255, 255, 255, 0.72);
  background: #1f241d;
}

.retail-footer > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.82rem;
}

.retail-footer strong {
  color: #fff;
}

@media (max-width: 1199.98px) {
  .retail-mainbar {
    grid-template-columns: auto minmax(300px, 1fr) auto;
  }
  .retail-contact {
    display: none;
  }
  .retail-feature-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .retail-hero {
    grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  }
  .store-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .retail-mainbar {
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    padding-block: 22px;
  }
  .retail-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .retail-feature-layout {
    grid-template-columns: 1fr;
  }
  .retail-category-menu {
    display: flex;
    overflow-x: auto;
  }
  .retail-category-menu a {
    min-width: 220px;
    border-right: 1px solid #e8e8e4;
    border-bottom: 0;
  }
  .retail-category-menu a.active {
    box-shadow: inset 0 -4px 0 var(--brand);
  }
  .store-layout {
    grid-template-columns: 1fr;
  }
  .cart-panel {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .retail-container {
    width: min(100% - 28px, 1420px);
  }
  .retail-topbar nav {
    justify-content: flex-start;
  }
  .retail-brand small {
    display: none;
  }
  .retail-brand img {
    width: 58px;
    height: 58px;
  }
  .retail-search {
    grid-template-columns: minmax(140px, 1fr) 56px;
  }
  .retail-search select {
    display: none;
  }
  .retail-benefits {
    grid-template-columns: 1fr;
  }
  .retail-benefits article {
    min-height: 92px;
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid #e1e1dc;
  }
  .retail-benefits article:last-child {
    border-bottom: 0;
  }
  .retail-hero {
    min-height: 520px;
    grid-template-columns: 1fr;
    grid-template-rows: auto 240px;
  }
  .retail-hero-copy {
    padding: 34px;
  }
  .retail-hero h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }
  .product-image {
    height: 220px;
  }
  .retail-footer > div {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  .retail-mainbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .retail-brand strong {
    max-width: 140px;
    font-size: 0.95rem;
  }
  .retail-account-actions > a {
    width: 42px;
    height: 42px;
  }
  .retail-account-actions > a:first-child {
    display: none;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .store-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .product-card h3,
  .product-card p {
    min-height: 0;
  }
  .cart-line {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .cart-line > img {
    width: 52px;
    height: 52px;
  }
}

/* Customer profile */
.customer-profile-page {
  display: grid;
  gap: 16px;
}

.customer-profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.customer-profile-actions > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.customer-profile-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.customer-profile-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(32, 44, 38, 0.12);
}

.customer-profile-back {
  color: #263849;
  background: #e9edf1;
}
.customer-profile-back:hover {
  color: #182631;
  background: #dde4e9;
}
.customer-profile-pdf {
  color: #fff;
  background: #39a96b;
}
.customer-profile-pdf:hover {
  color: #fff;
  background: #2e925b;
}
.customer-profile-excel {
  color: #fff;
  background: var(--sidebar);
}
.customer-profile-excel:hover {
  color: #fff;
  background: var(--green-dark);
}
.customer-profile-delete {
  color: #fff;
  background: #e23947;
}
.customer-profile-delete:hover {
  color: #fff;
  background: #c92937;
}

.page-header-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.page-header-downloads .customer-profile-button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 0.78rem;
}

.customer-profile-hero {
  min-height: 220px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 34px 38px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(40, 50, 44, 0.07);
}

.customer-profile-avatar {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: var(--sidebar);
  font-size: 2.2rem;
  font-weight: 700;
}

.customer-profile-heading > p,
.customer-profile-section-heading p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.customer-profile-heading h1 {
  margin: 0 0 17px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.customer-profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  color: var(--muted);
  font-size: 0.84rem;
}

.customer-profile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.customer-profile-meta i {
  color: var(--sidebar);
}
.customer-profile-status i {
  font-size: 0.45rem;
}
.customer-profile-status.is-active {
  color: #347b42;
}
.customer-profile-status.is-active i {
  color: #47a459;
}

.customer-profile-summary {
  min-width: 210px;
  display: grid;
  gap: 3px;
  padding: 24px 26px;
  border-left: 3px solid var(--sidebar-accent);
  background: #f6f8f5;
}

.customer-profile-summary span,
.customer-profile-summary small {
  color: var(--muted);
}
.customer-profile-summary span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.customer-profile-summary strong {
  color: var(--sidebar);
  font-size: 1.75rem;
}
.customer-profile-summary small {
  font-size: 0.8rem;
}

.customer-profile-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(40, 50, 44, 0.05);
}

.customer-profile-tabs button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 19px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
}

.customer-profile-tabs button:hover {
  color: var(--sidebar);
  background: #f2f6f2;
}
.customer-profile-tabs button.active {
  color: #fff;
  background: var(--sidebar);
}
.customer-profile-tabs button span {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--sidebar);
  background: #e6eee9;
  font-size: 0.7rem;
}

.customer-profile-content {
  min-height: 320px;
  padding: 32px 36px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(40, 50, 44, 0.06);
}

.customer-profile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e7ebe8;
}

.customer-profile-section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.customer-profile-section-heading > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sidebar);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.customer-profile-section-heading > span {
  color: var(--muted);
  font-size: 0.84rem;
}

.customer-profile-edit-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid color-mix(in srgb, var(--sidebar) 28%, var(--line));
  border-radius: 7px;
  color: var(--sidebar);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.customer-profile-edit-toggle:hover {
  color: #fff;
  background: var(--sidebar);
  transform: translateY(-1px);
}

.customer-profile-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  border: 0;
  border-radius: 8px;
}

.customer-profile-edit-form {
  padding-top: 2px;
}

.customer-profile-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.customer-profile-edit-grid label {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.customer-profile-edit-grid label > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.customer-profile-edit-grid label > span i {
  color: var(--sidebar-accent);
}

.customer-profile-edit-grid .form-control,
.customer-profile-edit-grid .form-select {
  min-height: 50px;
  border-color: color-mix(in srgb, var(--sidebar) 18%, var(--line));
  border-radius: 7px;
  background-color: var(--surface);
}

.customer-profile-edit-grid textarea.form-control {
  min-height: 100px;
  padding-top: 13px;
  resize: vertical;
}

.customer-profile-edit-grid .form-control:focus,
.customer-profile-edit-grid .form-select:focus {
  border-color: var(--sidebar);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sidebar) 10%, transparent);
}

.customer-profile-edit-address {
  grid-column: 1 / -1;
}

.customer-profile-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e7ebe8;
}

.customer-profile-save {
  color: #fff;
  background: var(--sidebar);
}
.customer-profile-save:hover {
  color: #fff;
  background: var(--green-dark);
}

.customer-profile-detail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.customer-profile-detail-list > div {
  min-height: 108px;
  padding: 19px 22px;
  border-bottom: 1px solid #edf0ed;
}

.customer-profile-detail-list dt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.customer-profile-detail-list dt i {
  color: var(--sidebar-accent);
}
.customer-profile-detail-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.customer-profile-detail-list .customer-profile-address {
  grid-column: 1 / -1;
}

.customer-profile-orders {
  width: 100%;
  border-collapse: collapse;
}
.customer-profile-orders th {
  padding: 14px 16px;
  color: var(--muted);
  background: #f5f7f5;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.customer-profile-orders td {
  padding: 17px 16px;
  border-bottom: 1px solid #e9edea;
  color: var(--ink);
  font-size: 0.88rem;
}
.customer-profile-orders th:last-child,
.customer-profile-orders td:last-child {
  text-align: right;
}

.supplier-purchase-row {
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.supplier-purchase-row:hover td,
.supplier-purchase-row:focus-visible td {
  background: color-mix(in srgb, var(--sidebar) 7%, var(--surface));
}

.supplier-purchase-row:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--sidebar-accent) 55%, transparent);
  outline-offset: -3px;
}

.supplier-purchase-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}

.supplier-purchase-link i {
  color: var(--sidebar);
  font-size: 0.72rem;
  opacity: 0.72;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.supplier-purchase-row:hover .supplier-purchase-link i,
.supplier-purchase-row:focus-visible .supplier-purchase-link i {
  opacity: 1;
  transform: translate(2px, -2px);
}

.transaction-row {
  scroll-margin-top: 100px;
}
.transaction-row.is-focused td,
.transaction-row:target td {
  background: color-mix(in srgb, var(--sidebar-accent) 13%, var(--surface));
  box-shadow:
    inset 0 2px 0 var(--sidebar-accent),
    inset 0 -2px 0 var(--sidebar-accent);
}

.transaction-row.is-focused td:first-child,
.transaction-row:target td:first-child {
  box-shadow:
    inset 4px 0 0 var(--sidebar-accent),
    inset 0 2px 0 var(--sidebar-accent),
    inset 0 -2px 0 var(--sidebar-accent);
}

.customer-order-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #6a5a29;
  background: #fff4c9;
  font-size: 0.72rem;
  font-weight: 700;
}
.customer-order-status.is-completed,
.customer-order-status.is-received {
  color: #27633e;
  background: #e4f3e9;
}
.customer-order-status.is-cancelled {
  color: #a62d38;
  background: #fde8ea;
}

.customer-profile-empty {
  min-height: 235px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}
.customer-profile-empty i {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--sidebar);
  background: #edf3ef;
  font-size: 1.25rem;
}
.customer-profile-empty h3 {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 1.12rem;
}
.customer-profile-empty p {
  margin: 0;
  font-size: 0.88rem;
}

.customer-delete-modal {
  align-items: center;
  padding: 36px;
  border: 0;
  border-radius: 12px;
  text-align: center;
}
.customer-delete-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  color: #d72f3d;
  background: #fde8ea;
  font-size: 1.35rem;
}
.customer-delete-modal h2 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.35rem;
}
.customer-delete-modal p {
  max-width: 410px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}
.customer-delete-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.customer-delete-cancel {
  color: #263849;
  background: #e9edf1;
}

[data-theme='dark'] .customer-profile-hero,
[data-theme='dark'] .customer-profile-tabs,
[data-theme='dark'] .customer-profile-content,
[data-theme='dark'] .customer-delete-modal {
  background: var(--surface);
}
[data-theme='dark'] .customer-profile-summary,
[data-theme='dark'] .customer-profile-orders th {
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 991.98px) {
  .customer-profile-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px;
  }
  .customer-profile-summary {
    grid-column: 1 / -1;
    grid-template-columns: auto auto 1fr;
    align-items: center;
  }
  .customer-profile-detail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .customer-profile-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .page-customers .content-wrap,
  .page-suppliers .content-wrap,
  .page-tools-inventory .content-wrap {
    padding: 14px;
    padding-top: 68px;
  }
  .customer-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .customer-profile-actions > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .customer-profile-delete {
    grid-column: 1 / -1;
  }
  .customer-profile-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 22px 20px;
  }
  .customer-profile-heading h1 {
    margin-bottom: 12px;
    font-size: 1.8rem;
  }
  .customer-profile-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .customer-profile-summary {
    grid-template-columns: 1fr;
    gap: 2px;
    min-width: 0;
    padding: 18px 20px;
  }
  .customer-profile-tabs {
    overflow-x: auto;
  }
  .customer-profile-tabs button {
    flex: 0 0 auto;
  }
  .customer-profile-content {
    padding: 24px 20px;
  }
  .customer-profile-detail-list {
    grid-template-columns: 1fr;
  }
  .customer-profile-edit-grid {
    grid-template-columns: 1fr;
  }
  .customer-profile-edit-address {
    grid-column: auto;
  }
  .customer-profile-edit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .customer-profile-detail-list > div {
    min-height: 92px;
    padding-inline: 4px;
  }
  .customer-profile-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Supply is one sidebar module; its former pages use a profile-style workspace. */
.procurement-module-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px;
  overflow-x: auto;
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(40, 50, 44, 0.06);
  scrollbar-width: thin;
}

.procurement-module-tabs a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 48px;
  padding: 0 19px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.procurement-module-tabs a:hover {
  color: var(--sidebar);
  background: color-mix(in srgb, var(--sidebar) 8%, var(--surface));
}

.procurement-module-tabs a.active {
  color: #fff;
  background: var(--sidebar);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--sidebar) 22%, transparent);
}

.procurement-module-tabs i {
  color: inherit;
}

[data-theme='dark'] .procurement-module-tabs a.active {
  color: #fff;
  background: var(--sidebar);
}

.procurement-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 128px;
  margin: 0 0 12px;
  padding: 20px 24px;
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(40, 50, 44, 0.06);
}

.procurement-page-hero > div:last-child {
  min-width: 0;
}
.procurement-page-hero p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.procurement-page-hero h1 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: clamp(1.65rem, 2.5vw, 2.35rem);
  font-weight: 750;
  letter-spacing: -0.04em;
}
.procurement-page-hero span {
  display: block;
  max-width: 680px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.procurement-page-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--sidebar);
  font-size: 1.35rem;
}

.procurement-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 18px;
}

.procurement-export-actions .customer-profile-button {
  cursor: pointer;
}

.low-stock-workspace {
  padding: 28px;
}
.low-stock-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.low-stock-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.low-stock-count {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--sidebar);
  background: color-mix(in srgb, var(--sidebar) 9%, var(--surface));
  font-size: 0.78rem;
  font-weight: 700;
}
.low-stock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.low-stock-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 126px;
  padding: 20px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 96%, var(--sidebar));
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.low-stock-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(40, 50, 44, 0.08);
}
.low-stock-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 10px;
  color: var(--sidebar);
  background: color-mix(in srgb, var(--sidebar) 10%, var(--surface));
}
.low-stock-card-copy {
  min-width: 0;
}
.low-stock-card-copy strong {
  display: block;
  color: var(--ink);
  font-size: 0.96rem;
}
.low-stock-card-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}
.low-stock-card-copy p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.low-stock-card-copy p b {
  color: var(--ink);
}
.low-stock-request-button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  white-space: nowrap;
}
.low-stock-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 54px 24px;
  color: var(--muted);
  text-align: center;
}
.low-stock-empty i {
  color: var(--green);
  font-size: 1.7rem;
}
.low-stock-empty strong {
  color: var(--ink);
}

.supply-request-toolbar {
  align-items: stretch;
}
.supply-request-toolbar .table-search {
  flex: 1 1 auto;
}
.supply-request-exports {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}
.supply-icon-button {
  width: 52px;
  min-width: 52px;
  padding: 0;
  cursor: pointer;
}
.supply-request-ledger .corporate-table td:last-child {
  min-width: 118px;
}

[data-theme='dark'] .procurement-page-hero,
[data-theme='dark'] .procurement-module-tabs {
  background: var(--surface);
}

@media (max-width: 767.98px) {
  .procurement-module-tabs {
    padding: 7px;
  }
  .procurement-module-tabs a {
    min-width: max-content;
    min-height: 44px;
    padding: 0 14px;
  }
  .procurement-page-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    margin-bottom: 10px;
    padding: 14px;
  }
  .procurement-page-hero h1 {
    font-size: 1.45rem;
  }
  .procurement-page-hero span {
    font-size: 0.8rem;
  }
  .procurement-page-mark {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 1rem;
  }
  .procurement-export-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .procurement-export-actions .customer-profile-button {
    padding-inline: 10px;
  }
  .low-stock-workspace {
    padding: 20px;
  }
  .low-stock-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .low-stock-grid {
    grid-template-columns: 1fr;
  }
  .low-stock-card {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 17px;
  }
  .low-stock-card-icon {
    width: 44px;
    height: 44px;
  }
  .low-stock-request-button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .supply-request-toolbar {
    flex-direction: row;
  }
}

@media print {
  @page {
    margin: 15mm 12mm 20mm;
  }
  .sidebar,
  .mobile-sidebar-toggle,
  .procurement-module-tabs,
  .procurement-export-actions,
  .page-header-downloads {
    display: none !important;
  }
  .app-layout,
  .main-panel,
  .content-wrap {
    display: block !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .procurement-page-hero {
    min-height: 0;
    border: 1px solid #ddd;
    box-shadow: none;
  }
  .supply-print-header {
    display: block !important;
    margin-bottom: 18px;
    border-bottom: 4px solid var(--sidebar-accent);
  }
  .supply-print-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: #fff;
    background: var(--sidebar);
  }
  .supply-print-brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    padding: 4px;
    border-radius: 7px;
    background: #fff;
  }
  .supply-print-brand strong,
  .supply-print-brand span {
    display: block;
  }
  .supply-print-brand strong {
    font-size: 18px;
  }
  .supply-print-brand span {
    margin-top: 3px;
    font-size: 11px;
    color: #dce9e1;
  }
  .supply-print-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
  }
  .supply-print-title h1 {
    margin: 0;
    font-size: 24px;
  }
  .supply-print-title span {
    color: #666;
    font-size: 10px;
  }
  .supply-print-footer {
    position: fixed;
    right: 0;
    bottom: -12mm;
    left: 0;
    display: flex !important;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid #bbb;
    color: #666;
    font-size: 9px;
  }
}

.supply-print-header,
.supply-print-footer {
  display: none;
}
