/* ══════════════════════════════════════════════════════════
   SMART-TOOLS.CSS
   Statistics · Smart Compress · Recommendations · Bulk · Re-download
══════════════════════════════════════════════════════════ */

/* ── STATISTICS ── */
.stats-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.stats-panel-title { font-size: 18px; font-weight: 700; margin: 0; }
.stats-clear-btn   { font-size: 13px; padding: 7px 14px; }

.stats-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stats-kpi {
  background: var(--card, #0e1420);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 16px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.stats-kpi-icon { font-size: 22px; }
.stats-kpi-val  { font-size: 22px; font-weight: 800; color: var(--accent, #4f8ef7); line-height: 1.1; }
.stats-kpi-lbl  { font-size: 11px; color: var(--text-muted, #8892a0); }

.stats-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stats-chart-card {
  background: var(--card, #0e1420);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 16px;
}
.stats-chart-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-muted, #8892a0);
  margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.stats-chart-card canvas { width: 100%; display: block; }
.stats-table-wrap { border-radius: 12px; overflow: hidden; border: 1px solid var(--border, rgba(255,255,255,0.08)); }

/* ── SMART COMPRESSION ── */
.sc-analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.sc-analysis-card {
  background: var(--card, #0e1420);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.sc-rec-card { border-color: var(--accent, #4f8ef7); background: rgba(79,142,247,0.07); }
.sc-ac-icon  { font-size: 22px; }
.sc-analysis-card strong { font-size: 14px; font-weight: 700; color: var(--text, #e8eaf0); }
.sc-analysis-card small  { font-size: 11px; color: var(--text-muted, #8892a0); }

.sc-slider-wrap { margin: 16px 0; }

.sc-preview-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  justify-content: center; margin-top: 10px;
}
.sc-preview-stat {
  background: var(--card, #0e1420);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 12px 20px; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.sc-preview-stat.good { border-color: #10b981; }
.sc-preview-stat span  { font-size: 12px; color: var(--text-muted, #8892a0); }
.sc-preview-stat strong { font-size: 16px; font-weight: 700; color: var(--text, #e8eaf0); }
.sc-preview-stat.good strong { color: #10b981; }

/* ── RECOMMENDATIONS ── */
.rec-hero {
  text-align: center;
  padding: 28px 0 20px;
}
.rec-hero-icon  { font-size: 48px; margin-bottom: 8px; }
.rec-hero-title { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.rec-hero-sub   { color: var(--text-muted, #8892a0); margin: 0 0 20px; }

.rec-question {
  font-size: 16px; font-weight: 700; text-align: center;
  margin-bottom: 18px; color: var(--text, #e8eaf0);
}
.rec-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.rec-option {
  background: var(--card, #0e1420);
  border: 1.5px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 12px;
  color: var(--text, #e8eaf0);
  font-size: 14px; font-weight: 600;
  padding: 14px 16px;
  text-align: left; cursor: pointer;
  transition: all 0.18s;
}
.rec-option:hover {
  border-color: var(--accent, #4f8ef7);
  background: rgba(79,142,247,0.08);
  color: var(--accent, #4f8ef7);
  transform: translateY(-1px);
}

.rec-result-title {
  font-size: 17px; font-weight: 800;
  margin-bottom: 16px; color: var(--text, #e8eaf0);
}
.rec-result-grid { display: flex; flex-direction: column; gap: 10px; }
.rec-result-card {
  background: var(--card, #0e1420);
  border: 1.5px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 12px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all 0.18s;
}
.rec-result-card:hover {
  border-color: var(--accent, #4f8ef7);
  background: rgba(79,142,247,0.07);
  transform: translateX(4px);
}
.rec-card-icon  { font-size: 26px; flex-shrink: 0; }
.rec-card-body  { flex: 1; }
.rec-card-label { font-weight: 700; font-size: 15px; color: var(--text, #e8eaf0); }
.rec-card-desc  { font-size: 12px; color: var(--text-muted, #8892a0); margin-top: 2px; }
.rec-card-arrow { font-size: 18px; color: var(--accent, #4f8ef7); }

/* ── BULK DASHBOARD ── */
.bulk-settings-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  background: var(--card, #0e1420);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  margin-bottom: 16px;
}

.bulk-summary-bar {
  display: flex; gap: 20px; flex-wrap: wrap;
  background: var(--card, #0e1420);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px; color: var(--text-muted, #8892a0);
  margin-bottom: 12px;
}
.bulk-summary-bar strong { color: var(--text, #e8eaf0); }

.bulk-file-list {
  max-height: 280px; overflow-y: auto;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
}
.bulk-file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.05));
  font-size: 13px;
}
.bulk-file-row:last-child { border-bottom: none; }
.bulk-file-name { flex: 1; color: var(--text, #e8eaf0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-file-size { color: var(--text-muted, #8892a0); white-space: nowrap; }
.bulk-file-status { white-space: nowrap; min-width: 100px; text-align: right; }

.bulk-progress-bar {
  height: 8px; background: var(--border, rgba(255,255,255,0.1));
  border-radius: 4px; overflow: hidden;
}
.bulk-progress-fill {
  height: 100%; width: 0; background: var(--accent, #4f8ef7);
  border-radius: 4px; transition: width 0.3s;
}
.bulk-progress-label {
  font-size: 12px; color: var(--text-muted, #8892a0);
  text-align: center; margin-top: 6px;
}

/* ── RE-DOWNLOAD HISTORY ── */
.rdl-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.rdl-title      { font-size: 18px; font-weight: 700; margin: 0; }
.rdl-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rdl-search {
  background: var(--input-bg, #161d2c);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text, #e8eaf0);
  font-size: 13px; outline: none; width: 180px;
  transition: border-color 0.2s;
}
.rdl-search:focus { border-color: var(--accent, #4f8ef7); }
.rdl-clear-btn  { font-size: 13px; padding: 7px 14px; }

.rdl-filter-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.rdl-filter-btn {
  background: var(--card, #0e1420);
  border: 1.5px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 20px;
  color: var(--text-muted, #8892a0);
  font-size: 13px; font-weight: 600;
  padding: 6px 16px; cursor: pointer; transition: all 0.18s;
}
.rdl-filter-btn:hover { border-color: var(--accent, #4f8ef7); color: var(--accent, #4f8ef7); }
.rdl-filter-btn.active { background: var(--accent, #4f8ef7); border-color: var(--accent, #4f8ef7); color: #fff; }

.rdl-empty {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted, #8892a0); font-size: 14px;
}

.rdl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.rdl-card {
  background: var(--card, #0e1420);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.rdl-card:hover { transform: translateY(-2px); border-color: rgba(79,142,247,0.4); }

.rdl-card-thumb-wrap { position: relative; overflow: hidden; aspect-ratio: 4/3; }
.rdl-card-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.2s;
}
.rdl-card:hover .rdl-card-thumb { transform: scale(1.04); }

.rdl-card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  opacity: 0; transition: opacity 0.18s;
}
.rdl-card:hover .rdl-card-overlay { opacity: 1; }

.rdl-dl-btn, .rdl-rm-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  color: #fff; font-size: 16px;
  width: 36px; height: 36px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.rdl-dl-btn:hover { background: var(--accent, #4f8ef7); border-color: var(--accent, #4f8ef7); }
.rdl-rm-btn:hover { background: #ef4444; border-color: #ef4444; }

.rdl-card-info { padding: 10px 12px; }
.rdl-card-name { font-size: 12px; font-weight: 600; color: var(--text, #e8eaf0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdl-card-meta { display: flex; gap: 6px; margin-top: 4px; }
.rdl-card-tool { font-size: 10px; background: rgba(79,142,247,0.15); color: var(--accent, #4f8ef7); border-radius: 4px; padding: 1px 6px; font-weight: 600; }
.rdl-card-size { font-size: 10px; color: var(--text-muted, #8892a0); }
.rdl-card-date { font-size: 10px; color: var(--text-muted, #8892a0); margin-top: 3px; }

.rdl-stats-bar {
  display: flex; gap: 20px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted, #8892a0);
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.06));
}
