@charset "UTF-8";
/* 00: Runtime CSS variables first */
/* App chrome / layout knobs (runtime CSS variables) */
:root {
  /* Forms */
  --date-input-width: 12rem;
  /* Header */
  --app-header-height: 4rem;
  /* Main Content */
  --main-content-width-when-dock-open: 48vw;
  --main-content-width-when-dock-closed: 100vw;
  /* Sales chrome */
  --sales-menu-width: 20vw;
  /* Dock sizing */
  --dock-transition-duration: 500ms;
  --dock-transition-ease: ease;
  --dock-width-closed: 48vw; /* when menu is CLOSED */
  --dock-width-open: 28vw; /* when menu is OPEN   */
  /* Computed offsets */
  --dock-offset-when-menu-open: calc(-1 * var(--sales-menu-width));
  /* Z-index scale (single source of truth) */
  --z-modal: 1200;
  --z-header: 1100;
  --z-menu: 1002;
  --z-dock: 1001;
}
@media (min-width: 1280px) {
  :root :root {
    --dock-width-closed: 48vw;
  }
}

:root {
  /* Core palette */
  --color-bg: #f4f3ef;
  --color-bg-light: #f7f7f7;
  --color-bg-dark: #d6d4ce;
  --color-text-dark: #2d2d2d;
  --color-text-light: #ffffff;
  --color-text-faint: #646464;
  --color-border: #ddd;
  --color-primary: #4a7c59;
  --color-accent: #d4b47c;
  --color-warning: #ca8a04;
  --color-danger: #b04949;
  --color-danger-light: #e8bebe;
  --color-blue-highlight: #c6e2ff;
  --color-menu-bg: #2d3748;
  --color-menu-bg-light: #718096;
  --color-menu-bg-trans: rgba(45, 55, 72, 0.98);
  /* Inputs */
  --input-bg: #fff;
  --input-border: #ddd;
  --input-focus-border: #4a7c59;
  --input-focus-ring: rgba(74, 124, 89, 0.22);
  /* Buttons (mirror your semantic Sass tokens) */
  --btn-primary-bg: #4a7c59;
  --btn-primary-text: #ffffff;
  --btn-primary-border: #4a7c59;
  --btn-primary-bg-hover: rgb(64.4696969697, 108.0303030303, 77.5378787879);
  --btn-secondary-bg: #fff;
  --btn-secondary-text: #2d2d2d;
  --btn-secondary-border: #ddd;
  --btn-secondary-bg-hover: #f7f7f7;
}

/* 01: Sass design tokens & mixins */
/* 02: Global styles */
.flash {
  position: fixed;
  top: 1rem;
  left: 50%;
  background-color: #d4b47c;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid #4a7c59;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  animation: flashFade 5s ease-out forwards;
}

.notice--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.flash--alert {
  background-color: #b04949;
  color: white;
  padding: 0.75rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  border-left: 4px solid rgb(139.9518072289, 58.0481927711, 58.0481927711);
}

@keyframes flashFade {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  10%, 90% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
table th, table td {
  border: 1px solid #ddd;
  padding: 0.5rem;
  text-align: left;
}
table th.description, table td.description {
  width: 70%;
}
table th {
  background-color: #4a7c59;
  color: #ffffff;
}
.FlashedRow {
  animation: flashRowHighlight 1.5s ease-out;
}

@keyframes flashRowHighlight {
  0% {
    background-color: #c6e2ff;
  }
  100% {
    background-color: transparent;
  }
}
.field_with_errors input,
.field_with_errors select,
.field_with_errors textarea {
  border-color: #b04949;
  background-color: #e8bebe;
}

.field_with_errors input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(176, 73, 73, 0.2);
}

.FieldErrorMessage {
  color: #b04949;
  font-size: 0.9em;
  margin-top: 0.25rem;
}

/* ============================================
   ROW & COLUMN HIGHLIGHTING
   ============================================ */
/* CSS Variables */
.HighlightRows,
.HighlightColumns {
  --row-highlight-color: #fff3cd;
  --col-highlight-color: rgba(173, 216, 230, 0.3);
  --cell-highlight-color: #ffc107;
}

/* Row Highlighting */
.HighlightRows tbody tr:hover td:not(.NoHighlight),
.HighlightRows tbody tr:hover th:not(.NoHighlight) {
  background-color: var(--row-highlight-color) !important;
  cursor: pointer;
}

/* Column Highlighting */
.HighlightColumns td:not(.NoHighlight):hover::after,
.HighlightColumns th:not(.NoHighlight):hover::after {
  content: "";
  position: absolute;
  top: -5000px;
  left: 0;
  width: 100%;
  height: 10000px;
  background-color: var(--col-highlight-color);
  pointer-events: none;
  z-index: -1;
}

.HighlightColumns td:not(.NoHighlight),
.HighlightColumns th:not(.NoHighlight) {
  position: relative;
}

/* Cell Intersection (Both Row & Column) */
.HighlightRows.HighlightColumns tbody tr:hover td:not(.NoHighlight):hover {
  background-color: var(--cell-highlight-color) !important;
}

/* Locked Row Highlighting */
.HighlightRows tbody tr.LockedRow td:not(.NoHighlight),
.HighlightRows tbody tr.LockedRow th:not(.NoHighlight) {
  background-color: var(--row-highlight-color) !important;
}

.HighlightRows tbody tr.LockedRow {
  outline: 2px solid #ffc107;
  outline-offset: -1px;
}

label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}

input, select, textarea {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #2d2d2d;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: #4a7c59;
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.22);
}

/* Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

input[type=color] {
  width: 2rem;
  height: 2rem;
  padding: 0.2rem;
}

/* Primary button baseline (submit + generic buttons) */
input[type=submit], button {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  background-color: #4a7c59;
  color: #ffffff;
  border: 1px solid #4a7c59;
}
input[type=submit]:hover, button:hover {
  background-color: rgb(64.4696969697, 108.0303030303, 77.5378787879);
}

