@import './pagination.css';

/* ─── main.css ───────────────────────────────────────────────────────────────── */
:root {
  --fiserv-orange: #ff6600;
  --primary-hover: #e55a00;
  --navy-blue: #003366;
  --nav-bg: #002754;
  --border-color: #dee2e6;
  --top-bar-height: 60px;
  --main-nav-height: 52px;
  --breadcrumb-height: 38px;
  --text-primary: #1a1a2e;
  --text-muted: #6c757d;
  --bg-light: #f8f9fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-primary);
}

/* ── Top Bar ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--top-bar-height);
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.nav-container {
  max-width: 1375px;
  width: 100%;
  margin: 0 auto;
  padding: 0 29px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.d-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.top-bar-left {
  display: flex;
  align-items: center;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  min-width: max-content;
}

.top-bar-link {
  color: var(--navy-blue);
  text-decoration: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-bar-link:hover {
  text-decoration: underline;
  color: var(--fiserv-orange);
}

.top-bar-divider {
  width: 1px;
  height: 14px;
  background: #ccc;
}

.top-bar-user {
  font-weight: 600;
  color: #333;
  font-size: 13px;
  white-space: nowrap;
}

/* ── Main Nav ── */
.main-nav {
  display: flex;
  align-items: center;
  height: var(--main-nav-height);
  background: var(--nav-bg);
  padding: 0;

  position: sticky;
  top: 0;
  z-index: 100;
}

.main-nav .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-nav-links {
  display: flex;
  align-items: center;
  height: var(--main-nav-height);
  gap: 0;
}

.main-nav-item {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  color: #c8d8e8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

.main-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.main-nav-item.active {
  color: #fff;
  border-bottom: 3px solid var(--fiserv-orange);
}

/* ── Nav Dropdown ── */
.nav-dropdown-wrapper {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-dropdown-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  height: 100%;
  padding: 0 18px;
  color: #c8d8e8;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: all 0.15s;
}

.nav-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-bottom-color: var(--fiserv-orange);
}

.nav-dropdown-btn.nav-btn-active {
  color: #fff;
  border-bottom-color: var(--fiserv-orange);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  min-width: 100%;
  z-index: 1000;
  padding: 6px 0;
}

.nav-dropdown-menu.open {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.nav-dropdown-item:hover {
  background: #f5f5f5;
  color: var(--fiserv-orange);
}

.nav-dropdown-item.active {
  color: var(--fiserv-orange);
  font-weight: 600;
  background: #fff8f5;
}

.nav-dropdown-placeholder {
  color: var(--text-muted) !important;
  font-style: italic;
  cursor: default !important;
}

.nav-dropdown-placeholder:hover {
  background: none !important;
  color: var(--text-muted) !important;
}

/* ── Nav Right ── */
.main-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 3px;
  height: 34px;
}

.nav-search-type-btn {
  background: var(--fiserv-orange);
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  height: 34px;
  padding: 0 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: background 0.15s;
  white-space: nowrap;
  border-radius: 3px 0 0 3px;
}

.nav-search-type-btn:hover {
  background: var(--primary-hover);
}

.nav-search input {
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 13px;
  width: 200px;
  height: 100%;
}

.nav-search-btn {
  background: var(--fiserv-orange);
  border: none;
  color: white;
  padding: 0 12px;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 0 3px 3px 0;
}

.nav-search-btn:hover {
  background: var(--primary-hover);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--fiserv-orange);
  color: #fff;
  text-decoration: none;
  padding: 0 16px;
  height: 34px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
  white-space: nowrap;
}

.cart-btn:hover {
  background: var(--primary-hover);
  color: #fff;
}

/* ── Admin Panel (fixed bottom-left floating panel) ── */
.admin-panel {
  position: fixed;
  bottom: 0;
  left: 8%;
  z-index: 1200;
  width: 300px;
  font-size: 13px;
  font-family: inherit;
}

/* Collapsed trigger bar */
.admin-panel__trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: var(--nav-bg);
  color: #e0e0e0;
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 9px 13px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s;
  text-align: left;
}

.admin-panel__trigger:hover {
  background: #003a7a;
}

.admin-panel__trigger-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}

