/* ══════════════════════════════════════════════════════════════
   v35 — SIDEBAR TUTORIAL LINK
   ══════════════════════════════════════════════════════════════ */

.sidebar-help-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  margin-bottom: 6px;
}
.sidebar-help-link:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.06);
}

/* ══════════════════════════════════════════════════════════════
   v35 — HELP SYSTEM
   ══════════════════════════════════════════════════════════════ */

.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  position: relative;
  top: -1px;
  line-height: 1;
  padding: 0;
}
.help-icon:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.help-popup {
  position: fixed;
  z-index: 9999;
  width: 320px;
  background: var(--bg-1);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}
.help-popup.help-popup-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.help-popup-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-3);
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.help-popup-close:hover { color: var(--text-1); }
.help-popup-icon {
  font-size: 22px;
  margin-bottom: 6px;
  line-height: 1;
}
.help-popup-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
  padding-right: 24px;
}
.help-popup-body {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 10px;
}
.help-popup-tip {
  background: var(--bg-2);
  border-left: 3px solid #d97706;
  border-radius: 0 6px 6px 0;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 8px;
}
.help-popup-tip-label {
  display: block;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #d97706;
  margin-bottom: 4px;
}
.help-popup-example {
  background: var(--bg-2);
  border-left: 3px solid var(--brand);
  border-radius: 0 6px 6px 0;
  padding: 8px 10px;
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.5;
  font-style: italic;
}
.help-popup-example-label {
  display: block;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand);
  margin-bottom: 4px;
  font-style: normal;
}

/* ══════════════════════════════════════════════════════════════
   v35 — ONBOARDING MODAL
   ══════════════════════════════════════════════════════════════ */

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}
.onboarding-modal {
  background: var(--bg-1);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  border: 1px solid var(--border);
}
.onboarding-progress {
  height: 3px;
  background: var(--bg-3);
}
.onboarding-progress-bar {
  height: 100%;
  background: var(--brand);
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.onboarding-body {
  padding: 36px 36px 28px;
  min-height: 280px;
}
.onboarding-step { display: none; }
.onboarding-step.active { display: block; animation: fadeInUp 0.3s ease; }

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

.onboarding-emoji { font-size: 48px; margin-bottom: 16px; line-height: 1; }
.onboarding-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 10px;
  line-height: 1.3;
}
.onboarding-sub {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 20px;
}
.onboarding-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.onboarding-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.onboarding-list li .ob-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 0;
}
.onboarding-highlight {
  background: var(--bg-2);
  border: 1.5px solid var(--brand);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.6;
}
.onboarding-highlight strong { color: var(--brand); }
.onboarding-footer {
  padding: 16px 36px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}
.onboarding-dots { display: flex; gap: 6px; }
.onboarding-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bg-3);
  transition: background 0.2s, width 0.2s;
  cursor: pointer;
}
.onboarding-dot.active {
  background: var(--brand);
  width: 20px;
  border-radius: 4px;
}
.onboarding-nav { display: flex; gap: 8px; align-items: center; }
.onboarding-skip {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-3);
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 0.15s;
}
.onboarding-skip:hover { color: var(--text-2); }

/* ══════════════════════════════════════════════════════════════
   v35 — MÓDULO GESTOR & RBAC ROLE BADGES
   ══════════════════════════════════════════════════════════════ */

.topbar-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-role-badge.badge-super_admin,
.topbar-role-badge.badge-admin {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.topbar-role-badge.badge-gestor {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.topbar-role-badge.badge-executivo {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

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

.gestor-screen { padding: 0; }

.gestor-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, var(--brand) 0%, #1d4ed8 100%);
  border-radius: 14px;
  padding: 28px 28px 24px;
  margin-bottom: 24px;
  color: #fff;
}
.gestor-hero-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
  padding: 3px 8px;
  display: inline-block;
  margin-bottom: 10px;
}
.gestor-hero-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}
.gestor-hero-sub {
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.5;
  max-width: 340px;
}
.gestor-hero-right { flex-shrink: 0; text-align: right; }
.gestor-platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 16px;
}
.gestor-platform-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.gestor-hero-stats { display: flex; gap: 16px; }
.gestor-hero-stat { text-align: center; }
.gestor-hero-stat span { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; }
.gestor-hero-stat small { font-size: 10px; opacity: 0.75; }

