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

:root {
  --primary:         #A72C31;
  --primary-dark:    #8B2228;
  --primary-light:   #f9ecec;
  --white:           #FFFFFF;
  --light-bg:        #F5F5F5;
  --dark-text:       #1a1a1a;
  --gray-text:       #666666;
  --border:          #e8e8e8;
  --shadow:          0 2px 8px rgba(0,0,0,.06);
  --shadow-md:       0 4px 16px rgba(0,0,0,.10);
  --shadow-hover:    0 8px 30px rgba(167,44,49,.12);
  --radius:          14px;
  --radius-sm:       8px;
  --radius-xs:       6px;

  --promotor:  #16a34a;
  --neutro:    #f59e0b;
  --detrator:  #dc2626;
  --pendente:  #94a3b8;
  --andamento: #2563eb;
  --concluido: #16a34a;

  /* Sidebar dark premium */
  --sidebar-bg:          #1C0A0C;
  --sidebar-hover:       #2E1014;
  --sidebar-active:      #A72C31;
  --sidebar-text:        #c9a8aa;
  --sidebar-text-active: #ffffff;
  --sidebar-border:      rgba(255,255,255,0.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--light-bg);
  color: var(--dark-text);
  min-height: 100vh;
  display: flex;
  font-size: 14px;
  line-height: 1.5;
}

/* ─── SIDEBAR ───────────────────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--sidebar-bg);
  border-right: none;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 12px 18px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo .logo-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sidebar-logo-img {
  width: 214px;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.crm-badge {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #A72C31;
  margin-top: 8px;
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 8px;
}

.sidebar-nav { padding: 12px 0; flex: 1; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--sidebar-text);
  opacity: .45;
  padding: 10px 20px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: all .18s;
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  border-radius: 0 2px 2px 0;
  transition: background .18s;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}
.nav-item:hover::before { background: var(--primary); }

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  font-weight: 600;
}
.nav-item.active::before { background: rgba(255,255,255,.4); }

.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--sidebar-border);
  font-size: 11px;
  color: var(--sidebar-text);
  opacity: .4;
  font-weight: 400;
}

/* ─── MAIN CONTENT ──────────────────────────────────────────────────────── */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid #f0f0f0;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.topbar-title {
  font-weight: 700;
  font-size: 20px;
  color: var(--dark-text);
}

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

.page-content {
  display: block;
  padding: 28px 32px;
  flex: 1;
  width: 100%;
  min-width: 0;
}

/* ─── BUTTONS ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .18s;
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 3px 10px rgba(167,44,49,.3);
}

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

.btn-ghost {
  background: transparent;
  color: var(--gray-text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--light-bg);
  color: var(--dark-text);
}

.btn-success {
  background: #16a34a;
  color: white;
  border-color: #16a34a;
}
.btn-success:hover { background: #15803d; }

.btn-danger {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}
.btn-danger:hover { background: #b91c1c; }

.btn-sm  { padding: 6px 12px; font-size: 12.5px; }
.btn-lg  { padding: 11px 22px; font-size: 15px; }
.btn-xl  { padding: 14px 28px; font-size: 16px; }

.btn-icon {
  padding: 7px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--gray-text);
  display: inline-flex;
  align-items: center;
  transition: all .18s;
}
.btn-icon:hover { background: var(--light-bg); color: var(--dark-text); }
.btn-icon svg { width: 15px; height: 15px; }

/* ─── BADGES ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2px;
}

.badge-promotor  { background: #dcfce7; color: #15803d; }
.badge-neutro    { background: #fef3c7; color: #b45309; }
.badge-detrator  { background: #fee2e2; color: #b91c1c; }

.badge-pendente  { background: #f1f5f9; color: #64748b; }
.badge-andamento { background: #dbeafe; color: #1d4ed8; }
.badge-concluido { background: #dcfce7; color: #15803d; }

.badge-lg { padding: 6px 18px; font-size: 14px; }

/* ─── CARDS ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #f0f0f0;
  overflow: hidden;
}

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

.card-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--dark-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg { color: var(--primary); width: 17px; height: 17px; }

.card-body { padding: 20px 22px; }

/* ─── STATS BAR ─────────────────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
}

/* Mantém retrocompatibilidade com .stat-chip — usa o mesmo visual rico */
.stat-chip,
.stat-card {
  background: white;
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border: 1px solid #f0f0f0;
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s;
  min-width: 0;
}