.admin-panel__scope-badge {
  background: var(--fiserv-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
  flex-shrink: 0;
}

.admin-panel__chevron {
  color: #777;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.admin-panel__chevron.open {
  transform: rotate(180deg);
}

/* Expanded body */
.admin-panel__body {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-bottom: none;
  border-radius: 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  max-height: 560px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.admin-panel__section {
  padding: 12px 0 8px;
  border-bottom: 1px solid #f0f0f0;
}

.admin-panel__section:last-child {
  border-bottom: none;
}

.admin-panel__section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
}

/* Search bar */
.admin-panel__search-wrap {
  position: relative;
  margin: 0 12px 8px;
  display: flex;
  align-items: center;
}

.admin-panel__search-wrap>svg {
  position: absolute;
  left: 9px;
  color: #aaa;
  pointer-events: none;
}

.admin-panel__search {
  width: 100%;
  padding: 6px 28px 6px 28px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 12px;
  color: #333;
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s;
}

.admin-panel__search:focus {
  border-color: var(--fiserv-orange);
  background: #fff;
}

.admin-panel__search-clear {
  position: absolute;
  right: 7px;
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  padding: 2px;
  display: flex;
  align-items: center;
}

.admin-panel__search-clear:hover {
  color: #666;
}

/* Client list */
.admin-panel__client-list {
  max-height: 160px;
  overflow-y: auto;
  padding: 0 4px;
}

.admin-panel__client-item {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 7px 10px;
  background: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.admin-panel__client-item:hover {
  background: #f5f5f5;
}

.admin-panel__client-item.active {
  background: #fff8f3;
}

.admin-panel__client-code {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  white-space: nowrap;
  min-width: 52px;
}

.admin-panel__client-item.active .admin-panel__client-code {
  color: var(--fiserv-orange);
}

.admin-panel__client-name {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-panel__client-item.active .admin-panel__client-name {
  color: var(--fiserv-orange);
  font-weight: 600;
}

.admin-panel__client-item svg {
  color: var(--fiserv-orange);
  flex-shrink: 0;
  margin-left: auto;
}

/* Group tree section */
.admin-panel__section--tree {
  flex: 1;
}

.admin-panel__clear-scope {
  margin-left: auto;
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: all 0.12s;
}

.admin-panel__clear-scope:hover {
  border-color: var(--fiserv-orange);
  color: var(--fiserv-orange);
}

.admin-panel__tree-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #aaa;
}

.admin-panel__tree-loading span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  border-top-color: var(--fiserv-orange);
  animation: ap-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes ap-spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-panel__empty {
  padding: 8px 14px;
  font-size: 12px;
  color: #bbb;
}

.admin-panel__tree-fran-list {
  max-height: 175px;
  overflow-y: auto;
}

.admin-panel__fran-children {
  max-height: 300px;
  overflow-y: auto;
}

.admin-panel__tree {
  padding: 0 4px 4px;
}

/* Corporate all-view button */
.admin-panel__tree-corp {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  background: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  text-align: left;
  transition: background 0.12s;
  margin-bottom: 2px;
}

.admin-panel__tree-corp:hover {
  background: #f5f5f5;
}

.admin-panel__tree-corp.active {
  background: #fff8f3;
  color: var(--fiserv-orange);
  font-weight: 600;
}

/* Franchise rows */
.admin-panel__fran {
  margin-bottom: 1px;
}

.admin-panel__fran-row {
  display: flex;
  align-items: center;
  border-radius: 5px;
  transition: background 0.12s;
}

.admin-panel__fran-row:hover {
  background: #f5f5f5;
}

.admin-panel__fran-row.selected {
  background: #fff8f3;
}

.admin-panel__fran-expand {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px 6px 8px;
  color: #aaa;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.admin-panel__fran-expand:hover {
  color: #555;
}

.admin-panel__tree-chevron {
  transition: transform 0.18s;
  flex-shrink: 0;
}

.admin-panel__tree-chevron.open {
  transform: rotate(90deg);
}

.admin-panel__fran-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px 6px 2px;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  text-align: left;
}

.admin-panel__fran-row.selected .admin-panel__fran-label {
  color: var(--fiserv-orange);
  font-weight: 600;
}

/* Store group items */
.admin-panel__stor-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 10px 5px 28px;
  background: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 400;
  color: #555;
  text-align: left;
  transition: background 0.12s;
}

.admin-panel__stor-item:hover {
  background: #f5f5f5;
}

.admin-panel__stor-item.selected {
  background: #fff8f3;
  color: var(--fiserv-orange);
  font-weight: 600;
}

.admin-panel__stor-item svg {
  color: #ccc;
  flex-shrink: 0;
}

