/* ============================================
   FINANMU - Sistema de Design
   ============================================ */

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

:root {
  /* Cores da marca */
  --finanmu-50:  #E1F5EE;
  --finanmu-100: #9FE1CB;
  --finanmu-200: #5DCAA5;
  --finanmu-400: #1D9E75;
  --finanmu-600: #0F6E56;
  --finanmu-800: #085041;
  --finanmu-900: #04342C;
  
  /* Neutros */
  --neutral-50:  #FAFAF7;
  --neutral-100: #F1EFE8;
  --neutral-200: #D3D1C7;
  --neutral-300: #B4B2A9;
  --neutral-400: #888780;
  --neutral-500: #5F5E5A;
  --neutral-600: #444441;
  --neutral-700: #2C2C2A;
  --neutral-900: #161614;
  
  /* Cores semânticas */
  --success-bg:   #E1F5EE;
  --success-fg:   #0F6E56;
  --warning-bg:   #FAEEDA;
  --warning-fg:   #854F0B;
  --danger-bg:    #FCEBEB;
  --danger-fg:    #A32D2D;
  --info-bg:      #E6F1FB;
  --info-fg:      #0C447C;
  
  /* Tipografia */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  
  /* Espaçamento (escala 4px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;
  
  /* Sombras suaves */
  --shadow-sm: 0 1px 2px rgba(15, 110, 86, 0.04), 0 1px 1px rgba(15, 110, 86, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 110, 86, 0.06), 0 2px 4px rgba(15, 110, 86, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 110, 86, 0.08), 0 4px 8px rgba(15, 110, 86, 0.04);
  --shadow-xl: 0 24px 48px rgba(15, 110, 86, 0.12), 0 8px 16px rgba(15, 110, 86, 0.06);
  
  /* Transições */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 68px;
}

/* ============================================
   RESET E BASE
   ============================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--neutral-700);
  background: var(--neutral-50);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }

a {
  color: var(--finanmu-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--finanmu-800); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================
   LANDING / LOGIN
   ============================================ */

.landing {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--neutral-50);
}

.landing-hero {
  background: linear-gradient(135deg, var(--finanmu-800) 0%, var(--finanmu-600) 100%);
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93,202,165,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.landing-hero::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -50px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159,225,203,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: white;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.landing-logo-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
}

.landing-logo-bars span {
  width: 4px;
  border-radius: 2px;
  background: white;
}

.landing-logo-bars span:nth-child(1) { height: 30%; }
.landing-logo-bars span:nth-child(2) { height: 60%; }
.landing-logo-bars span:nth-child(3) { height: 45%; background: var(--finanmu-200); }
.landing-logo-bars span:nth-child(4) { height: 85%; background: var(--finanmu-200); }
.landing-logo-bars span:nth-child(5) { height: 100%; background: var(--finanmu-100); }

.landing-logo strong {
  font-weight: 600;
}

.landing-logo em {
  font-style: normal;
  font-weight: 300;
  color: var(--finanmu-100);
}

.landing-content {
  position: relative;
  z-index: 2;
  color: white;
}

.landing-content h1 {
  font-size: 44px;
  font-weight: 600;
  color: white;
  line-height: 1.15;
  margin-bottom: 20px;
  max-width: 480px;
}

.landing-content h1 em {
  font-style: normal;
  color: var(--finanmu-100);
}

.landing-content p {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  max-width: 460px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.landing-features {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.landing-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.95);
  font-size: 14px;
}

.landing-feature-icon {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--finanmu-100);
  flex-shrink: 0;
}

.landing-footer-text {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

/* Lado direito - Form */
.landing-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.landing-form {
  width: 100%;
  max-width: 380px;
}

.landing-form h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.landing-form-sub {
  color: var(--neutral-500);
  margin-bottom: 36px;
  font-size: 15px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: 15px;
  background: white;
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--finanmu-400);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 15px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--finanmu-600);
  color: white;
}

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

.btn-secondary {
  background: white;
  color: var(--finanmu-600);
  border: 1.5px solid var(--neutral-200);
}

