/* =========================================================
   恒隆金通 · 金融财务 AI 决策系统 — 原型设计系统
   美学方向：纸墨 + 黄铜金（克制精致 / 金融专业 / 非 AI 套路色）
   ========================================================= */

:root {
  /* 中性纸墨 */
  --paper: #f4f2ec;          /* 整体背景，暖纸感 */
  --paper-2: #efece4;        /* 次级背景 */
  --surface: #ffffff;        /* 卡片表面 */
  --surface-2: #faf8f3;      /* 浅表面 */
  --ink: #1c1b17;            /* 主文字，近黑非纯黑 */
  --ink-2: #4a473f;          /* 次级文字 */
  --muted: #8a857a;          /* 弱化文字 */
  --line: #e4e0d6;           /* 描边 */
  --line-strong: #d6d1c4;

  /* 黄铜金（唯一强调色，饱和度克制） */
  --brass: #b0852f;
  --brass-strong: #94701f;
  --brass-soft: #f3e9d2;
  --brass-tint: #faf3e2;

  /* 状态色（低饱和，金融克制） */
  --ok: #3f7a52;
  --ok-soft: #e6f0e9;
  --warn: #c0872c;
  --warn-soft: #f6ecd8;
  --risk: #bb4a35;
  --risk-soft: #f6e4df;
  --info: #4a6b86;
  --info-soft: #e6edf2;

  /* 字号流体 */
  --fs-display: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --fs-h1: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-h2: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  --fs-body: 0.95rem;
  --fs-sm: 0.82rem;
  --fs-xs: 0.72rem;

  /* 间距节奏 */
  --sp-1: 6px; --sp-2: 10px; --sp-3: 16px; --sp-4: 24px;
  --sp-5: 36px; --sp-6: 56px;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(28,27,23,0.04), 0 2px 8px rgba(28,27,23,0.05);
  --shadow-md: 0 4px 14px rgba(28,27,23,0.07), 0 14px 40px rgba(28,27,23,0.06);
  --shadow-lg: 0 18px 60px rgba(28,27,23,0.14);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-w: 232px;
  --topbar-h: 64px;

  --font-display: "Outfit", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Outfit", system-ui, -apple-system, sans-serif;
  --font-num: "Outfit", "Noto Sans SC", system-ui, sans-serif;
}

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

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: 1.6;
  min-height: 100dvh;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid var(--paper); }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 登录页 ============ */
.login {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--paper);
}
.login__brand {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 80% at 15% 10%, rgba(176,133,47,0.16), transparent 60%),
    radial-gradient(90% 70% at 90% 100%, rgba(28,27,23,0.06), transparent 55%),
    linear-gradient(160deg, #211f1a, #2c2922);
  color: #f4f2ec; padding: var(--sp-6);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login__brand::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid rgba(176,133,47,0.25);
}
.login__brand::before {
  content: ""; position: absolute; right: -60px; bottom: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(176,133,47,0.18), transparent 70%);
}
.brand-mark { display: flex; align-items: center; gap: 12px; z-index: 1; }
.brand-mark__logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(150deg, var(--brass), var(--brass-strong));
  display: grid; place-items: center; color: #1c1b17; font-weight: 700;
  font-family: var(--font-display); font-size: 1.1rem;
  box-shadow: 0 6px 20px rgba(176,133,47,0.35);
}
.brand-mark__name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: 0.02em; }
.brand-mark__sub { font-size: var(--fs-xs); color: rgba(244,242,236,0.6); }
.login__claim { z-index: 1; max-width: 420px; }
.login__claim h1 { font-size: clamp(1.8rem, 1.4rem+2vw, 2.8rem); color: #fff; margin-bottom: 14px; }
.login__claim p { color: rgba(244,242,236,0.74); font-size: 1rem; line-height: 1.7; }
.login__points { z-index: 1; display: flex; gap: 26px; flex-wrap: wrap; }
.login__points span { font-size: var(--fs-sm); color: rgba(244,242,236,0.7); display: flex; align-items: center; gap: 8px; }
.login__points i { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); display: inline-block; }

.login__form { display: flex; align-items: center; justify-content: center; padding: var(--sp-5); }
.login__card { width: 100%; max-width: 360px; }
.login__card h2 { font-size: var(--fs-h1); margin-bottom: 8px; }
.login__card .lead { color: var(--muted); margin-bottom: var(--sp-4); font-size: var(--fs-sm); }
.field { margin-bottom: var(--sp-3); }
.field label { display: block; font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
.field input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-tint); }
.login__hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 10px; text-align: center; }

