/* ==========================================================================
   Alpha Prospect — Design tokens
   ========================================================================== */
:root {
  --bg: #F8FAFC;
  --bg-dot: rgba(15, 23, 42, 0.06);
  --surface: #FFFFFF;
  --surface-muted: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --primary: #00D18A;
  --primary-strong: #00B67A;
  --primary-soft: rgba(0, 209, 138, 0.10);
  --primary-soft-strong: rgba(0, 209, 138, 0.16);
  --primary-ring: rgba(0, 209, 138, 0.35);

  --ink: #0F172A;
  --ink-muted: #64748B;
  --ink-faint: #7C8AA0;

  --ink-deep: #020403;
  --ink-deep-2: #070B0A;

  --hot: #F97316;
  --hot-soft: rgba(249, 115, 22, 0.10);
  --warm: #D97706;
  --warm-soft: rgba(217, 119, 6, 0.10);
  --cold: #0284C7;
  --cold-soft: rgba(2, 132, 199, 0.10);

  --danger: #E11D48;
  --danger-soft: rgba(225, 29, 72, 0.08);
  --success: #16A34A;
  --success-soft: rgba(22, 163, 74, 0.08);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 8px 20px rgba(15, 23, 42, 0.10);
  --shadow-primary: 0 4px 14px rgba(0, 209, 138, 0.22);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  --mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

::selection {
  background: var(--primary-soft-strong);
  color: var(--ink);
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ==========================================================================
   Background texture
   ========================================================================== */
.bg-grid {
  background-image: radial-gradient(var(--bg-dot) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 100%);
}

.glow-orb {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: var(--primary);
  filter: blur(140px);
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}

.glow-orb.top {
  top: -260px;
  right: -160px;
}

.glow-orb.bottom {
  bottom: -260px;
  left: -160px;
  opacity: 0.07;
}

/* ==========================================================================
   Surfaces
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card-hover {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

/* ==========================================================================
   Métricas — barra unificada de sistema (substitui os 5 cartões soltos)
   ========================================================================== */
.metrics-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .metrics-bar {
    grid-template-columns: repeat(5, 1fr);
  }
}

.metric-cell {
  padding: 0.9rem 1.1rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.metric-cell:nth-child(2n) {
  border-right: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .metric-cell:last-child {
    border-right: none;
  }

  .metric-cell {
    border-bottom: none;
  }
}

@media (max-width: 1023px) {
  .metric-cell:nth-child(2n) {
    border-right: none;
  }

  .metric-cell:nth-last-child(-n+1) {
    border-bottom: none;
  }
}

.metric-cell .metric-icon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.metric-cell .metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.metric-cell .stat-value {
  font-family: var(--mono);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.metric-best {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.metric-best:hover {
  background: var(--surface-muted);
}

.surface-dark {
  background: var(--ink-deep);
  color: #F1F5F9;
  border: 1px solid var(--ink-deep-2);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
  background: var(--primary);
  color: #052E22;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-primary);
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

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

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.btn-danger-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-danger-ghost:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

.icon-chip {
  background: var(--ink-deep);
  border: 1px solid var(--ink-deep-2);
}

/* ==========================================================================
   Navbar — degradê verde escuro (bom contraste para o logo)
   ========================================================================== */
.app-header-dark {
  background: linear-gradient(120deg, #03110C 0%, #063D2B 55%, #00623F 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.app-header-dark #file-label,
.app-header-dark .text-ink-muted {
  color: rgba(255, 255, 255, 0.68);
}

.app-header-dark .badge-agency-pill {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.app-header-dark .btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
}

.app-header-dark .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.app-header-dark .btn-danger-ghost {
  background: rgba(225, 29, 72, 0.14);
  border-color: rgba(225, 29, 72, 0.4);
  color: #FCA5A5;
}

.app-header-dark .btn-danger-ghost:hover {
  background: rgba(225, 29, 72, 0.24);
  border-color: var(--danger);
  color: #FEE2E2;
}

/* ==========================================================================
   Upload zone (hero)
   ========================================================================== */
.landing-hero-copy {
  max-width: 42rem;
}

.landing-hero-eyebrow {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 209, 138, 0.28);
  background: linear-gradient(110deg, rgba(230, 251, 243, 0.96), rgba(239, 253, 248, 0.76));
  box-shadow: 0 8px 24px rgba(0, 209, 138, 0.1);
}

.landing-hero-eyebrow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 15%, rgba(255, 255, 255, 0.68) 50%, transparent 85%);
  transform: translateX(-115%);
  transition: transform 0.55s ease;
}

.landing-hero-copy:hover .landing-hero-eyebrow::after {
  transform: translateX(115%);
}

.landing-hero-title {
  max-width: 40rem;
  font-size: clamp(2.35rem, 4.7vw, 2.75rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.landing-hero-accent {
  background: linear-gradient(105deg, #00B67A 0%, #00D18A 45%, #0EA5A0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 28px rgba(0, 209, 138, 0.13);
}

.landing-hero-subtitle {
  max-width: 38rem;
  font-size: clamp(1rem, 1.55vw, 1.125rem);
}

.landing-hero-benefits {
  max-width: 38rem;
}

.landing-hero-card {
  min-height: 132px;
  border-color: rgba(148, 163, 184, 0.23);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 255, 251, 0.84));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055);
}

.landing-hero-card:hover {
  border-color: rgba(0, 209, 138, 0.34);
  box-shadow: 0 18px 34px rgba(0, 209, 138, 0.12);
}

.landing-hero-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.65rem;
  border: 1px solid rgba(0, 209, 138, 0.2);
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #E6FBF3, #F7FFFC);
  color: var(--primary-strong);
}

@media (max-width: 639px) {
  .landing-hero-title {
    font-size: clamp(2.25rem, 10vw, 2.6rem);
    letter-spacing: -0.05em;
  }

  .landing-hero-card {
    min-height: auto;
  }
}

.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--surface);
  transition: all 0.22s ease;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* Floating decorative cards in hero */
.float-card {
  position: absolute;
  animation: floatY 5s ease-in-out infinite;
  filter: drop-shadow(0 12px 24px rgba(15, 23, 42, 0.10));
}

.float-card.delay-1 {
  animation-delay: 0.6s;
}

.float-card.delay-2 {
  animation-delay: 1.2s;
}

@keyframes floatY {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .float-card {
    animation: none;
  }

  .fade-in {
    animation: none !important;
  }
}

/* ==========================================================================
   Principais segmentos (campaign-plan card)
   ========================================================================== */
.segments-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-faint);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}

.segments-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.segment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.segment-row:hover {
  background: var(--surface-muted);
  border-color: var(--border-strong);
}

