/* Phase 8.7 — Split-View Workflow + Shop/Product Labels + Ticket/Tag Print Rebuild */
.phase87-pos-split {
  display: grid;
  grid-template-columns: minmax(360px, 40%) minmax(560px, 60%);
  gap: 18px;
  align-items: start;
}
.phase87-active-panel,
.phase87-work-panel { min-width: 0; }
.phase87-active-panel { position: sticky; top: 14px; }
.phase87-client-summary {
  border: 1px solid rgba(251, 146, 60, .35);
  background: #fffaf3;
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}
.phase87-client-summary strong { font-size: 20px; color: #071833; }
.phase87-client-summary small { color: #44556b; font-weight: 700; }
.phase87-cart-scroll,
.phase87-ticket-scroll,
.phase87-mini-scroll {
  max-height: 430px;
  overflow-y: auto;
  padding-right: 6px;
}
.phase87-cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  border: 1px solid #f1c9a5;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.phase87-cart-item strong,
.phase87-mini-row span { color: #071833; font-weight: 900; }
.phase87-cart-item span,
.phase87-mini-row small { display: block; color: #43536a; font-weight: 700; font-size: 13px; }
.phase87-total-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.phase87-total-box > div {
  border: 1px solid #f1c9a5;
  border-radius: 14px;
  padding: 12px;
  background: #fffaf3;
}
.phase87-total-box span { display: block; color: #51647a; font-weight: 800; font-size: 12px; }
.phase87-total-box strong { display: block; color: #071833; font-size: 22px; font-weight: 950; }
.phase87-stack-actions,
.phase87-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.phase87-stack-actions .button,
.phase87-bottom-actions .button { margin: 0 !important; white-space: nowrap; }
.phase87-recent-box { margin-top: 18px; }
.phase87-recent-box h3 { margin: 0 0 10px; }
.phase87-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed rgba(251, 146, 60, .35);
  padding: 8px 0;
}
.phase87-client-row {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(320px, 1.15fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.phase87-inline-action,
.phase87-price-row,
.phase87-wide-search {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}
.phase87-inline-action input,
.phase87-price-row input,
.phase87-wide-search input { flex: 1 1 auto; min-width: 0; }
.phase87-inline-action .button,
.phase87-price-row .button,
.phase87-wide-search .button { flex: 0 0 auto; margin: 0 !important; white-space: nowrap; }
.phase87-entry-form { display: grid; gap: 14px; }
.phase87-compact-grid,
.phase87-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.phase87-head-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.phase87-head-actions .button { margin: 0 !important; }
.phase87-profile-section .panel-head,
.phase87-service-section .panel-head { align-items: center; gap: 12px; }
.phase87-step-title {
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 950;
  color: #071833;
  letter-spacing: .02em;
}
.phase87-wrap-row { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
.phase87-wrap-row .tab-chip { min-width: 76px; justify-content: center; }
.phase87-service-scroll {
  max-height: 150px !important;
  overflow-y: auto !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)) !important;
  gap: 8px !important;
  padding-right: 8px !important;
}
.phase87-service-scroll .quick-item {
  min-height: 66px !important;
  padding: 9px 8px !important;
  line-height: 1.08 !important;
}
.phase87-service-scroll .quick-item span { font-size: 11px !important; margin-top: 3px; }
.phase87-price-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.phase87-price-row .button { min-width: 104px; }
.phase87-bottom-actions {
  border-top: 1px dashed rgba(251, 146, 60, .35);
  padding-top: 14px;
  clear: both;
}
.phase87-bottom-actions .button { min-height: 42px; }
.phase87-shop-page .phase87-work-panel { order: 2; }
.phase87-shop-page .phase87-active-panel { order: 1; }
.phase87-shop-client-row { grid-template-columns: 1fr; }
.phase87-shop-form { display: grid; gap: 14px; }
.phase87-product-cart-lines { display: grid; gap: 10px; }
.phase87-product-line { grid-template-columns: minmax(0, 1fr) 80px auto !important; }
.phase87-shop-products .panel-head { gap: 12px; align-items: center; }
.phase87-wide-search { max-width: 100%; }
.phase87-shop-products .phase87-wide-search { flex: 1 1 auto; min-width: 360px; }
.phase87-barcode-entry { margin-top: 6px; }
.phase87-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)) !important;
  max-height: 228px;
  overflow-y: auto;
  padding-right: 8px;
}
.phase87-product-grid .quick-item { min-height: 80px !important; }
.phase87-product-grid strong,
.phase87-product-grid span,
.phase87-product-grid small { display: block; }
.phase87-product-grid small { font-size: 10px; opacity: .9; }
.phase87-ticket-scroll { max-height: 390px; }
.phase87-label-product-list { display: grid; gap: 10px; }
.phase87-label-product-row {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) 84px auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #f1c9a5;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.phase87-label-product-row > input[type="text"],
.phase87-label-product-row > input:not([type]) { text-align: center; }
.phase87-label-product-row span { display: block; color: #43536a; font-size: 13px; }
@media (max-width: 1240px) {
  .phase87-pos-split { grid-template-columns: 1fr; }
  .phase87-active-panel { position: static; }
}
@media (max-width: 780px) {
  .phase87-client-row,
  .phase87-compact-grid,
  .phase87-detail-grid,
  .phase87-total-box { grid-template-columns: 1fr; }
  .phase87-inline-action,
  .phase87-wide-search { flex-direction: column; }
  .phase87-product-line,
  .phase87-label-product-row { grid-template-columns: 1fr !important; }
}

/* Phase 8.7 thermal ticket/tag/product-label refinements */
.phase87-ticket-copy { page-break-after: always !important; break-after: page !important; }
.phase87-ticket-copy:last-of-type { page-break-after: always !important; break-after: page !important; }
.phase87-client-tag-list { border-top: 2px dashed #000; }
.fold-tag-roll { page-break-after: always; break-after: page; }
.fold-tag-roll:last-of-type { page-break-after: auto; break-after: auto; }
.fold-tag-double {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2mm;
  border: 2px solid #000;
  min-height: 24mm;
  align-items: center;
  text-align: center;
  padding: 2mm;
  box-sizing: border-box;
  background: #fff;
}
.fold-tag-double section:first-child { border-right: 1px dashed #000; }
.fold-tag-double span { display: block; font-size: 9px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold-tag-double strong { display: block; font-size: 16px; line-height: 1.05; font-weight: 950; color: #000; }
.fold-tag-double small { display: block; font-size: 7px; line-height: 1.05; font-weight: 700; }
.fold-tag-barcode { width: 58mm; height: 11mm; margin: 2mm auto 0; }
.phase87-fold-label {
  width: 2in;
  min-height: 1in;
  box-sizing: border-box;
  background: #fff;
  color: #000;
  padding: .08in;
  page-break-after: always;
  break-after: page;
}
.phase87-fold-label:last-child { page-break-after: auto; break-after: auto; }
.phase87-label-preview-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}
.phase87-label-sheet { display: grid; gap: 8px; padding: 12px; }
.phase87-product-label {
  width: 2in;
  height: 1in;
  box-sizing: border-box;
  background: #fff;
  color: #000;
  border: 1px dashed #bbb;
  padding: .06in;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .02in;
  page-break-after: always;
  break-after: page;
  overflow: hidden;
}
.phase87-product-label:last-child { page-break-after: auto; break-after: auto; }
.phase87-product-label .product-price { font-size: 16px; font-weight: 950; line-height: 1; margin: 0; }
.phase87-product-label .tag-barcode { width: 1.72in; height: .34in; margin: 0; }
.phase87-product-label .product-sku { font-size: 8px; font-weight: 950; line-height: 1; }
.phase87-product-label .product-name { font-size: 7px; font-weight: 900; max-width: 1.75in; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media print {
  .phase87-label-preview-wrap { display: block; padding: 0; min-height: 0; }
  .phase87-product-label { border: 0 !important; margin: 0 !important; }
  .phase87-fold-label { margin: 0 !important; }
  body.phase87-fold-tags-page { width: 2in !important; background: #fff !important; }
  body.phase87-product-label-print,
  body.phase87-product-label-preview { width: 2in !important; background: #fff !important; }
  @page { margin: 0; }
}
