/* ── dashboard.css — Akino Systems ── */
/* ═══════════════════════════════════════════
   DASHBOARD — redesign
═══════════════════════════════════════════ */

/* Welcome bar */
.dash-welcome {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--sp-6); gap: var(--sp-4); flex-wrap: wrap;
  animation: fadeUp .45s cubic-bezier(.16,1,.3,1) both;
  animation-delay: .02s;
  position: relative; z-index: 200;
}
.dash-welcome-l {}
.dash-greeting {
  font-size: 26px; font-weight: 600; color: var(--text);
  letter-spacing: -.7px; line-height: 1.15;
}
.dash-greeting-sub {
  font-size: var(--text-sm); color: var(--muted); margin-top: var(--sp-1);
  display: flex; align-items: center; gap: var(--sp-2);
}
.dash-greeting-sub::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); opacity: .85;
  flex-shrink: 0;
}
.dash-welcome-r { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; margin-top: var(--sp-1); }

/* Date controls — image 2 style */
.date-control-group { display: flex; align-items: center; gap: 6px; }
.date-ctrl-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-family: 'Geist', sans-serif; font-size: 12.5px; font-weight: 400;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--s1); color: var(--text); transition: all .15s;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.date-ctrl-btn:hover { background: var(--s2); border-color: var(--border2); }
.date-ctrl-btn svg { color: var(--muted); flex-shrink: 0; }
.date-ctrl-btn .caret { color: var(--muted); margin-left: 2px; }
.date-ctrl-divider { width: 1px; height: 18px; background: var(--border); }
.export-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-family: 'Geist', sans-serif; font-size: 12.5px; font-weight: 500;
  cursor: pointer; border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg); transition: all .15s;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.export-btn:hover { opacity: .85; }

/* Period dropdown */
.period-dd-wrap { position: relative; }
.period-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--s1); border: 1px solid var(--border2);
  border-radius: var(--radius); width: 160px;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  z-index: 9100; animation: fadeUp .18s cubic-bezier(.16,1,.3,1) both;
  overflow: hidden; display: none;
}
.period-dropdown.open { display: block; }
.period-dd-item {
  padding: 8px 14px; font-size: 13px; color: var(--text);
  cursor: pointer; transition: background .1s; display: flex; align-items: center; gap: 8px;
}
.period-dd-item:hover { background: var(--s2); }
.period-dd-item.active { color: var(--text); font-weight: 500; }
.period-dd-item.active::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink); flex-shrink: 0;
}
.period-dd-item:not(.active)::before {
  content: ''; width: 5px; height: 5px; flex-shrink: 0;
}

/* Dashboard tabs — image 2 pill style */
.dash-tabs {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 24px; overflow-x: auto;
  padding-bottom: 2px;
}
.dash-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: 13px; font-weight: 400;
  color: var(--muted); cursor: pointer; border: 1px solid transparent;
  background: none; font-family: 'Geist', sans-serif;
  border-radius: 7px; transition: all .15s; white-space: nowrap;
  animation: tabIn .35s cubic-bezier(.16,1,.3,1) both;
}
.dash-tab:nth-child(1) { animation-delay: .1s; }
.dash-tab:nth-child(2) { animation-delay: .15s; }
.dash-tab:nth-child(3) { animation-delay: .2s; }
.dash-tab:nth-child(4) { animation-delay: .25s; }
@keyframes tabIn { from { opacity:0; transform:translateX(-5px); } to { opacity:1; transform:translateX(0); } }
.dash-tab:hover { color: var(--text); background: var(--s2); }
.dash-tab.active {
  color: var(--text); font-weight: 500;
  background: var(--s1); border-color: var(--border2);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.dash-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 17px; padding: 0 5px;
  border-radius: 5px; font-size: 10.5px; font-weight: 500;
  background: var(--s3); color: var(--muted); font-family: 'Geist Mono', monospace;
}
.dash-tab.active .dash-tab-badge { background: var(--s2); color: var(--text); }

/* Tab panels */
.dash-tab-panel { display: none; }
.dash-tab-panel.active { display: block; animation: fadeUp .3s cubic-bezier(.16,1,.3,1) both; }

/* Summary cards — oculta/mostra com fade dependendo da aba */
#summary-cards {
  transition: opacity .2s, max-height .25s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
#summary-cards.hidden {
  opacity: 0;
  max-height: 0 !important;
  margin-bottom: 0 !important;
  pointer-events: none;
}

/* Summary cards — image 1 style */
/* ══════════════════════════════════════════════════════════
   KPI CARDS v1.0.97 — Clareza, hierarquia, leitura rápida
   ══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   KPI GRID v1.1.12 — 3 cards: leads(2fr) · clientes(1fr) · taxa(1fr)
   Estilo sum-card idêntico ao Comercial
   ═══════════════════════════════════════════════════════════ */

.kpi-grid-new {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
  min-width: 0;
  overflow: hidden;
}

/* Cards KPI — sem borda colorida, identidade monocromática */
.sum-card--accent {
  position: relative;
}

/* Número maior no card de destaque */
.sum-card-value--lg {
  font-size: 34px !important;
  letter-spacing: -1.5px !important;
}

/* Dot de status nos footers */
.kpi-footer-dot {
  width: 6px; height: 6px;
  border-radius: 50%; flex-shrink: 0;
}
.kpi-dot--neutral { background: var(--dim); }
.kpi-dot--up      { background: var(--green); }
.kpi-dot--down    { background: var(--red); }

#kpi-leads, #kpi-clientes, #kpi-receita { font-variant-numeric: tabular-nums; }

/* ── Keyframes ── */

@keyframes kpiCardIn {
  from { opacity: 0; transform: translateY(14px) scale(.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes kpiNumIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════
   SUM-CARD — usado exclusivamente pelo Comercial (cm-kpi-row)
   ══════════════════════════════════════════════════════════ */
.sum-card {
  background: var(--card-bg); padding: 16px 18px 12px;
  display: flex; flex-direction: column; gap: 0;
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  animation: cardIn .55s cubic-bezier(.16,1,.3,1) both;
  transition: box-shadow .15s;
}
.sum-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }
body.dark .sum-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.25); }

