:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #18202f;
  --muted: #667085;
  --line: #e4e7ec;
  --primary: #1f5eff;
  --primary-dark: #1747c7;
  --danger: #b42318;
  --success: #067647;
  --shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.site-header { background: rgba(255,255,255,0.9); border-bottom: 1px solid var(--line); position: sticky; top: 0; backdrop-filter: blur(8px); z-index: 5; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { font-size: 20px; font-weight: 800; color: var(--text); }
nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 24px; margin: 24px 0; }
.hero { padding: 36px; background: linear-gradient(135deg, #ffffff, #eef3ff); }
.hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.05; margin: 6px 0 16px; max-width: 760px; }
.hero p { max-width: 680px; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; color: var(--primary); font-weight: 700; font-size: 13px; margin: 0 0 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.product-card { display: flex; flex-direction: column; gap: 12px; }
.product-card h3 { margin: 0; font-size: 22px; }
.product-card p { color: var(--muted); flex: 1; }
.badge { display: inline-flex; width: max-content; border: 1px solid #c7d7fe; background: #eef4ff; color: #1849a9; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); }
.meta.big { justify-content: flex-start; }
.price { color: var(--text); font-size: 24px; font-weight: 800; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 0; border-radius: 12px; padding: 10px 16px; background: var(--primary); color: white; font-weight: 700; cursor: pointer; text-decoration: none; }
.button:hover { background: var(--primary-dark); text-decoration: none; }
.button.secondary { background: #344054; }
.link-button { border: 0; background: transparent; color: var(--primary); padding: 0; font: inherit; cursor: pointer; }
.inline { display: inline; }
.form-card form { display: grid; gap: 16px; }
.narrow { max-width: 560px; }
label { display: grid; gap: 8px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; background: white; }
textarea { resize: vertical; }
.flash-wrap { margin-top: 20px; }
.flash { border-radius: 14px; padding: 12px 14px; margin: 10px 0; border: 1px solid var(--line); background: white; }
.flash.success { border-color: #abefc6; background: #ecfdf3; color: var(--success); }
.flash.error { border-color: #fecdca; background: #fef3f2; color: var(--danger); }
.status { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #f2f4f7; font-weight: 700; }
.sandbox-box { border: 1px dashed #98a2b3; background: #f9fafb; padding: 18px; border-radius: 16px; margin-top: 20px; }
.delivery-box { border: 1px solid #abefc6; background: #ecfdf3; padding: 18px; border-radius: 16px; margin-top: 20px; }
pre { white-space: pre-wrap; word-break: break-word; background: rgba(255,255,255,.75); padding: 14px; border-radius: 12px; border: 1px solid var(--line); }
.mini-pre { max-width: 320px; max-height: 120px; overflow: auto; margin: 0; font-size: 12px; }
.admin-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.stat span { color: var(--muted); }
.stat strong { display: block; font-size: 30px; margin-top: 6px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.actions { display: flex; gap: 12px; align-items: center; }
.footer { color: var(--muted); font-size: 13px; padding: 28px 20px 48px; }
code { background: #f2f4f7; border: 1px solid var(--line); padding: 2px 6px; border-radius: 8px; }
@media (max-width: 700px) {
  .nav { align-items: flex-start; flex-direction: column; padding: 14px 20px; gap: 12px; }
  .hero { padding: 26px; }
  .meta { align-items: flex-start; flex-direction: column; }
}