.InputWithSuffix {
  position: relative;
  display: inline-block;
}

.InputWithSuffix input[type=number] {
  padding-right: 3.25em; /* default; JS will tighten this */
}

.InputWithSuffix .Suffix {
  position: absolute;
  right: 0.5rem;
  top: 58%;
  transform: translateY(-50%);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0.7; /* “placeholder-ish” */
  font-variant-numeric: tabular-nums;
}

/* Aliases for semantic button classes you can use anywhere */
.Button {
  background-color: #4a7c59;
  color: #ffffff;
  border: 1px solid #4a7c59;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.Button:hover {
  background-color: rgb(64.4696969697, 108.0303030303, 77.5378787879);
}

.Button--secondary {
  background-color: #fff;
  color: #2d2d2d;
  border: 1px solid #ddd;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
}
.Button--secondary:hover {
  background-color: #f7f7f7;
}

.Button--danger {
  background-color: #b04949;
  color: #ffffff;
  border: 1px solid #b04949;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
}
.Button--danger:hover {
  background-color: rgb(154.3710843373, 64.0289156627, 64.0289156627);
}

.Button:hover, .Button--secondary:hover, .Button--danger:hover {
  text-decoration: none;
}

h1 input[type=submit], h1 button {
  min-height: 3em;
}

.FilterForm {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 1rem;
}
.FilterForm input, .FilterForm select {
  flex: 1 1 140px;
  max-width: 200px;
  padding: 0.3rem;
  font-size: 0.9rem;
}
.FilterForm button {
  padding: 0.3rem 0.75rem;
  font-size: 0.9rem;
  white-space: nowrap;
  background-color: #333;
  color: #ffffff;
  border: 1px solid #333;
  border-radius: 6px;
}
.FilterForm button:hover {
  background-color: rgb(30.6, 30.6, 30.6);
}
.FilterForm .DateSelect {
  max-width: 120px;
}

.FormCompact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* was -1.5rem; negative gaps can be glitchy */
}
.FormCompact fieldset {
  border: none;
  padding: 0;
}
.FormCompact fieldset legend {
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.FormCompact fieldset div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.FormCompact fieldset div input {
  flex: 1 1 150px;
  padding: 0.5rem;
  font-size: 0.95rem;
}
.FormCompact .CheckboxGroup {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}
.FormCompact .CheckboxGroup label {
  text-align: center;
  line-height: 1.1rem;
}
.FormCompact .CheckboxGroup.Vertical {
  flex-direction: column;
  gap: 0.5rem;
  justify-content: flex-start;
}
.FormCompact .SubmitRow {
  display: flex;
  justify-content: flex-end;
}

.InlineForm {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Inline row for fields that should share a line (e.g., Customer + Wanted date) */
.FormRow {
  display: flex;
  align-items: end; /* aligns inputs along their bottoms */
  gap: 0.75rem;
  flex-wrap: wrap; /* wrap on small screens */
}

/* Default field flex behavior inside a FormRow */
.FormRow > .Field {
  flex: 1 1 220px; /* grow, shrink, reasonable min */
}

/* Narrow date field */
.Field--date {
  flex: 0 0 var(--date-input-width, 12rem); /* fixed basis, no grow */
  max-width: 100%;
}

/* You can also tag the input directly if you prefer */
.Input--date {
  inline-size: var(--date-input-width, 12rem);
  max-width: 100%;
}

/* Small nicety: date digits align better */
input[type=date] {
  font-variant-numeric: tabular-nums;
}

/* Keep the remote user picker dropdown positioned correctly */
.RemoteUserPicker {
  position: relative;
}

.RemoteUserPicker .DropdownResults {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1100;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-height: 240px;
  overflow: auto;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.ErrorSummary {
  border: 1px solid #b04949;
  background: #e8bebe;
  color: #2d2d2d;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.ErrorSummary h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.ErrorSummary li {
  margin-left: 1rem;
}

.ErrorMessage {
  margin-top: 0.25rem;
  font-size: 12px;
  color: #b04949;
}

/* Segmented group (row 1) */
.SegmentGroup {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 9999px; /* rounded ends */
  overflow: hidden; /* hide child corners */
  background: var(--bg-color, #fff);
}

/* Each segment looks like a button, touches neighbors */
.SegmentButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  text-decoration: none;
  border: 0;
  background: transparent;
  color: var(--color-text-dark);
  line-height: 1.2;
  white-space: nowrap;
}

/* faint separators between segments */
.SegmentGroup > .SegmentButton + .SegmentButton {
  border-radius: 0px;
  border-left: 1px solid color-mix(in srgb, var(--color-border, #ddd) 70%, transparent);
}

/* hover / focus */
.SegmentButton:hover,
.SegmentButton:focus {
  background: color-mix(in srgb, var(--color-border, #ddd) 15%, transparent);
  outline: none;
}

/* active (already stamped) */
.SegmentButton.is-active {
  background: color-mix(in srgb, var(--color-border, #ddd) 25%, transparent);
  font-weight: 600;
}

/* disabled look (for helper’s span fallback or disabled links) */
.SegmentButton.is-disabled,
.Button.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.Button--pill {
  border-radius: 9999px;
}

.Button--sm {
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
}

/* 03: Components */
:root {
  --app-header-height: 4rem;
}

#Navbar {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--app-header-height);
  width: 100%;
  background: #2d3748;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}
#Navbar.DemoMode {
  border-bottom: 4px solid var(--color-warning);
}

.NavbarLeft,
.NavbarCenter,
.NavbarRight {
  display: flex;
}

#NavbarTitle {
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.DemoText {
  color: var(--color-warning);
  font-weight: normal;
}

#NavbarProfileLink {
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  color: inherit;
}
#NavbarProfileLink a:hover {
  text-decoration: none;
}
#NavbarProfileLink:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

#LeftMenuToggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  margin-right: 1rem;
  cursor: pointer;
  color: #4a7c59;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

#LeftMenu {
  font-size: 1.2rem;
  width: 200px;
  position: fixed;
  top: 0;
  left: -250px;
  transition: left 0.3s ease;
  height: 100%;
  background: rgba(45, 55, 72, 0.98);
  color: white;
  z-index: 1003;
  padding-top: 4rem;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}
#LeftMenu.open {
  left: 0;
}
#LeftMenu ul {
  list-style: none;
  padding: 0;
}
#LeftMenu ul li {
  padding: 0.8rem 1rem;
}
#LeftMenu a {
  color: white;
}

.HeaderButton {
  height: 34px;
  background: #2d3748;
  color: #ffffff;
  border: 1px solid rgba(64.6153846154, 78.9743589744, 103.3846153846, 0.98);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
}
.HeaderButton:hover {
  background: rgba(54.8076923077, 66.9871794872, 87.6923076923, 0.98);
  border-color: rgb(156.979757085, 167.3340080972, 182.520242915);
}
.HeaderButton:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

.HeaderRecentSales {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.LoginPage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: #f4f3ef;
  font-family: sans-serif;
}

.LoginBox {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  box-sizing: border-box;
  color: #2d2d2d;
  text-align: center;
}

.LoginTitle {
  font-size: 1.8rem;
  color: #4a7c59;
  margin-bottom: 0.5rem;
}

.LoginSubtitle {
  font-size: 1rem;
  color: #666;
}

.LoginBox label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: #2d2d2d;
}

