/* ══════════════════════════════════════════════════════════════
   IA Subscription Dashboard — Premium Membership Management
   WeissGuitar brand: dark glass, purple/pink accents
   Patterns from Spotify, Netflix, MasterClass research
   ══════════════════════════════════════════════════════════════ */

/* ── PayPlus hosted fields (card update modal) ── */
.__payplus_hosted_fields_item_fld-frame{width:100% !important;height:44px !important;border:none !important}
.__payplus_hosted_fields_err_fld{border-color:#ef4444 !important;box-shadow:0 0 0 3px rgba(239,68,68,0.15) !important}
.ia-pop-hf .__payplus_hosted_fields_item_fld-wrapper,.__payplus_hosted_fields_item_fld-wrapper{display:block !important}

/* ── Dashboard container ── */
.ia-dash {
  margin-top: 24px;
  padding: 28px 24px;
  background: var(--bg-card, rgba(18, 14, 32, 0.55));
  backdrop-filter: var(--glass-blur, blur(20px) saturate(180%));
  -webkit-backdrop-filter: var(--glass-blur, blur(20px) saturate(180%));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
  border-radius: var(--radius-lg, 24px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.ia-dash::before {
  content: '';
  position: absolute; top: 0; left: 5%; right: 5%; height: 1.5px;
  background: var(--glass-line);
}

/* ── Header ── */
.ia-dash-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.ia-dash-title {
  font-weight: 700; font-size: 16px; color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}
.ia-dash-title-icon {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--purple, #6036e8), var(--pink, #ca3fa0));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ia-dash-title-icon svg { width: 16px; height: 16px; }

/* ── Status badge ── */
.ia-dash-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 9999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.ia-dash-status.active { background: rgba(52, 211, 153, 0.12); color: #34d399; }
.ia-dash-status.trial { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.ia-dash-status.paused { background: rgba(96, 165, 250, 0.12); color: #60a5fa; }
.ia-dash-status.cancelled { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }
.ia-dash-status.past-due { background: rgba(248, 113, 113, 0.12); color: #f87171; }
.ia-dash-status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  animation: ia-dot-pulse 2s ease-in-out infinite;
}
@keyframes ia-dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.ia-dash-status.cancelled .ia-dash-status-dot,
.ia-dash-status.paused .ia-dash-status-dot { animation: none; opacity: 0.6; }

/* ── Info grid ── */
.ia-dash-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 16px; margin-bottom: 20px;
}
.ia-dash-item { display: flex; flex-direction: column; gap: 4px; }
.ia-dash-label {
  font-size: 11px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
.ia-dash-value {
  font-size: 15px; color: var(--text-primary); font-weight: 600;
  overflow-wrap: break-word; word-break: break-word;
}
.ia-dash-value-sub {
  font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 1px;
}

/* ── Card brand icons ── */
.ia-dash-card-icon {
  display: inline-flex; align-items: center; gap: 6px;
}
.ia-dash-card-brand {
  font-size: 11px; color: var(--text-muted); font-weight: 500;
}

/* ── Quick actions row ── */
.ia-dash-quick {
  display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.ia-dash-quick-btn {
  flex: 1; min-width: 120px; min-height: var(--tap-min, 44px); padding: 12px 16px;
  background: var(--bg-hover, rgba(96,54,232,0.08));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 10px);
  display: flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.2s var(--ease-out);
}
.ia-dash-quick-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(96, 54, 232, 0.12);
}
.ia-dash-quick-btn:focus-visible {
  outline: 2px solid var(--pink); outline-offset: 2px;
}
.ia-dash-quick-btn svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }

/* ── Plan comparison cards ── */
.ia-dash-plans {
  display: none; /* hidden until "Switch Plan" clicked */
  margin-bottom: 20px;
}
.ia-dash-plans.open { display: block; }
.ia-dash-plans-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 12px;
}
.ia-dash-plans-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.ia-dash-plan-card {
  padding: 20px; border-radius: var(--radius-md, 16px);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass, rgba(255,255,255,0.04));
  transition: all 0.2s var(--ease-out);
  cursor: pointer; position: relative;
}
.ia-dash-plan-card:hover {
  border-color: rgba(96, 54, 232, 0.3);
  background: rgba(96, 54, 232, 0.06);
}
.ia-dash-plan-card.current {
  border-color: rgba(96, 54, 232, 0.4);
  background: rgba(96, 54, 232, 0.08);
  cursor: default;
}
.ia-dash-plan-card.recommended {
  border-color: rgba(52, 211, 153, 0.3);
}
.ia-dash-plan-name {
  font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px;
}
.ia-dash-plan-price {
  font-size: 24px; font-weight: 800; color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}
.ia-dash-plan-price span { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.ia-dash-plan-detail {
  font-size: 12px; color: var(--text-muted); margin-top: 4px;
}
.ia-dash-plan-badge {
  position: absolute; top: -8px; right: 12px;
  padding: 3px 10px; border-radius: 9999px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.ia-dash-plan-badge.current-badge {
  background: rgba(96, 54, 232, 0.2); color: #a78bfa;
}
.ia-dash-plan-badge.save-badge {
  background: rgba(52, 211, 153, 0.2); color: #34d399;
}
.ia-dash-plan-switch {
  margin-top: 12px; padding: 12px 16px; width: 100%; min-height: var(--tap-min, 44px);
  border-radius: 8px; border: none;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.ia-dash-plan-switch.primary {
  background: linear-gradient(135deg, var(--purple), #7c5ce8);
  color: #fff; box-shadow: 0 4px 12px rgba(96,54,232,0.3);
}
.ia-dash-plan-switch.primary:hover {
  transform: translateY(-1px); box-shadow: 0 6px 16px rgba(96,54,232,0.4);
}
.ia-dash-plan-switch:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.ia-dash-plan-switch.disabled {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-subtle); cursor: default;
}

/* ── Billing history ── */
.ia-dash-billing { display: none; margin-bottom: 20px; }
.ia-dash-billing.open { display: block; }
.ia-dash-billing-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 12px;
}
.ia-dash-billing-list { display: flex; flex-direction: column; gap: 8px; }
.ia-dash-billing-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: var(--radius-sm, 10px);
  background: var(--bg-glass, rgba(255,255,255,0.04));
  border: 1px solid var(--border-subtle);
  overflow-wrap: break-word; word-break: break-word;
}
.ia-dash-billing-date { font-size: 13px; color: var(--text-secondary); }
.ia-dash-billing-amount { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.ia-dash-billing-receipt {
  font-size: 12px; color: #a78bfa; text-decoration: none;
  cursor: pointer; background: none; border: none; font-family: inherit;
  padding: 8px 4px; min-height: var(--tap-min, 44px); display: inline-flex; align-items: center;
}
.ia-dash-billing-receipt:hover { text-decoration: underline; }

/* ── Bottom actions (cancel/pause) ── */
.ia-dash-bottom {
  padding-top: 16px; border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}
.ia-dash-bottom-link {
  font-size: 13px; color: var(--text-muted); cursor: pointer;
  background: none; border: none; font-family: inherit;
  transition: color 0.2s; padding: 10px 4px; min-height: var(--tap-min, 44px);
}
.ia-dash-bottom-link:hover { color: var(--text-secondary); }
.ia-dash-bottom-link:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ── Alerts ── */
.ia-dash-alert {
  padding: 12px 16px; border-radius: var(--radius-sm, 10px);
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.15);
  font-size: 13px; color: #f87171; line-height: 1.5; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.ia-dash-grace {
  padding: 12px 16px; border-radius: var(--radius-sm, 10px);
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.15);
  font-size: 13px; color: #fbbf24; line-height: 1.5; margin-bottom: 16px;
}
.ia-dash-paused-msg {
  padding: 12px 16px; border-radius: var(--radius-sm, 10px);
  background: rgba(96, 165, 250, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.15);
  font-size: 13px; color: #60a5fa; line-height: 1.5; margin-bottom: 16px;
}

/* ── Cancel modal ── */
.ia-dash-modal-overlay {
  position: fixed; inset: 0; z-index: 99998;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.ia-dash-modal-overlay.active { display: flex; }
.ia-dash-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 5, 16, 0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.ia-dash-modal {
  position: relative; width: 100%; max-width: 440px;
  background: var(--bg-sidebar, #1E192D);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
  border-radius: var(--radius-lg, 24px);
  padding: 32px 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 80px rgba(96,54,232,0.06);
  animation: ia-modal-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.ia-dash-modal::before {
  content: ''; position: absolute; top: 0; left: 5%; right: 5%; height: 1.5px;
  background: var(--glass-line);
}
@keyframes ia-modal-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.ia-dash-modal-title {
  font-weight: 700; font-size: 18px; color: var(--text-primary); margin: 0 0 8px;
  overflow-wrap: break-word;
}
.ia-dash-modal-text {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 20px;
  overflow-wrap: break-word;
}
.ia-dash-modal-highlight { color: var(--text-primary); font-weight: 600; }

/* ── What you'll lose ── */
.ia-dash-lose-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.ia-dash-lose-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.04);
  border: 1px solid rgba(248, 113, 113, 0.08);
  font-size: 13px; color: var(--text-secondary);
}
.ia-dash-lose-item svg { flex-shrink: 0; opacity: 0.5; }

/* ── Reason selector ── */
.ia-dash-reasons { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.ia-dash-reason {
  padding: 12px 16px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 10px); background: transparent;
  color: var(--text-secondary); font-family: inherit; font-size: 13px;
  cursor: pointer; text-align: left; transition: all 0.2s;
  min-height: var(--tap-min, 44px);
}
.ia-dash-reason:hover { border-color: rgba(255,255,255,0.15); color: var(--text-primary); }
.ia-dash-reason.selected { border-color: var(--purple); background: rgba(96,54,232,0.08); color: var(--text-primary); }
.ia-dash-reason:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ── Save offer ── */
.ia-dash-offer {
  padding: 20px; border-radius: var(--radius-md, 16px);
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.15);
  margin-bottom: 20px; text-align: center;
}
.ia-dash-offer-title {
  font-size: 16px; font-weight: 700; color: #34d399; margin: 0 0 6px;
}
.ia-dash-offer-desc {
  font-size: 13px; color: var(--text-secondary); margin: 0 0 14px; line-height: 1.5;
}
.ia-dash-offer-btn {
  padding: 10px 24px; border-radius: 10px;
  background: rgba(52, 211, 153, 0.15); color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.ia-dash-offer-btn:hover { background: rgba(52, 211, 153, 0.25); }
.ia-dash-offer-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.ia-dash-billing-receipt:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.ia-dash-savings-nudge:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ── Pause picker ── */
.ia-dash-pause-options {
  display: flex; gap: 8px; margin-bottom: 16px; justify-content: center; flex-wrap: wrap;
}
.ia-dash-pause-opt {
  padding: 10px 20px; border-radius: 10px; min-height: var(--tap-min, 44px);
  border: 1px solid var(--border-subtle);
  background: transparent; color: var(--text-secondary);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.ia-dash-pause-opt:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.ia-dash-pause-opt:hover { border-color: rgba(96, 165, 250, 0.3); color: #60a5fa; }
.ia-dash-pause-opt.selected { border-color: #60a5fa; background: rgba(96, 165, 250, 0.1); color: #60a5fa; }

/* ── Modal actions ── */
.ia-dash-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.ia-dash-modal-btn {
  padding: 10px 24px; border-radius: 10px; min-height: var(--tap-min, 44px);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none;
}
.ia-dash-modal-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.ia-dash-modal-btn.keep {
  background: linear-gradient(135deg, var(--purple, #6036e8), #7c5ce8);
  color: #fff; box-shadow: 0 4px 12px rgba(96,54,232,0.3);
}
.ia-dash-modal-btn.keep:hover { transform: translateY(-1px); }
.ia-dash-modal-btn.cancel {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
.ia-dash-modal-btn.cancel:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.15); }

/* ── Savings nudge (monthly users) ── */
.ia-dash-savings-nudge {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; margin-bottom: 16px; min-height: var(--tap-min, 44px);
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.12);
  border-radius: var(--radius-sm, 10px);
  font-size: 13px; font-weight: 600; color: #34d399;
  cursor: pointer; transition: all 0.2s;
}
.ia-dash-savings-nudge:hover {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.2);
}
.ia-dash-savings-nudge svg:last-child { margin-left: auto; }

/* ── Plan price (large) ── */
.ia-dash-plan-price-big {
  font-size: 32px; font-weight: 800; color: var(--text-primary);
  font-family: 'Inter', sans-serif; line-height: 1.1; margin: 8px 0 4px;
}
.ia-dash-plan-price-big span {
  font-size: 15px; font-weight: 400; color: var(--text-muted);
}

/* ── Plan feature list ── */
.ia-dash-plan-features {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: flex; flex-direction: column; gap: 6px;
}
.ia-dash-plan-features li {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-secondary);
}
.ia-dash-plan-features li svg { flex-shrink: 0; }

/* ── Plan switch confirm ── */
.ia-dash-confirm-card {
  padding: 20px; border-radius: var(--radius-md, 16px);
  background: var(--bg-glass, rgba(255,255,255,0.04));
  border: 1px solid var(--border-subtle);
}
.ia-dash-confirm-title {
  font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px;
}
.ia-dash-confirm-text {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px;
}
.ia-dash-confirm-text strong { color: var(--text-primary); }
.ia-dash-confirm-detail {
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); margin-bottom: 16px;
}
.ia-dash-confirm-row {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--text-secondary); padding: 4px 0;
}
.ia-dash-confirm-row.total {
  font-weight: 700; color: var(--text-primary); font-size: 15px;
  border-top: 1px solid var(--border-subtle); margin-top: 8px; padding-top: 8px;
}
.ia-dash-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── Billing history (enhanced) ── */
.ia-dash-billing-left { display: flex; flex-direction: column; gap: 2px; }
.ia-dash-billing-right { display: flex; align-items: center; gap: 12px; }
.ia-dash-billing-desc { font-size: 11px; color: var(--text-muted); }

/* ── Trial progress bar ── */
.ia-dash-trial-bar {
  height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.06); margin-bottom: 6px; overflow: hidden;
}
.ia-dash-trial-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  transition: width 0.6s var(--ease-out);
}
.ia-dash-trial-text {
  font-size: 12px; color: #fbbf24; font-weight: 600; margin-bottom: 16px;
}

/* ── Quick button variants ── */
.ia-dash-quick-urgent {
  flex: 2; border-color: rgba(248, 113, 113, 0.3); color: #f87171;
}
.ia-dash-quick-urgent:hover { border-color: rgba(248, 113, 113, 0.5); background: rgba(248, 113, 113, 0.08); }
.ia-dash-quick-primary {
  border-color: rgba(96, 54, 232, 0.3); color: #a78bfa;
}
.ia-dash-quick-primary:hover { border-color: rgba(96, 54, 232, 0.5); background: rgba(96, 54, 232, 0.12); }
.ia-dash-quick-success {
  border-color: rgba(52, 211, 153, 0.3); color: #34d399;
}
.ia-dash-quick-success:hover { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.08); }

