/* Extracted from index.css L3027-L3267: Analytics dashboard */

/* ── Analytics Dashboard Redesign ────────────────────────────── */

/* Metric strip */
.an-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 1100px) { .an-metric-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .an-metric-strip { grid-template-columns: repeat(2, 1fr); } }

.an-metric-card {
  background: rgba(10, 14, 28, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 2px solid var(--an-accent, var(--accent-blue));
  border-radius: var(--radius, 14px);
  padding: 1.1rem 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.25s ease;
}
.an-metric-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(255,255,255,0.035), transparent 65%);
  pointer-events: none;
}
.an-metric-card:hover {
  background: rgba(14, 20, 38, 0.62);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
}
.an-metric-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.an-metric-value {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}
.an-metric-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.75;
}

/* Card header shared style */
.an-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.an-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0;
}
.an-card-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  letter-spacing: 0.02em;
}

/* Primary trend chart */
.an-trend-card {
  margin-bottom: 1.5rem;
}
.an-trend-chart-wrap {
  height: 300px;
  position: relative;
}

/* Two-column layout */
.an-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) { .an-two-col { grid-template-columns: 1fr; } }

.an-insight-card {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

/* Donut chart layout */
.an-donut-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: center;
  flex: 1;
}
@media (max-width: 600px) { .an-donut-layout { grid-template-columns: 1fr; } }

.an-donut-wrap {
  height: 180px;
  position: relative;
  flex-shrink: 0;
}

/* Donut legend */
.an-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  max-height: 200px;
}
.an-legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.an-legend-row:last-child { border-bottom: none; }
.an-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
}
.an-legend-label {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.an-legend-pct {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 2.5rem;
  text-align: right;
}
.an-legend-val {
  color: var(--text-primary);
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  min-width: 4.5rem;
  text-align: right;
}

/* Monthly expenses bar chart */
.an-bar-chart-wrap {
  height: 220px;
  position: relative;
}

/* Key insights card */
.an-insights-card {
  margin-bottom: 1.5rem;
}
.an-insights-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.an-insight-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.an-insight-row:last-child { border-bottom: none; }
.an-insight-icon {
  font-size: 1rem;
  width: 1.5rem;
  flex-shrink: 0;
  text-align: center;
}
.an-insight-text strong { color: var(--text-primary); }

/* Data warning */
.an-data-warning {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--accent-yellow-dim);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--accent-yellow);
}
.an-data-warning-icon {
  flex-shrink: 0;
  font-size: 0.9rem;
}

/* Empty state */
.an-empty-state {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 1rem 0;
}

/* Light mode overrides */
/* an-metric-card light overrides moved to glass system block below */
[data-theme="light"] .an-metric-card::before { display: none; }

/* ── End Analytics ───────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════
   LIGHT MODE — TARGETED FIXES (post glass-system pass)
   ══════════════════════════════════════════════════════════════ */

