/* ============================================================
 * 统一设计层（以钱包功能为基准）
 * 仅供「活动管理」「运费管理」原型引用；钱包 8 页保留其原有内联样式。
 * 包含：基础排版、统一导航、原型说明面板与连线、移动端适配。
 * 颜色 / 圆角 / 间距均对齐钱包页面（主色 #165DFF）。
 * ============================================================ */

/* ==================== 基础排版 ==================== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F5F7FA; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* ==================== 统一左侧导航（shared/nav.js 输出） ==================== */
.sidebar-label {
  font-size: 11px;
  color: #86909C;
  letter-spacing: 0.05em;
}
.sidebar-menu-item {
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}
.sidebar-menu-item:hover {
  background-color: rgba(22, 93, 255, 0.06);
  color: #165DFF;
}
.sidebar-menu-item.active {
  background-color: rgba(22, 93, 255, 0.10);
  color: #165DFF;
  border-right: 3px solid #165DFF;
}

/* ==================== 原型元素高亮 ==================== */
.proto-element {
  position: relative;
  transition: all 0.2s ease;
  border-radius: 6px;
}
.proto-element:hover {
  box-shadow: 0 0 0 2px #165DFF, 0 4px 12px rgba(22, 93, 255, 0.15);
  background-color: rgba(22, 93, 255, 0.03);
}
.proto-element.active-highlight {
  box-shadow: 0 0 0 2px #165DFF, 0 4px 12px rgba(22, 93, 255, 0.2);
  background-color: rgba(22, 93, 255, 0.05);
}

/* ==================== 原型说明卡片 ==================== */
.proto-desc {
  transition: all 0.2s ease;
  border-radius: 6px;
  border: 1px solid #fde68a;
  background-color: #fffbeb;
}
.proto-desc:hover {
  background-color: #fef3c7;
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}
.proto-desc.active-highlight {
  background-color: #fde68a;
  border-color: #d97706;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

/* ==================== SVG 连线层 ==================== */
#connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}
.connection-line {
  fill: none;
  stroke: #165DFF;
  stroke-width: 2;
  opacity: 0.6;
  transition: all 0.2s ease;
}
.connection-line.active {
  stroke-width: 3;
  opacity: 1;
}
.connection-label {
  fill: #fff;
  font-size: 12px;
  font-weight: bold;
  text-anchor: middle;
  dominant-baseline: central;
}
.connection-label-bg { fill: #165DFF; }

/* ==================== 移动端切换按钮 ==================== */
.mobile-toggle-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #165DFF;
  color: #fff;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
  cursor: pointer;
  border: none;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  #app { flex-direction: column; }
  #left-panel { width: 100% !important; height: 60vh; }
  #divider { display: none; }
  #right-panel { width: 100% !important; height: 40vh; border-top: 1px solid #e5e7eb; }
  #connections { display: none; }
  .mobile-toggle-btn { display: flex !important; }
}
