/* ============================================================
   GESTÃO INTELIGENTE — Design System Premium
   Branding: magen.social.br
   Fontes: Montserrat (headings) + Inter (body)
   Paleta: Azul Magen + Verde Impacto + Terracota + Creme
   ============================================================ */

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

:root {
  /* ── Paleta Azul Magen (cor principal do logo) ── */
  --blue-950: #060f1f;
  --blue-900: #0f2040;
  --blue-800: #152d5c;
  --blue-700: #1a3a8f;
  --blue-600: #1e4bb8;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-300: #93c5fd;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  /* ── Verde Impacto (secundário) ── */
  --green-900: #052e16;
  --green-800: #14532d;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-300: #86efac;
  --green-200: #bbf7d0;
  --green-100: #dcfce7;
  --green-50:  #f0fdf4;

  /* ── Terracota / Terra (sotaque quente) ── */
  --terra-900: #431407;
  --terra-800: #7c2d12;
  --terra-700: #9a3412;
  --terra-600: #c2410c;
  --terra-500: #ea580c;
  --terra-400: #f97316;
  --terra-300: #fdba74;
  --terra-200: #fed7aa;
  --terra-100: #ffedd5;
  --terra-50:  #fff7ed;

  /* ── Dourado (sotaque cultural) ── */
  --gold-700: #92400e;
  --gold-600: #b45309;
  --gold-500: #d97706;
  --gold-400: #f59e0b;
  --gold-300: #fcd34d;
  --gold-100: #fef3c7;
  --gold-50:  #fffbeb;

  /* ── Creme / Neutro quente (fundo) ── */
  --cream-950: #1c1410;
  --cream-900: #3d2f20;
  --cream-800: #5c4530;
  --cream-700: #7a5c40;
  --cream-600: #a07850;
  --cream-500: #c49b70;
  --cream-400: #d9bb94;
  --cream-300: #e8d5b7;
  --cream-200: #f0e4ce;
  --cream-100: #f6ede0;
  --cream-50:  #faf5ee;
  --cream-25:  #fdfaf5;

  /* ── Cinzas neutros ── */
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white:    #ffffff;

  /* ── Status ── */
  --red-700: #b91c1c;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --red-50:  #fef2f2;
  --yellow-500: #eab308;
  --yellow-100: #fef9c3;

  /* ════════════════════════════════════
     TOKENS SEMÂNTICOS — Tema Magen
  ════════════════════════════════════ */
  --primary:        var(--blue-700);
  --primary-hover:  var(--blue-600);
  --primary-dark:   var(--blue-900);
  --primary-light:  var(--blue-100);
  --primary-subtle: var(--blue-50);

  --accent:         var(--terra-500);
  --accent-hover:   var(--terra-600);
  --accent-light:   var(--terra-100);

  --success:        var(--green-600);
  --success-light:  var(--green-100);
  --warning:        var(--gold-500);
  --warning-light:  var(--gold-100);
  --danger:         var(--red-500);
  --danger-light:   var(--red-100);

  /* Superfícies */
  --surface:          #f8f9fc;
  --surface-elevated: var(--white);
  --surface-muted:    var(--cream-50);
  --surface-warm:     var(--cream-100);

  /* Bordas */
  --border:           #e2e6ed;
  --border-strong:    var(--gray-300);
  --border-light:     var(--cream-200);

  /* Texto */
  --text-primary:     var(--gray-900);
  --text-secondary:   var(--gray-600);
  --text-muted:       var(--gray-400);
  --text-on-primary:  var(--white);
  --text-on-dark:     rgba(255,255,255,0.92);
  --text-on-dark-muted: rgba(255,255,255,0.55);

  /* Sidebar */
  --sidebar-bg:       var(--blue-900);
  --sidebar-hover:    rgba(255,255,255,0.07);
  --sidebar-active:   rgba(255,255,255,0.15);
  --sidebar-border:   rgba(255,255,255,0.07);
  --sidebar-width:    256px;

  /* Tipografia */
  --font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Raios */
  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Sombras refinadas */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-md:  0 10px 15px -3px rgba(0,0,0,.07), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-lg:  0 20px 25px -5px rgba(0,0,0,.07), 0 8px 10px -6px rgba(0,0,0,.03);
  --shadow-xl:  0 25px 50px -12px rgba(0,0,0,.12);
  --shadow-blue: 0 4px 14px rgba(26,58,143,0.18);

  /* Transições */
  --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.12s ease;
  --transition-slow: all 0.3s ease;
}

/* ════════════════════════════════════════════════════════
   RESET & BASE
════════════════════════════════════════════════════════ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ════════════════════════════════════════════════════════
   LAYOUT — SPA Shell
════════════════════════════════════════════════════════ */

.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--surface);
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--blue-900);
  background-image: linear-gradient(180deg, #0f2040 0%, #060f1f 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 50;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo-shield {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
}

.sidebar-logo-shield svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--white);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.sidebar-logo-tagline {
  font-size: 0.62rem;
  color: var(--text-on-dark-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-section-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  padding: 14px 10px 5px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  font-size: 0.825rem;
  font-weight: 500;
  transition: var(--transition-fast);
  margin-bottom: 1px;
  text-decoration: none;
  position: relative;
}

.sidebar-item i {
  width: 17px;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.75;
  flex-shrink: 0;
  transition: opacity 0.12s;
}

.sidebar-item:hover {
  background: var(--sidebar-hover);
  color: rgba(255,255,255,0.92);
}

.sidebar-item:hover i { opacity: 1; }

.sidebar-item.active {
  background: rgba(37,99,235,0.25);
  color: var(--white);
  font-weight: 600;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--blue-400);
  border-radius: 0 3px 3px 0;
}

.sidebar-item.active i { opacity: 1; }

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-bottom: 8px;
}

.sidebar-user:hover { background: var(--sidebar-hover); }

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--white);
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.12);
  letter-spacing: 0.02em;
}

.sidebar-user-info { overflow: hidden; flex: 1; min-width: 0; }

.sidebar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 0.68rem;
  color: var(--text-on-dark-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Logout button in sidebar */
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 11px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius-sm);
  color: rgba(255,100,100,0.9);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sidebar-logout:hover {
  background: rgba(239,68,68,0.18);
  color: #ff8080;
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 40;
  backdrop-filter: blur(2px);
}