.gestor-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gestor-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.gestor-kpi-card {
  background: var(--bg-1);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.gestor-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.gestor-kpi-icon { font-size: 20px; margin-bottom: 4px; }
.gestor-kpi-value { font-size: 22px; font-weight: 800; font-family: var(--font-mono); line-height: 1.1; margin-bottom: 2px; }
.gestor-kpi-label { font-size: 10.5px; font-weight: 700; color: var(--text-2); margin-bottom: 3px; }
.gestor-kpi-sub { font-size: 10px; color: var(--text-3); line-height: 1.3; }

.gestor-funnel-card {
  background: var(--bg-1);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.gestor-funnel-row {
  display: grid;
  grid-template-columns: 100px 1fr 60px 80px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.gestor-funnel-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.gestor-funnel-bar-wrap { background: var(--bg-3); border-radius: 4px; height: 10px; overflow: hidden; }
.gestor-funnel-bar { height: 100%; border-radius: 4px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1); min-width: 4px; }
.gestor-funnel-val { font-size: 12px; font-weight: 700; font-family: var(--font-mono); color: var(--text-1); text-align: right; }
.gestor-funnel-rate { font-size: 10px; color: var(--text-3); text-align: right; }
.gestor-funnel-benchmarks { display: flex; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.gestor-benchmark {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}
.gestor-benchmark.ok   { background: rgba(5,150,105,0.1);  color: #059669; border: 1px solid rgba(5,150,105,0.25); }
.gestor-benchmark.warn { background: rgba(217,119,6,0.1);  color: #d97706; border: 1px solid rgba(217,119,6,0.25); }
.gestor-benchmark.bad  { background: rgba(220,38,38,0.1);  color: #dc2626; border: 1px solid rgba(220,38,38,0.25); }
.gestor-benchmark-ref { font-size: 10px; font-weight: 400; opacity: 0.8; }

.gestor-chart-card { background: var(--bg-1); border: 1.5px solid var(--border); border-radius: 12px; padding: 20px 20px 14px; }
.gestor-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 100px;
  padding-bottom: 24px;
  position: relative;
}
.gestor-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; position: relative; }
.gestor-bar-group { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 1px; }
.gestor-bar-seg { width: 28%; min-height: 2px; border-radius: 2px 2px 0 0; }
.gestor-bar-day { position: absolute; bottom: 0; font-size: 9px; color: var(--text-3); font-family: var(--font-mono); }
.gestor-bar-empty .gestor-bar-group { opacity: 0.2; }
.gestor-no-data { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; color: var(--text-3); line-height: 1.6; }
.gestor-chart-legend { display: flex; align-items: center; font-size: 11px; color: var(--text-3); margin-top: 8px; }
.gestor-legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

.gestor-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gestor-card { background: var(--bg-1); border: 1.5px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.gestor-card-title { font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 14px; }

.gestor-metric-list { display: flex; flex-direction: column; gap: 10px; }
.gestor-metric-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.gestor-metric-label { flex: 1; font-size: 12px; color: var(--text-2); min-width: 120px; }
.gestor-metric-val { font-size: 14px; font-weight: 800; font-family: var(--font-mono); }
.gestor-metric-ok   { color: #059669; }
.gestor-metric-warn { color: #d97706; }
.gestor-metric-sub { font-size: 10.5px; color: var(--text-3); width: 100%; }

.gestor-roi-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  border-radius: 14px;
  padding: 24px 24px 20px;
  color: #fff;
}
[data-theme="light"] .gestor-roi-card {
  background: linear-gradient(135deg, #1e293b 0%, #1e3a5f 100%);
}
.gestor-roi-header { margin-bottom: 20px; }
.gestor-roi-title { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.gestor-roi-sub { font-size: 12.5px; opacity: 0.7; line-height: 1.5; }
.gestor-roi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.gestor-roi-item {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
}
.gestor-roi-num { font-size: 24px; font-weight: 900; color: #60a5fa; margin-bottom: 6px; font-family: var(--font-mono); }
.gestor-roi-label { font-size: 11px; opacity: 0.75; line-height: 1.4; }
.gestor-roi-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  opacity: 0.7;
}
.gestor-roi-cta .btn-primary { opacity: 1; flex-shrink: 0; }

.gestor-modules-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.gestor-module-card {
  background: var(--bg-1);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 14px 12px;
  transition: border-color 0.15s, transform 0.15s;
}
.gestor-module-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.gestor-module-icon { font-size: 22px; margin-bottom: 6px; }
.gestor-module-title { font-size: 12.5px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.gestor-module-desc { font-size: 11px; color: var(--text-3); line-height: 1.5; }

@media (max-width: 900px) {
  .gestor-kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .gestor-roi-grid { grid-template-columns: repeat(2, 1fr); }
  .gestor-modules-grid { grid-template-columns: repeat(2, 1fr); }
  .gestor-hero { flex-direction: column; }
  .gestor-hero-right { text-align: left; }
  .gestor-hero-stats { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .gestor-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .gestor-two-col { grid-template-columns: 1fr; }
  .gestor-funnel-row { grid-template-columns: 80px 1fr 50px; }
  .gestor-funnel-rate { display: none; }
  .gestor-roi-cta { flex-direction: column; align-items: flex-start; }
}
