/* =========================================================
   BOTGESTOR TET STORE - STYLE ORGANIZADO
   Arquivo consolidado para substituir o style.css atual.
   Mantém as classes/IDs existentes e remove correções duplicadas.
   ========================================================= */

/* ================= 01 - BASE ================= */
* { box-sizing: border-box; }

:root {
  --bg: #080b11;
  --surface: #111722;
  --surface2: #171e2b;
  --surface3: #0c1119;
  --line: #283346;
  --line-soft: #202938;
  --text: #edf2f8;
  --muted: #98a4b5;
  --accent: #315f9e;
  --accent2: #5d86bd;
  --accent-soft: #172a45;
  --danger: #c95964;
  --warning: #c49a56;
  --success: #4f9678;
  --blue: #7198cc;
  --shadow: 0 12px 30px rgba(0,0,0,.24);
}

html { min-height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: #080b11;
}

body.menu-mobile-aberto { overflow: hidden; }

.app-boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 42%, rgba(49, 95, 158, .16), transparent 34%),
    var(--bg);
}

.app-boot-card {
  width: min(320px, 100%);
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.app-boot-monogram { margin-bottom: 8px; }
.app-boot-card strong { font-size: 17px; letter-spacing: -.01em; }
.app-boot-card span { color: var(--muted); font-size: 13px; }

.app-boot-progress {
  width: 112px;
  height: 3px;
  position: relative;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(152, 164, 181, .18);
}

.app-boot-progress::after {
  content: "";
  width: 48%;
  position: absolute;
  inset: 0 auto 0 -48%;
  border-radius: inherit;
  background: var(--accent2);
  animation: appBootProgress 1.05s ease-in-out infinite;
}

@keyframes appBootProgress {
  to { transform: translateX(310%); }
}

.hidden,
#app.hidden,
.app.hidden,
#login.hidden,
.login-wrapper.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .app-boot-progress::after { animation: none; inset-inline: 26%; width: 48%; }
}