.segment-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-count {
  flex-shrink: 0;
  min-width: 1.6rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

/* ==========================================================================
   Badges
   ========================================================================== */
/* Tags de status — retangulares com indicador, não mais em formato de pílula */
.badge-hot,
.badge-warm,
.badge-cold,
.badge-neutral {
  border-radius: 4px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-hot::before,
.badge-warm::before,
.badge-cold::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-hot {
  background: var(--hot-soft);
  color: var(--hot);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.badge-warm {
  background: var(--warm-soft);
  color: var(--warm);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-cold {
  background: var(--cold-soft);
  color: var(--cold);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-neutral {
  background: var(--surface-muted);
  color: var(--ink-muted);
  border: 1px solid var(--border);
  font-weight: 600 !important;
}

/* ==========================================================================
   Score ring
   ========================================================================== */
.score-ring {
  --score: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  flex-shrink: 0;
  background:
    radial-gradient(closest-side, var(--surface) 66%, transparent 67% 100%),
    conic-gradient(var(--primary) calc(var(--score) * 1%), var(--surface-muted) 0);
  box-shadow: inset 0 0 0 1px var(--border);
}



#lead-list::-webkit-scrollbar {
  width: 6px;
}

#lead-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

/* ==========================================================================
   SWOT / strengths & weaknesses
   ========================================================================== */
.strength-item {
  border-left: 3px solid var(--success);
  background: var(--success-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.weakness-item {
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ==========================================================================
   Roteiro / timeline
   ========================================================================== */
.step-card {
  position: relative;
  padding-left: 1.75rem;
}

.step-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.timeline-line {
  position: absolute;
  left: 4px;
  top: 1.4rem;
  bottom: -0.5rem;
  width: 2px;
  background: var(--border);
}

/* ==========================================================================
   Tabs (lead detail)
   ========================================================================== */
.tab-btn {
  position: relative;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-faint);
  font-weight: 600;
  border-radius: 0;
  padding: 0.6rem 0.15rem;
  margin: 0 0.85rem 0 0;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  font-size: 0.8rem;
  background: transparent;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ==========================================================================
   Inputs
   ========================================================================== */
input[type="search"],
input[type="text"],
input[type="password"],
select {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.6rem 36PX;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input[type="search"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

input::placeholder {
  color: var(--ink-faint);
}

/* Campo de busca com ícone à esquerda — garante espaço para o ícone não
   ficar em cima do texto/placeholder (a regra genérica de input acima
   reseta o padding-left vindo da classe utilitária pl-9) */
#search-input,
#export-markdown-search {
  padding-left: 2.25rem !important;
}

/* Select — sharper corners, custom chevron, more solid presence */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding-right: 2.4rem;
  cursor: pointer;
  background-color: var(--surface-muted);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

select:hover {
  border-color: var(--ink-faint);
}

select:focus {
  background-color: var(--surface);
}

/* ==========================================================================
   Stats
   ========================================================================== */
.stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Copy button state
   ========================================================================== */
.copy-btn.copied {
  color: var(--primary-strong);
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* ==========================================================================
   Skeleton loading
   ========================================================================== */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: shimmer 1.4s infinite;
}

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

/* ==========================================================================
   Toasts
   ========================================================================== */
#toast-stack {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(360px, calc(100vw - 2rem));
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  animation: toastIn 0.25s ease;
  border-left: 3px solid var(--primary);
}

.toast.toast-error {
  border-left-color: var(--danger);
}

.toast.toast-success {
  border-left-color: var(--primary);
}

.toast.toast-warning {
  border-left-color: var(--warm);
}

.toast.toast-out {
  animation: toastOut 0.2s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
}

/* ==========================================================================
   File processing overlay
   ========================================================================== */
#processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(4px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Misc
   ========================================================================== */
.fade-in {
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .layout-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================================================== 
   Groq AI script generation
   ========================================================================== */
.btn-ai {
  background: var(--ink-deep);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  border: 1px solid var(--ink-deep-2);
  box-shadow: var(--shadow-sm);
}

.btn-ai:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}

.btn-ai:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.ai-script-box {
  margin-top: 1rem;
  background: linear-gradient(135deg, rgba(0, 209, 138, 0.08), rgba(2, 4, 3, 0.03));
  border: 1px solid rgba(0, 209, 138, 0.20);
  border-radius: var(--radius-md);
  padding: 0.9rem;
}

.spinner-mini {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ========================================================================== 
   AI script size selector
   ========================================================================== */
.ai-size-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ai-size-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  border-radius: 8px;
  padding: 0.42rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  transition: all 0.16s ease;
}

.ai-size-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.ai-size-btn.active {
  color: #052E22;
  background: var(--primary);
  border-color: var(--primary-strong);
  box-shadow: var(--shadow-sm);
}

/* ========================================================================== 
   AI opportunity analysis
   ========================================================================== */
.ai-opportunity-header {
  background: linear-gradient(135deg, rgba(0, 209, 138, 0.10), rgba(2, 4, 3, 0.03));
  border: 1px solid rgba(0, 209, 138, 0.22);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.service-recommendation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.service-recommendation-card:hover {
  border-color: var(--primary-ring);
  box-shadow: var(--shadow-md);
}

.insight-number {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  border: 1px solid rgba(0, 209, 138, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ========================================================================== 
   IA configurável no navegador — UI/UX refinado
   ========================================================================== */
.ai-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  animation: aiModalFadeIn 0.2s ease;
}

.ai-modal.hidden {
  display: none;
}

@keyframes aiModalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.ai-modal-card {
  width: min(100vh, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px -12px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05);
  animation: aiModalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 4px solid var(--primary);
}

.ai-modal-card::-webkit-scrollbar {
  width: 6px;
}

.ai-modal-card::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
}

/* Safety net for short/laptop viewports: compact further instead of scrolling */
@media (max-height: 840px) {
  .ai-modal {
    padding: 0.6rem;
  }

  .ai-modal-header {
    padding: 0.85rem 1.5rem 0.65rem;
  }

  .ai-modal-header p.text-sm {
    display: none;
  }

  .ai-modal-body {
    padding: 0.85rem 1.5rem 0.9rem;
  }

  .ai-modal-body>div {
    margin-bottom: 0.65rem !important;
  }

  .ai-provider-card {
    min-height: 52px;
    padding: 0.4rem 0.5rem;
  }

  .ai-test-area {
    padding: 0.6rem 0.85rem;
  }
}

@media (max-height: 640px) {
  .ai-provider-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .ai-provider-card-badge {
    display: none;
  }

  .ai-provider-card {
    min-height: 38px;
  }
}

@keyframes aiModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   CRM Details Modal — separado do modal de IA
   ========================================================================== */
.crm-details-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  animation: aiModalFadeIn 0.2s ease;
}

.crm-details-modal.hidden {
  display: none;
}

.crm-details-modal-card {
  width: min(1280px, calc(100vw - 2rem));
  max-width: 1280px;
  max-height: calc(100vh - 3rem);
  overflow: hidden;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px -12px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05);
  animation: aiModalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 4px solid var(--primary);
}

.crm-details-modal-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, #FFFFFF, #FCFDFE);
}

.crm-details-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding: 1rem 1.75rem;
}

.crm-details-modal-body::-webkit-scrollbar {
  width: 6px;
}

.crm-details-modal-body::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
}

.crm-details-modal-footer {
  flex-shrink: 0;
  padding: 0.75rem 1.75rem 1rem;
  background: var(--surface);
}

@media (max-width: 768px) {
  .crm-details-modal {
    padding: 0.75rem;
    align-items: stretch;
  }

  .crm-details-modal-card {
    width: 100%;
    max-height: calc(100vh - 1.5rem);
  }

  .crm-details-modal-header {
    padding: 1rem 1.1rem 0.9rem;
  }

  .crm-details-modal-body {
    padding: 0.9rem 1.1rem;
  }

  .crm-details-modal-footer {
    padding: 0.9rem 1.1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .crm-details-modal-footer>div {
    width: 100%;
  }

  .crm-details-modal-footer button {
    width: 100%;
    justify-content: center;
  }
}

.ai-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, #FFFFFF, #FCFDFE);
}

.ai-modal-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid rgba(0, 209, 138, 0.22);
  color: var(--primary-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 209, 138, 0.1);
}

.ai-modal-close-btn {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #64748B;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  flex-shrink: 0;
}

.ai-modal-close-btn:hover {
  background: #FFE4E6;
  border-color: #FDA4AF;
  color: #E11D48;
  transform: rotate(90deg);
}

.ai-modal-body {
  padding: 1.25rem 1.75rem 1.5rem;
}

.ai-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.ai-field-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FFFFFF;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-field-card:focus-within {
  border-color: var(--primary-ring);
  box-shadow: var(--shadow-md);
}

.ai-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

/* Wrapper kept for possible future affordances around the select */
.ai-select-wrap {
  position: relative;
  margin-top: 0.55rem;
}

.ai-select-wrap select {
  width: 100%;
  font-size: 0.88rem;
  font-weight: 600;
  background-color: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  transition: all 0.2s ease;
}

.ai-select-wrap select:focus {
  border-color: var(--primary);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Provider grid — cards clicáveis */
.ai-provider-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 560px) {
  .ai-provider-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ai-provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  min-height: 72px;
  justify-content: space-between;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.ai-provider-card:hover {
  border-color: var(--primary-strong);
  background: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ai-provider-card.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(255, 255, 255, 0.95) 100%);
  box-shadow: 0 4px 14px rgba(0, 209, 138, 0.16), inset 0 0 0 1px rgba(0, 209, 138, 0.1);
  transform: translateY(-1px);
}

.ai-provider-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-provider-card-icon {
  color: var(--ink-faint);
  transition: color 0.2s ease, transform 0.2s ease;
}

.ai-provider-card:hover .ai-provider-card-icon {
  transform: scale(1.1);
}

.ai-provider-card.active .ai-provider-card-icon {
  color: var(--primary-strong);
}

.ai-provider-card-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94A3B8;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.ai-provider-card-status.is-ok {
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.ai-provider-card-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.ai-provider-card-badge {
  font-size: 0.65rem;
  color: var(--ink-muted);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ai-provider-card.active .ai-provider-card-badge {
  color: var(--primary-strong);
}

/* Key input com toggle de visibilidade */
.ai-key-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 0.55rem;
}

.ai-key-input {
  padding-right: 2.5rem !important;
  font-family: var(--mono) !important;
  font-size: 0.85rem;
  border-radius: 8px;
  width: 100%;
}

.ai-key-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease;
  border-radius: 6px;
}

.ai-key-toggle:hover {
  color: var(--ink);
  background-color: #F1F5F9;
}

.ai-key-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  border: 1px solid transparent;
}

.ai-key-dot--empty {
  color: #64748B;
  border-color: #CBD5E1;
  background: #F1F5F9;
}

.ai-key-dot--empty::before {
  content: '✕';
  font-size: 0.75rem;
  font-weight: 800;
}

.ai-key-dot--ok {
  color: #059669;
  border-color: #A7F3D0;
  background: #ECFDF5;
}

.ai-key-dot--ok::before {
  content: '✓';
  font-size: 0.75rem;
  font-weight: 800;
}

/* Test result area */
.ai-test-area {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: border-color 0.2s ease;
}

.ai-test-area:hover {
  border-color: var(--border-strong);
}

.ai-test-area button {
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.ai-test-area button:hover {
  background: var(--primary);
  color: #052E22;
  border-color: var(--primary-strong);
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}

.ai-test-area button:active {
  transform: translateY(0);
}

.ai-test-result {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.2s ease;
}

.ai-test-result.success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.ai-test-result.error {
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #9F1239;
}

.ai-test-result.pending {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #475569;
}

.ai-test-result.hidden {
  display: none;
}

/* Help text */
.ai-help {
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.ai-help strong {
  display: inline-flex;
  align-items: center;
  background: #FFF7ED;
  border: 1px solid #FFEDD5;
  color: #C2410C;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ai-status {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.ai-status-ok {
  color: var(--success);
  font-weight: 600;
}

.ai-status-error {
  color: var(--danger);
  font-weight: 500;
}

.ai-warning {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .85rem;
  border-radius: var(--radius-sm);
  background: var(--warm-soft);
  border: 1px solid rgba(217, 119, 6, 0.18);
  color: var(--ink-muted);
  font-size: .82rem;
  line-height: 1.45;
}

#ai-save-settings {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #052E22;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.7rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 209, 138, 0.25);
  border: 1px solid rgba(0, 209, 138, 0.15);
  transition: all 0.2s ease;
}

#ai-save-settings:hover {
  background: linear-gradient(135deg, #02e096 0%, #00a46e 100%);
  box-shadow: 0 6px 16px rgba(0, 209, 138, 0.35);
  transform: translateY(-1px);
}

#ai-save-settings:active {
  transform: translateY(0);
}

#ai-remove-key {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  color: #64748B;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  transition: all 0.2s ease;
}

