.cockpit-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(12, 35, 71, 0.12);
  background: #fff;
  box-shadow: 0 10px 32px rgba(12, 35, 71, 0.08);
}

.cockpit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  background: linear-gradient(135deg, #0a1628 0%, #0c2347 55%, #1e3a5f 100%);
  color: #fff;
}

.cockpit-head__title h3 {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.cockpit-head__badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.cockpit-head__sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.82);
}

.cockpit-period {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  min-width: 88px;
}

.cockpit-period option {
  color: #0f172a;
}

.cockpit-body {
  padding: 14px 14px 6px;
}

.cockpit-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.cockpit-kpi-item {
  padding: 12px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  text-align: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.cockpit-kpi-num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #0c2347;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.cockpit-kpi-num.accent {
  color: #e60012;
}

.cockpit-kpi-lbl {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

.cockpit-panel {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.cockpit-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.cockpit-panel__title::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e60012, #0c2347);
}

.cockpit-chart {
  width: 100%;
  height: 200px;
  min-height: 120px;
}

.cockpit-chart--sm {
  height: 160px;
  min-height: 100px;
}

.cockpit-chart--cloud {
  height: 200px;
  min-height: 120px;
}

.cockpit-chart:has(.cockpit-empty) {
  height: auto;
  min-height: 0;
}

.cockpit-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cockpit-empty {
  margin: 0;
  padding: 16px 12px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

.word-cloud-fallback {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: baseline;
  justify-content: center;
  min-height: 180px;
  padding: 12px 8px;
  height: auto !important;
}

.word-cloud-fallback span {
  color: #1e3a5f;
  font-weight: 600;
  opacity: 0.9;
}

.cockpit-head--leader {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #1e3a5f 100%);
}

.cockpit-head--leader .cockpit-head__badge {
  color: #c4b5fd;
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.35);
}

.cockpit-panel__meta {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

.leader-kpi .cockpit-kpi-num.accent {
  color: #7c3aed;
}

.leader-stage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 14px;
}

.leader-stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.leader-stage-chip strong {
  font-size: 13px;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.leader-stage-chip--warn {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fed7aa;
}

.leader-stage-chip--warn strong {
  color: #c2410c;
}

.leader-rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leader-rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.leader-rank-item:active {
  border-color: #c7d2fe;
  box-shadow: 0 2px 8px rgba(49, 46, 129, 0.08);
}

@media (hover: hover) {
  .leader-rank-item:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(49, 46, 129, 0.1);
  }
}

.leader-rank-item__idx {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #4338ca;
  background: #eef2ff;
}

.leader-rank-item__idx--top {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

.leader-rank-item__main {
  flex: 1;
  min-width: 0;
}

.leader-rank-item__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-rank-item__meta {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-urgency {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.leader-urgency--high {
  color: #fff;
  background: linear-gradient(135deg, #e60012, #dc2626);
}

.leader-urgency--mid {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.leader-urgency--low {
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.leader-rank-empty {
  margin: 0;
  padding: 20px 12px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #e2e8f0;
}

.cockpit-chart--cloud-leader {
  height: 240px;
}

.leader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 12px 12px;
  padding: 10px 14px;
}

.leader-toolbar__label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.leader-period {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  min-width: 88px;
}

#view-leader .cockpit-card {
  margin: 0 12px 12px;
}

@media (max-width: 380px) {
  .cockpit-grid-2 {
    grid-template-columns: 1fr;
  }

  .cockpit-kpi-num {
    font-size: 20px;
  }

  .quick-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .quick-grid:has(.quick-tile--audit.hidden):has(.quick-tile--leader.hidden) .quick-tile--kb {
    grid-column: auto;
  }
}

/* ---------- 快捷入口（2×2 统一宫格） ---------- */
.quick-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid #e5e6eb;
  background: #fff;
}

.quick-card__head {
  padding: 16px 16px 12px;
  border-bottom: 1px solid #f2f3f5;
}

.quick-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1d2129;
  letter-spacing: -0.02em;
}

.quick-card__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #86909c;
  line-height: 1.4;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #f2f3f5;
  padding: 0;
}

.quick-tile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px 12px 14px 14px;
  border: none;
  border-radius: 0;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.quick-tile:active {
  background: #f7f8fa;
}

@media (hover: hover) {
  .quick-tile:hover {
    background: #f7f8fa;
  }
  .quick-tile:hover .quick-tile__arrow {
    color: #165dff;
    transform: translateX(2px);
  }
}

.quick-tile__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-tile__icon svg {
  width: 22px;
  height: 22px;
}

.quick-tile__icon--record {
  background: #ffece8;
  color: #f53f3f;
}

.quick-tile__icon--weekly {
  background: #e8f3ff;
  color: #165dff;
}

.quick-tile__icon--kb {
  background: #e8fffb;
  color: #0fc6c2;
}

.quick-tile__icon--lingqi {
  background: #eef2ff;
  color: #4f46e5;
}

.quick-tile__icon--audit {
  background: #fff7e8;
  color: #ff7d00;
}

.quick-tile__icon--leader {
  background: #ede9fe;
  color: #6d28d9;
}

.quick-tile__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quick-tile__title {
  font-size: 14px;
  font-weight: 600;
  color: #1d2129;
  line-height: 1.3;
}

.quick-tile__desc {
  font-size: 11px;
  color: #86909c;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quick-tile__arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #c9cdd4;
  transition: color 0.15s ease, transform 0.15s ease;
}

.quick-tile__arrow svg {
  width: 16px;
  height: 16px;
  display: block;
}

.quick-tile--audit.hidden {
  display: none;
}

.quick-tile--leader.hidden {
  display: none;
}

/* 无审核、无领导时：知识库通栏 */
.quick-grid:has(.quick-tile--audit.hidden):has(.quick-tile--leader.hidden) .quick-tile--kb {
  grid-column: 1 / -1;
}

/* 审核+领导共 5 项：领导入口通栏第三行 */
.quick-grid:has(.quick-tile--leader:not(.hidden)):has(.quick-tile--audit:not(.hidden)) .quick-tile--leader {
  grid-column: 1 / -1;
}

/* 仅有领导（无审核）时：恢复 2×2，知识库不再通栏 */
.quick-grid:has(.quick-tile--leader:not(.hidden)):has(.quick-tile--audit.hidden) .quick-tile--kb {
  grid-column: auto;
}

