/* ATD Station — layout espelhado do RD Station Marketing
   Tokens extraídos por engenharia reversa do app real (design/tokens-tangram.json)
   Fonte: DM Sans (500 regular / 700 bold / 900 extrabold) · Base 16px/24px */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* superfícies inversas (shell) */
  --navy: #002233;            /* neutral-surface-inverse */
  --navy-2: #003d5c;          /* neutral-surface-inverse-interactive */
  --navy-hover: #005a87;      /* neutral-surface-inverse-interactive-hover */
  --navy-3: rgba(0,34,51,.95);/* dropdown blur */
  --navy-border: #2e556b;     /* neutral-border-inverse */
  /* primária (ciano RD) */
  --cyan: #00dbff;            /* primary-surface-high-emphasis */
  --cyan-hover: #66ebff;      /* primary-surface-hover */
  --cyan-light: #66ebff;
  --cyan-bg: #b2f4ff;         /* primary-surface-low-emphasis */
  --cyan-on-hover: #66e9ff;   /* primary-text-on-color-hover */
  --blue: #0077b2;            /* primary-text (links) */
  --blue-hover: #005580;      /* primary-text-hover */
  --btn-dark: #003d5c;
  /* neutras */
  --page-bg: #ffffff;
  --canvas-bg: #e8ebf1;
  --card: #ffffff;
  --text: #002233;            /* neutral-text-high-emphasis */
  --muted: #405466;           /* neutral-text-low-emphasis */
  --disabled: #7f8d99;
  --line: #d6dbde;            /* neutral-border */
  --line-input: #b2bcc1;      /* neutral-border-interactive */
  --line-input-hover: #8c9ba3;
  --surface-2: #eceeef;       /* neutral-surface-low-emphasis */
  --surface-3: #e5e8ea;       /* neutral-surface-high-emphasis */
  --surface-hover: #dadee0;
  --surface-disabled: #edeff1;
  /* semânticas */
  --green: #0ed869;  --green-bg: #d1f7d8;  --green-text: #157541;
  --orange: #ffbd28; --orange-bg: #ffe3a5; --orange-text: #ac7b0c;
  --red: #e60f57;    --red-bg: #f9c3d5;    --red-text: #cc0d4d;
  --purple: #8800f7; --purple-bg: #dbb2fc; --purple-hover: #a64dff;
  /* raios */
  --radius-xs: 4px; --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 24px;
  --radius-content: 20px; --radius-pill: 999px;
  /* sombras (base #002233) */
  --shadow-xs: 0px 2px 6px rgba(0,34,51,.1);
  --shadow: 0px 2px 6px rgba(0,34,51,.1);
  --shadow-sm: 0px 4px 12px rgba(0,34,51,.14);
  --shadow-md: 0px 8px 18px rgba(0,34,51,.16);
  --shadow-lg: 0px 12px 24px rgba(0,34,51,.2);
  --shadow-xl: 0px 18px 32px rgba(0,34,51,.3);
  /* movimento */
  --ease-in: cubic-bezier(.55,.055,.675,.19);
  --ease-in-out: cubic-bezier(.645,.045,.355,1);
  --ease-out: cubic-bezier(.215,.61,.355,1);
  --dur-xf: 100ms; --dur-f: 200ms; --dur-n: 300ms;
  --t-btn: background-color var(--dur-xf) var(--ease-in-out), border-color var(--dur-xf) var(--ease-in-out), color var(--dur-xf) var(--ease-in-out);
  --t-card: border-color var(--dur-f) var(--ease-out), box-shadow var(--dur-f) var(--ease-out), background-color var(--dur-f) var(--ease-out);
  /* shell */
  --topbar-h: 64px;
  --sidebar-w: 64px;
}
html, body { height: 100%; }
body {
  font-family: 'DM Sans', 'Nunito Sans', 'Open Sans', Arial, sans-serif;
  background: var(--navy); color: var(--text);
  font-size: 16px; line-height: 1.5; font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

/* ================= TOP BAR (shell 64px) ================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: var(--navy); color: #fff; display: flex; align-items: center;
  padding: 0 16px 0 12px; z-index: 60; gap: 10px;
}
.tb-logo-wrap {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px;
  color: #fff; text-decoration: none; padding-left: 4px;
}
.tb-logo-text { letter-spacing: -0.5px; }
.tb-divider { width: 1px; height: 24px; background: var(--navy-border); margin: 0 6px; }
.tb-product {
  display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 700;
  color: var(--cyan); background: none; border: 0; cursor: pointer; font-family: inherit;
  padding: 6px 10px; border-radius: var(--radius-sm); position: relative;
  transition: var(--t-btn);
}
.tb-product:hover { color: var(--cyan-on-hover); background: rgba(0,219,255,.15); }
.tb-product .chev { font-size: 9px; opacity: .9; margin-left: 2px; }
.tb-product-menu {
  position: absolute; top: 52px; left: 0; background: var(--navy-3); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); min-width: 240px; max-width: 350px;
  overflow: hidden; z-index: 70; padding: 12px;
  animation: fade-in var(--dur-f) var(--ease-out);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.tb-product-menu .menu-lbl {
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.6); padding: 8px 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.tb-product-menu button, .tb-product-menu a {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px;
  border: 0; border-radius: var(--radius-sm);
  background: none; cursor: pointer; font-family: inherit; font-size: 16px; line-height: 20px; font-weight: 700;
  color: #fff; text-decoration: none; transition: var(--t-btn);
}
.tb-product-menu button:hover, .tb-product-menu a:hover { background: var(--navy-hover); }
.tb-product-menu button.cur { color: var(--cyan); }
.tb-product-menu .menu-div { height: 1px; background: var(--navy-border); margin: 8px 0; }
.tb-spacer { flex: 1; }
.tb-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; font-size: 16px; position: relative;
  color: #fff; transition: var(--t-btn);
}
.tb-icon:hover { background: var(--navy-hover); }
.tb-badge {
  position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
}
.tb-account-btn {
  display: flex; align-items: center; gap: 8px; background: var(--navy-2);
  border: 0; color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-family: inherit; font-size: 14px; line-height: 20px; font-weight: 700; transition: var(--t-btn);
  max-width: 240px;
}
.tb-account-btn:hover { background: var(--navy-hover); }
.tb-account-btn .acc-icon { font-size: 14px; opacity: 0.9; }

/* dropdown da conta (painel navy translúcido com blur, raio 16) */
.account-dropdown {
  position: fixed; top: 68px; right: 16px; width: 300px;
  background: var(--navy-3); color: #fff; border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md); z-index: 80; padding: 12px;
  animation: fade-in var(--dur-f) var(--ease-out);
}
.ad-header { padding: 8px 12px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--navy-border); }
.ad-header-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--cyan); color: var(--navy);
  display: grid; place-items: center; font-size: 16px;
}
.ad-header-info { display: flex; flex-direction: column; line-height: 1.3; }
.ad-header-title { font-weight: 700; font-size: 16px; color: var(--cyan); }
.ad-header-sub { font-size: 12px; color: rgba(255,255,255,0.6); display: flex; align-items: center; gap: 6px; }
.ad-header-copy { color: var(--cyan); cursor: pointer; font-weight: 700; text-decoration: none; }
.ad-header-copy:hover { text-decoration: underline; color: var(--cyan-on-hover); }
.ad-section-title {
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.6); padding: 12px 12px 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.ad-item {
  display: flex; align-items: center; justify-content: space-between; padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #fff; text-decoration: none; font-size: 14px; line-height: 20px; font-weight: 700; cursor: pointer;
  transition: var(--t-btn);
}
.ad-item:hover { background: var(--navy-hover); color: #fff; }
.ad-divider { height: 1px; background: var(--navy-border); margin: 8px 0; }
.ad-user-block { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ad-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--green-bg); color: var(--green-text);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.ad-user-info { display: flex; flex-direction: column; line-height: 1.25; }
.ad-user-name { font-weight: 700; font-size: 14px; color: var(--cyan); }
.ad-user-email { font-size: 12px; color: rgba(255,255,255,0.6); }
.ad-badge {
  font-size: 10px; background: var(--cyan); color: var(--navy); padding: 2px 8px; border-radius: var(--radius-xs);
  font-weight: 700; margin-left: 6px;
}
.ad-badge.purple { background: var(--purple); color: #fff; }
.ad-item-label { display: flex; align-items: center; }

.notif-panel {
  position: fixed; top: 68px; right: 120px; width: 350px; max-height: 420px; overflow-y: auto;
  background: #fff; color: var(--text); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  z-index: 80; padding: 8px 0; border: 1px solid var(--line);
  animation: fade-in var(--dur-f) var(--ease-out);
}
.notif-panel h4 { padding: 8px 16px; font-size: 14px; color: var(--muted); }
.notif-item { padding: 12px 16px; font-size: 14px; line-height: 20px; border-top: 1px solid var(--line); }
.notif-item .when { color: var(--muted); font-size: 12px; }

/* ================= SIDEBAR (rail 64px) ================= */
.sidebar {
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--navy); z-index: 50; display: flex; flex-direction: column;
  padding: 12px; gap: 8px; align-items: center;
}
.sb-item { position: relative; width: 40px; }
.sb-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border: 0;
  border-radius: var(--radius-sm);
  background: none; cursor: pointer; font-size: 16px; position: relative;
  color: #fff; transition: var(--t-btn);
}
.sb-item:hover > .sb-btn { background: var(--navy-hover); color: #fff; }
.sb-item.active > .sb-btn { color: var(--cyan); }
/* marca ativa: barrinha 6px ciano à esquerda do rail */
.sb-item.active > .sb-btn::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 24px; border-radius: var(--radius-xs); background: var(--cyan);
}
.fly {
  display: none; position: absolute; left: calc(var(--sidebar-w) - 12px); top: -4px;
  background: var(--navy-3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: var(--radius-lg); min-width: 240px; max-width: 350px; padding: 12px;
  box-shadow: var(--shadow-md); z-index: 55;
}
.sb-item:hover .fly { display: block; animation: fade-in var(--dur-f) var(--ease-out); }
.fly::before { content: ''; position: absolute; left: -12px; top: 0; width: 12px; height: 100%; }
.fly-title {
  color: var(--cyan); font-size: 20px; line-height: 30px; font-weight: 700; padding: 4px 12px 8px;
}
.fly a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: #fff; text-decoration: none; font-size: 16px; line-height: 20px; font-weight: 700;
  transition: var(--t-btn); white-space: nowrap;
}
.fly a:hover { background: var(--navy-hover); color: #fff; }
.fly a .adv {
  font-size: 11px; background: var(--purple); padding: 3px 8px; border-radius: var(--radius-xs);
  letter-spacing: .5px; font-weight: 700; color: #fff; text-transform: uppercase;
}
.sb-tip {
  display: none; position: absolute; left: calc(var(--sidebar-w) - 8px); top: 50%;
  transform: translateY(-50%); background: var(--navy); color: #fff; font-size: 14px; font-weight: 700;
  padding: 6px 12px; border-radius: var(--radius-sm); white-space: nowrap; z-index: 55;
  box-shadow: var(--shadow-sm);
}
.sb-item.no-fly:hover .sb-tip { display: block; }

/* ================= CONTENT (folha branca com canto 20px) ================= */
.content {
  position: relative; margin: var(--topbar-h) 0 0 var(--sidebar-w);
  background: var(--navy); min-height: calc(100vh - var(--topbar-h));
}
.content-inner {
  background: var(--page-bg); min-height: calc(100vh - var(--topbar-h));
  border-top-left-radius: var(--radius-content);
  padding: 32px 48px 64px;
}
#main { max-width: 1336px; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; line-height: 36px; letter-spacing: -.28px; color: var(--text); font-weight: 900; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 14px; line-height: 20px; }
.head-actions { display: flex; gap: 12px; align-items: center; }
/* rótulo pequeno acima do título (eyebrow) */
.page-eyebrow { font-size: 12px; line-height: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 4px; }

/* ================= COMPONENTES ================= */
.btn {
  border: 0; border-radius: var(--radius); height: 40px; padding: 0 16px;
  font-size: 16px; line-height: 24px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; font-family: inherit; background: var(--btn-dark); color: var(--cyan);
  transition: var(--t-btn); text-decoration: none;
}
.btn:hover { background: var(--navy-hover); color: var(--cyan-on-hover); }
.btn.secondary { background: var(--cyan-bg); color: var(--blue); }
.btn.secondary:hover { background: var(--cyan-hover); color: var(--blue-hover); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: #f33f7b; color: #fff; }
.btn.green { background: var(--green); color: var(--text); }
.btn.green:hover { background: #27f182; }
.btn.small { height: 32px; padding: 0 12px; font-size: 14px; line-height: 20px; border-radius: var(--radius-sm); }
.btn:disabled { background: var(--surface-disabled); color: var(--disabled); cursor: default; }
a.btn { text-decoration: none; display: inline-flex; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; transition: var(--t-card);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card h3 { font-size: 16px; line-height: 24px; margin-bottom: 16px; color: var(--text); font-weight: 700; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: 1fr 1fr; } .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.stat .num { font-size: 36px; line-height: 46px; font-weight: 900; letter-spacing: -1px; color: var(--text); }
.stat .lbl { color: var(--muted); font-size: 14px; line-height: 20px; margin-top: 2px; }
.stat .ico { font-size: 18px; margin-bottom: 8px; }

/* abas estilo RD: texto azul, ativa com sublinhado ciano 3px */
.rd-tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.rd-tabs button {
  border: 0; background: none; cursor: pointer; font-family: inherit; font-size: 16px; line-height: 24px;
  font-weight: 700; color: var(--muted); padding: 10px 0 14px; position: relative; margin-bottom: -1px;
  transition: color var(--dur-xf) var(--ease-in-out);
}
.rd-tabs button:hover { color: var(--blue-hover); }
.rd-tabs button.on { color: var(--blue); border-bottom: 3px solid var(--cyan); }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 12px; line-height: 16px; color: var(--muted); font-weight: 700; padding: 16px;
  border-bottom: 2px solid var(--line); text-transform: uppercase; letter-spacing: 0;
}
td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 16px; line-height: 24px; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color var(--dur-xf) var(--ease-in-out); }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td b, .name-link { color: var(--blue); font-weight: 700; }

/* tags de status (Tag Tangram: raio 4, 0 8px, 24px, 12px/700, texto navy) */
.pill {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--radius-xs);
  font-size: 12px; line-height: 16px; font-weight: 700;
  background: var(--surface-3); color: var(--text); text-transform: uppercase; letter-spacing: 0;
}
.pill.blue { background: var(--cyan-bg); color: var(--text); }
.pill.green { background: var(--green); color: var(--text); }
.pill.orange { background: var(--orange); color: var(--text); }
.pill.purple { background: var(--purple); color: #fff; }
.pill.red { background: var(--red); color: #fff; }

.tag-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; margin: 2px 4px 2px 0;
  border-radius: var(--radius-xs); font-size: 12px; background: var(--surface-3); color: var(--text); font-weight: 700;
}
.tag-chip button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 12px; padding: 0; }

.score-badge {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font-weight: 700; font-size: 13px; color: var(--text);
}
.score-A { background: var(--green); } .score-B { background: var(--cyan); }
.score-C { background: var(--orange); } .score-D { background: var(--surface-3); color: var(--muted); }

input, select, textarea {
  font-family: inherit; font-size: 16px; line-height: 24px; font-weight: 500;
  height: 40px; padding: 7px 12px;
  border: 1px solid var(--line-input); border-radius: var(--radius); background: #fff; color: var(--text);
  width: 100%;
  transition: border-color var(--dur-xf) var(--ease-in-out);
}
textarea { height: auto; min-height: 80px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:hover, select:hover, textarea:hover,
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--line-input-hover); }
label.fld { display: block; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
label.fld input, label.fld select, label.fld textarea { margin-top: 6px; font-weight: 500; }
.toolbar { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }

/* switch */
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; display: inline-block; }
.switch input { display: none; }
.switch i { position: absolute; inset: 0; border-radius: var(--radius-pill); background: var(--line-input); transition: background-color var(--dur-f) var(--ease-in-out); }
.switch i::after {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px; transition: left var(--dur-f) var(--ease-in-out); box-shadow: var(--shadow-xs);
}
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { left: 22px; }

/* modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,34,51,.5); display: grid; place-items: center;
  z-index: 100; padding: 20px; animation: fade-in var(--dur-f) var(--ease-out);
}
.modal {
  background: var(--card); border-radius: var(--radius-lg); width: 560px; max-width: 100%;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-xl); animation: pop var(--dur-f) var(--ease-out);
}
.modal.wide { width: 880px; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-head { padding: 24px 24px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 20px; line-height: 30px; color: var(--text); font-weight: 700; }
.modal-close {
  border: 0; background: none; width: 40px; height: 40px; border-radius: var(--radius);
  cursor: pointer; font-size: 14px; color: var(--muted); transition: var(--t-btn);
}
.modal-close:hover { background: var(--surface-hover); }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-foot { padding: 16px 24px 24px; display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--line); }

/* toast */
#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: var(--radius);
  font-size: 14px; line-height: 20px; font-weight: 700; box-shadow: var(--shadow-lg); animation: toast-in var(--dur-n) var(--ease-out);
}
.toast.err { background: var(--red); }
@keyframes toast-in { from { transform: translateY(16px); opacity: 0; } }

/* funil RD 4 etapas: cards cinza #e5e8ea raio 16, ativo ciano #00dbff, setas pretas */
.funnel4 { display: flex; align-items: stretch; gap: 0; }
.funnel4 .f4-card {
  flex: 1; background: var(--surface-3); border: 1px solid var(--surface-3);
  border-radius: var(--radius-lg); padding: 24px 16px; text-align: center;
  transition: var(--t-card);
}
.funnel4 .f4-card:hover { border-color: var(--line); box-shadow: var(--shadow-sm); }
.funnel4 .f4-card.hl { background: var(--cyan); border-color: var(--cyan); }
.funnel4 .f4-title { font-size: 12px; line-height: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; color: var(--text); }
.funnel4 .f4-num { font-size: 36px; line-height: 46px; font-weight: 900; letter-spacing: -1px; margin: 6px 0 2px; color: var(--text); }
.funnel4 .f4-sub { font-size: 14px; line-height: 20px; color: var(--text); font-weight: 700; }
.f4-rate {
  align-self: center; background: #000; color: #fff; font-size: 14px; font-weight: 700;
  padding: 8px 10px; border-radius: var(--radius-xs); margin: 0 -12px; z-index: 2; white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  padding-right: 18px;
}