/* ══════════════════════════════════════════════════════════════
   VALUE REINFORCEMENT SECTION
   ══════════════════════════════════════════════════════════════ */

/* ── Welcome state (new users, no progress yet) ── */
.ia-dash-welcome {
  padding: 20px; margin-bottom: 20px;
  border-radius: var(--radius-md, 16px);
  background: linear-gradient(135deg, rgba(96,54,232,0.08), rgba(202,63,160,0.04));
  border: 1px solid rgba(96, 54, 232, 0.15);
  text-align: center;
}
.ia-dash-welcome-title {
  font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px;
}
.ia-dash-welcome-text {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
}

/* ── Journey progress bar ── */
.ia-dash-progress-wrap {
  margin-bottom: 20px;
}
.ia-dash-progress-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.ia-dash-progress-label {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ia-dash-progress-pct {
  font-size: 13px; font-weight: 700; color: #a78bfa;
}
.ia-dash-progress-bar {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.06); overflow: hidden;
}
.ia-dash-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--purple, #6036e8), var(--pink, #ca3fa0));
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.ia-dash-progress-fill::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  animation: ia-progress-shine 2s ease-in-out infinite;
}
@keyframes ia-progress-shine {
  0%, 100% { opacity: 0; } 50% { opacity: 1; }
}
.ia-dash-progress-sub {
  font-size: 12px; color: var(--text-muted); margin-top: 6px;
}

