/* 제작 파이프라인 보드 — style.css 의 색(--line, --muted, --accent)과 패널 모양을 따른다 */
.pipeline-panel {
  margin: 0;
  padding: 0;
  background: transparent;
  min-width: 0;
}
.pl-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.pl-page-head h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 3px 0 5px;
}
.pl-page-head .pl-actions {
  justify-content: flex-end;
}
.pl-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
}
.pl-mode-tabs {
  display: flex;
  gap: 4px;
  min-width: 0;
}
.pl-mode-tabs button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 13px;
  color: #667085;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.pl-mode-tabs button:hover {
  background: #f3f5f8;
}
.pl-mode-tabs button.active {
  background: #253449;
  color: #fff;
}
.pl-board-search {
  width: min(280px, 35vw);
  margin: 0;
  background: #f8fafc;
}
.pl-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 320px);
  gap: 12px;
  padding: 2px 2px 14px;
  align-items: start;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.pl-state-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.pl-state-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #667085;
  font-size: 11px;
}
.pl-state-count:hover {
  border-color: #9ba9ba;
  background: #f8fafc;
}
.pl-state-count b {
  color: #344054;
  font-size: 12px;
}
.pl-col {
  background: #eef1f5;
  border: 1px solid #e4e8ee;
  border-radius: 12px;
  padding: 10px;
  min-height: 150px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  scroll-snap-align: start;
  scrollbar-width: thin;
}
.pl-col-head {
  position: sticky;
  top: -10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #eef1f5;
  padding: 11px 2px 8px;
}
.pl-col-head h3 {
  font-size: 13px;
  margin: 0;
  font-weight: 750;
}
.pl-col-head span {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 99px;
  background: #dfe4eb;
  color: #596579;
  font-size: 10px;
  font-weight: 750;
}
.pl-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  border: 1px solid #dce2ea;
  background: #fff;
  border-radius: 10px;
  font: inherit;
  box-shadow: 0 1px 2px #1822300a;
}
.pl-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}
.pl-card:hover {
  border-color: #9aa4b2;
}
.pl-card b {
  font-size: 13px;
  line-height: 1.4;
}
.pl-card-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.pl-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  border-top: 1px solid #edf0f4;
  padding: 7px 9px;
}
.pl-card-actions .outline-button,
.pl-card-actions .text-button {
  font-size: 10px;
  padding: 5px 8px;
}
.pl-card-actions .text-button {
  margin-right: auto;
}
.pl-candidate {
  border-style: dashed;
  padding: 12px;
  gap: 6px;
  align-items: flex-start;
}
.pl-muted {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.pl-note {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
}
.pl-state-tag {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e9edf3;
  color: #46566b;
  font-size: 10px;
  font-weight: 700;
}
.pl-bad {
  color: #b42318;
  font-size: 12px;
}
.pl-ok {
  color: #067647;
  font-size: 13px;
}
.pl-rest {
  margin-top: 12px;
}
.pl-rest .pl-card {
  margin-top: 6px;
  max-width: 360px;
}
.pl-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  border: 0;
  border-radius: 12px;
  padding: 0;
}
.pl-dialog::backdrop {
  background: rgba(15, 20, 30, 0.45);
}
.pl-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.pl-dialog-head h2 {
  font-size: 17px;
  margin: 0;
}
.pl-dialog-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pl-dialog-body h3 {
  font-size: 13px;
  margin: 8px 0 0;
}
.pl-topic {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.pl-status {
  padding: 0 20px 16px;
  margin: 0;
  font-size: 13px;
  color: #b42318;
}
.pl-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
.pl-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}
.pl-auto {
  font-size: 13px;
  font-weight: 600;
}
.pl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pl-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pl-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pl-link-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pl-link-field > span {
  font-size: 11px;
  font-weight: 700;
  color: #667085;
}
.pl-link-field textarea.pl-input {
  min-height: 62px;
  resize: vertical;
}
.pl-capacity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.pl-capacity {
  border: 1px solid #d6e0ee;
  background: #f5f8fc;
  border-radius: 10px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pl-capacity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.pl-capacity-head strong {
  font-size: 14px;
  color: #355b91;
}
.pl-capacity-meter {
  display: grid;
  grid-template-columns: repeat(var(--slots, 2), minmax(0, 1fr));
  gap: 7px;
}
.pl-capacity-meter i {
  height: 7px;
  border-radius: 99px;
  background: #dce3ec;
}
.pl-capacity-meter i.active {
  background: #527db8;
}
.pl-slot-tag,
.pl-wait-tag {
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 3px 6px;
}
.pl-slot-tag {
  background: #e6eef9;
  color: #3f6599;
}
.pl-wait-tag {
  background: #f4ead2;
  color: #8a6a27;
}
.pl-wait-copy {
  font-size: 11px;
  color: #8a6a27;
  margin: 0;
}
.pl-log {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pl-automation {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 14px;
}
.pl-automation > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-weight: 700;
  list-style: none;
}
.pl-automation > summary small {
  color: var(--muted);
  font-weight: 500;
}
.pl-automation > .pl-panel {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.pl-board-count {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
}
.pl-board-empty {
  grid-column: 1/-1;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 760px) {
  .pl-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .pl-page-head .pl-actions {
    width: 100%;
  }
  .pl-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .pl-mode-tabs {
    overflow-x: auto;
  }
  .pl-board-search {
    width: 100%;
    max-width: none;
  }
  .pl-board {
    grid-auto-columns: minmax(84vw, 84vw);
  }
  .pl-col {
    min-height: 0;
    max-height: calc(100vh - 180px);
  }
  .pl-capacity-grid {
    grid-template-columns: 1fr;
  }
  .pl-link-grid {
    grid-template-columns: 1fr;
  }
}
/* style.css 의 전역 label·p·input 규칙이 대화 상자와 카드 안을 흩뜨리지 않게 되돌린다 */
.pl-dialog p,
.pl-dialog h2,
.pl-dialog h3,
.pipeline-panel p,
.pl-card {
  text-align: left;
}
.pl-dialog label,
.pl-checks label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: inherit;
  font-weight: inherit;
}
.pl-dialog .pl-auto {
  font-weight: 600;
}
.pl-dialog input[type='checkbox'] {
  width: auto;
  height: auto;
  margin: 0;
  flex: none;
}
.pl-dialog-body {
  align-items: stretch;
}
.pl-dialog-body > button,
.pl-panel > button {
  align-self: flex-start;
}
.channel-upload {
  white-space: nowrap;
}
.pl-follow {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pl-follow > h3 {
  font-size: 14px;
  margin: 0;
}
.pl-follow .pl-checks {
  flex-direction: column;
  gap: 6px;
}
.pl-follow label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  text-align: left;
  font-size: 13px;
  color: inherit;
  font-weight: inherit;
  width: auto;
}
.pl-follow input[type='checkbox'] {
  width: auto;
  height: auto;
  margin: 3px 0 0;
  flex: none;
}
.pl-follow .pl-actions a {
  font-weight: 600;
}
.ui-dialog {
  width: min(760px, calc(100vw - 32px));
}
.ui-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ui-dialog label.ui-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.ui-label {
  font-size: 13px;
  font-weight: 600;
}
.ui-thumb {
  max-width: 220px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.ui-pre {
  white-space: pre-wrap;
  font: 12px/1.5 inherit;
  background: #f6f7f9;
  border-radius: 8px;
  padding: 10px;
  margin: 0;
  max-height: 260px;
  overflow: auto;
}
.pl-redo {
  border-color: #d92d20;
  color: #b42318;
  font-weight: 600;
}
/* 카드 관리: 채널 대상 · 추가 지시 · 진행 */
.pl-manage {
  border-color: #c9d6e8;
  background: #f8fafd;
}
.pl-manage > h3 {
  font-size: 14px;
  margin: 0;
}
.pl-manage .target-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}
.pl-manage .target-head h3 {
  margin: 0;
}
.pl-manage .helper {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
}
.pl-manage .target-row {
  background: #fff;
}
.pl-instructions,
.pl-flow,
.pl-video-extra {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid #e3e8ef;
  padding-top: 10px;
}
.pl-instructions > button,
.pl-video-extra > button {
  align-self: flex-start;
}
.pl-instruction-tag {
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 3px 6px;
  background: #efe9fb;
  color: #5530a0;
}
.pl-danger {
  border-color: #f0aaa2 !important;
  color: #9a2a1d !important;
}
.pl-card .target-chips {
  margin: 2px 0 0;
}
/* 분류: 분야(진한 칩)·선정 이유(연한 칩). 추정값은 점선 */
.pl-class {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pl-genre,
.pl-reason {
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
  border: 1px solid transparent;
}
.pl-genre {
  background: #243247;
  color: #fff;
}
.pl-reason {
  background: #fff4e0;
  color: #8a5a00;
  border-color: #f0d9a8;
}
.pl-genre.is-estimated {
  background: #fff;
  color: #243247;
  border: 1px dashed #8391a7;
}
.pl-reason.is-estimated {
  background: #fff;
  border-style: dashed;
}
.pl-why {
  background: #fffdf7;
  border-color: #efe2c2;
}
.pl-why p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
.pl-classify {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pl-classify .pl-actions select {
  width: auto;
  min-width: 160px;
}
.pl-board-genre {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
  background: #fff;
}
/* 여러 카드 한 번에 처리 */
.pl-bulk {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #1f2a3a;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px #0f172a40;
}
.pl-bulk b {
  margin-right: 6px;
  font-size: 13px;
}
.pl-bulk .outline-button {
  background: #fff;
  font-size: 12px;
  padding: 6px 10px;
}
.pl-bulk .text-button {
  color: #cbd5e1;
}
.pl-bulk-select,
.pl-bulk select.pl-bulk-select {
  width: auto !important;
  flex: 0 0 auto;
  max-width: 180px;
  border-radius: 8px;
  border: 0;
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
}
.pl-card.is-selectable .pl-card-main {
  cursor: pointer;
}
.pl-card.is-selected {
  outline: 3px solid #527db8;
  outline-offset: -1px;
}
.pl-select {
  width: 16px;
  height: 16px;
  margin: 0;
}
.pl-col-all {
  font-size: 11px;
}
.pl-hold {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff6e5;
  border: 1px solid #f3d9a4;
  font-size: 12px;
  line-height: 1.5;
  color: #5b4410;
}
.pl-hold b {
  font-size: 12px;
  color: #7a5200;
}
.pl-hold-next {
  color: #1f4f93;
}
.pl-schedule-tag {
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 3px 6px;
  background: #e3f4ea;
  color: #15603a;
}
/* 자동 진행 멈춤 경고(autopilotAlert) */
.pl-alert {
  background: #fbece9;
  border: 1px solid #e7b7ab;
  border-left: 4px solid #b56554;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  color: #7a3a2c;
}
.pl-alert b {
  display: block;
  font-size: 14px;
}
.pl-alert p {
  margin: 4px 0;
  font-size: 13px;
  color: #5c2d23;
}
.pl-alert small {
  color: #93564a;
  overflow-wrap: anywhere;
}