/* ── Main content ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100%;
}

/* ── Top bar (mobile) ── */
.topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-toggle {
  background: none;
  border: none;
  padding: 6px;
  color: var(--text-secondary);
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.topbar-toggle:hover { background: var(--gray-100); }

.topbar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gray-900);
}

/* ── Mobile menu toggle (fab) ── */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: var(--blue-700);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  z-index: 45;
  box-shadow: var(--shadow-md);
  transition: var(--transition-fast);
}

.mobile-menu-toggle:hover { background: var(--blue-600); transform: scale(1.05); }

/* ── Page Header ── */
.page-header {
  padding: 28px 32px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-header-left { flex: 1; min-width: 0; }

.page-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 400;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Page Body ── */
.page-body {
  padding: 20px 32px 40px;
  flex: 1;
}

/* ════════════════════════════════════════════════════════
   BOTÕES
════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--blue-700);
  color: var(--white);
  border-color: var(--blue-700);
  box-shadow: 0 1px 3px rgba(26,58,143,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-600);
  border-color: var(--blue-600);
  box-shadow: var(--shadow-blue);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

.btn-accent {
  background: var(--terra-500);
  color: var(--white);
  border-color: var(--terra-500);
  box-shadow: 0 1px 3px rgba(234,88,12,0.2);
}

.btn-accent:hover:not(:disabled) {
  background: var(--terra-600);
  border-color: var(--terra-600);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--green-600);
  color: var(--white);
  border-color: var(--green-600);
}

.btn-success:hover:not(:disabled) {
  background: var(--green-700);
  border-color: var(--green-700);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--red-500);
  color: var(--white);
  border-color: var(--red-500);
}

.btn-danger:hover:not(:disabled) {
  background: var(--red-700);
  border-color: var(--red-700);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--gray-100);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--blue-700);
  border-color: var(--blue-300);
}

.btn-outline:hover:not(:disabled) {
  background: var(--blue-50);
  border-color: var(--blue-400);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 0.775rem;
  border-radius: var(--radius-sm);
  gap: 5px;
}

.btn-lg {
  padding: 11px 24px;
  font-size: 0.9375rem;
}

.btn-xl {
  padding: 13px 32px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  gap: 8px;
}

.w-full { width: 100%; }
.mt-2 { margin-top: 8px; }

/* ════════════════════════════════════════════════════════
   COMPONENTES — Cards
════════════════════════════════════════════════════════ */

.card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i { color: var(--primary); }

.card-body { padding: 20px; }

/* ── Stat cards ── */
.stat-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 70px;
  height: 70px;
  border-radius: 0 var(--radius-lg) 0 70px;
  opacity: 0.04;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--blue-200);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.stat-icon-blue  { background: var(--blue-100);  color: var(--blue-700);  }
.stat-icon-green { background: var(--green-100); color: var(--green-700); }
.stat-icon-terra { background: var(--terra-100); color: var(--terra-600); }
.stat-icon-gold  { background: var(--gold-100);  color: var(--gold-600);  }
.stat-icon-red   { background: var(--red-100);   color: var(--red-700);   }
.stat-icon-earth { background: var(--cream-200); color: var(--cream-800); }
.stat-icon-primary { background: var(--blue-100); color: var(--blue-700); }

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

.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ════════════════════════════════════════════════════════
   COMPONENTES — Grids
════════════════════════════════════════════════════════ */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ════════════════════════════════════════════════════════
   COMPONENTES — Formulários
════════════════════════════════════════════════════════ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.label {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: 0.01em;
}

.input {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--white);
  transition: var(--transition-fast);
  outline: none;
  width: 100%;
}

.input:hover { border-color: var(--gray-300); }

.input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

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

textarea.input { resize: vertical; min-height: 80px; line-height: 1.5; }

.input-group { position: relative; }
.input-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.82rem; pointer-events: none; }
.input.input-icon-left { padding-left: 34px; }