#ai-remove-key:hover {
  background: #FEF2F2;
  border-color: #FEE2E2;
  color: #EF4444;
  transform: translateY(-1px);
}

#ai-remove-key:active {
  transform: translateY(0);
}

.ai-modal-body .btn-ghost {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.ai-modal-body .btn-ghost:hover {
  transform: translateY(-1px);
}

.ai-modal-body .btn-ghost:active {
  transform: translateY(0);
}

/* Upload action */
.upload-actions .btn-primary {
  min-width: 210px;
  justify-content: center;
}

.upload-actions .btn-ghost {
  min-width: 170px;
  justify-content: center;
}

.paste-list-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
/* ==========================================================================
   Extension download / install modal
   ========================================================================== */
.extension-install-modal-card {
  max-width: 920px;
}

.extension-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-soft), #fff 70%);
}

.extension-steps-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.extension-install-steps {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.extension-install-steps li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.extension-install-steps span {
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid var(--primary-ring);
}

.extension-install-steps p {
  margin: 0;
}

@media (max-width: 520px) {
  .extension-download-card {
    align-items: stretch;
    flex-direction: column;
  }

  .extension-download-card .btn-primary {
    width: 100%;
  }
}

/* Visual installation guide */
.extension-install-modal-card {
  width: min(960px, 100%);
  max-width: 960px;
}

.extension-visual-guide-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.extension-guide-note {
  font-size: 0.72rem;
  color: var(--ink-muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  white-space: nowrap;
}

.extension-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.extension-visual-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.extension-visual-grid img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
}

.extension-visual-grid figcaption {
  padding: 0.65rem 0.75rem;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.extension-visual-grid figcaption strong,
.extension-visual-grid figcaption code {
  color: var(--ink);
  font-weight: 700;
}

.extension-visual-grid figcaption code {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05rem 0.3rem;
}

@media (max-width: 760px) {
  .extension-visual-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   Install visual guide interactions
   ========================================================================== */
.extension-visual-grid img[data-install-print-preview] {
  cursor: zoom-in;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.extension-visual-grid img[data-install-print-preview]:hover {
  transform: scale(1.015);
  opacity: 0.96;
}

.chrome-extensions-link {
  color: var(--primary-strong);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.chrome-extensions-link:hover {
  color: var(--primary);
}

.install-print-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.install-print-lightbox.hidden {
  display: none;
}

.install-print-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 3, 0.78);
  backdrop-filter: blur(6px);
}

.install-print-lightbox-card {
  position: relative;
  z-index: 1;
  width: min(94vw, 1280px);
  max-height: 92vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.install-print-lightbox-card img {
  width: 100%;
  max-height: calc(92vh - 6rem);
  object-fit: contain;
  border-radius: var(--radius-lg);
  background: #F8FAFC;
  border: 1px solid var(--border);
}

.install-print-lightbox-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: center;
}

.install-print-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.install-print-lightbox-close:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}


/* ==========================================================================
   Avisos internos do sistema (substituem os cartões verdes translúcidos)
   ========================================================================== */
.system-callout {
  border-left: 3px solid var(--primary);
  background: var(--surface-muted);
}

/* ==========================================================================
   Site visibility cards
   ========================================================================== */
.site-missing-card {
  width: 100%;
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger);
  background: var(--surface);
  color: #9F1239;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
}


/* ==========================================================================
   Lead compact info layout — grid de registro (colunas uniformes, sem
   "ziguezague" de larguras diferentes; ficha de sistema real)
   ========================================================================== */
.lead-compact-info {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.lead-compact-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

@media (min-width: 640px) and (max-width: 1279px) {
  .lead-compact-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .lead-compact-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.lead-info-card {
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: transparent;
  border-radius: 0;
  padding: 0.75rem 1rem;
  min-height: 4.3rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.lead-info-card:hover {
  background: var(--surface-muted);
}

/* Remove borda direita duplicada na última coluna de cada breakpoint */
.lead-compact-main .lead-info-card:nth-child(4n) {
  border-right: none;
}

@media (min-width: 640px) and (max-width: 1279px) {
  .lead-compact-main .lead-info-card:nth-child(4n) {
    border-right: 1px solid var(--border);
  }

  .lead-compact-main .lead-info-card:nth-child(3n) {
    border-right: none;
  }
}

@media (max-width: 639px) {

  .lead-compact-main .lead-info-card:nth-child(4n),
  .lead-compact-main .lead-info-card:nth-child(3n) {
    border-right: 1px solid var(--border);
  }

  .lead-compact-main .lead-info-card:nth-child(2n) {
    border-right: none;
  }
}

.lead-info-label {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-info-value {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0.35rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.lead-compact-address-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.lead-compact-address-row .lead-info-card {
  border-bottom: none;
  border-right: none;
}

.lead-info-address {
  min-height: 3.6rem;
}


/* ==========================================================================
   Advanced lead filters
   ========================================================================== */
.lead-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.filter-toggle-btn,
.filter-clear-btn {
  min-height: 2.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.filter-toggle-btn:hover,
.filter-clear-btn:hover {
  border-color: rgba(0, 209, 138, 0.35);
  background: var(--primary-soft);
  color: var(--primary-strong);
}



.filter-count-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--primary);
  color: #052E22;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0 0.35rem;
}

.filter-clear-btn {
  grid-column: 1 / -1;
  min-height: 2.45rem;
  font-size: 0.82rem;
}

.advanced-filter-panel {
  border: 1px solid var(--border);
  border-top: 2px solid var(--primary);
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  box-shadow: none;
}

.filter-section+.filter-section {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.filter-section-title {
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.filter-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 0.45rem 0.68rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.filter-chip:hover {
  border-color: rgba(0, 209, 138, 0.32);
  color: var(--ink);
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #052E22;
  box-shadow: none;
}

.filter-chip.chip-hot.active {
  background: #FFF7ED;
  color: #C2410C;
  border-color: #FDBA74;
}

.filter-chip.chip-warm.active {
  background: #FEF9C3;
  color: #854D0E;
  border-color: #FDE047;
}

.filter-chip.chip-cold.active {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #93C5FD;
}

.filter-chip.chip-opportunity.active {
  background: #FFE4E6;
  color: #BE123C;
  border-color: #FDA4AF;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.active-filter-label {
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.active-filter-chip {
  border: 1px solid rgba(0, 209, 138, 0.22);
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.active-filter-chip:hover {
  background: rgba(0, 209, 138, 0.18);
}

@media (max-width: 520px) {
  .lead-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .filter-chip {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* ========================================================================== 
   Diagnóstico de oportunidade comercial
   ========================================================================== */
.opportunity-score-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opportunity-mini-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.35rem;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.opportunity-diagnostic-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.opportunity-diagnostic-hot {
  border-left-color: var(--hot);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.06), var(--surface) 54%);
}

.opportunity-diagnostic-warm {
  border-left-color: var(--warm);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.06), var(--surface) 54%);
}

.opportunity-diagnostic-cold {
  border-left-color: var(--cold);
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.055), var(--surface) 54%);
}

.opportunity-diagnostic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 0.85rem;
  margin-bottom: 0.9rem;
}

.opportunity-diagnostic-kicker {
  color: var(--primary-strong);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}

.opportunity-diagnostic-header h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.opportunity-diagnostic-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0 1.1rem;
  margin-bottom: 0.85rem;
  position: relative;
}

.opportunity-diagnostic-grid>div:first-child {
  padding-right: 1.1rem;
  border-right: 1px solid var(--border);
}

@media (max-width: 720px) {
  .opportunity-diagnostic-grid>div:first-child {
    padding-right: 0;
    border-right: none;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.8rem;
  }
}

.opportunity-diagnostic-label {
  color: var(--ink-faint);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.22rem;
}

.opportunity-diagnostic-text {
  color: var(--ink-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.opportunity-breakdown-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 0.85rem;
}

.opportunity-breakdown-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(0, 209, 138, 0.2);
  background: var(--primary-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.36rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 750;
}

.opportunity-breakdown-chip strong {
  color: var(--primary-strong);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.opportunity-diagnostic-empty {
  margin: 0.75rem 0 0.85rem;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.opportunity-diagnostic-note {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.lead-info-opportunity .lead-info-value {
  font-family: var(--mono);
}

@media (max-width: 720px) {

  .opportunity-diagnostic-header,
  .opportunity-diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .opportunity-diagnostic-header {
    flex-direction: column;
  }
}

/* ========================================================================== 
   Custom Select for Approach Type
   ========================================================================== */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  outline: none;
}

.custom-select-trigger:hover {
  border-color: var(--primary);
  background: rgba(0, 209, 138, 0.04);
}

.custom-select-trigger:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.custom-select-trigger-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.custom-select-selected-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.custom-select-arrow {
  color: var(--ink-faint);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.custom-select-wrapper.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 90;
  max-height: 290px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select-wrapper.open .custom-select-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.custom-select-options {
  padding: 0.35rem;
}

.custom-select-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-select-option:hover {
  background: var(--primary-soft);
}

.custom-select-option.selected {
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  padding-left: calc(0.85rem - 3px);
}

.option-icon {
  margin-top: 0.15rem;
  color: var(--primary);
  flex-shrink: 0;
}

.option-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.option-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}

.option-desc {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
  line-height: 1.45;
  white-space: normal;
}

/* ==========================================================================
   Ajuda da Alcateia (Sales Assistant Chat) Styles
   ========================================================================== */

.wolf-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px;
  background: linear-gradient(120deg, #03110C 0%, #063D2B 55%, #00623F 100%);
  border: 1px solid rgba(0, 209, 138, 0.35);
  border-radius: 9999px;
  color: #FFFFFF;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 12px rgba(0, 209, 138, 0.15);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wolf-btn-text {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) {
  .wolf-floating-btn:hover {
    transform: translateY(-3px);
    padding: 10px 16px;
    border-color: var(--primary);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2), 0 0 18px rgba(0, 209, 138, 0.3);
  }

  .wolf-floating-btn:hover .wolf-btn-text {
    max-width: 200px;
    opacity: 1;
    margin-left: 8px;
  }
}

.wolf-floating-btn:active {
  transform: translateY(-1px);
}

.wolf-floating-btn .wolf-btn-icon {
  font-size: 1.15rem;
  animation: wolf-wobble 3s infinite ease-in-out;
}

@keyframes wolf-wobble {

  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(10deg);
  }
}

.wolf-chat-panel {
  position: fixed;
  bottom: 85px;
  right: 24px;
  width: 400px;
  height: 620px;
  max-height: calc(100vh - 120px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.28s;
  transform: translateY(24px) scale(0.95);
  opacity: 0;
  pointer-events: none;
}

.wolf-chat-panel.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.wolf-chat-header {
  background: linear-gradient(120deg, #03110C 0%, #063D2B 55%, #00623F 100%);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.wolf-close-btn {
  background: transparent;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.wolf-close-btn:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.1);
}

.wolf-context-banner {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  flex-shrink: 0;
}

.wolf-change-context-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.wolf-change-context-btn:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.wolf-context-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 8px;
  right: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  max-height: 250px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: wolf-fade-in 0.18s ease;
}

@keyframes wolf-fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wolf-leads-list {
  overflow-y: auto;
  flex: 1;
}

.wolf-lead-dropdown-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.wolf-lead-dropdown-item:last-child {
  border-bottom: none;
}

.wolf-lead-dropdown-item:hover {
  background-color: var(--primary-soft);
}

.wolf-lead-dropdown-item.active {
  background-color: var(--primary-soft-strong);
  border-left: 3px solid var(--primary);
  padding-left: 11px;
}

.wolf-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wolf-message-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.wolf-message-wrapper.user {
  align-self: flex-end;
}

.wolf-message-wrapper.assistant {
  align-self: flex-start;
}

.wolf-message-bubble {
  padding: 10px 14px;
  font-size: 0.815rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.wolf-message-wrapper.user .wolf-message-bubble {
  background: var(--primary);
  color: #03251B;
  border-radius: 14px 14px 2px 14px;
  box-shadow: 0 2px 4px rgba(0, 209, 138, 0.12);
  font-weight: 500;
}

.wolf-message-wrapper.assistant .wolf-message-bubble {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wolf-message-meta {
  font-size: 0.65rem;
  color: var(--ink-faint);
  margin-top: 4px;
  padding: 0 4px;
}

.wolf-message-wrapper.user .wolf-message-meta {
  text-align: right;
}

.wolf-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.wolf-action-btn {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.wolf-action-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.wolf-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.wolf-chat-textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 8px 14px;
  resize: none;
  font-size: 0.815rem;
  line-height: 1.4;
  outline: none;
  background: var(--surface-muted);
  color: var(--ink);
  transition: all 0.2s ease;
  max-height: 80px;
}

.wolf-chat-textarea:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.wolf-send-btn {
  background: var(--primary);
  color: #03251B;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: var(--shadow-primary);
}

.wolf-send-btn:hover {
  background: var(--primary-strong);
  transform: scale(1.06);
}

.wolf-send-btn:disabled {
  background: var(--surface-muted);
  color: var(--ink-faint);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.wolf-alert-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 55;
  animation: wolf-fade-in 0.2s ease;
}

.wolf-context-empty-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  color: var(--ink-muted);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  margin: 20px;
}

.wolf-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
}

.wolf-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--ink-faint);
  border-radius: 50%;
  animation: wolf-typing-bounce 1.4s infinite ease-in-out both;
}

.wolf-typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.wolf-typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes wolf-typing-bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1.0);
  }
}

