[hidden] { display:none !important; }
.v14-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.v14-space { margin-top:10px; }
.v14-drop { padding:10px; border: 1px dashed var(--line); border-radius:10px; }
.v14-drop.over { outline:2px solid #3b82f6; }
.v14-drop-mobile { display:none; }
.v14-slice-rows { display: grid; gap: 10px; }
.v14-slice-rows:empty { display: none; }
.v14-slice-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-solid);
  overflow: hidden;
}
.v14-slice-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 9px 12px;
  background: var(--hint-bg);
}
.v14-slice-group-head h4 { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.v14-slice-group-meta, .v14-slice-metrics { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.v14-slice-row { border-top: 1px solid var(--line); }
.v14-slice-summary {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  min-height: 42px;
  list-style: none;
  cursor: pointer;
}
.v14-slice-summary::-webkit-details-marker, .v14-draft-menu > summary::-webkit-details-marker { display: none; }
.v14-slice-summary::before { content: "›"; font-size: 19px; color: var(--muted); transform-origin: 40% 50%; }
.v14-slice-row[open] > .v14-slice-summary::before { transform: rotate(90deg); }
.v14-slice-summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.v14-slice-summary:hover { background: var(--hint-bg); }
.v14-slice-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.v14-slice-pending .v14-slice-metrics { color: #a75316; font-weight: 700; }
body.dark .v14-slice-pending .v14-slice-metrics { color: #ffc17c; }
.v14-slice-body { padding: 0 12px 12px; }
.v14-slice-row-head { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; margin-bottom: 8px; flex-wrap: wrap; }
.v14-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.v14-check input { width: auto; min-height: 0; }
.v14-slice-row .btn { padding: 5px 8px; }
#sliceTotals { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
#sliceTotals strong { font-size: 14px; }
.v14-draft-menu { position: relative; }
.v14-draft-menu > summary { display: flex; align-items: center; gap: 7px; list-style: none; }
.v14-draft-menu > summary::after { content: "▾"; font-size: 10px; color: var(--muted); }
.v14-draft-actions {
  position: absolute;
  inset: calc(100% + 6px) 0 auto auto;
  z-index: 1;
  min-width: 154px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}
.v14-draft-actions button {
  display: block;
  width: 100%;
  padding: 9px 11px;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.v14-draft-actions button:hover, .v14-draft-actions button:focus-visible { background: var(--hint-bg); }
.v14-draft-actions button:disabled { opacity: .5; cursor: default; }
#slicePanel, #materialSection, #printTimeSection, #quoteResults { scroll-margin-top: 94px; }
.v14-mobile-quote { display: none; }
@media (max-width: 768px) {
  .v14-drop-mobile { display:inline; }
  .v14-drop-desktop { display:none; }
  #slicePanel, #materialSection, #printTimeSection, #quoteResults { scroll-margin-top: 12px; }
  #printBtn { display: none; }
  .v14-mobile-quote {
    position: fixed;
    z-index: 25;
    inset: auto 0 var(--keyboard-offset, 0px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px max(15px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(15px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: var(--panel-solid);
    box-shadow: 0 -5px 22px rgba(21, 31, 57, .09);
  }
  .v14-mobile-quote span { display: block; color: var(--muted); font-size: 12px; }
  .v14-mobile-quote strong { font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
  .v14-mobile-quote .btn { min-height: 44px; }
  .v14-slice-summary { min-height: 44px; }
  .v14-slice-body .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.v14-issue { color:#a75316; font-size:13px; margin-block:6px; }
body.dark .v14-issue { color:#ffc17c; }
.v14-dialog { width:min(545px,calc(100% - 24px)); max-height:calc(100vh - 30px); border:1px solid var(--line); border-radius:13px; padding:17px; background:var(--panel-solid); color:var(--text); }
.v14-dialog::backdrop { background:#0b172588; }
.v14-print-only { display:none; }
#sliceStatus:empty,#customerStatus:empty,#validationStatus:empty { display:none; }
.v14-attachment-drop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px dashed var(--upload-border);
  border-radius: 12px;
  padding: 13px 16px;
  background: var(--upload-bg);
}
.v14-attachment-drop.dragover { border-color: var(--primary); background: var(--hint-bg); }
.v14-attachment-drop .btn { flex: 0 0 auto; white-space: nowrap; }
.v14-attachment-copy { min-width: 0; }
.v14-attachment-copy p { margin: 3px 0 0; }
.v14-attachment-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.v14-attachment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
}
.v14-attachment-row + .v14-attachment-row { border-top: 1px solid var(--line); }
.v14-attachment-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v14-attachment-size { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.v14-attachment-remove { font-size: 12px; padding: 6px 10px; }
.v14-attachment-drop .btn:focus-visible,
.v14-attachment-remove:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (max-width: 460px) {
  .v14-attachment-drop { align-items: flex-start; flex-direction: column; gap: 9px; padding: 12px; }
  .v14-attachment-row { gap: 8px; }
}

@media print {
  @page { margin:16mm; }
  html, body { height:auto; min-height:0; overflow:visible; }
  .app,.v14-dialog { display:none !important; }
  body { color:#15232f; background:#fff !important; }
  .v14-print-only { display:block; margin:0; }
}


/* Device defaults, spool pricing and the order settlement. */
.v14-machine-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.v14-machine-heading h4 { margin: 0; }
.v14-machine-heading .btn { font-size: 12px; padding: 5px 9px; }
.v14-machine-note { margin: 7px 0 0; }
.v14-machine-note:empty { display: none; }
.v14-accessory-list {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}
.v14-accessory-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.1fr) max-content;
  align-items: end;
  gap: 8px;
  margin: 0 0 7px;
}
.v14-accessory-row .field, .v14-material-row .field { min-width: 0; }
.v14-accessory-row .btn { font-size: 12px; padding: 7px 9px; }
.v14-accessory-add { margin-top: 9px; }
.material-row.v14-material-row {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1.05fr) minmax(0, .95fr) max-content;
  align-items: start;
}
.v14-material-rate { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.v14-custom-spool { padding-top: 4px; }
.v14-material-remove { margin-top: 20px; padding: 7px 9px; font-size: 12px; }
.v14-shipping-input {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.v14-shipping-input .field { width: 160px; }
.v14-shipping-input > span { padding-bottom: 9px; }
.v14-current-total {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 0;
  margin-top: 8px;
  border-bottom: 1px solid var(--line);
}
.v14-current-total > div { display: flex; align-items: baseline; gap: 6px; }
.v14-current-total strong { font-variant-numeric: tabular-nums; }
@media (max-width: 660px) {
  .material-row.v14-material-row, .v14-accessory-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .v14-material-remove { margin-top: 0; justify-self: start; }
  .v14-accessory-row .btn { justify-self: start; }
}

/* Quote calculations and chart visibility. */
.v14-formula-number {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: help;
  text-decoration: underline dotted;
  text-decoration-color: var(--muted);
  text-underline-offset: .16em;
}
.v14-formula-number:disabled { cursor: default; text-decoration: none; }
.v14-formula-number:hover:not(:disabled) { text-decoration-color: currentColor; }
.v14-formula-number:focus-visible, .v14-cost-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}
.v14-chart-help { margin: -2px 0 10px; }
#costBreakdown .breakdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
#costBreakdown .breakdown-list { flex: 1 1 230px; min-width: 0; }
#costBreakdown .donut-wrap { flex: 0 1 240px; min-height: 220px; min-width: 0; }
#costBreakdown .donut { width: min(240px, 100%); height: auto; aspect-ratio: 1; }
.v14-cost-row {
  grid-template-columns: minmax(0, 1fr) max-content minmax(45px, max-content);
  column-gap: 8px;
}
.v14-cost-row > strong:nth-child(2), .v14-cost-row > :last-child { text-align: right; }
.v14-cost-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  border: none;
  border-radius: 5px;
  padding: 3px 2px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.v14-cost-toggle:hover { background: var(--hint-bg); }
.v14-cost-toggle .dot { flex: 0 0 10px; background: var(--category); }
.v14-cost-toggle[aria-pressed="false"] { color: var(--muted); }
.v14-cost-toggle[aria-pressed="false"] .dot { background: transparent; border: 1px solid var(--category); }
.v14-cost-row.v14-cost-muted > strong, .v14-cost-row.v14-cost-muted > :last-child { color: var(--muted); }
.v14-cost-total { padding-top: 9px; border-top: 1px solid var(--line); }
.v14-material-detail-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; }
.v14-formula-popover {
  position: fixed;
  z-index: 100;
  width: min(410px, calc(100vw - 20px));
  max-height: min(420px, calc(100vh - 20px));
  overflow: auto;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(14, 31, 56, .18);
  font-size: 13px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}
.v14-formula-popover strong { display: block; font-size: 15px; }
.v14-formula-popover p { margin: 5px 0 0; }
.v14-formula-rule { color: var(--muted); margin-bottom: 4px !important; }
.v14-formula-work { font-variant-numeric: tabular-nums; }
@media print { .v14-formula-popover { display: none !important; } }
