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

/* ===== VARIÁVEIS ===== */
:root {
  --bg-main: #020617;
  --bg-surface: #0f172a;
  --bg-card: #111827;
  --bg-soft: #1f2937;
  --bg-input: #1f2937;
  --border-soft: rgba(255,255,255,.06);
  --text-main: #e5e7eb;
  --text-primary: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #F57C00;
  --success: #22c55e;
  
  /* Transição suave de tema */
  --transition-theme: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===== MODO CLARO ===== */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: #f1f5f9;
  --bg-input: #f1f5f9;
  --border-soft: rgba(0,0,0,.08);
  --text-main: #1e293b;
  --text-primary: #1e293b;
  --text-muted: #64748b;
}

/* Transição suave em todos os elementos */
* {
  transition: var(--transition-theme);
}

/* ===== RESET BASE ===== */
* {
  box-sizing: border-box;
}

/* ===== SPLASH SCREEN ===== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  animation: splashFadeIn 0.6s ease;
}

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

.splash-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #F57C00, #ff9800);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 10px 40px rgba(245, 124, 0, 0.4);
  animation: splashPulse 2s ease-in-out infinite;
}

@keyframes splashPulse {
  0%, 100% {
    box-shadow: 0 10px 40px rgba(245, 124, 0, 0.4);
  }
  50% {
    box-shadow: 0 10px 60px rgba(245, 124, 0, 0.6);
  }
}

.splash-title {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
}

.splash-subtitle {
  font-size: 14px;
  color: #9ca3af;
  margin: 0 0 24px;
}

.splash-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(245, 124, 0, 0.2);
  border-top-color: #F57C00;
  border-radius: 50%;
  margin: 0 auto;
  animation: splashSpin 1s linear infinite;
}

@keyframes splashSpin {
  to {
    transform: rotate(360deg);
  }
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
}

/* Background gradiente para modo escuro */
body[data-theme="dark"]::before,
body:not([data-theme])::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(245,124,0,.12), transparent 40%),
    radial-gradient(circle at bottom right, rgba(34,197,94,.12), transparent 40%),
    linear-gradient(180deg, #0f172a, #020617);
  pointer-events: none;
}

/* Background sutil para modo claro */
body[data-theme="light"]::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(245,124,0,.04), transparent 50%),
    radial-gradient(circle at bottom right, rgba(34,197,94,.04), transparent 50%),
    linear-gradient(180deg, #ffffff, #f8fafc);
  pointer-events: none;
}

/* ===== HEADER MODERNO ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  isolation: isolate;
}

.header-blur {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: -1;
}

[data-theme="light"] .header-blur {
  background: rgba(255, 255, 255, 0.85);
}

.header-border {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(245, 124, 0, 0.3) 20%,
    rgba(245, 124, 0, 0.5) 50%,
    rgba(245, 124, 0, 0.3) 80%,
    transparent 100%
  );
}

.header-content {
  max-width: 1200px;
  margin: auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #F57C00 0%, #FF9800 50%, #FFB74D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 
    0 4px 15px rgba(245, 124, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 8px 25px rgba(245, 124, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.logo-icon {
  font-size: 24px;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(245, 124, 0, 0.6) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

.brand-text {
  flex: 1;
  min-width: 0;
}

.brand-text h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-dot {
  background: linear-gradient(135deg, #F57C00, #FF9800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tagline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.tagline-line {
  width: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

.brand-tagline span:last-child {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Header Center - Sync Status */
.header-center {
  display: none;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .header-center {
    display: flex;
  }
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.sync-status.syncing {
  background: rgba(245, 124, 0, 0.1);
  border-color: rgba(245, 124, 0, 0.3);
  color: var(--accent);
}

.sync-status.synced {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.sync-status.offline {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.sync-status .sync-icon {
  font-size: 14px;
}

.sync-status.syncing .sync-icon {
  animation: syncSpin 1s linear infinite;
}

@keyframes syncSpin {
  to { transform: rotate(360deg); }
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  overflow: visible;
}

.header-btn::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.header-btn:hover {
  background: var(--bg-card);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-btn:hover::before {
  opacity: 1;
}

.header-btn:active {
  transform: translateY(0) scale(0.95);
}

/* Tooltip */
.btn-tooltip {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid var(--border-soft);
}

.header-btn:hover .btn-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Theme Toggle */
.theme-toggle .theme-icon {
  font-size: 20px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover .theme-icon {
  transform: rotate(20deg) scale(1.1);
}

/* Menu Toggle / Hamburger */
.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.hamburger-icon span:nth-child(1) { width: 100%; }
.hamburger-icon span:nth-child(2) { width: 70%; margin-left: auto; }
.hamburger-icon span:nth-child(3) { width: 85%; }

.menu-toggle:hover .hamburger-icon span {
  background: var(--accent);
}

.menu-toggle:hover .hamburger-icon span:nth-child(1) { width: 85%; }
.menu-toggle:hover .hamburger-icon span:nth-child(2) { width: 100%; }
.menu-toggle:hover .hamburger-icon span:nth-child(3) { width: 70%; }

/* Menu Aberto */
.menu-toggle.active .hamburger-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  width: 100%;
}

.menu-toggle.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.active .hamburger-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 100%;
}

/* Responsivo Header */
@media (max-width: 480px) {
  .header-content {
    padding: 12px 16px;
  }
  
  .logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  
  .logo-icon {
    font-size: 22px;
  }
  
  .brand-text h1 {
    font-size: 20px;
  }
  
  .brand-tagline {
    display: none;
  }
  
  .header-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  
  .btn-tooltip {
    display: none;
  }
}

.install-button {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
  animation: pulseInstall 2s ease-in-out infinite;
}

.install-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 124, 0, 0.4);
}

.install-button:active {
  transform: translateY(0);
}

.install-icon {
  font-size: 20px;
}

.install-text {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

@keyframes pulseInstall {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(245, 124, 0, 0.5);
  }
}

/* Esconder em telas muito pequenas */
@media (max-width: 480px) {
  .install-text {
    display: none;
  }
  
  .install-button {
    padding: 10px 12px;
  }
}

.status {
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
}

/* ===== MENU DE NAVEGAÇÃO ===== */
.nav-menu {
  position: sticky;
  top: 76px;
  z-index: 90;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  margin-bottom: 24px;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}

.nav-item {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 16px 12px;
  margin: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  border-radius: 0;
}

.nav-item:hover {
  background: rgba(245, 124, 0, 0.08);
  color: var(--text-main);
  filter: none;
}

.nav-item.active {
  border-bottom-color: var(--accent);
  background: rgba(245, 124, 0, 0.1);
  color: var(--accent);
}

.nav-icon {
  font-size: 24px;
  filter: grayscale(0.3);
  transition: filter 0.3s ease;
}

.nav-item.active .nav-icon {
  filter: grayscale(0);
  animation: iconBounce 0.5s ease;
}

.nav-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ===== SEÇÕES DE CONTEÚDO ===== */
.section-content {
  display: none;
  animation: fadeInSection 0.4s ease;
}

.section-content.active {
  display: block;
}

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

/* ===== MAIN ===== */
main {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px 32px 20px;
}

/* ===== BOX / FORM ===== */
.box {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}

h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 600;
}

/* ===== FILTROS DE PERÍODO ===== */
.filtros-periodo h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.periodo-atalhos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.btn-atalho {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0;
}

.btn-atalho:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.2);
  border-color: rgba(245, 124, 0, 0.5);
}

.btn-atalho.active {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.4);
}

.btn-atalho .atalho-icon {
  font-size: 18px;
}

.btn-atalho .atalho-text {
  font-size: 13px;
}

.periodo-personalizado {
  margin-bottom: 20px;
  animation: slideDown 0.3s ease;
}

.periodo-range {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.periodo-range .input-wrapper {
  flex: 1;
}

.periodo-seta {
  font-size: 24px;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 700;
}

.periodo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.1), rgba(245, 124, 0, 0.05));
  border: 2px solid rgba(245, 124, 0, 0.3);
  border-radius: 12px;
  margin-bottom: 20px;
}

.periodo-preview .preview-icon {
  font-size: 24px;
}

.periodo-preview .preview-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.filtro-categoria-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filtro-categoria-wrapper label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.filtro-categoria-wrapper select {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filtro-categoria-wrapper select:hover {
  border-color: rgba(245, 124, 0, 0.5);
}

.filtro-categoria-wrapper select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.1);
}

.filtro-categoria-wrapper select option {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 10px;
}

/* ===== FORMULÁRIO MODERNO ===== */
#formLancamento {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.05), rgba(34, 197, 94, 0.05));
  border: 2px solid rgba(245, 124, 0, 0.2);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}

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

.form-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-header .icone-form {
  font-size: 24px;
}

.tipo-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.tipo-btn {
  padding: 16px;
  border-radius: 12px;
  border: 2px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 0;
}

.tipo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.tipo-btn.ativo.receita {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: #22c55e;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.tipo-btn.ativo.despesa {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}

.tipo-btn .icone {
  font-size: 20px;
}

.input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper label {
  position: absolute;
  top: -10px;
  left: 12px;
  background: var(--bg-card);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
  border-radius: 4px;
}

.input-wrapper input,
.input-wrapper select {
  margin: 0;
  padding: 14px 16px;
  font-size: 15px;
  width: 100%;
}

.input-wrapper.full {
  grid-column: 1 / -1;
}

/* ===== BOTÕES DE AÇÃO ===== */
.form-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 16px;
}

#btnSalvar {
  margin: 0;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(245, 124, 0, 0.4);
  transition: all 0.3s ease;
}

#btnSalvar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(245, 124, 0, 0.5);
}

#btnSalvar:active {
  transform: translateY(0);
}

.btn-salvar-icone {
  font-size: 18px;
}

.btn-cancelar {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  border: none;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: 8px;
  color: #fff;
  margin: 0;
}

.btn-cancelar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(107, 114, 128, 0.5);
  background: linear-gradient(135deg, #4b5563, #374151);
}

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

.btn-cancelar-icone {
  font-size: 18px;
}