/* ==========================================================================
   Exportador de Markdown / TXT para IA Styles
   ========================================================================== */

.export-lead-row {
  display: flex;
  align-items: start;
  padding: 12px 16px;
  cursor: pointer;
  background-color: var(--surface);
  transition: background-color 0.15s ease;
}

.export-lead-row:hover {
  background-color: var(--primary-soft);
}

.export-lead-row.selected {
  background-color: var(--primary-soft-strong);
}

.export-lead-checkbox-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  margin-top: 2px;
}

.export-lead-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.export-lead-info-wrap {
  flex: 1;
  min-width: 0;
  margin-left: 12px;
}

.export-lead-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.export-lead-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}

.export-lead-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  margin-top: 4px;
}

.export-lead-badge-temp {
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 9999px;
  font-size: 0.65rem;
}

.export-lead-badge-temp.quente {
  background: var(--hot-soft);
  color: var(--hot);
}

.export-lead-badge-temp.morno {
  background: var(--warm-soft);
  color: var(--warm);
}

.export-lead-badge-temp.frio {
  background: var(--cold-soft);
  color: var(--cold);
}

.export-lead-score {
  font-weight: 700;
  color: var(--ink-muted);
}

.export-lead-opp {
  color: var(--primary-strong);
  font-weight: 500;
}

