:root {
  --color-canvas: #f0f2f5;
  --color-surface: #ffffff;
  --color-text: #1c1e21;
  --color-text-muted: #65676b;
  --color-border: #ced0d4;
  --color-border-light: #e4e6eb;
  --color-border-hairline: rgba(0, 0, 0, 0.06);
  --color-table-header-bg: #f5f6f7;
  --color-row-hover: #f0f7ff;
  --color-input-fill: #f0f2f5;

  --color-primary: #1877f2;
  --color-primary-hover: #166fe5;

  --color-secondary-fill: #e4e6eb;
  --color-secondary-hover: #d8dadf;

  --color-focus-ring: rgba(24, 119, 242, 0.45);
  --shadow-focus: 0 0 0 2px var(--color-focus-ring);

  --color-danger: #dc2626;
  --color-danger-hover: #b91c1c;

  /* Brand pink: header .header-brand strip only */
  --accent-pink: #ff0078;
  /* Templates reference var(--color-accent); keep as primary blue, not pink */
  --color-accent: var(--color-primary);

  /* Dark tool overlays (add product, quote picker) — Option A */
  --color-tool-bg: #242526;
  --color-tool-bg-elevated: #3a3b3c;
  --color-tool-border: rgba(255, 255, 255, 0.12);
  --color-tool-text: #e4e6eb;
  --color-tool-muted: #b0b3b8;
  --color-tool-input-bg: rgba(0, 0, 0, 0.25);
  --color-tool-accent: #2d88ff;

  --color-bg: var(--color-canvas);
  --radius-input: 4px;
  --radius-button: 4px;
  --radius-card: 4px;
}

* { box-sizing: border-box; }
::selection {
  background: rgba(24, 119, 242, 0.2);
  color: var(--color-text);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
}

.header {
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: none;
  border-bottom: 1px solid var(--color-border-hairline);
}
.header-left { display: flex; align-items: center; gap: 1rem; }
.header-brand {
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
  padding-left: 0.65rem;
}
.header-brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12em;
  bottom: 0.12em;
  width: 3px;
  border-radius: 2px;
  background: var(--accent-pink);
}
.header-logo {
  height: 36px;
  max-height: 36px;
  max-width: 140px;
  width: auto;
  object-fit: contain;
  display: block;
}
.header-user {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.header-user:hover { color: var(--color-primary); }
.header-user:focus { outline: none; }
.header-user:focus-visible {
  border-radius: var(--radius-button);
  box-shadow: var(--shadow-focus);
}
.header-nav { display: flex; align-items: center; gap: 1rem; }
.header-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.header-nav-enquiries-wrap {
  position: relative;
  display: inline-block;
}
.header-nav-enquiries {
  font-weight: 600;
}
.header-nav-enquiries-dot {
  position: absolute;
  top: -3px;
  right: -7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f472b6;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
  pointer-events: none;
}
.header-nav-separator {
  color: var(--color-border);
  user-select: none;
}
.header-nav a:hover { color: var(--color-primary); }
.header-nav a:focus-visible {
  outline: none;
  border-radius: var(--radius-button);
  box-shadow: var(--shadow-focus);
}

.store-select label { margin-right: 0.5rem; color: var(--color-text-muted); }
.store-select select {
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-border-light);
  background: var(--color-input-fill);
  color: var(--color-text);
  font-size: 0.9rem;
}
.store-select select:focus { outline: none; }
.store-select select:focus-visible {
  box-shadow: var(--shadow-focus);
  border-color: transparent;
}

