.ldl-entry-form {
  gap: 20px;
}

.ldl-form-section {
  display: grid;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.ldl-form-section:last-of-type {
  border-bottom: 0;
}

.ldl-sequence-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(420px, 1.7fr) minmax(180px, 0.65fr);
  border-block: 1px solid var(--line-strong);
}

.ldl-sequence-step {
  min-width: 0;
  padding: 14px;
  background: #f8faf8;
}

.ldl-sequence-step + .ldl-sequence-step {
  border-left: 1px solid var(--line-strong);
}

.ldl-sequence-step > span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ldl-sequence-step.live {
  box-shadow: inset 0 4px 0 #d7a519;
}

.ldl-sequence-step.dead {
  box-shadow: inset 0 4px 0 #2f6d5e;
}

.ldl-sequence-step label,
.ldl-reading-grid label {
  display: grid;
  gap: 6px;
  color: #3f4a43;
  font-size: 0.82rem;
  font-weight: 800;
}

.ldl-reading-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 10px;
}

.ldl-signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.ldl-signature-grid .signature-field {
  min-width: 0;
  padding: 12px;
  border-left: 3px solid var(--line-strong);
  background: #f8faf8;
}

#ldlPerformerSignaturePad,
#ldlWitnessSignaturePad {
  width: 100%;
  height: auto;
  aspect-ratio: 38 / 11;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  touch-action: none;
  cursor: crosshair;
}

.ldl-table {
  min-width: 1320px;
}

.ldl-table td > span,
.box-sheet-ldl-section td {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.status-passed {
  border-color: #8dc6b7;
  background: #e9f6f1;
  color: #195b4b;
}

.status-failed {
  border-color: #e1a3a3;
  background: #fff0f0;
  color: #9f2020;
}

.status-draft {
  border-color: #d8c47f;
  background: #fff8df;
  color: #725900;
}

.status-void {
  border-color: #b7bdb9;
  background: #eef1ef;
  color: #555e58;
}

.box-sheet-ldl-section .data-table {
  min-width: 1100px;
}

body.is-viewer .ldl-entry-form {
  display: none;
}

@media (max-width: 980px) {
  .ldl-sequence-grid {
    grid-template-columns: 1fr;
  }

  .ldl-sequence-step + .ldl-sequence-step {
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }

  .ldl-signature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .ldl-reading-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ldl-signature-grid .signature-field {
    padding: 10px 0;
    border-left: 0;
    border-top: 3px solid var(--line-strong);
    background: transparent;
  }
}

@media print {
  .box-sheet-ldl-section {
    break-inside: auto !important;
  }
}