.btn-secondary:hover {
  border-color: var(--finanmu-400);
  color: var(--finanmu-800);
}

.btn-ghost {
  background: transparent;
  color: var(--neutral-600);
}

.btn-ghost:hover {
  background: var(--neutral-100);
  color: var(--neutral-900);
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.form-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  color: var(--neutral-400);
  font-size: 12px;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--neutral-200);
}

.form-link {
  color: var(--finanmu-600);
  font-size: 14px;
  font-weight: 500;
}

/* ============================================
   APP LAYOUT
   ============================================ */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 100vh;
}

.sidebar {
  background: white;
  border-right: 1px solid var(--neutral-200);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--neutral-100);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--finanmu-800);
}

.sidebar-logo-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 26px;
}

.sidebar-logo-bars span {
  width: 3px;
  border-radius: 1.5px;
  background: var(--finanmu-600);
}

.sidebar-logo-bars span:nth-child(1) { height: 30%; }
.sidebar-logo-bars span:nth-child(2) { height: 60%; }
.sidebar-logo-bars span:nth-child(3) { height: 45%; background: var(--finanmu-400); }
.sidebar-logo-bars span:nth-child(4) { height: 85%; background: var(--finanmu-400); }
.sidebar-logo-bars span:nth-child(5) { height: 100%; background: var(--finanmu-200); }

.sidebar-logo strong { font-weight: 600; }
.sidebar-logo em { font-style: normal; font-weight: 300; color: var(--finanmu-400); }

.school-selector {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.school-selector:hover {
  border-color: var(--finanmu-400);
  background: white;
}

.school-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--finanmu-400), var(--finanmu-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.school-info {
  flex: 1;
  overflow: hidden;
}

.school-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.school-meta {
  font-size: 11px;
  color: var(--neutral-500);
}

.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neutral-400);
  padding: 6px 12px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--neutral-600);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--neutral-100);
  color: var(--neutral-900);
}

.nav-item.active {
  background: var(--finanmu-50);
  color: var(--finanmu-800);
}

.nav-item.active .nav-icon {
  color: var(--finanmu-600);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--neutral-400);
}

.nav-item.active .nav-icon { color: var(--finanmu-600); }

.nav-badge {
  margin-left: auto;
  background: var(--finanmu-100);
  color: var(--finanmu-800);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--neutral-100);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.user-card:hover { background: var(--neutral-100); }

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--finanmu-400), var(--finanmu-800));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.user-info { flex: 1; overflow: hidden; }
.user-name { font-size: 13px; font-weight: 500; color: var(--neutral-900); }
.user-role { font-size: 11px; color: var(--neutral-500); }

/* ============================================
   MAIN CONTENT
   ============================================ */

.main {
  overflow-y: auto;
  background: var(--neutral-50);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-200);
  padding: 0 32px;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.topbar-title h1 {
  font-size: 20px;
  font-weight: 600;
}

.topbar-subtitle {
  font-size: 13px;
  color: var(--neutral-500);
  padding-left: 14px;
  border-left: 1px solid var(--neutral-300);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-search {
  position: relative;
  width: 280px;
}

.topbar-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--neutral-100);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 13px;
  transition: all var(--transition-fast);
}

.topbar-search input:focus {
  outline: none;
  border-color: var(--finanmu-400);
  background: white;
}

.topbar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
  width: 14px;
  height: 14px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-600);
  transition: all var(--transition-fast);
  position: relative;
}

.icon-btn:hover {
  background: var(--neutral-100);
  color: var(--neutral-900);
}

.icon-btn.has-dot::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--finanmu-400);
  border: 2px solid var(--neutral-50);
}

.page {
  padding: 32px 40px 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  margin-bottom: 4px;
}

.page-header p {
  color: var(--neutral-500);
  font-size: 15px;
}

.page-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-fast);
}

.card-hover:hover {
  border-color: var(--neutral-300);
  box-shadow: var(--shadow-md);
}

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

.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-900);
}

.card-subtitle {
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 2px;
}