.main { padding: 1.5rem 2rem; width: 100%; }
.page {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px var(--color-border-hairline);
  border: 1px solid var(--color-border-light);
}
.page h1 {
  margin-top: 0;
  color: var(--color-text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-hairline);
  display: block;
}

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}
th {
  background: var(--color-table-header-bg);
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-light);
}
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--color-row-hover); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-button);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--color-primary-hover); color: #fff; }
.btn:focus { outline: none; }
.btn:focus-visible { box-shadow: var(--shadow-focus); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.5rem 1rem;
  background: var(--color-secondary-fill);
  color: var(--color-text);
  border: none;
  border-radius: var(--radius-button);
  transition: background 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.btn-secondary:hover {
  background: var(--color-secondary-hover);
  color: var(--color-text);
}
.btn-secondary:focus { outline: none; }
.btn-secondary:focus-visible { box-shadow: var(--shadow-focus); }

.btn-teal { background: var(--color-primary); color: #fff; }
.btn-teal:hover { background: var(--color-primary-hover); color: #fff; }
.btn-danger { background: var(--color-danger); color: #fff; border: none; }
.btn-danger:hover { background: var(--color-danger-hover); color: #fff; }
.btn-danger:focus { outline: none; }
.btn-danger:focus-visible { box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.45); }

.btn-accent { background: var(--color-primary); color: #fff; border: none; }
.btn-accent:hover { background: var(--color-primary-hover); color: #fff; }
.btn-accent:focus { outline: none; }
.btn-accent:focus-visible { box-shadow: var(--shadow-focus); }

.form-inline { margin-bottom: 1rem; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.form-inline label { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.form-inline input[type="search"],
.form-inline input[type="text"],
.form-inline input[type="email"] {
  min-height: 38px;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-border-light);
  background: var(--color-input-fill);
  font-size: 0.9rem;
  box-sizing: border-box;
  color: var(--color-text);
}
.form-inline input:focus { outline: none; }
.form-inline input:focus-visible { box-shadow: var(--shadow-focus); border-color: transparent; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.25rem; font-weight: 500; color: var(--color-text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-border-light);
  background: var(--color-input-fill);
  font-size: 0.95rem;
  color: var(--color-text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; }
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
  box-shadow: var(--shadow-focus);
  border-color: transparent;
}
.cal-list { margin-top: 1rem; }

/* Draft PO: description + small Save */
.draft-description-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}
.draft-description-bar__label {
  margin: 0;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.draft-description-bar__input {
  flex: 1 1 14rem;
  min-width: 10rem;
  max-width: 28rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.9rem;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-border-light);
  background: var(--color-input-fill);
  color: var(--color-text);
}
.draft-description-bar__input:focus { outline: none; }
.draft-description-bar__input:focus-visible {
  box-shadow: var(--shadow-focus);
  border-color: transparent;
}
.draft-description-bar__save-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: none;
}
.btn-draft-save {
  padding: 0.22rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  min-height: 1.85rem;
  line-height: 1.2;
  background: var(--color-secondary-fill);
  color: var(--color-text-muted);
  border: none;
  border-radius: var(--radius-button);
  cursor: pointer;
}
.btn-draft-save:hover {
  background: var(--color-secondary-hover);
  color: var(--color-text);
}
.btn-draft-save:focus { outline: none; }
.btn-draft-save:focus-visible { box-shadow: var(--shadow-focus); }

/* Draft purchase order toolbar */
.draft-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 1px 2px var(--color-border-hairline);
}
.draft-toolbar__top {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.draft-toolbar__primary {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}
.draft-toolbar__bottom {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 0.85rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border-light);
}
.draft-toolbar__supplier-summary {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--color-text-muted);
}
.draft-toolbar__supplier-summary .draft-supplier-name {
  color: var(--color-text);
}
.draft-toolbar__supplier-key {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 0.35rem;
}
.draft-toolbar__form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: none;
  vertical-align: middle;
}
.draft-toolbar__btn {
  margin: 0;
  white-space: nowrap;
}
/* Dark grey — stands out from light grey toolbar actions */
.btn-draft-order {
  background: #4b5563;
  color: #fff;
  border: none;
}
.btn-draft-order:hover {
  background: #374151;
  color: #fff;
  box-shadow: none;
}
.btn-draft-order:focus { outline: none; }
.btn-draft-order:focus-visible {
  box-shadow: 0 0 0 2px rgba(75, 85, 99, 0.45);
}
.draft-toolbar__order-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.order-menu-wrapper {
  position: relative;
  flex: 0 0 auto;
}
.order-menu-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  padding: 0.75rem 1rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  z-index: 50;
  min-width: 220px;
}
.order-menu-popover__title {
  margin: 0 0 0.6rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
}
.order-menu-popover__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.order-menu-popover__btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}
@media (min-width: 640px) {
  .draft-toolbar__order-wrap .order-menu-popover {
    left: auto;
    right: 0;
  }
}

