/* === TODAY SESSION ITEMS === */
.dhikr-session-item {
  --dc: #14b8a6;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: color-mix(in srgb, var(--dc) 7%, var(--color-surface-nested, rgba(255,255,255,0.02)));
  border: 1px solid color-mix(in srgb, var(--dc) 20%, var(--color-border-muted, rgba(255,255,255,0.06)));
  border-radius: 14px;
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}
.dhikr-session-item:hover {
  transform: translateX(3px);
  background: color-mix(in srgb, var(--dc) 12%, var(--color-surface-nested, rgba(255,255,255,0.02)));
}
.ds-icon {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--dc) 18%, transparent);
  color: color-mix(in srgb, var(--dc) 80%, white);
}
.ds-icon svg { width: 20px; height: 20px; }
.ds-info { flex: 1; min-width: 0; }
.ds-arabic {
  font-family: var(--font-arabic);
  font-size: 13px;
  direction: rtl;
  line-height: 1.3;
  color: color-mix(in srgb, var(--dc) 78%, white);
  margin-bottom: 1px;
}
.ds-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds-count-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
}
.ds-count {
  font-size: 16px;
  font-weight: 800;
  color: color-mix(in srgb, var(--dc) 85%, white);
  line-height: 1;
}
.ds-target {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.ds-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  margin-top: 7px;
  overflow: hidden;
}
.ds-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s var(--transition-bounce);
}
.ds-done {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  color: #062b27;
  background: linear-gradient(135deg, #2dd4bf, #14b8a6);
}

/* =============================================
   NAFL SALAH & DASHBOARD SUMMARY
   ============================================= */

/* --- Home Dashboard Focus Card --- */
.journey-today-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.journey-focus-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.focus-item {
  text-align: center;
  flex: 1;
}

.focus-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.focus-value {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--color-text-primary);
}

.focus-divider {
  width: 1px;
  height: 30px;
  background: var(--color-glass-hover);
}

/* --- Nafl Hero Banner --- */
.nafl-hero-banner {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  border-radius: 24px;
  padding: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.4);
  position: relative;
  overflow: hidden;
}

@keyframes glossy-sweep {
  0% { transform: translateX(0) rotate(45deg); }
  100% { transform: translateX(150%) rotate(45deg); }
}

.nafl-hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -150%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent,
      var(--color-glass-hover),
      transparent);
  transform: rotate(45deg);
  animation: glossy-sweep 5s infinite;
}

.nafl-hero-content h3 {
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: 4px;
}

.nafl-hero-content p {
  font-size: var(--text-sm);
  opacity: 0.9;
}

.nafl-hero-icon {
  width: 80px;
  height: 80px;
  background: var(--color-glass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-surface-nested);
  box-shadow: inset 0 0 20px rgba(251, 191, 36, 0.05);
}

[data-theme="light"] .nafl-hero-icon {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.05);
}

/* --- Modern Nafl Chips --- */
.nafl-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 768px) {
  .nafl-grid {
    gap: 10px;
  }
}

.nafl-card-modern {
  background: var(--color-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}

[data-theme="light"] .nafl-card-modern {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.nafl-card-modern:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--color-glass);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.nafl-card-modern.active {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(16, 185, 129, 0.06));
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.15);
}

.nafl-card-modern.active::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -150%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent,
      var(--color-glass-hover),
      transparent);
  transform: rotate(45deg);
  animation: glossy-sweep 4s infinite linear;
}

.nafl-icon-ring {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-glass);
  border: 1px solid var(--color-surface-nested);
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.nafl-icon-ring svg {
  width: 16px;
  height: 16px;
  transition: all 0.3s ease;
}

.nafl-card-modern.active .nafl-icon-ring {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.3);
  transform: scale(1.05);
}

.nafl-card-modern.active .nafl-icon-ring svg {
  filter: drop-shadow(0 0 6px currentColor);
}

.nafl-done-seal {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: var(--color-accent-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nafl-done-seal svg {
  width: 8px;
  height: 8px;
}

.nafl-info-modern {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nafl-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 0;
  white-space: nowrap;
  line-height: 1.2;
}

.nafl-rakat {
  font-size: 9px;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

@keyframes live-pulse-anim {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Perfect Positioning for Stats Grid */
.salah-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.salah-stat-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  transition: 0.3s ease;
}

.salah-stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent-purple);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

.salah-stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--color-glass);
  margin-bottom: 4px;
}