/* ════════════════════════════════════════════════════════
   COMPONENTES — Badges & Status
════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-active,
.badge-pronto,
.badge-confirmado  { background: var(--green-100);  color: var(--green-700); border: 1px solid var(--green-200); }
.badge-draft,
.badge-pendente,
.badge-enviado     { background: var(--blue-100);   color: var(--blue-700);  border: 1px solid var(--blue-200); }
.badge-warning,
.badge-em_analise,
.badge-processando { background: var(--gold-100);   color: var(--gold-700);  border: 1px solid #fde68a; }
.badge-erro,
.badge-cancelado,
.badge-blocked     { background: var(--red-100);    color: var(--red-700);   border: 1px solid #fca5a5; }
.badge-secondary,
.badge-inactive,
.badge-gratuito    { background: var(--gray-100);   color: var(--gray-600);  border: 1px solid var(--gray-200); }
.badge-pro         { background: var(--blue-100);   color: var(--blue-700);  border: 1px solid var(--blue-200); }
.badge-equipe      { background: var(--terra-100);  color: var(--terra-600); border: 1px solid var(--terra-200); }

.badge-plan_free   { background: var(--gray-100);   color: var(--gray-600);  border: 1px solid var(--gray-200); }
.badge-plan_pro    { background: var(--blue-100);   color: var(--blue-700);  border: 1px solid var(--blue-200); }
.badge-plan_team   { background: var(--terra-100);  color: var(--terra-600); border: 1px solid var(--terra-200); }

.badge-cultura       { background: #fdf4ff; color: #7c3aed; border: 1px solid #e9d5ff; }
.badge-terceiro_setor{ background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200); }
.badge-gestao        { background: var(--blue-50);  color: var(--blue-700);  border: 1px solid var(--blue-200); }

/* Aliases semânticos adicionais */
.badge-success  { background: var(--green-100);  color: var(--green-700);  border: 1px solid var(--green-200); }
.badge-error    { background: var(--red-100);    color: var(--red-700);    border: 1px solid #fca5a5; }
.badge-info     { background: var(--blue-100);   color: var(--blue-700);   border: 1px solid var(--blue-200); }
.badge-blue     { background: var(--blue-100);   color: var(--blue-700);   border: 1px solid var(--blue-200); }
.badge-green    { background: var(--green-100);  color: var(--green-700);  border: 1px solid var(--green-200); }
.badge-gold     { background: var(--gold-100);   color: var(--gold-700);   border: 1px solid #fde68a; }
.badge-earth    { background: var(--terra-100);  color: var(--terra-600);  border: 1px solid var(--terra-200); }
.badge-purple   { background: #f5f3ff;           color: #7c3aed;           border: 1px solid #ddd6fe; }
.badge-red      { background: var(--red-100);    color: var(--red-700);    border: 1px solid #fca5a5; }

/* Status colors semânticos */
--status-warning: var(--gold-500);
--status-success: var(--green-500);
--status-error:   var(--red-500);
--status-info:    var(--blue-500);

/* ════════════════════════════════════════════════════════
   COMPONENTES — Tabelas
════════════════════════════════════════════════════════ */

.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.855rem;
}

thead th {
  background: var(--gray-50);
  padding: 11px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

thead th:first-child { border-radius: var(--radius-lg) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius-lg) 0 0; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--blue-50); }

tbody td {
  padding: 12px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

tfoot td {
  padding: 12px 16px;
  font-weight: 700;
  background: var(--cream-50);
  border-top: 2px solid var(--border);
}

/* ════════════════════════════════════════════════════════
   COMPONENTES — Modais
════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,15,31,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.modal-overlay.show { opacity: 1; }

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid var(--border);
}

.modal-overlay.show .modal {
  transform: translateY(0) scale(1);
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title i { color: var(--primary); }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  line-height: 1;
}

.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }

.modal-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--gray-50);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ════════════════════════════════════════════════════════
   COMPONENTES — Toast
════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 370px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.845rem;
  font-weight: 500;
  color: var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transform: translateX(110%);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 100%;
  border-left: 3px solid rgba(255,255,255,0.25);
}

.toast.show { opacity: 1; transform: translateX(0); }

.toast-success { background: #15803d; }
.toast-error   { background: #b91c1c; }
.toast-info    { background: var(--blue-700); }
.toast-warning { background: var(--gold-600); }

/* ════════════════════════════════════════════════════════
   COMPONENTES — Loading
════════════════════════════════════════════════════════ */

.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: rgba(255,255,255,0.9);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

.loading-spinner.dark {
  border-color: var(--border);
  border-top-color: var(--primary);
  width: 28px;
  height: 28px;
  border-width: 3px;
}

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

/* ════════════════════════════════════════════════════════
   COMPONENTES — Empty State
════════════════════════════════════════════════════════ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
}

.empty-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-xl);
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--blue-300);
  margin-bottom: 18px;
  border: 1.5px solid var(--blue-100);
}

.empty-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 7px;
}

.empty-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.65;
  margin-bottom: 22px;
}

/* ════════════════════════════════════════════════════════
   COMPONENTES — Tabs (project editor)
════════════════════════════════════════════════════════ */

.tabs-nav {
  display: flex;
  gap: 1px;
  background: var(--gray-50);
  border-bottom: 1.5px solid var(--border);
  overflow-x: auto;
  padding: 8px 24px 0;
  scrollbar-width: none;
}

.tabs-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  margin-bottom: -1.5px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover { color: var(--blue-600); background: rgba(37,99,235,0.04); }
.tab-btn.active { color: var(--blue-700); border-bottom-color: var(--blue-700); background: var(--white); font-weight: 700; }
.tab-btn i { font-size: 0.78rem; }

/* ════════════════════════════════════════════════════════
   LANDING PAGE
════════════════════════════════════════════════════════ */

.landing {
  min-height: 100vh;
  background: var(--surface);
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6,15,31,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.landing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.landing-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.landing-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--white);
  letter-spacing: 0.01em;
}

.landing-logo-sub {
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
}

.landing-nav-link {
  padding: 6px 13px;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.landing-nav-link:hover { color: var(--white); background: rgba(255,255,255,0.07); }

.landing-nav-ctas {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Hero section ── */
.hero {
  background: linear-gradient(140deg, #060f1f 0%, #0f2040 45%, #101b4a 100%);
  padding: 96px 28px 88px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 65% 35%, rgba(37,99,235,0.14) 0%, transparent 70%),
    radial-gradient(ellipse 35% 35% at 88% 78%, rgba(234,88,12,0.09) 0%, transparent 60%),
    radial-gradient(circle at 10% 60%, rgba(21,128,61,0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* Decorative grid overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.3);
  color: var(--blue-300);
  padding: 4px 13px;
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.1rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin-bottom: 22px;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #60a5fa 0%, #a5f3fc 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.72;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 42px;
}

.hero-stats {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero-stat {
  flex: 1;
  padding: 16px 14px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.07);
}

.hero-stat:last-child { border-right: none; }

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-stat-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.hero-visual {
  position: relative;
}

.hero-visual-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: 26px;
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.hero-visual-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* ── Features section ── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 76px 28px;
}

.section-header { margin-bottom: 48px; }

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-200);
  padding: 4px 13px;
  border-radius: var(--radius-full);
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 13px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-200);
  padding: 4px 13px;
  border-radius: var(--radius-full);
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 13px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.035em;
  margin-bottom: 12px;
  line-height: 1.18;
}

.section-desc {
  font-size: 1.0rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 540px;
}

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

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-400));
  opacity: 0;
  transition: opacity 0.2s;
}

.feature-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

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

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.feature-icon-blue   { background: var(--blue-100);   color: var(--blue-700); }
.feature-icon-green  { background: var(--green-100);  color: var(--green-700); }
.feature-icon-terra  { background: var(--terra-100);  color: var(--terra-600); }
.feature-icon-gold   { background: var(--gold-100);   color: var(--gold-600); }

.feature-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 7px;
}

.feature-desc {
  font-size: 0.845rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 26px;
  position: relative;
  transition: var(--transition);
}

.pricing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.pricing-card.featured {
  background: var(--blue-800);
  border-color: var(--blue-600);
  color: var(--white);
  box-shadow: 0 20px 40px rgba(26,58,143,0.3);
  transform: scale(1.02);
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--terra-500);
  color: var(--white);
  padding: 3px 13px;
  border-radius: var(--radius-full);
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.pricing-name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 9px;
}

.pricing-card:not(.featured) .pricing-name { color: var(--text-muted); }
.pricing-card.featured .pricing-name { color: rgba(255,255,255,0.65); }

.pricing-price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-card.featured .pricing-price { color: var(--white); }

.pricing-period {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.pricing-card.featured .pricing-period { color: rgba(255,255,255,0.5); }

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 26px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
}

.pricing-features li i {
  color: var(--green-600);
  font-size: 0.75rem;
  flex-shrink: 0;
  width: 16px;
}