/* Card de destaque (leads) — fundo levemente mais rico */
.sum-card--accent {
  background: var(--s1);
  position: relative;
}
body.dark .sum-card--accent { background: var(--s2); }

/* Ícone de cada card KPI */
.sum-card-ico {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--s2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text);
  opacity: .9;
}
body.dark .sum-card-ico {
  background: var(--s3);
  border-color: var(--border2);
}
.sum-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.sum-card-label {
  font-size: 10px; color: var(--muted); letter-spacing: .6px;
  text-transform: uppercase; font-weight: 500; line-height: 1.4;
  font-family: 'Geist Mono', monospace;
}
.sum-card-spark {
  display: flex; align-items: flex-end; gap: 2px;
  height: 28px; flex-shrink: 0;
}
.spark-bar {
  width: 3px; border-radius: 2px 2px 0 0;
  background: var(--border2); transform-origin: bottom;
  animation: barGrow .5s cubic-bezier(.16,1,.3,1) both;
}
.spark-bar.hi { background: var(--text); opacity: .7; }
.spark-bar:nth-child(1) { animation-delay: .25s; }
.spark-bar:nth-child(2) { animation-delay: .28s; }
.spark-bar:nth-child(3) { animation-delay: .31s; }
.spark-bar:nth-child(4) { animation-delay: .34s; }
.spark-bar:nth-child(5) { animation-delay: .37s; }
.spark-bar:nth-child(6) { animation-delay: .40s; }
.spark-bar:nth-child(7) { animation-delay: .43s; }
.spark-bar:nth-child(8) { animation-delay: .46s; }
.sum-card-mid {
  display: flex; align-items: baseline; gap: 7px; margin-bottom: 14px;
}
.sum-card-value {
  font-size: 26px; font-weight: 500; color: var(--text);
  letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums;
}
.sum-card-unit {
  font-size: 12px; color: var(--muted); font-weight: 400;
}
.sum-card-bottom {
  display: flex; align-items: center; gap: 6px;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.sum-card-icon {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--green-bg); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sum-card-delta      { font-size: 11.5px; font-weight: 600; color: var(--green); }
.sum-card-delta-label{ font-size: 11px; color: var(--muted); }
.delta-up   .sum-card-delta { color: var(--green); }
.delta-down .sum-card-delta { color: var(--red); }
.delta-down .sum-card-icon  { background: var(--red-bg); }
/* Classes de delta aplicadas via JS — usa paleta do sistema */
.kpi-delta.up   { color: var(--green) !important; font-weight: 600; }
.kpi-delta.down { color: var(--red)   !important; font-weight: 600; }
.kpi-delta.up::before   { content: '↑ '; font-size: 10px; }
.kpi-delta.down::before { content: '↓ '; font-size: 10px; }

/* Dashboard grid layouts */
.dash-section { margin-bottom: 20px; }
.dash-section-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.dash-section-title {
  font-size: 11px; font-weight: 600; color: var(--muted);
  letter-spacing: .8px; text-transform: uppercase;
}
.dash-grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); align-items: stretch; }
.dash-grid-3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-4); align-items: stretch; }
.dash-grid-65  { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--sp-4); align-items: stretch; }

/* ── Cards — dois níveis de hierarquia ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
  animation: cardIn .45s cubic-bezier(.16,1,.3,1) both;
}
.card:hover {
  border-color: var(--border2);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
/* Card raised — seções principais (hero, metas) */
.card--raised {
  border-color: var(--card-raised-border);
  box-shadow: var(--card-raised-shadow);
}
.card--raised:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.07), 0 8px 24px rgba(0,0,0,.05);
}
body.dark .card--raised:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
}

.card-hd {
  padding: var(--sp-4) var(--sp-5) var(--sp-3);
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: var(--text-base); font-weight: 500;
  color: var(--text); letter-spacing: -.2px;
}
.card-sub {
  font-size: var(--text-sm); color: var(--muted);
  margin-top: var(--sp-1);
}
.card-body { padding: var(--sp-4) var(--sp-5); }

/* ══════════════════════════════════════════════════════════
   CARD HERO — Tendência de Crescimento
   Usa cores padrão do tema (sem inversão)
   ══════════════════════════════════════════════════════════ */

.card--hero {
  overflow: hidden;
}

/* sem sombra adicional no hero */

/* glow removido — linha limpa */

/* ── Topo: título + tabs ── */
.hero-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.hero-titles { display: flex; flex-direction: column; gap: 3px; }

.hero-title {
  font-size: 13px; font-weight: 500; letter-spacing: -.1px;
  color: var(--text);
  line-height: 1.3;
}
.hero-sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.3;
}

