/* ═══════════════════════════════════════════
   WMS — INBOUND MANAGEMENT STYLES
   ═══════════════════════════════════════════ */

/* ─── WORKFLOW STATUS BAR ─── */
.ib-workflow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 22px 28px;
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}
.ib-workflow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, .03), rgba(20, 184, 166, .02), rgba(34, 197, 94, .03));
  pointer-events: none;
}

.ib-wf-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all .3s var(--ease);
  position: relative;
  z-index: 1;
  min-width: 140px;
}
.ib-wf-step:hover {
  background: rgba(255,255,255,.03);
}
.ib-wf-step.active {
  background: var(--accent-soft);
}
.ib-wf-step.active .ib-wf-icon {
  box-shadow: 0 0 20px rgba(59, 130, 246, .3);
}

.ib-wf-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all .3s var(--ease);
  position: relative;
}
.ib-wf-icon::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 17px;
  background: inherit;
  opacity: .15;
  filter: blur(8px);
}

.ib-wf-step[data-status="예정"] .ib-wf-icon {
  background: rgba(100, 116, 139, .12);
  color: #94a3b8;
}
.ib-wf-step[data-status="도착"] .ib-wf-icon {
  background: rgba(59, 130, 246, .12);
  color: #60a5fa;
}
.ib-wf-step[data-status="검수중"] .ib-wf-icon {
  background: rgba(245, 158, 11, .12);
  color: #fbbf24;
}
.ib-wf-step[data-status="적치중"] .ib-wf-icon {
  background: rgba(168, 85, 247, .12);
  color: #c084fc;
}
.ib-wf-step[data-status="완료"] .ib-wf-icon {
  background: rgba(34, 197, 94, .1);
  color: #4ade80;
}

.ib-wf-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ib-wf-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: .2px;
}
.ib-wf-count {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--en);
  letter-spacing: -.5px;
  color: var(--text);
  line-height: 1;
}

.ib-wf-arrow {
  color: var(--dim);
  font-size: .65rem;
  padding: 0 6px;
  opacity: .4;
  flex-shrink: 0;
}

