/* ==========================================================
   归一软件工作室 · 科技感主题（深空蓝 / 赛博青 / 玻璃拟态）
   纯 CSS 实现，无图片；全站共享，一处改版全站生效
   ========================================================== */
:root {
  --fg: #e8eef7;
  --fg-muted: #97a3b8;
  --bg: #0a1020;
  --bg-soft: #111a2e;
  --panel: rgba(255, 255, 255, .06);
  --panel-2: rgba(255, 255, 255, .09);
  --border: rgba(148, 163, 184, .18);
  --border-strong: rgba(56, 189, 248, .5);
  --primary: #38bdf8;
  --primary-2: #3b82f6;
  --primary-3: #818cf8;
  --primary-hover: #7dd3fc;
  --primary-dim: rgba(56, 189, 248, .1);
  --danger: #fb7185;
  --ok: #34d399;
  --grad: linear-gradient(135deg, #38bdf8 0%, #3b82f6 55%, #818cf8 100%);
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* 始终预留滚动条槽位，防止内容长短变化时页面水平位移（顶行闪动根因） */
html { scrollbar-gutter: stable; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--fg);
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(59, 130, 246, .10), transparent 60%),
    radial-gradient(700px 500px at 10% 0%, rgba(129, 140, 248, .07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.8;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color-scheme: dark;
}
/* 极淡网格底纹，几乎不可见，仅作质感点缀 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .025) 1px, transparent 1px);
  background-size: 48px 48px;
}
header, main, footer { position: relative; z-index: 1; }

::selection { background: rgba(56, 189, 248, .25); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, .2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(56, 189, 248, .35); }

.container { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted { color: var(--fg-muted); font-size: 14px; line-height: 1.85; }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }

/* 顶部导航（毛玻璃） */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 16, 32, .8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .5px;
  text-decoration: none;
  position: relative;
}
.brand-mark {
  width: 38px; height: 38px;
  display: inline-block;
  flex-shrink: 0;
  transition: transform .25s ease;
}
.brand:hover .brand-mark {
  transform: rotate(45deg);
}
.brand-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand::after {
  content: "";
  position: absolute;
  left: 48px; right: 0; bottom: -2px;
  height: 1px;
  background: var(--grad);
  opacity: .4;
}
.nav-links a {
  color: var(--fg-muted);
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
  position: relative;
  transition: color .15s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { transform: scaleX(1); }

/* 三段式导航：品牌居左、主菜单居中、账户区最右；弹性布局，任何窗口宽度都不重叠、不误点 */
.nav {
  position: relative;
  flex-wrap: wrap;
  column-gap: 18px;
  height: 72px;          /* 固定高度，防止不同页面内容差导致顶行高度跳动 */
  min-height: 72px;
  padding: 0;
}
.brand, .nav-links { white-space: nowrap; }
.nav-center {
  position: static;
  transform: none;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.nav-center a:first-child { margin-left: 0; }
.nav-auth {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
/* 管理员专属入口：低饱和、小字号，仅 role=admin 会话渲染，普通用户无感知 */
.nav-links a.admin-entry {
  color: #64748b;
  font-size: 12px;
  letter-spacing: 1px;
  opacity: .8;
}
.nav-links a.admin-entry::before { content: "· "; color: var(--primary); }
.nav-links a.admin-entry:hover { opacity: 1; color: var(--primary); }
/* 当前在后台页时：后台管理按钮高亮 */
.nav-links a.admin-entry.active {
  color: var(--primary);
  opacity: 1;
  font-weight: 600;
}
.nav-links a.admin-entry.active::before { color: var(--primary-hover); }

/* 主区域（flex:1 保证页脚始终贴底） */
main { flex: 1 0 auto; width: 100%; }
main.container { padding: 36px 20px 72px; }
main.container > * { animation: fadeUp .5s ease both; }
main.container > *:nth-child(2) { animation-delay: .06s; }
main.container > *:nth-child(3) { animation-delay: .12s; }
main.container > *:nth-child(4) { animation-delay: .18s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
h1 { font-size: 30px; margin: 0 0 16px; letter-spacing: .3px; }
h2 { font-size: 23px; margin: 34px 0 16px; letter-spacing: .3px; }
h3 { font-size: 17px; margin: 0 0 10px; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-hover); }
hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* 首页 hero */
.hero {
  text-align: center;
  padding: 110px 0 88px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}
.hero h1, .hero .slogan, .hero .quick-entry, .hero .hero-tag { position: relative; z-index: 1; }
/* hero 呼吸光晕（纯 CSS，无图片） */
.hero::before {
  content: "";
  position: absolute;
  left: 50%; top: 44%;
  width: 580px; height: 380px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(56,189,248,.16), rgba(129,140,248,.06) 55%, transparent 72%);
  filter: blur(8px);
  pointer-events: none;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: .5; transform: translate(-50%, -50%) scale(.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}
.hero::after {
  content: "";
  display: block;
  width: 140px;
  height: 1px;
  margin: 32px auto 0;
  background: var(--grad);
  opacity: .5;
  border-radius: 1px;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 48px;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #ffffff 20%, #c7e2ff 70%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
}
.slogan { color: var(--fg-muted); font-size: 18px; letter-spacing: 2px; }
.quick-entry { margin: 32px 0 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* 首页小标签 */
.hero-tag { margin: 0 0 14px; font-size: 12px; letter-spacing: 5px; color: var(--primary); opacity: .85; }

/* 内页页头（产品中心/个性定制/联系我们） */
.page-hero { text-align: center; padding: 64px 0 40px; margin-bottom: 28px; }
.page-hero h1 {
  font-size: 34px; letter-spacing: 3px; margin: 0 0 14px;
  background: linear-gradient(180deg, #ffffff 20%, #7dd3fc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero .slogan { font-size: 15px; letter-spacing: 1px; margin: 0; }

/* 区块标题 */
.section-head { margin-bottom: 18px; }
.section-head h2 { margin: 0 0 4px; }
.section-head .muted { margin: 0; }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.more-link { font-size: 13px; white-space: nowrap; }

/* 特性卡片 */
.feature-card p { margin: 8px 0 0; }
.feature-index {
  font-size: 12px; letter-spacing: 1px;
  color: var(--primary);
  background: var(--primary-dim);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 2px 8px;
}
.feature-card h3 { display: flex; align-items: center; gap: 10px; }

/* 流程步骤 */
.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.step {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 18px;
  background: var(--panel);
}
.step-num {
  display: inline-flex;
  width: 30px; height: 30px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  background: var(--grad);
  color: #03131c;
  font-weight: 700;
  margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; }

/* CTA 横幅 */
.cta-band {
  margin: 40px 0 8px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 24px;
  background:
    radial-gradient(500px 200px at 50% 0%, rgba(56,189,248,.10), transparent 70%),
    linear-gradient(165deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.cta-band h2 { margin: 0 0 8px; }
.cta-band .muted { margin: 0; }
.cta-band .quick-entry { margin-top: 24px; }

/* 联系我们：站内论坛直连，两行行动卡 */
.contact-direct { max-width: 860px; margin: 0 auto; padding: 10px 32px; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 4px; }
.contact-row + .contact-row { border-top: 1px solid var(--border); }
.contact-text h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: 1px; }
.contact-text p { margin: 0; }
.contact-actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 760px) {
  .step-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-row { flex-direction: column; align-items: stretch; gap: 16px; text-align: center; padding: 24px 4px; }
  .contact-actions { justify-content: center; }
}

/* 卡片网格（玻璃面板） */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: var(--fg);
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: var(--grad);
  opacity: 0;
  transition: opacity .2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 36px -18px rgba(56, 189, 248, .25);
}
.card:hover::before { opacity: .6; }
.card .ver {
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 400;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 9px;
  margin-left: 4px;
}
.card .price { margin-top: 10px; color: var(--primary); font-weight: 600; }
.empty { color: var(--fg-muted); padding: 28px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }

/* 详情页 */
.detail .plans { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.plan {
  display: block;                   /* form/a 都撑满容器、cursor 生效 */
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
  min-width: 130px;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.plan:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.plan h3 { margin: 0 0 8px 0; font-size: 15px; color: var(--fg-muted); }
.plan small { color: var(--fg-muted); font-size: 12px; }
.plan .price { font-size: 22px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.actions { display: flex; gap: 12px; margin: 22px 0; flex-wrap: wrap; }
.markdown { margin-top: 26px; white-space: pre-wrap; color: var(--fg-muted); }

/* 表单 / 登录注册面板 */
.auth {
  max-width: 430px;
  margin: 30px auto;
  padding: 34px 32px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px -30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255,255,255,.06);
}
.auth h1 { text-align: center; margin-bottom: 22px; font-size: 24px; letter-spacing: 4px; }
.form { display: flex; flex-direction: column; gap: 15px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--fg-muted); }
.form input:not([type="radio"]):not([type="checkbox"]), .form textarea, .form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 15px;
  font-family: inherit;
  color: var(--fg);
  background: rgba(10, 16, 32, .8);
  transition: border-color .15s, box-shadow .15s;
}
.form input::placeholder, .form textarea::placeholder { color: #64748b; }
.form select option { background: #111a2e; color: var(--fg); }
/* 全站 select 下拉弹出层深色适配（Windows/Chrome 下拉列表不继承父元素背景） */
select option { background: var(--bg-soft); color: var(--fg); }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .12);
}
.form textarea { resize: vertical; }
.form-error { font-size: 13px; margin: 0; }
.row { display: flex; gap: 12px; }
.row label { flex: 1; min-width: 0; }

/* 下单页：套餐选择行 —— radio + 名称 + 价格 + 说明 对齐成一行 */
.order-card .form label.plan-row {
  flex-direction: row;            /* 覆盖 .form label 默认的 column */
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(10, 16, 32, .5);
  color: var(--fg);
  font-size: 15px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.order-card .form label.plan-row:hover {
  border-color: rgba(56, 189, 248, .4);
  background: rgba(56, 189, 248, .05);
}
.order-card .form label.plan-row input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}
.order-card .form label.plan-row input[type="radio"]:checked + .plan-name {
  color: var(--primary);
}
/* 选中整行高亮（:has 不支持的旧浏览器自动退化为仅名称变色） */
.order-card .form label.plan-row:has(input[type="radio"]:checked) {
  border-color: var(--border-strong);
  background: rgba(56, 189, 248, .08);
}
.order-card .form label.plan-row .plan-name {
  flex: 0 0 64px;                 /* 月度/年度/终身/100条/不限条数 等宽对齐，防止换行错位 */
  white-space: nowrap;
  font-weight: 600;
  color: var(--fg);
  transition: color .15s;
}
.order-card .form label.plan-row .plan-price {
  font-weight: 700;
  font-size: 17px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.order-card .form label.plan-row .plan-desc {
  color: var(--fg-muted);
  font-size: 13px;
  white-space: nowrap;
}

/* APK 管理：双栏布局 */
.apps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 18px;
}
.apps-col {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 26px;
}
.apps-col h2 { margin: 0 0 6px; font-size: 17px; }
.apps-col .muted { margin: 0 0 16px; line-height: 1.7; }
@media (max-width: 720px) {
  .apps-grid { grid-template-columns: 1fr; }
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 9px 20px;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 9px;
  background: rgba(255, 255, 255, .03);
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s ease;
  text-align: center;
}
.btn:hover { border-color: var(--border-strong); color: var(--primary); background: var(--primary-dim); }
.btn:active { transform: scale(.97); }
.btn.primary {
  background: var(--grad);
  color: #03131c;
  font-weight: 600;
  border: none;
  box-shadow: 0 6px 20px -10px rgba(56, 189, 248, .5);
}
.btn.primary:hover { color: #03131c; filter: brightness(1.08); box-shadow: 0 8px 26px -10px rgba(56, 189, 248, .6); }
.btn.block { display: block; width: 100%; }
.btn.sm { padding: 4px 11px; font-size: 12px; border-radius: 7px; }
.btn.danger { color: var(--danger); border-color: rgba(251, 113, 133, .4); }
.btn.danger:hover { border-color: var(--danger); background: rgba(251, 113, 133, .1); color: var(--danger); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* 表格（横向分隔线的现代风格） */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table th, .table td {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 8px 11px;
  text-align: center;
  vertical-align: middle;
}
.table th {
  background: rgba(56, 189, 248, .06);
  font-weight: 600;
  font-size: 12px;
  color: var(--primary);
  letter-spacing: .5px;
  white-space: nowrap;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr, .table tr { transition: background .12s; }
.table tr:hover td { background: rgba(56, 189, 248, .05); }
.inline { display: inline-flex; gap: 6px; align-items: center; }

/* 状态徽标 */
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  line-height: 1.6;
  white-space: nowrap;
}
.badge.on {
  color: var(--ok);
  background: rgba(52, 211, 153, .12);
  border: 1px solid rgba(52, 211, 153, .4);
}
.badge.off {
  color: var(--danger);
  background: rgba(251, 113, 133, .1);
  border: 1px solid rgba(251, 113, 133, .38);
}
.error { color: var(--danger); font-size: 13px; }

/* 授权码框 */
.license-box {
  background: rgba(56, 189, 248, .06);
  border: 1px dashed rgba(56, 189, 248, .45);
  padding: 18px;
  border-radius: var(--radius);
  margin: 18px 0;
  word-break: break-all;
  text-align: center;
}
.license-box code {
  font-size: 19px;
  letter-spacing: 2px;
  color: var(--primary);
}

/* 二维码：保留白底保证可扫 */
.qr {
  margin: 18px 0;
  padding: 10px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  max-width: 240px;
}

/* 统计卡 */
.stats .card { text-align: center; }
.stats .num {
  font-size: 30px;
  font-weight: 700;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 4px 0;
}
.stats small { color: var(--fg-muted); font-size: 12px; }

/* 页脚（固定贴底：内容不足一屏时也在视口最下方；三栏：版权 | 备案 | 条款） */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 18px 0 20px;
  color: var(--fg-muted);
  font-size: 12px;
  background: rgba(10, 16, 32, .6);
}
.site-footer p { margin: 0; }
.site-footer .footer-cols {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.site-footer a {
  color: var(--fg-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.site-footer a:hover { color: var(--primary); }
.site-footer .beian, .site-footer .footer-links { display: inline-flex; align-items: center; }
.site-footer .sep { margin: 0 8px; color: var(--border); }
@media (max-width: 720px) {
  .site-footer .footer-cols { flex-direction: column; text-align: center; }
}

/* 协议/政策类文档页 */
.doc-card { max-width: 860px; margin: 0 auto; line-height: 1.9; }
.doc-card h3 { margin: 18px 0 6px; font-size: 15px; color: var(--fg); }
.doc-card p { margin: 6px 0; font-size: 14px; color: var(--fg-muted); }
.doc-card p strong { color: var(--fg); }

/* 全局提示条 */
.flash {
  padding: 11px 15px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid transparent;
}
.flash-error { background: rgba(251, 113, 133, .09); border-color: rgba(251, 113, 133, .35); color: #fda4af; }
.flash-success { background: rgba(52, 211, 153, .09); border-color: rgba(52, 211, 153, .35); color: #6ee7b7; }

/* 后台二级导航 */
.admin-subnav {
  border-top: 1px solid var(--border);
  background: rgba(17, 26, 46, .7);
}
.admin-subnav .container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 9px;
  padding-bottom: 9px;
}
.admin-subnav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all .15s;
}
.admin-subnav a:hover { color: var(--primary); border-color: var(--border); background: var(--primary-dim); }
.admin-subnav a.active {
  color: #03131c;
  background: var(--grad);
  font-weight: 600;
  box-shadow: 0 4px 14px -6px rgba(56, 189, 248, .4);
}

/* 响应式 */
/* 宽度不足时导航提前竖排，避免菜单与 Logo / 账户区重叠误点 */
@media (max-width: 920px) {
  .nav { flex-direction: column; gap: 10px; padding: 12px 20px; height: auto; }
  .nav-links { justify-content: center; }
  .nav-links a { margin: 0 10px; }
  .nav-center { flex: none; }
  .nav-center a:first-child { margin-left: 10px; }
  .nav-auth { margin-left: 0; justify-content: center; }
}

@media (max-width: 600px) {
  h1 { font-size: 22px; }
  .hero { padding: 36px 0 30px; }
  .hero h1 { font-size: 27px; letter-spacing: 1px; }
  .auth { margin: 14px; padding: 26px 20px; }
  .row { flex-direction: column; }
  .table { display: block; overflow-x: auto; }
}

/* ==========================================================
   后台 · 软件管理（标题居中 / 左表格右信息栏）
   ========================================================== */
.admin-page-title {
  text-align: left;
  margin: 18px 0 14px;
  letter-spacing: 4px;
}

/* 软件管理整体容器：左右两栏各自独立滚动，互不影响 */
.sw-scroll {
  height: calc(100vh - 180px);
  overflow: hidden;           /* 外壳不滚，由内部各自滚 */
  padding-right: 0;
}

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 20px;
  align-items: stretch;       /* 两栏等高，各自内部滚动 */
  height: 100%;
}
.admin-split-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-split-right {
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}
/* 表格与信息栏顶端对齐 */
.admin-split-left .table { margin-top: 0; }

/* 表格滚动区：表头固定不动，仅 tbody 滚动 */
.sw-table-wrap {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.sw-table-wrap .table {
  margin: 0;
  border: none;
  border-radius: 0;
}
.sw-table-wrap thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--panel);
}
.sw-table-wrap thead th {
  border-bottom: 2px solid var(--border);
}

.col-check { width: 64px; text-align: center; white-space: nowrap; }
.check-all-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
.sw-check, .row-no { vertical-align: middle; }
.row-no { color: var(--fg-muted); font-size: 12px; }

#sw-tbody tr { cursor: pointer; }
.table tbody tr.selected td { background: rgba(56, 189, 248, .12); }
.table tbody tr.selected:hover td { background: rgba(56, 189, 248, .16); }

.info-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  background: var(--panel);
  margin-bottom: 16px;
}
.info-card h2 {
  margin: 0 0 14px;
  font-size: 15px;
  letter-spacing: 2px;
  text-align: center;
  color: var(--primary);
}
.info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.info-actions .btn { flex: 1; min-width: 80px; }

/* 上架设置标题行：名称靠左，文本录入/选中删除 固定最右侧 */
.setting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.setting-head h2 { margin: 0; text-align: left; }
.setting-head-actions { display: flex; gap: 8px; flex-shrink: 0; }
.setting-head-actions .btn { flex: 0 0 auto; min-width: auto; }

/* 表单右下角操作区：新增 + 修改 */
.form-actions-end {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.form-actions-end .btn { min-width: 84px; }

/* 价格三栏容器：月度 / 年度 / 终身 等宽并列，输入框宽度自适应 */
.price-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.price-row label { min-width: 0; }
.price-row input {
  width: 100%;
  box-sizing: border-box;
}

/* 安装包上传区 */
.sw-upload {
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  margin-top: 4px;
}

.stats-detail { font-size: 13px; }
.stat-list { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.stat-list dt {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
}
.stat-list dd {
  margin: 0;
  color: var(--fg-muted);
  line-height: 1.6;
}
.stat-list dd.stat-gap { margin-top: 6px; color: var(--fg); }

@media (max-width: 1000px) {
  .admin-split { grid-template-columns: 1fr; }
}

/* 尊重系统"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================
   全站布局精修（2026-09-17）
   原则：零图片、零依赖，仅间距/宽度/层级微调，不动交互
   ========================================================== */

/* 键盘可达性：Tab 焦点清晰可见（鼠标点击不显示，不破坏观感） */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* 内容限宽居中：1440 宽屏下文字不扯成长行、少量卡片不散落半空 */
.home-body, .narrow-wide { max-width: 1080px; margin-left: auto; margin-right: auto; }
.software-list { max-width: 1180px; margin-left: auto; margin-right: auto; }
.detail { max-width: 880px; margin-left: auto; margin-right: auto; }
.custom-form { max-width: 880px; margin-left: auto; margin-right: auto; }

/* 首页/内页各 section 的纵向节奏统一 */
.page-hero + section, .home-body > section + section { margin-top: 28px; }
.home-body > section:last-child { margin-bottom: 8px; }

/* —— 产品中心：信息更饱满的卡片 —— */
.software-list .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sw-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 172px;
}
.sw-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sw-card-top h3 { margin: 0; font-size: 17px; }
.sw-card-cat {
  margin: 0;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--primary);
}
.sw-card-desc {
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.7;
}
.sw-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.sw-card-foot .price { margin: 0; }
.sw-card-go {
  font-size: 13px;
  color: var(--fg-muted);
  transition: color .15s, transform .15s;
}
.sw-card:hover .sw-card-go { color: var(--primary); transform: translateX(3px); }

/* —— 软件详情：价格三方案等宽卡 + 居中产品页 —— */
.detail > h1 {
  text-align: center;
  font-size: 30px;
  letter-spacing: 1px;
  margin: 6px 0 22px;
}
.detail .plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.plan {
  min-width: 0;
  text-align: center;
  padding: 22px 16px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.plan:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 30px -18px rgba(56, 189, 248, .35);
}
.plan h3 {
  color: var(--fg-muted);
  font-size: 13px;
  letter-spacing: 3px;
}
.plan .price {
  font-size: 28px;
  margin: 8px 0 4px;
}
.plan small { color: var(--fg-muted); }
.detail .actions { justify-content: center; }
.detail > .muted.center { max-width: 680px; margin-left: auto; margin-right: auto; line-height: 1.8; }

/* —— 后台概览：快捷入口改胶囊按钮群 —— */
.admin-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.admin-shortcuts .chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-muted);
  background: var(--panel);
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.admin-shortcuts .chip:hover {
  color: var(--primary);
  border-color: var(--border-strong);
  background: var(--primary-dim);
  transform: translateY(-1px);
}

/* ==========================================================
   移动端深度适配（≤ 600px）：自动适应手机登录与浏览
   - 输入框 font-size:16px 防 iOS Safari 缩放
   - 按钮 min-height:44px 达到触摸目标（Apple HIG）
   - 导航横向滚动，避免竖排挤压主内容
   - 表格保留 overflow-x:auto，避免错位
   - 容器 padding 减小，利用屏幕宽度
   ========================================================== */
@media (max-width: 600px) {
  /* 容器内边距压缩 */
  .container { padding: 0 14px; }

  /* 导航：保持单行 + 横向滚动，避免三段竖排挤占屏幕 */
  .nav {
    height: auto;
    min-height: 56px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 0;
    gap: 12px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-links { flex: 0 0 auto; white-space: nowrap; }
  .nav-links a { margin-left: 12px; font-size: 13px; }
  .nav-center { flex: 0 0 auto; }
  .nav-auth { flex: 0 0 auto; margin-left: 0; }
  .brand-text { font-size: 16px; }
  .brand-mark { width: 32px; height: 32px; }

  /* 后台二级导航：横向滚动 */
  .admin-subnav .container {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .admin-subnav .container::-webkit-scrollbar { display: none; }
  .admin-subnav a { flex-shrink: 0; font-size: 12px; padding: 4px 10px; }

  /* Hero */
  .hero { padding: 28px 0 22px; }
  .hero h1 { font-size: 24px; letter-spacing: 0.5px; }
  .hero-tag { font-size: 11px; }
  .slogan { font-size: 13px; }
  .quick-entry { gap: 10px; }
  .quick-entry .btn { flex: 1 1 auto; }

  /* 登录/注册/修改密码：占满宽度，padding 压缩 */
  .auth {
    margin: 12px 0;
    padding: 22px 18px;
    border-radius: 14px;
    max-width: 100%;
  }
  .auth h1 { font-size: 20px; letter-spacing: 2px; margin-bottom: 16px; }

  /* 所有输入框：font-size:16px 防 iOS 缩放 + 触摸目标 */
  input[type="text"], input[type="password"], input[type="email"],
  input[type="number"], input[type="url"], input[type="tel"],
  input[type="search"], textarea, select {
    font-size: 16px !important;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
  }
  textarea { min-height: 80px; }

  /* 所有按钮：触摸目标 ≥ 44px */
  .btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 15px;
    border-radius: 9px;
  }
  .btn.sm { min-height: 36px; padding: 6px 12px; font-size: 12px; }
  .btn.block { width: 100%; }

  /* 表单标签字号 */
  .form label { font-size: 13px; gap: 6px; }

  /* 套餐选择行：压缩间距；窄屏时说明文字整体换到次行，与名称/价格左对齐 */
  .order-card .form label.plan-row {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 8px 10px;
    font-size: 14px;
  }
  .order-card .form label.plan-row .plan-name { flex-basis: 60px; font-size: 14px; }
  .order-card .form label.plan-row .plan-price { font-size: 15px; }
  .order-card .form label.plan-row .plan-desc {
    flex: 1 1 100%;
    padding-left: 26px;   /* 单选框 16px + 间距 10px，与上方文字对齐 */
    margin-top: -2px;
    white-space: normal;
  }

  /* 表格：横向滚动模式 */
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table thead, .table tbody, .table tr { display: table; width: max-content; max-width: 100%; }
  .table th, .table td { padding: 8px 10px; font-size: 13px; }

  /* 卡片网格：单列 */
  .grid { grid-template-columns: 1fr !important; gap: 12px; }
  .step-grid { grid-template-columns: 1fr !important; }
  .feature-grid { grid-template-columns: 1fr 1fr !important; }
  .feature-card { padding: 16px; }

  /* 价格三栏：单列 */
  .price-row { grid-template-columns: 1fr !important; }

  /* 详情页 plans 单列 */
  .detail .plans { grid-template-columns: 1fr; }
  .plan { width: 100%; }

  /* 桌面端限宽容器在手机上恢复全宽 */
  .home-body, .narrow-wide, .software-list, .detail, .custom-form, .contact-direct {
    max-width: 100%;
  }

  /* 行布局：竖排 */
  .row { flex-direction: column; gap: 10px; }
  .row-between { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* 软件管理后台：左右两栏 → 上下两栏 */
  .admin-split { grid-template-columns: 1fr !important; gap: 12px; }
  .sw-scroll { height: auto; overflow: visible; }

  /* footer 简化 */
  .site-footer .footer-cols { flex-direction: column; gap: 6px; text-align: center; }
  .footer-copy, .beian, .footer-links { font-size: 12px; }

  /* 通用标题 */
  h1 { font-size: 20px; }
  h2 { font-size: 17px; }
  h3 { font-size: 15px; }

  /* 闪消息 */
  .flash { padding: 10px 12px; font-size: 13px; }

  /* 文档卡片 */
  .doc-card { padding: 0 4px; }
}

/* 下载帮助折叠区（软件详情页） */
.dl-help {
  margin: 6px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .03);
}
.dl-help summary {
  padding: 11px 15px;
  cursor: pointer;
  font-size: 13px;
  color: var(--fg-muted);
  user-select: none;
}
.dl-help summary:hover { color: var(--primary); }
.dl-help ol {
  margin: 0;
  padding: 4px 15px 14px 34px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--fg-muted);
}
.dl-help li + li { margin-top: 6px; }
.dl-help strong { color: var(--fg); }
.dl-help code {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(56, 189, 248, .1);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--primary);
}

/* ==========================================================
   首页与论坛新区块（2026-09-18 前端改版）
   ========================================================== */
/* 痛点区块：与下方卡片同宽同左缘（不再居中收窄），标题/正文一律左对齐 */
.pain-point { max-width: none; margin-left: 0; margin-right: 0; }
.pain-point .section-head { text-align: left; }
.pain-point .muted { line-height: 2.1; font-size: 14px; text-align: left; margin-top: 6px; }
.feature-card .more-link { margin-top: 14px; display: inline-block; }

/* 三大场景卡片：固定 3 列（更宽）、收紧内边距（更矮） */
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.feature-card { padding: 18px 22px; }
.case-card { padding: 18px 22px; }

/* 首页区块标题与副标题：统一左对齐（带父级限定，避免被其他样式覆盖） */
.home-body .section-head,
.pain-point .section-head { text-align: left; }
.home-body .section-head h2,
.home-body .section-head .muted { text-align: left; }

/* 智慧校园三大场景卡片：等高布局，"了解详情"统一沉到底部同一水平线 */
.scene-grid { align-items: stretch; }
.scene-grid .feature-card { display: flex; flex-direction: column; text-align: left; }
.scene-grid .feature-card p { margin-top: 12px; }
/* 正文两端对齐：左右两边都齐（末行自然左对齐），行距放宽到 2.05 */
.scene-grid .feature-card .muted {
  text-align: justify;
  text-align-last: left;
  text-justify: inter-ideograph;
  line-height: 2.05;
}
.scene-grid .feature-card > p:last-child { margin-top: auto; padding-top: 14px; }
.scene-grid .feature-card h3 { justify-content: flex-start; margin-top: 12px; }

/* 案例占位 */
.case-thumb {
  height: 120px; border-radius: 10px;
  background: repeating-linear-gradient(45deg, rgba(56,189,248,.06), rgba(56,189,248,.06) 12px, rgba(255,255,255,.02) 12px, rgba(255,255,255,.02) 24px);
  border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-muted); font-size: 13px; margin-bottom: 12px;
}
.case-grid { grid-template-columns: repeat(3, 1fr); }
.case-card h3 { margin: 0 0 4px; }

/* 优势 2x2 */
.advantage-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .advantage-grid { grid-template-columns: 1fr; } }

/* 论坛预览 */
.forum-preview {
  display: grid; grid-template-columns: 1fr; gap: 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; background: var(--panel);
}
.forum-preview-right ul { list-style: none; margin: 8px 0 0; padding: 0; }
.forum-list li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.forum-list li:last-child { border-bottom: none; }
@media (max-width: 720px) { .forum-preview { grid-template-columns: 1fr; } }

/* 产品中心锚点导航 */
.anchor-nav {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 24px;
}
.anchor-nav a {
  padding: 6px 16px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--border); color: var(--fg-muted); background: var(--panel);
  transition: all .15s;
}
.anchor-nav a:hover { color: var(--primary); border-color: var(--border-strong); }

/* 论坛横幅 */
.forum-banner {
  max-width: 1080px; margin: 0 auto 24px; padding: 12px 18px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--primary-dim); text-align: center;
}
.reply-area { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }

/* 弹窗 */
.modal {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(7, 11, 22, .75); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.modal-box {
  max-width: 440px; width: calc(100% - 32px); padding: 28px 24px;
  border: 1px solid var(--border-strong); border-radius: 18px;
  background: linear-gradient(165deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); text-align: center;
}
.modal-box p { margin: 0 0 16px; line-height: 1.8; }
.modal-box .btn { margin: 4px; }

/* ==========================================================
   首页 SVG 装饰元素（2026-09-18 升级：零图片、纯内联 SVG 增加生机感）
   ========================================================== */

/* Hero 区域浮动装饰 */
.hero-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}
.hero-deco-1 {
  left: 8%;
  top: 20%;
  width: 140px;
  animation: floatSlow 12s ease-in-out infinite;
}
.hero-deco-2 {
  right: 10%;
  top: 25%;
  width: 110px;
  animation: floatSlow 15s ease-in-out infinite reverse;
}
.hero-deco-3 {
  left: 45%;
  bottom: 10%;
  width: 90px;
  animation: floatSlow 10s ease-in-out infinite;
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

/* 卡片内 SVG 图标 */
.card-icon {
  width: 56px;
  height: 56px;
  margin: 4px 0 12px;
  display: block;
}
.card-icon-sm {
  width: 36px;
  height: 36px;
  margin: 4px 0 10px;
  display: block;
}

/* 案例插画区域 */
.case-thumb-svg {
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.02);
}
.case-thumb-svg svg {
  width: 100%;
  height: 100%;
}
.case-card h3 { margin: 0 0 6px; font-size: 16px; }
.case-card .muted { margin: 0; font-size: 13px; line-height: 1.95; }

/* ==========================================================
   校园论坛
   ========================================================== */
.back-link { margin: 14px 0 6px; font-size: 14px; }

/* 工具栏：分区切换 + 发帖按钮 */
.forum-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.forum-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.forum-tabs a {
  padding: 6px 16px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--border); color: var(--fg-muted);
  background: var(--panel); transition: all .15s;
}
.forum-tabs a:hover { color: var(--primary); border-color: var(--border-strong); }
.forum-tabs a.active {
  color: #06101f; font-weight: 600; border-color: transparent;
  background: var(--grad);
}

