.documentos-pasos-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.documentos-pasos-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.7rem;
  max-width: 26rem;
  width: 100%;
  align-self: flex-start;
  flex: 0 0 auto;
}

.documentos-pasos-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #277CB4;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.documentos-pasos-legend-swatch {
  flex: 0 0 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 1px;
  background: #7A8798;
}

.documentos-pasos-layout {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.documentos-pasos-rail {
  flex: 0 0 45%;
  max-width: 26rem;
  min-width: 16rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.documentos-pasos-layout.is-compact .documentos-pasos-rail {
  flex: 0 0 4rem;
  max-width: 4rem;
  min-width: 4rem;
}

.documentos-pasos-editor {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.documentos-pasos-layout.is-compact .documentos-pasos-editor {
  flex: 1 1 auto;
}

.documentos-pasos-empty {
  margin-bottom: 0.5rem;
}

.documentos-pasos-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 2px;
  background: #fff;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.documentos-pasos-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.documentos-pasos-layout.is-compact .documentos-pasos-list {
  max-height: none;
  border: none;
  background: transparent;
  gap: 0.3rem;
}

.documentos-pasos-add-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem 0.65rem;
  border: 1px dashed #cbd5e1;
  border-radius: 2px;
  background: #fff;
  color: #64748b;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.documentos-pasos-add-row:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #93c5fd;
  color: #1f6fb2;
}

.documentos-pasos-add-row:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.documentos-pasos-layout.is-compact .documentos-pasos-add-row {
  margin-top: 0.35rem;
  padding: 0.35rem;
  font-size: 1rem;
}

.documentos-pasos-card {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  border: none;
  border-left: 3px solid #7A8798;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  background: #fff;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  transition: background 0.12s ease;
}

.documentos-pasos-card:last-child {
  border-bottom: none;
}

.documentos-pasos-card:hover {
  background: #f8fafc;
}

.documentos-pasos-card.is-active {
  background: #EEF3F8;
}

.documentos-pasos-card.is-locked {
  color: #545C6D;
}

.documentos-pasos-layout.is-compact .documentos-pasos-card {
  justify-content: center;
  align-items: center;
  padding: 0.35rem;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-left-width: 3px;
  border-left-style: solid;
  border-radius: 2px;
  box-shadow: none;
}

.documentos-pasos-layout.is-compact .documentos-pasos-card.is-active {
  background: #EEF3F8;
}

.documentos-pasos-layout.is-compact .documentos-pasos-card-body {
  display: none;
}

.documentos-pasos-card-index {
  flex: 0 0 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 2px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.documentos-pasos-card-index.is-draggable {
  cursor: grab;
}

.documentos-pasos-card-index.is-draggable:active {
  cursor: grabbing;
}

.documentos-pasos-card.is-active .documentos-pasos-card-index {
  background: #e2e8f0;
  color: #0f172a;
}

.documentos-pasos-list.is-reordering .documentos-pasos-card.is-reorder-dimmed {
  opacity: 0.45;
}

.documentos-pasos-card.is-dragging {
  position: relative;
  opacity: 1;
  background: #EEF3F8;
  box-shadow: 0 4px 14px rgba(28, 43, 77, 0.18);
  z-index: 2;
  outline: 2px solid #2C8BC9;
  outline-offset: -2px;
}

.documentos-pasos-card-index.is-drop-index {
  background: #2C8BC9;
  color: #fff;
}

.documentos-pasos-drop-gap {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.15rem 0;
  padding: 0.2rem 0.35rem;
  min-height: 1.35rem;
  border: 1px dashed #2C8BC9;
  border-radius: 2px;
  background: #EEF3F8;
  pointer-events: none;
}

.documentos-pasos-drop-gap-bar {
  flex: 1 1 auto;
  height: 3px;
  background: #2C8BC9;
  border-radius: 1px;
}

.documentos-pasos-drop-gap-label {
  flex: 0 0 auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 2px;
  background: #1C2B4D;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.documentos-pasos-layout.is-compact .documentos-pasos-drop-gap {
  min-height: 1.5rem;
  margin: 0.2rem 0;
  padding: 0.15rem;
}

.documentos-pasos-layout.is-compact .documentos-pasos-drop-gap-bar {
  display: none;
}

.documentos-pasos-layout.is-compact .documentos-pasos-drop-gap-label {
  min-width: 1.5rem;
  height: 1.5rem;
  font-size: 0.75rem;
}

.documentos-pasos-card.is-just-moved {
  background: #EEF3F8;
  animation: documentos-pasos-moved-flash 1.8s ease;
}

.documentos-pasos-card.is-just-moved-primary {
  outline: 2px solid #2C8BC9;
  outline-offset: -2px;
}

.documentos-pasos-moved-badge {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  color: #277CB4;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.documentos-pasos-layout.is-compact .documentos-pasos-moved-badge {
  display: none;
}

.documentos-pasos-layout.is-compact .documentos-pasos-card.is-just-moved-primary .documentos-pasos-card-index {
  background: #2C8BC9;
  color: #fff;
}

@keyframes documentos-pasos-moved-flash {
  0% {
    background: #B7D3E9;
  }
  100% {
    background: #EEF3F8;
  }
}

.documentos-pasos-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.documentos-pasos-card-title {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.documentos-pasos-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid;
  border-radius: 2px;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: #fff;
}

.documentos-pasos-card-meta {
  color: #475569;
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.documentos-pasos-card-hint {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.documentos-pasos-card-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.documentos-pasos-lock {
  color: #64748b;
  display: inline-flex;
  padding: 0.25rem 0.4rem;
}

.documentos-pasos-add-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.documentos-pasos-draft {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 2px;
  padding: 0.75rem 0.85rem;
}

.documentos-pasos-draft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.documentos-pasos-draft-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.documentos-pasos-hours-btn {
  margin-top: 0.5rem;
  align-self: flex-start;
}

.documentos-pasos-layout.is-compact .documentos-pasos-hours-btn {
  align-self: center;
  width: 100%;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.documentos-pasos-hours-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 2px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}

.documentos-checklist-items-panel.documentos-content-step {
  display: flex;
  flex-direction: column;
  height: 560px;
  min-height: 560px;
  max-height: 560px;
}

.documentos-checklist-items-panel .documentos-content-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 2px;
  background: #fff;
  padding: 0.85rem 0.9rem 1rem;
}

.documentos-checklist-items-panel .documentos-content-panel > .documentos-pasos-panel {
  flex: 1 1 auto;
  min-height: 0;
}

.documentos-maintenance-datos .form-group,
.documentos-checklist-template-datos .form-group {
  margin-bottom: 0.45rem;
}

.documentos-maintenance-datos label,
.documentos-checklist-template-datos label {
  margin-bottom: 0.15rem;
  font-size: 0.8125rem;
}