.admin-panel__stor-item.selected svg {
  color: var(--fiserv-orange);
}

/* Count badge */
.admin-panel__brands-divider {
  padding: 6px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #bbb;
  border-top: 1px solid #f0f0f0;
  margin-top: 4px;
}

.admin-panel__brand-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  background: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #444;
  text-align: left;
  transition: background 0.12s;
}

.admin-panel__brand-item:hover {
  background: #f5f5f5;
}

.admin-panel__brand-item.selected {
  background: #fff8f3;
  color: var(--fiserv-orange);
  font-weight: 600;
}

.admin-panel__brand-item svg {
  color: #ccc;
  flex-shrink: 0;
}

.admin-panel__brand-item.selected svg {
  color: var(--fiserv-orange);
}

.admin-panel__tree-count {
  font-size: 10px;
  color: #bbb;
  background: #f0f0f0;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Breadcrumb ── */
.breadcrumb-bar {
  height: var(--breadcrumb-height);
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: center;
  padding-left: 10px;
}

.breadcrumb-bar .nav-container {
  justify-content: flex-start;
  gap: 6px;
}

.bc-sep {
  color: #aaa;
}

.bc-active {
  color: #333;
  font-weight: 500;
}

/* ── Main Content ── */
.main-content {
  padding: 28px;
  max-width: 1375px;
  margin: 0 auto;
  min-height: calc(100vh - var(--top-bar-height) - var(--main-nav-height) - var(--breadcrumb-height));
}

/* ── Page Header ── */
.page-header {
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 26px;
  font-weight: 600;
  color: var(--navy-blue);
}

.text-muted {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ── Alerts ── */
.alert-error {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--fiserv-orange);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--fiserv-orange);
  color: var(--fiserv-orange);
}

.btn-outline-primary:hover {
  background: var(--fiserv-orange);
  color: #fff;
}

.btn-info {
  background: var(--navy-blue);
  border-color: var(--navy-blue);
  color: #fff;
}

.btn-info:hover {
  background: #002244;
}

/* ── Status ── */
.status-low {
  background-color: #fff3cd;
}

.badge-low {
  display: inline-block;
  padding: 2px 7px;
  background: #dc3545;
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-pill-ok {
  background: #d4edda;
  color: #155724;
}

.status-pill-low {
  background: #fff3cd;
  color: #856404;
}

/* ── Table ── */
.table-responsive {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.table thead th {
  background: var(--bg-light);
  border-bottom: 2px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  text-align: left;
}

.table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  color: #495057;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.table tbody tr:hover {
  background: var(--bg-light);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Inventory Controls ── */
.inventory-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.controls-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #e9ecef;
  border-radius: 6px;
  font-size: 13px;
  color: #495057;
}

.btn-close-badge {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #6c757d;
  line-height: 1;
}



/* ── Hidden ── */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.py-4 {
  padding: 32px 0;
}

/* ── Nav Account Button ── */
.nav-account-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  height: var(--main-nav-height);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: #c8d8e8;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-account-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: var(--fiserv-orange);
}

.nav-account-btn.active {
  color: #fff;
  border-bottom-color: var(--fiserv-orange);
}

/* Ensure account dropdown wrapper stretches full nav height like other nav items */
.main-nav-right .nav-dropdown-wrapper:not(#searchTypeWrapper) {
  height: var(--main-nav-height);
  display: flex;
  align-items: center;
}

.nav-dropdown-right {
  left: auto;
  right: 0;
}

/* ── Contact Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.modal-box {
  background: #fff;
  border-radius: 10px;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-blue);
  margin-bottom: 20px;
}

.modal-info-table {
  width: 100%;
  border-collapse: collapse;
}

.modal-info-table tr td {
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.modal-info-table tr:last-child td {
  border-bottom: none;
}

.modal-info-table td:first-child {
  font-weight: 600;
  color: #333;
  width: 140px;
}

.modal-info-table td:last-child {
  color: #555;
}

.modal-info-table a {
  color: var(--fiserv-orange);
  text-decoration: none;
}

.modal-info-table a:hover {
  text-decoration: underline;
}

.modal-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 11px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #333;
  transition: background 0.15s;
  text-align: center;
}

.modal-btn:hover {
  background: #e9ecef;
}

/* ── Footer ── */
.site-footer {
  background: var(--nav-bg);
  color: #a0b4c8;
  margin-top: 60px;
  padding: 32px 0 20px;
  font-size: 13px;
}

