/* ============================================================
   股软通 · 股票软件授权管理平台 — 全站样式
   设计系统来源:D:\扫码登录\stock-software-redesign(colors_and_type.css)
   主色调:金黄 #d97706 / #f59e0b 为主基调,深海蓝 #1e3a5f 作结构点缀,
        暖米白 #fffbf5 打底;**全站不用绿色**(股票软件场景,红绿是行情色)。
   约束:CSP `script-src 'self'` + `font-src 'self'` —— 不引外部字体/脚本,
        图标一律内联 SVG(lucide 路径)。
   注意:大量类名被 app.js / software.js 动态生成的 DOM 引用
        (badge/dot/switch/lic-code/pid-code/prod-name…),**改名前先全局搜**。
   ============================================================ */

:root {
  /* 设计 token(与设计稿 colors_and_type.css 一致) */
  --fin-background: #fffbf5;
  --fin-foreground: #1e293b;
  --fin-card: #ffffff;
  --fin-primary: #d97706;
  --fin-primary-foreground: #ffffff;
  --fin-muted: #fff7ed;
  --fin-muted-foreground: #78716c;
  --fin-border: #fed7aa;
  --fin-ring: #f59e0b;

  --brand-deep: #d97706;
  --brand-deep-hover: #b45309;
  --brand-ink: #1e293b;
  --brand-ink-2: #57534e;
  --brand-ink-3: #a8a29e;
  --brand-gold: #f59e0b;
  --brand-gold-hover: #d97706;
  --brand-gold-soft: #fff7ed;
  --brand-blue: #1e3a5f;
  --brand-blue-soft: #eff6ff;
  --brand-line: #fed7aa;
  --brand-surface: #fffbf5;
  --brand-surface-2: #fff7ed;

  /* 状态色(不含绿色) */
  --state-success: #d97706;
  --state-success-bg: #fff7ed;
  --state-warning: #b45309;
  --state-warning-bg: #fff7ed;
  --state-error: #ef4444;
  --state-error-bg: #fef2f2;
  --state-info: #78716c;

  /* 圆角 / 阴影(暖调) */
  --r-sm: 4px; --r-md: 8px; --r-lg: 16px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(60, 40, 10, 0.05), 0 1px 1px rgba(60, 40, 10, 0.03);
  --shadow-2: 0 8px 24px -8px rgba(120, 80, 20, 0.18);
  --shadow-3: 0 24px 60px -20px rgba(120, 80, 20, 0.30);

  /* 兼容别名:老样式表里的变量名(本文件与历史内联样式还在引用) */
  --ink: var(--brand-ink);
  --ink-2: var(--brand-ink-2);
  --ink-3: var(--brand-ink-3);
  --line: #f3e2c7;
  --bg: var(--brand-surface);
  --card: var(--fin-card);
  --radius: var(--r-lg);
  --wx-green: var(--brand-deep);          /* 语义已变:全站主操作色(金黄) */
  --wx-green-dark: var(--brand-deep-hover);

  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--brand-surface);
  color: var(--brand-ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
/* hidden 属性同样必须生效:.field 等作者样式会压过 UA 的 [hidden]{display:none} */
[hidden] { display: none !important; }

/* 内联 SVG 图标基线(lucide 风格:stroke=currentColor) */
svg.icon { width: 1em; height: 1em; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.15em; flex: none; }

/* ============================================================
   顶部导航(三页共用:sticky 金色条 + 白色文案 + 白色下划线激活态)
   ============================================================ */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand-deep);
  box-shadow: var(--shadow-1);
}
.topnav-inner {
  max-width: 1180px; margin: 0 auto; height: 60px;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-1); flex: none;
}
.brand-name { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; height: 60px;
  color: rgba(255, 255, 255, 0.88); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: color 0.15s;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; font-weight: 600; }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0; background: #fff;
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--r-md);
  background: var(--brand-gold); color: var(--brand-blue);
  font-size: 13.5px; font-weight: 700; text-decoration: none;
  border: 0; cursor: pointer; font-family: inherit;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { background: #ffd9a8; }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ============================================================
   页面容器 / 页脚
   ============================================================ */
.page-main { flex: 1; }
.wrap { width: min(1180px, 94vw); margin: 0 auto; }
.foot, .site-foot {
  text-align: center; font-size: 12.5px; color: var(--brand-ink-3);
  padding: 22px 16px; border-top: 1px solid var(--line);
  background: var(--fin-card);
}
/* 页脚外链(ICP 备案号等):继承字号配色,悬停变主题金 */
.foot a, .site-foot a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.foot a:hover, .site-foot a:hover { color: var(--fin-primary); border-bottom-style: solid; }

/* ============================================================
   登录页:hero 左文右卡
   ============================================================ */
.hero { padding: 56px 24px 48px; }
.hero-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 5px 14px; border-radius: var(--r-pill);
  background: var(--brand-gold-soft); border: 1px solid var(--brand-line);
  color: var(--brand-deep); font-size: 12.5px; font-weight: 600;
}
.hero-copy h1 {
  font-size: clamp(28px, 4vw, 44px); font-weight: 700;
  letter-spacing: -0.5px; line-height: 1.2;
}
.hero-copy .hero-sub {
  font-size: 16px; line-height: 1.8; color: var(--brand-ink-2); max-width: 460px;
}
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--brand-gold-soft); color: var(--brand-deep);
  font-size: 13.5px; font-weight: 600;
}
/* 登录后隐藏左侧文案,授权面板占满宽度 */
body.logged-in .hero-copy, body.logged-in .feature-strip { display: none; }
body.logged-in .hero { padding-top: 32px; }
body.logged-in .hero-grid { grid-template-columns: 1fr; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 36px 20px; }
}