.salah-stat-icon svg {
  width: 24px;
  height: 24px;
}

/* Premium Status Chips */
.salah-status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid transparent;
}

.salah-status-chip svg {
  width: 14px;
  height: 14px;
}

.salah-prayer-emoji svg {
  width: 28px;
  height: 28px;
}

.salah-shimmer-text {
  background: linear-gradient(90deg, #fff, var(--color-accent-gold), #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 4s linear infinite;
}

[data-theme="light"] .salah-shimmer-text {
  background: linear-gradient(90deg, #1e1b4b, #6366f1, #1e1b4b);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 4s linear infinite;
}

.h-pill.missed {
  opacity: 0.35;
}

.h-pill.missed .dot {
  background: rgba(255, 255, 255, 0.15) !important;
}

.h-pill.missed {
  color: rgba(255, 255, 255, 0.35);
}

.history-item-modern.all-missed {
  opacity: 0.6;
}

[data-theme="light"] .h-pill {
  color: #1E293B !important;
  font-weight: 700;
}

[data-theme="light"] .h-pill.missed {
  color: #64748B !important;
}

[data-theme="light"] .h-pill.missed .dot {
  background: #CBD5E1 !important;
}

/* Tahajjud Active Shine Animation */
.rakat-dial-btn.active {
  animation: rakat-glow 1.8s ease-in-out infinite;
}

@keyframes rakat-glow {

  0%,
  100% {
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.4), 0 0 15px rgba(129, 140, 248, 0.3);
  }

  50% {
    box-shadow: 0 4px 25px rgba(129, 140, 248, 0.6), 0 0 35px rgba(129, 140, 248, 0.5);
  }
}

/* =============================================
    FINANCE - Expense Tracker + Budget + Savings
    ============================================= */
.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.finance-summary-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--color-glass);
}

.finance-summary-card.income {
  border-left: 3px solid var(--fin-green);
}

.finance-summary-card.expense {
  border-left: 3px solid var(--fin-red);
}

.finance-summary-card.balance {
  border-left: 3px solid var(--fin-blue);
}

.finance-sum-icon {
  font-size: 20px;
}

.finance-sum-label {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
}

.finance-sum-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.finance-quick-add {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.finance-add-btn {
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.finance-add-btn.income {
  background: rgba(34, 197, 94, 0.2);
  color: var(--fin-green);
}

.finance-add-btn.expense {
  background: rgba(239, 68, 68, 0.2);
  color: var(--fin-red);
}

.finance-section {
  background: var(--color-glass);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.finance-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Dhikr top settings/reset button — clean teal (overrides global gold) */
#section-dhikr .section-settings-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  color: var(--color-accent-teal, #2dd4bf);
}

#section-dhikr .section-settings-btn:hover {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.3);
  color: #5eead4;
}

#section-dhikr .section-settings-btn:active {
  transform: scale(0.94);
}

[data-theme="light"] #section-dhikr .section-settings-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0d9488;
}

[data-theme="light"] #section-dhikr .section-settings-btn:hover {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.3);
  color: #0f766e;
}

.finance-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.finance-today-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--fin-red);
}

.finance-empty {
  text-align: center;
  padding: 24px;
  color: var(--color-text-muted);
}

.finance-add-goal-btn {
  margin-top: 12px;
  padding: 10px 20px;
  background: rgba(99, 102, 241, 0.2);
  border: none;
  border-radius: 10px;
  color: var(--color-accent-blue);
  cursor: pointer;
}

.finance-expenses-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finance-expense-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--color-surface-card);
  border-radius: 10px;
}

.finance-expense-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.finance-expense-details {
  flex: 1;
}

.finance-expense-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.finance-expense-meta {
  font-size: 11px;
  color: var(--color-text-muted);
}

.finance-expense-amount {
  font-size: 13px;
  font-weight: 600;
  color: var(--fin-red);
}

.finance-edit-btn {
  background: var(--color-surface-nested);
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}

.finance-budget-card {
  padding: 12px;
  background: var(--color-surface-card);
  border-radius: 12px;
}

.finance-budget-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.finance-budget-bar {
  height: 8px;
  background: var(--color-divider-strong);
  border-radius: 4px;
  overflow: hidden;
}

