:root {
  --accent: #3B82F6;
  --accent-dark: #2563EB;
  --accent-soft: #E0E7FF;
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --text: #1E293B;
  --muted: #64748B;
  --green: #10B981;
  --red: #EF4444;
  --amber: #F59E0B;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
a { color: var(--accent-dark); text-decoration: none; }

/* 顶栏 */
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.logo { font-size: 18px; font-weight: 700; color: var(--accent-dark); }
.logo span { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.topbar .spacer { flex: 1; }
.badge {
  background: var(--accent-soft); color: var(--accent-dark);
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge.red { background: #FEE2E2; color: var(--red); }
.badge.green { background: #D1FAE5; color: #059669; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { background: #CBD5E1; cursor: not-allowed; }
.btn.ghost { background: var(--card); color: var(--accent-dark); border: 1px solid var(--accent); }
.btn.ghost:hover { background: #EFF6FF; }
.btn.danger { background: var(--card); color: var(--red); border: 1px solid #FECACA; }
.btn.danger:hover { background: #FEF2F2; }
.btn.sm { padding: 5px 12px; font-size: 13px; }

/* 布局 */
.container { max-width: 1160px; margin: 0 auto; padding: 24px 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; margin-bottom: 16px;
}
.card h3 { font-size: 16px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 760px) { .grid.cols-2 { grid-template-columns: 1fr; } }

/* 表单 */
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; color: var(--text); }
input[type=text], input[type=password], input[type=number], input[type=email], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.row-check { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.row-check label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 160px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { background: #F1F5F9; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:hover td { background: #F8FAFC; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px;
  background: #F1F5F9; color: var(--muted); font-weight: 500;
}
.tag.ok { background: #D1FAE5; color: #059669; }
.tag.warn { background: #FEF3C7; color: #B45309; }
.tag.err { background: #FEE2E2; color: var(--red); }
.tag.busy { background: #DBEAFE; color: var(--accent-dark); }

/* 提示条 */
.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: #1E293B; color: #fff; padding: 10px 22px; border-radius: 8px;
  font-size: 13px; z-index: 999; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }

/* 套餐卡 */
.plan-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  background: #fff; display: flex; flex-direction: column; gap: 8px;
}
.plan-card.hot { border: 2px solid var(--accent); box-shadow: 0 6px 20px rgba(59,130,246,.12); }
.plan-card .price { font-size: 26px; font-weight: 700; color: var(--accent-dark); }
.plan-card .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan-card .pname { font-size: 16px; font-weight: 700; }
.plan-card .pdesc { color: var(--muted); font-size: 13px; flex: 1; }
.plan-card .flag { position: absolute; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #EFF6FF, #EEF2FF);
  border-radius: 16px; padding: 34px 28px; margin-bottom: 22px;
}
.hero h1 { font-size: 26px; margin-bottom: 8px; }
.hero p { color: var(--muted); font-size: 14px; max-width: 640px; line-height: 1.7; }

/* 授权状态条 */
.license-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #D1FAE5, #ECFDF5);
  border: 1px solid #A7F3D0; border-radius: 12px; padding: 14px 18px; margin-bottom: 16px;
}
.license-bar.warn { background: linear-gradient(135deg, #FEF3C7, #FFFBEB); border-color: #FDE68A; }
.license-bar .big { font-size: 18px; font-weight: 700; }

/* 详情格子 */
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px;
}
.stat .num { font-size: 22px; font-weight: 700; color: var(--accent-dark); }
.stat .lbl { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* 登录/注册 */
.auth-wrap { max-width: 400px; margin: 40px auto; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tabs .tab {
  flex: 1; text-align: center; padding: 9px; border-radius: 8px; cursor: pointer;
  background: #E2E8F0; color: var(--muted); font-weight: 600;
}
.auth-tabs .tab.on { background: var(--accent); color: #fff; }

/* 任务状态轮询提示 */
.mono { font-family: Consolas, monospace; font-size: 12px; color: var(--muted); }

/* 管理端布局 */
.admin-wrap { display: flex; min-height: calc(100vh - 60px); }
.admin-nav {
  width: 180px; background: #fff; border-right: 1px solid var(--border); padding: 16px 10px;
}
.admin-nav a {
  display: block; padding: 10px 14px; border-radius: 8px; color: var(--muted);
  font-size: 14px; margin-bottom: 4px; cursor: pointer;
}
.admin-nav a.on { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.admin-main { flex: 1; padding: 20px 24px; }
.panel { display: none; }
.panel.on { display: block; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=text], .toolbar select { width: 200px; }
.toolbar .spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ===== 席位制新增样式 ===== */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h3 { margin-bottom: 0; }
.err { color: var(--red); font-size: 13px; }
.badge.gray { background: #F1F5F9; color: var(--muted); }

/* 应用卡片 + 席位网格 */
.app-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: #FBFDFF; }
.seat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.seat-chip { border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.seat-label { font-weight: 700; font-size: 13px; color: var(--accent-dark); }

/* 套餐分组与卡片 */
.plan-group { margin-bottom: 18px; }
.plan-group h4 { font-size: 15px; margin-bottom: 10px; color: var(--accent-dark); }
.plan-card { cursor: default; }
.plan-name { font-size: 15px; font-weight: 700; }
.plan-price { font-size: 22px; font-weight: 700; color: var(--accent-dark); }
.plan-price .muted { font-size: 12px; font-weight: 400; }

/* 购买弹窗选项 */
.plan-pick {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 8px; cursor: pointer; background: #fff;
}
.plan-pick:hover { border-color: var(--accent); background: #F5F8FF; }

/* 管理端统计卡 */
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-num { font-size: 24px; font-weight: 700; color: var(--accent-dark); margin-top: 4px; }
.platform-rev { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.platform-rev b { color: var(--accent-dark); }

/* 管理端套餐 */
.plan-group-admin { margin-bottom: 16px; }
.add-plan { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.add-plan .input-sm { width: 150px; }
.add-plan input[type=number] { width: 90px; }
.add-plan label { margin: 0; font-weight: 400; }
.input-sm { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
input.input-sm.num { width: 80px; }
.switch { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); cursor: pointer; }

.user-card { margin-bottom: 14px; }

/* 系统设置表单 */
#panel-settings .form-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
#panel-settings .form-row > label { width: 130px; flex: 0 0 130px; padding-top: 8px; font-size: 13px; color: var(--text, #333); }
#panel-settings .form-row > input,
#panel-settings .form-row > select { padding: 8px 10px; border: 1px solid #E4E3DD; border-radius: 8px; font-size: 13px; }
#panel-settings .form-row > textarea { width: 100%; min-width: 300px; padding: 8px 10px; border: 1px solid #E4E3DD; border-radius: 8px; font-size: 12px; font-family: monospace; resize: vertical; }

/* 试用横幅 */
.trial-banner { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; line-height: 1.6; }
.trial-ok { background: rgba(82,196,26,0.10); border: 1px solid rgba(82,196,26,0.35); color: #1f7a16; }
.trial-warn { background: rgba(234,102,104,0.10); border: 1px solid rgba(234,102,104,0.4); color: #b3273a; }
.trial-info { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.3); color: #1d4ed8; }

/* 应用版本管理弹窗 */
.lic-modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,0.45); display: flex; align-items: center; justify-content: center; z-index: 999; }
.lic-modal { width: min(480px, 92vw); background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(15,23,42,.18); overflow: hidden; }
.lic-modal-head { padding: 14px 18px; border-bottom: 1px solid var(--border, #E4E3DD); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lic-modal-body { padding: 16px 18px; }
.lic-modal-body .fm-label { display: block; margin: 12px 0 5px; font-size: 13px; color: #334155; }
.lic-modal-body .fm-inp { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid #E4E3DD; border-radius: 8px; font-size: 13px; }
.lic-modal-body textarea.fm-inp { font-family: inherit; resize: vertical; }
.lic-modal-body .fm-chk { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: #334155; cursor: pointer; }
.lic-modal-foot { padding: 12px 18px; border-top: 1px solid var(--border, #E4E3DD); display: flex; justify-content: flex-end; gap: 10px; }

/* ============ 官网（营销站）样式 ============ */
.site-nav { display:flex; align-items:center; gap:22px; }
.site-nav a { color:#334155; font-size:14px; font-weight:500; }
.site-nav a:hover { color:var(--accent-dark); }
.site-nav a.on { color:var(--accent-dark); font-weight:700; }
.hero {
  background: linear-gradient(135deg, #EEF4FF 0%, #F7FBFF 60%, #FFF 100%);
  border-radius: 20px; padding: 56px 40px; text-align: center;
  margin: 20px 0 12px; border: 1px solid #E6EDFA;
}
.hero h1 { font-size: 34px; line-height: 1.35; color:#0F2A4A; margin-bottom: 14px; }
.hero h1 .grad { background: linear-gradient(90deg,#2563EB,#7C3AED); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color:#52647A; font-size:16px; line-height:1.8; max-width:760px; margin: 0 auto; }
.hero .btns { margin-top: 26px; display:flex; gap: 14px; justify-content:center; flex-wrap:wrap; }
.hero .btn { padding: 12px 26px; font-size: 15px; border-radius: 12px; }
.hero .btn.ghost { background:#fff; }
.hero-metrics { display:flex; gap: 40px; justify-content:center; margin-top: 34px; flex-wrap:wrap; }
.hero-metrics div { text-align:center; }
.hero-metrics b { display:block; font-size:24px; color:#0F2A4A; }
.hero-metrics span { color:#7C8BA1; font-size:13px; }
.section { margin: 44px 0; }
.section > h2 { font-size: 24px; text-align:center; color:#0F2A4A; margin-bottom: 8px; }
.section > p.sub { text-align:center; color:#7C8BA1; margin-bottom: 26px; }
.feature-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 18px; }
.feature-card {
  background:#fff; border:1px solid var(--border); border-radius:16px; padding: 24px;
  transition: all .2s;
}
.feature-card:hover { box-shadow: 0 10px 30px rgba(37,99,235,.08); transform: translateY(-2px); }
.feature-card .ic { width:46px; height:46px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:22px; margin-bottom:14px; }
.feature-card h3 { font-size:16px; margin-bottom:8px; color:#0F2A4A; }
.feature-card p { color:#64748B; font-size:13.5px; line-height:1.75; }
.ic.blue { background:#E0EFFF; } .ic.violet { background:#F0E9FF; } .ic.green { background:#E2F8EC; }
.ic.amber { background:#FFF3DF; } .ic.rose { background:#FFE9EF; } .ic.cyan { background:#DFF6FA; }

/* 展示广场 */
.gallery-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 18px; }
.gallery-card {
  background:#fff; border:1px solid var(--border); border-radius:16px; overflow:hidden;
  display:flex; flex-direction:column; transition: all .2s;
}
.gallery-card:hover { box-shadow:0 12px 32px rgba(15,23,42,.1); transform: translateY(-3px); }
.gallery-card .g-logo { height:130px; background: linear-gradient(135deg,#EEF4FF,#F6F0FF); display:flex; align-items:center; justify-content:center; padding:18px; }
.gallery-card .g-logo img { max-width:100%; max-height:100%; object-fit:contain; }
.gallery-card .g-logo .ph { font-size:38px; opacity:.35; }
.gallery-card .g-body { padding: 14px 16px 16px; display:flex; flex-direction:column; flex:1; }
.gallery-card .g-name { font-size:15px; font-weight:700; color:#0F2A4A; margin-bottom:6px; }
.gallery-card .g-intro { font-size:12.5px; color:#64748B; line-height:1.6; flex:1; margin-bottom:12px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.gallery-card .g-foot { display:flex; align-items:center; justify-content:space-between; }
.gallery-card .g-ver { font-size:11.5px; color:#94A3B8; }
.gallery-card .g-icp { font-size:11.5px; color:#0F766E; margin-top:2px; }
.gallery-card .g-dl { background:var(--accent); color:#fff; border:none; border-radius:8px; padding:7px 16px; font-size:13px; font-weight:600; cursor:pointer; }
.gallery-card .g-dl:hover { background:var(--accent-dark); }
.gallery-empty { text-align:center; color:#94A3B8; padding:36px; }

/* 操作指引步骤 */
.steps { display:grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 16px; counter-reset: step; }
.step { background:#fff; border:1px solid var(--border); border-radius:16px; padding:22px; position:relative; }
.step::before {
  counter-increment: step; content: counter(step);
  width:34px; height:34px; border-radius:50%; background:linear-gradient(135deg,#2563EB,#7C3AED);
  color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center;
  margin-bottom:12px; font-size:15px;
}
.step h3 { font-size:15px; color:#0F2A4A; margin-bottom:6px; }
.step p { color:#64748B; font-size:13px; line-height:1.7; }

/* 下载区 */
.dl-cards { display:grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap:18px; }
.dl-card { background:#fff; border:1px solid var(--border); border-radius:16px; padding:26px; text-align:center; }
.dl-card .ic { font-size:40px; margin-bottom:12px; }
.dl-card h3 { font-size:16px; margin-bottom:6px; }
.dl-card p { color:#64748B; font-size:13px; margin-bottom:16px; }

.site-footer { text-align:center; color:#94A3B8; font-size:12.5px; padding: 30px 20px 40px; border-top:1px solid var(--border); margin-top: 50px; line-height:2; }
.site-footer b { color:#64748B; }

/* ============ 管理端广场审核 ============ */
.g-card-list { display:flex; flex-direction:column; gap:12px; }
.g-row {
  display:flex; gap:14px; align-items:flex-start; background:#fff;
  border:1px solid var(--border); border-radius:14px; padding:14px 16px;
}
.g-row.pending { border-color:#FBBF24; background:#FFFBEB; }
.g-row .g-logo {
  width:64px; height:64px; border-radius:12px; background:#F1F5F9;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden;
}
.g-row .g-logo img { width:100%; height:100%; object-fit:cover; }
.g-row .g-meta { flex:1; min-width:0; }
.g-row .g-t1 { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.g-row .g-t1 b { font-size:15px; color:#0F2A4A; }
.badge.amber { background:#FEF3C7; color:#D97706; }
.g-row .g-t2 { font-size:12px; color:#94A3B8; margin-top:4px; }
.g-row .g-t3 { font-size:13px; color:#475569; margin-top:6px; line-height:1.7; }
.g-row .g-rej { font-size:12.5px; color:#DC2626; margin-top:6px; }
.g-row .g-t4 { font-size:12px; color:#64748B; margin-top:6px; word-break:break-all; }
.g-row .g-ops { display:flex; gap:8px; flex-shrink:0; }
.g-pf {
  display:inline-block; background:#E0EFFF; color:#2563EB; border-radius:6px;
  padding:2px 8px; font-size:11.5px; margin:0 4px 4px 0;
}
.fm-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:8px; }
@media (max-width:720px){ .fm-grid2{ grid-template-columns:1fr; } }
.gallery-card .g-dls { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.g-dl { background:var(--accent); color:#fff; text-decoration:none; border-radius:8px; padding:6px 14px; font-size:12.5px; font-weight:600; }
.g-dl:hover { background:var(--accent-dark); color:#fff; }
.g-nodl { color:#94A3B8; font-size:12px; }
.gallery-card .g-ver { font-size:11.5px; color:#94A3B8; margin-top:8px; }