.pricing-card.featured .pricing-features li { color: rgba(255,255,255,0.85); }
.pricing-card.featured .pricing-features li i { color: #86efac; }

/* ── CTA Section ── */
.cta-section {
  background: linear-gradient(140deg, #060f1f 0%, #0f2040 100%);
  padding: 84px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 50%, rgba(234,88,12,0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 50%, rgba(37,99,235,0.13) 0%, transparent 50%);
  pointer-events: none;
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 30px;
  line-height: 1.7;
}

.email-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}

.email-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.email-form input::placeholder { color: rgba(255,255,255,0.4); }
.email-form input:focus { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.12); }

/* ── Footer ── */
.landing-footer {
  background: #030712;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 32px 28px;
}

.landing-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.landing-footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
}

.landing-footer-copy {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}

.landing-footer-links {
  display: flex;
  gap: 22px;
}

.landing-footer-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  transition: var(--transition-fast);
}

.landing-footer-links a:hover { color: rgba(255,255,255,0.8); }

/* ════════════════════════════════════════════════════════
   AUTENTICAÇÃO
════════════════════════════════════════════════════════ */

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  background: linear-gradient(155deg, #060f1f 0%, #0f2040 55%, #101c50 100%);
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 40% 30%, rgba(37,99,235,0.14) 0%, transparent 70%),
    radial-gradient(circle at 85% 80%, rgba(234,88,12,0.09) 0%, transparent 50%),
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px) 0 0 / 40px 40px;
  pointer-events: none;
}

.auth-left > * { position: relative; z-index: 1; }

.auth-left-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--white);
}

.auth-left-logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.auth-left-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
}

.auth-left-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.3);
  color: var(--blue-300);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.auth-left-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.045em;
  line-height: 1.12;
  margin-bottom: 16px;
}

.auth-left-title span {
  background: linear-gradient(135deg, #60a5fa, #a5f3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-left-desc {
  font-size: 0.9625rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.7;
  max-width: 350px;
  margin-bottom: 32px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.865rem;
  color: rgba(255,255,255,0.78);
}

.auth-feature-icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex-shrink: 0;
  color: var(--blue-300);
}

.auth-magen-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.775rem;
  color: rgba(255,255,255,0.38);
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  transition: var(--transition-fast);
}

.auth-magen-link:hover { color: rgba(255,255,255,0.72); }

.auth-right {
  background: var(--white);
  padding: 52px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-form-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.035em;
  margin-bottom: 7px;
}

.auth-form-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-divider {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 4px 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-error {
  background: var(--red-50);
  border: 1px solid #fca5a5;
  color: var(--red-700);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 18px;
}

.auth-switch a {
  color: var(--blue-700);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════
   DASHBOARD
════════════════════════════════════════════════════════ */

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Project card */
.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.project-card.type-cultura::after   { background: linear-gradient(90deg, #7c3aed, #a78bfa); opacity:1; }
.project-card.type-terceiro_setor::after { background: linear-gradient(90deg, var(--green-600), var(--green-400)); opacity:1; }
.project-card.type-gestao::after    { background: linear-gradient(90deg, var(--blue-700), var(--blue-400)); opacity:1; }

.project-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.project-card:hover::after { opacity: 1; }

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-card-title-wrap {
  flex: 1;
  min-width: 0;
}

.project-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.project-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.project-card-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-info-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.project-info-item i {
  flex-shrink: 0;
  margin-top: 2px;
  width: 14px;
  color: var(--blue-400);
}

.project-info-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-info-item.project-objective span {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-meta {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.project-card-progress {
  height: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.project-card-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-400));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--gray-50);
}

.project-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Form section titles inside modals */
.form-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-100);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.4;
}

.form-hint i {
  color: var(--blue-400);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Large modal variant */
.modal.modal-lg {
  max-width: 680px;
  width: 100%;
}

.modal.modal-lg .modal-body {
  gap: 12px;
  padding: 24px;
}


/* ════════════════════════════════════════════════════════
   EDITOR TABS — Content areas
════════════════════════════════════════════════════════ */

.section-content-area {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: var(--transition-fast);
}

.section-content-area:hover { border-color: var(--blue-200); }
.section-content-area:focus-within {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-name {
  font-family: var(--font-display);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════
   SETTINGS
════════════════════════════════════════════════════════ */

.settings-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.settings-section-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--gray-50);
}

.settings-section-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section-title i { color: var(--primary); }

.settings-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.settings-row:last-child { border-bottom: none; }

.settings-info { flex: 1; min-width: 0; }
.settings-label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.settings-desc  { font-size: 0.77rem; color: var(--text-muted); margin-top: 2px; }

/* Avatar display */
.settings-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  box-shadow: var(--shadow-md);
  border: 3px solid var(--white);
  outline: 2px solid var(--blue-200);
}

/* ════════════════════════════════════════════════════════
   AI CHAT
════════════════════════════════════════════════════════ */

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f8f9fc;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 82%;
  animation: slideIn 0.22s ease;
}

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

.chat-msg.user { flex-direction: row-reverse; margin-left: auto; }

.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.chat-msg.user .chat-msg-avatar {
  background: var(--blue-700);
  color: var(--white);
}

.chat-msg.assistant .chat-msg-avatar {
  background: linear-gradient(135deg, var(--blue-800), var(--terra-500));
  color: var(--white);
}

.chat-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.65;
  max-width: 100%;
}

.chat-msg.user .chat-msg-bubble {
  background: var(--blue-700);
  color: var(--white);
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 2px 8px rgba(26,58,143,0.2);
}

.chat-msg.assistant .chat-msg-bubble {
  background: var(--white);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  box-shadow: var(--shadow-sm);
}

.chat-msg-time {
  font-size: 0.63rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

.chat-input-area {
  padding: 12px 16px;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.chat-quick-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.71rem;
  font-weight: 600;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-200);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.quick-action-btn:hover { background: var(--blue-100); border-color: var(--blue-300); }

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-input-row textarea {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  resize: none;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  font-size: 0.875rem;
  transition: var(--transition-fast);
  outline: none;
  background: var(--white);
  line-height: 1.5;
}

.chat-input-row textarea:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }

/* ════════════════════════════════════════════════════════
   CHECKLIST
════════════════════════════════════════════════════════ */

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.checklist-item:hover { background: var(--cream-25); border-color: var(--border-light); }

.checklist-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--blue-700);
  flex-shrink: 0;
  cursor: pointer;
}

.checklist-item.checked .checklist-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════
   PDF Preview