.finance-budget-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.finance-budget-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.finance-savings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.finance-savings-item {
  padding: 12px;
  background: var(--color-surface-card);
  border-radius: 12px;
}

.finance-savings-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.finance-savings-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.finance-savings-amount {
  font-size: 12px;
  color: var(--color-text-muted);
}

.finance-savings-bar {
  height: 6px;
  background: var(--color-divider-strong);
  border-radius: 3px;
  overflow: hidden;
}

.finance-savings-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fin-blue), var(--fin-purple));
  border-radius: 3px;
}

.finance-savings-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.finance-add-to-savings {
  padding: 4px 10px;
  background: rgba(34, 197, 94, 0.2);
  border: none;
  border-radius: 6px;
  color: var(--fin-green);
  font-size: 11px;
  cursor: pointer;
}

.finance-total-saved {
  margin-top: 12px;
  padding: 12px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}

.finance-total-saved strong {
  color: var(--fin-blue);
}

/* Finance Modal */
.finance-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 15, 28, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.finance-modal-overlay.show {
  display: flex;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.finance-modal-content {
  background: var(--color-bg-elevated);
  border-radius: 20px;
  padding: 24px;
  width: 90%;
  max-width: 340px;
}

.finance-modal-content h3 {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--color-text-primary);
}

.finance-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-divider-strong);
  border-radius: 10px;
  color: var(--color-text-primary);
  font-size: 14px;
}

.finance-input:focus {
  outline: none;
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.finance-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.finance-cancel-btn,
.finance-save-btn {
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.finance-cancel-btn {
  background: var(--color-surface-nested);
  color: var(--color-text-muted);
}

.finance-save-btn {
  background: var(--fin-blue);
  color: white;
}

.finance-save-btn.expense {
  background: var(--fin-red);
}

.finance-tool-btn {
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  background: rgba(239, 68, 68, 0.2);
  border: none;
  border-radius: 10px;
  color: var(--fin-red);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.finance-expense-item,
.finance-budget-card,
.finance-savings-item {
  transition: background var(--transition-fast, 0.2s), transform var(--transition-fast, 0.2s);
}
.finance-expense-item:hover,
.finance-budget-card:hover,
.finance-savings-item:hover {
  background: var(--color-glass-hover, var(--color-surface-nested));
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .finance-summary {
    grid-template-columns: 1fr;
  }
}

/* =============================================
    ANALYSIS - All Sections Visualization
    ============================================= */
/* ---- Light Mode Overrides for Finance Contrast ---- */
[data-theme="light"] .finance-add-btn.income,
[data-theme="light"] .finance-add-to-savings {
  background: rgba(4, 120, 87, 0.1);
}

[data-theme="light"] .finance-add-btn.expense,
[data-theme="light"] .finance-tool-btn {
  background: rgba(185, 28, 28, 0.08);
}

[data-theme="light"] .finance-total-saved {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.06);
}

[data-theme="light"] .finance-add-goal-btn {
  background: rgba(99, 102, 241, 0.1);
  color: #4F46E5;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .fin-btn-primary .fin-btn-icon {
  background: rgba(4, 120, 87, 0.1) !important;
}

[data-theme="light"] .fin-btn-secondary .fin-btn-icon {
  background: rgba(29, 78, 216, 0.1) !important;
}

[data-theme="light"] .fin-delete-btn[onclick*="showSavingsModal"] {
  background: rgba(4, 120, 87, 0.1) !important;
  border-color: rgba(4, 120, 87, 0.2) !important;
}

[data-theme="light"] .fin-delete-btn[onclick*="exportPDF"] {
  background: rgba(29, 78, 216, 0.1) !important;
  border-color: rgba(29, 78, 216, 0.2) !important;
}

[data-theme="light"] .fin-delete-btn[onclick*="deleteVault"] {
  background: rgba(185, 28, 28, 0.1) !important;
  color: var(--fin-red) !important;
}

/* History and Vault Light Mode Overrides */
[data-theme="light"] .transaction-amount.negative,
[data-theme="light"] .fin-stat-value.expense {
  color: var(--fin-red) !important;
}

[data-theme="light"] .fin-history-close,
[data-theme="light"] .fin-vault-close {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--color-text-primary);
}

[data-theme="light"] .fin-history-search-input,
[data-theme="light"] .fin-vault-search-input {
  background: #FFFFFF;
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--color-text-primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.04);
}