.draft-field { display: flex; flex-direction: column; gap: 0.35rem; }
.draft-field label { display: block; margin: 0; font-weight: 500; font-size: 0.9rem; color: var(--color-text); }
.draft-field .btn { align-self: flex-start; }
.draft-empty { color: var(--color-text-muted); font-style: italic; }
.draft-supplier-name { font-weight: 600; }
.draft-lines-table { width: 100%; }
.draft-lines-table th {
  text-align: left;
  padding: 0.5rem 0.4rem;
  background: var(--color-table-header-bg);
}
.draft-lines-table td {
  padding: 0.4rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border-light);
}
.draft-lines-table input[type="text"],
.draft-lines-table input[type="number"],
.draft-lines-table select {
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-border-light);
  background: var(--color-input-fill);
  color: var(--color-text);
}
.draft-lines-table input:focus,
.draft-lines-table select:focus { outline: none; }
.draft-lines-table input:focus-visible,
.draft-lines-table select:focus-visible {
  box-shadow: var(--shadow-focus);
  border-color: transparent;
}
.draft-line-update-form { display: contents; }
.modal-supplier-label { margin-bottom: 0.5rem; font-size: 0.95rem; }

/* Modal pop-up / overlay panel */
[x-cloak] { display: none !important; }
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: auto;
}
.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.modal-box {
  position: relative;
  z-index: 10000;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--color-table-header-bg);
  border-bottom: 1px solid var(--color-border-hairline);
}
.modal-header h3 { margin: 0; font-size: 1.1rem; color: var(--color-text); }
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0 0.25rem;
  border-radius: var(--radius-button);
}
.modal-close:hover { color: var(--color-text); }
.modal-close:focus { outline: none; }
.modal-close:focus-visible { box-shadow: var(--shadow-focus); }
.modal-body { padding: 1rem; overflow-y: auto; }
.modal-search-form { margin-bottom: 1rem; }
.modal-search-form-inner { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.modal-search-form-inner label { margin: 0; }
.modal-search-form-inner input[type="search"] {
  padding: 0.5rem 0.75rem;
  min-width: 200px;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-border-light);
  background: var(--color-input-fill);
  color: var(--color-text);
}
.modal-search-form-inner input[type="search"]:focus { outline: none; }
.modal-search-form-inner input[type="search"]:focus-visible {
  box-shadow: var(--shadow-focus);
  border-color: transparent;
}