════════════════════════════════════════════════════════ */

.pdf-preview {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  max-width: 700px;
  box-shadow: var(--shadow-sm);
}

.pdf-preview h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--blue-900);
  margin-bottom: 4px;
  letter-spacing: -0.025em;
}

.pdf-preview h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--blue-100);
}

/* ════════════════════════════════════════════════════════
   MENTORING
════════════════════════════════════════════════════════ */

/* Catálogo de mentorias */
.mentoring-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.mentoring-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.mentoring-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.mentoring-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.mentoring-card-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.mentoring-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.35;
}

.mentoring-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 14px;
}

.mentoring-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.mentoring-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mentoring-card-meta span { display: flex; align-items: center; gap: 4px; }
.mentoring-card-meta i { color: var(--primary); width: 12px; }

/* Slot time buttons */
.slot-time-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.slot-time-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.slot-time-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════
   ADMIN PAGES
════════════════════════════════════════════════════════ */

.admin-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.crm-user-row td:first-child {
  font-weight: 600;
  color: var(--gray-900);
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.filter-bar .input {
  max-width: 260px;
}

/* Financial summary cards */
.financial-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.fin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.fin-card-receita { border-top: 3px solid var(--green-500); }
.fin-card-despesa  { border-top: 3px solid var(--red-500);  }
.fin-card-saldo   { border-top: 3px solid var(--blue-600);  }

.fin-card-label {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.fin-card-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.fin-card-receita .fin-card-value { color: var(--green-700); }
.fin-card-despesa  .fin-card-value { color: var(--red-700);   }
.fin-card-saldo   .fin-card-value { color: var(--blue-700);  }

/* AI Config cards */
.ai-config-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.ai-config-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
}

.ai-config-scope-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 14px;
}

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

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .financial-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    width: 268px;
    transform: translateX(-100%);
  }

  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; }
  .sidebar-overlay.show { display: block; }

  .main-content { margin-left: 0; }
  .topbar { display: flex; }
  .mobile-menu-toggle { display: flex; }

  .page-header { padding: 18px 18px 0; }
  .page-body { padding: 16px 18px 36px; }
  .page-title { font-size: 1.3rem; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .financial-summary { grid-template-columns: 1fr; }

  .auth-layout { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 36px 22px; }

  .hero { padding: 64px 22px 54px; }
  .hero-title { font-size: 2.2rem; }

  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92vh; }
  .modal-overlay.show .modal { transform: translateY(0) scale(1); }

  .tabs-nav { padding: 7px 14px 0; }
  .tab-btn { padding: 7px 10px; font-size: 0.75rem; }

  .toast-container { right: 10px; left: 10px; max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem; }
  .hero-actions { flex-direction: column; }
  .btn-xl { width: 100%; justify-content: center; }
  .section-title { font-size: 1.6rem; }
  .email-form { flex-direction: column; }
}

/* ════════════════════════════════════════════════════════
   UTILITIES
════════════════════════════════════════════════════════ */

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-primary-color { color: var(--primary); }
.text-success { color: var(--green-600); }
.text-danger  { color: var(--red-500); }
.font-display { font-family: var(--font-display); }
.font-bold    { font-weight: 700; }

.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-2   { margin-top: 8px; }
.mt-4   { margin-top: 16px; }
.mb-2   { margin-bottom: 8px; }

.serif { font-family: var(--font-display); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Info alert */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.845rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-info {
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--blue-800);
}

.alert-warning {
  background: var(--gold-50);
  border: 1px solid #fde68a;
  color: var(--gold-700);
}

.alert-success {
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-800);
}

.alert-danger {
  background: var(--red-50);
  border: 1px solid #fca5a5;
  color: var(--red-700);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Markdown rendered content */
.markdown-content h1, .markdown-content h2, .markdown-content h3 {
  font-family: var(--font-display);
  color: var(--gray-800);
  margin: 14px 0 7px;
}
.markdown-content h1 { font-size: 1.1rem; }
.markdown-content h2 { font-size: 1rem; }
.markdown-content h3 { font-size: 0.9rem; }
.markdown-content p  { margin-bottom: 9px; line-height: 1.68; }
.markdown-content ul, .markdown-content ol { padding-left: 18px; margin-bottom: 9px; }
.markdown-content li { margin-bottom: 4px; line-height: 1.58; }
.markdown-content strong { font-weight: 700; color: var(--gray-800); }

/* Scrollbar global */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-200) transparent;
}
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in {
  animation: fadeIn 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Print */
@media print {
  .sidebar, .topbar, .btn, .tabs-nav, .mobile-menu-toggle { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-header { padding: 16px 0 0; }
}

/* ════════════════════════════════════════════════════════
   MAGEN BRAND ACCENT — Linha decorativa e toques especiais
════════════════════════════════════════════════════════ */

/* Linha decorativa do header */
.page-header {
  position: relative;
}

/* Card com border accent no topo */
.card-accent-top {
  border-top: 3px solid var(--blue-600);
}

/* Highlight de linha na tabela para admin */
.row-highlight { background: var(--blue-50) !important; }

/* Tag do Magen no rodapé / sidebar */
.magen-powered {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding: 8px 0 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  letter-spacing: 0.04em;
}

.magen-powered a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.12s;
}

.magen-powered a:hover { color: rgba(255,255,255,0.75); }

/* Indicador de IA ativo */
.ai-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-500);
  display: inline-block;
  animation: pulse 1.8s ease infinite;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════
   SEARCH BAR
════════════════════════════════════════════════════════ */

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.search-bar i {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.875rem;
  background: transparent;
  color: var(--text-primary);
}

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

/* ════════════════════════════════════════════════════════
   PAGE SECTION WRAPPER (internal sections)
════════════════════════════════════════════════════════ */

.page-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.page-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--gray-50);
}

.page-section-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-section-title i { color: var(--primary); font-size: 0.85rem; }

.page-section-body {
  padding: 20px;
}

/* ════════════════════════════════════════════════════════
   REDESIGN UI/UX — Design System v3.0
   Time: Designers + Developers Magen
════════════════════════════════════════════════════════ */

/* ── Melhorias gerais no layout ── */
:root {
  --sidebar-width: 264px;
  --radius-card: 16px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.06);
  --transition-smooth: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Sidebar melhorada ── */