/* Tabs */
.chart-tabs--hero {
  display: flex; gap: 2px; flex-shrink: 0;
  padding: 3px;
  background: var(--s2);
  border-radius: 7px;
}
.chart-tab--hero {
  padding: 4px 11px; border-radius: 5px;
  font-size: 11.5px; font-weight: 400;
  background: none; border: none; cursor: pointer;
  font-family: 'Geist', sans-serif;
  color: var(--muted);
  transition: all .15s;
}
.chart-tab--hero.active {
  background: var(--s1);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.chart-tab--hero:not(.active):hover { color: var(--text); }

/* ── Stat: número + delta + label ── */
.hero-stat { padding: 16px 20px 10px; }
.hero-stat-row {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.hero-value {
  font-size: 32px; font-weight: 600;
  letter-spacing: -1.4px; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.hero-delta {
  font-size: 11.5px; font-weight: 500;
  color: var(--muted);
}
.hero-delta.up   { color: var(--green); }
.hero-delta.down { color: var(--red); }

.hero-label {
  font-size: 10.5px; letter-spacing: .55px; text-transform: uppercase;
  font-family: 'Geist Mono', monospace;
  color: var(--muted);
}

/* ── Gráfico: flush nas laterais ── */
.hero-body { padding: 0; height: 184px; overflow: hidden; }
.hero-body > div { width: 100%; height: 100%; }


/* Metric rows */
.metric-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.metric-row:last-child { border-bottom: none; }
.metric-label { font-size: 12.5px; color: var(--muted); }
.metric-value { font-size: 13px; font-weight: 500; color: var(--text); }
.metric-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 20px;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-yellow { background: var(--orange-bg); color: var(--orange); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-muted { background: var(--s3); color: var(--muted); }

/* ── Comercial — KPI cards ── */
.com-kpi-card { padding: 16px 18px !important; display: flex; flex-direction: column; gap: 5px; }
.com-kpi-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--s2); border-radius: 7px; flex-shrink: 0; }
.com-kpi-val  { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -.5px; line-height: 1; margin-top: 4px; }
.com-kpi-lbl  { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.com-funil-skeleton { display: flex; flex-direction: column; gap: 14px; }

/* KPI row entrada suave — aplica só na primeira montagem via classe */
#cm-kpi-row .sum-card {
  animation: cardIn .5s cubic-bezier(.16,1,.3,1) both;
}
#cm-kpi-row .sum-card:nth-child(1) { animation-delay: .04s; }
#cm-kpi-row .sum-card:nth-child(2) { animation-delay: .09s; }
#cm-kpi-row .sum-card:nth-child(3) { animation-delay: .14s; }
#cm-kpi-row .sum-card:nth-child(4) { animation-delay: .19s; }

/* ── Pipeline tabela row hover ── */
.cm-pipe-row { transition: background .15s ease; }
.cm-pipe-row:last-child { border-bottom: none !important; }
.cm-pipe-row:hover { background: var(--s2); }

/* Pipeline barra de proporção */
.cm-pipe-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--text);
  width: 0;
  transition: width .65s cubic-bezier(.16,1,.3,1);
}

/* ── Column chart bar ── */
.chart-bar-col { transition: opacity .15s ease; }

/* Donut animação */
#cm-donut-arc {
  transition: stroke-dasharray .75s cubic-bezier(.16,1,.3,1), stroke .3s ease;
}

/* Fade-up para cards e rows da aba Comercial */
@keyframes cmFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cm-animate {
  animation: cmFadeUp .4s cubic-bezier(.16,1,.3,1) both;
}

/* Chart */
.chart-wrap { padding: 12px 18px 4px; }
.chart-tabs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--s2); border-radius: 7px;
}
.chart-tab {
  padding: 4px 11px; border-radius: 5px; font-size: 11.5px;
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-family: 'Geist', sans-serif; transition: all .15s;
}
.chart-tab.active { background: var(--s1); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.07); }

/* SVG charts */
.chart-svg { width: 100%; overflow: visible; }
.chart-line { fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chart-line-2 { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 4 3; }
.chart-axis-text { font-family: 'Geist Mono', monospace; font-size: 9.5px; fill: var(--muted); }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-bar { fill: var(--text); opacity: .85; }
.chart-bar:hover { opacity: 1; }
.chart-bar-2 { fill: var(--muted); opacity: .35; }
.chart-hit-area { cursor: crosshair; }
.chart-hover-col { cursor: pointer; transition: fill .1s; }
.chart-hover-col:hover + .chart-bar { opacity: 1; }
.chart-dot { cursor: pointer; transition: r .15s, fill .15s; }

/* Vertical separator between card 3 (Novos clientes) and card 4 (Receita) */
.sum-card-sep {
  position: absolute; left: -1px; top: 16px; bottom: 16px;
  width: 1px; background: var(--border2);
}

/* Chart stat header — value displayed above chart */
.chart-stat-hd {
  padding: 12px 18px 0;
  border-bottom: none;
}
.chart-stat-value {
  font-size: 22px; font-weight: 500; color: var(--text);
  letter-spacing: -0.8px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.chart-stat-label {
  font-size: 11px; color: var(--muted); margin-top: 2px;
  text-transform: uppercase; letter-spacing: .6px;
  font-family: 'Geist Mono', monospace;
}
.chart-stat-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 500; margin-top: 4px;
}
.chart-stat-delta.up   { color: var(--green); }
.chart-stat-delta.down { color: var(--red); }

/* Activity feed slide-in animation */
@keyframes activityIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Progress bar animate-in */
.prog-fill {
  height: 100%; border-radius: 2px; background: var(--text);
  width: 0; /* starts at 0, JS sets final width after mount */
  transition: width .75s cubic-bezier(.16,1,.3,1);
}
.prog-fill.green  { background: var(--green); }
.prog-fill.blue   { background: var(--blue); }
.prog-fill.orange { background: var(--orange); }

/* Progress bars */
.prog-row { margin-bottom: 14px; }
.prog-row:last-child { margin-bottom: 0; }
.prog-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.prog-label-name { color: var(--text); }
.prog-label-val { color: var(--muted); font-variant-numeric: tabular-nums; }
.prog-track { height: 5px; background: var(--s3); border-radius: 3px; overflow: hidden; }

/* Dual line chart legend colors */
.dual-legend { display: flex; gap: 16px; padding: 6px 18px 10px; }
.dual-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.dual-legend-line { width: 20px; height: 2px; border-radius: 1px; flex-shrink: 0; }
.dual-legend-line.invest { background: var(--text); }
.dual-legend-line.leads  { background: var(--green); }

/* Activity feed */
.activity-feed { display: flex; flex-direction: column; }
.activity-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 4px; border-bottom: 1px solid var(--border);
  border-radius: 6px; margin: 0 -4px;
  transition: background .12s;
  animation: activityIn .4s cubic-bezier(.16,1,.3,1) both;
}
.activity-item:last-child { border-bottom: none; }
.activity-item[onclick]:hover { background: var(--s2); }
.activity-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dim); flex-shrink: 0; margin-top: 6px;
}
.activity-dot.green { background: var(--green); }
.activity-dot.blue { background: var(--blue); }
.activity-dot.orange { background: var(--orange); }
.activity-dot.red { background: var(--red); }
.activity-text { font-size: 12.5px; color: var(--text); line-height: 1.5; flex: 1; }
.activity-time { font-size: 11px; color: var(--muted); white-space: nowrap; flex-shrink: 0; margin-top: 2px; }

