/* =====================================================================
   WEBDOS 360 — Estilos
   Paleta roxo-índigo, gradientes, cara de agência criativa.
   Suporta modo claro/escuro via [data-bs-theme].
===================================================================== */

:root {
  --wd-primary:        #6D28D9;
  --wd-primary-2:      #4F46E5;
  --wd-primary-3:      #8B5CF6;
  --wd-primary-soft:   #EDE9FE;
  --wd-success:        #10B981;
  --wd-warning:        #F59E0B;
  --wd-danger:         #EF4444;
  --wd-info:           #0EA5E9;
  --wd-pink:           #EC4899;
  --wd-cyan:           #22D3EE;

  --wd-bg:             #F5F6FA;
  --wd-surface:        #FFFFFF;
  --wd-surface-2:      #FAFAFC;
  --wd-border:         #E5E7EB;
  --wd-text:           #111827;
  --wd-text-muted:     #6B7280;

  --wd-sidebar-bg:     #0F1117;
  --wd-sidebar-text:   #C7CBD1;
  --wd-sidebar-active: linear-gradient(135deg, #6D28D9 0%, #4F46E5 100%);

  --wd-radius:         14px;
  --wd-radius-lg:      20px;
  --wd-radius-sm:      10px;
  --wd-shadow:         0 4px 20px rgba(15, 17, 23, .06);
  --wd-shadow-hover:   0 10px 40px rgba(109, 40, 217, .12);
  --wd-shadow-glow:    0 0 0 1px rgba(109, 40, 217, .15), 0 20px 50px -16px rgba(109, 40, 217, .35);

  --wd-gradient:       linear-gradient(135deg, #6D28D9 0%, #4F46E5 100%);
  --wd-gradient-2:     linear-gradient(135deg, #4F46E5 0%, #22D3EE 100%);
  --wd-gradient-3:     linear-gradient(135deg, #EC4899 0%, #6D28D9 100%);
  --wd-gradient-soft:  linear-gradient(135deg, rgba(109,40,217,.10) 0%, rgba(79,70,229,.10) 100%);
  --wd-gradient-mesh:  radial-gradient(1200px 600px at -10% -10%, rgba(109,40,217,.09), transparent 50%), radial-gradient(900px 500px at 110% 10%, rgba(236,72,153,.07), transparent 55%);

  --wd-transition:     .2s ease;
  --wd-ease:           cubic-bezier(.22, 1, .36, 1);
}

[data-bs-theme="dark"] {
  --wd-bg:             #0F1117;
  --wd-surface:        #171A22;
  --wd-surface-2:      #1E222C;
  --wd-border:         #2B303B;
  --wd-text:           #E6E8EF;
  --wd-text-muted:     #8B93A7;
  --wd-primary-soft:   rgba(109, 40, 217, .18);
  --wd-shadow:         0 4px 24px rgba(0, 0, 0, .35);
  --wd-shadow-hover:   0 10px 40px rgba(109, 40, 217, .35);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--wd-bg);
  color: var(--wd-text);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

/* Scrollbar — fino, discreto, com cara de SaaS premium */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(109, 40, 217, .22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(109, 40, 217, .45); background-clip: padding-box; }
[data-bs-theme="dark"] *::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, .25); background-clip: padding-box; }

/* Foco acessível e visível em todos os componentes clicáveis */
.btn:focus-visible, a:focus-visible, .nav-link:focus-visible,
.form-control:focus-visible, .form-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, .35) !important;
}

/* Seleção de texto na cor da marca */
::selection { background: rgba(109, 40, 217, .25); color: inherit; }

a { color: var(--wd-primary); text-decoration: none; }
a:hover { color: var(--wd-primary-2); }

/* =====================================================================
   LOGIN — split screen impactante
===================================================================== */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--wd-bg);
}
@media (max-width: 900px) { .login-shell { grid-template-columns: 1fr; } }

.login-hero {
  position: relative;
  overflow: hidden;
  background: var(--wd-gradient);
  color: #fff;
  padding: 60px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-hero::before,
.login-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  pointer-events: none;
}
.login-hero::before { width: 380px; height: 380px; background: #EC4899; top: -100px; right: -80px; }
.login-hero::after  { width: 300px; height: 300px; background: #22D3EE; bottom: -80px; left: -60px; }

.login-hero .brand {
  display: flex; align-items: center; gap: 14px; font-size: 22px; font-weight: 800;
  position: relative; z-index: 2;
}
.login-hero .brand-mark {
  display: inline-flex; gap: 4px;
  background: rgba(255,255,255,.15);
  padding: 8px 10px; border-radius: 10px; backdrop-filter: blur(10px);
}
.login-hero .brand-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #fff;
}
.login-hero .brand-dot:last-child { background: #F59E0B; }

.login-hero h1 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
  position: relative; z-index: 2;
}
.login-hero p { font-size: 1.05rem; max-width: 480px; opacity: .92; position: relative; z-index: 2; }
.login-hero .hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  position: relative; z-index: 2; margin-top: 40px;
}
.login-hero .hero-stat {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  padding: 16px; border-radius: var(--wd-radius);
  backdrop-filter: blur(10px);
}
.login-hero .hero-stat strong { display: block; font-size: 1.6rem; font-weight: 800; }
.login-hero .hero-stat span { font-size: .85rem; opacity: .85; }

.login-form-wrap {
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.login-form {
  width: 100%; max-width: 420px;
}
.login-form h2 { font-weight: 800; margin: 0 0 6px; }
.login-form .subtitle { color: var(--wd-text-muted); margin: 0 0 32px; }

.form-control, .form-select {
  border-radius: var(--wd-radius-sm);
  border: 1px solid var(--wd-border);
  background: var(--wd-surface);
  color: var(--wd-text);
  padding: .7rem .9rem;
  transition: border-color var(--wd-transition), box-shadow var(--wd-transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--wd-primary);
  box-shadow: 0 0 0 4px rgba(109, 40, 217, .15);
  background: var(--wd-surface);
  color: var(--wd-text);
}

/* =====================================================================
   BOTÕES
===================================================================== */
.btn { border-radius: var(--wd-radius-sm); font-weight: 600; transition: transform var(--wd-transition), box-shadow var(--wd-transition), background-color var(--wd-transition); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--wd-gradient);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(109, 40, 217, .25);
}
.btn-primary:hover, .btn-primary:focus { transform: translateY(-1px); box-shadow: var(--wd-shadow-hover); color: #fff; background: var(--wd-gradient); }
.btn-outline-primary { color: var(--wd-primary); border-color: var(--wd-primary); }
.btn-outline-primary:hover { background: var(--wd-primary); color: #fff; }
.btn-lg { padding: .8rem 1.25rem; }

.btn-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: transparent;
  color: var(--wd-text);
  border: 1px solid transparent;
}
.btn-icon:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }

/* =====================================================================
   LAYOUT PRINCIPAL (sidebar + main)
===================================================================== */
.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  transition: grid-template-columns .25s var(--wd-ease);
}
/* Sidebar retraída no desktop — só os ícones. */
.app-layout.sidebar-retraida { grid-template-columns: 72px 1fr; }
.app-layout.sidebar-retraida .app-sidebar { width: 72px; }
.app-layout.sidebar-retraida .brand-text,
.app-layout.sidebar-retraida .version-tag,
.app-layout.sidebar-retraida .nav-section,
.app-layout.sidebar-retraida .sidebar-nav .nav-link span { display: none; }
.app-layout.sidebar-retraida .sidebar-nav .nav-link {
  justify-content: center; padding: 10px 0;
}
.app-layout.sidebar-retraida .sidebar-nav .nav-link[style*="padding-left:36px"] {
  padding: 10px 0 !important; font-size: 1rem !important;
}
.app-layout.sidebar-retraida .sidebar-brand {
  padding: 18px 10px; justify-content: center;
}
.app-layout.sidebar-retraida .brand-mark { padding: 6px 8px; }
.app-layout.sidebar-retraida .sidebar-footer { padding: 12px 10px; text-align: center; }
.app-layout.sidebar-retraida .sidebar-nav .nav-link.active::before { left: -8px; }
/* Tooltip simples ao pousar sobre o item retraído */
.app-layout.sidebar-retraida .sidebar-nav .nav-link { position: relative; }
.app-layout.sidebar-retraida .sidebar-nav .nav-link::after {
  content: attr(data-rotulo);
  position: absolute; left: 100%; top: 50%; transform: translateY(-50%) translateX(10px);
  background: #111; color: #fff; padding: 6px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
  z-index: 1050;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.app-layout.sidebar-retraida .sidebar-nav .nav-link:hover::after { opacity: 1; }
.app-main {
  display: flex; flex-direction: column; min-width: 0;
}

/* --- Sidebar ------------------------------------------------------- */
.app-sidebar {
  background: var(--wd-sidebar-bg);
  color: var(--wd-sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.brand-link {
  display: flex; align-items: center; gap: 12px;
  color: #fff; font-weight: 800;
  letter-spacing: .5px;
}
.brand-link:hover { color: #fff; }
.brand-mark {
  display: inline-flex; gap: 4px;
  background: var(--wd-gradient);
  padding: 8px 10px; border-radius: 10px;
}
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.brand-dot:last-child { background: #F59E0B; }
.brand-text strong { display: block; font-size: 16px; line-height: 1; }
.brand-text small  { display: block; font-size: 10px; opacity: .7; letter-spacing: 2px; }

.sidebar-nav { padding: 12px 12px 24px; flex: 1; }
.nav-section {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,.35); padding: 18px 12px 8px;
}
/* Estes estilos ficam escopados na sidebar — fora dela, nav-link = padrão do Bootstrap. */
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 12px;
  color: var(--wd-sidebar-text);
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: 10px;
  font-weight: 500;
  transition: background-color var(--wd-transition), color var(--wd-transition);
}
.sidebar-nav .nav-link i { font-size: 18px; width: 20px; text-align: center; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar-nav .nav-link.active {
  background: var(--wd-sidebar-active);
  color: #fff;
  box-shadow: 0 6px 20px rgba(109, 40, 217, .35);
  position: relative;
}
.sidebar-nav .nav-link.active::before {
  content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px;
  width: 3px; border-radius: 999px; background: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,.7);
}
.sidebar-nav .nav-link.active i { transform: scale(1.08); }

.sidebar-footer { padding: 14px 22px 20px; border-top: 1px solid rgba(255,255,255,.05); }
.version-tag { color: rgba(255,255,255,.4); font-size: 11px; letter-spacing: 1px; }

/* Botão de retrair/expandir no header da sidebar — ícone compacto */
.btn-sidebar-retract {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.75);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 0;
  flex-shrink: 0;
  transition: background var(--wd-transition), color var(--wd-transition), border-color var(--wd-transition);
}
.btn-sidebar-retract:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
.btn-sidebar-retract i { font-size: 14px; transition: transform .3s var(--wd-ease); }
/* Quando retraída: chevron inverte e a brand compacta */
.app-layout.sidebar-retraida .btn-sidebar-retract i { transform: rotate(180deg); }
.app-layout.sidebar-retraida .sidebar-brand .btn-sidebar-retract {
  position: absolute; bottom: -14px; right: 50%; transform: translateX(50%);
  background: var(--wd-gradient); border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(109,40,217,.4);
}
.app-layout.sidebar-retraida .sidebar-brand { position: relative; }

.sidebar-close { color: #fff; }
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1029;
}

@media (max-width: 992px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; z-index: 1030; left: -280px; width: 260px;
    transition: left var(--wd-transition);
  }
  .app-sidebar.open { left: 0; }
  .sidebar-backdrop.show { display: block; }
}

/* --- Topbar — glassmorphism sutil --------------------------------- */
.app-topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--wd-border);
  position: sticky; top: 0; z-index: 20;
}
[data-bs-theme="dark"] .app-topbar { background: rgba(23, 26, 34, .72); }
.topbar-search {
  position: relative; flex: 1; max-width: 500px;
}
.topbar-search i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--wd-text-muted);
}
.topbar-search input {
  padding-left: 40px;
  background: var(--wd-surface-2);
  border: 1px solid transparent;
}
.topbar-search input:focus {
  background: var(--wd-surface);
  border-color: var(--wd-primary);
}

.topbar-actions {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}
.badge-notif {
  position: absolute; top: 4px; right: 4px;
  background: var(--wd-danger); color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 999px;
  padding: 2px 6px; line-height: 1;
}

.user-btn {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 1px solid transparent;
  padding: 6px 10px; border-radius: 10px; color: var(--wd-text);
}
.user-btn:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }
.user-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.user-info strong { font-size: 13px; font-weight: 700; }
.user-info small  { font-size: 11px; color: var(--wd-text-muted); }

.avatar-mini {
  width: 34px; height: 34px; border-radius: 50%;
  color: #fff; font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  letter-spacing: .5px;
}

.notif-menu { min-width: 320px; }
.notif-header { padding: 14px 16px; font-weight: 700; border-bottom: 1px solid var(--wd-border); }

/* --- Conteúdo — fade-in suave na transição de páginas ------------- */
.app-content {
  padding: 28px;
  flex: 1;
  background: var(--wd-gradient-mesh), var(--wd-bg);
  background-attachment: fixed;
  animation: pageIn .35s var(--wd-ease);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 24px; flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.6rem; font-weight: 800; margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.page-header .page-subtitle {
  color: var(--wd-text-muted); margin: 4px 0 0; font-size: .95rem;
}

/* --- Cards --------------------------------------------------------- */
.card {
  background: var(--wd-surface);
  border: 1px solid var(--wd-border);
  border-radius: var(--wd-radius);
  box-shadow: var(--wd-shadow);
  transition: transform var(--wd-transition), box-shadow var(--wd-transition);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--wd-shadow-hover); }