.sidebar {
  background: linear-gradient(180deg, #0c1b3a 0%, #071228 100%);
  width: var(--sidebar-width);
  border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo-shield {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(37,99,235,0.45);
}

.sidebar-nav {
  padding: 16px 12px;
}

.sidebar-item {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.845rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  transition: var(--transition-smooth);
}

.sidebar-item i {
  width: 18px;
  text-align: center;
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

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

.sidebar-item:hover i { transform: scale(1.1); }

.sidebar-item.active {
  background: rgba(37,99,235,0.22);
  color: #fff;
  font-weight: 600;
}

.sidebar-item.active::before {
  width: 3px;
  height: 65%;
  background: #60a5fa;
  left: -12px;
  border-radius: 0 3px 3px 0;
}

.sidebar-section-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.22);
  padding: 12px 12px 5px;
  text-transform: uppercase;
  font-weight: 700;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0.75rem;
  border: 2px solid rgba(255,255,255,0.15);
  background: linear-gradient(135deg, #1e4bb8, #2563eb);
}

.sidebar-logout {
  border-radius: 10px;
  font-size: 0.8rem;
  padding: 8px 12px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.12);
  color: rgba(255,120,120,0.85);
}

/* ── Page layout melhorado ── */
.main-content {
  margin-left: var(--sidebar-width);
  background: #f4f6fb;
}

.page-header {
  padding: 28px 32px 0;
  background: transparent;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #0f172a;
}

.page-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 4px;
}

.page-body {
  padding: 22px 32px 48px;
}

/* ── Botões redesenhados ── */
.btn {
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 0.855rem;
  font-weight: 600;
  gap: 7px;
  letter-spacing: 0.005em;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 1px 3px rgba(29,78,216,0.25), 0 0 0 1px rgba(29,78,216,0.1) inset, 0 1px 0 rgba(255,255,255,0.1) inset;
}

.btn-primary:hover:not(:disabled) {
  background: #1e40af;
  border-color: #1e40af;
  box-shadow: 0 4px 12px rgba(29,78,216,0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  border-color: #e2e8f0;
  color: #475569;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 1px 3px rgba(220,38,38,0.2);
}

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
  border-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(220,38,38,0.3);
}

.btn-success {
  background: #16a34a;
  border-color: #16a34a;
  box-shadow: 0 1px 3px rgba(22,163,74,0.2);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: #64748b;
  font-weight: 500;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(100,116,139,0.08);
  color: #334155;
}

.btn-outline {
  background: transparent;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.btn-outline:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #93c5fd;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 11px 26px;
  font-size: 0.9375rem;
  border-radius: 12px;
}

.btn-xl {
  padding: 13px 32px;
  font-size: 1rem;
  border-radius: 14px;
}

/* btn icon circular */
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon.btn-sm {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

/* ── Stat cards redesenhados ── */
.stat-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.2s;
  background: linear-gradient(135deg, rgba(37,99,235,0.02), transparent);
}

.stat-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
  transform: translateY(-2px);
  border-color: #c7d7f1;
}

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

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #0f172a;
}

.stat-label {
  font-size: 0.755rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* ── Cards gerais redesenhados ── */
.card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  gap: 8px;
}

.card-body {
  padding: 22px;
}

/* ── Project cards redesenhados ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px;
}

.project-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
  transition: height 0.2s ease;
}

.project-card.type-cultura::before   { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.project-card.type-terceiro_setor::before { background: linear-gradient(90deg, #15803d, #4ade80); }
.project-card.type-gestao::before    { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }

.project-card::after { display: none; }

.project-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  transform: translateY(-3px);
}

.project-card:hover::before { height: 4px; }

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 0;
}

.project-card-name {
  font-family: var(--font-display);
  font-size: 1.025rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-badges {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.project-card-info {
  padding: 12px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.project-info-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.815rem;
  color: #64748b;
  line-height: 1.45;
}

.project-info-item i {
  color: #3b82f6;
  width: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 0.78rem;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 20px;
  margin-top: 12px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 0 0 16px 16px;
}

.project-card-date {
  font-size: 0.76rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Page section redesenhada ── */
.page-section {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  overflow: hidden;
  margin-bottom: 20px;
}

.page-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.page-section-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-section-title i {
  color: #3b82f6;
  font-size: 0.88rem;
}

.page-section-body {
  padding: 22px;
}

/* ── Modais redesenhados ── */
.modal-overlay {
  background: rgba(7,15,31,0.55);
  backdrop-filter: blur(6px);
}

.modal {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.04);
  max-width: 540px;
  border: 1px solid rgba(255,255,255,0.5);
}

.modal.modal-lg {
  max-width: 700px;
}

.modal-header {
  padding: 22px 26px 18px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  gap: 9px;
}

.modal-title i { color: #1d4ed8; }

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  background: #f1f5f9;
  color: #475569;
}

.modal-body {
  padding: 24px 26px;
  gap: 16px;
}

.modal-footer {
  padding: 18px 26px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 0 0 20px 20px;
  gap: 10px;
}

/* ── Formulários redesenhados ── */
.form-label,
.label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.01em;
  display: block;
  margin-bottom: 5px;
}

.form-input,
.input,
.form-select,
.form-textarea {
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: #1e293b;
  background: #fff;
  width: 100%;
  transition: var(--transition-smooth);
  outline: none;
}

.form-input:hover,
.input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: #cbd5e1;
}

.form-input:focus,
.input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder,
.input::placeholder {
  color: #a0aec0;
}

.form-textarea,
textarea.input {
  min-height: 88px;
  resize: vertical;
  line-height: 1.55;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

.required {
  color: #ef4444;
  margin-left: 2px;
}

.form-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #eff6ff;
}

.form-hint {
  font-size: 0.775rem;
  color: #94a3b8;
  margin-top: 6px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.45;
}