.muted { color: var(--muted); line-height: 1.5; }
.eyebrow { color: var(--accent); text-transform: uppercase; font-weight: 900; letter-spacing: .08em; }
.section-kicker { display: inline-block; margin-bottom: 7px; color: #7799c6; font-size: 11px; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; }
.field-help { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
h1, h2, h3, h4, p { overflow-wrap: anywhere; }
img, video { max-width: 100%; }
a { color: var(--accent2); }

/* ================= 02 - FORMULÁRIOS / BOTÕES ================= */
input, select, textarea, button {
  width: 100%;
  margin-top: 10px;
  border-radius: 10px;
  font: inherit;
  outline: none;
}

input, select, textarea {
  min-height: 46px;
  padding: 12px;
  color: var(--text);
  background: #0d121a;
  border: 1px solid var(--line);
}

textarea { resize: vertical; line-height: 1.45; }

button {
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid #31557f;
  background: #1b3a63;
  color: #f3f7fc;
  cursor: pointer;
  font-weight: 850;
  box-shadow: none;
}

button:hover { filter: none; background: #234a7d; border-color: #46709f; transform: translateY(-1px); }
button.secondary { background: #182231; border-color: #303d50; color: var(--text); box-shadow: none; }
button.secondary:hover { background: #202d3e; border-color: #3d4e65; }
button.danger, button.btn-danger { background: #8f3742; color: #fff; border-color: #ad4c58; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .62; cursor: not-allowed; }
:where(button, input, select, textarea, a, .menu-item):focus-visible { outline: 3px solid rgba(79,183,255,.72); outline-offset: 2px; }

.check { display: flex; gap: 10px; align-items: center; margin-top: 12px; color: var(--muted); }
.check input { width: 18px; min-height: 18px; margin: 0; }
.form-field { display: block; margin-top: 10px; color: var(--muted); font-size: 13px; font-weight: 800; }
.form-field > span { display: block; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea { margin-top: 0; }

/* ================= 03 - LOGIN / CADASTRO ================= */
.login-wrapper { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

.login-card {
  width: min(460px, 100%);
  padding: 28px;
  background: #111722;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.cadastro-teste-card { margin-top: 18px; }
.login-card .secondary { background: rgba(255,255,255,.08); border-color: rgba(156,169,188,.22); color: var(--text); box-shadow: none; }
#cadastroTesteMsg, #loginMsg { min-height: 22px; margin: 10px 0 0; }

.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.brand.small { margin-bottom: 0; }
.brand h1 { margin: 0; font-size: 24px; }
.brand p { margin: 3px 0 0; }
.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #172a45;
  color: #82a5d4;
  font-weight: 950;
  border: 1px solid #29496f;
}

/* ================= 04 - LAYOUT / SIDEBAR / TOPO ================= */
.app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  transition: grid-template-columns .24s ease;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  background: #0c1119;
  border-right: 1px solid #202a39;
  scrollbar-width: thin;
  scrollbar-color: #365b88 #111722;
}

.sidebar::-webkit-scrollbar, .sidebar .menu::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track, .sidebar .menu::-webkit-scrollbar-track { background: rgba(15,23,42,.35); border-radius: 999px; }
.sidebar::-webkit-scrollbar-thumb, .sidebar .menu::-webkit-scrollbar-thumb { background: #365b88; border-radius: 999px; border: 2px solid #111722; }

.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.sidebar-overlay { display: none !important; }

.sidebar-close, .mobile-menu-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.sidebar-close {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  min-height: 38px !important;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1;
}

.mobile-menu-btn {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  border-radius: 14px;
  font-size: 22px;
  line-height: 1;
}

.main { min-width: 0; width: 100%; padding: 24px; }
.menu { display: grid; gap: 8px; }
.menu-item { padding: 11px 12px; border-radius: 10px; color: #b7c1cf; cursor: pointer; border: 1px solid transparent; font-weight: 750; }
.menu-item:hover { background: #141c28; border-color: #263345; }
.menu-item.active { background: #182d4a; border-color: #2f5583; color: #fff; }

.user-box { margin-top: 18px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8,12,21,.8); white-space: pre-line; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: #111722;
  border: 1px solid var(--line-soft);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}

.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.topbar h2 { margin: 0 0 3px; }
.topbar-title { flex: 1; min-width: 0; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.logout { width: auto; margin-top: 0; min-height: 40px; background: #202a3d; color: #fff; box-shadow: none; border-color: #35445d; }
.badge { display: inline-flex; align-items: center; min-height: 40px; padding: 9px 12px; border-radius: 999px; background: #0b1020; border: 1px solid var(--line); color: #d7e0ea; max-width: 360px; overflow-wrap: anywhere; }

@media (min-width: 901px) {
  body.sidebar-desktop-fechada .app { grid-template-columns: 0 minmax(0, 1fr); }
  body.sidebar-desktop-fechada .sidebar { transform: translateX(-105%); opacity: 0; pointer-events: none; padding-left: 0; padding-right: 0; border-right: 0; }
  body.menu-mobile-aberto { overflow: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ================= 05 - COMPONENTES GLOBAIS ================= */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .16s ease-in; }
@keyframes fade { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 430px); gap: 20px; align-items: start; }
.card, .hero, .mini-card { background: #111722; border: 1px solid var(--line-soft); border-radius: 14px; padding: 20px; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.hero { margin-bottom: 18px; min-height: 220px; display: grid; align-items: center; }
.hero h2 { margin: 8px 0; font-size: clamp(28px, 4vw, 44px); max-width: 760px; }
.cards-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; align-items: end; }

pre { margin: 10px 0 0; min-height: 240px; max-height: 70vh; overflow: auto; white-space: pre-wrap; line-height: 1.5; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #070b14; color: #dbe7f5; }
.resultado-card { position: sticky; top: 24px; }
.preview-box { margin-top: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8,12,21,.7); }
.preview-box img { display: block; max-width: 100%; border-radius: 12px; margin-top: 8px; }
.toast { position: fixed; right: 18px; top: 18px; z-index: 9999; width: min(380px, calc(100vw - 36px)); padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.console-actions-desktop { display: none; }
.console-search-box { width: 100%; }
.console-search-box h3 { margin: 0 0 4px; }
.console-search-box .row { margin-top: 8px; }
.actions-mobile-only { display: none; }

.dashboard-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 18px; align-items: stretch; margin-bottom: 14px; }
.dashboard-hero-copy, .dashboard-bot-atual, .dashboard-secao { border: 1px solid rgba(156,169,188,.16); border-radius: 18px; background: linear-gradient(180deg, rgba(23,32,51,.88), rgba(11,16,29,.88)); box-shadow: 0 14px 38px rgba(0,0,0,.18); }
.dashboard-hero-copy { min-height: 250px; padding: clamp(22px, 4vw, 38px); display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 82% 18%, rgba(79,183,255,.13), transparent 34%), radial-gradient(circle at 12% 82%, rgba(41,214,160,.12), transparent 30%), linear-gradient(180deg, rgba(23,32,51,.92), rgba(11,16,29,.92)); }
.dashboard-hero-copy h2 { max-width: 720px; margin: 2px 0 10px; font-size: clamp(28px, 4vw, 43px); line-height: 1.08; letter-spacing: -.025em; }
.dashboard-hero-copy > p { max-width: 690px; margin: 0; }
.dashboard-hero-acoes { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.dashboard-hero-acoes button { width: auto; min-width: 165px; margin: 0; }
.dashboard-bot-atual { padding: 20px; display: flex; flex-direction: column; justify-content: center; background: rgba(8,12,21,.68); }
.dashboard-bot-atual-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 850; }
.dashboard-bot-atual > strong { display: block; margin-top: 22px; font-size: clamp(22px, 3vw, 30px); overflow-wrap: anywhere; }
.dashboard-bot-atual > p { min-height: 43px; margin: 8px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.dashboard-bot-atual > button { margin: auto 0 0; }
.dashboard-metricas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dashboard-metrica { min-width: 0; padding: 15px 16px; border: 1px solid rgba(156,169,188,.16); border-radius: 15px; background: rgba(17,24,39,.72); }
.dashboard-metrica small { display: block; min-height: 28px; color: var(--muted); font-size: 11px; font-weight: 850; line-height: 1.3; text-transform: uppercase; letter-spacing: .045em; }
.dashboard-metrica strong { display: block; margin-top: 6px; font-size: clamp(20px, 3vw, 27px); line-height: 1; overflow-wrap: anywhere; }
.dashboard-metrica.is-success strong { color: #8fffd6; }
.dashboard-metrica.is-warning strong { color: #ffe19a; }
.dashboard-secao { padding: 20px; }
.dashboard-secao-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.dashboard-secao-head h3 { margin: 0; }
.dashboard-secao-head > p { max-width: 330px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: right; }
.dashboard-atalhos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.dashboard-atalho { min-width: 0; min-height: 132px; margin: 0; padding: 15px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; border-color: rgba(156,169,188,.16); background: rgba(8,12,21,.5); color: var(--text); box-shadow: none; }
.dashboard-atalho:hover { border-color: rgba(79,183,255,.38); background: rgba(255,255,255,.055); }
.dashboard-atalho > span { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 11px; background: rgba(79,183,255,.10); font-size: 18px; }
.dashboard-atalho strong { font-size: 15px; }
.dashboard-atalho small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.4; }

@media (min-width: 901px) {
  .resultado-card .console-actions-desktop { display: flex; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
  .resultado-card .console-actions-desktop button { margin-top: 0; }
}

/* ================= 06 - BOTS ================= */
#qr { margin-top: 15px; display: grid; place-items: center; }
#qr img { width: min(420px, 100%); background: white; padding: 12px; border-radius: 16px; }
.conexao-card > h2 { margin: 0; }
.conexao-metricas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 15px; }
.conexao-metrica { min-width: 0; padding: 12px 13px; border: 1px solid rgba(156,169,188,.16); border-radius: 14px; background: rgba(8,12,21,.48); }
.conexao-metrica small { display: block; min-height: 27px; color: var(--muted); font-size: 10px; font-weight: 850; line-height: 1.3; text-transform: uppercase; letter-spacing: .04em; }
.conexao-metrica strong { display: block; margin-top: 5px; font-size: 22px; line-height: 1; }
.conexao-metrica.is-active strong { color: #8fffd6; }
.conexao-metrica.is-warning strong { color: #ffe19a; }
.conexao-novo-bot, .conexao-bot-selecionado, .qr-shell { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(8,12,21,.48); }
.conexao-novo-bot h3, .conexao-bot-selecionado h3, .qr-shell h3 { margin: 0; }
.conexao-novo-bot > div:first-child > p { margin: 6px 0 0; font-size: 12px; }
.conexao-novo-bot-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 8px; }
.conexao-novo-bot-form button { width: auto; min-width: 170px; margin: 0; }
.conexao-bot-selecionado-head, .qr-shell-head, .conexao-lista-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.conexao-bot-nome { display: block; margin-top: 14px; font-size: 19px; overflow-wrap: anywhere; }
.conexao-bot-selecionado > p { margin: 6px 0 0; font-size: 12px; }
.conexao-acoes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.conexao-acoes button { min-width: 0; margin: 0; }
.qr-shell { text-align: left; }
.qr-shell > p { margin: 12px 0 0; font-size: 12px; }
.conexao-lista-head { margin-top: 2px; }
.conexao-lista-head h3 { margin: 0; }
.conexao-lista-head button { width: auto; min-width: 135px; margin: 0; }
.bots-status-card { margin-top: 18px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-title-row h2 { margin: 0 0 4px; }
.section-title-row button { width: auto; min-width: 120px; margin-top: 0; }
.bots-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.bot-card { padding: 14px; border-radius: 16px; background: rgba(8,12,21,.72); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.bot-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.18); }
.bot-card-selected { border-color: rgba(41,214,160,.65); outline: 2px solid rgba(59,130,246,.75); box-shadow: 0 0 0 4px rgba(59,130,246,.16); }
.bot-card-select { cursor: pointer; border-radius: 12px; }
.bot-card-select:focus-visible { outline: 3px solid rgba(79,183,255,.72); outline-offset: 3px; }
.bot-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bot-card h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.bot-card p { margin: 10px 0 0; line-height: 1.45; }
.bot-status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 900; border: 1px solid var(--line); white-space: nowrap; }
.bot-status-conectado { color: #8fffd6; background: rgba(41,214,160,.12); border-color: rgba(41,214,160,.35); }
.bot-status-qr { color: #ffe19a; background: rgba(245,189,79,.13); border-color: rgba(245,189,79,.35); }
.bot-status-iniciando, .bot-status-autenticado, .bot-status-iniciado { color: #9bd3ff; background: rgba(79,183,255,.12); border-color: rgba(79,183,255,.35); }
.bot-status-desconectado, .bot-status-falhou { color: #ff9ca5; background: rgba(255,91,104,.12); border-color: rgba(255,91,104,.35); }
.bot-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.bot-actions button { min-height: 38px; padding: 8px; margin-top: 0; font-size: 13px; cursor: pointer; }
.bot-btn-qr { background: rgba(59,130,246,.16) !important; border-color: rgba(59,130,246,.45) !important; color: #60a5fa !important; }
.bot-remover-duplo { display: flex; width: 100%; max-width: 230px; gap: 0; }
.bot-remover-duplo button { flex: 1; min-height: 38px; margin: 0; font-size: 12px; padding: 8px 9px; border-radius: 0; }
.bot-remover-duplo button:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; border-right: 1px solid rgba(255,255,255,.18); }
.bot-remover-duplo button:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }
.bot-remover-duplo .btn-bot-remover-dados { background: rgba(180,20,35,.95) !important; }
.bot-actions .bot-remover-duplo { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: none; }
.bot-actions .bot-remover-duplo button,
.bot-actions .bot-remover-duplo button:first-child,
.bot-actions .bot-remover-duplo button:last-child { min-width: 0; border-radius: 12px; border-right: 1px solid rgba(255,255,255,.18); }

/* ================= 07 - CONFIGS / MENU CLIENTE ================= */
.config-card > h2 { margin: 0; }
.config-intro { margin: 8px 0 4px; }
.config-overview { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 14px; padding: 14px; border: 1px solid rgba(41,214,160,.26); border-radius: 16px; background: linear-gradient(135deg, rgba(41,214,160,.09), rgba(79,183,255,.05)); }
.config-overview-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: rgba(41,214,160,.14); color: #a7f3d0; font-size: 20px; font-weight: 950; }
.config-overview-content { min-width: 0; }
.config-overview-content strong, .config-overview-content small { display: block; }
.config-overview-content strong { margin-top: 7px; font-size: 14px; overflow-wrap: anywhere; }
.config-overview-content small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.config-character-count { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; text-align: right; }
.saudacao-modo-box { margin-top: 0; }
.saudacao-variantes-grid { display: grid; gap: 11px; margin-top: 14px; }
.saudacao-variante-card { padding: 13px 14px 11px; border: 1px solid rgba(156,169,188,.18); border-radius: 15px; background: rgba(8,12,21,.48); }
.saudacao-variante-card .form-field { margin-top: 0; }
.saudacao-variante-card textarea { min-height: 98px; resize: vertical; }
.saudacao-variante-card > small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.saudacao-variante-card > small b { color: #bfdbfe; }
.config-action-bar { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.config-action-bar button { margin: 0; }
.config-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.config-result-head h3 { margin: 0; }
.config-result-head .section-kicker { margin-bottom: 5px; }
.privacy-toggle { width: fit-content; font-size: 12px; }
.menu-opcoes-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.menu-opcoes-head h3 { margin: 0; }
.menu-opcoes-head p { margin: 5px 0 0; font-size: 12px; }
.menu-opcoes-head button { width: auto; min-width: 150px; margin: 0; }
.menu-opcoes-box { display: grid; gap: 14px; margin-top: 12px; }
.menu-opcoes-empty { display: grid; justify-items: center; gap: 5px; padding: 24px 16px; border: 1px dashed rgba(96,165,250,.3); border-radius: 16px; background: rgba(30,64,175,.07); text-align: center; }
.menu-opcoes-empty > span { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid rgba(147,197,253,.66); border-radius: 50%; color: #bfdbfe; font-size: 16px; }
.menu-opcoes-empty strong { margin-top: 3px; font-size: 13px; }
.menu-opcoes-empty small { max-width: 330px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.menu-opcao-card { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(8,12,21,.62); box-shadow: inset 3px 0 0 rgba(79,183,255,.18); }
.menu-opcao-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.menu-opcao-top strong { font-size: 15px; }
.menu-opcao-top button { width: auto; min-width: 110px; margin-top: 0; min-height: 38px; padding: 8px 12px; }
.menu-opcao-card label { display: block; margin-top: 12px; color: var(--muted); font-weight: 750; font-size: 13px; }
.menu-midia-box { margin-top: 16px; padding: 14px; border-radius: 14px; border: 1px dashed rgba(156,169,188,.35); background: rgba(8,12,21,.45); }
.menu-midia-box h4 { margin: 0 0 8px; }
.menu-midia-atual { margin: 10px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.menu-resumo-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.menu-formato-pill { color: #bfdbfe; border-color: rgba(59,130,246,.34); background: rgba(30,64,175,.18); }
.menu-opcao-card { padding: 0; overflow: hidden; box-shadow: none; transition: border-color .16s ease, background .16s ease; }
.menu-opcao-card[open] { border-color: rgba(59,130,246,.42); background: rgba(7,12,24,.84); box-shadow: inset 3px 0 0 rgba(59,130,246,.62); }
.menu-opcao-summary { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 68px; padding: 12px 14px; cursor: pointer; list-style: none; user-select: none; }
.menu-opcao-summary::-webkit-details-marker { display: none; }
.menu-opcao-summary:hover { background: rgba(59,130,246,.065); }
.menu-opcao-number { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(96,165,250,.34); border-radius: 50%; background: rgba(30,64,175,.2); color: #dbeafe; font-size: 13px; font-weight: 900; }
.menu-opcao-summary-copy { min-width: 0; }
.menu-opcao-summary-copy strong,
.menu-opcao-summary-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-opcao-summary-copy strong { color: var(--text); font-size: 14px; }
.menu-opcao-summary-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.menu-opcao-edit-label { color: #93c5fd; font-size: 11px; font-weight: 850; }
.menu-opcao-edit-label::after { content: "⌄"; display: inline-block; margin-left: 6px; transition: transform .16s ease; }
.menu-opcao-card[open] .menu-opcao-edit-label::after { transform: rotate(180deg); }
.menu-opcao-body { padding: 4px 14px 15px 17px; border-top: 1px solid rgba(156,169,188,.13); }
.menu-opcao-order-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 7px; margin: 12px 0 4px; }
.menu-opcao-order-actions button { width: auto; min-width: 0; min-height: 34px; margin: 0; padding: 7px 10px; font-size: 11px; }
.menu-opcao-main-grid,
.menu-midia-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.menu-opcao-card .form-field { margin-top: 11px; }
.menu-opcao-card .form-field > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.menu-field-secondary { opacity: .8; }
.menu-opcao-extra { margin-top: 14px; border: 1px solid rgba(156,169,188,.18); border-radius: 13px; background: rgba(5,9,17,.42); overflow: hidden; }
.menu-opcao-extra > summary { padding: 11px 12px; color: #bfdbfe; cursor: pointer; font-size: 12px; font-weight: 850; list-style-position: inside; }
.menu-opcao-extra[open] > summary { border-bottom: 1px solid rgba(156,169,188,.14); background: rgba(30,64,175,.1); }
.menu-opcao-extra-body { padding: 2px 12px 12px; }
.menu-midia-box { margin-top: 12px; padding: 12px; border-style: solid; }
.menu-midia-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.menu-midia-heading strong,
.menu-midia-heading small { display: block; }
.menu-midia-heading strong { color: var(--text); font-size: 13px; }
.menu-midia-heading small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.menu-midia-box > button { width: auto; margin-top: 10px; }
.menu-poll-preview { margin-top: 18px; overflow: hidden; border: 1px solid rgba(96,165,250,.22); border-radius: 20px; background: #0b141a; box-shadow: 0 18px 45px rgba(0,0,0,.24); }
.menu-poll-appbar { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.07); background: #111b21; }
.menu-poll-avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 50%; background: linear-gradient(145deg, #1d4ed8, #172554); color: #eff6ff; font-size: 15px; font-weight: 950; }
.menu-poll-appbar strong,
.menu-poll-appbar small { display: block; }
.menu-poll-appbar strong { font-size: 13px; }
.menu-poll-appbar small { margin-top: 3px; color: #8696a0; font-size: 10px; }
.menu-poll-bubble { position: relative; width: calc(100% - 28px); margin: 18px 14px 8px; padding: 14px 13px 8px; border-radius: 10px 10px 3px 10px; background: #202c33; color: #e9edef; box-shadow: 0 1px 2px rgba(0,0,0,.22); }
.menu-poll-type { display: block; margin-bottom: 8px; color: #8aa7b8; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.menu-poll-bubble > strong,
.menu-poll-bubble > small { display: block; }
.menu-poll-bubble > strong { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.menu-poll-bubble > small { margin-top: 4px; color: #aebac1; font-size: 11px; }
.menu-poll-options { max-height: 420px; margin-top: 11px; border-top: 1px solid rgba(134,150,160,.22); overflow-y: auto; scrollbar-width: thin; }
.menu-poll-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 42px; border-bottom: 1px solid rgba(134,150,160,.18); color: #e9edef; font-size: 12px; line-height: 1.35; }
.menu-poll-option.is-reopen { color: #9ec5ff; }
.menu-poll-radio { width: 16px; height: 16px; border: 2px solid #8696a0; border-radius: 50%; }
.menu-poll-total { padding: 9px 0 2px; color: #8696a0; font-size: 10px; text-align: right; }
.menu-poll-empty { margin: 12px 0 5px; color: #aebac1; font-size: 11px; line-height: 1.45; }
.menu-poll-help { width: calc(100% - 28px); margin: 8px 14px 18px; padding: 11px 12px; border-radius: 10px 10px 10px 3px; background: #202c33; color: #dbe3e8; font-size: 11px; line-height: 1.5; }
.menu-retorno-details { margin-top: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(8,12,21,.55); overflow: hidden; }
.menu-retorno-details > summary { padding: 11px 12px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; }
.menu-retorno-details[open] > summary { border-bottom: 1px solid var(--line); color: var(--text); }
.menu-retorno-details pre { min-height: 0; max-height: 320px; margin: 0; border: 0; border-radius: 0; background: rgba(4,7,13,.7); }
.menu-default-message { margin-top: 2px; border: 1px solid rgba(156,169,188,.18); border-radius: 14px; background: rgba(8,12,21,.44); overflow: hidden; }
.menu-default-message > summary { padding: 12px 13px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 850; }
.menu-default-message[open] > summary { border-bottom: 1px solid var(--line); color: #bfdbfe; background: rgba(30,64,175,.08); }
.menu-default-message > div { padding: 2px 13px 13px; }
.clientes-card > h2 { margin: 0; }
.clientes-intro { margin: 8px 0 4px; }
.cliente-metricas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.cliente-metrica { min-width: 0; padding: 11px 12px; border: 1px solid rgba(156,169,188,.16); border-radius: 13px; background: rgba(8,12,21,.48); }
.cliente-metrica small { display: block; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .045em; }
.cliente-metrica strong { display: block; margin-top: 5px; font-size: 20px; line-height: 1; }
.cliente-metrica.is-active strong { color: #8fffd6; }
.cliente-metrica.is-overdue strong { color: #ffb4bc; }
.cliente-metrica.is-promo strong { color: #9bd3ff; }
.cliente-modos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 16px 0 14px; padding: 5px; border: 1px solid var(--line); border-radius: 15px; background: rgba(8,12,21,.55); }
.cliente-modo-btn { min-width: 0; min-height: 40px; margin: 0; padding: 8px 9px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--muted); box-shadow: none; font-size: 12px; }
.cliente-modo-btn:hover { transform: none; background: rgba(255,255,255,.055); color: var(--text); }
.cliente-modo-btn.active { border-color: rgba(41,214,160,.34); background: linear-gradient(135deg, rgba(41,214,160,.16), rgba(79,183,255,.10)); color: var(--text); }
.cliente-modo-btn.is-danger.active { border-color: rgba(255,91,104,.36); background: rgba(255,91,104,.11); color: #ffc4ca; }
.cliente-modo-painel { display: none; padding-top: 2px; animation: fade .14s ease-in; }
.cliente-modo-painel.active { display: block; }
.cliente-modo-cabecalho { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.cliente-modo-cabecalho h3 { margin: 7px 0 0; }
.cliente-modo-cabecalho > p { max-width: 270px; margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: right; }
.cliente-filtro-linha { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.cliente-filtro-linha button { width: auto; min-width: 130px; margin: 0; }
.cliente-consulta-acoes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.cliente-consulta-acoes button { margin: 0; }
.cliente-alerta-perigo { margin: 12px 0 4px; padding: 13px 14px; border: 1px solid rgba(255,91,104,.32); border-radius: 14px; background: rgba(255,91,104,.08); }
.cliente-alerta-perigo strong { color: #ffc4ca; }
.cliente-alerta-perigo p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.clientes-resultado-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.clientes-resultado-head h3 { margin: 0; }
.clientes-resultado-head .section-kicker { margin-bottom: 5px; }
.clientes-resultado-card pre { min-height: 360px; }
.cliente-promo-resumo { margin: 14px 0 4px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(8,12,21,.48); }
.cliente-promo-resumo.has-active-promotion { border-color: rgba(41,214,160,.34); background: linear-gradient(135deg, rgba(41,214,160,.10), rgba(79,183,255,.06)); }
.cliente-promo-cabecalho { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.cliente-promo-cabecalho h4 { margin: 7px 0 0; font-size: 16px; }
.estado-pill { display: inline-flex; width: fit-content; min-height: 25px; align-items: center; padding: 5px 9px; border: 1px solid rgba(156,169,188,.2); border-radius: 999px; background: rgba(255,255,255,.055); color: var(--muted); font-size: 11px; font-weight: 900; line-height: 1.1; }
.estado-pill.is-active { color: #a7f3d0; border-color: rgba(41,214,160,.34); background: rgba(41,214,160,.11); }
.estado-pill.is-inactive { color: #ffd98a; border-color: rgba(245,189,79,.32); background: rgba(245,189,79,.10); }
.cliente-promo-validade { color: var(--muted); font-size: 12px; font-weight: 800; text-align: right; }
.cliente-promo-valores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.cliente-promo-valores div { padding: 11px 12px; border: 1px solid rgba(156,169,188,.14); border-radius: 13px; background: rgba(8,12,21,.54); }
.cliente-promo-valores small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; }
.cliente-promo-valores strong { display: block; margin-top: 4px; font-size: 18px; }
.cliente-promo-resumo > p { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.recuperacao-resumo { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 14px; padding: 14px; border: 1px solid rgba(41,214,160,.28); border-radius: 16px; background: linear-gradient(135deg, rgba(41,214,160,.10), rgba(79,183,255,.055)); }
.recuperacao-resumo-icone { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: rgba(41,214,160,.16); color: #a7f3d0; font-size: 22px; font-weight: 900; }
.recuperacao-resumo strong, .recuperacao-resumo small { display: block; }
.recuperacao-resumo strong { margin-top: 7px; font-size: 14px; }
.recuperacao-resumo small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.automation-toggle { justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8,12,21,.5); }
.automation-toggle span { flex: 1; min-width: 0; }
.automation-toggle strong, .automation-toggle small { display: block; }
.automation-toggle strong { color: var(--text); font-size: 14px; }
.automation-toggle small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.automation-toggle input { order: 2; flex: 0 0 18px; }
.menu-greeting-toggle { margin-top: 10px; border-color: rgba(59,130,246,.24); background: rgba(30,64,175,.075); }
.menu-greeting-toggle.is-disabled { opacity: .56; }
.menu-greeting-toggle.is-disabled strong { color: var(--muted); }
.config-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.config-field { display: block; color: var(--muted); font-size: 13px; font-weight: 800; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 48px; }
.input-suffix small { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; font-weight: 900; pointer-events: none; }
.descontos-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.descontos-grid label { display: block; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8,12,21,.55); color: var(--muted); font-weight: 800; font-size: 13px; }
.descontos-grid label > span { display: block; min-height: 20px; }
.descontos-grid input { margin-top: 8px; }

/* ================= 08 - ADMIN ================= */
.usuarios-grid { display: grid; gap: 10px; margin-top: 12px; }
.usuario-card, .admin-usuario-card { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8,12,21,.75); }
.admin-lista-top { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; align-items: end; margin-bottom: 12px; }
.admin-lista-top button, .admin-lista-top input { margin-top: 0; }
.admin-usuario-accordion { padding: 0; overflow: hidden; }
.admin-usuario-resumo { width: 100%; min-height: 68px; margin: 0; padding: 14px; display: grid !important; grid-template-columns: minmax(0, 1fr) 90px 34px !important; align-items: center !important; gap: 12px !important; text-align: left; color: var(--text); background: rgba(8,12,21,.72); border: 0; border-radius: 14px; box-shadow: none; }
.admin-usuario-resumo:hover { filter: none; transform: none; background: rgba(255,255,255,.055); }
.admin-usuario-resumo-info { min-width: 0; }
.admin-usuario-resumo-info strong, .admin-usuario-resumo strong { display: block; margin-bottom: 7px; font-size: 16px; overflow-wrap: anywhere; }
.admin-usuario-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-mini-info, .admin-usuario-tags span { width: auto !important; max-width: 100%; min-height: 24px; padding: 4px 9px; border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.1; white-space: nowrap; background: rgba(255,255,255,.055); border: 1px solid rgba(156,169,188,.14); }
.admin-status-bots, .admin-status-bots.compacto { width: 86px !important; min-width: 86px !important; max-width: 86px !important; min-height: 54px !important; margin: 0 !important; padding: 8px 10px !important; display: flex !important; flex-direction: column; align-items: center; justify-content: center; justify-self: end; border-radius: 14px; border: 1px solid rgba(41,214,160,.35); background: rgba(41,214,160,.10); color: var(--text); text-align: center; }
.admin-status-numero, .admin-status-bots.compacto .admin-status-numero { display: block; font-size: 17px; font-weight: 950; line-height: 1; color: #8fffd6; }
.admin-status-bots small, .admin-status-bots.compacto small { display: block; margin-top: 5px; font-size: 10px; font-weight: 850; color: var(--muted); }
.admin-accordion-seta { width: 30px !important; height: 30px !important; min-width: 30px !important; max-width: 30px !important; margin: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; justify-self: end; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(156,169,188,.2); }
.admin-usuario-accordion.aberto { border-color: rgba(41,214,160,.45); box-shadow: 0 0 0 1px rgba(41,214,160,.12); }
.admin-usuario-detalhes { display: grid; gap: 12px; padding: 14px; border-top: 1px solid rgba(156,169,188,.14); background: rgba(8,12,21,.45); }
.admin-usuario-detalhes.hidden { display: none !important; }
.admin-bots-box { padding: 12px; border-radius: 14px; border: 1px dashed rgba(156,169,188,.28); background: rgba(8,12,21,.42); }
.admin-bots-box p { margin: 0 0 8px; }
.admin-bots-box-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.admin-bots-box-head > div { min-width: 0; }
.btn-ver-testes-usuario { width: auto; min-width: 160px; margin: 0; white-space: nowrap; }
.admin-newchatbot-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(93, 134, 189, .34);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(93, 134, 189, .14), transparent 34%),
    rgba(8,12,21,.55);
}
.admin-newchatbot-link h2,
.admin-newchatbot-link p { margin: 0; }
.admin-newchatbot-link p { margin-top: 6px; }
.admin-newchatbot-button {
  min-width: 220px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border: 1px solid #31557f;
  border-radius: 10px;
  color: #f3f7fc;
  background: #1b3a63;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}
.admin-newchatbot-button:hover {
  background: #234a7d;
  border-color: #46709f;
  transform: translateY(-1px);
}
.admin-bots-lista { display: flex; flex-wrap: wrap; gap: 7px; }
.admin-bot-pill { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 850; overflow-wrap: anywhere; border: 1px solid var(--line); }
.admin-bot-pill.conectado { color: #b9ffe9; background: rgba(41,214,160,.12); border-color: rgba(41,214,160,.32); }
.admin-bot-pill.offline { color: #cbd5e1; background: rgba(255,255,255,.055); border-color: rgba(156,169,188,.18); }
.admin-limites-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.admin-limite-label { display: block; color: var(--muted); font-size: 13px; font-weight: 850; }
.admin-limite-label input, .admin-limite-label select { margin-top: 6px; }
.admin-usuario-actions { display: grid; gap: 10px; }
.admin-usuario-actions > button { margin-top: 0; }
.reset-senha-box { margin-top: 12px; padding: 12px; border-radius: 14px; border: 1px dashed rgba(156,169,188,.32); background: rgba(8,12,21,.42); }
.reset-senha-box label { display: block; color: var(--muted); font-size: 13px; font-weight: 800; margin-bottom: 4px; }
.reset-senha-box input { margin-top: 8px; }
.btn-resetar-senha-usuario { margin-top: 10px; }
.admin-conta-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.admin-conta-actions button { margin-top: 0; min-height: 40px; padding: 9px 10px; }
.conta-ativa { color: #8fffd6 !important; border-color: rgba(41,214,160,.35) !important; background: rgba(41,214,160,.10) !important; }
.conta-expirada { color: #ffb4bc !important; border-color: rgba(255,91,104,.35) !important; background: rgba(255,91,104,.10) !important; }
.conta-sem-validade { color: #ffe19a !important; border-color: rgba(245,189,79,.35) !important; background: rgba(245,189,79,.10) !important; }

/* ================= 09 - FLUXO AVANÇADO / CANVAS ================= */
.fluxo-avancado-card { overflow: hidden; background: radial-gradient(circle at top right, rgba(79,183,255,.08), transparent 30%), var(--surface); }
.fluxo-hero-head { margin-bottom: 18px; }
.fluxo-hero-head h2 { margin: 4px 0 6px; }
.fluxo-contexto-bot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 14px; margin-bottom: 12px; border: 1px solid rgba(156,169,188,.16); border-radius: 18px; background: rgba(8,11,16,.48); }
.fluxo-contexto-bot label, .fluxo-filtro-box label { display: block; margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 850; letter-spacing: .02em; }
.fluxo-contexto-bot select, .fluxo-contexto-bot button { margin-top: 0; }
.fluxo-contexto-bot button { width: auto; min-height: 46px; }
.fluxo-metricas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.fluxo-metrica { min-width: 0; padding: 12px 14px; border: 1px solid rgba(156,169,188,.15); border-radius: 16px; background: rgba(255,255,255,.035); }
.fluxo-metrica span { display: block; color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.fluxo-metrica strong { display: block; margin-top: 5px; font-size: 24px; line-height: 1; }
.fluxo-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: rgba(8,11,16,.55); margin-bottom: 18px; }
.fluxo-tab-btn { width: auto; min-height: 40px; margin-top: 0; padding: 9px 14px; border-radius: 12px; background: transparent; border: 1px solid transparent; color: var(--muted); box-shadow: none; }
.fluxo-tab-btn:hover { background: rgba(255,255,255,.06); color: var(--text); }
.fluxo-tab-btn.active { background: linear-gradient(135deg, rgba(41,214,160,.18), rgba(79,183,255,.14)); border-color: rgba(41,214,160,.42); color: var(--text); }
.fluxo-tab-btn:focus-visible, .fluxo-node:focus-visible { outline: 2px solid #4fb7ff; outline-offset: 3px; }
.fluxo-subtab { display: none; }
.fluxo-subtab.active { display: block; animation: fade .14s ease-in; }
.fluxo-subtop, .fluxo-conversas-top, .fluxo-canvas-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.fluxo-subtop h3, .fluxo-conversas-top h3, .fluxo-editor-commandbar h3, .fluxo-config-card h3 { margin: 4px 0 5px; }
.fluxo-subtop button, .fluxo-canvas-head button { width: auto; margin-top: 0; }
.fluxo-subtop-actions { display: flex; gap: 8px; align-items: center; }
.fluxo-filtro-box { padding: 12px; margin-bottom: 12px; border-radius: 16px; background: rgba(8,11,16,.36); border: 1px solid rgba(156,169,188,.13); }
.fluxo-filtro-box input { margin-top: 0; }
.fluxo-conversas-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fluxo-conversas-actions button { width: auto; margin-top: 0; min-height: 40px; padding: 9px 12px; }
.fluxos-lista-box, .fluxos-resumo-box { display: grid; gap: 12px; }
.fluxo-lista-vazia { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; border: 1px dashed rgba(156,169,188,.25); border-radius: 18px; background: rgba(8,11,16,.32); }
.fluxo-lista-vazia p { margin: 0; }
.fluxo-card, .fluxo-resumo-card { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(8,11,16,.56); }
.fluxo-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fluxo-card-top button { width: auto; min-width: 110px; margin-top: 0; }
.fluxo-resumo-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.fluxo-resumo-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.07); font-size: 20px; }
.fluxo-resumo-info strong { display: block; margin-bottom: 4px; }
.fluxo-resumo-info p { margin: 2px 0; }
.fluxo-resumo-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.fluxo-resumo-actions button { width: auto; min-width: 86px; margin-top: 0; }
.fluxo-badge, .fluxo-status-btn { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.fluxo-status-btn { width: auto; min-height: 36px; margin-top: 0; padding: 8px 12px; border: 1px solid transparent; box-shadow: none; }
.fluxo-badge.ativo, .fluxo-status-btn.ativo { background: rgba(26,188,109,.14); border-color: rgba(26,188,109,.35); color: #b9ffe9; }
.fluxo-badge.inativo, .fluxo-status-btn.inativo { background: rgba(255,77,97,.14); border-color: rgba(255,77,97,.35); color: #ffc4ca; }
.fluxo-editor-commandbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; padding: 14px; margin-bottom: 12px; border: 1px solid rgba(156,169,188,.15); border-radius: 18px; background: rgba(8,11,16,.38); }
.fluxo-editor-commandbar-actions, .fluxo-config-actions { display: flex; gap: 8px; align-items: center; }
.fluxo-editor-commandbar-actions button, .fluxo-config-actions button { width: auto; min-height: 42px; margin-top: 0; }
.fluxo-builder-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.fluxo-toolbox { position: sticky; top: 24px; display: grid; gap: 8px; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: rgba(8,11,16,.45); }
.fluxo-toolbox-title { margin: 12px 0 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.fluxo-toolbox-title:first-child { margin-top: 0; }
.fluxo-tool-btn { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 46px; margin-top: 0; padding: 9px 10px; border-radius: 14px; border: 1px solid transparent; background: rgba(255,255,255,.04); color: var(--text); box-shadow: none; text-align: left; }
.fluxo-tool-btn span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 999px; font-weight: 900; color: white; flex: 0 0 32px; }
.fluxo-tool-btn.roxo span { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.fluxo-tool-btn.amarelo span { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.fluxo-tool-btn.laranja span { background: linear-gradient(135deg, #fb923c, #f97316); }
.fluxo-tool-btn.azul span { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.fluxo-builder-area { min-width: 0; }
.fluxo-canvas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.fluxo-canvas-toolbar button { width: auto; min-height: 36px; margin-top: 0; padding: 7px 11px; border-radius: 10px; }
.fluxo-canvas-toolbar span { min-width: 54px; text-align: center; font-weight: 850; color: var(--muted); }
.fluxo-canvas-dica { font-size: 13px; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.fluxo-canvas-zoom-actions { display: flex; align-items: center; gap: 8px; }
.fluxo-canvas { position: relative; min-height: 620px; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background-color: rgba(255,255,255,.03); background-image: radial-gradient(rgba(156,169,188,.22) 1.2px, transparent 1.2px); background-size: 26px 26px; cursor: grab; user-select: none; touch-action: none; overscroll-behavior: contain; }
.fluxo-canvas.arrastando { cursor: grabbing; }
.fluxo-canvas-inner { position: relative; width: 3200px; height: 1800px; transform-origin: 0 0; transition: none; touch-action: none; }
.fluxo-edges { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.fluxo-edge-line { stroke: rgba(245,189,79,.85); stroke-width: 3; stroke-dasharray: 8 8; fill: none; }
.fluxo-node { position: absolute; width: 260px; min-height: 96px; border-radius: 18px; background: #fff; color: #15171d; box-shadow: 0 16px 32px rgba(0,0,0,.22); border: 1px solid rgba(0,0,0,.08); overflow: hidden; cursor: grab; transition: transform .15s ease, box-shadow .15s ease; will-change: left, top; user-select: none; touch-action: none; }
.fluxo-node:hover { transform: translateY(-2px); box-shadow: 0 22px 44px rgba(0,0,0,.28); }
.fluxo-node:active { cursor: grabbing; }
.fluxo-node-head { min-height: 58px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-weight: 850; }
.fluxo-node-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 999px; background: #111318; color: #fff; font-weight: 900; }
.fluxo-node-body { padding: 12px 16px 16px; background: rgba(255,255,255,.78); color: #555d69; display: grid; gap: 4px; }
.fluxo-node-body small { display: block; color: #7b8492; overflow-wrap: anywhere; }
.fluxo-node-roxo .fluxo-node-head, .fluxo-node-conteudo .fluxo-node-head, .fluxo-node-menu .fluxo-node-head { background: linear-gradient(135deg, #9b4dff, #b14cff); color: #fff; }
.fluxo-node-amarelo .fluxo-node-head, .fluxo-node-acao .fluxo-node-head { background: #fff1c8; color: #171717; }
.fluxo-node-laranja .fluxo-node-head, .fluxo-node-condicao .fluxo-node-head, .fluxo-node-atraso .fluxo-node-head { background: #fff0dc; color: #171717; }
.fluxo-node-azul .fluxo-node-head, .fluxo-node-salvar .fluxo-node-head, .fluxo-node-distribuidor .fluxo-node-head { background: #dff3ff; color: #171717; }
.fluxo-node-inicio { width: 260px; background: #d6ff37; }
.fluxo-node-inicio .fluxo-node-head { background: #d6ff37; color: #111318; }
.fluxo-node-remove { position: absolute; top: 8px; right: 8px; width: 34px; min-height: 34px; padding: 0; margin: 0; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.92); box-shadow: none; color: #d82f3f; }
.fluxo-editor-vazio { min-height: 260px; display: grid; place-items: center; text-align: center; gap: 10px; border: 1px dashed var(--line); border-radius: 18px; background: rgba(8,12,21,.35); }
.fluxo-config-card { display: grid; gap: 18px; padding: 18px; border: 1px solid rgba(156,169,188,.16); border-radius: 20px; background: linear-gradient(145deg, rgba(41,214,160,.07), rgba(8,11,16,.48)); }
.fluxo-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px; border: 1px solid rgba(156,169,188,.17); border-radius: 16px; background: rgba(255,255,255,.035); cursor: pointer; }
.fluxo-switch-row span { min-width: 0; }
.fluxo-switch-row strong, .fluxo-switch-row small { display: block; }
.fluxo-switch-row small { margin-top: 4px; color: var(--muted); }
.fluxo-switch-row input { width: 22px; height: 22px; margin: 0; flex: 0 0 22px; accent-color: #29d6a0; }
.fluxo-resultado-card .field-help { margin-bottom: 0; }
body.arrastando-bloco-fluxo, body.arrastando-bloco-fluxo * { cursor: grabbing !important; user-select: none !important; }
body.arrastando-bloco-fluxo { overflow: hidden; }

/* ================= 10 - CONVERSAS ================= */
.fluxo-conversas-preview { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; height: calc(100vh - 190px); min-height: 650px; max-height: 900px; overflow: hidden; }
.fluxo-conversas-lista { height: 100%; max-height: none; overflow-y: auto; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.035); padding: 10px; }
.fluxo-conversa-vazia, .fluxo-chat-empty { color: var(--muted); padding: 20px; text-align: center; }
.fluxo-conversa-item { width: 100%; display: block; text-align: left; border: 1px solid transparent; background: rgba(255,255,255,.04); border-radius: 14px; padding: 12px; margin: 0 0 8px; cursor: pointer; box-shadow: none; }
.fluxo-conversa-item:hover { background: rgba(255,255,255,.07); }
.fluxo-conversa-item.active { border-color: rgba(59,130,246,.65); background: rgba(59,130,246,.14); }
.fluxo-conversa-linha { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.fluxo-conversa-linha span, .fluxo-conversa-numero { color: var(--muted); font-size: 12px; }
.fluxo-conversa-numero { margin-top: 4px; }
.fluxo-conversa-ultima { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.fluxo-conversa-ultima b { min-width: 22px; height: 22px; border-radius: 999px; background: #22c55e; color: #07110b; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.fluxo-chat-preview { height: 100%; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.035); display: flex; flex-direction: column; }
.fluxo-chat-header { flex-shrink: 0; padding: 9px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.fluxo-chat-header strong { font-size: 14px; line-height: 1.2; }
.fluxo-chat-header span { color: var(--muted); font-size: 11px; line-height: 1.2; }
.fluxo-chat-mensagens { flex: 1 1 auto; min-height: 0; padding: 16px; overflow-y: auto; background: radial-gradient(circle at top left, rgba(59,130,246,.08), transparent 35%), rgba(0,0,0,.08); }
.fluxo-msg { display: flex; margin-bottom: 10px; }
.fluxo-msg.entrada { justify-content: flex-start; }
.fluxo-msg.saida { justify-content: flex-end; }
.fluxo-msg-balao { max-width: min(75%, 560px); padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.08); }
.fluxo-msg.saida .fluxo-msg-balao { background: rgba(59,130,246,.18); border-color: rgba(59,130,246,.32); }
.fluxo-msg-balao p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.fluxo-msg-balao small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; text-align: right; }
.fluxo-msg-img, .fluxo-msg-video { display: block; max-width: 260px; max-height: 320px; border-radius: 14px; margin-bottom: 8px; object-fit: contain; }
.fluxo-msg-audio { width: 260px; max-width: 100%; margin-bottom: 8px; }
.fluxo-chat-input-area { flex-shrink: 0; min-height: 130px; border-top: 1px solid var(--line); padding: 12px; display: grid; grid-template-columns: 1fr; gap: 9px; background: rgba(8,11,16,.72); }
.fluxo-chat-input-area textarea { resize: none; margin: 0; min-height: 82px; max-height: 120px; }
.fluxo-chat-input-area button { margin: 0; min-height: 42px; }
.fluxo-chat-midia-info, .fluxo-chat-input-area input[type="file"] { grid-column: 1 / -1; }
.fluxo-chat-midia-info { font-size: 12px; padding: 6px 2px; margin: 0; }
.fluxo-chat-input-area input[type="file"] { min-height: 40px; padding: 8px; margin-top: 0; }
.fluxo-chat-anexo { color: var(--muted); font-size: 12px; font-weight: 850; }
.fluxo-chat-send-actions { display: grid; grid-template-columns: auto minmax(150px, 220px); gap: 8px; justify-content: end; }

/* ================= 11 - MODAIS ================= */
.console-mobile-modal, .fluxo-modal, .modal-admin-conta { position: fixed; inset: 0; z-index: 9999; }
.console-mobile-modal.hidden, .fluxo-modal.hidden, .modal-admin-conta.hidden { display: none !important; }
.console-mobile-backdrop, .fluxo-modal-backdrop, .modal-admin-conta-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.68); backdrop-filter: blur(5px); }
.console-mobile-modal { display: none; }
.modal-admin-conta { z-index: 10000; display: grid; place-items: center; padding: 20px; }
.modal-admin-conta-card { position: relative; width: min(520px, 100%); max-height: min(720px, calc(100vh - 40px)); overflow: auto; border-radius: 22px; border: 1px solid rgba(156,169,188,.18); background: radial-gradient(circle at top left, rgba(41,214,160,.12), transparent 34%), linear-gradient(180deg, rgba(23,32,51,.98), rgba(8,12,21,.98)); box-shadow: 0 24px 80px rgba(0,0,0,.48); }
.modal-admin-conta-head, .modal-admin-conta-footer { display: flex; gap: 14px; padding: 20px; border-color: rgba(156,169,188,.14); }
.modal-admin-conta-head { align-items: flex-start; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid rgba(156,169,188,.14); }
.modal-admin-conta-head h2 { margin: 0 0 4px; }
.modal-admin-conta-close { width: 42px !important; height: 42px !important; min-height: 42px !important; min-width: 42px !important; max-width: 42px !important; padding: 0 !important; margin: 0 !important; border-radius: 14px; }
.modal-admin-conta-body { padding: 18px 20px; }
.modal-admin-conta-body label { display: block; margin-top: 12px; color: var(--muted); font-weight: 800; font-size: 13px; }
.modal-admin-conta-footer { display: grid; grid-template-columns: 1fr 1fr; padding-top: 14px; border-top: 1px solid rgba(156,169,188,.14); }
.modal-admin-conta-footer button { margin-top: 0; }
.fluxo-modal { z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 18px; }
.fluxo-modal-backdrop { background: rgba(0,0,0,.48); backdrop-filter: blur(2px); }
.fluxo-modal-card { position: relative; z-index: 1; width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 34px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-radius: 18px; overflow: hidden; background: #fff; color: #16191f; box-shadow: 0 28px 80px rgba(0,0,0,.35); border: 1px solid rgba(0,0,0,.08); }
.fluxo-modal-head, .fluxo-modal-footer { background: #fff; border-color: #e8eaee; }
.fluxo-modal-head { min-height: 64px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e8eaee; }
.fluxo-modal-head h2 { margin: 0; font-size: 22px; font-weight: 850; color: #111318; }
.fluxo-modal-close { width: 42px; min-height: 42px; margin-top: 0; padding: 0; border-radius: 999px; border: 0; background: transparent; color: #111318; box-shadow: none; font-size: 24px; font-weight: 500; }
.fluxo-modal-body { min-height: 380px; max-height: calc(100vh - 160px); overflow: auto; padding: 16px; background: #fff; }
.fluxo-modal-footer { min-height: 70px; padding: 14px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; border-top: 1px solid #e8eaee; }
.fluxo-modal-section { padding: 16px; border-radius: 18px; background: #f4f5f7; border: 1px solid #eef0f2; }
.fluxo-modal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .92fr); gap: 16px; }
.fluxo-modal-section h3 { margin: 0 0 12px; display: flex; align-items: center; gap: 8px; color: #15171c; font-size: 17px; font-weight: 850; }
.fluxo-modal-section label { display: block; margin: 13px 0 6px; color: #20242c; font-weight: 700; }
.fluxo-modal-section .muted, .fluxo-modal-section p.muted { color: #69717d; font-size: 13px; margin: 4px 0 8px; }
.fluxo-modal-section input, .fluxo-modal-section select, .fluxo-modal-section textarea { width: 100%; min-height: 48px; margin-top: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #b9c1cc; background: #fff; color: #14171d; box-shadow: none; }
#modalFluxoMensagem { min-height: 150px; border-radius: 16px; }
#modalFluxoPreview { min-height: 420px; margin: 8px 0 0; display: grid; place-items: center; white-space: pre-wrap; border: 0; border-radius: 14px; background: #fff; color: #5c6470; box-shadow: none; }
.modal-opcoes-menu, .modal-bloco-midias-box { display: grid; gap: 10px; margin-top: 8px; }
.modal-opcao-card, .modal-bloco-midia-item { padding: 12px; border-radius: 14px; background: #fff; border: 1px solid #e1e5ea; }
.modal-opcao-top, .modal-bloco-midias-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal-bloco-midias-head { align-items: flex-start; margin: 12px 0; }
.modal-opcao-top button, .modal-bloco-midias-head button, .fluxo-modal-section button.secondary { width: auto; min-height: 40px; margin-top: 12px; padding: 9px 13px; border-radius: 12px; }
.fluxo-modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ================= 12 - MOBILE ================= */
.mobile-bottom-nav { display: none; }

@media (max-width: 900px) {
  .app { display: block; min-height: 100vh; }
  .main { width: 100%; min-height: 100vh; padding: 12px 16px 72px !important; }
  .sidebar { position: fixed; top: 0; left: 0; width: min(82vw, 320px); max-width: 320px; height: 100vh; z-index: 1000; transform: translateX(-105%); transition: transform .22s ease; overflow-y: auto; box-shadow: 18px 0 45px rgba(0,0,0,.35); border-right: 1px solid rgba(156,169,188,.16); border-bottom: 0; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block !important; position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .sidebar-overlay.hidden { display: none !important; }
  .topbar { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 14px; margin-bottom: 14px; }
  .topbar-left { width: 100%; align-items: center; }
  .topbar-title h2 { font-size: 24px; line-height: 1.1; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-subtitle { display: none !important; }
  .top-actions { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
  .badge { max-width: 100%; min-height: 38px; padding: 8px 11px; font-size: 14px; }
  .logout { min-height: 38px; padding: 8px 14px; }
  .mobile-menu-btn { width: 48px !important; height: 48px !important; min-width: 48px !important; max-width: 48px !important; }
  .grid, .cards-grid, .row, .descontos-grid, .config-fields-grid, .admin-limites-grid, .fluxo-builder-layout, .fluxo-modal-grid, .fluxo-modal-row { grid-template-columns: 1fr; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .dashboard-hero-copy { min-height: 230px; }
  .dashboard-metricas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-secao-head { flex-direction: column; }
  .dashboard-secao-head > p { max-width: none; text-align: left; }
  .conexao-metricas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .conexao-novo-bot-form { grid-template-columns: 1fr; }
  .conexao-novo-bot-form button { width: 100%; }
  .conexao-acoes { grid-template-columns: 1fr; }
  .conexao-bot-selecionado-head, .qr-shell-head, .conexao-lista-head { flex-direction: column; }
  .conexao-lista-head button { width: 100%; }
  .bot-actions .bot-remover-duplo { grid-template-columns: 1fr; }
  .cliente-metricas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cliente-modos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cliente-modo-cabecalho { flex-direction: column; }
  .cliente-modo-cabecalho > p { max-width: none; text-align: left; }
  .cliente-filtro-linha { grid-template-columns: 1fr; }
  .cliente-filtro-linha button { width: 100%; }
  .cliente-consulta-acoes { grid-template-columns: 1fr; }
  .cliente-promo-cabecalho { flex-direction: column; }
  .cliente-promo-validade { text-align: left; }
  .config-action-bar { grid-template-columns: 1fr; }
  .config-result-head { flex-direction: column; }
  .menu-opcoes-head { flex-direction: column; }
  .menu-opcoes-head button { width: 100%; }
  .menu-opcao-main-grid, .menu-midia-grid { grid-template-columns: 1fr; }
  .menu-opcao-order-actions { grid-template-columns: 1fr 1fr; }
  .menu-opcao-order-actions .danger { grid-column: 1 / -1; width: 100%; }
  .menu-opcao-summary { grid-template-columns: 32px minmax(0, 1fr); }
  .menu-opcao-edit-label { display: none; }
  .resultado-card { position: static; }
  .section-title-row { align-items: flex-start; flex-direction: column; }
  .section-title-row button { width: 100%; }
  .actions-mobile-only { display: grid; }
  .console-actions-desktop { display: none !important; }
  .menu-opcao-top { align-items: stretch; flex-direction: column; }
  .menu-opcao-top button { width: 100%; }
  .bot-remover-duplo { max-width: none; }
  .admin-lista-top { grid-template-columns: 1fr; }
  .admin-newchatbot-link { grid-template-columns: 1fr; }
  .admin-newchatbot-button { width: 100%; min-width: 0; }
  .admin-usuario-resumo { grid-template-columns: minmax(0, 1fr) 34px !important; }
  .admin-status-bots.compacto, .admin-status-bots { display: none !important; }
  .admin-accordion-seta { grid-column: 2; grid-row: 1; }
  .admin-conta-actions { grid-template-columns: 1fr; }
  .fluxo-contexto-bot { grid-template-columns: 1fr; }
  .fluxo-contexto-bot button { width: 100%; }
  .fluxo-metricas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fluxo-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .fluxo-tab-btn { width: 100%; }
  .fluxo-subtop-actions, .fluxo-editor-commandbar, .fluxo-switch-row { align-items: stretch; flex-direction: column; }
  .fluxo-subtop-actions, .fluxo-editor-commandbar-actions, .fluxo-config-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .fluxo-subtop-actions button, .fluxo-editor-commandbar-actions button, .fluxo-config-actions button { width: 100%; }
  .fluxo-resumo-card { grid-template-columns: 42px minmax(0, 1fr); }
  .fluxo-resumo-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .fluxo-toolbox { position: static; grid-template-columns: 1fr 1fr; }
  .fluxo-toolbox-title { grid-column: 1 / -1; }
  .fluxo-canvas { min-height: 520px; }
  .fluxo-node { width: 230px; }
  .fluxo-conversas-top { align-items: flex-start; flex-direction: column; }
  .fluxo-conversas-preview { height: auto; max-height: none; min-height: 0; grid-template-columns: 1fr; overflow: visible; }
  .fluxo-conversas-lista { max-height: 320px; }
  .fluxo-chat-preview { height: 640px; }
  .fluxo-chat-mensagens { min-height: 420px; }
  .fluxo-chat-input-area { grid-template-columns: 1fr; }
  .fluxo-chat-send-actions { grid-template-columns: 1fr; justify-content: stretch; }
  .fluxo-modal { padding: 0; align-items: stretch; }
  .fluxo-modal-card { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .fluxo-modal-body { max-height: calc(100vh - 136px); padding: 12px; }
  .fluxo-modal-section { padding: 14px; }
  #modalFluxoPreview { min-height: 280px; }
  .fluxo-modal-footer { padding: 12px; }
  .modal-admin-conta { padding: 12px; }
  .modal-admin-conta-footer { grid-template-columns: 1fr; }
  .console-mobile-modal { display: block; }
  .console-mobile-card { position: absolute; left: 10px; right: 10px; bottom: 10px; max-height: 82vh; padding: 14px; border-radius: 20px; border: 1px solid rgba(156,169,188,.22); background: linear-gradient(180deg, rgba(23,32,51,.98), rgba(8,12,21,.98)); box-shadow: 0 -12px 42px rgba(0,0,0,.45); overflow: hidden; }
  .console-mobile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
  .console-mobile-close { width: 46px; min-width: 46px; min-height: 42px; margin-top: 0; padding: 8px; }
  #consoleMobileConteudo { min-height: 260px; max-height: 62vh; margin-top: 8px; overflow: auto; }
  .mobile-bottom-nav { position: fixed; left: 20px; right: 20px; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 850; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px; border-radius: 18px; background: rgba(22,24,31,.92); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 12px 32px rgba(0,0,0,.42); backdrop-filter: blur(16px); }
  .bottom-nav-item { min-height: 44px !important; height: 44px !important; width: 100%; margin: 0 !important; padding: 4px 3px !important; border-radius: 14px !important; border: 1px solid transparent !important; background: transparent !important; color: var(--muted) !important; box-shadow: none !important; display: grid; place-items: center; gap: 1px; font-size: 10px; font-weight: 850; line-height: 1; }
  .bottom-nav-icon { font-size: 17px; line-height: 1; }
  .bottom-nav-item.active { color: #fff !important; background: rgba(255,255,255,.14) !important; border-color: rgba(255,255,255,.12) !important; }
}

@media (min-width: 901px) {
  .mobile-bottom-nav { display: none !important; }
  #tab-fluxos > .grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
  #tab-fluxos .resultado-card { width: 260px; min-width: 260px; padding: 14px; }
  #resultadoFluxos { min-height: 150px; max-height: 280px; font-size: 12px; padding: 10px; }
  #tab-fluxos .resultado-card .console-actions-desktop { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; padding-top: 10px; }
  #tab-fluxos .resultado-card .console-actions-desktop button { min-height: 36px; padding: 8px 10px; font-size: 12px; margin-top: 0; }
  #tab-fluxos .fluxo-builder-layout { grid-template-columns: 185px minmax(0, 1fr); gap: 12px; }
  #tab-fluxos .fluxo-toolbox { padding: 10px; }
  #tab-fluxos .fluxo-tool-btn { min-height: 40px; padding: 7px 9px; font-size: 13px; }
  #tab-fluxos .fluxo-tool-btn span { width: 28px; height: 28px; flex-basis: 28px; }
  #tab-fluxos .fluxo-canvas { min-height: 700px; }
}

/* ================= 13 - CADASTRO / AVISOS ================= */
.cadastro-alerta-email {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(245, 189, 79, .42);
  background:
    radial-gradient(circle at top left, rgba(245, 189, 79, .16), transparent 42%),
    rgba(245, 189, 79, .08);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.cadastro-alerta-email strong {
  display: block;
  margin-bottom: 8px;
  color: #ffe19a;
  font-size: 15px;
}

.cadastro-alerta-email p {
  margin: 6px 0 0;
  color: #dbe7f5;
  font-size: 13px;
  line-height: 1.45;
}

/* ================= 14 - LOGIN LANDING / PLANO / FAQ ================= */
#login.login-wrapper {
  min-height: 100vh;
  padding: 42px 22px 70px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 22px;
}

#login .login-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(320px, 460px);
  gap: 28px;
  align-items: start;
}

.login-coluna-direita,
.login-plano-area { min-width: 0; width: 100%; }

.login-plano-toggle {
  width: 100% !important;
  min-height: 230px;
  margin: 0 !important;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  text-align: left;
  border-radius: 30px;
  border: 1px solid rgba(41, 214, 160, .34);
  color: #f8fafc;
  background:
    radial-gradient(circle at top left, rgba(41, 214, 160, .24), transparent 40%),
    linear-gradient(180deg, rgba(23, 32, 51, .96), rgba(8, 12, 21, .98));
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
  transition: transform .22s ease, box-shadow .22s ease, opacity .22s ease;
}

.login-plano-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 80px rgba(0,0,0,.42);
  filter: none;
}

.login-plano-toggle-texto b {
  display: block;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.04;
}

.login-plano-toggle-texto small {
  display: block;
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 15px;
}

.login-plano-toggle > strong {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #8fffd6;
  background: rgba(41, 214, 160, .12);
  border: 1px solid rgba(41, 214, 160, .26);
  font-size: 18px;
}

.login-plano-card {
  padding: 30px;
  border-radius: 28px;
  border: 1px solid rgba(41, 214, 160, .24);
  background:
    radial-gradient(circle at top left, rgba(41, 214, 160, .18), transparent 38%),
    linear-gradient(180deg, rgba(23, 32, 51, .94), rgba(8, 12, 21, .96));
  box-shadow: 0 22px 70px rgba(0,0,0,.34);
}

.login-plano-card.login-plano-card-fechado { display: none !important; }
.login-plano-card.login-plano-card-aberto { display: block !important; animation: abrirPlanoLogin .32s ease both; }

@keyframes abrirPlanoLogin {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-plano-card h2 {
  margin: 14px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.04;
}

.login-plano-preco {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 12px 0;
}

.login-plano-preco strong {
  font-size: clamp(34px, 5vw, 54px);
  line-height: .95;
  color: #8fffd6;
}

.login-plano-preco span {
  color: var(--muted);
  font-weight: 850;
  margin-bottom: 6px;
}

.login-plano-lista,
.assinatura-beneficios {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 11px;
}

.login-plano-lista li,
.assinatura-beneficios li {
  color: #dbe7f5;
  line-height: 1.4;
  font-weight: 650;
}

.login-plano-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.login-plano-actions button { margin-top: 0; }

.login-faq-call-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 8px 0 6px;
}

.login-faq-call {
  width: auto !important;
  min-height: 54px !important;
  margin: 0 !important;
  padding: 9px 18px 9px 10px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px !important;
  border: 1px solid rgba(41, 214, 160, .34);
  color: #f8fafc !important;
  background:
    radial-gradient(circle at top left, rgba(41, 214, 160, .20), transparent 42%),
    rgba(17, 24, 39, .88) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.24) !important;
  animation: loginFaqBounce 1.55s ease-in-out infinite;
}

.login-faq-call:hover { filter: none; }

.login-faq-call b {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #051015;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-size: 24px;
  line-height: 1;
}

.login-faq-call span {
  white-space: nowrap;
  font-weight: 850;
}

@keyframes loginFaqBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

.login-faq-section {
  width: min(1120px, 100%);
  margin: 18px auto 0;
}

.login-faq-inner {
  padding: 30px 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(41, 214, 160, .10), transparent 36%),
    rgba(17, 24, 39, .70);
  border: 1px solid rgba(156, 169, 188, .16);
  box-shadow: 0 22px 70px rgba(0,0,0,.20);
}

.login-faq-inner h2 {
  text-align: center;
  margin: 0 0 24px;
  font-size: clamp(28px, 4vw, 42px);
}

.faq-lista { display: grid; gap: 12px; }

.faq-item {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(156, 169, 188, .16);
  background: rgba(255,255,255,.045);
}

.faq-item.aberto {
  border-color: rgba(41, 214, 160, .34);
  background: rgba(41, 214, 160, .08);
}

.faq-pergunta {
  width: 100% !important;
  margin: 0 !important;
  min-height: 58px !important;
  padding: 16px 20px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #f8fafc !important;
  text-align: left;
}

.faq-pergunta:hover { transform: none; filter: none; }
.faq-pergunta span { font-weight: 850; font-size: 16px; }
.faq-pergunta b { font-size: 28px; line-height: 1; color: #8fffd6; }

.faq-resposta {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  color: #cbd5e1;
  line-height: 1.6;
  transition: max-height .25s ease, padding .25s ease;
}

.faq-item.aberto .faq-resposta {
  max-height: 220px;
  padding: 0 20px 18px;
}

/* ================= 15 - ASSINATURA / MERCADO PAGO ================= */
.assinatura-plano-card {
  margin: 18px 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(41, 214, 160, .32);
  background:
    radial-gradient(circle at top left, rgba(41, 214, 160, .14), transparent 40%),
    rgba(8, 12, 21, .62);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.assinatura-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #8fffd6;
  background: rgba(41, 214, 160, .12);
  border: 1px solid rgba(41, 214, 160, .32);
}

.assinatura-plano-card h3 { margin: 10px 0 4px; }

.assinatura-preco {
  text-align: right;
  white-space: nowrap;
}

.assinatura-preco strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  color: #8fffd6;
}

.assinatura-preco span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.assinatura-beneficios { margin-top: 14px; }
.assinatura-beneficios li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(156,169,188,.12);
}
.assinatura-beneficios li:last-child { border-bottom: 0; }

body.conta-expirada-assinatura .menu-item[data-tab="assinar"] {
  opacity: 1 !important;
  pointer-events: auto !important;
  border-color: rgba(41, 214, 160, .42);
  background: linear-gradient(135deg, rgba(41, 214, 160, .16), rgba(79, 183, 255, .10));
}

.menu-bloqueado-expirado { filter: grayscale(1); }

/* ================= 16 - LOGO / WHATSAPP / FLUXO IMPORT EXPORT ================= */
.brand-icon.brand-logo {
  width: 46px;
  height: 46px;
  min-width: 46px;
  max-width: 46px;
  min-height: 46px;
  max-height: 46px;
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon.brand-logo img {
  display: block;
  width: 155%;
  height: 155%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

/* ================= WHATSAPP SUPORTE FIXO ================= */

.whatsapp-suporte-fixo {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .22);
  z-index: 9999;
  transition: transform .2s ease, box-shadow .2s ease;
}

.whatsapp-suporte-fixo:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .30);
}

.whatsapp-suporte-fixo svg {
  width: 38px;
  height: 38px;
  display: block;
}

/* Mobile: sobe para não bater no menu inferior */
@media (max-width: 900px) {
  .whatsapp-suporte-fixo {
    width: 54px;
    height: 54px;
    right: 14px;
    bottom: 86px;
  }

  .whatsapp-suporte-fixo svg {
    width: 31px;
    height: 31px;
  }
}

.fluxo-subtop-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.fluxo-subtop-actions button {
  width: auto;
  margin-top: 0;
  min-height: 40px;
  padding: 9px 13px;
}

.fluxo-resumo-actions { gap: 8px; }
.fluxo-resumo-actions button { min-height: 38px; padding: 8px 11px; }

/* ================= 17 - RESPONSIVO FINAL ================= */
@media (max-width: 900px) {
  #login.login-wrapper { padding: 20px 14px 56px; }
  #login .login-layout { grid-template-columns: 1fr; gap: 18px; }
  #login .login-coluna-direita { order: 1; }
  #login .login-plano-area { order: 2; }
  .login-plano-toggle { min-height: 170px; padding: 22px; }
  .login-plano-toggle-texto b { font-size: 30px; }
  .login-plano-actions { grid-template-columns: 1fr; }
  .login-faq-call span { white-space: normal; }
  .login-faq-inner { padding: 22px 14px; }
}

@media (max-width: 700px) {
  .assinatura-plano-card { grid-template-columns: 1fr; }
  .assinatura-preco { text-align: left; }
  .fluxo-subtop-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
  .fluxo-subtop-actions button { width: 100%; }
}

/* ================= BOTÃO PAUSAR BOT ================= */

.btn-bot-pausar {
  background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
  border-color: rgba(56, 189, 248, .55) !important;
  color: #f8fafc !important;
  font-weight: 800;
}

.btn-bot-pausar:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.bot-status-pill.status-pausado {
  background: rgba(59, 130, 246, .15);
  border-color: rgba(59, 130, 246, .35);
  color: #93c5fd;
}

/* ================= CARDS CLICÁVEIS DA ABA INÍCIO ================= */

.mini-card-link {
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.mini-card-link:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 183, 255, .45);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .24);
}

.mini-card-link:active {
  transform: translateY(0);
}

/* ================= AVISO BOT DUPLICADO ================= */

.bot-aviso-duplicado {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(245, 158, 11, .13);
  border: 1px solid rgba(245, 158, 11, .35);
  color: #fbbf24;
  font-size: .88rem;
  line-height: 1.35;
}

.bot-aviso-duplicado b {
  color: #fde68a;
}

/* ================= MÚLTIPLAS MENSAGENS NO FLUXO ================= */

.fluxo-mensagem-item {
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(15, 23, 42, .42);
}

.fluxo-mensagem-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.fluxo-mensagem-topo strong {
  color: #e5e7eb;
}

button.small {
  padding: 7px 10px;
  font-size: .8rem;
}

/* ================= 16 - TEMA ESCURO AZUL-MARINHO ================= */

/* Superfícies principais */
.dashboard-hero-copy,
.dashboard-bot-atual,
.dashboard-secao,
.fluxo-avancado-card,
.login-plano-toggle,
.login-plano-card,
.assinatura-plano-card {
  background: #111722 !important;
  border-color: var(--line-soft) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.18) !important;
}

.dashboard-hero-copy,
.config-overview,
.recuperacao-resumo,
.cliente-promo-resumo.has-active-promotion,
.fluxo-config-card {
  background-image: none !important;
}

.dashboard-metrica,
.dashboard-atalho,
.conexao-metrica,
.conexao-novo-bot,
.conexao-bot-selecionado,
.qr-shell,
.bot-card,
.config-overview,
.automation-toggle,
.menu-opcao-card,
.cliente-metrica,
.cliente-promo-resumo,
.cliente-promo-valores div,
.recuperacao-resumo,
.descontos-grid label,
.usuario-card,
.admin-usuario-card,
.admin-bots-box,
.fluxo-contexto-bot,
.fluxo-metrica,
.fluxo-filtro-box,
.fluxo-editor-commandbar,
.fluxo-toolbox,
.fluxo-card,
.fluxo-resumo-card,
.fluxo-config-card,
.fluxo-switch-row,
.fluxo-conversas-lista,
.fluxo-chat-preview,
.preview-box,
.user-box {
  background: #0e141e !important;
  border-color: #253043 !important;
  box-shadow: none !important;
}

.dashboard-atalho:hover,
.bot-card:hover,
.fluxo-conversa-item:hover {
  background: #151e2b !important;
  border-color: #34445b !important;
}

/* Ações e navegação */
.cliente-modo-btn.active,
.fluxo-tab-btn.active,
.bottom-nav-item.active,
.bot-card-selected {
  background: #182d4a !important;
  border-color: #315987 !important;
  color: #f4f7fb !important;
  box-shadow: none !important;
}

.btn-bot-pausar,
.bot-btn-qr {
  background: #1b3a63 !important;
  border-color: #31557f !important;
  color: #f3f7fc !important;
}

.btn-bot-pausar:hover,
.bot-btn-qr:hover {
  background: #234a7d !important;
  filter: none !important;
}

.login-faq-call {
  border-radius: 12px !important;
  border-color: #31557f !important;
  background: #15243a !important;
  box-shadow: none !important;
  animation: loginFaqBounce 1.55s ease-in-out infinite !important;
}

.login-faq-call b {
  color: #eaf1f9;
  background: #264d7c;
}

body.conta-expirada-assinatura .menu-item[data-tab="assinar"] {
  border-color: #315987 !important;
  background: #182d4a !important;
}

.assinatura-preco strong { color: #8faed5; }

.config-overview-icon,
.recuperacao-resumo-icone,
.dashboard-atalho > span,
.brand-icon {
  background: #172a45 !important;
  color: #82a5d4 !important;
  border-color: #29496f !important;
}

.config-overview,
.recuperacao-resumo {
  border-color: #294463 !important;
}

.estado-pill.is-active,
.fluxo-badge.ativo,
.fluxo-status-btn.ativo {
  color: #a9d5c2;
  border-color: #396653;
  background: #172a24;
}

.estado-pill.is-inactive {
  color: #dcc18d;
  border-color: #64553b;
  background: #272217;
}

/* Editor visual no mesmo tema */
.fluxo-canvas {
  background-color: #0b1018;
  background-image: radial-gradient(#2c394d 1px, transparent 1px);
  border-color: #283549;
}

.fluxo-node,
.fluxo-node-inicio {
  background: #151d29;
  color: var(--text);
  border-color: #344156;
  box-shadow: 0 10px 24px rgba(0,0,0,.26);
}

.fluxo-node-head,
.fluxo-node-roxo .fluxo-node-head,
.fluxo-node-conteudo .fluxo-node-head,
.fluxo-node-menu .fluxo-node-head,
.fluxo-node-amarelo .fluxo-node-head,
.fluxo-node-acao .fluxo-node-head,
.fluxo-node-laranja .fluxo-node-head,
.fluxo-node-condicao .fluxo-node-head,
.fluxo-node-atraso .fluxo-node-head,
.fluxo-node-azul .fluxo-node-head,
.fluxo-node-salvar .fluxo-node-head,
.fluxo-node-distribuidor .fluxo-node-head,
.fluxo-node-inicio .fluxo-node-head {
  background: #1b2a3e;
  color: var(--text);
}

.fluxo-node-inicio .fluxo-node-head { background: #203f69; }
.fluxo-node-body { background: #111722; color: var(--muted); }
.fluxo-node-body small { color: #98a4b5; }
.fluxo-node-icon { background: #0d121a; color: #d9e5f3; }
.fluxo-node-remove { background: #192231; border-color: #3a475a; color: #e18a93; }
.fluxo-edge-line { stroke: #5d7da8; }
.fluxo-tool-btn.roxo span,
.fluxo-tool-btn.amarelo span,
.fluxo-tool-btn.laranja span,
.fluxo-tool-btn.azul span { background: #203a5b; }

/* Modais dos fluxos */
.fluxo-modal-card,
.fluxo-modal-head,
.fluxo-modal-footer,
.fluxo-modal-body {
  background: #111722;
  color: var(--text);
  border-color: #283346;
}

.fluxo-modal-head h2,
.fluxo-modal-close,
.fluxo-modal-section h3,
.fluxo-modal-section label {
  color: var(--text);
}

.fluxo-modal-section,
.modal-opcao-card,
.modal-bloco-midia-item {
  background: #0e141e;
  border-color: #283346;
}

.fluxo-modal-section .muted,
.fluxo-modal-section p.muted { color: var(--muted); }

.fluxo-modal-section input,
.fluxo-modal-section select,
.fluxo-modal-section textarea,
#modalFluxoPreview {
  background: #0a0f17;
  color: var(--text);
  border-color: #344156;
}

.modal-admin-conta-card,
.console-mobile-card {
  background: #111722 !important;
  border-color: #283346 !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.34) !important;
}

/* Lista clicável e formulário de clientes */
.cliente-edicao-workspace {
  display: grid;
  grid-template-columns: minmax(290px, .82fr) minmax(420px, 1.18fr);
  gap: 14px;
  align-items: start;
}

.cliente-lista-painel,
.cliente-edicao-formulario {
  min-width: 0;
  padding: 15px;
  border: 1px solid #253043;
  border-radius: 12px;
  background: #0e141e;
}

.cliente-lista-head,
.cliente-edicao-formulario-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cliente-lista-head h4,
.cliente-edicao-formulario-head h4 {
  margin: 2px 0 0;
  font-size: 16px;
}

.cliente-lista-head button {
  width: auto;
  min-width: 88px;
  min-height: 38px;
  margin: 0;
  padding: 8px 11px;
}

.cliente-seletor-campos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.cliente-seletor-campos .form-field { min-width: 0; margin-top: 0; }
.cliente-seletor-campos :is(input, select) { width: 100%; min-width: 0; }
.cliente-seletor-campos select { min-height: 44px; text-overflow: ellipsis; }
.cliente-seletor-campos + .field-help { margin: 10px 0 0; }

.cliente-lista-selecao {
  display: grid;
  gap: 7px;
  max-height: 610px;
  margin-top: 10px;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #365b88 #111722;
}

.cliente-lista-item {
  min-height: 0;
  margin: 0;
  padding: 12px;
  display: block;
  text-align: left;
  color: var(--text);
  background: #121a26;
  border: 1px solid #263246;
  border-radius: 10px;
  box-shadow: none;
}

.cliente-lista-item:hover { background: #182231; border-color: #3b4c65; }
.cliente-lista-item.active { background: #182d4a; border-color: #416d9f; }
.cliente-lista-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cliente-lista-item-top strong { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.cliente-lista-status { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.cliente-lista-status.is-active { color: #acd8c5; background: #172a24; border: 1px solid #396653; }
.cliente-lista-status.is-overdue { color: #e9a9b0; background: #2d181c; border: 1px solid #70404a; }
.cliente-lista-status.is-neutral { color: #b6c0ce; background: #1a2330; border: 1px solid #344156; }
.cliente-lista-usuario,
.cliente-lista-numero { display: block; margin-top: 6px; font-size: 12px; overflow-wrap: anywhere; }
.cliente-lista-usuario { color: #cbd7e6; font-weight: 750; }
.cliente-lista-numero { color: var(--muted); }
.cliente-lista-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.cliente-lista-meta > span { padding: 4px 7px; border-radius: 999px; color: #aab5c4; background: #0d131c; border: 1px solid #263246; font-size: 10px; font-weight: 750; }
.cliente-lista-meta > .is-promo { color: #b6cdea; border-color: #36567d; background: #14243a; }
.cliente-lista-vazia { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 20px; text-align: center; color: var(--muted); border: 1px dashed #344156; border-radius: 10px; background: #0b1018; }
.cliente-lista-vazia strong { color: var(--text); }
.cliente-lista-vazia span { max-width: 280px; font-size: 12px; line-height: 1.45; }
.cliente-lista-vazia.is-loading { animation: fade .5s ease-in; }
.cliente-edicao-campos { min-width: 0; margin: 0; padding: 0; border: 0; }
.cliente-edicao-campos[disabled] { opacity: .58; }
.cliente-edicao-campos[disabled] button { pointer-events: none; }
.cliente-edicao-campos > button { margin-top: 16px; }
.cliente-edicao-campos input[readonly] { color: #9aa8ba; background: #0a0f16; border-style: dashed; cursor: default; }

/* Componentes auxiliares */
pre,
.fluxo-chat-mensagens,
.fluxo-chat-input-area {
  background: #090e15 !important;
  border-color: #253043 !important;
}

.toast { background: #151d29; border-color: #344156; }
.badge { background: #0d131c; border-color: #2b3749; }
.logout { background: #182231; border-color: #344156; }

@media (max-width: 1200px) {
  .cliente-edicao-workspace { grid-template-columns: 1fr; }
  .cliente-lista-selecao { max-height: 420px; }
}

@media (max-width: 900px) {
  .cliente-lista-painel,
  .cliente-edicao-formulario { padding: 12px; }
  .cliente-lista-head,
  .cliente-edicao-formulario-head { flex-direction: column; }
  .cliente-lista-head button { width: 100%; }
  .cliente-lista-selecao { max-height: 360px; }
}

/* ================= 17 - REFINAMENTO VISUAL MINIMALISTA ================= */

:root {
  --bg: #070a0f;
  --surface: #101722;
  --surface2: #151e2b;
  --surface3: #0b1119;
  --line: #263246;
  --line-soft: #1d2736;
  --text: #f2f5f8;
  --muted: #929eae;
  --accent: #315f9e;
  --accent-strong: #3d70b2;
  --accent2: #7898c1;
  --accent-soft: #14243a;
  --shadow: 0 18px 45px rgba(0, 0, 0, .24);
}

body {
  font-family: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  letter-spacing: -.006em;
  background:
    linear-gradient(115deg, rgba(30, 55, 86, .13), transparent 34%),
    #070a0f;
}

h1, h2, h3, h4 { letter-spacing: -.025em; }
h2 { line-height: 1.12; }

button,
input,
select,
textarea,
.card,
.menu-item,
.cliente-lista-item {
  transition:
    color .18s ease,
    background-color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

input,
select,
textarea {
  min-height: 48px;
  padding-inline: 14px;
  border-radius: 11px;
  background: #0a1018;
  border-color: #29364a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .018);
}

input:hover,
select:hover,
textarea:hover { border-color: #384963; }

input:focus,
select:focus,
textarea:focus {
  border-color: #4d78aa;
  box-shadow: 0 0 0 3px rgba(61, 112, 178, .14);
}

button {
  border-radius: 11px;
  background: #244c7d;
  border-color: #356294;
  box-shadow: 0 8px 18px rgba(5, 16, 30, .18);
}

button:hover {
  background: #2b588f;
  border-color: #4c78a8;
  box-shadow: 0 10px 22px rgba(5, 16, 30, .26);
}

button.secondary {
  background: #151f2d;
  border-color: #2c3a4e;
}

button.secondary:hover {
  background: #1b2838;
  border-color: #40516a;
}

.brand-monogram {
  width: 46px;
  height: 46px;
  min-width: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border-radius: 13px;
  color: #f6f8fb !important;
  background: #244c7d !important;
  border: 1px solid #436c9c !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.06em;
}

/* Navegação com leitura por contexto */
.app { grid-template-columns: 264px minmax(0, 1fr); }

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  background: #080e16;
  border-right-color: #1d2939;
  box-shadow: 14px 0 34px rgba(0, 0, 0, .12);
}

.sidebar-head {
  margin: 0 4px 24px;
  padding-bottom: 19px;
  border-bottom: 1px solid #1d2939;
}

.sidebar .brand { gap: 11px; }
.sidebar .brand h1 { font-size: 19px; }
.sidebar .brand p { font-size: 10px; letter-spacing: .075em; text-transform: uppercase; }

.menu {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.menu-section-label {
  display: block;
  margin: 18px 11px 6px;
  color: #677588;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
}

.menu-section-label:first-child { margin-top: 0; }

.menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #9da9b9;
  border-color: transparent;
  font-size: 13px;
  font-weight: 720;
}

.menu-item::before {
  content: "";
  position: absolute;
  left: -16px;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.menu-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border: 1px solid #263348;
  border-radius: 8px;
  color: #8091a7;
  background: #0c131e;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1;
}

.menu-item:hover {
  color: #e6ebf1;
  background: #111b28;
  border-color: transparent;
}

.menu-item:hover .menu-icon { color: #aebdd0; border-color: #35445a; }

.menu-item.active {
  color: #fff;
  background: #15263d;
  border-color: #263e5c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.menu-item.active::before { background: #527fb5; }
.menu-item.active .menu-icon { color: #dce8f6; background: #24476f; border-color: #3d648f; }

.user-box {
  margin-top: 20px;
  padding: 13px 14px !important;
  border-radius: 12px !important;
  background: #0b121c !important;
  border-color: #202c3d !important;
  font-size: 11px;
  line-height: 1.55;
}

/* Área de conteúdo */
.main {
  padding: 0 clamp(20px, 3vw, 42px) 42px;
  background: linear-gradient(180deg, #0a0e14 0, #080c12 360px, #070a0f 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 86px;
  margin: 0 0 28px;
  padding: 17px 0;
  border: 0;
  border-bottom: 1px solid rgba(40, 52, 70, .82);
  border-radius: 0;
  background: rgba(10, 14, 20, .88);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.topbar h2 { margin-bottom: 5px; font-size: 20px; }
.topbar-subtitle { display: block; font-size: 12px; }
.top-actions { gap: 8px; }
.badge, .logout { min-height: 38px; }
.badge { padding-inline: 13px; color: #bcc8d6; }
.logout { padding-inline: 17px; }

.tab-panel {
  width: min(1480px, 100%);
  margin-inline: auto;
}

.card,
.hero,
.mini-card {
  border-radius: 18px;
  border-color: #202c3d;
  background: #101722;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .17);
}

.card { padding: clamp(18px, 2.4vw, 26px); }
.card > h2 { margin: 7px 0 8px; font-size: clamp(24px, 3vw, 31px); }
.section-kicker { color: #718fb5; font-size: 10px; letter-spacing: .12em; }

/* Início com mais identidade e menos caixas iguais */
.dashboard-hero { gap: 14px; margin-bottom: 12px; }

.dashboard-hero-copy,
.dashboard-bot-atual,
.dashboard-secao {
  position: relative;
  overflow: hidden;
  border-radius: 20px !important;
}

.dashboard-hero-copy {
  min-height: 272px;
  padding: clamp(26px, 4vw, 46px);
  background: linear-gradient(135deg, #111c2b 0%, #101722 70%) !important;
  border-color: #2a3c54 !important;
}

.dashboard-hero-copy::before {
  content: "";
  position: absolute;
  inset: 22px auto 22px 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #456f9f;
}

.dashboard-hero-copy::after {
  content: "BOTGESTOR";
  position: absolute;
  right: 28px;
  bottom: 20px;
  color: rgba(133, 157, 187, .055);
  font-size: clamp(42px, 7vw, 94px);
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: .8;
  pointer-events: none;
}

.dashboard-hero-copy > * { position: relative; z-index: 1; }
.dashboard-hero-copy h2 { max-width: 640px; font-size: clamp(32px, 4.5vw, 52px); }

.dashboard-bot-atual {
  padding: 24px;
  background: #0d141e !important;
  border-color: #222f41 !important;
}

.dashboard-bot-atual::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: #315f9e;
  opacity: .72;
}

.dashboard-metricas { gap: 8px; }
.dashboard-metrica { position: relative; min-height: 94px; padding: 18px; border-radius: 14px; }
.dashboard-metrica::after { content: ""; position: absolute; inset: auto 18px 0; height: 2px; background: #315f9e; opacity: .36; }
.dashboard-metrica strong { font-size: 26px; }
.dashboard-metrica.is-success strong { color: #8fc5ad; }
.dashboard-metrica.is-warning strong { color: #d2b781; }

.dashboard-secao { padding: 24px; }
.dashboard-atalhos { gap: 8px; }
.dashboard-atalho { min-height: 146px; padding: 18px; border-radius: 14px; }
.dashboard-atalho > span { color: #bed0e5 !important; font-family: Arial, sans-serif; }
.dashboard-atalho strong { margin-top: auto; }
.config-overview-icon { font-family: Arial, sans-serif; }

/* Clientes: catálogo à esquerda, ficha à direita */
.clientes-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 390px); }
.clientes-card { border-top: 2px solid #31557f; }
.cliente-metricas { gap: 7px; }
.cliente-metrica { min-height: 74px; padding: 13px 14px; border-radius: 12px; }
.cliente-metrica strong { font-size: 23px; }

.cliente-modos {
  margin: 20px 0 18px;
  padding: 4px;
  border-radius: 12px;
  background: #0a1018;
}

.cliente-modo-btn { min-height: 42px; border-radius: 9px; }
.cliente-modo-btn.active { background: #1a3454 !important; border-color: #315987 !important; }

.cliente-edicao-workspace { gap: 12px; }

.cliente-lista-painel,
.cliente-edicao-formulario {
  padding: 18px;
  border-radius: 15px;
}

.cliente-lista-painel { background: #0a111a; }
.cliente-edicao-formulario { background: #111a26; }

.cliente-lista-selecao { gap: 8px; max-height: 670px; padding-right: 5px; }

.cliente-lista-item {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  gap: 11px;
  align-items: center;
  padding: 13px 11px;
  border-radius: 12px;
  background: #0e1722;
}

.cliente-lista-item:hover { transform: translateX(2px); }

.cliente-lista-item.active {
  background: #172b45;
  border-color: #3d6797;
  box-shadow: inset 3px 0 0 #5d85b4;
}

.cliente-lista-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #c9d8e8;
  background: #1a2b40;
  border: 1px solid #30455f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
}

.cliente-lista-item.active .cliente-lista-avatar {
  color: #fff;
  background: #315987;
  border-color: #527da9;
}

.cliente-lista-conteudo { min-width: 0; display: block; }
.cliente-lista-seta { color: #5f7085; font-size: 24px; font-weight: 300; }
.cliente-lista-item.active .cliente-lista-seta { color: #c1d3e7; }
.cliente-lista-item-top strong { font-size: 13px; }
.cliente-lista-usuario, .cliente-lista-numero { margin-top: 4px; }
.cliente-lista-meta { margin-top: 8px; }

.cliente-lista-vazia {
  min-height: 210px;
  border-radius: 12px;
  background: #080e16;
}

.cliente-edicao-formulario-head {
  margin: -2px -2px 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #263246;
}

.cliente-edicao-campos .row { gap: 12px; }
.cliente-edicao-campos .form-field > span { color: #aab5c3; font-size: 11px; letter-spacing: .025em; }
.cliente-edicao-campos[disabled] { opacity: .42; filter: saturate(.65); }
.cliente-promo-resumo { border-radius: 13px; }

/* Login e superfícies auxiliares seguem a mesma linguagem */
#login.login-wrapper {
  background:
    linear-gradient(120deg, rgba(31, 60, 96, .16), transparent 42%),
    #070a0f;
}

.login-card,
.login-plano-toggle,
.login-plano-card,
.login-faq-inner {
  border-radius: 22px !important;
  border-color: #273549 !important;
  background: #101722 !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28) !important;
}

.login-card { position: relative; overflow: hidden; padding: 32px; }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: #315f9e; }
.login-plano-toggle { border-top: 2px solid #315f9e !important; }
.login-plano-toggle-texto b { max-width: 390px; letter-spacing: -.04em; }
.login-plano-preco strong, .assinatura-preco strong { color: #91accd; }
.faq-item { border-radius: 13px; background: #0c131d; }
.faq-item.aberto { border-color: #34577e; background: #111e2d; }
.faq-pergunta b { color: #7898c1; }

.bottom-nav-item .bottom-nav-icon { font-family: Arial, sans-serif; }

@media (max-width: 1200px) {
  .app { grid-template-columns: 238px minmax(0, 1fr); }
  .dashboard-hero-copy h2 { font-size: clamp(30px, 4vw, 44px); }
}

@media (max-width: 900px) {
  .main { padding: 0 14px 106px; }
  .topbar { min-height: 76px; margin-bottom: 18px; }
  .topbar-subtitle { max-width: 62vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar { padding-inline: 14px; }
  .dashboard-hero-copy { min-height: 230px; }
  .dashboard-hero-copy::after { right: 18px; bottom: 15px; }
  .dashboard-metricas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cliente-lista-painel, .cliente-edicao-formulario { padding: 14px; }
  .mobile-bottom-nav {
    background: rgba(10, 16, 24, .94);
    border-color: #2a374a;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .36);
  }
}

@media (max-width: 560px) {
  .top-actions .badge { display: none; }
  .topbar-title h2 { font-size: 18px; }
  .topbar-subtitle { max-width: 54vw; }
  .dashboard-hero-copy { min-height: 250px; padding: 26px 22px; }
  .dashboard-hero-copy h2 { font-size: 34px; }
  .dashboard-hero-copy::after { font-size: 44px; }
  .dashboard-hero-acoes { display: grid; }
  .dashboard-hero-acoes button { width: 100%; min-width: 0; }
  .dashboard-secao-head { display: block; }
  .dashboard-secao-head > p { margin-top: 8px; text-align: left; }
  .cliente-modos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cliente-lista-item { grid-template-columns: 36px minmax(0, 1fr) 12px; gap: 9px; }
  .cliente-lista-avatar { width: 36px; height: 36px; }
  .login-card { padding: 25px 20px; }
}

/* ================= 18 - PREÇO DO PLANO NO ADMIN ================= */

.admin-plano-config {
  margin-bottom: 22px;
  padding: clamp(18px, 2.5vw, 24px);
  border: 1px solid #2b405a;
  border-left: 3px solid #456f9f;
  border-radius: 16px;
  background: #0c1521;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.admin-plano-cabecalho {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.admin-plano-cabecalho h2 {
  margin: 6px 0 7px;
  font-size: clamp(23px, 3vw, 30px);
}

.admin-plano-cabecalho p {
  max-width: 620px;
  margin: 0;
}

.admin-plano-valor-atual {
  min-width: 154px;
  padding: 14px 16px;
  border: 1px solid #30445d;
  border-radius: 13px;
  background: #101c2a;
  text-align: right;
}

.admin-plano-valor-atual small,
.admin-plano-valor-atual strong,
.admin-plano-valor-atual span { display: block; }

.admin-plano-valor-atual small {
  color: #8290a2;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-plano-valor-atual strong {
  margin-top: 7px;
  color: #d9e6f4;
  font-size: 25px;
  line-height: 1;
}

.admin-plano-valor-atual span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.admin-plano-edicao {
  display: grid;
  grid-template-columns: minmax(180px, 280px) auto;
  gap: 10px;
  align-items: end;
  margin-top: 20px;
}

.admin-plano-edicao .form-field { margin: 0; }
.admin-plano-edicao button { width: auto; min-width: 160px; margin: 0; }
.admin-plano-mensagem { min-height: 20px; margin: 9px 0 0; font-size: 12px; }

@media (max-width: 700px) {
  .admin-plano-cabecalho,
  .admin-plano-edicao { grid-template-columns: 1fr; }
  .admin-plano-valor-atual { text-align: left; }
  .admin-plano-edicao button { width: 100%; }
}

/* ================= 19 - TEMA OPERACIONAL CIANO ================= */

:root {
  color-scheme: dark;
  --bg: #050d1b;
  --surface: #091626;
  --surface2: #0e2035;
  --surface3: #06111f;
  --line: #1b4564;
  --line-soft: #122f49;
  --text: #f7fbff;
  --muted: #8ea7bd;
  --accent: #45c8f5;
  --accent-strong: #20b5ec;
  --accent2: #7adfff;
  --accent-soft: #0b3048;
  --danger: #e35f6f;
  --warning: #efb45a;
  --success: #43c861;
  --blue: #45c8f5;
  --shadow: 0 24px 70px rgba(0, 6, 16, .42);
}

html { background: var(--bg); }

body {
  position: relative;
  isolation: isolate;
  color: var(--text);
  background:
    linear-gradient(rgba(69, 200, 245, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 200, 245, .018) 1px, transparent 1px),
    radial-gradient(circle at 88% 4%, rgba(31, 111, 158, .14), transparent 30%),
    radial-gradient(circle at 8% 92%, rgba(67, 200, 97, .055), transparent 26%),
    #050d1b;
  background-size: 76px 76px, 76px 76px, auto, auto, auto;
  font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  z-index: 99999;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--success) 0 36%, var(--accent) 36% 76%, #224b77 76% 100%);
}

::selection { color: #02101b; background: var(--accent); }

* {
  scrollbar-width: thin;
  scrollbar-color: #1f6388 #071321;
}

*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: #071321; }
*::-webkit-scrollbar-thumb { border: 2px solid #071321; border-radius: 999px; background: #1f6388; }

a { color: var(--accent2); }
h1, h2, h3, h4 { color: #f8fbff; }

.muted { color: var(--muted); }

.section-kicker,
.menu-section-label {
  color: var(--success) !important;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(67, 200, 97, .08);
}

hr { border-color: rgba(57, 115, 151, .42); }

/* Controles com contraste operacional */
input,
select,
textarea {
  color: #f4f9fd;
  border: 1px solid #1b4a6a;
  border-radius: 7px;
  background: #061220;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

input::placeholder,
textarea::placeholder { color: #5f7b91; }

input:hover,
select:hover,
textarea:hover { border-color: #286b92; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(69, 200, 245, .12), inset 3px 0 0 var(--accent);
}

input[type="radio"] { accent-color: var(--accent-strong); }

/* Chave On/Off única para todas as opções booleanas do painel */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 62px !important;
  min-width: 62px;
  height: 30px !important;
  min-height: 30px !important;
  flex: 0 0 62px !important;
  margin: 0;
  padding: 0;
  border: 1px solid #365067;
  border-radius: 999px;
  color: #91a4b5;
  background: #081522;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #8294a5;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .34);
  transition: transform .18s ease, background-color .18s ease;
}

input[type="checkbox"]::after {
  content: "OFF";
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .06em;
}

input[type="checkbox"]:checked {
  color: #06131c;
  border-color: #65d9ff;
  background: var(--accent, #45c8f5);
  box-shadow: 0 0 0 3px rgba(69, 200, 245, .11);
}

input[type="checkbox"]:checked::before {
  transform: translateX(32px);
  background: #f5fbff;
}

input[type="checkbox"]:checked::after {
  content: "ON";
  right: auto;
  left: 8px;
}

input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(69, 200, 245, .38);
  outline-offset: 2px;
}

input[type="checkbox"]:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.automation-toggle:has(input[type="checkbox"]:checked),
.fluxo-switch-row:has(input[type="checkbox"]:checked) {
  border-color: rgba(69, 200, 245, .52);
  background: rgba(17, 59, 88, .48);
}

#previewImagemLembreteBox {
  width: min(100%, 420px);
  padding: 10px;
}

#previewImagemLembrete {
  width: auto;
  max-width: 100%;
  max-height: 280px;
  margin: 8px auto 0;
  object-fit: contain;
}

.form-field,
.config-field { color: #9bb2c6; }

.form-field > span,
.config-field > span {
  color: #a8bfd1;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.field-help,
.config-character-count { color: #718ca3; }

button {
  border: 1px solid #28719a;
  border-radius: 7px;
  color: #f5fbff;
  background: #113b58;
  box-shadow: inset 3px 0 0 var(--accent), 0 10px 24px rgba(0, 8, 18, .22);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

button:hover {
  color: #03131e;
  border-color: var(--accent2);
  background: var(--accent);
  box-shadow: 0 12px 30px rgba(20, 162, 215, .22);
  transform: translateY(-1px);
}

button.secondary {
  color: #c5d6e4;
  border-color: #27475e;
  background: #0c1c2c;
  box-shadow: inset 2px 0 0 #315e7a;
}

button.secondary:hover {
  color: #eaf8ff;
  border-color: #33789d;
  background: #13314a;
}

button.danger,
button.btn-danger {
  border-color: #9e4350;
  background: #552632;
  box-shadow: inset 3px 0 0 var(--danger);
}

:where(button, input, select, textarea, a, .menu-item):focus-visible {
  outline-color: rgba(69, 200, 245, .82);
}

/* Moldura do login inspirada no painel de referência */
#login.login-wrapper {
  position: relative;
  z-index: 1;
  padding-top: 74px;
  background:
    radial-gradient(circle at 50% 8%, rgba(35, 111, 155, .12), transparent 34%),
    transparent;
}

#login.login-wrapper::before {
  content: "";
  position: absolute;
  inset: 40px 3.2vw auto;
  height: 62px;
  border-top: 1px solid rgba(69, 200, 245, .38);
  border-left: 4px solid rgba(69, 200, 245, .52);
  border-right: 4px solid rgba(69, 200, 245, .52);
  border-radius: 8px 8px 0 0;
  pointer-events: none;
}

#login .login-layout,
.login-faq-section { position: relative; z-index: 1; }

.login-card,
.login-plano-toggle,
.login-plano-card,
.login-faq-inner {
  border: 1px solid #1c4c6d !important;
  border-radius: 9px !important;
  background:
    linear-gradient(135deg, rgba(19, 42, 67, .96), rgba(6, 17, 31, .98)) !important;
  box-shadow: var(--shadow) !important;
}

.login-card,
.login-plano-toggle,
.login-plano-card { border-left: 3px solid var(--success) !important; }

.login-card::before {
  height: 1px;
  background: linear-gradient(90deg, var(--success), var(--accent), transparent);
}

.login-card .brand h1,
.login-plano-toggle-texto b,
.login-plano-card h2,
.login-faq-inner h2 {
  font-weight: 950;
  letter-spacing: -.055em;
  text-transform: uppercase;
}

.login-plano-toggle-texto b { max-width: 440px; color: #f9fbff; }
.login-plano-toggle-texto small { color: #86a9c1; letter-spacing: .08em; text-transform: uppercase; }
.login-plano-preco strong,
.assinatura-preco strong { color: var(--accent) !important; }

.brand-monogram {
  color: #04131e !important;
  border: 1px solid #70dcff !important;
  border-radius: 7px !important;
  background: var(--accent) !important;
  box-shadow: 0 0 0 5px rgba(69, 200, 245, .08), inset 0 1px 0 rgba(255,255,255,.35);
}

.login-faq-call {
  border-color: #23668c !important;
  border-radius: 8px !important;
  background: #0b1c2d !important;
  animation: loginFaqBounce 1.55s ease-in-out infinite !important;
}

.login-faq-call b { border-radius: 6px; background: var(--accent); }
.faq-item { border-color: #173b57; border-radius: 7px; background: #081727; }
.faq-item.aberto { border-color: var(--accent); background: #0c2336; }
.faq-pergunta b { color: var(--accent) !important; }
.assinatura-badge { color: #8de9a0; border-color: rgba(67, 200, 97, .45); background: rgba(67, 200, 97, .10); }

/* Navegação e área principal */
#app.app { position: relative; z-index: 1; grid-template-columns: 270px minmax(0, 1fr); }

.sidebar {
  padding: 22px 16px 18px;
  border-right: 1px solid #163b56;
  background:
    linear-gradient(180deg, rgba(9, 25, 42, .98), rgba(4, 13, 25, .99));
  box-shadow: 18px 0 48px rgba(0, 5, 14, .25);
}

.sidebar-head { border-bottom-color: #173c56; }
.sidebar .brand h1 { color: #f7fbff; font-weight: 950; letter-spacing: -.045em; text-transform: uppercase; }
.sidebar .brand p { color: var(--success); letter-spacing: .18em; }

.menu-section-label { margin-top: 21px; }

.menu-item {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #8ea8bb;
}

.menu-item::before { left: -16px; width: 3px; border-radius: 0; }
.menu-icon { color: #6e98b2; border-color: #183f5c; border-radius: 5px; background: #071726; }

.menu-item:hover {
  color: #eaf8ff;
  border-color: #1a4562;
  background: #0c2235;
}

.menu-item:hover .menu-icon { color: var(--accent); border-color: #277197; }

.menu-item.active {
  color: #fff;
  border-color: #205878;
  background: linear-gradient(90deg, #0d324b, #0b2236);
  box-shadow: inset 0 1px 0 rgba(93, 216, 255, .05);
}

.menu-item.active::before { background: var(--accent); box-shadow: 0 0 14px rgba(69, 200, 245, .42); }
.menu-item.active .menu-icon { color: #06121c; border-color: var(--accent2); background: var(--accent); }

.user-box {
  border-color: #19415c !important;
  border-radius: 7px !important;
  color: #83a0b5;
  background: #061522 !important;
}

.main {
  padding-inline: clamp(20px, 3vw, 42px);
  background:
    linear-gradient(180deg, rgba(7, 20, 34, .82) 0, rgba(5, 13, 27, .3) 420px, transparent 100%);
}

.topbar {
  min-height: 88px;
  border-bottom: 1px solid rgba(47, 117, 153, .52);
  background: rgba(5, 14, 27, .88);
  backdrop-filter: blur(18px);
}

.topbar h2 {
  color: #f8fbff;
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.topbar-subtitle { color: #7895aa; }

.badge,
.estado-pill,
.bot-status-pill {
  border-color: #245470;
  color: #a9c4d6;
  background: #081a2b;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(67, 200, 97, .52);
}

.logout { color: #a8bdce; border-color: #27465c; border-radius: 7px; background: #0b1b2b; box-shadow: none; }

/* Superfícies e cartões em todo o produto */
.card,
.hero,
.mini-card {
  border: 1px solid #153b58;
  border-top-color: #245b7d;
  border-radius: 9px;
  background: linear-gradient(145deg, #0b1a2b, #071321 74%);
  box-shadow: 0 20px 52px rgba(0, 5, 14, .27);
}

.card > h2,
.config-card > h2,
.clientes-card > h2,
.conexao-card > h2 {
  color: #f9fbff;
  font-weight: 950;
  letter-spacing: -.052em;
  text-transform: uppercase;
}

.resultado-card { border-top-color: var(--success); }

pre {
  color: #c8e6f7;
  border-color: #17425f;
  border-radius: 7px;
  background:
    linear-gradient(rgba(69, 200, 245, .022) 1px, transparent 1px),
    #040d18;
  background-size: 100% 28px;
}

.toast {
  border-color: #27789f;
  border-radius: 7px;
  background: #0a1c2e;
  box-shadow: 0 20px 55px rgba(0, 5, 14, .48), inset 3px 0 0 var(--accent);
}

.config-overview,
.recuperacao-resumo {
  border-color: #205477;
  border-radius: 7px;
  background: linear-gradient(100deg, rgba(15, 56, 83, .78), rgba(7, 23, 39, .82)) !important;
}

.config-overview-icon,
.recuperacao-resumo-icone {
  color: #06131c;
  border: 1px solid #75deff;
  border-radius: 6px;
  background: var(--accent);
}

.automation-toggle,
.saudacao-variante-card,
.menu-default-message,
.menu-retorno-details,
.preview-box {
  border-color: #173e5b;
  border-radius: 7px;
  background: #071726;
}

.automation-toggle:hover,
.saudacao-variante-card:hover { border-color: #276c91; }

.estado-pill.is-active,
.bot-status-conectado {
  color: #91eda2;
  border-color: rgba(67, 200, 97, .45);
  background: rgba(67, 200, 97, .10);
}

.estado-pill.is-inactive,
.bot-status-qr,
.bot-status-iniciando,
.bot-status-autenticado,
.bot-status-iniciado {
  color: #87dfff;
  border-color: rgba(69, 200, 245, .42);
  background: rgba(69, 200, 245, .09);
}

.bot-status-desconectado,
.bot-status-falhou { color: #ff9eaa; border-color: rgba(227, 95, 111, .42); background: rgba(227, 95, 111, .09); }

/* Dashboard com título forte e linhas de protocolo */
.dashboard-hero { gap: 12px; }

.dashboard-hero-copy,
.dashboard-bot-atual,
.dashboard-secao {
  border: 1px solid #1a4766 !important;
  border-radius: 9px !important;
  background: linear-gradient(135deg, #0d2237, #071422 72%) !important;
  box-shadow: 0 24px 64px rgba(0, 6, 16, .30) !important;
}

.dashboard-hero-copy {
  min-height: 300px;
  padding: clamp(30px, 5vw, 58px);
}

.dashboard-hero-copy::before {
  inset: 26px auto 26px 0;
  width: 3px;
  border-radius: 0;
  background: var(--success);
  box-shadow: 0 0 14px rgba(67, 200, 97, .28);
}

.dashboard-hero-copy::after {
  right: 26px;
  bottom: 18px;
  color: rgba(69, 200, 245, .055);
  font-size: clamp(54px, 8vw, 112px);
  letter-spacing: -.09em;
}

.dashboard-hero-copy h2 {
  max-width: 750px;
  margin-top: 12px;
  color: #f9fbff;
  font-size: clamp(38px, 5.4vw, 68px);
  font-weight: 950;
  line-height: .96;
  letter-spacing: -.068em;
  text-transform: uppercase;
}

.dashboard-hero-copy h2 > span,
.dashboard-hero-copy h2 > strong { display: block; font: inherit; }
.dashboard-hero-copy h2 > strong { color: var(--accent); }

.dashboard-hero-copy h2::after {
  content: "";
  display: block;
  width: min(255px, 48%);
  height: 3px;
  margin-top: 24px;
  background: linear-gradient(90deg, var(--success), var(--accent));
}

.dashboard-hero-copy > p { color: #86a3b8; font-size: 12px; font-weight: 700; letter-spacing: .085em; text-transform: uppercase; }

.dashboard-bot-atual { border-top-color: var(--accent) !important; }
.dashboard-bot-atual::after { background: var(--accent); }
.dashboard-bot-atual > strong { color: #f8fbff; }

.dashboard-metricas { gap: 9px; }
.dashboard-metrica,
.conexao-metrica,
.cliente-metrica,
.fluxo-metrica {
  border: 1px solid #173e5b;
  border-radius: 7px;
  background: linear-gradient(145deg, #0b1c2e, #071522);
  box-shadow: none;
}

.dashboard-metrica::after { inset-inline: 16px; background: var(--accent); opacity: .65; }
.dashboard-metrica small,
.conexao-metrica small,
.cliente-metrica small,
.fluxo-metrica small { color: #7693a8; letter-spacing: .10em; }
.dashboard-metrica strong,
.conexao-metrica strong,
.cliente-metrica strong,
.fluxo-metrica strong { color: #eaf8ff; }
.dashboard-metrica.is-success strong,
.conexao-metrica.is-active strong,
.cliente-metrica.is-active strong { color: #7ae28f; }
.dashboard-metrica.is-warning strong,
.conexao-metrica.is-warning strong { color: #f3c578; }
.cliente-metrica.is-promo strong { color: var(--accent); }

.dashboard-atalho {
  min-height: 142px;
  border: 1px solid #173e5b;
  border-left: 3px solid #246281;
  border-radius: 7px;
  background: #081827;
  box-shadow: none;
}

.dashboard-atalho:hover { color: #04131d; border-color: var(--accent); border-left-color: var(--success); background: var(--accent); }
.dashboard-atalho > span { color: var(--accent) !important; border: 1px solid #245d7d; border-radius: 6px; background: #0a2438; }
.dashboard-atalho:hover > span { color: #06131c !important; border-color: rgba(4,19,29,.3); background: rgba(4,19,29,.1); }
.dashboard-atalho small { color: #7591a6; }
.dashboard-atalho:hover small { color: #123247; }

/* Conexões, clientes e configurações */
.conexao-novo-bot,
.conexao-bot-selecionado,
.qr-shell,
.cliente-lista-painel,
.cliente-edicao-formulario,
.cliente-promo-resumo,
.cliente-promo-valores div,
.descontos-grid label,
.admin-plano-config,
.admin-plano-valor-atual {
  border-color: #173e5b;
  border-radius: 7px;
  background: #071726;
}

.qr-shell { border-left: 3px solid var(--accent); }
.clientes-card { border-top: 2px solid var(--accent); }

.cliente-modos,
.fluxo-tabs {
  border-color: #173f5c;
  border-radius: 7px;
  background: #061321;
}

.cliente-modo-btn,
.fluxo-tab-btn { border-radius: 5px; box-shadow: none; }
.cliente-modo-btn.active,
.fluxo-tab-btn.active { color: #06131c !important; border-color: var(--accent) !important; background: var(--accent) !important; }

.cliente-lista-item,
.bot-card,
.usuario-card,
.admin-usuario-card {
  border-color: #173e5b;
  border-radius: 7px;
  background: #081827;
}

.cliente-lista-item:hover,
.bot-card:hover { border-color: #287196; background: #0b2437; }
.cliente-lista-item.active,
.bot-card-selected {
  border-color: var(--accent);
  background: #0d3048;
  box-shadow: inset 3px 0 0 var(--success), 0 0 0 1px rgba(69, 200, 245, .10);
  outline: 0;
}

.cliente-lista-avatar {
  color: var(--accent);
  border-color: #246181;
  border-radius: 6px;
  background: #0a263b;
}

.cliente-lista-item.active .cliente-lista-avatar { color: #06131c; border-color: var(--accent2); background: var(--accent); }
.cliente-alerta-perigo { border-radius: 7px; }

.menu-opcao-card,
.menu-opcao-extra,
.menu-midia-box {
  border-color: #173e5b;
  border-radius: 7px;
  background: #071725;
}

.menu-opcao-card[open] { border-color: #28749b; background: #092137; box-shadow: inset 3px 0 0 var(--accent); }
.menu-opcao-number { color: #06131c; border-color: var(--accent); background: var(--accent); }
.menu-formato-pill { color: #8ae2ff; border-color: rgba(69, 200, 245, .4); background: rgba(69, 200, 245, .08); }

/* Fluxos, conversas e áreas densas */
.fluxo-contexto-bot,
.fluxo-filtro-box,
.fluxo-editor-commandbar,
.fluxo-toolbox,
.fluxo-config-card,
.fluxo-switch-row,
.fluxo-conversas-lista,
.fluxo-chat-preview,
.fluxos-lista-box,
.fluxos-resumo-box {
  border-color: #173e5b !important;
  border-radius: 7px !important;
  background: #071624 !important;
}

.fluxo-builder-area {
  border-color: #17425f;
  border-radius: 7px;
  background-color: #050f1c;
  background-image:
    linear-gradient(rgba(69, 200, 245, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 200, 245, .035) 1px, transparent 1px);
  background-size: 24px 24px;
}

.fluxo-card { border-color: #205a79; border-radius: 7px; background: #0a2033; }
.fluxo-card:hover { border-color: var(--accent); }
.fluxo-tool-btn { border-color: #1c4d6b; border-radius: 6px; background: #0a2133; }
.fluxo-tool-btn:hover { color: #06131c; background: var(--accent); }
.fluxo-chat-header { border-bottom-color: #1a4d69; background: #0b2b3f; }
.fluxo-chat-input-area { border-top-color: #1a4d69; background: #061523; }

/* Modais e sobreposições */
.fluxo-modal-backdrop,
.console-mobile-backdrop,
.modal-admin-conta-backdrop { background: rgba(1, 7, 15, .82); backdrop-filter: blur(8px); }

.fluxo-modal-card,
.console-mobile-card,
.modal-admin-conta-card {
  border: 1px solid #226585;
  border-radius: 8px;
  background: #071725;
  box-shadow: 0 30px 90px rgba(0, 5, 14, .6), inset 0 2px 0 var(--accent);
}

.fluxo-modal-head,
.console-mobile-head,
.modal-admin-conta-head { border-bottom-color: #17445f; background: #0a2032; }
.fluxo-modal-footer,
.modal-admin-conta-footer { border-top-color: #17445f; background: #061421; }

.admin-plano-config { border-left-color: var(--accent); }
.admin-plano-valor-atual strong { color: var(--accent); }

.mobile-bottom-nav {
  border-color: #205270;
  border-radius: 9px;
  background: rgba(5, 17, 29, .96);
  box-shadow: 0 22px 55px rgba(0, 4, 12, .55);
}

.bottom-nav-item { border-radius: 6px; }
.bottom-nav-item.active { color: #06131c; border-color: var(--accent); background: var(--accent); }
.bottom-nav-item.active .bottom-nav-icon { color: #06131c; }

.whatsapp-suporte-fixo {
  border: 1px solid rgba(67, 200, 97, .58);
  background: #0a3524;
  box-shadow: 0 16px 40px rgba(0, 6, 16, .42), inset 3px 0 0 var(--success);
}

@media (max-width: 1200px) {
  #app.app { grid-template-columns: 238px minmax(0, 1fr); }
  .dashboard-hero-copy h2 { font-size: clamp(36px, 5vw, 56px); }
}

@media (max-width: 900px) {
  #login.login-wrapper { padding-top: 56px; }
  #login.login-wrapper::before { inset: 24px 14px auto; height: 48px; }
  #app.app { display: block; grid-template-columns: minmax(0, 1fr); }
  .sidebar { border-right-color: #226181; }
  .main,
  .tab-panel,
  .tab-panel > .grid,
  .tab-panel > .grid > *,
  .cliente-edicao-workspace,
  .cliente-lista-painel,
  .cliente-edicao-formulario { min-width: 0; max-width: 100%; }
  .main { padding-inline: 14px; overflow-x: clip; }
  .clientes-layout,
  .cliente-edicao-workspace { grid-template-columns: minmax(0, 1fr); }
  .clientes-resultado-card { width: 100%; }
  .topbar { min-height: 76px; }
  .dashboard-hero-copy { min-height: 258px; padding: 32px 25px; }
  .dashboard-hero-copy h2 { font-size: clamp(34px, 9vw, 52px); }
  .dashboard-hero-copy h2::after { margin-top: 18px; }
  .mobile-bottom-nav { background: rgba(5, 17, 29, .97); }
}

@media (max-width: 560px) {
  body { background-size: 54px 54px, 54px 54px, auto, auto, auto; }
  .main { padding-inline: 10px !important; }
  .card { padding: 18px 16px; }
  .card > h2 { font-size: 25px; }
  .dashboard-hero-copy { min-height: 270px; }
  .dashboard-hero-copy h2 { font-size: 36px; }
  .dashboard-hero-copy::after { font-size: 48px; }
  .login-card,
  .login-plano-toggle,
  .login-plano-card { border-left-width: 2px !important; }
  .login-plano-card { padding: 22px; }
  .cliente-lista-painel,
  .cliente-edicao-formulario { padding: 12px; }
  .cliente-metrica { min-height: 68px; padding: 11px; }
  .conexao-metricas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clientes-resultado-head,
  .cliente-promo-cabecalho { flex-direction: column; }
  .cliente-promo-validade { text-align: left; }
  .cliente-promo-valores { grid-template-columns: minmax(0, 1fr); }
  .estado-pill { max-width: 100%; white-space: normal; }
  .config-action-bar { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .login-faq-call { animation: none !important; }
}
/* Testes grátis: usa as mesmas superfícies do painel e mantém leitura simples. */
.trial-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3, 16px);
  margin: 16px 0 24px;
}

.trial-provider-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-color, rgba(111, 155, 205, 0.22));
  border-radius: var(--radius-md, 14px);
  background: var(--color-surface, #0c192b);
  background: color-mix(in srgb, var(--color-surface, #0c192b) 92%, transparent);
}

.trial-provider-card .estado-pill {
  justify-self: start;
}

.trial-generate-btn {
  align-self: end;
  width: 100%;
  margin-top: 2px;
}

.trial-generate-btn:disabled {
  cursor: not-allowed;
  opacity: .48;
}

body.trial-result-open { overflow: hidden; }

.trial-result-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 20px;
}

.trial-result-modal.hidden { display: none !important; }

.trial-result-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(1, 7, 15, .84);
  backdrop-filter: blur(8px);
}

.trial-result-card {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid #226585;
  border-radius: var(--radius-md, 10px);
  background:
    radial-gradient(circle at top right, rgba(69, 200, 245, .12), transparent 35%),
    #071725;
  box-shadow: 0 30px 90px rgba(0, 5, 14, .66), inset 0 2px 0 var(--accent);
}

.trial-result-head,
.trial-result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: #0a2032;
}

.trial-result-head { border-bottom: 1px solid #17445f; }
.trial-result-head h2 { margin: 2px 0 0; font-size: clamp(22px, 4vw, 30px); }

.trial-result-close {
  flex: 0 0 42px;
  width: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  margin: 0;
  padding: 0;
  font-size: 25px;
  line-height: 1;
}

.trial-result-body {
  display: grid;
  gap: 16px;
  padding: 22px 20px;
}

.trial-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trial-result-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid #17445f;
  border-radius: var(--radius-md, 10px);
  background: #061421;
}

.trial-result-loading small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.trial-result-spinner {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(69, 200, 245, .18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: trial-result-spin .8s linear infinite;
}

@keyframes trial-result-spin { to { transform: rotate(360deg); } }

.trial-result-message {
  padding: 14px 16px;
  border: 1px solid #8a5425;
  border-radius: var(--radius-md, 10px);
  color: #ffd5a4;
  background: rgba(91, 47, 13, .35);
}

.trial-result-content {
  min-height: 180px;
  max-height: 360px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid #287091;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md, 10px);
  color: var(--text);
  background: #040e18;
}

.trial-result-actions {
  justify-content: flex-end;
  border-top: 1px solid #17445f;
  background: #061421;
}

.trial-result-actions button {
  width: auto;
  min-width: 150px;
  margin: 0;
}

.admin-trials-card { width: min(780px, 100%); }
.admin-trials-head p { margin: 5px 0 0; }
.admin-trials-content { display: grid; gap: 16px; }
.admin-trials-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.admin-trials-metrics > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid #17445f;
  border-radius: 12px;
  background: #061421;
}
.admin-trials-metrics span,
.admin-trials-metrics strong { display: block; }
.admin-trials-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.admin-trials-metrics strong {
  margin-top: 6px;
  color: #8fffd6;
  font-size: 26px;
  line-height: 1;
}
.admin-trials-section {
  padding: 16px;
  border: 1px solid #17445f;
  border-radius: 14px;
  background: rgba(4, 14, 24, .7);
}
.admin-trials-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-trials-section-head h3 { margin: 3px 0 0; }
.admin-trials-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.admin-trials-breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(69, 200, 245, .2);
  border-radius: 10px;
  background: rgba(69, 200, 245, .06);
}
.admin-trials-breakdown-item span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}
.admin-trials-breakdown-item strong { color: var(--text); font-size: 17px; }
.admin-trials-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  padding-right: 3px;
}
.admin-trials-item {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(156, 169, 188, .14);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
}
.admin-trials-item-main strong,
.admin-trials-item-main span { display: block; }
.admin-trials-item-main strong { color: var(--text); }
.admin-trials-item-main span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.admin-trials-item-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.admin-trials-item-meta span,
.admin-trials-item-meta time {
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(156, 169, 188, .14);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
  font-size: 11px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.admin-trials-empty {
  min-height: 130px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  text-align: center;
  color: var(--muted);
}
.admin-trials-empty strong { color: var(--text); }

.promotion-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.promotion-metrics > div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border-color, rgba(111, 155, 205, 0.22));
  border-radius: var(--radius-md, 14px);
  background: var(--color-surface, #0c192b);
}

.promotion-metrics small {
  color: var(--color-muted, #8da2bd);
}

.promotion-metrics strong {
  font-size: 1.45rem;
}

.promotion-command-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.promotion-command-guide > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-color, rgba(111, 155, 205, 0.22));
  border-radius: var(--radius-md, 14px);
  background: rgba(35, 92, 139, 0.08);
}

.promotion-command-guide code,
.promotion-command-preview code {
  color: #52c7f4;
  font: 750 0.78rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.promotion-command-guide span {
  color: var(--color-muted, #8da2bd);
  font-size: 0.78rem;
  line-height: 1.45;
}

.promocao-cliente-seletor {
  margin: 18px 0 14px;
}

.promocao-clientes-lista {
  max-height: 360px;
}

.promocao-cliente-resumo {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--border-color, rgba(111, 155, 205, 0.22));
  border-radius: var(--radius-md, 14px);
  background: rgba(12, 25, 43, 0.72);
  transition: border-color .18s ease, background-color .18s ease;
}

.promocao-cliente-resumo.has-active-promotion {
  border-color: rgba(82, 199, 244, .38);
  background: rgba(18, 48, 73, .58);
}

.promocao-cliente-resumo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.promocao-cliente-resumo-head h4 {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.promocao-cliente-dados {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.promocao-cliente-dados > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(111, 155, 205, .16);
  border-radius: var(--radius-sm, 9px);
  background: rgba(5, 13, 23, .48);
}

.promocao-cliente-dados small,
.promocao-cliente-dados strong {
  display: block;
}

.promocao-cliente-dados small {
  margin-bottom: 5px;
  color: var(--color-muted, #8da2bd);
  font-size: .7rem;
}

.promocao-cliente-dados strong {
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.promocao-cliente-resumo > .field-help {
  margin: 11px 0 0;
}

.promocao-cliente-resumo.is-empty .promocao-cliente-dados {
  opacity: .52;
}

.promocao-cliente-campos {
  margin-top: 14px;
}

.promocao-cliente-campos input[readonly] {
  color: #9fb0c4;
  border-style: dashed;
  background: rgba(5, 13, 23, .72);
  cursor: default;
}

.promotion-command-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0;
  padding: 11px 13px;
  border: 1px solid rgba(82, 199, 244, 0.24);
  border-radius: var(--radius-sm, 9px);
  background: rgba(9, 25, 43, 0.72);
}

.promotion-command-preview span {
  color: var(--color-muted, #8da2bd);
  font-size: 0.75rem;
  font-weight: 750;
}

#promocaoClienteMensagemGroup[hidden],
#promocaoClientePeriodoGroup[hidden] {
  display: none !important;
}

.integration-security-note {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(76, 194, 244, .28);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm, 8px);
  color: var(--muted);
  background: rgba(9, 40, 59, .62);
}

.integration-security-note.is-warning {
  border-color: rgba(232, 169, 66, .45);
  border-left-color: var(--warning, #e8a942);
  color: #f3d49d;
}

.integration-webhook-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.integration-webhook-row input {
  min-width: 0;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .84rem;
}

.integration-webhook-row button { margin: 0; }
.config-action-bar.integration-actions { grid-template-columns: minmax(0, 1.15fr) repeat(2, minmax(0, .85fr)); }

@media (max-width: 900px) {
  .trial-provider-grid {
    grid-template-columns: 1fr;
  }

  #tab-testes-gratis .config-fields-grid {
    grid-template-columns: 1fr;
  }

  .trial-result-modal { padding: 12px; }
  .trial-result-card { max-height: calc(100vh - 24px); }
  .admin-trials-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .promotion-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .promotion-command-guide {
    grid-template-columns: 1fr;
  }

  .promocao-cliente-dados {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .config-action-bar.integration-actions { grid-template-columns: 1fr; }
  .integration-webhook-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .trial-result-head,
  .trial-result-body,
  .trial-result-actions { padding-inline: 15px; }
  .trial-result-actions { display: grid; grid-template-columns: 1fr; }
  .trial-result-actions button { width: 100%; min-width: 0; }
  .trial-result-content { min-height: 150px; max-height: 42vh; }
  .admin-bots-box-head,
  .admin-trials-metrics,
  .admin-trials-breakdown,
  .admin-trials-item { grid-template-columns: 1fr; }
  .btn-ver-testes-usuario { width: 100%; min-width: 0; }
  .admin-trials-section-head { align-items: flex-start; flex-direction: column; }
  .admin-trials-item-meta { justify-content: flex-start; }
  .admin-trials-list { max-height: 46vh; }
}

@media (prefers-reduced-motion: reduce) {
  .trial-result-spinner { animation-duration: 1.8s; }
}

@media (max-width: 560px) {
  .promotion-metrics { grid-template-columns: 1fr; }
  .promotion-command-preview { align-items: flex-start; flex-direction: column; }
  .promotion-command-preview code { overflow-wrap: anywhere; }
  .promocao-cliente-resumo-head { flex-direction: column; }
  .promocao-cliente-dados { grid-template-columns: 1fr; }
}

/* ================= 22 - TABLET =================
   Entre o celular e o desktop, a barra lateral continua disponível,
   mas as áreas densas deixam de disputar a largura restante. */
@media (min-width: 901px) and (max-width: 1180px) {
  #login.login-wrapper { padding-inline: 18px; }
  #login .login-layout { gap: 18px; }

  #app.app { grid-template-columns: 238px minmax(0, 1fr); }
  .sidebar { padding: 16px 12px; }
  .sidebar-head { gap: 8px; }
  .brand.small { gap: 8px; }
  .brand.small .brand-monogram {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .brand.small h1 { font-size: 19px; }
  .brand.small p { font-size: 11px; }
  .menu-item { padding-inline: 10px; font-size: 13px; }

  .main {
    min-width: 0;
    padding: 16px;
    overflow-x: clip;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }
  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .badge { max-width: none; }

  .tab-panel,
  .tab-panel > .grid,
  .tab-panel > .grid > *,
  .cliente-edicao-workspace,
  .cliente-lista-painel,
  .cliente-edicao-formulario {
    min-width: 0;
    max-width: 100%;
  }

  .grid,
  .clientes-layout,
  #tab-fluxos > .grid,
  .fluxo-modal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .resultado-card,
  #tab-fluxos .resultado-card {
    position: static;
    width: 100%;
    min-width: 0;
  }

  .dashboard-hero { grid-template-columns: minmax(0, 1fr); }
  .dashboard-hero-copy { min-height: 220px; }
  .dashboard-metricas,
  .cliente-metricas,
  .fluxo-metricas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cliente-modos,
  .fluxo-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trial-provider-grid,
  .admin-trials-breakdown,
  .promocao-cliente-dados {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .config-action-bar.integration-actions,
  .integration-webhook-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .promotion-command-preview code { overflow-wrap: anywhere; }
}