/* ── Value stats row ── */
.ia-dash-value-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.ia-dash-stat {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 14px 8px;
  background: var(--bg-glass, rgba(255,255,255,0.04));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 10px);
  transition: all 0.2s var(--ease-out);
}
.ia-dash-stat:hover {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
}
.ia-dash-stat-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.ia-dash-stat-icon svg { width: 16px; height: 16px; }
.ia-dash-stat-purple { background: rgba(96, 54, 232, 0.15); color: #a78bfa; }
.ia-dash-stat-orange { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.ia-dash-stat-green { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.ia-dash-stat-pink { background: rgba(202, 63, 160, 0.15); color: #e879a8; }
.ia-dash-stat-num {
  font-size: 22px; font-weight: 800; color: var(--text-primary);
  line-height: 1; font-family: 'Inter', sans-serif;
}
.ia-dash-stat-label {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── Next lesson CTA ── */
.ia-dash-next-lesson {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(96,54,232,0.1), rgba(202,63,160,0.06));
  border: 1px solid rgba(96, 54, 232, 0.2);
  border-radius: var(--radius-sm, 10px);
  text-decoration: none; cursor: pointer;
  transition: all 0.25s var(--ease-out);
  min-height: var(--tap-min, 44px);
}
.ia-dash-next-lesson:hover {
  border-color: rgba(96, 54, 232, 0.4);
  background: linear-gradient(135deg, rgba(96,54,232,0.15), rgba(202,63,160,0.1));
  transform: translateY(-1px);
}
.ia-dash-next-lesson:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.ia-dash-next-left { display: flex; flex-direction: column; gap: 2px; }
.ia-dash-next-badge {
  font-size: 10px; font-weight: 700; color: #a78bfa;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.ia-dash-next-title {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
}
.ia-dash-next-sub {
  font-size: 12px; color: var(--text-muted);
}
.ia-dash-next-arrow {
  color: #a78bfa; opacity: 0.6; transition: all 0.2s;
}
.ia-dash-next-lesson:hover .ia-dash-next-arrow {
  opacity: 1; transform: translateX(3px);
}

/* ── Member since ── */
.ia-dash-member-since {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted); margin-bottom: 16px;
  padding: 0 2px;
}
.ia-dash-member-since svg { opacity: 0.5; flex-shrink: 0; }

/* ── Cancelled value reminder ── */
.ia-dash-cancelled-value {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 16px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: rgba(96, 54, 232, 0.04);
  border: 1px solid rgba(96, 54, 232, 0.1);
}

/* ══════════════════════════════════════════════════════════════
   PLAN SECTION (collapsible)
   ══════════════════════════════════════════════════════════════ */

.ia-dash-plan-section {
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
}
.ia-dash-plan-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px 0; min-height: var(--tap-min, 44px);
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); transition: color 0.2s;
}
.ia-dash-plan-toggle:hover { color: var(--text-primary); }
.ia-dash-plan-toggle:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.ia-dash-plan-toggle-chevron {
  transition: transform 0.3s var(--ease-out);
}
.ia-dash-plan-toggle.open .ia-dash-plan-toggle-chevron {
  transform: rotate(180deg);
}

.ia-dash-plan-body {
  display: none; padding-bottom: 4px;
}
.ia-dash-plan-body.open { display: block; }

/* ── Elevated recommended plan ── */
.ia-dash-plan-elevated {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(52,211,153,0.08), 0 0 0 1px rgba(52,211,153,0.2);
}
.ia-dash-plan-elevated:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 32px rgba(52,211,153,0.12), 0 0 0 1px rgba(52,211,153,0.3);
}

