:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --green: #07c160;
  --green-dark: #05a955;
  --red: #ef4444;
  --blue: #2563eb;
  --orange: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 0%, #e9fff3 0, transparent 32%), var(--bg);
}
a { color: var(--green); text-decoration: none; }
.container { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.header { padding: 28px 0 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; }
.logo { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg, #07c160, #13d676); display: grid; place-items: center; color: white; box-shadow: 0 10px 24px rgba(7, 193, 96, .25); }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.card { background: rgba(255,255,255,.92); border: 1px solid rgba(229,231,235,.85); border-radius: 24px; box-shadow: var(--shadow); padding: 24px; }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: stretch; padding: 20px 0 32px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.08; margin: 12px 0 16px; letter-spacing: -1px; }
.hero p { color: var(--muted); line-height: 1.8; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #ecfdf3; color: #087f3d; font-weight: 700; font-size: 13px; }
.qr-wrap { text-align: center; }
.qr-box { width: 100%; min-height: 280px; display: grid; place-items: center; border: 1px dashed #bbf7d0; border-radius: 22px; background: #fbfffd; }
.qr-box img { width: min(290px, 90%); height: auto; }
.url-box { word-break: break-all; background: #f9fafb; border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: var(--muted); font-size: 13px; margin-top: 14px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn { border: none; border-radius: 14px; padding: 12px 16px; font-weight: 800; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 8px; transition: .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: white; box-shadow: 0 10px 20px rgba(7,193,96,.18); }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: #eef2ff; color: #3730a3; }
.btn-light { background: #f3f4f6; color: #374151; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-warning { background: #fef3c7; color: #92400e; }
.btn-small { padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 34px; }
.step h3 { margin: 6px 0; }
.step p { color: var(--muted); line-height: 1.7; font-size: 14px; }
.num { width: 34px; height: 34px; border-radius: 12px; background: #ecfdf3; color: #047a3b; font-weight: 900; display: grid; place-items: center; }
.form-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 0; }
.form-card { width: min(520px, calc(100% - 32px)); }
.form-card h1 { margin-top: 0; }
.field { margin: 16px 0; }
label { display: block; font-weight: 800; margin-bottom: 8px; }
input, textarea, select { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; font: inherit; outline: none; background: white; }
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(7,193,96,.1); }
textarea { resize: vertical; min-height: 88px; }
.hint, .muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.notice { border-radius: 14px; padding: 12px 14px; margin: 14px 0; display: none; }
.notice.show { display: block; }
.notice.ok { background: #ecfdf3; color: #047a3b; }
.notice.err { background: #fef2f2; color: #b91c1c; }
.notice.info { background: #eff6ff; color: #1d4ed8; }
.admin-layout { padding: 20px 0 40px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 18px 0; }
.toolbar-left, .toolbar-right { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 170px; }
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid var(--line); background: white; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
th { background: #f9fafb; position: sticky; top: 0; z-index: 1; }
tr:hover td { background: #fcfdfd; }
.status { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-bind_failed { background: #ffe4e6; color: #be123c; }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: #f3f4f6; padding: 2px 5px; border-radius: 6px; }
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-mask.show { display: flex; }
.modal { width: min(460px, 100%); background: white; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.footer { text-align: center; color: var(--muted); padding: 20px; font-size: 13px; }
@media (max-width: 820px) {
  .hero, .grid { grid-template-columns: 1fr; }
  .header { align-items: flex-start; flex-direction: column; }
  .toolbar { align-items: stretch; }
  .toolbar-left, .toolbar-right, .toolbar input, .toolbar select, .toolbar .btn { width: 100%; }
}