.footer-container {
  max-width: 1375px;
  margin: 0 auto;
  padding: 0 29px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  opacity: 0.85;
}

.footer-brand p {
  margin-top: 10px;
  font-size: 12px;
  color: #7a90a4;
  max-width: 260px;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  color: #7a90a4;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--fiserv-orange);
}

.footer-contact h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #7a90a4;
  font-size: 13px;
}

.footer-contact-row a {
  color: var(--fiserv-orange);
  text-decoration: none;
}

.footer-contact-row a:hover {
  text-decoration: underline;
}

.footer-contact-row svg {
  flex-shrink: 0;
  color: #7a90a4;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  font-size: 12px;
  color: #5a7080;
}

.footer-bottom a {
  color: #5a7080;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--fiserv-orange);
}

/* 
/* ── Pagination ── */
/* .pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 4px;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
} */
*/ .page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border-color);
  background: #fff;
  transition: all 0.15s;
  cursor: pointer;
}

.page-btn:hover {
  background: var(--bg-light);
  border-color: var(--fiserv-orange);
  color: var(--fiserv-orange);
}

.page-btn.active {
  background: var(--fiserv-orange);
  color: #fff;
  border-color: var(--fiserv-orange);
  font-weight: 700;
}

.page-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.page-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  font-size: 13px;
  color: var(--text-muted);
}

.per-page-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.per-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border-color);
  background: #fff;
  transition: all 0.15s;
}

.per-page-btn:hover {
  background: var(--bg-light);
  border-color: var(--fiserv-orange);
  color: var(--fiserv-orange);
}

.per-page-btn.active {
  background: var(--navy-blue);
  color: #fff;
  border-color: var(--navy-blue);
}

/* ── Table containers ── */
.table-responsive {
  border-radius: 8px;
}

.table-scroll {
  max-height: 1155px;
  /* unified with table-scroll-wrap */
  overflow-y: auto;
  border-radius: 8px;
}

.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-light);
}

/* Fixed height card so pagination never moves — 13 rows + header + card padding */
/* ── Fixed height card layout ── */
.account-card.fixed-height {
  display: flex;
  flex-direction: column;
  height: 1265px;
  /* fixed — 20 rows, +15% */
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.table-card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy-blue);
  margin: 0;
}

.table-card-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.table-card-footer {
  flex-shrink: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}

/* Table wrapper — flex child inside fixed-height card, always scrollable */
.table-wrapper {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* Fixed so wrapped row content never expands the card */
  height: 0;
  /* flex:1 overrides this, just ensures shrinkability */
}

.table-wrapper thead th,
.table-scroll-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-light);
  box-shadow: 0 1px 0 var(--border-color);
}

/* Empty state fills body */
.account-card.fixed-height .empty-account {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Sortable headers */
.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.sortable:hover {
  color: var(--fiserv-orange);
}

.sortable.sort-active {
  color: var(--fiserv-orange);
}

.sort-icon {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
}

.sortable.sort-active .sort-icon {
  color: var(--fiserv-orange);
}

/* Status filter */
.table-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-select {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--fiserv-orange);
}


/* ═══════════════════════════════════════════════════════════════
   LOCATION MODAL — shared across catalog and cart
   ═══════════════════════════════════════════════════════════════ */
.location-modal-box {
  max-width: 760px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
}

.location-search-bar {
  position: relative;
  margin-bottom: 20px;
}

.location-search-bar input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.location-search-bar input:focus {
  border-color: var(--fiserv-orange);
}

.location-search-bar svg {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.location-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
}

.location-card:hover {
  border-color: var(--fiserv-orange);
  background: #fff8f5;
}

.location-card-selected {
  border-color: var(--fiserv-orange);
  background: #fff8f5;
  position: relative;
}

.location-card-selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fiserv-orange);
}

.location-card strong {
  font-size: 14px;
  color: var(--navy-blue);
  font-weight: 600;
}

.location-card span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.location-card-prev {
  background: var(--bg-light);
}

.location-previous {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.location-previous h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   UNIVERSAL SCROLLABLE TABLE
   Fixed height = 20 single-line rows × 48px + thead 44px = 1004px
   Content ALWAYS scrolls inside — row wrapping never pushes height.
   ═══════════════════════════════════════════════════════════════ */

.table-scroll-wrap {
  overflow-y: auto;
  overflow-x: hidden;
  /* 20 rows × 48px + 44px thead */
  height: 1155px;
  /* 20 rows × 48px + thead, +15% */
}

.table-scroll-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-light);
  box-shadow: 0 1px 0 var(--border-color);
}