/* 帖子列表行 */
.topic-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.topic-row {
  display: grid;
  grid-template-columns: 88px 1fr 76px 76px 110px;
  align-items: center; gap: 12px;
  padding: 12px 16px; text-decoration: none; color: var(--fg);
  border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02);
  transition: background .15s;
}
.topic-row:last-child { border-bottom: none; }
.topic-row:hover { background: var(--primary-dim); }
.topic-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.topic-title {
  font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topic-row:hover .topic-title { color: var(--primary); }
.topic-meta { font-size: 12px; }
.topic-stat { font-size: 13px; color: var(--fg-muted); text-align: center; }
.topic-time { font-size: 12px; text-align: right; }
.forum-empty { text-align: center; padding: 36px 16px; }

/* 分区标签 */
.cat-tag {
  display: inline-block; padding: 2px 10px; border-radius: 6px;
  font-size: 12px; white-space: nowrap; text-align: center;
  border: 1px solid var(--border); color: var(--fg-muted);
}
.cat-manage { color: #67e8f9; border-color: rgba(103,232,249,.35); background: rgba(103,232,249,.08); }
.cat-office { color: #a5b4fc; border-color: rgba(165,180,252,.35); background: rgba(165,180,252,.08); }
.cat-education { color: #6ee7b7; border-color: rgba(110,231,183,.35); background: rgba(110,231,183,.08); }

/* 分页 */
.pager { display: flex; justify-content: center; gap: 6px; margin: 22px 0 8px; flex-wrap: wrap; }
.pager a, .pager-gap {
  min-width: 34px; padding: 5px 10px; text-align: center; border-radius: 8px;
  font-size: 13px; color: var(--fg-muted); text-decoration: none;
  border: 1px solid var(--border); background: var(--panel);
}
.pager a:hover { color: var(--primary); border-color: var(--border-strong); }
.pager a.active { color: #06101f; font-weight: 600; border-color: transparent; background: var(--grad); }
.pager-gap { border-color: transparent; background: transparent; }

/* 帖子详情 */
.topic-detail { padding: 24px 26px; margin-bottom: 20px; }
.topic-detail-head h1 { margin: 10px 0 6px; font-size: 24px; line-height: 1.45; }
.topic-detail-meta { font-size: 13px; margin: 0; }
.topic-content { margin-top: 16px; font-size: 15px; line-height: 2; }
.topic-admin-actions { display: flex; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.inline-form { display: inline-block; margin: 0; }
.inline-form + .inline-form { margin-left: 6px; }
.link-btn {
  padding: 0; border: none; background: none; cursor: pointer;
  color: var(--primary); font-size: 12px;
}
.link-btn:hover { text-decoration: underline; }
.danger-text { color: var(--danger); }

/* 回复列表 */
.reply-section h2 { font-size: 18px; }
.post-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 10px; background: rgba(255,255,255,.02);
}
.post-head { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.post-floor { color: var(--primary); font-weight: 600; }
.post-author { font-weight: 600; }
.post-hidden-tag {
  font-size: 12px; color: var(--danger);
  border: 1px solid rgba(251,113,133,.4); border-radius: 6px; padding: 0 8px;
}
.post-time { margin-left: auto; }
.post-admin { display: inline-flex; gap: 10px; }
.post-body { font-size: 14px; line-height: 1.95; }
.reply-form-wrap { padding: 20px 22px; margin-top: 18px; }
.reply-form-wrap textarea { margin-bottom: 10px; }
.forum-form-wrap { padding: 26px 28px; }
.forum-form-wrap .form label { margin-bottom: 14px; }

/* 后台状态徽标 */
.status-badge { padding: 2px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.status-badge.ok { color: var(--ok); background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); }
.status-badge.bad { color: var(--danger); background: rgba(251,113,133,.1); border: 1px solid rgba(251,113,133,.3); }
.admin-op-col { white-space: nowrap; }
.admin-op-col .inline-form { display: inline-block; margin: 2px 0; }

/* 论坛移动端适配 */
@media (max-width: 720px) {
  .topic-row { grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px; }
  .topic-row .cat-tag { grid-row: 2; justify-self: start; }
  .topic-main { grid-column: 1 / -1; grid-row: 1; }
  .topic-stat, .topic-time { grid-row: 2; }
  .hide-mobile { display: none; }
  .topic-time { font-size: 11px; }
  .post-time { margin-left: 0; width: 100%; }
  .topic-detail { padding: 18px 16px; }
  .forum-form-wrap { padding: 18px 16px; }
}

/* ==========================================================
   后台紧凑表格 / Tab 切换 / 单行统计卡（2026-09-18）
   ========================================================== */

/* 后台页面：内容区铺满窗口（默认 1440 限宽对 11 列设备表太挤），
   页头/二级导航同宽同内边距，保证左右边界对齐 */
.admin-body .container { max-width: 1760px; padding-left: 16px; padding-right: 16px; }

/* 宽表格横向滚动容器：列宽按内容自适应，不挤压不换行 */
.table-scroll { width: 100%; overflow-x: auto; }
/* 去滚动条视觉（设备表已按内容压缩到能容纳的宽度，滚动仅作极窄窗口兜底） */
.table-noscroll { scrollbar-width: none; -ms-overflow-style: none; }
.table-noscroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.table-compact { font-size: 12.5px; }
.table-compact th, .table-compact td { padding: 6px 9px; }
.table-compact th { font-size: 12px; }
.table-nobreak, .table-nobreak th, .table-nobreak td { white-space: nowrap; }
/* 设备表：11 列全部单行显示，宽度铺满可用空间（去掉 min-width，不再强制撑破容器） */
.table-devices { width: 100%; min-width: 0; }
.table-devices th, .table-devices td { padding: 5px 7px; white-space: nowrap; }
.table-devices .hw-id { white-space: nowrap; }
.pair-code { font-size: 14px; }
.trial-time-input { width: 140px; }

/* 同页多表格：Tab 切换（零依赖，common.js 控制 active） */
.tabs { margin-top: 14px; }
.tabs-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin: 16px 0 0;
}
.tab-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: var(--panel);
  color: var(--fg-muted);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active {
  color: var(--primary);
  border-color: var(--border-strong);
  background: rgba(56, 189, 248, .08);
  font-weight: 600;
}
.tab-pane { display: none; padding-top: 12px; }
.tab-pane.active { display: block; }
.tabs-wide { max-width: 1180px; margin-left: auto; margin-right: auto; }
.tabs-wide .info-card { margin-bottom: 0; }

/* 概览：设备/业务统计各占满一行，卡片等宽紧凑 */
.stats-row {
  display: grid;
  gap: 10px;
  margin: 10px 0 6px;
}
.stats-row-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.stats-row-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.stats-row-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.stats-row .card { padding: 12px 8px; }
.stats-row h3 { font-size: 12.5px; margin-bottom: 2px; white-space: nowrap; }
.stats-row .num { font-size: 22px; margin: 2px 0; }
.stats-row small { display: block; font-size: 11px; white-space: nowrap; }
@media (max-width: 1200px) {
  .stats-row-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-row-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-row-10 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .stats-row-7, .stats-row-8, .stats-row-10 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 表单操作按钮：正常宽度、靠右排列 */
.form-actions-end .btn { min-width: 96px; flex: 0 0 auto; }
.auth .form-actions-end { margin-top: 4px; }

/* 后台概览：增大标题与设备/业务统计卡片的行间距 */
.admin-overview h1 { margin-bottom: 24px; }
.admin-overview h2 { margin: 44px 0 22px; }
.admin-overview .stats-row { gap: 16px; margin: 18px 0 12px; }
.admin-overview .stats-row .card { padding: 18px 10px; }
.admin-overview .stats-row h3 { margin-bottom: 6px; }
.admin-overview .stats-row .num { margin: 6px 0; }
@media (max-width: 720px) {
  .admin-overview .stats-row { row-gap: 14px; }
}

/* 首页：收紧 hero 下方空白（.hero 仅首页使用） */
.hero { padding: 92px 0 52px; margin-bottom: 22px; }
@media (max-width: 720px) {
  .hero { padding: 30px 0 20px; }
}

/* 「校园数字化，重在落地减负」下方说明：开头空两格、行距放宽 */
.pain-point .muted { text-indent: 2em; line-height: 2.2; }

/* 首页正文整体行距加大，阅读更舒展 */
.home-body .muted { line-height: 2; }
.home-body .case-card .muted { line-height: 2; }

/* 软件详情：功能说明行距放宽 */
.detail .markdown { line-height: 2.05; }

/* 产品中心：三类分区站位与布局 */
.sw-group { scroll-margin-top: 84px; }
.sw-group + .sw-group { margin-top: 40px; }
.sw-group .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sw-group-empty {
  margin: 0; padding: 24px; text-align: center;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--panel);
}
@media (max-width: 1200px) {
  .sw-group .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .sw-group + .sw-group { margin-top: 30px; }
}

/* 设备管理：工具栏（标题+软件选择框+搜索框）、一款软件一个表格 */
.devices-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.device-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.device-sw-select {
  width: 240px; max-width: 46vw; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); color: var(--fg); font-size: 14px; cursor: pointer;
}
.device-sw-select option { background: var(--bg-soft); color: var(--fg); }
.device-sw-select:focus { outline: none; border-color: var(--primary, #2b6cb0); }
.device-search-box { display: flex; align-items: center; gap: 10px; }
.device-search-input {
  width: 240px; max-width: 46vw; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); font-size: 14px;
}
.device-search-input:focus { outline: none; border-color: var(--primary, #2b6cb0); }
.device-search-count { white-space: nowrap; }
.device-group { scroll-margin-top: 84px; }
.device-group-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; font-size: 17px; font-weight: 600;
}
.device-group-title::before {
  content: ''; display: inline-block; width: 4px; height: 16px;
  border-radius: 2px; background: var(--primary, #2b6cb0);
}
.device-group-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 7px;
  border-radius: 10px; background: rgba(43,108,176,.12);
  color: var(--primary, #2b6cb0); font-size: 12px; font-weight: 600;
}
@media (max-width: 720px) {
  .devices-toolbar { align-items: stretch; flex-direction: column; }
  .device-tools { width: 100%; }
  .device-sw-select { flex: 1; }
  .device-search-box { flex: 1; justify-content: space-between; }
  .device-search-input { width: 100%; max-width: none; }
}

/* ==========================================================
   后台管理 · 手机版（全面响应式）
   断点：≤1024px 平板，≤768px 手机，≤480px 小屏手机
   核心：带 .card-table 的表格在手机上整行转「卡片」，
   每个字段通过 td[data-label] 显示字段名（左名右值），
   不再横向滚动、不再隐藏列；导航紧凑化；输入 16px 防 iOS 缩放
   ========================================================== */

/* ---- 平板（≤1024px）---- */
@media (max-width: 1024px) {
  .admin-overview h1 { margin-bottom: 18px; }
  .admin-overview h2 { margin: 32px 0 16px; font-size: 18px; }
  /* 7列→3列，8列→4列，避免卡片过窄 */
  .stats-row-7 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-row-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-row-10 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .admin-overview .stats-row .card { padding: 14px 8px; }
  .admin-overview .stats-row .num { font-size: 20px; }
  /* 后台表格内边距略缩 */
  .table-compact th, .table-compact td { padding: 7px 8px; }
  /* 设备表列多，平板宽度下再收紧一点，避免贴边溢出 */
  .table-devices th, .table-devices td { padding: 5px 6px; }

  /* 软件管理：左右双栏改为上下堆叠，取消固定高度双滚动 */
  .sw-scroll { height: auto; overflow: visible; }
  .admin-split { grid-template-columns: 1fr; height: auto; }
  .admin-split-left, .admin-split-right { overflow: visible; }
  .admin-split-right { padding-right: 0; }
  .sw-table-wrap { max-height: 48vh; }
}

/* ---- 手机（≤768px）---- */
@media (max-width: 768px) {
  /* 后台主区域更紧凑 */
  main.container { padding: 18px 14px 48px; }
  .admin-page-title { margin: 14px 0 12px; font-size: 19px; letter-spacing: 2px; }
  .admin-overview h1 { font-size: 21px; margin-bottom: 14px; }
  .admin-overview h2 { margin: 26px 0 12px; font-size: 16px; }

  /* 顶栏导航：多行紧凑排布，链接变小可点 */
  .nav { height: auto; min-height: 0; padding: 8px 0 6px; row-gap: 2px; }
  .nav-links a { margin-left: 0; margin-right: 16px; font-size: 13px; }
  .nav-links a:last-child { margin-right: 0; }
  .nav-center { justify-content: flex-start; }
  .nav-links a::after { bottom: -3px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand::after { left: 42px; }

  /* 后台二级导航：单行横向滑动的药丸，不占多行 */
  .admin-subnav .container {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .admin-subnav .container::-webkit-scrollbar { display: none; }
  .admin-subnav a { flex-shrink: 0; font-size: 12.5px; padding: 5px 12px; }

  /* 统计卡片：2列，数字/标题缩小 */
  .stats-row-7, .stats-row-8, .stats-row-10 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-overview .stats-row { gap: 10px; row-gap: 10px; }
  .admin-overview .stats-row .card { padding: 12px 6px; }
  .admin-overview .stats-row h3 { font-size: 11.5px; margin-bottom: 3px; white-space: normal; line-height: 1.3; }
  .admin-overview .stats-row .num { font-size: 19px; margin: 3px 0; }
  .admin-overview .stats-row small { font-size: 10.5px; white-space: normal; line-height: 1.3; }

  /* ===== 表格 → 卡片（仅 .card-table 容器内启用，前台页面不受影响） ===== */
  .card-table .table thead { display: none; }
  .card-table .table, .card-table .table tbody { display: block; width: 100%; border: none; margin: 12px 0; }
  .card-table .table tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    padding: 6px 12px;
    margin-bottom: 10px;
  }
  .card-table .table td {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 3px 10px;
    text-align: right;
    border-bottom: none;
    padding: 5px 0;
    min-width: 0;
    white-space: normal;
  }
  .card-table .table td::before {
    content: attr(data-label);
    margin-right: auto;
    color: var(--fg-muted);
    font-size: 12px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  /* 空状态行（colspan 提示）：整行居中 */
  .card-table .table td[data-label=""] { display: block; text-align: center; padding: 6px 0; }
  .card-table .table td[data-label=""]::before { content: none; }
  /* 操作列：表单纵向排布，输入框与按钮同行自适应 */
  .card-table .table td[data-label="操作"] { flex-direction: column; align-items: stretch; }
  .card-table .table td[data-label="操作"] form,
  .card-table .table td[data-label="操作"] .inline,
  .card-table .table td[data-label="操作"] .inline-form {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px;
  }
  .card-table .table td input:not([type="checkbox"]):not([type="radio"]),
  .card-table .table td select {
    max-width: 100%; min-width: 0; font-size: 16px;
  }
  .card-table .table td .btn.sm { min-height: 34px; flex-shrink: 0; }
  .card-table .table td .mono { word-break: break-all; }
  .card-table .table td a { word-break: break-all; }

  /* 设备页小字在卡片里保持可读 */
  .table-devices { min-width: 0; }
  .table-devices .hw-id { white-space: normal; font-size: 10px; }
  .trial-time-input { width: auto; flex: 1 1 110px; }

  /* 表单输入 16px：防 iOS 聚焦自动放大 */
  .form input:not([type="radio"]):not([type="checkbox"]), .form textarea, .form select { font-size: 16px; }

  /* 通用后台表格（未转卡片的兜底）：横向滚动 */
  .table-scroll { -webkit-overflow-scrolling: touch; }
  .table thead th { white-space: nowrap; }

  /* 标签页按钮：缩小但可点 */
  .tab-btn { padding: 7px 12px; font-size: 12.5px; }
  .tabs-wide .tabs-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs-wide .tabs-nav::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; }

  /* 软件管理右栏面板与统计明细 */
  .admin-split-right { padding: 0; }
  /* 价格三项与其它字段统一为全宽单列，手机上输入框大小一致 */
  .price-row { grid-template-columns: 1fr; gap: 0; }
  .stat-list dd { word-break: break-all; }
}

/* ---- 小屏手机（≤480px）---- */
@media (max-width: 480px) {
  .admin-overview .stats-row .num { font-size: 17px; }
  .admin-overview .stats-row h3 { font-size: 11px; }
  .nav-links a { margin-right: 12px; font-size: 12.5px; }
  .card-table .table tr { padding: 5px 10px; }
}


