/* ============================================
   PulseFi — Full Desktop Web Dashboard
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --color-primary: #0D2137;
  --color-primary-light: #1A3A5C;
  --color-accent-teal: #00B894;
  --color-accent-green: #2ECC71;
  --color-accent-orange: #E8A838;
  --color-accent-red: #E74C3C;
  --color-accent-purple: #6C5CE7;
  --color-accent-blue: #4A90D9;

  --color-bg: #F0F3F8;
  --color-white: #FFFFFF;
  --color-text-primary: #0D2137;
  --color-text-secondary: #7B8794;
  --color-text-muted: #A0AEC0;
  --color-border: #E8ECF0;

  --gradient-balance: linear-gradient(135deg, #0D2137 0%, #1A3A5C 50%, #2A5A8C 100%);
  --gradient-pulse: linear-gradient(135deg, #6C5CE7 0%, #00B894 100%);
  --gradient-portfolio: linear-gradient(135deg, #6C5CE7 0%, #4A90D9 100%);
  --gradient-sidebar: linear-gradient(180deg, #0D2137 0%, #162D46 100%);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-pill: 100px;

  --shadow-sm: 0 1px 3px rgba(13, 33, 55, 0.06);
  --shadow-md: 0 4px 16px rgba(13, 33, 55, 0.08);
  --shadow-lg: 0 8px 32px rgba(13, 33, 55, 0.12);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;

  --sidebar-width: 260px;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text-primary);
  min-height: 100vh;
  display: flex;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--gradient-sidebar);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  padding: 28px 0;
  transition: transform 0.3s ease;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
}

.sidebar__logo {
  width: 38px;
  height: 38px;
  background: var(--color-accent-teal);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--color-white);
}

.sidebar__name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.sidebar__nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
}

.nav-item.active {
  background: rgba(0, 184, 148, 0.15);
  color: var(--color-accent-teal);
  font-weight: 600;
}

.nav-item__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-item__label {
  font-size: 14px;
}

.sidebar__footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.sidebar__user-info {
  flex: 1;
  min-width: 0;
}

.sidebar__user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
}

.sidebar__user-email {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar__left h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-text-primary);
}

.topbar__greeting {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--color-white);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--color-bg);
  border-color: var(--color-accent-teal);
}

.btn-icon--notification {
  position: relative;
}

.btn-icon--notification::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--color-accent-orange);
  border-radius: 50%;
  position: absolute;
  top: 8px;
  right: 9px;
  border: 2px solid var(--color-white);
}

/* Screen Switching */
.screen {
  display: none;
  padding: 28px 32px 40px;
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   DASHBOARD GRID LAYOUTS
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.grid-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.grid-sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============================================
   CARD COMPONENT
   ============================================ */
.card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
  border: 1px solid transparent;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.card__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-teal);
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.card__link:hover {
  opacity: 0.7;
}

/* ============================================
   BALANCE CARD (Hero)
   ============================================ */
.balance-hero {
  background: var(--gradient-balance);
  border-radius: var(--radius-2xl);
  padding: 32px;
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.balance-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0,184,148,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.balance-hero__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.6;
  font-weight: 500;
  margin-bottom: 8px;
}

.balance-hero__amount {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 12px;
}

.balance-hero__amount-main {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
}

.balance-hero__amount-decimal {
  font-size: 22px;
  font-weight: 500;
  opacity: 0.6;
}

.balance-hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}

.badge--success {
  background: rgba(46, 204, 113, 0.2);
  color: var(--color-accent-green);
}

.balance-hero__date {
  font-size: 13px;
  opacity: 0.5;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 12px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-white);
  backdrop-filter: blur(4px);
}

.quick-action:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.quick-action svg {
  width: 18px;
  height: 18px;
}

.quick-action__label {
  font-size: 14px;
  font-weight: 500;
}

/* ============================================
   HEALTH MINI (Home Dashboard)
   ============================================ */
.health-summary {
  display: flex;
  align-items: center;
  gap: 24px;
}

.health-gauge-mini {
  position: relative;
  width: 110px;
  height: 70px;
  flex-shrink: 0;
}

.health-gauge-mini svg {
  width: 100%;
  height: 100%;
}

