:root {
  --blue: #2563eb;
  --text: #172033;
  --muted: #667085;
  --line: #d9e4f5;
  --danger: #ef4444;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif; background: linear-gradient(180deg, #f7fbff, #eef5ff); color: var(--text); }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 6vw; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 9; }
.brand { font-weight: 800; font-size: 20px; }
.topbar a { color: var(--blue); text-decoration: none; }
.page { max-width: 1180px; margin: 0 auto; padding: 34px 18px 80px; }
.hero { padding: 42px 0; }
.eyebrow { letter-spacing: .15em; color: var(--blue); font-weight: 800; font-size: 13px; }
.hero h1 { font-size: 42px; margin: 8px 0 12px; }
.hero p { color: var(--muted); }
h2 { margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.software-card, .panel { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 50px rgba(28,73,133,.08); }
.software-card { padding: 24px; }
.software-card h3 { font-size: 24px; margin: 0 0 12px; }
.software-card p { color: var(--muted); min-height: 52px; }
.meta { display: flex; justify-content: space-between; margin: 18px 0; color: var(--muted); }
.meta span:first-child { font-size: 24px; color: var(--blue); font-weight: 900; }
.panel { padding: 24px; margin-top: 26px; }
.hidden { display: none !important; }
.checkout-head { display: flex; justify-content: space-between; gap: 20px; }
.checkout-head h2 { font-size: 40px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.qr-box { border: 1px solid var(--line); border-radius: 18px; background: #f8fbff; padding: 16px; text-align: center; }
.qr-box img { max-width: 100%; max-height: 430px; object-fit: contain; border-radius: 12px; background: #fff; }
label { display: block; margin: 12px 0 7px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; font: inherit; background: #fff; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 14px; margin: 16px 0; padding: 12px; }
.inline { display: inline-flex; align-items: center; gap: 6px; margin-right: 20px; }
.inline input { width: auto; }
.pay-row { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; padding: 18px; border-radius: 16px; background: #f8fbff; }
.pay-row strong { font-size: 30px; color: var(--blue); }
.btn { border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn.primary { background: var(--blue); color: white; }
.btn.muted { background: #edf4ff; color: #1e293b; }
.btn.danger { background: #fee2e2; color: #dc2626; }
.btn.small { padding: 7px 10px; border-radius: 10px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.license-code { background: #0f172a; color: #d1fae5; border-radius: 14px; padding: 18px; margin: 16px 0; font: 700 18px Consolas, monospace; word-break: break-all; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.small-panel { max-width: 440px; margin: 60px auto; }
.hint { color: var(--muted); font-size: 14px; }
.warning { color: #dc2626; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; }
.mini-card, .order { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-top: 10px; background: #fff; }
.mini-card { display: grid; grid-template-columns: 1fr 60px 70px; gap: 10px; align-items: center; }
.card-list code { word-break: break-all; }
.delivery-state { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; align-items: start; }
.state-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; }
.pending-state .state-icon { background: #fff7ed; color: #ea580c; }
.success-state .state-icon { background: #dcfce7; color: #15803d; }
.delivery-content { min-width: 0; }
.delivery-state h2 { margin: 3px 0 12px; }
.delivery-state p { line-height: 1.65; }

@media (max-width: 800px) {
  .checkout-grid, .admin-grid { grid-template-columns: 1fr; }
  .hero h1, .checkout-head h2 { font-size: 30px; }
  .topbar { padding: 0 16px; }
  .delivery-state { grid-template-columns: 1fr; }
  .state-icon { width: 48px; height: 48px; }
}
