/* ============================================================
   MONARCHA — APP.CSS v2.0
   Redesign moderno, clean e responsivo
   Mantém 100% dos seletores e classes originais
   ============================================================ */

/* ============ 1. VARIÁVEIS ============ */
:root {
  /* Backgrounds — tom azulado sofisticado */
  --bg:            #0d1117;
  --bg-2:          #161b22;
  --bg-3:          #1f2630;
  --bg-elev:       #1a2029;
  --bg-glass:      rgba(22, 27, 34, 0.72);

  --surface:       rgba(255,255,255,0.025);
  --surface-hover: rgba(255,255,255,0.05);
  --surface-2:     rgba(255,255,255,0.04);

  --border:        rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.12);
  --border-gold:   rgba(255,215,0,0.22);

  /* Texto */
  --text:    #f1f5f9;
  --text-2:  #cbd5e1;
  --muted:   #94a3b8;
  --muted-2: #64748b;

  /* Marca */
  --gold:      #ffd700;
  --gold-2:    #f59e0b;
  --gold-soft: #fcd34d;
  --gold-glow: rgba(255,215,0,0.35);

  /* Status */
  --success: #4ade80;
  --danger:  #f87171;
  --warning: #fbbf24;
  --info:    #60a5fa;
  --purple:  #a855f7;
  --pink:    #ec4899;
  --blue:    #3b82f6;

  /* Gradientes reutilizáveis */
  --grad-gold:   linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
  --grad-male:   linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
  --grad-female: linear-gradient(135deg, #831843 0%, #1e293b 100%);
  --grad-shared: linear-gradient(135deg, #78350f 0%, #1e293b 100%);
  --grad-obs:    linear-gradient(135deg, #581c87 0%, #1e293b 100%);

  /* Tipografia fluida */
  --fs-xs:   clamp(0.70rem, 0.68rem + 0.1vw, 0.78rem);
  --fs-sm:   clamp(0.80rem, 0.78rem + 0.1vw, 0.88rem);
  --fs-base: clamp(0.90rem, 0.88rem + 0.1vw, 0.98rem);
  --fs-lg:   clamp(1.05rem, 1.0rem + 0.25vw, 1.20rem);
  --fs-xl:   clamp(1.25rem, 1.15rem + 0.5vw, 1.60rem);
  --fs-2xl:  clamp(1.6rem,  1.4rem + 1vw,    2.2rem);

  /* Espaçamento */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;
  --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;

  /* Raios */
  --r-sm: 8px;   --r-md: 12px;  --r-lg: 16px;
  --r-xl: 20px;  --r-2xl: 24px;

  /* Sombras em camadas */
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md:   0 4px 8px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg:   0 8px 16px rgba(0,0,0,0.35), 0 24px 48px rgba(0,0,0,0.45);
  --shadow-gold: 0 4px 12px rgba(255,215,0,0.18), 0 8px 32px rgba(255,215,0,0.12);
  --shadow-glow: 0 0 0 1px rgba(255,255,255,0.04), 0 8px 32px rgba(0,0,0,0.4);

  --sidebar-w: 260px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Easings */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@property --score {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

/* ============ 2. RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,215,0,0.04), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(59,130,246,0.04), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
body.app-body { padding: 0; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   🆕 SELECTS — tema dark GLOBAL (corrige popup/options brancos
   em qualquer <select> do app, não apenas dentro de tabelas)
============================================================ */
select {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
}
select option {
  background: #1a1f27;
  color: var(--text);
}
/* Scrollbar elegante */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,215,0,0.25); background-clip: padding-box; }

/* ============ 3. CROWN LOGO ============ */
.crown-logo {
  display: inline-block;
  background-image: url('/demo/assets/crown-logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  flex-shrink: 0;
}
.crown-xs { width: 18px; height: 18px; }
.crown-sm { width: 24px; height: 24px; }
.crown-md { width: 32px; height: 32px; }
.crown-lg { width: 48px; height: 48px; }
.crown-xl { width: 72px; height: 72px; }
.crown-logo.with-glow { filter: drop-shadow(0 0 14px var(--gold-glow)); }
.crown-logo.inline    { margin: 0 4px; position: relative; top: -2px; }

/* ============ 4. APP SHELL ============ */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}
.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ============ 5. SIDEBAR (Glassmorphism) ============ */
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  background:
    linear-gradient(180deg, rgba(22,27,34,0.95) 0%, rgba(13,17,23,0.95) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--sp-4) var(--sp-3);
  z-index: 200;
  transition: transform 0.35s var(--ease-out);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--sp-3) var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-3);
  position: relative;
}
.sidebar-brand::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
}
.sidebar-brand .brand-name {
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 2px;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(255,215,0,0.3));
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  background: var(--grad-gold);
  border-radius: 0 3px 3px 0;
  transition: transform 0.25s var(--ease-spring);
}
.nav-item:hover {
  background: var(--surface-hover);
  color: var(--text);
  transform: translateX(2px);
}
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(255,215,0,0.14) 0%, rgba(255,215,0,0.02) 100%);
  color: var(--gold);
  font-weight: 600;
  border-color: rgba(255,215,0,0.15);
}
.nav-item.is-active::before { transform: translateY(-50%) scaleY(1); }
.nav-ico { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.nav-lbl { flex: 1; }

/* ============================================================
   🏷️ TAGS DA SIDEBAR — Espelham os cards de Upgrade
============================================================ */

/* Base comum a todos os selos */
.nav-tag-premium,
.nav-tag-plus {
  font-size: 0.6rem;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.6px;
  white-space: nowrap;
  text-transform: uppercase;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s var(--ease-out);
}

/* ⭐ Selo PLUS — Dourado sólido (igual card Plus do Upgrade) */
.nav-tag-premium:not(.is-premium),
.nav-tag-plus {
  background: var(--grad-gold);
  color: #14171c;
  box-shadow: 0 2px 8px rgba(255,215,0,0.35);
  border: none;
  text-shadow: 0 1px 0 rgba(255,255,255,0.15);
}

/* 👑 Selo PREMIUM (PRO) — Preto com borda dourada + glow (igual card Premium) */
.nav-tag-premium.is-premium,
.nav-tag-crown {
  background: linear-gradient(135deg, #0a0d12 0%, #1a1d24 50%, #0a0d12 100%);
  color: var(--gold);
  border: 1px solid var(--gold);
  box-shadow:
    0 0 0 1px rgba(255,215,0,0.2),
    0 0 10px rgba(255,215,0,0.35),
    inset 0 0 8px rgba(255,215,0,0.1);
  text-shadow: 0 0 6px rgba(255,215,0,0.5);
  animation: tagPremiumGlow 2.8s ease-in-out infinite;
}

/* Pulso sutil no selo Premium (atrai o olho) */
@keyframes tagPremiumGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255,215,0,0.2),
      0 0 8px rgba(255,215,0,0.3),
      inset 0 0 6px rgba(255,215,0,0.08);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255,215,0,0.35),
      0 0 14px rgba(255,215,0,0.5),
      inset 0 0 10px rgba(255,215,0,0.15);
  }
}

/* Hover: leve scale para feedback */
.nav-item:hover .nav-tag-premium,
.nav-item:hover .nav-tag-plus {
  transform: scale(1.05);
}

/* Acessibilidade: desativa pulso para quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  .nav-tag-premium.is-premium { animation: none; }
}

.nav-tag-lock { font-size: 0.78rem; opacity: 0.7; }



.nav-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: var(--sp-3) var(--sp-2);
}

.nav-item-upgrade {
  background: linear-gradient(135deg, rgba(255,215,0,0.14), rgba(245,158,11,0.04));
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-weight: 700;
  margin-top: var(--sp-2);
  box-shadow: 0 0 20px rgba(255,215,0,0.08) inset;
}
.nav-item-upgrade:hover {
  background: var(--grad-gold);
  color: #14171c;
  box-shadow: 0 4px 16px var(--gold-glow);
}

.nav-item-logout { color: #fca5a5; }
.nav-item-logout:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

/* Status pill */
.sidebar-status {
  padding: 12px 12px;
  margin: 10px 0 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(10px);
}
.sidebar-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.sidebar-status-lbl {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.sidebar-status .plano-badge,
.sidebar-status .sync-pill {
  font-size: 0.68rem;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-2);
  margin-top: var(--sp-2);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 150;
  animation: fadeIn 0.25s ease;
}
.sidebar-backdrop.is-visible { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============ 6. BURGER FLUTUANTE ============ */
.btn-burger-floating {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 210;
  width: 46px;
  height: 46px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  cursor: pointer;
  padding: 12px 11px;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  box-shadow: var(--shadow-md);
  transition: all 0.2s var(--ease-out);
}
.btn-burger-floating span {
  display: block;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.btn-burger-floating:hover {
  background: rgba(255,215,0,0.12);
  transform: scale(1.05);
}

/* ============ 7. BADGES & SYNC PILL ============ */
.plano-badge {
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #475569;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.plano-badge.premium {
  background: var(--grad-gold);
  color: #14171c;
  box-shadow: 0 2px 8px rgba(255,215,0,0.3);
}
.plano-badge.plus {
  background: var(--grad-gold);
  color: #14171c;
  box-shadow: 0 2px 8px rgba(255,215,0,0.3);
}



.sync-pill {
  font-size: var(--fs-xs);
  padding: 5px 11px;
  border-radius: 999px;
  background: #2a313b;
  color: #999;
  white-space: nowrap;
  font-weight: 600;
}
.sync-pill.syncing { background: rgba(245,158,11,0.18); color: var(--gold-soft); }
.sync-pill.synced  { background: rgba(74,222,128,0.15); color: #86efac; }
.sync-pill.error   { background: rgba(239,68,68,0.18); color: #fca5a5; }

/* ============ 8. HERO BAR (Premium) ============ */
.hero-bar {
  margin: var(--sp-4) var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background:
    radial-gradient(ellipse 60% 100% at 0% 0%, rgba(255,215,0,0.08), transparent 60%),
    radial-gradient(ellipse 40% 80% at 100% 100%, rgba(59,130,246,0.06), transparent 60%),
    linear-gradient(135deg, var(--bg-2) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  animation: heroIn 0.5s var(--ease-out);
}
.hero-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-bar-inner { display: block; position: relative; z-index: 1; }

/* Navegação de mês */
.hero-month-nav {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px dashed var(--border);
}
.month-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,215,0,0.08);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 4px 10px;
  backdrop-filter: blur(8px);
}
.month-arrow {
  background: transparent;
  border: none;
  color: var(--gold);
  font-size: 0.9rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-out);
}
.month-arrow:hover {
  background: rgba(255,215,0,0.18);
  transform: scale(1.1);
}
.month-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--gold);
  min-width: 130px;
  text-align: center;
  letter-spacing: 0.3px;
}

/* Saldo destacado */
.hero-balance { display: flex; flex-direction: column; gap: 4px; }
.hero-balance-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}
.hero-balance-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  margin: 2px 0 4px;
}
.hero-balance-value {
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem);
  font-weight: 900;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.05;
  letter-spacing: -0.02em;
  filter: drop-shadow(0 2px 8px rgba(255,215,0,0.15));
}
.hero-balance-sub {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 600;
}
.hero-sub-lbl {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.hero-sub-val { font-size: 1.05rem; font-weight: 800; color: var(--gold); }
.hero-balance-trend {
  display: block;
  margin-top: 2px;
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
}

/* Bloco do parceiro */
.hero-partner-summary {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border);
}
.hero-partner-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  row-gap: 6px;
}
.hero-partner-title {
  font-size: var(--fs-sm);
  color: var(--text-2);
  font-weight: 700;
  margin-right: 4px;
}
.hero-partner-pair { display: inline-flex; align-items: baseline; gap: 6px; }
.hero-partner-val { font-size: 1rem; font-weight: 800; color: var(--text); }

