/* ═══════════════════════════════════════════════════
   Analytics Page Styles
   ═══════════════════════════════════════════════════ */

.analytics-page {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0a;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.pricing-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(249,115,22,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(99,102,241,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.pricing-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.pricing-particle {
  position: fixed;
  background: rgba(249,115,22,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: pricingFloat linear infinite;
}

@keyframes pricingFloat {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100dvh) scale(0.5); opacity: 0; }
}

.analytics-content {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.2rem 4rem;
  color: #f8fafc;
  font-family: "Sora", "Segoe UI", sans-serif;
}

.ana-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.72);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 15px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14);
  transition: all 0.2s ease;
}
.ana-back svg { width: 13px; height: 13px; }
.ana-back:hover {
  color: #ffffff;
  border-color: rgba(249,115,22,0.45);
  background: rgba(249,115,22,0.15);
}

.analytics-header { margin: 1.2rem 0 0; }
.analytics-title {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 5.7vw, 3.4rem);
  line-height: 1;
  text-transform: uppercase;
  font-weight: 900;
  color: white;
}
.analytics-title .accent { color: #f97316; }

/* Section Cards */
.ana-section {
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(4,6,12,0.72);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  padding: 1.15rem;
}
.ana-section + .ana-section { margin-top: 0.95rem; }

.ana-section-title {
  margin: 0 0 0.9rem;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff7ed;
  text-shadow: 0 10px 28px rgba(249,115,22,0.28);
  position: relative;
  padding-bottom: 0.45rem;
}
.ana-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fb923c, rgba(251,146,60,0.08));
}

/* Overview Cards Grid */
.ana-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.ana-card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.2s ease;
}
.ana-card:hover { border-color: rgba(249,115,22,0.35); }
.ana-card.highlight-danger { border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.04); }
.ana-card.highlight-warning { border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.04); }

