.vendor-material-active .content-area { background: #f4f7fb; }
.vendor-material-module { padding: 0; }
.vendor-material-page { display: grid; gap: 16px; color: #183957; }
.vendor-material-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 24px 26px; border: 1px solid #dbe5ef; border-radius: 10px; background: linear-gradient(135deg, #062f60 0%, #0b4e8c 68%, #1475b8 100%); color: #fff; box-shadow: 0 10px 24px rgba(3, 43, 93, .14); }
.vendor-material-hero > div:first-child > span { display: block; margin-bottom: 7px; color: #90d0ff; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.vendor-material-hero h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.vendor-material-hero p { margin: 8px 0 0; color: #d9ebfb; font-size: 13px; }
.vendor-material-lot-control { display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.vendor-material-lot-control label { display: grid; gap: 6px; min-width: 210px; }
.vendor-material-lot-control label span { color: #bfdef6; font-size: 11px; font-weight: 800; }
.vendor-material-lot-control select { height: 40px; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; padding: 0 36px 0 12px; background: rgba(255,255,255,.97); color: #153d63; font-weight: 700; }
.vendor-material-lot-control .secondary-action { min-height: 40px; border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.12); color: #fff; }
.vendor-material-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vendor-material-stats article { position: relative; overflow: hidden; min-height: 88px; border: 1px solid #dce6f0; border-radius: 9px; padding: 11px 16px; background: #fff; box-shadow: 0 5px 14px rgba(24, 57, 87, .06); }
.vendor-material-stats article::after { content: ""; position: absolute; right: -16px; top: -24px; width: 68px; height: 68px; border-radius: 50%; background: #eaf4fd; }
.vendor-material-stats article > span { position: relative; z-index: 1; display: block; color: #678098; font-size: 11px; font-weight: 800; }
.vendor-material-stats strong { position: relative; z-index: 1; display: block; margin-top: 3px; color: #073d77; font-size: 24px; letter-spacing: -.04em; }
.vendor-material-stats strong small { margin-left: 5px; color: #70869a; font-size: 11px; }
.vendor-material-stats p { position: relative; z-index: 1; margin: 2px 0 0; color: #8a9aaa; font-size: 10px; }
.vendor-material-stats article.is-warning { border-color: #f1c7bd; background: #fff9f7; }
.vendor-material-stats article.is-warning strong { color: #bd3d27; }
.vendor-material-model-panel, .vendor-material-card { border: 1px solid #dbe5ef; border-radius: 9px; background: #fff; box-shadow: 0 5px 14px rgba(24, 57, 87, .05); }
.vendor-material-model-panel { padding: 12px 16px; }
.vendor-material-model-head, .vendor-material-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.vendor-material-model-head > div:last-child, .vendor-material-card-head > div:last-child { display: flex; gap: 7px; flex-wrap: wrap; }
.vendor-material-model-head span { color: #1e6cac; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.vendor-material-model-head h3 { margin: 2px 0 0; color: #123d64; font-size: 16px; }
.vendor-material-card-head h3 { margin: 3px 0 0; color: #123d64; font-size: 16px; }
.vendor-material-model-head p { margin: 3px 0 0; color: #72879a; font-size: 11px; }
.vendor-material-card-head p { margin: 5px 0 0; color: #72879a; font-size: 12px; }
.vendor-material-model-grid { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.vendor-material-model-grid label { position: relative; display: grid; grid-template-columns: minmax(92px, auto) 125px 27px; align-items: center; min-height: 42px; border: 1px solid #d6e2ed; border-radius: 7px; padding: 0 9px 0 13px; background: #f8fbfe; }
.vendor-material-model-grid label > span { color: #214c72; font-size: 12px; font-weight: 800; }
.vendor-material-model-grid input { width: 100%; height: 32px; border: 0; border-left: 1px solid #dce6ef; padding: 0 8px; background: transparent; color: #073d77; text-align: right; font-weight: 800; }
.vendor-material-model-grid label > small { color: #7c8f9f; font-size: 10px; font-weight: 800; text-align: right; }
.vendor-material-tabs { display: flex; gap: 4px; border-bottom: 1px solid #ccd9e5; padding: 0 4px; }
.vendor-material-tabs button { min-width: 150px; border: 0; border-bottom: 3px solid transparent; padding: 12px 18px 10px; background: transparent; color: #6d8194; font-weight: 800; cursor: pointer; }
.vendor-material-tabs button.is-active { border-color: #0b63ad; color: #06437d; }
.vendor-material-card { overflow: hidden; }
.vendor-material-card-head { padding: 18px 20px 14px; }
.vendor-bom-status-toolbar {display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;padding:10px 20px;border-top:1px solid #e2eaf2;background:#f7faff;}
.vendor-bom-status-toolbar label {display:flex;align-items:center;gap:8px;margin:0;color:#294c70;font-size:13px;font-weight:700;}
.vendor-bom-status-toolbar label > span {white-space:nowrap;}
.vendor-bom-status-toolbar select {width:115px;min-height:36px;padding:5px 28px 5px 10px;border:1px solid #b9cfe3;border-radius:6px;background:#fff;color:#193f62;font-size:13px;}
.vendor-bom-status-toolbar > span {font-size:12px;color:#496a88;white-space:nowrap;}
.vendor-bom-status-toolbar > p {flex:1 1 240px;margin:0;color:#426b8b;font-size:12px;line-height:1.6;}
.vendor-bom-status-toolbar > p.is-error {color:#b32d3b;}
.vendor-bom-stopped-badge {display:inline-flex;align-items:center;padding:3px 7px;border:1px solid #cbd6e1;border-radius:5px;background:#edf1f5;color:#586b7e;font-size:11px;font-weight:700;white-space:nowrap;}
.vendor-bom-actions {align-items:center;flex-wrap:wrap;}
.vendor-bom-actions .vendor-bom-restore {color:#176445;border-color:#a5d0ba;background:#eef9f3;white-space:nowrap;}
.vendor-bom-table tbody tr.is-bom-inactive > td {background:#f2f4f7;color:#667587;}
@media(max-width:850px) {
  .vendor-bom-status-toolbar {padding:10px 12px;gap:8px 12px;}
  .vendor-bom-status-toolbar select {font-size:16px;min-height:40px;}
  .vendor-mobile-list .vendor-bom-actions .vendor-bom-restore {min-height:40px;}
}
.vendor-material-legend { display: flex; align-items: center; gap: 8px; border-top: 1px solid #edf2f6; padding: 10px 20px; background: #f8fbfe; }
.vendor-material-legend span { border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 800; }
.vendor-material-legend span.planned { background: #fff2b8; color: #886200; }
.vendor-material-legend span.completed { background: #dff4e8; color: #157042; }
.vendor-material-legend span.delayed { background: #fee4df; color: #a63a29; }
.vendor-material-legend span.returned { background: #e9e4fb; color: #5d3f9f; }
.vendor-material-legend small { margin-left: auto; color: #71869a; }
.vendor-material-table-wrap, .vendor-bom-table-wrap { max-width: 100%; max-height: 65vh; overflow: auto; border-top: 1px solid #dbe5ef; }
.vendor-material-table { min-width: 1111px; margin: 0; table-layout: fixed; }
.vendor-bom-table { min-width: 1380px; margin: 0; table-layout: fixed; }
.vendor-material-table thead th, .vendor-bom-table thead th { position: sticky; top: 0; z-index: 4; height: 48px; border-color: #174f80; background: #063f84; color: #fff; font-size: 11px; white-space: nowrap; }
.vendor-material-table thead .vendor-material-fixed { z-index: 8; left: var(--material-cell-left); }
.vendor-material-table tbody .vendor-material-fixed { position: sticky; z-index: 2; left: var(--material-cell-left); background: #fff; }
.vendor-material-table tbody tr:nth-child(even) .vendor-material-fixed { background: #f9fbfd; }
.vendor-material-table tbody tr:hover .vendor-material-fixed { background: #eef6fd; }
.vendor-material-table tbody tr.is-shortage .vendor-mobile-balance { background: #fff1ee; }
.vendor-material-table .vendor-mobile-balance { box-shadow: 5px 0 8px rgba(21,52,80,.1); }
.vendor-material-table .vendor-material-model-col { text-align: center; }
.vendor-material-model-col strong, .vendor-material-model-col small { display: block; }
.vendor-material-model-col small { color: #507394; margin-top: 4px; font-size: 11px; }
.vendor-material-table thead .is-current-date { background: #0b756e; box-shadow: inset 0 -3px #8ee5ca; }
@media(max-width:820px) { .vendor-mobile-list[data-vendor-mobile-mode="card"] .vendor-material-model-col { position: static; display: flex; order: 5; flex: 0 0 100%; justify-content: space-between; gap: 8px; grid-column: 1/-1; padding: 6px 0; } .vendor-mobile-list[data-vendor-mobile-mode="card"] td.vendor-material-model-col::before { content: attr(data-label); color: #526e88; } }
@media(max-width:820px) { #moduleView .vendor-material-detail-toggle:has([data-model-requirements-toggle]), #moduleView .vendor-material-detail-toggle:has([data-today-toggle]) { display: inline-flex !important; } }






.vendor-material-table td, .vendor-bom-table td { border-color: #dce5ee; padding: 8px 9px; color: #294b68; font-size: 11px; vertical-align: middle; }
.vendor-material-table tbody tr:nth-child(even), .vendor-bom-table tbody tr:nth-child(even) { background: #f9fbfd; }
.vendor-material-table tbody tr:hover, .vendor-bom-table tbody tr:hover { background: #eef6fd; }

.vendor-material-name strong { display: block; color: #143e63; font-size: 12px; }
.vendor-material-name small { display: block; margin-top: 4px; color: #2871ad; font-family: Consolas, monospace; font-size: 10px; }
.vendor-material-name em { display: block; margin-top: 4px; color: #9a6c13; font-size: 9px; font-style: normal; line-height: 1.35; }
.vendor-material-spec { line-height: 1.45; white-space: pre-line; }
.vendor-material-table td.is-number, .vendor-bom-table td.is-number { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.vendor-material-table .is-required { background: #eef6ff; color: #0d5fa3; }
.vendor-material-table .is-planned { color: #977000; }
.vendor-material-table .is-completed { color: #157044; }
.vendor-material-table .is-negative { color: #c03b27; font-weight: 900; }
.vendor-material-table .is-positive { color: #138151; font-weight: 900; }
.vendor-material-stock input { width: 86px; height: 30px; border: 1px solid #ccdbe8; border-radius: 4px; padding: 0 7px; color: #214b70; text-align: right; font-weight: 700; }
.vendor-material-date-head { width: 95px; min-width: 95px; }
.vendor-material-date-head span, .vendor-material-date-head small { display: block; }
.vendor-material-date-head small { margin-top: 2px; color: #b8d7ef; font-size: 8px; }
.vendor-material-date-cell { width: 95px; padding: 5px !important; }
.vendor-material-receipt-cell { display: grid; align-content: center; width: 100%; min-height: 43px; border: 1px solid transparent; border-radius: 5px; padding: 4px 5px; cursor: pointer; }
.vendor-material-receipt-cell strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.vendor-material-receipt-cell small { margin-top: 2px; font-size: 8px; }
.vendor-material-receipt-cell.is-planned { border-color: #eed675; background: #fff4bf; color: #7f5c00; }
.vendor-material-receipt-cell.is-completed { border-color: #a9d8bb; background: #e3f5e9; color: #12683d; }
.vendor-material-receipt-cell.is-delayed { border-color: #efb1a6; background: #fee7e2; color: #a33524; }
.vendor-material-receipt-cell.is-returned { border-color: #c7b8ec; background: #eee9fb; color: #5b3b99; }
.vendor-material-receipt-cell.is-empty { border: 1px dashed #bfd0df; background: #f7fafc; color: #7b91a5; }
.vendor-material-receipt-cell.is-empty span { font-size: 14px; line-height: 1; }
.vendor-material-receipt-empty { color: #acb9c5; }
.vendor-bom-table th:nth-child(1) { width: 48px; }
.vendor-bom-table th:nth-child(2) { width: 145px; }
.vendor-bom-table th:nth-child(3) { width: 180px; }
.vendor-bom-table th:nth-child(4) { width: 260px; }
.vendor-bom-table th:nth-child(5) { width: 120px; }
.vendor-bom-table th:nth-child(6) { width: 170px; }
.vendor-bom-table th small { display: block; margin-top: 2px; color: #b9d8f0; font-size: 8px; }
.vendor-bom-actions { display: flex; gap: 4px; }
.vendor-material-empty, .vendor-material-loading { display: grid; place-items: center; min-height: 360px; border: 1px solid #dbe5ef; border-radius: 9px; padding: 50px 20px; background: #fff; text-align: center; }
.vendor-material-empty > span { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 18px; background: #eaf4fd; color: #0c60a7; font-size: 13px; font-weight: 900; }
.vendor-material-empty h3 { margin: 16px 0 0; color: #143f66; }
.vendor-material-empty p { margin: 8px 0 18px; color: #75899b; }
.vendor-material-loading span { width: 34px; height: 34px; border: 3px solid #dce9f5; border-top-color: #0b63ad; border-radius: 50%; animation: vendor-material-spin .8s linear infinite; }
.vendor-material-loading strong { margin-top: 12px; color: #41617d; }
@keyframes vendor-material-spin { to { transform: rotate(360deg); } }
.vendor-material-dialog { width: min(720px, calc(100vw - 28px)); }
.vendor-material-dialog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 18px 20px; }
.vendor-material-dialog-grid label { display: grid; gap: 6px; }
.vendor-material-dialog-grid label.wide, .vendor-material-dialog-grid .wide { grid-column: 1 / -1; }
.vendor-material-dialog-grid label > span, .vendor-bom-requirements > strong { color: #385b78; font-size: 11px; font-weight: 800; }
.vendor-material-dialog-grid input, .vendor-material-dialog-grid select, .vendor-material-dialog-grid textarea { width: 100%; border: 1px solid #cbd9e5; border-radius: 5px; padding: 9px 10px; color: #153f63; background: #fff; }
.vendor-material-dialog-grid textarea { resize: vertical; }
.vendor-bom-requirements { border: 1px solid #dbe5ef; border-radius: 7px; padding: 13px; background: #f8fbfe; }
.vendor-bom-requirements > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.vendor-bom-requirements label { grid-template-columns: 1fr 110px; align-items: center; }
.vendor-receipt-delete { grid-column: 1 / -1; justify-self: start; }

@media (max-width: 1100px) {
  .vendor-material-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vendor-material-hero { align-items: stretch; flex-direction: column; }
  .vendor-material-lot-control { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .vendor-material-page { gap: 11px; }
  .vendor-material-hero { border-radius: 0; padding: 19px 15px; }
  .vendor-material-hero h2 { font-size: 21px; }
  .vendor-material-lot-control { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .vendor-material-lot-control label { grid-column: 1 / -1; min-width: 0; }
  .vendor-material-stats { gap: 7px; padding: 0 10px; }
  .vendor-material-stats article { min-height: 94px; padding: 13px; }
  .vendor-material-stats strong { font-size: 22px; }
  .vendor-material-model-panel, .vendor-material-card { border-radius: 0; }
  .vendor-material-model-head, .vendor-material-card-head { align-items: flex-start; flex-direction: column; padding-left: 15px; padding-right: 15px; }
  .vendor-material-model-grid { flex-direction: column; }
  .vendor-material-model-grid label { grid-template-columns: 1fr 110px 25px; }
  .vendor-material-tabs { padding: 0 10px; }
  .vendor-material-tabs button { min-width: 0; flex: 1; padding-left: 8px; padding-right: 8px; }
  .vendor-material-legend { align-items: flex-start; flex-wrap: wrap; padding: 9px 12px; }
  .vendor-material-legend small { width: 100%; margin-left: 0; }
  .vendor-material-table-wrap, .vendor-bom-table-wrap { max-height: 62vh; }
  .vendor-material-dialog-grid { grid-template-columns: 1fr; padding: 15px; }
  .vendor-material-dialog-grid label.wide, .vendor-material-dialog-grid .wide { grid-column: 1; }
  .vendor-bom-requirements > div { grid-template-columns: 1fr; }
}

/* 2026-08-24: 제품→LOT 선택·대체자재 그룹 */
.vendor-material-legend span.alternative { background: #e8efff; color: #3f5fa4; }
.vendor-material-table tbody tr.is-alternative > td:first-child { box-shadow: inset 3px 0 #6d86bf; }
.vendor-material-alt-badge,
.vendor-bom-alt-group {
  display: inline-flex !important;
  width: fit-content;
  align-items: center;
  margin-top: 4px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #4964a1 !important;
  background: #e9efff;
  font-family: inherit !important;
  font-size: 9px !important;
  font-style: normal;
  font-weight: 800;
}
.vendor-material-group-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  color: #5d6f94;
  background: #eef2f8;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.vendor-material-table .is-group-ref { color: #5d6f94; text-align: center; }
.vendor-material-dialog-grid label > small { color: #7c8fa2; font-size: 10px; line-height: 1.45; }




/* 2026-08-24: 과부족 고정열·입고 일괄변경·이동 팝업 */
.vendor-material-detail-toggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #c9d7e5;
  border-radius: 6px;
  color: #315875;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.vendor-material-detail-toggle input { width: 15px; height: 15px; margin: 0; accent-color: #0b63ad; }
.vendor-material-table:not(.show-item-details) .vendor-material-extra { display: none !important; }
.vendor-material-table.show-item-details .vendor-material-extra { display: block; }

.vendor-material-table { border-collapse: separate; border-spacing: 0; }














.vendor-material-col-resize {
  position: absolute;
  top: 0;
  right: -8px;
  z-index: 12;
  width: 16px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}
.vendor-material-col-resize::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 7px;
  width: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: .34;
}
.vendor-material-table th:hover .vendor-material-col-resize::after,
.vendor-material-col-resize:hover::after,
.vendor-material-col-resize:focus-visible::after,
.vendor-material-table.is-vendor-material-resizing .vendor-material-col-resize::after { width: 3px; opacity: .9; }
.vendor-material-col-resize:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.vendor-material-is-resizing, .vendor-material-is-resizing * { cursor: col-resize !important; user-select: none !important; }
.vendor-material-receipt-cell { min-height: 34px; }
.vendor-material-receipt-cell strong { line-height: 1; }

.vendor-bom-table th:nth-child(1) { width: 56px; }
.vendor-bom-table th:nth-child(2) { width: 150px; }
.vendor-bom-table th:nth-child(3) { width: 250px; }
.vendor-bom-table th:nth-child(4) { width: 260px; }
.vendor-bom-table th:nth-child(5) { width: 130px; }
.vendor-bom-table th:nth-child(6) { width: 160px; }

.vendor-material-dialog { position: fixed; }
.vendor-material-dialog .dialog-head.is-draggable { cursor: move; touch-action: none; user-select: none; }
.vendor-material-dialog .dialog-head.is-draggable .icon-button { cursor: pointer; }
.record-dialog.vendor-receipt-bulk-dialog:not(.lot-dialog):not(.community-dialog) {
  width: min(1180px, calc(100vw - 36px));
  max-width: min(1180px, calc(100vw - 36px));
}
.vendor-receipt-bulk-dialog form { min-width: 0; max-height: calc(100dvh - 36px); }
.vendor-receipt-bulk-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-top: 1px solid #e2e9f0;
  border-bottom: 1px solid #e2e9f0;
  background: #f7faff;
}
.vendor-receipt-bulk-toolbar label { display: grid; gap: 6px; min-width: 190px; }
.vendor-receipt-bulk-toolbar label:nth-child(2) { min-width: 150px; }
.vendor-receipt-bulk-toolbar label span { color: #315875; font-size: 11px; font-weight: 900; }
.vendor-receipt-bulk-toolbar input,
.vendor-receipt-bulk-toolbar select { min-height: 38px; border: 1px solid #c8d7e5; border-radius: 6px; padding: 0 10px; color: #173f63; background: #fff; font-weight: 800; }
.vendor-receipt-bulk-toolbar p { max-width: 480px; margin: 0 0 2px auto; color: #7b6241; font-size: 10px; font-weight: 800; line-height: 1.5; }
.vendor-receipt-paste { display: grid; gap: 8px; padding: 12px 20px; border-bottom: 1px solid #dce6ef; background: #fff; }
.vendor-receipt-paste-main { display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: stretch; gap: 10px; }
.vendor-receipt-paste-main label { display: grid; gap: 5px; min-width: 0; }
.vendor-receipt-paste-main label span { color: #254f73; font-size: 11px; font-weight: 900; }
.vendor-receipt-paste-main textarea { width: 100%; min-height: 66px; resize: vertical; border: 1px solid #bfd0df; border-radius: 6px; padding: 9px 10px; color: #183f61; background: #fbfdff; font: 11px/1.45 Consolas, "Malgun Gothic", sans-serif; }
.vendor-receipt-paste-main textarea:focus { border-color: #2f78b7; outline: 2px solid rgba(47, 120, 183, .14); }
.vendor-receipt-paste-main button { align-self: end; min-height: 66px; border: 0; border-radius: 6px; color: #fff; background: #0a4b87; font-size: 13px; font-weight: 900; cursor: pointer; }
.vendor-receipt-paste-result { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 0; border-radius: 5px; padding: 8px 10px; color: #587086; background: #f2f6fa; font-size: 10px; line-height: 1.45; }
.vendor-receipt-paste-result strong { color: #183f61; font-size: 12px; }
.vendor-receipt-paste-result.is-success { color: #17623f; background: #e7f7ee; }
.vendor-receipt-paste-result.is-success strong { color: #11603a; }
.vendor-receipt-paste-result.is-warning { color: #7b5715; background: #fff4d6; }
.vendor-receipt-paste-result.is-warning strong { color: #805300; }
.vendor-receipt-paste-result.is-error { color: #a43c2c; background: #fee9e5; }
.vendor-receipt-bulk-table input.is-paste-applied { border-color: #32a46d; background: #e7f8ef; color: #0c663c; font-weight: 900; }
.vendor-receipt-bulk-wrap { max-height: min(58vh, 620px); overflow: auto; }
.vendor-receipt-bulk-table { min-width: 996px; margin: 0; table-layout: fixed; }
.vendor-receipt-bulk-table thead th { position: sticky; top: 0; z-index: 3; height: 42px; border-color: #174f80; background: #063f84; color: #fff; font-size: 11px; }
.vendor-receipt-bulk-table th:nth-child(1) { width: 56px; }
.vendor-receipt-bulk-table th:nth-child(2) { width: 260px; }
.vendor-receipt-bulk-table th:nth-child(3) { width: 120px; }
.vendor-receipt-bulk-table th:nth-child(4) { width: 105px; }
.vendor-receipt-bulk-table th:nth-child(5) { width: 100px; }
.vendor-receipt-bulk-table th:nth-child(6) { width: 105px; }
.vendor-receipt-bulk-table th:nth-child(7) { width: 160px; }
.vendor-receipt-bulk-table th:nth-child(8) { width: 90px; }
.vendor-receipt-bulk-table td { padding: 7px 8px; border-color: #dce5ee; color: #294b68; font-size: 11px; vertical-align: middle; }
.vendor-receipt-bulk-table tbody tr:nth-child(even) { background: #f9fbfd; }
.vendor-receipt-bulk-table td:nth-child(2) strong,
.vendor-receipt-bulk-table td:nth-child(2) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vendor-receipt-bulk-table td:nth-child(2) strong { color: #143e63; font-size: 12px; }
.vendor-receipt-bulk-table td:nth-child(2) small { margin-top: 3px; color: #2871ad; font-family: Consolas, monospace; font-size: 9px; }
.vendor-receipt-bulk-table input,
.vendor-receipt-bulk-table select { width: 100%; min-height: 34px; border: 1px solid #cbd9e5; border-radius: 5px; padding: 0 8px; color: #153f63; background: #fff; }
.vendor-receipt-bulk-table input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
.vendor-receipt-bulk-table td.is-negative { color: #c03b27; font-weight: 900; }
.vendor-receipt-bulk-table td.is-positive { color: #138151; font-weight: 900; }
.vendor-receipt-bulk-table input:disabled,
.vendor-receipt-bulk-table select:disabled { color: #8294a5; background: #eef2f6; }
.vendor-receipt-bulk-table td:last-child span { display: inline-flex; min-height: 24px; align-items: center; padding: 0 7px; border-radius: 999px; font-size: 9px; font-weight: 900; }
.vendor-receipt-bulk-table td:last-child .is-planned { color: #886200; background: #fff2b8; }
.vendor-receipt-bulk-table td:last-child .is-completed { color: #157042; background: #dff4e8; }
.vendor-receipt-bulk-table td:last-child .is-delayed { color: #a63a29; background: #fee4df; }
.vendor-receipt-bulk-table td:last-child .is-returned { color: #5b3b99; background: #eee9fb; }
.vendor-receipt-bulk-table td:last-child .is-new { color: #557086; background: #edf2f7; }

@media (max-width: 760px) {
  .record-dialog.vendor-receipt-bulk-dialog:not(.lot-dialog):not(.community-dialog) { width: calc(100vw - 12px); max-width: calc(100vw - 12px); }
  .vendor-receipt-bulk-toolbar { align-items: stretch; flex-direction: column; padding: 12px; }
  .vendor-receipt-bulk-toolbar label { min-width: 0; }
  .vendor-receipt-paste { padding: 10px 12px; }
  .vendor-receipt-paste-main { grid-template-columns: 1fr; }
  .vendor-receipt-paste-main button { min-height: 42px; }
}
/* 2026-08-24: BOM 모델 삭제·엑셀 일괄등록·열 전체 수정·팝업 하단 고정 */
.vendor-material-model-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(92px, auto) 92px 22px 46px;
  align-items: center;
  min-height: 38px;
  border: 1px solid #d6e2ed;
  border-radius: 7px;
  padding: 0 6px 0 12px;
  background: #f8fbfe;
}
.vendor-material-model-entry > span { color: #214c72; font-size: 12px; font-weight: 800; }
.vendor-material-model-entry > input { min-width: 0; width: 100%; height: 30px; box-sizing: border-box; }
.vendor-material-model-entry > small { color: #7c8f9f; font-size: 10px; font-weight: 800; text-align: right; }
.vendor-material-model-delete {
  width: 42px;
  min-width: 42px;
  min-height: 28px;
  justify-self: end;
  margin-left: 4px;
  border: 1px solid #e4bdb7;
  border-radius: 5px;
  padding: 0;
  color: #a23a2d;
  background: #fff8f6;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.vendor-material-model-delete:hover { border-color: #ca6e61; background: #fff0ed; }

.record-dialog.vendor-material-dialog:not(.lot-dialog):not(.community-dialog) form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
}
.vendor-material-dialog .dialog-head { padding: 18px 20px 14px; }
.vendor-material-dialog-body { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.vendor-material-dialog .dialog-actions {
  position: relative;
  z-index: 5;
  margin-top: 0;
  border-top: 1px solid #dbe5ef;
  padding: 14px 20px;
  background: #fff;
  box-shadow: 0 -5px 14px rgba(22, 57, 86, .06);
}

.vendor-bom-model-head { padding: 5px 4px !important; }
.vendor-bom-model-head > span,
.vendor-bom-model-head > small { display: block; }
.vendor-bom-model-head > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  margin-top: 4px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 4px;
  padding: 0 6px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}
.vendor-bom-model-head > button:hover { background: rgba(255,255,255,.25); }

.record-dialog.vendor-bom-import-dialog:not(.lot-dialog):not(.community-dialog),
.record-dialog.vendor-bom-model-bulk-dialog:not(.lot-dialog):not(.community-dialog) {
  width: min(1100px, calc(100vw - 36px));
  max-width: min(1100px, calc(100vw - 36px));
}
.vendor-bom-import-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px 20px 10px; }
.vendor-bom-import-guide > div { border: 1px solid #d9e5ef; border-radius: 7px; padding: 12px 13px; background: #f7faff; }
.vendor-bom-import-guide strong,
.vendor-bom-import-guide span { display: block; }
.vendor-bom-import-guide strong { color: #174d77; font-size: 11px; }
.vendor-bom-import-guide span { margin-top: 4px; color: #6f8396; font-size: 10px; line-height: 1.5; }
.vendor-bom-import-file { display: flex; align-items: end; gap: 10px; padding: 10px 20px 14px; }
.vendor-bom-import-file label { display: grid; flex: 1; gap: 6px; }
.vendor-bom-import-file label > span { color: #385b78; font-size: 11px; font-weight: 900; }
.vendor-bom-import-file input { width: 100%; min-height: 40px; border: 1px solid #cbd9e5; border-radius: 6px; padding: 7px 9px; color: #294d6b; background: #fff; }
.vendor-bom-import-message { margin: 0 20px 14px; border-radius: 6px; padding: 10px 12px; color: #627b91; background: #edf3f8; font-size: 11px; font-weight: 800; }
.vendor-bom-import-message.is-ready { color: #17683e; background: #e4f5eb; }
.vendor-bom-import-message.is-error { color: #a13c2d; background: #feeae6; }
.vendor-bom-import-result { padding: 0 20px 18px; }
.vendor-bom-import-summary { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 9px; }
.vendor-bom-import-summary span { border-radius: 999px; padding: 5px 9px; color: #4f6578; background: #edf2f7; font-size: 10px; font-weight: 900; }
.vendor-bom-import-summary span.new { color: #1c6c45; background: #e2f4ea; }
.vendor-bom-import-summary span.update { color: #155d9d; background: #e4f1fc; }
.vendor-bom-import-summary span.error { color: #a13c2d; background: #fee8e4; }
.vendor-bom-import-result .table-wrap,
.vendor-bom-model-bulk-wrap { max-height: min(54vh, 560px); overflow: auto; border: 1px solid #dbe5ef; border-radius: 6px; }
.vendor-bom-import-table { min-width: 880px; margin: 0; table-layout: fixed; }
.vendor-bom-import-table thead th,
.vendor-bom-model-bulk-table thead th { position: sticky; top: 0; z-index: 3; border-color: #174f80; background: #063f84; color: #fff; font-size: 10px; }
.vendor-bom-import-table th:nth-child(1) { width: 60px; }
.vendor-bom-import-table th:nth-child(2) { width: 170px; }
.vendor-bom-import-table th:nth-child(3) { width: 230px; }
.vendor-bom-import-table th:nth-child(4) { width: 300px; }
.vendor-bom-import-table th:nth-child(5) { width: 120px; }
.vendor-bom-import-table td { padding: 7px 8px; color: #294b68; font-size: 10px; }
.vendor-bom-import-table tr.is-error td { background: #fff4f1; }
.vendor-bom-import-status { display: inline-flex; border-radius: 999px; padding: 3px 7px; font-size: 9px; font-weight: 900; }
.vendor-bom-import-status.new { color: #17683e; background: #e0f3e8; }
.vendor-bom-import-status.update { color: #155d9d; background: #e4f1fc; }
.vendor-bom-import-status.error { color: #a13c2d; background: #fee2de; }
.vendor-bom-import-table td:last-child small { display: block; margin-top: 4px; color: #8a5d55; }

.vendor-bom-model-bulk-wrap { margin: 16px 20px 20px; }
.vendor-bom-model-bulk-table { min-width: 900px; margin: 0; table-layout: fixed; }
.vendor-bom-model-bulk-table th:nth-child(1) { width: 56px; }
.vendor-bom-model-bulk-table th:nth-child(2) { width: 170px; }
.vendor-bom-model-bulk-table th:nth-child(3) { width: 230px; }
.vendor-bom-model-bulk-table th:nth-child(4) { width: 300px; }
.vendor-bom-model-bulk-table th:nth-child(5) { width: 140px; }
.vendor-bom-model-bulk-table td { padding: 7px 8px; color: #294b68; font-size: 10px; }
.vendor-bom-model-bulk-table input { width: 100%; min-height: 34px; border: 1px solid #cbd9e5; border-radius: 5px; padding: 0 8px; color: #123f65; text-align: right; font-weight: 800; }
.vendor-bom-model-paste { padding-top: 0; }
.vendor-bom-model-paste-help { margin: 0; color: #6c8197; font-size: 11px; line-height: 1.5; }
.vendor-bom-model-paste .vendor-receipt-paste-result { white-space: pre-line; display: block; font-size: 11px; }
.vendor-bom-model-bulk-table input.is-paste-applied { border-color: #5aab81; background: #e9f8ef; }
.vendor-bom-model-paste + .vendor-bom-model-bulk-wrap { margin-top: 12px; max-height: min(44vh, 480px); }
.record-dialog.vendor-bom-model-bulk-dialog:not(.lot-dialog):not(.community-dialog) { max-height: calc(100dvh - 32px); overflow: hidden; }

@media (max-width: 760px) {
  .vendor-material-stats article { min-height: 84px; padding: 10px 12px; }
  .vendor-material-model-entry { grid-template-columns: 1fr 82px 20px 46px; }
  .record-dialog.vendor-material-dialog:not(.lot-dialog):not(.community-dialog) form { max-height: calc(100dvh - 12px); }
  .vendor-material-dialog .dialog-head { padding: 15px 14px 12px; }
  .vendor-material-dialog .dialog-actions { padding: 11px 14px; }
  .record-dialog.vendor-bom-import-dialog:not(.lot-dialog):not(.community-dialog),
  .record-dialog.vendor-bom-model-bulk-dialog:not(.lot-dialog):not(.community-dialog) { width: calc(100vw - 12px); max-width: calc(100vw - 12px); }
  .vendor-bom-import-guide { grid-template-columns: 1fr; padding: 12px 14px 7px; }
  .vendor-bom-import-file { align-items: stretch; flex-direction: column; padding: 8px 14px 12px; }
  .vendor-bom-import-message { margin: 0 14px 12px; }
  .vendor-bom-import-result { padding: 0 14px 14px; }
  .vendor-bom-model-bulk-wrap { margin: 12px 14px 14px; }
  .record-dialog.vendor-bom-model-bulk-dialog:not(.lot-dialog):not(.community-dialog) { max-height: calc(100dvh - 12px); }
}

/* 2026-08-25: 다음 LOT 생성 시 이전 LOT 확정 잔여재고 이월 */
.record-dialog.vendor-lot-dialog:not(.lot-dialog):not(.community-dialog) {
  width: min(1040px, calc(100vw - 36px));
  max-width: min(1040px, calc(100vw - 36px));
}
.vendor-lot-carryover { overflow: hidden; border: 1px solid #cbdbea; border-radius: 8px; background: #f8fbfe; }
.vendor-lot-carryover-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #dce7f0; padding: 12px 14px; background: #edf6fd; }
.vendor-lot-carryover-head label { display: flex; grid-auto-flow: column; align-items: center; gap: 8px; color: #164f7c; font-size: 12px; font-weight: 900; }
.vendor-lot-carryover-head input { width: 17px; height: 17px; margin: 0; }
.vendor-lot-carryover-head small { color: #687f93; font-size: 10px; line-height: 1.45; text-align: right; }
.vendor-lot-carryover-source { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px 14px; }
.vendor-lot-carryover-source > span { color: #385b78; font-size: 11px; font-weight: 900; }
.vendor-lot-carryover-source select { min-height: 38px; }
.vendor-lot-carryover-preview { border-top: 1px solid #dce7f0; background: #fff; }
.vendor-lot-carryover-preview > p { margin: 0; padding: 18px 14px; color: #74899b; font-size: 11px; text-align: center; }
.vendor-lot-carryover-preview .table-wrap { max-height: min(38vh, 390px); overflow: auto; }
.vendor-lot-carryover-table { min-width: 900px; margin: 0; table-layout: fixed; }
.vendor-lot-carryover-table thead th { position: sticky; top: 0; z-index: 3; height: 40px; border-color: #174f80; background: #063f84; color: #fff; font-size: 10px; }
.vendor-lot-carryover-table th:nth-child(1) { width: 52px; }
.vendor-lot-carryover-table th:nth-child(2) { width: 52px; }
.vendor-lot-carryover-table th:nth-child(3) { width: 285px; }
.vendor-lot-carryover-table th:nth-child(4) { width: 120px; }
.vendor-lot-carryover-table th:nth-child(n+5):nth-child(-n+8) { width: 98px; }
.vendor-lot-carryover-table td { padding: 7px 8px; border-color: #dce5ee; color: #294b68; font-size: 10px; vertical-align: middle; }
.vendor-lot-carryover-table tbody tr:nth-child(even) { background: #f9fbfd; }
.vendor-lot-carryover-table td:nth-child(1), .vendor-lot-carryover-table td:nth-child(2) { text-align: center; }
.vendor-lot-carryover-table td:nth-child(3) strong,
.vendor-lot-carryover-table td:nth-child(3) > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vendor-lot-carryover-table td:nth-child(3) strong { color: #143e63; font-size: 11px; }
.vendor-lot-carryover-table td:nth-child(3) > small { margin-top: 3px; color: #2871ad; font-family: Consolas, monospace; font-size: 9px; }
.vendor-lot-carryover-table .vendor-lot-carryover-group { display: block; width: fit-content; margin-top: 4px; border-radius: 999px; padding: 2px 6px; color: #536ba2; background: #e9efff; font-family: inherit; font-size: 8px; font-weight: 900; }
.vendor-lot-carryover-table td.is-number { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }
.vendor-lot-carryover-table td.is-positive { color: #148052; }
.vendor-lot-carryover-table input[type="checkbox"] { width: 16px; height: 16px; }
.vendor-lot-carryover-table input[type="number"] { width: 100%; min-height: 32px; border: 1px solid #c8d8e5; border-radius: 5px; padding: 0 7px; color: #123f65; text-align: right; font-weight: 900; }
.vendor-lot-carryover-table input:disabled { color: #95a4b1; background: #eef2f5; }
.vendor-lot-carryover-summary { display: flex; align-items: center; gap: 10px; min-height: 42px; border-top: 1px solid #dce7f0; padding: 9px 14px; color: #61798e; background: #f4f8fb; font-size: 10px; }
.vendor-lot-carryover-summary strong { color: #264f70; font-size: 12px; }
.vendor-lot-carryover-summary.is-ready { color: #17633f; background: #e7f7ee; }
.vendor-lot-carryover-summary.is-ready strong { color: #0f673d; }
.vendor-lot-carryover-summary.is-error { color: #9e3b2d; background: #feeae6; }
.vendor-lot-carryover-summary.is-error strong { color: #a23425; }
.vendor-lot-carryover-empty, .vendor-lot-carryover-loading { display: grid; place-items: center; min-height: 92px; padding: 16px; text-align: center; }
.vendor-lot-carryover-empty strong, .vendor-lot-carryover-empty span { display: block; }
.vendor-lot-carryover-empty strong { color: #315875; font-size: 11px; }
.vendor-lot-carryover-empty span { margin-top: 5px; color: #7a8d9e; font-size: 10px; }
.vendor-lot-carryover-empty.is-error strong { color: #a43c2c; }
.vendor-lot-carryover-loading { grid-auto-flow: column; justify-content: center; gap: 9px; color: #446985; font-size: 10px; }
.vendor-lot-carryover-loading span { width: 18px; height: 18px; border: 2px solid #d8e6f2; border-top-color: #0b63ad; border-radius: 50%; animation: vendor-material-spin .8s linear infinite; }

@media (max-width: 760px) {
  .record-dialog.vendor-lot-dialog:not(.lot-dialog):not(.community-dialog) { width: calc(100vw - 12px); max-width: calc(100vw - 12px); }
  .vendor-lot-carryover-head { align-items: flex-start; flex-direction: column; }
  .vendor-lot-carryover-head small { text-align: left; }
  .vendor-lot-carryover-source { grid-template-columns: 1fr; }
}
.vendor-material-list-head{flex-wrap:wrap;gap:10px 18px}
.vendor-material-list-head > div:first-child{flex:0 0 auto}
.vendor-material-list-head > .vendor-material-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px 10px;flex:1 1 auto;min-width:0;flex-wrap:wrap}
.vendor-material-toolbar > *{flex:0 0 auto;white-space:nowrap}
#moduleView .vendor-material-toolbar .vendor-material-zero-toggle{display:flex!important;align-items:center;gap:6px;color:#173f67}
.vendor-material-model-filter{display:flex;align-items:center;gap:6px;color:#173f67;font-weight:600;font-size:13px;white-space:nowrap}
.vendor-material-model-filter select{width:160px;min-width:0;max-width:200px;height:34px;border:1px solid #b5cbe0;border-radius:6px;padding:4px 25px 4px 8px;background:#f3f8ff;color:#183c5b}
@media(max-width:760px){.vendor-material-list-head > .vendor-material-toolbar{justify-content:flex-start;width:100%}.vendor-material-model-filter select{font-size:16px;width:160px;max-width:190px}}