.stat-chip:hover,
.stat-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
}

/* Barra colorida à esquerda */
.stat-chip::before,
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
}

/* Usando data-type ou classes para cor da barra */
.stat-chip:nth-child(1)::before,
.stat-card.total::before   { background: #A72C31; }
.stat-chip:nth-child(2)::before,
.stat-card.promotor::before { background: #16a34a; }
.stat-chip:nth-child(3)::before,
.stat-card.neutro::before   { background: #f59e0b; }
.stat-chip:nth-child(4)::before,
.stat-card.detrator::before { background: #dc2626; }

.stat-chip .stat-icon,
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-chip .stat-icon.total,
.stat-card .stat-icon.total    { background: #f3f0ff; color: #7c3aed; }
.stat-chip .stat-icon.promotor,
.stat-card .stat-icon.promotor { background: #dcfce7; color: var(--promotor); }
.stat-chip .stat-icon.neutro,
.stat-card .stat-icon.neutro   { background: #fef3c7; color: #b45309; }
.stat-chip .stat-icon.detrator,
.stat-card .stat-icon.detrator { background: #fee2e2; color: var(--detrator); }

.stat-chip .stat-value,
.stat-card .stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--dark-text);
  line-height: 1;
}

.stat-chip .stat-label,
.stat-card .stat-label {
  font-size: 10px;
  color: var(--gray-text);
  margin-top: 3px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-chip > div:last-child,
.stat-card > div:last-child {
  min-width: 0;
}

/* ─── FILTERS BAR ───────────────────────────────────────────────────────── */
.filters-bar {
  background: white;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  border: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  background: #f8f8f8;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  gap: 8px;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
  transition: border-color .18s, background .18s;
}
.search-box:focus-within {
  border-color: var(--primary);
  background: var(--white);
}
.search-box svg { color: var(--gray-text); width: 15px; height: 15px; flex-shrink: 0; }
.search-box input {
  border: none;
  outline: none;
  padding: 9px 0;
  font-size: 13.5px;
  background: transparent;
  width: 100%;
  color: var(--dark-text);
  font-family: 'Inter', sans-serif;
}

select.filter-select {
  padding: 9px 12px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: #f8f8f8;
  color: var(--dark-text);
  cursor: pointer;
  outline: none;
  transition: border-color .18s, background .18s;
  font-family: 'Inter', sans-serif;
}
select.filter-select:focus {
  border-color: var(--primary);
  background: var(--white);
}

/* ─── CLIENT GRID ───────────────────────────────────────────────────────── */
.client-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.client-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  border: 1px solid #f0f0f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}

.client-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(167,44,49,.12);
}

.client-card-stripe {
  height: 6px;
}
.client-card-stripe.promotor { background: var(--promotor); }
.client-card-stripe.neutro   { background: var(--neutro); }
.client-card-stripe.detrator { background: var(--detrator); }

.client-card-body {
  padding: 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.client-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.client-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--light-bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
  padding: 5px;
}

.client-avatar-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.client-info { flex: 1; min-width: 0; }
.client-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--dark-text);
  line-height: 1.3;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-responsible {
  font-size: 12px;
  color: var(--gray-text);
  margin-bottom: 6px;
}

.client-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.nps-score-big {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.nps-score-big.promotor { color: var(--promotor); }
.nps-score-big.neutro   { color: var(--neutro); }
.nps-score-big.detrator { color: var(--detrator); }
.nps-score-big.none     { color: #d0d0d0; }

.nps-score-label {
  font-size: 11px;
  color: var(--gray-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}

.client-card-footer {
  padding: 14px 22px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

/* Botão "Ver Perfil" full-width no footer */
.client-card-footer .btn {
  width: 100%;
  justify-content: center;
}

/* ─── CLIENT PROFILE ────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--gray-text);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb svg { width: 13px; height: 13px; color: #ccc; }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  align-items: start;
}

.profile-main { display: flex; flex-direction: column; gap: 20px; }
.profile-side  { display: flex; flex-direction: column; gap: 20px; }

/* Header card */
.profile-header-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #f0f0f0;
  overflow: hidden;
}

.profile-header-top {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 26px 26px 20px;
  position: relative;
}

.profile-header-top::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 36px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.profile-logo-wrap {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.profile-logo {
  width: 78px;
  height: 78px;
  border-radius: 12px;
  object-fit: contain;
  background: white;
  border: 3px solid rgba(255,255,255,.35);
  padding: 5px;
}

.profile-logo-placeholder {
  width: 78px;
  height: 78px;
  border-radius: 12px;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 30px;
}

.profile-name-wrap { flex: 1; padding-bottom: 4px; }
.profile-client-name {
  font-weight: 800;
  font-size: 21px;
  color: white;
  line-height: 1.2;
  margin-bottom: 8px;
}
.profile-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.profile-header-body { padding: 22px 26px 20px; }

.profile-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.meta-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--gray-text);
  margin-bottom: 4px;
}
.meta-value {
  font-size: 13.5px;
  color: var(--dark-text);
  font-weight: 500;
}

.partners-list { display: flex; flex-wrap: wrap; gap: 6px; }
.partner-chip {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12.5px;
  color: var(--dark-text);
}

.profile-description {
  font-size: 13.5px;
  color: var(--gray-text);
  line-height: 1.65;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Profile action buttons */
.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ─── TABLE ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data-table th {
  background: var(--primary);
  padding: 10px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: white;
}

table.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--dark-text);
}

table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: #fafafa; }

/* ─── CHART CONTAINERS ───────────────────────────────────────────────────── */
.chart-container {
  position: relative;
  width: 100%;
}

.gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

/* ─── FEEDBACK CARDS ─────────────────────────────────────────────────────── */
.feedback-list { display: flex; flex-direction: column; gap: 12px; }

.feedback-item {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 16px 18px 14px;
  position: relative;
  border-left: 3px solid var(--primary);
}

.feedback-item::before {
  content: '\201C';
  position: absolute;
  top: 6px; left: 14px;
  font-size: 40px;
  color: var(--primary);
  opacity: .18;
  line-height: 1;
  font-family: Georgia, serif;
}

.feedback-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--dark-text);
  padding-top: 8px;
  font-style: italic;
}

.feedback-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray-text);
}

/* ─── PLANS ──────────────────────────────────────────────────────────────── */
.plan-list { display: flex; flex-direction: column; gap: 10px; }

.plan-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  transition: box-shadow .18s;
}

.plan-item:hover { box-shadow: var(--shadow-md); }

.plan-title {
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 3px;
}

.plan-desc {
  font-size: 12.5px;
  color: var(--gray-text);
  line-height: 1.5;
  margin-bottom: 8px;
}

.plan-dates {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--gray-text);
  align-items: center;
  flex-wrap: wrap;
}