/* ===== PARCELAMENTO ===== */
.parcelamento-section {
  background: rgba(245, 124, 0, 0.03);
  border: 1px solid rgba(245, 124, 0, 0.15);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.parcelamento-toggle {
  margin-bottom: 0;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.toggle-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.toggle-slider {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--bg-soft);
  border-radius: 13px;
  transition: all 0.3s ease;
  border: 2px solid var(--border-soft);
  flex-shrink: 0;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-container input[type="checkbox"]:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border-color: var(--accent);
}

.toggle-container input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(22px);
  background: white;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  margin: 0;
}

.toggle-icon {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.parcelamento-detalhes {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(245, 124, 0, 0.15);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.parcelamento-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.info-icon {
  font-size: 16px;
}

.info-text {
  font-weight: 500;
}

/* Badge de parcela na tabela */
.parcela-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.2), rgba(245, 124, 0, 0.1));
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(245, 124, 0, 0.3);
  white-space: nowrap;
}

/* ===== RECORRÊNCIA ===== */
.recorrencia-section {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05), rgba(96, 165, 250, 0.02));
  border: 2px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.recorrencia-toggle {
  margin-bottom: 0;
}

.recorrencia-detalhes {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(96, 165, 250, 0.15);
  animation: slideDown 0.3s ease;
}

.recorrencia-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(96, 165, 250, 0.1);
  border-radius: 8px;
  border-left: 3px solid #60a5fa;
}

/* Badge de recorrente na tabela */
.recorrente-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(96, 165, 250, 0.1));
  color: #60a5fa;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(96, 165, 250, 0.3);
  white-space: nowrap;
  margin-left: 6px;
}

/* ===== METAS FINANCEIRAS - NOVO DESIGN ===== */

/* Botão Flutuante (FAB) */
.fab-metas {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
  }
  50% {
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.6);
  }
}

.fab-metas:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.6);
}

.fab-metas:active {
  transform: scale(0.95);
}

.fab-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Modal de Metas */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-metas {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

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

.modal-header {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  padding: 24px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  font-size: 24px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin: 0;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
}

.modal-info-card {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(96, 165, 250, 0.05));
  border-left: 3px solid #60a5fa;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.modal-info-card .info-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.modal-info-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-preview {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.preview-icon {
  font-size: 24px;
}

.preview-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.preview-value {
  font-size: 18px;
  font-weight: 700;
  color: #22c55e;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-modal-cancelar,
.btn-modal-salvar {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: none;
  margin: 0;
}

.btn-modal-cancelar {
  background: var(--bg-soft);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
}

.btn-modal-cancelar:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-modal-salvar {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-modal-salvar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* Modal de Nome */
.modal-nome {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  max-width: 450px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.nome-input {
  margin-bottom: 16px;
}

.nome-input input {
  margin-bottom: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

.nome-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

/* Modais de Confirmação */
.modal-confirmacao {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  max-width: 450px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.modal-texto {
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.modal-opcoes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-opcao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  border: 2px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0;
}

.btn-opcao:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.btn-opcao .opcao-icon {
  font-size: 20px;
}

.btn-opcao .opcao-texto {
  flex: 1;
  text-align: left;
}

/* Estilos específicos por tipo */
.btn-opcao.excluir {
  border-color: rgba(220, 38, 38, 0.3);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(220, 38, 38, 0.02));
}

.btn-opcao.excluir:hover {
  border-color: rgba(220, 38, 38, 0.5);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.05));
}

.btn-opcao.excluir-todos {
  border-color: rgba(220, 38, 38, 0.5);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.05));
}

.btn-opcao.excluir-todos:hover {
  border-color: rgba(220, 38, 38, 0.7);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.1));
}

.btn-opcao.cancelar {
  border-color: rgba(107, 114, 128, 0.3);
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.05), rgba(107, 114, 128, 0.02));
}

.btn-opcao.cancelar:hover {
  border-color: rgba(107, 114, 128, 0.5);
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(107, 114, 128, 0.05));
}

.btn-opcao.confirmar {
  border-color: rgba(34, 197, 94, 0.4);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
}

.btn-opcao.confirmar:hover {
  border-color: rgba(34, 197, 94, 0.6);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.1));
  transform: translateY(-2px);
}

/* Input dentro de modais */
.modal-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--text-main);
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.modal-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(245, 124, 0, 0.1);
}

.modal-input::placeholder {
  color: var(--text-muted);
}

/* Select dentro de modais */
select.modal-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Aviso dentro de modais */
.modal-aviso {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  margin-bottom: 20px;
  color: #f59e0b;
  font-size: 14px;
  line-height: 1.5;
}

.modal-aviso span:first-child {
  font-size: 20px;
  flex-shrink: 0;
}

/* Info dentro de modais */
.modal-info {
  padding: 12px 16px;
  background: var(--bg-soft);
  border-radius: 10px;
  margin-bottom: 16px;
}

/* Preview do item na modal de exclusão */
.modal-item-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border-soft);
}

.modal-item-preview .item-tipo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.modal-item-preview .item-tipo.receita {
  background: rgba(34, 197, 94, 0.15);
}

.modal-item-preview .item-tipo.despesa {
  background: rgba(220, 38, 38, 0.15);
}

.modal-item-preview .item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-item-preview .item-descricao {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-item-preview .item-valor {
  font-size: 18px;
  font-weight: 700;
}

.modal-item-preview .item-valor.receita {
  color: #22c55e;
}

.modal-item-preview .item-valor.despesa {
  color: #dc2626;
}

/* Card de Resumo Rápido de Metas */
.metas-quick-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.03));
  border: 2px solid rgba(34, 197, 94, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
}

.metas-quick-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

.metas-quick-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.metas-quick-info > div {
  flex: 1;
  min-width: 0;
}

.metas-quick-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.metas-quick-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metas-quick-info p {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-configurar-metas {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  margin: 0;
  white-space: nowrap;
  width: 100%;
}

.btn-configurar-metas span:first-child {
  font-size: 16px;
}

.btn-configurar-metas:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.metas-quick-preview {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(34, 197, 94, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-quick-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.meta-quick-label {
  color: var(--text-muted);
  font-weight: 500;
}

.meta-quick-value {
  color: #22c55e;
  font-weight: 700;
  font-size: 15px;
}

/* Grid de metas nos insights */
.metas-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.meta-economia-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  border-left: 4px solid #22c55e;
}

.meta-limite-card {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.1), rgba(245, 124, 0, 0.05));
  border-left: 4px solid #F57C00;
}

.meta-valores {
  display: flex;
  justify-content: space-between;
  margin: 16px 0;
  gap: 16px;
}

.meta-atual,
.meta-objetivo {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 20px;
  font-weight: 700;
  color: #22c55e;
}

.meta-value-objetivo {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.barra-progresso-meta {
  width: 100%;
  height: 32px;
  background: var(--bg-soft);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  margin: 12px 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.barra-preenchida-meta {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  position: relative;
  overflow: hidden;
}

.barra-preenchida-meta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.barra-preenchida-meta.limite {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.barra-preenchida-meta.limite.warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.barra-preenchida-meta.limite.danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.percentual-meta {
  font-size: 13px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  z-index: 1;
}

.meta-status {
  font-size: 14px;
  color: var(--text-muted);
  margin: 8px 0 0 0;
  text-align: center;
  font-weight: 500;
}

.meta-status.success {
  color: #22c55e;
  font-weight: 600;
}

.meta-status.warning {
  color: #f59e0b;
  font-weight: 600;
}

.meta-status.danger {
  color: #ef4444;
  font-weight: 600;
}

/* Alerta de Conquista */
.conquista-alert {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border: 2px solid #22c55e;
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
  animation: slideInFromTop 0.6s ease, pulse 2s ease-in-out infinite;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.conquista-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.conquista-icon {
  font-size: 48px;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.conquista-text h4 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  color: #22c55e;
}

.conquista-text p {
  margin: 0;
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
}

/* Confete (será adicionado via JS) */
.confete {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #22c55e;
  position: fixed;
  top: -10px;
  z-index: 9999;
  animation: confete-fall 3s linear;
  pointer-events: none;
}

@keyframes confete-fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* ===== DASHBOARD INICIAL ===== */

/* Cabeçalho de Boas-Vindas */
.dashboard-header {
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-message {
  text-align: center;
}

.greeting-container {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.greeting {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-edit-name {
  background: rgba(245, 124, 0, 0.1);
  border: 1px solid rgba(245, 124, 0, 0.3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0;
  padding: 0;
  font-size: 16px;
  opacity: 0.7;
}

.btn-edit-name:hover {
  opacity: 1;
  background: rgba(245, 124, 0, 0.2);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

.btn-edit-name:active {
  transform: scale(0.95);
}

.current-date {
  font-size: 14px;
  color: var(--text-muted);
  margin: 8px 0 0 0;
  font-weight: 500;
}

/* Card Principal - Saldo */
.saldo-principal-card {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.1), rgba(245, 124, 0, 0.05));
  border: 2px solid rgba(245, 124, 0, 0.3);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(245, 124, 0, 0.2);
  animation: scaleIn 0.5s ease;
  position: relative;
  overflow: hidden;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.saldo-principal-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(245, 124, 0, 0.1), transparent 70%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.saldo-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.saldo-icon {
  font-size: 28px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.saldo-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.saldo-valor {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  text-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

.saldo-meta {
  max-width: 400px;
  margin: 0 auto;
}

.saldo-meta-bar {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.saldo-meta-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.saldo-meta-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}



/* Mini Cards */
.dashboard-mini-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  animation: slideInUp 0.6s ease backwards;
}

.mini-card:nth-child(1) { animation-delay: 0.1s; }
.mini-card:nth-child(2) { animation-delay: 0.2s; }
.mini-card:nth-child(3) { animation-delay: 0.3s; }
.mini-card:nth-child(4) { animation-delay: 0.4s; }

.mini-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.5);
}

.mini-card-icon {
  font-size: 32px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.mini-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-card-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mini-card-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.receitas-mini {
  border-left: 4px solid #22c55e;
}

.receitas-mini .mini-card-value {
  color: #22c55e;
}

.despesas-mini {
  border-left: 4px solid #dc2626;
}

.despesas-mini .mini-card-value {
  color: #dc2626;
}

.economia-mini {
  border-left: 4px solid #F57C00;
}

.economia-mini .mini-card-value {
  color: #F57C00;
}

.percentual-mini {
  border-left: 4px solid #60a5fa;
}

.percentual-mini .mini-card-value {
  color: #60a5fa;
}

/* ===================================================================
   COMPARATIVO MÊS A MÊS
   ================================================================= */

.comparativo-mensal {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  animation: slideInUp 0.6s ease backwards;
  animation-delay: 0.5s;
}

.comparativo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.comparativo-select {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comparativo-select:hover {
  border-color: var(--accent);
}

.comparativo-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.1);
}

.comparativo-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.comparativo-mes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.mes-atual {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.1), rgba(245, 124, 0, 0.05));
  border: 2px solid rgba(245, 124, 0, 0.3);
}

.mes-anterior {
  background: var(--bg-soft);
  border: 2px solid var(--border-soft);
}

.comparativo-mes:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mes-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mes-valor {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

.mes-atual .mes-valor {
  color: var(--accent);
}

.comparativo-variacao {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 2px dashed var(--border-soft);
}

.variacao-icon {
  font-size: 32px;
  animation: float 3s ease-in-out infinite;
}

.variacao-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.variacao-percentual {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.variacao-percentual.positivo {
  color: #22c55e;
}

.variacao-percentual.negativo {
  color: #ef4444;
}

.variacao-texto {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

.comparativo-grafico {
  height: 120px;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--bg-soft);
  border-radius: 12px;
}

.comparativo-analise {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(96, 165, 250, 0.05));
  border-left: 3px solid #60a5fa;
  border-radius: 10px;
}

.analise-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.analise-texto {
  margin: 0;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
  font-weight: 500;
}

/* Responsivo */
@media (max-width: 768px) {
  .comparativo-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .comparativo-variacao {
    order: -1;
  }

  .mes-valor {
    font-size: 20px;
  }

  .variacao-percentual {
    font-size: 18px;
  }

  .comparativo-grafico {
    height: 160px; 
    padding: 20px 12px; 
  }

  .comparativo-header {
    flex-direction: column;
    align-items: stretch;
  }

  .comparativo-select {
    width: 100%;
  }
  
  /* NOVO: Ajuste específico para análise no mobile */
  .comparativo-analise {
    padding: 14px;
  }
  
  .analise-texto {
    font-size: 13px;
  }
}

/* Ações Rápidas */
.acoes-rapidas {
  margin-bottom: 32px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.acoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.acao-btn {
  background: var(--bg-card);
  border: 2px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
  margin: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.acao-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.5);
}

.acao-icon {
  font-size: 24px;
}

.receita-btn {
  border-color: #22c55e;
}

.receita-btn:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
  border-color: #22c55e;
  color: #22c55e;
}

.despesa-btn {
  border-color: #dc2626;
}

.despesa-btn:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(220, 38, 38, 0.1));
  border-color: #dc2626;
  color: #dc2626;
}

.meta-btn {
  border-color: #22c55e;
}

.meta-btn:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
  border-color: #22c55e;
  color: #22c55e;
}

.insights-btn {
  border-color: #60a5fa;
}

.insights-btn:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(96, 165, 250, 0.1));
  border-color: #60a5fa;
  color: #60a5fa;
}