/* ============================================
   STAT CARDS
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.stat:hover {
  border-color: var(--finanmu-200);
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--neutral-900);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.stat-value.is-positive { color: var(--finanmu-600); }
.stat-value.is-negative { color: var(--danger-fg); }

.stat-trend {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--neutral-500);
}

.stat-trend.up { color: var(--finanmu-600); }
.stat-trend.down { color: var(--danger-fg); }

.stat-icon-bg {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--finanmu-50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--finanmu-600);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-equal-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

@media (max-width: 1100px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ============================================
   TABLES
   ============================================ */

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}

.table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--neutral-700);
  border-bottom: 1px solid var(--neutral-100);
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--neutral-50); }

.table-wrap {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ============================================
   BADGES E PILLS
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.badge-success { background: var(--success-bg); color: var(--success-fg); }
.badge-warning { background: var(--warning-bg); color: var(--warning-fg); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger-fg); }
.badge-info    { background: var(--info-bg);    color: var(--info-fg); }
.badge-neutral { background: var(--neutral-100); color: var(--neutral-700); }
.badge-brand   { background: var(--finanmu-50); color: var(--finanmu-800); }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================
   CHARTS - barras simples
   ============================================ */

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 14px 0 30px;
  position: relative;
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.chart-bar-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
  width: 100%;
  justify-content: center;
}

.chart-bar {
  width: 14px;
  border-radius: 4px 4px 0 0;
  transition: opacity var(--transition-fast);
  cursor: pointer;
}

.chart-bar:hover { opacity: 0.8; }

.chart-bar.income { background: var(--finanmu-400); }
.chart-bar.expense { background: var(--finanmu-100); }

.chart-bar-label {
  position: absolute;
  bottom: -22px;
  font-size: 11px;
  color: var(--neutral-500);
  font-weight: 500;
}

.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--neutral-600);
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* ============================================
   LINE CHART (fluxo de caixa)
   ============================================ */

.line-chart-wrap {
  padding: 14px 0 50px;
}

.line-chart {
  display: flex;
  height: 200px;
  position: relative;
}

.line-chart-col {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.line-chart-point {
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--finanmu-600);
  border: 2px solid white;
  transform: translate(-50%, 50%);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.line-chart-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.line-chart-label {
  position: absolute;
  bottom: -32px;
  font-size: 10px;
  color: var(--neutral-500);
  font-weight: 500;
  white-space: nowrap;
}

.line-chart-value {
  position: absolute;
  bottom: -50px;
  font-size: 10px;
  color: var(--neutral-700);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Botões em estado "tab" ativo */
.btn-active-tab {
  background: var(--finanmu-50) !important;
  color: var(--finanmu-800) !important;
  border-color: var(--finanmu-200) !important;
}

/* ============================================
   PROGRESS BARS
   ============================================ */

.progress {
  width: 100%;
  height: 8px;
  background: var(--neutral-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--finanmu-400);
  border-radius: var(--radius-full);
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar.warning { background: var(--warning-fg); }
.progress-bar.danger  { background: var(--danger-fg); }

/* ============================================
   ALERTS
   ============================================ */

.alert {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.alert-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-body { flex: 1; }
.alert-title { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.alert-text { font-size: 13px; line-height: 1.5; }

.alert-info { background: var(--info-bg); color: var(--info-fg); }
.alert-info .alert-icon { background: rgba(12, 68, 124, 0.1); color: var(--info-fg); }

.alert-warning { background: var(--warning-bg); color: var(--warning-fg); }
.alert-warning .alert-icon { background: rgba(133, 79, 11, 0.12); color: var(--warning-fg); }

.alert-success { background: var(--success-bg); color: var(--success-fg); }
.alert-success .alert-icon { background: rgba(15, 110, 86, 0.12); color: var(--success-fg); }

/* ============================================
   TABS
   ============================================ */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--neutral-200);
  margin-bottom: 24px;
}

.tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  margin-bottom: -1px;
}

.tab:hover { color: var(--neutral-900); }

.tab.active {
  color: var(--finanmu-800);
  border-bottom-color: var(--finanmu-600);
}

/* ============================================
   ESTRATÉGICO - Mapa de sonhos
   ============================================ */

.timeline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.timeline-card {
  background: white;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  transition: all var(--transition-fast);
}

.timeline-card:hover {
  border-color: var(--finanmu-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.timeline-card.is-now    { border-color: var(--finanmu-200); background: linear-gradient(180deg, var(--finanmu-50), white); }
.timeline-card.is-mid    { background: linear-gradient(180deg, var(--neutral-50), white); }
.timeline-card.is-future { border-style: dashed; }

.timeline-period {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--finanmu-600);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 12px;
  line-height: 1.25;
}

.timeline-text {
  font-size: 13px;
  color: var(--neutral-600);
  line-height: 1.5;
  margin-bottom: 16px;
}

.timeline-goals {
  list-style: none;
  padding: 0;
}

.timeline-goals li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--neutral-700);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-goals li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--finanmu-400);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; }
}

