/* CORE Panel — estilos base (cores vêm de theme.css) */

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* === LAYOUT === */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

/* === SIDEBAR === */

.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #000;
  font-size: 18px;
  letter-spacing: -1px;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text);
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 3px;
}

.nav-section {
  padding: 0 16px;
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 12px 10px;
  font-weight: 700;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  margin-bottom: 2px;
  transition: all 0.12s;
  position: relative;
}

.nav-link:hover {
  background: var(--bg-card);
  color: var(--text);
}

.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

.nav-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  background: var(--accent);
  color: #000;
  padding: 1px 8px;
  border-radius: 100px;
  font-weight: 700;
}

.nav-pill {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
  padding: 3px 7px;
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* === TOPBAR === */

.topbar {
  height: var(--topbar-height);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.topbar-title small {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-left: 12px;
  text-transform: uppercase;
  font-weight: 600;
}

.topbar-meta {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

/* === THEME TOGGLE === */

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  margin-left: 16px;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

body.light .theme-toggle .icon-sun { display: block; }
body.light .theme-toggle .icon-moon { display: none; }

/* === FUNNEL CONTÍNUO (estilo Utmfy) === */

.funnel-wrap {
  width: 100%;
  padding-top: 36px;     /* espaço pros labels em cima */
  padding-bottom: 50px;  /* espaço pros valores embaixo */
  position: relative;
}

.funnel-svg-box {
  position: relative;
  width: 100%;
  height: 240px;
}

.funnel-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.2));
}

.funnel-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fun-label-block {
  position: absolute;
  top: -32px;
  text-align: center;
}

.fun-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.fun-pct-block {
  position: absolute;
  transform: translateY(-50%);
  text-align: center;
}

.fun-pct {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.fun-value-block {
  position: absolute;
  bottom: -40px;
  text-align: center;
}

.fun-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 800px) {
  .fun-pct { font-size: 18px; }
  .fun-value { font-size: 16px; }
  .funnel-svg-box { height: 160px; }
}

/* === MAIN === */

main {
  padding: 28px 32px 60px;
}

section { margin-bottom: 40px; }

section h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* === KPI CARDS === */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}

.kpi:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  transform: translateY(-1px);
}

.kpi-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-icon {
  font-size: 14px;
  opacity: 0.7;
}

.kpi-value {
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.kpi-suffix {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 4px;
}

.kpi-trend {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
}

.kpi.accent .kpi-value { color: var(--accent); }
.kpi.green .kpi-value { color: var(--green); }
.kpi.yellow .kpi-value { color: var(--yellow); }
.kpi.red .kpi-value { color: var(--red); }
.kpi.blue .kpi-value { color: var(--blue); }

/* === GRID HELPERS === */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3-1 { grid-template-columns: 2fr 1fr; }

@media (max-width: 1100px) {
  .grid-2, .grid-3-1 { grid-template-columns: 1fr; }
}

/* === CARD WRAPPER === */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
}

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

.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
}

.card-meta { font-size: 13px; color: var(--text-dim); font-weight: 500; }

/* === CHART CANVAS === */

.chart-container { position: relative; height: 280px; }
.chart-container.small { height: 200px; }
.chart-container.tall { height: 360px; }

/* === TABELA === */

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

thead { background: var(--bg-elevated); }

th {
  text-align: left;
  padding: 14px 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: var(--bg-card-hover); }

td.num { font-variant-numeric: tabular-nums; text-align: right; }
td.dim { color: var(--text-dim); }

/* === BADGES === */

.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge.t1 { background: rgba(10, 132, 255, 0.12); color: var(--blue); }
.badge.t2 { background: rgba(48, 209, 88, 0.12); color: var(--green); }
.badge.t3 { background: rgba(255, 214, 10, 0.12); color: var(--yellow); }
.badge.t4 { background: rgba(255, 69, 58, 0.12); color: var(--red); }
.badge.t5 { background: rgba(191, 90, 242, 0.12); color: var(--purple); }
.badge.enviado { background: rgba(48, 209, 88, 0.12); color: var(--green); }
.badge.erro { background: rgba(255, 69, 58, 0.12); color: var(--red); }
.badge.aposentada { background: rgba(150, 150, 150, 0.12); color: var(--text-muted); }
.badge.ativa { background: var(--accent-soft); color: var(--accent); }
.badge.resposta { background: rgba(245, 245, 247, 0.08); color: var(--text); }
.badge.ia-off { background: rgba(255, 214, 10, 0.12); color: var(--yellow); }
.badge.negociando { background: rgba(10, 132, 255, 0.12); color: var(--blue); }
.badge.vip { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* === EMPTY STATE === */

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

.empty-emoji {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* === QUOTE === */

.quote {
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text);
}

/* === MODULE CARDS === */

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

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: all 0.15s;
}

