/* ── dashboard ── bloque: vista de resumen general */

.dash {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Tiles ── */
.dash__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.dash__tile {
  background: var(--color-base-100, #fff);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dark .dash__tile { background: #1f2937; border-color: #374151; }

.dash__tile-icon {
  font-size: 1.5rem;
  color: #0099BB;
}

.dash__tile-valor {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}
.dark .dash__tile-valor { color: #f3f4f6; }

.dash__tile-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ── Grid de cards ── */
.dash__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dash__card {
  background: var(--color-base-100, #fff);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dark .dash__card { background: #1f2937; border-color: #374151; }

.dash__card--wide { grid-column: 1 / -1; }

.dash__card-titulo {
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.dark .dash__card-titulo { color: #d1d5db; }

/* ── Ranking artículos ── */
.dash__ranking {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash__ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash__ranking-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  width: 16px;
  flex-shrink: 0;
  text-align: right;
}

.dash__ranking-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash__ranking-titulo {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .dash__ranking-titulo { color: #f3f4f6; }
.dash__ranking-titulo:hover  { color: #0099BB; }
.dash__ranking-meta {
  font-size: 0.72rem;
  color: #9ca3af;
}

.dash__ranking-bar-wrap {
  flex-shrink: 0;
  width: 80px;
  height: 4px;
  background: #f3f4f6;
  border-radius: 2px;
  overflow: hidden;
}
.dark .dash__ranking-bar-wrap { background: #374151; }

.dash__ranking-bar {
  height: 100%;
  background: #0099BB;
  border-radius: 2px;
  min-width: 4px;
}

/* ── Comentarios ── */
.dash__comments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash__comment {
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dark .dash__comment { background: #111827; }

.dash__comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash__comment-apodo {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}
.dark .dash__comment-apodo { color: #d1d5db; }

.dash__comment-likes { font-size: 0.75rem; color: #9ca3af; }

.dash__comment-texto {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.dash__comment-art {
  font-size: 0.72rem;
  color: #9ca3af;
  font-style: italic;
}

/* ── Por categoría ── */
.dash__cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash__cat {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash__cat-nombre {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  width: 120px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .dash__cat-nombre { color: #d1d5db; }

.dash__cat-track {
  flex: 1;
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
}
.dark .dash__cat-track { background: #374151; }

.dash__cat-fill {
  height: 100%;
  background: #0099BB;
  border-radius: 3px;
  min-width: 4px;
  transition: width 0.3s ease;
}
.dash__cat-total {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Empty state ── */
.dash__empty {
  font-size: 0.8125rem;
  color: #9ca3af;
  padding: 8px 0;
  font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .dash__grid            { grid-template-columns: 1fr; }
  .dash__card--wide      { grid-column: auto; }
}

@media (max-width: 640px) {
  .dash                  { padding: 16px; }
  .dash__tiles           { grid-template-columns: repeat(2, 1fr); }
}
.dash__ranking-bar { width: var(--w, 0%); }
.dash__cat-fill    { width: var(--w, 0%); }