/* ── Privacy Policy ── */
.privacy-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.privacy-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy-blue);
  margin-bottom: 4px;
}

.privacy-updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.privacy-section {
  margin-bottom: 32px;
}

.privacy-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-blue);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.privacy-section p,
.privacy-section li {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
}

.privacy-section ul {
  margin: 8px 0 0 20px;
}

.privacy-section li {
  margin-bottom: 6px;
}

/* ── Welcome Banner ── */
/* ── START: HomePage redesign ────────────────────────────────────────────────── */
.home-hero {
  background-color: var(--navy-blue);
  border-radius: 10px;
  padding: 32px 36px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.home-hero-text {
  padding-right: 13px;
}

.home-hero-text h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.home-hero-text p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  /* max-width: 560px; */
}

.home-hero-support {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-end;
}

.home-hero-support a {
  color: var(--fiserv-orange);
  text-decoration: none;
}

.home-hero-support a:hover {
  text-decoration: underline;
}

.home-intro {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.home-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.home-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.home-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--fiserv-orange);
}

.home-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.home-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #fff5ec;
  color: var(--fiserv-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-blue);
}

.home-card-body {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  flex: 1;
}

.home-stages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.home-stage {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.home-stage-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.stage-label {
  font-weight: 700;
}

.stage-new {
  color: #0284c7;
}

.stage-fulfilled {
  color: #d97706;
}

.stage-canceled {
  color: #f32a10;
}

.stage-shipped {
  color: #16a34a;
}

@media (max-width: 930px) {
  .home-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-cards {
    grid-template-columns: 1fr;
  }

  .home-stages {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── END: HomePage redesign ──────────────────────────────────────────────────── */

/* ── Brand Filter Card ── */
.brand-filter-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 16px 18px;
  margin-bottom: 12px;
  border-top: 3px solid var(--navy-blue);
}

.brand-filter-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.brand-filter-btn {
  display: block;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border-color);
  background: #fff;
  transition: all 0.15s;
  text-align: left;
}

.brand-filter-btn:hover {
  border-color: var(--fiserv-orange);
  color: var(--fiserv-orange);
  background: #fff8f5;
}

.brand-filter-btn-active {
  background: #28a745;
  border-color: #28a745;
  color: #fff !important;
  font-weight: 600;
}

.brand-filter-btn-active:hover {
  background: #218838;
  border-color: #218838;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE NAV  — breakpoint ≤ 768px
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hide / show by breakpoint ─────────────────────────────────────────────── */
.top-bar-mobile {
  display: none;
}

.top-bar-desktop {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-nav-desktop {
  display: flex;
}

@media (max-width: 930px) {
  .top-bar-desktop {
    display: none;
  }

  .top-bar-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .main-nav-desktop {
    display: none;
  }
}

/* ── Hamburger button ──────────────────────────────────────────────────────── */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.hamburger-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy-blue);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: center;
}

/* Animate to × when open */
.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile cart icon in top bar ───────────────────────────────────────────── */
.mobile-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--navy-blue);
  text-decoration: none;
}

.mobile-cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--fiserv-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Mobile menu panel ─────────────────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  top: var(--top-bar-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 900;
  overflow-y: auto;
  padding: 0 0 32px;
  display: flex;
  flex-direction: column;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 899;
}

/* ── User strip ────────────────────────────────────────────────────────────── */
.mobile-menu-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-blue);
}

/* ── Mobile search ─────────────────────────────────────────────────────────── */
.mobile-search {
  display: flex;
  align-items: center;
  margin: 16px 16px 8px;
  background: #f5f5f5;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  height: 40px;
}

.mobile-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-primary);
  height: 100%;
}

.mobile-search button {
  background: var(--fiserv-orange);
  border: none;
  color: #fff;
  padding: 0 14px;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* ── Section + group label ─────────────────────────────────────────────────── */
.mobile-menu-section {
  display: flex;
  flex-direction: column;
}

.mobile-menu-group-label {
  padding: 12px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: 4px;
}

/* ── Menu items ────────────────────────────────────────────────────────────── */
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid #f3f3f3;
  transition: background 0.12s;
}

.mobile-menu-item:hover {
  background: #f8f8f8;
}

