.lom-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 12px 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lom-summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 2px 0;
}

.lom-summary-text {
  .lom-breadcrumb {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
  }

  h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
  }
}

.lom-summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lom-mapped-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 14px;

  .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
  }
}

.btn-copy-from-line {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #374151;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;

  &:hover {
    background: #f9fafb;
  }
}

.btn-save-changes {
  background: #15803d;
  border: 1px solid #15803d;
  color: #fff;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;

  &:hover:not(:disabled) {
    background: #166534;
  }

  &:disabled {
    background: #d1d5db;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
  }
}

.info-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  margin: 16px 0;
}

.no-routing-msg {
  margin-top: 24px;
  padding: 24px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  background: #fff;
  border: 1px dashed #e5e7eb;
  border-radius: 10px;
}

.lom-grid-head {
  display: grid;
  grid-template-columns: 1.3fr 2.6fr 1fr 1fr;
  gap: 14px;
  padding: 0 4px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.lom-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lom-row {
  display: grid;
  grid-template-columns: 1.3fr 2.6fr 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.step-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;

  .step-stage {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
  }

  .step-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
  }
}

.workstation-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border-radius: 12px;
  padding: 14px 18px;

  &.mapped {
    background: #e7f6ec;
    border: 1px solid #bfe3c9;

    &:hover .btn-change {
      opacity: 1;
      pointer-events: auto;
    }
  }

  &.unmapped {
    background: #faf9f6;
    border: 1px dashed #d6d3cc;
    align-items: center;
    justify-content: center;
  }

  .ws-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
  }

  .ws-since {
    font-size: 11px;
    color: #6b8f76;
  }

  .ws-unmapped {
    color: var(--action-primary-default, #834dd0);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;

    &:hover {
      text-decoration: underline;
    }
  }
}

.btn-change {
  position: absolute;
  top: 10px;
  right: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  background: #fff;
  border: 1px solid #d1d5db;
  color: #374151;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;

  &:hover {
    background: #f9fafb;
  }
}

.stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: #fff;
  border: 1px solid #edeef2;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;

  strong {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
  }

  span {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  em {
    font-style: normal;
    font-size: 10px;
    color: #cbd5e1;
  }

  &.unmapped {
    strong.dash {
      color: #dc2626;
    }

    span {
      color: #dc2626;
    }
  }
}

.change-workstation-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.change-workstation-modal {
  background: #fff;
  border-radius: 10px;
  width: min(480px, 92vw);
  padding: 20px 24px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.change-workstation-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;

  h2 {
    font-size: 18px;
    margin: 0;
  }

  .change-workstation-modal-close {
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #6b7280;

    &:hover {
      color: #111827;
    }
  }
}

.change-workstation-current {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #334155;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.change-workstation-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.change-workstation-info-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 14px;
}

.change-workstation-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;

  button {
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 14px;
    cursor: pointer;
  }

  .btn-cancel {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
  }

  .btn-confirm {
    background: var(--button-primary-bg-default);
    border: 1px solid var(--button-primary-bg-default);
    color: var(--button-primary-text-default);
  }
}