.LoginBox input[type=email],
.LoginBox input[type=password] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  background-color: #f7f7f7;
  box-sizing: border-box;
  font-size: 1rem;
}

.LoginBox input[type=submit] {
  width: 100%;
  padding: 0.75rem;
  background-color: #4a7c59;
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}
.LoginBox input[type=submit]:hover {
  background-color: rgb(64.4696969697, 108.0303030303, 77.5378787879);
}

.FormGroup {
  margin-bottom: 1rem;
  text-align: left;
}
.FormGroup label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.25rem;
}
.FormGroup input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.HeaderFilterFlexContainer {
  display: flex;
  align-items: unset;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.HeaderFilterFlexContainer select {
  background-color: #f4f3ef;
  color: #4a7c59;
  font-size: 1.6rem;
  padding: 0.25rem;
}

.HeaderFilterYearLabel {
  font-weight: 500;
  white-space: nowrap;
}

.HeaderFilterYearSelect {
  min-width: 10rem;
  max-width: 11rem;
}

.HeaderFilterStockTypeSelect {
  min-width: 16rem;
  max-width: 16rem;
}

.HeaderFilterSpeciesSelect {
  min-width: 26rem;
  max-width: 26rem;
}

.SpeciesTable .SpeciesColumn {
  white-space: nowrap;
}

.LotForm {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  max-width: 100%;
}

.LotField {
  font-size: 0.9rem;
}

.LotInput {
  width: 7rem;
  text-align: right;
}

.LotNotes {
  flex: 1;
  min-width: 6rem;
  resize: vertical;
}

.LotSubmit {
  width: 4rem;
  padding: 0.25rem 0.5rem;
}

.LotsTable tbody > tr:nth-of-type(even) {
  background-color: rgba(0, 0, 0, 0.03);
}

.StockTypeNameInput, .StockTypeIntervalsInput {
  width: 12rem;
}

.StockTypeUnitLabelInput, .StockTypeUnitsPerLabelInput {
  width: 6rem;
}

.StockTypeSubmitButton {
  width: auto;
  padding-inline: 1rem;
}

.StockTypeList {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.25rem;
  list-style: none;
  border-radius: 0.5rem;
  background-color: #d6d4ce;
  cursor: pointer;
}
.StockTypeList li {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Stock Type Category Form */
.InlineForm .StockTypeCategoryStockTypeInput,
.InlineForm .StockTypeCategoryNameInput {
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.InlineForm .StockTypeCategoryStockTypeInput {
  width: 140px;
}

.InlineForm .StockTypeCategoryNameInput {
  width: 180px;
}

.InlineForm .DateRangeGroup {
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

.InlineForm .StockTypeCategoryMonthInput {
  width: 100px;
  margin-right: 0.25rem;
}

.InlineForm .StockTypeCategoryDayInput {
  width: 60px;
  margin-right: 0.25rem;
}

.InlineForm .DateRangeGroup > span {
  margin: 0 0.25rem;
}

.InlineForm .StockTypeCategoryDescriptionInput {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  min-height: 60px;
}

.InlineForm .StockTypeCategorySubmitButton {
  margin-right: 0.5rem;
}

/* Stock Type Category List */
.StockTypeCategoryList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.StockTypeCategoryList li {
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
}

.StockTypeCategoryList .AvailabilityRanges {
  margin-left: auto;
  margin-right: 1rem;
  white-space: nowrap;
}

.StockTypeCategoryList strong {
  font-weight: 600;
}

/* Base shell both lists can share */
.SalesList, .PullListsIndex {
  display: grid;
  gap: 0.5rem;
}

/* The per-row skeleton that both lists can reuse */
.SalesRow, .PullListRow, .SalesMenuListItem {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.SalesRowHeader, .SalesMenuListItem .SalesMenuListItemHeader {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.5rem;
}

.SaleNumber {
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}

.SaleSummary {
  font-weight: 500;
}

.SaleDate {
  opacity: 0.75;
}

.SaleUser {
  font-size: 0.9rem;
  color: rgb(40.5, 40.5, 40.5);
}

.SaleStatus {
  font-size: 0.85rem;
  color: rgb(33.75, 33.75, 33.75);
}

/* Make the top line a single row with the chevron flushed right */
.RowMain, .PullListRow .RowMain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.RowMain span, .PullListRow .RowMain span {
  white-space: nowrap;
}

/* Push the chevron to the far right */
.RowExpand, .PullListRow .RowExpand {
  margin-left: auto;
  border: 0;
  background: transparent;
  padding: 0.25rem;
  line-height: 0;
  cursor: pointer;
  color: inherit;
  transition: transform 0.15s ease;
}

.RowExpand.is-open {
  transform: rotate(180deg);
}

/* Details span full row width beneath */
/* Two-column layout for details */
.SaleRowDetails, .PullListDetails {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 0.6fr);
  gap: 0.75rem 1rem;
  width: 100%;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding-top: 0.5rem;
}

.SaleRowDetails[hidden], [hidden].PullListDetails {
  display: none !important;
}

/* Collapse to single column on small screens */
@media (max-width: 720px) {
  .SaleRowDetails, .PullListDetails {
    grid-template-columns: 1fr;
  }
}
/* Left list: tight, one-line rows with ellipsis */
.SaleItemsTable, .PullListItemsTable {
  margin-top: 0px;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* predictable widths + ellipsis */
  font-size: 0.95em;
}

.SaleItemsTable th, .PullListItemsTable th, .SaleItemsTable td, .PullListItemsTable td {
  padding: 0.2rem 0.4rem;
}

.SaleItemsTable thead th, .PullListItemsTable thead th {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  opacity: 0.7;
}

.SaleItemsTable .num, .PullListItemsTable .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.SaleItemsTable .col-name, .PullListItemsTable .col-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.SaleItemsTable .col-type, .PullListItemsTable .col-type {
  white-space: nowrap;
}

.SaleItemsTable .col-total, .PullListItemsTable .col-total {
  font-weight: 600;
}

/* Optional light row stripes */
.SaleItemsTable tbody tr:nth-child(odd), .PullListItemsTable tbody tr:nth-child(odd) {
  background: rgba(0, 0, 0, 0.02);
}

/* Small screens: hide header, stack key bits on one line with truncation */
@media (max-width: 640px) {
  .SaleItemsTable thead, .PullListItemsTable thead {
    display: none;
  }
  .SaleItemsTable, .PullListItemsTable, .SaleItemsTable tbody, .PullListItemsTable tbody, .SaleItemsTable tr, .PullListItemsTable tr, .SaleItemsTable td, .PullListItemsTable td {
    display: block;
  }
  .SaleItemsTable tr, .PullListItemsTable tr {
    padding: 0.25rem 0;
  }
  .SaleItemsTable .col-name, .PullListItemsTable .col-name {
    margin-bottom: 0.1rem;
  }
  .SaleItemsTable .col-type, .PullListItemsTable .col-type,
  .SaleItemsTable .col-qty,
  .PullListItemsTable .col-qty,
  .SaleItemsTable .col-unit,
  .PullListItemsTable .col-unit,
  .SaleItemsTable .col-total,
  .PullListItemsTable .col-total {
    display: inline-block;
    margin-right: 0.5rem;
  }
}
/* Right side: info at top, totals pinned bottom */
.RowDetailsSide {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.RowDetailsTop {
  text-align: right;
}

.RowDetailsLeft {
  text-align: left;
  display: flex;
  flex-direction: column;
}

/* ===== Variants ===== */
/* Right-side menu variant */
.SalesList--menu {
  background: rgba(45, 55, 72, 0.98);
  color: #ffffff;
}

.SalesList--menu .SalesRow, .SalesList--menu .PullListRow, .SalesList--menu .SalesMenuListItem {
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.SalesList--menu .SaleUser,
.SalesList--menu .SaleStatus {
  color: rgb(178.5, 178.5, 178.5);
}

/* Index page variant (light/neutral) */
.SalesList--index, .PullListsIndex {
  color: #2d2d2d;
}

.SalesList--index .SalesRow, .PullListsIndex .SalesRow, .SalesList--index .PullListRow, .PullListsIndex .PullListRow, .SalesList--index .SalesMenuListItem, .PullListsIndex .SalesMenuListItem {
  border-color: rgba(0, 0, 0, 0.06);
  background-color: var(--color-bg-dark);
}

.SalesList--index .SaleUser, .PullListsIndex .SaleUser,
.SalesList--index .SaleStatus,
.PullListsIndex .SaleStatus {
  color: rgb(31.5, 31.5, 31.5);
}

/* ===== Compatibility layer (so you don't have to rename markup today) ===== */
/* A tiny component you can reuse anywhere */
.ChipGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
}

.Chip {
  --chip-border: rgba(0,0,0,.18);
  --chip-accent: #4b5563;
  --chip-active-bg: color-mix(in srgb, var(--chip-accent) 16%, transparent);
  --chip-focus: color-mix(in srgb, var(--chip-accent) 35%, transparent);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border: 2px solid var(--chip-border);
  border-radius: 9999px;
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.Chip input[type=checkbox],
.Chip input[type=radio] {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: inherit;
}
.Chip span {
  pointer-events: none;
}
.Chip.StockTypeChip {
  border-color: color-mix(in srgb, var(--stock-color) 35%, transparent);
  color: rgb(178.5, 178.5, 178.5);
}
.Chip.StockTypeChip:has(input:checked) {
  color: var(--color-text-light);
  border-color: var(--stock-color);
  background: color-mix(in srgb, var(--stock-color) 16%, transparent);
}
.Chip.StockTypeChip:not(:has(input:checked)) {
  opacity: 0.5;
  background: transparent;
}

.Chip:hover {
  border-color: rgba(0, 0, 0, 0.34);
}

.Chip:has(input:focus-visible) {
  box-shadow: 0 0 0 2px var(--chip-focus);
}

.Chip:has(input:checked) {
  border-color: var(--chip-accent);
  background: var(--chip-active-bg);
  color: #111;
}

#SalesMenu,
#SaleDock {
  top: var(--app-header-height);
  height: calc(100vh - var(--app-header-height));
  position: fixed;
  right: 0;
}

#SalesMenu {
  z-index: var(--z-menu);
  width: var(--sales-menu-width);
  transform: translateX(100%);
  transition: transform var(--dock-transition-duration) var(--dock-transition-ease);
  will-change: transform;
  background: rgba(45, 55, 72, 0.98);
  color: #ffffff;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}
#SalesMenu ul {
  list-style: none;
  padding: 0;
}
#SalesMenu li {
  padding: 1rem;
}
#SalesMenu a {
  color: #ffffff;
}

html.sales-menu-open #SalesMenu {
  transform: translateX(0);
}

.SalesMenuHeader {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.NewSaleButton {
  background-color: #4a7c59;
  color: #ffffff;
  border: 1px solid #4a7c59;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-weight: 700;
}
.NewSaleButton:hover {
  background-color: rgb(64.4696969697, 108.0303030303, 77.5378787879);
}

.FiltersRow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.5rem;
}

/* ensure controls fill their grid cell */
.FiltersRow input,
.FiltersRow select {
  width: 100%;
}

/* Use the Chip component here */
#SalesFilterForm .StockTypeFilters {
  margin-top: 0rem;
  padding: 0.25rem 0.25rem 0.5rem;
}