.mobile-menu-item.active {
  color: var(--fiserv-orange);
  font-weight: 600;
  background: #fff8f5;
}

.mobile-menu-sub {
  padding-left: 32px;
  font-size: 14px;
  color: #555;
}

.mobile-menu-badge {
  margin-left: auto;
  background: var(--fiserv-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

/* ── Footer links ──────────────────────────────────────────────────────────── */
.mobile-menu-footer {
  margin-top: auto;
  padding: 20px 20px 0;
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--border-color);
}

.mobile-menu-footer-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.mobile-menu-footer-link:hover {
  color: var(--fiserv-orange);
}

/* ── Client Selector Banner ── */
.client-selector-banner {
  background: #fff;
  border-bottom: 2px solid var(--fiserv-orange);
}

/* ─── Location Modal — View Toggle ──────────────────────────────────────────── */

.location-view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.loc-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fff;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.loc-toggle-btn:hover {
  border-color: #aaa;
  color: var(--text-primary);
}

.loc-toggle-btn.active {
  background: var(--navy-blue);
  border-color: var(--navy-blue);
  color: #fff;
}

/* ─── Location Tree (Organised View) ────────────────────────────────────────── */

.location-tree {
  max-height: 560px;
  overflow-y: auto;
}

.loc-tree-loading,
.loc-tree-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.loc-tree-group {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.loc-tree-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bg-light);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}

.loc-tree-header:hover {
  background: #e8edf3;
}

.loc-tree-header--sub {
  background: #fff;
  padding-left: 28px;
  border-top: 1px solid var(--border-color);
}

.loc-tree-header--sub:hover {
  background: #f7f8fa;
}

.loc-tree-chevron {
  font-size: 12px;
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
}

.loc-tree-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
}

.loc-tree-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 4px;
}

.loc-select-all-btn {
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-blue);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
  flex-shrink: 0;
}

.loc-select-all-btn:hover {
  background: var(--navy-blue);
  color: #fff;
  border-color: var(--navy-blue);
}

.loc-select-all-btn.selected {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.loc-tree-children {
  padding: 8px;
  background: #fff;
}

.loc-tree-stor {
  border: 1px solid #eee;
  border-radius: 6px;
  margin-bottom: 6px;
  overflow: hidden;
}

.loc-tree-entity-grid {
  padding: 10px;
  border-top: 1px solid #f0f0f0;
}

/* ─── Location Card Group Tags ───────────────────────────────────────────────── */

.loc-group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.loc-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.loc-tag--fran {
  background: #e8edf8;
  color: #2d4a8a;
}

.loc-tag--stor {
  background: #e8f4ea;
  color: #1a6b2e;
}

/* ─── Organised View Fixes ───────────────────────────────────────────────────── */

.location-tree {
  max-height: 460px;
  overflow-y: auto;
  padding-right: 2px;
}

.loc-tree-group {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #fff;
}

.loc-tree-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bg-light);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
  border: none;
}

.loc-tree-header:hover {
  background: #e4e9f0;
}

.loc-tree-header--sub {
  background: #f9fafb;
  padding-left: 32px;
  border-top: 1px solid #eee;
}

.loc-tree-header--sub:hover {
  background: #f0f2f5;
}

.loc-tree-chevron {
  font-size: 11px;
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
}

.loc-tree-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-blue);
  flex: 1;
}

.loc-tree-count {
  font-size: 11px;
  color: var(--text-muted);
  background: #e8edf8;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 500;
}

.loc-select-all-btn {
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy-blue);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
  flex-shrink: 0;
}

.loc-select-all-btn:hover {
  background: var(--navy-blue);
  color: #fff;
  border-color: var(--navy-blue);
}

