/* §5B 전자결재(F028) 기안/재상신 패널 + 결재선 편집기 + 반려 모달 스타일. */

.kx-apf {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  overflow-y: auto;
  height: 100%;
  min-height: 0;
}
.kx-apf__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.kx-apf__head h1 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
}
.kx-apf__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--color-neutral-200);
  background: var(--color-white);
  color: var(--color-neutral-700);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: var(--fs-caption);
  cursor: pointer;
}
.kx-apf__back:hover {
  background: var(--color-neutral-050);
}
.kx-apf__ver {
  margin-left: auto;
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
  background: var(--color-neutral-100);
  border: 1px solid var(--color-neutral-200);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.kx-apf__error {
  border: 1px solid #fecdca;
  background: #fef3f2;
  color: var(--color-error);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: var(--fs-caption);
}

.kx-apf__reject {
  border: 1px solid #fecdca;
  background: #fffbfa;
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kx-apf__reject-head strong {
  font-size: var(--fs-caption);
  color: #b91c1c;
  font-weight: var(--fw-bold);
}
.kx-apf__reject-body {
  font-size: var(--fs-body);
  color: var(--color-neutral-800);
  line-height: var(--lh-body);
}
.kx-apf__prev {
  list-style: none;
  margin: 0;
  padding: var(--space-2) 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px dashed var(--color-neutral-200);
}
.kx-apf__prev li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-size: var(--fs-caption);
}
.kx-apf__prev-act {
  font-weight: var(--fw-bold);
  color: var(--color-neutral-800);
}
.kx-apf__prev-meta {
  color: var(--color-neutral-500);
}
.kx-apf__prev-cmt {
  color: var(--color-neutral-700);
}

.kx-apf__card {
  background: var(--color-white);
  border: var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 900px;
}
.kx-apf__row {
  display: flex;
  gap: var(--space-4);
}
.kx-apf__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kx-apf__field--type {
  flex: 0 0 200px;
}
.kx-apf__field--title {
  flex: 1;
}
.kx-apf__label {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--color-neutral-700);
}
.kx-apf__req {
  color: var(--color-error);
  font-style: normal;
}
.kx-apf__input,
.kx-apf__select,
.kx-apf__textarea {
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: var(--fs-body);
  color: var(--color-neutral-900);
  background: var(--color-white);
  width: 100%;
}
.kx-apf__textarea {
  resize: vertical;
  line-height: var(--lh-body);
}
.kx-apf__input:focus,
.kx-apf__select:focus,
.kx-apf__textarea:focus {
  outline: none;
  border-color: var(--color-primary-600);
}
.kx-apf__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  border-top: 1px solid var(--color-neutral-100);
  padding-top: var(--space-4);
}

/* 결재선 편집기 */
.kx-line-editor {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border: 1px dashed var(--color-neutral-200);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
}
.kx-line-editor__empty {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-line-editor__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kx-line-editor__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.kx-line-editor__step {
  flex: 0 0 auto;
  min-width: 52px;
  text-align: center;
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  color: var(--color-primary-700);
  background: var(--color-primary-050);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
}
.kx-line-editor__id {
  flex: 0 0 200px;
}
.kx-line-editor__name {
  flex: 1;
  min-width: 120px;
}
.kx-line-editor__id,
.kx-line-editor__name {
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: var(--fs-body);
}
.kx-line-editor__id:focus,
.kx-line-editor__name:focus {
  outline: none;
  border-color: var(--color-primary-600);
}
.kx-line-editor__ops {
  display: flex;
  gap: 2px;
}
.kx-line-editor__op {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--color-neutral-200);
  background: var(--color-white);
  color: var(--color-neutral-500);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.kx-line-editor__op:hover:not(:disabled) {
  background: var(--color-neutral-050);
  color: var(--color-neutral-800);
}
.kx-line-editor__op:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.kx-line-editor__op--del:hover:not(:disabled) {
  color: var(--color-error);
  border-color: #fecdca;
}
.kx-line-editor__up {
  display: inline-flex;
  transform: rotate(180deg);
}
.kx-line-editor__add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  border: 1px solid var(--color-primary-600);
  background: var(--color-white);
  color: var(--color-primary-600);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}
.kx-line-editor__add:hover:not(:disabled) {
  background: var(--color-primary-050);
}
.kx-line-editor__add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 반려/승인 사유 모달 */
.kx-apm__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: var(--space-4);
}
.kx-apm {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}
.kx-apm__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-neutral-100);
}
.kx-apm__head h2 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
}
.kx-apm__close {
  border: none;
  background: none;
  color: var(--color-neutral-500);
  cursor: pointer;
  display: inline-flex;
}
.kx-apm__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kx-apm__label {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--color-neutral-700);
}
.kx-apm__textarea {
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: var(--fs-body);
  resize: vertical;
  line-height: var(--lh-body);
}
.kx-apm__textarea:focus {
  outline: none;
  border-color: var(--color-primary-600);
}
.kx-apm__hint {
  font-size: var(--fs-micro);
  color: var(--color-neutral-500);
}
.kx-apm__foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4);
  border-top: 1px solid var(--color-neutral-100);
}
