* { margin: 0; padding: 0; box-sizing: border-box; }
/* 隐藏页面级滚动条，保留滚轮功能（不影响子容器专用滚动条） */
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
html { scrollbar-width: none; -ms-overflow-style: none; }

@keyframes spin { to { transform: rotate(360deg); } }
body {
  font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, sans-serif;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f3f0ff 100%);
  min-height: 100vh; color: #333;
  padding: 56px 20px 24px;
}

/* ===== 头部（固定定位） ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 5px 20px; color: white;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 10px rgba(102,126,234,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-left { display: flex; align-items: center; gap: 8px; }
/* 系统名称版本徽标（2026-11-16 软著名称统一：欧孕电商经营数据分析系统 V1.0） */
.header h1 .app-ver {
  display: inline-block;
  margin-left: 7px;
  padding: 0 6px;
  font-size: 10px;
  line-height: 16px;
  letter-spacing: .3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .2);
  vertical-align: 1px;
}
.header h1 {
  font-size: 13px;
  font-weight: 400; /* v20260917d 排版规范：标题 Regular 不加粗 */
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.header-right { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.header-right .btn { padding: 3px 10px; font-size: 11px; border-radius: 6px; }
.header-right > div[style*="padding"] { padding: 3px 10px !important; font-size: 11px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 3px; }
.status-dot.online { background: #4caf50; box-shadow: 0 0 8px rgba(76,175,80,0.8); }
.status-dot.offline { background: #f44336; }

/* 头部按钮样式 */
.header .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  height: 32px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s;
}
.header .btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-1px);
}

/* ===== 页面布局：左侧边栏 + 主内容区 ===== */
.page-wrapper {
  display: flex; gap: 24px;
  max-width: none; margin: 0;
  align-items: flex-start;
  padding: 0 20px;
}

/* ===== 左侧边栏菜单 ===== */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 16px;
  padding: 6px 0;
  box-shadow: 0 2px 12px rgba(102,126,234,0.08), 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid rgba(102,126,234,0.1);
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.sidebar-title {
  font-size: 13px; font-weight: 400; color: #1a1a2e; /* v20260917d 排版规范 */
  padding: 0 14px 5px;
  margin-bottom: 1px;
  border-bottom: 1px solid #f0f4ff;
  display: flex; align-items: center; gap: 8px;
}
.menu-group { margin-bottom: 0; }
.menu-group-title {
  font-size: 12px; font-weight: 400; color: #1a1a2e; /* v20260917d 排版规范 */
  padding: 2px 8px;
  margin: 1px 4px;
  letter-spacing: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #eef2ff, #e2ddff);
  border-radius: 6px;
  border: 1px solid rgba(102,126,234,0.22);
}
.menu-group-title::before {
  content: '';
  width: 3px; height: 8px;
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 2px;
  display: inline-block;
}
/* 分组之间的分隔 */
.menu-group + .menu-group {
  margin-top: 0;
  padding-top: 0;
}
.menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 14px 4px 16px;
  font-size: 12px; color: #555;
  cursor: pointer; transition: all 0.25s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
  margin: 1px 8px;
  border-radius: 0 8px 8px 0;
  font-weight: 400; /* v20260917d 排版规范 */
  position: relative;
}
.menu-item::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 44px;
  width: 0;
  height: 1.5px;
  background: #667eea;
  transition: width 0.25s ease;
}
.menu-item:hover::after {
  width: calc(100% - 56px);
}
.menu-item:hover {
  background: rgba(102,126,234,0.08);
  color: #667eea;
  padding-left: 22px;
}
.menu-item.active {
  background: rgba(102,126,234,0.12);
  color: #667eea;
  border-left-color: #667eea;
  font-weight: 400; /* v20260917d 排版规范：选中态靠高亮底色区分，不加粗 */
  box-shadow: 2px 0 8px rgba(102,126,234,0.15);
}
.menu-item .menu-icon,
.menu-group-title .menu-icon {
  font-size: 13px;
  width: 18px; text-align: center;
  flex-shrink: 0;
}

