.vendor-production-page {
  --vp-navy: #073665;
  --vp-blue: #0a4f8f;
  --vp-border: #d9e3ef;
  --vp-soft: #f4f8fc;
  color: #15304f;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.vp-loading,
.vp-error,
.vp-empty {
  min-height: 260px;
  border: 1px solid var(--vp-border, #d9e3ef);
  border-radius: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: #607792;
}

.vp-query-pending {
  min-height: 330px;
  border: 1px solid var(--vp-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px;
  text-align: center;
  color: #607792;
}
.vp-query-pending > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid #d4e3f2;
  border-radius: 999px;
  background: #edf5fd;
  color: #3970a9;
  font-size: 11px;
  font-weight: 900;
}
.vp-query-pending strong { color: #163b64; font-size: 17px; }
.vp-query-pending p { max-width: 640px; margin: 0; font-size: 12px; line-height: 1.6; }
.vp-toolbar select:disabled { background: #f1f4f7; color: #8a99a9; cursor: not-allowed; }

.vp-loading span,
.vp-small-loader {
  width: 26px;
  height: 26px;
  border: 3px solid #dce8f4;
  border-top-color: #0a4f8f;
  border-radius: 50%;
  animation: vp-spin .7s linear infinite;
}

@keyframes vp-spin { to { transform: rotate(360deg); } }

.vp-toolbar {
  border: 1px solid var(--vp-border);
  border-radius: 14px;
  background: #fff;
  padding: 15px 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 4px 18px rgba(20, 57, 94, .04);
}

.vp-toolbar-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.vp-toolbar label {
  min-width: 145px;
  display: grid;
  gap: 6px;
}

.vp-toolbar label > span {
  color: #607792;
  font-size: 12px;
  font-weight: 700;
}

.vp-toolbar input,
.vp-toolbar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c9d8e8;
  border-radius: 7px;
  background: #fff;
  color: #15304f;
  padding: 0 11px;
  font-size: 13px;
}

.vp-toolbar select[data-vp-field="product_id"] { min-width: 215px; }
.vp-toolbar select[data-vp-field="lot_id"] { min-width: 210px; }
.vp-toolbar .vp-date-end { min-width: 145px; }
.vp-toolbar .vp-date-end > span { text-align: center; }
.vp-toolbar .vp-query { min-width: 185px; }

.vp-affiliation-label strong {
  min-height: 38px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  border-radius: 7px;
  background: #eef5fc;
  border: 1px solid #cbddec;
  color: #073665;
}

.vp-toolbar-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.vp-toolbar-actions button { min-width: 76px; min-height: 38px; }

.vp-metrics {
  display: grid;
  gap: 10px;
}

.vp-metrics-six { grid-template-columns: repeat(6, minmax(130px, 1fr)); }
.vp-metrics-five { grid-template-columns: repeat(5, minmax(150px, 1fr)); }

.vp-metric {
  box-sizing: border-box;
  height: 72px;
  min-height: 72px;
  padding: 10px 14px;
  border: 1px solid var(--vp-border);
  border-radius: 13px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(18, 57, 97, .04);
}

.vp-metric-dot {
  width: 9px;
  height: 30px;
  border-radius: 8px;
  background: #176ec1;
  box-shadow: 0 0 0 6px #e9f3fc;
}

.vp-metric div { min-width: 0; display: grid; gap: 3px; }
.vp-metric small { color: #71869e; font-size: 12px; font-weight: 700; }
.vp-metric strong { color: #15304f; font-size: 19px; line-height: 1.1; }
.vp-metric p { margin: 0; color: #8799ac; font-size: 11px; }
.vp-metric.green .vp-metric-dot { background: #079660; box-shadow: 0 0 0 6px #e4f7ef; }
.vp-metric.red .vp-metric-dot { background: #d44343; box-shadow: 0 0 0 6px #fdecec; }
.vp-metric.purple .vp-metric-dot { background: #7b55c7; box-shadow: 0 0 0 6px #f1eafa; }
.vp-metric.orange .vp-metric-dot { background: #ed8b22; box-shadow: 0 0 0 6px #fff2df; }
.vp-metric.gray .vp-metric-dot { background: #8495a9; box-shadow: 0 0 0 6px #edf1f5; }
.vp-metric.navy .vp-metric-dot { background: #073665; box-shadow: 0 0 0 6px #e4edf7; }

.vp-section-head,
.vp-data-card > header,
.vp-notes-card > header,
.vp-result-list > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.vp-section-head strong,
.vp-data-card > header strong,
.vp-notes-card > header strong,
.vp-result-list > header strong {
  color: #0b3158;
  font-size: 17px;
}

.vp-section-head p,
.vp-data-card > header p,
.vp-notes-card > header p,
.vp-result-list > header p {
  margin: 4px 0 0;
  color: #71869e;
  font-size: 12px;
}

.vp-section-head > span,
.vp-data-card > header > span,
.vp-notes-card > header > span,
.vp-result-list > header > span {
  border-radius: 999px;
  padding: 6px 11px;
  background: #eef5fc;
  color: #0a4f8f;
  font-size: 12px;
  font-weight: 800;
}

.vp-product-process-groups { display: grid; gap: 15px; min-width: 0; }

.vp-process-card,
.vp-data-card,
.vp-notes-card,
.vp-result-list,
.vp-result-detail {
  min-width: 0;
  border: 1px solid var(--vp-border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(20, 57, 94, .04);
}

.vp-process-card > header {
  min-height: 62px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: linear-gradient(90deg, #f7faff, #fff);
  border-bottom: 1px solid #dbe5ef;
}

.vp-process-card > header div { display: flex; align-items: center; gap: 10px; }
.vp-process-card > header strong { color: #073665; font-size: 16px; }
.vp-process-card > header span { border-radius: 6px; background: #e6f0fa; padding: 4px 8px; color: #296394; font-size: 11px; font-weight: 700; }
.vp-process-card > header p { margin: 0; color: #637a93; font-size: 12px; font-weight: 700; }

.vp-table-scroll { max-width: 100%; overflow: auto; }

.vp-process-table,
.vp-day-table,
.vp-range-table,
.vp-result-list table,
.vp-dialog-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.vp-process-table th,
.vp-day-table th,
.vp-range-table th,
.vp-result-list th,
.vp-dialog-table th {
  height: 45px;
  padding: 7px 9px;
  background: var(--vp-navy);
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.2);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.vp-process-table th small { display: block; color: #a9c8e5; font-size: 9px; }

.vp-process-table td,
.vp-day-table td,
.vp-range-table td,
.vp-result-list td,
.vp-dialog-table td {
  height: 58px;
  padding: 8px 9px;
  background: #fff;
  border-right: 1px solid #dbe5ef;
  border-bottom: 1px solid #dbe5ef;
  color: #294763;
  font-size: 12px;
  text-align: center;
}

.vp-process-table tbody tr:nth-child(even) td,
.vp-day-table tbody tr:nth-child(even) td { background: #f8fbfe; }

.vp-process-table .vp-sticky-one { position: sticky; left: 0; z-index: 3; width: 240px; min-width: 240px; text-align: left; }
.vp-process-table .vp-sticky-two { position: sticky; left: 240px; z-index: 3; width: 90px; min-width: 90px; }
.vp-process-table .vp-sticky-three { position: sticky; left: 330px; z-index: 3; width: 145px; min-width: 145px; box-shadow: 7px 0 10px rgba(31, 67, 101, .08); }
.vp-process-table thead .vp-sticky-one,
.vp-process-table thead .vp-sticky-two,
.vp-process-table thead .vp-sticky-three { z-index: 5; background: var(--vp-navy); }
.vp-process-table td strong { display: block; color: #0b3158; font-size: 13px; }
.vp-process-table td small { display: block; margin-top: 4px; color: #7a8fa5; font-size: 10px; }
.vp-process-table td > b { color: #0b3158; font-size: 15px; }

.vp-rate { width: 78px; height: 7px; margin: 0 auto 5px; overflow: hidden; border-radius: 9px; background: #e6edf4; }
.vp-rate span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #149467, #3eb58d); }

.vp-process-state {
  width: 100%;
  min-height: 43px;
  border: 1px solid #d4dee8;
  border-radius: 8px;
  background: #f7f9fb;
  display: grid;
  place-items: center;
  gap: 1px;
  cursor: pointer;
  color: #667b91;
}

.vp-process-state span { font-size: 10px; font-weight: 800; }
.vp-process-state strong { color: inherit !important; font-size: 12px !important; }
.vp-process-state small { margin: 0 !important; color: inherit !important; font-size: 9px !important; }
.vp-process-state.done { border-color: #94d5bd; background: #e8f7f0; color: #08754b; }
.vp-process-state.running { border-color: #8fc0e9; background: #eaf4fc; color: #0a62a8; }
.vp-process-state.issue { border-color: #eca1a1; background: #fdecf0; color: #bb2c3c; }
.vp-process-state:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(31, 73, 112, .12); }
.vp-process-missing { color: #a2afbd; font-size: 10px; }

.vp-view-switch {
  width: max-content;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 9px;
  background: #eaf1f8;
}

.vp-view-switch button {
  min-width: 100px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #637a93;
  font-weight: 800;
  cursor: pointer;
}

.vp-view-switch button.active { background: #073665; color: #fff; box-shadow: 0 3px 8px rgba(7, 54, 101, .2); }

.vp-data-card > header,
.vp-notes-card > header,
.vp-result-list > header { min-height: 69px; padding: 13px 16px; border-bottom: 1px solid var(--vp-border); }
.vp-day-table { min-width: 980px; }
.vp-day-table th:nth-child(1) { width: 240px; }
.vp-day-table th:nth-child(2) { width: 160px; }
.vp-day-table th:nth-child(3) { width: 170px; }
.vp-day-table td:first-child { text-align: left; }
.vp-day-table td strong { display: block; color: #0b3158; }
.vp-day-table td small { display: block; margin-top: 3px; color: #7a8fa5; font-size: 10px; }
.vp-good { color: #078354 !important; font-weight: 800; }
.vp-bad { color: #c93643 !important; font-weight: 800; }

.vp-status,
.vp-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf1f5;
  color: #65778b;
  font-size: 10px;
  font-weight: 800;
}

.vp-status.done,
.vp-result-badge.pass { background: #e2f6ed; color: #08764c; }
.vp-status.running { background: #e5f1fb; color: #0962a9; }
.vp-status.issue,
.vp-result-badge.fail { background: #fce8eb; color: #bd2e3e; }
.vp-result-badge.cancel { background: #eceff3; color: #67798b; }

.vp-range-scroll { max-height: 600px; }
.vp-range-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.vp-range-head-actions > span { border-radius: 999px; padding: 6px 11px; background: #eef5fc; color: #0a4f8f; font-size: 12px; font-weight: 800; }
.vp-range-edit-button { height: 32px; padding: 0 14px; border: 1px solid #a9c6df; border-radius: 7px; background: #fff; color: #0a4f8f; font-size: 12px; font-weight: 800; cursor: pointer; }
.vp-range-edit-button:hover { border-color: #0a5a9c; background: #f2f8fd; }
.vp-range-edit-button.active { border-color: #073665; background: #073665; color: #fff; }
.vp-range-card > .vp-plan-editor { margin: 12px 14px; }
.vp-range-table th { position: sticky; top: 0; z-index: 4; }
.vp-range-table th:not(.fixed) { width: 80px; }
.vp-range-table td { height: 36px; padding: 5px 7px; }
.vp-range-table .fixed { position: sticky; z-index: 3; }
.vp-range-table thead .fixed { z-index: 6; }
.vp-range-table .product { left: 0; width: 200px; min-width: 200px; }
.vp-range-table .process { left: var(--vp-range-process-left, 200px); width: 120px; min-width: 120px; }
.vp-range-table .metric { left: var(--vp-range-metric-left, 320px); width: 80px; min-width: 80px; }
.vp-range-table .total { left: var(--vp-range-total-left, 400px); width: 80px; min-width: 80px; box-shadow: 7px 0 10px rgba(31, 67, 101, .08); }
.vp-range-table tbody .fixed { background: #fff; }
.vp-range-table tbody tr.good td:not(.fixed) { background: #f3fbf7; color: #08764c; }
.vp-range-table tbody tr.bad td:not(.fixed) { background: #fff7f8; color: #bd2e3e; }
.vp-range-table tbody tr.rate td:not(.fixed) { background: #f7f5fc; color: #7250b4; }
.vp-range-table tbody tr.good td.total { background: #f3fbf7; color: #08764c; }
.vp-range-table tbody tr.bad td.total { background: #fff7f8; color: #bd2e3e; }
.vp-range-table tbody tr.rate td.total { background: #f7f5fc; color: #7250b4; }
.vp-range-table td.product { text-align: left; }
.vp-range-table td.product strong,
.vp-range-table td.product small { display: block; }
.vp-range-table td.product small { margin-top: 4px; color: #7a8fa5; font-size: 10px; }
.vp-range-table th small { display: block; margin-top: 2px; color: #acc9e3; font-size: 9px; }

.vp-plan-editor {
  min-width: 0;
  border: 1px solid #bfd5e8;
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 5px 18px rgba(20, 57, 94, .05);
}

.vp-plan-editor > header {
  min-height: 48px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #073665;
  color: #fff;
}

.vp-plan-editor > header small,
.vp-plan-editor > header strong { display: block; }
.vp-plan-editor > header small { margin-bottom: 2px; color: #9fc5e5; font-size: 9px; letter-spacing: .12em; }
.vp-plan-editor > header strong { font-size: 16px; }
.vp-plan-mode { display: flex; gap: 4px; padding: 3px; border-radius: 8px; background: rgba(255,255,255,.12); }
.vp-plan-mode button { min-width: 96px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: #c9dced; font-size: 12px; font-weight: 800; cursor: pointer; }
.vp-plan-mode button.active { background: #fff; color: #073665; box-shadow: 0 2px 7px rgba(0,0,0,.18); }
.vp-plan-editor-body { padding: 11px 14px; display: grid; gap: 10px; }

.vp-plan-manual-guide {
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #d7e4ef;
  border-radius: 9px;
  background: #f7fafd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.vp-plan-manual-guide strong { color: #153b61; font-size: 13px; }
.vp-plan-manual-guide p { margin: 3px 0 0; color: #71869b; font-size: 11px; }
.vp-plan-manual-guide > span { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #e6f2fc; color: #1769ac; font-size: 10px; font-weight: 800; }
.vp-plan-paste-grid { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.35fr); gap: 10px; }
.vp-plan-paste-box,
.vp-plan-preview { min-width: 0; padding: 10px 11px; border: 1px solid #d5e2ee; border-radius: 9px; background: #f9fbfd; }
.vp-plan-paste-box { display: grid; gap: 6px; }
.vp-plan-paste-box > span,
.vp-plan-preview-title strong { color: #153b61; font-size: 12px; font-weight: 800; }
.vp-plan-paste-box textarea { box-sizing: border-box; width: 100%; min-height: 88px; max-height: 180px; resize: vertical; padding: 9px 10px; border: 1px dashed #a9bfd3; border-radius: 7px; background: #fff; color: #294763; font: 11px/1.45 Consolas, "Malgun Gothic", sans-serif; }
.vp-plan-paste-box textarea:focus { outline: 2px solid #7bb5e7; border-color: #2a7fc3; }
.vp-plan-paste-box > small { color: #768ba0; font-size: 10px; }
.vp-plan-preview.has-error { border-color: #efb3ba; background: #fff9fa; }
.vp-plan-preview-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vp-plan-preview-title button { min-width: 145px; height: 32px; padding: 0 12px; }
.vp-plan-preview-stats { margin-top: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.vp-plan-preview-stats span,
.vp-plan-summary span { min-width: 0; padding: 7px 9px; border: 1px solid #dce7f1; border-radius: 7px; background: #fff; }
.vp-plan-preview-stats small,
.vp-plan-preview-stats strong,
.vp-plan-summary small,
.vp-plan-summary strong { display: block; }
.vp-plan-preview-stats small,
.vp-plan-summary small { color: #7a8da1; font-size: 9px; font-weight: 700; }
.vp-plan-preview-stats strong,
.vp-plan-summary strong { margin-top: 2px; color: #0d477b; font-size: 14px; }
.vp-plan-validation { margin: 8px 0 0; font-size: 10px; font-weight: 800; }
.vp-plan-validation.is-ok { color: #08764c; }
.vp-plan-validation.is-error { color: #bd2e3e; }
.vp-plan-ready { margin: 5px 0 0; color: #70859a; font-size: 10px; }
.vp-plan-errors { max-height: 76px; margin: 6px 0 0; padding: 7px 8px 7px 24px; overflow: auto; border-radius: 6px; background: #fff0f2; color: #a92b3b; font-size: 10px; }
.vp-plan-summary { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 7px; }
.vp-plan-editor > footer { min-height: 46px; padding: 7px 14px; border-top: 1px solid #dce6ef; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fafcfe; }
.vp-plan-editor > footer p { margin: 0; color: #677d94; font-size: 11px; }
.vp-plan-editor > footer p b { color: #0b5c9f; }
.vp-plan-editor > footer > div { display: flex; gap: 7px; }
.vp-plan-editor > footer button { min-width: 104px; height: 34px; }

.vp-range-table tbody tr.plan td:not(.product):not(.process) { background: #fff9df; color: #624d0d; }
.vp-range-table tbody tr.plan td.total { background: #fff5c8; }
.vp-range-table .vp-plan-cell { padding: 3px 4px; }
.vp-plan-cell input {
  box-sizing: border-box;
  width: 100%;
  min-width: 58px;
  height: 29px;
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #4b3a05;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.vp-plan-cell input:hover { border-color: #d8be59; background: #fffdf2; }
.vp-plan-cell input:focus { outline: 2px solid #69aee6; border-color: #1672ba; background: #fff; }
.vp-plan-cell.is-changed { background: #eaf5ff !important; box-shadow: inset 0 0 0 2px #3190d5; }
.vp-plan-cell.from-paste { background: #e5f3ff !important; }
.vp-plan-cell input.is-invalid { border-color: #d6424f; background: #fff0f1; color: #bd2e3e; }

.vp-notes-list { padding: 5px 16px 13px; display: grid; }
.vp-notes-list article { padding: 11px 0; display: flex; gap: 12px; border-bottom: 1px solid #e5ecf3; }
.vp-notes-list article:last-child { border-bottom: 0; }
.vp-notes-list article > span { height: max-content; border-radius: 5px; padding: 4px 7px; background: #e9f1f8; color: #31658f; font-size: 10px; font-weight: 800; }
.vp-notes-list article > span.danger { background: #fce8eb; color: #bd2e3e; }
.vp-notes-list article > span.warning { background: #fff0da; color: #b8660b; }
.vp-notes-list article div { flex: 1; min-width: 0; }
.vp-notes-list strong { color: #15304f; font-size: 12px; }
.vp-notes-list p { margin: 4px 0; color: #506a84; font-size: 12px; }
.vp-notes-list small { color: #8b9bad; font-size: 10px; }
.vp-note-empty { margin: 0; padding: 22px; text-align: center; color: #8395a8; font-size: 12px; }

.vp-result-toolbar .vp-toolbar-fields { row-gap: 11px; }
.vp-result-workspace { min-width: 0; display: grid; grid-template-columns: minmax(650px, 1.45fr) minmax(360px, .75fr); gap: 14px; align-items: stretch; }
.vp-result-list { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.vp-result-list-scroll { max-height: 650px; overflow: auto; }
.vp-result-list table { min-width: 980px; }
.vp-result-list th { position: sticky; top: 0; z-index: 2; }
.vp-result-list th:nth-child(1) { width: 145px; }
.vp-result-list th:nth-child(2) { width: 125px; }
.vp-result-list th:nth-child(3) { width: 205px; }
.vp-result-list th:nth-child(4) { width: 140px; }
.vp-result-list th:nth-child(5) { width: 170px; }
.vp-result-list th:nth-child(6) { width: 80px; }
.vp-result-list th:nth-child(7) { width: 100px; }
.vp-result-list td { height: 52px; cursor: pointer; }
.vp-result-list td:nth-child(3) { text-align: left; }
.vp-result-list td strong,
.vp-result-list td small { display: block; }
.vp-result-list td small { margin-top: 3px; color: #7f91a4; font-size: 9px; }
.vp-result-list tr:hover td { background: #f1f7fd; }
.vp-result-list tr.selected td { background: #e7f2fc; box-shadow: inset 0 1px #b8d5ed, inset 0 -1px #b8d5ed; }
.vp-result-list tr.selected td:first-child { box-shadow: inset 4px 0 #0a5b9f, inset 0 1px #b8d5ed, inset 0 -1px #b8d5ed; }

.vp-result-detail { min-height: 460px; }
.vp-detail-placeholder { min-height: 450px; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: #7a8fa5; }
.vp-detail-placeholder strong { color: #15304f; font-size: 16px; }
.vp-detail-placeholder p { margin: 0; font-size: 12px; }
.vp-detail-placeholder.error strong { color: #bd2e3e; }
.vp-result-detail > header { min-height: 77px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; background: #073665; color: #fff; }
.vp-result-detail > header small,
.vp-result-detail > header strong { display: block; }
.vp-result-detail > header small { margin-bottom: 4px; color: #9fc2df; font-size: 9px; letter-spacing: .12em; }
.vp-result-detail > header strong { font-size: 17px; }

.vp-detail-summary { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #dfe8f1; }
.vp-detail-summary > div { padding: 13px 15px; display: grid; gap: 3px; }
.vp-detail-summary > div + div { border-left: 1px solid #dfe8f1; }
.vp-detail-summary small { color: #7d90a4; font-size: 10px; font-weight: 700; }
.vp-detail-summary strong { color: #15304f; font-size: 13px; }
.vp-detail-summary span { color: #6d8298; font-size: 10px; }

.vp-detail-grid { margin: 0; padding: 13px 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; background: #f8fbfe; }
.vp-detail-grid div { min-width: 0; padding: 9px 10px; border: 1px solid #dfe8f1; border-radius: 7px; background: #fff; }
.vp-detail-grid .wide { grid-column: 1 / -1; }
.vp-detail-grid dt { margin-bottom: 4px; color: #8092a5; font-size: 9px; font-weight: 700; }
.vp-detail-grid dd { margin: 0; overflow-wrap: anywhere; color: #294763; font-size: 11px; font-weight: 700; }

.vp-change-history { border-top: 1px solid #dfe8f1; }
.vp-change-head { padding: 12px 15px; display: flex; justify-content: space-between; border-bottom: 1px solid #e3ebf3; }
.vp-change-head strong { color: #15304f; font-size: 13px; }
.vp-change-head span { color: #74889d; font-size: 11px; }
.vp-timeline { max-height: 270px; overflow: auto; padding: 12px 15px; }
.vp-timeline article { position: relative; padding: 0 0 17px 21px; }
.vp-timeline article::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: -2px; width: 1px; background: #cbd9e7; }
.vp-timeline article:last-child::before { display: none; }
.vp-timeline article i { position: absolute; left: 0; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #0a5b9f; box-shadow: 0 0 0 4px #e4f0fa; }
.vp-timeline article strong { color: #15304f; font-size: 11px; }
.vp-timeline article p { margin: 3px 0; color: #516b84; font-size: 10px; }
.vp-timeline blockquote { margin: 5px 0; padding: 6px 8px; border-left: 3px solid #aac5dc; background: #f3f7fb; color: #536d86; font-size: 10px; }
.vp-timeline article small { color: #8a9bad; font-size: 9px; }

.vp-empty-cell { height: 120px !important; color: #8194a8 !important; text-align: center !important; }

.vp-process-dialog {
  --vp-navy: #073665;
  --vp-border: #d8e4ef;
  width: min(1120px, calc(100vw - 48px));
  height: min(720px, calc(100vh - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(9, 33, 58, .32);
}

.vp-process-dialog::backdrop { background: rgba(10, 31, 53, .58); }
.vp-process-dialog form { height: 100%; margin: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; }
.vp-process-dialog form > header { min-height: 78px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; background: #073665; color: #fff; cursor: move; user-select: none; touch-action: none; }
.vp-process-dialog.is-dragging form > header { cursor: grabbing; }
.vp-process-dialog header small,
.vp-process-dialog header strong,
.vp-process-dialog header p { display: block; margin: 0; }
.vp-process-dialog header small { color: #9fc2df; font-size: 9px; letter-spacing: .12em; }
.vp-process-dialog header strong { margin-top: 3px; font-size: 18px; }
.vp-process-dialog header p { margin-top: 4px; color: #bed5e9; font-size: 11px; }
.vp-process-dialog header button { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 23px; cursor: pointer; }
.vp-dialog-metrics { padding: 13px 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; background: #f5f8fb; }
.vp-dialog-metrics .vp-metric { min-height: 75px; }
.vp-dialog-table { min-height: 260px; max-height: none; overflow: auto; }
.vp-dialog-table table { width: 1093px !important; min-width: 1093px !important; max-width: none !important; }
.vp-dialog-table th { position: sticky; top: 0; z-index: 2; background: #073665; color: #fff; }
.vp-process-dialog .vp-dialog-table th:nth-child(1),
.vp-process-dialog .vp-dialog-table td:nth-child(1) { width: 58px !important; }
.vp-process-dialog .vp-dialog-table th:nth-child(2),
.vp-process-dialog .vp-dialog-table td:nth-child(2),
.vp-process-dialog .vp-dialog-table th:nth-child(3),
.vp-process-dialog .vp-dialog-table td:nth-child(3) { width: 170px !important; }
.vp-process-dialog .vp-dialog-table th:nth-child(4),
.vp-process-dialog .vp-dialog-table td:nth-child(4) { width: 110px !important; }
.vp-process-dialog .vp-dialog-table th:nth-child(5),
.vp-process-dialog .vp-dialog-table td:nth-child(5) { width: 165px !important; }
.vp-process-dialog .vp-dialog-table th:nth-child(6),
.vp-process-dialog .vp-dialog-table td:nth-child(6) { width: 140px !important; }
.vp-process-dialog .vp-dialog-table th:nth-child(7),
.vp-process-dialog .vp-dialog-table td:nth-child(7) { width: 280px !important; }
.vp-detail-row.pass > td { background: #edf9f2 !important; }
.vp-detail-row.waiting > td { background: #f1f3f5 !important; }
.vp-detail-row.fail > td { background: #fff0f1 !important; }
.vp-detail-row.blocked > td { background: #f8fafc !important; color: #7b8998; }
.vp-detail-status { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.vp-detail-status.pass { background: #d8f3e4; color: #087849; }
.vp-detail-status.waiting { background: #e2e6ea; color: #536273; }
.vp-detail-status.fail { background: #ffdce0; color: #bc2638; }
.vp-detail-status.blocked { background: #e9eef4; color: #708094; }
.vp-process-dialog-loading { height: 100%; min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #607792; }

@media (max-width: 1400px) {
  .vp-metrics-six { grid-template-columns: repeat(3, 1fr); }
  .vp-metrics-five { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
  .vp-result-workspace { grid-template-columns: minmax(580px, 1.25fr) minmax(330px, .75fr); }
}

@media (max-width: 1050px) {
  .vp-toolbar { align-items: stretch; flex-direction: column; }
  .vp-toolbar-actions { justify-content: flex-end; }
  .vp-metrics-five { grid-template-columns: repeat(3, 1fr); }
  .vp-result-workspace { grid-template-columns: 1fr; }
  .vp-result-detail { min-height: 0; }
  .vp-plan-paste-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .vendor-production-page { gap: 11px; }
  .vp-toolbar { padding: 12px; }
  .vp-toolbar-fields { display: grid; grid-template-columns: 1fr 1fr; }
  .vp-toolbar label,
  .vp-toolbar select[data-vp-field="product_id"],
  .vp-toolbar select[data-vp-field="lot_id"] { min-width: 0; }
  .vp-toolbar .vp-query { min-width: 0; grid-column: 1 / -1; }
  .vp-metrics-six,
  .vp-metrics-five { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .vp-metric { min-height: 78px; padding: 12px; }
  .vp-metric strong { font-size: 18px; }
  .vp-section-head { align-items: flex-start; }
  .vp-process-card > header { align-items: flex-start; }
  .vp-process-card > header div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .vp-view-switch { width: 100%; }
  .vp-view-switch button { flex: 1; }
  .vp-process-dialog { width: calc(100vw - 16px); height: calc(100vh - 16px); max-height: calc(100vh - 16px); }
  .vp-dialog-metrics { grid-template-columns: repeat(2, 1fr); }
  .vp-dialog-metrics .vp-metric { min-height: 65px; }
  .vp-plan-editor > header,
  .vp-plan-editor > footer,
  .vp-plan-manual-guide { align-items: stretch; flex-direction: column; }
  .vp-plan-mode { width: 100%; }
  .vp-plan-mode button { flex: 1; }
  .vp-plan-summary { grid-template-columns: repeat(2, 1fr); }
  .vp-plan-editor > footer > div { justify-content: flex-end; }
  .vp-range-card > header { align-items: flex-start; }
  .vp-range-head-actions { flex-wrap: wrap; }
  .vp-range-card > .vp-plan-editor { margin: 9px; }
}
/* 생산관리 현황판은 페이지 전환 때 높이가 흔들리지 않도록 같은 72px로 맞춥니다. */
.vp-progress-page > .vp-metrics .vp-metric,
.vp-daily-page > .vp-metrics .vp-metric,
.vp-results-page > .vp-metrics .vp-metric {
  height: 72px;
  min-height: 72px;
}