/* funil horizontal barras */
.funnel-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.funnel-row .lbl { width: 140px; font-size: 14px; line-height: 20px; color: var(--muted); }
.funnel-row .bar { height: 28px; border-radius: var(--radius-xs); min-width: 28px; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; color: #fff; font-weight: 700; font-size: 13px; }

.timeline { list-style: none; }
.timeline li { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; align-items: baseline; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; font-size: 16px; }

.rule-row, .step-row, .field-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.rule-row select.r-op { width: 140px; flex-shrink: 0; }
.rule-row select.r-field { width: 220px; }
.row-del { border: 0; background: var(--red-bg); color: var(--red-text); width: 40px; height: 40px; border-radius: var(--radius); cursor: pointer; font-size: 14px; flex-shrink: 0; transition: var(--t-btn); }
.row-del:hover { background: var(--red); color: #fff; }
.code-box {
  background: var(--navy); color: #7ee787; font-family: 'SF Mono', Consolas, monospace; font-size: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm); overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin-top: 8px;
}
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 20px; }
a.link { color: var(--blue); text-decoration: none; font-weight: 700; transition: color var(--dur-xf) var(--ease-in-out); }
a.link:hover { text-decoration: underline; color: var(--blue-hover); }
.chart-wrap { overflow-x: auto; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.mb { margin-bottom: 16px; }

/* kanban CRM */
.kanban { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding-bottom: 16px; }
.kb-col { background: var(--surface-2); border-radius: var(--radius-lg); padding: 12px; width: 280px; min-width: 280px; min-height: 220px; }
.kb-col.drag-over { outline: 2px dashed var(--blue); outline-offset: -2px; background: var(--cyan-bg); }
.kb-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 4px 12px; }
.kb-head b { font-size: 14px; line-height: 20px; color: var(--text); font-weight: 700; }
.kb-head .kb-sum { font-size: 12px; color: var(--muted); }
.kb-card {
  background: #fff; border-radius: var(--radius); padding: 12px; margin-bottom: 8px;
  cursor: grab; border: 1px solid var(--line); transition: var(--t-card);
}
.kb-card:hover { box-shadow: var(--shadow-sm); }
.kb-card.dragging { opacity: .4; }
.kb-card .kb-title { font-weight: 700; font-size: 14px; line-height: 20px; margin-bottom: 4px; color: var(--blue); }
.kb-card .kb-meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.kb-card .kb-value { font-weight: 700; color: var(--green-text); }
.owner-dot {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  color: #fff; font-size: 10px; font-weight: 700;
}
.deal-status { display: flex; gap: 8px; margin: 10px 0; }

/* segmentação grupos */
.seg-group { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 8px; background: var(--surface-2); }
.seg-group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.op-toggle { display: inline-flex; border: 1px solid var(--line-input); border-radius: var(--radius-sm); overflow: hidden; }
.op-toggle button { border: 0; background: #fff; padding: 5px 14px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted); font-family: inherit; transition: var(--t-btn); }
.op-toggle button.on { background: var(--navy-2); color: var(--cyan); }
.groups-op { text-align: center; margin: 8px 0 16px; font-size: 14px; color: var(--muted); }
.count-pill { background: var(--cyan-bg); color: var(--blue); font-weight: 700; padding: 8px 16px; border-radius: var(--radius); font-size: 14px; line-height: 20px; display: inline-block; white-space: nowrap; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filter-chips label {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  background: var(--surface-3); border-radius: var(--radius-xs); padding: 4px 10px; cursor: pointer; color: var(--text);
  transition: var(--t-btn);
}
.filter-chips label:hover { background: var(--surface-hover); }
.filter-chips input { width: auto; height: auto; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.tpl-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; font-size: 14px; line-height: 20px; transition: var(--t-card); }
.tpl-card:hover, .tpl-card.on { border-color: var(--blue); background: var(--cyan-bg); }
.task-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-row input[type=checkbox] { width: 18px; height: 18px; }
.task-row .done { text-decoration: line-through; color: var(--muted); }
.overdue { color: var(--red-text); font-weight: 700; }
input[type=file] { background: none; border: 0; padding: 6px 0; height: auto; }
.star-btn { border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--line-input); padding: 2px; transition: color var(--dur-xf) var(--ease-in-out); }
.star-btn.on { color: var(--orange); }

/* linha de lead estilo RD (Base de Leads) */
.lead-row { border-bottom: 1px solid var(--line); padding: 16px 8px; cursor: pointer; transition: background-color var(--dur-xf) var(--ease-in-out); }
.lead-row:hover { background: var(--surface-2); }
.lead-row .lr-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lead-row .lr-name { color: var(--blue); font-weight: 700; font-size: 16px; line-height: 24px; }
.lead-row .lr-cargo { color: var(--muted); font-size: 14px; }
.lead-row .lr-cols { display: grid; grid-template-columns: 90px 120px 160px 24px 1fr 160px; gap: 12px; align-items: center; }
.lr-klabel { font-size: 12px; line-height: 16px; color: var(--muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0; }
.lr-kval { font-size: 16px; line-height: 24px; font-weight: 700; color: var(--text); }
.funnel-arrow { color: var(--line-input); font-size: 18px; }

/* editor de automação (canvas cinza #e8ebf1, nós brancos) */
.ae-topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 0 16px; border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.ae-topbar input.ae-name { font-size: 20px; font-weight: 700; border: 0; background: none; color: var(--blue); width: 360px; padding: 4px; height: auto; }
.ae-topbar input.ae-name:focus { outline: 1px dashed var(--blue); border-color: transparent; }
.ae-wrap { display: flex; min-height: 520px; }
.ae-canvas {
  flex: 1; background: var(--canvas-bg);
  padding: 60px 30px; overflow-x: auto;
  display: flex; align-items: flex-start; gap: 0;
}
.ae-node {
  background: #fff; border: 1px solid #fff; border-radius: var(--radius-sm); padding: 16px;
  min-width: 220px; max-width: 280px; box-shadow: var(--shadow-xs); cursor: pointer; flex-shrink: 0;
  transition: var(--t-card);
}
.ae-node:hover, .ae-node.sel { border-color: var(--cyan); box-shadow: var(--shadow-sm); }
.ae-node .ae-node-title { font-weight: 700; font-size: 16px; line-height: 24px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.ae-node .ae-node-sub { font-size: 14px; line-height: 20px; color: var(--blue); font-weight: 700; margin-top: 5px; }
.ae-node .ae-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: #fff; flex-shrink: 0; }
/* cores por categoria de nó (extraídas do editor real) */
.ae-ico.ico-tag { background: #ed0093; }        /* magenta — gerenciar lead */
.ae-ico.ico-email { background: #8800f7; }      /* roxo — comunicação */
.ae-ico.ico-wait { background: #ff8900; }       /* laranja — espera */
.ae-ico.ico-branch { background: #0bcb91; }     /* verde-mar — caminho do lead */
.ae-entry { border-left: 4px solid var(--cyan); }
.ae-link { display: flex; align-items: center; flex-shrink: 0; }
.ae-line { width: 28px; height: 2px; background: var(--line-input); }
.ae-plus {
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-input); background: #fff;
  color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; flex-shrink: 0;
  transition: var(--t-btn);
}
.ae-plus:hover { border-color: var(--blue); color: var(--blue); }
.ae-panel {
  width: 350px; flex-shrink: 0; border-left: 1px solid var(--line); background: #fff;
  padding: 20px; overflow-y: auto; max-height: 640px;
}
.ae-panel h3 { font-size: 20px; line-height: 30px; margin-bottom: 12px; color: var(--text); font-weight: 700; }
.ae-cat { font-size: 12px; line-height: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; color: var(--muted); margin: 16px 0 8px; }
.ae-action {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; font-size: 14px; line-height: 20px; font-weight: 700; background: #fff;
  transition: var(--t-card);
}
.ae-action:hover { border-color: var(--cyan); background: var(--cyan-bg); }
.ae-action .ae-ico { width: 28px; height: 28px; font-size: 13px; }

/* chat bubbles preview / social */
.social-net { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); font-size: 16px; color: #fff; }
.net-instagram { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.net-facebook { background: #1877f2; }
.net-linkedin { background: #0a66c2; }
.net-x { background: #14171a; }

/* checklist SEO */
.check-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; align-items: baseline; }
.check-item:last-child { border-bottom: 0; }
.check-ok { color: var(--green-text); font-weight: 700; }
.check-bad { color: var(--red-text); font-weight: 700; }

@media (max-width: 900px) {
  .content-inner { padding: 20px 16px 64px; }
  .lead-row .lr-cols { grid-template-columns: 1fr 1fr; }
}

/* ================= LANDING PAGE & PRODUCTS GRID ================= */
.topbar-landing {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: #ffffff; color: var(--text); display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px; z-index: 60;
  box-shadow: var(--shadow-sm);
}
.tbl-left { display: flex; align-items: center; gap: 32px; }
.tbl-logo-wrap { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--text); }
.tbl-logo-text { letter-spacing: -0.5px; }
.tbl-tabs { display: flex; gap: 24px; align-items: center; height: var(--topbar-h); }
.tbl-tab {
  text-decoration: none; color: var(--muted); font-weight: 700; font-size: 16px;
  height: 100%; display: flex; align-items: center; position: relative;
  transition: color var(--dur-xf) var(--ease-in-out);
}
.tbl-tab:hover { color: var(--blue-hover); }
.tbl-tab.active { color: var(--blue); }
.tbl-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--cyan);
}
.tbl-right { display: flex; align-items: center; }
.tbl-user-menu { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.tbl-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); color: var(--text);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.tbl-user-info { display: flex; flex-direction: column; line-height: 1.25; }
.tbl-username { font-weight: 700; font-size: 14px; color: var(--text); }
.tbl-sub { font-size: 12px; color: var(--muted); }
.tbl-chev { font-size: 10px; color: var(--muted); }

/* Landing active state overrides */
body.landing-active { background: var(--surface-2); }
body.landing-active .sidebar { display: none !important; }
body.landing-active .topbar { display: none !important; }
body.landing-active .topbar-landing { display: flex !important; }
body.landing-active .content { margin-left: 0 !important; border-top-left-radius: 0 !important; background: var(--surface-2) !important; }
body.landing-active .content-inner { background: var(--surface-2) !important; border-top-left-radius: 0 !important; padding: 40px 60px !important; }

/* Grid container and styles */
.landing-container { max-width: 1000px; margin: 0 auto; }
.landing-greeting { font-size: 28px; line-height: 36px; font-weight: 900; color: var(--text); margin-bottom: 24px; letter-spacing: -0.28px; }
.landing-main-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: var(--t-card); }
.landing-card-header { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.landing-card-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.landing-card-title { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.5px; }
.landing-card-url { font-size: 14px; color: var(--blue); text-decoration: none; font-weight: 700; }
.landing-card-url:hover { text-decoration: underline; color: var(--blue-hover); }
.landing-card-toggle { font-size: 12px; color: var(--blue); transition: transform var(--dur-f) var(--ease-in-out); }
.landing-card-body { border-top: 1px solid var(--line); padding: 24px; background: #ffffff; }
.landing-body-title { font-size: 12px; line-height: 16px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 1px; margin-bottom: 20px; }
.landing-products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.landing-product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 200px;
  transition: var(--t-card);
}
.landing-product-card:hover { box-shadow: var(--shadow-sm); }
.landing-product-info h4 { font-size: 16px; line-height: 24px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.landing-product-info p { font-size: 14px; color: var(--muted); line-height: 20px; }
.landing-product-btn {
  width: 100%; border: 0; border-radius: var(--radius); height: 40px; font-size: 16px; font-weight: 700;
  cursor: pointer; text-align: center; text-decoration: none;
  display: flex; align-items: center; justify-content: center; margin-top: 20px;
  transition: var(--t-btn); font-family: inherit;
}
.landing-product-btn.primary { background: var(--btn-dark); color: var(--cyan); }
.landing-product-btn.primary:hover { background: var(--navy-hover); color: var(--cyan-on-hover); }
.landing-product-btn.secondary { background: var(--cyan-bg); color: var(--blue); }
.landing-product-btn.secondary:hover { background: var(--cyan-hover); color: var(--blue-hover); }

@media (max-width: 900px) {
  .landing-products-grid { grid-template-columns: 1fr; }
  body.landing-active .content-inner { padding: 24px 16px !important; }
}

/* ================= NEW COMPONENT CONFIGURATIONS ================= */

/* Botão flutuante de Ajuda (roxo #8800f7, pílula) */
.rd-help-btn {
  position: fixed; bottom: 24px; right: 24px; background: var(--purple); color: #fff;
  border: 0; height: 48px; padding: 0 24px; border-radius: var(--radius-pill); font-weight: 700; font-size: 16px;
  box-shadow: var(--shadow-md); cursor: pointer; display: flex; align-items: center; gap: 8px;
  z-index: 90; transition: var(--t-btn); font-family: inherit;
}
.rd-help-btn:hover { background: var(--purple-hover); }
.rd-help-btn .ico { font-size: 13px; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,0.25); font-weight: 700; }

/* Dashboard: card ativo em ciano #00dbff (texto continua navy, como no RD) */
.funnel4 .f4-card.active-cyan { background: var(--cyan) !important; border-color: var(--cyan) !important; }
.funnel4 .f4-card.active-cyan .f4-title,
.funnel4 .f4-card.active-cyan .f4-num,
.funnel4 .f4-card.active-cyan .f4-sub { color: var(--text) !important; }

/* Setas pretas de taxa de conversão entre etapas */
.funnel4 .f4-rate.black-rate {
  background: #000000 !important; color: #fff !important; font-size: 14px !important; font-weight: 700 !important;
  padding: 6px 8px !important; border-radius: var(--radius-xs) !important; z-index: 2 !important; margin: 0 -10px !important;
  align-self: center !important; height: auto !important; width: auto !important;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%) !important;
  padding-right: 16px !important;
  display: inline-block !important; border-right: 0 !important;
}

/* Dashboard conversion horizontal row cards */
.dash-conversions-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 12px; }
.dash-conv-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px;
  position: relative; transition: var(--t-card);
}
.dash-conv-card:hover { box-shadow: var(--shadow-sm); }
.dash-conv-card h4 { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--blue); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-conv-card .cargo { font-size: 12px; color: var(--text); font-weight: 700; margin-bottom: 6px; }
.dash-conv-card .source { font-size: 12px; color: var(--muted); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-conv-card .date { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Channel performance metric cards grid */
.channel-perf-card {
  background: var(--surface-3); border-radius: var(--radius-lg); padding: 16px; border: 1px solid var(--surface-3);
  display: flex; flex-direction: column; justify-content: space-between; min-height: 120px;
  transition: var(--t-card);
}
.channel-perf-card:hover { border-color: var(--line); box-shadow: var(--shadow-sm); }
.channel-perf-card.lock { opacity: 0.7; position: relative; background: var(--surface-disabled); }
.channel-perf-card .c-title { font-size: 12px; line-height: 16px; font-weight: 700; text-transform: uppercase; color: var(--text); }
.channel-perf-card .c-num { font-size: 36px; line-height: 46px; font-weight: 900; color: var(--text); margin: 4px 0; letter-spacing: -1px; }
.channel-perf-card .c-trend { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.channel-perf-card .c-trend.down { color: var(--red-text); }
.channel-perf-card .c-trend.up { color: var(--green-text); }
.channel-perf-card .c-details { font-size: 12px; color: var(--text); border-top: 1px solid rgba(0,34,51,0.08); margin-top: 8px; padding-top: 6px; }
.channel-perf-card .c-details-row { display: flex; justify-content: space-between; margin-bottom: 2px; }

/* Split buttons split style */
.split-btn { display: inline-flex; border-radius: var(--radius); overflow: hidden; vertical-align: middle; }
.split-btn .btn { border-radius: var(--radius) 0 0 var(--radius); }
.split-btn .btn-arrow {
  border-radius: 0 var(--radius) var(--radius) 0; border-left: 1px solid rgba(255,255,255,0.2) !important;
  padding: 0 12px; background: var(--btn-dark); color: var(--cyan); border: 0; cursor: pointer;
  transition: var(--t-btn);
}
.split-btn .btn-arrow:hover { background: var(--navy-hover); color: var(--cyan-on-hover); }

/* Form edit visual check list cards */
.form-edit-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; transition: var(--t-card); }
.form-edit-card:hover { box-shadow: var(--shadow-sm); }
.form-edit-card .check-circle {
  width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: var(--text);
  display: grid; place-items: center; font-size: 10px; flex-shrink: 0; margin-right: 12px; font-weight: 700;
}
.form-edit-card .c-info { flex: 1; }
.form-edit-card h4 { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.form-edit-card p { font-size: 14px; color: var(--muted); line-height: 20px; }

/* Category menus visual list sidebar items */
.category-sidebar-list { list-style: none; padding: 0; }
.category-sidebar-list li {
  padding: 10px 12px; margin-bottom: 4px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; line-height: 20px; font-weight: 700;
  color: var(--text); transition: var(--t-btn);
}
.category-sidebar-list li:hover { background: var(--surface-2); }
.category-sidebar-list li.active { background: var(--cyan-bg); color: var(--blue); }
.category-sidebar-list li.submenu-item { padding-left: 24px; font-size: 14px; font-weight: 500; opacity: 0.9; }

/* Badges tags design */
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-xs); }
.badge.cyan-badge { background: var(--cyan-bg); color: var(--blue); }
.badge.purple-badge { background: var(--purple); color: #fff; }
.badge.novo-badge { background: var(--cyan); color: var(--navy); text-transform: uppercase; font-size: 10px; letter-spacing: 0.3px; }

/* Banner de alerta com filete ciano (como no RD Landing Pages) */
.rd-alert {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--cyan); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 24px;
  font-size: 16px; line-height: 24px;
}
.rd-alert a { color: var(--blue); font-weight: 700; text-decoration: none; }
.rd-alert a:hover { text-decoration: underline; }

/* Skeleton loading (shimmer RD) */
@keyframes skeleton-slide { 100% { background-position: right -100px top 0; } }
.skeleton {
  background: var(--surface-2);
  background-image: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  background-size: 100px 100%; background-repeat: no-repeat; background-position: left -100px top 0;
  animation: skeleton-slide 1s var(--ease-in-out) infinite; border-radius: var(--radius-xs);
}