.card-body { padding: 22px; }

.stat-card {
  position: relative; overflow: hidden;
}
.stat-card .stat-label { color: var(--wd-text-muted); font-size: .82rem; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; margin-top: 4px; }
.stat-card .stat-trend { font-size: .82rem; margin-top: 6px; }
.stat-card .stat-icon {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--wd-gradient-soft); color: var(--wd-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-card.gradient {
  background: var(--wd-gradient);
  color: #fff; border: none;
  position: relative;
  overflow: hidden;
}
.stat-card.gradient::after {
  content: ""; position: absolute; inset: -40% -40% auto auto;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
  pointer-events: none;
}
.stat-card.gradient .stat-label,
.stat-card.gradient .stat-trend { color: rgba(255,255,255,.85); }
.stat-card.gradient .stat-icon {
  background: rgba(255,255,255,.18); color: #fff;
}

/* --- Badges -------------------------------------------------------- */
.badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  background: var(--wd-primary-soft); color: var(--wd-primary);
}
.badge-pill.success { background: rgba(16,185,129,.12); color: var(--wd-success); }
.badge-pill.warning { background: rgba(245,158,11,.12); color: var(--wd-warning); }
.badge-pill.danger  { background: rgba(239,68,68,.12);  color: var(--wd-danger);  }
.badge-pill.info    { background: rgba(14,165,233,.12); color: var(--wd-info);    }

/* --- Footer -------------------------------------------------------- */
.app-footer {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 4px 12px;
  padding: 16px 28px;
  border-top: 1px solid var(--wd-border);
  color: var(--wd-text-muted);
  font-size: .85rem;
}

/* --- Toasts flash -------------------------------------------------- */
.toast-stack {
  position: fixed; top: 80px; right: 24px; z-index: 1080;
  display: flex; flex-direction: column; gap: 10px;
}
.toast-flash {
  background: var(--wd-surface);
  border: 1px solid var(--wd-border);
  padding: 12px 18px;
  border-radius: var(--wd-radius-sm);
  box-shadow: var(--wd-shadow-hover);
  animation: slideIn .3s ease;
  min-width: 260px;
}
.toast-flash.toast-sucesso { border-left: 4px solid var(--wd-success); }
.toast-flash.toast-erro    { border-left: 4px solid var(--wd-danger);  }
.toast-flash.toast-alerta  { border-left: 4px solid var(--wd-warning); }
.toast-flash.toast-info    { border-left: 4px solid var(--wd-info);    }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Contadores animados ------------------------------------------ */
.count-up { display: inline-block; }

/* --- Empty state --------------------------------------------------- */
.empty-state {
  padding: 60px 20px; text-align: center; color: var(--wd-text-muted);
}
.empty-state .icon {
  font-size: 48px; margin-bottom: 12px;
  background: var(--wd-gradient-soft);
  color: var(--wd-primary);
  width: 80px; height: 80px; border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* --- Bootstrap overrides no dark mode ----------------------------- */
[data-bs-theme="dark"] .card { background: var(--wd-surface); border-color: var(--wd-border); }
[data-bs-theme="dark"] .app-topbar { background: var(--wd-surface); border-color: var(--wd-border); }
[data-bs-theme="dark"] .dropdown-menu { background: var(--wd-surface); border-color: var(--wd-border); }
[data-bs-theme="dark"] .dropdown-item { color: var(--wd-text); }
[data-bs-theme="dark"] .dropdown-item:hover { background: var(--wd-primary-soft); color: var(--wd-primary); }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { background: var(--wd-surface-2); border-color: var(--wd-border); color: var(--wd-text); }

/* =====================================================================
   METAS — checklist, menções e linha do tempo evolutiva
===================================================================== */

/* --- Barra de progresso com faixa "aguardando conferência" ---------- */
.progress-meta {
  position: relative; height: 10px; border-radius: 999px;
  background: var(--wd-border); overflow: hidden;
}
.progress-meta .fatia { position: absolute; top: 0; bottom: 0; left: 0; transition: width .35s ease; }
.progress-meta .fatia.aguardando {
  background-image: repeating-linear-gradient(45deg, rgba(245,158,11,.55) 0 6px, rgba(245,158,11,.22) 6px 12px);
}
.progress-meta .fatia.feito { border-radius: 999px 0 0 999px; }

/* --- Chips de pessoas mencionadas ---------------------------------- */
.mencao-box {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  min-height: 46px; padding: 7px 10px;
  border: 1px solid var(--wd-border); border-radius: var(--wd-radius-sm);
  background: var(--wd-surface);
}
.mencao-box:focus-within { border-color: var(--wd-primary); box-shadow: 0 0 0 3px var(--wd-primary-soft); }
.mencao-box .mencao-input {
  border: 0; outline: 0; background: transparent; color: var(--wd-text);
  flex: 1 1 140px; min-width: 120px; padding: 4px 2px; font-size: .92rem;
}
.chip-pessoa {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 6px 4px 4px; border-radius: 999px;
  background: var(--wd-surface-2); border: 1px solid var(--wd-border);
  font-size: .82rem; font-weight: 600;
}
.chip-pessoa .avatar-xs {
  width: 24px; height: 24px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.chip-pessoa .escopo-toggle {
  border: 0; border-radius: 999px; padding: 2px 9px;
  font-size: .68rem; font-weight: 700; letter-spacing: .3px; cursor: pointer;
  background: rgba(14,165,233,.14); color: var(--wd-info);
}
.chip-pessoa .escopo-toggle.total { background: var(--wd-primary-soft); color: var(--wd-primary); }
.chip-pessoa .chip-x {
  border: 0; background: transparent; color: var(--wd-text-muted);
  line-height: 1; padding: 0 2px; cursor: pointer; font-size: 1rem;
}
.chip-pessoa .chip-x:hover { color: var(--wd-danger); }

.mencao-sugestoes {
  position: absolute; z-index: 1080; min-width: 260px; max-height: 260px; overflow-y: auto;
  background: var(--wd-surface); border: 1px solid var(--wd-border);
  border-radius: var(--wd-radius-sm); box-shadow: var(--wd-shadow-hover); padding: 6px;
}
.mencao-sugestoes .sug {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--wd-text); text-align: left; cursor: pointer;
}
.mencao-sugestoes .sug:hover, .mencao-sugestoes .sug.ativo { background: var(--wd-primary-soft); }
.mencao-sugestoes .vazio { padding: 10px; color: var(--wd-text-muted); font-size: .85rem; }

/* --- Checklist de itens da meta ------------------------------------ */
.meta-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--wd-border);
  border-radius: var(--wd-radius-sm); background: var(--wd-surface);
  margin-bottom: 10px; transition: border-color var(--wd-transition), background var(--wd-transition);
}
.meta-item:hover { border-color: var(--wd-primary); }
.meta-item.st-aprovado   { background: rgba(16,185,129,.06);  border-color: rgba(16,185,129,.30); }
.meta-item.st-aguardando { background: rgba(245,158,11,.07);  border-color: rgba(245,158,11,.35); }
.meta-item.st-devolvido  { background: rgba(239,68,68,.06);   border-color: rgba(239,68,68,.32); }
.meta-item.st-aprovado .item-titulo { text-decoration: line-through; color: var(--wd-text-muted); }