.health-score-block {
  display: flex;
  flex-direction: column;
}

.health-score-block__value {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1;
}

.health-score-block__max {
  font-size: 12px;
  color: var(--color-text-muted);
}

.health-score-block__status {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent-orange);
  margin-top: 4px;
}

.health-score-block__label {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.health-score-block__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-teal);
  text-decoration: none;
  cursor: pointer;
  margin-top: 8px;
  display: inline-block;
}

/* Monthly Summary */
.monthly-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.monthly-row:last-of-type {
  border-bottom: none;
}

.monthly-row__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.monthly-row__label svg {
  width: 16px;
  height: 16px;
}

.monthly-row__value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.weekly-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 48px;
  padding: 12px 0 0;
}

.weekly-chart__bar {
  flex: 1;
  border-radius: 4px;
  min-height: 4px;
  background: var(--color-border);
  transition: height 0.5s ease;
}

.weekly-chart__bar--active {
  background: var(--color-accent-orange);
}

.weekly-chart__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.weekly-chart__label {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--color-text-muted);
}

.saved-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-teal);
  background: rgba(0, 184, 148, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-top: 12px;
}

/* ============================================
   ALERT BANNER
   ============================================ */
.alert-banner {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  gap: 14px;
}

.alert-banner--warning {
  background: #FFF8E7;
  border: 1px solid #F0DCA4;
}

.alert-banner--info {
  background: #F0F4FF;
  border: 1px solid #D0DBEF;
}

.alert-banner__icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.alert-banner__icon--warning {
  background: rgba(232, 168, 56, 0.15);
  color: var(--color-accent-orange);
}

.alert-banner__icon--info {
  background: rgba(108, 92, 231, 0.1);
  color: var(--color-accent-purple);
}

.alert-banner__content { flex: 1; }

.alert-banner__title {
  font-size: 14px;
  font-weight: 700;
}

.alert-banner__subtitle {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
  line-height: 1.5;
}

.alert-banner__action { flex-shrink: 0; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active { transform: translateY(0); }

.btn--primary { background: var(--color-accent-teal); color: #fff; }
.btn--orange { background: var(--color-accent-orange); color: #fff; }
.btn--purple { background: var(--color-accent-purple); color: #fff; }
.btn--outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-primary);
}
.btn--outline:hover { background: var(--color-bg); }
.btn--full { width: 100%; padding: 14px 20px; font-size: 15px; }
.btn--green-outline {
  background: rgba(46,204,113,0.08);
  border: 1.5px solid var(--color-accent-green);
  color: var(--color-accent-green);
}

.btn-label { display: block; font-weight: 600; }
.btn-sublabel { display: block; font-size: 11px; font-weight: 400; opacity: 0.7; margin-top: 2px; }

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  overflow: hidden;
}

.progress-bar--lg { height: 8px; }

.progress-bar__fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 1s ease;
}

.progress-bar__fill--orange { background: var(--color-accent-orange); }
.progress-bar__fill--green { background: var(--color-accent-green); }
.progress-bar__fill--teal { background: var(--color-accent-teal); }
.progress-bar__fill--purple { background: var(--color-accent-purple); }

/* ============================================
   SAVINGS POT ITEM (Home preview)
   ============================================ */
.pot-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.pot-item:last-child { border-bottom: none; padding-bottom: 0; }

.pot-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pot-item__info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pot-item__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.pot-item__icon--emergency { background: rgba(108,92,231,0.1); }
.pot-item__icon--first-1k { background: rgba(232,168,56,0.1); }
.pot-item__icon--invest { background: rgba(0,184,148,0.1); }

.pot-item__name { font-size: 14px; font-weight: 600; }

.pot-item__status { font-size: 13px; font-weight: 600; }
.pot-item__status--done { color: var(--color-accent-green); }

.pot-item__footer { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }

/* ============================================
   PORTFOLIO CARD (Home)
   ============================================ */
.portfolio-card {
  background: var(--gradient-portfolio);
  border-radius: var(--radius-xl);
  padding: 24px;
  color: #fff;
}