/* Últimos Lançamentos */
.ultimos-lancamentos {
  margin-bottom: 32px;
}

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

.btn-ver-todos {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 0;
}

.btn-ver-todos:hover {
  background: rgba(245, 124, 0, 0.1);
  transform: translateX(4px);
}

.lancamentos-lista {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.lancamento-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  transition: all 0.3s ease;
  cursor: pointer;
}

.lancamento-item:last-child {
  border-bottom: none;
}

.lancamento-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.lancamento-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.lancamento-icon.receita {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
}

.lancamento-icon.despesa {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(220, 38, 38, 0.1));
}

.lancamento-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lancamento-descricao {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.lancamento-categoria {
  font-size: 12px;
  color: var(--text-muted);
}

.lancamento-valor {
  font-size: 18px;
  font-weight: 700;
  text-align: right;
}

.lancamento-valor.receita {
  color: #22c55e;
}

.lancamento-valor.despesa {
  color: #dc2626;
}

.lancamento-data {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

/* Lançamento Recorrente Agrupado */
.lancamento-item.recorrente-agrupado {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05), rgba(96, 165, 250, 0.02));
  border-left: 4px solid #60a5fa;
  padding-left: 16px;
}

.lancamento-item.recorrente-agrupado:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(96, 165, 250, 0.05));
}

.lancamento-icon.recorrente {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(96, 165, 250, 0.1));
}

.lancamento-info-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #60a5fa;
  font-weight: 600;
  margin-top: 2px;
}

.lancamento-info-extra .extra-icon {
  font-size: 10px;
}

.lancamento-periodo {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

/* Lançamento Parcelado Agrupado */
.lancamento-item.parcelado-agrupado {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.05), rgba(245, 124, 0, 0.02));
  border-left: 4px solid var(--accent);
  padding-left: 16px;
}

.lancamento-item.parcelado-agrupado:hover {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.1), rgba(245, 124, 0, 0.05));
}

.lancamento-icon.parcelado {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.2), rgba(245, 124, 0, 0.1));
}

.lancamento-info-extra.parcelado {
  color: var(--accent);
}

.lancamento-total {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 600;
}

/* Estado Vazio Dashboard */
.dashboard-empty {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 60px 40px;
  margin: 40px 0;
  border: 2px dashed var(--border-soft);
  text-align: center;
  animation: fadeIn 0.6s ease;
}

.empty-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.dashboard-empty h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

.dashboard-empty p {
  margin: 0 0 24px 0;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.btn-comecar {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(245, 124, 0, 0.4);
  margin: 0;
}

.btn-comecar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(245, 124, 0, 0.5);
}

/* Dica do Dia */
.dica-dia {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(96, 165, 250, 0.05));
  border-left: 4px solid #60a5fa;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  animation: slideInUp 0.6s ease;
}

.dica-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.dica-content h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.dica-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== BOTÕES DE EXPORTAÇÃO PDF ===== */
.export-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  animation: slideInUp 0.6s ease;
}

.btn-export {
  flex: 1;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
  margin: 0;
}

.btn-export:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 124, 0, 0.5);
}

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

.btn-export.secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn-export.secondary:hover {
  box-shadow: 0 8px 20px rgba(107, 114, 128, 0.5);
}

.export-icon {
  font-size: 20px;
}

.export-text {
  font-size: 14px;
}

/* ===== SISTEMA DE NOTIFICAÇÕES ===== */
.notifications-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification.removing {
  animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 1, 1);
}

@keyframes slideOutRight {
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.notification::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
}

.notification.success::before {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.notification.error::before {
  background: linear-gradient(180deg, #ef4444, #dc2626);
}

.notification.warning::before {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.notification.info::before {
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  animation: iconPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes iconPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.notification.success .notification-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
  color: #22c55e;
}

.notification.error .notification-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
  color: #ef4444;
}

.notification.warning .notification-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
  color: #f59e0b;
}

.notification.info .notification-icon {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(96, 165, 250, 0.1));
  color: #60a5fa;
}

.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.notification-message {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 100%;
  transform-origin: left;
  animation: progressBar 4s linear;
}

@keyframes progressBar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.notification.success .notification-progress {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.notification.error .notification-progress {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.notification.warning .notification-progress {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.notification.info .notification-progress {
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

/* Responsivo para notificações */
@media (max-width: 768px) {
  /* Filtros de Período Mobile */
  .periodo-atalhos {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .btn-atalho {
    padding: 10px 12px;
    font-size: 13px;
  }

  .btn-atalho .atalho-icon {
    font-size: 16px;
  }

  .btn-atalho .atalho-text {
    font-size: 12px;
  }

  .periodo-range {
    flex-direction: row;
    gap: 8px;
    align-items: flex-end;
    width: 100%;
    max-width: 100%;
  }

  .periodo-range .input-wrapper {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 16px);
  }

  .periodo-seta {
    transform: none;
    margin: 0 0 8px 0;
    font-size: 20px;
    flex-shrink: 0;
  }

  .periodo-preview {
    padding: 12px;
    flex-direction: column;
    text-align: center;
  }

  .periodo-preview .preview-text {
    font-size: 14px;
  }

  .notifications-container {
    top: 80px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .notification {
    min-width: auto;
    padding: 14px 16px;
  }

  .notification-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .notification-title {
    font-size: 13px;
  }

  .notification-message {
    font-size: 12px;
  }
}

/* Badge de edição */
.editing-badge {
  display: none;
  background: #F57C00;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  animation: pulse 2s infinite;
}

.editing-badge.ativo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Animação de sucesso */
@keyframes successPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
  }
}

.btn-success {
  animation: successPulse 0.6s ease;
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
}

/* ===== INPUTS ===== */
input,
select,
button {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  border-radius: 8px;
}

input,
select {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ===== BOTÃO ===== */
button {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
}

button:hover {
  filter: brightness(1.1);
}

/* ===== ESTADO VAZIO ===== */
.estado-vazio {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 60px 40px;
  margin-bottom: 24px;
  border: 2px dashed var(--border-soft);
  text-align: center;
  animation: fadeIn 0.6s ease;
}

.estado-vazio-icone {
  font-size: 80px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.estado-vazio h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

.estado-vazio p {
  margin: 0 0 24px 0;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.estado-vazio-dica {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 124, 0, 0.1);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  margin-top: 12px;
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===== INSIGHTS MODERNOS ===== */
.insights-container {
  margin-bottom: 32px;
}

.insights-section {
  margin-bottom: 32px;
}

.insights-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.insights-grid {
  display: grid;
  gap: 16px;
}

/* Grid Resumo Financeiro */
.resumo-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Grid Análise Inteligente */
.analise-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Grid Estatísticas */
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== INSIGHT CARD PEQUENO ===== */
.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  position: relative;
  overflow: hidden;
}

.insight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.insight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,.5);
  border-color: rgba(245, 124, 0, 0.3);
}

.insight-card:hover::before {
  opacity: 1;
}

.insight-icon {
  font-size: 36px;
  min-width: 50px;
  text-align: center;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.insight-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.insight-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.insight-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

/* Cores específicas dos cards de resumo */
.receitas-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(34, 197, 94, 0.02));
  border-left: 4px solid #22c55e;
}

.receitas-card .insight-value {
  color: #22c55e;
}

.despesas-card {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(220, 38, 38, 0.02));
  border-left: 4px solid #dc2626;
}

.despesas-card .insight-value {
  color: #dc2626;
}

.saldo-card {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.05), rgba(245, 124, 0, 0.02));
  border-left: 4px solid #F57C00;
}