.export-lead-details-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 4px;
}

.export-lead-cat {
  font-weight: 500;
  color: var(--ink-muted);
}

.export-lead-phone {
  font-weight: 500;
  color: var(--primary);
}

/* ==========================================================================
   CRM Local (Kanban, Colunas e Cards) Styles
   ========================================================================== */

#app-nav-tabs button {
  outline: none;
}

.crm-warning-alert {
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.05);
}

.crm-kanban-board {
  min-height: 500px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.crm-kanban-column {
  width: 290px;
  flex-shrink: 0;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 280px);
  min-height: 420px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.crm-kanban-column-header {
  padding: 12px 16px;
  background: #FFFFFF;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}

.crm-kanban-column-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.crm-kanban-card-count {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--ink-faint);
  color: var(--ink-muted);
  padding: 1.5px 6px;
  border-radius: 9999px;
}

.crm-kanban-column-cards {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card Individual */
.crm-card {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.crm-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 209, 138, 0.08);
}

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

.crm-card-value {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary-strong);
  background: var(--primary-soft);
  padding: 1px 6px;
  border-radius: 9999px;
}

.crm-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.crm-card-category {
  font-size: 0.68rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.crm-card-problems {
  font-size: 0.65rem;
  color: var(--ink-muted);
  background: #F8FAFC;
  border-left: 2px solid var(--primary-soft-strong);
  padding: 3.5px 8px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.3;
}

.crm-card-next-contact {
  font-size: 0.65rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

.crm-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.crm-card-action-btn {
  flex: 1;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.crm-kanban-empty {
  text-align: center;
  padding: 24px 8px;
  font-size: 0.68rem;
  color: var(--ink-faint);
  font-style: italic;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  pointer-events: none;
}

/* Drag and drop premium com SortableJS */
.crm-card {
  cursor: grab;
}

.sortable-ghost {
  opacity: 0.4;
  background-color: var(--primary-soft) !important;
  border: 2px dashed var(--primary) !important;
}

.sortable-drag {
  cursor: grabbing !important;
  box-shadow: var(--shadow-xl) !important;
  transform: rotate(2deg);
}

.crm-kanban-column-cards {
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  border-radius: var(--radius-md);
}


/* ========================================================================== 
   CRM — alinhamento dos ícones/setas dos filtros
   Mantém a seta afastada do texto e centralizada no lado direito.
   ========================================================================== */
#crm-filter-temp,
#crm-filter-status,
#crm-filter-problem,
#crm-filter-service {
  padding-left: 0.75rem !important;
  padding-right: 2.75rem !important;
  background-position: right 0.85rem center !important;
  background-size: 15px 15px !important;
  line-height: 1.25rem;
}

#crm-filter-temp {
  min-width: 12.5rem;
}

#crm-filter-status {
  min-width: 10.5rem;
}

