/* ============================================
   ANALYTICS PAGE STYLE SHEET v1.0.0
   Crust & Chilly Glass Ultra-Violet (UV) Analytics
   ============================================ */

:root {
  --glow-health: 0 0 24px rgba(139, 92, 246, 0.3);
  --glow-burn: 0 0 24px rgba(244, 63, 94, 0.2);
  --grad-card-1: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, transparent 100%);
  --grad-card-2: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, transparent 100%);
  --grad-card-3: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, transparent 100%);
  --grad-card-4: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, transparent 100%);
}

/* Page Intro Header — Matte Finish Hero */
.an-hero {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 30px 34px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--sh-3d-card);
  position: relative;
  overflow: hidden;
}

.an-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.04) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.an-hero-text {
  position: relative;
  z-index: 1;
}

.an-hero-text h2 {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--text-head) !important;
  margin-bottom: 6px;
  line-height: 1.2;
}

.an-hero-text p {
  color: var(--text-muted) !important;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Metric Widgets Grid */
.an-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.an-card {
  background: #ffffff;
  border-radius: var(--r-xl);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--sh-3d-card);
  transition: var(--tr);
}

.an-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-3d-card-hover);
  border-color: rgba(124, 58, 237, 0.25);
}

.an-card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.an-card-title {
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
}

.an-card-icon {
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--gradient);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  flex-shrink: 0;
  transition: var(--tr);
}

.an-card:hover .an-card-icon {
  transform: scale(1.08) rotate(-4deg);
}

.an-card-val {
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  color: var(--text-head) !important;
  line-height: 1.2 !important;
  margin-bottom: 6px !important;
  word-break: break-word !important;
}

.an-card-sub {
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Special Health Score Circular Ring */
.health-score-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.health-ring-wrap {
  position: relative;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}

.health-ring-svg {
  width: 70px;
  height: 70px;
  transform: rotate(-90deg);
}

.health-ring-bg {
  fill: none;
  stroke: rgba(79, 70, 229, 0.1);
  stroke-width: 7;
}

.health-ring-bar {
  fill: none;
  stroke: url(#healthGrad);
  stroke-width: 7;
  stroke-dasharray: 220;
  /* 2 * PI * r (approx 35 r) = 220 */
  stroke-dashoffset: 220;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.health-score-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-head);
}

.health-desc {
  flex: 1;
}

.health-lbl {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.health-status {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand);
  margin-top: 2px;
}

/* Projections / Forecast Section */
.forecast-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 245, 255, 0.75) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: var(--r-xl);
  border: 1px solid rgba(139, 92, 246, 0.14);
  box-shadow: var(--sh-3d-card);
  padding: 26px;
  margin-bottom: 26px;
}

.forecast-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.forecast-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.forecast-title h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-head);
}

.forecast-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.forecast-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 245, 255, 0.75) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(139, 92, 246, 0.14);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--sh-3d-card);
  transition: var(--tr);
}

.forecast-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-3d-card-hover), 0 8px 24px rgba(139, 92, 246, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 245, 255, 0.85) 100%);
  border-color: rgba(139, 92, 246, 0.3);
}

.forecast-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.forecast-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-head);
  margin-bottom: 12px;
}

.forecast-val.inc {
  color: #10b981 !important;
}

.forecast-val.exp {
  color: #f43f5e !important;
}

.forecast-val.prf {
  color: #f59e0b !important;
}

.forecast-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
}

.forecast-progress-fill {
  height: 100%;
  border-radius: var(--r-full);
  width: 0%;
  transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.forecast-progress-fill.inc {
  background: linear-gradient(90deg, #10b981, #059669);
}

.forecast-progress-fill.exp {
  background: linear-gradient(90deg, #f43f5e, #e11d48);
}

.forecast-progress-fill.prf {
  background: var(--gradient);
}

/* Charts Grid */
.charts-grid-3 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}

.chart-card-col-8 {
  grid-column: span 8;
}

.chart-card-col-4 {
  grid-column: span 4;
}

.chart-card-col-12 {
  grid-column: span 12;
}

@media (max-width: 1023px) {

  .chart-card-col-8,
  .chart-card-col-4 {
    grid-column: span 12;
  }
}

.chart-container-wrap {
  position: relative;
  height: 300px;
  width: 100%;
}

.donut-legend-wrap {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 110px;
  overflow-y: auto;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-body);
  font-weight: 600;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Smart Insights Section */
.insights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.insight-card-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 245, 255, 0.75) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: var(--r-xl);
  padding: 18px 22px;
  border: 1px solid rgba(139, 92, 246, 0.14);
  border-left: 4px solid var(--brand);
  box-shadow: var(--sh-3d-card);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: var(--tr);
  cursor: pointer;
}

