/* Preview do chat de IA: placeholder do input -30% (10.5px -> 7.35px) sem mexer no texto digitado */
.chat-preview-input::placeholder {
  font-size: 7.35px;
}

/* Reset fundamental para ocupar 100% da tela */
html,
body,
#root {
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  /* Removemos o zoom que reduzia a escala visual do sistema */
  zoom: 1 !important;
  transform: scale(1);
  transform-origin: 0 0;
  -moz-transform: scale(1);
  -moz-transform-origin: 0 0;
}

/* Garantia de que containers Tailwind que usem h-screen ou h-full funcionem */
.h-screen {
  height: 100vh !important;
}

.h-full {
  height: 100% !important;
}

/* Scrollbars elegantes para não quebrar o layout */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Redução de escala para área de conteúdo - BLOCO 3 */
.content-area-scale {
  /* Redução global de escala de 20% para visual mais denso e profissional */
  transform: scale(0.9);
  transform-origin: top left;
  width: 111.11%;
  /* Compensa o scale(0.9) para preencher a largura total: 1 / 0.9 */
  height: 111.11%;
  /* Compensa o scale(0.9) para preencher a altura total */

  /* Reduções específicas de tipografia e espaçamento para maior precisão visual */
  font-size: 0.8rem;
  line-height: 1.25;
}

.content-area-scale h1 {
  font-size: 1.25rem !important;
  /* text-xl eq */
  letter-spacing: -0.025em;
}

.content-area-scale h2 {
  font-size: 1.125rem !important;
  /* text-lg eq */
}

.content-area-scale h3 {
  font-size: 0.9rem !important;
}

/* Redução de paddings internos via variável CSS para afetar componentes filhos se necessário */
.content-area-scale .p-8 {
  padding: 1rem !important;
}

.content-area-scale .p-6 {
  padding: 1rem !important;
}

.content-area-scale .p-4 {
  padding: 0.75rem !important;
}

.content-area-scale .gap-8 {
  gap: 1rem !important;
}

.content-area-scale .gap-6 {
  gap: 0.75rem !important;
}

.content-area-scale .gap-4 {
  gap: 0.5rem !important;
}

.content-area-scale .grid-cols-3 {
  gap: 0.75rem !important;
}

.content-area-scale .grid-cols-4 {
  gap: 0.75rem !important;
}

/* Ajuste fino para stat cards */
.content-area-scale .stat-card-value {
  font-size: 1.5rem !important;
  letter-spacing: -0.05em;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Remove scrollbars intrusivos na área skalada para não duplicar */
.content-area-scale::-webkit-scrollbar {
  display: none;
}

.content-area-scale {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ========================================
   GLASSMORPHISM PREMIUM - Dashboard
   ======================================== */

/* Glass Card Base */
.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 1.5rem;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 20px 40px rgba(59, 130, 246, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  transform: translateY(-2px);
}

/* Glass Card Variants */
.glass-card-blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.05));
  border-color: rgba(59, 130, 246, 0.2);
}

.glass-card-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(20, 184, 166, 0.05));
  border-color: rgba(16, 185, 129, 0.2);
}

.glass-card-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(234, 88, 12, 0.05));
  border-color: rgba(245, 158, 11, 0.2);
}

.glass-card-purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(168, 85, 247, 0.05));
  border-color: rgba(139, 92, 246, 0.2);
}

/* Staggered Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delays */
.stagger-1 { animation-delay: 0.05s; opacity: 0; }
.stagger-2 { animation-delay: 0.1s; opacity: 0; }
.stagger-3 { animation-delay: 0.15s; opacity: 0; }
.stagger-4 { animation-delay: 0.2s; opacity: 0; }
.stagger-5 { animation-delay: 0.25s; opacity: 0; }
.stagger-6 { animation-delay: 0.3s; opacity: 0; }
.stagger-7 { animation-delay: 0.35s; opacity: 0; }
.stagger-8 { animation-delay: 0.4s; opacity: 0; }

/* Dashboard Background Gradient */
.dashboard-gradient {
  background: linear-gradient(135deg,
    #f8fafc 0%,
    rgba(239, 246, 255, 0.6) 25%,
    rgba(238, 242, 255, 0.4) 50%,
    rgba(250, 245, 255, 0.3) 75%,
    #f8fafc 100%
  );
}

/* Stat value styling */
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Trend indicator */
.trend-positive {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.trend-negative {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ========================================
   CHAT CONTENT - Formatação Markdown
   ======================================== */

.chat-content {
  font-size: 0.75rem;
  line-height: 1.5;
}

.chat-content p {
  margin: 0.5em 0;
}

.chat-content p:first-child {
  margin-top: 0;
}

.chat-content p:last-child {
  margin-bottom: 0;
}

.chat-content strong {
  font-weight: 700;
}

.chat-content em {
  font-style: italic;
}

.chat-content ul,
.chat-content ol {
  margin: 0.5em 0;
  padding-left: 1.25em;
}

.chat-content li {
  margin: 0.25em 0;
}

.chat-content ul {
  list-style-type: disc;
}

.chat-content ol {
  list-style-type: decimal;
}

.chat-content h1,
.chat-content h2,
.chat-content h3,
.chat-content h4,
.chat-content h5,
.chat-content h6 {
  font-weight: 700;
  margin: 0.75em 0 0.25em 0;
  line-height: 1.3;
}

.chat-content h1 { font-size: 1.1em; }
.chat-content h2 { font-size: 1em; }
.chat-content h3 { font-size: 0.95em; }

.chat-content code {
  background: rgba(0, 0, 0, 0.1);
  padding: 0.125em 0.375em;
  border-radius: 0.25em;
  font-family: monospace;
  font-size: 0.9em;
}

.chat-content blockquote {
  border-left: 3px solid currentColor;
  opacity: 0.8;
  padding-left: 0.75em;
  margin: 0.5em 0;
  font-style: italic;
}

.chat-content hr {
  border: none;
  border-top: 1px solid currentColor;
  opacity: 0.2;
  margin: 0.75em 0;
}