/* ====================================================
   pwned_websites.css — 泄露网站列表页专属样式
   共享布局（navbar/page-header/container/site-footer）→ shared.css
   ==================================================== */

/* ---- 统计卡片行 ---- */
.stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.stat-box {
  background: var(--bg-card);
  border: 1px solid rgba(99,102,241,0.06);
  border-radius: var(--radius);
  padding: 20px 28px;
  min-width: 180px;
  transition: all var(--transition-slow);
}
.stat-box:hover {
  border-color: rgba(99,102,241,0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #818cf8, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.stat-label {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 4px;
}

/* ---- 工具栏 ---- */
.toolbar-wrap {
  background: rgba(15,17,26,0.98);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 56px;
  z-index: 90;
  padding: 12px 0;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.search-box {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 220px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0 12px;
  transition: border-color 0.2s;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-icon { color: #475569; font-size: 0.9rem; margin-right: 8px; }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 0.9rem;
  padding: 9px 0;
  font-family: inherit;
}
.search-box input::placeholder { color: #475569; }
.clear-btn {
  background: none;
  border: none;
  color: #475569;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
  transition: color 0.2s;
}
.clear-btn:hover { color: #94a3b8; }

.filter-group { display: flex; gap: 6px; }
.filter-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-btn:hover { color: #94a3b8; border-color: rgba(255,255,255,0.18); }
.filter-btn.active {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.4);
  color: var(--accent-light);
}
.result-count {
  font-size: 0.8rem;
  color: #475569;
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}

/* ---- 表格区域 ---- */
.table-section { padding: 24px 24px 60px; }
.table-wrapper {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  background: rgba(15,17,26,0.6);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
thead tr {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
}
th.sortable { cursor: pointer; }
th.sortable:hover { color: #94a3b8; }
th.active-sort { color: #818cf8; }
.sort-arrow { margin-left: 4px; opacity: 0.4; font-size: 0.75rem; }
.sort-arrow.active { opacity: 1; color: #818cf8; }

/* 列宽 */
.col-name { width: 30%; }
.col-accounts { width: 18%; text-align: right; }
.col-breach-date { width: 16%; }
.col-added-date { width: 16%; }
.col-detail { width: 10%; text-align: center; }

/* 数据行 */
tbody tr.data-row {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
tbody tr.data-row:hover {
  background: rgba(99,102,241,0.03);
}
tbody tr.data-row:last-child { border-bottom: none; }

td {
  padding: 13px 16px;
  color: #c1c8d4;
  vertical-align: middle;
}

/* 网站名称单元格 */
.cell-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255,255,255,0.06);
  padding: 2px;
  flex-shrink: 0;
}
.site-logo-fallback {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1e293b, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  flex-shrink: 0;
}
.site-title {
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.site-domain {
  font-size: 0.78rem;
  color: #475569;
  white-space: nowrap;
}

/* 账户数 */
.cell-accounts {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #94a3b8;
}
.badge-sensitive {
  display: inline-block;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
  margin-left: 6px;
  vertical-align: middle;
}

/* 日期 */
.cell-date { color: #64748b; font-size: 0.84rem; }

/* 详情按钮 */
.col-detail { text-align: center; }
.detail-toggle {
  background: none;
  border: 1px solid rgba(99,102,241,0.2);
  color: #818cf8;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: inherit;
  transition: all 0.15s;
}
.detail-toggle:hover {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.4);
}
.detail-toggle.open { background: rgba(99,102,241,0.12); }

/* 展开行 */
tr.detail-row td {
  padding: 0;
  background: rgba(10,12,22,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.detail-inner {
  padding: 16px 20px 20px 56px;
  display: none;
}
.detail-inner.open { display: block; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 780px;
}
.detail-section label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin-bottom: 6px;
}
.detail-desc {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.55;
}
.detail-desc a { color: #818cf8; }
.data-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.data-tag {
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(99,102,241,0.08);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.18);
}
.data-tag.sensitive {
  background: rgba(239,68,68,0.08);
  color: #f87171;
  border-color: rgba(239,68,68,0.2);
}
.detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.78rem;
  color: #475569;
}
.meta-item { display: flex; gap: 4px; align-items: center; }
.meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #334155;
  flex-shrink: 0;
}

/* ---- 骨架屏 ---- */
.skeleton-row td { padding: 14px 16px; }
.skeleton {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---- 空状态 & 错误 ---- */
.empty-state, .load-error {
  text-align: center;
  padding: 60px 24px;
  color: #475569;
}
.empty-icon, .error-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-title, .error-title { font-size: 1.1rem; font-weight: 600; color: #64748b; margin-bottom: 6px; }
.empty-desc, .error-desc { font-size: 0.85rem; }
.retry-btn {
  margin-top: 16px;
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.1);
  color: #818cf8;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}
.retry-btn:hover { background: rgba(99,102,241,0.2); }

/* ---- 响应式 ---- */
@media (max-width: 700px) {
  .col-breach-date, .col-added-date { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 10px; }
  .stat-box { min-width: 140px; padding: 14px 18px; }
  .filter-btn { padding: 6px 10px; }
  .toolbar { gap: 8px; }
}