.insight-card-item:hover {
  transform: translateX(4px);
  box-shadow: var(--sh-3d-card-hover), 0 8px 24px rgba(139, 92, 246, 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 245, 255, 0.85) 100%);
  border-color: rgba(139, 92, 246, 0.3);
  border-left-color: var(--brand);
}

.insight-card-item.warning {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.03) 0%, rgba(255, 255, 255, 0.85) 100%);
}

.insight-card-item.success {
  border-left-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(255, 255, 255, 0.85) 100%);
}

.insight-card-item.danger {
  border-left-color: #f43f5e;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.04) 0%, rgba(255, 255, 255, 0.85) 100%);
}

.insight-card-icon-wrap {
  font-size: 1.3rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.insight-card-icon-wrap.info {
  background: var(--gradient);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.insight-card-icon-wrap.success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.insight-card-icon-wrap.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.insight-card-icon-wrap.danger {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.2);
}

.insight-card-content {
  flex: 1;
}

.insight-card-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-head);
  margin-bottom: 2px;
}

.insight-card-text {
  font-size: 0.84rem;
  color: var(--text-body);
  font-weight: 500;
  line-height: 1.5;
}

/* Time selector & Filters for Analytics */
.an-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 245, 255, 0.75) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 6px;
  border-radius: var(--r-full);
  border: 1px solid rgba(139, 92, 246, 0.16);
  box-shadow: var(--sh-3d-card);
}

.an-filter-select {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand);
  outline: none;
  cursor: pointer;
}

.an-live-sync-card {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--income);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 14px;
  border-radius: var(--r-full);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.05);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--income);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

/* Capital Channel Report Styles */
.capital-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  display: inline-block;
  font-family: var(--font);
}