/* ============================================================
   卡片 / 登录卡 / 标签页
   ============================================================ */
.card {
  background: var(--fin-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}
#viewQr { padding: 0 0 8px; overflow: hidden; }
.auth-card { padding: 0; }

.tabs {
  display: flex; gap: 4px; padding: 6px 18px 0;
  border-bottom: 1px solid var(--line); background: var(--brand-gold-soft);
}
.tab {
  appearance: none; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--brand-ink-3);
  padding: 14px 16px 12px; position: relative;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--brand-ink); }
.tab.active { color: var(--brand-deep); font-weight: 600; border-bottom-color: var(--brand-deep); }
.tab-body { display: flex; min-height: 0; }
.tab-body.hidden { display: none !important; }
#paneQr .qr-panel, #paneQr .info-panel { flex: 1; }

/* ---------- 邮箱登录表单 ---------- */
.email-form {
  flex: 1; max-width: 440px; margin: 0 auto; width: 100%;
  padding: 32px 32px 24px;
  display: flex; flex-direction: column;
}
.email-form h2 { font-size: 20px; font-weight: 700; }
.form-sub { font-size: 13px; color: var(--brand-ink-3); margin: 8px 0 22px; line-height: 1.6; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 13px; color: var(--brand-ink-2); font-weight: 500; }
.field input, .field textarea, .field select {
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--brand-line); border-radius: var(--r-md);
  outline: none; background: #fff; color: var(--brand-ink); width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}
.field input { height: 42px; padding: 0 12px; }
/* 验证码行:输入框 + 发送按钮并排(注册页) */
.code-row { display: flex; gap: 8px; align-items: center; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { flex-shrink: 0; white-space: nowrap; }

/* 带图标输入框(登录表单) */
.input-icon { position: relative; display: block; }
.field > span.input-icon { font-size: 0; line-height: 0; }  /* 抵消 .field > span 的文字样式 */
.input-icon > svg.icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--brand-ink-3); pointer-events: none;
}
.input-icon input { padding-left: 36px; }

.form-actions { display: flex; gap: 12px; margin-top: 8px; }
.form-actions .primary { flex: 1; }
.form-actions .ghost { padding: 10px 16px; font-size: 14px; margin-top: 0; }

.form-msg { min-height: 18px; font-size: 13px; margin-top: 14px; }
.form-msg.error { color: var(--state-error); }
.form-msg.ok { color: var(--brand-deep-hover); font-weight: 600; }

.tip { font-size: 12px; color: var(--brand-ink-3); line-height: 1.7; margin-top: 12px; }
.tip a { color: var(--brand-deep); text-decoration: none; font-weight: 500; }
.tip a:hover { text-decoration: underline; }

