* { box-sizing: border-box; }
body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; margin: 0; background: #f5f6f8; color: #222; }
a { color: #2563eb; text-decoration: none; }
.wrap { max-width: 960px; margin: 0 auto; padding: 16px; }
header.bar { background: #111827; color: #fff; padding: 14px 0; }
header.bar .wrap { display: flex; justify-content: space-between; align-items: center; }
header.bar a { color: #fff; opacity: .9; }
h1.page { font-size: 20px; margin: 18px 0; }
.card-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 14px; }
.pcard { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pcard .name { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.pcard .price { color: #e11d48; font-size: 20px; font-weight: 700; }
.pcard .price small { color: #999; font-weight: 400; }
.pcard .stock { color: #666; font-size: 13px; margin: 6px 0; }
.pcard .desc { color: #888; font-size: 13px; line-height: 1.5; min-height: 38px; }
.btn { display: inline-block; background: #2563eb; color: #fff; padding: 8px 16px; border-radius: 6px; border: 0; cursor: pointer; font-size: 14px; }
.btn.gray { background: #6b7280; }
.btn:hover { opacity: .92; }
form .row { margin-bottom: 12px; }
form label { display: block; margin-bottom: 4px; font-size: 14px; color: #444; }
input, textarea, select { width: 100%; padding: 9px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 9px 10px; border-bottom: 1px solid #eee; font-size: 14px; text-align: left; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.tag.ok { background: #dcfce7; color: #166534; }
.tag.wait { background: #fef9c3; color: #854d0e; }
.tag.bad { background: #fee2e2; color: #991b1b; }
.alert { padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.alert.ok { background: #dcfce7; color: #166534; }
.alert.err { background: #fee2e2; color: #991b1b; }
.keybox { background: #0b1021; color: #d1e8ff; padding: 12px 14px; border-radius: 8px; font-family: Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.notice { background: #eff6ff; color: #1e40af; padding: 10px; border-radius: 8px; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
footer { text-align: center; color: #aaa; font-size: 12px; padding: 24px 0; }

/* 商品卡片图片 */
.pcard .pimg { width: 100%; aspect-ratio: 16 / 10; max-height: 160px; background: #f3f4f6; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.pcard .pimg img { width: 100%; height: 100%; object-fit: cover; }
.pcard .pimg .noimg { color: #9ca3af; font-size: 13px; }

/* 下单页商品简介 */
.pdetail { background: #f9fafb; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: #374151; margin: 8px 0; line-height: 1.6; }

/* 订单查询三按钮 */
.qtabs { display: flex; gap: 10px; margin: 6px 0 16px; flex-wrap: wrap; }
.qtab { flex: 1; min-width: 120px; padding: 14px 10px; border: 2px solid #e5e7eb; background: #fff; border-radius: 12px; font-size: 15px; font-weight: 600; color: #374151; cursor: pointer; transition: .15s; }
.qtab:hover { border-color: #2563eb; color: #2563eb; }
.qtab.active { background: #2563eb; color: #fff; border-color: #2563eb; box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.qtab.cache { background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff; border: 2px solid transparent; }
.qtab.cache.active { background: linear-gradient(135deg, #6d28d9, #4338ca); box-shadow: 0 4px 14px rgba(124,58,237,.45); }
.qpanel { display: none; background: #fff; padding: 16px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.qpanel.show { display: block; }

/* 下单页图片自适应 */
.buy-media { text-align: center; margin: 8px 0; }
.buy-media img { max-width: 100%; max-height: 200px; width: auto; height: auto; object-fit: contain; border-radius: 10px; border: 1px solid #eee; }
/* 商品简介过长可滚动 */
.pdetail { max-height: 150px; overflow-y: auto; }
/* 卡密折叠行 */
.crow td { background: #f8fafc; }