/* Rodapé: receitas/despesas */
.hero-footer-stats {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
.hero-stat { display: inline-flex; align-items: center; gap: 8px; }
.hero-stat-ico { font-size: 1.05rem; }
.hero-stat-lbl {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.hero-stat-val { font-size: 1rem; font-weight: 800; color: var(--text); }
.hero-stat-sep { color: var(--muted-2); opacity: 0.4; }

/* Ver mais/menos */
.hero-details { margin: 0; padding: 0; border: none; background: transparent; }
.hero-details summary::-webkit-details-marker { display: none; }
.hero-details summary { list-style: none; }
.hero-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-3);
  padding: 6px 14px;
  background: rgba(255,215,0,0.08);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s var(--ease-out);
  letter-spacing: 0.4px;
}
.hero-details-toggle:hover {
  background: rgba(255,215,0,0.16);
  border-color: rgba(255,215,0,0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,215,0,0.15);
}
.hero-details-arrow {
  display: inline-block;
  font-size: 0.85rem;
  transition: transform 0.3s var(--ease-spring);
  line-height: 1;
}
.hero-details[open] .hero-details-arrow { transform: rotate(180deg); }
.hero-details-lbl-hide { display: none; }
.hero-details[open] .hero-details-lbl-show { display: none; }
.hero-details[open] .hero-details-lbl-hide { display: inline; }
.hero-details-content { animation: heroDetailsIn 0.35s var(--ease-out); }
@keyframes heroDetailsIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ 9. CONTEÚDO PRINCIPAL ============ */
.app-content {
  padding: 0 var(--sp-5) var(--sp-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
.app-content.solo { grid-template-columns: 1fr; }
.app-content .full-width { grid-column: 1 / -1; }

/* Cards de pessoa — design premium com gradient border */
.person-card,
.shared-card,
.obs-card {
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  animation: cardIn 0.5s var(--ease-out) both;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.person-card:hover,
.shared-card:hover,
.obs-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.app-content > *:nth-child(1) { animation-delay: 0.05s; }
.app-content > *:nth-child(2) { animation-delay: 0.1s; }
.app-content > *:nth-child(3) { animation-delay: 0.15s; }
.app-content > *:nth-child(4) { animation-delay: 0.2s; }

/* Card masculino */
.male-card {
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(59,130,246,0.08), transparent 60%),
    linear-gradient(135deg, #131c2e 0%, var(--bg-2) 100%);
  border-color: rgba(59,130,246,0.2);
  border-left: 3px solid var(--blue);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(59,130,246,0.1);
}
.male-card h2   { color: #93c5fd; }
.male-summary   {
  background: linear-gradient(135deg, rgba(30,58,95,0.6), rgba(30,58,95,0.3));
  border-left: 3px solid var(--blue);
  border: 1px solid rgba(59,130,246,0.18);
}

/* Card feminino */
.female-card {
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(236,72,153,0.08), transparent 60%),
    linear-gradient(135deg, #2a1424 0%, var(--bg-2) 100%);
  border-color: rgba(236,72,153,0.2);
  border-left: 3px solid var(--pink);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(236,72,153,0.1);
}
.female-card h2 { color: #f9a8d4; }
.female-summary {
  background: linear-gradient(135deg, rgba(74,25,66,0.6), rgba(74,25,66,0.3));
  border-left: 3px solid var(--pink);
  border: 1px solid rgba(236,72,153,0.18);
}

/* Card compartilhado */
.shared-card {
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(255,215,0,0.08), transparent 60%),
    linear-gradient(135deg, #2a2418 0%, var(--bg-2) 100%);
  border-color: var(--border-gold);
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,215,0,0.1);
}
.shared-card h2 {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Card observações */
.obs-card {
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(168,85,247,0.08), transparent 60%),
    linear-gradient(135deg, #1f1a2e 0%, var(--bg-2) 100%);
  border-color: rgba(168,85,247,0.2);
  border-left: 3px solid var(--purple);
}
.obs-card h2    { color: #c4b5fd; }
.obs-info {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: var(--sp-3);
  font-style: italic;
}

.person-card h2,
.shared-card h2,
.obs-card h2 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-4);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.block { margin-bottom: var(--sp-4); }
.block h3,
.resp-block h3 {
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-3);
  color: var(--text-2);
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============ TABELAS MODERNAS ============ */
table.entries,
#tblResponsabilidades,
#tblObservacoes {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 8px;
  font-size: var(--fs-sm);
}
th, td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
th {
  background: rgba(255,255,255,0.03);
  font-weight: 700;
  color: var(--gold-soft);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  position: sticky;
  top: 0;
}
tbody tr {
  transition: background 0.15s;
}
tbody tr:hover {
  background: rgba(255,255,255,0.02);
}
td input,
td select {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 0.8rem;
  transition: all 0.15s var(--ease-out);
}
td input:hover,
td select:hover {
  background: rgba(255,255,255,0.06);
}
td input:focus,
td select:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,215,0,0.06);
  box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}
td input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }

select.status-pago     {
  background: rgba(74,222,128,0.15);
  color: #86efac;
  border-color: rgba(74,222,128,0.25);
}
select.status-previsto {
  background: rgba(245,158,11,0.15);
  color: var(--gold-soft);
  border-color: rgba(245,158,11,0.3);
}
select.status-nao      {
  background: rgba(148,163,184,0.1);
  color: var(--muted);
  border-color: rgba(148,163,184,0.2);
}
select.categoria-sel   {
  background: rgba(255,255,255,0.04);
  color: var(--gold-soft);
  font-size: 0.72rem;
}

.del-btn {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.25);
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.72rem;
  min-height: 30px;
  min-width: 30px;
  transition: all 0.2s var(--ease-out);
  font-weight: 600;
}
.del-btn:hover {
  background: rgba(239,68,68,0.25);
  color: #fff;
  transform: scale(1.05);
}

.add-btn {
  margin-top: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(74,222,128,0.15), rgba(22,163,74,0.08));
  color: #86efac;
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: all 0.2s var(--ease-out);
  letter-spacing: 0.2px;
}
.add-btn:hover {
  background: linear-gradient(135deg, rgba(74,222,128,0.25), rgba(22,163,74,0.15));
  border-color: rgba(74,222,128,0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74,222,128,0.15);
}
.add-btn.locked {
  background: rgba(75,85,99,0.3);
  border-color: rgba(75,85,99,0.4);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
}

/* Resumos */
.summary {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  margin-top: var(--sp-4);
  font-size: var(--fs-sm);
  backdrop-filter: blur(10px);
}
.summary div {
  margin: 5px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.saldo {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 8px;
  margin-top: 8px;
  font-weight: 800;
  font-size: var(--fs-base);
}
.saldo.positive { color: var(--success); }
.saldo.negative { color: var(--danger); }

.resp-block { margin-top: var(--sp-4); }
#tblResponsabilidades td.titular-cell  {
  background: rgba(59,130,246,0.12);
  color: #93c5fd;
  border-radius: var(--r-sm);
}
#tblResponsabilidades td.parceiro-cell {
  background: rgba(236,72,153,0.12);
  color: #f9a8d4;
  border-radius: var(--r-sm);
}

/* Bloco repasse */
.block-repasse {
  background:
    radial-gradient(ellipse 60% 100% at 0% 0%, rgba(255,215,0,0.08), transparent),
    rgba(255,215,0,0.04);
  border: 1px dashed var(--border-gold);
  border-radius: var(--r-md);
  padding: var(--sp-4);
}
.block-repasse h3 {
  color: var(--gold);
  border-bottom: 1px dashed rgba(255,215,0,0.4);
}
.repasse-desc {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  font-size: var(--fs-sm);
}
.linha-repasse-receita        { color: var(--gold); }
.linha-repasse-receita span   { font-weight: 700; }
.linha-repasse-desp           { color: #fca5a5; }

/* Toggle divisão proporcional */
.fixas-info-toggle {
  margin: 8px 0 var(--sp-4);
  background: rgba(255,215,0,0.06);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-md);
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.fixas-info-toggle summary {
  cursor: pointer;
  padding: 11px 16px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gold);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.fixas-info-toggle summary::-webkit-details-marker { display: none; }
.fixas-info-toggle summary::after {
  content: '→';
  margin-left: auto;
  transition: transform 0.3s var(--ease-spring);
  font-size: 1.1rem;
}
.fixas-info-toggle[open] summary::after { transform: rotate(90deg); }
.fixas-info-toggle summary:hover { background: rgba(255,215,0,0.1); }
.fixas-info {
  padding: 0 16px 14px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.65;
}
.fixas-info strong { color: var(--gold); }

.bottom-nav-spacer { height: 0; }

/* ============ 10. BOTÕES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: var(--grad-gold);
  color: #14171c;
  padding: 12px 26px;
  border: none;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: var(--fs-base);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255,215,0,0.5);
}
.btn-primary:hover::before { left: 100%; }

.btn-secondary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.btn-secondary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59,130,246,0.45);
}
.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-gold);
  transform: translateY(-1px);
}
.btn.locked,
.btn.premium-locked {
  opacity: 0.6;
  cursor: not-allowed;
  background: #4b5563;
  box-shadow: none;
}
.btn.locked:hover { transform: none; box-shadow: none; }

#btnExportar.premium-locked,
#btnRestore.premium-locked {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  opacity: 0.85;
  position: relative;
}

.premium-lock-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75rem;
  filter: drop-shadow(0 0 6px var(--gold-glow));
  animation: lockPulse 2s ease-in-out infinite;
}
@keyframes lockPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

/* ============ 11. MODAIS — BASE ============ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: var(--sp-3);
  animation: modalFadeIn 0.25s ease;
}
/* 🆕 Quando o teclado está aberto: ancora o modal do chat no topo do viewport visível */
#modalIAChat.kb-open {
  align-items: flex-start;
  padding-top: 8px;
}

.modal.hidden { display: none; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background:
    radial-gradient(ellipse at top, rgba(255,215,0,0.04), transparent 60%),
    linear-gradient(145deg, var(--bg-2), var(--bg-elev));
  color: var(--text);
  padding: var(--sp-6);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.35s var(--ease-spring);
}
.modal-content.small { max-width: 500px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  color: var(--gold);
  font-size: var(--fs-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.modal-header button.close,
.dash-header button.close,
.proj-header button.close,
.sim-header button.close {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  font-size: 1.1rem;
  font-weight: 600;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  line-height: 1;
  flex-shrink: 0;
}
.modal-header button.close:hover,
.dash-header button.close:hover,
.proj-header button.close:hover,
.sim-header button.close:hover {
  background: rgba(248,113,113,0.18);
  border-color: rgba(248,113,113,0.45);
  color: #f87171;
  transform: rotate(90deg) scale(1.08);
}



/* ============ 12. ONBOARDING ============ */
.onb-step { margin-bottom: var(--sp-5); }
.onb-step label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.onb-step input,
.onb-step select {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: var(--fs-base);
  transition: all 0.2s;
}
.onb-step input:focus,
.onb-step select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}
.onb-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.onb-choice {
  padding: var(--sp-6);
  background: var(--surface-2);
  border: 2px solid var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: center;
  transition: all 0.25s var(--ease-out);
}
.onb-choice:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,215,0,0.1);
}
.onb-choice.selected {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,215,0,0.02));
  box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}
.onb-choice h4 { color: var(--gold); margin-bottom: 6px; font-size: 1rem; }
.onb-choice p { font-size: var(--fs-xs); color: var(--text-2); }

/* ============================================================
   ⭐ SISTEMA DE PLANOS — Tag Plus/Premium (Admin)
============================================================ */
.plano-plus {
  background: rgba(255,215,0,0.15);
  color: var(--gold-soft);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-gold);
}


/* ============================================================
   👑 MODAL UPGRADE V3 — 2 cards (Plus + Premium) com toggle
============================================================ */
.modal-upgrade-v3 {
  max-width: 920px;
  padding: var(--sp-5);
}
.modal-upgrade-v3 .upgrade-intro {
  color: var(--text-2);
  margin-bottom: var(--sp-4);
  line-height: 1.5;
  text-align: center;
  font-size: var(--fs-sm);
}

/* Grid dos tiers — 2 colunas SEMPRE (até quebrar em mobile pequeno) */
.upgrade-tiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: 24px 0 var(--sp-4); /* espaço apenas para o ribbon "MAIS COMPLETO" */
  align-items: stretch;
  padding-top: 12px;
  overflow: visible;
}



/* Card base */
.upgrade-tier {
  position: relative;
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: box-shadow 0.3s var(--ease-out);
  overflow: visible; /* ribbon não fica mais cortado */
  height: 100%;
}

/* Hover só nos cards NÃO sugeridos (evita conflito com a flutuação) */
.upgrade-tier:not(.suggested) {
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}





/* ═══ CARD PLUS — Dourado (visual igual ao Premium antigo) ═══ */
.upgrade-tier-plus {
  background:
    radial-gradient(ellipse at top, rgba(255,215,0,0.08), transparent 60%),
    linear-gradient(135deg, rgba(255,215,0,0.04), var(--bg-2));
  border: 1px solid var(--border-gold);
  box-shadow: 0 0 0 1px rgba(255,215,0,0.1), 0 8px 24px rgba(0,0,0,0.3);
}
.upgrade-tier-plus:not(.suggested):hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--gold), 0 12px 32px rgba(255,215,0,0.2);
  border-color: var(--gold);
}



/* ═══ CARD PREMIUM — Preto com brilho dourado ao redor ═══ */
.upgrade-tier-premium {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,215,0,0.06), transparent 60%),
    linear-gradient(160deg, #0a0d12 0%, #14171c 50%, #0a0d12 100%);
  border: 1px solid rgba(255,215,0,0.4);
  box-shadow:
    0 0 0 1px rgba(255,215,0,0.25),
    0 0 30px rgba(255,215,0,0.18),
    0 8px 32px rgba(0,0,0,0.5);
}
.upgrade-tier-premium::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--r-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,215,0,0.5), transparent 40%, transparent 60%, rgba(255,215,0,0.5));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: source-out; /* equivalente moderno ao "xor" */
  mask-composite: exclude;
  pointer-events: none;
  animation: premiumGlow 3s ease-in-out infinite;
}

@keyframes premiumGlow {
  0%, 100% { opacity: 0.8; }
  50%      { opacity: 1; }
}
.upgrade-tier-premium:not(.suggested):hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px var(--gold),
    0 0 50px rgba(255,215,0,0.35),
    0 16px 40px rgba(0,0,0,0.6);
}



/* Ribbon "MAIS COMPLETO" */
.tier-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-gold);
  color: #14171c;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255,215,0,0.45);
  z-index: 2;
}

