/* 主页仪表盘增强样式 - 紧凑版 */

/* 数据概览卡片 - 单行紧凑布局 */
.dashboard-overview {
  display: none;
}

.compact-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.compact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
}

.compact-card--opportunity::before {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.compact-card--tracking::before {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.compact-card--catalyst::before {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.compact-card--alert::before {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.compact-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.compact-card__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.compact-card__content {
  flex: 1;
  min-width: 0;
}

.compact-card__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.125rem;
}

.compact-card__subtitle {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-card__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.compact-card__trend {
  font-size: 0.7rem;
  font-weight: 500;
  color: #059669;
}

.compact-card__trend--alert {
  color: #dc2626;
}

.compact-card__status {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.125rem 0.5rem;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 0.65rem;
  color: #6b7280;
}

.compact-card__status--fresh {
  background: #d1fae5;
  color: #065f46;
}

/* 快捷入口 - 隐藏标题 */
.quick-access {
  margin: 0;
  display: none;
}

.quick-access__header {
  display: none;
}

.quick-access__grid {
  display: none;
}

/* 全局搜索 */
.global-search {
  position: relative;
  max-width: 600px;
  margin: 2rem auto;
}

.global-search__input {
  width: 100%;
  padding: 1rem 3rem 1rem 1.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 50px;
  font-size: 1rem;
  transition: all 0.2s;
}

.global-search__input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.global-search__icon {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 1.25rem;
}

.global-search__results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

.search-result-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: all 0.2s;
}

.search-result-item:hover {
  background: #f9fafb;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.search-result-item__title {
  font-weight: 600;
  color: #111827;
}

.search-result-item__type {
  padding: 0.125rem 0.5rem;
  background: #e5e7eb;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #6b7280;
}

.search-result-item__desc {
  font-size: 0.85rem;
  color: #6b7280;
}

/* 系统状态栏 */
.system-status {
  display: none;
}

.system-status__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.system-status__indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-dot 2s ease-in-out infinite;
}

.system-status__indicator--warning {
  background: #f59e0b;
}

.system-status__indicator--error {
  background: #ef4444;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.system-status__label {
  font-size: 0.85rem;
  color: #6b7280;
}

.system-status__value {
  font-weight: 600;
  color: #111827;
}

/* 响应式 */
@media (max-width: 768px) {
  .dashboard-overview {
    grid-template-columns: 1fr;
  }

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

  .overview-card__value {
    font-size: 2rem;
  }
}

/* 加载骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton--card {
  height: 150px;
  border-radius: 12px;
}

.skeleton--text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton--title {
  height: 1.5rem;
  width: 60%;
  margin-bottom: 1rem;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