#crm-filter-problem {
  min-width: 13.25rem;
}

#crm-filter-service {
  min-width: 10.75rem;
}

@media (max-width: 640px) {

  #crm-filter-temp,
  #crm-filter-status,
  #crm-filter-problem,
  #crm-filter-service {
    width: 100%;
    min-width: 0;
  }
}

/* ==========================================================================
   Analysis Panel Isolated Classes (Camada 1)
   ========================================================================== */
.analysis-page {}

.analysis-layout {}

.analysis-sidebar {}

.analysis-main {}

@media (min-width: 1024px) {
  .analysis-layout {
    display: grid !important;
    grid-template-columns: 340px minmax(0, 1fr) !important;
    align-items: start;
  }

  .analysis-sidebar,
  .analysis-main {
    grid-column: span 1 !important;
  }

  .analysis-sidebar {
    position: sticky;
    top: 88px;
    height: calc(100vh - 120px);
    max-height: 640px;
    /* Limit to show exactly 5 leads */
    z-index: 50;
    /* Garante que elementos absolutos dentro dela cubram o main */
  }

  .analysis-sidebar>.analysis-card {
    height: 100%;
  }
}

.analysis-stats {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .analysis-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .analysis-stats {
    grid-template-columns: 1fr 1fr 1.8fr;
  }
}

.analysis-metric-cell {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background-color 0.15s ease;
}

@media (min-width: 640px) {
  .analysis-metric-cell:nth-child(odd) {
    border-right: 1px solid var(--border);
  }
}

@media (min-width: 1024px) {
  .analysis-metric-cell {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }

  .analysis-metric-cell:last-child {
    border-right: none;
  }

  .analysis-metric-cell:nth-child(odd) {
    border-right: 1px solid var(--border);
  }
}

.analysis-metric-cell.clickable {
  cursor: pointer;
}

.analysis-metric-cell.clickable:hover {
  background: var(--surface-muted);
}

.analysis-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.analysis-metric-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.analysis-metric-value {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.analysis-metric-subtext {
  font-size: 0.65rem;
  color: var(--ink-muted);
  margin-top: 0.2rem;
  font-weight: 500;
}

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

@media (max-width: 1024px) {
  .analysis-layout {
    grid-template-columns: 1fr !important;
  }
}

.analysis-profile-panel {
  max-height: calc(480vh);
  overflow-y: auto;
}

.analysis-profile-panel::-webkit-scrollbar {
  width: 6px;
}

.analysis-profile-panel::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.analysis-lead-row {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.15s ease, border-left-color 0.15s ease;
  border-left: 3px solid transparent;
}

.analysis-lead-row:hover {
  background: var(--surface-muted);
}

.analysis-lead-row.active {
  background: #f0fdf4;
  border-left-color: #10b981;
}

.analysis-lead-row.active h4 {
  font-weight: 700;
  color: #064e3b;
}

.analysis-lead-score {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--surface-muted);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
}

.analysis-lead-row.active .analysis-lead-score {
  background: #d1fae5;
  color: #047857;
}

/* ==========================================================================
   Lead Filters Full View (Camada 10 - UI/UX Refactor)
   ========================================================================== */

/* Bloqueio de scroll da página */
html.filters-open,
body.filters-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.filters-open {
  scrollbar-gutter: stable;
}

body.filters-open .wolf-floating-btn {
  visibility: hidden;
  pointer-events: none;
}

/* Camada de desfoque sobre a análise */
.filters-backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(245, 248, 247, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.2s ease, visibility 0.2s;
  border-radius: var(--radius-xl);
}