.module-card:hover { border-color: var(--border-bright); transform: translateY(-1px); }
.module-card .name { font-weight: 600; color: var(--text); margin-bottom: 4px; font-size: 14px; }
.module-card .desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; margin-top: 10px; }

.module-card .status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.module-card .status.active { background: rgba(48, 209, 88, 0.12); color: var(--green); }
.module-card .status.paused { background: rgba(255, 214, 10, 0.15); color: var(--yellow); }
.module-card .status.planned { background: rgba(150, 150, 150, 0.12); color: var(--text-dim); }

.module-card.paused {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.module-card.paused:hover {
  opacity: 0.8;
}

/* === TOGGLE SWITCH === */

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: 100px;
  transition: all 0.25s;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-switch input:checked ~ .toggle-track {
  background: var(--green);
  border-color: var(--green);
}

.toggle-switch input:checked ~ .toggle-thumb {
  left: 22px;
  background: #fff;
  box-shadow: 0 0 8px rgba(48, 209, 88, 0.5);
}

.toggle-switch input:disabled ~ .toggle-track {
  opacity: 0.4;
  cursor: not-allowed;
}

.toggle-switch input:disabled {
  cursor: not-allowed;
}

/* === HERO METRIC === */

.hero-metric {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.hero-metric::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, var(--accent-soft), transparent 60%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
  position: relative;
}

.hero-label {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-weight: 700;
}

.hero-value {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hero-prefix {
  font-size: 28px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0;
  margin-right: 2px;
}

.hero-diff {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--bg-elevated);
  font-size: 13.5px;
  font-weight: 600;
}

.hero-diff.up { color: var(--green); background: rgba(48, 209, 88, 0.12); }
.hero-diff.down { color: var(--red); background: rgba(255, 69, 58, 0.12); }
.hero-diff.neutral { color: var(--text-dim); }

.hero-sparkline {
  height: 110px;
  position: relative;
}

/* === KPI com SPARKLINE === */

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

.kpi-rich {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  flex-direction: column;
}

.kpi-rich:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.kpi-rich-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 14px;
}

.kpi-rich-label {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  line-height: 1.3;
}

.kpi-rich-diff {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.kpi-rich-diff.up { color: var(--green); background: rgba(48, 209, 88, 0.12); }
.kpi-rich-diff.down { color: var(--red); background: rgba(255, 69, 58, 0.12); }
.kpi-rich-diff.neutral { color: var(--text-dim); }

.kpi-rich-value {
  font-size: 40px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
  margin-top: auto;
}

.kpi-rich-suffix {
  font-size: 16px;
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 4px;
}

.kpi-rich-sparkline {
  height: 48px;
  margin-left: -10px;
  margin-right: -10px;
}

/* === INSIGHT CARD === */

.insight-card {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-card) 90%);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.insight-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.insight-emoji {
  font-size: 36px;
  flex-shrink: 0;
  position: relative;
}

.insight-body {
  position: relative;
  flex: 1;
}

.insight-tag {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}

.insight-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.insight-text {
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* === STREAK / CONQUISTAS === */

.streak-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  border: 1px solid var(--accent);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.streak-emoji {
  font-size: 16px;
  filter: drop-shadow(0 0 8px var(--accent));
}

/* === TIMELINE / ATIVIDADE === */

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding: 10px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}

