/* ===== 页面标题区的图标（page-icons.js，2026-12-03）=====
   负责人：「其他板块的标题也可以有一个这样的svg图标……要和他们logo搭上。」图标画在 page-icons.js；这里管它摆在哪、怎么动。
   pages.js 的 crmHead 给有图标的标题区加 has-icon：图标在最左，标题和一句话跟在右边，操作按钮还在最右。 */
.crm-head.has-icon { align-items: center; }
.crm-head.has-icon .crm-title { flex: 1 1 auto; min-width: 0; }
.crm-head.has-icon .crm-actions { padding-top: 0; }
.crm-icon, .st-icon { flex: none; display: block; width: 56px; height: 56px;
  filter: drop-shadow(0 10px 16px rgb(18 116 165 / 30%)) drop-shadow(0 2px 4px rgb(10 53 82 / 20%));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s ease; }
.crm-icon:hover, .st-icon:hover { transform: translateY(-2px) scale(1.05) rotate(-3deg);
  filter: drop-shadow(0 14px 22px rgb(18 116 165 / 38%)) drop-shadow(0 2px 4px rgb(10 53 82 / 22%)); }
.crm-icon:hover .ha-shine, .st-icon:hover .ha-shine { animation-duration: 1.4s; }
.st-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* 有的页面给整页的 svg 都套了描边（比如总览页 .so-page svg 是给线条小图标用的），图标是填色画的，这里压回去 */
.crm-icon svg.ha.pi, .st-icon svg.ha.pi, .ais-hero-icon svg.ha.pi { fill: none; stroke: none; stroke-width: 0; width: 100%; height: 100%; }

/* 右上角 logo 圆点：隔一会儿中间的菱形转四分之一圈，光晕跟着亮一下 */
.pi-mark { animation: pi-mark 5.6s cubic-bezier(.65, 0, .25, 1) infinite; }
.pi-glow { animation: pi-glow 5.6s ease-in-out infinite; }
@keyframes pi-mark { 0%, 62% { transform: rotate(0deg); } 82%, 100% { transform: rotate(90deg); } }
@keyframes pi-glow { 0%, 100% { opacity: .38; } 72% { opacity: .72; } }

/* 自己中心变形的小件 */
.pi-pop, .pi-blip, .pi-drip, .pi-bar { transform-box: fill-box; transform-origin: center; }
.pi-bar, .pi-drip { transform-origin: 50% 100%; }

