/**
 * Boutme Design System — Dashboard
 */

/* ─── Hero Greeting ───────────────────────────────────────────── */
.bm-dash-hero {
  background: var(--bm-bg-elevated);
  border: 1px solid var(--bm-border-subtle);
  border-radius: var(--bm-radius-2xl);
  padding: var(--bm-space-8) var(--bm-space-8);
  margin-bottom: var(--bm-space-6);
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.bm-dash-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(0,122,255,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 100%, rgba(0,184,213,0.10) 0%, transparent 50%);
  pointer-events: none;
}
.bm-dash-hero-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: blur(2px);
}
.bm-dash-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(9,9,11,0) 0%, rgba(9,9,11,0.7) 80%, var(--bm-bg-elevated) 100%);
}
.bm-dash-hero-content {
  position: relative;
  z-index: 1;
}
.bm-dash-greeting {
  font-size: var(--bm-text-xs);
  font-weight: var(--bm-weight-semibold);
  color: var(--bm-brand);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--bm-space-1);
  display: block;
}
.bm-dash-name {
  font-size: var(--bm-text-3xl);
  font-weight: var(--bm-weight-bold);
  color: var(--bm-text-primary);
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.bm-dash-stats-row {
  display: flex;
  align-items: center;
  gap: var(--bm-space-5);
  margin-top: var(--bm-space-4);
  flex-wrap: wrap;
}
.bm-dash-stat-pill {
  display: flex;
  align-items: center;
  gap: var(--bm-space-2);
  font-size: var(--bm-text-sm);
  color: var(--bm-text-secondary);
}
.bm-dash-stat-pill strong {
  color: var(--bm-text-primary);
  font-weight: var(--bm-weight-semibold);
}

/* ─── Analytics Grid ──────────────────────────────────────────── */
.bm-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bm-space-4);
  margin-bottom: var(--bm-space-6);
}
@media (max-width: 768px) {
  .bm-analytics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .bm-analytics-grid { grid-template-columns: 1fr; }
}

/* ─── Chart Section ───────────────────────────────────────────── */
.bm-chart-wrap {
  background: var(--bm-bg-elevated);
  border: 1px solid var(--bm-border-subtle);
  border-radius: var(--bm-radius-xl);
  overflow: hidden;
  margin-bottom: var(--bm-space-4);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.bm-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--bm-space-5) var(--bm-space-6);
  border-bottom: 1px solid var(--bm-border-subtle);
  flex-shrink: 0;
}
.bm-chart-body {
  padding: var(--bm-space-5) var(--bm-space-6);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
canvas.bm-chart { max-height: 280px; width: 100%; }

/* ─── Link Stats ──────────────────────────────────────────────── */
.bm-link-stat-row {
  display: flex;
  align-items: center;
  gap: var(--bm-space-3);
  padding: var(--bm-space-3) 0;
  border-bottom: 1px solid var(--bm-border-subtle);
}
.bm-link-stat-row:last-child { border-bottom: none; }
.bm-link-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--bm-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bm-bg-raised);
}
.bm-link-stat-icon img { width: 100%; height: 100%; object-fit: cover; }
.bm-link-stat-body { flex: 1; min-width: 0; }
.bm-link-stat-name {
  font-size: var(--bm-text-sm);
  font-weight: var(--bm-weight-medium);
  color: var(--bm-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bm-link-stat-bar-wrap {
  height: 3px;
  background: var(--bm-bg-raised);
  border-radius: var(--bm-radius-full);
  margin-top: 6px;
  overflow: hidden;
}
.bm-link-stat-bar {
  height: 100%;
  background: var(--bm-gradient-brand);
  border-radius: var(--bm-radius-full);
}
.bm-link-stat-end {
  flex-shrink: 0;
  text-align: right;
}
.bm-link-stat-count {
  font-size: var(--bm-text-sm);
  font-weight: var(--bm-weight-semibold);
  color: var(--bm-accent);
  display: block;
}
.bm-link-stat-pct {
  font-size: var(--bm-text-xs);
  color: var(--bm-text-tertiary);
}

/* ─── Dashboard 2-col layout ──────────────────────────────────── */
.bm-dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--bm-space-4);
}
.bm-dash-two-col > .bm-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.bm-dash-two-col > .bm-card > .bm-card-body {
  flex: 1;
}
@media (max-width: 900px) {
  .bm-dash-two-col { grid-template-columns: 1fr; }
}

/* ─── Plugin Sections ─────────────────────────────────────────── */
.bm-dash-hero-actions {
  position: absolute;
  top: var(--bm-space-5);
  right: var(--bm-space-5);
  display: flex;
  gap: var(--bm-space-2);
}

/* ─── News / Notification Banner ─────────────────────────────── */
.bm-news-banner {
  background: linear-gradient(135deg, rgba(0,122,255,0.08) 0%, rgba(0,184,213,0.06) 100%);
  border: 1px solid rgba(0,122,255,0.15);
  border-radius: var(--bm-radius-xl);
  padding: var(--bm-space-4) var(--bm-space-5);
  display: flex;
  align-items: center;
  gap: var(--bm-space-4);
}
.bm-news-icon { font-size: 20px; color: var(--bm-accent); flex-shrink: 0; }
.bm-news-text {
  flex: 1;
  font-size: var(--bm-text-sm);
  color: var(--bm-text-secondary);
}
.bm-news-text strong { color: var(--bm-text-primary); }