.portfolio-card__value-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.portfolio-card__label { font-size: 13px; opacity: 0.75; margin-bottom: 6px; }
.portfolio-card__amount { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.portfolio-card__badge { font-size: 13px; font-weight: 600; color: var(--color-accent-green); }
.portfolio-card__meta { font-size: 12px; opacity: 0.6; margin-top: 4px; }

.portfolio-card__chart-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.portfolio-card__btn:hover { background: rgba(255,255,255,0.25); }

/* ============================================
   PULSE AI BANNER (Home)
   ============================================ */
.pulse-banner {
  background: var(--gradient-pulse);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.pulse-banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.pulse-banner__icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pulse-banner__content { flex: 1; }
.pulse-banner__title { font-size: 15px; font-weight: 700; }
.pulse-banner__subtitle { font-size: 12px; opacity: 0.8; margin-top: 2px; }
.pulse-banner__arrow { font-size: 22px; opacity: 0.8; }

/* ============================================
   HEALTH SCREEN
   ============================================ */
.health-top-card {
  text-align: center;
  padding: 32px;
}

.gauge-container {
  width: 200px;
  height: 120px;
  margin: 0 auto 8px;
}

.gauge-container svg { width: 100%; height: 100%; }
.gauge-score { font-size: 48px; font-weight: 800; }
.gauge-max { font-size: 14px; color: var(--color-text-muted); }
.gauge-status { font-size: 20px; font-weight: 700; color: var(--color-accent-orange); margin-top: 6px; }
.gauge-subtitle { font-size: 18px; font-weight: 700; margin-top: 4px; }
.gauge-description { font-size: 14px; color: var(--color-text-secondary); margin-top: 4px; }

.metric-chips {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.metric-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  min-width: 80px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.metric-chip:hover {
  border-color: var(--color-accent-teal);
  box-shadow: var(--shadow-sm);
}

.metric-chip__score { font-size: 24px; font-weight: 800; }
.metric-chip__score--green { color: var(--color-accent-green); }
.metric-chip__score--orange { color: var(--color-accent-orange); }
.metric-chip__score--teal { color: var(--color-accent-teal); }
.metric-chip__label { font-size: 11px; color: var(--color-text-secondary); margin-top: 2px; }

.breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.breakdown-header__title { font-size: 18px; font-weight: 700; }
.breakdown-header__meta { font-size: 12px; color: var(--color-text-muted); }

.breakdown-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.breakdown-card + .breakdown-card { margin-top: 12px; }

.breakdown-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.breakdown-card__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}

.breakdown-card__name svg { width: 18px; height: 18px; }

.breakdown-card__score { font-size: 16px; font-weight: 700; }
.breakdown-card__score span { font-size: 12px; font-weight: 400; color: var(--color-text-muted); }

.breakdown-card__progress {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  overflow: hidden;
  margin-bottom: 8px;
}

.breakdown-card__fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 1s ease;
}

.breakdown-card__detail { font-size: 12px; color: var(--color-text-secondary); }

.impact-card {
  background: #FFF8E7;
  border: 1px solid #F0DCA4;
  border-radius: var(--radius-xl);
  padding: 20px;
}

.impact-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.impact-card__title { font-size: 15px; font-weight: 700; }

.impact-card__text {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.impact-card__text strong { color: var(--color-accent-teal); font-weight: 700; }

/* ============================================
   PULSE SCREEN
   ============================================ */
.reco-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.reco-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.reco-card__icon--shield { background: rgba(232,168,56,0.1); color: var(--color-accent-orange); }
.reco-card__icon--chart { background: rgba(108,92,231,0.1); color: var(--color-accent-purple); }
.reco-card__icon--check { background: rgba(46,204,113,0.1); color: var(--color-accent-green); }

.reco-card__badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.reco-card__badge--urgent { background: rgba(232,168,56,0.1); color: var(--color-accent-orange); }
.reco-card__badge--ready { background: rgba(108,92,231,0.1); color: var(--color-accent-purple); }
.reco-card__badge--track { background: rgba(46,204,113,0.1); color: var(--color-accent-green); }

.reco-card__title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }

.reco-card__text {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.reco-card__actions {
  display: flex;
  gap: 10px;
}

.reco-card__actions .btn {
  flex: 1;
  padding: 12px 16px;
  flex-direction: column;
}

.pulse-footer-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  background: var(--color-white);
  padding: 16px;
  border-radius: var(--radius-xl);
}

.specialist-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.specialist-btn:hover {
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-accent-teal);
}