/* ============================================
   DRE TABLE
   ============================================ */

.dre {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.dre td {
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-100);
  font-size: 14px;
}

.dre td.label {
  color: var(--neutral-700);
}

.dre td.value {
  text-align: right;
  color: var(--neutral-900);
  font-weight: 500;
}

.dre tr.section td {
  font-weight: 600;
  color: var(--neutral-900);
  padding-top: 16px;
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--neutral-300);
}

.dre tr.indent td.label {
  padding-left: 18px;
  color: var(--neutral-600);
}

.dre tr.total td {
  font-weight: 600;
  color: var(--finanmu-800);
  background: var(--finanmu-50);
  padding-left: 12px;
  padding-right: 12px;
  border-bottom: none;
}

.dre tr.total td:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.dre tr.total td:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.dre tr.subtotal td {
  font-weight: 600;
  color: var(--neutral-900);
  border-top: 1px solid var(--neutral-300);
}

.dre .negative { color: var(--danger-fg); }
.dre .positive { color: var(--finanmu-600); }

/* ============================================
   PRECIFICAÇÃO
   ============================================ */

.price-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition-fast);
}

.price-card:hover {
  border-color: var(--finanmu-400);
  box-shadow: var(--shadow-md);
}

.price-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.price-rows {
  display: grid;
  gap: 8px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}

.price-row.muted { color: var(--neutral-500); }
.price-row.divider {
  border-top: 1px dashed var(--neutral-200);
  padding-top: 10px;
  margin-top: 4px;
}

.price-row.final {
  font-weight: 600;
  font-size: 16px;
  color: var(--neutral-900);
  font-family: var(--font-display);
  padding-top: 12px;
  border-top: 1.5px solid var(--neutral-200);
  margin-top: 6px;
}

.price-margin-bar {
  background: var(--neutral-100);
  border-radius: var(--radius-full);
  height: 32px;
  overflow: hidden;
  position: relative;
  display: flex;
  margin-top: 4px;
}

.price-margin-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 500;
  color: white;
  letter-spacing: 0.02em;
}

.price-margin-segment.cost     { background: var(--finanmu-800); }
.price-margin-segment.overhead { background: var(--finanmu-600); }
.price-margin-segment.profit   { background: var(--finanmu-400); }

/* ============================================
   PRO-LABORE / FAMILIA
   ============================================ */

.pl-card {
  background: linear-gradient(135deg, var(--finanmu-800), var(--finanmu-600));
  color: white;
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.pl-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93,202,165,0.2) 0%, transparent 70%);
}

.pl-card-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
  position: relative;
}

.pl-card-value {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
  position: relative;
}

.pl-card-detail {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  position: relative;
}

.pl-detail-item-label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}

.pl-detail-item-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

/* ============================================
   CATEGORIA - listagem família
   ============================================ */

.category-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all var(--transition-fast);
}

.category-row:hover {
  border-color: var(--neutral-300);
  background: var(--neutral-50);
}