.form-hint i {
  color: #93c5fd;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Alert */
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.845rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

/* ── Settings redesenhadas ── */
.settings-section {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.settings-section-header {
  padding: 18px 22px;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section-header i { color: #2563eb; }

.settings-section-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
}

.settings-body {
  padding: 8px 22px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}

.settings-row:last-child { border-bottom: none; }

.settings-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.settings-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

.settings-avatar {
  width: 80px;
  height: 80px;
  font-size: 1.7rem;
  font-weight: 800;
  border: 3px solid #fff;
  outline: 2.5px solid #bfdbfe;
  box-shadow: 0 4px 14px rgba(29,78,216,0.2);
}

/* ── Empty state redesenhado ── */
.empty-state {
  padding: 72px 28px;
  text-align: center;
}

.empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #eff6ff;
  border: 2px solid #dbeafe;
  color: #93c5fd;
  font-size: 1.8rem;
  margin-bottom: 22px;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.7;
  max-width: 340px;
  margin: 0 auto 26px;
}

/* ── Toast redesenhado ── */
.toast {
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 0.855rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  border-left: none;
  border: 1px solid rgba(255,255,255,0.15);
}

.toast-success {
  background: linear-gradient(135deg, #15803d, #16a34a);
}

.toast-error {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}

.toast-info {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.toast-warning {
  background: linear-gradient(135deg, #b45309, #d97706);
}

/* ── Badges redesenhados ── */
.badge {
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Welcome banner ── */
.welcome-banner {
  background: linear-gradient(135deg, #0f2356 0%, #1a3a8f 55%, #1e1b5e 100%);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 4px 20px rgba(15,35,86,0.3);
}

.welcome-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 80% at 90% 50%, rgba(59,130,246,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 30% 40% at 10% 80%, rgba(99,102,241,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

/* ── CRM / Admin table aprimorada ── */
.admin-stat-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: var(--transition-smooth);
  overflow: hidden;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.09);
}

.filter-bar {
  border-radius: 14px 14px 0 0;
  background: #f8fafc;
  border-bottom: 1px solid #e8edf4;
  padding: 16px 22px;
  gap: 12px;
}

/* ── Mentoring cards ── */
.mentoring-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: var(--transition-smooth);
}

.mentoring-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 6px 18px rgba(0,0,0,0.09);
  transform: translateY(-3px);
}

.mentoring-card-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
  margin-top: auto;
}

/* ── Tabs redesenhadas ── */
.tabs-nav {
  background: #fff;
  border-bottom: 1.5px solid #e8edf4;
  padding: 10px 26px 0;
  gap: 2px;
}

.tab-btn {
  padding: 9px 16px;
  font-size: 0.825rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 8px 8px 0 0;
  border-bottom: 2.5px solid transparent;
}

.tab-btn:hover {
  color: #1d4ed8;
  background: rgba(29,78,216,0.04);
}

.tab-btn.active {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
  background: #eff6ff;
  font-weight: 700;
}

/* ── Responsive melhorado ── */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 0px; }
  .projects-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page-header { padding: 18px 18px 0; }
  .page-body { padding: 16px 18px 40px; }
  .page-title { font-size: 1.3rem; }
  .projects-grid { grid-template-columns: 1fr; gap: 14px; }
  .grid-4 { grid-template-columns: 1fr; }
  .welcome-banner { padding: 22px 20px; border-radius: 16px; }
}

/* ── Loading spinner ── */
.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  gap: 12px;
}

.loading-spinner.dark {
  border-color: #e2e8f0;
  border-top-color: #1d4ed8;
  width: 30px;
  height: 30px;
  border-width: 3px;
}

/* ── Quick actions ── */
.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-action-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1.5px solid #e8edf4;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  color: inherit;
}

.quick-action-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateX(3px);
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.quick-action-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.quick-action-icon.green  { background: #dcfce7; color: #15803d; }
.quick-action-icon.terra  { background: #ffedd5; color: #c2410c; }
.quick-action-icon.purple { background: #f5f3ff; color: #7c3aed; }

.quick-action-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.quick-action-desc {
  font-size: 0.77rem;
  color: #64748b;
  margin-top: 1px;
}

/* ── Section content area (editor) ── */
.section-content-area {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  transition: var(--transition-smooth);
}

.section-content-area:hover { border-color: #93c5fd; }
.section-content-area:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.09);
}

/* ── Checklist melhorado ── */
.checklist-item {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.checklist-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* ── Suporte page ── */
.support-doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1.5px solid #e8edf4;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: #fff;
}

.support-doc-item:hover {
  background: #f0fdf4;
  border-color: #86efac;
  transform: translateX(3px);
}

.support-doc-icon {
  width: 36px;
  height: 36px;
  background: #dcfce7;
  color: #15803d;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Alert redesenhado ── */
.alert {
  border-radius: 12px;
  font-size: 0.855rem;
  padding: 13px 16px;
}

.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

/* ── Table melhorada ── */
.table-wrap {
  border-radius: 14px;
  border: 1px solid #e8edf4;
  overflow: hidden;
}

thead th {
  background: #f8fafc;
  padding: 12px 18px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: #64748b;
  border-bottom: 1.5px solid #e8edf4;
}

tbody td {
  padding: 13px 18px;
}

tbody tr:hover { background: #f0f7ff; }

/* ── Financial cards ── */
.fin-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.fin-card-value {
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

/* ── ARIA / focus styles ── */
:focus-visible {
  outline: 2.5px solid #2563eb;
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ── Micro animações polidas ── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── Scrollbar refinada ── */
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ════════════════════════════════════════════════════════
   PROJECT EDITOR — Layout principal
════════════════════════════════════════════════════════ */

.project-editor {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--surface);
}

/* ── Tabs de navegação do projeto ── */
.project-tabs {
  display: flex;
  gap: 2px;
  background: var(--white);
  border-bottom: 2px solid #e8edf4;
  overflow-x: auto;
  padding: 0 24px;
  scrollbar-width: none;
  flex-shrink: 0;
}
.project-tabs::-webkit-scrollbar { display: none; }

.project-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  margin-bottom: -2px;
  letter-spacing: 0.01em;
  border-radius: 6px 6px 0 0;
  position: relative;
}
.project-tab:hover {
  color: var(--primary);
  background: rgba(37,99,235,0.05);
}
.project-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(37,99,235,0.04);
  font-weight: 700;
}
.project-tab i {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* ── Área de conteúdo das tabs ── */
.project-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: #f8fafc;
}

/* ── Header do projeto redesenhado ── */
.proj-header-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  background: var(--white);
  border-bottom: 1px solid #e8edf4;
}

.proj-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
}
.proj-back-btn:hover {
  background: #e2e8f0;
  color: var(--primary);
}

/* ════════════════════════════════════════════════════════
   TAB OVERVIEW — Visão Geral
════════════════════════════════════════════════════════ */

/* Container principal da aba Visão Geral */
.overview-tab-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 4px 0 24px;
}

/* Card estilizado da Overview */
.overview-card {
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid #e8edf4;
}

/* Header do card com ícone */
.overview-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px !important;
  border-bottom: 1.5px solid #f1f5f9;
  background: #fafbfd;
}