.ana-card-label {
  font-size: 10px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
}
.ana-card-value {
  font-size: 26px;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1.1;
}
.ana-card-value.accent { color: #f97316; }
.ana-card-value.green { color: #4ade80; }
.ana-card-value.red { color: #f87171; }
.ana-card-value.yellow { color: #fbbf24; }
.ana-card-trend {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
}
.ana-card-trend.up { color: #4ade80; }
.ana-card-trend.down { color: #f87171; }

/* ── Trend Badges ── */
.ana-trend-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 4px;
  vertical-align: middle;
}
.ana-trend-badge.up { color: #4ade80; background: rgba(74,222,128,0.12); }
.ana-trend-badge.down { color: #f87171; background: rgba(248,113,113,0.12); }

/* ── Health Score Banner ── */
.ana-health-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  margin-bottom: 0.95rem;
}
.ana-health-score-ring {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  position: relative;
}
.ana-health-score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ana-health-score-ring .ring-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 5; }
.ana-health-score-ring .ring-fill { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.ana-health-score-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  transform: none;
}
.ana-health-info { flex: 1; min-width: 0; }
.ana-health-title {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
}
.ana-health-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
  font-weight: 600;
}
.ana-health-metrics {
  display: flex;
  gap: 1.2rem;
  flex-shrink: 0;
}
.ana-health-metric { text-align: center; }
.ana-health-metric-val {
  font-size: 16px;
  font-weight: 900;
}
.ana-health-metric-label {
  font-size: 9px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 700;
}

/* ── Quick Action Links ── */
.ana-action-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 8px;
  margin-top: 6px;
  transition: all 0.2s ease;
}
.ana-action-link svg { width: 12px; height: 12px; }
.ana-alert.danger .ana-action-link { color: #f87171; background: rgba(248,113,113,0.1); }
.ana-alert.danger .ana-action-link:hover { background: rgba(248,113,113,0.2); }
.ana-alert.warning .ana-action-link { color: #fbbf24; background: rgba(251,191,36,0.1); }
.ana-alert.warning .ana-action-link:hover { background: rgba(251,191,36,0.2); }
.ana-alert.info .ana-action-link { color: #60a5fa; background: rgba(96,165,250,0.1); }
.ana-alert.info .ana-action-link:hover { background: rgba(96,165,250,0.2); }

/* ── Client Badges ── */
.ana-client-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 3px;
}
.ana-badge {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 5px;
}
.ana-badge.top-client { color: #f97316; background: rgba(249,115,22,0.15); }
.ana-badge.high-outstanding { color: #fbbf24; background: rgba(251,191,36,0.15); }
.ana-badge.frequently-overdue { color: #f87171; background: rgba(248,113,113,0.15); }

/* ── Alerts Panel ── */
.ana-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ana-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid;
}
.ana-alert.danger {
  border-color: rgba(248,113,113,0.35);
  background: rgba(248,113,113,0.06);
}
.ana-alert.warning {
  border-color: rgba(251,191,36,0.35);
  background: rgba(251,191,36,0.06);
}
.ana-alert.info {
  border-color: rgba(96,165,250,0.35);
  background: rgba(96,165,250,0.06);
}
.ana-alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ana-alert.danger .ana-alert-icon { background: rgba(248,113,113,0.15); color: #f87171; }
.ana-alert.warning .ana-alert-icon { background: rgba(251,191,36,0.15); color: #fbbf24; }
.ana-alert.info .ana-alert-icon { background: rgba(96,165,250,0.15); color: #60a5fa; }
.ana-alert-icon svg { width: 16px; height: 16px; }
.ana-alert-body { flex: 1; min-width: 0; }
.ana-alert-title {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
}
.ana-alert-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
  font-weight: 600;
}

/* ── Invoice Status Control Center ── */
.ana-section-divider {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 1rem 0 0.6rem;
}
.ana-section-divider-line {
  flex: 1; height: 1.5px;
  background: rgba(255,255,255,0.12);
}
.ana-section-divider-text {
  font-size: 10px; font-weight: 800; text-transform: uppercase; color: rgba(255,255,255,0.35);
  white-space: nowrap;
}
@media (min-width: 768px) {
  .ana-section-divider-line { height: 2px; background: rgba(255,255,255,0.15); }
  .ana-section-divider-text { font-size: 12px; color: rgba(255,255,255,0.4); }
}

.ana-aging-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.ana-aging-item {
  text-align: center;
  border-radius: 14px;
  padding: 0.7rem 0.4rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all 0.2s ease;
}
.ana-aging-item:hover { background: rgba(255,255,255,0.05); }
.ana-aging-item.expanded { border-width: 1.5px; background: rgba(255,255,255,0.04); }
.ana-aging-count {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.ana-aging-label {
  font-size: 9px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 0.3rem;
  font-weight: 700;
}
.ana-aging-item.green .ana-aging-count { color: #4ade80; }
.ana-aging-item.yellow .ana-aging-count { color: #fbbf24; }
.ana-aging-item.orange .ana-aging-count { color: #f97316; }
.ana-aging-item.red .ana-aging-count { color: #f87171; }
.ana-aging-item.green { border-color: rgba(74,222,128,0.2); }
.ana-aging-item.yellow { border-color: rgba(251,191,36,0.2); }
.ana-aging-item.orange { border-color: rgba(249,115,22,0.2); }
.ana-aging-item.red { border-color: rgba(248,113,113,0.2); }
.ana-aging-item.green.expanded { border-color: rgba(74,222,128,0.45); }
.ana-aging-item.yellow.expanded { border-color: rgba(251,191,36,0.45); }
.ana-aging-item.orange.expanded { border-color: rgba(249,115,22,0.45); }
.ana-aging-item.red.expanded { border-color: rgba(248,113,113,0.45); }

.ana-aging-expand {
  display: none;
  margin-top: 0.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
.ana-aging-expand.visible { display: block; }
.ana-aging-expand-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0.85rem; flex-wrap: wrap; gap: 0.4rem;
}
.ana-aging-expand-header-left {
  display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap;
}
.ana-aging-expand-link {
  font-size: 10px; font-weight: 800; text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap; transition: opacity 0.2s;
}
.ana-aging-expand-link:hover { opacity: 0.7; }

/* ── Paid/Unpaid Ratio Bar ── */
.ana-ratio-bar-wrap { margin-top: 0.8rem; }
.ana-ratio-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.ana-ratio-labels .paid-label { color: #4ade80; }
.ana-ratio-labels .unpaid-label { color: #f87171; }
.ana-ratio-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(248,113,113,0.2);
  display: flex;
}
.ana-ratio-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  transition: width 0.6s ease;
}

/* ── Needs Attention Panel ── */
.ana-status-summary { margin-bottom: 1rem; }
.ana-status-pill { display: block; }
.ana-attention-panel {
  border-radius: 14px;
  border: 1px solid rgba(249,115,22,0.15);
  background: rgba(249,115,22,0.03);
  overflow: hidden;
}
.ana-attention-header {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ana-attention-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
}
.ana-attention-badge {
  font-size: 10px;
  font-weight: 900;
  background: rgba(249,115,22,0.2);
  color: #f97316;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.5;
}
.ana-attention-groups { display: flex; flex-direction: column; }
.ana-attention-group + .ana-attention-group {
  border-top: 1px solid rgba(255,255,255,0.05);
}
.ana-attention-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.ana-attention-group-header:hover { background: rgba(255,255,255,0.03); }
.ana-attention-group-left {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.ana-attention-group-count {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}
.ana-attention-group-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
}
.ana-attention-group-total {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
}
.ana-attention-chevron {
  color: rgba(255,255,255,0.3);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.ana-attention-group.expanded .ana-attention-chevron {
  transform: rotate(180deg);
}
.ana-attention-group-body {
  display: none;
  padding: 0 0.85rem 0.6rem;
}
.ana-attention-group.expanded .ana-attention-group-body {
  display: block;
}
.ana-attention-view-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.ana-attention-view-link:hover { opacity: 0.7; }
.ana-attention-empty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(74,222,128,0.2);
  background: rgba(74,222,128,0.04);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}
/* Blue aging row for due-soon */
.ana-due-soon-row.aging-blue { border-color: rgba(96,165,250,0.2); background: rgba(96,165,250,0.04); }
.ana-due-soon-row.aging-blue .ana-due-soon-days { background: rgba(96,165,250,0.15); color: #60a5fa; }
.ana-due-soon-row.aging-blue .ana-due-soon-amount { color: #60a5fa; }

/* Chart Area */
.ana-chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  margin-top: 0.5rem;
}
.ana-chart-wrap canvas { width: 100% !important; height: 100% !important; }
.ana-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  font-weight: 600;
}
.ana-chart-empty.hidden { display: none; }

/* ── Chart Loading Spinner ── */
.ana-chart-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.ana-chart-loader.hidden { display: none; }
.ana-chart-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(249,115,22,0.15);
  border-top-color: #f97316;
  border-radius: 50%;
  animation: anaChartSpin 0.7s linear infinite;
}
@keyframes anaChartSpin {
  to { transform: rotate(360deg); }
}

.ana-chart-filters {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.ana-filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.2s ease;
}
.ana-filter-btn:hover {
  border-color: rgba(249,115,22,0.45);
  color: #fff;
}
.ana-filter-btn.active {
  background: rgba(249,115,22,0.18);
  border-color: rgba(249,115,22,0.55);
  color: #f97316;
}

.ana-metric-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.ana-metric-tabs::-webkit-scrollbar { display: none; }
.ana-metric-tab {
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.ana-metric-tab:hover { color: #fff; border-color: rgba(255,255,255,0.25); }
.ana-metric-tab.active {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(249,115,22,0.3);
}

/* Status Pills */
.ana-status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.7rem;
}
.ana-status-pill {
  text-align: center;
  border-radius: 14px;
  padding: 0.6rem 0.4rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}
.ana-status-pill-count {
  font-size: 20px;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1;
}
.ana-status-pill-label {
  font-size: 9px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 0.25rem;
  font-weight: 700;
}
.ana-status-pill.draft { border-color: rgba(148,163,184,0.3); }
.ana-status-pill.draft .ana-status-pill-count { color: #94a3b8; }
.ana-status-pill.sent { border-color: rgba(96,165,250,0.3); }
.ana-status-pill.sent .ana-status-pill-count { color: #60a5fa; }
.ana-status-pill.paid { border-color: rgba(74,222,128,0.3); }
.ana-status-pill.paid .ana-status-pill-count { color: #4ade80; }
.ana-status-pill.overdue { border-color: rgba(248,113,113,0.3); }
.ana-status-pill.overdue .ana-status-pill-count { color: #f87171; }

/* ── Client Insights ── */
.ana-client-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.ana-client-summary-item {
  text-align: center;
  padding: 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.ana-client-summary-val {
  font-size: 20px;
  font-weight: 900;
  color: #f97316;
  line-height: 1;
}
.ana-client-summary-label {
  font-size: 9px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 0.25rem;
  font-weight: 700;
}

.ana-clients-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.ana-client-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s ease;
}
.ana-client-row:hover { border-color: rgba(249,115,22,0.3); }
.ana-client-rank {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(249,115,22,0.12);
  color: #f97316;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ana-client-info { flex: 1; min-width: 0; }
.ana-client-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ana-client-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
  margin-top: 2px;
}
.ana-client-amounts {
  text-align: right;
  flex-shrink: 0;
}
.ana-client-total {
  font-size: 14px;
  font-weight: 900;
  color: #f97316;
}
.ana-client-outstanding {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  margin-top: 1px;
}
.ana-client-outstanding.has-outstanding { color: #fbbf24; }

.ana-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(255,255,255,0.3);
  font-size: 13px;
  font-weight: 600;
}

/* Last Updated + Export */
.ana-last-updated {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
}

/* Due Soon Detail List */
.ana-due-soon-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.6rem;
}
.ana-due-soon-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(96,165,250,0.15);
  background: rgba(96,165,250,0.03);
  transition: border-color 0.2s ease;
}
.ana-due-soon-row:hover { border-color: rgba(96,165,250,0.35); }
.ana-due-soon-row.urgent { border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.04); }
.ana-due-soon-days {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 900;
}
.ana-due-soon-days-num { font-size: 14px; line-height: 1; }
.ana-due-soon-days-label { font-size: 7px; text-transform: uppercase; opacity: 0.7; }
.ana-due-soon-row:not(.urgent):not(.aging-green):not(.aging-yellow):not(.aging-orange):not(.aging-red) .ana-due-soon-days { background: rgba(96,165,250,0.12); color: #60a5fa; }
.ana-due-soon-row.urgent .ana-due-soon-days { background: rgba(251,191,36,0.15); color: #fbbf24; }
.ana-due-soon-row.aging-green { border-color: rgba(74,222,128,0.2); background: rgba(74,222,128,0.04); }
.ana-due-soon-row.aging-green .ana-due-soon-days { background: rgba(74,222,128,0.15); color: #4ade80; }
.ana-due-soon-row.aging-yellow { border-color: rgba(251,191,36,0.2); background: rgba(251,191,36,0.04); }
.ana-due-soon-row.aging-yellow .ana-due-soon-days { background: rgba(251,191,36,0.15); color: #fbbf24; }
.ana-due-soon-row.aging-orange { border-color: rgba(249,115,22,0.2); background: rgba(249,115,22,0.04); }
.ana-due-soon-row.aging-orange .ana-due-soon-days { background: rgba(249,115,22,0.15); color: #f97316; }
.ana-due-soon-row.aging-red { border-color: rgba(248,113,113,0.2); background: rgba(248,113,113,0.04); }
.ana-due-soon-row.aging-red .ana-due-soon-days { background: rgba(248,113,113,0.15); color: #f87171; }
.ana-due-soon-info { flex: 1; min-width: 0; }
.ana-due-soon-client {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ana-due-soon-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
}
.ana-due-soon-amount {
  font-size: 13px;
  font-weight: 900;
  color: #60a5fa;
  flex-shrink: 0;
}
.ana-due-soon-row.urgent .ana-due-soon-amount { color: #fbbf24; }
.ana-due-soon-row.aging-green .ana-due-soon-amount { color: #4ade80; }
.ana-due-soon-row.aging-yellow .ana-due-soon-amount { color: #fbbf24; }
.ana-due-soon-row.aging-orange .ana-due-soon-amount { color: #f97316; }
.ana-due-soon-row.aging-red .ana-due-soon-amount { color: #f87171; }

/* Top Client Share Warning */
.ana-client-share-warning {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(251,191,36,0.25);
  background: rgba(251,191,36,0.05);
  margin-bottom: 0.7rem;
}
.ana-client-share-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ana-client-share-icon svg { width: 14px; height: 14px; }
.ana-client-share-text {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}
.ana-client-share-text strong { color: #fbbf24; font-weight: 800; }

/* Empty State Enhanced */
.ana-empty-state svg { width: 32px; height: 32px; margin-bottom: 0.5rem; opacity: 0.3; }
.ana-empty-state-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  margin-top: 0.3rem;
  font-weight: 500;
}

/* ── Dashboard Filter Bar ── */
.ana-dash-filters {
  margin-bottom: 1rem;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}
.ana-df-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.ana-df-custom-select {
  position: relative;
  flex: 1;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ana-df-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.55);
}
.ana-df-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.ana-df-trigger:hover {
  border-color: rgba(249,115,22,0.4);
  background: rgba(255,255,255,0.08);
}
.ana-df-custom-select.open .ana-df-trigger {
  border-color: #f97316;
  background: rgba(249,115,22,0.08);
}
.ana-df-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ana-df-chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  stroke: rgba(255,255,255,0.3);
  transition: transform 0.2s;
}
.ana-df-custom-select.open .ana-df-chevron {
  transform: rotate(180deg);
  stroke: #f97316;
}
.ana-df-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  background: #1e1e3a;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  max-height: 200px;
  overflow-y: auto;
}
.ana-df-custom-select.open .ana-df-dropdown {
  display: block;
  animation: dfFadeIn 0.15s ease;
}
@keyframes dfFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.ana-df-option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.1s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ana-df-option:last-child { border-bottom: none; }
.ana-df-option:hover {
  background: rgba(249,115,22,0.12);
  color: #f97316;
}
.ana-df-option.active {
  background: rgba(249,115,22,0.15);
  color: #f97316;
  font-weight: 800;
}
.ana-df-clear {
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}
.ana-df-clear:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.5);
}
.ana-df-date-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1.4;
  min-width: 200px;
}
.ana-df-date-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ana-df-date-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: all 0.15s;
}
.ana-df-date-btn:hover {
  border-color: rgba(249,115,22,0.4);
  background: rgba(255,255,255,0.08);
}
.ana-df-date-btn svg { color: rgba(255,255,255,0.4); }
.ana-df-date-sep {
  color: rgba(255,255,255,0.3);
  font-weight: 700;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .ana-df-row { flex-direction: column; align-items: stretch; }
  .ana-df-custom-select { width: 100%; min-width: auto; }
  .ana-df-date-group { min-width: auto; }
}

/* ── Create a Report Section ── */
.ana-report-section {
  border-color: rgba(249,115,22,0.25);
  background: rgba(249,115,22,0.03);
  margin-top: 1rem;
}
.ana-report-desc {
  margin: 0 0 1rem;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

/* ── Report Filter Controls ── */
.ana-report-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.ana-rf-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ana-rf-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  min-width: 80px;
  flex-shrink: 0;
}
.ana-rf-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.ana-rf-date-sep {
  color: rgba(255,255,255,0.25);
  font-weight: 700;
}
.ana-rf-date-wrap { position: relative; flex: 1; }
.ana-rf-date-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ana-rf-date-btn:hover { border-color: rgba(249,115,22,0.4); }
.ana-rf-date-btn svg { color: rgba(255,255,255,0.4); }

/* Custom date picker */
.ana-dp { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; background: #1a1a1a; border: 1px solid rgba(255,255,255,0.15); border-radius: 14px; padding: 12px; width: 260px; user-select: none; }
.ana-dp.open { display: block; }
.ana-dp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ana-dp-title { font-size: 13px; font-weight: 800; color: rgba(255,255,255,0.8); }
.ana-dp-nav { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: transparent; color: rgba(255,255,255,0.5); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.ana-dp-nav:hover { border-color: #f97316; color: #f97316; }
.ana-dp-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.ana-dp-wd { text-align: center; font-size: 9px; font-weight: 800; text-transform: uppercase; color: rgba(255,255,255,0.3); padding: 4px 0; }
.ana-dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ana-dp-day { text-align: center; padding: 6px 0; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.6); border-radius: 8px; cursor: pointer; border: none; background: transparent; transition: all 0.1s; }
.ana-dp-day:hover { background: rgba(249,115,22,0.15); color: #f97316; }
.ana-dp-day.today { border: 1px solid rgba(249,115,22,0.4); }
.ana-dp-day.selected { background: #f97316; color: white; }
.ana-dp-day.other-month { color: rgba(255,255,255,0.15); }

/* Status pills */
.ana-rf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.ana-rf-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.55);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ana-rf-pill:hover {
  border-color: rgba(249,115,22,0.4);
  color: rgba(255,255,255,0.8);
}
.ana-rf-pill.active {
  background: rgba(249,115,22,0.15);
  border-color: #f97316;
  color: #f97316;
}

/* Multi-select dropdown */
.ana-rf-multi-wrap {
  position: relative;
  flex: 1;
}
.ana-rf-multi-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ana-rf-multi-trigger:hover {
  border-color: rgba(249,115,22,0.4);
}
.ana-rf-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.ana-rf-multi-wrap.open .ana-rf-chevron {
  transform: rotate(180deg);
}
.ana-rf-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  overflow: hidden;
  max-height: 200px;
  overflow-y: auto;
}
.ana-rf-multi-wrap.open .ana-rf-dropdown {
  display: block;
}
.ana-rf-dd-option {
  width: 100%;
  display: block;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.ana-rf-dd-option:hover {
  background: rgba(249,115,22,0.1);
}
.ana-rf-dd-option.active {
  background: rgba(249,115,22,0.12);
  color: #f97316;
}
.ana-rf-dd-option + .ana-rf-dd-option {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.ana-report-actions {
  display: flex;
  gap: 10px;
}
.ana-report-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.ana-report-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.ana-report-btn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ana-report-btn-label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
.ana-report-btn-hint {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.55;
}
.ana-report-btn.pdf {
  border: 1px solid #b91c1c;
  background: #dc2626;
  color: #ffffff;
}
.ana-report-btn.pdf:hover {
  background: #b91c1c;
  border-color: #991b1b;
  box-shadow: 0 6px 24px rgba(185,28,28,0.28);
  transform: translateY(-1px);
}
.ana-report-btn.pdf:active {
  background: #991b1b;
  border-color: #7f1d1d;
}
.ana-report-btn.csv {
  border: 1px solid rgba(249,115,22,0.35);
  background: rgba(249,115,22,0.06);
  color: #f97316;
}
.ana-report-btn.csv:hover {
  background: rgba(249,115,22,0.14);
  border-color: rgba(249,115,22,0.55);
  box-shadow: 0 6px 24px rgba(249,115,22,0.12);
  transform: translateY(-1px);
}

/* Footer */
.ana-footer {
  text-align: center;
  padding: 2rem 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 1.5rem;
}
.ana-footer-text {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  font-weight: 500;
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .ana-card-label { font-size: 12px; }
  .ana-card-value { font-size: 30px; }
  .ana-section-title { font-size: 20px; }
  .ana-health-title { font-size: 16px; }
  .ana-health-metric-val { font-size: 16px; }
  .ana-due-soon-client { font-size: 14px; }
  .ana-due-soon-amount { font-size: 15px; }
  .ana-due-soon-meta { font-size: 10px; }
  .ana-aging-count { font-size: 26px; }
  .ana-aging-label { font-size: 10px; }
  .ana-client-summary-val { font-size: 24px; }
  .ana-client-summary-label { font-size: 10px; }
  .ana-badge { font-size: 9px; }
  .ana-back { font-size: 11px; }
}
@media (max-width: 880px) {
  .ana-cards { grid-template-columns: repeat(2, 1fr); }
  .ana-status-grid { grid-template-columns: repeat(2, 1fr); }
  .ana-aging-grid { grid-template-columns: repeat(2, 1fr); }
  .ana-client-summary { grid-template-columns: repeat(3, 1fr); }
  .ana-health-metrics { gap: 0.8rem; }
}
@media (max-width: 640px) {
  .analytics-content { padding: 1.45rem 0.85rem 3rem; }
  .analytics-header { text-align: center !important; }
  .ana-cards { grid-template-columns: 1fr 1fr; }
  .ana-card-value { font-size: 22px; }
  .ana-chart-wrap { height: 220px; }
  .ana-health-banner { flex-wrap: wrap; }
  .ana-health-metrics { width: 100%; justify-content: space-around; margin-top: 0.5rem; }
  .ana-report-actions { flex-direction: column; }
  .ana-rf-row { flex-direction: column; align-items: stretch; }
  .ana-rf-label { min-width: auto; }
  .ana-aging-expand-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  .ana-cards { grid-template-columns: 1fr; }
  .ana-status-grid { grid-template-columns: repeat(2, 1fr); }
  .ana-aging-grid { grid-template-columns: repeat(2, 1fr); }
  .ana-client-summary { grid-template-columns: 1fr; }
}

/* ── DEMO MODE ── */
.ana-demo-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(249,115,22,0.25);
  padding: 0.65rem 1.25rem;
}
.ana-demo-banner-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.ana-demo-banner-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.55);
  min-width: 0;
}
.ana-demo-banner-left svg { color: #f97316; flex-shrink: 0; }
.ana-demo-label {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: #f97316;
  white-space: nowrap;
}
.ana-demo-desc {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ana-demo-banner-right { flex-shrink: 0; }
.ana-demo-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.55rem 1.25rem;
  background: linear-gradient(to right, #f97316, #ea580c);
  color: white;
  border-radius: 0.75rem;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(249,115,22,0.3);
  transition: opacity 0.2s;
  line-height: normal;
}
.ana-demo-cta-btn svg {
  margin-top: -1px;
}
.ana-demo-cta-btn:hover { opacity: 0.85; }

.ana-demo-content-wrap {
  opacity: 0.35;
  filter: blur(1.5px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
@media (max-width: 640px) {
  .ana-demo-desc { display: none; }
  .ana-demo-banner { padding: 0.55rem 1rem; }
  .ana-tabs-bar { gap: 0.15rem; }
  .ana-tab { font-size: 11px; padding: 0.4rem 0.7rem; }
}

/* ═══════════════ TAB NAVIGATION ═══════════════ */
.ana-tabs-bar {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.2rem;
  padding: 3px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}
.ana-tab {
  flex: 1;
  padding: 0.5rem 0.8rem;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  letter-spacing: 0.02em;
}
.ana-tab:hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.04);
}
.ana-tab.active {
  color: #fff;
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.3);
  box-shadow: 0 0 12px rgba(249,115,22,0.08);
}

/* ═══════════════ HERO METRIC ═══════════════ */
.ana-hero-metric {
  text-align: center;
  padding: 1.2rem 0 1rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ana-hero-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.ana-hero-value {
  font-size: 38px;
  font-weight: 900;
  color: #4ade80;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.ana-hero-context {
  margin-top: 0.35rem;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ana-hero-projected {
  color: rgba(249,115,22,0.8);
  font-weight: 700;
}

/* ═══════════════ INSIGHT BAR ═══════════════ */
.ana-insight-bar {
  text-align: center;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.ana-insight-bar.good {
  color: rgba(74,222,128,0.9);
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.15);
}
.ana-insight-bar.warn {
  color: rgba(251,191,36,0.9);
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.15);
}

/* ═══════════════ SUPPORT GRID ═══════════════ */
.ana-support-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.ana-support-card {
  padding: 0.75rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  text-align: center;
}
.ana-support-card.warn {
  border-color: rgba(251,191,36,0.25);
  background: rgba(251,191,36,0.03);
}
.ana-support-value {
  font-size: 20px;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1.1;
}
.ana-support-value.green { color: #4ade80; }
.ana-support-value.yellow { color: #fbbf24; }
.ana-support-value.accent { color: #f97316; }
.ana-support-value.red { color: #f87171; }
.ana-support-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 0.2rem;
}
.ana-support-trend {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  margin-top: 0.25rem;
}
@media (max-width: 640px) {
  .ana-support-grid { grid-template-columns: repeat(2, 1fr); }
  .ana-hero-value { font-size: 30px; }
}

/* ═══════════════ COMPACT ACTIVITY ROW ═══════════════ */
.ana-activity-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.65rem 0.5rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
.ana-activity-stat {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}
.ana-activity-num {
  font-size: 16px;
  font-weight: 900;
  color: #f8fafc;
}
.ana-activity-lbl {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}
.ana-activity-sep {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .ana-activity-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    justify-items: center;
  }
  .ana-activity-sep { display: none; }
  .ana-activity-stat { flex-direction: column; align-items: center; gap: 0; }
}

/* ═══════════════ HIDDEN UTILITY ═══════════════ */
.hidden { display: none !important; }

/* ═══════════════ CATEGORY / BAR LIST ═══════════════ */
.ana-category-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.ana-category-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}
.ana-category-info {
  min-width: 110px;
  flex-shrink: 0;
}
.ana-category-name {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  display: block;
}
.ana-category-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}
.ana-category-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.ana-category-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(249,115,22,0.5), rgba(249,115,22,0.15));
  transition: width 0.5s ease;
}
.ana-category-amount {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,0.85);
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
}

/* ═══════════════ SECTION SUBTITLE ═══════════════ */
.ana-section-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin: -0.3rem 0 0.8rem 0;
  font-weight: 500;
}

/* ═══════════════ PAYMENT METHODS (CARDS) ═══════════════ */
.ana-pm-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ana-pm-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s;
}
.ana-pm-card:hover { border-color: rgba(255,255,255,0.15); }
.ana-pm-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ana-pm-icon svg { width: 18px; height: 18px; }
.ana-pm-body { flex: 1; min-width: 0; }
.ana-pm-name {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
}
.ana-pm-amount {
  font-size: 15px;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1.3;
}
.ana-pm-meta {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
}
.ana-pm-pct {
  font-size: 20px;
  font-weight: 900;
  flex-shrink: 0;
  min-width: 48px;
  text-align: right;
}

/* ═══════════════ CATEGORY BREAKDOWN (ROWS) ═══════════════ */
.ana-catb-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ana-catb-row {
  display: flex;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  overflow: hidden;
  transition: border-color 0.2s;
}
.ana-catb-row:hover { border-color: rgba(255,255,255,0.12); }
.ana-catb-accent {
  width: 4px;
  flex-shrink: 0;
  border-radius: 4px 0 0 4px;
}
.ana-catb-body {
  flex: 1;
  padding: 0.55rem 0.8rem;
  min-width: 0;
}
.ana-catb-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.ana-catb-name {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ana-catb-amount {
  font-size: 13px;
  font-weight: 900;
  color: #f8fafc;
  flex-shrink: 0;
}
.ana-catb-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.15rem;
}
.ana-catb-meta {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
}
.ana-catb-pct {
  font-size: 11px;
  font-weight: 800;
}
.ana-catb-track {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 0.35rem;
  overflow: hidden;
}
.ana-catb-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ═══════════════ CLIENT PAYMENT SPEED ═══════════════ */
.ana-payspeed-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.ana-payspeed-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s;
}
.ana-payspeed-row:hover { border-color: rgba(255,255,255,0.12); }
.ana-payspeed-rank {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}
.ana-payspeed-info { flex: 0 1 auto; min-width: 80px; }
.ana-payspeed-name {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ana-payspeed-meta {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
}
.ana-payspeed-bar-area { flex: 1; min-width: 40px; }
.ana-payspeed-track {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.ana-payspeed-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}
.ana-payspeed-badge {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid;
  flex-shrink: 0;
}

html[lang="ka"] .analytics-title,
html[lang="ka"] .ana-back,
html[lang="ka"] .ana-section-title,
html[lang="ka"] .ana-card-label,
html[lang="ka"] .ana-health-metric-label,
html[lang="ka"] .ana-action-link,
html[lang="ka"] .ana-badge,
html[lang="ka"] .ana-section-divider-text,
html[lang="ka"] .ana-aging-label,
html[lang="ka"] .ana-aging-expand-link,
html[lang="ka"] .ana-ratio-labels,
html[lang="ka"] .ana-attention-badge,
html[lang="ka"] .ana-rf-pill,
html[lang="ka"] .ana-df-label,
html[lang="ka"] .ana-df-option,
html[lang="ka"] .ana-demo-label,
html[lang="ka"] .ana-demo-cta-btn,
html[lang="ka"] .ana-payspeed-badge {
  line-height: 1.35;
}