.meta-item .check {
  flex: 0 0 auto; width: 24px; height: 24px; margin-top: 1px;
  border-radius: 7px; border: 2px solid var(--wd-border);
  background: var(--wd-surface); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1; transition: all var(--wd-transition);
}
.meta-item .check:hover:not(:disabled) { border-color: var(--wd-primary); }
.meta-item .check:disabled { cursor: not-allowed; opacity: .5; }
.meta-item .check.marcado   { background: var(--wd-warning); border-color: var(--wd-warning); }
.meta-item .check.conferido { background: var(--wd-success); border-color: var(--wd-success); }
.meta-item .item-titulo { font-weight: 600; font-size: .95rem; margin: 0; }
.meta-item .item-meta   { font-size: .78rem; color: var(--wd-text-muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.meta-item .item-obs    { font-size: .8rem; margin-top: 8px; padding: 7px 10px; border-radius: 8px; background: rgba(239,68,68,.08); color: var(--wd-danger); }
.meta-item .item-acoes  { margin-left: auto; display: flex; gap: 4px; flex: 0 0 auto; }
.meta-item .arrastar    { cursor: grab; color: var(--wd-text-muted); opacity: .5; }
.meta-item .arrastar:hover { opacity: 1; }

.item-prazo.vencido { color: var(--wd-danger); font-weight: 700; }

/* --- Linha do tempo evolutiva -------------------------------------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2px; background: var(--wd-border);
}
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item .ponto {
  position: absolute; left: -24px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--wd-surface); border: 2px solid var(--wd-border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--wd-text-muted);
}
.timeline-item.ok    .ponto { border-color: var(--wd-success); color: var(--wd-success); }
.timeline-item.alerta .ponto { border-color: var(--wd-warning); color: var(--wd-warning); }
.timeline-item.erro   .ponto { border-color: var(--wd-danger);  color: var(--wd-danger);  }
.timeline-item.info   .ponto { border-color: var(--wd-primary); color: var(--wd-primary); }
.timeline-item .txt  { font-size: .88rem; line-height: 1.45; }
.timeline-item .quando { font-size: .74rem; color: var(--wd-text-muted); margin-top: 2px; }

/* --- Cartão de evolução por pessoa --------------------------------- */
.pessoa-evolucao {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--wd-radius-sm);
  background: var(--wd-surface-2); margin-bottom: 10px;
}
.pessoa-evolucao .avatar-mini { flex: 0 0 auto; }
.pessoa-evolucao .nome { font-weight: 700; font-size: .9rem; }
.pessoa-evolucao .linha { flex: 1 1 auto; min-width: 0; }

/* Pilha de avatares nos cards da listagem */
.avatares-pilha { display: inline-flex; }
.avatares-pilha .avatar-xs {
  width: 26px; height: 26px; border-radius: 50%; color: #fff;
  font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--wd-surface); margin-left: -8px;
}
.avatares-pilha .avatar-xs:first-child { margin-left: 0; }

.meta-card-link { cursor: pointer; }
.meta-card-link:hover .meta-titulo-link { color: var(--wd-primary); }

/* =====================================================================
   ESTEIRA — blocos, passos com vínculo e evolutiva do ciclo
===================================================================== */

/* --- Seletor "importar do sistema" --------------------------------- */
.lista-importar { display: flex; flex-direction: column; gap: 6px; }
.resultado-importar {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border: 1px solid var(--wd-border);
  border-radius: var(--wd-radius-sm); background: var(--wd-surface);
  color: var(--wd-text); cursor: pointer; transition: all var(--wd-transition);
}
.resultado-importar:hover { border-color: var(--wd-primary); background: var(--wd-primary-soft); }

/* --- Bloco (fase / período / campanha) ----------------------------- */
.bloco-esteira {
  border: 1px solid var(--wd-border); border-left: 5px solid var(--wd-primary);
  border-radius: var(--wd-radius-sm); background: var(--wd-surface);
  margin-bottom: 14px; overflow: hidden;
}
.bloco-esteira > .bloco-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; background: var(--wd-surface-2);
  border-bottom: 1px solid var(--wd-border);
}
.bloco-esteira > .bloco-head .bloco-nome {
  border: 0; background: transparent; font-weight: 700; font-size: .98rem;
  color: var(--wd-text); flex: 1 1 180px; min-width: 140px; padding: 4px 6px;
  border-radius: 8px;
}
.bloco-esteira > .bloco-head .bloco-nome:focus { outline: 0; background: var(--wd-surface); box-shadow: 0 0 0 3px var(--wd-primary-soft); }
.bloco-esteira > .bloco-corpo { padding: 12px 14px; }
.bloco-esteira .bloco-resumo { font-size: .78rem; color: var(--wd-text-muted); }
.bloco-esteira.recolhido > .bloco-corpo { display: none; }

/* --- Passo dentro do bloco (editor) -------------------------------- */
.passo-card {
  border: 1px solid var(--wd-border); border-radius: var(--wd-radius-sm);
  background: var(--wd-surface-2); padding: 12px; margin-bottom: 10px;
}
.passo-card:hover { border-color: var(--wd-primary); }
.passo-card .passo-linha1 { display: flex; gap: 8px; align-items: center; }
.passo-card .passo-drag { cursor: grab; color: var(--wd-text-muted); opacity: .55; padding: 0 2px; }
.passo-card .passo-drag:hover { opacity: 1; }
.passo-card .passo-num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px;
  background: var(--wd-primary-soft); color: var(--wd-primary);
  font-size: .72rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.passo-card .passo-detalhes { display: none; margin-top: 10px; }
.passo-card.aberto .passo-detalhes { display: block; }

/* --- Chips de vínculo (o que o passo importou do sistema) ---------- */
.vinculos-passo { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vinculo-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 9px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; max-width: 100%;
  background: var(--wd-surface); border: 1px solid var(--wd-border);
}
.vinculo-chip .rotulo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.vinculo-chip .chip-x { border: 0; background: transparent; color: var(--wd-text-muted); cursor: pointer; line-height: 1; padding: 0 2px; }
.vinculo-chip .chip-x:hover { color: var(--wd-danger); }
.vinculo-chip.conteudo { background: rgba(14,165,233,.10);  color: var(--wd-info);    border-color: rgba(14,165,233,.30); }
.vinculo-chip.campanha { background: rgba(236,72,153,.10);  color: var(--wd-pink);    border-color: rgba(236,72,153,.30); }
.vinculo-chip.meta     { background: rgba(109,40,217,.10);  color: var(--wd-primary); border-color: rgba(109,40,217,.30); }
.vinculo-chip.tema     { background: rgba(245,158,11,.10);  color: var(--wd-warning); border-color: rgba(245,158,11,.30); }