/* ============================================
   GOALS SCREEN
   ============================================ */
.goal-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.goal-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.goal-card__info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.goal-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.goal-card__icon--emergency { background: rgba(108,92,231,0.1); }
.goal-card__icon--milestone { background: rgba(232,168,56,0.1); }
.goal-card__icon--invest { background: rgba(0,184,148,0.1); }
.goal-card__icon--holiday { background: rgba(108,92,231,0.1); }

.goal-card__name { font-size: 16px; font-weight: 700; }
.goal-card__name .check-icon { color: var(--color-accent-green); margin-left: 4px; }
.goal-card__sub { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }

.goal-card__percent {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--color-border);
}

.goal-card__progress { margin: 16px 0 10px; }

.goal-card__amounts {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.goal-card__current { font-size: 14px; font-weight: 600; }
.goal-card__target-date { font-size: 12px; color: var(--color-text-muted); }

.goal-card__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.goal-card__actions .btn { flex: 1; }

.goal-card__auto-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: 10px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.goal-card__milestone-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
}

.goal-card__milestone-amount { font-size: 14px; font-weight: 600; }

.goal-card__milestone-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-green);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   INVEST SCREEN
   ============================================ */
.portfolio-top {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.portfolio-top__value {
  font-size: 38px;
  font-weight: 800;
  color: var(--color-accent-purple);
}

.portfolio-top__change {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent-green);
  margin-bottom: 16px;
}

.portfolio-chart {
  width: 100%;
  height: 160px;
  margin-bottom: 8px;
}

.portfolio-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}

.chart-labels span { font-size: 12px; color: var(--color-text-muted); }

.allocation-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.allocation-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.allocation-card__title { font-size: 16px; font-weight: 700; }

.allocation-card__badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: rgba(46,204,113,0.1);
  color: var(--color-accent-green);
}

.allocation-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.donut-container { width: 110px; height: 110px; flex-shrink: 0; }
.donut-container canvas { width: 100%; height: 100%; }

.allocation-legend { flex: 1; }

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.legend-item__info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-dot--stocks { background: var(--color-accent-blue); }
.legend-dot--bonds { background: var(--color-accent-purple); }
.legend-dot--cash { background: var(--color-accent-teal); }

.legend-item__name { font-size: 14px; color: var(--color-text-secondary); }
.legend-item__value { font-size: 15px; font-weight: 700; }

.holdings-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.holdings-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.holding-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  gap: 14px;
}

.holding-item:last-child { border-bottom: none; padding-bottom: 0; }

.holding-item__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.holding-item__icon--global { background: rgba(74,144,217,0.1); color: var(--color-accent-blue); }
.holding-item__icon--bonds { background: rgba(108,92,231,0.1); color: var(--color-accent-purple); }
.holding-item__icon--cash { background: rgba(0,184,148,0.1); color: var(--color-accent-teal); }

.holding-item__info { flex: 1; }
.holding-item__name { font-size: 15px; font-weight: 600; }
.holding-item__fund { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }

.holding-item__values { text-align: right; }
.holding-item__amount { font-size: 15px; font-weight: 700; }
.holding-item__change { font-size: 13px; font-weight: 600; color: var(--color-accent-green); margin-top: 2px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .grid-sidebar-layout {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .quick-actions {
    flex-wrap: wrap;
  }
  .screen {
    padding: 20px 16px 32px;
  }
  .topbar {
    padding: 16px;
  }
  .topbar__menu-btn {
    display: flex;
  }
}

.topbar__menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-text-primary);
  margin-right: 12px;
}

@media (max-width: 768px) {
  .topbar__menu-btn { display: flex; align-items: center; justify-content: center; }
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
  }
  .sidebar-overlay.active { display: block; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.card, .reco-card, .goal-card, .breakdown-card,
.portfolio-top, .allocation-card, .holdings-card {
  animation: slideUp 0.4s ease both;
}

.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
