:root {
  color-scheme: light;
  --ink: #102033;
  --muted: #5f6f82;
  --soft: #eef5f4;
  --line: #d7e3e8;
  --panel: #ffffff;
  --page: #f4f7f8;
  --teal: #0f9f92;
  --teal-dark: #08776f;
  --cyan: #dff8f5;
  --rose: #c23a4b;
  --amber: #a66300;
  --green: #147a52;
  --shadow: 0 14px 34px rgba(16, 32, 51, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eef7f6 0%, var(--page) 42%, #eef2f5 100%);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.container { width: min(1240px, calc(100% - 36px)); margin: 0 auto; padding: 42px 0 64px; }
.contact-pill {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 20;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid #b7e2de;
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  color: var(--teal-dark);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(16, 32, 51, .08);
}
.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-right: 190px;
}
.hero h1, .panel h1 { margin: 4px 0 10px; font-size: 46px; line-height: 1.08; letter-spacing: 0; }
.hero-copy { max-width: 740px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.eyebrow { margin: 0; color: var(--teal-dark); font-weight: 800; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: stretch; }
.product-card, .panel, .notice {
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(215,227,232,.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.product-card {
  min-height: 438px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.product-card:hover { border-color: #a7d9d4; box-shadow: 0 18px 40px rgba(16, 32, 51, .11); }
.product-card h2 { min-height: 58px; margin: 14px 0 8px; font-size: 24px; line-height: 1.22; letter-spacing: 0; }
.product-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--cyan);
  font-weight: 800;
}
.product-bottom { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.product-bottom strong { font-size: 32px; color: var(--teal-dark); }
.product-bottom span { color: var(--muted); }
.field-hint { color: var(--muted); font-size: 12px; font-weight: 400; }
label { display: grid; gap: 8px; color: #24364b; font-weight: 800; }
input, textarea, select {
  width: 100%;
  border: 1px solid #cfdce6;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 12px 13px;
  outline: none;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15,159,146,.12); }
.buy-form, .proof-form, .stack-form { display: grid; gap: 14px; }
.primary, .ghost {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary { background: var(--teal); color: #fff; box-shadow: 0 10px 18px rgba(15,159,146,.18); }
.primary:hover { background: var(--teal-dark); }
.primary:disabled, .ghost:disabled { background: #b8c4cf; color: #fff; cursor: not-allowed; box-shadow: none; border-color: #b8c4cf; }
.ghost { background: #fff; color: var(--teal-dark); border: 1px solid #b7e2de; }
.ghost:hover { background: #ecfffd; }
.danger { color: var(--rose); border-color: #f0bcc4; }
.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.link-button { margin-top: 14px; }
.notice { margin-top: 24px; padding: 20px 22px; }
.notice p { color: var(--muted); line-height: 1.8; margin: 8px 0 0; }
.order-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) 420px; gap: 20px; align-items: start; }
.panel { padding: 24px; }
.order-head, .panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.detail-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.detail-list div { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fbfcfe; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 8px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
  background: #edf2f7;
  color: #475467;
}
.status.pending_payment, .status.awaiting_review { background: #fff4df; color: var(--amber); }
.status.fulfilled { background: #e4f7ee; color: var(--green); }
.status.rejected { background: #fff0f2; color: var(--rose); }
.payment-panel { position: sticky; top: 70px; }
.payment-panel h2, .panel h2 { margin: 0 0 10px; font-size: 22px; letter-spacing: 0; }
.payment-panel p, .muted { color: var(--muted); line-height: 1.7; }
.qr { width: 100%; max-height: 560px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin: 12px 0 0; }
.waiting-box, .code-box {
  margin-top: 20px;
  border: 1px solid #b7e2de;
  border-radius: 8px;
  background: #ecfffd;
  padding: 18px;
}
.waiting-box strong { display: block; margin-bottom: 8px; color: var(--teal-dark); font-size: 20px; }
.waiting-box p, .code-box p { margin: 0 0 12px; color: var(--muted); line-height: 1.7; }
.waiting-box form { margin-top: 12px; }
.code-box code { display: block; font-size: 21px; font-weight: 800; overflow-wrap: anywhere; color: var(--teal-dark); }
.code-list { display: grid; gap: 10px; }
.code-list code { background: #fff; border: 1px solid #b7e2de; border-radius: 8px; padding: 10px 12px; }
.steps { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.steps span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted); }
.steps .done { background: var(--cyan); color: var(--teal-dark); border-color: #b7e2de; font-weight: 800; }
.login-wrap { min-height: 78vh; display: grid; place-items: center; }
.login-card { width: min(430px, 100%); }
.login-card h1 { font-size: 36px; }
.login-card form, .login-card { display: grid; gap: 16px; }
.admin-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
.admin-nav a, .filters a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 7px;
  color: #475467;
  font-weight: 800;
}
.admin-nav a.active, .filters a.active { background: var(--teal); color: #fff; }
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.admin-stats div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: var(--shadow); }
.admin-stats span { color: var(--muted); }
.admin-stats strong { display: block; margin-top: 8px; font-size: 30px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: #475467; font-size: 13px; background: #f8fafc; }
td span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.feedback-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff0f2;
  color: var(--rose);
  font-weight: 800;
}
.inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form input { max-width: 360px; }
.empty { padding: 24px; color: var(--muted); text-align: center; }
.center { text-align: center; max-width: 640px; margin: 60px auto; }

@media (max-width: 920px) {
  .container { width: min(100% - 24px, 680px); padding-top: 76px; }
  .contact-pill { left: 12px; right: 12px; justify-content: center; }
  .hero { padding-right: 0; flex-direction: column; }
  .hero h1, .panel h1 { font-size: 34px; }
  .grid, .order-layout, .admin-stats { grid-template-columns: 1fr; }
  .payment-panel { position: static; }
  .order-head, .panel-head { flex-direction: column; }
  .detail-list { grid-template-columns: 1fr; }
  .product-card { min-height: auto; }
  .inline-form { display: grid; }
  .inline-form input { max-width: none; }
}
