/* ============================================================
   Telmach Design System · v3.0
   色板对齐品牌 Logo：深靛蓝 #2F2982 × 柔粉 #F2A9C4 × 米白
   ============================================================ */

:root {
  /* 品牌色板（靛蓝 × 柔粉） */
  --indigo: #2F2982;        /* 品牌主色（取自 logo 底） */
  --gold: #F2A9C4;          /* 柔粉：主强调色 */
  --gold-deep: #B65C82;     /* 深玫瑰：浅底上的文字强调 */
  --gold-soft: #FBE9F2;
  --gold-line: #EFCBDC;
  --ink-dark: #1C1A4E;      /* 深靛蓝：hero / 侧边栏 / 深色区 */
  --ink-dark-2: #26236A;
  --paper: #F8F6FA;         /* 淡紫米白：页面底色 */
  --paper-card: #FDFCFD;    /* 卡片白 */
  --ink: #211E3D;
  --ink-2: #54506B;
  --ink-3: #8E8AA0;
  --line: #E7E2EE;
  --pine: #1C5B4A;          /* 安全/正常 */
  --pine-soft: #E4EFEA;
  --amber: #B25E09;
  --amber-soft: #F8EEDD;
  --red: #B3372C;
  --red-soft: #F7E8E5;
  --cream: #F5F2FB;         /* 深色背景上的主文字 */
  --cream-2: #C9C4E0;       /* 深色背景上的次文字 */
  --cream-3: #8A86A8;

  /* 渐变 */
  --grad-gold: linear-gradient(135deg, #B65C82 0%, #F2A9C4 55%, #F9D3E3 100%);
  --grad-paper: linear-gradient(180deg, #F8F6FA 0%, #FCFAFD 100%);

  /* 兼容别名（JS/内联样式引用旧 token 时自动映射到新体系） */
  --blue: var(--gold);
  --blue-deep: var(--gold-deep);
  --blue-soft: var(--gold-soft);
  --blue-ink: var(--ink);
  --white: var(--paper-card);
  --page-bg: var(--paper);
  --green: var(--pine);
  --green-soft: var(--pine-soft);
  --grad-hero: var(--grad-gold);
  --grad-soft: var(--grad-paper);

  /* 字体 */
  --font-display: "Fraunces", Georgia, "Songti SC", "SimSun", serif;
  --font-body: "Inter", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* 形状与阴影 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --shadow-card: 0 1px 2px rgba(26, 33, 41, .04), 0 4px 18px rgba(26, 33, 41, .05);
  --shadow-hover: 0 10px 34px rgba(182, 92, 130, .14), 0 2px 8px rgba(26, 33, 41, .06);
  --shadow-pop: 0 24px 64px rgba(28, 26, 78, .22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(242, 169, 196, .28); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.3; letter-spacing: 0; font-weight: 600; }
a { color: var(--gold-deep); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.mono { font-family: var(--font-mono); }

/* ---------- 布局 ---------- */
.container { width: min(1160px, 92%); margin: 0 auto; }
.section { padding: 104px 0; }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .22em;
  color: var(--gold-deep); background: var(--gold-soft);
  border: 1px solid var(--gold-line); padding: 7px 16px; border-radius: 999px;
  text-transform: uppercase; margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); color: var(--ink); }
.section-head p { margin-top: 16px; color: var(--ink-2); font-size: 16px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px; border: none;
  font-size: 15px; font-weight: 600; font-family: var(--font-body);
  letter-spacing: .02em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--grad-gold); color: #2E2145;
  box-shadow: 0 6px 22px rgba(182, 92, 130, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(182, 92, 130, .45); }
.btn-ghost {
  background: var(--paper-card); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--gold-line); }
.btn-sm { padding: 9px 18px; font-size: 14px; border-radius: 8px; }

/* ---------- 导航（深色玻璃） ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: saturate(1.4) blur(18px);
  background: rgba(28, 26, 78, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.nav.scrolled { border-bottom-color: rgba(242, 169, 196, .18); box-shadow: 0 4px 24px rgba(0, 0, 0, .3); }
.nav-inner {
  width: min(1160px, 92%); margin: 0 auto; height: 70px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--cream); letter-spacing: .02em; }
.brand-badge {
  display: grid; place-items: center;
}
.brand-badge img.brand-logo { height: 34px; width: auto; display: block; }
.brand-badge img.brand-mark { height: 40px; width: auto; display: block; }
@media (max-width: 860px) { .brand-badge img.brand-mark { height: 34px; } }
.brand-cn {
  font-size: 11px; font-weight: 600; color: var(--gold);
  border: 1px solid rgba(242, 169, 196, .4); background: rgba(242, 169, 196, .1);
  border-radius: 999px; padding: 3px 10px; letter-spacing: .18em;
  font-family: var(--font-body); white-space: nowrap;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--cream-2); font-size: 14.5px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--gold); }
.nav-links a.btn { color: #2E2145; }
.nav-links a.btn-ghost { color: var(--cream); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); box-shadow: none; }
.nav-links a.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- Hero（深夜墨蓝） ---------- */
.hero {
  position: relative; padding: 180px 0 120px;
  background:
    radial-gradient(1100px 500px at 78% -12%, rgba(242, 169, 196, .14), transparent 60%),
    radial-gradient(800px 420px at 8% 8%, rgba(94, 84, 190, .3), transparent 55%),
    var(--ink-dark);
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(rgba(242, 169, 196, .06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(242, 169, 196, .06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .hero-inner { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(36px, 5.2vw, 56px); font-weight: 600; color: var(--cream); }
.hero h1 .accent {
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .eyebrow { background: rgba(242, 169, 196, .1); border-color: rgba(242, 169, 196, .35); color: var(--gold); }
.hero-sub { margin-top: 22px; font-size: 16.5px; color: var(--cream-2); max-width: 520px; }
.hero-cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-cta .btn-ghost { background: transparent; color: var(--cream); border-color: rgba(255,255,255,.2); box-shadow: none; }
.hero-cta .btn-ghost:hover { border-color: var(--gold); color: var(--gold); box-shadow: none; }
.hero-proof { margin-top: 28px; display: flex; gap: 22px; flex-wrap: wrap; }
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--cream-3); }
.hero-proof svg { width: 15px; height: 15px; color: var(--gold); flex: none; }

/* Hero 视觉：心跳金库卡（深色玻璃） */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 420px; }
.shield-card {
  position: relative; width: min(400px, 100%); border-radius: var(--r-lg);
  background: rgba(21, 30, 41, .82); backdrop-filter: blur(10px);
  border: 1px solid rgba(242, 169, 196, .28); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  padding: 28px; z-index: 2;
}
.shield-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.shield-card-head .t { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--cream); letter-spacing: .04em; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: #7BC4A8;
  background: rgba(28, 91, 74, .3); border: 1px solid rgba(123, 196, 168, .25);
  border-radius: 999px; padding: 4px 11px;
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #4FA383; animation: pulse-dot 1.6s infinite; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 0 rgba(123,196,168,.45);} 60% { box-shadow: 0 0 0 7px rgba(123,196,168,0);} }
.heartbeat-line { height: 64px; margin: 6px 0 16px; }
.heartbeat-line svg { width: 100%; height: 100%; }
.ekg-path {
  fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 620; stroke-dashoffset: 620;
  animation: ekg 3.2s linear infinite;
  filter: drop-shadow(0 0 6px rgba(242, 169, 196, .55));
}
@keyframes ekg { 0% { stroke-dashoffset: 620; opacity: 1; } 70% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.shield-rows { display: grid; gap: 10px; }
.shield-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(242, 169, 196, .16);
  border-radius: 10px; padding: 11px 14px; font-size: 13.5px;
}
.shield-row .ic {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  background: rgba(242, 169, 196, .12); display: grid; place-items: center;
  color: var(--gold);
}
.shield-row .ic svg { width: 16px; height: 16px; }
.shield-row b { font-weight: 600; color: var(--cream); display: block; font-size: 13.5px; }
.shield-row small { color: var(--cream-3); font-size: 12px; }
.shield-row .lock { margin-left: auto; color: var(--gold); }
.shield-row .lock svg { width: 14px; height: 14px; }
.orbit-ring {
  position: absolute; border-radius: 50%; border: 1px dashed rgba(242, 169, 196, .3);
  animation: spin 26s linear infinite;
}
.orbit-ring.r1 { width: 480px; height: 480px; }
.orbit-ring.r2 { width: 380px; height: 380px; animation-direction: reverse; animation-duration: 34s; }
.orbit-dot {
  position: absolute; top: -5px; left: 50%; width: 10px; height: 10px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px rgba(242, 169, 196, .8);
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 960px) { .orbit-ring { display: none; } }

/* ---------- 卡片与网格 ---------- */
.card {
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-card);
  padding: 30px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--gold-line); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card-icon {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold-deep); margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 18px; margin-bottom: 9px; }
.card p { font-size: 14.5px; color: var(--ink-2); }
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .1em;
  padding: 4px 11px; border-radius: 999px; margin-bottom: 14px; text-transform: uppercase;
}
.tag-blue { background: var(--gold-soft); color: var(--gold-deep); border: 1px solid var(--gold-line); }
.tag-amber { background: var(--amber-soft); color: var(--amber); border: 1px solid #EDD9BC; }

/* ---------- 流程步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 26px 20px; box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.step-num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--gold-deep);
  width: 32px; height: 32px; border-radius: 8px; background: var(--gold-soft);
  display: grid; place-items: center; margin-bottom: 15px; border: 1px solid var(--gold-line);
}
.step h4 { font-size: 15.5px; margin-bottom: 7px; }
.step p { font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.step-arrow {
  position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  color: #E3B9CF; z-index: 2;
}
.step:last-child .step-arrow { display: none; }
@media (max-width: 960px) { .step-arrow { display: none; } }

/* ---------- 安全架构图 ---------- */
.arch-flow {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; align-items: stretch;
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); padding: 38px 26px;
}
@media (max-width: 900px) { .arch-flow { grid-template-columns: 1fr; gap: 14px; } }
.arch-node { text-align: center; padding: 0 12px; position: relative; }
.arch-node:not(:last-child)::after {
  content: "→"; position: absolute; right: -8px; top: 34px;
  color: var(--gold); font-size: 18px; font-weight: 700;
}
@media (max-width: 900px) { .arch-node:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -16px; transform: translateX(50%); } }
.arch-ic {
  width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 14px;
  display: grid; place-items: center; color: #2E2145; background: var(--grad-gold);
  box-shadow: 0 8px 22px rgba(182, 92, 130, .3);
}
.arch-ic.muted { background: linear-gradient(135deg, #4A525E, #79828C); box-shadow: 0 8px 20px rgba(74, 82, 94, .25); color: #fff; }
.arch-ic svg { width: 26px; height: 26px; }
.arch-node b { display: block; font-size: 14.5px; margin-bottom: 5px; }
.arch-node small { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; display: block; }

/* ---------- 定价 ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }
.price-card {
  position: relative; background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 36px 32px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.price-card.featured {
  background: var(--ink-dark-2); border: 1px solid rgba(242, 169, 196, .45);
  box-shadow: 0 20px 56px rgba(28, 26, 78, .35);
}
.price-card .flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--grad-gold); color: #2E2145; font-size: 12px; font-weight: 700;
  padding: 5px 16px; border-radius: 999px; box-shadow: 0 4px 16px rgba(182, 92, 130, .45);
  white-space: nowrap; letter-spacing: .04em;
}
.price-name { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.price-desc { font-size: 13px; color: var(--ink-3); margin: 8px 0 22px; min-height: 40px; }
.price-num { display: flex; align-items: baseline; gap: 6px; margin-bottom: 24px; }
.price-num .cur { font-size: 18px; color: var(--ink-2); font-weight: 600; }
.price-num .val { font-family: var(--font-mono); font-size: 42px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; }
.price-num .per { font-size: 14px; color: var(--ink-3); }
.price-feats { list-style: none; display: grid; gap: 12px; margin-bottom: 30px; flex: 1; }
.price-feats li { display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); align-items: flex-start; }
.price-feats svg { width: 16px; height: 16px; color: var(--pine); flex: none; margin-top: 4px; }
.featured .price-name, .featured .price-num .val { color: var(--cream); }
.featured .price-desc, .featured .price-num .per { color: var(--cream-3); }
.featured .price-num .cur { color: var(--cream-2); }
.featured .price-feats li { color: var(--cream-2); }
.featured .price-feats svg { color: var(--gold); }

/* ---------- CTA / 留资 ---------- */
.cta-band {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(800px 300px at 80% 0%, rgba(242, 169, 196, .15), transparent 60%),
    var(--ink-dark);
  color: var(--cream); padding: 80px 48px; text-align: center;
  border: 1px solid rgba(242, 169, 196, .25);
  box-shadow: 0 30px 70px rgba(28, 26, 78, .4);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: radial-gradient(circle at 20% 30%, var(--gold) 1.5px, transparent 1.5px),
                    radial-gradient(circle at 70% 60%, var(--gold) 1px, transparent 1px);
  background-size: 90px 90px, 60px 60px;
}
.cta-band h2 { font-size: clamp(28px, 3.8vw, 40px); position: relative; color: var(--cream); }
.cta-band p { margin: 16px auto 32px; max-width: 520px; color: var(--cream-2); position: relative; }
.lead-form { position: relative; display: flex; gap: 12px; max-width: 480px; margin: 0 auto; }
.lead-form input {
  flex: 1; border: 1px solid rgba(255,255,255,.16); outline: none; border-radius: 10px; padding: 14px 18px;
  font-size: 15px; font-family: inherit; background: rgba(255,255,255,.07); color: var(--cream);
  transition: border-color .2s, box-shadow .2s;
}
.lead-form input::placeholder { color: var(--cream-3); }
.lead-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(242, 169, 196, .18); }
.lead-form .btn { background: var(--grad-gold); color: #2E2145; }
.lead-form .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(182, 92, 130, .5); }
.lead-note { margin-top: 18px; font-size: 13px; color: var(--cream-3); position: relative; }
.lead-note b { color: var(--gold); }
@media (max-width: 560px) { .lead-form { flex-direction: column; } .cta-band { padding: 56px 24px; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 56px; background: var(--paper-card); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer .brand { color: var(--ink); }
.footer small { color: var(--ink-3); font-size: 13px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 13.5px; color: var(--ink-2); }
.footer-links a:hover { color: var(--gold-deep); }
.legal-three { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.legal-three span {
  font-size: 12px; color: var(--ink-3); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}

/* ---------- 滚动动效 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ekg-path, .orbit-ring, .status-pill i { animation: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 80px);
  background: var(--ink-dark); color: var(--cream); font-size: 14px; padding: 13px 22px;
  border: 1px solid rgba(242, 169, 196, .3);
  border-radius: 10px; box-shadow: var(--shadow-pop); z-index: 999;
  opacity: 0; transition: all .35s cubic-bezier(.2,.7,.3,1); pointer-events: none;
  max-width: 88%;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.ok { background: var(--pine); border-color: transparent; color: #fff; }

/* ============================================================
   App 控制台
   ============================================================ */
.app-shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
@media (max-width: 900px) { .app-shell { grid-template-columns: 1fr; } }
.app-side {
  background: var(--ink-dark); padding: 22px 16px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; border-right: 1px solid rgba(242, 169, 196, .14);
}
@media (max-width: 900px) { .app-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--line); } }
.app-side .brand { padding: 4px 10px 20px; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  border-radius: 8px; color: var(--cream-2); font-size: 14.5px; font-weight: 500;
  border: none; background: none; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.side-link svg { width: 17px; height: 17px; flex: none; }
.side-link:hover { background: rgba(242, 169, 196, .1); color: var(--gold); }
.side-link.active { background: rgba(242, 169, 196, .14); color: var(--gold); font-weight: 600; box-shadow: inset 2.5px 0 0 var(--gold); }
@media (max-width: 900px) {
  .app-side { background: var(--paper-card); }
  .app-side .brand { color: var(--ink); padding-bottom: 4px; }
  .app-side .brand-badge img { content: url(../img/icon-192.png); height: 36px; border-radius: 9px; }
  .side-link { width: auto; color: var(--ink-2); }
  .side-link:hover { background: var(--gold-soft); color: var(--gold-deep); }
  .side-link.active { background: var(--gold-soft); color: var(--gold-deep); box-shadow: inset 0 -2.5px 0 var(--gold); }
}
.side-foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid rgba(255,255,255,.08); }
@media (max-width: 900px) { .side-foot { display: none; } }
.side-foot small { font-size: 11.5px; color: var(--cream-3); line-height: 1.65; display: block; }
.side-foot b { color: var(--gold); font-weight: 600; }

.app-main { padding: 36px 40px 72px; max-width: 1080px; width: 100%; margin: 0 auto; }
@media (max-width: 640px) { .app-main { padding: 22px 18px 60px; } }
.app-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.app-topbar h1 { font-size: 27px; }
.app-topbar .sub { color: var(--ink-3); font-size: 13.5px; margin-top: 3px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat-card { background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; box-shadow: var(--shadow-card); }
.stat-card .k { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.stat-card .k svg { width: 14px; height: 14px; color: var(--gold-deep); }
.stat-card .v { font-family: var(--font-mono); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat-card .v small { font-size: 13px; color: var(--ink-3); font-weight: 500; font-family: var(--font-body); margin-left: 4px; }

.panel { background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: 28px; margin-bottom: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.panel-head h2 { font-size: 17.5px; }
.panel-head p { font-size: 13px; color: var(--ink-3); margin-top: 3px; }

.asset-table { width: 100%; border-collapse: collapse; }
.asset-table th {
  text-align: left; font-size: 11.5px; letter-spacing: .1em; color: var(--ink-3);
  font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line);
  text-transform: uppercase;
}
.asset-table td { padding: 14px 12px; border-bottom: 1px solid #EFE7F1; font-size: 14px; vertical-align: middle; }
.asset-table tr:last-child td { border-bottom: none; }
.asset-table tr:hover td { background: #FBF4FA; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-deep);
  border: 1px solid var(--gold-line); white-space: nowrap;
}
.row-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--paper-card); color: var(--ink-3); display: grid; place-items: center;
  transition: all .15s;
}
.icon-btn:hover { color: var(--gold-deep); border-color: var(--gold-line); background: var(--gold-soft); }
.icon-btn.danger:hover { color: var(--red); border-color: #EBC9C3; background: var(--red-soft); }
.icon-btn svg { width: 15px; height: 15px; }

.empty-state { text-align: center; padding: 52px 20px; color: var(--ink-3); }
.empty-state svg { width: 46px; height: 46px; color: #E3B9CF; margin: 0 auto 14px; }
.empty-state b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 5px; }
.empty-state p { font-size: 13.5px; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px;
  font-size: 14px; font-family: inherit; background: var(--paper-card); color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3.5px rgba(242, 169, 196, .16);
}
.field textarea { resize: vertical; min-height: 88px; }
.field .hint { font-size: 12px; color: var(--ink-3); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(28, 26, 78, .55);
  backdrop-filter: blur(5px); display: none; place-items: center; z-index: 200; padding: 20px;
}
.modal-mask.open { display: grid; }
.modal {
  width: min(560px, 100%); background: var(--paper-card); border-radius: var(--r-lg);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-pop); padding: 32px; max-height: 88vh; overflow: auto;
  animation: pop .28s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.modal h3 { font-size: 20px; margin-bottom: 4px; }
.modal .modal-sub { font-size: 13.5px; color: var(--ink-3); margin-bottom: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* 警示条 */
.alert {
  display: flex; gap: 12px; border-radius: 10px; padding: 14px 16px; font-size: 13.5px;
  align-items: flex-start; margin-bottom: 16px;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert-amber { background: var(--amber-soft); color: #8A4A07; border: 1px solid #EDD9BC; }
.alert-red { background: var(--red-soft); color: var(--red); border: 1px solid #EBC9C3; }
.alert-blue { background: var(--gold-soft); color: #8A3E63; border: 1px solid var(--gold-line); }

/* 三段闸时间线 */
.gate-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .gate-timeline { grid-template-columns: 1fr; } }
.gate {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px;
  background: var(--paper-card); position: relative; transition: all .2s;
}
.gate .g-num {
  position: absolute; top: -11px; left: 18px; font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 700; background: var(--paper-card); border: 1px solid var(--line);
  color: var(--ink-3); padding: 2px 10px; border-radius: 999px; letter-spacing: .08em;
}
.gate.armed { border-color: var(--gold); background: linear-gradient(180deg, #FBEDF5, var(--paper-card)); }
.gate.armed .g-num { background: var(--grad-gold); color: #2E2145; border-color: transparent; }
.gate h4 { font-size: 15px; margin: 6px 0 6px; }
.gate p { font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.gate .g-status { margin-top: 12px; font-size: 12px; font-weight: 600; }

/* 心跳环 */
.hb-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hb-ring { position: relative; width: 150px; height: 150px; flex: none; }
.hb-ring svg { transform: rotate(-90deg); }
.hb-ring .track { stroke: #F2E4F0; }
.hb-ring .prog { stroke: url(#hbGrad); stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.hb-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.hb-center .d { font-family: var(--font-mono); font-size: 30px; font-weight: 700; line-height: 1; }
.hb-center .l { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }

/* 受益人卡 */
.bene-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .bene-grid { grid-template-columns: 1fr; } }
.bene-card {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px;
  background: var(--paper-card); transition: all .2s;
}
.bene-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.bene-ava {
  width: 44px; height: 44px; border-radius: 10px; background: var(--grad-gold);
  color: #2E2145; display: grid; place-items: center; font-weight: 700; font-size: 17px;
  font-family: var(--font-display); margin-bottom: 12px;
}
.bene-card h4 { font-size: 16px; }
.bene-card .rel { font-size: 12.5px; color: var(--ink-3); margin: 3px 0 12px; }
.bene-meta { font-size: 12.5px; color: var(--ink-2); display: grid; gap: 6px; }
.bene-meta span { display: flex; gap: 7px; align-items: center; }
.bene-meta svg { width: 13px; height: 13px; color: var(--gold-deep); flex: none; }
.verify-chip { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.verify-chip.ok { background: var(--pine-soft); color: var(--pine); }
.verify-chip.pending { background: var(--amber-soft); color: var(--amber); }

/* 演练步骤条 */
.drill-steps { display: grid; gap: 0; }
.drill-step { display: flex; gap: 16px; position: relative; padding-bottom: 26px; }
.drill-step:last-child { padding-bottom: 0; }
.drill-step::before {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px;
  width: 2px; background: var(--line);
}
.drill-step:last-child::before { display: none; }
.drill-step.done::before { background: var(--pine); }
.drill-dot {
  width: 32px; height: 32px; border-radius: 50%; flex: none; z-index: 1;
  display: grid; place-items: center; font-family: var(--font-mono);
  font-size: 12px; font-weight: 700; background: var(--paper-card);
  border: 2px solid var(--line); color: var(--ink-3); transition: all .3s;
}
.drill-step.active .drill-dot { border-color: var(--gold); color: var(--gold-deep); box-shadow: 0 0 0 5px rgba(242, 169, 196, .14); }
.drill-step.done .drill-dot { border-color: var(--pine); background: var(--pine); color: #fff; }
.drill-body b { font-size: 14.5px; display: block; }
.drill-body p { font-size: 13px; color: var(--ink-2); margin-top: 3px; }

/* 登录锁屏（深夜墨蓝） */
.lock-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 440px at 72% 0%, rgba(242, 169, 196, .15), transparent 60%),
    radial-gradient(700px 380px at 8% 100%, rgba(94, 84, 190, .28), transparent 55%),
    var(--ink-dark);
}
.lock-card {
  width: min(450px, 100%); background: var(--paper-card); border-radius: var(--r-lg);
  border: 1px solid var(--gold-line); box-shadow: var(--shadow-pop); padding: 42px 38px; text-align: center;
}
.lock-badge {
  width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 20px;
  overflow: hidden; box-shadow: 0 12px 28px rgba(28, 26, 78, .45);
}
.lock-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lock-card h1 { font-size: 24px; margin-bottom: 8px; }
.lock-card > p { font-size: 13.5px; color: var(--ink-3); margin-bottom: 26px; }
.lock-tabs { display: flex; background: var(--gold-soft); border-radius: 9px; padding: 4px; margin-bottom: 22px; }
.lock-tabs button {
  flex: 1; border: none; background: none; padding: 9px; border-radius: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: all .15s;
}
.lock-tabs button.active { background: var(--paper-card); color: var(--gold-deep); box-shadow: var(--shadow-card); }
