/* 首页特有样式(基于 common.css) */
body {
  background: #fff;
  background-image:
    radial-gradient(900px 480px at 88% -8%, rgba(111, 168, 255, .10), transparent 60%),
    radial-gradient(700px 420px at -6% 104%, rgba(30, 58, 95, .06), transparent 60%);
  color: var(--c-text);
  min-height: 100vh;
}

/* ========= 顶部导航 ========= */
.site-header {
  height: 62px;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1240px; margin: 0 auto;
  height: 100%; padding: 0 28px;
  display: flex; align-items: center; gap: 36px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 18px; font-weight: 600; color: var(--c-primary);
}
.brand img { width: 30px; height: 30px; }
.brand:hover { text-decoration: none; }

.header-links { display: flex; gap: 26px; flex: 1; }
.header-links a {
  font-size: 14px; color: var(--c-text-soft);
  position: relative; padding: 6px 0;
}
.header-links a.active { color: var(--c-primary); font-weight: 600; }
.header-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 3px; background: var(--c-primary); border-radius: 2px;
}

.header-right { display: flex; align-items: center; gap: 10px; }

.btn-ghost-sm, .btn-primary-sm {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  font-size: 13px; border-radius: 8px;
  transition: all .15s; cursor: pointer;
}
.btn-ghost-sm {
  background: #fff; color: var(--c-text-soft);
  border: 1px solid var(--c-line);
}
.btn-ghost-sm:hover { border-color: var(--c-accent); color: var(--c-primary); }
.btn-ghost-sm svg { width: 16px; height: 16px; }
.btn-primary-sm {
  background: var(--c-primary); color: #fff;
  border: 1px solid var(--c-primary); font-weight: 500;
  text-decoration: none;
}
.btn-primary-sm:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }

/* ========= 主布局 ========= */
.layout {
  max-width: 1240px; margin: 0 auto;
  padding: 24px 28px 60px;
  display: grid;
  grid-template-columns: 224px 1fr;
  gap: 24px;
  align-items: start;
}

/* ========= 侧边栏 ========= */
.sidebar {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: 16px 10px 20px;
  position: sticky; top: 86px;
  box-shadow: 0 6px 18px rgba(30, 58, 95, .05);
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 10px 12px;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 8px;
}
.sidebar-title {
  font-size: 13px; font-weight: 600;
  color: var(--c-text-soft); letter-spacing: 1px;
}
.sidebar-count {
  font-size: 11px; color: var(--c-text-soft);
  background: #f0f4fa; padding: 1px 8px; border-radius: 10px;
}

.cat-list { list-style: none; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px; border-radius: 8px;
  font-size: 14px; color: var(--c-text);
  transition: all .15s;
}
.cat-item:hover { background: #f4f7fc; color: var(--c-primary); text-decoration: none; }
.cat-item.active {
  background: linear-gradient(90deg, rgba(30,58,95,.06), rgba(111,168,255,.04));
  color: var(--c-primary); font-weight: 600;
}
.cat-item.active::before {
  content: ''; width: 3px; height: 16px; border-radius: 2px;
  background: var(--c-primary);
  margin-right: 8px; margin-left: -3px;
}
.cat-badge {
  font-size: 12px; color: var(--c-text-soft);
  background: #f0f4fa; min-width: 22px; text-align: center;
  padding: 1px 6px; border-radius: 10px;
}
.cat-item.active .cat-badge { background: var(--c-primary); color: #fff; }

.sidebar-deco {
  margin-top: 14px; padding: 12px 10px 4px;
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px dashed var(--c-line);
}
.deco-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-accent); box-shadow: 0 0 0 4px rgba(111,168,255,.15);
  animation: pulse 2.4s ease-in-out infinite;
}
.deco-line {
  height: 1px; background: linear-gradient(90deg, var(--c-accent), transparent);
  width: 60%;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(111,168,255,.15); }
  50%     { box-shadow: 0 0 0 8px rgba(111,168,255,.05); }
}

/* ========= 内容区 ========= */
.content { min-width: 0; }

.stats-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff; border: 1px solid var(--c-line);
  border-radius: 14px; padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 6px 18px rgba(30, 58, 95, .05);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle, rgba(111,168,255,.18), transparent 70%);
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.bg-blue { background: #eaf1fb; color: var(--c-accent); }
.bg-green { background: #e6f6ee; color: #2bb673; }
.stat-num {
  font-size: 24px; font-weight: 700; color: var(--c-primary);
  line-height: 1.1;
}
.stat-label { font-size: 12px; color: var(--c-text-soft); margin-top: 4px; }

/* ========= 搜索框 ========= */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--c-line);
  border-radius: 12px; padding: 8px 8px 8px 14px;
  height: 50px;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 24px;
}
.search-bar:focus-within {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(111, 168, 255, .18);
}
.search-icon {
  width: 18px; height: 18px; color: var(--c-text-soft);
  display: inline-flex; flex-shrink: 0;
}
.search-icon svg { width: 18px; height: 18px; }
.search-bar input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--c-text); height: 100%;
}
.search-bar input::placeholder { color: #a9b3c4; }
.search-clear {
  width: 24px; height: 24px; border: 0; background: transparent;
  cursor: pointer; color: var(--c-text-soft);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.search-clear:hover { background: #f0f4fa; color: var(--c-primary); }
.search-clear svg { width: 14px; height: 14px; }

/* ========= 工具网格 ========= */
.tools-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.tools-head h2 { font-size: 16px; font-weight: 600; color: var(--c-primary); }
.tools-tip { font-size: 12px; color: var(--c-text-soft); }

.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.tools-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 0; color: var(--c-text-soft);
  border: 1px dashed var(--c-line); border-radius: 14px;
  background: #fafbfd;
}
.tools-empty img { width: 64px; height: 64px; opacity: .5; margin-bottom: 12px; }
.tools-empty p { font-size: 13px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats-row { grid-template-columns: 1fr; }
}
