/* =======================================================
   HSD Quick Entry
   One active component: overlay, order workspace, and responsive states.
   ======================================================= */

.quick-tools-slider {
  --qe-accent: #079bd3;
  --qe-accent-dark: #006f9f;
  --qe-navy: #063f5b;
  --qe-navy-deep: #04334c;
  --qe-red: #cb1523;
  --qe-gold: #f8b318;
  --qe-ink: #12384e;
  --qe-muted: #728596;
  --qe-line: #d9e5ec;
  --qe-soft: #f4f7f9;
  --qe-white: #fff;
  --qe-header-offset: var(--dsn-quickentry-nav-offset, 0px);
  --qe-trust-height: 76px;
  --qe-motion: 420ms cubic-bezier(.22, 1, .36, 1);
  position: fixed;
  inset: 0;
  z-index: 9980;
  pointer-events: none;
  font-family: "Manrope", Arial, sans-serif;
  color: var(--qe-ink);
}

.quick-tools-slider,
.quick-tools-slider * {
  box-sizing: border-box;
}

.quick-tools-slider .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.quick-tools-slider.is-hidden {
  display: none;
}

.quick-tools-detail {
  position: fixed;
  top: var(--qe-header-offset);
  right: 0;
  left: 0;
  height: var(--quick-tools-detail-open-height, calc(100dvh - var(--qe-header-offset)));
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, -104%, 0);
  transition:
    transform var(--qe-motion),
    opacity 100ms ease 320ms,
    visibility 0s linear 420ms;
}

.quick-tools-slider.has-detail .quick-tools-detail {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition:
    transform var(--qe-motion),
    opacity 120ms ease,
    visibility 0s linear;
}

.quick-tools-slider.is-closing .quick-tools-detail {
  visibility: visible;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, -104%, 0);
  transition:
    transform var(--qe-motion),
    opacity 100ms ease 320ms;
}