.filters-backdrop.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lead-filters-view {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  bottom: auto;
  height: auto;
  max-height: calc(100vh - 120px);
  background-color: var(--surface);
  border: 1px solid var(--border);
  z-index: 50;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15), 0 0 15px rgba(0, 0, 0, 0.05);
}

.lead-filters-view.hidden {
  display: flex !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
}

.lead-filters-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: var(--surface);
  flex-shrink: 0;
}

.lead-filters-content {
  overflow-y: auto;
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  align-items: start;
  gap: 1.25rem;
  background: #fafafa;
}

@media (min-width: 900px) {
  .lead-filters-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .lead-filters-content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.lead-filters-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.015);
  display: flex;
  flex-direction: column;
}

.lead-filters-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

/* ========================================================================== 
   Quick Search Premium UI
   ========================================================================== */

/* Dropdown Autocomplete Items */
.qs-autocomplete-item {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

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

.qs-autocomplete-item:hover,
.qs-autocomplete-item.active {
  background-color: var(--primary-soft);
  color: var(--primary-strong);
}

.qs-autocomplete-item-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--ink-faint);
  transition: color 0.15s ease;
}

.qs-autocomplete-item:hover .qs-autocomplete-item-icon,
.qs-autocomplete-item.active .qs-autocomplete-item-icon {
  color: var(--primary);
}

.qs-autocomplete-category {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  background-color: var(--border);
  color: var(--ink-muted);
  border-radius: 4px;
  font-weight: 600;
  margin-left: auto;
}

/* Chips Populares */
.qs-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.65rem;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.qs-chip:hover {
  background-color: var(--primary-soft);
  border-color: rgba(0, 209, 138, 0.3);
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.qs-chip i {
  color: var(--primary);
}

/* ==========================================================================
   Quick Search Modal — unified structure (scoped to .qs-modal-card only,
   so other .ai-modal instances elsewhere in the app are unaffected)
   ========================================================================== */

/* Fixes the old `width: min(100vh, 100%)` inherited from .ai-modal-card,
   which tied the modal's width to the viewport's HEIGHT and caused the
   card to shrink/wrap unpredictably (and sometimes overflow into a
   scrollbar) on short viewports. Width is now a deliberate, fixed value,
   independent of viewport height — same pattern already used by
   .extension-install-modal-card elsewhere in this file. */
.qs-fs-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  animation: qsFsFade 0.25s ease;
}

body.qs-modal-open {
  overflow: hidden;
}

.qs-fs-modal.hidden {
  display: none !important;
}

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

.qs-fs-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(241, 248, 244, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 0;
  cursor: pointer;
}

/* Grid decorativa */
.qs-fs-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: none;
}

/* Halos verdes */
.qs-fs-halo {
  position: fixed;
  width: min(52vw, 620px);
  aspect-ratio: 1;
  height: auto;
  border-radius: 50%;
  background: var(--primary, #00D18A);
  filter: blur(160px);
  display: none;
  z-index: 1;
  pointer-events: none;
}
.qs-fs-halo--top    { top: -220px; left: -180px; }
.qs-fs-halo--bottom { bottom: -240px; right: -160px; opacity: 0.16; }

/* ---------- Close button ---------- */
.qs-fs-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #D9E5DE;
  color: #5E6E65;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(10px);
}
.qs-fs-close:hover {
  background: #F1F8F4;
  border-color: #9ED8BD;
  color: #164A32;
  transform: none;
}

.qs-fs-close:focus-visible,
.qs-fs-submit:focus-visible,
.qs-fs-chips .qs-chip:focus-visible,
.qs-fs-autocomplete .qs-autocomplete-item:focus-visible {
  outline: 3px solid rgba(124, 255, 200, 0.9);
  outline-offset: 3px;
}

/* ---------- Shell / content ---------- */
.qs-fs-shell {
  position: relative;
  z-index: 5;
  width: min(980px, 100%);
  min-height: min(640px, calc(100dvh - 2.5rem));
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: auto;
  padding: 0;
  background:
    radial-gradient(circle at 5% 5%, rgba(0, 209, 138, 0.08), transparent 32%),
    #FFFFFF;
  border: 1px solid #E1EAE5;
  border-radius: 16px;
  box-shadow: 0 26px 80px -32px rgba(9, 35, 22, 0.36);
  animation: qsFsIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ---------- Header ---------- */
.qs-fs-header {
  text-align: left;
  color: #18261E;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0;
  border: 0;
}

.qs-fs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  border: none;
  color: #078453;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.qs-fs-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00D18A;
  box-shadow: 0 0 0 4px rgba(0, 209, 138, 0.25);
  animation: qsFsPulse 1.8s ease-in-out infinite;
}
@keyframes qsFsPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.4); }
}

.qs-fs-title {
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #15231B;
  max-width: 520px;
  margin: 0;
}
.qs-fs-title-accent {
  background: linear-gradient(135deg, #009E69 0%, #00C987 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.qs-fs-subtitle {
  font-size: 0.95rem;
  color: #607067;
  max-width: 480px;
  line-height: 1.5;
  margin: 0;
}

.qs-fs-search-area {
  display: flex;
  flex: 1;
  padding: 2.5rem;
  order: initial;
}

.qs-fs-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  width: 100%;
  gap: 3rem;
  align-items: stretch;
}

.qs-fs-intro,
.qs-fs-form-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.qs-fs-intro {
  justify-content: center;
  max-width: 390px;
}

.qs-fs-form-panel {
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  border: 1px solid #D8EBE0;
  border-radius: 16px;
  background: #F7FBF8;
  box-shadow: inset 0 1px 0 #FFFFFF;
}

/* ---------- Search bar ---------- */
.qs-fs-searchbar {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 1rem;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.qs-fs-field {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-radius: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}
.qs-fs-field:hover,
.qs-fs-field:focus-within {
  background: transparent;
}

.qs-fs-field:focus-within {
  box-shadow: none;
}

.qs-fs-field[data-invalid] {
  box-shadow: none;
}

.qs-fs-field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #26382D;
  text-transform: none;
  letter-spacing: -0.01em;
}
.qs-fs-field-icon {
  width: 0.9rem;
  height: 0.9rem;
  color: #009E69;
}

.qs-fs-field-step {
  display: none;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(124, 255, 200, 0.14);
  color: #087A50;
  font-size: 0.62rem;
  line-height: 1;
}

.qs-fs-input-wrap {
  position: relative;
}

.qs-fs-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #B9D7C7 !important;
  border-radius: 12px;
  background-color: #FFFFFF !important;
  background-image: none !important;
  min-height: 54px;
  font-size: 0.98rem;
  font-weight: 500;
  color: #1A2D22 !important;
  -webkit-text-fill-color: #1A2D22;
  padding: 0.55rem 0.85rem;
  outline: none;
}
.qs-fs-input::placeholder {
  color: #7B9184 !important;
  opacity: 1;
  font-weight: 400;
}
.qs-fs-field:focus-within .qs-fs-input {
  border-color: #00A96F !important;
  background-color: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(0, 209, 138, 0.16);
}
.qs-fs-field[data-invalid] .qs-fs-input {
  border-color: #E46A73 !important;
}
.qs-fs-input:-webkit-autofill,
.qs-fs-input:-webkit-autofill:hover,
.qs-fs-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #1A2D22;
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset;
  transition: background-color 9999s ease-out 0s;
}