/* Badge (PLUS / PREMIUM) */
.tier-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: var(--grad-gold);
  color: #14171c;
  box-shadow: 0 2px 8px rgba(255,215,0,0.3);
}
.tier-badge-crown {
  background: linear-gradient(135deg, #1a1d24 0%, #2a2f3a 100%);
  color: var(--gold);
  border: 1px solid var(--gold);
  box-shadow: 0 0 14px rgba(255,215,0,0.4), inset 0 0 8px rgba(255,215,0,0.15);
}

/* ═══ TOGGLE MENSAL/ANUAL ═══ */
.tier-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  margin-top: 4px;
}
.tier-toggle-btn {
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.25s var(--ease-out);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.tier-toggle-btn.active { color: #14171c; }
.upgrade-tier-premium .tier-toggle-btn.active { color: var(--gold); }

.tier-toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: var(--grad-gold);
  border-radius: 999px;
  transition: transform 0.3s var(--ease-spring);
  box-shadow: 0 2px 8px rgba(255,215,0,0.3);
  z-index: 1;
}
.tier-toggle[data-period="anual"] .tier-toggle-slider {
  transform: translateX(100%);
}
.upgrade-tier-premium .tier-toggle-slider {
  background: linear-gradient(135deg, #1a1d24 0%, #2a2f3a 100%);
  border: 1px solid var(--gold);
  box-shadow: 0 0 12px rgba(255,215,0,0.4);
}

.toggle-discount {
  background: rgba(74,222,128,0.2);
  color: #4ade80;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
}
.tier-toggle-btn.active .toggle-discount {
  background: rgba(20,23,28,0.2);
  color: #14171c;
}
.upgrade-tier-premium .tier-toggle-btn.active .toggle-discount {
  background: rgba(74,222,128,0.2);
  color: #4ade80;
}

/* Título do plano */
.upgrade-tier h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  text-align: center;
  margin-top: 4px;
}
.upgrade-tier-premium h3 {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Preço */
.tier-price-wrap {
  text-align: center;
  animation: priceIn 0.3s var(--ease-out);
}
.tier-price-wrap.hidden { display: none; }
@keyframes priceIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tier-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.upgrade-tier-premium .tier-price {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(255,215,0,0.2));
}
.tier-price small {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  -webkit-text-fill-color: var(--muted);
}
.tier-price-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 600;
}
.tier-price-eco { color: var(--success); }

/* Features */
.tier-features {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tier-features li {
  font-size: var(--fs-sm);
  color: var(--text-2);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

/* Botões assinar */
.btn-assinar {
  display: block;
  padding: 13px;
  border-radius: var(--r-md);
  text-decoration: none;
  font-weight: 800;
  font-size: var(--fs-sm);
  text-align: center;
  transition: all 0.25s var(--ease-out);
  letter-spacing: 0.3px;
  margin-top: auto;
}
.btn-assinar.hidden { display: none; }

.btn-assinar-plus {
  background: var(--grad-gold);
  color: #14171c;
  box-shadow: 0 4px 14px rgba(255,215,0,0.3);
}
.btn-assinar-plus:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255,215,0,0.5);
}

.btn-assinar-premium {
  background: linear-gradient(135deg, #1a1d24 0%, #2a2f3a 100%);
  color: var(--gold);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(255,215,0,0.2), 0 4px 14px rgba(255,215,0,0.2);
  position: relative;
  overflow: hidden;
}
.btn-assinar-premium::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.25), transparent);
  transition: left 0.6s;
}
.btn-assinar-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--gold), 0 0 24px rgba(255,215,0,0.4), 0 10px 24px rgba(0,0,0,0.4);
}
.btn-assinar-premium:hover::before { left: 100%; }

/* ═══ CARD SUGERIDO — Destaque estático (sem flutuação) ═══
   Estratégia: leve scale + borda dourada sólida + glow pulsante na sombra.
   Funciona idêntico em mobile e desktop, zero tremor. */
.upgrade-tier.suggested {
  transform: scale(1.03);
  border-color: var(--gold);
  z-index: 1;
}

/* Glow pulsante APENAS na box-shadow (não afeta transform/layout) */
.upgrade-tier-plus.suggested {
  border-color: var(--gold);
  box-shadow:
    0 0 0 1px var(--gold),
    0 0 28px rgba(255,215,0,0.35),
    0 12px 32px rgba(255,215,0,0.20);
  animation: suggestedGlow 2.8s ease-in-out infinite;
}

.upgrade-tier-premium.suggested {
  border-color: var(--gold);
  box-shadow:
    0 0 0 1px var(--gold),
    0 0 36px rgba(255,215,0,0.40),
    0 16px 40px rgba(0,0,0,0.6);
  animation: suggestedGlowPremium 2.8s ease-in-out infinite;
}

@keyframes suggestedGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px var(--gold),
      0 0 24px rgba(255,215,0,0.28),
      0 12px 32px rgba(255,215,0,0.18);
  }
  50% {
    box-shadow:
      0 0 0 1px var(--gold),
      0 0 38px rgba(255,215,0,0.50),
      0 12px 36px rgba(255,215,0,0.28);
  }
}

@keyframes suggestedGlowPremium {
  0%, 100% {
    box-shadow:
      0 0 0 1px var(--gold),
      0 0 30px rgba(255,215,0,0.35),
      0 16px 40px rgba(0,0,0,0.6);
  }
  50% {
    box-shadow:
      0 0 0 1px var(--gold),
      0 0 50px rgba(255,215,0,0.55),
      0 18px 44px rgba(0,0,0,0.65);
  }
}

/* Hover do card sugerido — apenas intensifica, NÃO move */
.upgrade-tier.suggested:hover {
  transform: scale(1.04);
}

/* Acessibilidade: desativa pulso para quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  .upgrade-tier-plus.suggested,
  .upgrade-tier-premium.suggested {
    animation: none;
  }
  .upgrade-tier.suggested,
  .upgrade-tier.suggested:hover {
    transform: scale(1.02);
  }
}

/* Botão verificar pagamento */
.btn-verificar {
  width: 100%;
  padding: 12px;
  margin-top: var(--sp-4);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  font-weight: 700;
  font-size: var(--fs-sm);
  transition: all 0.25s var(--ease-out);
}
.btn-verificar:hover {
  background: rgba(74,222,128,0.08);
  border-color: rgba(74,222,128,0.3);
  color: #86efac;
}

/* Rodapé */
.upgrade-footer {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.upgrade-footer p {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

/* ═══ RESPONSIVO — Modal Upgrade ═══ */

/* Tablet — ajustes leves, cards ainda lado a lado */
@media (max-width: 768px) and (min-width: 641px) {
  .modal-upgrade-v3 { padding: var(--sp-4); }
  .upgrade-tiers { gap: var(--sp-3); }
  .upgrade-tier {
    padding: var(--sp-4) 14px;
    gap: 10px;
  }
  .tier-price { font-size: 1.55rem; }
  .tier-features li { font-size: 0.82rem; }
  .btn-assinar { padding: 11px; font-size: 0.84rem; }
  .upgrade-tier h3 { font-size: 1.05rem; }
}

/* 📱 Mobile (≤ 640px) — Cards EMPILHADOS (um abaixo do outro) */
@media (max-width: 640px) {
  .modal-upgrade-v3 {
    padding: var(--sp-4);
    max-width: 420px; /* largura confortável centralizada */
  }

  /* 🔑 Stack: 1 coluna, card sugerido com scale neutralizado */
  .upgrade-tiers {
    grid-template-columns: 1fr;
    gap: 22px; /* respiro entre os cards empilhados */
    margin: 22px 0 var(--sp-3);
    padding-top: 16px; /* espaço pro ribbon do Premium */
  }

  /* Como agora ocupam 100% da largura, o scale do "suggested"
     fica feio (vaza nas laterais). Removemos o scale no mobile
     e mantemos apenas o glow dourado pulsante como destaque. */
  .upgrade-tier.suggested,
  .upgrade-tier.suggested:hover {
    transform: none;
  }

  .upgrade-tier {
    padding: var(--sp-4) var(--sp-4);
    gap: var(--sp-3);
    max-width: 100%;
  }

  .upgrade-tier h3 { font-size: 1.1rem; }
  .tier-price { font-size: 1.75rem; }
  .tier-price small { font-size: 0.78rem; }
  .tier-features li {
    font-size: 0.85rem;
    padding: 5px 0;
    gap: 8px;
  }
  .tier-toggle-btn { font-size: 0.78rem; padding: 7px 10px; }
  .toggle-discount { font-size: 0.6rem; padding: 1px 6px; }
  .btn-assinar { padding: 13px; font-size: 0.92rem; }
  .tier-badge { font-size: 0.66rem; padding: 5px 11px; }
  .tier-ribbon { font-size: 0.66rem; padding: 4px 13px; }
}

/* 📱 Mobile pequeno (≤ 380px) — apenas ajustes finos */
@media (max-width: 380px) {
  .modal-upgrade-v3 { padding: var(--sp-3); }
  .upgrade-tier { padding: var(--sp-4) 14px; }
  .tier-price { font-size: 1.55rem; }
  .tier-features li { font-size: 0.8rem; }
  .btn-assinar { padding: 12px; font-size: 0.86rem; }
}



/* ============================================================
   🔮 SPRINT 3 — PROJEÇÃO 12 MESES
============================================================ */
.proj-modal-content {
  max-width: 1100px;
  background:
    radial-gradient(ellipse 50% 30% at 0% 0%, rgba(168,85,247,0.06), transparent 60%),
    radial-gradient(ellipse 50% 30% at 100% 100%, rgba(255,215,0,0.05), transparent 60%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 92vh;
  max-height: 92dvh;
}
.proj-modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,0.4), var(--gold-glow), transparent);
}

/* Header */
.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
  gap: 14px;
  flex-wrap: wrap;
}
.proj-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.proj-header h2 {
  font-size: var(--fs-xl);
  background: linear-gradient(135deg, #c084fc 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.proj-subtitle {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 500;
}

/* KPIs */
.proj-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: var(--sp-5);
}
.proj-kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(10px);
  animation: kpiIn 0.5s var(--ease-out) both;
}
.proj-kpi:nth-child(1) { animation-delay: 0.05s; }
.proj-kpi:nth-child(2) { animation-delay: 0.1s; }
.proj-kpi:nth-child(3) { animation-delay: 0.15s; }
.proj-kpi:nth-child(4) { animation-delay: 0.2s; }
.proj-kpi:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.4);
  border-color: var(--border-strong);
}
.proj-kpi-ico {
  font-size: 1.4rem;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.proj-kpi:nth-child(2) .proj-kpi-ico {
  background: rgba(248,113,113,0.1);
  border-color: rgba(248,113,113,0.2);
}
.proj-kpi:nth-child(3) .proj-kpi-ico {
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.2);
}
.proj-kpi:nth-child(4) .proj-kpi-ico {
  background: rgba(255,215,0,0.1);
  border-color: var(--border-gold);
}
.proj-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.proj-kpi-lbl {
  font-size: 0.66rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  line-height: 1.2;
}
.proj-kpi-val {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Alertas */
.proj-alertas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: var(--sp-5);
}
.proj-alerta {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--r-md);
  font-size: 0.88rem;
  line-height: 1.5;
  border-left: 3px solid var(--alerta-color, var(--muted));
  background: var(--alerta-bg, var(--surface));
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  animation: insightIn 0.4s var(--ease-out) both;
}
.proj-alerta span:first-child {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1.2;
}
.proj-alerta span:last-child { color: var(--text-2); }
.proj-alerta strong { color: var(--text); font-weight: 800; }

.proj-alerta-critico {
  --alerta-color: var(--danger);
  --alerta-bg: rgba(248,113,113,0.05);
}
.proj-alerta-aviso {
  --alerta-color: var(--warning);
  --alerta-bg: rgba(251,191,36,0.05);
}
.proj-alerta-info {
  --alerta-color: var(--info);
  --alerta-bg: rgba(96,165,250,0.05);
}
.proj-alerta-positivo {
  --alerta-color: var(--success);
  --alerta-bg: rgba(74,222,128,0.05);
}

/* Gráfico */
.proj-chart-box {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: var(--sp-5);
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(10px);
}
.proj-chart-box:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  border-color: var(--border-strong);
}
.proj-chart-box canvas {
  width: 100% !important;
  height: 360px !important;
  max-height: 360px !important;
}

/* Simulador */
.proj-simulador {
  background:
    radial-gradient(ellipse 60% 100% at 0% 0%, rgba(168,85,247,0.06), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}
.proj-simulador h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #c084fc 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.proj-sim-desc {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: var(--sp-4);
}
.proj-sim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.proj-sim-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.proj-sim-item label {
  font-size: var(--fs-xs);
  color: var(--text-2);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.proj-sim-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.proj-sim-input input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.proj-sim-input input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--grad-gold);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255,215,0,0.4);
  transition: transform 0.2s var(--ease-spring);
}
.proj-sim-input input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
.proj-sim-input input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--grad-gold);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255,215,0,0.4);
  border: none;
}
.proj-sim-val {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 4px 10px;
  background: rgba(255,215,0,0.08);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-gold);
}
#btnResetSim {
  width: auto;
  padding: 8px 16px;
  font-size: var(--fs-xs);
}

