/* public/workspace-tools.css */
.workspace-tool {
  --wt-ink:#243431;
  --wt-teal:#118577;
  color: var(--wt-ink);
  max-width: 1160px;
  margin: auto;
  padding: 28px 0;
}
.workspace-tool * {
  box-sizing: border-box;
}
.wt-toolbar,
.wt-editor-actions,
.wt-list-controls,
.wt-record,
.wt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.wt-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}
.wt-toolbar h1 {
  font-size: clamp(26px, 4vw, 38px);
  margin: 6px 0;
}
.wt-kicker {
  font-size: 12px;
  letter-spacing: .12em;
  font-weight: 750;
  color: #44736b;
}
.workspace-tool button {
  padding: 10px 15px;
  border: 1px solid #b8ccc7;
  border-radius: 8px;
  background: white;
  color: #213d37;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}
.workspace-tool button:hover {
  background: #e8f6f2;
}
.workspace-tool button:disabled {
  opacity: .55;
  cursor: wait;
}
.workspace-tool button.wt-primary {
  background: #163d36;
  color: white;
  border-color: #163d36;
}
.wt-note {
  font-size: 14px;
  line-height: 1.6;
  color: #516c65;
  max-width: 900px;
}
.wt-status {
  min-height: 26px;
  font-size: 14px;
  color: #246b4f;
}
.wt-error {
  color: #9f2c25 !important;
  background: #fff0ec;
  padding: 12px;
  border-radius: 7px;
}
.wt-list-controls {
  margin: 20px 0;
  align-items: end;
}
.wt-list-controls > .wt-field {
  flex: 1;
}
.wt-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  font-weight: 650;
  min-width: 0;
}
.wt-field input,
.wt-field select,
.wt-field textarea {
  width: 100%;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid #bdcec9;
  border-radius: 7px;
  font: inherit;
  font-weight: 400;
  color: #203a33;
  min-width: 0;
}
.wt-field textarea {
  resize: vertical;
  line-height: 1.5;
}
.wt-field small {
  font-weight: 400;
  line-height: 1.45;
  color: #50645e;
}
.wt-check {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 14px;
  padding-bottom: 10px;
}
.wt-record-list {
  display: grid;
  gap: 12px;
}
.wt-record {
  border: 1px solid #cedbd7;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}
.wt-record > div:first-child {
  min-width: 0;
  flex: 1;
}
.wt-record h2 {
  font-size: 18px;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}
.wt-record p {
  margin: 0 0 4px;
  font-size: 14px;
  color: #53716a;
  overflow-wrap: anywhere;
}
.wt-record small {
  color: #6e827c;
}
.wt-empty {
  border: 1px dashed #b7ccc4;
  border-radius: 12px;
  padding: 32px;
  color: #526c64;
  background: #f7fbf8;
}
.wt-editor-actions {
  margin: 20px 0;
}
.wt-editor {
  background: #fff;
  border: 1px solid #ccdbd5;
  border-radius: 14px;
  padding: 24px;
}
.wt-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.wt-editor h2 {
  font-size: 23px;
  margin: 28px 0 12px;
}
.wt-line-items {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}
.wt-line {
  display: grid;
  grid-template-columns: minmax(180px, 3fr) repeat(3, minmax(70px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid #d6e2dd;
  border-radius: 9px;
  padding: 14px;
  min-width: 0;
}
.wt-line legend,
.wt-request legend {
  font-size: 13px;
  color: #557c6d;
}
.wt-spacing {
  margin-top: 22px;
}
.wt-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #f1f8f5;
  border-radius: 10px;
  gap: 15px;
  padding: 20px;
  margin: 20px 0;
}
.wt-metrics span,
.wt-metrics strong {
  display: block;
  overflow-wrap: anywhere;
}
.wt-metrics span {
  font-size: 12px;
  color: #577467;
  margin-bottom: 8px;
}
.wt-metrics strong {
  font-size: 20px;
}
.wt-notice {
  padding: 15px;
  background: #fff7e4;
  color: #79591c;
  border-radius: 8px;
  line-height: 1.5;
}
.wt-request {
  border: 1px solid #d6e2dd;
  border-radius: 10px;
  margin: 16px 0;
  padding: 18px;
}
.wt-request button {
  margin-top: 14px;
}
.wt-measure-method {
  margin: 24px 0;
}
.wt-plan {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  border: 1px solid #ccd8d2;
  border-radius: 9px;
  cursor: crosshair;
  touch-action: manipulation;
}
.wt-preview {
  background: #e8efea;
  padding: 24px;
  border-radius: 12px;
}
.wt-print-document {
  font: 14px/1.5 Arial, sans-serif;
  color: #243431;
  max-width: 900px;
  margin: 0 auto;
  background: white;
  padding: 38px;
}
.wt-print-document header {
  display: flex;
  gap: 22px;
  align-items: center;
  border-bottom: 4px solid #1fccb5;
  padding-bottom: 20px;
}
.wt-print-document header img {
  max-width: 140px;
  max-height: 90px;
  object-fit: contain;
}
.wt-print-document h1 {
  font-size: 26px;
  margin: 0 0 8px;
}
.wt-print-document h2 {
  font-size: 23px;
}
.wt-print-document h3 {
  font-size: 17px;
}
.wt-print-document dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 7px 14px;
}
.wt-print-document dt {
  font-weight: bold;
}
.wt-print-document dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.wt-print-document table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  table-layout: fixed;
}
.wt-print-document th,
.wt-print-document td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #d8e3dd;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.wt-print-document th:first-child {
  width: 42%;
}
.wt-print-document th {
  background: #edf5f1;
}
.wt-print-totals {
  max-width: 330px;
  margin-left: auto;
}
.wt-print-totals p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.wt-grand-total {
  font-size: 20px;
  border-top: 2px solid #183d30;
  padding-top: 12px;
}
.wt-preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wt-print-document footer {
  font-size: 11px;
  color: #617368;
  border-top: 1px solid #cedbd2;
  margin-top: 30px;
  padding-top: 15px;
}
.wt-print-plan {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}
.wt-print-frame {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  bottom: 0;
  right: 0;
  border: 0;
}
@media (max-width: 760px) {
  .workspace-tool {
    padding-top: 16px;
  }
  .wt-toolbar,
  .wt-list-controls,
  .wt-editor-actions,
  .wt-record {
    align-items: stretch;
    flex-direction: column;
  }
  .wt-actions {
    justify-content: flex-start;
  }
  .wt-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .wt-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wt-item-description {
    grid-column: 1/-1;
  }
  .wt-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wt-editor {
    padding: 18px;
  }
  .wt-preview {
    padding: 0;
  }
  .wt-print-document {
    padding: 20px;
  }
  .wt-print-document dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .wt-print-document dd {
    margin-bottom: 8px;
  }
  .wt-check {
    padding: 0;
  }
  .wt-record .wt-actions {
    width: 100%;
  }
}
@media print {
  body.wt-printing > *:not(#print-root) {
    display: none !important;
  }
  body.wt-printing #print-root {
    display: block !important;
  }
  @page {
    size: letter;
    margin: .6in;
  }
  .wt-print-document {
    padding: 0;
    max-width: none;
    font-size: 11px;
  }
  .wt-print-document h1 {
    font-size: 22px;
  }
  .wt-print-document h2 {
    font-size: 19px;
  }
  .wt-print-document th,
  .wt-print-document td {
    padding: 7px 5px;
  }
  .wt-print-document tr,
  .wt-metrics {
    break-inside: avoid;
  }
  .wt-print-document thead {
    display: table-header-group;
  }
  .wt-print-document header {
    break-inside: avoid;
  }
  .wt-print-document .wt-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
