/*
 * creative-intent.css — 创编管理台 V4
 * 设计令牌统一：引用 aios_tokens.css，不再使用独立 --intent-* 令牌
 * 覆盖：侧栏 · 折叠 · Bento Grid 驾驶舱 · 斑马条纹 · 骨架屏 · 空态 · Toast · 命令面板
 * 三波17项迭代全部覆盖（C1-C17）
 */

/* ── 壳层 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--aios-text-primary); background: var(--aios-surface-muted); }
.cip-shell { display: flex; height: 100vh; overflow: hidden; }

/* ══════════ 侧栏 ══════════ */
:root {
  --cip-sidebar-width: 220px;
  --cip-sidebar-collapsed: 56px;
  --cip-sidebar-transition: 250ms cubic-bezier(0.4,0,0.2,1);
}
.cip-sidebar {
  width: var(--cip-sidebar-width); min-width: var(--cip-sidebar-width);
  height: 100vh; background: var(--aios-surface);
  border-right: 1px solid var(--aios-border-light);
  display: flex; flex-direction: column; flex-shrink: 0;
  overflow: hidden;
  transition: width var(--cip-sidebar-transition), min-width var(--cip-sidebar-transition);
}
.cip-sidebar.collapsed {
  width: var(--cip-sidebar-collapsed); min-width: var(--cip-sidebar-collapsed);
}
.cip-sidebar.collapsed .cip-sidebar-brand span,
.cip-sidebar.collapsed .cip-nav-label,
.cip-sidebar.collapsed .cip-nav-item span,
.cip-sidebar.collapsed .cip-badge,
.cip-sidebar.collapsed .cip-engine-auto { display: none; }
.cip-sidebar.collapsed .cip-nav-item { justify-content: center; padding: 10px; }
.cip-sidebar.collapsed .cip-sidebar-brand { justify-content: center; padding: 14px 8px; }
.cip-sidebar.collapsed .cip-sidebar-footer { align-items: center; }
.cip-sidebar.collapsed .cip-engine-status > span:last-child { display: none; }

.cip-sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 16px; font-size: 15px; font-weight: 700;
  color: var(--aios-text-primary); border-bottom: 1px solid var(--aios-divider);
  white-space: nowrap;
}
.cip-nav-group { padding: 12px 0; }
.cip-nav-group + .cip-nav-group { border-top: 1px solid var(--aios-divider); }
.cip-nav-label {
  padding: 4px 18px 8px; font-size: 10px; font-weight: 700;
  color: var(--aios-text-muted); text-transform: uppercase; letter-spacing: 0.8px;
  white-space: nowrap;
}
.cip-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; font-size: 13px; color: var(--aios-text-secondary);
  text-decoration: none; cursor: pointer; transition: all var(--aios-transition-fast);
  border-left: 3px solid transparent; position: relative; white-space: nowrap;
}
.cip-nav-item:hover { background: var(--aios-surface-muted); color: var(--aios-text-primary); }
.cip-nav-item.active {
  background: var(--aios-brand-bg); color: var(--aios-brand);
  border-left-color: var(--aios-brand); font-weight: 600;
}
.cip-badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: var(--aios-radius-full);
  min-width: 20px; text-align: center;
}
.cip-badge.danger { background: var(--aios-error-soft); color: var(--aios-error); }

/* 侧栏折叠按钮 */
.cip-sidebar-toggle {
  position: absolute; bottom: 12px; right: 8px;
  width: 24px; height: 24px; border: none; background: transparent;
  cursor: pointer; color: var(--aios-text-muted);
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: all var(--aios-transition-fast);
  padding: 0;
}
.cip-sidebar-toggle:hover { background: var(--aios-surface-muted); color: var(--aios-text-primary); }
.cip-sidebar-footer {
  margin-top: auto; padding: 16px 18px; border-top: 1px solid var(--aios-divider);
  display: flex; flex-direction: column; gap: 6px; position: relative;
}
.cip-engine-status {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--aios-text-secondary);
  white-space: nowrap;
}
.cip-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cip-status-dot.running { background: var(--aios-success); }
.cip-engine-auto { font-size: 10px; color: var(--aios-text-muted); padding-left: 15px; white-space: nowrap; }