.saldo-card .insight-value {
  color: #F57C00;
}

.percentual-card {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05), rgba(96, 165, 250, 0.02));
  border-left: 4px solid #60a5fa;
}

.percentual-card .insight-value {
  color: #60a5fa;
}

.barra-progresso-mini {
  width: 100%;
  height: 6px;
  background: var(--bg-soft);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}

.barra-preenchida-mini {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
  transition: width 0.4s ease;
  border-radius: 3px;
}

/* ===== INSIGHT CARD GRANDE (Análise) ===== */
.insight-card-large {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  cursor: pointer;
}

.insight-card-large:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0,0,0,.5);
  border-color: rgba(245, 124, 0, 0.4);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  font-size: 28px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.card-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Gradientes dos cards de análise */
.padrao-gastos {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.08), rgba(245, 124, 0, 0.02));
  border-left: 4px solid #F57C00;
}

.economia-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.02));
  border-left: 4px solid #22c55e;
}

.tendencia-card {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0.02));
  border-left: 4px solid #60a5fa;
}

/* ===== STAT CARDS ===== */
.stat-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}

.stat-card:hover {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.08), rgba(245, 124, 0, 0.02));
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.stat-info {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== ANIMAÇÕES ===== */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.insight-card,
.insight-card-large {
  animation: slideInUp 0.5s ease backwards;
}

.insight-card:nth-child(1) { animation-delay: 0.05s; }
.insight-card:nth-child(2) { animation-delay: 0.1s; }
.insight-card:nth-child(3) { animation-delay: 0.15s; }
.insight-card:nth-child(4) { animation-delay: 0.2s; }
.insight-card:nth-child(5) { animation-delay: 0.25s; }
.insight-card:nth-child(6) { animation-delay: 0.3s; }

/* ===== GRÁFICOS ===== */
.graficos {
  display: none;
}

.graficos.ativa {
  display: grid;
}

.graficos {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.grafico {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  height: 360px;
  border: 1px solid var(--border-soft);
}

.grafico canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===== TABELA ===== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
}

/* ===== AÇÕES ===== */
.acoes {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn-acao {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.btn-acao.editar { color: #60a5fa; }
.btn-acao.excluir { color: #f87171; }

/* ===== PAGINAÇÃO ===== */
.paginacao {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.paginacao button {
  min-width: 40px;
  height: 40px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  margin: 0;
  width: auto; /* Corrige a largura para não ocupar 100% */
}

.paginacao button:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

.paginacao button.ativa {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.4);
}

.paginacao button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.form-destaque {
  animation: pulseForm 1.2s ease;
  border: 2px solid #F57C00;
}

@keyframes pulseForm {
  0% {
    box-shadow: 0 0 0 rgba(245,124,0,0.6);
  }
  50% {
    box-shadow: 0 0 25px rgba(245,124,0,0.9);
  }
  100% {
    box-shadow: 0 0 0 rgba(245,124,0,0);
  }
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1200px) {
  .graficos { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Menu responsivo */
  .nav-menu {
    top: 70px;
  }
  
  .nav-content {
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
  }
  
  .nav-item {
    padding: 12px 6px;
    gap: 4px;
  }
  
  .nav-icon {
    font-size: 18px;
  }
  
  .nav-label {
    font-size: 9px;
  }

  /* Dashboard Mobile */
  .greeting-container {
    display: inline-flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
  }

  .greeting {
    font-size: 22px;
    margin: 0;
  }

  .btn-edit-name {
    width: 28px;
    height: 28px;
    font-size: 13px;
    flex-shrink: 0;
  }

  .current-date {
    font-size: 13px;
  }

  .saldo-principal-card {
    padding: 24px 20px;
  }

  .saldo-valor {
    font-size: 36px;
  }

  .dashboard-mini-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .mini-card {
    padding: 16px;
    flex-direction: column;
    text-align: center;
  }

  .mini-card-icon {
    font-size: 28px;
  }

  .mini-card-value {
    font-size: 18px;
  }

  .acoes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .acao-btn {
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
  }

  .acao-icon {
    font-size: 28px;
  }

  .lancamento-item {
    padding: 14px 16px;
  }

  .lancamento-item.recorrente-agrupado {
    padding-left: 12px;
  }

  .lancamento-item.parcelado-agrupado {
    padding-left: 12px;
  }

  .lancamento-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .lancamento-valor {
    font-size: 16px;
  }

  .lancamento-info-extra {
    font-size: 10px;
  }

  .lancamento-periodo {
    font-size: 10px;
  }

  .dashboard-empty {
    padding: 40px 20px;
  }

  .empty-icon {
    font-size: 60px;
  }

  .dashboard-empty h3 {
    font-size: 20px;
  }

  .dica-dia {
    flex-direction: column;
    text-align: center;
  }

  /* Botões de Exportação Mobile */
  .export-buttons {
    flex-direction: column;
  }

  .btn-export {
    padding: 14px 20px;
  }

  .export-icon {
    font-size: 18px;
  }

  .export-text {
    font-size: 13px;
  }

  .graficos {
    grid-template-columns: 1fr;
  }

  .grafico {
    height: 260px;
  }
  
  .estado-vazio {
    padding: 40px 20px;
  }
  
  .estado-vazio-icone {
    font-size: 60px;
  }
  
  .estado-vazio h3 {
    font-size: 20px;
  }
  
  .input-group {
    grid-template-columns: 1fr;
  }
  
  .tipo-selector {
    gap: 10px;
  }
  
  .tipo-btn {
    padding: 14px;
  }
  
  .form-actions {
    grid-template-columns: 1fr;
  }
  
  .btn-cancelar span:last-child {
    display: none;
  }
  
  .btn-cancelar {
    padding: 16px;
  }
  
  .parcelamento-section {
    padding: 14px;
  }
  
  .toggle-label {
    font-size: 13px;
  }
  
  .toggle-icon {
    font-size: 18px;
  }
  
  .parcelamento-info {
    padding: 10px;
  }
  
  .info-item {
    font-size: 12px;
  }
  
  /* Recorrência Mobile */
  .recorrencia-section {
    padding: 14px;
  }
  
  .recorrencia-info {
    padding: 10px;
  }
  
  /* FAB e Modal responsivos */
  .fab-metas {
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
  }
  
  .fab-icon {
    font-size: 24px;
  }
  
  .modal-metas {
    max-width: 100%;
    margin: 0 10px;
  }
  
  .modal-nome {
    max-width: 100%;
    margin: 0 10px;
  }
  
  .modal-confirmacao {
    max-width: 100%;
    margin: 0 10px;
  }
  
  .btn-opcao {
    padding: 14px 20px;
    font-size: 14px;
  }
  
  .btn-opcao .opcao-icon {
    font-size: 18px;
  }
  
  .modal-header {
    padding: 20px;
  }
  
  .modal-header h3 {
    font-size: 18px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-footer {
    flex-direction: column;
    padding: 16px 20px;
  }
  
  .btn-modal-cancelar,
  .btn-modal-salvar {
    width: 100%;
    justify-content: center;
  }
  
  .metas-quick-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-configurar-metas {
    width: 100%;
    justify-content: center;
  }
  
  .metas-quick-icon {
    font-size: 28px;
  }
  
  .metas-grid {
    grid-template-columns: 1fr;
  }
  
  .meta-valores {
    flex-direction: column;
    gap: 12px;
  }
  
  .meta-value,
  .meta-value-objetivo {
    font-size: 18px;
  }
  
  .barra-progresso-meta {
    height: 28px;
  }
  
  .percentual-meta {
    font-size: 12px;
  }
  
  .conquista-alert {
    padding: 16px;
  }
  
  .conquista-icon {
    font-size: 36px;
  }
  
  .conquista-text h4 {
    font-size: 18px;
  }
  
  .conquista-text p {
    font-size: 13px;
  }
  
  .resumo-grid,
  .analise-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .insight-value {
    font-size: 20px;
  }

  .stat-value {
    font-size: 18px;
  }

  .insight-icon,
  .stat-icon {
    font-size: 28px;
  }

  .card-icon {
    font-size: 24px;
  }

  .card-text {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .insight-card {
    padding: 16px;
  }

  .insight-card-large {
    padding: 18px;
  }
}

@media (hover: hover) and (pointer: fine) {
  td.acoes {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .btn-acao {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 6px 8px;
    border-radius: 8px;
    transition:
      background-color 0.25s ease,
      transform 0.2s ease,
      box-shadow 0.2s ease;
  }

  .btn-acao.editar:hover {
    background: rgba(245, 124, 0, 0.18);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 14px rgba(245, 124, 0, 0.35);
  }

  .btn-acao.excluir:hover {
    background: rgba(220, 38, 38, 0.18);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.4);
  }

  .btn-acao:active {
    transform: scale(0.95);
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  table thead {
    display: none;
  }

  table,
  tbody,
  tr {
    display: block;
    width: 100%;
  }

  tr {
    background: rgba(17, 24, 39, 0.85);
    margin-bottom: 14px;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,.35);
  }

  td {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    padding: 6px 0;
    border: none;
    font-size: 14px;
    color: #e5e7eb;
  }

  td::before {
    content: attr(data-titulo);
    font-weight: 600;
    color: #9ca3af;
  }

  td.valor {
    font-weight: 700;
    font-size: 15px;
    color: #F57C00;
  }

  td.acoes {
    grid-template-columns: 1fr;
    justify-content: flex-end;
    margin-top: 10px;
  }

  td.acoes::before {
    display: none;
  }

  .btn-acao {
    font-size: 18px;
  }
  
  /* Paginação no mobile - manter em linha */
  .paginacao {
    gap: 6px;
    margin-top: 16px;
  }
  
  .paginacao button {
    min-width: 36px;
    height: 36px;
    padding: 6px 10px;
    font-size: 13px;
  }

  tr {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  tr:active {
    transform: scale(0.98);
    box-shadow: 0 4px 14px rgba(245,124,0,.35);
  }

  .btn-acao {
    transition: transform 0.15s ease, color 0.15s ease;
  }

  .btn-acao:active {
    transform: scale(1.25);
  }

  .btn-acao.editar:active {
    color: #60a5fa;
  }

  .btn-acao.excluir:active {
    color: #f87171;
  }
}

/* ===== RODAPÉ ===== */
.app-footer {
  background: linear-gradient(135deg, #020617, #111827);
  border-top: 1px solid var(--border-soft);
  margin-top: 60px;
  padding: 40px 0 24px 0;
  box-shadow: 0 -8px 24px rgba(0,0,0,.4);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 24px rgba(245,124,0,.4);
}

.footer-brand-text h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.footer-brand-text p {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border-color: var(--accent);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(245,124,0,.4);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-soft), transparent);
  margin: 24px 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-info {
  flex: 1;
}

.developer-name {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dev-icon {
  font-size: 18px;
}

.heart {
  color: #ef4444;
  animation: heartbeat 1.5s ease-in-out infinite;
  display: inline-block;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.1); }
  20%, 40% { transform: scale(1); }
}

.developer-name strong {
  color: var(--accent);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.copyright {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-version {
  display: flex;
  align-items: center;
}

.version-badge {
  padding: 6px 14px;
  background: rgba(245, 124, 0, 0.1);
  border: 1px solid rgba(245, 124, 0, 0.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Responsivo do rodapé */
@media (max-width: 768px) {
  .app-footer {
    padding: 32px 0 20px 0;
    margin-top: 40px;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
    text-align: center;
    margin-bottom: 24px;
  }

  .footer-brand {
    flex-direction: column;
    gap: 12px;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .developer-name {
    justify-content: center;
    font-size: 13px;
  }

  .footer-logo {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .footer-brand-text h3 {
    font-size: 20px;
  }

  .footer-brand-text p {
    font-size: 12px;
  }
}

/* ===================================================================
   TODOS OS LANÇAMENTOS - Página Moderna
   =================================================================== */

/* Header da Página */
.tabela-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tabela-title-area h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

.tabela-icon {
  font-size: 28px;
}

.tabela-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.tabela-header-actions {
  display: flex;
  gap: 10px;
}

.btn-export-tabela {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-export-tabela:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

/* Navegador de Período */
.tabela-periodo-nav {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-soft);
}

/* Seletor de Ano */
.ano-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.ano-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ano-nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: scale(1.05);
}

.ano-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 100px;
}

.ano-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ano-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

/* Grid de Meses */
.meses-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.mes-btn {
  padding: 12px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.mes-btn:hover {
  background: rgba(245, 124, 0, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.mes-btn.active {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

.mes-btn.todos {
  grid-column: span 1;
  background: var(--bg-card);
  border-style: dashed;
}

.mes-btn.todos.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-style: solid;
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Indicador de mês com dados */
.mes-btn.has-data::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  margin: 6px auto 0;
}

.mes-btn.active.has-data::after {
  background: white;
}

/* Resumo do Período */
.tabela-resumo {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.resumo-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.3s ease;
}

.resumo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.resumo-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.resumo-card.receitas .resumo-icon {
  background: rgba(34, 197, 94, 0.15);
}

.resumo-card.despesas .resumo-icon {
  background: rgba(239, 68, 68, 0.15);
}

.resumo-card.saldo .resumo-icon {
  background: rgba(245, 124, 0, 0.15);
}

.resumo-card.total .resumo-icon {
  background: rgba(99, 102, 241, 0.15);
}

.resumo-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.resumo-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resumo-valor {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resumo-card.receitas .resumo-valor {
  color: #22c55e;
}

.resumo-card.despesas .resumo-valor {
  color: #ef4444;
}

.resumo-card.saldo .resumo-valor {
  color: var(--accent);
}

.resumo-card.total .resumo-valor {
  color: #6366f1;
}

/* Filtros Rápidos */
.tabela-filtros {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filtro-grupo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
}

.filtro-grupo.busca {
  flex: 1;
  min-width: 200px;
}

.filtro-grupo label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filtro-grupo select,
.filtro-grupo input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filtro-grupo select:focus,
.filtro-grupo input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.1);
}

.busca-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.busca-input-wrapper input {
  width: 100%;
  padding-right: 40px;
}

.busca-icon-inside {
  position: absolute;
  right: 14px;
  font-size: 16px;
  opacity: 0.5;
  pointer-events: none;
}

/* Tabela Box */
.tabela-box {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}

.tabela-box table {
  margin: 0;
}

/* Estado Vazio */
.tabela-vazio {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 60px 20px;
  text-align: center;
  border: 1px solid var(--border-soft);
}

.tabela-vazio-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.tabela-vazio h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.tabela-vazio p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Responsivo - Todos os Lançamentos */
@media (max-width: 1024px) {
  .tabela-resumo {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tabela-page-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .tabela-header-actions {
    justify-content: flex-start;
  }
  
  .meses-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .mes-btn.todos {
    grid-column: span 4;
  }
  
  .tabela-resumo {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tabela-filtros {
    flex-direction: column;
  }
  
  .filtro-grupo {
    min-width: 100%;
  }
  
  .btn-export-tabela .btn-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .tabela-title-area h2 {
    font-size: 20px;
  }
  
  .tabela-icon {
    font-size: 24px;
  }
  
  .ano-value {
    font-size: 24px;
  }
  
  .meses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .mes-btn.todos {
    grid-column: span 3;
  }
  
  .tabela-resumo {
    grid-template-columns: 1fr;
  }
  
  .resumo-card {
    padding: 14px;
  }
  
  .resumo-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
  
  .resumo-valor {
    font-size: 16px;
  }
}

/* ===================================================================
   BUSCA AVANÇADA - 
   ================================================================= */

/* ===== BUSCA AVANÇADA ===== */
.busca-container {
  max-width: 100%;
}

.busca-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
}

.busca-title-area h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.busca-icon {
  font-size: 28px;
}

.busca-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.btn-limpar-busca {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
  margin: 0;
  white-space: nowrap;
}

.btn-limpar-busca:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(107, 114, 128, 0.4);
}

/* Campo de Busca Principal */
.busca-principal {
  margin-bottom: 24px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  font-size: 20px;
  pointer-events: none;
  z-index: 1;
}

.search-input-wrapper input {
  width: 100%;
  padding: 16px 50px 16px 50px;
  font-size: 16px;
  border: 2px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-main);
  transition: all 0.3s ease;
  margin: 0;
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 124, 0, 0.1);
}

.clear-search {
  position: absolute;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
}

.clear-search:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

/* Filtros Avançados */
.busca-filtros {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  margin-bottom: 24px;
  overflow: hidden;
}

.btn-toggle-filtros {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  margin: 0;
}

.btn-toggle-filtros:hover {
  background: rgba(245, 124, 0, 0.05);
}

.btn-toggle-filtros .toggle-icon {
  font-size: 20px;
  margin-right: 8px;
}

.btn-toggle-filtros .toggle-text {
  flex: 1;
  text-align: left;
}

.btn-toggle-filtros .toggle-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.btn-toggle-filtros.active .toggle-arrow {
  transform: rotate(180deg);
}

.filtros-avancados {
  padding: 0 20px 20px 20px;
  animation: slideDown 0.3s ease;
}

.filtros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.filtro-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filtro-item label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filtro-item input,
.filtro-item select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.3s ease;
  margin: 0;
}

.filtro-item input:focus,
.filtro-item select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.1);
}

/* Resumo da Busca */
.busca-resumo {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.1), rgba(245, 124, 0, 0.05));
  border: 2px solid rgba(245, 124, 0, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

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

.resumo-icon {
  font-size: 24px;
}

.resumo-texto {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.resumo-totais {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.resumo-total-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.resumo-total-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resumo-total-valor {
  font-size: 18px;
  font-weight: 700;
  margin-top: 2px;
}

.resumo-total-valor.receita {
  color: #22c55e;
}

.resumo-total-valor.despesa {
  color: #dc2626;
}

.resumo-total-valor.saldo {
  color: var(--accent);
}

/* Estado Vazio */
.busca-vazia {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  border: 2px dashed var(--border-soft);
}

.busca-vazia-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.busca-vazia h3 {
  margin: 0 0 12px 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

.busca-vazia p {
  margin: 0 0 24px 0;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.busca-dicas {
  background: rgba(245, 124, 0, 0.05);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}

.busca-dicas h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.busca-dicas ul {
  margin: 0;
  padding-left: 20px;
}

.busca-dicas li {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.5;
}

/* Tabela de Resultados */
.busca-tabela {
  animation: fadeIn 0.4s ease;
}

.busca-tabela table {
  margin-bottom: 20px;
}

/* Highlight de busca */
.highlight {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.3), rgba(245, 124, 0, 0.2));
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* ===== ATUALIZAÇÃO NO MENU DE NAVEGAÇÃO PARA 6 ITENS ===== */
/* SUBSTITUA o .nav-content existente por este: */
.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* MUDOU de 5 para 6 */
  gap: 0;
}

/* Responsivo para Busca */
@media (max-width: 768px) {
  
  .nav-content {
    grid-template-columns: repeat(3, 1fr); /* 3 colunas = 2 linhas de menu */
    gap: 0;
  }
  
  .busca-header {
    flex-direction: column;
  }
  
  .btn-limpar-busca {
    width: 100%;
    justify-content: center;
  }
  
  .filtros-grid {
    grid-template-columns: 1fr;
  }
  
  .busca-resumo {
    flex-direction: column;
    align-items: stretch;
  }
  
  .resumo-totais {
    justify-content: space-between;
  }
  
  .busca-vazia {
    padding: 40px 20px;
  }
  
  .busca-vazia-icon {
    font-size: 48px;
  }
  
  .busca-vazia h3 {
    font-size: 18px;
  }
}

/* ===================================================================
   FIM DAS ADIÇÕES - 
   ================================================================= */

   /* ===================================================================
   MENU LATERAL (SIDEBAR) + CORREÇÕES
   ================================================================= */

/* ===== BOTÃO HAMBÚRGUER NO HEADER ===== */
.menu-toggle {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  margin: 0;
}

.menu-toggle:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  transform: scale(1.05);
}

.menu-toggle:active {
  transform: scale(0.95);
}

/* Hamburguer icon */
.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle:hover .hamburger-icon span {
  background: var(--accent);
}

.menu-toggle.active .hamburger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== SIDEBAR (MENU LATERAL) ===== */
/* ═══════════════════════════════════════════════════════════════
   ✨ OPÇÃO 3: MENU MINIMALISTA COM MICRO-INTERAÇÕES
   Design limpo, profissional e cheio de detalhes sutis
   ═══════════════════════════════════════════════════════════════ */

/* ===== BASE DA SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar.active {
  opacity: 1;
  pointer-events: all;
}

/* Overlay minimalista */
.sidebar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

/* Conteúdo limpo */
.sidebar-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 340px;
  background: var(--bg-surface);
  box-shadow: 
    -20px 0 60px rgba(0, 0, 0, 0.3),
    -1px 0 0 rgba(245, 124, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.sidebar.active .sidebar-content {
  transform: translateX(0);
}

/* Header minimalista */
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Linha decorativa animada */
.sidebar-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #ff9800);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.active .sidebar-header::after {
  width: 100%;
}

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

/* Logo minimalista */
.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logo:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(245, 124, 0, 0.5);
}

.sidebar-brand-text h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.sidebar-brand-text p {
  margin: 3px 0 0 0;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Botão fechar minimalista */
.sidebar-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
  line-height: 1;
}

.sidebar-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
  transform: scale(1.1);
}

.sidebar-close:active {
  transform: scale(0.95);
}

/* Menu limpo */
.sidebar-menu {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
  
  /* Scrollbar minimalista */
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 124, 0, 0.2) transparent;
}

.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(245, 124, 0, 0.2);
  border-radius: 2px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 124, 0, 0.4);
}

/* Items minimalistas */
.sidebar-item {
  position: relative;
  width: 100%;
  margin: 0 0 4px 0;
  padding: 14px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Indicador lateral */
.sidebar-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-item:hover {
  background: var(--bg-soft);
  border-color: var(--border-soft);
}

.sidebar-item:hover::before {
  height: 70%;
}

.sidebar-item:active {
  transform: scale(0.98);
}

/* Item ativo - discreto mas claro */
.sidebar-item.active {
  background: rgba(245, 124, 0, 0.08);
  border-color: rgba(245, 124, 0, 0.2);
}

.sidebar-item.active::before {
  height: 70%;
}

/* Ícone clean */
.sidebar-icon {
  font-size: 22px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.sidebar-item:hover .sidebar-icon {
  opacity: 1;
  transform: scale(1.1);
}

.sidebar-item.active .sidebar-icon {
  opacity: 1;
  color: var(--accent);
}

/* Conteúdo do item */
.sidebar-item-content {
  flex: 1;
  min-width: 0;
}

.sidebar-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
  display: block;
  transition: color 0.2s ease;
}

.sidebar-item:hover .sidebar-label {
  color: var(--accent);
}

.sidebar-item.active .sidebar-label {
  color: var(--accent);
  font-weight: 700;
}

.sidebar-description {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  line-height: 1.3;
}

/* Seta sutil */
.sidebar-arrow {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.2s ease;
}

.sidebar-item:hover .sidebar-arrow {
  opacity: 0.5;
  transform: translateX(0);
}

.sidebar-item.active .sidebar-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

/* Animação de entrada suave */
.sidebar.active .sidebar-item {
  animation: fadeInItem 0.4s ease backwards;
}

.sidebar.active .sidebar-item:nth-child(1) { animation-delay: 0.05s; }
.sidebar.active .sidebar-item:nth-child(2) { animation-delay: 0.08s; }
.sidebar.active .sidebar-item:nth-child(3) { animation-delay: 0.11s; }
.sidebar.active .sidebar-item:nth-child(4) { animation-delay: 0.14s; }
.sidebar.active .sidebar-item:nth-child(5) { animation-delay: 0.17s; }
.sidebar.active .sidebar-item:nth-child(6) { animation-delay: 0.20s; }

@keyframes fadeInItem {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Divisor entre seções */
.sidebar-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 8px 12px;
  position: relative;
  overflow: hidden;
}

.sidebar-divider::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { width: 0; left: 0; }
  50% { width: 100%; left: 0; }
  100% { width: 0; left: 100%; }
}

/* Footer discreto */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-soft);
}

.sidebar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-info:hover {
  border-color: rgba(245, 124, 0, 0.3);
  background: rgba(245, 124, 0, 0.05);
}

.sidebar-info-icon {
  font-size: 18px;
  opacity: 0.7;
}

.sidebar-info-title {
  margin: 0 0 3px 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
}

.sidebar-info-text {
  margin: 0;
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Contador de notificações (opcional) */
.sidebar-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(245, 124, 0, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ===== RESPONSIVO ===== */
@media (max-width: 480px) {
  .sidebar-content {
    max-width: 85%;
  }

  .sidebar-header {
    padding: 20px 16px;
  }

  .sidebar-logo {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .sidebar-brand-text h2 {
    font-size: 16px;
  }

  .sidebar-menu {
    padding: 10px 6px;
  }

  .sidebar-item {
    padding: 12px 10px;
  }

  .sidebar-icon {
    font-size: 20px;
  }

  .sidebar-label {
    font-size: 13px;
  }

  .sidebar-description {
    font-size: 9px;
  }
}

/* Modo claro */
[data-theme="light"] .sidebar-content {
  background: #ffffff;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sidebar-item:hover {
  background: #f8fafc;
}

[data-theme="light"] .sidebar-item.active {
  background: rgba(245, 124, 0, 0.05);
}

/* ===== DESKTOP: SIDEBAR FIXA À ESQUERDA ===== */
@media (min-width: 1024px) {
  /* Sidebar sempre visível no desktop */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: 260px;
    z-index: 100;
    pointer-events: all;
    opacity: 1;
  }
  
  /* Esconder overlay no desktop */
  .sidebar-overlay {
    display: none;
  }
  
  /* Conteúdo do sidebar fixo à esquerda */
  .sidebar-content {
    position: relative;
    width: 100%;
    max-width: none;
    height: 100%;
    transform: none;
    box-shadow: 1px 0 0 var(--border-soft);
    border-right: 1px solid var(--border-soft);
  }
  
  .sidebar.active .sidebar-content {
    transform: none;
  }
  
  /* Esconder botão de fechar no desktop */
  .sidebar-close {
    display: none;
  }
  
  /* Esconder botão de menu hamburguer no desktop */
  .menu-toggle {
    display: none !important;
  }
  
  /* Header ocupa toda a largura após sidebar */
  .app-header {
    margin-left: 260px;
  }
  
  /* Main centralizado na área disponível */
  main {
    margin-left: 260px;
    max-width: none;
    padding: 32px 48px;
  }
  
  /* Ajustar header content para centralizar */
  .header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 32px;
  }
  
  /* Sidebar header mais compacto no desktop */
  .sidebar-header {
    padding: 20px 16px;
  }
  
  .sidebar-brand-text p {
    display: none;
  }
  
  /* Menu items mais compactos */
  .sidebar-item {
    padding: 12px 14px;
    margin: 0 0 2px 0;
    border-radius: 8px;
  }
  
  .sidebar-icon {
    font-size: 20px;
    width: 22px;
  }
  
  .sidebar-label {
    font-size: 13px;
  }
  
  .sidebar-description {
    font-size: 10px;
  }
  
  /* Seta sempre visível no desktop */
  .sidebar-arrow {
    opacity: 0.3;
    transform: translateX(0);
  }
  
  .sidebar-item:hover .sidebar-arrow,
  .sidebar-item.active .sidebar-arrow {
    opacity: 1;
  }
  
  /* Remover animação de entrada no desktop */
  .sidebar .sidebar-item {
    animation: none;
  }
  
  /* Footer mais compacto */
  .sidebar-footer {
    padding: 12px;
  }
  
  .sidebar-info {
    padding: 10px;
  }
  
  /* Linha decorativa sempre visível */
  .sidebar .sidebar-header::after {
    width: 100%;
  }
  
  /* Cards e boxes ocupam mais espaço */
  .box {
    max-width: 100%;
  }
  
  /* Dashboard grid mais espaçoso */
  .dashboard-grid {
    gap: 24px;
  }
  
  /* Cards de resumo em grid */
  .cards-resumo {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* Desktop grande */
@media (min-width: 1440px) {
  .sidebar {
    width: 280px;
  }
  
  .app-header {
    margin-left: 280px;
  }
  
  main {
    margin-left: 280px;
    padding: 32px 64px;
  }
  
  .header-content {
    padding: 14px 48px;
  }
  
  .sidebar-item {
    padding: 14px 16px;
  }
  
  .sidebar-icon {
    font-size: 22px;
  }
  
  .sidebar-label {
    font-size: 14px;
  }
}

/* Desktop extra grande */
@media (min-width: 1920px) {
  .sidebar {
    width: 300px;
  }
  
  .app-header {
    margin-left: 300px;
  }
  
  main {
    margin-left: 300px;
    padding: 40px 80px;
    max-width: 1800px;
  }
  
  .header-content {
    max-width: 1600px;
    padding: 16px 64px;
  }
}

/* ===== OCULTAR MENU ANTIGO ===== */
.nav-menu {
  display: none !important;
}

/* ===== CORREÇÃO DO BOTÃO LIMPAR FILTROS ===== */
.busca-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}

.busca-title-area {
  flex: 1;
  min-width: 0;
}

.btn-limpar-busca {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-limpar-busca:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(107, 114, 128, 0.4);
}

.btn-limpar-busca span:first-child {
  font-size: 16px;
}

.btn-limpar-busca .btn-text {
  display: inline;
}

/* ===== RESPONSIVO ===== */

/* ===== RESPONSIVO - TABLET ===== */
@media (min-width: 481px) and (max-width: 768px) {
  .header-content {
    padding: 14px 20px;
  }

  .logo {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .brand-text h1 {
    font-size: 19px;
  }

  .brand-text span {
    font-size: 12px;
  }

  /* Mostrar sync status em tablets */
  .sync-status {
    display: flex;
  }
}

/* ===== RESPONSIVO - MOBILE ===== */
@media (max-width: 480px) {
  .header-content {
    padding: 10px 12px;
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 18px;
  }

  .brand-text h1 {
    font-size: 16px;
  }

  .brand-text span {
    font-size: 10px;
  }

  .header-actions {
    gap: 6px;
  }

  /* Esconder sync status no mobile pequeno */
  .sync-status {
    display: none !important;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .theme-icon {
    font-size: 18px;
  }

  .hamburger-icon {
    width: 18px;
    gap: 3px;
  }

  .user-dropdown {
    min-width: 180px;
    right: -8px;
  }

  .user-dropdown-name {
    font-size: 13px;
  }

  .user-dropdown-email {
    font-size: 10px;
  }

  .user-dropdown-item {
    padding: 10px;
    font-size: 13px;
  }
}

/* ===== MOBILE MUITO PEQUENO (<360px) ===== */
@media (max-width: 360px) {
  .header-content {
    padding: 8px 10px;
    gap: 6px;
  }

  .brand {
    gap: 6px;
  }

  .logo {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .brand-text h1 {
    font-size: 14px;
  }

  .brand-text span {
    display: none; /* Ocultar subtítulo em telas muito pequenas */
  }

  .header-actions {
    gap: 4px;
  }

  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 32px;
    height: 32px;
  }

  .theme-icon {
    font-size: 16px;
  }

  .hamburger-icon {
    width: 16px;
  }
}

/* ===== DESKTOP ===== */
@media (min-width: 769px) {
  .header-content {
    padding: 16px 24px;
  }

  .logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 22px;
  }

  .brand-text h1 {
    font-size: 20px;
  }

  .brand-text span {
    font-size: 12px;
  }

  /* Sempre mostrar sync status no desktop */
  .sync-status {
    display: flex !important;
    font-size: 11px;
    padding: 6px 12px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .theme-icon {
    font-size: 22px;
  }
}

/* ===== ANIMAÇÕES ===== */
@keyframes authSpin {
  to {
    transform: rotate(360deg);
  }
}


@media (max-width: 768px) {
  .sidebar-content {
    max-width: 85%;
  }
  
  .busca-header {
    gap: 12px;
  }
  
  .btn-limpar-busca {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }
  
  .btn-limpar-busca .btn-text {
    display: inline;
  }
}

@media (max-width: 480px) {
  .sidebar-content {
    max-width: 90%;
  }
  
  .sidebar-header {
    padding: 20px 16px;
  }
  
  .sidebar-menu {
    padding: 12px;
  }
  
  .sidebar-item {
    padding: 14px;
  }
  
  .sidebar-icon {
    font-size: 24px;
  }
  
  .sidebar-label {
    font-size: 14px;
  }
  
  .sidebar-description {
    font-size: 11px;
  }
  
  .btn-limpar-busca .btn-text {
    display: none;
  }
}

/* ===== ANIMAÇÕES ===== */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===================================================================
   FIM DAS ADIÇÕES
   ================================================================= */


   /* ===================================================================
   MODAL DE NOVA VERSÃO DISPONÍVEL
   Adicione este código NO FINAL do seu style.css
   =================================================================== */

/* ===== MODAL DE ATUALIZAÇÃO ===== */
.modal-atualizacao {
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid var(--border-soft);
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: modalAtualizacaoEntrada 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

@keyframes modalAtualizacaoEntrada {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(40px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Header da Modal */
.modal-atualizacao-header {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  padding: 40px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.modal-atualizacao-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 60%);
  animation: rotateGlow 10s linear infinite;
}

@keyframes rotateGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.atualizacao-icon-container {
  position: relative;
  z-index: 1;
}

.atualizacao-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  animation: iconFloat 3s ease-in-out infinite;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.atualizacao-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

/* Body da Modal */
.modal-atualizacao-body {
  padding: 32px 28px;
  text-align: center;
}

.modal-atualizacao-body h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  background: linear-gradient(135deg, var(--accent), #ff9800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.atualizacao-descricao {
  margin: 0 0 24px 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.atualizacao-descricao strong {
  color: var(--accent);
}

.atualizacao-info {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.08), rgba(245, 124, 0, 0.03));
  border: 1px solid rgba(245, 124, 0, 0.15);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.atualizacao-info .info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(245, 124, 0, 0.1);
}

.atualizacao-info .info-item:last-child {
  border-bottom: none;
}

.atualizacao-info .info-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.atualizacao-info .info-text {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
  text-align: left;
}

.atualizacao-aviso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  padding: 12px;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 8px;
  border-left: 3px solid #22c55e;
}

.atualizacao-aviso span {
  font-size: 16px;
}

/* Footer da Modal */
.modal-atualizacao-footer {
  padding: 20px 28px 28px;
  display: flex;
  gap: 12px;
}

.btn-atualizar-depois,
.btn-atualizar-agora {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: none;
  margin: 0;
}

.btn-atualizar-depois {
  background: var(--bg-soft);
  color: var(--text-main);
  border: 2px solid var(--border-soft);
}

.btn-atualizar-depois:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.btn-atualizar-agora {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  color: white;
  box-shadow: 0 4px 16px rgba(245, 124, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-atualizar-agora::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmerBtn 2s infinite;
}

@keyframes shimmerBtn {
  0% { left: -100%; }
  100% { left: 100%; }
}

.btn-atualizar-agora:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 124, 0, 0.5);
}

.btn-atualizar-agora:active,
.btn-atualizar-depois:active {
  transform: translateY(0);
}

/* Responsivo */
@media (max-width: 480px) {
  .modal-atualizacao {
    margin: 0 16px;
    border-radius: 20px;
  }
  
  .modal-atualizacao-header {
    padding: 32px 20px;
  }
  
  .atualizacao-icon {
    width: 70px;
    height: 70px;
    font-size: 36px;
  }
  
  .atualizacao-pulse {
    width: 70px;
    height: 70px;
  }
  
  .modal-atualizacao-body {
    padding: 24px 20px;
  }
  
  .modal-atualizacao-body h3 {
    font-size: 20px;
  }
  
  .atualizacao-descricao {
    font-size: 14px;
  }
  
  .modal-atualizacao-footer {
    flex-direction: column;
    padding: 16px 20px 24px;
  }
  
  .btn-atualizar-agora {
    order: -1;
  }
}

/* ===================================================================
   FIM DOS ESTILOS DA MODAL DE ATUALIZAÇÃO
   =================================================================== */

   /* ===================================================================
   SISTEMA DE AUTENTICAÇÃO - TELA DE LOGIN
   =================================================================== */

/* Overlay que cobre toda a tela */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-main);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.auth-overlay.hidden {
  display: none;
}

/* Container principal */
.auth-container {
  width: 100%;
  max-width: 420px;
  animation: authFadeIn 0.5s ease;
}

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

/* Header com logo */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 8px 32px rgba(245, 124, 0, 0.4);
}

.auth-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
}

.auth-header p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Formulário */
.auth-form {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-form h2 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

.auth-description {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: -16px 0 24px;
  line-height: 1.5;
}

/* Botão Google */
.btn-google {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
  margin-bottom: 0;
}

.btn-google:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-google svg {
  flex-shrink: 0;
}

/* Divisor "ou" */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  gap: 16px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.auth-divider span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Grupos de input */
.auth-input-group {
  margin-bottom: 20px;
}

.auth-input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.auth-input-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--text-main);
  font-size: 15px;
  transition: all 0.3s ease;
  margin: 0;
}

.auth-input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 124, 0, 0.1);
}