/* Tabela detalhada */
.proj-tabela-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-3);
}
.proj-tabela-toggle summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-2);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.proj-tabela-toggle summary::-webkit-details-marker { display: none; }
.proj-tabela-toggle summary::after {
  content: '→';
  margin-left: auto;
  transition: transform 0.3s var(--ease-spring);
  font-size: 1.1rem;
  color: var(--gold);
}
.proj-tabela-toggle[open] summary::after { transform: rotate(90deg); }
.proj-tabela-toggle summary:hover {
  background: rgba(255,215,0,0.05);
  color: var(--gold);
}
.proj-tabela-wrap {
  padding: 0 4px 4px;
  overflow-x: auto;
}
.proj-tabela {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-sm);
}
.proj-tabela th {
  background: rgba(255,255,255,0.03);
  font-weight: 700;
  color: var(--gold-soft);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.proj-tabela td {
  padding: 9px 8px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.proj-tabela td:first-child {
  font-weight: 700;
  color: var(--text);
}
.proj-tabela tr:hover td {
  background: rgba(255,255,255,0.02);
}
.proj-tabela tr.proj-row-negativa td {
  background: rgba(248,113,113,0.06);
}
.proj-tabela tr.proj-row-negativa:hover td {
  background: rgba(248,113,113,0.1);
}

/* 🆕 Botão fechar específico da Projeção — alinhamento top-right */
.proj-header { position: relative; }
.proj-header button.close {
  position: relative;
  top: -2px;
}

/* 🆕 SAZONALIDADES — Seção dentro da Projeção */
.proj-sazonalidades {
  background:
    radial-gradient(ellipse 60% 100% at 0% 0%, rgba(255,215,0,0.05), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}
.proj-saz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.proj-saz-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}
.proj-saz-desc {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: var(--sp-4);
  line-height: 1.5;
}
/* ============================================================
   🆕 SAZONALIDADES — Layout responsivo robusto (mobile-first)
============================================================ */
.proj-saz-item {
  display: grid;
  grid-template-areas:
    "icon  toggle del"
    "desc  desc   desc"
    "valor valor  mes";
  grid-template-columns: 36px minmax(0, 1fr) 95px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--saz-color, var(--gold));
  border-radius: var(--r-md);
  transition: all 0.2s;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.proj-saz-item:hover {
  background: var(--surface-hover);
}
.proj-saz-item.tipo-receita { --saz-color: var(--success); }
.proj-saz-item.tipo-despesa { --saz-color: var(--danger); }

.proj-saz-item .saz-icon       { grid-area: icon; }
.proj-saz-item .saz-tipo-toggle {
  grid-area: toggle;
  justify-self: stretch;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  flex-wrap: nowrap;
}

.proj-saz-item input[data-f="descricao"] {
  grid-area: desc;
  min-width: 0;
  max-width: 100%;
}
.proj-saz-item .saz-valor-wrap { grid-area: valor; min-width: 0; max-width: 100%; }
.proj-saz-item select[data-f="mes"] { grid-area: mes; min-width: 0; max-width: 100%; }
.proj-saz-item .proj-saz-del   { grid-area: del; justify-self: end; flex-shrink: 0; }


.proj-saz-item .saz-icon {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
}

.proj-saz-item input,
.proj-saz-item select {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.85rem;
  font-family: inherit;
  width: 100%;
  min-width: 0;
}

/* 🆕 Select de mês — força tema escuro no dropdown nativo */
.proj-saz-item select[data-f="mes"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--bg-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffd700' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 26px;
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
}
.proj-saz-item select[data-f="mes"] option {
  background-color: var(--bg-2);
  color: var(--text);
  font-weight: 600;
  padding: 8px;
}

.proj-saz-item input:focus,
.proj-saz-item select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255,215,0,0.15);
}
.proj-saz-item input[type="number"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}


/* Toggle Receita/Despesa */
.saz-tipo-toggle {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  min-width: 0;
}
.saz-tipo-toggle .saz-tipo-btn {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}

.saz-tipo-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}
.saz-tipo-btn span { font-size: 0.95rem; font-weight: 900; line-height: 1; }
.saz-tipo-btn:hover { color: var(--text); }
.saz-tipo-btn.active[data-tipo="receita"] {
  background: rgba(34,197,94,0.18);
  color: #4ade80;
  box-shadow: inset 0 0 0 1px rgba(74,222,128,0.4);
}
.saz-tipo-btn.active[data-tipo="despesa"] {
  background: rgba(239,68,68,0.18);
  color: #f87171;
  box-shadow: inset 0 0 0 1px rgba(248,113,113,0.4);
}

/* Wrapper R$ */
.saz-valor-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.saz-valor-prefix {
  position: absolute;
  left: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}
.saz-valor-wrap input[type="number"] {
  padding-left: 34px !important;
}

/* Botão deletar */
.proj-saz-del {
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.25);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.proj-saz-del:hover {
  background: rgba(239,68,68,0.25);
  transform: scale(1.08);
}

/* ═══ DESKTOP (≥ 900px) — tudo em uma linha ═══ */
@media (min-width: 900px) {
  .proj-saz-item {
    grid-template-areas: "icon toggle desc valor mes del";
    grid-template-columns: auto auto minmax(180px, 1.6fr) 150px 100px 40px;
    gap: 12px;
  }
}
/* ═══ MOBILE pequeno (≤ 420px) — empilha mais ═══ */
@media (max-width: 420px) {
  .proj-saz-item {
    grid-template-areas:
      "icon  toggle del"
      "desc  desc   desc"
      "valor valor  mes";
    grid-template-columns: 32px minmax(0, 1fr) 72px;
    gap: 8px;
    padding: 10px;
  }

  /* DEL mantém 36px e fica ancorado à direita da coluna de 72px */
  .proj-saz-item .proj-saz-del {
    width: 36px;
    height: 36px;
    justify-self: end;
  }


  .proj-saz-item .saz-icon { width: 32px; height: 32px; font-size: 1.1rem; }
  .proj-saz-item .proj-saz-del { width: 36px; height: 36px; }
  .saz-tipo-btn {
    padding: 4px 6px;
    font-size: 0.68rem;
    gap: 3px;
  }
  .saz-tipo-btn span { font-size: 0.85rem; }


  /* 🆕 Valor — ocupa 2 colunas, fica confortável para ler */
  .proj-saz-item .saz-valor-wrap {
    width: 100%;
  }
  .proj-saz-item .saz-valor-wrap input[type="number"] {
    font-size: 0.9rem;
    padding: 8px 8px 8px 32px !important;
    text-align: right;
    font-weight: 600;
  }
  .proj-saz-item .saz-valor-prefix {
    left: 10px;
    font-size: 0.78rem;
  }

  /* 🆕 Mês — confortável à direita */
  .proj-saz-item select[data-f="mes"] {
    width: 100%;
    text-align: center;
    text-align-last: center;
    padding: 8px 22px 8px 6px;
    font-size: 0.8rem;
    font-weight: 700;
    background-position: right 6px center;
  }

}



.btn-add-saz {
  padding: 8px 14px;
  background: rgba(255,215,0,0.1);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}
.btn-add-saz:hover {
  background: rgba(255,215,0,0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,215,0,0.2);
}
.proj-saz-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.proj-saz-preset {
  padding: 5px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-2);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.proj-saz-preset:hover {
  background: rgba(255,215,0,0.1);
  border-color: var(--border-gold);
  color: var(--gold);
}
.proj-saz-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.proj-saz-empty {
  text-align: center;
  padding: var(--sp-4);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-style: italic;
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
}

.proj-saz-item:hover {
  background: var(--surface-hover);
  transform: translateX(2px);
}
.proj-saz-item.tipo-receita { --saz-color: var(--success); }
.proj-saz-item.tipo-despesa { --saz-color: var(--danger); }
.proj-saz-item .saz-icon {
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
}
.proj-saz-item input,
.proj-saz-item select {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 7px 9px;
  font-size: 0.82rem;
  font-family: inherit;
  width: 100%;
  min-width: 0;
}
.proj-saz-item input:focus,
.proj-saz-item select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255,215,0,0.15);
}
.proj-saz-item input[type="number"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.proj-saz-del {
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.25);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}
.proj-saz-del:hover {
  background: rgba(239,68,68,0.25);
  transform: scale(1.08);
}




/* ============================================================
   🔮 PROJEÇÃO — RESPONSIVO
============================================================ */
@media (max-width: 1024px) {
  .proj-kpis { grid-template-columns: repeat(2, 1fr); }
  .proj-sim-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .proj-modal-content {
    padding: 12px;
    border-radius: 18px;
  }
  .proj-sazonalidades {
    padding: var(--sp-3);
  }

  .proj-header { padding-bottom: 16px; margin-bottom: 20px; }
  .proj-header h2 { font-size: 1.15rem; }

  .proj-kpi {
    padding: 10px;
    gap: 10px;
  }
  .proj-kpi-ico {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    border-radius: 10px;
  }
  .proj-kpi-val { font-size: 0.88rem; }

  .proj-chart-box { padding: 14px; border-radius: 14px; }
  .proj-chart-box canvas {
    height: 300px !important;
    max-height: 300px !important;
  }

  .proj-simulador { padding: var(--sp-4); }
  .proj-alerta { font-size: 0.82rem; padding: 10px 14px; }

  .proj-tabela { font-size: 0.78rem; }
  .proj-tabela th { font-size: 0.64rem; padding: 8px 4px; }
  .proj-tabela td { padding: 7px 4px; }
}


@media (max-width: 480px) {
  .proj-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .proj-kpi {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }
  .proj-kpi-val { font-size: 0.82rem; }

  .proj-chart-box canvas {
    height: 260px !important;
    max-height: 260px !important;
  }
}