/* Add product canvas overlay (full-page panel over draft) — dark tool surface, blue accents */
.add-product-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: auto;
}
.add-product-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.add-product-canvas {
  position: relative;
  z-index: 10000;
  background: var(--color-tool-bg);
  border-radius: var(--radius-card);
  width: min(96vw, 1400px);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  border: 1px solid var(--color-tool-border);
}
.add-product-canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--color-tool-bg-elevated);
  border-bottom: 1px solid var(--color-tool-border);
  color: var(--color-tool-text);
}
.add-product-canvas-header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.add-product-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-tool-muted);
  padding: 0 0.25rem;
  border-radius: var(--radius-button);
}
.add-product-close:hover { color: var(--color-tool-accent); }
.add-product-close:focus { outline: none; }
.add-product-close:focus-visible {
  box-shadow: 0 0 0 2px rgba(45, 136, 255, 0.5);
}
.add-product-canvas-body {
  padding: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  color: var(--color-tool-text);
}
.add-product-search { margin-bottom: 1rem; }
.add-product-search form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.add-product-search label { margin: 0; color: var(--color-tool-muted); }
.add-product-search input[type="search"] {
  padding: 0.5rem 0.75rem;
  min-width: 220px;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-tool-border);
  background: var(--color-tool-input-bg);
  color: var(--color-tool-text);
}
.add-product-search input[type="search"]:focus { outline: none; }
.add-product-search input[type="search"]:focus-visible {
  box-shadow: 0 0 0 2px rgba(45, 136, 255, 0.45);
}
.add-product-search select {
  padding: 0.5rem 0.65rem;
  min-width: 10rem;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-tool-border);
  background: var(--color-tool-input-bg);
  color: var(--color-tool-text);
}
.add-product-search select:focus { outline: none; }
.add-product-search select:focus-visible {
  box-shadow: 0 0 0 2px rgba(45, 136, 255, 0.45);
}
.add-product-search select option,
.add-product-table select option {
  background: var(--color-tool-bg);
  color: var(--color-tool-text);
}
.add-product-search .btn {
  background: var(--color-tool-accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-button);
  cursor: pointer;
}
.add-product-search .btn:hover {
  background: #4a9eff;
  color: #fff;
}
.add-product-search .btn:focus { outline: none; }
.add-product-search .btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(45, 136, 255, 0.55);
}
.add-product-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.add-product-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  background: var(--color-tool-input-bg);
  color: var(--color-tool-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--color-tool-border);
}
.add-product-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-tool-border);
}
/* Override global tbody hover (light blue) inside dark add-product overlay */
.add-product-overlay .add-product-table tbody tr:hover {
  background: #353638;
}
.add-product-table .product-name {
  color: var(--color-tool-text);
  white-space: normal;
  overflow-wrap: anywhere;
}
.add-product-table th,
.add-product-table td { white-space: normal; overflow-wrap: anywhere; }
.add-product-table input[type="number"],
.add-product-table input[type="text"],
.add-product-table input[type="search"],
.add-product-table select {
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-tool-border);
  background: var(--color-tool-input-bg);
  color: var(--color-tool-text);
  max-width: 100%;
  box-sizing: border-box;
}
.add-product-table input:focus,
.add-product-table select:focus { outline: none; }
.add-product-table input:focus-visible,
.add-product-table select:focus-visible {
  box-shadow: 0 0 0 2px rgba(45, 136, 255, 0.45);
}
.add-product-table input[type="number"] { width: 5rem; }
.add-product-table .add-product-muted-cell { color: var(--color-tool-muted); font-size: 0.9rem; }
.add-product-row-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.add-product-row-form input[type="number"] { margin: 0; }
.add-product-table .btn-add {
  background: var(--color-tool-accent);
  color: #fff;
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-button);
  cursor: pointer;
  font-size: 0.9rem;
}
.add-product-table .btn-add:hover {
  background: #4a9eff;
  color: #fff;
}
.add-product-table .btn-add:focus { outline: none; }
.add-product-table .btn-add:focus-visible {
  box-shadow: 0 0 0 2px rgba(45, 136, 255, 0.55);
}
.add-product-no-results { color: var(--color-tool-muted); margin: 0.5rem 0; }
.add-product-supplier-note { color: var(--color-tool-muted); margin-bottom: 0.75rem; font-size: 0.9rem; }
.add-product-supplier-note strong { color: var(--color-tool-text); }

/* Quote pickers: full-page uses same dark panel as PO overlay body */
.quote-po-style-picker {
  background: var(--color-tool-bg);
  border-radius: var(--radius-card);
  padding: 1rem;
  margin-top: 0.75rem;
  color: var(--color-tool-text);
  border: 1px solid var(--color-tool-border);
}
.quote-supplier-picker-inner { margin: 0; padding: 0; color: inherit; }

.quote-stock-accordion {
  border: 1px solid var(--color-tool-border);
  border-radius: var(--radius-card);
  background: var(--color-tool-input-bg);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
  color: var(--color-tool-text);
}
.quote-stock-accordion summary { color: var(--color-tool-text); }
.quote-stock-accordion .quote-muted { color: var(--color-tool-muted) !important; }

/* Customers list: profile + quote actions equal width, side by side */
.customers-actions-cell { vertical-align: middle; white-space: nowrap; }
.customers-row-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: stretch;
  min-width: 14rem;
}
.customers-row-actions .btn {
  flex: 1 1 0;
  min-width: 0;
}

.table-wrap { overflow-x: auto; margin: 1rem 0; }
.enquiry-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Draft PO select-supplier: search row aligned with buttons */
.supplier-pick-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.supplier-pick-search__input {
  box-sizing: border-box;
  min-height: 38px;
  height: 38px;
  padding: 0 0.85rem;
  font-size: 0.9rem;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-button);
  min-width: 12rem;
  max-width: 24rem;
  flex: 1 1 14rem;
  background: var(--color-input-fill);
  color: var(--color-text);
}
.supplier-pick-search__input::placeholder {
  color: var(--color-text-muted);
}
.supplier-pick-search__input:focus { outline: none; }
.supplier-pick-search__input:focus-visible {
  box-shadow: var(--shadow-focus);
  border-color: transparent;
}
.supplier-pick-search__submit {
  flex: 0 0 auto;
  min-height: 38px;
}