.auth-input-group input::placeholder {
  color: var(--text-muted);
}

/* Botão principal */
.btn-auth-primary {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(245, 124, 0, 0.4);
  margin-top: 8px;
}

.btn-auth-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 124, 0, 0.5);
}

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

.btn-auth-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Links de alternância */
.auth-switch {
  text-align: center;
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-switch a:hover {
  color: #ff9800;
  text-decoration: underline;
}

.auth-forgot {
  text-align: center;
  margin: 16px 0 0;
  font-size: 13px;
}

.auth-forgot a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.auth-forgot a:hover {
  color: var(--accent);
}

/* Loading */
.auth-loading {
  text-align: center;
  padding: 60px 20px;
}

.auth-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: authSpin 1s linear infinite;
}

@keyframes authSpin {
  to {
    transform: rotate(360deg);
  }
}

.auth-loading p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

/* Mensagens de feedback inline */
.auth-feedback {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  animation: authFeedbackIn 0.3s ease;
}

.auth-feedback.show {
  display: flex;
}

@keyframes authFeedbackIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-feedback.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.auth-feedback.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.auth-feedback.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.auth-feedback.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.auth-feedback-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.auth-feedback-text {
  flex: 1;
  line-height: 1.4;
}

/* ===== HEADER COM INFO DO USUÁRIO ===== */

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

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.user-avatar:hover {
  transform: scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.4);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Menu do usuário */