.plan-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }

/* ─── AI SUMMARY ──────────────────────────────────────────────────────────── */
.ai-summary-box {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}

.ai-summary-text {
  font-size: 13.5px;
  line-height: 2;
  color: var(--dark-text);
  white-space: pre-line;
}

/* ─── FORM ────────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid.single { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

label.form-label {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--dark-text);
}

label.form-label .required { color: var(--primary); }

input.form-input,
select.form-input,
textarea.form-input {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--dark-text);
  background: var(--white);
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
  font-family: 'Inter', sans-serif;
}

input.form-input:focus,
select.form-input:focus,
textarea.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(167,44,49,.08);
}

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

/* Dynamic rows */
.dynamic-table { width: 100%; border-collapse: collapse; }
.dynamic-table th {
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-text);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.dynamic-table td { padding: 5px 4px; }
.dynamic-table td:last-child { width: 40px; }

.partner-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.partner-row input { flex: 1; }

/* Logo upload */
.logo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: all .18s;
}
.logo-upload-area:hover { border-color: var(--primary); background: var(--primary-light); }

.logo-preview-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.logo-preview {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  border: 1px solid var(--border);
  background: var(--light-bg);
  padding: 4px;
}

/* Form section */
.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}

.form-section-header {
  background: var(--light-bg);
  padding: 13px 18px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--dark-text);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-body { padding: 18px; }