#SalesFilterForm .StockTypeFilters label.Checkbox {
  margin-top: 0rem;
}

#SalesMenuList {
  padding: 0.5rem;
}
#SalesMenuList.LoadingSpinner, #SalesMenuList.EmptyState {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.5rem;
  font-size: 1.25rem;
  color: #ffffff;
}

/* Legacy names kept; the visuals now come from shared .SalesRow* */
.SalesMenuListItem {
  color: #ffffff;
}

.SalesMenuListItem .SaleUser,
.SalesMenuListItem .SaleStatus {
  color: rgb(178.5, 178.5, 178.5);
}

/* ===== Sale Dock (snaps to menu) ===== */
#SaleDock {
  z-index: var(--z-dock);
  width: var(--dock-width-closed);
  transform: translateX(100%);
  will-change: transform;
  transition: transform var(--dock-transition-duration) var(--dock-transition-ease), width var(--dock-transition-duration) var(--dock-transition-ease);
  background: #fff;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
}

#SaleDock.Open {
  transform: translateX(0);
}

html.sales-menu-open #SaleDock {
  width: var(--dock-width-open);
}

html.sales-menu-open #SaleDock.Open {
  transform: translateX(var(--dock-offset-when-menu-open));
}

/* ===== Header ===== */
#SaleDock .SaleDockHeader {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  gap: 0.5rem;
  background: #fff;
  color: #2d2d2d;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

