/* ===== Happen AI Agentic CRM · 公共补丁样式 ===== */
:root{
  --hp-navy:#071c33;
  --hp-blue:#2166e8;
  --hp-line:#dce6f1;
}
/* 顶部状态条（商务版隐藏） */
.hp-demo-bar{
  position:fixed;top:0;left:0;right:0;height:26px;z-index:9998;
  display:flex;align-items:center;justify-content:center;gap:10px;
  background:linear-gradient(90deg,#0b2a4a,#1b4f8a);
  color:#e8f2ff;font-size:11.5px;letter-spacing:.4px;
  font-family:'Microsoft YaHei','PingFang SC',Arial,sans-serif;
  box-shadow:0 1px 4px rgba(7,28,51,.25);
}
.hp-demo-bar b{color:#8ec5ff;font-weight:700}
.hp-demo-bar .hp-dot{width:6px;height:6px;border-radius:50%;background:#43d19a;box-shadow:0 0 6px #43d19a}
body.hp-has-demo{padding-top:26px}
body.hp-has-demo .app,body.hp-has-demo .main,body.hp-has-demo main{box-sizing:border-box}

/* Hermes 悬浮按钮 */
.hp-fab{
  position:fixed;right:22px;top:calc(26px + 78px);z-index:9990;
  display:flex;align-items:center;gap:8px;
  background:linear-gradient(135deg,#1a5fd0,#0a3a86);
  color:#fff;border:0;border-radius:999px;
  padding:11px 16px 11px 13px;cursor:pointer;
  font:600 12.5px 'Microsoft YaHei','PingFang SC',Arial,sans-serif;
  box-shadow:0 8px 22px rgba(16,74,158,.36);
  transition:transform .18s ease,box-shadow .18s ease;
}
.hp-fab:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(16,74,158,.45)}
.hp-fab .hp-fab-ico{font-size:15px;line-height:1;color:#9fd0ff}

/* 侧边栏 */
.hp-cp{
  position:fixed;top:26px;right:0;bottom:0;width:410px;z-index:9995;
  background:#f7fafd;border-left:1px solid var(--hp-line);
  box-shadow:-12px 0 34px rgba(10,40,80,.12);
  display:flex;flex-direction:column;
  transform:translateX(100%);transition:transform .26s cubic-bezier(.4,0,.2,1);
  font-family:'Microsoft YaHei','PingFang SC',Arial,sans-serif;color:#142842;
}
.hp-cp.hp-open{transform:translateX(0)}
.hp-cp-head{
  background:linear-gradient(145deg,#071c33,#162e4c);color:#fff;
  padding:15px 16px 13px;display:flex;align-items:flex-start;gap:10px;flex-shrink:0;
}
.hp-cp-head .hp-logo{
  width:34px;height:34px;border-radius:9px;flex-shrink:0;
  background:linear-gradient(120deg,#65b5ff,#2166e8);
  display:grid;place-items:center;font-size:17px;
}
.hp-cp-head h3{margin:0;font-size:14.5px;font-weight:700}
.hp-cp-head small{display:block;font-size:11px;color:#a9c6e6;margin-top:3px}
.hp-cp-close{margin-left:auto;background:none;border:0;color:#a9c6e6;font-size:19px;cursor:pointer;line-height:1;padding:2px 4px}
.hp-cp-close:hover{color:#fff}
.hp-ctx{
  display:flex;align-items:center;gap:7px;
  padding:9px 16px;background:#eaf2ff;border-bottom:1px solid #d7e6f8;
  font-size:11.5px;color:#2b5e9b;flex-shrink:0;
}
.hp-ctx b{color:#142842;font-weight:600}
.hp-cp-body{flex:1;overflow-y:auto;padding:14px 16px 8px}
.hp-sec-title{
  font-size:11px;font-weight:700;color:#5b7191;letter-spacing:.6px;
  text-transform:uppercase;margin:14px 0 8px;display:flex;align-items:center;gap:6px;
}
.hp-sec-title:first-child{margin-top:2px}
.hp-sec-title .hp-tag{
  margin-left:auto;font-size:10px;font-weight:600;letter-spacing:0;
  background:#e6effc;color:#2b6ad1;border-radius:4px;padding:2px 7px;text-transform:none;
}
.hp-user-msg{
  background:#e8f1ff;border-radius:10px 10px 2px 10px;
  padding:10px 12px;font-size:12.5px;line-height:1.65;margin-bottom:12px;
  color:#16375e;
}
.hp-ai-msg{
  background:#fff;border:1px solid #e6eef8;border-radius:10px 10px 10px 2px;
  padding:10px 12px;font-size:12.5px;line-height:1.65;margin-bottom:12px;
}
.hp-plan{list-style:none;margin:0;padding:0}
.hp-plan li{
  display:flex;align-items:flex-start;gap:9px;padding:7px 0;
  font-size:12px;line-height:1.5;border-bottom:1px dashed #edf2f8;
  transition:color .2s;
}
.hp-plan li:last-child{border-bottom:0}
.hp-plan .hp-num{
  width:18px;height:18px;border-radius:50%;flex-shrink:0;margin-top:1px;
  background:#eef3fa;color:#7d93ae;font-size:10.5px;font-weight:700;
  display:grid;place-items:center;transition:all .2s;
}
.hp-plan li.hp-run .hp-num{background:#2166e8;color:#fff;box-shadow:0 0 0 4px #e4edfd}
.hp-plan li.hp-done .hp-num{background:#12a77d;color:#fff}
.hp-plan li.hp-done{color:#7b8ca3}
.hp-plan li.hp-run{color:#142842;font-weight:600}
.hp-plan li .hp-note{display:block;font-size:11px;color:#8a9cb3;font-weight:400;margin-top:2px}
.hp-policy{display:grid;gap:6px}
.hp-policy .hp-row{
  display:flex;align-items:center;gap:8px;font-size:11.5px;
  background:#fff;border:1px solid #e9f0f8;border-radius:7px;padding:8px 10px;
}
.hp-policy .hp-pill{
  margin-left:auto;font-size:10.5px;font-weight:700;border-radius:4px;
  padding:3px 8px;white-space:nowrap;
}
.hp-pill.auto{background:#e2f8ef;color:#0d9c74}
.hp-pill.skip{background:#eef2f7;color:#6e829a}
.hp-pill.approve{background:#fff0de;color:#d3812f}
.hp-log{
  font-size:11.5px;color:#7b8ca3;background:#fff;border:1px dashed #dde7f2;
  border-radius:8px;padding:11px 12px;line-height:1.6;
}
.hp-log-item{
  background:#fff;border:1px solid #e9f0f8;border-radius:7px;
  padding:8px 10px;font-size:11.5px;line-height:1.55;margin-bottom:6px;
  display:flex;gap:8px;align-items:flex-start;
}
.hp-log-item .hp-st{flex-shrink:0;font-weight:700}
.hp-log-item.ok .hp-st{color:#0d9c74}
.hp-log-item.warn .hp-st{color:#d3812f}
.hp-log-item .hp-audit{color:#9aabc0;font-size:10.5px;display:block;margin-top:3px}
.hp-cp-foot{
  flex-shrink:0;padding:11px 16px 14px;border-top:1px solid #e6eef8;background:#fff;
}
.hp-input-wrap{display:flex;gap:8px;align-items:flex-end}
.hp-input{
  flex:1;resize:none;border:1px solid #dbe6f2;border-radius:9px;
  padding:9px 11px;font:12.5px/1.5 'Microsoft YaHei','PingFang SC',Arial,sans-serif;
  color:#142842;outline:none;min-height:40px;max-height:96px;background:#fbfdff;
}
.hp-input:focus{border-color:#8db8f0;background:#fff}
.hp-send{
  background:#2166e8;color:#fff;border:0;border-radius:9px;
  padding:0 15px;height:40px;cursor:pointer;font-size:13px;font-weight:600;flex-shrink:0;
}
.hp-send:hover{background:#1a55c4}
.hp-foot-tip{font-size:10.5px;color:#93a5bb;margin-top:8px;line-height:1.5}
.hp-samples{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.hp-samples button{
  background:#fff;border:1px solid #dbe6f2;color:#3d5b80;border-radius:999px;
  padding:6px 11px;font-size:11px;cursor:pointer;transition:all .16s;
}
.hp-samples button:hover{border-color:#8db8f0;background:#f2f8ff;color:#1a55c4}
/* 审批弹层 */
.hp-approve{
  position:absolute;inset:0;background:rgba(9,26,46,.42);z-index:20;
  display:none;align-items:center;justify-content:center;padding:20px;
}
.hp-approve.hp-show{display:flex}
.hp-approve-card{
  background:#fff;border-radius:12px;padding:18px;max-width:330px;width:100%;
  box-shadow:0 18px 44px rgba(8,30,60,.28);
}
.hp-approve-card h4{margin:0 0 8px;font-size:13.5px;color:#142842}
.hp-approve-card p{margin:0 0 14px;font-size:12px;line-height:1.65;color:#5c7290}
.hp-approve-card .hp-btns{display:flex;gap:8px;justify-content:flex-end}
.hp-approve-card button{border:0;border-radius:7px;padding:8px 15px;font-size:12px;cursor:pointer;font-weight:600}
.hp-btn-cancel{background:#eef2f7;color:#5c7290}
.hp-btn-ok{background:#2166e8;color:#fff}
@media(max-width:1400px){.hp-cp{width:390px}}
@media(max-width:1100px){.hp-cp{width:100%}}
