:root {
  --bg-dark: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #151f32;
  --bg-card-hover: #1c2a44;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.4);
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(37, 99, 235, 0.5);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px 0 rgba(37, 99, 235, 0.1);
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
}

.logo-text strong {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
}

/* BOTÕES GERAIS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  text-decoration: none;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.78rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: #93c5fd;
}

.btn-outline:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
}

.btn-white:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulse-btn {
  animation: subtle-pulse 3s infinite;
}

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

/* HERO SECTION */
.hero-section {
  position: relative;
  padding: 160px 0 100px;
  text-align: center;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 350px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(9, 13, 22, 0) 70%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.badge-online {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 54px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.stat-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* QUICK TOPICS / ATALHOS PARA O CHAT */
.quick-topics-section {
  padding: 40px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.section-tag {
  color: #60a5fa;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.quick-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.quick-topic-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-topic-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
  color: #93c5fd;
}

/* DORES / PROBLEMAS */
.pain-section, .services-section, .steps-section, .faq-section {
  padding: 90px 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.section-description {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.pain-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: var(--radius-lg);
  transition: all 0.25s ease;
}

.pain-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.4);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.pain-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.pain-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* SERVIÇOS */
.services-section {
  background: var(--bg-surface);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-focus);
}

.highlight-card {
  border-color: rgba(37, 99, 235, 0.6);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, var(--bg-card) 100%);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
}

.service-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: #94a3b8;
  width: fit-content;
}

.service-badge.gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.service-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.service-list {
  list-style: none;
  margin-bottom: 30px;
  flex-grow: 1;
}

.service-list li {
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.card-btn {
  width: 100%;
}

/* ==========================================================================
   VITRINE DE SISTEMAS DESENVOLVIDOS (PORTFÓLIO)
   ========================================================================== */
.projects-section {
  padding: 100px 0;
  position: relative;
  background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(15, 23, 42, 0.7) 50%, var(--bg-dark) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.project-showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-showcase-card:hover {
  border-color: rgba(37, 99, 235, 0.5);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(37, 99, 235, 0.2);
}

.project-cover-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  background: #090d16;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.project-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-showcase-card:hover .project-cover-img {
  transform: scale(1.05);
}

.project-cover-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0b1120 0%, #1e293b 100%);
}

.project-placeholder-code {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
}

.project-placeholder-text {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.project-category-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(8px);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-private-badge {
  position: absolute;
  top: 52px;
  right: 14px;
  background: rgba(245, 158, 11, 0.9);
  color: #111827;
  border: 1px solid rgba(253, 230, 138, 0.85);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-private-badge-top {
  top: 14px;
}

.project-content {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}

.project-description {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
  flex: 1;
  white-space: pre-line;
}

.project-action-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: auto;
}

.project-btn {
  flex: 1;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.projects-empty-card {
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 50px 32px;
}

.empty-glow-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.projects-empty-card h3 {
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 12px;
}

.projects-empty-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* PASSOS */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.step-num {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 auto 18px;
}

.step-card h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.steps-cta {
  text-align: center;
}

/* FAQ */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* BANNER FINAL */
.final-banner {
  padding: 80px 0;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  text-align: center;
}

.banner-inner h2 {
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.banner-inner p {
  font-size: 1.1rem;
  color: #bfdbfe;
  margin-bottom: 30px;
}

/* FOOTER */
.footer {
  background: #06090f;
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
}

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

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 8px;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: right;
}

.admin-link {
  display: inline-block;
  margin-top: 6px;
  color: #60a5fa;
  text-decoration: none;
  font-size: 0.8rem;
}

.admin-link:hover {
  text-decoration: underline;
}

/* ============================================================
   CHAT WIDGET FLUTUANTE
============================================================ */

/* Balão Proativo (Trigger) */
.chat-proactive-balloon {
  position: fixed;
  bottom: 96px;
  right: 28px;
  background: var(--bg-surface);
  border: 1px solid rgba(37, 99, 235, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  max-width: 290px;
  z-index: 9998;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: balloon-appear 0.4s ease forwards;
}

@keyframes balloon-appear {
  0% { opacity: 0; transform: translateY(12px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.close-balloon-btn {
  position: absolute;
  top: 4px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
}

.close-balloon-btn:hover {
  color: #fff;
}

.balloon-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.balloon-avatar {
  font-size: 1.8rem;
}

.balloon-text strong {
  display: block;
  font-size: 0.85rem;
  color: #93c5fd;
}

.balloon-text p {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.3;
  margin-top: 2px;
}

/* Botão Launcher */
.chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px var(--primary-glow);
  z-index: 9999;
  transition: transform 0.2s ease, background 0.2s ease;
}

.chat-launcher:hover {
  transform: scale(1.08);
  background: var(--primary-hover);
}

.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-dark);
}

/* Janela do Chat */
.chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  height: 540px;
  max-height: calc(100vh - 120px);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-window.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Header */
.chat-header {
  background: var(--bg-card);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.avatar-container {
  position: relative;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  background: rgba(37, 99, 235, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.chat-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: var(--accent-green);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
}

.chat-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.chat-header-subtitle {
  font-size: 0.75rem;
  color: #6ee7b7;
}

.chat-header-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
}

.chat-header-close:hover {
  color: #fff;
}

/* Lead Bar (Identificação Opcional) */
.chat-lead-bar {
  background: rgba(37, 99, 235, 0.1);
  border-bottom: 1px solid rgba(37, 99, 235, 0.2);
  padding: 8px 16px;
  font-size: 0.78rem;
}

.lead-bar-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #93c5fd;
  cursor: pointer;
}

.lead-edit-icon {
  font-size: 0.85rem;
}

.lead-form {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.lead-form input {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 8px;
  color: #fff;
  font-size: 0.75rem;
  outline: none;
}

.lead-form input:focus {
  border-color: var(--primary);
}

/* Mensagens */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #0c121e;
}

.msg-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  animation: msg-slide 0.2s ease;
}

@keyframes msg-slide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
}

.msg-time {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Visitante */
.msg-wrapper.msg-visitor {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-wrapper.msg-visitor .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 2px;
}

/* Admin */
.msg-wrapper.msg-admin {
  align-self: flex-start;
  align-items: flex-start;
}

.msg-wrapper.msg-admin .msg-bubble {
  background: var(--bg-card);
  color: #f1f5f9;
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 2px;
}

/* Sistema */
.msg-wrapper.msg-system {
  align-self: center;
  align-items: center;
  text-align: center;
  max-width: 90%;
}

.msg-wrapper.msg-system .msg-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Chips / Atalhos Rápidos */
.chat-chips {
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
}

.chat-chips::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  white-space: nowrap;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #93c5fd;
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.chip-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: var(--primary);
  color: #fff;
}

/* Input Form */
.chat-input-area {
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input-area input {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-input-area input:focus {
  border-color: var(--primary);
}

.chat-send-btn {
  background: var(--primary);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.chat-send-btn:hover {
  background: var(--primary-hover);
}

/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-cta-group {
    flex-direction: column;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links {
    display: none;
  }

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

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

  .project-action-row {
    flex-direction: column;
  }

  .project-btn {
    width: 100%;
  }

  .chat-window {
    width: calc(100vw - 20px);
    height: calc(100vh - 110px);
    right: 10px;
    bottom: 86px;
  }

  .chat-proactive-balloon {
    right: 16px;
    bottom: 88px;
    max-width: 270px;
  }
}