/* Header grouping */
#SaleDock .SaleDockHeader .Left,
#SaleDock .SaleDockHeader .Right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Prevent long titles from crowding right side */
#SaleDock .SaleDockHeader .Left {
  flex: 1;
  min-width: 0;
}

/* NEW: Wrapper for dynamic header content */
#SaleDock .SaleDockTitleWrapper {
  flex: 1;
  min-width: 0;
}

/* Legacy title (used as fallback) */
#SaleDock .SaleDockHeader .Title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* NEW: Rich header content */
#SaleDock .SaleDockHeaderContent {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

#SaleDock .SaleDockTitle {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#SaleDock .SaleDockMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #818181;
  line-height: 1.2;
}

#SaleDock .MetaItem {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Responsive: stack metadata on narrow docks */
@media (max-width: 400px) {
  #SaleDock .SaleDockMeta {
    flex-direction: column;
    gap: 0.25rem;
  }
}
/* Header buttons */
#SaleDock .SaleDockHeader .CloseButton {
  line-height: 1;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.25rem;
}
#SaleDock .SaleDockHeader .CloseButton:hover {
  background: var(--color-accent);
}

#SaleDock .SaleDockHeader .PrintLink {
  text-decoration: none;
  font-size: 1.25rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
#SaleDock .SaleDockHeader .PrintLink:hover {
  opacity: 1;
}

/* Status badge */
#SaleDock .StatusBadge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid rgb(218.45, 191.25, 143.65);
  background: rgb(227.05, 206.25, 169.85);
  color: #2d2d2d;
}
#SaleDock .StatusBadge.is-confirmed {
  border-color: rgb(108.4545454545, 167.5454545455, 126.1818181818);
  background: rgb(167.0727272727, 202.5272727273, 177.7090909091);
  color: #2d2d2d;
}
#SaleDock .StatusBadge.is-cancelled {
  border-color: rgb(182.3078313253, 79.7421686747, 79.7421686747);
  background: #e8bebe;
  color: #b04949;
}

/* ===== Body wrapper (wraps the turbo-frame) ===== */
#SaleDock .SaleDockBody {
  flex: 1;
  overflow: auto;
  padding: 0.75rem;
  background: #f7f7f7;
  border-left: 1px solid #ddd;
}

/* ===== Form-in-dock ===== */
#SaleDock .SaleForm {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 14px;
  line-height: 1.3;
  color: #2d2d2d;
  background: #fff;
  padding-bottom: 0.5rem;
}

#SaleDock .SaleForm h3 {
  margin: 0.25rem 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6c6c6c;
}

#SaleDock .FormGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 520px) {
  #SaleDock .FormGrid {
    grid-template-columns: 1fr;
  }
}
/* Field styling */
#SaleDock .Field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

#SaleDock .Field > label {
  font-size: 12px;
  font-weight: 600;
  color: #424242;
}