.timeline-item.disparo::before { background: var(--blue); }
.timeline-item.campanha::before { background: var(--blue); }
.timeline-item.resposta::before { background: var(--purple); box-shadow: 0 0 0 3px var(--bg), 0 0 8px var(--purple); }
.timeline-item.regularizou::before { background: var(--green); box-shadow: 0 0 0 3px var(--bg), 0 0 10px var(--green); }
.timeline-item.etiqueta::before { background: var(--yellow); }
.timeline-item.notificacao::before { background: var(--accent); }

.timeline-hora {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  min-width: 58px;
  padding-top: 2px;
  font-weight: 700;
}

.timeline-content {
  flex: 1;
}

.timeline-text {
  font-size: 14.5px;
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-text .icon {
  color: var(--text-dim);
  font-size: 15px;
}

.timeline-detail {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.45;
}

.timeline-cliente {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 3px;
}

.timeline-empty {
  text-align: center;
  padding: 30px;
  color: var(--text-dim);
}

/* === ANIMAÇÕES === */

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.anim-fade-up { animation: fadeUp 0.4s ease-out backwards; }
.anim-fade-up:nth-child(1) { animation-delay: 0.05s; }
.anim-fade-up:nth-child(2) { animation-delay: 0.1s; }
.anim-fade-up:nth-child(3) { animation-delay: 0.15s; }
.anim-fade-up:nth-child(4) { animation-delay: 0.2s; }
.anim-fade-up:nth-child(5) { animation-delay: 0.25s; }
.anim-fade-up:nth-child(6) { animation-delay: 0.3s; }

.status-dot { animation: pulse 2s ease-in-out infinite; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-value { font-size: 48px; }
}

/* === MODO STORY (esconde sidebar, centraliza pra screenshot) === */

body.story-mode .sidebar { display: none; }
body.story-mode .app { grid-template-columns: 1fr; }

body.story-mode main,
body.story-mode .topbar {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

body.story-mode main {
  padding: 32px 48px 60px;
}

body.story-mode .topbar {
  padding: 0 48px;
}

/* Marca d'água CORE no rodapé em modo story */
body.story-mode::after {
  content: 'CORE v0.1.0';
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 4px;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.story-toggle.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

/* === CONFETE (dispara junto com toast) === */

.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 14px;
  opacity: 0;
  animation: confetti-fall 3.5s ease-out forwards;
}

.confetti.round {
  border-radius: 50%;
  width: 8px;
  height: 8px;
}

.confetti.square {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.confetti.strip {
  width: 4px;
  height: 14px;
  border-radius: 2px;
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg) scale(0.6);
  }
  10% {
    opacity: 1;
    transform: translate(var(--burst-x), var(--burst-y)) rotate(120deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--burst-x) + var(--drift-x)), calc(100vh + 100px)) rotate(720deg) scale(0.8);
  }
}

/* === TOAST DE RECUPERAÇÃO (pop-up estilo Shopify/Stripe) === */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: linear-gradient(135deg, #15161a 0%, #1a2a1f 100%);
  border: 1px solid var(--green);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  max-width: 420px;
  box-shadow:
    0 0 0 1px rgba(48, 209, 88, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(48, 209, 88, 0.15);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  animation: toast-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0.6;
}

.toast::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(48, 209, 88, 0.1), transparent 60%);
  pointer-events: none;
}

.toast.exiting {
  animation: toast-out 0.4s ease-in forwards;
}

@keyframes toast-in {
  0% {
    transform: translateX(120%) scale(0.9);
    opacity: 0;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes toast-out {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

.toast-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), #00b34a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 24px rgba(48, 209, 88, 0.5);
  animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(48, 209, 88, 0.5); }
  50% { box-shadow: 0 0 36px rgba(48, 209, 88, 0.8); }
}

.toast-icon svg {
  width: 24px;
  height: 24px;
  stroke: #000;
  stroke-width: 3;
  fill: none;
}

.toast-body {
  flex: 1;
  position: relative;
}

.toast-tag {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 2px;
}

.toast-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.toast-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.toast-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toast-meta .core-mark {
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent);
}

.toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.toast-close:hover { opacity: 1; }

@media (max-width: 600px) {
  .toast-container {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }
  .toast { min-width: 0; max-width: 100%; }
}

/* === RESPONSIVO === */

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  main, .topbar { padding-left: 16px; padding-right: 16px; }
}