/* ============ 应用外壳 ============ */
.app { display: none; min-height: 100dvh; }
.app.is-active { display: block; }

.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100dvh; }

/* 侧边栏 */
.sidebar {
  background: linear-gradient(180deg, #211f1a, #26231d);
  color: #e9e5db; padding: 22px 16px; position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.sidebar__brand .brand-mark__logo { width: 36px; height: 36px; font-size: .95rem; border-radius: 10px; }
.sidebar__brand .brand-mark__name { color: #fff; font-size: 1rem; }
.sidebar__brand .brand-mark__sub { color: rgba(233,229,219,0.5); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav__label { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(233,229,219,0.4); padding: 16px 10px 8px; }
.nav__item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  color: rgba(233,229,219,0.78); font-size: var(--fs-sm); font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease); position: relative;
}
.nav__item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav__item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav__item.is-active { background: linear-gradient(90deg, rgba(176,133,47,0.22), rgba(176,133,47,0.05)); color: #fff; }
.nav__item.is-active::before {
  content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px;
  background: var(--brass); border-radius: 0 3px 3px 0;
}
.sidebar__foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid rgba(255,255,255,0.08); font-size: var(--fs-xs); color: rgba(233,229,219,0.5); }
.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.sidebar__avatar { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(150deg,var(--brass),var(--brass-strong)); display: grid; place-items: center; color: #1c1b17; font-weight: 700; font-size: .8rem; }

/* 主区域 */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--sp-5); border-bottom: 1px solid var(--line); background: rgba(244,242,236,0.8);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20;
}
.topbar__title { display: flex; flex-direction: column; }
.topbar__title h1 { font-size: 1.15rem; }
.topbar__title small { font-size: var(--fs-xs); color: var(--muted); }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-2);
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.topbar__ava { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 600; font-size: .8rem; }

.content { padding: var(--sp-5); max-width: 1320px; width: 100%; margin: 0 auto; }

/* ============ 通用组件 ============ */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: var(--sp-4);
}
.card--flush { padding: 0; overflow: hidden; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head .sub { font-size: var(--fs-xs); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px;
  font-size: var(--fs-sm); font-weight: 600; transition: transform .12s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--brass); color: #fff; box-shadow: 0 6px 18px rgba(176,133,47,0.28); }
.btn--primary:hover { background: var(--brass-strong); }
.btn--ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--risk { background: var(--risk-soft); color: var(--risk); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--brass { background: var(--brass-soft); color: var(--brass-strong); }

/* KPI */
.kpi { display: flex; flex-direction: column; gap: 10px; }
.kpi__label { font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi__value { font-size: clamp(1.5rem, 1.2rem+1vw, 2rem); font-weight: 600; }
.kpi__delta { font-size: var(--fs-xs); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.kpi__delta.up { color: var(--ok); } .kpi__delta.down { color: var(--risk); }
.kpi__spark { height: 34px; margin-top: 4px; }

/* Bento 网格 */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-3); }
.bento > * { min-width: 0; }
.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; } .col-12 { grid-column: span 12; }

/* 列表 / 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.vendor { display: flex; align-items: center; gap: 10px; }
.vendor__dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: .75rem; color: #fff; }

/* 建议卡 */
.advice {
  border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2); position: relative; overflow: hidden;
  margin-bottom: var(--sp-3);
}
.advice:last-child { margin-bottom: 0; }
.advice::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brass); }
.advice--risk::before { background: var(--risk); }
.advice--ok::before { background: var(--ok); }
.advice__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.advice__title { font-weight: 600; font-size: var(--fs-sm); }
.advice p { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.65; }

/* AI 回答结构块 */
.ai-block { border-left: 2px solid var(--line-strong); padding: 4px 0 4px 14px; margin: 12px 0; }
.ai-block__k { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; color: var(--brass-strong); text-transform: uppercase; margin-bottom: 3px; }
.ai-block__v { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.65; }
.ai-block--risk { border-left-color: var(--risk); }
.ai-block--risk .ai-block__k { color: var(--risk); }
.ai-block--action { border-left-color: var(--ok); }
.ai-block--action .ai-block__k { color: var(--ok); }
.manual-flag {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 8px 12px; border-radius: 9px;
  background: var(--warn-soft); color: var(--brass-strong); font-size: var(--fs-xs); font-weight: 600;
}

/* 快捷问题 */
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.chip {
  padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: var(--fs-sm); color: var(--ink-2); transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--brass); color: var(--brass-strong); transform: translateY(-1px); }