/* ══════════ 主内容 ══════════ */
.cip-main {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 28px 32px 48px; min-width: 0;
  background: var(--aios-surface-muted);
}

/* ── 顶部工具栏 ── */
.cip-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.cip-toolbar-left { display: flex; align-items: baseline; gap: 14px; }
.cip-page-title { font-size: 22px; font-weight: 700; color: var(--aios-text-primary); }
.cip-page-sub { font-size: 13px; color: var(--aios-text-muted); }
.cip-toolbar-right { display: flex; align-items: center; gap: 10px; }
.cip-last-update {
  font-size: 11px; color: var(--aios-text-muted);
  display: flex; align-items: center; gap: 5px;
}

/* ── 按钮系统 ── */
.cip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--aios-radius-full);
  font-size: 13px; font-weight: 600; cursor: pointer; border: none;
  transition: all var(--aios-transition-fast); white-space: nowrap;
  font-family: inherit;
}
.cip-btn-primary {
  background: var(--aios-brand); color: #fff;
  box-shadow: 0 2px 8px var(--aios-brand-glow);
}
.cip-btn-primary:hover { background: #5b2de0; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(113,62,255,0.3); }
.cip-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.cip-btn-primary-sm {
  background: var(--aios-brand); color: #fff;
  border: none; border-radius: var(--aios-radius-full);
  padding: 7px 14px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all var(--aios-transition-fast); font-family: inherit;
}
.cip-btn-primary-sm:hover { background: #5b2de0; }
.cip-btn-ghost {
  background: transparent; border: 1px solid var(--aios-border);
  color: var(--aios-text-secondary);
}
.cip-btn-ghost:hover { background: var(--aios-surface-muted); border-color: var(--aios-brand-soft); }
.cip-btn-ghost-sm {
  background: var(--aios-surface); border: 1px solid var(--aios-border);
  color: var(--aios-text-secondary); border-radius: var(--aios-radius-full);
  padding: 7px 14px; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all var(--aios-transition-fast); font-family: inherit;
}
.cip-btn-ghost-sm:hover { background: var(--aios-surface-muted); }
.cip-btn-danger-sm {
  background: var(--aios-error-soft); color: var(--aios-error);
  border: 1px solid #ffa39e; border-radius: var(--aios-radius-full);
  padding: 7px 14px; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all var(--aios-transition-fast); font-family: inherit;
}
.cip-btn-danger-sm:hover { background: #ffa39e; color: #fff; }

/* ══════════ Bento Grid 驾驶舱 (12列) ══════════ */
.cip-cockpit {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px; margin-bottom: 20px;
}
.cip-kpi-card {
  background: var(--aios-surface); border: 1px solid var(--aios-border-light);
  border-radius: var(--aios-radius-md); padding: 18px 22px;
  box-shadow: var(--aios-shadow-sm);
  display: flex; flex-direction: column; gap: 6px;
  transition: all var(--aios-transition-smooth);
  position: relative; overflow: hidden; cursor: pointer;
}
.cip-kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  border-radius: 3px 0 0 3px;
}
.cip-kpi-card:hover { transform: translateY(-2px); box-shadow: var(--aios-shadow-md); }
.cip-kpi-card.hero { grid-column: span 6; grid-row: span 2; }
.cip-kpi-card.metric { grid-column: span 3; }
.cip-kpi-card.full { grid-column: span 12; }
.cip-kpi-card.hero::before { background: var(--aios-brand); }
.cip-kpi-card.metric::before { background: var(--aios-brand); }
.cip-kpi-card.metric.warn::before { background: var(--aios-warning); }
.cip-kpi-card.metric.success::before { background: var(--aios-success); }

.cip-kpi-label { font-size: 12px; color: var(--aios-text-muted); font-weight: 600; }
.cip-kpi-value { font-size: 36px; font-weight: 800; color: var(--aios-text-primary); line-height: 1.1; letter-spacing: -0.5px; }
.cip-hero-value { font-size: 48px; font-weight: 800; color: var(--aios-brand); line-height: 1.05; letter-spacing: -1px; }
.cip-hero-ring-wrap {
  position: relative; width: 100px; height: 100px; margin: 4px auto 0;
  flex-shrink: 0;
}
.cip-hero-ring-wrap svg { display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06)); }
.cip-hero-ring-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: var(--aios-text-primary);
}
.cip-hero-content { display: flex; align-items: center; gap: 20px; }