/* ══════════════════════════════════════════════════════════════
   SKELETON LOADING
   ══════════════════════════════════════════════════════════════ */

.ia-dash-loading { pointer-events: none; }
.ia-dash-skel {
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  position: relative; overflow: hidden;
}
.ia-dash-skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: ia-skel-shimmer 1.5s ease-in-out infinite;
}
@keyframes ia-skel-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.ia-dash-skel-line { border-radius: 4px; }
.ia-dash-skel-pill { border-radius: 9999px; }
.ia-dash-skel-circle { width: 32px; height: 32px; border-radius: 10px; }

/* ══════════════════════════════════════════════════════════════
   ENTRANCE ANIMATION
   ══════════════════════════════════════════════════════════════ */

.ia-dash-enter {
  opacity: 0; transform: translateY(12px);
}
.ia-dash:not(.ia-dash-enter) {
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1; transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   SUCCESS MICRO-FEEDBACK
   ══════════════════════════════════════════════════════════════ */

.ia-dash-success-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg-card, rgba(18, 14, 32, 0.92));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg, 24px);
  animation: ia-success-in 0.3s var(--ease-out);
}
.ia-dash-success-check {
  animation: ia-success-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ia-dash-success-msg {
  font-size: 16px; font-weight: 700; color: #34d399; margin-top: 12px;
}
.ia-dash-success-out {
  opacity: 0; transition: opacity 0.3s ease;
}
@keyframes ia-success-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ia-success-pop { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }

/* ══════════════════════════════════════════════════════════════
   MOBILE BOTTOM SHEET
   ══════════════════════════════════════════════════════════════ */

.ia-dash-sheet-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.2);
  margin: 0 auto 16px;
}

