.b-dashboard-wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 40px auto;
  font-family: Pretendard, SUIT, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111827;
}

.b-dashboard-hero {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.b-dashboard-kicker,
.b-result-kicker {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #192231;
}

.b-dashboard-hero h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.b-dashboard-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.b-dashboard-search-card,
.b-dashboard-result {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.b-dashboard-search-card {
  margin-bottom: 20px;
}

.b-dashboard-search-card label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
  color: #374151;
}

.b-dashboard-search-row {
  display: flex;
  gap: 10px;
}

.b-dashboard-search-row input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  font-size: 15px;
  outline: none;
}

.b-dashboard-search-row input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.b-dashboard-search-row button {
  width: 120px;
  border: 0;
  border-radius: 16px;
  background: #02449B;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.b-dashboard-search-row button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.b-dashboard-help {
  margin: 10px 0 0;
  font-size: 13px;
  color: #6b7280;
  word-break: break-all;
}

.b-dashboard-empty {
  color: #6b7280;
  text-align: center;
}

.b-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.b-result-header h3 {
  margin: 0;
  font-size: 24px;
}

.b-status-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  background: #f3f4f6;
  color: #374151;
}

.b-status-pill.success {
  background: #dcfce7;
  color: #166534;
}

.b-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.b-summary-item {
  padding: 16px;
  border-radius: 18px;
  background: #F0F5FB;
  border: 1px solid #F0F5FB;
  min-width: 0;
}

.b-summary-item span {
  display: block;
  margin-bottom: 6px;
  color: #02449B;
  font-size: 18px;
  font-weight: 700;
}

.b-summary-item strong {
  display: block;
  color: #111827;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-all;
}

.b-section-title {
  margin: 28px 0 12px;
  font-size: 26px;
  font-weight: 900;
}

.b-data-card {
  padding: 18px;
  border-radius: 20px;
  /* border: 1px solid #e5e7eb; */
  background: #F8F8FB;
  margin-bottom: 14px;
}

.b-data-card h4 {
  margin: 0 0 14px;
  font-size: 17px;
}

.b-info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #f3f4f6;
}

.b-info-row:first-of-type {
  border-top: 0;
}

.b-info-label {
  color: #02449B;
  font-weight: 800;
  font-size: 18px;
}

.b-info-value {
  color: #111827;
  font-weight: 600;
  line-height: 1.55;
  word-break: break-all;
}

.b-raw-area {
  margin-top: 24px;
}

.b-raw-area details {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px;
  margin-top: 10px;
  background: #f9fafb;
}

.b-raw-area summary {
  cursor: pointer;
  font-weight: 900;
}

.b-raw-area pre {
  overflow: auto;
  max-height: 360px;
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 12px;
  background: #111827;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.6;
}

.b-error-box,
.b-warning-box {
  padding: 18px;
  border-radius: 18px;
  line-height: 1.6;
  font-weight: 700;
}

.b-error-box {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.b-warning-box {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.b-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4b5563;
  font-weight: 700;
}

.b-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #e5e7eb;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: bSpin 0.8s linear infinite;
}

@keyframes bSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .b-dashboard-wrap {
    width: min(100% - 20px, 1080px);
    margin: 24px auto;
  }

  .b-dashboard-search-row {
    flex-direction: column;
  }

  .b-dashboard-search-row button {
    width: 100%;
    height: 50px;
  }

  .b-summary-grid {
    grid-template-columns: 1fr;
  }

  .b-info-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* 원산지 정보 */
.b-origin-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid #f3f4f6;
}

.b-origin-item {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  align-items: center;
}

.b-origin-item:last-child {
  border-bottom: 0;
}

.b-origin-item span {
  color: #111827;
  font-weight: 700;
  line-height: 1.55;
}

.b-origin-item strong {
  color: #111827;
  font-weight: 900;
  text-align: left;
  line-height: 1.55;
}

/* 원산지 이력 */
.b-origin-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid #f3f4f6;
}

.b-origin-history-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
  align-items: start;
}

.b-origin-history-item:last-child {
  border-bottom: 0;
}

.b-origin-history-no {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.b-origin-history-item p {
  margin: 0;
  color: #111827;
  font-weight: 700;
  line-height: 1.6;
  word-break: keep-all;
}

/* 모바일 */
@media (max-width: 720px) {
  .b-origin-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .b-origin-item strong {
    text-align: left;
  }

  .b-origin-history-item {
    grid-template-columns: 32px 1fr;
    gap: 10px;
  }
}


.b-data-card {
  position: relative;
}

/* 공통 뱃지 */
.b-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

/* 원산지 */
.b-card-badge.origin {
  background: #dcfce7;
  color: #166534;
}

/* 원산지 이력 */
.b-card-badge.history {
  background: #dbeafe;
  color: #1e40af;
}



/* ================= 최종 원산지 / 원산지 이력 정렬 ================= */
/* ================= 최종 원산지 / 원산지 이력 정렬 ================= */

/* 원산지/이력 카드 공통 */
.b-data-card:has(.b-origin-list),
.b-data-card:has(.b-origin-history-list) {
  position: relative !important;
  padding: 24px 28px !important;
  background: #f8f8fb !important;
  border-radius: 20px !important;
  border: 0 !important;
}

/* 기존 h4는 숨김 */
.b-data-card:has(.b-origin-list) h4,
.b-data-card:has(.b-origin-history-list) h4 {
  display: none !important;
}

/* 왼쪽 라벨 */
.b-data-card:has(.b-origin-list) .b-card-badge,
.b-data-card:has(.b-origin-history-list) .b-card-badge {
  display: block !important;
  position: absolute !important;
  top: 24px !important;
  left: 24px !important;
  right: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  color: #02449B !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

/* 원산지 리스트 */
.b-origin-list {
  margin-left: 120px !important;
  padding-top: 0 !important;
  border-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

.b-origin-item {
  display: grid !important;
  grid-template-columns: 120px 120px !important;
  gap: 32px !important;
  padding: 3px 0 !important;
  border-bottom: 0 !important;
  align-items: center !important;
}

.b-origin-item span,
.b-origin-item strong {
  color: #061224 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  text-align: left !important;
}
/* 원산지 리스트 */
.b-origin-list {
  margin-left: 140px !important;
  padding-top: 0 !important;
  border-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

.b-origin-item {
  display: grid !important;
  grid-template-columns: 120px 120px !important;
  gap: 32px !important;
  padding: 3px 0 !important;
  border-bottom: 0 !important;
  align-items: center !important;
}

/* 원산지 이력 */
.b-origin-history-list {
  margin-left: 140px !important;
  padding-top: 0 !important;
  border-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.b-origin-history-item {
  display: grid !important;
  grid-template-columns: 90px 1fr !important;
  gap: 24px !important;
  padding: 2px 0 !important;
  border-bottom: 0 !important;
  align-items: start !important;
}

/* 모바일 */
@media (max-width: 720px) {
  .b-data-card:has(.b-origin-list) .b-card-badge,
  .b-data-card:has(.b-origin-history-list) .b-card-badge {
    position: static !important;
    margin-bottom: 12px !important;
  }

  .b-origin-list,
  .b-origin-history-list {
    margin-left: 0 !important;
  }

  .b-origin-item {
    grid-template-columns: 1fr 80px !important;
  }

  .b-origin-history-item {
    grid-template-columns: 32px 1fr !important;
  }
}