dialog {
  border: 0;
  padding: 26px;
  border-radius: 13px;
  color: var(--ink);
  width: min(640px, calc(100% - 28px));
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 25px 100px #14273735;
}
dialog::backdrop {
  background: #102d3b70;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.dialog-head p {
  margin: 0;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.span2 {
  grid-column: span 2;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cddae2;
  background: white;
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  margin-top: 5px;
}
textarea {
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #69bcaa;
  outline-offset: 1px;
}
fieldset {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d8e1e6;
  border-radius: 7px;
}
legend {
  font-size: 13px;
  font-weight: 600;
}
.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.checks input {
  width: 16px;
  margin: 0;
  accent-color: var(--teal);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
}
.error {
  margin-top: 16px;
  padding: 13px;
  border: 1px solid #ebc0b9;
  background: #fff0ed;
  border-radius: 7px;
  font-size: 14px;
  color: #a24739;
}
.hour-row {
  display: grid;
  grid-template-columns: 1fr 100px 100px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.hour-row small {
  font-size: 11px;
  color: var(--muted);
}
.hour-row input {
  margin: 0;
}
.material-row,
.line-labels {
  display: grid;
  grid-template-columns: 1fr 85px 95px 30px;
  gap: 8px;
  align-items: center;
}
.line-labels {
  color: var(--muted);
  font-size: 11px;
}
.material-row input,
.material-row select {
  margin-top: 7px;
}
.material-row button {
  background: none;
  border: 0;
  color: #8b989e;
  font-size: 21px;
}
.outcome {
  margin: 20px 0 15px;
}
.detail-block {
  background: #f5f8fa;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}
.detail-block p {
  font-size: 14px;
  margin-bottom: 8px;
}
.detail-block p:last-child {
  margin: 0;
}
.report-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #183d35;
  color: white;
  padding: 13px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 40px #162d3330;
  font-size: 14px;
  z-index: 100;
  display: none;
  max-width: 90vw;
}
#toast.visible {
  display: block;
}
.print-only {
  display: none;
}