/* --- Execução do ciclo (página da evolutiva) ----------------------- */
.exec-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--wd-border);
  border-radius: var(--wd-radius-sm); background: var(--wd-surface); margin-bottom: 10px;
}
.exec-item.st-publicado { background: rgba(16,185,129,.06); border-color: rgba(16,185,129,.30); }
.exec-item.st-em_producao { background: rgba(245,158,11,.06); border-color: rgba(245,158,11,.30); }
.exec-item.st-pulado { opacity: .6; }
.exec-item.atrasado { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.35); }
.exec-item .exec-data {
  flex: 0 0 auto; width: 62px; text-align: center; line-height: 1.1;
  padding: 6px 4px; border-radius: 10px; background: var(--wd-surface-2);
}
.exec-item .exec-data .dia { font-size: 1.1rem; font-weight: 800; display: block; }
.exec-item .exec-data .mes { font-size: .68rem; text-transform: uppercase; color: var(--wd-text-muted); }
.exec-item .exec-meta { font-size: .78rem; color: var(--wd-text-muted); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; }
.exec-item .exec-acoes { margin-left: auto; display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.exec-item .exec-conteudo {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: var(--wd-surface-2); font-size: .82rem;
}

/* --- Comparativo entre ciclos (a evolutiva) ------------------------ */
.ciclo-comparativo { display: flex; gap: 14px; align-items: flex-end; overflow-x: auto; padding: 8px 0 4px; }
.ciclo-coluna { flex: 0 0 76px; text-align: center; }
.ciclo-coluna .trilho {
  height: 130px; width: 100%; border-radius: 10px 10px 0 0;
  background: var(--wd-surface-2); display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.ciclo-coluna .barra { width: 100%; border-radius: 10px 10px 0 0; transition: height .4s ease; min-height: 3px; }
.ciclo-coluna .rot { font-size: .72rem; color: var(--wd-text-muted); margin-top: 6px; }
.ciclo-coluna .val { font-size: .82rem; font-weight: 700; }
.ciclo-coluna.atual .rot { color: var(--wd-primary); font-weight: 700; }

/* =====================================================================
   PRODUTO — ficha 360 (seletor de ícone, grades de seleção)
===================================================================== */
.seletor-icones {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 120px; overflow-y: auto;
  padding: 8px; border: 1px solid var(--wd-border); border-radius: var(--wd-radius-sm);
  background: var(--wd-surface-2);
}
.opcao-icone {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--wd-border); background: var(--wd-surface);
  color: var(--wd-text-muted); font-size: 17px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--wd-transition);
}
.opcao-icone:hover { border-color: var(--wd-primary); color: var(--wd-primary); }
.opcao-icone.ativo {
  background: var(--wd-primary); border-color: var(--wd-primary); color: #fff;
  box-shadow: 0 0 0 3px var(--wd-primary-soft);
}

/* Grade de chips selecionáveis (canais prioritários, temas) */
.grade-selecao { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-selecao {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 7px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--wd-border); background: var(--wd-surface);
  font-size: .84rem; font-weight: 600; transition: all var(--wd-transition);
  user-select: none;
}
.chip-selecao input { display: none; }
.chip-selecao .marca {
  width: 26px; height: 26px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
  opacity: .5; transition: opacity var(--wd-transition);
}
.chip-selecao:hover { border-color: var(--wd-primary); }
.chip-selecao:has(input:checked) {
  border-color: var(--wd-primary); background: var(--wd-primary-soft); color: var(--wd-primary);
}
.chip-selecao:has(input:checked) .marca { opacity: 1; }

/* Abas da ficha do produto */
#abasProduto .nav-link {
  border: 1px solid var(--wd-border); background: var(--wd-surface);
  color: var(--wd-text-muted); font-size: .86rem; font-weight: 600; padding: 7px 14px;
}
#abasProduto .nav-link.active { background: var(--wd-gradient); border-color: transparent; color: #fff; }

/* Blocos de posicionamento na página 360 */
.bloco-posicionamento {
  border: 1px solid var(--wd-border); border-radius: var(--wd-radius-sm);
  padding: 12px 14px; height: 100%; background: var(--wd-surface-2);
}
.bloco-posicionamento h6 { font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; color: var(--wd-text-muted); }
.bloco-posicionamento ul { margin: 0; padding-left: 18px; font-size: .86rem; }
.bloco-posicionamento ul li { margin-bottom: 4px; }

/* Passo da esteira ainda não virado em pauta (aparece no calendário) */
.cal-item.da-esteira {
  display: block; text-decoration: none; color: inherit;
  border-style: dashed; opacity: .85;
}
.cal-item.da-esteira:hover { opacity: 1; border-style: solid; }
.cal-status.s-previsto { background: rgba(109,40,217,.12); color: var(--wd-primary); }

/* =====================================================================
   LOUSA DE IDEIAS — post-its coloridos (masonry CSS columns)
===================================================================== */
.ideias-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 16px; margin-bottom: 18px;
  background: var(--wd-surface);
  border: 1px solid var(--wd-border);
  border-radius: var(--wd-radius);
  box-shadow: var(--wd-shadow);
}
.ideias-toolbar .filtros { display: flex; gap: 6px; flex-wrap: wrap; }
.ideias-toolbar .chip-filter {
  border: 1px solid var(--wd-border); background: var(--wd-surface-2); color: var(--wd-text);
  padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all var(--wd-transition);
}
.ideias-toolbar .chip-filter:hover { border-color: var(--wd-primary); color: var(--wd-primary); }
.ideias-toolbar .chip-filter.ativo {
  background: var(--wd-gradient); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(109, 40, 217, .25);
}

.ideias-lousa {
  column-count: 4; column-gap: 16px;
}
@media (max-width: 1400px) { .ideias-lousa { column-count: 3; } }
@media (max-width: 992px)  { .ideias-lousa { column-count: 2; } }
@media (max-width: 600px)  { .ideias-lousa { column-count: 1; } }

.postit {
  break-inside: avoid;
  display: block;
  margin: 0 0 16px;
  padding: 18px 18px 14px;
  border-radius: 14px;
  color: #1F2937;
  position: relative;
  box-shadow:
    0 1px 2px rgba(0,0,0,.06),
    0 8px 24px rgba(15,17,23,.08);
  transform: rotate(var(--rot, -0.6deg));
  transition: transform .25s var(--wd-ease), box-shadow .25s var(--wd-ease);
  background: #FEF3C7; /* fallback */
}
.postit:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 20px 40px rgba(15,17,23,.18);
}
.postit:nth-child(2n)   { --rot: .5deg; }
.postit:nth-child(3n)   { --rot: -1deg; }
.postit:nth-child(5n+1) { --rot: 1deg; }