/* 客户概况：环形图画出来，金色那段跟着画，停一会儿淡掉重来 */
.pi-arc { animation: pi-arc 6.4s cubic-bezier(.45, 0, .2, 1) infinite; }
.pi-arc.g { animation-name: pi-arc-g; }
@keyframes pi-arc { 0% { stroke-dasharray: 0 100; opacity: 1; } 32%, 86% { stroke-dasharray: 56 100; opacity: 1; } 100% { stroke-dasharray: 56 100; opacity: 0; } }
@keyframes pi-arc-g { 0%, 30% { stroke-dasharray: 0 100; opacity: 0; } 33% { opacity: 1; } 46%, 86% { stroke-dasharray: 16 100; opacity: 1; } 100% { stroke-dasharray: 16 100; opacity: 0; } }
/* 成交对勾：隔一会儿「盖」一下 */
.pi-pop { animation: pi-pop 4.8s cubic-bezier(.3, 1.4, .5, 1) infinite; }
@keyframes pi-pop { 0%, 70%, 100% { transform: scale(1); } 78% { transform: scale(1.16); } 86% { transform: scale(.96); } }
/* 图钉轻轻上下 */
.pi-bob { animation: pi-bob 2.8s ease-in-out infinite; }
@keyframes pi-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.2px); } }
/* 雷达扫一圈，扫到哪个点哪个点亮 */
.pi-sweep { animation: pi-spin 3.6s linear infinite; }
.pi-blip { animation: pi-blip 3.6s ease-out -.61s infinite; }
.pi-blip.b { animation-delay: -2.4s; }
@keyframes pi-blip { 0%, 100% { transform: scale(.7); opacity: .55; } 14% { transform: scale(1.25); opacity: 1; } 40% { transform: scale(1); opacity: .9; } }
.pi-spin { animation: pi-spin 6s linear infinite; }
.pi-spin.slow { animation-duration: 9s; }
@keyframes pi-spin { to { transform: rotate(360deg); } }
/* 客户对照：重合的金色那块一明一暗 */
.pi-lens { animation: pi-lens 3.2s ease-in-out infinite; }
@keyframes pi-lens { 0%, 100% { opacity: 1; } 50% { opacity: .74; } }
/* 写字板上的勾一项一项画上 */
.pi-tick { animation: pi-tick 5.4s ease-out infinite; }
.pi-tick.d1 { animation-name: pi-tick1; }
.pi-tick.d2 { animation-name: pi-tick2; }
@keyframes pi-tick { 0%, 4% { stroke-dashoffset: 10; } 14%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 10; } }
@keyframes pi-tick1 { 0%, 10% { stroke-dashoffset: 10; } 20%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 10; } }
@keyframes pi-tick2 { 0%, 16% { stroke-dashoffset: 10; } 26%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 10; } }
/* 柱子往上长 */
.pi-bar { animation: pi-bar 6s cubic-bezier(.3, .9, .3, 1) infinite; }
.pi-bar.d1 { animation-name: pi-bar1; }
.pi-bar.d2 { animation-name: pi-bar2; }
.pi-bar.d3 { animation-name: pi-bar3; }
@keyframes pi-bar { 0% { transform: scaleY(.55); } 12%, 90% { transform: scaleY(1); } 100% { transform: scaleY(.55); } }
@keyframes pi-bar1 { 0%, 3% { transform: scaleY(.55); } 15%, 90% { transform: scaleY(1); } 100% { transform: scaleY(.55); } }
@keyframes pi-bar2 { 0%, 6% { transform: scaleY(.55); } 18%, 90% { transform: scaleY(1); } 100% { transform: scaleY(.55); } }
@keyframes pi-bar3 { 0%, 9% { transform: scaleY(.55); } 21%, 90% { transform: scaleY(1); } 100% { transform: scaleY(.55); } }
/* 线一路画上去 */
.pi-line { animation: pi-line 6s cubic-bezier(.45, 0, .2, 1) infinite; }
@keyframes pi-line { 0%, 12% { stroke-dashoffset: 100; } 42%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
/* 路线上的点往前走 */
.pi-march { animation: pi-march 1.1s linear infinite; }
@keyframes pi-march { to { stroke-dashoffset: -5.5; } }
/* 喇叭的声波 */
.pi-wave { animation: pi-wave 2.6s ease-in-out infinite; }
.pi-wave.b { animation-delay: .35s; }
.pi-wave.c { animation-delay: .7s; }
@keyframes pi-wave { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
/* 客户卡从左边的人递到右边的人 */
.pi-pass { animation: pi-pass 3.2s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes pi-pass { 0% { transform: translateX(-7px); opacity: 0; } 18% { opacity: 1; } 62% { transform: translateX(6px); opacity: 1; } 80%, 100% { transform: translateX(7px); opacity: 0; } }
/* 表盘指针摆到金色那段再回来 */
.pi-needle { animation: pi-needle 4.6s cubic-bezier(.45, 0, .25, 1) infinite; }
@keyframes pi-needle { 0%, 100% { transform: rotate(0deg); } 45%, 60% { transform: rotate(78deg); } }
/* 最上面的箱子落下来，弹一下 */
.pi-box { animation: pi-box 4.4s cubic-bezier(.3, 0, .3, 1) infinite; }
@keyframes pi-box { 0%, 30%, 100% { transform: translateY(0); } 8% { transform: translateY(-4px); } 16% { transform: translateY(0); } 21% { transform: translateY(-1.2px); } 26% { transform: translateY(0); } }
/* 油滴轻轻颤 */
.pi-drip { animation: pi-drip 3.4s ease-in-out infinite; }
@keyframes pi-drip { 0%, 75%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-1.2px) scale(.94, 1.06); } 60% { transform: translateY(0) scale(1.06, .94); } }
/* 货车后面的风线 */
.pi-speed { animation: pi-speed .9s linear infinite; }
@keyframes pi-speed { 0% { transform: translateX(2px); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateX(-3px); opacity: 0; } }
/* 箭头往外送、往里进 */
.pi-out { animation: pi-out 2.6s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes pi-out { 0% { transform: translateX(-4px); opacity: 0; } 25%, 60% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(5px); opacity: 0; } }
.pi-enter { animation: pi-enter 2.6s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes pi-enter { 0% { transform: translateX(-5px); opacity: 0; } 30%, 65% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(4px); opacity: 0; } }
/* 工牌、价签轻轻晃 */
.pi-swing { animation: pi-swing 4.2s ease-in-out infinite; }
@keyframes pi-swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
/* 应收往来：一来一往 */
.pi-swap { animation: pi-swap 2.8s ease-in-out infinite; }
.pi-swap.b { animation-name: pi-swap-b; }
@keyframes pi-swap { 0%, 100% { transform: translateX(-1.5px); } 50% { transform: translateX(1.5px); } }
@keyframes pi-swap-b { 0%, 100% { transform: translateX(1.5px); } 50% { transform: translateX(-1.5px); } }
/* 金币落进小票 */
.pi-coin { animation: pi-coin 3.6s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes pi-coin { 0% { transform: translateY(-9px); opacity: 0; } 22% { transform: translateY(0); opacity: 1; } 28% { transform: translateY(-1.5px); } 34%, 84% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
/* 放大镜四处看 */
.pi-peek { animation: pi-peek 5s ease-in-out infinite; }
@keyframes pi-peek { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(2px, -1px); } 66% { transform: translate(-1.5px, 1px); } }
/* 锁孔一明一暗 */
.pi-glint { animation: pi-glint 3.6s ease-in-out infinite; }
@keyframes pi-glint { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
/* 笔在写 */
.pi-pen { animation: pi-pen 4.2s ease-in-out infinite; }
@keyframes pi-pen { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-1.5px, 1px); } 50% { transform: translate(0, 2px); } 75% { transform: translate(-1.5px, 3px); } }

@media (prefers-reduced-motion: reduce) { .pi *, .crm-icon, .st-icon { animation: none !important; transition: none !important; } }
@media (max-width: 760px) {
  .crm-icon, .st-icon { width: 44px; height: 44px; }
  .crm-head.has-icon { flex-wrap: wrap; align-items: center; }
  .crm-head.has-icon .crm-title { flex: 1 1 0; }
  .crm-head.has-icon .crm-actions { flex: 1 0 100%; justify-content: flex-start; }
}