.user-menu {
  position: relative;
  flex-shrink: 0;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.user-menu.active .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 8px;
}


.user-dropdown-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-email {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  word-break: break-all;
}

.user-dropdown-item {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  margin: 0;
  text-align: left;
}

.user-dropdown-item:hover {
  background: var(--bg-soft);
}

.user-dropdown-item.logout {
  color: #ef4444;
}

.user-dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Status de sincronização */
.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.sync-status.syncing {
  background: rgba(245, 124, 0, 0.1);
  color: var(--accent);
}

.sync-status.synced {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.sync-status.offline {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.sync-status .sync-icon {
  font-size: 12px;
}

.sync-status.syncing .sync-icon {
  animation: authSpin 1s linear infinite;
}

/* Responsivo */
@media (max-width: 480px) {
  .auth-container {
    max-width: 100%;
  }
  
  .auth-form {
    padding: 24px 20px;
    border-radius: 16px;
  }
  
  .auth-logo {
    width: 64px;
    height: 64px;
    font-size: 32px;
  }
  
  .auth-header h1 {
    font-size: 28px;
  }
  
  .btn-google,
  .btn-auth-primary {
    padding: 14px 20px;
  }
  
  .user-dropdown {
    right: -10px;
    min-width: 180px;
  }
}

/* ===================================================================
   FIM DO SISTEMA DE AUTENTICAÇÃO
   =================================================================== */

   /* ===================================================================
   CORREÇÕES - MEUS PLANOS
   =================================================================== */

/* ===================================================================
   MEUS PLANOS - SISTEMA DE PLANEJAMENTO FINANCEIRO
   =================================================================== */

/* ===== CONTAINER PRINCIPAL ===== */
.planos-container {
  max-width: 100%;
}

/* ===== HEADER ===== */
.planos-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 20px;
  flex-wrap: wrap;
}

.planos-title-area h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
}