.category-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--finanmu-50);
  color: var(--finanmu-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.category-info { flex: 1; }
.category-name { font-size: 14px; font-weight: 500; color: var(--neutral-900); }
.category-budget { font-size: 12px; color: var(--neutral-500); }

.category-amounts { text-align: right; }
.category-spent { font-size: 14px; font-weight: 500; color: var(--neutral-900); font-variant-numeric: tabular-nums; }
.category-pct { font-size: 11px; color: var(--neutral-500); }

.category-progress {
  width: 80px;
  height: 6px;
  background: var(--neutral-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
  margin-left: auto;
}

.category-progress > div {
  height: 100%;
  background: var(--finanmu-400);
}

.category-progress.warning > div { background: var(--warning-fg); }
.category-progress.danger > div { background: var(--danger-fg); }

/* ============================================
   ALERTAS CRUZADOS PJ-PF
   ============================================ */

.cross-alert {
  background: white;
  border: 1px solid var(--neutral-200);
  border-left: 3px solid var(--warning-fg);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 10px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.cross-alert.danger { border-left-color: var(--danger-fg); }
.cross-alert.success { border-left-color: var(--finanmu-400); }
.cross-alert.info { border-left-color: var(--info-fg); }

.cross-alert-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--warning-bg);
  color: var(--warning-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cross-alert.danger .cross-alert-icon { background: var(--danger-bg); color: var(--danger-fg); }
.cross-alert.success .cross-alert-icon { background: var(--success-bg); color: var(--success-fg); }
.cross-alert.info .cross-alert-icon { background: var(--info-bg); color: var(--info-fg); }

.cross-alert-body { flex: 1; }
.cross-alert-title { font-size: 14px; font-weight: 500; color: var(--neutral-900); margin-bottom: 3px; }
.cross-alert-desc { font-size: 13px; color: var(--neutral-600); line-height: 1.5; }
.cross-alert-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ============================================
   UTILITÁRIOS
   ============================================ */

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.text-muted { color: var(--neutral-500); }
.text-small { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-display { font-family: var(--font-display); }
.text-mono { font-variant-numeric: tabular-nums; }
.text-bold { font-weight: 600; }
.hidden { display: none !important; }

/* Animação entrada de páginas */
.fade-in { animation: fadeIn 300ms ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar custom */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--neutral-200); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--neutral-300); }

/* ============================================
   DARK MODE
   ============================================ */

html.dark-mode {
  --neutral-50:  #1A1A18;
  --neutral-100: #242422;
  --neutral-200: #34342F;
  --neutral-300: #4A4945;
  --neutral-400: #6A6964;
  --neutral-500: #8E8C86;
  --neutral-600: #B0AEA6;
  --neutral-700: #D3D1C7;
  --neutral-900: #F1EFE8;
  
  --finanmu-50:  #0A2A22;
  --finanmu-100: #0F3B30;
  --finanmu-200: #1B4F40;
  
  --success-bg:   #0F3B30;
  --warning-bg:   #3D2A0D;
  --danger-bg:    #3D1818;
  --info-bg:      #15213D;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5);
}

html.dark-mode body {
  background: var(--neutral-50);
  color: var(--neutral-700);
}

html.dark-mode .sidebar,
html.dark-mode .card,
html.dark-mode .stat,
html.dark-mode .timeline-card,
html.dark-mode .price-card,
html.dark-mode .table-wrap,
html.dark-mode .category-row,
html.dark-mode .cross-alert {
  background: var(--neutral-100);
  border-color: var(--neutral-200);
}

html.dark-mode .topbar {
  background: rgba(26, 26, 24, 0.85);
  border-color: var(--neutral-200);
}

html.dark-mode .table th {
  background: var(--neutral-100);
}

html.dark-mode .table tr:hover td { background: var(--neutral-100); }

html.dark-mode .form-input,
html.dark-mode .topbar-search input {
  background: var(--neutral-100);
  border-color: var(--neutral-200);
  color: var(--neutral-700);
}

html.dark-mode .school-selector,
html.dark-mode .progress {
  background: var(--neutral-200);
}

html.dark-mode .btn-secondary {
  background: var(--neutral-100);
  border-color: var(--neutral-200);
  color: var(--finanmu-200);
}

html.dark-mode .btn-secondary:hover {
  border-color: var(--finanmu-400);
}

html.dark-mode .nav-item:hover {
  background: var(--neutral-200);
}

html.dark-mode .nav-item.active {
  background: var(--finanmu-50);
  color: var(--finanmu-100);
}

html.dark-mode .price-margin-bar,
html.dark-mode .category-progress {
  background: var(--neutral-200);
}

/* ============================================
   RESPONSIVIDADE - MOBILE
   ============================================ */

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; }
  .page { padding: 24px 24px 40px; }
  .landing-content h1 { font-size: 36px; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0; }
  
  .landing {
    grid-template-columns: 1fr;
  }
  
  .landing-hero {
    padding: 32px 24px;
    min-height: auto;
  }
  
  .landing-form-wrap {
    padding: 32px 24px;
  }
  
  .landing-content h1 { font-size: 28px; }
  
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 100;
    transition: left 250ms ease;
  }
  
  .sidebar.show {
    left: 0;
  }
  
  .topbar {
    padding: 0 16px;
    height: 56px;
  }
  
  .topbar h1 { font-size: 16px; }
  .topbar-subtitle { display: none; }
  .topbar-search { width: 160px; }
  .topbar-search input { font-size: 12px; padding: 8px 12px 8px 30px; }
  
  .page { padding: 20px 16px 40px; }
  
  .page-header h1 { font-size: 24px; }
  .page-header p { font-size: 14px; }
  
  .stats-grid { grid-template-columns: 1fr; gap: 12px; }
  
  .stat { padding: 18px; }
  .stat-value { font-size: 24px; }
  
  .card { padding: 18px; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  
  .grid-2, .grid-3, .grid-equal-2 { grid-template-columns: 1fr; gap: 14px; }
  
  .table { font-size: 12px; }
  .table th, .table td { padding: 10px 12px; }
  
  .topbar-actions .icon-btn:nth-child(3),
  .topbar-actions .icon-btn:nth-child(4) { display: none; }
  
  .pl-card { padding: 22px; }
  .pl-card-value { font-size: 32px; }
  .pl-card-detail { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 480px) {
  .page-header-flex { flex-direction: column; align-items: flex-start; }
  .chart-bars { height: 160px; }
  .chart-bar { width: 8px; }
}

/* ============================================
   ONBOARDING
   ============================================ */

.onb-container {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--finanmu-50) 0%, var(--neutral-50) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.onb-card {
  background: white;
  border-radius: var(--radius-xl, 20px);
  padding: 48px;
  max-width: 880px;
  width: 100%;
  box-shadow: var(--shadow-xl);
}

.onb-logo {
  display: inline-block;
}

.onb-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.onb-feature {
  text-align: center;
  padding: 20px;
}

.onb-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 14px;
}

