:root {
  --bg-1: #f3f7ff;
  --bg-2: #e7ffe9;
  --text: #1b2430;
  --muted: #5b6577;
  --card: #ffffff;
  --accent: #006d77;
  --accent-2: #ff6b35;
  --danger: #b42318;
  --ok: #087f5b;
  --border: #d7deeb;
  --shadow: 0 12px 28px rgba(0, 30, 84, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 20%, var(--bg-2) 0%, rgba(231, 255, 233, 0) 35%),
    radial-gradient(circle at 85% 10%, #e9f0ff 0%, rgba(233, 240, 255, 0) 40%),
    linear-gradient(180deg, #fbfcff 0%, #f6f9ff 100%);
  min-height: 100vh;
}

.header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 14px;
}

.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.sub {
  margin-top: 8px;
  color: var(--muted);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  display: grid;
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.btn-main {
  background: var(--accent);
  color: #fff;
}

.btn-alt {
  background: #f4f7ff;
  color: #0d2a60;
}

.btn-warn {
  background: #fff4f1;
  color: #9c2f00;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-ok {
  background: #e8fff6;
  color: var(--ok);
}

.badge-bad {
  background: #fff1f0;
  color: var(--danger);
}

.result,
.code-box {
  background: #f8faff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.top-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.top-nav a {
  text-decoration: none;
  color: #0b3869;
  background: #edf4ff;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
}

.helper {
  font-size: 13px;
  color: var(--muted);
}

.mobile-wrap {
  max-width: 520px;
}

.product-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.product-item {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.product-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 109, 119, 0.12);
}

.product-name {
  font-weight: 700;
}

.product-detail-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  background: #edf4ff;
  color: #0d2a60;
  border: 1px solid #c9d8ff;
  font-weight: 800;
  line-height: 1;
}

.detail-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.detail-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 36, 0.3);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.detail-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 25, 68, 0.16);
  padding: 10px 14px 18px;
  max-height: 74vh;
  overflow: auto;
  transform: translateY(105%);
  transition: transform 0.24s ease;
}

.detail-sheet.open {
  pointer-events: auto;
}

.detail-sheet.open .detail-sheet-mask {
  opacity: 1;
}

.detail-sheet.open .detail-sheet-panel {
  transform: translateY(0);
}

.detail-sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 10px;
  background: #d8e0f2;
  margin: 4px auto 10px;
}

.detail-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.detail-sheet-body {
  font-size: 14px;
  color: var(--text);
}

.detail-sheet-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.product-thumb {
  width: 66px;
  height: 66px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef3ff;
}

.admin-product-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  margin-bottom: 10px;
}

.success-card {
  text-align: center;
  padding-top: 28px;
  padding-bottom: 28px;
}

.success-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #17a57b 0%, #0f8b67 100%);
  box-shadow: 0 8px 20px rgba(16, 142, 105, 0.26);
}

.success-title {
  margin: 0;
  font-size: 28px;
  color: #0e2b1f;
}

.success-text {
  margin: 14px auto 0;
  max-width: 420px;
  color: #284a3c;
  font-size: 18px;
  line-height: 1.65;
}

.success-meta {
  margin-top: 14px;
  color: #5b6577;
  font-size: 13px;
}

@media (max-width: 820px) {
  .row,
  .row-3 {
    grid-template-columns: 1fr;
  }

  .header {
    padding-top: 20px;
  }
}