.planos-icon {
  font-size: 32px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.planos-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.btn-novo-plano {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(245, 124, 0, 0.4);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-novo-plano:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 124, 0, 0.5);
}

.btn-novo-plano span:first-child {
  font-size: 18px;
}

/* ===== RESUMO GERAL ===== */
.planos-resumo-geral {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.resumo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.resumo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.5);
}

.resumo-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.2), rgba(245, 124, 0, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.resumo-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.resumo-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resumo-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.resumo-value.success {
  color: #22c55e;
}

/* ===== BALANÇO MENSAL ===== */
.balanco-mensal {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.08), rgba(245, 124, 0, 0.03));
  border: 2px solid rgba(245, 124, 0, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}

.balanco-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.balanco-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.balanco-select {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.balanco-content {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.balanco-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
}

.balanco-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
}

.balanco-valor {
  font-size: 20px;
  font-weight: 700;
}

.balanco-item.receitas .balanco-valor {
  color: #22c55e;
}

.balanco-item.despesas .balanco-valor {
  color: #dc2626;
}

.balanco-item.saldo .balanco-valor.destaque {
  color: var(--accent);
  font-size: 24px;
}

.balanco-separador {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-muted);
}

.balanco-insight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(96, 165, 250, 0.1);
  border-left: 3px solid #60a5fa;
  border-radius: 10px;
}