/* Inputs */
#SaleDock .Field input[type=text],
#SaleDock .Field input[type=number],
#SaleDock .Field input[type=date],
#SaleDock .Field select,
#SaleDock .Field textarea {
  border-radius: 8px;
}

#SaleDock select {
  min-height: 36px;
}

#SaleDock input[type=number] {
  text-align: right;
}

/* ===== Remote user search dropdown ===== */
#SaleDock .RemoteUserPicker {
  position: relative;
}

#SaleDock .RemoteUserPicker .DropdownResults {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-height: 240px;
  overflow: auto;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

#SaleDock .RemoteUserPicker .ResultItem {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background-color 0.15s ease;
}
#SaleDock .RemoteUserPicker .ResultItem:last-child {
  border-bottom: none;
}
#SaleDock .RemoteUserPicker .ResultItem:hover {
  background: #f7f7f7;
}

/* NEW: Rich result item structure */
#SaleDock .RemoteUserPicker .ResultItem__primary {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #2d2d2d;
  margin-bottom: 0.25rem;
}
#SaleDock .RemoteUserPicker .ResultItem__primary strong {
  font-weight: 600;
}

#SaleDock .RemoteUserPicker .ResultItem__secondary {
  font-size: 0.85rem;
  line-height: 1.3;
  color: #818181;
}

/* ===== Sale Items list ===== */
#SaleDock .SaleItems {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Row layout */
#SaleDock .SaleItemRow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
  border-image: repeating-linear-gradient(to right, var(--color-bg-dark) 0 20px, transparent 20px 40px) 100% 1;
}

#SaleDock .SaleItemRow > .Field {
  flex: 1 1 12rem;
  min-width: 4rem;
  max-width: 12rem;
}

/* Screen reader only labels */
.sr-only, #SaleDock .SaleItemRow .Field > label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

/* Field-specific widths */
#SaleDock .SaleItemRow .SpeciesField {
  min-width: 8rem;
  max-width: 12rem;
}

#SaleDock .SaleItemRow .StockTypeField {
  max-width: 10rem;
}

#SaleDock .SaleItemRow .SizeField {
  max-width: 5rem;
}

/* Price group */
#SaleDock .PriceGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: baseline;
  margin-left: auto; /* right-align cluster */
}

#SaleDock .PriceGroup input {
  width: auto;
  max-width: none;
  text-align: right;
}

#SaleDock .QuantityField input {
  width: 11ch;
}

#SaleDock .UnitPriceField input {
  width: 10ch;
}

#SaleDock .TotalPriceField input {
  width: 10ch;
}

/* Availability chip */
#SaleDock .SaleItemRow .Availability {
  align-self: center;
}

#SaleDock .SaleItemRow .Availability small {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 12px;
  border-radius: 999px;
  background: #c6e2ff;
  color: rgb(68.08, 114.08, 81.88);
  border: 1px solid rgb(143.64, 198.3431578947, 255);
}

/* Row buttons */
#SaleDock .SaleItemRow button[type=button]:not(.IconButton) {
  background-color: #fff;
  color: #2d2d2d;
  border: 1px solid #ddd;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  white-space: nowrap;
}
#SaleDock .SaleItemRow button[type=button]:not(.IconButton):hover {
  background-color: #f7f7f7;
}

/* Destroy state */
.SaleItemRow.marked-for-destroy {
  opacity: 0.55;
  filter: grayscale(0.2);
  pointer-events: none;
}

.SaleItemRow.marked-for-destroy .IconButton {
  pointer-events: auto;
}

/* Add line button */
#SaleDock button[data-action*="sale-form#addItem"] {
  background-color: #fff;
  color: #2d2d2d;
  border: 1px solid #ddd;
  align-self: start;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border-style: dashed;
}
#SaleDock button[data-action*="sale-form#addItem"]:hover {
  background-color: #f7f7f7;
}

/* ===== Errors ===== */
#SaleDock .field_with_errors input,
#SaleDock .field_with_errors select,
#SaleDock .field_with_errors textarea {
  border-color: #b04949;
  box-shadow: 0 0 0 3px rgba(176, 73, 73, 0.15);
}

#SaleDock .ErrorMessage {
  margin-top: 0.25rem;
  font-size: 12px;
  color: #b04949;
}

/* ===== Footer summary + actions ===== */
.SalesFormFooter {
  position: sticky;
  bottom: 0;
  padding: 0.5rem 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.04), transparent);
  z-index: 2;
}

