/* 密点资产化子系统 · 公共样式（v2 主站深蓝金体系统一，2026-08-31） */
:root {
  --primary: #1f3a5f;
  --primary-dark: #143a92;
  --primary-light: #eef3f9;
  --accent: #b8860b;
  --ok: #1a7f4b;
  --warn: #b25000;
  --danger: #b21f2d;
  --ink: #26303c;
  --muted: #6b7684;
  --line: #d8dee8;
  --bg: #f5f7fa;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(31,58,95,.06), 0 1px 2px rgba(31,58,95,.04);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* 顶部导航 */
.topbar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; padding: 14px 24px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(20,58,146,.18);
}
.topbar .logo { font-size: 18px; font-weight: 800; letter-spacing: .5px; }
.topbar .logo .sub { font-size: 12px; font-weight: 500; opacity: .85; margin-left: 10px; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; }
.topbar nav a {
  color: rgba(255,255,255,.85); padding: 7px 13px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.topbar nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.topbar nav a.active { background: rgba(255,255,255,.2); color: #fff; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

/* 卡片 */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px;
}
.card h2 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.card h3 { font-size: 15px; font-weight: 600; margin: 14px 0 8px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 600; background: var(--primary); color: #fff;
  transition: .15s;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.secondary:hover { background: var(--primary-light); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.ok { background: var(--ok); }
.btn.ok:hover { background: #0b8a5e; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #374151; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}
.field textarea { resize: vertical; min-height: 70px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row { display: flex; gap: 12px; }
.row .field { flex: 1; }

/* 表格（窄屏可横向滚动） */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; }
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; background: #f9fafb; white-space: nowrap; }
tr:hover td { background: #fafbfd; }

/* 标签 / 状态 */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.blue { background: var(--primary-light); color: var(--primary); }
.badge.green { background: #e3f6ee; color: var(--ok); }
.badge.amber { background: #fdf3e3; color: var(--warn); }
.badge.gray { background: #f3f4f6; color: var(--muted); }
.badge.red { background: #fdeaea; color: var(--danger); }

/* 阶段条 */
.stagebar { display: flex; align-items: center; gap: 0; margin: 18px 0; flex-wrap: wrap; }
.stagebar .step { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.stagebar .step .dot {
  width: 22px; height: 22px; border-radius: 50%; background: #e5e7eb; color: #6b7280;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px;
}
.stagebar .step.on .dot { background: var(--primary); color: #fff; }
.stagebar .step.done .dot { background: var(--ok); color: #fff; }
.stagebar .step.on { color: var(--primary); font-weight: 600; }
.stagebar .line { width: 28px; height: 2px; background: #e5e7eb; margin: 0 6px; }
.stagebar .line.on { background: var(--primary); }

/* 时间线 */
.timeline { list-style: none; }
.timeline li { position: relative; padding-left: 22px; padding-bottom: 14px; font-size: 13px; }
.timeline li:before {
  content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
}
.timeline li:after { content: ""; position: absolute; left: 8px; top: 18px; width: 2px; height: calc(100% - 18px); background: var(--line); }
.timeline li:last-child:after { display: none; }
.timeline .t { color: var(--muted); font-size: 12px; }

/* 弹层 */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.overlay.show { display: flex; }
.modal { background: #fff; border-radius: 14px; padding: 26px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal h3 { font-size: 18px; margin-bottom: 16px; }

/* toast */
#toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 2000; display: none; }
#toast .t {
  background: #111827; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
#toast .t.ok { background: var(--ok); }

/* 指标 */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.metric .label { font-size: 12px; color: var(--muted); }
.metric .value { font-size: 24px; font-weight: 800; margin-top: 4px; color: var(--primary); }

.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; border-top: 1px solid var(--line); margin-top: 30px; }

@media (max-width: 720px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar .logo { font-size: 15px; }
  .topbar nav a { font-size: 12px; padding: 6px 9px; }
  .container { padding: 16px 14px 40px; }
  .row { flex-direction: column; gap: 0; }
  /* 移动端表格 → 卡片化：隐藏表头，每行变卡片，单元格左侧加 data-label */
  .table-scroll table { min-width: 0; border: 0; }
  .table-scroll thead { display: none; }
  .table-scroll tbody tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .table-scroll tbody tr:hover td { background: transparent; }
  .table-scroll tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f3f5;
    font-size: 13px;
    text-align: right;
  }
  .table-scroll tbody td:last-child { border-bottom: 0; }
  .table-scroll tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
    flex-shrink: 0;
    text-align: left;
  }
  .table-scroll tbody td.no-label::before { content: ""; }
  /* 移动端指标卡片 2 列 */
  .kpis { grid-template-columns: repeat(2, 1fr); }
  /* 移动端按钮更宽 */
  .btn { padding: 10px 14px; font-size: 14px; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
}

/* ========== v1.20 并入主站：示范数据提示（2026-08-31 示范数据铁律） ========== */
/* 提示条：页面顶部，明确告知"这是示范，不是实际用户" */
.demo-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  padding: 10px 18px; font-size: 13px; border-radius: 8px; margin: 14px 24px 0;
}
.demo-banner .demo-ico { font-size: 16px; flex-shrink: 0; }
.demo-banner .demo-txt { flex: 1; min-width: 200px; line-height: 1.6; }
.demo-banner .demo-txt b { font-weight: 700; }
.demo-banner .btn {
  flex-shrink: 0; padding: 6px 14px; font-size: 13px;
  background: #f97316; border-color: #f97316; color: #fff;
}
.demo-banner .btn:hover { background: #ea580c; border-color: #ea580c; }

/* 局部提示框：弹窗/卡片内使用的虚线提示 */
.demo-note {
  background: #fff7ed; border: 1px dashed #fed7aa; color: #9a3412;
  padding: 10px 14px; border-radius: 8px; font-size: 13px; margin: 8px 0;
  line-height: 1.6;
}

/* 示范项目徽标 */
.badge.amber {
  background: #fff3cd; color: #92400e; border: 1px solid #fcd34d;
  font-weight: 700; font-size: 12px; border-radius: 4px; padding: 2px 8px;
  display: inline-block; margin-left: 6px;
}