.cip-kpi-sub { font-size: 14px; font-weight: 400; color: var(--aios-text-muted); }
.cip-kpi-change { font-size: 11px; color: var(--aios-text-muted); }
.cip-kpi-change.up { color: var(--aios-success); }
.cip-kpi-change.overdue { color: var(--aios-error); font-weight: 600; }
.cip-kpi-change.neutral { color: var(--aios-text-secondary); }

/* 英雄卡内环图 */
.cip-hero-val { font-size: 42px; font-weight: 800; color: var(--aios-text-primary); line-height: 1; }
.cip-hero-detail { font-size: 11px; color: var(--aios-text-muted); line-height: 1.45; margin-top: auto; }

/* ══════════ 漏斗行（全宽12列）══════════ */
.cip-funnel-bar {
  display: flex; align-items: center; gap: 2px; flex-wrap: nowrap;
  padding: 6px 0; overflow-x: auto;
}
.cip-funnel-seg {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 48px; flex: 1; padding: 6px 4px; border-radius: var(--aios-radius-sm);
  background: var(--aios-surface-muted); border: 1px solid var(--aios-border-light);
  transition: all var(--aios-transition-fast);
}
.cip-funnel-seg:hover { background: #e8e0f0; }
.cip-fs-num { font-size: 18px; font-weight: 800; color: var(--aios-brand); line-height: 1; }
.cip-fs-label { font-size: 9px; color: var(--aios-text-muted); margin-top: 3px; white-space: nowrap; font-weight: 600; }
.cip-funnel-arrow {
  font-size: 14px; color: var(--aios-brand-soft); flex-shrink: 0;
  padding: 0 2px; font-weight: 300;
}

/* ══════════ 节奏条 ══════════ */
.cip-rhythm {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: var(--aios-surface); border: 1px solid var(--aios-border-light);
  border-radius: var(--aios-radius-md); padding: 16px 22px; margin-bottom: 24px;
  box-shadow: var(--aios-shadow-sm);
}
.cip-rhythm-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 12px; color: var(--aios-text-secondary);
}
.cip-rhythm-pct { font-weight: 700; font-size: 14px; }
.cip-rhythm-pct.good { color: var(--aios-success); }
.cip-rhythm-pct.warn { color: var(--aios-warning); }
.cip-rhythm-pct.poor { color: var(--aios-error); }
.cip-rhythm-track { height: 8px; background: var(--aios-border-light); border-radius: var(--aios-radius-full); overflow: hidden; }
.cip-rhythm-fill { height: 100%; border-radius: var(--aios-radius-full); transition: width 0.6s ease; }
.cip-rhythm-fill.good { background: linear-gradient(90deg, var(--aios-success), #73d13d); }
.cip-rhythm-fill.warn { background: linear-gradient(90deg, var(--aios-warning), #ffc53d); }
.cip-rhythm-fill.poor { background: linear-gradient(90deg, var(--aios-error), #ff7875); }

/* ══════════ 数据表区域 ══════════ */
.cip-table-section {
  background: var(--aios-surface); border: 1px solid var(--aios-border-light);
  border-radius: var(--aios-radius-md); box-shadow: var(--aios-shadow-sm);
  overflow: hidden;
}
.cip-table-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--aios-border-light);
  flex-wrap: wrap; gap: 12px;
}
.cip-table-toolbar-left { display: flex; align-items: center; gap: 8px; }
.cip-table-toolbar-right { display: flex; align-items: center; gap: 10px; }

/* 分类 Tab */
.cip-tabs { display: flex; gap: 2px; }
.cip-tab {
  padding: 7px 16px; font-size: 12px; font-weight: 600; border: none;
  background: transparent; color: var(--aios-text-muted); cursor: pointer;
  border-radius: var(--aios-radius-full); transition: all var(--aios-transition-fast);
  font-family: inherit;
}
.cip-tab:hover { background: var(--aios-surface-muted); color: var(--aios-text-secondary); }
.cip-tab.active { background: var(--aios-brand-bg); color: var(--aios-brand); }

/* 搜索栏 */
.cip-search {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--aios-border);
  border-radius: var(--aios-radius-full); background: var(--aios-surface-muted);
  font-size: 12px; color: var(--aios-text-muted); position: relative;
}
.cip-search-input {
  border: none; background: transparent; outline: 0;
  font-size: 12px; color: var(--aios-text-primary); width: 140px;
  font-family: inherit;
}
.cip-search-input::placeholder { color: var(--aios-text-placeholder); }
.cip-search-clear {
  width: 18px; height: 18px; border: none; background: transparent; cursor: pointer;
  color: var(--aios-text-muted); display: none; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 14px; padding: 0; line-height: 1;
  transition: all var(--aios-transition-fast);
}
.cip-search-clear:hover { background: var(--aios-error-soft); color: var(--aios-error); }
.cip-search-clear.visible { display: flex; }
.cip-filter-count {
  font-size: 11px; font-weight: 600; color: var(--aios-brand);
  background: var(--aios-brand-bg); padding: 2px 8px;
  border-radius: var(--aios-radius-full); display: none;
}
.cip-filter-count.visible { display: inline-flex; }

/* 选择器 */
.cip-select {
  padding: 6px 12px; border: 1px solid var(--aios-border);
  border-radius: var(--aios-radius-full); background: var(--aios-surface);
  font-size: 12px; color: var(--aios-text-secondary); cursor: pointer;
  outline: none; font-family: inherit;
}
.cip-select:focus { border-color: var(--aios-brand-soft); }

/* 视图切换 */
.cip-view-toggle { display: flex; gap: 4px; }
.cip-view-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--aios-border); border-radius: var(--aios-radius-sm);
  background: var(--aios-surface); color: var(--aios-text-muted); cursor: pointer;
  transition: all var(--aios-transition-fast);
}
.cip-view-btn:hover { background: var(--aios-surface-muted); color: var(--aios-text-secondary); }
.cip-view-btn.active { background: var(--aios-brand-bg); border-color: var(--aios-brand-soft); color: var(--aios-brand); }

/* ── 表格 ── */
.cip-table-wrap { overflow-x: auto; max-height: 55vh; }
.cip-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cip-table thead { position: sticky; top: 0; z-index: 10; }
.cip-table th {
  text-align: left; padding: 11px 14px;
  font-size: 11px; font-weight: 700; color: var(--aios-text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
  background: var(--aios-surface); border-bottom: 2px solid var(--aios-border-light);
  white-space: nowrap; cursor: default; user-select: none;
}
.cip-table th.sortable { cursor: pointer; }
.cip-table th.sortable:hover { color: var(--aios-brand); }
.cip-table th .sort-arrow {
  display: inline-block; margin-left: 4px; font-size: 9px; opacity: 0.3;
  transition: opacity var(--aios-transition-fast);
}
.cip-table th .sort-arrow.active { opacity: 1; color: var(--aios-brand); }
.cip-table th.numeric, .cip-table td.numeric { text-align: right; }

.cip-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--aios-divider);
  vertical-align: middle; white-space: nowrap;
}
.cip-table tbody tr { transition: background var(--aios-transition-fast); }
.cip-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.02); }
.cip-table tbody tr:hover { background: var(--aios-brand-bg); }
.cip-table tbody tr:last-child td { border-bottom: none; }