@media (max-width: 600px) {
  .ia-dash-bottom-sheet .ia-dash-modal {
    position: fixed; bottom: 0; left: 0; right: 0;
    max-width: 100%; border-radius: 24px 24px 0 0;
    padding: 16px 20px 32px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    animation: ia-sheet-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .ia-dash-bottom-sheet .ia-dash-modal::before {
    left: 10%; right: 10%;
  }
  @keyframes ia-sheet-up {
    from { transform: translateY(100%); } to { transform: translateY(0); }
  }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  .ia-dash { padding: 20px 16px; }
  .ia-dash-value-stats { grid-template-columns: repeat(2, 1fr); }
  .ia-dash-grid { grid-template-columns: 1fr 1fr; }
  .ia-dash-quick { flex-direction: column; }
  .ia-dash-quick-btn { min-width: auto; }
  .ia-dash-plans-grid { grid-template-columns: 1fr; }
  .ia-dash-plan-elevated { transform: none; }
  .ia-dash-plan-elevated:hover { transform: none; }
  .ia-dash-modal { padding: 24px 20px; }
  .ia-dash-modal-actions { flex-direction: column; }
  .ia-dash-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
  .ia-dash-billing-item { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .ia-dash-status-dot { animation: none; }
  .ia-dash-modal { animation: none; }
  .ia-dash-progress-fill::after { animation: none; }
  .ia-dash-skel::after { animation: none; }
  .ia-dash-success-check { animation: none; }
  .ia-dash-enter { opacity: 1; transform: none; }
  .ia-dash:not(.ia-dash-enter) { transition: none; }
  .ia-dash-next-lesson:hover { transform: none; }
  .ia-dash-plan-elevated:hover { transform: none; }
  .ia-dash-modal-btn.keep:hover { transform: none; }
  @keyframes ia-sheet-up { from { transform: none; } to { transform: none; } }
}

/* ── Toast notifications ── */
.ia-dash-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 12px 24px; border-radius: 12px; z-index: 99999;
  font-family: var(--font-body, 'Inter', sans-serif); font-size: 14px; font-weight: 600;
  opacity: 0; transition: all 0.3s var(--ease-out, cubic-bezier(0.16,1,0.3,1));
  max-width: 90vw; text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.ia-dash-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ia-dash-toast-error {
  background: rgba(248, 113, 113, 0.95); color: #fff;
}
.ia-dash-toast-success {
  background: rgba(52, 211, 153, 0.95); color: #fff;
}
@media (max-width: 600px) {
  .ia-dash-toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Light theme ── */
[data-theme="light"] .ia-dash { background: var(--bg-card); }
[data-theme="light"] .ia-dash-stat { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .ia-dash-stat:hover { background: rgba(0,0,0,0.05); }
[data-theme="light"] .ia-dash-next-lesson { background: linear-gradient(135deg, rgba(96,54,232,0.06), rgba(202,63,160,0.03)); }
[data-theme="light"] .ia-dash-progress-bar { background: rgba(0,0,0,0.06); }
[data-theme="light"] .ia-dash-trial-bar { background: rgba(0,0,0,0.08); }
[data-theme="light"] .ia-dash-plan-card { background: rgba(255,255,255,0.6); }
[data-theme="light"] .ia-dash-billing-item { background: rgba(255,255,255,0.6); }
[data-theme="light"] .ia-dash-modal { background: var(--bg-sidebar); }
[data-theme="light"] .ia-dash-skel { background: rgba(0,0,0,0.06); }
[data-theme="light"] .ia-dash-skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); }
[data-theme="light"] .ia-dash-success-overlay { background: rgba(255,255,255,0.92); }
[data-theme="light"] .ia-dash-sheet-handle { background: rgba(0,0,0,0.15); }
[data-theme="light"] .ia-dash-confirm-detail { background: rgba(0,0,0,0.03); }
/* Light theme contrast: darken colored text for 4.5:1 on light backgrounds */
[data-theme="light"] .ia-dash-status.active { color: #047857; background: rgba(5,150,105,0.1); }
[data-theme="light"] .ia-dash-status.trial { color: #92400e; background: rgba(146,64,14,0.1); }
[data-theme="light"] .ia-dash-status.past-due { color: #b91c1c; background: rgba(185,28,28,0.08); }
[data-theme="light"] .ia-dash-status.paused { color: #1d4ed8; background: rgba(29,78,216,0.08); }
[data-theme="light"] .ia-dash-alert { color: #b91c1c; border-color: rgba(185,28,28,0.2); background: rgba(185,28,28,0.04); }
[data-theme="light"] .ia-dash-grace { color: #92400e; border-color: rgba(146,64,14,0.2); background: rgba(146,64,14,0.04); }
[data-theme="light"] .ia-dash-paused-msg { color: #1d4ed8; border-color: rgba(29,78,216,0.2); background: rgba(29,78,216,0.04); }
[data-theme="light"] .ia-dash-trial-text { color: #92400e; }
[data-theme="light"] .ia-dash-trial-fill { background: linear-gradient(90deg, #d97706, #b45309); }
[data-theme="light"] .ia-dash-savings-nudge { color: #047857; border-color: rgba(5,150,105,0.2); background: rgba(5,150,105,0.04); }
[data-theme="light"] .ia-dash-quick-urgent { color: #b91c1c; border-color: rgba(185,28,28,0.2); }
[data-theme="light"] .ia-dash-quick-primary { color: #4c1d95; border-color: rgba(76,29,149,0.2); }
[data-theme="light"] .ia-dash-quick-success { color: #047857; border-color: rgba(5,150,105,0.2); }
[data-theme="light"] .ia-dash-offer-title { color: #047857; }
[data-theme="light"] .ia-dash-offer-btn { color: #047857; border-color: rgba(5,150,105,0.3); background: rgba(5,150,105,0.08); }
[data-theme="light"] .ia-dash-plan-badge.save-badge { color: #047857; background: rgba(5,150,105,0.1); }
[data-theme="light"] .ia-dash-plan-badge.current-badge { color: #4c1d95; background: rgba(76,29,149,0.1); }
[data-theme="light"] .ia-dash-plan-switch.primary { background: linear-gradient(135deg, #4c1d95, #6d28d9); }
[data-theme="light"] .ia-dash-progress-pct { color: #4c1d95; }
[data-theme="light"] .ia-dash-next-badge { color: #4c1d95; }
[data-theme="light"] .ia-dash-next-arrow { color: #4c1d95; }
[data-theme="light"] .ia-dash-billing-receipt { color: #4c1d95; }
[data-theme="light"] .ia-dash-cancelled-value { border-color: rgba(76,29,149,0.1); }
[data-theme="light"] .ia-dash-status.cancelled { color: #374151; background: rgba(107,114,128,0.1); }
[data-theme="light"] .ia-dash-stat-purple { background: rgba(96,54,232,0.08); color: #6d28d9; }
[data-theme="light"] .ia-dash-stat-orange { background: rgba(251,191,36,0.08); color: #92400e; }
[data-theme="light"] .ia-dash-stat-green { background: rgba(52,211,153,0.08); color: #047857; }
[data-theme="light"] .ia-dash-stat-pink { background: rgba(202,63,160,0.08); color: #be185d; }
[data-theme="light"] .ia-dash-modal-btn.cancel:hover { border-color: rgba(0,0,0,0.15); }
[data-theme="light"] .ia-dash-success-msg { color: #047857; }