.onb-feature strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.onb-checkbox {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 150ms;
  background: white;
}

.onb-checkbox:hover {
  border-color: var(--finanmu-400);
  transform: translateY(-1px);
}

.onb-checkbox.selected {
  border-color: var(--finanmu-600);
  background: var(--finanmu-50);
}

.onb-check-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--neutral-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  background: white;
  font-weight: 700;
  transition: all 150ms;
}

.onb-checkbox.selected .onb-check-mark {
  background: var(--finanmu-600);
  border-color: var(--finanmu-600);
}

.onb-radio {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 150ms;
  background: white;
}

.onb-radio:hover {
  border-color: var(--finanmu-400);
}

.onb-radio.selected {
  border-color: var(--finanmu-600);
  background: var(--finanmu-50);
}

.onb-radio-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--neutral-300);
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  transition: all 150ms;
}

.onb-radio.selected .onb-radio-circle {
  border-color: var(--finanmu-600);
}

.onb-radio-inner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--finanmu-600);
}

.text-large {
  font-size: 17px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .onb-card { padding: 32px 24px; }
  .onb-features { grid-template-columns: 1fr; }
}

/* ============================================
   TOUR GUIADO
   ============================================ */

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
  pointer-events: none;
}

.tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 42, 36, 0.4);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}