/* 输入区 */
.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea {
  flex: 1; resize: none; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); min-height: 50px; max-height: 140px; line-height: 1.5;
  font-size: var(--fs-sm); color: var(--ink-1);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.composer textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-tint); }

/* 趋势图（纯 CSS/SVG） */
.chart { width: 100%; height: 220px; }
.legend { display: flex; gap: 18px; font-size: var(--fs-xs); color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 3px; display: inline-block; }

/* ============ 恒隆 AI 助手（悬浮中台） ============ */
.assistant-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 60;
  width: 58px; height: 58px; border-radius: 18px;
  background: linear-gradient(150deg, var(--brass), var(--brass-strong));
  box-shadow: 0 12px 30px rgba(176,133,47,0.4); color: #fff;
  display: grid; place-items: center; transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.assistant-fab:hover { transform: translateY(-2px) scale(1.04); }
.assistant-fab svg { width: 26px; height: 26px; }
.assistant-fab .dot {
  position: absolute; top: -3px; right: -3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--risk); border: 2px solid var(--paper); animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: .75; } }

.assistant-panel {
  position: fixed; right: 26px; bottom: 26px; z-index: 61; width: 396px; max-width: calc(100vw - 32px);
  height: 600px; max-height: calc(100dvh - 52px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(16px) scale(0.98); opacity: 0; pointer-events: none;
  transition: transform .28s var(--ease), opacity .22s var(--ease);
}
.assistant-panel.is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.assistant-panel__head {
  padding: 16px 18px; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, #211f1a, #2a271f); color: #f4f2ec;
}
.assistant-panel__id { display: flex; align-items: center; gap: 11px; }
.assistant-panel__id .brand-mark__logo { width: 34px; height: 34px; font-size: .85rem; border-radius: 10px; }
.assistant-panel__id b { font-family: var(--font-display); font-size: .98rem; }
.assistant-panel__id small { display: block; font-size: var(--fs-xs); color: rgba(244,242,236,0.6); }
.assistant-panel__close { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: rgba(244,242,236,0.8); transition: background .2s; }
.assistant-panel__close:hover { background: rgba(255,255,255,0.1); }
.assistant-panel__ctx {
  padding: 9px 18px; font-size: var(--fs-xs); color: var(--ink-2); background: var(--brass-tint);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px;
}
.assistant-panel__ctx b { color: var(--brass-strong); }
.assistant-panel__body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.assistant-panel__foot { padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }

.msg { display: flex; gap: 10px; max-width: 92%; }
.msg--user { align-self: flex-end; flex-direction: row-reverse; }
.msg__bubble { padding: 11px 14px; border-radius: 14px; font-size: var(--fs-sm); line-height: 1.6; }
.msg--ai .msg__bubble { background: var(--surface-2); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg--user .msg__bubble { background: var(--ink); color: var(--paper); border-top-right-radius: 4px; }
.msg__avatar { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: .72rem; }
.msg--ai .msg__avatar { background: linear-gradient(150deg,var(--brass),var(--brass-strong)); color: #1c1b17; }
.msg--user .msg__avatar { background: var(--line-strong); color: var(--ink); }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.suggest { display: flex; flex-direction: column; gap: 7px; }
.suggest__item {
  text-align: left; padding: 9px 12px; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); transition: all .16s var(--ease);
}
.suggest__item:hover { border-color: var(--brass); color: var(--brass-strong); }

/* ============ 空 / 加载态 ============ */
.skeleton { background: linear-gradient(90deg, var(--line) 25%, var(--surface-2) 50%, var(--line) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 10px; }

/* ============ 动效入场 ============ */
.reveal { opacity: 0; transform: translateY(14px); animation: rise .6s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .col-3 { grid-column: span 6; } .col-4 { grid-column: span 6; }
  .col-5, .col-7, .col-8, .col-9 { grid-column: span 12; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login__brand { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 80;
    transform: translateX(-100%); transition: transform .3s var(--ease);
  }
  .sidebar.is-open { transform: translateX(0); }
  .menu-toggle { display: grid !important; }
  .col-3, .col-4, .col-6 { grid-column: span 12; }
  .content { padding: var(--sp-3); }
  .topbar { padding: 0 var(--sp-3); }
  .loopbar-wrap { padding: 10px var(--sp-3) 0; }
  .dimpact__stats { grid-template-columns: repeat(2, 1fr); }
  .assistant-panel { right: 12px; bottom: 12px; height: calc(100dvh - 24px); }
}
.menu-toggle { display: none; width: 38px; height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); place-items: center; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(28,27,23,0.4); z-index: 79; }
.scrim.is-open { display: block; }

/* ============ 闭环步骤条 ============ */
.loopbar-wrap { padding: 12px var(--sp-5) 0; }
.loopbar {
  display: flex; align-items: center; gap: 0; max-width: 1320px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 22px; box-shadow: var(--shadow-sm); overflow-x: auto;
}
.loopstep { display: flex; align-items: center; gap: 9px; white-space: nowrap; color: var(--muted); }
.loopstep__dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--fs-xs); font-weight: 700; background: var(--surface-2);
  border: 1.5px solid var(--line-strong); color: var(--muted); flex-shrink: 0; transition: all .25s var(--ease);
}
.loopstep__txt { display: flex; flex-direction: column; line-height: 1.15; }
.loopstep__txt b { font-size: var(--fs-sm); font-weight: 600; }
.loopstep__txt small { font-size: 10px; color: var(--muted); }
.loopstep__line { width: 34px; height: 2px; background: var(--line); flex-shrink: 0; margin: 0 6px; border-radius: 2px; transition: background .25s var(--ease); }
.loopstep.is-done { color: var(--ink); }
.loopstep.is-done .loopstep__dot { background: linear-gradient(150deg, var(--brass), var(--brass-strong)); border-color: transparent; color: #fff; }
.loopstep.is-done + .loopstep__line, .loopstep__line.is-done { background: var(--brass); }
.loopstep.is-active .loopstep__dot {
  border-color: var(--brass); color: var(--brass-strong);
  box-shadow: 0 0 0 4px var(--brass-tint); animation: pulsering 1.8s var(--ease) infinite;
}
@keyframes pulsering { 0%,100% { box-shadow: 0 0 0 4px var(--brass-tint); } 50% { box-shadow: 0 0 0 7px rgba(176,133,47,0.12); } }

/* ============ 操作反馈 toast ============ */
.toast-wrap { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; background: #211f1a; color: #f4f2ec; padding: 12px 18px; border-radius: 12px;
  font-size: var(--fs-sm); font-weight: 500; box-shadow: var(--shadow-lg); max-width: 90vw;
  opacity: 0; transform: translateY(14px); transition: all .3s var(--ease);
}
.toast.is-show { opacity: 1; transform: translateY(0); }
.toast--ok { border-left: 3px solid var(--ok); }
.toast--risk { border-left: 3px solid var(--risk); }
.toast--info { border-left: 3px solid var(--brass); }

/* ============ 付款决策动作 ============ */
.acts { display: flex; gap: 7px; flex-wrap: wrap; }
.act {
  padding: 7px 12px; border-radius: 9px; font-size: var(--fs-xs); font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  transition: all .16s var(--ease); white-space: nowrap;
}
.act:hover { transform: translateY(-1px); }
.act--approve { border-color: var(--risk); color: var(--risk); }
.act--approve:hover { background: var(--risk-soft); }
.act--defer { border-color: var(--info); color: var(--info); }
.act--defer:hover { background: var(--info-soft); }
.act--collect { border-color: var(--warn); color: var(--warn); }
.act--collect:hover { background: var(--warn-soft); }

/* ============ 决策影响卡 ============ */
.dimpact { display: flex; flex-direction: column; gap: 16px; }
.dimpact__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.dstat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.dstat__v { font-size: 1.4rem; font-weight: 600; }
.dstat__l { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.dimpact__log { border-top: 1px dashed var(--line); padding-top: 12px; }
.dlog__title { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; color: var(--brass-strong); text-transform: uppercase; margin-bottom: 8px; }
.dlog__item { display: flex; gap: 12px; align-items: baseline; font-size: var(--fs-sm); padding: 5px 0; border-bottom: 1px solid var(--line); }
.dlog__t { color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; width: 42px; }
.dlog__a { color: var(--brass-strong); font-weight: 600; flex-shrink: 0; }
.dlog__v { color: var(--ink-2); }
.dlog__empty { font-size: var(--fs-sm); color: var(--muted); }

/* ============ 行高亮（决策反馈） ============ */
.table tbody tr.is-flash { animation: rowflash 1.1s var(--ease); }
@keyframes rowflash { 0% { background: var(--brass-tint); } 100% { background: transparent; } }

/* ============ 卡片悬停精修 ============ */
.card { transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.card:not(.card--flush):hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* 降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