/* Period selector */
.period-bar { display: flex; align-items: center; gap: 6px; }
.period-btn {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-family: 'Geist', sans-serif; font-size: 12.5px;
  cursor: pointer; border: 1px solid var(--border);
  background: none; color: var(--muted); transition: all .15s;
}
.period-btn:hover { background: var(--s2); color: var(--text); }
.period-btn.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── DATE PICKER POPUP ── */
.datepicker-popup {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--s1); border: 1px solid var(--border2);
  border-radius: var(--radius); width: 272px;
  box-shadow: 0 12px 40px rgba(0,0,0,.14);
  z-index: 9200; animation: fadeUp .18s cubic-bezier(.16,1,.3,1) both;
  overflow: hidden; display: none;
}
body.dark .datepicker-popup { box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.datepicker-popup.open { display: block; }

.dp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px;
}
.dp-nav-btn {
  width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid var(--border); background: none;
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all .12s;
}
.dp-nav-btn:hover { background: var(--s2); color: var(--text); }
.dp-month-label {
  font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer;
}
.dp-day-names {
  display: grid; grid-template-columns: repeat(7,1fr);
  padding: 0 10px; margin-bottom: 2px;
}
.dp-day-name {
  text-align: center; font-size: 10px; color: var(--muted);
  padding: 4px 0; font-family: 'Geist Mono', monospace;
}
.dp-grid {
  display: grid; grid-template-columns: repeat(7,1fr);
  padding: 0 10px 10px; gap: 1px;
}
.dp-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text); cursor: pointer;
  border-radius: 6px; transition: background .1s, color .1s;
  position: relative;
}
.dp-cell:hover { background: var(--s2); }
.dp-cell.other-month { color: var(--dim); }
.dp-cell.today { font-weight: 600; }
.dp-cell.today::after {
  content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--ink);
}
.dp-cell.selected {
  background: var(--ink) !important; color: var(--bg) !important;
}
.dp-cell.selected::after { display: none; }
.dp-cell.in-range { background: var(--s3); border-radius: 0; }
.dp-cell.hover-preview { background: var(--s2); border-radius: 0; opacity: .7; }
.dp-cell.range-start { background: var(--ink) !important; color: var(--bg) !important; border-radius: 6px 0 0 6px; }
.dp-cell.range-end { background: var(--ink) !important; color: var(--bg) !important; border-radius: 0 6px 6px 0; }
.dp-cell.range-start.range-end { border-radius: 6px; }
.dp-footer {
  padding: 8px 14px 10px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.dp-footer-info { font-size: 11.5px; color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-apply-btn {
  padding: 5px 12px; border-radius: 6px;
  background: var(--ink); color: var(--bg);
  border: none; font-family: 'Geist', sans-serif;
  font-size: 12px; cursor: pointer; transition: opacity .15s; flex-shrink: 0;
}
.dp-apply-btn:hover { opacity: .8; }
.dp-clear-btn {
  padding: 5px 12px; border-radius: 6px;
  background: none; color: var(--muted);
  border: 1px solid var(--border); font-family: 'Geist', sans-serif;
  font-size: 12px; cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.dp-clear-btn:hover { background: var(--s2); color: var(--text); }

/* Mode tabs inside datepicker */
.dp-mode-tabs {
  display: flex; padding: 8px 10px 0; gap: 2px;
}
.dp-mode-tab {
  flex: 1; padding: 5px 8px; border-radius: 5px;
  font-size: 11.5px; text-align: center;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: 'Geist', sans-serif;
  transition: all .12s;
}
.dp-mode-tab.active { background: var(--s2); color: var(--text); font-weight: 500; }

/* ── SKELETON LOADERS ── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--s3) 25%, var(--s2) 50%, var(--s3) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
}
.skel-text  { height: 12px; margin-bottom: 6px; }
.skel-value { height: 32px; margin-bottom: 10px; }
.skel-chart { height: 140px; width: 100%; border-radius: 8px; }
.skel-card  { height: 80px; border-radius: 8px; }

/* ── CHART TRANSITION / DRAW ANIMATION ── */
@keyframes chartFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.chart-animating svg {
  animation: chartFadeIn .45s cubic-bezier(.16,1,.3,1) both;
}
/* SVG line draw animation via stroke-dasharray */
.chart-line-animated {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: drawLine .7s cubic-bezier(.16,1,.3,1) forwards;
}
.chart-area-animated {
  opacity: 0;
  animation: fadeIn .5s .3s cubic-bezier(.16,1,.3,1) forwards;
}
.chart-bar-animated {
  transform-origin: bottom;
  transform: scaleY(0);
  animation: barGrowSmooth .55s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}
@keyframes barGrowSmooth {
  to { transform: scaleY(1); }
}
.chart-tooltip {
  position: fixed; pointer-events: none;
  background: var(--s1); border: 1px solid var(--border2);
  border-radius: 8px; padding: 8px 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.13);
  z-index: 9000; display: none;
  animation: fadeUp .12s cubic-bezier(.16,1,.3,1) both;
  min-width: 110px;
}
body.dark .chart-tooltip { box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.chart-tooltip.visible { display: block; }
.ct-label { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; font-family: 'Geist Mono', monospace; }
.ct-value { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -.3px; }
.ct-sub   { font-size: 10.5px; color: var(--muted); margin-top: 2px; }



/* Badges clicáveis das abas */
.dash-tab-badge {
  cursor: pointer;
  transition: transform .12s, opacity .12s;
}
.dash-tab-badge:hover {
  transform: scale(1.15);
  opacity: .85;
}

/* ── Resumo — Goals rows (clean, sem subtext) ── */
.rsm-goal-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 2px 0;
}
.rsm-goal-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}
.rsm-goal-left {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
}
.rsm-goal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rsm-goal-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.rsm-goal-pct {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 34px;
}
.rsm-goal-track {
  width: 100%;
  height: 5px;
  background: var(--s3);
  border-radius: 99px;
  overflow: hidden;
}
.rsm-goal-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--ink) !important;
  transition: width .7s cubic-bezier(.16,1,.3,1);
}