.menu-sub {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}
.menu-sub .menu-item {
  padding: 4px 14px 4px 16px;
  margin: 1px 6px;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
}
.menu-sub .menu-item::after {
  left: 44px;
  width: 0;
}
.menu-sub .menu-item:hover::after {
  width: calc(100% - 56px);
}
.menu-sub .menu-item:hover {
  padding-left: 22px;
}
.menu-group-title.collapsible {
  cursor: pointer;
  user-select: none;
  justify-content: flex-start;
  transition: all 0.2s ease;
}
.menu-group-title.collapsible:hover {
  background: linear-gradient(135deg, #e6ecff, #dedbff);
}
.menu-group-title.collapsible .collapse-arrow {
  font-size: 10px;
  color: #888;
  margin-left: auto;
  transition: transform 0.25s ease;
}

.main-container {
  flex: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  min-width: 0;
}
.main-container > .panel { min-width: 0; }
@media (max-width: 900px) {
  .page-wrapper { flex-direction: column; }
  .sidebar {
    width: 100%; position: static;
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 12px 16px;
  }
  .sidebar-title { width: 100%; border-bottom: none; padding: 0 0 8px; margin-bottom: 0; }
  .menu-group { margin-bottom: 0; }
  .menu-group-title { display: none; }
  .menu-item {
    padding: 6px 12px;
    border-left: none;
    border-radius: 8px;
    background: #f8faff;
    border: 1px solid #e0e8f8;
  }
  .menu-item.active {
    border-color: #667eea;
  }
}
@media (max-width: 1000px) {
  .main-container { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { padding: 0 12px 20px; }
  .header {
    position: static;
    margin: 0 -12px 10px;
    padding: 10px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .header-left { justify-content: center; min-width: 0; }
  .header h1 { font-size: 14px; text-align: center; overflow-wrap: anywhere; }
  .header-right { flex-wrap: wrap; justify-content: center; gap: 6px; }
  .header-right .btn { white-space: nowrap; }
  .steps { width: 100%; margin-bottom: 10px; padding: 6px 10px; }
  .step-label { display: none; }
  .step-line { flex: 1; min-width: 12px; }
  .page-wrapper { padding: 0; gap: 12px; }
  .sidebar {
    width: 100%;
    display: block;
    max-height: none;
    overflow: visible;
    padding: 10px 8px;
    border-radius: 8px;
  }
  .sidebar-title { padding: 0 8px 8px; }
  .sidebar .menu-group-title { display: flex; }
  .sidebar .menu-item { margin-left: 4px; margin-right: 4px; }
  .main-container { width: 100%; gap: 12px; }
  .panel { padding: 16px; border-radius: 8px; }
}

.panel {
  background: #ffffff;
  border-radius: 16px; padding: 24px;
  box-shadow: 0 2px 12px rgba(102,126,234,0.08), 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid rgba(102,126,234,0.1);
  transition: box-shadow 0.3s, transform 0.3s;
}
.panel:hover {
  box-shadow: 0 8px 32px rgba(102,126,234,0.12), 0 2px 8px rgba(0,0,0,0.06);
}
.panel-title {
  font-size: 16px; font-weight: 400; color: #1a1a2e; /* v20260917d 排版规范 */
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.panel-title::before {
  content: ''; width: 4px; height: 16px;
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 2px;
}

/* ===== 表格通用样式 ===== */
.data-table { border-collapse:collapse; font-size:13px; }
.data-table th { background:#f8f9ff; padding:10px 12px; text-align:left; border-bottom:2px solid #e0e8f8; font-weight:600; color:#333; white-space:nowrap; }
.data-table td { padding:8px 12px; border-bottom:1px solid #f0f0f0; }
.data-table tbody tr:hover { background:#f8f9ff; }

/* 隐藏 */
.hidden { display: none !important; }

/* ===== IA-R2.1 全局可达性追加（2026-09-17，纯增量，不改上方任何规则）===== */
/* 键盘导航焦点环：统一品牌色，仅键盘触发（focus-visible） */
.menu-item:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #667eea; outline-offset: 1px;
}
/* 系统开启"减少动效"时，关闭菜单过渡与滚动行为 */
@media (prefers-reduced-motion: reduce) {
  .menu-item, .menu-group-title, .btn { transition: none !important; animation: none !important; }
  * { scroll-behavior: auto !important; }
}
/* 侧栏细滚动条（webkit） */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #C9CFE2; border-radius: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

/* ---- v20260918e：墨蓝工坊 · 全局壳层对齐（纯样式；文末覆盖，不改动上文任何规则） ---- */
body { background: #F3F5FA; }
.header h1 { font-weight: 600; text-shadow: none; color: #23283E; }
.panel-title { font-weight: 600; color: #23283E; }

/* ---- v20260918f：顶栏横幅墨蓝化（与图标轨 #242B47 同系，替换紫渐变） ---- */
.header { background: #3D96E9; box-shadow: 0 2px 8px rgba(30,100,180,.14); }
.header h1 { color: #fff; letter-spacing: .5px; }
.header-right .btn { border-radius: 7px; }

/* ---- v20260918g：宽屏利用（消灭两侧空白；纯样式） ---- */
body { padding: 56px 12px 20px; }
.page-wrapper { gap: 12px; padding: 0 8px; }
.main-container { gap: 16px; }