/* ============ 14. DASHBOARD MODAL ============ */
.dash-modal-content {
  max-width: 1180px;
  background:
    radial-gradient(ellipse 50% 30% at 0% 0%, rgba(255,215,0,0.05), transparent 60%),
    radial-gradient(ellipse 50% 30% at 100% 100%, rgba(59,130,246,0.05), transparent 60%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 92vh;
  max-height: 92dvh;
  box-shadow: var(--shadow-lg);
}
.dash-modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.dash-header-left { display: flex; flex-direction: column; gap: 4px; }
.dash-header h2 {
  font-size: var(--fs-xl);
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.dash-subtitle {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 500;
}
.dash-header-right { display: flex; align-items: center; gap: 14px; }
.dash-filtro {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 7px 14px;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s;
}
.dash-filtro:hover { border-color: var(--border-gold); }
.dash-filtro label {
  font-size: var(--fs-xs);
  color: var(--muted);
  white-space: nowrap;
  font-weight: 600;
}
.dash-filtro select {
  background: transparent;
  border: none;
  color: var(--gold);
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  outline: none;
  max-width: 160px;
}
.dash-filtro select option { background: var(--bg-2); color: var(--text); }
.dash-filtro.hidden { display: none; }

/* Insights */
.dash-insights {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(ellipse 60% 100% at 0% 50%, rgba(255,215,0,0.06), transparent 60%),
    radial-gradient(ellipse 60% 100% at 100% 50%, rgba(59,130,246,0.05), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 22px 26px;
  margin-bottom: 22px;
  backdrop-filter: blur(10px);
}
.health-ring {
  --score: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  background:
    radial-gradient(closest-side, var(--bg) 76%, transparent 77%),
    conic-gradient(var(--ring-color, var(--success)) calc(var(--score) * 1%), rgba(255,255,255,0.06) 0);
  transition: --score 1.2s var(--ease-out);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}
.health-score {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.health-max {
  font-size: 0.7rem;
  color: var(--muted-2);
  font-weight: 600;
  line-height: 1.2;
}
.health-label { display: flex; flex-direction: column; gap: 4px; }
.health-label strong { font-size: 1.05rem; color: var(--text); font-weight: 800; letter-spacing: -0.01em; }
.health-label small { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

.insight-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insight-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--insight-color, var(--muted-2));
  animation: insightIn 0.5s var(--ease-out) both;
  transition: background 0.2s;
}
.insight-list li:hover { background: var(--surface-hover); }
.insight-list li:nth-child(1) { animation-delay: 0.1s; }
.insight-list li:nth-child(2) { animation-delay: 0.2s; }
.insight-list li:nth-child(3) { animation-delay: 0.3s; }
.insight-list li:nth-child(4) { animation-delay: 0.4s; }
.insight-list li .insight-emoji { font-size: 1.1rem; flex-shrink: 0; }
.insight-list li strong { color: var(--text); font-weight: 700; }
.insight-list li.positive { --insight-color: var(--success); }
.insight-list li.negative { --insight-color: var(--danger); }
.insight-list li.warning  { --insight-color: var(--warning); }
.insight-list li.neutral  { --insight-color: var(--info); }
@keyframes insightIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* KPIs — Cards modernos com glow */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
}
.dash-kpi-card {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.3s var(--ease-out);
  overflow: hidden;
  backdrop-filter: blur(10px);
  animation: kpiIn 0.5s var(--ease-out) both;
}
.dash-kpi-card:nth-child(1) { animation-delay: 0.05s; }
.dash-kpi-card:nth-child(2) { animation-delay: 0.1s; }
.dash-kpi-card:nth-child(3) { animation-delay: 0.15s; }
.dash-kpi-card:nth-child(4) { animation-delay: 0.2s; }
.dash-kpi-card:nth-child(5) { animation-delay: 0.25s; }
.dash-kpi-card:nth-child(6) { animation-delay: 0.3s; }
@keyframes kpiIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dash-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.dash-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.4);
  border-color: var(--border-strong);
}
.kpi-icon {
  font-size: 1.35rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.06);
}
.kpi-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  width: 100%;
}
.kpi-label {
  font-size: 0.68rem;
  color: var(--muted-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.kpi-value {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.kpi-delta {
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 2px;
}
.kpi-delta.delta-up   { color: var(--success); }
.kpi-delta.delta-down { color: var(--danger); }
.kpi-delta.delta-neu  { color: var(--muted); }

.kpi-receita  {
  border-color: rgba(74,222,128,0.28);
  box-shadow: inset 0 0 30px rgba(74,222,128,0.05);
}
.kpi-receita .kpi-icon { background: rgba(74,222,128,0.1); color: var(--success); }
.kpi-despesa  {
  border-color: rgba(248,113,113,0.28);
  box-shadow: inset 0 0 30px rgba(248,113,113,0.05);
}
.kpi-despesa .kpi-icon { background: rgba(248,113,113,0.1); color: var(--danger); }
.kpi-saldo    {
  border-color: rgba(255,215,0,0.28);
  box-shadow: inset 0 0 30px rgba(255,215,0,0.05);
}
.kpi-saldo .kpi-icon { background: rgba(255,215,0,0.1); color: var(--gold); }
.kpi-poupanca {
  border-color: rgba(56,189,248,0.28);
  box-shadow: inset 0 0 30px rgba(56,189,248,0.05);
}
.kpi-poupanca .kpi-icon { background: rgba(56,189,248,0.1); color: #38bdf8; }
.kpi-comp     {
  border-color: rgba(139,92,246,0.28);
  box-shadow: inset 0 0 30px rgba(139,92,246,0.05);
}
.kpi-comp .kpi-icon { background: rgba(139,92,246,0.1); color: #a78bfa; }

.kpi-lock-overlay {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(10,12,16,0.85);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: background 0.25s;
}
.kpi-lock-overlay:hover { background: rgba(10,12,16,0.7); }
.kpi-lock-overlay span  { font-size: 1.5rem; }
.kpi-lock-overlay small {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.kpi-lock-overlay.hidden { display: none; }

/* Gráficos */
.dash-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  position: relative;
  z-index: 1;
}
.dash-chart-box {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(10px);
  animation: cardIn 0.6s var(--ease-out) both;
}
.dash-charts-grid > *:nth-child(1) { animation-delay: 0.35s; }
.dash-charts-grid > *:nth-child(2) { animation-delay: 0.4s; }
.dash-chart-box:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.dash-chart-box canvas {
  width: 100% !important;
  height: 320px !important;
  max-height: 320px !important;
}
.dash-chart-box.is-donut { min-height: 380px; }

/* ============ 15. MODAL EXPORTAR ============ */
.export-menu-modal {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.export-menu-modal button {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 13px 18px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: all 0.25s var(--ease-out);
}
.export-menu-modal button:hover {
  background: rgba(255,215,0,0.1);
  border-color: var(--border-gold);
  color: var(--gold);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(255,215,0,0.08);
}
.export-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 6px 0;
}

/* ============ 16. BOTÕES FLUTUANTES ============ */
.float-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.float-whatsapp {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,0.5);
  transition: all 0.3s var(--ease-spring);
  animation: wppPulse 2.4s ease-in-out infinite;
  border: none;
  cursor: pointer;
}
.float-whatsapp svg { width: 28px; height: 28px; }
.float-whatsapp:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 24px rgba(37,211,102,0.7);
  animation-play-state: paused;
}
@keyframes wppPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(37,211,102,0.5); }
  50%      {
    box-shadow:
      0 6px 20px rgba(37,211,102,0.5),
      0 0 0 14px rgba(37,211,102,0);
  }
}
.float-actions .float-whatsapp .icon-close { display: none; width: 26px; height: 26px; }
.float-actions.open .float-whatsapp .icon-main  { display: none; }
.float-actions.open .float-whatsapp .icon-close { display: block; }
.float-actions.open .float-whatsapp {
  background: linear-gradient(135deg, #475569, #334155);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  animation: none;
  transform: rotate(180deg);
}
.float-action {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  transform: translateY(24px) scale(0.5);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.35s var(--ease-spring);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  position: relative;
}
.float-action svg { width: 22px; height: 22px; }
.float-suggestion { background: var(--grad-gold); color: #14171c; }
.float-suggestion:hover {
  transform: translateY(0) scale(1.1);
  box-shadow: 0 8px 22px rgba(255,215,0,0.55);
}
.float-wpp-action { background: linear-gradient(135deg, #25d366, #128c7e); }
.float-wpp-action:hover {
  transform: translateY(0) scale(1.1);
  box-shadow: 0 8px 22px rgba(37,211,102,0.6);
}
.float-actions.open .float-action {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.float-actions.open .float-wpp-action  { transition-delay: 0.05s; }
.float-actions.open .float-suggestion  { transition-delay: 0.12s; }
.float-action::before {
  content: attr(title);
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
}
.float-action:hover::before { opacity: 1; }

/* ============ 17. MODAL SUGESTÃO ============ */
.sugestao-modal {
  max-width: 500px;
  background:
    radial-gradient(ellipse at top, rgba(255,215,0,0.06), transparent 60%),
    linear-gradient(145deg, var(--bg-2), var(--bg-elev));
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow-lg);
  animation: sugFadeIn 0.35s var(--ease-spring);
}
@keyframes sugFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.sugestao-body { padding: 4px 0 0; }
.sugestao-intro {
  color: var(--text-2);
  font-size: 0.93rem;
  line-height: 1.6;
  margin: 0 0 20px;
}
.sugestao-intro strong { color: var(--gold); }
.sugestao-label {
  display: block;
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 14px 0 6px;
}
.sugestao-input {
  width: 100%;
  padding: 12px 15px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.93rem;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s;
}
.sugestao-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}
textarea.sugestao-input { min-height: 120px; line-height: 1.55; }
.sugestao-contador {
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted-2);
  margin: 4px 0 16px;
}
.btn-enviar-sugestao {
  width: 100%;
  background: var(--grad-gold);
  color: #14171c;
  padding: 14px 26px;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-gold);
  transition: all 0.25s var(--ease-out);
  font-family: inherit;
  letter-spacing: 0.3px;
}
.btn-enviar-sugestao:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(255,215,0,0.5);
}
.btn-enviar-sugestao .arrow { transition: transform 0.25s var(--ease-spring); display: inline-block; }
.btn-enviar-sugestao:hover .arrow { transform: translateX(5px); }
.sugestao-status {
  text-align: center;
  font-size: 0.86rem;
  margin-top: 14px;
  min-height: 18px;
}

/* ============ 18. ACESSIBILIDADE ============ */
.btn:focus-visible,
.nav-item:focus-visible,
.month-arrow:focus-visible,
.btn-burger-floating:focus-visible,
.hero-details-toggle:focus-visible,
.add-btn:focus-visible,
.del-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   19. RESPONSIVO
   ============================================================ */

/* ≤ 1280px — sidebar mais estreita */
@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 230px 1fr; }
  .dash-kpi-grid { gap: 10px; }
}

/* ≤ 1024px — KPIs e charts adaptam */
@media (max-width: 1024px) {
  .dash-kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-insights {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .dash-insights .insight-health {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .insight-list li { text-align: left; }
  .dash-charts-grid { grid-template-columns: 1fr; }
}

/* ≤ 900px — Sidebar vira drawer */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 290px;
    transform: translateX(-100%);
    z-index: 250;
    box-shadow: 8px 0 32px rgba(0,0,0,0.6);
  }
  .app-sidebar.is-open { transform: translateX(0); }
  .btn-burger-floating { display: flex; }

  .app-main > .hero-bar { margin: 72px var(--sp-3) var(--sp-3); }
  .app-content { grid-template-columns: 1fr; padding: 0 var(--sp-4) var(--sp-5); }

  /* Touch targets */
  .nav-item,
  .btn,
  .month-arrow,
  .add-btn,
  .del-btn { min-height: 44px; }
  .del-btn { min-width: 36px; }
  .month-arrow { width: 36px; height: 36px; }
}

/* ≤ 768px — Mobile tablet */
@media (max-width: 768px) {
  .hero-bar {
    padding: var(--sp-4);
    border-radius: var(--r-xl);
  }
  .app-content { padding: 0 var(--sp-3) var(--sp-4); gap: var(--sp-3); }
  .person-card, .shared-card, .obs-card { padding: var(--sp-4); }

  .hero-month-nav .month-label {
    min-width: 110px;
    font-size: 0.85rem;
  }
  .hero-balance-row { gap: 10px; }
  .hero-balance-value { font-size: clamp(1.5rem, 4vw + 1rem, 2rem); }
  .hero-sub-val { font-size: 0.92rem; }
  .hero-partner-line { gap: 10px; }
  .hero-footer-stats {
    gap: 10px;
    font-size: 0.84rem;
  }
  .hero-stat-val { font-size: 0.9rem; }
  .hero-stat-sep { display: none; }

  .upgrade-plans,
  .onb-choices { grid-template-columns: 1fr; }

  /* Dashboard mobile */
  .dash-modal-content {
    padding: 16px;
    border-radius: 18px;
  }
  .dash-header { padding-bottom: 16px; margin-bottom: 20px; }
  .dash-header h2 { font-size: 1.15rem; }
  .dash-subtitle  { font-size: 0.74rem; }
  .dash-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .dash-kpi-card {
    padding: 10px 8px;
    gap: 6px;
    border-radius: 12px;
  }
  .kpi-icon {
    width: 30px;
    height: 30px;
    font-size: 1rem;
    border-radius: 8px;
  }
  .kpi-value { font-size: 0.9rem; }
  .kpi-delta { font-size: 0.66rem; }

  .health-ring  { width: 82px; height: 82px; }
  .health-score { font-size: 1.5rem; }
  .health-max   { font-size: 0.62rem; }
  .dash-insights {
    padding: 16px;
    gap: 16px;
  }
  .insight-list li {
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  .dash-chart-box { padding: 14px; border-radius: 14px; }
  .dash-chart-box canvas {
    height: 280px !important;
    max-height: 280px !important;
  }
  .dash-chart-box.is-donut canvas {
    height: 420px !important;
    max-height: 420px !important;
  }

  /* Tabelas compactas */
  td input,
  td select { font-size: 0.76rem; padding: 5px 6px; }
  th { font-size: 0.7rem; padding: 6px 4px; }

  /* Float buttons menores */
  .float-actions { bottom: 18px; right: 18px; gap: 10px; }
  .float-whatsapp { width: 50px; height: 50px; }
  .float-whatsapp svg { width: 26px; height: 26px; }
  .float-action { width: 44px; height: 44px; }
  .float-action svg { width: 20px; height: 20px; }
  .float-action::before { display: none; }
}

/* ≤ 480px — Mobile pequeno */
@media (max-width: 480px) {
  .hero-bar {
    padding: var(--sp-3);
    margin: var(--sp-2) var(--sp-2);
    border-radius: var(--r-lg);
  }
  .app-main > .hero-bar { margin: 70px var(--sp-2) var(--sp-2); }

  .hero-balance-row,
  .hero-footer-stats,
  .hero-partner-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .hero-footer-stats { gap: 6px; }

  .dash-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-modal-content { padding: 12px; border-radius: 14px; }
  .kpi-label {
    font-size: 0.6rem;
    letter-spacing: 0.3px;
  }
  .kpi-value { font-size: 0.86rem; }

  .dash-chart-box canvas {
    height: 260px !important;
    max-height: 260px !important;
  }
  .dash-chart-box.is-donut canvas {
    height: 440px !important;
    max-height: 440px !important;
  }

  .modal-content { padding: var(--sp-4); border-radius: var(--r-lg); }
  .modal-header h2 { font-size: var(--fs-base); }

  .modal-header button.close,
  .dash-header button.close,
  .proj-header button.close,
  .sim-header button.close {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 0.9rem;
  }

}

/* ============================================================
   🎯 SPRINT 2 — METAS FINANCEIRAS
   ============================================================ */

/* === TOOLBAR DO MODAL === */
.metas-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.metas-limite-info {
  font-size: var(--fs-sm);
  color: var(--muted);
  font-weight: 600;
}
.metas-limite-info strong { color: var(--gold); }

/* === GRID DE METAS === */
.metas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-4);
}

/* === EMPTY STATE === */
.metas-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  background:
    radial-gradient(ellipse at top, rgba(255,215,0,0.04), transparent 60%),
    var(--surface);
  border: 1px dashed var(--border-gold);
  border-radius: var(--r-xl);
}
.metas-empty-icon {
  font-size: 3.5rem;
  margin-bottom: var(--sp-3);
  filter: drop-shadow(0 0 20px var(--gold-glow));
  padding: 18px;
  animation: none !important;
}

@keyframes emptyFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -12px, 0); }
}
.metas-empty h3 {
  color: var(--gold);
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-2);
  font-weight: 800;
}
.metas-empty p {
  color: var(--text-2);
  font-size: var(--fs-sm);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}

/* === CARD DE META === */
.meta-card {
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(255,215,0,0.06), transparent 60%),
    linear-gradient(135deg, var(--bg-2) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  animation: cardIn 0.5s var(--ease-out) both;
  position: relative;
  overflow: hidden;
}
.meta-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
}
.meta-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.meta-card.is-done {
  border-left-color: var(--success);
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(74,222,128,0.08), transparent 60%),
    linear-gradient(135deg, var(--bg-2) 0%, var(--bg-elev) 100%);
}
.meta-card.is-late {
  border-left-color: var(--danger);
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(248,113,113,0.08), transparent 60%),
    linear-gradient(135deg, var(--bg-2) 0%, var(--bg-elev) 100%);
}