.tour-card {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  box-shadow: var(--shadow-xl);
  pointer-events: auto;
  z-index: 1;
}

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

.tour-badge {
  background: var(--finanmu-50);
  color: var(--finanmu-800);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tour-close {
  background: none;
  border: none;
  color: var(--neutral-400);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 150ms;
}

.tour-close:hover {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.tour-titulo {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--neutral-900);
  line-height: 1.3;
}

.tour-descricao {
  font-size: 13px;
  line-height: 1.6;
  color: var(--neutral-700);
  margin: 0 0 16px;
}

.tour-progress {
  height: 4px;
  background: var(--neutral-100);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}

.tour-progress-bar {
  height: 100%;
  background: var(--finanmu-600);
  transition: width 250ms ease-out;
}

.tour-acoes {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tour-highlight {
  position: relative;
  z-index: 9998;
  box-shadow: 0 0 0 4px rgba(15, 110, 86, 0.4), 0 0 0 99999px rgba(15, 42, 36, 0.3);
  border-radius: var(--radius-lg);
  transition: box-shadow 250ms ease-out;
}

/* ============================================
   BOTÃO FLUTUANTE DE AJUDA
   ============================================ */

.ajuda-flutuante {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--finanmu-600);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9000;
  box-shadow: 0 8px 24px rgba(15, 110, 86, 0.35);
  transition: all 200ms ease-out;
}

.ajuda-flutuante:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 32px rgba(15, 110, 86, 0.45);
}

.ajuda-flutuante:active {
  transform: translateY(0) scale(0.98);
}

.ajuda-flutuante-tooltip {
  position: absolute;
  right: 70px;
  background: var(--neutral-900);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms;
}

.ajuda-flutuante:hover .ajuda-flutuante-tooltip {
  opacity: 1;
}

.ajuda-flutuante-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent var(--neutral-900);
}

@media (max-width: 768px) {
  .ajuda-flutuante {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
  .ajuda-flutuante-tooltip { display: none; }
}

/* ============================================
   TOOLTIP CONTEXTUAL
   ============================================ */

.tooltip-contextual {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 340px;
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: 0 16px 40px rgba(15, 42, 36, 0.16);
  z-index: 9001;
  transition: opacity 250ms ease-out, transform 250ms ease-out;
}

.tooltip-fechar {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  padding: 4px;
  color: var(--neutral-400);
  cursor: pointer;
  border-radius: 4px;
  transition: all 150ms;
}

.tooltip-fechar:hover {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.tooltip-icone {
  font-size: 32px;
  margin-bottom: 12px;
}

.tooltip-titulo {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--neutral-900);
  padding-right: 20px;
  line-height: 1.3;
}

.tooltip-descricao {
  font-size: 13px;
  line-height: 1.6;
  color: var(--neutral-700);
  margin: 0 0 16px;
}

.tooltip-acoes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tooltip-contextual::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 22px;
  width: 16px;
  height: 16px;
  background: white;
  border-right: 1px solid var(--neutral-200);
  border-bottom: 1px solid var(--neutral-200);
  transform: rotate(45deg);
}

@media (max-width: 768px) {
  .tooltip-contextual {
    bottom: 80px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}

/* ============================================
   MÓDULOS NA SIDEBAR (M1, M2, M3)
   ============================================ */

.modulo-section .nav-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modulo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: white;
  flex-shrink: 0;
}

.modulo-section.modulo-1 .modulo-badge {
  background: var(--finanmu-600);
}

.modulo-section.modulo-2 .modulo-badge {
  background: var(--info-fg);
}

.modulo-section.modulo-3 .modulo-badge {
  background: var(--warning-fg);
}

.modulo-section .nav-section-title {
  color: var(--neutral-700);
  font-weight: 600;
}