.qs-fs-divider {
  display: none;
}

.qs-fs-action {
  display: flex;
  align-items: center;
  padding: 0;
  margin-top: 1.75rem;
}

.qs-fs-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 100%;
  width: 100%;
  min-height: 54px;
  padding: 0 1.1rem;
  border: none;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: #062317;
  background: linear-gradient(135deg, #00D18A 0%, #6AF0BB 100%);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow:
    0 12px 25px -18px rgba(0, 209, 138, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}
.qs-fs-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 14px 30px -18px rgba(0, 209, 138, 1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.qs-fs-submit svg {
  width: 1rem;
  height: 1rem;
}
.qs-fs-submit:active:not(:disabled) {
  transform: translateY(0);
}
.qs-fs-submit:disabled {
  color: rgba(17, 19, 17, 0.48);
  background: rgba(241, 244, 242, 0.45);
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}

.qs-fs-search-status {
  min-height: 1.15rem;
  margin: 0;
  padding: 0;
  color: #68786F;
  font-size: 0.78rem;
  text-align: left;
  margin-top: 0.85rem;
}

.qs-fs-search-status.is-ready {
  color: #087A50;
}

.qs-fs-search-status.is-error {
  color: #C2414A;
}

/* Autocomplete alinhado à superfície clara do modal */
.qs-fs-autocomplete {
  position: absolute;
  top: calc(100% + 0.85rem);
  left: -0.4rem;
  right: -0.4rem;
  background: #FFFFFF;
  border: 1px solid #CBE4D6;
  border-radius: 12px;
  box-shadow: 0 22px 40px -18px rgba(13, 54, 33, 0.28);
  max-height: 320px;
  overflow-y: auto;
  z-index: 20;
  padding: 0.35rem;
}
.qs-fs-autocomplete .qs-autocomplete-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #EDF3EF;
  background: transparent;
  font: inherit;
  text-align: left;
  color: #26382D;
  border-radius: 10px;
  margin-bottom: 2px;
}
.qs-fs-autocomplete .qs-autocomplete-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.qs-fs-autocomplete .qs-autocomplete-item:hover,
.qs-fs-autocomplete .qs-autocomplete-item.active,
.qs-fs-autocomplete .qs-autocomplete-item:focus-visible {
  background: #EAF8F0;
  color: #087A50;
}
.qs-fs-autocomplete .qs-autocomplete-item-icon {
  color: #7B9184;
}
.qs-fs-autocomplete .qs-autocomplete-item:hover .qs-autocomplete-item-icon,
.qs-fs-autocomplete .qs-autocomplete-item.active .qs-autocomplete-item-icon {
  color: #00D18A;
}
.qs-fs-autocomplete .qs-autocomplete-category {
  background: #EEF6F1;
  color: #597065;
}

/* ---------- Suggestions ---------- */
.qs-fs-suggestions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
  text-align: left;
}
.qs-fs-suggestions-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #6B7E73;
}
.qs-fs-suggestions-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  color: #31443A;
}
.qs-fs-suggestions-hint {
  font-size: 0.75rem;
  color: #718177;
}

.qs-fs-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 0.6rem;
  max-width: none;
}
/* Chips com aparência glass (sobrescreve .qs-chip só dentro deste modal) */
.qs-fs-chips .qs-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  background: #FFFFFF;
  border: 1px solid #D5E3DB;
  color: #33453A;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  border-radius: 8px;
  backdrop-filter: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.qs-fs-chips .qs-chip:hover {
  background: #EAF8F0;
  border-color: #7BCFA5;
  color: #087A50;
  transform: translateY(-2px);
}
.qs-fs-chips .qs-chip[aria-pressed="true"] {
  background: #DDF5E8;
  border-color: #40B981;
  color: #087A50;
  box-shadow: 0 6px 18px -10px rgba(0, 158, 105, 0.38);
}
.qs-fs-chips .qs-chip i {
  color: #009E69;
}

/* ---------- Footer ---------- */
.qs-fs-footer {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem 1.5rem;
  padding-top: 0.15rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}
.qs-fs-footer-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.qs-fs-footer-item i {
  color: #00D18A;
}
.qs-fs-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 0.15rem 0.45rem;
  font-family: var(--mono, monospace);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  margin-right: 0.3rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .qs-fs-shell {
    min-height: 0;
  }
  .qs-fs-search-area {
    padding: 2rem;
  }
  .qs-fs-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .qs-fs-form-panel {
    padding: 1.5rem;
  }
  .qs-fs-searchbar {
    grid-template-columns: 1fr;
    padding: 0.5rem;
    gap: 0.35rem;
    border-radius: 20px;
  }
  .qs-fs-field {
    padding: 0.75rem 1rem;
  }
  .qs-fs-divider {
    width: 90%;
    height: 1px;
    justify-self: center;
    background: linear-gradient(90deg, transparent, #E2E8F0, transparent);
  }
  .qs-fs-action {
    padding: 0.25rem 0 0.15rem;
  }
  .qs-fs-submit {
    width: 100%;
    min-height: 50px;
  }
  .qs-fs-autocomplete {
    left: 0;
    right: 0;
  }
}

@media (max-width: 520px) {
  .qs-fs-modal {
    padding: 0.75rem;
    align-items: flex-start;
  }
  .qs-fs-shell {
    width: 100%;
    margin: 3.5rem auto 1rem;
    padding: 0;
  }
  .qs-fs-header {
    padding: 0;
  }
  .qs-fs-search-area {
    gap: 1rem;
    padding: 1.25rem;
  }
  .qs-fs-title {
    font-size: clamp(2rem, 10vw, 2.4rem);
  }
  .qs-fs-subtitle {
    font-size: 0.92rem;
  }
  .qs-fs-footer {
    gap: 0.8rem 1.25rem;
    font-size: 0.75rem;
  }
  .qs-fs-footer-item:last-child {
    display: none;
  }
  .qs-fs-suggestions-header {
    flex-wrap: wrap;
    gap: 0.2rem 0.45rem;
  }
  .qs-fs-chips {
    gap: 0.45rem;
  }
  .qs-fs-chips .qs-chip {
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
  }
}

/* Motion-safe fallback */
@media (prefers-reduced-motion: reduce) {
  .qs-fs-modal,
  .qs-fs-shell,
  .qs-fs-eyebrow-dot,
  .qs-fs-close,
  .qs-fs-submit,
  .qs-fs-chips .qs-chip {
    animation: none !important;
    transition: none !important;
  }
}