.SaleTotals {
  margin-left: auto;
  width: fit-content;
  display: inline-flex;
  gap: 1rem;
  align-items: baseline;
  background: var(--bg-color, #fff);
  border: 1px solid var(--color-border, #ddd);
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.Actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.DockActions {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
}

.DockActions .RowBelow {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.DockActions .InlineButtonForm {
  display: inline-flex;
  margin: 0;
}

.SubmitRow {
  display: flex;
  justify-content: flex-end;
}

.received {
  background-color: var(--color-bg-dark);
  color: var(--color-text-faint);
}

.PricingTable {
  width: auto;
  border-collapse: collapse;
  font-size: 1rem;
  table-layout: auto;
  margin: 1rem 0;
}

.PricingTable th {
  text-align: center;
}

.PricingTable td {
  text-align: right;
}

.PricingTable th,
.PricingTable td {
  width: 6rem;
  border: 1px solid #ccc;
  padding: 0.25rem 0.4rem;
}

.PricingTable.TableWithSuffixCells th,
.PricingTable.TableWithSuffixCells td {
  width: 8rem;
}

.PricingTable td:first-child,
.PricingTable th:first-child {
  text-align: left;
  white-space: nowrap;
  padding-right: 0.5rem;
}

.PricingInput {
  width: 100%;
  max-width: 6rem;
  font-size: 1rem;
  padding: 0.1rem 0.2rem;
  text-align: right;
  box-sizing: border-box;
}

.PricingTable.TableWithSuffixCells .PricingInput {
  max-width: 8rem;
}

.PricingTable tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.03);
}

/* ---------- Wrapper ---------- */
#SalePrint {
  margin-left: auto; /* centered by default */
  margin-right: auto;
  color: var(--color-text-dark, #111);
  background: var(--color-bg, #fff);
}

@media print {
  html, body.PrintPage {
    background: #fff !important;
  }
  .Surface, .Page {
    background: #fff !important;
  }
}
@media screen {
  #SalePrint {
    max-width: 8.5in;
    margin-inline: auto;
    padding: 0 0.5in; /* visual gutter on screen */
  }
}
/* Hide setup controls on print */
@media print {
  @page {
    size: Letter portrait;
    margin: 0.5in;
  }
  .no-print {
    display: none !important;
  }
  #SalePrint {
    max-width: none;
    padding: 0;
  }
}
.PrintLayoutControls select {
  max-width: 10rem;
}
.PrintLayoutControls .PrintLink, .PrintLayoutControls .CreatePullListLink {
  padding: 0.35rem 0.65rem;
}

/* ---------- Header (3-column grid) ---------- */
.PrintHeader {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr; /* Logo : Account : Customer */
  gap: 0.75rem 1rem;
  align-items: start;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border, #ddd);
  background: var(--color-bg, transparent);
}

.PrintHeader .Col {
  min-width: 0;
}
.PrintHeader .Col.CustomerCol {
  text-align: right;
}

@media print {
  .PrintHeader {
    max-height: 2.75in;
    overflow: hidden;
  }
}
/* ---------- Logo ---------- */
.LogoImg {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 1.75in;
  object-fit: contain;
}

/* ---------- Account block ---------- */
.AccountName {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: var(--color-text-dark, #111);
}

.AccountContact {
  font-size: 0.95rem;
  line-height: 1.25rem;
  color: var(--color-text-dark, #111);
}

.AccountContact br {
  line-height: 1.25rem;
}

/* ---------- Customer block ---------- */
.LayoutTitle {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: var(--color-primary);
}

.SaleMeta {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: end;
}
.SaleMeta .MetaCol {
  flex-grow: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.SaleMeta .Label {
  font-weight: 600;
  line-height: 1.2;
  background: var(--color-bg-dark);
}
.SaleMeta .Value {
  font-size: 0.95rem;
}

.CustomerName {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: var(--color-text-dark, #111);
}

.CustomerContact {
  font-size: 0.95rem;
  line-height: 1.25rem;
}

/* ---------- Table ---------- */
.SaleItems {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  page-break-inside: auto;
  font-size: 0.95rem;
  background: var(--color-bg, #fff);
  color: var(--color-text-dark, #111);
}

.SaleItems th,
.SaleItems td {
  border: 1px solid var(--color-border, #ccc);
  padding: 0.35rem 0.4rem;
  vertical-align: top;
}

.SaleItems thead th {
  background: var(--color-bg-dark);
  color: var(--color-text-dark, #111);
}

.IncludeCol {
  width: 1.25rem;
  text-align: center;
}

/* ---------- Totals & disclaimer ---------- */
#receiptExtras {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: var(--color-text-dark, #111);
}

#receiptExtras .Disclaimer {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ---------- Pack-only ---------- */
.pack-only.Hidden {
  display: none;
}

/* ---------- Print niceties ---------- */
@media print {
  input[type=checkbox] {
    appearance: none;
    width: 0;
    height: 0;
    border: 0;
    margin: 0;
    padding: 0;
  }
  .SaleItems thead {
    display: table-header-group;
  }
  .SaleItems tr {
    page-break-inside: avoid;
  }
  .SaleItems th, .SaleItems td {
    padding: 0.25rem 0.3rem;
  }
}
.SignatureContainer {
  line-height: 4rem;
  font-size: 1.5rem;
}

/* ---------- Sale Notes ---------- */
.SaleReceiptThankYouMessage {
  font-weight: bold;
}

/* Pull List variants */
.PullListsList--print {
  background: transparent;
}

/* Pull list specific elements */
.WantedAt {
  font-weight: 500;
  color: rgb(38.25, 38.25, 38.25);
}

.PulledStatus {
  color: #22c55e;
  font-size: 0.9em;
}

.NotPulledStatus {
  color: var(--color-warning);
  font-size: 0.9em;
}

.UnpullButton {
  background-color: var(--color-warning);
  opacity: 0.8;
}

.UnpullButton:hover {
  background-color: var(--color-warning);
  opacity: 1;
}

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

body {
  font-family: system-ui, sans-serif;
  background-color: #f4f3ef;
  color: #2d2d2d;
  padding: 1rem;
  line-height: 1.5;
}

section {
  margin-top: 1rem;
}

fieldset {
  padding: 1rem;
}

a {
  color: #4a7c59;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  color: #4a7c59;
  margin-bottom: 0.5rem;
}

hr.dotted {
  border-top: 2px dotted var(--color-border);
}

hr.dashed {
  border: 0;
  border-top: 2px solid transparent;
  border-image: repeating-linear-gradient(to right, var(--color-border) 0 20px, transparent 20px 40px) 100% 1;
}

hr.dashed.light {
  border: 0;
  border-top: 2px solid transparent;
  border-image: repeating-linear-gradient(to right, var(--color-bg-light) 0 20px, transparent 20px 40px) 100% 1;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.BoxContainer {
  background-color: #f4f3ef;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  color: #2d2d2d;
  margin-bottom: 2rem;
  max-width: 800px;
}
.BoxContainer.Accent {
  background-color: #d4b47c;
  color: #2d2d2d;
}
.BoxContainer.Primary {
  background-color: #4a7c59;
  color: #ffffff;
}
.BoxContainer.Small {
  padding: 0.1rem 0.6rem;
  margin-bottom: 0.1rem;
}
.BoxContainer.HoverGlow:hover {
  border: 1px solid #ffffff;
}

.BoxContainer.Light {
  background-color: #718096;
}

.BoxContainer.Dark {
  background-color: #d6d4ce;
}

#main-content {
  margin: 4rem 1rem 0 1rem;
  max-width: var(--main-content-width-when-dock-closed);
  transition: max-width var(--dock-transition-duration) var(--dock-transition-ease), margin-left var(--dock-transition-duration) var(--dock-transition-ease), margin-right var(--dock-transition-duration) var(--dock-transition-ease);
  will-change: max-width, margin-left, margin-right; /* hint for smoother anims */
}

html.sale-dock-open #main-content.UserSignedIn {
  max-width: var(--main-content-width-when-dock-open);
  margin-left: 0.5rem;
  margin-right: auto;
  overflow: auto;
}

/* kill transitions while we hydrate */
html.no-transition #main-content,
html.no-transition #SaleDock {
  transition: none !important;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  #main-content, #SaleDock {
    transition: none !important;
  }
}
/* Print: lock the layout, no animations */
@media print {
  #main-content {
    max-width: var(--main-content-width-when-dock-open);
    margin-left: 0.5rem;
    margin-right: auto;
    transition: none !important;
  }
}
/* Small devices (phones) */
/* Medium devices (tablets) */
/* Large devices (desktops) */
@media (min-width: 992px) {
  #main-content {
    margin: 4rem 4rem 0 4rem;
  }
}
.Hidden {
  display: none;
}

.FloatLeft {
  float: left;
}

.FloatRight {
  float: right;
}

.AlignRight {
  text-align: right;
}

.Center {
  text-align: center;
}

.NoWrap {
  white-space: nowrap;
}

.FullWidth {
  width: 100%;
  max-width: 100%;
}

.Pointer {
  cursor: pointer;
}

.bold {
  font-weight: bold;
}

.hint {
  font-size: 0.8rem;
  color: var(--color-text-faint);
}

.LeftBorder {
  border-left: 2px dashed #ccc;
  padding-left: 0.5rem;
}

.NoBorder {
  border: none;
}

.Warning {
  color: var(--color-warning);
}

.Margin {
  margin: 1rem;
}

.MarginSmall {
  margin: 0.5rem;
}

.MarginLarge {
  margin: 2rem;
}

.MarginTop {
  margin-top: 1rem;
}

.MarginTopSmall {
  margin-top: 0.5rem;
}

.MarginTopLarge {
  margin-top: 2rem;
}

.MarginRight {
  margin-right: 1rem;
}

.MarginRightSmall {
  margin-right: 0.5rem;
}

.MarginRightLarge {
  margin-right: 2rem;
}

.MarginBottom {
  margin-bottom: 1rem;
}

.MarginBottomSmall {
  margin-bottom: 0.5rem;
}

.MarginBottomLarge {
  margin-bottom: 2rem;
}

.MarginLeft {
  margin-left: 1rem;
}

.MarginLeftSmall {
  margin-left: 0.5rem;
}

.MarginLeftLarge {
  margin-left: 2rem;
}

.CancelEditButton {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
}
.CancelEditButton:hover {
  opacity: 0.7;
}

.ClickToCopy {
  cursor: pointer;
}

.ClickToCopy:hover {
  opacity: 0.8;
}

.ShowOnParentHover {
  visibility: hidden;
}

.ShowOnParentHoverParent:hover .ShowOnParentHover {
  visibility: visible;
}

.PermissionIcons, .NoteIcon {
  cursor: default;
}

.DeleteButtonForm {
  display: inline;
}

.DeleteButtonIcon {
  background: none;
  border: none;
  padding: 0;
  font-size: 1.2rem;
  color: #b04949;
  cursor: pointer;
  text-decoration: none;
}
.DeleteButtonIcon:hover {
  text-decoration: underline;
  background-color: #b04949;
}

.IconButton {
  position: relative;
  top: -5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  padding: 0rem;
  padding-top: 2px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 18px;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.IconButton--danger {
  background: #fee;
  border-color: #f5c2c7;
  color: #b00020;
}

.IconButton--danger:hover {
  background: #fdd;
}

.IconButton--danger:active {
  transform: translateY(1px);
}

.IconButton--danger:focus-visible {
  outline: 2px solid #b00020;
  outline-offset: 2px;
}

.FlashOnce {
  animation: flash-bg 1.2s ease-in-out;
}

@keyframes flash-bg {
  0% {
    background-color: #fff9c4;
  }
  50% {
    background-color: #fff176;
  }
  100% {
    background-color: transparent;
  }
}
.StagingHint {
  margin-top: 1.25rem;
  text-align: left;
  background: rgb(240.52, 244.52, 241.72);
  border: 1px dashed rgb(162.2, 182.2, 168.2);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
}
.StagingHint p {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: rgb(38.25, 38.25, 38.25);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.StagingHint .EnvBadge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: #4a7c59;
  line-height: 1;
}

.StagingHintList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}
.StagingHintList li {
  display: block;
}
.StagingHintList code {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  background: #f7f7f7;
  color: #2d2d2d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  user-select: all;
  overflow-x: auto;
  white-space: nowrap;
}
.StagingHintList code:hover {
  border-color: rgb(205.7, 205.7, 205.7);
}

.ResultItem {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.15s ease;
}

.ResultItem:hover {
  background-color: #f3f4f6;
}

.ResultItem:last-child {
  border-bottom: none;
}

.ResultItem__primary {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #111827;
  margin-bottom: 0.25rem;
}

.ResultItem__primary strong {
  font-weight: 600;
}

.ResultItem__secondary {
  font-size: 0.85rem;
  line-height: 1.3;
  color: #6b7280;
}

/* Optional: Add a subtle highlight on focus for accessibility */
.ResultItem:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
  background-color: #eff6ff;
}