/* ─── MODAL ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: translateY(-16px);
  transition: transform .2s;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal { transform: translateY(0); }

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

.modal-title {
  font-weight: 700;
  font-size: 15px;
}

.modal-body { padding: 18px 22px; }
.modal-footer {
  padding: 14px 22px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--white);
}

/* ─── STEPS EDITOR ─────────────────────────────────────────────────────────── */
.step-editor-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: #fafafa;
  margin-bottom: 10px;
}

.step-editor-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.step-number-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── TOASTS ────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  border-left: 4px solid;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  min-width: 280px;
  max-width: 400px;
  animation: slideIn .3s ease;
}

.toast.success { border-left-color: var(--promotor); }
.toast.error   { border-left-color: var(--detrator); }
.toast.info    { border-left-color: var(--andamento); }

.toast svg { flex-shrink: 0; width: 17px; height: 17px; }
.toast.success svg { color: var(--promotor); }
.toast.error svg   { color: var(--detrator); }
.toast.info svg    { color: var(--andamento); }

@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100px); }
}

/* ─── EMPTY STATE ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 44px 24px;
  color: var(--gray-text);
}

.empty-state svg {
  width: 52px;
  height: 52px;
  color: #d0d0d0;
  margin-bottom: 12px;
}

.empty-state p { font-size: 14px; }
.empty-state small { font-size: 12.5px; margin-top: 4px; display: block; }

/* ─── IMPORT MODAL ─────────────────────────────────────────────────────── */
.upload-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all .18s;
}
.upload-drop-zone:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-drop-zone svg { width: 38px; height: 38px; color: var(--gray-text); margin-bottom: 10px; }
.upload-drop-zone p { font-size: 13.5px; color: var(--gray-text); }
.upload-drop-zone strong { color: var(--primary); }

/* ─── SPINNER ───────────────────────────────────────────────────────────── */
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1100px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-side { order: -1; }
}

@media (max-width: 768px) {
  .sidebar { width: 56px; min-width: 56px; }
  .sidebar-logo, .nav-section-label, .logo-text, .nav-item span, .sidebar-footer { display: none; }
  .nav-item { padding: 12px; justify-content: center; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .client-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .profile-meta { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
}

/* ─── MISC ───────────────────────────────────────────────────────────────── */
.text-muted { color: var(--gray-text); }
.text-sm    { font-size: 12.5px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.cnpj-text {
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  color: var(--gray-text);
}

.section-anchor { scroll-margin-top: 80px; }

/* NPS Score pill */
.nps-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.nps-pill {
  padding: 7px 14px;
  border-radius: 20px;
  border: 2px solid var(--border);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  transition: all .18s;
  background: var(--white);
}
.nps-pill:hover { border-color: currentColor; }
.nps-pill.promotor { color: var(--promotor); }
.nps-pill.neutro   { color: var(--neutro); }
.nps-pill.detrator { color: var(--detrator); }
.nps-pill.selected.promotor { background: #dcfce7; border-color: var(--promotor); }
.nps-pill.selected.neutro   { background: #fef3c7; border-color: var(--neutro); }
.nps-pill.selected.detrator { background: #fee2e2; border-color: var(--detrator); }

/* ─── PRINT GLOBAL ───────────────────────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
  body { background: white; }
  .sidebar, .topbar, .btn, .modal-overlay { display: none !important; }
  .main-wrapper { display: block; }
  .page-content { padding: 0; }
}