/* ═══════════════════════════════════════════════════════════
   METAS — gráfico de barras verticais agrupadas v1.1.13
   ═══════════════════════════════════════════════════════════ */

/* Card ocupa altura total da linha do grid */
#goals-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* card-body cresce para preencher o card */
#goals-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;          /* padding controlado pelo goals-bar-body */
  min-height: 0;
}

/* wrapper direto das barras — cresce junto com o card */
.goals-bar-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 12px;
  gap: 8px;
  min-height: 0;
}

/* goals-chart: coluna flex que empurra barras para baixo */
.goals-chart {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;   /* âncora as barras ao baseline inferior */
  gap: 6px;
  min-height: 0;
}

/* Área das barras — altura fixa, alinhada ao fundo */
.goals-chart-bars {
  display: flex;
  align-items: flex-end;       /* barras crescem de baixo para cima */
  justify-content: space-evenly;
  height: 96px;
  min-height: 96px;
  max-height: 96px;
  flex-shrink: 0;
  overflow: visible;           /* permitir barras altas sem corte */
  padding: 0 8px;
}

/* Grupo de 2 barras por métrica */
.goal-bar-group {
  display: flex;
  align-items: flex-end;       /* barras crescem de baixo para cima dentro do grupo */
  gap: 3px;
  width: 48px;
  height: 96px;                /* mesma altura do container — baseline garantido */
  flex-shrink: 0;
  cursor: default;
}

/* Barra base */
.goal-bar {
  width: 20px;
  flex-shrink: 0;
  border-radius: 3px 3px 0 0;
  min-height: 0;
  height: 0;                   /* começa em 0, animado por JS */
  transition: height .65s cubic-bezier(.16,1,.3,1);
  align-self: flex-end;        /* garantia extra de baseline */
}

/* Realizado — barra sólida */
.goal-bar--realizado {
  background: var(--text);
  opacity: .9;
}

/* Meta — barra tracejada */
.goal-bar--meta {
  background: transparent;
  border: none;
  overflow: hidden;
  border-radius: 3px 3px 0 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 2px,
    var(--border2) 2px,
    var(--border2) 3px
  );
  opacity: .8;
}

/* Labels das métricas */
.goals-chart-labels {
  display: flex;
  justify-content: space-evenly;
  padding: 6px 8px 0;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.goals-chart-labels span {
  width: 48px;
  flex-shrink: 0;
  text-align: center;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'Geist Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Legenda: Realizado / Meta */
.goals-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-shrink: 0;
}
.goals-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.goals-legend-item::before {
  content: '';
  width: 10px; height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  display: inline-block;
}
.goals-legend-realizado::before {
  background: var(--text);
  opacity: .85;
}
.goals-legend-meta::before {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 2px,
    var(--border2) 2px,
    var(--border2) 3px
  );
  background-color: transparent;
  border: 1px solid var(--border2);
}

/* ── Projetos ativos — tabela limpa estilo referência ── */
.rsm-proj-skeleton { display: flex; flex-direction: column; gap: 1px; }