.postit.cor-amarelo { background: linear-gradient(160deg, #FEF9C3 0%, #FDE68A 100%); }
.postit.cor-rosa    { background: linear-gradient(160deg, #FCE7F3 0%, #FBCFE8 100%); }
.postit.cor-azul    { background: linear-gradient(160deg, #DBEAFE 0%, #BFDBFE 100%); }
.postit.cor-verde   { background: linear-gradient(160deg, #D1FAE5 0%, #A7F3D0 100%); }
.postit.cor-roxo    { background: linear-gradient(160deg, #EDE9FE 0%, #DDD6FE 100%); }
.postit.cor-laranja { background: linear-gradient(160deg, #FFEDD5 0%, #FED7AA 100%); }
.postit.cor-ciano   { background: linear-gradient(160deg, #CFFAFE 0%, #A5F3FC 100%); }

.postit .postit-cabecalho {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.postit .postit-autor-nome { font-size: .82rem; font-weight: 700; line-height: 1.1; }
.postit .postit-autor-info { font-size: .7rem; opacity: .75; }
.postit .postit-titulo { font-weight: 800; font-size: 1.02rem; margin: 0 0 6px; letter-spacing: .1px; }
.postit .postit-texto  { font-size: .9rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.postit .postit-rodape {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
  padding-top: 10px; border-top: 1px dashed rgba(0,0,0,.12);
  font-size: .78rem; opacity: .85;
}
.postit .postit-rodape .btn-reagir,
.postit .postit-rodape .btn-comentar,
.postit .postit-rodape .btn-apagar {
  background: transparent; border: 0; color: inherit; padding: 2px 6px; border-radius: 7px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-weight: 600;
  transition: background var(--wd-transition);
}
.postit .postit-rodape .btn-reagir:hover,
.postit .postit-rodape .btn-comentar:hover { background: rgba(0,0,0,.08); }
.postit .postit-rodape .btn-reagir.marcado { color: var(--wd-danger); }
.postit .postit-rodape .btn-apagar:hover { background: rgba(239,68,68,.14); color: var(--wd-danger); }
.postit .postit-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,.07); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
}

/* Botão flutuante "Nova ideia" */
.fab-nova-ideia {
  position: fixed; bottom: 28px; right: 28px; z-index: 1050;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wd-gradient); color: #fff; border: 0;
  font-size: 26px; line-height: 1;
  box-shadow: 0 10px 28px rgba(109,40,217,.42);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s var(--wd-ease), box-shadow .2s var(--wd-ease);
}
.fab-nova-ideia:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 36px rgba(109,40,217,.5); }
.fab-nova-ideia:active { transform: translateY(1px) scale(.98); }
/* Sumir com o FAB enquanto houver modal aberto (não brigar com botão de ação do modal). */
body.modal-open .fab-nova-ideia { display: none; }

/* Seletor de cor dentro do modal */
.cor-opcoes { display: flex; gap: 8px; flex-wrap: wrap; }
.cor-opcao {
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s var(--wd-ease);
}
.cor-opcao:hover { transform: scale(1.08); }
.cor-opcao.ativo { border-color: var(--wd-primary); box-shadow: 0 0 0 3px var(--wd-primary-soft); }
.cor-opcao[data-cor="amarelo"] { background: #FDE68A; }
.cor-opcao[data-cor="rosa"]    { background: #FBCFE8; }
.cor-opcao[data-cor="azul"]    { background: #BFDBFE; }
.cor-opcao[data-cor="verde"]   { background: #A7F3D0; }
.cor-opcao[data-cor="roxo"]    { background: #DDD6FE; }
.cor-opcao[data-cor="laranja"] { background: #FED7AA; }
.cor-opcao[data-cor="ciano"]   { background: #A5F3FC; }

/* No modo escuro, mantém o post-it claro — faz parte da estética de lousa */
[data-bs-theme="dark"] .postit { color: #1F2937; }

/* Loader de carregamento inicial de ideias */
.ideias-loading {
  text-align: center; padding: 60px 10px; color: var(--wd-text-muted);
}
.ideias-loading .spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid var(--wd-primary-soft); border-top-color: var(--wd-primary);
  margin: 0 auto 14px; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   MODAL DE CONTEÚDO — redesign com cara de SaaS premium
===================================================================== */

/* Header do modal com gradiente discreto e status "ao vivo" */
#modalConteudo .modal-header {
  background: linear-gradient(135deg, rgba(109,40,217,.08), rgba(79,70,229,.04));
  border-bottom: 1px solid var(--wd-border);
  padding: 18px 22px;
  position: relative;
}
#modalConteudo .modal-header::after {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: -1px; height: 2px;
  background: var(--wd-gradient); opacity: .25; border-radius: 2px;
}
#modalConteudo .modal-title {
  font-weight: 800; font-size: 1.15rem; display: flex; align-items: center; gap: 10px;
}
#modalConteudo .modal-title .ic {
  width: 36px; height: 36px; border-radius: 10px; background: var(--wd-gradient);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
#modalConteudo .modal-body { padding: 22px 22px 10px; }
#modalConteudo .modal-footer {
  padding: 14px 22px; background: var(--wd-surface-2); border-top: 1px solid var(--wd-border);
}
#modalConteudo .form-label { font-size: .85rem; font-weight: 700; color: var(--wd-text); margin-bottom: 6px; letter-spacing: .2px; }
#modalConteudo .form-text { color: var(--wd-text-muted); font-size: .78rem; }

/* Abas do modal — pílulas gradientes */
#modalConteudo .nav-tabs {
  border-bottom: 1px solid var(--wd-border);
  margin-bottom: 20px; gap: 6px;
}
#modalConteudo .nav-tabs .nav-link {
  color: var(--wd-text-muted);
  font-weight: 700; font-size: .9rem;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 10px 16px;
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent;
  margin-bottom: -1px;
  transition: all var(--wd-transition);
}
#modalConteudo .nav-tabs .nav-link:hover {
  color: var(--wd-primary); background: var(--wd-primary-soft);
}
#modalConteudo .nav-tabs .nav-link.active {
  color: var(--wd-primary);
  background: var(--wd-surface);
  border-color: var(--wd-border);
  border-bottom-color: var(--wd-surface);
}
#modalConteudo .nav-tabs .nav-link.active::after {
  content: ""; display: block; position: absolute; left: 14px; right: 14px; top: 4px;
  height: 3px; border-radius: 999px; background: var(--wd-gradient);
}
#modalConteudo .nav-tabs .nav-link { position: relative; }

/* Seções dentro das abas */
.sec-bloco { margin-bottom: 22px; }
.sec-titulo { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--wd-text-muted); margin: 0 0 10px; }

/* Chips de formato (múltipla escolha) */
.chip-formato {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--wd-border);
  background: var(--wd-surface);
  cursor: pointer; user-select: none;
  font-size: .86rem; font-weight: 600;
  transition: all .18s var(--wd-ease);
}
.chip-formato input { display: none; }
.chip-formato:hover { border-color: var(--wd-primary); color: var(--wd-primary); transform: translateY(-1px); }
.chip-formato:has(input:checked) {
  background: var(--wd-gradient); color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(109,40,217,.3);
}
.chip-formato .icone { font-size: 15px; }

/* Chip radio para etapa de funil (única escolha) */
.chip-funil {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px;
  border: 1px solid var(--wd-border); background: var(--wd-surface);
  cursor: pointer; user-select: none; font-weight: 700; font-size: .9rem;
  transition: all var(--wd-transition);
  flex: 1; justify-content: center;
}
.chip-funil input { display: none; }
.chip-funil:hover { border-color: var(--wd-primary); }
.chip-funil:has(input:checked) {
  background: var(--wd-primary-soft); border-color: var(--wd-primary); color: var(--wd-primary);
}
.chip-funil .ic { font-size: 1.2rem; }

/* Cards de canais com ícone colorido */
.canal-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--wd-border); border-radius: 12px;
  background: var(--wd-surface);
  cursor: pointer; user-select: none;
  transition: all var(--wd-transition);
}
.canal-card input { display: none; }
.canal-card:hover { border-color: var(--wd-primary); transform: translateY(-1px); }
.canal-card:has(input:checked) {
  background: var(--wd-primary-soft); border-color: var(--wd-primary);
}
.canal-card .ic {
  width: 32px; height: 32px; border-radius: 8px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
  flex-shrink: 0;
}
.canal-card .nome { font-weight: 700; font-size: .9rem; }
.canal-card .check-mark {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--wd-border);
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto; flex-shrink: 0; transition: all var(--wd-transition);
}
.canal-card:has(input:checked) .check-mark {
  background: var(--wd-primary); border-color: var(--wd-primary); color: #fff;
}
.canal-card:has(input:checked) .check-mark::after {
  content: "✓"; font-size: 10px; font-weight: 800;
}

/* Pill de tema */
.tema-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 6px; border-radius: 999px; cursor: pointer; user-select: none;
  border: 1px solid var(--wd-border); background: var(--wd-surface);
  font-size: .82rem; font-weight: 600; transition: all var(--wd-transition);
}
.tema-chip input { display: none; }
.tema-chip .dot { width: 22px; height: 22px; border-radius: 50%; display: inline-block; opacity: .5; transition: opacity var(--wd-transition); }
.tema-chip:hover { border-color: var(--wd-primary); }
.tema-chip:has(input:checked) { background: var(--wd-primary-soft); border-color: var(--wd-primary); color: var(--wd-primary); }
.tema-chip:has(input:checked) .dot { opacity: 1; }

/* Editor Quill — alinha com o visual do form */
#modalConteudo .ql-toolbar.ql-snow {
  border: 1px solid var(--wd-border);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: var(--wd-surface-2);
}
#modalConteudo .ql-container.ql-snow {
  border: 1px solid var(--wd-border);
  border-radius: 0 0 10px 10px;
  background: var(--wd-surface);
  min-height: 160px;
  font-size: 15px;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}
#modalConteudo .ql-editor { min-height: 160px; }
[data-bs-theme="dark"] #modalConteudo .ql-toolbar.ql-snow,
[data-bs-theme="dark"] #modalConteudo .ql-container.ql-snow {
  background: var(--wd-surface);
  border-color: var(--wd-border);
}
[data-bs-theme="dark"] #modalConteudo .ql-snow .ql-stroke { stroke: var(--wd-text); }
[data-bs-theme="dark"] #modalConteudo .ql-snow .ql-fill   { fill:   var(--wd-text); }
[data-bs-theme="dark"] #modalConteudo .ql-snow .ql-picker-label { color: var(--wd-text); }

/* Área de drag-drop para anexos */
.drop-area {
  position: relative;
  border: 2px dashed var(--wd-border);
  border-radius: 14px;
  padding: 26px 20px;
  text-align: center;
  background: var(--wd-surface-2);
  cursor: pointer;
  transition: all var(--wd-transition);
}
.drop-area:hover, .drop-area.sobre {
  border-color: var(--wd-primary); background: var(--wd-primary-soft);
}
.drop-area .ic { font-size: 32px; color: var(--wd-primary); margin-bottom: 6px; display: block; }
.drop-area .tit { font-weight: 700; }
.drop-area .sub { font-size: .78rem; color: var(--wd-text-muted); margin-top: 2px; }
.drop-area input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Grid de anexos (previews) */
.anexos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; margin-top: 14px;
}
.anexo-card {
  position: relative; border: 1px solid var(--wd-border); border-radius: 12px;
  overflow: hidden; background: var(--wd-surface);
  transition: all var(--wd-transition);
}
.anexo-card:hover { border-color: var(--wd-primary); box-shadow: var(--wd-shadow); }
.anexo-card .preview {
  width: 100%; height: 100px; display: block;
  background: var(--wd-surface-2) center/cover no-repeat;
  color: var(--wd-text-muted); font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
.anexo-card .preview img { width: 100%; height: 100%; object-fit: cover; }
.anexo-card .info {
  padding: 8px 10px; font-size: .74rem; color: var(--wd-text-muted); line-height: 1.2;
}
.anexo-card .nome {
  display: block; font-weight: 600; color: var(--wd-text);
  font-size: .78rem; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.anexo-card .remover {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  border-radius: 50%; background: rgba(0,0,0,.65); color: #fff;
  border: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer; opacity: 0; transition: opacity var(--wd-transition);
}
.anexo-card:hover .remover { opacity: 1; }
.anexo-card .remover:hover { background: var(--wd-danger); }

/* Chips de responsáveis selecionados */
.resp-selecionados { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 36px; }
.resp-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  background: var(--wd-primary-soft); border: 1px solid var(--wd-primary);
  color: var(--wd-primary); font-weight: 600; font-size: .8rem;
}
.resp-chip .av {
  width: 22px; height: 22px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
}
.resp-chip .x { background: transparent; border: 0; color: inherit; cursor: pointer; padding: 0 2px; line-height: 1; }

/* Dropdown de autocomplete reutilizável */
.auto-wrap { position: relative; }
.auto-sugestoes {
  position: absolute; z-index: 1080; top: 100%; left: 0; right: 0;
  background: var(--wd-surface); border: 1px solid var(--wd-border);
  border-radius: 10px; box-shadow: var(--wd-shadow-hover);
  margin-top: 4px; max-height: 280px; overflow-y: auto; padding: 4px;
  display: none;
}
.auto-sugestoes.aberto { display: block; }
.auto-sugestoes .item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 8px; cursor: pointer; width: 100%; text-align: left; background: transparent; border: 0; color: var(--wd-text);
}
.auto-sugestoes .item:hover, .auto-sugestoes .item.ativo { background: var(--wd-primary-soft); }
.auto-sugestoes .item .av {
  width: 28px; height: 28px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.auto-sugestoes .vazio { padding: 12px; color: var(--wd-text-muted); font-size: .85rem; text-align: center; }

/* Card de conteúdo relacionado */
.relacionado-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--wd-border); border-radius: 12px;
  background: var(--wd-surface); margin-bottom: 8px;
}
.relacionado-card .corinha { width: 4px; align-self: stretch; border-radius: 999px; }
.relacionado-card .meta { font-size: .78rem; color: var(--wd-text-muted); display: flex; flex-wrap: wrap; gap: 10px; margin-top: 3px; }
.relacionado-card .remover {
  margin-left: auto; background: transparent; border: 0; color: var(--wd-text-muted); cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.relacionado-card .remover:hover { background: rgba(239,68,68,.14); color: var(--wd-danger); }

/* =====================================================================
   Modal de conteúdo — altura útil
   O Bootstrap aplica `max-height` (e não `height`) no .modal-content de um
   modal rolável, então ele encolhe até o tamanho da aba mais curta e sobra
   espaço vazio dentro do dialog. Forçamos o content a ocupar o dialog
   inteiro: o corpo passa a usar toda a altura disponível em qualquer aba.
===================================================================== */
#modalConteudo .modal-dialog { --bs-modal-margin: 1rem; }
/* Ocupa o dialog inteiro em tela baixa; em monitor grande para em 720px
   para a aba curta não virar um vazio de 600px. O max-height:100% do
   Bootstrap continua valendo, então abas longas rolam normalmente. */
#modalConteudo.modal .modal-dialog-scrollable > .modal-content { min-height: min(100%, 720px); }
#modalConteudo .modal-body { min-height: 0; }

/* Em telas baixas o cabeçalho e o rodapé cedem espaço para o formulário */
@media (max-height: 820px) {
  #modalConteudo .modal-header { padding: 12px 22px; }
  #modalConteudo .modal-title { font-size: 1.05rem; }
  #modalConteudo .modal-title .ic { width: 30px; height: 30px; font-size: 15px; }
  #modalConteudo .modal-footer { padding: 10px 22px; }
  #modalConteudo .modal-body { padding: 16px 22px 8px; }
  #modalConteudo .nav-tabs { margin-bottom: 14px; }
  #modalConteudo .nav-tabs .nav-link { padding: 8px 13px; font-size: .86rem; }
  #modalConteudo .sec-bloco { margin-bottom: 16px; }
}

/* A lista de sugestões não pode tomar o modal inteiro */
#modalConteudo .auto-sugestoes { max-height: min(280px, 38vh); }

/* Etiqueta de produto no post-it da lousa de ideias */
.postit-tag.postit-produto {
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(15,17,23,.12);
  font-weight: 700;
}

/* Lousa de ideias — o modal rolável precisa ocupar a altura do dialog
   (o Bootstrap usa max-height, não height, e o conteúdo encolhe). */
#modalIdeia .modal-dialog { --bs-modal-margin: 1rem; }
#modalIdeia.modal .modal-dialog-scrollable > .modal-content { min-height: min(100%, 640px); }

/* Post-it da lousa — canais e temas resumidos no card */
.postit-canais { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.postit-canal {
  width: 22px; height: 22px; border-radius: 7px; color: #fff; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.postit-canal.mais { background: rgba(15,17,23,.35); font-size: 9px; font-weight: 700; }
.postit-temas { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.postit-tema {
  font-size: .66rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.7); color: var(--c, #6D28D9);
  border: 1px solid color-mix(in srgb, var(--c, #6D28D9) 35%, transparent);
}

/* =====================================================================
   Editor de texto rico (Quill) — ver assets/js/wd-editor.js
===================================================================== */

/* O textarea some da tela, mas continua no formulário levando o HTML. */
textarea.wd-rico-fonte {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; z-index: -1;
}

.wd-rico { margin-bottom: 2px; }
.wd-rico .ql-toolbar.ql-snow {
  border: 1px solid #E5E7EB; border-bottom: 0;
  border-radius: 10px 10px 0 0; background: #F9FAFB;
  padding: 6px 8px;
}
.wd-rico .ql-container.ql-snow {
  border: 1px solid #E5E7EB; border-radius: 0 0 10px 10px;
  font-family: inherit; font-size: .92rem;
}
/* A caixa de escrita: alta de verdade, e cresce junto com o texto. */
.wd-rico .ql-editor { min-height: 260px; max-height: 60vh; overflow-y: auto; padding: 14px 16px; }
.wd-rico.compacto .ql-editor { min-height: 140px; }
.wd-rico .ql-editor.ql-blank::before { font-style: normal; color: #9CA3AF; left: 16px; right: 16px; }
.wd-rico:focus-within .ql-toolbar.ql-snow,
.wd-rico:focus-within .ql-container.ql-snow { border-color: var(--roxo, #6D28D9); }

/* Nomes das fontes e dos tamanhos no seletor (o Quill mostra o valor cru). */
.wd-rico .ql-snow .ql-picker.ql-font { width: 118px; }
.wd-rico .ql-snow .ql-picker.ql-size { width: 74px; }
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before { content: attr(data-value); }
.ql-snow .ql-picker.ql-font .ql-picker-label:not([data-value])::before,
.ql-snow .ql-picker.ql-font .ql-picker-item:not([data-value])::before { content: 'Padrão'; }
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before { content: attr(data-value); }
.ql-snow .ql-picker.ql-size .ql-picker-label:not([data-value])::before,
.ql-snow .ql-picker.ql-size .ql-picker-item:not([data-value])::before { content: 'Padrão'; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Inter"]      { font-family: Inter, sans-serif; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Arial"]      { font-family: Arial, sans-serif; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Georgia"]    { font-family: Georgia, serif; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Verdana"]    { font-family: Verdana, sans-serif; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Tahoma"]     { font-family: Tahoma, sans-serif; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]  { font-family: monospace; }

/* Texto rico já salvo, exibido fora do editor. */
.texto-rico > :first-child { margin-top: 0; }
.texto-rico > :last-child { margin-bottom: 0; }
.texto-rico p { margin-bottom: .5rem; }
.texto-rico ul, .texto-rico ol { padding-left: 1.3rem; margin-bottom: .5rem; }
.texto-rico blockquote {
  border-left: 3px solid #E5E7EB; padding-left: 12px; margin: 0 0 .5rem;
  color: #6B7280;
}
.texto-rico pre {
  background: #F3F4F6; padding: 10px 12px; border-radius: 8px;
  font-size: .85rem; white-space: pre-wrap;
}

/* Imagens dentro do editor e do texto já salvo */
.wd-rico .ql-editor img,
.texto-rico img {
  max-width: 100%; height: auto; border-radius: 8px;
  margin: 6px 0; display: block;
}
/* Enquanto arrasta um arquivo por cima da caixa */
.wd-rico.recebendo .ql-container.ql-snow {
  border-color: var(--roxo, #6D28D9);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--roxo, #6D28D9) 25%, transparent);
  background: color-mix(in srgb, var(--roxo, #6D28D9) 4%, #fff);
}