/* ---------- 按钮 ---------- */
.btn {
  appearance: none; border: 0; border-radius: var(--r-md); cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 11px 18px; transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn.primary {
  background: var(--brand-gold); color: var(--brand-blue); width: 100%;
}
.btn.primary:hover { background: var(--brand-gold-hover); color: #fff; transform: translateY(-1px); }
.btn.primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.ghost {
  background: #fff; color: var(--brand-ink-2); border: 1px solid var(--brand-line);
  margin-top: 22px; padding: 9px 22px;
}
.btn.ghost:hover { color: var(--brand-deep-hover); border-color: var(--brand-deep); }
.btn.small { padding: 6px 14px; font-size: 13px; width: auto; }
.btn.primary.small { width: auto; }
/* 授权行的「删除」按钮:危险操作,红字提示与停用/解绑区分 */
.btn.btn-del-lic { color: #b42318; }
.btn.btn-del-lic:hover { color: #fff; background: #b42318; border-color: #b42318; }
/* 反馈来源筛选:选中的按钮用金色实底,与未选中的描边按钮区分 */
.btn.ghost.small.is-on {
  background: var(--brand-gold); color: var(--brand-blue);
  border-color: var(--brand-gold); font-weight: 600;
}
.btn.ghost.small.is-on:hover { color: var(--brand-blue); background: var(--brand-gold-hover); }
/* 卡片头/搜索条里的 ghost 按钮取消表单里的上边距 */
.card-head .btn.ghost, .lic-search .btn.ghost, .lic-search-bar .btn.ghost { margin-top: 0; }

.link-btn {
  border: 0; background: none; color: var(--brand-deep); cursor: pointer;
  font-size: 13px; padding: 2px 4px; font-family: inherit; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--brand-ink-3); cursor: not-allowed; }

/* ---------- 模式徽标(mock/real) ---------- */
.mode-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--brand-ink-2); background: var(--fin-card);
  border: 1px solid var(--brand-line); padding: 5px 14px;
  border-radius: var(--r-pill); white-space: nowrap;
}
.mode-badge.mock { color: var(--brand-deep-hover); background: var(--brand-gold-soft); border-color: var(--brand-line); }
.mode-badge.real { color: var(--brand-blue); background: var(--brand-blue-soft); border-color: #c7dbf5; }
.login-badge {
  background: var(--brand-gold); color: var(--brand-blue); border-color: var(--brand-gold);
  font-size: 13.5px; font-weight: 700; padding: 8px 20px; cursor: pointer;
}
.login-badge:hover { background: var(--brand-gold-hover); color: #fff; }

/* ---------- 扫码登录 ---------- */
.qr-panel {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 20px 26px; background: #fff;
}
.qr-box {
  width: 264px; height: 264px; border: 1px solid var(--brand-line);
  border-radius: 12px; display: flex; align-items: center;
  justify-content: center; overflow: hidden; background: #fff; position: relative;
}
.qr-box img { width: 244px; height: 244px; display: block; }
.qr-box iframe { border: 0; }
.qr-loading { color: var(--brand-ink-3); font-size: 14px; }
.qr-loading::after { content: ""; display: inline-block; width: 4px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

.qr-status {
  margin-top: 14px; display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--brand-ink-2); min-height: 20px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #d6ccc0; flex: none; }
.dot.gray { background: #d6ccc0; }
.dot.orange { background: var(--brand-gold); animation: pulse 1.2s ease-in-out infinite; }
.dot.green { background: var(--brand-deep); }   /* 语义=成功;全站无绿,用深金 */
.dot.red { background: var(--state-error); }
@keyframes pulse { 50% { opacity: 0.35; } }

.qr-timer {
  margin-top: 8px; display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--brand-ink-3);
}

.info-panel {
  flex: 1.1; padding: 38px 32px 30px;
  border-left: 1px solid var(--line); background: var(--brand-gold-soft);
}
.info-panel h2 { font-size: 19px; font-weight: 700; }
.steps { margin: 20px 0 24px; padding-left: 20px; display: grid; gap: 12px; }
.steps li { font-size: 14px; color: var(--brand-ink-2); line-height: 1.6; }

.banner {
  margin-top: 18px; padding: 10px 12px; border-radius: var(--r-md);
  font-size: 13px; line-height: 1.6; word-break: break-all;
}
.banner.error { background: var(--state-error-bg); color: var(--state-error); border: 1px solid #fecaca; }
.banner.warn { background: var(--state-warning-bg); color: var(--state-warning); border: 1px solid var(--brand-line); }

/* 模式相关区块:mock/real 互斥显示 */
div.mock-only, div.real-only, span.mock-only { display: none; }
body[data-mode="mock"] div.mock-only { display: block; }
body[data-mode="mock"] span.mock-only { display: inline; }
body[data-mode="real"] div.real-only { display: block; }

/* ============================================================
   登录页:特性条 / 页脚
   ============================================================ */
.feature-strip {
  border-top: 1px solid var(--line); background: var(--brand-surface);
  padding: 30px 24px;
}
.feature-strip-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px 56px;
}
.feature-item { display: flex; align-items: center; gap: 10px; color: var(--brand-ink-2); font-size: 14px; font-weight: 500; }
.feature-item svg.icon { width: 18px; height: 18px; color: var(--brand-deep); }
.feature-item .device-pair { display: inline-flex; align-items: center; color: var(--brand-deep); }
.feature-item .device-pair svg.icon + svg.icon { margin-left: -4px; }

/* ============================================================
   已登录 · 授权面板
   ============================================================ */
.dash-wrap { width: min(1180px, 94vw); margin: 0 auto; padding: 28px 0 44px; }
.sub { font-size: 13px; color: var(--brand-ink-3); }
#viewUser { display: flex; flex-direction: column; gap: 16px; }
#viewUser .card { min-height: 0; padding: 24px; }
#viewUser h3 { margin: 18px 0 10px; font-size: 15px; }
#viewUser .card .tip { margin-top: 6px; }

.dash-head { flex-direction: row; align-items: center; gap: 16px; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--brand-gold); flex: none;
}
.avatar-fallback {
  width: 56px; height: 56px; border-radius: 50%; background: var(--brand-gold);
  color: #fff; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.dash-user { flex: 1; }
.dash-user h2 { font-size: 18px; }
.dash-user .sub { font-size: 13px; color: var(--brand-ink-3); margin-top: 4px; }
.dash-head .btn.ghost { margin-top: 0; padding: 8px 18px; }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 4px; flex-wrap: wrap;
}
.card-head h2, #viewUser h3 { font-size: 16px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin-top: 12px; }
.lic-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lic-table th {
  text-align: left; font-weight: 600; color: var(--brand-ink-3);
  padding: 10px 12px; border-bottom: 1px solid var(--brand-line); white-space: nowrap;
  background: var(--brand-gold-soft);
}
.lic-table th:first-child { border-radius: 6px 0 0 6px; }
.lic-table th:last-child { border-radius: 0 6px 6px 0; }
.lic-table td {
  padding: 12px; border-bottom: 1px solid #f5ede0;
  vertical-align: middle; white-space: nowrap;
}
.lic-table tr:last-child td { border-bottom: 0; }
.lic-table tr.hl td { background: #fff3dd; }
.lic-table tr.hl td:first-child { box-shadow: inset 3px 0 0 var(--brand-gold); }

/* 按软件分组的组头行(管理端「全部授权」):可点击折叠 */
.lic-table tr.lic-group td {
  background: #f3ede2; font-weight: 600; color: var(--brand-ink);
  cursor: pointer; user-select: none; padding: 9px 12px;
  border-left: 3px solid var(--brand-gold);
}
.lic-table tr.lic-group:hover td { background: #efe7d8; }
.lic-table tr.lic-group .g-arrow {
  display: inline-block; width: 14px; color: var(--brand-gold-hover);
  font-size: 11px;
}
.lic-table tr.lic-group .pid-code { margin: 0 6px; }

.lic-table .prod-name { font-weight: 600; }
.lic-table .prod-desc {
  color: var(--brand-ink-3); font-size: 12px; margin-top: 3px;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 反馈列表:标题可点击(点击看完整内容),内容预览最多两行 */
.fb-title-link {
  color: var(--brand-deep); cursor: pointer; text-decoration: none;
  border-bottom: 1px dashed var(--brand-gold);
}
.fb-title-link:hover { color: var(--brand-gold-hover); }
.lic-table .fb-preview {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; line-height: 1.45; max-width: 320px;
}
/* 反馈详情弹窗 */
.fb-modal-card { max-width: 640px; width: 92vw; }
.fb-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 12px; }
.fb-meta-item { font-size: 12px; color: var(--brand-ink-3); }
.fb-content {
  margin: 0 0 16px; padding: 12px 14px; max-height: 52vh; overflow: auto;
  background: var(--brand-gold-soft, #fdf6e7); border: 1px solid var(--brand-line);
  border-radius: 8px; font-size: 14px; line-height: 1.7; color: var(--brand-ink);
  white-space: normal; word-break: break-word;
}
.lic-table .lic-soft-name { font-weight: 600; }
code.pid-code {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--brand-ink-2); background: var(--brand-gold-soft);
  border: 1px solid var(--brand-line);
  padding: 1px 6px; border-radius: 4px; user-select: all;
}
.lic-table code.pid-code { display: inline-block; margin-top: 3px; }
.lic-table a.cc-about-link {
  display: inline-block; margin-top: 3px; max-width: 260px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  color: var(--brand-deep); text-decoration: none; font-size: 12px;
}
.lic-table a.cc-about-link:hover { text-decoration: underline; }

.lic-code {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.5px;
  background: var(--brand-gold-soft); border: 1px solid var(--brand-line);
  padding: 4px 10px; border-radius: 6px; cursor: pointer; user-select: all;
}
.lic-code:hover { border-color: var(--brand-gold); color: var(--brand-deep-hover); }
.code-big {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  font-size: 20px; letter-spacing: 1.5px; padding: 14px 8px; cursor: pointer;
  background: var(--brand-gold-soft); border: 1px dashed var(--brand-gold);
  border-radius: var(--r-md); color: var(--brand-deep-hover); user-select: all;
}

.badge {
  display: inline-block; font-size: 12px; padding: 3px 10px;
  border-radius: var(--r-pill); border: 1px solid; white-space: nowrap;
}
.badge.ok   { color: var(--brand-deep-hover); background: var(--brand-gold-soft); border-color: var(--brand-line); }
.badge.idle { color: var(--brand-blue); background: var(--brand-blue-soft); border-color: #c7dbf5; }
.badge.bad  { color: var(--state-error); background: var(--state-error-bg); border-color: #fecaca; }
.badge.warn { color: #92400e; background: #fef3c7; border-color: #fde68a; }
/* 崩溃(客户端自动上报):与真人反馈的类型文字一眼区分 */
.badge.crash { color: var(--state-error); background: var(--state-error-bg); border-color: #fecaca; }

/* ---------- 数据 Key(发放表单一行排布) ---------- */
.dk-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.dk-form .dk-inline { flex: 1 1 260px; min-width: 220px; margin: 0; }
.dk-form .dk-inline span { margin-bottom: 4px; display: block; }
.dk-form .dk-inline input { width: 100%; }

.empty-tip { color: var(--brand-ink-3); font-size: 14px; text-align: center; padding: 28px 0; }

/* ---------- 免费申请开关(iOS 风格,金色) ---------- */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider { position: absolute; inset: 0; border-radius: 20px; background: #e2d5c2; transition: background .18s; }
.switch .slider::before {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(60, 40, 10, .25);
  transition: transform .18s;
}
.switch input:checked + .slider { background: var(--brand-gold); }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* ---------- 管理员面板 ---------- */
.admin-tabs { display: flex; gap: 6px; margin: 14px 0 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.admin-tab {
  appearance: none; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--brand-ink-3); padding: 10px 16px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 8px;
}
.admin-tab:hover { color: var(--brand-ink); }
.admin-tab.active { color: var(--brand-deep); font-weight: 600; border-bottom-color: var(--brand-deep); }
.tab-badge {
  min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px;
  background: #f1e7d7; color: var(--brand-ink-2); font-size: 11px; line-height: 18px;
  text-align: center; font-weight: 500;
}
.admin-tab.active .tab-badge { background: var(--brand-gold-soft); color: var(--brand-deep-hover); }
.tab-badge.hl-badge { background: #fee2e2; color: var(--state-error); font-weight: 600; }
.admin-pane { padding-top: 10px; }

.admin-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin: 14px 0 6px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.admin-form h3 { margin: 0 0 12px !important; font-size: 15px; }
.admin-form .field select {
  height: 42px; padding: 0 10px; font-size: 14px;
  border: 1px solid var(--brand-line); border-radius: var(--r-md); background: #fff;
}
.admin-form .btn { width: auto; padding: 10px 20px; }

.prod-table-sec { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.prod-table-sec .prod-tip { margin: -6px 0 2px; }

.lic-search-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.lic-search-bar h3 { font-size: 15px; }
.lic-search { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lic-search input {
  height: 36px; width: 220px; padding: 0 12px; font-size: 14px;
  border: 1px solid var(--brand-line); border-radius: var(--r-md);
  outline: none; background: #fff; color: var(--brand-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lic-search input:focus {
  border-color: var(--brand-gold); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.settings-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 14px 0 4px; padding: 12px 14px;
  background: var(--brand-gold-soft); border: 1px solid var(--brand-line);
  border-radius: 10px; font-size: 13px; color: var(--brand-ink-2);
}
.settings-row select, .settings-row input[type="number"] {
  height: 36px; padding: 0 10px; font-size: 13px;
  border: 1px solid var(--brand-line); border-radius: var(--r-md); background: #fff;
}
.settings-row input[type="number"] { width: 96px; }
.settings-row .dur-perm { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.settings-row .dur-perm input { margin: 0; }

.pack-callout {
  border: 1px solid var(--brand-line); border-radius: 12px;
  background: var(--brand-gold-soft); padding: 16px 18px; margin-bottom: 18px;
}
.pack-callout h3 { margin: 0 0 8px; font-size: 15px; }
.pack-callout .field { max-width: 540px; }
.pack-callout .form-actions { margin-top: 12px; }

.build-log {
  background: #fdf9f2; border: 1px solid var(--brand-line); border-radius: var(--r-md);
  padding: 12px 14px; font-size: 12.5px; line-height: 1.7; color: var(--brand-ink-2);
  max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-all;
  margin: 0 0 6px;
}
.field textarea.mono, .field input[readonly] { background: #fdfbf7; color: var(--brand-ink-2); }
.field textarea.mono { font-family: var(--font-mono); font-size: 11.5px; }

/* 账号设置 */
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 14px; }
.acct-grid .admin-form .field input { height: 42px; padding: 0 12px; font-size: 14px; }
.acct-grid .admin-form button[type=submit]:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(30, 23, 10, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  padding: 16px;
}
.modal { width: min(400px, 94vw); display: flex; flex-direction: column; padding: 28px; gap: 4px; }
.modal h3 { font-size: 18px; }
.modal .sub { font-size: 13px; color: var(--brand-ink-2); margin: 8px 0 16px; word-break: break-all; line-height: 1.7; }
.modal .form-actions { margin-top: 16px; }

/* ============================================================
   软件大厅
   ============================================================ */
.page-hero {
  background: linear-gradient(180deg, var(--brand-deep) 0%, var(--brand-surface) 130%);
  padding: 52px 24px 60px; text-align: center;
}
.page-hero h1 {
  color: #fff; font-size: clamp(26px, 3.6vw, 40px); font-weight: 700; letter-spacing: -0.5px;
}
.page-hero .page-hero-sub {
  color: rgba(255, 255, 255, 0.88); font-size: 15px; margin: 10px auto 26px; max-width: 620px; line-height: 1.7;
}
.search-box { position: relative; max-width: 520px; margin: 0 auto; }
.search-box > svg.icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--brand-ink-3); pointer-events: none;
}
.search-box input {
  width: 100%; height: 48px; padding: 0 16px 0 44px;
  border: 1px solid var(--brand-line); border-radius: 12px;
  font-size: 14px; font-family: inherit; color: var(--brand-ink);
  outline: none; background: #fff; box-shadow: var(--shadow-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box input:focus { border-color: var(--brand-gold); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }

.catalog-sec { padding: 36px 24px 48px; }
.sw-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 22px;
}
.sw-card {
  display: flex; flex-direction: column;
  background: var(--fin-card); border: 1px solid var(--brand-line);
  border-radius: 14px; overflow: hidden; text-decoration: none;
  color: var(--brand-ink); box-shadow: var(--shadow-1);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.sw-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2); border-color: var(--brand-gold);
}
.sw-thumb {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block;
  background: var(--brand-gold-soft); border-bottom: 1px solid var(--brand-line);
}
.sw-placeholder {
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  font-size: 46px; font-weight: 700; color: #fff;
  background:
    radial-gradient(120px 90px at 82% 18%, rgba(245, 158, 11, 0.35), transparent 70%),
    linear-gradient(150deg, #24466e 0%, var(--brand-blue) 55%, #16293f 100%);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.sw-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.sw-card-body h3 { font-size: 16px; font-weight: 600; }
.sw-desc {
  font-size: 13px; color: var(--brand-ink-2); margin-top: 6px;
  min-height: 38px; line-height: 1.55; flex: 1;
}
.sw-more {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 10px;
  font-size: 13px; color: var(--brand-deep); font-weight: 600;
}
.sw-card:hover .sw-more { color: var(--brand-deep-hover); }
.sw-more svg.icon { transition: transform 0.2s; }
.sw-card:hover .sw-more svg.icon { transform: translateX(3px); }

/* ============================================================
   软件详情
   ============================================================ */
.detail-sec { max-width: 1180px; margin: 0 auto; padding: 28px 24px 56px; }
.back-link { margin-bottom: 18px; font-size: 13.5px; }
.detail-card { flex-direction: column; padding: 30px 34px 34px; }
.detail-head h1, .detail-head h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.3px; }
.detail-head .sub { font-size: 14.5px; color: var(--brand-ink-2); margin-top: 10px; line-height: 1.8; }
.detail-actions { margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 8px;
  width: auto;                                /* 覆盖 .btn.primary 的 width:100% */
  padding: 12px 28px; font-size: 15px; text-decoration: none;
}
.btn.primary.dl-btn { width: auto; }
/* 详情页两条下载入口(立即下载 / 蓝奏云下载):同款主按钮、同一水平线。
   窄屏收紧内边距,保证 320px 宽也不折行(两条都是主按钮时宽度敏感)。 */
@media (max-width: 420px) {
  .detail-actions { gap: 10px; }
  .detail-actions .dl-btn { padding: 11px 16px; font-size: 14px; }
}
/* 超窄屏(320px 级):再收一档并去掉图标,确保两条仍同一水平线 */
@media (max-width: 360px) {
  .detail-actions { gap: 8px; }
  .detail-actions .dl-btn { padding: 11px 12px; font-size: 13px; }
  .detail-actions .dl-btn .icon { display: none; }
}
.dl-lines { margin-top: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; }
.dl-lines-title { color: var(--brand-ink-3); }
.dl-lines-list { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.dl-line {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 16px;
  border-radius: var(--r-pill); border: 1.5px solid var(--brand-gold);
  color: var(--brand-deep); background: var(--brand-gold-soft);
  text-decoration: none; white-space: nowrap; font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.dl-line:hover { background: var(--brand-gold); color: #fff; }
.dl-lines-note { color: var(--brand-ink-3); font-size: 12.5px; }

/* 阅读原文:详情页底部公众号原文入口(与下载按钮同级的金色按钮) */
.read-origin-row {
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--brand-line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.read-origin-btn {
  display: inline-flex; align-items: center; gap: 8px;
  width: auto; padding: 12px 28px; font-size: 15px; font-weight: 600;
  text-decoration: none; border-radius: var(--r-md);
  background: var(--brand-gold); color: var(--brand-blue);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.read-origin-btn:hover { background: var(--brand-gold-hover); color: #fff; transform: translateY(-1px); }
.read-origin-row .tip { margin-top: 0; }

/* 文章内视频介绍按钮(替代黑屏的微信视频播放器 iframe) */
.wx-video-tip {
  margin: 10px 0; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--brand-gold-soft); border: 1px dashed var(--brand-gold);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.wx-video-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: var(--r-pill);
  background: var(--brand-gold); color: var(--brand-blue);
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.wx-video-link:hover { background: var(--brand-gold-hover); color: #fff; }
.wx-video-note { font-size: 12.5px; color: var(--text-sub); }


/* 发布信息 chips + SHA256 校验行(2026-09-17 详情页信息补全;无构建记录时整区隐藏) */
.detail-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip {
  display: inline-flex; align-items: center; padding: 5px 14px;
  border-radius: var(--r-pill); background: var(--brand-gold-soft);
  border: 1px solid var(--brand-line); color: var(--brand-deep);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.sha-row {
  margin-top: 14px; display: flex; align-items: center; flex-wrap: wrap;
  gap: 10px; font-size: 12.5px;
}
.sha-label { color: var(--brand-ink-3); }
.sha-value {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--brand-ink-2);
  background: var(--brand-surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 6px 10px; word-break: break-all;
}
.sha-copy {
  border: 1px solid var(--brand-blue); background: var(--brand-blue);
  color: #fff; border-radius: var(--r-md); padding: 6px 14px;
  font-size: 12.5px; cursor: pointer; transition: opacity 0.15s;
}
.sha-copy:hover { opacity: 0.88; }
.sha-ok { color: var(--brand-deep); font-weight: 600; }

.detail-card h3 {
  font-size: 17px; margin: 28px 0 14px; font-weight: 700;
  padding-left: 11px; border-left: 3px solid var(--brand-gold);
}
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
}
.gallery img {
  width: 100%; border-radius: 12px; border: 1px solid var(--brand-line);
  display: block; background: var(--brand-gold-soft);
}
.video-box {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--brand-line);
  background: #1c1917; max-width: 720px;
}
.video-box video { width: 100%; display: block; max-height: 420px; }
.intro p { font-size: 14px; line-height: 1.9; color: var(--brand-ink-2); margin-bottom: 10px; }

/* 公众号文章引用内容排版 */
.wx-article img { max-width: 100% !important; height: auto; border-radius: 8px; margin: 8px 0; }
.wx-article iframe { max-width: 100%; }
.wx-article section, .wx-article p { line-height: 1.9; }
.wx-article table { border-collapse: collapse; }
.wx-article td, .wx-article th { border: 1px solid var(--line, #ddd); padding: 6px 10px; }

/* ============================================================
   找回页
   ============================================================ */
.recovery-card { display: block; padding: 28px; }
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 6px; }
.recovery-grid .admin-form { margin: 0; }
.recovery-grid .admin-form .field { margin-bottom: 12px; }
.found-list { list-style: none; margin: 8px 0 0; font-size: 14px; }
.found-list li {
  padding: 8px 12px; margin-top: 6px; background: var(--brand-gold-soft);
  border: 1px solid var(--brand-line); border-radius: var(--r-md);
  font-family: var(--font-mono); color: var(--brand-ink-2);
}
.step-tip { margin: 10px 0 0; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 720px) {
  .tab-body { flex-direction: column; }
  .info-panel { border-left: 0; border-top: 1px solid var(--line); }
  .admin-grid, .acct-grid, .recovery-grid { grid-template-columns: 1fr; }
  .detail-card { padding: 22px 18px 26px; }
  .detail-head h1, .detail-head h2 { font-size: 22px; }
  .topnav-inner { padding: 0 16px; }
}

/* 运维看板 */
.ops-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0;}
.ops-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:12px;}
.ops-card h4{margin:0 0 8px;font-size:14px;color:#1e3a5f;}
.ops-card svg{width:100%;height:auto;display:block;background:#fff;}
@media (max-width:900px){.ops-grid{grid-template-columns:1fr;}}

/* ---------- 运行结果(用户端「我的结果」/ 管理端「结果上报」) ---------- */
.res-claim {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 14px 0 4px; padding: 12px 14px;
  background: var(--brand-gold-soft); border: 1px solid var(--brand-line);
  border-radius: 10px;
}
.res-claim-label { font-size: 13px; color: var(--brand-ink-2); white-space: nowrap; }
.res-claim input {
  flex: 1 1 260px; height: 36px; min-width: 200px; padding: 0 12px; font-size: 14px;
  border: 1px solid var(--brand-line); border-radius: var(--r-md);
  outline: none; background: #fff; color: var(--brand-ink); font-family: var(--font-mono);
}
.res-claim input:focus { border-color: var(--brand-gold); box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.res-stat { font-size: 13px; color: var(--brand-ink-2); margin: 8px 0 0; }
.res-stat b { color: var(--brand-deep); }
.res-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.res-filter select, .res-filter input {
  height: 36px; padding: 0 10px; font-size: 13px;
  border: 1px solid var(--brand-line); border-radius: var(--r-md);
  background: #fff; color: var(--brand-ink); outline: none;
}
.res-filter select:focus, .res-filter input:focus {
  border-color: var(--brand-gold); box-shadow: 0 0 0 3px rgba(245,158,11,.18);
}
.res-filter input { width: 200px; }
.ops-grid.res-ops-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 4px 0 8px; }
.res-ops-grid .ops-card { padding: 12px 14px; }
.res-ops-grid .ops-kpi { font-size: 22px; font-weight: 700; color: var(--brand-deep); line-height: 1.5; }
.res-modal-card { max-width: 860px; width: 94vw; }
.res-modal-body { margin: 0 0 4px; padding: 4px 2px; max-height: 56vh; overflow: auto; }
.res-modal-body table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.res-modal-body th {
  text-align: left; font-weight: 600; color: var(--brand-ink-3); padding: 8px 10px;
  border-bottom: 1px solid var(--brand-line); background: var(--brand-gold-soft);
  position: sticky; top: 0;
}
.res-modal-body td { padding: 8px 10px; border-bottom: 1px solid #f5ede0; }
.res-modal-body .res-num { text-align: right; font-variant-numeric: tabular-nums; }
/* 列表里的数字列也右对齐(如「分析 / 命中」列),与明细弹窗口径一致 */
td.res-num { text-align: right; font-variant-numeric: tabular-nums; }
.res-modal-body .res-params {
  font-size: 12px; color: var(--brand-ink-3); margin: 0 0 10px;
  word-break: break-all; line-height: 1.7;
}