/* Cabeçalho da tabela */
.dash-proj-thead {
  display: grid;
  grid-template-columns: 1fr 90px 160px 70px 90px;
  gap: 0 12px;
  padding: 0 4px 8px 4px;
  border-bottom: 1px solid var(--border);
}
.dash-proj-th {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* Linhas da tabela */
.dash-proj-row {
  display: grid;
  grid-template-columns: 1fr 90px 160px 70px 90px;
  gap: 0 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
  transition: background .12s ease;
  border-radius: 6px;
  animation: cmFadeUp .32s cubic-bezier(.16,1,.3,1) both;
}
.dash-proj-row:last-child { border-bottom: none; }
.dash-proj-row:hover { background: var(--s2); }

.dash-proj-name-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.dash-proj-color-sq {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
}
.dash-proj-name-txt {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status badge inline */
/* Status badge — quadrado borda arredondada com ícone */
.dpb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.dpb-active { background: var(--green-bg); color: var(--green); border-color: rgba(63,173,115,.18); }
.dpb-paused { background: var(--orange-bg); color: var(--orange); border-color: rgba(212,144,74,.18); }
.dpb-done   { background: var(--s3); color: var(--muted); border-color: var(--border2); }
/* Etapas do CRM / Comercial */
.dpb-novo        { background: var(--s2); color: var(--text); border-color: var(--border2); }
.dpb-qualif      { background: rgba(245,158,11,.1);  color: #f59e0b; border-color: rgba(245,158,11,.2);  }
.dpb-qualificado { background: rgba(14,165,233,.1);  color: #0ea5e9; border-color: rgba(14,165,233,.2);  }
.dpb-proposta    { background: rgba(139,92,246,.1);  color: #8b5cf6; border-color: rgba(139,92,246,.2);  }
.dpb-ganho       { background: var(--green-bg);      color: var(--green); border-color: rgba(63,173,115,.18); }
.dpb-perdido     { background: rgba(239,68,68,.1);   color: #ef4444; border-color: rgba(239,68,68,.2);   }

/* Progresso — segmentos finos e discretos estilo referência */
.dash-proj-prog-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}
.dash-proj-prog-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.dppb-seg {
  width: 4px;
  height: 7px;
  border-radius: 1.5px;
  background: var(--s3);
  transition: background .3s ease;
}
.dppb-seg.filled        { background: var(--text); opacity: .85; }
.dppb-seg.filled-green  { background: var(--text); opacity: .85; }
.dppb-seg.filled-orange { background: var(--text); opacity: .85; }
.dash-proj-prog-num {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  flex-shrink: 0;
}

/* Tarefas e deadline — fonte igual activity feed */
.dash-proj-tasks-cell {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.dash-proj-dead-cell {
  font-size: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* remover cores especiais de prazo — neutro sempre */
.dash-proj-dead-warn { color: var(--text); font-weight: 400; }
.dash-proj-dead-over { color: var(--text); font-weight: 400; }

/* Empty state */
.dash-proj-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}
.dash-proj-empty svg { opacity: .3; margin-bottom: 2px; }
.dash-proj-empty-title { font-size: 13px; font-weight: 500; color: var(--text); }
.dash-proj-empty-sub   { font-size: 11.5px; }

/* ══════════════════════════════════════════════════════════
   RESULTADOS TAB — v1.0.94
   ══════════════════════════════════════════════════════════ */

/* ── KPI Strip — 3 colunas, sem repetição ── */
.res-kpi-strip {
  display: flex;
  align-items: stretch;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.res-kpi-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 18px;
  text-align: center;
}
.res-kpi-item--conv { flex: 1.1; }
.res-kpi-divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
  align-self: stretch;
  margin: 16px 0;
}
.res-kpi-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .45px;
  margin-bottom: 7px;
  font-weight: 500;
}
.res-kpi-val {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1;
}
.res-kpi-delta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 5px;
  font-weight: 500;
}

/* ── Row 2: funil + leads chart ── */
.res-row2 {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}
.res-funnel-card {
  width: 260px;
  flex-shrink: 0;
}
.res-funnel {
  padding: 10px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.res-funnel-skeleton { display: flex; flex-direction: column; }

/* ── Linha de funil ── */
.res-funnel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeUp .35s cubic-bezier(.16,1,.3,1) both;
}
.res-funnel-row-label {
  font-size: 11px;
  color: var(--muted);
  width: 76px;
  flex-shrink: 0;
  text-align: right;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-funnel-row-track {
  flex: 1;
  height: 22px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  /* Área restante: listras diagonais finas */
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    var(--border) 3px,
    var(--border) 4px
  );
  background-color: var(--s1);
}
.res-funnel-row-fill {
  height: 100%;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  min-width: 22px;
  transition: width .65s cubic-bezier(.16,1,.3,1);
  /* Barra sempre branca — adapta no light/dark via variável */
  background: var(--text) !important;
  opacity: .9;
}
.res-funnel-row-val {
  font-size: 10.5px;
  font-weight: 700;
  /* Contraste: preto no light, branco no dark — automático */
  color: var(--bg);
  white-space: nowrap;
}
.res-funnel-row-pct {
  font-size: 10.5px;
  color: var(--muted);
  width: 32px;
  flex-shrink: 0;
  text-align: right;
  font-weight: 600;
}

/* ── Invest card ── */
.res-invest-card {
  margin-bottom: 14px;
}
.res-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
}
.res-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

#chart-invest-result,
#chart-clientes-bar {
  width: 100%;
  display: block;
}

.sum-card-sparkline { display: block; opacity: .5; }

/* ── Tooltip de metas (hover nas barras) ── */
.goals-hover-tip {
  display: none;
  position: fixed;
  z-index: 9999;
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  min-width: 148px;
  box-shadow: 0 6px 20px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.07);
  pointer-events: none;
  font-family: inherit;
}
.gtt-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.gtt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}
.gtt-key {
  font-size: 12px;
  color: var(--muted);
}
.gtt-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.gtt-meta {
  color: var(--muted);
  font-weight: 500;
}
.gtt-bar-wrap {
  height: 4px;
  background: var(--s3);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 5px;
}
.gtt-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .3s;
  max-width: 100%;
}
.gtt-status {
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}
body.dark .goals-hover-tip {
  box-shadow: 0 6px 20px rgba(0,0,0,.4), 0 1px 4px rgba(0,0,0,.2);
}

/* ══════════════════════════════════════════
   ANIMAÇÕES DO DASHBOARD — padronizadas
══════════════════════════════════════════ */

/* Delay escalonado para criar sequência natural */
.dash-grid-65 > .card:nth-child(1) { animation-delay: .04s; }
.dash-grid-65 > .card:nth-child(2) { animation-delay: .10s; }
.dash-grid-2  > .card:nth-child(1) { animation-delay: .08s; }
.dash-grid-2  > .card:nth-child(2) { animation-delay: .13s; }
.dash-grid-3  > .card:nth-child(1) { animation-delay: .06s; }
.dash-grid-3  > .card:nth-child(2) { animation-delay: .11s; }
.dash-grid-3  > .card:nth-child(3) { animation-delay: .16s; }

/* Hover suave nos cards — só borda, sem glow */
.card:hover {
  border-color: var(--border2);
}

/* Chart container fade-in após renderização */
.chart-svg {
  animation: chartFadeIn .4s cubic-bezier(.16,1,.3,1) both;
}

/* Barras de metas — transição fluida */
.goal-bar {
  transition: height .6s cubic-bezier(.16,1,.3,1);
}

/* Hero stat value — entrada suave */
.hero-value {
  animation: kpiNumIn .5s cubic-bezier(.16,1,.3,1) .15s both;
}
.hero-delta {
  animation: kpiNumIn .5s cubic-bezier(.16,1,.3,1) .22s both;
}

/* Seções do dashboard — entrada por slide */
.dash-section {
  animation: fadeUp .4s cubic-bezier(.16,1,.3,1) both;
}
.dash-section:nth-child(1) { animation-delay: .02s; }
.dash-section:nth-child(2) { animation-delay: .08s; }
.dash-section:nth-child(3) { animation-delay: .14s; }

/* Suavizar redraw sem flicker */
#chart-resumo, #goals-chart-wrap {
  transition: opacity .2s ease;
}

/* ── Divisor de seção dentro da aba Resultados ── */
.res-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
}
.res-section-divider::before,
.res-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.res-section-divider span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'Geist Mono', monospace;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   ONBOARDING BANNER — guia de primeiro acesso
══════════════════════════════════════════ */
.onboarding-banner {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(-6px);
}