/* Ícone colorido no card header */
.overview-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.overview-card-icon i {
  color: white;
  font-size: 0.9rem;
}

/* Ajuste do card-body nas overview cards */
.overview-card .card-body {
  padding: 20px 22px;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 720px) {
  .overview-grid { grid-template-columns: 1fr; }
  .overview-tab-container { padding: 4px 0 16px; }
}

.overview-info-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.overview-field {
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.overview-field:last-child { border-bottom: none; padding-bottom: 0; }

.overview-field-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  margin-bottom: 3px;
}
.overview-field-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.5;
}

.progress-wrap {
  margin-bottom: 16px;
}
.progress-wrap:last-child { margin-bottom: 0; }
.progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.progress-label { font-size: 0.82rem; color: #475569; }
.progress-value { font-size: 0.82rem; font-weight: 700; color: #16a34a; }
.progress-track {
  height: 7px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: var(--white);
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
}
.quick-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37,99,235,0.04);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37,99,235,0.1);
}
.quick-action-btn i {
  font-size: 0.85rem;
  width: 18px;
  text-align: center;
  opacity: 0.8;
}

/* ════════════════════════════════════════════════════════
   TAB TEXT — Editor de Textos
════════════════════════════════════════════════════════ */

.text-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.text-editor-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}
.text-editor-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 2px;
}

.section-editor {
  background: var(--white);
  border: 1.5px solid #e8edf4;
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.section-editor:hover {
  border-color: #bfdbfe;
  box-shadow: 0 2px 12px rgba(37,99,235,0.07);
}

.section-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1.5px solid #e8edf4;
  flex-wrap: wrap;
  gap: 8px;
}
.section-editor-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
}
.section-editor-label i {
  color: var(--primary);
  font-size: 0.8rem;
}
.section-editor-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  padding: 8px 18px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.section-editor-hint i { color: #93c5fd; }

.section-editor .form-textarea {
  border: none;
  border-radius: 0;
  border-top: 1px solid #f1f5f9;
  background: var(--white);
  padding: 14px 18px;
  font-size: 0.875rem;
  line-height: 1.65;
  min-height: 140px;
  resize: vertical;
}
.section-editor .form-textarea:focus {
  border-color: transparent;
  outline: none;
  box-shadow: none;
  background: #fafcff;
}

/* ════════════════════════════════════════════════════════
   TAB CHECKLIST
════════════════════════════════════════════════════════ */

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.checklist-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}
.checklist-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 2px;
}

.checklist-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #94a3b8;
  padding: 16px 0 8px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 4px;
  background: var(--white);
  border: 1.5px solid #e8edf4;
  transition: all 0.18s;
  cursor: pointer;
}
.checklist-item:hover {
  border-color: #bfdbfe;
  background: #fafcff;
}
.checklist-item.checked {
  background: #f0fdf4;
  border-color: #86efac;
  opacity: 0.85;
}

.checklist-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid #cbd5e1;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s;
  color: var(--white);
  font-size: 0.75rem;
  cursor: pointer;
}
.checklist-item.checked .checklist-checkbox {
  background: #16a34a;
  border-color: #16a34a;
}
.checklist-checkbox:hover { border-color: var(--primary); }

.checklist-label {
  flex: 1;
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.5;
}
.checklist-item.checked .checklist-label {
  text-decoration: line-through;
  color: #94a3b8;
}

/* ════════════════════════════════════════════════════════
   TAB EDITAL — Upload de PDF
════════════════════════════════════════════════════════ */

.edital-header {
  margin-bottom: 24px;
}
.edital-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}
.edital-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.6;
}

.upload-zone {
  border: 2.5px dashed #cbd5e1;
  border-radius: 16px;
  padding: 44px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
  background: var(--white);
  position: relative;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(37,99,235,0.03);
}
.upload-zone.drag-over {
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.upload-icon {
  font-size: 2.8rem;
  color: #93c5fd;
  margin-bottom: 14px;
  transition: transform 0.22s;
}
.upload-zone:hover .upload-icon { transform: translateY(-4px); }

.upload-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.upload-hint {
  font-size: 0.78rem;
  color: #94a3b8;
}

.edital-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border: 1.5px solid #e8edf4;
  border-radius: 12px;
  margin-bottom: 10px;
  transition: border-color 0.18s;
}
.edital-item:hover { border-color: #bfdbfe; }

.edital-icon {
  width: 42px;
  height: 42px;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.edital-info { flex: 1; min-width: 0; }
.edital-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.edital-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════
   TAB BUDGET — Orçamento
════════════════════════════════════════════════════════ */

.budget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.budget-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}
.budget-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 2px;
}

.budget-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.budget-summary-card {
  background: var(--white);
  border: 1.5px solid #e8edf4;
  border-radius: 12px;
  padding: 16px 18px;
  transition: box-shadow 0.18s;
}
.budget-summary-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.07);
}
.budget-total-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  margin-bottom: 6px;
}
.budget-total {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

.warning-list {
  margin-bottom: 18px;
}
.warning-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #854d0e;
  margin-bottom: 6px;
}
.warning-item i { color: #ca8a04; }

/* ════════════════════════════════════════════════════════
   TAB ACCOUNTABILITY — Prestação de Contas
════════════════════════════════════════════════════════ */

.accountability-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.accountability-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}
.accountability-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 2px;
}

/* ════════════════════════════════════════════════════════
   TAB EXPORT — Exportar
════════════════════════════════════════════════════════ */

.export-header {
  margin-bottom: 24px;
}
.export-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}
.export-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.6;
}

.export-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.export-option-card {
  background: var(--white);
  border: 1.5px solid #e8edf4;
  border-radius: 14px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}
.export-option-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37,99,235,0.1);
  transform: translateY(-2px);
}
.export-option-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.export-option-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}
.export-option-desc {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.55;
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE — Editor em mobile
════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .project-tabs {
    padding: 0 12px;
  }
  .project-tab {
    padding: 12px 10px 11px;
    font-size: 0.74rem;
    gap: 5px;
  }
  .project-tab i { display: none; }
  .project-tab-content {
    padding: 18px 16px;
  }
  .quick-actions-grid {
    grid-template-columns: 1fr 1fr;
  }
  .budget-summary {
    grid-template-columns: 1fr 1fr;
  }
  .export-options-grid {
    grid-template-columns: 1fr;
  }
}