.insight-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.balanco-insight p {
  margin: 0;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
}

/* ===== GRID DE PLANOS ===== */
.planos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* Card de Plano */
.plano-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  position: relative;
  overflow: hidden;
}

.plano-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.plano-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,.5);
  border-color: rgba(245, 124, 0, 0.3);
}

.plano-card:hover::before {
  opacity: 1;
}

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

.plano-tipo-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(245, 124, 0, 0.1);
  color: var(--accent);
  border: 1px solid rgba(245, 124, 0, 0.3);
}

.plano-tipo-badge span:first-child {
  font-size: 14px;
}

.plano-card-nome {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 20px 0;
}

.plano-valores {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.plano-valor-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plano-valor-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.plano-valor-numero {
  font-size: 16px;
  font-weight: 700;
}

.plano-valor-item.atual .plano-valor-numero {
  color: #22c55e;
}

.plano-valor-item.meta .plano-valor-numero {
  color: var(--accent);
}

.plano-progresso-barra {
  width: 100%;
  height: 10px;
  background: var(--bg-soft);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.plano-progresso-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.plano-progresso-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

.plano-info-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.plano-progresso-texto {
  font-weight: 700;
  color: var(--accent);
}

.plano-prazo {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Plano Concluído */
.plano-card.concluido {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  border-color: rgba(34, 197, 94, 0.3);
}

.plano-card.concluido::before {
  background: #22c55e;
  opacity: 1;
}

.plano-card.concluido .plano-tipo-badge {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.5);
}

/* ===== ESTADO VAZIO ===== */
.planos-vazio {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  border: 2px dashed var(--border-soft);
  margin-bottom: 32px;
}

.vazio-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.planos-vazio h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

.planos-vazio p {
  margin: 0 0 32px 0;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.vazio-exemplos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.exemplo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-soft);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.exemplo-item span:first-child {
  font-size: 20px;
}

.btn-criar-primeiro {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(245, 124, 0, 0.4);
  margin: 0;
}

.btn-criar-primeiro:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(245, 124, 0, 0.5);
}

/* ===== MODAL DE PLANO ===== */
.modal-plano {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.plano-tipos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.tipo-plano-btn {
  padding: 16px 12px;
  border-radius: 12px;
  border: 2px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  margin: 0;
}

.tipo-plano-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tipo-plano-btn.ativo {
  background: linear-gradient(135deg, var(--accent), #ff9800);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 16px rgba(245, 124, 0, 0.4);
}

.tipo-icon {
  font-size: 24px;
}

.plano-sugestao {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(96, 165, 250, 0.05));
  border-left: 3px solid #60a5fa;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sugestao-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.sugestao-content {
  flex: 1;
}

.sugestao-titulo {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.sugestao-valor {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #60a5fa;
}

.sugestao-texto {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== MODAL DE DETALHES ===== */
.modal-detalhes-plano {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  max-width: 650px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.detalhes-progresso {
  background: linear-gradient(135deg, rgba(245, 124, 0, 0.1), rgba(245, 124, 0, 0.05));
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

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

.progresso-atual,
.progresso-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progresso-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.progresso-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

.progresso-value.success {
  color: #22c55e;
}

.progresso-barra-grande {
  width: 100%;
  height: 24px;
  background: var(--bg-soft);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.progresso-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.progresso-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

.progresso-percentual {
  font-size: 14px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  z-index: 1;
}

.progresso-falta {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.falta-valor {
  font-weight: 700;
  color: var(--accent);
  margin-left: 4px;
}

.detalhes-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.info-card {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.info-card > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.info-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.info-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.detalhes-notas {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.detalhes-notas h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.detalhes-notas p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.detalhes-contribuir {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.detalhes-contribuir h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.contribuir-form {
  display: flex important;
  gap: 12px important;
  align-items: stretch important;
}

.contribuir-input {
  flex: 1 important;
  min-width: 0 important; 
  padding: 12px 16px important;
  border-radius: 10px important;
  border: 1px solid var(--border-soft) important;
  background: var(--bg-card) important;
  color: var(--text-main) important;
  font-size: 15px important;
  margin: 0 important;
}

.btn-contribuir {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  padding: 12px 24px important;
  border-radius: 10px important;
  color: white;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex important;
  align-items: center important;
  gap: 8px important;
  transition: all 0.3s ease important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  margin: 0;
  white-space: nowrap important;
  flex-shrink: 0 important; /* IMPORTANTE: impede que o botão encolha */
  min-width: fit-content important; /* IMPORTANTE: garante que o botão mantenha seu tamanho ideal */
}

.btn-contribuir:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.balanco-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 10px;
}

.balanco-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.balanco-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}

.balanco-valor {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.balanco-item.receitas .balanco-valor {
  color: #22c55e;
}

.balanco-item.despesas .balanco-valor {
  color: #dc2626;
}

.balanco-item.saldo .balanco-valor.destaque {
  color: var(--accent);
  font-size: 20px;
}

.balanco-separador {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
}

.detalhes-acoes {
  display: flex;
  gap: 12px;
}

.btn-acao-plano {
  flex: 1;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: 2px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-main);
  margin: 0;
}

.btn-acao-plano:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-acao-plano.editar:hover {
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
}

.btn-acao-plano.excluir:hover {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.btn-acao-plano.concluir {
  border-color: #22c55e;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-acao-plano.concluir:hover {
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
  /* Header */
  .planos-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-novo-plano {
    width: 100%;
    justify-content: center;
  }
  
  /* Resumo Geral */
  .planos-resumo-geral {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* BALANÇO MENSAL - MANTÉM HORIZONTAL NO MOBILE */
  .balanco-mensal {
    padding: 20px 16px;
  }
  
  .balanco-content {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 8px;
    padding: 0;
  }
  
  .balanco-item {
    gap: 6px;
  }
  
  .balanco-label {
    font-size: 9px;
    line-height: 1.1;
  }
  
  .balanco-valor {
    font-size: 15px;
  }
  
  .balanco-item.saldo .balanco-valor.destaque {
    font-size: 17px;
  }
  
  .balanco-separador {
    font-size: 20px;
    min-width: 16px;
  }
  
  .balanco-insight {
    padding: 14px;
  }
  
  .balanco-insight p {
    font-size: 13px;
  }
  
  /* Grid de Planos */
  .planos-grid {
    grid-template-columns: 1fr;
  }
  
  /* Modal de Plano */
  .plano-tipos {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Modal de Detalhes */
  .detalhes-info-grid {
    grid-template-columns: 1fr;
  }
  
  /* Formulário de Contribuição - MOBILE */
  .contribuir-form {
    flex-direction: row;
    gap: 10px;
  }
  
  .contribuir-input {
    flex: 1;
    min-width: 0;
    font-size: 14px;
  }
  
  .btn-contribuir {
    padding: 12px 16px;
    flex-shrink: 0;
  }
  
  .btn-contribuir span:last-child {
    display: none; /* Esconder texto "Adicionar" no mobile */
  }
  
  .btn-contribuir span:first-child {
    font-size: 20px; /* Aumentar o ícone + */
  }
  
  /* Ações do Plano */
  .detalhes-acoes {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  /* Resumo Geral - 1 coluna em telas muito pequenas */
  .planos-resumo-geral {
    grid-template-columns: 1fr;
  }
  
  /* Balanço ainda mais compacto */
  .balanco-content {
    gap: 6px;
  }
  
  .balanco-label {
    font-size: 8px;
  }
  
  .balanco-valor {
    font-size: 13px;
  }
  
  .balanco-item.saldo .balanco-valor.destaque {
    font-size: 15px;
  }
  
  .balanco-separador {
    font-size: 18px;
    min-width: 14px;
  }
  
  /* Tipos de Plano - 2 colunas em telas muito pequenas */
  .plano-tipos {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Contribuição */
  .contribuir-input {
    font-size: 13px;
    padding: 10px 12px;
  }
  
  .btn-contribuir {
    padding: 10px 14px important;
  }
}

/* ===== TAMANHOS INTERMEDIÁRIOS (600px - 768px) ===== */
@media (min-width: 600px) and (max-width: 768px) {
  .balanco-content {
    gap: 12px;
  }
  
  .balanco-label {
    font-size: 10px;
  }
  
  .balanco-valor {
    font-size: 16px;
  }
  
  .balanco-item.saldo .balanco-valor.destaque {
    font-size: 18px;
  }
}

/* ===================================================================
   FIM DOS ESTILOS DE MEUS PLANOS
   =================================================================== */