[data-theme="light"] .fin-history-search-input:focus {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--fin-blue);
}

[data-theme="light"] .fin-vault-search-input:focus {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--fin-green);
}

[data-theme="light"] .fin-filter-pill {
  background: #F5F3FF;
  border: 1px solid rgba(99, 102, 241, 0.12);
  color: #475569;
}

[data-theme="light"] .fin-filter-pill:hover {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .fin-filter-pill.active {
  background: var(--fin-blue);
  color: #fff;
  border-color: var(--fin-blue);
}

.analysis-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.analysis-score-card {
  background: var(--color-glass);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.analysis-score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.analysis-score-value {
  font-size: 28px;
  font-weight: 700;
  color: white;
}

.analysis-score-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
}

.analysis-score-details {
  font-size: 16px;
  color: var(--color-text-primary);
}

.analysis-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.analysis-quick-stat {
  background: var(--color-glass);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
}

.analysis-quick-num {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.analysis-quick-label {
  font-size: 10px;
  color: var(--color-text-muted);
}

.analysis-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.analysis-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--color-glass);
  border: none;
  border-radius: 20px;
  color: var(--color-text-muted);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.analysis-tab.active {
  background: rgba(99, 102, 241, 0.3);
  color: var(--color-accent-blue);
}

.analysis-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.analysis-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.analysis-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.analysis-stat-card {
  background: var(--color-glass);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}

.analysis-stat-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.analysis-stat-label {
  font-size: 11px;
  color: var(--color-text-muted);
}

.analysis-chart-section {
  background: var(--color-glass);
  border-radius: 16px;
  padding: 16px;
}

.analysis-chart-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

/* Heatmap */
.analysis-heatmap-grid {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.analysis-heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* Bar Chart */
.analysis-bar-chart {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 120px;
  gap: 8px;
}

.analysis-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.analysis-bar-track {
  flex: 1;
  width: 100%;
  background: var(--color-surface-nested);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  min-height: 60px;
}

.analysis-bar-fill {
  width: 100%;
  border-radius: 4px;
  transition: height 0.3s;
}

.analysis-bar-label {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.analysis-bar-value {
  font-size: 9px;
  color: var(--color-text-muted);
}

/* Donut */
.analysis-donut-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.analysis-donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(from 0deg, #f97316 0% 20%, #3b82f6 20% 40%, #8b5cf6 40% 60%, #ec4899 60% 80%, #06b6d4 80% 100%);
}

.analysis-donut-segment {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.analysis-donut-legend {
  flex: 1;
}

.analysis-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.analysis-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Line Chart */
.analysis-line-chart {
  display: flex;
  align-items: flex-end;
  height: 100px;
  gap: 4px;
}

.analysis-line-point {
  flex: 1;
  display: flex;
  align-items: flex-end;
}

.analysis-line-bar {
  width: 100%;
  background: linear-gradient(to top, #8b5cf6, #6366f1);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}

/* Type Bars */
.analysis-type-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analysis-type-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.analysis-type-name {
  width: 100px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.analysis-type-track {
  flex: 1;
  height: 8px;
  background: var(--color-surface-nested);
  border-radius: 4px;
}

.analysis-type-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 4px;
}

.analysis-type-count {
  width: 40px;
  text-align: right;
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Points Grid */
.analysis-points-grid {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.analysis-point-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* Calendar Clean */
.analysis-calendar-clean {
  padding: 10px;
  background: var(--color-surface-card);
  border-radius: 12px;
}

.analysis-calendar-header {
  display: flex;
  justify-content: space-around;
  margin-bottom: 8px;
  font-size: 10px;
  color: var(--color-text-muted);
}

.analysis-calendar-days {
  display: flex;
  justify-content: space-around;
}

.analysis-calendar-day {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--color-surface-nested);
  font-size: 12px;
  color: var(--color-text-muted);
}

.analysis-calendar-day.clean {
  background: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

/* Badge Progress */
.analysis-badge-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.analysis-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  min-width: 60px;
  opacity: 0.4;
}

.analysis-badge-item.earned {
  opacity: 1;
  background: rgba(34, 197, 94, 0.15);
}

.analysis-badge-emoji {
  font-size: 20px;
}

.analysis-badge-days {
  font-size: 10px;
  color: var(--color-text-muted);
}

.analysis-badge-name {
  font-size: 9px;
  color: var(--color-text-muted);
}

/* Expense Chart */
.analysis-expense-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analysis-expense-item {
  position: relative;
  height: 28px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  overflow: hidden;
}

.analysis-expense-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 6px;
}

.analysis-expense-label {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--color-text-primary);
}

.analysis-expense-value {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--color-text-muted);
}

/* Trend Chart */
.analysis-trend-chart {
  height: 120px;
}

.analysis-trend-bars {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 90px;
  gap: 6px;
}

.analysis-trend-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.analysis-trend-group {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.analysis-trend-bar {
  flex: 1;
  border-radius: 2px;
  min-height: 4px;
}

.analysis-trend-bar.income {
  background: #22c55e;
}

.analysis-trend-bar.expense {
  background: #ef4444;
}

.analysis-trend-item span {
  font-size: 9px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.analysis-trend-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.analysis-trend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.analysis-trend-dot.income {
  background: #22c55e;
}

.analysis-trend-dot.expense {
  background: #ef4444;
}

/* Range Selector */
.analysis-range-selector {
  display: flex;
  gap: 4px;
}

.analysis-range-selector button {
  padding: 6px 12px;
  background: var(--color-surface-nested);
  border: none;
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: 12px;
  cursor: pointer;
}

.analysis-range-selector button.active {
  background: rgba(99, 102, 241, 0.3);
  color: var(--color-accent-blue);
}

.analysis-score-sub {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.analysis-empty {
  padding: 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}

.analysis-insights {
  background: var(--color-glass);
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
}

.analysis-insights-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.analysis-insight {
  padding: 10px 12px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.analysis-prayer-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.analysis-prayer-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.analysis-prayer-info {
  flex: 1;
}

.analysis-prayer-name {
  display: block;
  font-size: 13px;
  color: var(--color-text-primary);
}

.analysis-prayer-bar {
  height: 6px;
  background: var(--color-divider-strong);
  border-radius: 3px;
  margin-top: 4px;
}

.analysis-prayer-fill {
  height: 100%;
  border-radius: 3px;
}

.analysis-prayer-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.analysis-time-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analysis-time-item {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.analysis-time-label {
  font-size: 13px;
  color: var(--color-text-primary);
}

.analysis-time-value {
  font-size: 12px;
  color: var(--color-text-muted);
}

.analysis-comparison {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.analysis-comp-item {
  flex: 1;
  text-align: center;
}

.analysis-comp-item span {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
}

.analysis-comp-item strong {
  display: block;
  font-size: 20px;
  color: var(--color-text-primary);
  margin-top: 4px;
}

.analysis-comp-change {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.analysis-comp-change.positive {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.analysis-comp-change.negative {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.analysis-nafl-breakdown {
  display: flex;
  gap: 12px;
}

.analysis-nafl-item {
  flex: 1;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.analysis-nafl-item.tahajjud {
  background: rgba(139, 92, 246, 0.15);
}

.analysis-nafl-item.witr {
  background: rgba(251, 191, 36, 0.15);
}

.analysis-nafl-item.sunnah {
  background: rgba(34, 197, 94, 0.15);
}

.analysis-nafl-icon {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.analysis-nafl-name {
  display: block;
  font-size: 13px;
  color: var(--color-text-primary);
}

.analysis-nafl-value {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.analysis-habit-stat {
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  margin-bottom: 8px;
}

.analysis-habit-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.analysis-habit-bars {
  font-size: 12px;
  color: var(--color-text-muted);
}

.analysis-savings-item {
  margin-bottom: 12px;
}

.analysis-savings-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.analysis-savings-bar {
  height: 8px;
  background: var(--color-divider-strong);
  border-radius: 4px;
}

.analysis-savings-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 4px;
}

.negative .analysis-stat-num {
  color: #ef4444;
}

.analysis-coming-soon {
  text-align: center;
  padding: 80px 20px;
}

.coming-soon-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.analysis-coming-soon h2 {
  font-size: 24px;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.analysis-coming-soon p {
  color: var(--color-text-muted);
  font-size: 14px;
}

.coming-soon-desc {
  font-size: 12px !important;
  color: var(--color-text-muted) !important;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .analysis-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .analysis-quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .analysis-tabs {
    justify-content: flex-start;
  }

  .analysis-nafl-breakdown {
    flex-direction: column;
  }
}