.ob-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.ob-header-l { flex: 1; }
.ob-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  letter-spacing: -.1px;
}
.ob-sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.ob-header-r {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.ob-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.ob-progress-bar {
  width: 120px;
  height: 4px;
  background: var(--s3);
  border-radius: 4px;
  overflow: hidden;
}
.ob-progress-fill {
  height: 100%;
  background: var(--ink);
  border-radius: 4px;
  transition: width .5s cubic-bezier(.16,1,.3,1);
}
.ob-progress-label {
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ob-dismiss {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: none;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .12s, color .12s;
  flex-shrink: 0;
}
.ob-dismiss:hover { border-color: var(--ink); color: var(--text); }

/* Steps grid */
.ob-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (max-width: 680px) {
  .ob-steps { grid-template-columns: 1fr; }
  .kpi-grid-new { grid-template-columns: 1fr; }
  .kpi2-value { font-size: 30px; }
}

.ob-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .13s, background .13s;
  background: var(--s1);
}
.ob-step:not(.ob-step--done):hover {
  border-color: var(--border2);
  background: var(--s2);
}
.ob-step--done {
  opacity: .55;
  cursor: default;
}

.ob-step-check {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--s2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
  transition: background .13s;
}
.ob-step--done .ob-step-check {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.ob-step:not(.ob-step--done):hover .ob-step-check {
  color: var(--text);
}

.ob-step-info { flex: 1; min-width: 0; }
.ob-step-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ob-step-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}
.ob-step-arrow {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .13s, color .13s;
}
.ob-step:not(.ob-step--done):hover .ob-step-arrow {
  transform: translateX(3px);
  color: var(--text);
}

/* ══════════════════════════════════════════
   ALERTAS DE META EM RISCO
══════════════════════════════════════════ */
.meta-alerta-banner {
  background: var(--s1);
  border: 1px solid rgba(245,158,11,.35);
  border-left: 3px solid #f59e0b;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  transition: opacity .2s, transform .2s;
}
.mab-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.mab-icon {
  width: 30px; height: 30px;
  background: rgba(245,158,11,.12);
  color: #f59e0b;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mab-title {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mab-sub {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
}
.mab-close {
  width: 24px; height: 24px;
  border: none; background: none;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .1s, color .1s;
}
.mab-close:hover { background: var(--s2); color: var(--text); }

.mab-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.mab-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mab-item-label {
  font-size: 12px;
  color: var(--text);
  min-width: 70px;
}
.mab-bar-wrap {
  flex: 1;
  height: 5px;
  background: var(--s3);
  border-radius: 3px;
  overflow: hidden;
}
.mab-bar {
  height: 100%;
  background: #f59e0b;
  border-radius: 3px;
  min-width: 2px;
  transition: width .4s cubic-bezier(.16,1,.3,1);
}
.mab-item-vals {
  font-size: 11.5px;
  color: var(--muted);
  min-width: 100px;
  text-align: right;
}
.mab-sep { opacity: .4; }
.mab-pct {
  font-size: 11.5px;
  font-weight: 600;
  color: #f59e0b;
  min-width: 32px;
  text-align: right;
}
.mab-pct.critico { color: var(--red); }

.mab-actions {
  display: flex;
  gap: 8px;
}
.mab-btn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .12s;
}
.mab-btn:hover { opacity: .85; }
.mab-btn-ghost {
  background: none;
  color: var(--muted);
  border-color: var(--border);
}
.mab-btn-ghost:hover { background: var(--s2); color: var(--text); opacity: 1; }

/* ══════════════════════════════════════════
   LEAD LIVE TOAST — notificação em tempo real
══════════════════════════════════════════ */
.lead-live-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--s1);
  border: 1px solid var(--border2);
  border-left: 3px solid #10b981;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 260px;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  transform: translateY(20px) scale(.97);
  opacity: 0;
  transition: transform .35s cubic-bezier(.16,1,.3,1),
              opacity .35s cubic-bezier(.16,1,.3,1);
  pointer-events: all;
}
body.dark .lead-live-toast {
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
}
.lead-live-toast.visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.llt-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(16,185,129,.12);
  color: #10b981;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.llt-body {
  flex: 1;
  min-width: 0;
}
.llt-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: #10b981;
  margin-bottom: 2px;
}
.llt-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.llt-action {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: opacity .12s;
}
.llt-action:hover { opacity: .85; }
.llt-close {
  width: 22px; height: 22px;
  border: none; background: none;
  border-radius: 5px;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .1s, color .1s;
}
.llt-close:hover { background: var(--s2); color: var(--text); }

/* ══════════════════════════════════════════
   LOADING SKELETONS
══════════════════════════════════════════ */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  border-radius: 6px;
  background: var(--s3);
  background-image: linear-gradient(
    90deg,
    var(--s3) 0px,
    var(--s2) 40px,
    var(--s3) 80px
  );
  background-size: 400px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
body.dark .skeleton {
  background: var(--s2);
  background-image: linear-gradient(
    90deg,
    var(--s2) 0px,
    var(--s3) 40px,
    var(--s2) 80px
  );
  background-size: 400px 100%;
}

/* Skeleton para cards KPI */
.kpi-skeleton-val  { height: 34px; width: 60px; margin-bottom: 8px; }
.kpi-skeleton-lbl  { height: 10px; width: 80px; margin-bottom: 14px; }
.kpi-skeleton-foot { height: 10px; width: 100px; }

/* Skeleton para lista de atividades */
.act-skeleton-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.act-skeleton-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.act-skeleton-line { height: 11px; flex: 1; }
.act-skeleton-time { height: 10px; width: 36px; }

/* Skeleton para projetos */
.proj-skeleton-row {
  display: grid; grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr;
  gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border);
  align-items: center;
}
.proj-skeleton-cell { height: 12px; border-radius: 4px; }

/* ═══════════════════════════════════════════════════════════
   KPI Cards v2 — redesign com escala v1.1.68
   ═══════════════════════════════════════════════════════════ */