/* Header */
.meta-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
}
.meta-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.meta-emoji {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,215,0,0.08);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.meta-card-title h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meta-card-title small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.meta-badge {
  font-size: 0.66rem;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.meta-badge-done {
  background: rgba(74,222,128,0.15);
  color: #86efac;
  border: 1px solid rgba(74,222,128,0.3);
}
.meta-badge-late {
  background: rgba(248,113,113,0.15);
  color: #fca5a5;
  border: 1px solid rgba(248,113,113,0.3);
}
.meta-badge-near {
  background: rgba(255,215,0,0.15);
  color: var(--gold-soft);
  border: 1px solid var(--border-gold);
}

/* Barra de progresso */
.meta-progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meta-progress-bar {
  height: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}
.meta-progress-fill {
  height: 100%;
  background: var(--grad-gold);
  border-radius: 999px;
  transition: width 1s var(--ease-out);
  box-shadow: 0 0 12px rgba(255,215,0,0.5);
  position: relative;
  overflow: hidden;
}
.meta-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2.5s linear infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
.is-done .meta-progress-fill {
  background: linear-gradient(135deg, #4ade80, #16a34a);
  box-shadow: 0 0 12px rgba(74,222,128,0.5);
}
.is-late .meta-progress-fill {
  background: linear-gradient(135deg, #f87171, #dc2626);
  box-shadow: 0 0 12px rgba(248,113,113,0.5);
}

.meta-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--fs-sm);
}
.meta-progress-pct {
  font-size: 1.2rem;
  font-weight: 900;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.is-done .meta-progress-pct {
  background: linear-gradient(135deg, #4ade80, #16a34a);
  -webkit-background-clip: text;
  background-clip: text;
}
.meta-progress-vals {
  color: var(--text-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.meta-progress-vals em {
  color: var(--muted-2);
  font-style: normal;
  font-weight: 500;
  margin: 0 3px;
}

/* Cronograma */
.meta-cronograma {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: var(--sp-3);
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.cron-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}
.cron-item small {
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}
.cron-item strong {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.cron-highlight {
  color: var(--gold) !important;
  font-size: 1rem !important;
}
.cron-done, .cron-late {
  grid-column: 1 / -1;
  padding: var(--sp-2);
}
.cron-done strong { color: var(--success); font-size: 1.05rem; }
.cron-late strong { color: var(--danger); font-size: 1.05rem; }
.cron-done small, .cron-late small { color: var(--text-2); font-size: 0.74rem; }

/* Ações do card */
.meta-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-meta-aporte {
  flex: 1;
  padding: 10px 14px;
  background: var(--grad-gold);
  color: #14171c;
  border: none;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  letter-spacing: 0.2px;
  box-shadow: 0 4px 12px rgba(255,215,0,0.2);
}
.btn-meta-aporte:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255,215,0,0.45);
}
.btn-meta-icon {
  width: 38px;
  height: 38px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s var(--ease-out);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-meta-icon:hover {
  background: rgba(255,215,0,0.1);
  border-color: var(--border-gold);
  color: var(--gold);
  transform: scale(1.05);
}
.btn-meta-icon.btn-meta-del:hover {
  background: rgba(248,113,113,0.15);
  border-color: rgba(248,113,113,0.4);
  color: #fca5a5;
}

/* === FORMULÁRIO DE META === */
.form-meta { display: flex; flex-direction: column; gap: 4px; }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.emoji-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.emoji-picker button {
  font-size: 1.4rem;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  line-height: 1;
}
.emoji-picker button:hover {
  background: rgba(255,215,0,0.1);
  border-color: var(--border-gold);
  transform: scale(1.1);
}
.emoji-picker button.selected {
  background: rgba(255,215,0,0.15);
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255,215,0,0.2);
  transform: scale(1.05);
}

/* Preview cronograma no form */
.meta-preview-cronograma {
  margin: var(--sp-3) 0;
  padding: var(--sp-4);
  background:
    radial-gradient(ellipse at top, rgba(255,215,0,0.06), transparent 60%),
    var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  animation: previewIn 0.3s var(--ease-out);
}
@keyframes previewIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.preview-titulo {
  font-size: var(--fs-xs);
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
.preview-grid > div {
  text-align: center;
  padding: 6px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
}
.preview-grid small {
  display: block;
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  margin-bottom: 2px;
}
.preview-grid strong {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 800;
}
.preview-info {
  display: block;
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
  font-style: italic;
}

.form-actions-meta {
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}
.form-actions-meta .btn { flex: 1; justify-content: center; }

/* === MODAL APORTE === */
.aporte-info {
  margin-bottom: var(--sp-4);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.aporte-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}
.aporte-info-grid small {
  display: block;
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  margin-bottom: 2px;
}
.aporte-info-grid strong {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 800;
}

.aporte-tipo-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.aporte-tipo-btn {
  padding: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-2);
  cursor: pointer;
  font-weight: 700;
  font-size: var(--fs-sm);
  transition: all 0.2s var(--ease-out);
}
.aporte-tipo-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-gold);
}
.aporte-tipo-btn.active {
  background: rgba(255,215,0,0.12);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255,215,0,0.15);
}

/* Sugestão de saldo */
.sugestao-saldo {
  margin: var(--sp-3) 0;
  padding: var(--sp-3);
  background:
    radial-gradient(ellipse at top, rgba(74,222,128,0.1), transparent 60%),
    rgba(74,222,128,0.05);
  border: 1px dashed rgba(74,222,128,0.4);
  border-radius: var(--r-md);
  animation: previewIn 0.35s var(--ease-out);
}
.sugestao-saldo-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.sugestao-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(74,222,128,0.5));
}
.sugestao-text { flex: 1; min-width: 140px; }
.sugestao-text strong {
  display: block;
  font-size: var(--fs-sm);
  color: #86efac;
  font-weight: 800;
}
.sugestao-text small {
  font-size: 0.74rem;
  color: var(--text-2);
}
.btn-usar-saldo {
  background: linear-gradient(135deg, #4ade80, #16a34a);
  color: #0a0d12;
  border: none;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--ease-out);
  box-shadow: 0 4px 12px rgba(74,222,128,0.3);
}
.btn-usar-saldo:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(74,222,128,0.5);
}

/* Histórico de aportes */
.historico-aportes {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.historico-titulo {
  font-size: var(--fs-sm);
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-3);
}
.historico-vazio {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--muted);
  padding: var(--sp-3);
  font-style: italic;
}
.historico-lista {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.historico-lista li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
}
.historico-lista li.aporte-deposito { border-left: 3px solid var(--success); }
.historico-lista li.aporte-retirada { border-left: 3px solid var(--danger); }
.aporte-sinal {
  font-size: 1.2rem;
  font-weight: 900;
  width: 24px;
  text-align: center;
}
.aporte-deposito .aporte-sinal { color: var(--success); }
.aporte-retirada .aporte-sinal { color: var(--danger); }
.aporte-info-line { flex: 1; min-width: 0; }
.aporte-info-line strong {
  display: block;
  color: var(--text);
  font-weight: 800;
  font-size: 0.92rem;
}
.aporte-info-line small {
  color: var(--muted);
  font-size: 0.74rem;
}

/* === RESPONSIVO === */
@media (max-width: 640px) {
  .metas-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .emoji-picker { grid-template-columns: repeat(4, 1fr); }
  .meta-emoji { font-size: 1.6rem; width: 42px; height: 42px; }
  .meta-card-title h3 { font-size: 0.96rem; }
  .meta-progress-pct { font-size: 1.05rem; }
  .meta-cronograma { padding: 10px; }
  .cron-item strong { font-size: 0.84rem; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .preview-grid strong { font-size: 0.78rem; }
  .aporte-info-grid strong { font-size: 0.85rem; }
  .sugestao-saldo-inner { flex-direction: column; align-items: flex-start; }
  .btn-usar-saldo { width: 100%; }
  .form-actions-meta { flex-direction: column-reverse; }
}

/* ============================================================
   🔒 Linhas de lançamento vinculadas a Metas
============================================================ */
.row-meta-locked {
  background: rgba(255, 215, 0, 0.04);
  position: relative;
}
.row-meta-locked input,
.row-meta-locked select {
  background: rgba(255, 215, 0, 0.06) !important;
  border-color: rgba(255, 215, 0, 0.2) !important;
  color: #fcd34d !important;
  cursor: not-allowed;
  opacity: 0.95;
}
.row-meta-locked .cat-locked {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 215, 0, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}
.meta-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.95rem;
  color: #fcd34d;
  cursor: help;
  opacity: 0.85;
}
.meta-lock-icon:hover { opacity: 1; }


/* 🆕 Ajuste fino: PREMIUM é mais longo, reduz levemente padding/letter-spacing */
.nav-tag-premium.is-premium {
  padding: 3px 7px;
  font-size: 0.56rem;
  letter-spacing: 0.4px;
}


/* ============================================================
   🧪 SPRINT 4 — SIMULADOR (Laboratório Financeiro)
============================================================ */

.sim-modal-content {
  max-width: 1200px;
  background:
    radial-gradient(ellipse 50% 30% at 0% 0%, rgba(56,189,248,0.06), transparent 60%),
    radial-gradient(ellipse 50% 30% at 100% 100%, rgba(255,215,0,0.05), transparent 60%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: var(--sp-6);
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  position: relative;
}
.sim-modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.4), var(--gold-glow), transparent);
}

/* Header */
.sim-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
  gap: 14px;
  flex-wrap: wrap;
}
.sim-header-left { display: flex; flex-direction: column; gap: 4px; }
.sim-header h2 {
  font-size: var(--fs-xl);
  background: linear-gradient(135deg, #38bdf8 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sim-subtitle {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 500;
}

/* Hint perfil */
.sim-hint {
  background: rgba(56,189,248,0.06);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-bottom: var(--sp-4);
}
.sim-hint strong { color: #7dd3fc; }

/* ===== TABS ===== */
.sim-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 5px;
  margin-bottom: var(--sp-4);
}
.sim-tab {
  background: transparent;
  border: none;
  padding: 9px 8px;
  border-radius: var(--r-sm);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  transition: all 0.2s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  min-width: 0;
}
.sim-tab-ico { font-size: 1.2rem; line-height: 1; }
.sim-tab-lbl {
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.sim-tab:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.sim-tab.is-active {
  background: linear-gradient(135deg, rgba(56,189,248,0.15), rgba(255,215,0,0.08));
  color: var(--gold);
  box-shadow: 0 0 0 1px var(--border-gold), 0 4px 12px rgba(255,215,0,0.1);
}

/* ===== LAYOUT GRID ===== */
.sim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  align-items: start;
}

/* ===== FORMS ===== */
.sim-forms {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
}
.sim-form-panel { display: none; flex-direction: column; gap: 12px; }
.sim-form-panel.is-active {
  display: flex;
  animation: simPanelIn 0.3s var(--ease-out);
}
@keyframes simPanelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sim-form-panel h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.sim-panel-desc {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 2px;
}

/* Fields */
.sim-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sim-field label {
  font-size: 0.74rem;
  color: var(--text-2);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.sim-field input,
.sim-field select {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
  min-width: 0;
  transition: all 0.2s var(--ease-out);
  font-variant-numeric: tabular-nums;
}
.sim-field input:focus,
.sim-field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}
.sim-field input[type="number"] { text-align: right; }
.sim-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 0;
}

/* Bloco do Comparador */
.sim-comp-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sim-comp-titulo {
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Actions */
.sim-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.sim-actions .btn { flex: 1 1 auto; justify-content: center; min-width: 120px; }

/* ===== RESULT ===== */
.sim-result-wrap {
  position: relative;
  min-height: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  min-width: 0;
}
.sim-result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: 320px;
  padding: var(--sp-5);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
  gap: 12px;
}
.sim-placeholder-icon {
  font-size: 3rem;
  opacity: 0.5;
  filter: drop-shadow(0 0 16px rgba(56,189,248,0.3));
}
.sim-result:not([hidden]) ~ .sim-result-placeholder,
.sim-result-wrap:has(.sim-result:not([hidden])) .sim-result-placeholder { display: none; }

.sim-result { animation: simPanelIn 0.4s var(--ease-out); }
.sim-res-titulo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #38bdf8 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* KPIs do resultado */
.sim-res-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: var(--sp-3);
}
.sim-kpi {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  transition: transform 0.2s var(--ease-out);
}
.sim-kpi:hover { transform: translateY(-2px); }
.sim-kpi.is-destaque {
  background:
    radial-gradient(ellipse at top, rgba(255,215,0,0.1), transparent 70%),
    var(--surface-2);
  border-color: var(--border-gold);
  box-shadow: 0 0 0 1px rgba(255,215,0,0.15), 0 4px 16px rgba(255,215,0,0.1);
}
.sim-kpi-lbl {
  font-size: 0.66rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  line-height: 1.2;
}
.sim-kpi-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.sim-kpi.is-destaque .sim-kpi-val {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Insight */
.sim-res-insight {
  background: rgba(56,189,248,0.05);
  border-left: 3px solid #38bdf8;
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: var(--sp-3);
}
.sim-res-insight strong { color: var(--text); font-weight: 800; }

/* Chart */
.sim-chart-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  height: 300px;
}
.sim-chart-box canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
}

/* ===== CENÁRIOS SALVOS ===== */
.sim-salvos-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.sim-salvos-toggle summary {
  cursor: pointer;
  padding: 12px 16px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-2);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.sim-salvos-toggle summary::-webkit-details-marker { display: none; }
