:root {
  --navy: #12304f;
  --navy-2: #1c4770;
  --orange: #ff7a1a;
  --ink: #1b2430;
  --gray: #6b7684;
  --line: #e6eaf0;
  --bg: #f5f7fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 32px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.logo {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; letter-spacing: 1px;
}

.brand h1 { font-size: 19px; margin: 0; font-weight: 700; }
.brand p { margin: 3px 0 0; font-size: 12px; color: var(--gray); }

.header-right { text-align: right; font-size: 12px; color: var(--gray); line-height: 1.7; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 6px 22px rgba(18, 48, 79, .06);
}

.step { display: none; }
.step.active { display: block; }

.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.step-title .num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff;
  font-size: 13px; display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.step-title h2 { margin: 0; font-size: 20px; }

.drop {
  border: 2px dashed #c8d3e0;
  border-radius: 14px;
  padding: 46px 24px;
  text-align: center;
  cursor: pointer;
  transition: .15s;
  background: #fbfcfe;
}
.drop:hover, .drop.over { border-color: var(--orange); background: #fff8f2; }
.drop .big { font-size: 34px; margin-bottom: 10px; }
.drop h3 { margin: 0 0 8px; font-size: 17px; }
.drop p { margin: 0; color: var(--gray); font-size: 13px; line-height: 1.8; }

.file-row {
  display: flex; align-items: center; gap: 16px;
  padding: 18px; border-radius: 12px; background: #f7f9fc; border: 1px solid var(--line);
}
.file-row .icon { font-size: 30px; }
.file-row .meta { flex: 1; min-width: 0; }
.file-row .meta b { display: block; font-size: 15px; word-break: break-all; }
.file-row .meta span { font-size: 13px; color: var(--gray); }
.link { color: var(--navy-2); font-size: 13px; cursor: pointer; text-decoration: underline; background: none; border: 0; }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.opt-group label { display: block; font-size: 13px; color: var(--gray); margin-bottom: 9px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 11px 20px; font-size: 15px; cursor: pointer; transition: .12s;
  font-family: inherit; color: var(--ink);
}
.chip:hover { border-color: #b9c6d6; }
.chip.on { border-color: var(--navy); background: var(--navy); color: #fff; }

.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 10px; width: fit-content; }
.stepper button {
  width: 44px; height: 44px; border: 0; background: #fff; font-size: 20px; cursor: pointer; color: var(--navy);
}
.stepper button:disabled { color: #c3ccd8; cursor: not-allowed; }
.stepper span { width: 56px; text-align: center; font-size: 17px; font-weight: 600; border-left: 1px solid var(--line); border-right: 1px solid var(--line); line-height: 44px; }

.summary {
  margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.summary .detail { font-size: 13px; color: var(--gray); line-height: 1.9; }
.price { font-size: 34px; font-weight: 700; color: var(--orange); letter-spacing: -.5px; }
.price small { font-size: 18px; margin-right: 2px; }

.btn {
  border: 0; border-radius: 12px; padding: 15px 34px; font-size: 17px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: .15s;
}
.btn-main { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(255, 122, 26, .28); }
.btn-main:hover { filter: brightness(1.04); }
.btn-main:disabled { background: #dfe5ec; color: #8a95a3; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }

.center { text-align: center; }
.pay-box { max-width: 420px; margin: 0 auto; text-align: center; }
.pay-box img { width: 260px; height: 260px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.pay-amount { font-size: 30px; font-weight: 700; color: var(--ink); margin: 18px 0 4px; }
.pay-amount small { font-size: 16px; }
.pay-tip { color: var(--gray); font-size: 13px; line-height: 1.9; margin-top: 14px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-right: 6px; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }

.done-icon { font-size: 60px; line-height: 1; }
.done h2 { font-size: 26px; margin: 14px 0 8px; }
.done p { color: var(--gray); font-size: 14px; line-height: 2; margin: 0; }
.ordno { display: inline-block; margin-top: 18px; font-family: ui-monospace, monospace; font-size: 13px; color: var(--gray); }

footer { margin-top: 26px; text-align: center; font-size: 12px; color: #98a3b1; }
footer a { color: #98a3b1; text-decoration: none; margin-left: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(18, 48, 79, .94); color: #fff; padding: 12px 22px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 20; max-width: 80vw;
}
.toast.show { opacity: 1; bottom: 56px; }

/* ---------------- 管理端 ---------------- */
.admin-login { max-width: 380px; margin: 80px auto; }
.admin-login input {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; margin-bottom: 14px; font-family: inherit;
}
.admin-login input:focus { outline: none; border-color: var(--navy-2); }

.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  border: 0; background: #fff; border-radius: 10px; padding: 10px 20px; font-size: 14px;
  color: var(--gray); cursor: pointer; border: 1px solid var(--line); font-family: inherit;
}
.tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--gray); font-weight: 500; background: #fbfcfe; }
td.name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.b-pending { background: #fff3e6; color: #c25b00; }
.b-paid { background: #e8f2ff; color: #1a5bb0; }
.b-printing { background: #eee9ff; color: #5b3fbf; }
.b-done { background: #e7f7ee; color: #1a7f4b; }
.b-failed { background: #ffeaea; color: #c02626; }
.b-expired { background: #f0f2f5; color: #8a95a3; }

.row-actions button {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 12px;
  font-size: 12px; cursor: pointer; margin-right: 6px; font-family: inherit;
}
.row-actions button:hover { border-color: var(--navy-2); color: var(--navy-2); }

.form-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row label { width: 150px; font-size: 13px; color: var(--gray); }
.form-row input, .form-row select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
  font-family: inherit; min-width: 240px;
}
.form-row input:focus, .form-row select:focus { outline: none; border-color: var(--navy-2); }
.hint { font-size: 12px; color: #98a3b1; margin: -6px 0 18px 162px; line-height: 1.7; }
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.price-grid .cell label { display: block; font-size: 12px; color: var(--gray); margin-bottom: 6px; }
.price-grid .cell input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; }

.m-only { display: none; }

@media (max-width: 720px) {
  .m-only { display: inline; }
  .pc-only { display: none; }
  .pay-box img { width: 68vw; height: 68vw; }
  .wrap { padding: 0 14px 24px; }
  header { padding: 16px 0 14px; }
  .header-right { display: none; }
  .brand h1 { font-size: 16px; }
  .brand p { font-size: 11px; }
  .card { padding: 20px 16px; border-radius: 14px; }
  .step-title h2 { font-size: 17px; }
  .drop { padding: 32px 16px; }
  .drop h3 { font-size: 15px; }
  .drop p { font-size: 12px; }
  .opt-grid { grid-template-columns: 1fr; gap: 16px; }
  .chip { padding: 10px 18px; font-size: 14px; }
  .summary { flex-direction: column; align-items: stretch; gap: 14px; }
  .summary > div:last-child { justify-content: space-between; }
  .price { font-size: 28px; }
  .btn { width: 100%; }
  .price-grid { grid-template-columns: 1fr 1fr; }
  .form-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .form-row label { width: 100%; }
  .form-row input, .form-row select { min-width: 0; width: 100%; }
  .hint { margin-left: 0; }
  .admin-login { margin: 30px auto; }
  table { font-size: 12px; }
}