/* 行状态 */
.cip-tr-high { background: linear-gradient(90deg, var(--aios-success-soft) 0%, transparent 15%) !important; }
.cip-tr-high:nth-child(even) { background: linear-gradient(90deg, #e6ffd6 0%, rgba(0,0,0,0.02) 15%) !important; }
.cip-tr-low { opacity: 0.55; }

/* 表内组件 */
.cip-kw { font-weight: 600; color: var(--aios-text-primary); }
.cip-gap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--aios-radius-sm);
  font-size: 14px; font-weight: 800;
}
.cip-gap.high { background: var(--aios-success-soft); color: #237804; }
.cip-gap.mid  { background: var(--aios-warning-soft); color: #ad6800; }
.cip-gap.low  { background: var(--aios-surface-muted); color: var(--aios-text-muted); }
.cip-metric { font-weight: 600; font-size: 13px; text-align: right; }
.cip-metric.good { color: var(--aios-success); }
.cip-metric.accent { color: var(--aios-brand); }
.cip-metric.strong { color: var(--aios-text-primary); }
.cip-metric.muted { color: var(--aios-text-muted); }
.cip-metric.mid { color: var(--aios-warning); }
.cip-metric.high-sup { color: var(--aios-error); }
.cip-tag {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--aios-radius-full);
  white-space: nowrap;
}
.cip-tag.spike { background: var(--aios-error-soft); color: #a8071a; }
.cip-tag.emerging { background: var(--aios-info-soft); color: #003eb3; }
.cip-tag.sustained { background: var(--aios-success-soft); color: #237804; }

/* 表格按钮 */
.cip-table-btn {
  padding: 5px 12px; font-size: 11px; font-weight: 600; border: none;
  border-radius: var(--aios-radius-full); cursor: pointer;
  transition: all var(--aios-transition-fast); font-family: inherit;
}
.cip-table-btn.primary { background: var(--aios-brand-bg); color: var(--aios-brand); }
.cip-table-btn.primary:hover { background: var(--aios-brand); color: #fff; }
.cip-table-btn.ghost { background: transparent; color: var(--aios-text-muted); }
.cip-table-btn.ghost:hover { color: var(--aios-brand); }

/* kebab 菜单 */
.cip-kebab-wrap { position: relative; display: inline-flex; }
.cip-kebab-btn {
  width: 28px; height: 28px; border: none; background: transparent;
  cursor: pointer; color: var(--aios-text-muted); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; font-family: inherit;
  transition: all var(--aios-transition-fast);
}
.cip-kebab-btn:hover { background: var(--aios-surface-muted); color: var(--aios-text-primary); }
.cip-kebab-menu {
  position: absolute; right: 0; top: 32px;
  background: var(--aios-surface); border: 1px solid var(--aios-border);
  border-radius: var(--aios-radius-sm); box-shadow: var(--aios-shadow-lg);
  padding: 4px; min-width: 120px; z-index: 50; display: none;
}
.cip-kebab-menu.open { display: block; }
.cip-kebab-item {
  display: block; width: 100%; padding: 7px 12px; font-size: 12px;
  color: var(--aios-text-secondary); background: transparent; border: none;
  cursor: pointer; text-align: left; font-family: inherit;
  border-radius: 4px; transition: all var(--aios-transition-fast);
}
.cip-kebab-item:hover { background: var(--aios-surface-muted); color: var(--aios-text-primary); }

/* ══════════ 空态 ══════════ */
.cip-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 32px; text-align: center; gap: 16px;
}
.cip-empty-illust { opacity: 0.4; margin-bottom: 8px; }
.cip-empty-title { font-size: 15px; font-weight: 700; color: var(--aios-text-secondary); }
.cip-empty-desc { font-size: 13px; color: var(--aios-text-muted); max-width: 360px; line-height: 1.6; }

/* ══════════ 骨架屏 ══════════ */
.cip-skeleton { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; }
.cip-skeleton-line {
  height: 13px; background: var(--aios-border-light); border-radius: 99px;
  animation: cip-shimmer 1.4s ease-in-out infinite;
}
.cip-skeleton-line.short { width: 40%; }
.cip-skeleton-line.mid { width: 70%; }
.cip-skeleton-line.long { width: 90%; }
@keyframes cip-shimmer { 0%,100%{opacity:0.45} 50%{opacity:1} }

/* ══════════ 批量操作栏 ══════════ */
.cip-batch-bar {
  position: sticky; bottom: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: linear-gradient(135deg, #2d2440 0%, #1a1525 100%);
  color: #fff; font-size: 12px;
  transform: translateY(100%); opacity: 0;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease;
  z-index: 20;
}
.cip-batch-bar.open { transform: translateY(0); opacity: 1; }
.cip-batch-bar .cip-btn-primary-sm { background: var(--aios-brand); color: #fff; border: none; }
.cip-batch-bar .cip-btn-ghost-sm { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }
.cip-batch-bar .cip-btn-ghost-sm:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ══════════ Toast 通知 ══════════ */
.cip-toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  display: flex; flex-direction: column-reverse; gap: 8px;
}
.cip-toast {
  padding: 12px 20px; border-radius: var(--aios-radius-md);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--aios-shadow-lg);
  animation: cip-toast-in 0.3s cubic-bezier(0.4,0,0.2,1);
  max-width: 360px; display: flex; align-items: center; gap: 8px;
}
.cip-toast.removing { animation: cip-toast-out 0.25s ease forwards; }
.cip-toast.success { background: var(--aios-success-soft); border: 1px solid #b7eb8f; color: #237804; }
.cip-toast.error { background: var(--aios-error-soft); border: 1px solid #ffa39e; color: #a8071a; }
.cip-toast.warning { background: var(--aios-warning-soft); border: 1px solid #ffe58f; color: #ad6800; }
@keyframes cip-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cip-toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(12px); } }

/* ══════════ Cmd+K 命令面板 ══════════ */
.cip-cmd-overlay {
  position: fixed; inset: 0; background: rgba(15,10,30,0.5);
  z-index: 400; display: none; opacity: 0;
  transition: opacity 0.15s ease; backdrop-filter: blur(4px);
}
.cip-cmd-overlay.open { display: block; opacity: 1; }
.cip-cmd-panel {
  position: fixed; top: 20%; left: 50%; transform: translate(-50%, -50%);
  width: 480px; max-width: 92vw;
  background: var(--aios-surface); border: 1px solid var(--aios-border);
  border-radius: var(--aios-radius-lg); box-shadow: var(--aios-shadow-xl);
  z-index: 401; overflow: hidden; display: none;
}
.cip-cmd-panel.open { display: block; }
.cip-cmd-input {
  width: 100%; padding: 16px 20px; border: none; border-bottom: 1px solid var(--aios-border-light);
  font-size: 15px; color: var(--aios-text-primary); outline: none; font-family: inherit;
}
.cip-cmd-input::placeholder { color: var(--aios-text-placeholder); }
.cip-cmd-list { max-height: 320px; overflow-y: auto; }
.cip-cmd-section { padding: 8px 0; }
.cip-cmd-section + .cip-cmd-section { border-top: 1px solid var(--aios-divider); }
.cip-cmd-section-label {
  padding: 6px 20px; font-size: 10px; font-weight: 700;
  color: var(--aios-text-muted); text-transform: uppercase; letter-spacing: 0.6px;
}
.cip-cmd-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 20px; font-size: 13px; color: var(--aios-text-primary); cursor: pointer;
  transition: background var(--aios-transition-fast);
}
.cip-cmd-item:hover, .cip-cmd-item.active { background: var(--aios-brand-bg); }
.cip-cmd-item-left { display: flex; align-items: center; gap: 10px; }
.cip-cmd-item-kbd { font-size: 10px; color: var(--aios-text-muted); background: var(--aios-surface-muted); padding: 2px 6px; border-radius: 3px; }

/* ══════════ 右侧详情面板 ══════════ */
.cip-overlay {
  position: fixed; inset: 0; background: rgba(15,10,30,0.3);
  z-index: 200; display: none; opacity: 0;
  transition: opacity 0.25s; backdrop-filter: blur(2px);
}
.cip-overlay.open { display: block; opacity: 1; }
.cip-detail-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 94vw;
  background: var(--aios-surface); border-left: 1px solid var(--aios-border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.1);
  z-index: 201;
  transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.cip-detail-panel.open { transform: translateX(0); }
.cip-detail-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px 16px; flex-shrink: 0;
  border-bottom: 1px solid var(--aios-border-light); background: var(--aios-surface-muted);
}
.cip-detail-header h3 { font-size: 16px; font-weight: 700; color: var(--aios-text-primary); line-height: 1.4; }
.cip-detail-close {
  width: 32px; height: 32px; border: none; background: var(--aios-surface);
  border-radius: 50%; cursor: pointer; color: var(--aios-text-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-left: 12px;
  transition: all var(--aios-transition-fast);
}
.cip-detail-close:hover { background: var(--aios-error-soft); color: var(--aios-error); }
.cip-detail-body { padding: 20px 22px; overflow-y: auto; flex: 1; }

.cip-detail-metrics { display: flex; gap: 10px; margin-bottom: 18px; }
.cip-dm {
  flex: 1; background: var(--aios-surface-muted);
  border-radius: var(--aios-radius-sm); padding: 14px;
  text-align: center; border: 1px solid var(--aios-border-light);
}
.cip-dm-value { font-size: 24px; font-weight: 800; color: var(--aios-text-primary); }
.cip-dm-value.green { color: var(--aios-success); }
.cip-dm-value.accent { color: var(--aios-brand); }
.cip-dm-label { font-size: 10px; color: var(--aios-text-muted); margin-top: 4px; }

.cip-detail-section { margin-bottom: 18px; }
.cip-detail-section-title {
  font-size: 10px; font-weight: 700; color: var(--aios-text-muted);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 10px;
}
.cip-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--aios-divider);
  color: var(--aios-text-secondary);
}
.cip-detail-row:last-child { border-bottom: none; }
.cip-detail-row span:first-child { color: var(--aios-text-muted); }
.cip-detail-row span:last-child { font-weight: 600; color: var(--aios-text-primary); }
.cip-detail-hint {
  font-size: 12px; color: #237804; background: var(--aios-success-soft);
  border-left: 3px solid var(--aios-success);
  padding: 10px 12px; border-radius: 0 6px 6px 0; line-height: 1.6;
}
.cip-comp-item {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--aios-surface-muted); border: 1px solid var(--aios-border-light);
  border-radius: var(--aios-radius-sm); padding: 9px 12px; margin-bottom: 6px;
  text-decoration: none; transition: all var(--aios-transition-fast);
}
.cip-comp-item:hover { border-color: var(--aios-brand-soft); }
.cip-comp-title { font-size: 12px; color: var(--aios-brand); font-weight: 500; }
.cip-comp-meta { font-size: 10px; color: var(--aios-text-muted); }
.cip-detail-actions { margin-top: 20px; }

/* ══════════ 轮询指示器 ══════════ */
.cip-polling-indicator {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--aios-text-muted);
}
.cip-polling-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--aios-success); animation: cip-pulse 2s ease-in-out infinite; }
@keyframes cip-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ══════════ 响应式 ══════════ */
@media (max-width: 1280px) {
  .cip-cockpit { grid-template-columns: repeat(6, 1fr); }
  .cip-kpi-card.hero { grid-column: span 6; }
  .cip-kpi-card.metric { grid-column: span 3; }
  .cip-kpi-card.full { grid-column: span 6; }
}
@media (max-width: 1024px) {
  .cip-sidebar { width: 180px; min-width: 180px; }
  .cip-cockpit { grid-template-columns: repeat(6, 1fr); }
  .cip-kpi-card.hero { grid-column: span 6; }
  .cip-kpi-card.metric { grid-column: span 3; }
  .cip-rhythm { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .cip-sidebar { display: none; }
  .cip-main { padding: 20px 16px 40px; }
  .cip-cockpit { grid-template-columns: 1fr; gap: 12px; }
  .cip-kpi-card.hero, .cip-kpi-card.metric, .cip-kpi-card.full { grid-column: span 1; grid-row: auto; }
  .cip-hero-content { flex-direction: column; align-items: flex-start; }
  .cip-toolbar { flex-direction: column; align-items: flex-start; }
  .cip-toolbar-right { flex-wrap: wrap; }
  .cip-table-toolbar { flex-direction: column; align-items: flex-start; }
  .cip-table-toolbar-right { flex-wrap: wrap; width: 100%; }
  .cip-search-input { width: 100px; }
  .cip-detail-panel { width: 100vw; }
  .cip-cmd-panel { width: 96vw; }
}
