:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #162033;
  --muted: #647084;
  --line: #dbe3ee;
  --accent: #d9231f;
  --accent-dark: #b91c1c;
  --success: #137333;
  --success-bg: #eefbf2;
  --warning: #9a5b00;
  --warning-bg: #fff7e6;
  --danger: #b42318;
  --danger-bg: #fff5f3;
  --shadow: 0 18px 50px rgba(22, 32, 51, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.page {
  width: min(920px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hero {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
  align-items: end;
}

.order-field {
  display: grid;
  gap: 8px;
}

.order-field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: var(--text);
  font-size: 20px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 35, 31, 0.12);
}

button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.message {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.message.error {
  border-color: rgba(180, 35, 24, 0.3);
  background: var(--danger-bg);
  color: var(--danger);
}

.message.empty {
  background: #fff;
  color: var(--muted);
}

.result-panel,
.notice {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.result-head p,
.result-head h1 {
  margin: 0;
}

.result-head p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.result-head h1 {
  margin-top: 4px;
  font-size: 28px;
  letter-spacing: 0;
}

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.success,
.status-pill.success {
  background: var(--success-bg);
  color: var(--success);
}

.badge.pending,
.status-pill.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge.failed,
.status-pill.failed {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge.neutral,
.status-pill.neutral {
  background: #eef2f7;
  color: var(--muted);
}

.order-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.order-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-card.status-success {
  border-color: rgba(19, 115, 51, 0.28);
}

.order-card.status-pending {
  border-color: rgba(154, 91, 0, 0.28);
}

.order-card.status-failed {
  border-color: rgba(180, 35, 24, 0.32);
}

.product-image {
  width: 108px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f4f8;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-weight: 900;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shop {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

h3 {
  margin: 8px 0 12px;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: 0;
}

.meta-grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 10px;
  color: var(--muted);
  font-size: 14px;
}

.meta-grid strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.meta-grid .conclusion {
  font-size: 16px;
}

.conclusion.success {
  color: var(--success);
}

.conclusion.pending {
  color: var(--warning);
}

.conclusion.failed {
  color: var(--danger);
}

.notice {
  padding: 18px 20px;
  box-shadow: none;
}

.notice h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.notice ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  .page {
    width: min(100vw - 20px, 920px);
    padding-top: 14px;
  }

  .hero {
    padding: 16px;
  }

  .brand-row {
    align-items: flex-start;
    flex-direction: column;
    font-size: 34px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .order-card {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 10px;
  }

  .product-image {
    width: 82px;
  }

  .card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  h3 {
    font-size: 15px;
  }
}
