/* =============================================================
 * 51Tracking - 全局 Sidebar 样式（量化交易员风格：深色 + 蓝色 accent + 等宽）
 * 通过 <link rel="stylesheet" href="common/sidebar.css"> 引用
 * ============================================================= */

/* 隐藏老水平 header（已经被 sidebar 替代） */
/* P7 followup: 恢复 .app-header 让 tracking-center health dot 可见
 *  (之前是 P5 老代码一刀切, 实际 P6+ 页面复用 .app-header 元素)
 *  冲突用 .app-header-override 标记 (dashboard.html 等老页面想隐藏可手动加)
 */
.app-header { display: block !important; }
.app-header.app-header-override { display: none !important; }

/* 5 个页面统一主区左移 220px（sidebar 宽） */
body { padding-left: 220px !important; padding-top: 0 !important; }
/* 兼容老页面 padding-top: 64px / 106px / 112px */

/* === Sidebar === */
.sb {
  position: fixed; left: 0; top: 0; bottom: 0; width: 220px;
  background: #0f172a; color: #cbd5e1;
  display: flex; flex-direction: column; z-index: 1000;
  font-family: -apple-system, system-ui, "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 13px;
}
.sb-logo { padding: 18px 18px 16px; display: flex; align-items: center; gap: 10px;
           border-bottom: 1px solid #1e293b; }
.sb-logo-mark { width: 26px; height: 26px; border-radius: 6px; background: #2563eb;
                color: #fff; display: flex; align-items: center; justify-content: center;
                font-weight: 700; font-size: 12px; font-family: ui-monospace, "SF Mono", monospace;
                letter-spacing: -0.5px; flex-shrink: 0; }
.sb-logo-name { font-weight: 600; font-size: 14px; color: #f1f5f9;
                font-family: ui-monospace, "SF Mono", monospace; letter-spacing: -0.3px; }

.sb-search { padding: 12px 14px; border-bottom: 1px solid #1e293b; }
.sb-search-box { display: flex; align-items: center; gap: 6px; height: 30px;
                 padding: 0 10px; background: #1e293b; border-radius: 6px;
                 border: 1px solid transparent; transition: all 0.15s; }
.sb-search-box:focus-within { border-color: #2563eb; background: #0f172a; }
.sb-search-box svg { color: #64748b; }
.sb-search-box input { background: transparent; border: none; outline: none;
                        color: #e2e8f0; font-size: 12.5px; flex: 1; font-family: inherit; min-width: 0; }
.sb-search-box input::placeholder { color: #64748b; }
.sb-kbd { font-family: ui-monospace, monospace; font-size: 10px; color: #475569;
          border: 1px solid #334155; border-radius: 3px; padding: 1px 4px; line-height: 1; }

.sb-section { padding: 14px 18px 6px; font-size: 10.5px; color: #475569;
              font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

.sb-item {
  display: flex; align-items: center; gap: 11px; padding: 7px 18px;
  color: #94a3b8; cursor: pointer; transition: all 0.12s; text-decoration: none;
  position: relative; font-size: 13px;
}
.sb-item:hover { color: #e2e8f0; background: #1e293b; }
.sb-item.active { color: #60a5fa; background: rgba(37, 99, 235, 0.08); }
.sb-item.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px;
  background: #2563eb; border-radius: 0 2px 2px 0;
}
.sb-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.sb-item-badge { margin-left: auto; font-family: ui-monospace, monospace; font-size: 10.5px;
                 color: #64748b; padding: 1px 6px; background: #1e293b; border-radius: 3px; }
.sb-item.active .sb-item-badge { color: #60a5fa; background: rgba(37,99,235,0.15); }

.sb-divider { height: 1px; background: #1e293b; margin: 8px 0; }

.sb-foot { margin-top: auto; padding: 12px 14px; border-top: 1px solid #1e293b;
           display: flex; align-items: center; gap: 10px; }
.sb-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #7c3aed);
             color: #fff; display: flex; align-items: center; justify-content: center;
             font-weight: 600; font-size: 12px; flex-shrink: 0; }
.sb-user { font-size: 12.5px; color: #e2e8f0; font-weight: 500; line-height: 1.2; }
.sb-sub { font-size: 10.5px; color: #64748b; font-family: ui-monospace, monospace; margin-top: 1px; }

/* tracking 表格适配更宽主区 */
.wy-shipments-table, .wy-page, main { max-width: none; }