.loc-select-all-btn.selected {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.loc-tree-children {
  padding: 8px;
  background: #fff;
}

.loc-tree-stor {
  border: 1px solid #eee;
  border-radius: 6px;
  margin-bottom: 6px;
  overflow: hidden;
}

.loc-tree-entity-grid {
  padding: 10px;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}

/* ─── Store Selector — Active/Inactive Toggle ────────────────────────────────── */

.store-inactive {
  opacity: 0.55;
}

.store-toggle-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.store-toggle-btn.store-toggle-active {
  border-color: #e07b39;
  color: #e07b39;
}

.store-toggle-btn.store-toggle-active:hover {
  background: #fff0e8;
}

.store-toggle-btn.store-toggle-inactive {
  border-color: #28a745;
  color: #28a745;
}

.store-toggle-btn.store-toggle-inactive:hover {
  background: #e8f5ea;
}

/* ─── Store List Footer (count + clear all) ──────────────────────────────────── */

.store-list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.store-active-count {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-clear-all {
  font-size: 12px;
  font-weight: 600;
  color: #dc3545;
  background: none;
  border: 1px solid #dc3545;
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-clear-all:hover {
  background: #dc3545;
  color: #fff;
}

.btn-deactivate-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-deactivate-all:hover {
  border-color: #aaa;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Active Orders Panel  (shared — catalog + inventory left panel)
   ══════════════════════════════════════════════════════════════════════════ */

.active-orders-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border-top: 3px solid var(--fiserv-orange);
  overflow: hidden;
  margin-bottom: 16px;
}

/* Header row — clickable to collapse */
.aop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.12s;
}
.aop-header:hover { background: var(--bg-light); }

.aop-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-blue);
}
.aop-title svg { color: var(--text-muted); flex-shrink: 0; }

.aop-count {
  background: var(--fiserv-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.6;
}

.aop-chevron { display: flex; align-items: center; color: var(--text-muted); transition: transform 0.18s; }
.aop-chevron-collapsed { transform: rotate(180deg); }

/* Body */
.aop-body {
  max-height: 520px;
  overflow-y: auto;
  padding: 4px 0;
}

.aop-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.aop-spinner {
  width: 12px; height: 12px;
  border: 2px solid var(--border-color);
  border-top-color: var(--fiserv-orange);
  border-radius: 50%;
  animation: aop-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes aop-spin { to { transform: rotate(360deg); } }

.aop-empty {
  padding: 14px 20px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.aop-err { color: #dc3545; }

/* Store group */
.aop-store-group {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  margin-bottom: 2px;
}
.aop-store-group:last-child { border-bottom: none; margin-bottom: 0; }

.aop-store-header {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 8px 20px 4px;
}
.aop-store-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.aop-store-name {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* Order block */
.aop-order {
  padding: 4px 20px 6px;
}

.aop-order-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.aop-order-id {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.aop-status-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.aop-order-date {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Lines */
.aop-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 4px;
}
.aop-line {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: baseline;
  gap: 5px;
  font-size: 11px;
}
.aop-line-sku {
  font-family: monospace;
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}
.aop-line-desc {
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aop-line-qty {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-align: right;
}

/* ── Page-level layout wrappers ─────────────────────────────────────────────
   Both catalog and inventory use a 3-column outer grid:
   [left panel]  [main content]  [right sidebar]
   240px         1fr             340px (catalog only — inventory has no right sidebar)
   ─────────────────────────────────────────────────────────────────────────── */

.page-3col {
  display: grid;
  grid-template-columns: 220px 1fr 340px;
  gap: 24px;
  align-items: start;
}

.page-3col-left  { position: sticky; top: 20px; }
.page-3col-main  { min-width: 0; }
.page-3col-right { position: sticky; top: 20px; }

/* Inventory: no right sidebar — 2-col with left panel */
.page-2col-left {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}
.page-2col-left > .page-2col-left-panel { position: sticky; top: 20px; }
.page-2col-left > .page-2col-left-main  { min-width: 0; }

/* Responsive — collapse side panels below 1100px */
@media (max-width: 1100px) {
  .page-3col {
    grid-template-columns: 1fr 300px;
    grid-template-areas: "main right" "left left";
  }
  .page-3col-left  { grid-area: left; position: static; }
  .page-3col-main  { grid-area: main; }
  .page-3col-right { grid-area: right; }

  .page-2col-left {
    grid-template-columns: 1fr;
  }
  .page-2col-left > .page-2col-left-panel { position: static; }
}

/* ── Fixed inventory orders panel — outside main-content, right edge ── */
.aop-fixed {
  position: fixed;
  top: calc(var(--top-bar-height, 0px) + var(--main-nav-height, 56px) + 20px);
  right: 12px;
  width: 240px;
  z-index: 200;
  margin-bottom: 0;
  max-height: calc(100vh - var(--top-bar-height, 0px) - var(--main-nav-height, 56px) - 40px);
  display: flex;
  flex-direction: column;
}

.aop-fixed .aop-body {
  max-height: none;
  flex: 1;
  overflow-y: auto;
}

@media (max-width: 1200px) {
  .aop-fixed { display: none; }
}