.sim-salvos-toggle summary::after {
  content: '→';
  margin-left: auto;
  transition: transform 0.3s var(--ease-spring);
  font-size: 1.1rem;
  color: var(--gold);
}
.sim-salvos-toggle[open] summary::after { transform: rotate(90deg); }
.sim-salvos-toggle summary:hover {
  background: rgba(255,215,0,0.05);
  color: var(--gold);
}
.sim-salvos-lista {
  padding: 4px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sim-salvos-empty {
  text-align: center;
  padding: var(--sp-4);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-style: italic;
}
.sim-salvos-empty strong { color: var(--gold); font-style: normal; }
.sim-salvo-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all 0.2s var(--ease-out);
}
.sim-salvo-card:hover {
  border-color: var(--border-gold);
  background: rgba(255,215,0,0.04);
}
.sim-salvo-icon { font-size: 1.4rem; flex-shrink: 0; }
.sim-salvo-info { flex: 1; min-width: 0; }
.sim-salvo-info strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sim-salvo-info small {
  color: var(--muted);
  font-size: 0.74rem;
}
.sim-salvo-load,
.sim-salvo-del {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s var(--ease-out);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sim-salvo-load:hover {
  background: rgba(255,215,0,0.1);
  border-color: var(--border-gold);
  color: var(--gold);
  transform: scale(1.05);
}
.sim-salvo-del:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
  color: #fca5a5;
}

/* ============================================================
   🧪 SIMULADOR — RESPONSIVO
============================================================ */

/* ≤ 1024px — layout vira coluna única */
@media (max-width: 1024px) {
  .sim-layout { grid-template-columns: 1fr; }
  .sim-result-wrap { min-height: auto; }
}

/* ≤ 768px — tabs compactam */
@media (max-width: 768px) {
  .sim-modal-content {
    padding: var(--sp-4);
    border-radius: 18px;
  }
  .sim-header h2 { font-size: 1.15rem; }
  .sim-tabs {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  .sim-tab { padding: 8px 4px; }
  .sim-tab-ico { font-size: 1.05rem; }
  .sim-tab-lbl { font-size: 0.62rem; }
  .sim-forms { padding: var(--sp-3); }
  .sim-result-wrap { padding: var(--sp-3); }
  .sim-chart-box { height: 260px; padding: 8px; }
  .sim-res-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sim-kpi-val { font-size: 0.9rem; }
}

/* ≤ 540px — tabs em 2 colunas, kpis em 1 */
@media (max-width: 540px) {
  .sim-tabs { grid-template-columns: repeat(3, 1fr); }
  .sim-tab-lbl { font-size: 0.6rem; }
  .sim-field-row { grid-template-columns: 1fr; }
  .sim-actions { flex-direction: column; }
  .sim-actions .btn { width: 100%; min-width: 0; }
  .sim-res-kpis { grid-template-columns: 1fr; }
  .sim-chart-box { height: 240px; }
}

/* ≤ 380px — máxima compactação */
@media (max-width: 380px) {
  .sim-modal-content { padding: var(--sp-3); }
  .sim-header h2 { font-size: 1.05rem; }
  .sim-tabs { padding: 4px; }
  .sim-tab { padding: 6px 3px; }
  .sim-tab-ico { font-size: 0.95rem; }
  .sim-tab-lbl { font-size: 0.55rem; letter-spacing: 0; }
  .sim-field input,
  .sim-field select { padding: 9px 10px; font-size: 0.85rem; }
}

/* ============================================================
   🔄 SPRINT 5 — RECORRÊNCIAS INTELIGENTES
============================================================ */

/* Intro do modal */
.rec-intro {
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.65;
  margin-bottom: var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(56,189,248,0.05);
  border-left: 3px solid rgba(56,189,248,0.4);
  border-radius: var(--r-md);
}
.rec-intro strong { color: var(--gold); }

/* ── Card do formulário ── */
.rec-form-card {
  background:
    radial-gradient(ellipse 60% 100% at 0% 0%, rgba(255,215,0,0.05), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}
.rec-form-titulo {
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--gold);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px dashed var(--border-gold);
  letter-spacing: -0.01em;
}
.rec-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.rec-form-row { display: grid; gap: var(--sp-3); }
.rec-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
.rec-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}
.rec-form-actions .btn-primary {
  padding: 11px 28px;
  font-size: var(--fs-sm);
}

/* ── Toggle buttons (Tipo / Pessoa / Frequência) ── */
.rec-toggle-group {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
}
.rec-toggle-btn {
  flex: 1;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  text-align: center;
  white-space: nowrap;
}
.rec-toggle-btn:hover { color: var(--text); }
.rec-toggle-btn.active {
  background: var(--grad-gold);
  color: #14171c;
  box-shadow: 0 2px 8px rgba(255,215,0,0.3);
}

/* ── Cabeçalho da lista ── */
.rec-lista-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.rec-lista-header h3 {
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--text);
}
.rec-contador {
  font-size: var(--fs-xs);
  background: rgba(255,215,0,0.12);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
}

/* ── Lista de recorrências ── */
.rec-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}

/* ── Empty state ── */
.rec-empty {
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  background: var(--surface);
  border: 1px dashed var(--border-gold);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}
.rec-empty-icon {
  font-size: 2.8rem;
  margin-bottom: var(--sp-3);
  filter: drop-shadow(0 0 20px var(--gold-glow));
  padding: 18px;
  animation: none !important;
}
.rec-empty p {
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.rec-empty small {
  color: var(--muted);
  font-size: var(--fs-xs);
  max-width: 320px;
  line-height: 1.5;
}

/* ── Item de recorrência ── */
.rec-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background:
    radial-gradient(ellipse 60% 100% at 0% 50%, rgba(255,215,0,0.04), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-md);
  transition: all 0.2s var(--ease-out);
  animation: cardIn 0.35s var(--ease-out) both;
}
.rec-item:hover {
  background: var(--surface-hover);
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}
.rec-item-icon {
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,215,0,0.08);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  flex-shrink: 0;
}
.rec-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rec-item-desc {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rec-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* ── Badges de meta-informação ── */
.rec-badge {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.rec-tipo-receita {
  background: rgba(74,222,128,0.15);
  color: #86efac;
  border-color: rgba(74,222,128,0.3);
}
.rec-tipo-despesa {
  background: rgba(248,113,113,0.15);
  color: #fca5a5;
  border-color: rgba(248,113,113,0.3);
}
.rec-badge-pessoa {
  background: rgba(255,215,0,0.1);
  color: var(--gold-soft);
  border-color: var(--border-gold);
}
.rec-badge-freq {
  background: rgba(139,92,246,0.12);
  color: #c4b5fd;
  border-color: rgba(139,92,246,0.25);
}

/* ── Botão excluir ── */
.rec-del-btn {
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.25);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s var(--ease-out);
}
.rec-del-btn:hover {
  background: rgba(239,68,68,0.25);
  color: #fff;
  transform: scale(1.08);
}

/* ── Responsivo ── */
@media (max-width: 640px) {
  .rec-form-grid { grid-template-columns: 1fr; }
  .rec-form-actions { justify-content: stretch; }
  .rec-form-actions .btn-primary { width: 100%; justify-content: center; }
  .rec-toggle-btn { font-size: 0.7rem; padding: 7px 8px; }
  .rec-item { padding: 12px; gap: 10px; }
  .rec-item-icon { width: 34px; height: 34px; font-size: 1.1rem; }
}

@media (max-width: 380px) {
  .rec-form-card { padding: var(--sp-3); }
  .rec-item-meta { gap: 4px; }
  .rec-badge { font-size: 0.6rem; padding: 2px 7px; }
}


/* ============================================================
   🔔 SISTEMA DE ALERTAS INTELIGENTES
   ============================================================ */

/* ── Badge na sidebar ─────────────────────────────────────── */
.alertas-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  border-radius: 999px;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 2px 8px rgba(248,113,113,0.5);
  animation: badgePop 0.4s var(--ease-spring);
}
@keyframes badgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.7; }
}

/* ── Modal ───────────────────────────────────────────────── */
.alertas-modal-content {
  max-width: 680px;
}

.alertas-subtitulo {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: -var(--sp-3) 0 var(--sp-4);
  line-height: 1.55;
}

/* ── Toolbar ─────────────────────────────────────────────── */
.alertas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.alertas-total-info {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 600;
}
.alertas-btn-marcar-todos {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  font-family: inherit;
}
.alertas-btn-marcar-todos:hover {
  background: rgba(74,222,128,0.08);
  border-color: rgba(74,222,128,0.4);
  color: #86efac;
}

/* ── Lista ───────────────────────────────────────────────── */
.alertas-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 2px;
}

/* ── Item individual ─────────────────────────────────────── */
.alerta-item {
  display: grid;
  grid-template-columns: 6px 42px 1fr auto;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px 14px 12px;
  background: var(--alerta-bg, var(--surface));
  border: 1px solid var(--border);
  border-left: 3px solid var(--alerta-cor, var(--muted));
  border-radius: var(--r-md);
  transition: all 0.2s var(--ease-out);
  animation: alertaIn 0.35s var(--ease-out) both;
  position: relative;
}
@keyframes alertaIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
.alerta-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}
.alerta-item--lido {
  opacity: 0.55;
  filter: grayscale(0.3);
}

/* Dot de não lido */
.alerta-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--alerta-cor, var(--muted));
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--alerta-cor, transparent);
  transition: all 0.3s;
  align-self: start;
}
.alerta-item-dot.is-lido {
  background: transparent;
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

/* Ícone */
.alerta-item-icone {
  font-size: 1.5rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* Body */
.alerta-item-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.alerta-item-titulo {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.alerta-item-msg {
  font-size: var(--fs-xs);
  color: var(--text-2);
  line-height: 1.6;
}

/* Botões de ação */
.alerta-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.alerta-btn-lido,
.alerta-btn-del {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-out);
  font-family: inherit;
}
.alerta-btn-lido:hover,
.alerta-btn-lido.is-lido {
  background: rgba(74,222,128,0.12);
  border-color: rgba(74,222,128,0.35);
  color: #86efac;
}
.alerta-btn-del:hover {
  background: rgba(248,113,113,0.12);
  border-color: rgba(248,113,113,0.35);
  color: #fca5a5;
}

/* ── Loading ─────────────────────────────────────────────── */
.alertas-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--sp-6);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.alertas-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--gold);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ─────────────────────────────────────────── */
.alertas-empty {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  gap: var(--sp-3);
}
.alertas-empty-icon {
  font-size: 3rem;
  filter: drop-shadow(0 0 16px rgba(74,222,128,0.4));
}
.alertas-empty h3 {
  color: var(--success);
  font-size: var(--fs-lg);
  font-weight: 800;
}
.alertas-empty p {
  color: var(--text-2);
  font-size: var(--fs-sm);
  max-width: 340px;
  line-height: 1.6;
}

/* ── Responsivo ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .alertas-modal-content { max-width: 100%; }
  .alertas-lista { max-height: 55vh; }

  .alerta-item {
    grid-template-columns: 6px 36px 1fr auto;
    gap: 10px;
    padding: 12px 12px 12px 10px;
  }
  .alerta-item-icone {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    border-radius: 8px;
  }
  .alerta-item-titulo { font-size: var(--fs-xs); }
  .alerta-item-actions { flex-direction: row; }
  .alerta-btn-lido,
  .alerta-btn-del { width: 30px; height: 30px; font-size: 0.76rem; }

  .alertas-toolbar { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
  .alertas-btn-marcar-todos { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
  .alerta-item {
    grid-template-columns: 4px 32px 1fr auto;
    gap: 8px;
    padding: 10px;
  }
  .alerta-item-icone { width: 32px; height: 32px; font-size: 1rem; }
}


/* ============================================================
   🗄️ MODAL BACKUPS
============================================================ */
.backup-section-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.backup-premium-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.backup-premium-divider::before,
.backup-premium-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

/* Lock overlay */
.backup-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,17,23,0.88);
  backdrop-filter: blur(6px);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border: 1px dashed var(--border-gold);
}
.backup-lock-inner {
  text-align: center;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.backup-lock-icon { font-size: 2.5rem; filter: drop-shadow(0 0 16px var(--gold-glow)); }
.backup-lock-inner strong { color: var(--gold); font-size: 1rem; font-weight: 800; }
.backup-lock-inner p { color: var(--text-2); font-size: 0.83rem; margin: 0; }

/* Lista de backups automáticos */
.lista-backups-auto {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 80px;
}
.backup-loading,
.backup-vazio {
  text-align: center;
  padding: var(--sp-5);
  color: var(--muted);
  font-size: var(--fs-sm);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.backup-vazio span { font-size: 2rem; opacity: 0.6; }
.backup-vazio small { font-size: var(--fs-xs); color: var(--muted-2); }

/* Card de backup */
.backup-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-md);
  transition: all 0.2s var(--ease-out);
  animation: cardIn 0.35s var(--ease-out) both;
}
.backup-card:hover {
  background: var(--surface-hover);
  transform: translateX(2px);
}
.backup-card-ico {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,215,0,0.08);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  flex-shrink: 0;
}
.backup-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.backup-card-body strong {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--text);
}
.backup-card-body small {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.backup-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.btn-backup-dl,
.btn-backup-rest {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-out);
}
.btn-backup-dl:hover {
  background: rgba(255,215,0,0.12);
  border-color: var(--border-gold);
  color: var(--gold);
  transform: scale(1.05);
}
.btn-backup-rest:hover {
  background: rgba(74,222,128,0.12);
  border-color: rgba(74,222,128,0.35);
  color: #86efac;
  transform: scale(1.05);
}