.capital-badge.cash {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.capital-badge.online {
  background: rgba(79, 70, 229, 0.08);
  color: var(--brand);
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.capital-badge.upi {
  background: rgba(124, 58, 237, 0.08);
  color: var(--purple);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.capital-badge.bank {
  background: rgba(6, 182, 212, 0.08);
  color: #0891b2;
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.capital-badge.card {
  background: rgba(219, 39, 119, 0.08);
  color: #db2777;
  border: 1px solid rgba(219, 39, 119, 0.15);
}

.capital-badge.cheque {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.an-card-wide {
  grid-column: span 2;
}

/* ============================================
   TABLET / IPAD VIEW RESPONSIVENESS OVERRIDES (< 1023px)
   ============================================ */
@media (max-width: 1023px) {
  .an-card-wide {
    grid-column: auto !important;
  }

  .charts-grid-3 {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .charts-grid-3>.card {
    width: 100% !important;
    max-width: 100% !important;
    grid-column: auto !important;
  }
}

/* ============================================
   MOBILE RESPONSIVENESS OVERRIDES (< 767px)
   ============================================ */
@media (max-width: 767px) {

  /* 1. Prevent circular ring score widget forced grid expansion */
  .an-card,
  .an-card-wide {
    grid-column: auto !important;
  }

  /* 2. Charts grid columns breakdown to flex list */
  .charts-grid-3 {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .chart-card-col-8,
  .chart-card-col-4,
  .chart-card-col-12 {
    grid-column: auto !important;
    width: 100% !important;
  }

  /* 3. Hero intro header section flex alignments */
  .an-hero {
    padding: 16px 20px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }

  .an-hero-text h2 {
    font-size: 1.35rem !important;
  }

  .an-filters {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .an-filters-wrapper {
    max-width: 100% !important;
    flex: 1 !important;
  }

  /* 4. Live sync header badge scaling */
  .an-live-sync-card span {
    display: none !important;
  }

  .an-live-sync-card {
    padding: 8px !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    justify-content: center !important;
  }

  /* 5. Chart.js canvas sizing and wrapping fixes */
  .charts-grid-3>.card,
  .chart-enhanced {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .chart-container-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .chart-container-wrap canvas {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 6. Forecast panel flex stack on mobile */
  .forecast-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  /* 7. Table wrap mobile crop overrides */
  .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  /* 8. Card / value sizes scaled down, colors stay identical to desktop */
  .an-grid {
    gap: 12px;
    margin-bottom: 20px;
  }

  .an-card {
    padding: 20px !important;
  }

  .an-card-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.1rem !important;
  }

  .an-card-val {
    font-size: 1.55rem !important;
  }

  .forecast-panel {
    padding: 20px !important;
    margin-bottom: 20px !important;
  }

  .forecast-val {
    font-size: 1.3rem !important;
  }

  .insight-card-item {
    padding: 14px 16px !important;
    gap: 12px !important;
  }

  .insight-card-icon-wrap {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.2rem !important;
  }
}

/* ==========================================
   SMALL MOBILE (≤ 599px) — same dark theme colors
   ========================================== */
@media (max-width: 599px) {
  .an-hero-text h2 {
    font-size: 1.3rem !important;
  }

  .an-card {
    padding: 16px !important;
  }

  .an-card-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.05rem !important;
  }

  .an-card-val {
    font-size: 1.35rem !important;
  }

  .an-card-title {
    font-size: 0.76rem !important;
  }

  .health-ring-wrap,
  .health-ring-svg {
    width: 56px !important;
    height: 56px !important;
  }

  .health-score-text {
    font-size: 0.95rem !important;
  }

  .forecast-title h3 {
    font-size: 1.05rem !important;
  }

  .forecast-val {
    font-size: 1.15rem !important;
  }
}

/* ==========================================
   EXTRA SMALL (≤ 480px) — same dark theme colors
   ========================================== */
@media (max-width: 480px) {
  .an-hero-text h2 {
    font-size: 1.15rem !important;
  }

  .an-hero-text p {
    font-size: 0.8rem !important;
  }

  .an-card {
    padding: 14px !important;
  }

  .an-card-val {
    font-size: 1.2rem !important;
  }

  .insight-card-item {
    flex-direction: row;
    padding: 12px 14px !important;
  }

  .insight-card-title {
    font-size: 0.86rem !important;
  }

  .insight-card-text {
    font-size: 0.8rem !important;
  }
}



/* ============================================
   POPUP / MODAL — ENHANCED TO MATCH THEME
   Dark glass modal with purple-gradient header
   (Uses the same brand purple, dark card bg,
   and white text as the rest of the theme)
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 30, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.show,
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.5) 100%);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: var(--border-glass);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-3d-card-hover);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.modal-overlay.show .modal,
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  background: linear-gradient(135deg, #22c7ff 0%, #0ea5e9 100%);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -20%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.modal-title {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  position: relative;
  z-index: 1;
}

.modal-subtitle {
  font-size: 0.8rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  margin-top: 3px !important;
  position: relative;
  z-index: 1;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--tr);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.6);
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px 26px;
  overflow-y: auto;
  color: var(--text-body);
}

.modal-body label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-head);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 6px;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  padding: 11px 14px;
  background: #f7f8fb;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-head);
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: var(--tr);
  min-height: 44px;
}

.modal-body input::placeholder,
.modal-body textarea::placeholder {
  color: var(--text-light);
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(34, 199, 255, 0.15);
}

.modal-body select option {
  background: #ffffff;
  color: var(--text-head);
}

.modal-field-group {
  margin-bottom: 16px;
}

.modal-footer {
  padding: 18px 26px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.modal-footer .btn {
  padding: 11px 22px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  min-height: 44px !important;
  border-radius: var(--r-full) !important;
}

.modal-footer .btn-primary {
  background: linear-gradient(135deg, #22c7ff 0%, #0ea5e9 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(34, 199, 255, 0.4) !important;
}

.modal-footer .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34, 199, 255, 0.5) !important;
}

.modal-footer .btn-outline {
  background: #f7f8fb !important;
  color: var(--text-body) !important;
  border: 1.5px solid var(--border) !important;
}

.modal-footer .btn-outline:hover {
  background: rgba(34, 199, 255, 0.1) !important;
  color: var(--text-head) !important;
  border-color: var(--brand) !important;
}

@media (max-width: 599px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }

  .modal-header {
    padding: 18px 20px;
  }

  .modal-title {
    font-size: 1.05rem !important;
  }

  .modal-body {
    padding: 18px 20px;
  }

  .modal-footer {
    padding: 14px 20px;
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

/* ==========================================================================
   LIQUID GLASS THEME STYLES FOR ANALYTICS (TRANSPARENT FROSTED GLASS)
   ========================================================================== */
[data-theme="glass"] .an-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: blur(30px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4), inset 0 1.5px 2px rgba(255, 255, 255, 0.5) !important;
}

[data-theme="glass"] .an-card,
[data-theme="glass"] .chart-box,
[data-theme="glass"] .an-panel,
[data-theme="glass"] .insight-card {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.35) !important;
}

[data-theme="glass"] .an-card:hover,
[data-theme="glass"] .chart-box:hover,
[data-theme="glass"] .insight-card:hover {
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.48), inset 0 1.5px 2px rgba(255, 255, 255, 0.6) !important;
}

[data-theme="glass"] .an-btn-period,
[data-theme="glass"] .an-filter-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #CBD5E1 !important;
  backdrop-filter: blur(16px) !important;
}

[data-theme="glass"] .an-btn-period.active,
[data-theme="glass"] .an-filter-btn.active {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
}