@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;600;700&display=swap');

html, body {
  height: 100%;
}
:root {
  --brand: #007cf4;
  --brand-dark: #075985;
  --text: #0b1120;
  --muted-border: #e5e7eb;
  --kb: 0px;
}
* { box-sizing: border-box; }
html { background:#ffffff; }
body {
  margin:0;
  font-family:'DM Sans', -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,sans-serif;
  color:var(--text);
  background:#ffffff;
  font-size:16px;
}
.text-thin { font-weight:300; }
.text-regular { font-weight:400; }
.text-bold { font-weight:700; }

/* Landing (inspirado em shadcn/ui) */
.landing { min-height: 100vh; background: radial-gradient(circle at top left, #eff6ff, #ffffff); display:flex; flex-direction:column; }
.landing-header {
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px 24px; border-bottom: 1px solid rgba(226,232,240,0.8); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.9);
}
.landing-logo { display:flex; align-items:center; gap:8px; font-weight:700; font-size:18px; }
.landing-logo img { height:28px; width:auto; }
.landing-nav { display:flex; align-items:center; gap:16px; font-size:14px; color:#4b5563; }
.landing-nav a { text-decoration:none; color:inherit; padding:6px 10px; border-radius:9999px; }
.landing-nav a:hover { background: rgba(148,163,184,0.1); color:#111827; }
.landing-actions { display:flex; align-items:center; gap:8px; }
.landing-main { flex:1; padding: 32px 24px 40px; max-width: 1120px; width:100%; margin:0 auto; }
.landing-footer { padding: 16px 24px 24px; border-top:1px solid #E5E7EB; font-size:13px; color:#6b7280; display:flex; justify-content:space-between; align-items:center; }
.landing-footer a { color: var(--brand); text-decoration:none; }

.hero { display:flex; flex-wrap:wrap; gap:32px; align-items:center; justify-content:space-between; margin-bottom:48px; }
.hero-text { flex:1 1 320px; max-width: 620px; }
.hero-text h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.1; margin: 12px 0 12px; letter-spacing:-0.03em; }
.hero-text p { font-size:15px; color:#4b5563; max-width: 480px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:18px; }
.hero-badges { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; font-size:12px; color:#4b5563; }
.hero-badges span { padding:4px 10px; border-radius:9999px; background:#F3F4F6; }
.hero-card {
  flex:0 0 320px; max-width:360px;
  background:#ffffff; border:1px solid #E5E7EB; border-radius:16px;
  padding:18px 18px 16px;
  box-shadow: 0 18px 40px rgba(15,23,42,0.12);
}
.hero-card h2 { font-size:16px; margin:0 0 10px; }
.hero-card ul { padding-left:18px; margin:0 0 12px; font-size:13px; color:#4b5563; }
.hero-link { font-size:13px; color:var(--brand); text-decoration:none; font-weight:600; }
.hero-link:hover { text-decoration:underline; }

.pill {
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 10px; border-radius:9999px;
  background:#EEF2FF; color:#4F46E5; font-size:12px; font-weight:500;
}
.hero-cta { min-width: 180px; justify-content:center; display:inline-flex; align-items:center; text-align:center; }
.btn-ghost {
  height:44px; padding:0 16px; border-radius:9999px;
  border:1px solid rgba(148,163,184,0.7);
  background: #ffffff; color:#4b5563; font-size:14px; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
.btn-ghost:hover { background:#F9FAFB; }

.section { margin-bottom:40px; }
.section h2 { font-size:22px; margin-bottom:16px; letter-spacing:-0.02em; }
.section-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:16px; }
.bullets { padding-left:18px; font-size:14px; color:#4b5563; }
.pricing-hint { margin-top:8px; font-size:13px; color:#6b7280; }
.badge-soft {
  display:inline-flex; align-items:center; padding:2px 8px; border-radius:9999px;
  background:#F3F4FF; color:#4F46E5; font-size:11px; margin-bottom:6px;
}
.steps { display:flex; flex-direction:column; gap:12px; margin-top:8px; }
.step { display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border-radius:12px; background:#F9FAFB; border:1px solid #E5E7EB; }
.step-number {
  width:24px; height:24px; border-radius:9999px;
  background:#111827; color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:600;
}
.section-cta-final { margin-top:8px; }
.cta-card {
  display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between;
  background: radial-gradient(circle at top left, var(--brand), var(--brand-dark));
  color:#fff; padding:18px 20px; border-radius:18px;
  box-shadow: 0 18px 40px rgba(15,23,42,0.4);
}
.cta-card h2 { margin:0 0 4px; font-size:20px; }
.cta-card p { margin:0; font-size:14px; color:#E5E7EB; }

@media (max-width: 768px) {
  .landing-header { padding:10px 16px; gap:10px; }
  .landing-nav { display:none; }
  .landing-main { padding:24px 16px 32px; }
  .hero { flex-direction:column; align-items:flex-start; }
  .hero-card { max-width:100%; }
  .section-grid { grid-template-columns: 1fr; }
  .cta-card { align-items:flex-start; }
}

/* Capture page legacy (se necessário) */
.viewport { min-height: 100vh; display:flex; justify-content:center; background:#ffffff; }
.capture-container { width:100%; max-width:420px; margin: 0 auto; padding: 16px; padding-bottom: calc(16px + var(--kb)); display:flex; flex-direction:column; background:#ffffff; }
.main { flex:1; display:flex; flex-direction:column; justify-content:center; margin-top:-20px; transition: margin .15s ease; }
.lang-small { text-align:center; font-size:13.5px; color: rgb(99, 120, 138); margin: 8px 0 20px; font-weight:600; }
.brand { display:flex; align-items:center; justify-content:center; margin: 40px 0 28px; transition: margin .15s ease; }
.brand img { height: 60px; max-height:60px; min-height:0; width:auto; object-fit: contain; overflow:hidden; }
.card {
  background: #fff;
  border: 1px solid var(--muted-border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.card-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 6px;
  opacity: 0.9;
}

/* Asset cards (loja de ativos) */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.asset-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 10px 10px 10px;
  color: #0b1120;
  border: 1px solid #E5E7EB;
  position: relative;
  overflow: hidden;
}
.asset-card::before {
  content: none;
}
.asset-card-inner {
  position: relative;
  z-index: 1;
}
.asset-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.asset-card-cover {
  width: 100%;
  height: 72px;
  border-radius: 10px;
  margin-bottom: 6px;
  display: block;
  object-fit: cover;
}
.asset-card-logo {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: #F3F4F6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.asset-card-logo img {
  width: 18px;
  height: 18px;
}
.asset-card-provider {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9CA3AF;
}
.asset-card-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.asset-card-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(148,163,184,0.5);
  color: #4B5563;
}
.asset-card-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
.asset-card-features {
  margin: 2px 0 8px;
  padding: 0;
  list-style: none;
  font-size: 11px;
  color: #6B7280;
}
.asset-card-features li {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}
.asset-card-features img {
  width: 12px;
  height: 12px;
  filter: invert(58%) sepia(91%) saturate(474%) hue-rotate(92deg) brightness(94%) contrast(93%);
}
.asset-card-sub {
  font-size: 11px;
  color: #9CA3AF;
  margin-bottom: 10px;
}
.asset-card-price-main {
  font-size: 16px;
  font-weight: 700;
  color: #FBBF24;
}
.asset-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.asset-card-price-old {
  font-size: 11px;
  color: #6B7280;
  text-decoration: line-through;
}
.asset-card-discount {
  font-size: 11px;
  color: #22C55E;
}
.asset-card-note {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 12px;
}
.asset-card-cta {
  width: 100%;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.asset-card-cta:hover {
  background: #020617;
}
.asset-card-cta img {
  width: 14px;
  height: 14px;
  filter: invert(1) brightness(2);
}

@media (max-width: 1280px) {
  .asset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 960px) {
  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.form-group { margin-bottom: 14px; position: relative; display:flex; flex-direction:row; align-items:center; }
.form-group:focus-within { margin-bottom: 20px; }
.input { width:100%; height:60px; padding:0 48px 0 16px; border:2px solid var(--muted-border); border-radius:12px; font-size:16px; background:#fff; color:#0b1317; font-family: inherit; }
.input.no-icon { padding:0 16px; }
/* Login inputs requested styling */
.login-input {
  pointer-events: auto;
  padding: 10px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid #e8ecf0;
  border-radius: 16px;
  color:#0b1317;
  font-family: inherit;
}
.login-input.has-clear, .login-input.with-icon { padding-right: 48px; }
.float .login-input { padding-top: 20px; }
.input.has-clear { padding-right:48px; }
.float .input { padding-top:20px; }
.float-label { position:absolute; left:16px; top:50%; transform:translateY(-50%); color:#6b7280; font-size:14px; pointer-events:none; transition: all .15s ease; }
.float .input:focus + .float-label,
.float .input:not(:placeholder-shown) + .float-label { top:12px; transform:none; font-size:12px; color:#6b7280; }
.input-clear { position:absolute; right:12px; top:50%; transform:translateY(-50%); border:0; background:transparent; padding:6px; display:flex; align-items:center; justify-content:center; cursor:pointer; visibility:hidden; }
.input-clear img { width:20px; height:20px; filter: invert(40%) sepia(9%) saturate(300%) hue-rotate(168deg) brightness(92%) contrast(90%); }
.pwd-toggle { position:absolute; right:12px; top:50%; transform: translateY(-50%); border:0; background:transparent; padding:6px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.pwd-toggle img { width:20px; height:20px; filter: invert(40%) sepia(9%) saturate(300%) hue-rotate(168deg) brightness(92%) contrast(90%); }
.login-input:focus { outline:none; border-color: #0b1317; color:#0b1317; }
.btn-primary { width:100%; background:var(--brand); color:#fff; border:none; height:44px; padding:0 16px; border-radius:20px; font-size:16px; font-weight:600; cursor:pointer; }
.links {
  margin-top: 12px;
  text-align: center;
}
.links a { color: var(--brand); text-decoration: none; }
.divider { border-top: 1px solid #e5e7eb; margin: 16px 0; }
.btn-secondary {
  width: 100%;
  background: #22c55e;
  color: #fff;
  border: none;
  height:52px; padding: 0 16px; border-radius: 16px; font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.btn-outline { width:100%; height:44px; padding:0 16px; border-radius:20px; border:1px solid var(--brand); color: var(--brand); background:#fff; font-weight:600; cursor:pointer; }
.subtle-link { color:#0b1317; text-align:center; display:block; text-decoration:none; margin: 16px 0; font-weight:500; font-size:16px; }
.bottom-meta { text-align:center; margin-top:auto; }
.bottom-meta img { width:16%; height:auto; display:block; margin:12px auto; }
.meta-links { display:flex; justify-content:center; gap:16px; font-size:10px; color: rgb(99, 120, 138); }

/* Keyboard-open adjustments */
body.keyboard-open .brand { margin: 24px 0 12px; }
body.keyboard-open .main { margin-top: -32px; }
body.keyboard-open .bottom-meta { padding-bottom: var(--kb); }

/* Utility block requested */
.wbloks_1 {
  box-sizing: border-box;
  display: flex;
  flex: 0 1 auto;
  flex-direction: row;
  pointer-events: auto;
  position: relative;
  min-height: 0px;
  min-width: 0px;
}
.notice { margin-bottom: 12px; color: #059669; }

/* Admin layout */
.admin-wrap { display: flex; min-height: 100vh; background: #F9FAFB; }
.sidebar {
  width: 260px;
  background: #fff;
  border: 1px solid #E5E7EB;
  padding: 16px;
  margin: 16px;
  border-radius: 16px;
}
.sidebar .logo {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.menu-title {
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9CA3AF;
}
.menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #111827;
  text-decoration: none;
  border-radius: 9999px;
  transition: background .15s ease, color .15s ease;
  width: 100%;
  box-sizing: border-box;
}
.menu a img { width:16px; height:16px; vertical-align:-3px; filter:none; }
.menu a.active { background: var(--brand); color: #ffffff; }
.menu a.active img { filter: invert(1) brightness(2); }
.menu a:not(.active):hover { background: rgba(8,20,42,0.08); color: var(--brand); }
.menu-group-toggle {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font: inherit;
  color: #111827;
  border-radius: 9999px;
}
.menu-group-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.menu-group-toggle:hover { background: rgba(8,20,42,0.08); color: var(--brand); }
.menu-group-toggle img { width:16px;height:16px;vertical-align:-3px; }
.menu-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 32px;
  margin-top: 2px;
  margin-bottom: 4px;
}
.menu-sub.open {
  display: flex;
}
.menu-sub a {
  font-size: 12px;
  white-space: nowrap;
}
.content { flex: 1; padding: 24px 16px; overflow-x: hidden; }

/* Mobile sidebar / burger */
.mobile-menu-toggle {
  display: none;
  border: 1px solid #E5E7EB;
  background: #ffffff;
  border-radius: 9999px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  cursor: pointer;
}
.mobile-menu-toggle img {
  width: 16px;
  height: 16px;
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  display: none;
  z-index: 59;
}
.sidebar-overlay.show {
  display: block;
}
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-menu {
  position: relative;
}
.user-menu-toggle {
  border: 1px solid #E5E7EB;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
}
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: #E5E7EB;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  margin-right: 4px;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-name {
  font-size: 12px;
  color: #111827;
}
.user-menu-toggle img {
  width: 14px;
  height: 14px;
}
.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 12px 24px rgba(15,23,42,0.12);
  min-width: 180px;
  padding: 4px 0;
  display: none;
  z-index: 70;
}
.user-menu.open .user-menu-dropdown {
  display: block;
}
.user-menu-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: #111827;
  text-decoration: none;
  white-space: nowrap;
}
.user-menu-dropdown a img {
  width: 14px;
  height: 14px;
}
.user-menu-dropdown a:hover {
  background: rgba(8,20,42,0.04);
}
.user-menu-dropdown a.logout {
  color: #b91c1c;
}
.user-menu-dropdown a.logout img {
  /* deixa o ícone de sair em vermelho também */
  filter: invert(21%) sepia(93%) saturate(3180%) hue-rotate(357deg) brightness(88%) contrast(96%);
}
.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border-radius: 9999px;
  padding: 4px 10px 4px 6px;
  border: 1px solid #E5E7EB;
  font-size: 12px;
  color: #111827;
}
.balance-pill-amount {
  font-weight: 600;
}
.balance-pill-refresh {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.balance-pill-refresh img {
  width: 14px;
  height: 14px;
  /* aproxima o ícone do azul principal da plataforma */
  filter: invert(33%) sepia(96%) saturate(2221%) hue-rotate(205deg) brightness(96%) contrast(101%);
}
.btn-deposit {
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
}

/* Modal de saldo */
.balance-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.balance-modal-overlay.show {
  display: flex;
}
.balance-modal-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15,23,42,0.28);
  width: 420px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.balance-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #E5E7EB;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.balance-modal-body {
  padding: 14px 18px 16px;
  font-size: 13px;
  color: #4B5563;
}
.balance-modal-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid #E5E7EB;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.balance-modal-close {
  border: none;
  background: transparent;
  cursor: pointer;
}
.balance-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  font: inherit;
}
.balance-methods {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.balance-methods label {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.balance-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 8px;
}
.balance-value {
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: #ffffff;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.balance-value-amount {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}
.balance-value-note {
  font-size: 11px;
  color: #6B7280;
}
.balance-value.selected {
  border-color: var(--brand);
  background: #EFF6FF;
}

/* Wizard de sites */
.site-progress-wrapper {
  margin-bottom: 14px;
}
.site-progress-label {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 4px;
}
.site-progress {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: #E5E7EB;
  overflow: hidden;
}
.site-progress-bar {
  height: 100%;
  width: 0;
  background: #22C55E;
  transition: width .2s ease;
}
.site-form-group {
  margin-bottom: 10px;
}
.site-form-group .label {
  font-size: 12px;
  color: #4B5563;
  margin-bottom: 4px;
}
.site-form-group .input {
  width: 100%;
}

/* Dashboard – gráfico de faturamento */
.chart-frame {
  display: flex;
  align-items: flex-end;
  height: 260px;
  gap: 8px;
  position: relative;
}
.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 10px;
  color: #9CA3AF;
  min-width: 64px;
  height: 100%;
  z-index: 0;
}
.chart-y-row {
  position: relative;
  width: 100%;
}
.chart-y-row::after {
  content: '';
  position: absolute;
  left: 40px;
  right: -999px;
  top: 50%;
  border-top: 1px solid #F3F4F6;
  z-index: 0;
}
#revenue-chart {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 4px 0;
  z-index: 1;
}
.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 24px;
}
.chart-bar-inner {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: #007cf4;
  transition: background .15s ease, transform .15s ease;
}
.chart-bar:hover .chart-bar-inner {
  background: #0667c4;
  transform: translateY(-2px);
}
.chart-x-label {
  margin-top: 4px;
  font-size: 10px;
  color: #6B7280;
}
.chart-tooltip {
  position: absolute;
  background: #111827;
  color: #F9FAFB;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity .1s ease;
  white-space: nowrap;
  z-index: 40;
}
.chart-tooltip.visible {
  opacity: 1;
}
.chart-tooltip-date {
  font-weight: 600;
  margin-bottom: 2px;
}
.chart-tooltip-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chart-tooltip-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #007cf4;
}
.chart-period-wrapper { position: relative; }
.chart-period-btn {
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid #E5E7EB;
  background: #ffffff;
  font-size: 11px;
  cursor: pointer;
}
.chart-period-btn.active {
  background: #007cf4;
  border-color: #007cf4;
  color: #ffffff;
}
.chart-period-toggle {
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid #E5E7EB;
  background: #ffffff;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chart-period-popup {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 12px 30px rgba(15,23,42,0.18);
  padding: 10px 10px 8px;
  font-size: 12px;
  color: #4B5563;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
}
.chart-period-popup.open { display: flex; }
.chart-periods {
  display: flex;
  gap: 4px;
}
.chart-custom-range {
  font-size: 12px;
  color: #4B5563;
  display: none;
  gap: 6px;
  align-items: center;
}
.chart-custom-range label {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.chart-custom-range input[type="date"] {
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  font-size: 12px;
}
.chart-period-apply {
  padding: 4px 10px;
  border-radius: 9999px;
  border: none;
  background: #007cf4;
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
}
.btn-primary-balance {
  padding: 6px 12px;
  border-radius: 9999px;
  border: none;
  background: var(--brand);
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
}
.btn-secondary-balance {
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid #E5E7EB;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  cursor: pointer;
}
.balance-pix-code {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  font-size: 12px;
}
.balance-pix-status {
  font-size: 12px;
  color: #6B7280;
  margin-top: 6px;
}
.balance-qr {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  background: radial-gradient(circle at center, #F3F4F6, #E5E7EB);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #6B7280;
  margin: 0 auto 10px;
}


/* Table container */
.table-card { background: #fff; border: 1px solid #E5E7EB; border-radius: 8px; }
.table-toolbar {
  display: flex; gap: 8px; align-items: center; justify-content: space-between;
  padding: 12px; border-bottom: 1px solid #E5E7EB; flex-wrap: wrap;
}
.toolbar-left { display: flex; gap: 8px; align-items: center; }
.toolbar-right { display: flex; gap: 8px; align-items: center; }
.search-input, .select { padding: 8px 10px; border: 1px solid #E5E7EB; border-radius: 6px; }
.export-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #E5E7EB; border-radius: 9999px;
  padding: 8px 14px; color: #111827; text-decoration: none;
}
.export-btn img { width: 16px; height: 16px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 10px 12px; border-bottom: 1px solid #E5E7EB; text-align: left; }
th { background: #F9FAFB; font-weight: 600; font-size: 14px; }
tbody tr:hover { background: rgba(8,20,42,0.03); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 9999px; font-size: 12px; }
.badge.novo { background: #DBEAFE; color: var(--brand); }
.badge.contatado { background: #FEF3C7; color: #B45309; }
.badge.qualificado { background: #D1FAE5; color: #065F46; }
.badge.descartado { background: #FEE2E2; color: #991B1B; }
.actions .btn { padding: 6px 10px; border: 1px solid #E5E7EB; border-radius: 6px; background: #fff; cursor: pointer; }

/* Drawer (sheet) */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: -420px; width: 420px; max-width: 100%; height: 100%; background: #fff; border-left: 1px solid #E5E7EB; box-shadow: -2px 0 8px rgba(0,0,0,0.05); transition: right .25s ease; display: flex; flex-direction: column; }
.drawer.show { right: 0; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: none; align-items: center; justify-content: center; z-index: 40; }
.modal-overlay.show { display: flex; }
.modal-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.18);
  width: 420px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.btn.btn-primary-admin {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn.btn-primary-admin img {
  filter: invert(1) brightness(2);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* giro completo (2 voltas) usado em partes específicas (ex.: WhatsApp) */
.icon-spin {
  animation: spin 0.9s linear 2;
}
/* giro de 1 volta e meia (540deg) específico para o saldo */
@keyframes spin-one-half {
  from { transform: rotate(0deg); }
  to { transform: rotate(540deg); }
}
.icon-spin-saldo {
  animation: spin-one-half 0.9s linear 1;
}

.btn-icon-danger {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: none;
  background: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-icon-danger img {
  filter: invert(1) brightness(2);
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  border: 2px solid #d1d5db;
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

/* Overlay de carregamento (popup) */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
}
.loading-overlay.show {
  display: flex;
}
.loading-box {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15,23,42,0.28);
  padding: 14px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #4B5563;
}

/* Fluxo editor */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -280px;
    margin: 0;
    border-radius: 0;
    z-index: 60;
    transition: left .2s ease;
  }
  body.sidebar-open .sidebar {
    left: 0;
  }
  body.sidebar-open .sidebar-overlay {
    display: block;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .content {
    padding: 16px 12px;
  }
}

.flow-canvas-wrapper {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #F9FAFB;
  position: relative;
  overflow: hidden;
  min-height: 420px;
  max-height: 600px;
}
.flow-canvas {
  position: relative;
  width: 2400px;
  height: 1400px;
}
.flow-viewport {
  position: relative;
  transform-origin: 0 0;
}
.flow-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  /* Linhas acima dos cards, mas abaixo dos ícones de ligação */
  z-index: 20;
}
.flow-card {
  position: absolute;
  width: 260px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(15,23,42,0.06);
  overflow: visible;
  z-index: 10;
}
.flow-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  cursor: move;
}
.flow-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #EEF2FF;
  color: #4F46E5;
  font-size: 12px;
  font-weight: 500;
}
.flow-type-pill {
  font-size: 12px;
  color: #6B7280;
}
.flow-card-actions {
  display: flex;
  gap: 6px;
}
.flow-card-actions button {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 1px solid #E5E7EB;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.flow-card-actions button img {
  width: 16px;
  height: 16px;
}
.flow-fields textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  font: inherit;
}
.flow-fields input[type="text"],
.flow-fields input[type="number"],
.flow-fields select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  font: inherit;
}
.flow-text-block,
.flow-media-block {
  width: 100%;
}
.flow-upload-btn {
  margin-top: 8px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9999px;
  border: none;
  background: var(--brand);
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.flow-upload-btn img {
  width: 16px;
  height: 16px;
  filter: invert(1) brightness(2);
}

/* Status WhatsApp Cloud */
.wa-connection-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: linear-gradient(90deg, #ECFEFF, #EEF2FF);
}
.wa-connection-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.wa-connection-info {
  flex: 1;
  min-width: 0;
}
.wa-connection-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.wa-connection-meta {
  font-size: 12px;
  color: #6B7280;
}
.wa-connection-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wa-live-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #22C55E;
}
.wa-live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(34,197,94,0.5);
  animation: wa-pulse 1.4s ease-out infinite;
}
.wa-live-text {
  font-size: 12px;
  color: #16A34A;
  font-weight: 500;
}
@keyframes wa-pulse {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Suporte – abas e chat embutido */
.support-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.support-tab-btn {
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid #E5E7EB;
  background: #F9FAFB;
  font-size: 13px;
  cursor: pointer;
}
.support-tab-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.support-tab-pane {
  display: none;
}
.support-tab-pane.active {
  display: block;
}

.support-chat-layout {
  display: flex;
  min-height: 420px;
  height: calc(100vh - 190px);
}
.support-conversations {
  width: 280px;
  border-right: 1px solid #E5E7EB;
  display: flex;
  flex-direction: column;
}
.support-conversations-header {
  padding: 10px 12px;
  border-bottom: 1px solid #E5E7EB;
  font-size: 13px;
  font-weight: 600;
}
.support-conversation-list {
  flex: 1;
  overflow-y: auto;
}
.support-conversation-item {
  padding: 8px 10px;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
}
.support-conversation-item:hover {
  background: #EEF2FF;
}
.support-conv-card {
  display: flex;
  align-items: center;
  gap: 8px;
}
.support-conv-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.support-conv-main {
  flex: 1;
  min-width: 0;
}
.support-conv-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}
.support-conv-last {
  font-size: 12px;
  color: #6B7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.support-main-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.support-main-header {
  padding: 10px 14px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.support-messages-wrapper {
  flex: 1;
  display: flex;
}
.support-messages {
  flex: 2;
  padding: 10px 14px;
  overflow-y: auto;
  background: #F3F4F6;
}
.support-lead-sidebar {
  width: 260px;
  border-left: 1px solid #E5E7EB;
  padding: 10px 12px;
  font-size: 13px;
}
.support-msg-bubble {
  margin-bottom: 8px;
  max-width: 70%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 14px;
}
.support-msg-row {
  display: flex;
  flex-direction: column;
}
.support-msg-row.inbound {
  align-items: flex-start;
}
.support-msg-row.outbound {
  align-items: flex-end;
}
.support-msg-bubble.inbound {
  background: #ffffff;
  color: #111827;
}
.support-msg-bubble.outbound {
  background: var(--brand);
  color: #ffffff;
}
.support-msg-meta {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 2px;
}
.support-composer {
  border-top: 1px solid #E5E7EB;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
}
.support-composer textarea {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  font-family: inherit;
}
.support-send-btn {
  padding: 8px 14px;
  border-radius: 9999px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.support-send-btn img {
  width: 16px;
  height: 16px;
  filter: invert(1) brightness(2);
}
.flow-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 2px;
}
.flow-label img {
  width: 14px;
  height: 14px;
}
.flow-add-wrap {
  margin-top: 16px;
  display: none;
}
.flow-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}
.flow-zoom-btn {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: none;
  background: #111827;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.flow-add-btn {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: none;
  background: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.flow-add-btn img {
  width: 20px;
  height: 20px;
  filter: invert(1) brightness(2);
}
.flow-add-modal {
  position: absolute;
  top: 52px;
  right: 8px;
  width: 260px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(15,23,42,0.18);
  padding: 10px 12px 12px 12px;
  z-index: 25;
}
.flow-add-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}
.flow-add-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}
.flow-add-modal-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}

.flow-link-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: #9CA3AF; /* mesma cor da linha */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* Ícones sempre acima das linhas e dos cartões */
  z-index: 25;
}
.flow-link-handle img {
  width: 12px;
  height: 12px;
  display: none;
}
.flow-link-handle.left {
  left: -9px;
}
.flow-link-handle.right {
  right: -9px;
}
.flow-link-handle.active {
  background: #111827;
}
.flow-link-handle.active img {
  filter: invert(1) brightness(2);
}
.flow-link-handle.linked {
  background: #9CA3AF;
}
.flow-link-handle.linked:hover {
  background: #EF4444;
}
.flow-link-handle.linked:hover img {
  filter: invert(1) brightness(2);
  display: block;
}
.flow-link-handle:not(.linked):hover {
  background: #111827;
}
.flow-link-handle:not(.linked):hover img {
  display: block;
  filter: invert(1) brightness(2);
}
}

.flow-viewport {
  position: relative;
  transform-origin: 0 0;
}
.flow-zoom-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}
.flow-zoom-controls button {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: none;
  background: #111827;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.drawer-header { padding: 16px; border-bottom: 1px solid #E5E7EB; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.drawer-body { padding: 16px; overflow-y: auto; }
.drawer-footer { padding: 16px; border-top: 1px solid #E5E7EB; display: flex; justify-content: center; gap: 8px; }
.btn { padding: 10px 14px; border: 1px solid #E5E7EB; background: #fff; border-radius: 8px; cursor: pointer; }
.btn.save { background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 24px; display:inline-flex; align-items:center; gap:10px; padding:12px 20px; font-size:16px; }
.btn.save img { width:18px; height:18px; filter: invert(1) brightness(2); }

/* Drawer form grid: label left, input right */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px 12px; }
.form-field { display:flex; flex-direction:column; gap:6px; }
.form-field .label { font-size: 14px; color: #374151; }
.form-field .row { display:flex; align-items:center; gap:10px; }
.form-field .control { flex: 1 1 80%; }
.form-field .tool { flex: 0 0 20%; display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.form-field .control input,
.form-field .control select,
.form-field .control textarea { width: 100%; padding: 10px 12px; border: 1px solid #E5E7EB; border-radius: 8px; font: inherit; }
.copy-icon { border:0; background:transparent; padding:0; display:inline-flex; align-items:center; justify-content:center; }
.copy-icon img { width:20px; height:20px; filter: invert(28%) sepia(91%) saturate(3857%) hue-rotate(210deg) brightness(98%) contrast(102%); }
.copy-toast { display:none; font-size:11px; color:#059669; }
@media (max-width: 640px) { .form-field .tool { align-items:flex-start; } }

/* Responsive admin layout */
@media (max-width: 640px) {
  .admin-wrap { flex-direction: column; }
  .sidebar { width: auto; margin: 12px; border-radius: 8px; }
  .content { padding: 12px; }
  .table-toolbar { padding: 10px; }
  .table-card { margin: 0 4px; }
}