.kpi2-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5) var(--sp-3);
  display: flex; flex-direction: column; gap: 0;
  position: relative; overflow: hidden;
  animation: cardIn .55s cubic-bezier(.16,1,.3,1) both;
  transition: box-shadow .18s, transform .15s, border-color .18s;
}
body.dark .kpi2-card { border-color: var(--border2); }

.kpi2-card:hover {
  border-color: var(--card-raised-border);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
body.dark .kpi2-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.3); }

/* Raised — usado nos cards do dashboard */
.kpi2-card--raised {
  border-color: var(--card-raised-border);
  box-shadow: var(--card-raised-shadow);
}
body.dark .kpi2-card--raised { border-color: var(--border2); }

.kpi2-card--accent { background: var(--s1); }
body.dark .kpi2-card--accent { background: var(--s1); }

/* Header */
.kpi2-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-2);
}
.kpi2-label {
  font-size: var(--text-xs); font-weight: 500;
  letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted); font-family: 'Geist Mono', monospace;
}

/* Badge delta */
.kpi2-badge {
  font-size: var(--text-xs); font-weight: 700;
  padding: 2px var(--sp-2); border-radius: 20px;
  font-family: 'Geist Mono', monospace;
  transition: background .2s, color .2s;
}
.kpi2-badge--neutral { background: var(--s3); color: var(--muted); }
.kpi2-badge--up {
  background: color-mix(in srgb, var(--green) 12%, transparent);
  color: var(--green);
}
.kpi2-badge--down {
  background: color-mix(in srgb, var(--red) 10%, transparent);
  color: var(--red);
}
body.dark .kpi2-badge--up   { background: color-mix(in srgb, var(--green) 18%, transparent); }
body.dark .kpi2-badge--down { background: color-mix(in srgb, var(--red) 16%, transparent); }

/* Número principal */
.kpi2-body {
  display: flex; align-items: baseline; gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.kpi2-value {
  font-size: var(--text-2xl); font-weight: 600; color: var(--text);
  letter-spacing: -1.5px; line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color .3s;
}
.kpi2-unit {
  font-size: var(--text-sm); color: var(--muted);
  font-weight: 400; padding-bottom: 3px;
}

/* Footer */
.kpi2-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  gap: var(--sp-3);
}
.kpi2-spark {
  display: flex; align-items: flex-end; gap: 2.5px;
  height: 24px; flex-shrink: 0;
}
.kpi2-spark .spark-bar {
  width: 3px; border-radius: 2px 2px 0 0;
  background: var(--s3); transform-origin: bottom;
  animation: barGrow .5s cubic-bezier(.16,1,.3,1) both;
}
.kpi2-spark .spark-bar.hi { background: var(--text); opacity: .65; }
.kpi2-footer-label {
  font-size: 10.5px; color: var(--muted); font-weight: 400;
  white-space: nowrap;
}

/* Animação de entrada escalonada — substituída pelo sistema orquestrado abaixo */
.kpi2-card:nth-child(1) { animation-delay: .04s; }
.kpi2-card:nth-child(2) { animation-delay: .10s; }
.kpi2-card:nth-child(3) { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  
}

/* ── KPI cards brancos — animação de entrada v1.1.67 ── */
.kpi-grid-new .kpi2-card {
  animation: kpiCardReveal .55s cubic-bezier(.16,1,.3,1) both;
}
.kpi-grid-new .kpi2-card:nth-child(1) { animation-delay: .08s; }
.kpi-grid-new .kpi2-card:nth-child(2) { animation-delay: .16s; }
.kpi-grid-new .kpi2-card:nth-child(3) { animation-delay: .24s; }

.kpi-grid-new .kpi2-card:nth-child(1) .kpi2-value { animation: kpiValuePop .6s cubic-bezier(.16,1,.3,1) both; animation-delay: .18s; }
.kpi-grid-new .kpi2-card:nth-child(2) .kpi2-value { animation: kpiValuePop .6s cubic-bezier(.16,1,.3,1) both; animation-delay: .26s; }
.kpi-grid-new .kpi2-card:nth-child(3) .kpi2-value { animation: kpiValuePop .6s cubic-bezier(.16,1,.3,1) both; animation-delay: .34s; }

.kpi-grid-new .kpi2-card:nth-child(1) .kpi2-footer { animation: kpiFooterIn .4s cubic-bezier(.16,1,.3,1) both; animation-delay: .28s; }
.kpi-grid-new .kpi2-card:nth-child(2) .kpi2-footer { animation: kpiFooterIn .4s cubic-bezier(.16,1,.3,1) both; animation-delay: .36s; }
.kpi-grid-new .kpi2-card:nth-child(3) .kpi2-footer { animation: kpiFooterIn .4s cubic-bezier(.16,1,.3,1) both; animation-delay: .44s; }

/* ── Dark mode: reforço de contraste geral ── */
body.dark .dash-section,
body.dark .dash-card,
body.dark [class*="panel"],
body.dark .dash-tab-panel > div {
  border-color: var(--border2);
}

/* ── v1.1.68 — Hierarquia visual: raised nos cards principais ── */
#trend-hero-card,
#goals-card,
#dash-activities-card,
#dash-projects-card {
  border-color: var(--card-raised-border);
  box-shadow: var(--card-raised-shadow);
}
body.dark #trend-hero-card,
body.dark #goals-card,
body.dark #dash-activities-card,
body.dark #dash-projects-card {
  border-color: var(--border2);
  box-shadow: var(--card-raised-shadow);
}

/* KPI grid — gap com novo token */
.kpi-grid-new {
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

/* Dash sections — gap uniformizado */
.dash-grid-65,
.dash-grid-2,
.dash-grid-3 {
  margin-bottom: var(--sp-4);
}

/* Dash tabs — tipografia da escala */
.dash-tab {
  font-size: var(--text-sm);
}
.dash-tab.active {
  font-size: var(--text-sm);
  font-weight: 600;
}

/* Card hero — tipografia */
.hero-title {
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -.3px;
}
.hero-sub {
  font-size: var(--text-sm);
}
.hero-value {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -1px;
}
.hero-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .5px;
}
