/* Phase 8.7.4 — button/link audit + overlay cleanup */

/* Measurements / Repairs left transaction: actions are outside the customer text box. */
.phase874-left-actions{
  display:grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap:10px !important;
  margin:12px 0 0 !important;
  padding:0 !important;
  clear:both !important;
}
.phase874-left-actions .button{
  position:relative !important;
  z-index:2 !important;
  min-height:42px !important;
  width:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  white-space:normal !important;
  line-height:1.1 !important;
  margin:0 !important;
}
.phase872-customer-box{ overflow:visible !important; min-height:0 !important; }
.phase872-customer-box .muted-text{ margin-bottom:0 !important; }
.phase872-intake-bottom{ align-items:start !important; }
@media (max-width:1250px){ .phase874-left-actions{ grid-template-columns:1fr !important; } }

/* Tag reprint page: keep checkboxes and buttons from colliding. */
.phase872-tag-reprint .panel-head{ align-items:start !important; gap:16px !important; }
.phase872-tag-reprint .phase872-order-tag-list{ display:grid !important; gap:18px !important; }
.phase872-tag-order-card{ position:relative !important; overflow:visible !important; padding:16px !important; }
.phase872-tag-order-head{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:start !important;
  gap:12px !important;
}
.phase872-tag-order-head form{ margin:0 !important; justify-self:end !important; }
.phase872-tag-checkbox-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap:10px !important;
  margin:12px 0 0 !important;
  clear:both !important;
}
.phase872-tag-check{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) !important;
  align-items:center !important;
  gap:10px !important;
  min-height:58px !important;
  width:100% !important;
  box-sizing:border-box !important;
}
.phase872-tag-check strong{ overflow-wrap:anywhere !important; line-height:1.05 !important; }
.phase872-tag-check span{ overflow-wrap:anywhere !important; line-height:1.1 !important; }
.phase872-tag-order-card .form-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:center !important;
  margin-top:14px !important;
  padding-top:12px !important;
  border-top:1px dashed #f1c9a5 !important;
  clear:both !important;
}
.phase872-tag-order-card .form-actions .button{ min-height:42px !important; position:relative !important; z-index:2 !important; }
@media (max-width:900px){
  .phase872-tag-reprint .panel-head,.phase872-tag-order-head{ grid-template-columns:1fr !important; display:grid !important; }
  .phase872-tag-order-head form{ justify-self:start !important; }
}

/* Product-label and garment-tag standalone print preview pages: controls must reserve real space. */
body.phase872-product-label-print,
body.phase872-product-label-preview,
body.phase872-fold-tags-page{
  padding-top:86px !important;
  box-sizing:border-box !important;
}
body.phase872-product-label-print .print-controls,
body.phase872-product-label-preview .print-controls,
body.phase872-fold-tags-page .print-controls{
  position:fixed !important;
  top:12px !important;
  left:12px !important;
  z-index:9999 !important;
  display:flex !important;
  gap:10px !important;
  background:#f7efe2 !important;
  padding:8px !important;
  border-radius:10px !important;
  box-shadow:0 2px 8px rgba(0,0,0,.12) !important;
}
body.phase872-product-label-print .phase87-label-sheet,
body.phase872-product-label-preview .phase87-label-preview-wrap,
body.phase872-fold-tags-page .phase872-label-sheet,
body.phase872-fold-tags-page .phase87-label-sheet{
  padding-top:0 !important;
  margin-top:0 !important;
  padding-left:18px !important;
  display:grid !important;
  place-items:start !important;
  justify-items:start !important;
  align-items:start !important;
}
body.phase872-product-label-print .phase87-product-label,
body.phase872-product-label-preview .phase87-product-label{ margin-top:0 !important; }

@media print{
  body.phase872-product-label-print,
  body.phase872-product-label-preview,
  body.phase872-fold-tags-page{ padding-top:0 !important; background:#fff !important; }
  body.phase872-product-label-print .print-controls,
  body.phase872-product-label-preview .print-controls,
  body.phase872-fold-tags-page .print-controls{ display:none !important; }
  body.phase872-product-label-print .phase87-label-sheet,
  body.phase872-product-label-preview .phase87-label-preview-wrap,
  body.phase872-fold-tags-page .phase872-label-sheet,
  body.phase872-fold-tags-page .phase87-label-sheet{ padding:0 !important; margin:0 !important; }
}
