/* Stikwood Social Dashboard — Dark Premium Theme */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --bg3: #22223a;
  --border: #2e2e4a;
  --border-bright: #3e3e5e;
  --text: #e8e8f0;
  --text-muted: #7a7a9a;
  --text-dim: #4a4a6a;
  --accent: #8b2fc9;
  --accent2: #6b1fa9;
  --green: #4a8c23;
  --green-text: #7fd146;
  --red-text: #f55;
  --yt-red: #c9302c;
  --ig-gradient: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* HEADER */
.header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo { font-size: 24px; }
h1 { font-size: 20px; font-weight: 700; color: #fff; }
.subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.updated-badge {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
}

/* CONTAINER */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* OVERVIEW ROW */
.overview-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-bright); }
.stat-icon { font-size: 20px; margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 700; color: #fff; line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-delta { font-size: 11px; margin-top: 4px; }
.stat-delta.positive { color: var(--green-text); }
.stat-delta.negative { color: var(--red-text); }

/* TWO COL */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

/* SECTION */
.section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.section-icon { font-size: 22px; }
.section-title { font-size: 15px; font-weight: 600; color: #fff; }
.section-link { font-size: 11px; color: var(--accent); text-decoration: none; margin-top: 2px; display: block; }
.section-link:hover { text-decoration: underline; }

/* METRICS ROW */
.metrics-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.metric {
  flex: 1;
  padding: 14px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.metric:last-child { border-right: none; }
.metric-val { font-size: 20px; font-weight: 700; color: #fff; }
.metric-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.4px; }

/* TABLE HEADER */
.table-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}

/* VIDEO / POST LIST */
.video-list, .post-list { padding: 8px 0; }

.video-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.video-item:last-child { border-bottom: none; }
.video-item:hover { background: var(--bg3); }

.rank {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  min-width: 22px;
  padding-top: 2px;
}
.thumb {
  width: 64px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg3);
}
.item-info { flex: 1; min-width: 0; }
.item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.loading, .empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* SPARKLINE */
.chart-container {
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}
.chart-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
canvas {
  width: 100%;
  display: block;
}

/* DELTA NEUTRAL */
.stat-delta.neutral { color: var(--text-muted); }