/* Draft PO supplier picker: tradename, email, select — fits narrow viewports */
.supplier-table.supplier-table--pick {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.supplier-table.supplier-table--pick th,
.supplier-table.supplier-table--pick td {
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}
.supplier-table.supplier-table--pick th {
  background: var(--color-table-header-bg);
}
.supplier-table.supplier-table--pick .supplier-table__email {
  word-break: break-word;
  overflow-wrap: anywhere;
}
.supplier-table.supplier-table--pick .supplier-table__action {
  width: 5.75rem;
  white-space: nowrap;
  text-align: right;
}
.supplier-table.supplier-table--pick .btn-supplier-select {
  min-height: 30px;
  padding: 0.22rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.25;
}

/* Purchase order receipt (post-accept) */
.po-receipt__banner {
  padding: 0.65rem 1rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-card);
  margin: 0.75rem 0;
}
.po-receipt__note {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-card);
}
.po-receipt__intro { max-width: 52rem; color: var(--color-text-muted); font-size: 0.95rem; }
.po-receipt__qr-block {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  display: inline-block;
}
.po-receipt__qr-label { margin: 0 0 0.5rem 0; }
.po-receipt__url { margin: 0.5rem 0 0 0; word-break: break-all; color: var(--color-text-muted); }
.po-receipt__badge { font-size: 0.75rem; font-weight: 600; color: #b45309; }
.po-receipt__muted { color: var(--color-text-muted); font-size: 0.85rem; }
.po-receipt-table { width: 100%; border-collapse: collapse; }
.po-receipt-table th, .po-receipt-table td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: top;
  font-size: 0.9rem;
}
.po-receipt-table th {
  background: var(--color-table-header-bg);
  text-align: left;
}
.po-receipt-table__barcode img { display: block; max-width: 100%; height: auto; }

/* Shared card/box styles for templates */
.quote-card, .profile-card, .invoice-block, .meta-row {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.quote-card:hover, .profile-card:hover {
  border-color: rgba(24, 119, 242, 0.35);
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.08);
}

/* Content links (not nav, not buttons) */
.page a:not(.header-nav a):not(.btn) {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.page a:not(.header-nav a):not(.btn):hover {
  color: var(--color-primary-hover);
  border-bottom-color: rgba(24, 119, 242, 0.45);
}
.page a:not(.header-nav a):not(.btn):focus-visible {
  outline: none;
  border-radius: 2px;
  box-shadow: var(--shadow-focus);
}

/* List bullets */
.page ul:not([class]) li::marker { color: var(--color-primary); }

/* Wizard step active accent glow */
.wizard-step.active { box-shadow: 0 0 0 2px var(--color-focus-ring); }

/* Stock chip accent on first/focus */
.stock-chip:first-of-type { border-color: rgba(24, 119, 242, 0.45); }
.quote-muted, .empty-state { color: var(--color-text-muted); }
.btn-payment-red { background: #b91c1c; color: #fff; border: none; }
.btn-payment-red:hover { background: #991b1b; color: #fff; }
.btn-payment-green { background: #15803d; color: #fff; border: none; }
.btn-payment-green:hover { background: #166534; color: #fff; }
/* Orange = attention / alternate payment — not brand pink */
.btn-payment-orange { background: #ea580c; color: #fff; border: none; }
.btn-payment-orange:hover { background: #c2410c; color: #fff; }
.btn-payment-red:focus,
.btn-payment-green:focus,
.btn-payment-orange:focus { outline: none; }
.btn-payment-red:focus-visible {
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.45);
}
.btn-payment-green:focus-visible {
  box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.45);
}
.btn-payment-orange:focus-visible {
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.45);
}

/* Scrollbar accent (webkit) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb {
  background: rgba(24, 119, 242, 0.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(24, 119, 242, 0.55); }