/* Toast */
.backup-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: all 0.35s var(--ease-out);
  pointer-events: none;
  white-space: nowrap;
}
.backup-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.backup-toast-success { border-color: rgba(74,222,128,0.4); color: #86efac; }
.backup-toast-error   { border-color: rgba(248,113,113,0.4); color: #fca5a5; }

/* ============================================================
   👤 MODAL PERFIL
   ============================================================ */

/* ── Foto de perfil ── */
.perfil-foto-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.perfil-foto-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border-gold);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 0 4px rgba(255,215,0,0.08), 0 8px 24px rgba(0,0,0,0.4);
  transition: all 0.3s var(--ease-out);
}
.perfil-foto-circle:hover {
  box-shadow: 0 0 0 4px rgba(255,215,0,0.18), 0 12px 32px rgba(255,215,0,0.12);
}

.perfil-foto-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.perfil-foto-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2.6rem;
  opacity: 0.5;
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.2));
}

.perfil-foto-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.perfil-foto-actions .btn {
  padding: 7px 14px;
  font-size: 0.82rem;
}

/* ── Divisor entre seções ── */
.perfil-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: var(--sp-4) 0 var(--sp-3);
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.perfil-divider::before,
.perfil-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

/* ── Hint da senha ── */
.perfil-senha-hint {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin: -var(--sp-2) 0 var(--sp-3);
  line-height: 1.5;
  font-style: italic;
}

/* ── Status ── */
.perfil-status-ok {
  color: #86efac !important;
  font-size: var(--fs-sm);
  font-weight: 700;
  animation: previewIn 0.3s var(--ease-out);
}
.perfil-status-erro {
  color: #fca5a5 !important;
  font-size: var(--fs-sm);
  font-weight: 700;
  animation: previewIn 0.3s var(--ease-out);
}

/* ============================================================
   PERFIL — INFORMAÇÕES DA CONTA
   ============================================================ */
.perfil-info-conta {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.perfil-email-row,
.perfil-plano-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.perfil-info-label {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.perfil-email-valor {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: monospace;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 6px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perfil-plano-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.perfil-plano-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.perfil-plano-free {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.perfil-plano-plus {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(245, 158, 11, 0.15));
  color: #fcd34d;
}

.perfil-plano-premium {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(245, 158, 11, 0.2));
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.perfil-plano-validade {
  font-size: 12px;
  color: var(--text-muted);
}

.perfil-plano-gratuito {
  color: var(--text-muted);
  font-size: 12px;
}

.perfil-plano-vencendo {
  color: #fbbf24;
  font-weight: 600;
}

.perfil-plano-expirado {
  color: #f87171;
  font-weight: 600;
}

/* ============================================================
   PERFIL — EXCLUSÃO DE CONTA
   ============================================================ */
.perfil-exclusao-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.perfil-btn-excluir {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.perfil-btn-excluir:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: #f87171;
}

.perfil-exclusao-aviso {
  font-size: 13px;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0;
  line-height: 1.5;
}

.perfil-exclusao-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  margin-top: 12px;
}

.perfil-input-excluir {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: monospace;
  letter-spacing: 1px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.perfil-input-excluir:focus {
  border-color: #f87171;
}

.perfil-exclusao-status {
  font-size: 13px;
  margin-top: 8px;
  min-height: 20px;
}

.perfil-exclusao-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.perfil-btn-cancelar {
  flex: 1;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.perfil-btn-cancelar:hover {
  background: rgba(255, 255, 255, 0.1);
}

.perfil-btn-confirmar-exclusao {
  flex: 1.5;
  padding: 10px;
  background: #dc2626;
  border: none;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.perfil-btn-confirmar-exclusao:hover:not(:disabled) {
  background: #b91c1c;
}

.perfil-btn-confirmar-exclusao:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* ============================================================
   🤖 ASSISTENTE MONARCHA IA — Chat Modal
============================================================ */
.ia-modal-content {
  max-width: 720px;
  height: 88vh;
  height: 88dvh;
  /* 🆕 Usa altura do teclado virtual quando disponível (setada via JS) */
  height: var(--ia-vh, 88dvh);
  max-height: var(--ia-vh, 88dvh);
  display: flex;
  flex-direction: column;
  padding: var(--sp-5);
  overflow: hidden;
}

.ia-modal-content .modal-header { margin-bottom: var(--sp-3); flex-shrink: 0; }

/* Corpo com scroll das mensagens */
.ia-chat-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--sp-2) 2px var(--sp-3);
  min-height: 0;
}

/* Welcome */
.ia-welcome {
  text-align: center;
  margin: auto 0;
  padding: var(--sp-5) var(--sp-3);
  animation: insightIn 0.4s var(--ease-out);
}
.ia-welcome-ico {
  font-size: 3rem;
  filter: drop-shadow(0 0 20px var(--gold-glow));
  margin-bottom: var(--sp-3);
}
.ia-welcome h3 {
  color: var(--gold);
  font-size: var(--fs-lg);
  font-weight: 800;
  margin-bottom: var(--sp-2);
}
.ia-welcome p {
  color: var(--text-2);
  font-size: var(--fs-sm);
  max-width: 420px;
  margin: 0 auto var(--sp-4);
  line-height: 1.6;
}
.ia-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}
.ia-suggestion {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s var(--ease-out);
}
.ia-suggestion:hover {
  background: rgba(255,215,0,0.08);
  border-color: var(--border-gold);
  color: var(--gold);
  transform: translateX(3px);
}

/* Mensagens */
.ia-msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
  animation: iaMsgIn 0.3s var(--ease-out);
}
@keyframes iaMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ia-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.ia-msg-bot  { align-self: flex-start; }

.ia-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}
.ia-msg-bot .ia-msg-avatar {
  background: rgba(255,215,0,0.1);
  border-color: var(--border-gold);
}

.ia-msg-bubble {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}
.ia-msg-user .ia-msg-bubble {
  background: var(--grad-gold);
  color: #14171c;
  font-weight: 600;
  border-bottom-right-radius: 4px;
}
.ia-msg-bot .ia-msg-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.ia-msg-bubble strong { font-weight: 800; }
.ia-msg-bubble code {
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.85em;
}
.ia-msg-bubble img {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 6px;
  display: block;
}
.ia-msg-bubble audio { margin-top: 6px; max-width: 240px; }

/* Digitando... */
.ia-typing { display: flex; gap: 5px; padding: 4px 2px; }
.ia-typing span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.5;
  animation: iaTyping 1.2s infinite ease-in-out;
}
.ia-typing span:nth-child(2) { animation-delay: 0.2s; }
.ia-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes iaTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Preview de anexos */
.ia-attach-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 2px;
}
.ia-attach-preview:not(:empty) { margin-bottom: 8px; }
.ia-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 5px 8px 5px 5px;
  font-size: 0.74rem;
  color: var(--text-2);
  max-width: 180px;
}
.ia-attach-chip img {
  width: 30px; height: 30px;
  object-fit: cover;
  border-radius: 6px;
}
.ia-attach-chip .ia-attach-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ia-attach-remove {
  background: rgba(239,68,68,0.15);
  border: none;
  color: #fca5a5;
  width: 20px; height: 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.ia-attach-remove:hover { background: rgba(239,68,68,0.3); }

/* Formulário */
.ia-chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  flex-shrink: 0;
}
.ia-btn-attach {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  cursor: pointer;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all 0.2s var(--ease-out);
}
.ia-btn-attach:hover {
  background: rgba(255,215,0,0.08);
  border-color: var(--border-gold);
  color: var(--gold);
}
.ia-btn-attach.is-recording {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
  color: #f87171;
  animation: lockPulse 1s ease-in-out infinite;
}
.ia-input-text {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: var(--fs-sm);
  font-family: inherit;
  resize: none;
  max-height: 120px;
  padding: 10px 4px;
  line-height: 1.5;
}
.ia-input-text:focus { outline: none; }
.ia-btn-send {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  background: var(--grad-gold);
  color: #14171c;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,215,0,0.25);
  transition: all 0.2s var(--ease-out);
}
.ia-btn-send:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,215,0,0.45);
}
.ia-btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

.ia-footer-note {
  font-size: 0.68rem;
  color: var(--muted-2);
  text-align: center;
  margin-top: 8px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .ia-modal-content {
    height: 92vh;
    height: 92dvh;
    height: var(--ia-vh, 92dvh);
    max-height: var(--ia-vh, 92dvh);
    padding: var(--sp-4);
  }
  .ia-msg { max-width: 92%; }
}

 
/* ============================================================
   ⚡ BOTTOM NAV — 5 atalhos rápidos e estratégicos
   ============================================================ */
.app-main.has-bottom-nav { padding-bottom: 104px; }
@media (max-width: 640px) { .app-main.has-bottom-nav { padding-bottom: 90px; } }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 10px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-gold);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 20px);
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 58px;
  padding: 8px 4px;
  background: none;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.2s var(--ease-out), color 0.2s, transform 0.2s;
}
.bn-item:hover { background: var(--surface-hover); color: var(--gold-soft); }
.bn-item:active { transform: scale(0.94); }
.bn-ico { font-size: 1.2rem; line-height: 1; }
.bn-lbl { font-size: 0.62rem; font-weight: 600; white-space: nowrap; }

.bn-item-center {
  width: 62px;
  margin: 0 3px;
  transform: translateY(-14px);
}
.bn-item-center:hover { background: none; }
.bn-ico-center {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: var(--shadow-gold), 0 0 0 4px var(--bg);
  font-size: 1.55rem;
  transition: transform 0.2s var(--ease-spring);
}
.bn-item-center:hover .bn-ico-center { transform: scale(1.07); }
.bn-item-center:active .bn-ico-center { transform: scale(0.96); }

@media (max-width: 640px) {
  .bottom-nav { bottom: 10px; padding: 6px 6px; }
  .bn-item { width: 50px; }
  .bn-lbl { font-size: 0.56rem; }
  .bn-item-center { width: 56px; }
  .bn-ico-center { width: 48px; height: 48px; font-size: 1.4rem; }
}
@media (max-width: 380px) {
  .bn-lbl { display: none; }
  .bn-item { width: 40px; padding: 8px 2px; }
}

/* ============================================================
   🎓 Botão "Rever tour" na sidebar
   ============================================================ */
.btn-refazer-tour {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: all 0.2s var(--ease-out);
}
.btn-refazer-tour:hover {
  border-color: var(--border-gold);
  color: var(--gold);
  background: rgba(255,215,0,0.08);
}

/* ============================================================
   🧪 Laboratório — análise avançada (Vale a Pena Parcelar?)
   ============================================================ */
.sim-advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  text-align: left;
}
.sim-advanced-toggle:hover { border-color: var(--border-gold); color: var(--gold-soft); }
.sim-advanced-caret { transition: transform 0.25s var(--ease-out); flex-shrink: 0; margin-left: 8px; }
.sim-advanced-toggle.is-open .sim-advanced-caret { transform: rotate(180deg); }
.sim-advanced-box { margin-top: 10px; }

/* ============================================================
   🎯 TOUR GUIADO — onboarding de recursos
   ============================================================ */
.tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5,7,10,0.72);
  z-index: 9000;
  animation: modalFadeIn 0.25s ease;
}
.tour-highlight {
  position: relative;
  z-index: 9001;
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  border-radius: 14px;
  box-shadow: 0 0 0 6px rgba(255,215,0,0.16), 0 0 36px rgba(255,215,0,0.32);
  transition: outline-color 0.3s;
}
.tour-card {
  position: fixed;
  z-index: 9002;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(380px, calc(100vw - 32px));
  background: var(--bg-elev);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 20px 22px;
  animation: modalFadeIn 0.3s ease;
}
.tour-card-step {
  font-size: 0.68rem;
  color: var(--gold-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.tour-card h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--text); }
.tour-card p { margin: 0 0 16px; font-size: 0.85rem; color: var(--text-2); line-height: 1.5; }
.tour-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-dots { display: flex; gap: 5px; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); transition: background 0.2s; }
.tour-dot.is-active { background: var(--gold); }
.tour-btn-skip { background: none; border: none; color: var(--muted); font-size: 0.8rem; cursor: pointer; padding: 6px; }
.tour-btn-skip:hover { color: var(--text-2); }
.tour-btn-next {
  background: var(--grad-gold);
  color: #14110a;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: filter 0.2s;
}
.tour-btn-next:hover { filter: brightness(1.08); }

@media (max-width: 480px) {
  .tour-card { bottom: 104px; padding: 16px 18px; }
}

/* ============================================================
   💬 SUPORTE — link direto pro WhatsApp dentro do modal
   ============================================================ */
.suporte-wpp-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(37,211,102,0.14), rgba(37,211,102,0.04));
  border: 1px solid rgba(37,211,102,0.35);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s var(--ease-out), background 0.2s;
}
.suporte-wpp-link:hover { transform: translateY(-1px); background: rgba(37,211,102,0.18); }
.suporte-wpp-ico { font-size: 1.6rem; flex-shrink: 0; }
.suporte-wpp-link strong { display: block; font-size: 0.92rem; color: var(--text); }
.suporte-wpp-link small { display: block; font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.suporte-wpp-arrow { margin-left: auto; color: #25d366; font-size: 1.1rem; }

.suporte-divisor {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.suporte-divisor::before, .suporte-divisor::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   🏷️ GERENCIAR CATEGORIAS
   ============================================================ */
.categorias-lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
}
.cat-manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.88rem;
  color: var(--text);
}
.cat-manage-del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px 6px;
  border-radius: 8px;
  opacity: 0.75;
  transition: opacity 0.2s, background 0.2s;
}
.cat-manage-del:hover {
  opacity: 1;
  background: rgba(248,113,113,0.12);
}
.cat-empty {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px 0;
}