:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #64707d;
  --line: #d9ded8;
  --green: #0f7a54;
  --green-dark: #095f43;
  --yellow: #f3b333;
  --red: #b33a3a;
  --blue: #2364aa;
  --shadow: 0 14px 30px rgba(34, 45, 57, 0.1);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #10241d;
  color: #f8fbf7;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
}

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

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  padding: 4px;
}

.brand h1 {
  font-size: 18px;
  margin: 0;
  letter-spacing: 0;
}

.brand span {
  color: #a8b9b0;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.nav a,
.nav-group-button,
.preview-button {
  text-align: left;
  color: #dfe8e2;
  background: transparent;
  border-radius: 8px;
  padding: 11px 12px;
  text-decoration: none;
}

.nav a.active,
.nav a:hover,
.nav-group-button.active,
.nav-group-button:hover,
.preview-button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

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

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

.nav-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.75;
}

.nav-group.open .nav-chevron {
  transform: rotate(225deg);
}

.nav-submenu {
  display: grid;
  gap: 4px;
  padding-left: 12px;
}

.nav-submenu a {
  padding-left: 18px;
  font-size: 14px;
}

.preview-button {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-footer .preview-button {
  margin-top: 0;
}

.main {
  min-width: 0;
  padding: 24px;
}

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

.privacy-toggle {
  white-space: nowrap;
}

.user-badge {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  background: #eef3ef;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

.user-badge strong {
  color: var(--ink);
  font-size: 14px;
}

.link-button {
  justify-self: start;
  padding: 0;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  text-decoration: underline;
}

.topbar h2 {
  margin: 0;
  font-size: 26px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

.field,
.select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 12px;
}

.field {
  min-width: 280px;
}

.segmented {
  display: flex;
  background: #e8ece7;
  border-radius: 8px;
  padding: 4px;
}

.segmented button {
  background: transparent;
  border-radius: 6px;
  padding: 7px 11px;
}

.segmented button.active {
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.primary,
.ghost,
.danger {
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary {
  background: var(--green);
  color: white;
}

.primary:hover {
  background: var(--green-dark);
}

.ghost {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.danger {
  background: #fff0f0;
  color: var(--red);
  border: 1px solid #f0c2c2;
}

.basket-button {
  margin-left: auto;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: white;
  box-shadow: 0 8px 18px rgba(15, 122, 84, 0.18);
  z-index: 7;
}

.floating-basket {
  position: fixed;
  right: 22px;
  top: 190px;
}

.basket-button strong {
  min-width: 24px;
  min-height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: white;
  color: var(--green);
  font-size: 13px;
}

.basket-icon {
  font-size: 0;
  width: 20px;
  height: 20px;
  position: relative;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 3px 3px 5px 5px;
}

.basket-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: -7px;
  height: 10px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 28px;
  margin-top: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.product-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(20, 33, 46, 0.04);
  position: relative;
}

.product-media {
  position: relative;
}

.product-card img,
.placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f3f5f2;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.image-edit-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 6px 14px rgba(20, 33, 46, 0.14);
  color: var(--ink);
}

.image-edit-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.image-edit-button span {
  position: absolute;
  left: 11px;
  top: 16px;
  width: 15px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-42deg);
}

.image-edit-button span::before {
  content: "";
  position: absolute;
  right: -4px;
  top: 0;
  border-left: 5px solid currentColor;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
}

.product-body {
  padding: 12px;
}

.product-title {
  min-height: 42px;
  font-weight: 700;
}

.meta-line {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

.price-line {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.price {
  font-size: 22px;
  color: var(--green);
  font-weight: 800;
}

.grid-price-stack {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.grid-price-row {
  display: grid;
  gap: 3px;
}

.grid-price-row > span {
  color: var(--muted);
  font-size: 12px;
}

.base-price-row strong {
  color: var(--ink);
  font-size: 14px;
}

.selling-price-row .inline-price {
  gap: 6px;
}

.selling-price-row .inline-price .field {
  width: 104px;
  min-width: 104px;
  color: var(--green);
  font-size: 20px;
  font-weight: 800;
}

.masked-price {
  color: var(--muted);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  background: #eef4f0;
  color: #245c43;
}

.badge.warn {
  background: #fff3d9;
  color: #7a4c00;
}

.badge.off {
  background: #f3e5e5;
  color: #8b2e2e;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef7f2;
  color: var(--green);
}

.inactive-pill {
  background: #fff0f0;
  color: var(--red);
}

.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap:has(.thumb-preview) {
  overflow: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  background: #f9faf8;
  color: #4d5963;
  font-size: 13px;
  z-index: 1;
}

.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-price {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-price .field {
  width: 96px;
  min-width: 96px;
}

.pack-price-line {
  font-weight: 700;
}

.calculated-field {
  display: grid;
  gap: 6px;
  color: #4d5963;
  font-size: 13px;
}

.calculated-field strong {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #f8faf7;
}

.role-select {
  width: 180px;
  min-width: 160px;
}

.supplier-select {
  min-width: 180px;
}

.management-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 14px;
}

.add-product-modal {
  width: min(820px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.add-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.add-product-grid label {
  display: grid;
  gap: 6px;
  color: #4d5963;
  font-size: 13px;
}

.add-product-grid .field,
.add-product-grid .select {
  min-width: 0;
  width: 100%;
}

.image-upload-field {
  align-self: stretch;
  grid-row: span 2;
}

.add-product-image-preview {
  width: 96px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
}

.add-product-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.add-product-button {
  min-width: 120px;
  justify-self: end;
}

tr.inactive {
  color: #8d969f;
}

.small-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #f3f5f2;
  border-radius: 6px;
}

.thumb-preview {
  position: relative;
  width: 48px;
  height: 48px;
}

.thumb-popover {
  display: none;
  position: absolute;
  left: 58px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 440px;
  height: 440px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.thumb-popover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumb-preview:hover .thumb-popover {
  display: block;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.active-order-header {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.active-order-header div {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

.active-order-header span {
  color: var(--muted);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.section-heading h3 {
  margin: 0;
}

.review-list,
.order-list {
  display: grid;
  gap: 12px;
}

.review-row,
.order-row {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.review-row {
  grid-template-columns: auto 48px 1fr auto;
  min-height: 76px;
  align-items: center;
}

.order-row-details {
  min-width: 0;
}

.order-item-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.order-quantity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #e8f4ef;
  color: var(--green);
  font-weight: 900;
  font-size: 14px;
}

.order-quantity-summary {
  min-width: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  background: #f8faf7;
}

.order-quantity-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.order-quantity-summary strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
}

.review-check {
  display: flex;
  align-items: center;
}

.review-thumb {
  width: 48px;
  height: 48px;
}

.review-info {
  min-width: 0;
}

.review-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.review-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(460px, 100vw);
  background: white;
  box-shadow: -18px 0 40px rgba(20, 33, 46, 0.18);
  padding: 20px;
  z-index: 10;
  overflow: auto;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9;
  background: rgba(20, 33, 46, 0.18);
}

.drawer-backdrop .drawer {
  z-index: 10;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(16, 36, 29, 0.35);
  display: grid;
  place-items: center;
  padding: 18px;
}

.confirm-modal {
  width: min(420px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.confirm-modal h3 {
  margin: 0 0 10px;
}

.confirm-modal p {
  margin: 0;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.cart-drawer {
  width: min(520px, 100vw);
}

.drawer h3 {
  margin: 0 0 14px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: #4d5963;
  font-size: 13px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
}

.status-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8faf7;
}

.status-toggle button {
  min-height: 42px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.status-toggle.is-active button.selected {
  background: var(--green);
  color: white;
}

.status-toggle.is-inactive button.selected {
  background: var(--red);
  color: white;
}

.mini-status-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8faf7;
  min-width: 156px;
}

.mini-status-toggle button {
  min-height: 32px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mini-status-toggle.is-active button.selected {
  background: var(--green);
  color: white;
}

.mini-status-toggle.is-inactive button.selected {
  background: var(--red);
  color: white;
}

.cart-category {
  margin-top: 18px;
}

.qty {
  display: inline-grid;
  grid-template-columns: 34px 58px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.qty button,
.qty input {
  border: 0;
  min-height: 34px;
  text-align: center;
  background: white;
}

.qty button {
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 14px;
}

.auth-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
}

.auth-card h1,
.auth-card p {
  margin: 0;
}

.auth-card label {
  display: grid;
  gap: 6px;
}

.password-field {
  position: relative;
}

.password-field .field {
  width: 100%;
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.password-toggle:hover {
  background: #eef3ef;
  color: var(--ink);
}

.password-toggle span {
  position: absolute;
  left: 8px;
  top: 11px;
  width: 18px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.password-toggle span::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.auth-divider {
  color: var(--muted);
  font-size: 14px;
}

.success-text {
  color: var(--green);
  margin: 0;
}

.error-text {
  color: var(--red);
  margin: 0;
}

.user-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: center;
}

.supplier-form {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  gap: 10px;
  align-items: center;
}

.supplier-name-field {
  min-width: min(360px, 100%);
}

.mini-cart {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mini-order-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.mini-order-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-qty {
  grid-template-columns: 30px 46px 30px;
}

.trash-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #f0c2c2;
  background: #fff0f0;
  color: var(--red);
  font-size: 0;
  position: relative;
}

.trash-button::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 12px;
  width: 10px;
  height: 12px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.trash-button::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 14px;
  height: 2px;
  background: currentColor;
  box-shadow: 4px -3px 0 -1px currentColor;
}

.product-stepper {
  grid-template-columns: 38px 58px 38px;
}

.table-stepper {
  grid-template-columns: 34px 54px 34px;
}

.totals {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.totals.compact {
  justify-content: stretch;
}

.totals.compact .total-box {
  min-width: 0;
  flex: 1;
}

.total-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 190px;
}

.total-box span {
  color: var(--muted);
  font-size: 13px;
}

.total-box strong {
  display: block;
  font-size: 24px;
  margin-top: 4px;
}

.margin-box {
  background: #fff5d8;
  border-color: #e7b84c;
  box-shadow: 0 8px 18px rgba(174, 122, 20, 0.14);
}

.margin-box span {
  color: #7a5200;
  font-weight: 700;
}

.margin-box strong {
  color: #0f7a54;
}

.customer {
  min-height: 100vh;
}

.print-header {
  display: none;
}

.supplier-print-total {
  display: none;
}

.customer-header {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 2;
}

.customer-header img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.customer-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-title h1 {
  margin: 0;
  font-size: 24px;
}

.customer-main {
  padding: 24px;
}

.customer-category-bar {
  margin-bottom: 22px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.category-tabs button {
  min-height: 38px;
  white-space: nowrap;
  border-radius: 8px;
  padding: 0 14px;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.category-tabs button.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.category-select {
  display: none;
  width: 100%;
}

.category-band {
  margin: 26px 0 10px;
}

.category-band h2 {
  margin: 0;
  font-size: 22px;
}

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

  .sidebar {
    position: static;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .topbar,
  .customer-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .field {
    min-width: 100%;
  }

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

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

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

  .add-product-image-preview {
    width: 100%;
    max-width: 180px;
  }

  .category-tabs {
    display: none;
  }

  .category-select {
    display: block;
  }

  .basket-button {
    min-height: 52px;
  }

  .qty {
    grid-template-columns: 44px 64px 44px;
  }

  .compact-qty {
    grid-template-columns: 42px 58px 42px;
  }

  .qty button,
  .qty input {
    min-height: 42px;
  }

  .order-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .order-row .qty,
  .order-quantity-summary {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .floating-basket {
    right: 14px;
    top: auto;
    bottom: 14px;
    z-index: 8;
  }

  .order-actions {
    position: sticky;
    top: 0;
    z-index: 5;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    box-shadow: var(--shadow);
  }

  .order-actions .ghost,
  .order-actions .primary {
    flex: 1 1 100%;
  }
}

@media print {
  body {
    background: white;
  }

  .app-shell {
    display: block;
  }

  .sidebar,
  .topbar,
  .drawer,
  .drawer-backdrop,
  .preview-button,
  [data-action="back-to-catalog"],
  [data-action="new-cart"],
  [data-action="print-unite"],
  [data-action="print-supplier"],
  [data-action="sent"] {
    display: none !important;
  }

  .main {
    padding: 0;
  }

  .panel {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .order-row {
    break-inside: avoid;
  }

  .qty {
    border: 0;
    display: block;
  }

  .qty button {
    display: none;
  }

  .qty input {
    border: 0;
    font-weight: 800;
  }

  .print-header {
    display: block;
    margin-bottom: 20px;
    border-bottom: 2px solid #1f2933;
    padding-bottom: 10px;
  }

  .print-header h1 {
    margin: 0;
    font-size: 24px;
  }

  .print-header p {
    margin: 6px 0 0;
    color: #4d5963;
  }

  body.print-unite [data-print-title]::before {
    content: "Unite PDF - Internal Order Review";
  }

  body.print-supplier [data-print-title]::before {
    content: "Supplier PDF - Purchase Order";
  }

  body.print-unite [data-print-title],
  body.print-supplier [data-print-title] {
    font-size: 0;
  }

  body.print-unite [data-print-title]::before,
  body.print-supplier [data-print-title]::before {
    font-size: 24px;
  }

  body.print-supplier .totals,
  body.print-supplier .selling-line,
  body.print-supplier .order-row .small-img {
    display: none !important;
  }

  body.print-supplier .supplier-print-total {
    display: block;
    margin-top: 18px;
    border: 2px solid #1f2933;
    padding: 14px 16px;
    break-inside: avoid;
  }

  body.print-supplier .supplier-print-total span {
    display: block;
    color: #4d5963;
    font-size: 13px;
  }

  body.print-supplier .supplier-print-total strong {
    display: block;
    margin-top: 5px;
    font-size: 26px;
  }
}