.quick-tool-panel,
.qo-redesign-frame,
.qo-redesign-stage {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.quick-tool-panel[hidden],
.quick-tools-slider [hidden] {
  display: none;
}

.qo-redesign-frame {
  position: relative;
  overflow: hidden;
  background-color: var(--qe-soft);
  background-image:
    linear-gradient(135deg, rgba(172, 36, 30, .035), transparent 34%),
    repeating-linear-gradient(90deg, rgba(64, 78, 94, .055) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(64, 78, 94, .045) 0 1px, transparent 1px 44px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
}

.qo-redesign-stage {
  position: absolute;
  inset: 0 0 var(--qe-trust-height);
  height: auto;
  padding: 10px clamp(18px, 3vw, 58px);
  overflow: hidden;
}

.qo-pro-shell {
  display: grid;
  grid-template-columns: clamp(240px, 18vw, 278px) minmax(0, 1fr);
  width: 100%;
  max-width: 1428px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(202, 218, 228, .9);
  border-radius: 18px;
  background: var(--qe-white);
  box-shadow: 0 18px 42px rgba(13, 45, 69, .16);
}

/* Sidebar ------------------------------------------------ */

.qo-pro-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  color: var(--qe-white);
  background: linear-gradient(180deg, #15566f 0%, var(--qe-navy) 58%, var(--qe-navy-deep) 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .55) transparent;
}

.qo-pro-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.qo-pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 11px;
  background: rgba(255, 255, 255, .1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.quick-tool-panel__close,
.qo-mobile-close {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 11px;
  color: var(--qe-white);
  background: rgba(255, 255, 255, .1);
  font-size: 20px;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.quick-tool-panel__close:hover,
.quick-tool-panel__close:focus-visible {
  background: rgba(255, 255, 255, .2);
  transform: translateY(-1px);
}

.qo-pro-left h2 {
  margin: 0 0 8px;
  color: var(--qe-white);
  font-size: clamp(22px, 1.6vw, 28px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.qo-pro-left > p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1.55;
}

.qo-redesign-workflows {
  display: grid;
  gap: 9px;
}

.qo-redesign-workflow {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  color: var(--qe-white);
  background: rgba(255, 255, 255, .075);
  text-align: left;
  cursor: pointer;
}

.qo-redesign-workflow:hover,
.qo-redesign-workflow:focus-within,
.qo-redesign-workflow.is-active {
  border-color: rgba(23, 207, 244, .75);
  background: rgba(8, 157, 204, .18);
}

.qo-redesign-workflow input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.qo-redesign-workflow__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: var(--qe-white);
  background: linear-gradient(145deg, #12bce5, #028bbf);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .15);
}

.qo-redesign-workflow__text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.qo-redesign-workflow__text strong {
  font-size: 13px;
  line-height: 1.2;
}

.qo-redesign-workflow__text small {
  color: rgba(255, 255, 255, .7);
  font-size: 9px;
  line-height: 1.35;
}

.qo-redesign-workflow__arrow {
  color: rgba(255, 255, 255, .55);
  font-size: 11px;
}

.qo-pro-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.qo-pro-metric {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 52px;
  padding: 7px 3px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 9px;
  background: rgba(255, 255, 255, .1);
  text-align: center;
}

.qo-pro-metric strong {
  color: var(--qe-white);
  font-size: 17px;
  line-height: 1;
}

.qo-pro-metric span {
  margin-top: 5px;
  color: rgba(255, 255, 255, .8);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.qo-pro-image-preview {
  display: grid;
  place-items: center;
  flex: 0 0 184px;
  width: 100%;
  height: 184px;
  min-height: 184px;
  max-height: 184px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 13px;
  color: #24404f;
  background: #fff;
}

.qo-pro-image-preview__empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  gap: 8px;
  padding: 18px;
  text-align: center;
}

.qo-pro-image-preview__empty i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: var(--qe-red);
}

.qo-pro-image-preview.has-image {
  position: relative;
  display: grid;
  grid-template-rows: 138px 46px;
  background: #fff;
}

.qo-pro-image-preview img {
  display: block;
  width: 100%;
  height: 138px;
  object-fit: contain;
  padding: 8px 10px;
}

.qo-pro-image-preview__caption {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  height: 46px;
  padding: 6px 12px;
  border-top: 1px solid var(--qe-line);
  font-size: 10px;
}

.qo-pro-image-preview__caption span {
  overflow: hidden;
  color: var(--qe-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Main workspace ----------------------------------------- */

.qo-pro-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 14px 16px 12px;
  overflow: hidden;
  background: rgba(250, 253, 254, .985);
}

.qo-pro-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 0 2px 10px;
}

.qo-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--qe-accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.qo-eyebrow::before {
  width: 3px;
  height: 22px;
  border-radius: 2px;
  background: var(--qe-accent);
  content: "";
}

.qo-pro-head h2 {
  margin: 1px 0 2px;
  color: var(--qe-ink);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.qo-pro-head p {
  max-width: 780px;
  margin: 0;
  color: var(--qe-muted);
  font-size: 10px;
  line-height: 1.45;
}

.qo-pro-head-actions,
.qo-pro-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.qo-pro-upload,
.qo-pro-btn,
.qo-pro-add-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #d3e1e9;
  border-radius: 9px;
  color: #36586c;
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.qo-pro-upload:hover,
.qo-pro-btn:hover:not(:disabled),
.qo-pro-add-row:hover {
  border-color: #9acfe2;
  color: var(--qe-accent-dark);
  transform: translateY(-1px);
}

.qo-pro-btn--ghost {
  color: #bd2a32;
}

.qo-pro-btn--primary {
  border-color: var(--qe-accent);
  color: #fff;
  background: var(--qe-accent);
}

.qo-pro-btn--primary:hover:not(:disabled) {
  border-color: var(--qe-accent-dark);
  color: #fff;
  background: var(--qe-accent-dark);
}

.qo-pro-btn:disabled {
  border-color: #e4ebef;
  color: #a5b5bf;
  background: #f7f9fa;
  cursor: not-allowed;
}

.qo-mobile-close {
  display: none;
}

.qo-pro-po-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 10px;
  padding: 6px 12px;
  border: 1px solid var(--qe-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(13, 45, 69, .04);
}

.qo-pro-po-toolbar [data-qo-save-state] {
  color: #778492;
  font-size: 11px;
  font-weight: 700;
}

[data-qo-save-state].is-saving {
  color: #9b7400;
}

[data-qo-save-state].is-saved {
  color: #15825c;
}

[data-qo-save-state].is-error {
  color: #bd2a32;
}

.qo-pro-notice {
  flex: 0 0 auto;
  margin-bottom: 9px;
  padding: 10px 13px;
  border: 1px solid #b9dfea;
  border-radius: 10px;
  color: #17617a;
  background: #edf9fc;
  font-size: 11px;
  font-weight: 700;
  opacity: 1;
  transition: opacity 180ms ease;
}

.qo-pro-notice.is-success {
  border-color: #b9dfcd;
  color: #176743;
  background: #effaf4;
}

.qo-pro-notice.is-error {
  border-color: #efc0c4;
  color: #a51f2a;
  background: #fff2f3;
}

.qo-pro-notice.is-working {
  border-color: #ecd98d;
  color: #705a00;
  background: #fffbea;
}

.qo-pro-notice.is-leaving {
  opacity: 0;
}

/* Table and rows ----------------------------------------- */

.qo-pro-table-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 160px;
  overflow: auto;
  border: 1px solid var(--qe-line);
  border-radius: 14px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #b8c9d3 transparent;
}

.qo-pro-table {
  width: 100%;
  min-width: 850px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.qo-pro-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 34px;
  padding: 8px 9px;
  border-bottom: 1px solid #d4e2e9;
  color: #547084;
  background: #eaf3f7;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
}

.qo-pro-table td {
  position: relative;
  height: 58px;
  padding: 7px 9px;
  border-bottom: 1px solid #e7edf1;
  color: #263f4f;
  font-size: 11px;
  vertical-align: middle;
  background: #fff;
}

.qo-pro-table tbody tr:last-child td {
  border-bottom: 0;
}

.qo-pro-table tbody tr:focus-within td {
  background: #fbfdfe;
}

.qo-col-part {
  width: 18%;
}

.qo-col-desc {
  width: 32%;
}

.qo-col-stock {
  width: 17%;
}

.qo-col-qty {
  width: 8%;
}

.qo-col-po {
  width: 13%;
}

.qo-col-price {
  width: 10%;
  text-align: right;
}

.qo-col-remove {
  width: 82px;
  text-align: right;
}

.qo-pro-shell:not(.qo-po-visible) .qo-col-desc {
  width: 36%;
}

.qo-pro-input,
.qo-pro-qty,
.qo-pro-line-po {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  border: 1px solid #cbdde7;
  border-radius: 9px;
  outline: 0;
  color: #233d4c;
  background: #fff;
  font: inherit;
  font-size: 10px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.qo-pro-input,
.qo-pro-line-po {
  padding: 8px 10px;
}

.qo-pro-qty {
  padding: 8px 5px;
  text-align: center;
}

.qo-pro-input:focus,
.qo-pro-qty:focus,
.qo-pro-line-po:focus {
  border-color: var(--qe-accent);
  box-shadow: 0 0 0 3px rgba(7, 155, 211, .12);
}

.qo-pro-input::placeholder,
.qo-pro-line-po::placeholder {
  color: #77818b;
}

.qo-pro-desc {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.qo-pro-desc strong,
.qo-pro-desc span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qo-pro-desc strong {
  font-size: 11px;
}

.qo-pro-muted {
  color: #88939e;
  font-size: 10px;
}

.qo-pro-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.qo-pro-stock--pending {
  color: #647280;
  background: #f0f3f5;
}

.qo-pro-stock--pending i {
  font-size: 7px;
}

.qo-pro-stock--in {
  color: #146844;
  background: #e9f8f0;
}

.qo-pro-stock--out {
  color: #a5222b;
  background: #fff0f1;
}

.qo-pro-price-cell,
.qo-price-head {
  text-align: right;
}

.qo-pro-price {
  color: #173e53;
  font-size: 11px;
  font-weight: 800;
}

.qo-cell-remove {
  white-space: nowrap;
  text-align: right;
}

.qo-pro-preview-btn,
.qo-pro-remove {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: 4px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.qo-pro-preview-btn {
  color: #7db9df;
  background: #f5faff;
}

.qo-pro-preview-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.qo-pro-remove {
  color: var(--qe-red);
  background: #fff0f2;
}

.qo-pro-table tr.qo-row-ready td {
  animation: qeRowReady 520ms ease;
}

.qo-pro-table tr.qo-row-added td {
  animation: qoAddedPulse 760ms ease;
}

@keyframes qeRowReady {
  0% { background: #eaf8fd; }
  100% { background: #fff; }
}

@keyframes qoAddedPulse {
  0%, 100% { background: #fff; }
  40% { background: #e8f8fc; }
}

/* Product suggestions ----------------------------------- */

.qo-pro-table td:first-child {
  z-index: 2;
}

.qo-pro-table tr:focus-within td:first-child {
  z-index: 6;
}

.qo-pro-suggestions {
  position: absolute;
  top: calc(100% - 4px);
  left: 9px;
  z-index: 30;
  width: min(760px, calc(100vw - 90px));
  max-height: 320px;
  overflow: auto;
  border: 1px solid #b8d4e0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(13, 45, 69, .2);
}

.qo-pro-suggestions.is-above {
  top: auto;
  bottom: calc(100% - 4px);
}

.qo-pro-suggestion {
  display: grid;
  grid-template-columns: minmax(90px, .7fr) minmax(180px, 2fr) auto auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e8eef2;
  color: var(--qe-ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.qo-pro-suggestion:last-child {
  border-bottom: 0;
}

.qo-pro-suggestion:hover,
.qo-pro-suggestion:focus-visible {
  outline: 0;
  background: #f1f9fc;
}

.qo-pro-suggestion--empty {
  display: block;
  cursor: default;
}

.qo-pro-sku,
.qo-pro-suggestion-price {
  font-size: 10px;
  font-weight: 800;
}

.qo-pro-suggestion-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.qo-pro-suggestion-title,
.qo-pro-suggestion-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qo-pro-suggestion-title {
  font-size: 10px;
  font-weight: 700;
}

.qo-pro-suggestion-meta {
  color: var(--qe-muted);
  font-size: 9px;
}

/* Footer and trust bar ----------------------------------- */

.qo-pro-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  padding-top: 10px;
}

.qo-pro-add-row {
  border-color: #15252d;
  color: #fff;
  background: #17252d;
  font-size: 13px;
}

.qo-pro-status {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: #6f7d89;
  font-size: 10px;
  font-weight: 700;
}

.qo-pro-status i {
  color: var(--qe-red);
}

.qo-pro-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qo-redesign-trustbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: var(--qe-trust-height);
  border-top: 1px solid #dce7ee;
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 -5px 18px rgba(7, 31, 54, .055);
}

.qo-redesign-trustbar > span {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-content: center;
  min-width: 0;
  padding: 0 clamp(14px, 2vw, 28px);
  border-right: 1px solid #e2e9ed;
}

.qo-redesign-trustbar > span:last-child {
  border-right: 0;
}

.qo-redesign-trustbar i {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--qe-accent);
  font-size: 23px;
}

.qo-redesign-trustbar b {
  align-self: end;
  overflow: hidden;
  color: #17618f;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qo-redesign-trustbar small {
  overflow: hidden;
  color: #718391;
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact desktop ---------------------------------------- */

@media (min-width: 1001px) and (max-height: 800px) {
  .quick-tools-slider {
    --qe-trust-height: 58px;
  }

  .qo-redesign-stage {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .qo-pro-left {
    padding: 14px;
  }

  .qo-pro-left > p {
    margin-bottom: 12px;
    font-size: 10px;
  }

  .qo-redesign-workflow {
    min-height: 56px;
  }

  .qo-pro-main {
    padding-top: 10px;
    padding-bottom: 8px;
  }

  .qo-pro-head p {
    display: none;
  }

  .qo-pro-table td {
    height: 52px;
  }

  .qo-redesign-trustbar,
  .qo-redesign-trustbar > span {
    height: 58px;
  }
}

/* Tablet and mobile shell -------------------------------- */

@media (max-width: 1000px) {
  .quick-tools-slider {
    --qe-trust-height: 0px;
  }

  .quick-tools-detail {
    top: var(--qe-header-offset);
    height: calc(100dvh - var(--qe-header-offset));
  }

  .qo-redesign-stage {
    inset: 0;
    padding: 0;
  }

  .qo-pro-shell {
    display: block;
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .qo-pro-left,
  .qo-redesign-trustbar {
    display: none;
  }

  .qo-pro-main {
    width: 100%;
    height: 100%;
    padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
    background: rgba(250, 253, 254, .99);
  }

  .qo-pro-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding-right: 0;
  }

  .qo-mobile-close {
    display: inline-grid;
    width: 46px;
    height: 46px;
    border-color: #d5e2ea;
    border-radius: 50%;
    color: #0a4164;
    background: #fff;
    box-shadow: 0 7px 18px rgba(13, 45, 69, .1);
  }

  .qo-pro-head-actions {
    align-self: center;
  }

  .qo-pro-upload {
    display: none;
  }

  .qo-pro-table {
    min-width: 760px;
  }
}

/* Compact phone cards ------------------------------------ */

@media (max-width: 560px) {
  .qo-pro-main {
    padding: 16px 14px calc(14px + env(safe-area-inset-bottom));
  }

  .qo-pro-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding: 0 0 12px;
  }

  .qo-pro-head h2 {
    font-size: 30px;
  }

  .qo-pro-head p,
  .qo-pro-head-actions .qo-pro-upload,
  .qo-pro-btn--po {
    display: none;
  }

  .qo-pro-head-actions .qo-pro-btn--ghost {
    min-height: 46px;
    padding: 10px 14px;
    font-size: 12px;
  }

  .qo-pro-po-toolbar {
    justify-content: flex-end;
    min-height: 50px;
    margin-bottom: 14px;
    padding: 10px 14px;
  }

  .qo-pro-po-toolbar [data-qo-save-state] {
    font-size: 13px;
  }

  .qo-pro-notice {
    font-size: 12px;
  }

  .qo-pro-table-wrap {
    min-height: 0;
    overflow-x: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .qo-pro-table,
  .qo-pro-table tbody,
  .qo-pro-table tr,
  .qo-pro-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .qo-pro-table {
    border-collapse: separate;
  }

  .qo-pro-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }

  .qo-pro-table tbody {
    display: grid;
    gap: 14px;
    padding: 2px 0;
  }

  .qo-pro-table tr {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px 50px;
    gap: 10px 12px;
    padding: 18px 12px 14px 18px;
    overflow: visible;
    border: 1px solid #d4e2e9;
    border-left: 5px solid #d74a55;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(13, 45, 69, .05);
  }

  .qo-pro-table td {
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .qo-pro-table td:nth-child(1),
  .qo-pro-table td:nth-child(2) {
    grid-column: 1 / -1;
  }

  .qo-pro-table td:nth-child(3) {
    grid-column: 1;
    align-self: center;
  }

  .qo-pro-table td:nth-child(4) {
    grid-column: 2;
  }

  .qo-pro-table td:nth-child(5) {
    grid-column: 1 / -1;
  }

  .qo-pro-table td:nth-child(6) {
    grid-column: 1;
    align-self: center;
    text-align: left;
  }

  .qo-pro-table td:nth-child(7) {
    position: absolute;
    right: 12px;
    bottom: 14px;
    width: auto;
  }

  .qo-pro-input {
    min-height: 58px;
    padding: 12px;
    font-size: 16px;
  }

  .qo-pro-desc strong {
    font-size: 14px;
  }

  .qo-pro-muted {
    font-size: 13px;
  }

  .qo-pro-stock {
    padding: 8px 10px;
    font-size: 11px;
  }

  .qo-pro-qty {
    min-height: 52px;
    font-size: 13px;
  }

  .qo-pro-price,
  .qo-pro-price-cell .qo-pro-muted {
    font-size: 13px;
  }

  .qo-pro-preview-btn {
    display: none;
  }

  .qo-pro-remove {
    width: 48px;
    height: 48px;
    margin-left: 0;
    font-size: 17px;
  }

  .qo-pro-suggestions {
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    max-height: 260px;
  }

  .qo-pro-suggestion {
    grid-template-columns: 1fr auto;
    gap: 5px 8px;
  }

  .qo-pro-suggestion-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .qo-pro-suggestion .qo-pro-stock {
    grid-column: 2;
    grid-row: 1;
  }

  .qo-pro-suggestion-price {
    grid-column: 2;
    grid-row: 2;
  }

  .qo-pro-footer {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 12px;
  }

  .qo-pro-add-row {
    grid-column: 1 / -1;
    min-height: 58px;
    border-color: #c8dce7;
    color: #0b4163;
    background: #eff8fc;
    font-size: 19px;
  }

  .qo-pro-status {
    display: none;
  }

  .qo-pro-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .qo-pro-actions .qo-pro-btn {
    min-height: 58px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-tools-detail,
  .quick-tools-slider.has-detail .quick-tools-detail,
  .quick-tools-slider.is-closing .quick-tools-detail,
  .qo-pro-table tr.qo-row-ready td,
  .qo-pro-table tr.qo-row-added td {
    animation: none;
    transition: none;
  }
}