/* ─── ITEMS SECTION IN MODAL ─── */
.ib-items-section {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.ib-items-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.ib-items-head h3 {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ib-items-head h3 i {
  color: var(--accent);
  font-size: .8rem;
}

.ib-items-table {
  font-size: .82rem;
}
.ib-items-table td {
  padding: 8px 12px;
  vertical-align: middle;
}
.ib-items-table .e-input,
.ib-items-table .e-select {
  height: 34px;
  font-size: .8rem;
}

/* ─── SKU AUTOCOMPLETE ─── */
.ib-sku-wrap {
  position: relative;
}
.ib-sku-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  display: none;
}
.ib-sku-dropdown.show {
  display: block;
  animation: fadeIn .2s var(--ease) both;
}
.ib-sku-option {
  padding: 10px 14px;
  cursor: pointer;
  font-size: .8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .15s;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.ib-sku-option:last-child { border-bottom: none; }
.ib-sku-option:hover {
  background: var(--accent-soft);
}
.ib-sku-option .sku-code {
  color: var(--accent);
  font-family: var(--en);
  font-size: .72rem;
  font-weight: 600;
}
.ib-sku-option .sku-name {
  color: var(--text2);
  flex: 1;
  margin-left: 10px;
}
.ib-sku-option .sku-temp {
  font-size: .65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
}

/* ─── INSPECTION TABLE ─── */
.ib-inspect-info {
  display: flex;
  gap: 24px;
  padding: 16px 20px;
  background: var(--surface2);
  border-radius: var(--radius);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ib-inspect-info .info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ib-inspect-info .info-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ib-inspect-info .info-value {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
}

.ib-inspect-table-wrap {
  overflow-x: auto;
}
.ib-inspect-table td {
  vertical-align: middle;
}
.ib-inspect-table .e-input,
.ib-inspect-table .e-select {
  height: 34px;
  font-size: .8rem;
}
.ib-inspect-table .e-input {
  min-width: 70px;
}
.ib-inspect-table .e-input[type="date"] {
  min-width: 130px;
}
.ib-inspect-table .e-select {
  min-width: 100px;
}

/* Inspect result badges */
.inspect-합격 { color: #4ade80; }
.inspect-부분합격 { color: #fbbf24; }
.inspect-반려 { color: #f87171; }
.inspect-대기 { color: #94a3b8; }

/* ─── DETAIL MODAL ─── */
.ib-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.ib-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ib-detail-label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ib-detail-value {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
}
.ib-detail-section-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text2);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ib-detail-section-title i {
  color: var(--accent);
  font-size: .75rem;
}

/* ─── PUTAWAY SECTION ─── */
.ib-putaway-section {
  animation: fadeInUp .5s var(--ease) both;
}
.ib-section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}
.ib-section-head h2 {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
}

.ib-putaway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.ib-putaway-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all .3s var(--ease);
  position: relative;
  overflow: hidden;
}
.ib-putaway-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  opacity: .5;
}
.ib-putaway-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.ib-putaway-card.completed {
  opacity: .6;
}
.ib-putaway-card.completed::before {
  background: linear-gradient(90deg, var(--green), var(--teal));
  opacity: .8;
}

.ib-pa-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.ib-pa-sku {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
}
.ib-pa-code {
  font-size: .72rem;
  font-family: var(--en);
  color: var(--accent);
  font-weight: 600;
  margin-top: 2px;
}
.ib-pa-qty {
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--en);
  color: var(--teal);
}
.ib-pa-qty small {
  font-size: .7rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: 2px;
}

.ib-pa-loc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface2);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.ib-pa-loc-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(20, 184, 166, .1);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}
.ib-pa-loc-info {
  flex: 1;
}
.ib-pa-loc-label {
  font-size: .68rem;
  color: var(--dim);
  font-weight: 600;
  letter-spacing: .3px;
}
.ib-pa-loc-code {
  font-size: .85rem;
  font-weight: 700;
  font-family: var(--en);
  color: var(--text);
}

.ib-pa-actions {
  display: flex;
  gap: 8px;
}
.ib-pa-actions .e-btn {
  flex: 1;
  justify-content: center;
}

/* ─── STATUS BADGES ─── */
.status-예정 { background: rgba(100,116,139,.08); color: #94a3b8; border: 1px solid rgba(100,116,139,.08); }
.status-도착 { background: rgba(59,130,246,.1); color: #60a5fa; border: 1px solid rgba(59,130,246,.1); }
.status-검수중 { background: rgba(245,158,11,.08); color: #fbbf24; border: 1px solid rgba(245,158,11,.08); }
.status-적치중 { background: rgba(168,85,247,.08); color: #c084fc; border: 1px solid rgba(168,85,247,.08); }
.status-완료 { background: rgba(34,197,94,.08); color: #4ade80; border: 1px solid rgba(34,197,94,.08); }
.status-취소 { background: rgba(239,68,68,.08); color: #f87171; border: 1px solid rgba(239,68,68,.08); }

/* ─── EMPTY STATE ─── */
.ib-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--dim);
}
.ib-empty i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: .3;
}
.ib-empty p {
  font-size: .85rem;
}

/* ─── DELETE ROW BUTTON ─── */
.ib-remove-row {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,.15);
  background: transparent;
  color: var(--red);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  transition: all .2s var(--ease);
  opacity: .5;
}
.ib-remove-row:hover {
  opacity: 1;
  background: rgba(239,68,68,.08);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
  .ib-workflow {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }
  .ib-wf-step { min-width: auto; }
  .ib-putaway-grid { grid-template-columns: 1fr; }
  .ib-detail-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .ib-wf-arrow { display: none; }
  .ib-wf-step { flex: 1; min-width: 100px; padding: 10px 12px; }
  .ib-detail-grid { grid-template-columns: 1fr; }
}
