/* ============================================================
   JustoJá — Redesign 2026 (Canva reference)
   Escopo: tudo dentro de .jjx
   Fonte única: Poppins 300 / 400 / 500 — NUNCA acima de 500.
   Zero hex inline nos componentes: só tokens daqui.
   ============================================================ */

.jjx {
  /* ---- cores base ---- */
  --jj-orange:        #FF6709;
  --jj-orange-press:  #D95400;
  --jj-white:         #FFFFFF;
  --jj-off-white:     #F6F5F2;
  --jj-black:         #242424;

  /* ---- neutros ---- */
  --jj-text-2:        #4A4740;
  --jj-text-3:        #6E6A64;
  --jj-text-4:        #706C66; /* era #8E8A83 (3,4:1); agora ≥4,7:1 nos fundos do sistema */
  --jj-text-5:        #736F68; /* era #A8A39C (2,5:1) */
  --jj-text-6:        #75716A; /* era #B5B0A8 (2,2:1) */
  --jj-disabled:      #C4BFB7;
  --jj-placeholder:   #77736C; /* era #BDB9B2 (1,9:1) */
  --jj-border:        #EFEBE5;
  --jj-border-2:      #EAE6E0;
  --jj-border-3:      #F1EDE7;
  --jj-divider:       #F6F3EE;
  --jj-panel-2:       #F0EEE9;

  /* ---- laranjas suaves ---- */
  --jj-orange-50:     #FEF8F3;
  --jj-orange-100:    #FDE9DC;
  --jj-orange-200:    #F8CBAA;
  --jj-orange-300:    #F3E2D3;
  --jj-orange-400:    #F0C9A6;
  --jj-orange-ink:    #B84D14; /* laranja para TEXTO: ≥4,7:1 (o #FF6709 dá 2,9:1) */

  /* ---- status: fundo sólido + texto escuro da mesma família ---- */
  --jj-st-lilac:      #C89BE0;  --jj-st-lilac-ink:  #3B2A47;  --jj-st-lilac-soft:  #F2E8F9;  --jj-st-lilac-dot:  #A46BC9;
  --jj-st-blue:       #8CC8F5;  --jj-st-blue-ink:   #1E3A4C;  --jj-st-blue-soft:   #E4F1FC;  --jj-st-blue-dot:   #4FA3DE;
  --jj-st-green:      #A9D98D;  --jj-st-green-ink:  #26401E;  --jj-st-green-soft:  #EAF6E2;  --jj-st-green-dot:  #7FBF5E;
  --jj-st-peach:      #F2A175;  --jj-st-peach-ink:  #5A3319;  --jj-st-peach-soft:  #FCEEDF;  --jj-st-peach-dot:  #E08A4A;
  --jj-st-amber:      #F0904F;  --jj-st-amber-ink:  #5A2A0A;  --jj-st-amber-soft:  #FDE9DC;  --jj-st-amber-dot:  #FF6709;
  --jj-st-gray:       #9E9E9E;  --jj-st-gray-ink:   #3A3833;  --jj-st-gray-soft:   #F0EEE9;  --jj-st-gray-dot:   #9A958D;
  --jj-st-warn:       #FAB219;  --jj-st-warn-ink:   #6B4A00;  --jj-st-warn-soft:   #FEF3D6;  --jj-st-warn-dot:   #D99A0B;
  --jj-st-mint:       #B9E08B;  --jj-st-mint-ink:   #1F3D19;  --jj-st-mint-soft:   #E7F6E3;  --jj-st-mint-dot:   #2FB457;

  /* ---- apelidos curtos (mesmos valores, nomes usados nos componentes) ---- */
  --jj-ink:           #242424;
  --jj-bg:            #F6F5F2;
  --jj-line:          #EFEBE5;
  --jj-line-2:        #EAE6E0;
  --jj-orange-line:   #F8CBAA;
  --jj-pos-soft:      #E7F6E3;
  --jj-pos-ink:       #1F3D19;
  --jj-neg-soft:      #FCE7E3;
  --jj-neg-ink:       #7A2B20;

  /* ---- auxiliares ---- */
  --jj-pos:           #B9E08B;
  --jj-neg:           #F08C7F;
  --jj-wa:            #2FB457;
  --jj-danger:        #E2604F;
  --jj-danger-line:   #F7DEDA;

  /* ---- formas ---- */
  --jj-r-card:        26px;
  --jj-r-card-sm:     22px;
  --jj-r-panel:       20px;
  --jj-r-box:         18px;
  --jj-r-field:       12px;
  --jj-r-pill:        999px;
  --jj-r-icon:        16px;
  --jj-r-drop:        26px;

  --jj-shadow-soft:   0 1px 2px rgba(36, 36, 36, .05);
  --jj-shadow-card:   0 2px 12px rgba(0, 0, 0, .04);
  --jj-shadow-pop:    0 18px 40px rgba(36, 36, 36, .14);
  --jj-shadow-drop:   0 8px 22px rgba(255, 103, 9, .14);

  --jj-nav-w:         112px;

  background: var(--jj-off-white);
  color: var(--jj-black);
  -webkit-font-smoothing: antialiased;
}

/* Poppins vence a regra global de Plus Jakarta Sans — só dentro do .jjx */
.jjx,
.jjx *,
.jjx *::before,
.jjx *::after {
  font-family: 'Poppins', Helvetica, Arial, sans-serif !important;
  box-sizing: border-box;
}

/* Nada de peso acima de 500 */
.jjx b, .jjx strong { font-weight: 500; }

.jjx a { color: var(--jj-orange); text-decoration: none; }
.jjx a:hover { color: var(--jj-orange-press); }
.jjx input, .jjx button, .jjx select, .jjx textarea { font-family: inherit; }
.jjx input::placeholder, .jjx textarea::placeholder { color: var(--jj-placeholder); }
.jjx button { cursor: pointer; }

/* ============ movimento ============ */
@keyframes jjFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes jjPop  { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes jjOverlay { from { opacity: 0; } to { opacity: 1; } }

.jj-enter    { animation: jjFade .45s ease both; }
.jj-pop      { animation: jjPop .2s ease both; }

/* ============ shell + sidebar ============ */
.jj-shell {
  display: flex;
  min-height: 100vh;
}

.jj-nav {
  width: var(--jj-nav-w);
  flex: 0 0 var(--jj-nav-w);
  background: var(--jj-orange);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 0 22px;
  gap: 30px;
  position: sticky;
  top: 0;
  height: 100vh;
  border: 0;
}

.jj-nav-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  display: block;
  flex: none;
}

.jj-nav-items {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 0;
  scrollbar-width: none;
}
.jj-nav-items::-webkit-scrollbar { display: none; }

.jj-nav-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.jj-nav-sep {
  width: 42px;
  height: 1px;
  background: rgba(255, 255, 255, .3);
  flex: none;
}

.jj-nav-btn {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: var(--jj-r-icon);
  background: transparent;
  display: grid;
  place-items: center;
  flex: none;
  position: relative;
  transition: background .28s ease, transform .28s ease;
}
.jj-nav-btn svg { transition: color .2s ease; }
.jj-nav-btn        { color: var(--jj-white); }
.jj-nav-btn:hover  { background: rgba(255, 255, 255, .18); }
.jj-nav-btn.is-active {
  background: var(--jj-white);
  color: var(--jj-orange);
  transform: scale(1.04);
}
.jj-nav-btn.is-small { width: 44px; height: 44px; border-radius: 13px; }

.jj-nav-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--jj-r-pill);
  background: var(--jj-white);
  color: var(--jj-orange);
  font-size: 9.5px;
  font-weight: 500;
  display: grid;
  place-items: center;
}

/* tooltip do menu */
.jj-tip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: var(--jj-black);
  color: var(--jj-white);
  font-size: 11.5px;
  padding: 6px 11px;
  border-radius: 9px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 70;
}
.jj-nav-btn:hover .jj-tip { opacity: 1; transform: translateY(-50%) translateX(0); }

.jj-main {
  flex: 1;
  min-width: 0;
  padding: 34px 40px 56px;
}

/* ============ topbar ============ */
.jj-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.jj-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--jj-white);
  border-radius: var(--jj-r-field);
  padding: 0 18px;
  height: 48px;
  width: 340px;
  max-width: 100%;
  box-shadow: var(--jj-shadow-soft);
}
.jj-search input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14.5px;
  color: var(--jj-black);
  width: 100%;
}
.jj-search svg { color: var(--jj-text-4); flex: none; }

.jj-topbar-actions { display: flex; align-items: center; gap: 12px; }

.jj-round-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--jj-r-field);
  background: var(--jj-orange);
  color: var(--jj-white);
  display: grid;
  place-items: center;
  position: relative;
  transition: background .2s ease, transform .2s ease;
}
.jj-round-btn:hover { background: var(--jj-orange-press); transform: translateY(-1px); }

.jj-round-btn .jj-dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jj-white);
}

.jj-avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--jj-orange);
  border: 2px solid var(--jj-white);
  box-shadow: 0 0 0 1px var(--jj-panel-2);
  display: grid;
  place-items: center;
  color: var(--jj-white);
  font-size: 13px;
  overflow: hidden;
  padding: 0;
}
.jj-avatar-btn img { width: 30px; height: 30px; object-fit: contain; }

/* ============ cabeçalho de página ============ */
.jj-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.jj-head.is-top { align-items: flex-start; margin-top: 0; }
.jj-h1 { font-size: 30px; font-weight: 400; letter-spacing: -.4px; line-height: 1.2; }
.jj-sub { font-size: 12.5px; color: var(--jj-text-4); margin-top: 4px; }

.jj-head-actions { display: flex; align-items: center; gap: 12px; position: relative; }

/* botões de período / calendário / export */
.jj-pill-btn {
  height: 38px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--jj-orange);
  color: var(--jj-white);
  font-size: 13px;
  transition: background .2s ease;
}
.jj-pill-btn:hover { background: var(--jj-orange-press); }

.jj-icon-btn {
  width: 44px;
  height: 38px;
  border: 1px solid var(--jj-border-2);
  border-radius: 10px;
  background: var(--jj-white);
  color: var(--jj-orange);
  display: grid;
  place-items: center;
  transition: border-color .2s ease;
}
.jj-icon-btn:hover { border-color: var(--jj-orange-200); }

.jj-icon-btn.is-solid {
  border: 0;
  background: var(--jj-orange);
  color: var(--jj-white);
}
.jj-icon-btn.is-solid:hover { background: var(--jj-orange-press); }

/* variação maior usada na Central de Leads */
.jj-ghost-btn {
  height: 44px;
  padding: 0 26px;
  border: 1px solid var(--jj-border-2);
  border-radius: var(--jj-r-field);
  background: var(--jj-white);
  font-size: 13.5px;
  color: var(--jj-text-2);
  transition: border-color .2s ease;
}
.jj-ghost-btn:hover { border-color: var(--jj-orange-200); }
.jj-icon-btn.is-lg { width: 50px; height: 44px; border-radius: var(--jj-r-field); }

/* ============ popovers ============ */
.jj-pop-panel {
  position: absolute;
  top: 46px;
  right: 0;
  z-index: 30;
  background: var(--jj-white);
  border-radius: var(--jj-r-box);
  padding: 14px;
  box-shadow: var(--jj-shadow-pop);
  width: 300px;
}
.jj-pop-panel.is-below-lg { top: 52px; }
.jj-pop-panel.is-cal { width: 286px; padding: 16px; }

.jj-pop-label {
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--jj-text-4);
  margin-bottom: 10px;
}
.jj-pop-label.is-mid { margin: 16px 0 8px; }

.jj-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.jj-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--jj-r-pill);
  border: 1px solid var(--jj-border);
  background: var(--jj-white);
  color: var(--jj-text-3);
  font-size: 12px;
  transition: .18s ease;
}
.jj-chip:hover { border-color: var(--jj-orange-200); }
.jj-chip.is-on { background: var(--jj-orange); border-color: var(--jj-orange); color: var(--jj-white); }

.jj-chip-row { display: flex; flex-wrap: wrap; gap: 7px; }

.jj-period-opt {
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--jj-border);
  background: var(--jj-white);
  color: var(--jj-text-3);
  font-size: 12.5px;
  transition: .18s ease;
}
.jj-period-opt:hover { border-color: var(--jj-orange-200); }
.jj-period-opt.is-on { background: var(--jj-orange); border-color: var(--jj-orange); color: var(--jj-white); }

/* calendário */
.jj-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.jj-cal-nav {
  width: 26px;
  height: 26px;
  border: 0;
  background: var(--jj-off-white);
  border-radius: 8px;
  color: var(--jj-black);
  font-size: 15px;
  line-height: 1;
}
.jj-cal-nav:hover { background: var(--jj-orange-100); }
.jj-cal-month { font-size: 13.5px; text-transform: capitalize; }
.jj-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 10.5px;
  color: var(--jj-text-5);
  text-align: center;
  margin-bottom: 4px;
}
.jj-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.jj-cal-day {
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--jj-black);
  font-size: 12.5px;
}
.jj-cal-day:hover { background: var(--jj-orange-50); }
.jj-cal-day.is-void { color: var(--jj-disabled); cursor: default; }
.jj-cal-day.is-void:hover { background: transparent; }
.jj-cal-day.is-range { background: var(--jj-orange-100); }
.jj-cal-day.is-edge { background: var(--jj-orange); color: var(--jj-white); }
.jj-cal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
  color: var(--jj-text-4);
  gap: 10px;
}
.jj-cal-apply {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: var(--jj-orange);
  color: var(--jj-white);
  font-size: 12.5px;
  flex: none;
}
.jj-cal-apply:hover { background: var(--jj-orange-press); }

/* ============ cards genéricos ============ */
.jj-card {
  background: var(--jj-white);
  border-radius: var(--jj-r-card);
  box-shadow: var(--jj-shadow-card);
  transition: box-shadow .25s ease, transform .25s ease;
}
.jj-card.is-hoverable:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .07); transform: translateY(-2px); }

.jj-card-label {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--jj-text-3);
  text-transform: uppercase;
}
.jj-card-note   { font-size: 13px; color: var(--jj-text-5); margin-top: 6px; }
.jj-card-foot   { font-size: 12px; color: var(--jj-text-4); }
.jj-big-value   { font-size: 31px; font-weight: 300; letter-spacing: -.5px; }
.jj-big-rate    { font-size: 40px; font-weight: 300; letter-spacing: -1px; margin-top: 6px; }
.jj-num         { font-size: 40px; font-weight: 300; line-height: 1.15; }
.jj-perf-pill   { width: 62px; height: 26px; border-radius: 13px; flex: none; }
.jj-perf-pill.is-pos   { background: var(--jj-pos); }
.jj-perf-pill.is-neg   { background: var(--jj-neg); }
.jj-perf-pill.is-warm  { background: var(--jj-st-peach); }

/* ============ dashboard grid ============ */
.jj-dash-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1.06fr;
  grid-template-rows: 1fr 1fr;
  height: 430px;
  gap: 22px;
  margin-top: 24px;
}
.jj-dash-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1.06fr;
  grid-template-rows: 1fr;
  height: 230px;
  gap: 22px;
  margin-top: 22px;
}
.jj-metric {
  background: var(--jj-white);
  border-radius: var(--jj-r-card);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  box-shadow: var(--jj-shadow-card);
  transition: box-shadow .25s ease, transform .25s ease;
}
.jj-metric:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .07); transform: translateY(-2px); }
.jj-metric.is-right { text-align: right; }
.jj-metric-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.jj-metric-row.is-center { align-items: center; }

/* últimas negociações */
.jj-neg {
  background: var(--jj-white);
  border-radius: var(--jj-r-card);
  padding: 26px 24px 20px;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: var(--jj-shadow-card);
}
.jj-neg-title { text-align: center; font-size: 23px; font-weight: 400; }
.jj-neg-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  flex: 1;
  min-height: 0;
  /* rolagem apenas vertical — nomes/telefones longos truncam em vez de empurrar a
     lista para o lado (ver .jj-neg-name/.jj-neg-phone abaixo) */
  overflow-y: auto;
  overflow-x: hidden;
}
.jj-neg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--jj-off-white);
  border-radius: var(--jj-r-box);
  padding: 14px 16px;
}
.jj-neg-item > div:first-child { min-width: 0; flex: 1; }
.jj-neg-name  { font-size: 17px; color: var(--jj-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jj-neg-phone { font-size: 12.5px; color: var(--jj-text-5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jj-wa-btn {
  width: 78px;
  height: 46px;
  border-radius: 14px;
  background: var(--jj-wa);
  color: var(--jj-white);
  display: grid;
  place-items: center;
  flex: none;
  transition: filter .2s ease;
}
.jj-wa-btn:hover { filter: brightness(1.06); }
.jj-neg-more {
  width: 100%;
  margin-top: 14px;
  flex: 0 0 auto;
  height: 46px;
  border: 0;
  background: transparent;
  color: var(--jj-text-3);
  font-size: 15px;
}
.jj-neg-more:hover { color: var(--jj-orange); }

/* ============ Aguardando PGT — lembrete de prazo p/ time de operação ============ */
.jj-payment-chip {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--jj-text-4);
  background: var(--jj-panel-2);
  border-radius: 999px;
  padding: 3px 8px 3px 6px;
}
.jj-payment-chip.is-overdue {
  color: var(--jj-neg-ink);
  background: var(--jj-neg-soft);
}
.jj-payment-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--jj-pos-ink);
  opacity: .55;
}
.jj-payment-dot.is-overdue {
  background: var(--jj-danger);
  opacity: 1;
  animation: jj-payment-pulse 1.4s ease-in-out infinite;
}
.jj-payment-badge {
  font-weight: 500;
  color: var(--jj-neg-ink);
}
.jj-payment-ok {
  color: var(--jj-text-5);
}
@keyframes jj-payment-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(226, 96, 79, .45); }
  50% { opacity: .6; box-shadow: 0 0 0 3px rgba(226, 96, 79, 0); }
}

/* ============ Inbox / Feedbacks — leads com pagamento vencido ============ */
.jj-inbox-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border: 0;
  border-bottom: 1px solid var(--jj-border-3);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease;
}
.jj-inbox-item:last-child { border-bottom: 0; }
.jj-inbox-item:hover { background: var(--jj-orange-50); }
.jj-inbox-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--jj-white);
}
.jj-inbox-info { flex: 1; min-width: 0; }
.jj-inbox-name { display: block; font-size: 14.5px; color: var(--jj-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jj-inbox-phone { display: block; font-size: 12.5px; color: var(--jj-text-5); }
.jj-inbox-value { font-size: 14px; color: var(--jj-text-2); flex: none; }
.jj-inbox-days {
  flex: none;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--jj-neg-ink, #7A2B20);
  background: var(--jj-neg-soft, #FCE7E3);
  border-radius: 999px;
  padding: 5px 11px;
}
.jj-neg-empty {
  flex: 1;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--jj-text-5);
  text-align: center;
}

/* faixa de destaques */
.jj-highlight {
  background: var(--jj-white);
  border-radius: var(--jj-r-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  box-shadow: var(--jj-shadow-card);
  transition: box-shadow .25s ease, transform .25s ease;
}
.jj-highlight:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .07); transform: translateY(-2px); }
.jj-highlight.is-tight { padding: 26px 22px; }
.jj-highlight-desc { font-size: 13.5px; color: var(--jj-text-3); }
.jj-highlight-val  { font-size: 14px; color: var(--jj-text-5); }

.jj-status-pill {
  align-self: flex-start;
  display: inline-flex;
  height: 30px;
  align-items: center;
  padding: 0 16px;
  border-radius: 15px;
  font-size: 13px;
  letter-spacing: .06em;
}

.jj-side-stack { display: grid; grid-template-columns: 1.02fr .98fr; gap: 16px; min-height: 0; }
.jj-side-col   { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.jj-mini {
  background: var(--jj-panel-2);
  border-radius: var(--jj-r-card-sm);
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.jj-mini-label { font-size: 12.5px; letter-spacing: .08em; color: var(--jj-text-3); }
.jj-mini-value { font-size: 30px; font-weight: 300; }
.jj-mini-value.is-sm { font-size: 27px; }
.jj-mini-note  { font-size: 12.5px; color: var(--jj-text-5); }
.jj-mini-note.is-xs { font-size: 12px; }

/* ── Estorno de Clientes ── */
.jj-estorno-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}
@media (max-width: 640px) {
  .jj-estorno-row { grid-template-columns: 1fr; }
}

/* ============ central de leads ============ */
.jj-status-cards {
  display: grid;
  /* Uma linha só para todos os cards (antes eram 5 fixos; com 7, quebrava em duas
     e empurrava a esteira para baixo da dobra). */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.jj-status-card {
  /* Compacto e calmo: a cor do status fica numa faixa fina no topo, como num CRM.
     Antes a barra colorida cheia tinha 54px e empurrava a esteira para baixo da dobra. */
  background: var(--jj-white);
  border-radius: 14px;
  border: 0;
  border-top: 4px solid var(--jj-text-6);
  box-shadow: var(--jj-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px 12px;
  text-align: left;
  min-width: 0;
  transition: box-shadow .2s ease, transform .2s ease;
}
.jj-status-card:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .06); }
.jj-status-card.is-on { box-shadow: 0 0 0 2px var(--jj-orange), 0 8px 20px rgba(0, 0, 0, .06); }
.jj-status-bar { font-size: 12px; color: var(--jj-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jj-status-body { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.jj-status-body .jj-num { font-size: 26px; font-weight: 400; line-height: 1.15; color: var(--jj-ink); }
.jj-status-val  { font-size: 12px; color: var(--jj-text-4); white-space: nowrap; }

/* barra de filtros */
.jj-filters {
  display: grid;
  grid-template-columns: 1.15fr .9fr 1.15fr .9fr .8fr;
  gap: 14px;
  margin-top: 24px;
}
.jj-field {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--jj-white);
  border: 1px solid var(--jj-border-2);
  border-radius: var(--jj-r-field);
  padding: 0 16px;
  height: 48px;
}
.jj-field svg { color: var(--jj-text-4); flex: none; }
.jj-field input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  width: 100%;
  color: var(--jj-black);
}
.jj-select {
  height: 48px;
  border: 1px solid var(--jj-border);
  border-radius: var(--jj-r-field);
  background: var(--jj-white);
  color: var(--jj-text-3);
  font-size: 14px;
  padding: 0 34px 0 14px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236E6A64' stroke-width='1.6'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.jj-select:focus { outline: 0; border-color: var(--jj-orange-200); }
.jj-more-btn {
  height: 48px;
  border: 1px solid var(--jj-border);
  border-radius: var(--jj-r-field);
  background: var(--jj-white);
  color: var(--jj-text-3);
  font-size: 14px;
}
.jj-more-btn:hover { border-color: var(--jj-orange-200); color: var(--jj-orange); }
.jj-more-btn.is-on { border-color: var(--jj-orange); color: var(--jj-orange); }

.jj-more-panel {
  background: var(--jj-white);
  border: 1px solid var(--jj-border);
  border-radius: var(--jj-r-box);
  padding: 20px 22px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.jj-more-label {
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--jj-text-4);
  margin-bottom: 8px;
}
.jj-range { display: flex; align-items: center; gap: 8px; }
.jj-range input {
  height: 38px;
  width: 100%;
  border: 1px solid var(--jj-border);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  outline: 0;
  background: var(--jj-white);
  color: var(--jj-black);
}
.jj-range input:focus { border-color: var(--jj-orange-200); }
.jj-range span { color: var(--jj-disabled); }
.jj-more-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}
.jj-sm-btn {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--jj-border);
  border-radius: 10px;
  background: var(--jj-white);
  color: var(--jj-text-3);
  font-size: 13px;
}
.jj-sm-btn:hover { border-color: var(--jj-orange-200); color: var(--jj-orange); }
.jj-sm-btn.is-primary {
  border: 0;
  background: var(--jj-orange);
  color: var(--jj-white);
  padding: 0 18px;
}
.jj-sm-btn.is-primary:hover { background: var(--jj-orange-press); }

.jj-result-count { font-size: 12.5px; color: var(--jj-text-4); margin: 14px 0 12px; }

/* ============ tabela ============ */
.jj-table {
  background: var(--jj-white);
  border: 1px solid var(--jj-border);
  border-radius: var(--jj-r-box);
  overflow: hidden;
}
.jj-table-inner { min-width: 0; }
.jj-tr {
  display: grid;
  grid-template-columns: 1.5fr 1.6fr 1.1fr 1fr 1fr .7fr .6fr;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--jj-divider);
  align-items: center;
  transition: background .18s ease;
}
.jj-tr:last-child { border-bottom: 0; }
.jj-tr:hover { background: var(--jj-orange-50); }
.jj-th {
  display: grid;
  grid-template-columns: 1.5fr 1.6fr 1.1fr 1fr 1fr .7fr .6fr;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--jj-border-3);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--jj-text-5);
}
.jj-th button {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: inherit;
  letter-spacing: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
}
.jj-th button:hover { color: var(--jj-orange); }
.jj-th .is-right { justify-content: flex-end; display: flex; }

.jj-lead-cell { border-left: 3px solid var(--jj-border-2); padding-left: 12px; }
.jj-lead-name { font-size: 14px; font-weight: 500; }
.jj-lead-phone {
  font-size: 12px;
  color: var(--jj-text-4);
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.jj-lead-holder { font-size: 9.5px; letter-spacing: .05em; color: var(--jj-text-6); margin-top: 4px; }
.jj-tag-row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.jj-tag {
  font-size: 10px;
  color: var(--jj-text-3);
  border: 1px solid var(--jj-border-2);
  border-radius: 6px;
  padding: 2px 7px;
}
.jj-origin {
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--jj-orange);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.jj-bank { font-size: 13px; color: var(--jj-text-2); margin-top: 4px; }
.jj-gross { font-size: 10px; color: var(--jj-text-6); }
.jj-net { font-size: 17px; color: var(--jj-orange); font-weight: 500; }
.jj-pct-row { display: flex; align-items: center; gap: 7px; margin-top: 3px; }
.jj-pct { font-size: 10px; color: var(--jj-wa); }
.jj-pct-val { font-size: 11.5px; color: var(--jj-text-4); }

/* status único por linha — badge que abre dropdown */
.jj-status-select { position: relative; }
.jj-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  border: 0;
  font-size: 12px;
  max-width: 100%;
  white-space: nowrap;
}
.jj-status-badge:hover { filter: brightness(.97); }
.jj-status-badge span.jj-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}
.jj-status-badge svg { flex: none; opacity: .55; }
.jj-status-menu {
  /* posição real vem inline (portal em document.body, calculada a partir do botão) —
     isto garante que o menu sempre fica por cima das linhas seguintes da tabela e
     nunca é cortado por overflow/stacking-context de containers ancestrais */
  position: fixed;
  z-index: 500;
  background: var(--jj-white);
  border-radius: 14px;
  box-shadow: var(--jj-shadow-pop);
  padding: 6px;
  width: 210px;
}
.jj-status-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 12.5px;
  color: var(--jj-text-2);
  text-align: left;
}
.jj-status-opt:hover { background: var(--jj-off-white); }
.jj-status-opt.is-on { background: var(--jj-orange-50); color: var(--jj-orange); }

.jj-resp { display: flex; align-items: center; gap: 9px; min-width: 0; }
.jj-resp-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--jj-white);
  font-size: 12px;
  display: grid;
  place-items: center;
  flex: none;
}
.jj-resp-name {
  font-size: 13px;
  color: var(--jj-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jj-date { font-size: 12.5px; color: var(--jj-text-3); }

.jj-row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.jj-act {
  width: 28px;
  height: 28px;
  border: 1px solid var(--jj-border);
  border-radius: 8px;
  background: var(--jj-white);
  color: var(--jj-text-3);
  display: grid;
  place-items: center;
  flex: none;
}
.jj-act:hover { border-color: var(--jj-orange-200); color: var(--jj-orange); }
.jj-act.is-danger { border-color: var(--jj-danger-line); color: var(--jj-danger); }
.jj-act.is-danger:hover { background: var(--jj-danger-line); }

/* estado vazio */
.jj-empty {
  padding: 66px 30px;
  text-align: center;
}
.jj-empty-ico {
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: var(--jj-orange-50);
  color: var(--jj-orange);
  display: grid;
  place-items: center;
}
.jj-empty-title { font-size: 20px; font-weight: 400; color: var(--jj-text-2); }
.jj-empty-text { font-size: 13px; color: var(--jj-text-5); margin-top: 6px; }

/* paginação */
.jj-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 22px;
  border-top: 1px solid var(--jj-border-3);
  font-size: 12.5px;
  color: var(--jj-text-4);
  flex-wrap: wrap;
}
.jj-pager-btns { display: flex; align-items: center; gap: 8px; }
.jj-pager-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 12px;
  border: 1px solid var(--jj-border);
  border-radius: 9px;
  background: var(--jj-white);
  color: var(--jj-text-3);
  font-size: 12.5px;
}
.jj-pager-btn:hover:not(:disabled) { border-color: var(--jj-orange-200); color: var(--jj-orange); }
.jj-pager-btn:disabled { opacity: .45; cursor: not-allowed; }
.jj-pager-btn.is-on { background: var(--jj-orange); border-color: var(--jj-orange); color: var(--jj-white); }

/* ============ nova análise ============ */
.jj-nova { max-width: 830px; margin: 76px auto 0; }
.jj-nova-head { text-align: center; }
.jj-nova-badge {
  display: inline-flex;
  height: 40px;
  align-items: center;
  padding: 0 34px;
  border-radius: 20px;
  background: var(--jj-orange-200);
  color: var(--jj-orange-ink);
  font-size: 15px;
}
.jj-nova-title { font-size: 50px; font-weight: 300; letter-spacing: -1px; margin-top: 10px; }
.jj-nova-resp { font-size: 17px; color: var(--jj-text-2); margin-top: 4px; }
.jj-nova-resp span { color: var(--jj-orange); }

.jj-nova-card {
  background: var(--jj-white);
  border-radius: var(--jj-r-card);
  padding: 26px 26px 30px;
  margin-top: 34px;
  box-shadow: var(--jj-shadow-card);
}
.jj-nova-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.jj-lbl { font-size: 13px; color: var(--jj-text-2); margin-bottom: 8px; display: block; }
.jj-input, .jj-nova-select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--jj-orange-300);
  border-radius: var(--jj-r-field);
  background: var(--jj-orange-50);
  padding: 0 16px;
  font-size: 14px;
  outline: 0;
  color: var(--jj-black);
}
.jj-input:focus, .jj-nova-select:focus { border-color: var(--jj-orange-200); }
.jj-nova-select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23FF6709' stroke-width='1.6'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.jj-drop {
  display: grid;
  place-items: center;
  margin-top: 22px;
  height: 340px;
  border: 2px dashed var(--jj-orange-400);
  border-radius: var(--jj-r-drop);
  background: var(--jj-white);
  transition: background .25s ease, border-color .25s ease;
  text-align: center;
  padding: 20px;
}
.jj-drop:hover, .jj-drop.is-over {
  background: var(--jj-orange-50);
  border-color: var(--jj-orange);
}
.jj-drop-ico {
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: var(--jj-white);
  box-shadow: var(--jj-shadow-drop);
  color: var(--jj-orange);
  display: grid;
  place-items: center;
}
.jj-drop-title { font-size: 25px; font-weight: 400; color: var(--jj-text-2); }
.jj-drop-hint { font-size: 10.5px; letter-spacing: .1em; color: var(--jj-text-6); margin-top: 6px; }
.jj-drop-note { font-size: 13px; color: var(--jj-orange); margin-top: 14px; }

.jj-file-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.jj-file {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--jj-off-white);
  border-radius: 14px;
  padding: 12px 14px;
}
.jj-file-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--jj-orange-100);
  color: var(--jj-orange);
  display: grid;
  place-items: center;
  flex: none;
}
.jj-file-info { flex: 1; min-width: 0; }
.jj-file-name {
  font-size: 13.5px;
  color: var(--jj-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jj-file-size { font-size: 11.5px; color: var(--jj-text-5); }
.jj-file-bar {
  height: 4px;
  border-radius: var(--jj-r-pill);
  background: var(--jj-border-2);
  margin-top: 6px;
  overflow: hidden;
}
.jj-file-bar i {
  display: block;
  height: 100%;
  background: var(--jj-orange);
  border-radius: var(--jj-r-pill);
  transition: width .3s ease;
}
.jj-file-x {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  background: var(--jj-white);
  color: var(--jj-text-4);
  display: grid;
  place-items: center;
  flex: none;
}
.jj-file-x:hover { color: var(--jj-danger); }

/* ============ modais ============ */
.jj-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 36, 36, .42);
  display: grid;
  place-items: center;
  z-index: 60;
  padding: 40px 20px;
  animation: jjOverlay .18s ease both;
}
.jj-modal {
  background: var(--jj-white);
  border-radius: 24px;
  width: 560px;
  /* `.jj-overlay` is a single-cell CSS grid (`place-items: center`) with no explicit
     tracks, so its track is auto-sized by its content — a `max-width: 100%` on this
     item has no definite containing block to resolve against and is silently ignored
     by the grid sizing algorithm, letting the modal overflow the viewport on small
     screens. Cap against the viewport directly instead (40px = overlay's L+R padding). */
  max-width: calc(100vw - 40px);
  max-height: 100%;
  overflow: auto;
  padding: 28px 30px 26px;
  animation: jjPop .2s ease both;
}
.jj-modal.is-sm { width: 420px; }
.jj-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.jj-modal-title { font-size: 22px; font-weight: 400; }
.jj-modal-sub { font-size: 12.5px; color: var(--jj-text-4); margin-top: 3px; }
.jj-modal-x {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: var(--jj-off-white);
  color: var(--jj-text-3);
  display: grid;
  place-items: center;
  flex: none;
}
.jj-modal-x:hover { background: var(--jj-orange-100); color: var(--jj-orange); }
.jj-modal-label {
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--jj-text-4);
  margin: 22px 0 10px;
}
.jj-modal-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.jj-modal-btn {
  flex: 1;
  min-width: 150px;
  height: 48px;
  border: 1px solid var(--jj-border-2);
  border-radius: var(--jj-r-field);
  background: var(--jj-white);
  color: var(--jj-text-2);
  font-size: 14px;
}
.jj-modal-btn:hover { border-color: var(--jj-orange-200); color: var(--jj-orange); }
.jj-modal-btn.is-primary {
  border: 0;
  background: var(--jj-orange);
  color: var(--jj-white);
}
.jj-modal-btn.is-primary:hover { background: var(--jj-orange-press); }
.jj-modal-btn.is-danger { border: 0; background: var(--jj-danger); color: var(--jj-white); }
.jj-modal-btn.is-danger:hover { filter: brightness(1.06); }

.jj-check {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--jj-border);
  background: var(--jj-white);
  font-size: 13px;
  color: var(--jj-text-2);
  text-align: left;
}
.jj-check.is-on { background: var(--jj-orange-50); border-color: var(--jj-orange-200); }
.jj-check-box {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--jj-border-2);
  color: var(--jj-white);
  display: grid;
  place-items: center;
  font-size: 10px;
  flex: none;
}
.jj-check.is-on .jj-check-box { background: var(--jj-orange); }

.jj-confirm-ico {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--jj-danger-line);
  color: var(--jj-danger);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.jj-confirm-text { font-size: 13.5px; color: var(--jj-text-3); margin-top: 8px; line-height: 1.55; }

/* ============ responsivo ============ */
@media (max-width: 1420px) {
  /* Cards mais compactos para os 7 caberem numa linha em notebooks. */
  .jj-status-cards { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
  /* Nome em até duas linhas e o valor embaixo da contagem: sem "Envio de Docu…" cortado. */
  .jj-status-bar { white-space: normal; line-height: 1.3; min-height: 2.6em; }
  .jj-status-body { flex-direction: column; align-items: flex-start; gap: 0; }
}

@media (max-width: 1240px) {
  .jj-table { overflow-x: auto; }
  .jj-table-inner { min-width: 1080px; }
}

@media (max-width: 1180px) {
  .jj-dash-top,
  .jj-dash-bottom { grid-template-columns: 1fr 1fr; height: auto; grid-template-rows: none; }
  .jj-neg { grid-row: auto; grid-column: span 2; }
  .jj-side-stack { grid-column: span 2; grid-template-columns: 1fr 1fr 1fr; }
  .jj-filters { grid-template-columns: 1fr 1fr 1fr; }
  .jj-more-panel { grid-template-columns: 1fr 1fr; }
  .jj-main { padding: 30px 28px 48px; }
}

@media (max-width: 860px) {
  .jj-shell { flex-direction: column; }
  .jj-nav {
    width: 100%;
    flex: 0 0 auto;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    gap: 0;
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .jj-nav-logo { width: 46px; height: 46px; }
  .jj-nav-items {
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 4px;
  }
  .jj-nav-sep { width: 1px; height: 30px; }
  .jj-nav-foot { margin-top: 0; flex-direction: row; }
  .jj-nav-btn { width: 46px; height: 46px; border-radius: 14px; }
  .jj-tip { display: none; }
  .jj-main { padding: 22px 18px 40px; }
  /* Uma faixa que rola para o lado: empilhados, os 7 cards empurravam a esteira para baixo. */
  .jj-status-cards { display: flex; overflow-x: auto; gap: 8px; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .jj-status-card { flex: 0 0 132px; scroll-snap-align: start; }
  .jj-dash-top,
  .jj-dash-bottom,
  .jj-side-stack,
  .jj-filters,
  .jj-more-panel,
  .jj-nova-fields,
  .jj-grid-2 { grid-template-columns: minmax(0, 1fr); }
  /* No celular os cards passavam da tela (1fr não encolhe abaixo do conteúdo). */
  .jj-metric { padding: 22px; min-width: 0; }
  .jj-neg,
  .jj-side-stack { grid-column: auto; }
  .jj-topbar { flex-direction: column; align-items: stretch; gap: 14px; }
  .jj-search { width: 100%; }
  .jj-topbar-actions { justify-content: flex-end; }
  .jj-nova { margin-top: 30px; }
  .jj-nova-title { font-size: 36px; }
  .jj-nova-badge { height: 34px; padding: 0 22px; font-size: 13.5px; }
  .jj-pop-panel { width: min(300px, calc(100vw - 56px)); }
  .jj-metric,
  .jj-highlight { padding: 22px; }
  .jj-drop { height: 260px; }
}

/* ============ complementos ============ */

.jj-h1.is-lg  { font-size: 38px; }
.jj-h1.is-xl  { font-size: 50px; font-weight: 300; }
.jj-sub.is-lg { font-size: 14px; }
.jj-head.is-lg { margin-bottom: 4px; }

.jj-submit {
  width: 100%;
  height: 56px;
  margin-top: 22px;
  border: 0;
  border-radius: var(--jj-r-field);
  background: var(--jj-orange);
  color: var(--jj-white);
  font-size: 16px;
  transition: background .2s ease, opacity .2s ease;
}
.jj-submit:hover:not(:disabled) { background: var(--jj-orange-press); }
.jj-submit:disabled { opacity: .45; cursor: not-allowed; }
.jj-form-hint { font-size: 12px; color: var(--jj-text-5); text-align: center; margin-top: 12px; }

.jj-empty.is-card {
  background: var(--jj-white);
  border-radius: var(--jj-r-card);
  box-shadow: var(--jj-shadow-card);
  margin-top: 24px;
}

.jj-nova-obs { grid-column: span 4; }
@media (max-width: 860px) { .jj-nova-obs { grid-column: auto; } }
.jj-input.is-area { height: auto; padding: 14px 16px; resize: vertical; line-height: 1.5; }

.jj-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
@media (max-width: 860px) { .jj-detail-grid { grid-template-columns: 1fr; } }
.jj-detail-label { font-size: 10px; letter-spacing: .12em; color: var(--jj-text-5); }
.jj-detail-value { font-size: 14px; color: var(--jj-text-2); margin-top: 3px; }
.jj-detail-value.is-accent { color: var(--jj-orange); font-size: 17px; font-weight: 500; }

/* grid de filtros: evita que selects com texto longo estourem a linha */
.jj-filters > *,
.jj-more-panel > * { min-width: 0; }
.jj-filters .jj-select,
.jj-more-panel .jj-select { width: 100%; text-overflow: ellipsis; }

/* badge de status em linha única (evita quebrar "Contrato Assinado" em duas linhas) */
.jj-tr .jj-status-badge { white-space: nowrap; font-size: 11.5px; padding: 0 10px; }

/* ================================================================
   RODADA 2 — filtro avançado, comparação, modal do lead editável,
   resultado da análise e animações de interface
   ================================================================ */

/* ---- ícone do WhatsApp sempre branco ---- */
.jjx .jj-wa-btn,
.jjx .jj-wa-btn svg { color: var(--jj-white); stroke: none; }
.jjx .jj-wa-btn svg path { fill: var(--jj-white); }
.jjx .jj-wa-btn { transition: transform .18s ease, filter .2s ease, box-shadow .2s ease; }
.jjx .jj-wa-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(47, 180, 87, .28); }
.jjx .jj-wa-btn:active { transform: translateY(0) scale(.97); }

/* ---- chip do usuário filtrado ---- */
.jjx .jj-user-chip {
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--jj-orange-line);
  background: var(--jj-orange-50);
  color: var(--jj-orange);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: jjPop .25s ease both;
}
.jjx .jj-user-chip span { font-size: 15px; opacity: .7; }
.jjx .jj-user-chip:hover { background: var(--jj-orange-100); }

/* ---- busca de usuário dentro do popover ---- */
.jjx .jj-user-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--jj-line);
  border-radius: 12px;
  background: var(--jj-bg);
  color: var(--jj-text-3);
  margin-bottom: 8px;
  transition: border-color .18s ease, background .18s ease;
}
.jjx .jj-user-search:focus-within { border-color: var(--jj-orange); background: var(--jj-white); }
.jjx .jj-user-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
  color: var(--jj-ink);
}
.jjx .jj-user-clear { border: 0; background: transparent; color: var(--jj-text-3); font-size: 16px; line-height: 1; }

.jjx .jj-user-list { max-height: 190px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.jjx .jj-user-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--jj-text-2);
  font-size: 13.5px;
  text-align: left;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.jjx .jj-user-opt:hover { background: var(--jj-bg); transform: translateX(2px); }
.jjx .jj-user-opt.is-on { background: var(--jj-orange-50); color: var(--jj-orange); }
.jjx .jj-user-none { font-size: 12.5px; color: var(--jj-text-4); padding: 10px 4px; }

/* ---- interruptor de comparação ---- */
.jjx .jj-switch-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--jj-line);
  border-radius: 14px;
  background: var(--jj-bg);
  color: var(--jj-text-2);
  font-size: 13.5px;
  text-align: left;
  transition: border-color .18s ease, background .18s ease;
}
.jjx .jj-switch-row em { display: block; font-style: normal; font-size: 11.5px; color: var(--jj-text-4); margin-top: 3px; }
.jjx .jj-switch-row.is-on { border-color: var(--jj-orange-line); background: var(--jj-orange-50); }
.jjx .jj-switch {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--jj-line-2);
  flex: none;
  position: relative;
  transition: background .2s ease;
}
.jjx .jj-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--jj-white);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.jjx .jj-switch-row.is-on .jj-switch { background: var(--jj-orange); }
.jjx .jj-switch-row.is-on .jj-switch i { transform: translateX(18px); }
.jjx .jj-icon-btn.is-on { border-color: var(--jj-orange); color: var(--jj-orange); background: var(--jj-orange-50); }

/* ---- painel de comparação ---- */
.jjx .jj-compare {
  background: var(--jj-white);
  border: 1px solid var(--jj-line);
  border-radius: 26px;
  padding: 22px 24px 24px;
  box-shadow: var(--jj-shadow-card);
  margin-bottom: 22px;
}
.jjx .jj-compare-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.jjx .jj-compare-title { font-size: 19px; font-weight: 400; color: var(--jj-ink); }
.jjx .jj-compare-sub { font-size: 12.5px; color: var(--jj-text-3); margin-top: 5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.jjx .jj-compare-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.jjx .jj-compare-key.is-now { background: var(--jj-orange); margin-left: 2px; }
.jjx .jj-compare-key.is-prev { background: var(--jj-orange-200); margin-left: 12px; }
.jjx .jj-compare-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.jjx .jj-compare-card {
  border: 1px solid var(--jj-line);
  border-radius: 18px;
  padding: 15px 16px 14px;
  background: var(--jj-bg);
  transition: transform .2s ease, box-shadow .2s ease;
}
.jjx .jj-compare-card:hover { transform: translateY(-3px); box-shadow: var(--jj-shadow-card); }
.jjx .jj-compare-label { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--jj-text-3); }
.jjx .jj-compare-value { font-size: 24px; font-weight: 400; color: var(--jj-ink); margin-top: 7px; }
.jjx .jj-compare-delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
}
.jjx .jj-compare-delta.is-up   { background: var(--jj-pos-soft); color: var(--jj-pos-ink); }
.jjx .jj-compare-delta.is-down { background: var(--jj-neg-soft); color: var(--jj-neg-ink); }
.jjx .jj-compare-delta.is-flat { background: var(--jj-line); color: var(--jj-text-3); }
.jjx .jj-compare-bars { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.jjx .jj-compare-bar { height: 7px; border-radius: 4px; background: var(--jj-line); overflow: hidden; }
.jjx .jj-compare-bar i { display: block; height: 100%; border-radius: 4px; animation: jjGrow .7s cubic-bezier(.22,.9,.32,1) both; }
.jjx .jj-compare-bar i.is-now  { background: var(--jj-orange); }
.jjx .jj-compare-bar i.is-prev { background: var(--jj-orange-200); }
.jjx .jj-compare-prev { margin-top: 9px; font-size: 11.5px; color: var(--jj-text-4); }

@keyframes jjGrow { from { width: 0 !important; } }

/* ---- abas do modal ---- */
/* usa vw (não %) pelo mesmo motivo do .jj-modal base: dentro do grid de célula única
   do overlay, "%" não tem containing block definido e é ignorado, deixando a modal
   vazar da tela em telas pequenas (bug reportado: abas/rodapé cortados no mobile) */
.jjx .jj-modal.is-lead { max-width: min(760px, calc(100vw - 40px)); }
.jjx .jj-lead-modal-id { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; }
.jjx .jj-lead-modal-id > div { flex: 1; min-width: 0; }
.jjx .jj-lead-modal-id .jj-modal-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jjx .jj-resp-av.is-lg { width: 42px; height: 42px; font-size: 14px; border-radius: 14px; flex: none; }
.jjx .jj-status-badge.is-static { pointer-events: none; flex: none; }
.jjx .jj-tabs { display: flex; gap: 6px; margin-top: 20px; border-bottom: 1px solid var(--jj-line); }
.jjx .jj-tab {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--jj-text-3);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
  transition: color .18s ease;
}
.jjx .jj-tab::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--jj-orange);
  transform: scaleX(0);
  transition: transform .22s ease;
}
.jjx .jj-tab:hover { color: var(--jj-ink); }
.jjx .jj-tab.is-on { color: var(--jj-orange); }
.jjx .jj-tab.is-on::after { transform: scaleX(1); }
.jjx .jj-modal-body { padding-top: 18px; }

.jjx .jj-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; }
.jjx .jj-form-grid .jj-span-2 { grid-column: span 2; }
.jjx .jj-input.is-accent { color: var(--jj-orange); }

.jjx .jj-wa-inline {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--jj-wa);
  color: var(--jj-white);
  font-size: 13.5px;
  transition: transform .18s ease, filter .2s ease;
}
.jjx .jj-wa-inline svg path { fill: var(--jj-white); }
.jjx .jj-wa-inline:hover { transform: translateY(-2px); filter: brightness(1.05); }

.jjx .jj-comissao-field { display: flex; flex-direction: column; gap: 8px; }
.jjx .jj-comissao-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 5px;
  background: var(--jj-orange-100); outline: none; cursor: pointer;
}
.jjx .jj-comissao-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--jj-orange); border: 3px solid var(--jj-white); box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: grab;
}
.jjx .jj-comissao-slider::-webkit-slider-thumb:active { cursor: grabbing; }
.jjx .jj-comissao-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--jj-orange);
  border: 3px solid var(--jj-white); box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: grab;
}

.jjx .jj-pct-strip {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--jj-orange-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.jjx .jj-pct-track { flex: 1; max-width: 320px; height: 8px; border-radius: 5px; background: var(--jj-orange-100); overflow: hidden; }
.jjx .jj-pct-track i { display: block; height: 100%; border-radius: 5px; background: var(--jj-orange); transition: width .5s cubic-bezier(.22,.9,.32,1); }
.jjx .jj-pct-track.is-lg { height: 10px; max-width: none; }
.jjx .jj-analise-file {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--jj-text-3);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.jjx a.jj-analise-file.is-link {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--jj-off-white);
  border: 1px solid var(--jj-border);
  transition: border-color .18s ease, background .18s ease;
}
.jjx a.jj-analise-file.is-link:hover { border-color: var(--jj-orange-200); background: var(--jj-orange-50); }
.jjx .jj-analise-file-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--jj-orange);
  font-weight: 500;
}

/* ---- documentos do lead (anexos) ---- */
.jjx .jj-doc-list { display: flex; flex-direction: column; gap: 10px; }
.jjx .jj-doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--jj-off-white);
  border: 1px solid var(--jj-border);
}
.jjx .jj-doc-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.jjx .jj-doc-ico {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: var(--jj-orange-100);
  color: var(--jj-orange);
  display: grid;
  place-items: center;
}
.jjx .jj-doc-label { font-size: 13.5px; color: var(--jj-ink); }
.jjx .jj-doc-hint { font-size: 11.5px; color: var(--jj-text-4); margin-top: 2px; }
.jjx .jj-doc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jjx .jj-doc-view,
.jjx .jj-doc-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: filter .18s ease, background .18s ease, border-color .18s ease;
}
.jjx .jj-doc-view {
  background: var(--jj-white);
  border: 1px solid var(--jj-border-2);
  color: var(--jj-orange);
}
.jjx .jj-doc-view:hover { border-color: var(--jj-orange-200); background: var(--jj-orange-50); }
.jjx .jj-doc-upload {
  background: var(--jj-orange);
  border: 1px solid var(--jj-orange);
  color: var(--jj-white);
}
.jjx .jj-doc-upload:hover { background: var(--jj-orange-press); }
.jjx .jj-doc-upload.is-busy { opacity: .65; cursor: default; pointer-events: none; }

/* ---- comentários ---- */
.jjx .jj-comments { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.jjx .jj-comment { display: flex; gap: 11px; }
.jjx .jj-comment-av {
  width: 32px; height: 32px; flex: none;
  border-radius: 11px;
  background: var(--jj-orange-50);
  color: var(--jj-orange);
  display: grid; place-items: center;
  font-size: 11.5px;
}
.jjx .jj-comment-meta { font-size: 12.5px; color: var(--jj-ink); }
.jjx .jj-comment-meta span { color: var(--jj-text-4); font-size: 11.5px; }
.jjx .jj-comment-text {
  margin-top: 5px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--jj-text-2);
  background: var(--jj-bg);
  border-radius: 14px;
  border-top-left-radius: 4px;
  padding: 10px 13px;
}
.jjx .jj-comment-empty { font-size: 13px; color: var(--jj-text-4); padding: 18px 0; text-align: center; }
.jjx .jj-comment-form { margin-top: 14px; display: flex; gap: 10px; align-items: flex-end; }
.jjx .jj-comment-form .jj-input.is-area { flex: 1; }
.jjx .jj-comment-send {
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--jj-orange);
  color: var(--jj-white);
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .16s ease, background .18s ease;
}
.jjx .jj-comment-send:hover:not(:disabled) { background: var(--jj-orange-press); transform: translateY(-2px); }
.jjx .jj-comment-send:disabled { opacity: .45; }

.jjx .jj-modal-actions.is-split { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.jjx .jj-dirty { font-size: 12px; color: var(--jj-text-4); }
.jjx .jj-dirty.is-on { color: var(--jj-orange); }

/* ---- Nova Análise: produto e responsável automático ---- */
.jjx .jj-nova-fields.is-3 { grid-template-columns: repeat(3, 1fr); }
.jjx .jj-nova-fields.is-4 { grid-template-columns: repeat(4, 1fr); }
.jjx .jj-resp-auto {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--jj-text-3);
  background: var(--jj-white);
  border: 1px solid var(--jj-line);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
}
.jjx .jj-resp-auto b { color: var(--jj-ink); font-weight: 500; }
.jjx .jj-resp-auto em { font-style: normal; color: var(--jj-text-4); }
.jjx .jj-produto { margin-top: 18px; }
.jjx .jj-seg { display: inline-flex; gap: 8px; margin-top: 9px; }
.jjx .jj-seg-opt {
  height: 46px;
  padding: 0 26px;
  border-radius: 14px;
  border: 1px solid var(--jj-line);
  background: var(--jj-white);
  color: var(--jj-text-2);
  font-size: 14px;
  transition: transform .18s ease, border-color .18s ease, color .18s ease, background .18s ease;
}
.jjx .jj-seg-opt:hover { border-color: var(--jj-orange-line); transform: translateY(-2px); }
.jjx .jj-seg-opt.is-on { background: var(--jj-orange); border-color: var(--jj-orange); color: var(--jj-white); }

.jjx .jj-spinner {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: var(--jj-white);
  display: inline-block;
  animation: jjSpin .7s linear infinite;
}
@keyframes jjSpin { to { transform: rotate(360deg); } }
.jjx .jj-file-bar.is-live i { animation: jjPulseBar 1.1s ease-in-out infinite; }
@keyframes jjPulseBar { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.jjx .jj-drop.is-busy { border-color: var(--jj-orange); background: var(--jj-orange-50); }

/* ---- Resultado da análise ----
 * max-width + centralização: o pedido é poder tirar um print (screenshot) desta tela e
 * mandar direto pro cliente, então o card não deve esticar por toda a largura do painel —
 * fica num tamanho fixo e centralizado, como um "cartão" de resultado. */
.jjx .jj-result { max-width: 760px; margin: 0 auto; }
.jjx .jj-back {
  border: 0;
  background: transparent;
  color: var(--jj-text-3);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  margin-bottom: 14px;
  transition: color .18s ease, transform .18s ease;
}
.jjx .jj-back:hover { color: var(--jj-orange); transform: translateX(-3px); }

.jjx .jj-result-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--jj-text-3);
  margin-bottom: 10px;
}
.jjx .jj-result-brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.jjx .jj-result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .95fr);
  gap: 18px;
  align-items: stretch;
}
.jjx .jj-result-hero-main {
  background: var(--jj-white);
  border: 1px solid var(--jj-line);
  border-radius: 26px;
  padding: 28px 30px 26px;
  box-shadow: var(--jj-shadow-card);
  /* centralizado: pensado para ser fotografado/printado e mandado direto ao cliente */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.jjx .jj-result-hero-main .jj-nova-badge { align-self: center; }
.jjx .jj-result-client-name { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--jj-ink); }
.jjx .jj-result-label { margin-top: 16px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--jj-text-3); }
.jjx .jj-result-value { font-size: 46px; font-weight: 300; color: var(--jj-orange); line-height: 1.05; margin-top: 8px; }
.jjx .jj-result-sub { font-size: 13.5px; color: var(--jj-text-3); margin-top: 8px; max-width: 380px; }
.jjx .jj-result-progress { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; }
.jjx .jj-result-pct { font-size: 12.5px; color: var(--jj-text-3); white-space: nowrap; }
.jjx .jj-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.jjx .jj-btn-wa {
  height: 48px;
  padding: 0 20px;
  border-radius: 15px;
  background: var(--jj-wa);
  color: var(--jj-white);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform .18s ease, box-shadow .2s ease;
}
.jjx .jj-btn-wa svg path { fill: var(--jj-white); }
.jjx .jj-btn-wa:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(47,180,87,.26); }
.jjx .jj-btn-soft {
  height: 48px;
  padding: 0 18px;
  border-radius: 15px;
  border: 1px solid var(--jj-line);
  background: var(--jj-white);
  color: var(--jj-text-2);
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .18s ease, border-color .18s ease, color .18s ease, background .18s ease;
}
.jjx .jj-btn-soft:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--jj-orange-line); color: var(--jj-orange); background: var(--jj-orange-50); }
.jjx .jj-btn-soft.is-done { background: var(--jj-pos-soft); border-color: var(--jj-pos-soft); color: var(--jj-pos-ink); }

.jjx .jj-result-side {
  background: var(--jj-white);
  border: 1px solid var(--jj-line);
  border-radius: 26px;
  padding: 24px 24px 20px;
  box-shadow: var(--jj-shadow-card);
}
.jjx .jj-result-side-title { font-size: 15px; color: var(--jj-ink); margin-bottom: 14px; }
.jjx .jj-result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--jj-line);
  font-size: 12.5px;
  color: var(--jj-text-3);
}
.jjx .jj-result-row b { font-weight: 400; color: var(--jj-ink); text-align: right; }
.jjx .jj-result-file { margin-top: 14px; font-size: 11.5px; color: var(--jj-text-4); }

.jjx .jj-achados {
  margin-top: 18px;
  background: var(--jj-white);
  border: 1px solid var(--jj-line);
  border-radius: 26px;
  padding: 24px 26px;
  box-shadow: var(--jj-shadow-card);
}
.jjx .jj-achados-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.jjx .jj-achado-list { margin-top: 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.jjx .jj-achado {
  border: 1px solid var(--jj-line);
  border-radius: 18px;
  padding: 16px 18px;
  background: var(--jj-bg);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.jjx .jj-achado:hover { transform: translateY(-3px); border-color: var(--jj-orange-line); box-shadow: var(--jj-shadow-card); }
.jjx .jj-achado-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.jjx .jj-achado-title { font-size: 15px; color: var(--jj-ink); }
.jjx .jj-achado-val { font-size: 15px; color: var(--jj-orange); }
.jjx .jj-achado-desc { font-size: 12.5px; color: var(--jj-text-3); line-height: 1.55; margin-top: 7px; }
.jjx .jj-achado-bar { margin-top: 12px; height: 6px; border-radius: 4px; background: var(--jj-orange-100); overflow: hidden; }
.jjx .jj-achado-bar i { display: block; height: 100%; border-radius: 4px; background: var(--jj-orange); animation: jjGrow .8s cubic-bezier(.22,.9,.32,1) both; }
.jjx .jj-achado-total {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--jj-line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 14px;
  color: var(--jj-text-3);
}
.jjx .jj-achado-total b { font-size: 22px; font-weight: 400; color: var(--jj-ink); }

/* ---- toast ---- */
.jjx .jj-toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 16px;
  background: var(--jj-ink);
  color: var(--jj-white);
  font-size: 13.5px;
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
  animation: jjToast .32s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes jjToast { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---- efeitos gerais de usabilidade ---- */
.jjx .jj-metric,
.jjx .jj-highlight,
.jjx .jj-mini,
.jjx .jj-status-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.jjx .jj-metric:hover,
.jjx .jj-highlight:hover,
.jjx .jj-mini:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.06); }
.jjx .jj-status-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.jjx .jj-tr { transition: background .18s ease, box-shadow .2s ease, transform .18s ease; }
.jjx .jj-tr:hover { transform: translateX(2px); }
.jjx .jj-act:active,
.jjx .jj-sm-btn:active,
.jjx .jj-modal-btn:active,
.jjx .jj-submit:active:not(:disabled) { transform: scale(.97); }
.jjx .jj-neg-item { transition: background .18s ease, transform .18s ease; }
.jjx .jj-neg-item:hover { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .jjx *, .jjx *::before, .jjx *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 1240px) {
  .jjx .jj-compare-grid { grid-template-columns: repeat(2, 1fr); }
  .jjx .jj-result-hero { grid-template-columns: 1fr; }
  .jjx .jj-achado-list { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .jjx .jj-compare-grid { grid-template-columns: 1fr; }
  .jjx .jj-form-grid { grid-template-columns: 1fr; }
  .jjx .jj-form-grid .jj-span-2 { grid-column: auto; }
  .jjx .jj-nova-fields.is-3,
  .jjx .jj-nova-fields.is-4 { grid-template-columns: 1fr; }
  .jjx .jj-result-value { font-size: 40px; }
  .jjx .jj-seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}

/* ---- modal de edição do lead: tag, abas e botões legíveis em telas pequenas ---- */
@media (max-width: 640px) {
  .jjx .jj-modal.is-lead { padding: 22px 18px 20px; }
  .jjx .jj-modal-head { flex-wrap: wrap; }
  .jjx .jj-lead-modal-id { flex-wrap: wrap; row-gap: 8px; }
  .jjx .jj-lead-modal-id .jj-status-badge.is-static { margin-left: 55px; }
  .jjx .jj-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .jjx .jj-tab { flex: none; padding: 10px 12px; font-size: 12.5px; white-space: nowrap; }
  .jjx .jj-modal-actions.is-split { flex-direction: column; align-items: stretch; }
  .jjx .jj-modal-actions.is-split .jj-modal-actions { width: 100%; }
  .jjx .jj-modal-actions.is-split .jj-modal-btn { min-width: 0; flex: 1; }
  .jjx .jj-doc-row { flex-direction: column; align-items: stretch; }
  .jjx .jj-doc-actions { width: 100%; }
  .jjx .jj-doc-view, .jjx .jj-doc-upload { flex: 1; justify-content: center; }
  .jjx .jj-analise-file-cta { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Central de gestão (JJGestao)
   Cores de severidade = paleta de status fixa (bom / atenção / crítico):
   reservadas para estado, nunca reutilizadas como "série", sempre com ícone +
   rótulo. Texto fica na tinta; a cor de status vai só no ícone, no ponto e na
   barra. O laranja da marca não carrega significado de estado aqui.
   ═══════════════════════════════════════════════════════════════════════════ */
.jj-gst {
  --jj-sev-ok:   #0ca30c;  --jj-sev-ok-soft:   #E6F5E6;  --jj-sev-ok-ink:   #0A6E0A;
  --jj-sev-warn: #FAB219;  --jj-sev-warn-soft: #FEF3D6;  --jj-sev-warn-ink: #8A5A00;
  --jj-sev-crit: #D03B3B;  --jj-sev-crit-soft: #FBE5E5;  --jj-sev-crit-ink: #A12828;
  display: flex; flex-direction: column; gap: 16px;
}
.jj-gst .jj-card { padding: 22px 24px; }
.jj-gst-label { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--jj-text-4); }
.jj-gst-note  { font-size: 12.5px; color: var(--jj-text-4); margin-top: 6px; line-height: 1.5; }
.jj-gst-h2    { font-size: 18px; font-weight: 500; color: var(--jj-ink); margin: 0; }

/* Resposta principal */
.jj-gst-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.jj-gst-hero-value { font-size: 52px; font-weight: 500; letter-spacing: -1px; line-height: 1.1; color: var(--jj-ink); margin-top: 6px; }
.jj-gst-hero .jj-gst-note { max-width: 46ch; }
.jj-gst-split { display: flex; gap: 28px; margin: 0; }
.jj-gst-split dt { font-size: 12px; color: var(--jj-text-4); display: flex; align-items: center; gap: 6px; }
.jj-gst-split dd { margin: 4px 0 0; font-size: 20px; font-weight: 500; color: var(--jj-ink); }
.jj-gst-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.jj-gst-dot.is-ok   { background: var(--jj-sev-ok); }
.jj-gst-dot.is-crit { background: var(--jj-sev-crit); }

/* Respostas rápidas */
.jj-gst-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.jj-gst-kpi {
  text-align: left; border: 1.5px solid transparent; cursor: pointer; font: inherit; color: inherit;
  display: flex; flex-direction: column; gap: 6px;
}
.jj-gst-kpi:hover:not(:disabled) { border-color: var(--jj-orange-200); }
.jj-gst-kpi.is-on  { border-color: var(--jj-orange); }
.jj-gst-kpi:disabled { cursor: default; }
.jj-gst-kpi-value { font-size: 20px; font-weight: 500; color: var(--jj-ink); display: flex; align-items: center; gap: 8px; }
.jj-gst-kpi-sub   { font-size: 13px; color: var(--jj-text-3); }
.jj-gst-kpi-sub strong { color: var(--jj-ink); font-weight: 500; }

/* O que falta registrar */
.jj-gst-alerts { display: flex; flex-direction: column; gap: 8px; }
.jj-gst-alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px;
  background: var(--jj-sev-warn-soft); border-radius: var(--jj-r-box);
  font-size: 13px; color: var(--jj-ink); line-height: 1.5;
}
.jj-gst-alert > svg { color: var(--jj-sev-warn-ink); flex: none; margin-top: 2px; }
.jj-gst-alert > span { flex: 1; }
.jj-gst-alert strong { font-weight: 500; }

/* Situação: ícone colorido + rótulo em tinta */
.jj-gst-sit { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--jj-ink); white-space: nowrap; }
.jj-gst-sit > svg { flex: none; }
.jj-gst-sit.is-crit > svg { color: var(--jj-sev-crit-ink); }
.jj-gst-sit.is-warn > svg { color: var(--jj-sev-warn-ink); }
.jj-gst-sit.is-ok   > svg { color: var(--jj-sev-ok-ink); }
.jj-gst-sit-sub { color: var(--jj-text-4); }

/* Fila */
.jj-gst-fila-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.jj-gst-resp { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--jj-text-4); }
.jj-gst-resp select {
  height: 34px; border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-pill);
  padding: 0 12px; font: inherit; font-size: 12.5px; color: var(--jj-ink); background: var(--jj-white);
}
.jj-gst-rows { list-style: none; margin: 0; padding: 0; }
.jj-gst-row {
  display: grid; grid-template-columns: 1.6fr .95fr 1.15fr .7fr 1.55fr auto;
  gap: 14px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--jj-divider);
}
.jj-gst-row.is-header { border-top: 0; padding-top: 4px; padding-bottom: 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--jj-text-5); }
.jj-gst-row.is-open { background: var(--jj-orange-50); border-radius: var(--jj-r-box); }
.jj-gst .is-num { text-align: right; }
.jj-gst-valor { font-size: 14px; font-weight: 500; color: var(--jj-ink); font-variant-numeric: tabular-nums; }
.jj-gst-cell-cliente { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.jj-gst-cell-cliente > span:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jj-gst-pos { font-size: 12px; color: var(--jj-text-5); min-width: 18px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.jj-gst-nome {
  background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--jj-ink);
  text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jj-gst-nome:hover { color: var(--jj-orange-ink); text-decoration: underline; }
.jj-gst-etapa { align-self: flex-start; font-size: 11px; padding: 2px 8px; border-radius: var(--jj-r-pill); }

.jj-gst-meter { display: flex; flex-direction: column; gap: 5px; }
.jj-gst-meter-text { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--jj-text-4); }
.jj-gst-meter-text strong { color: var(--jj-ink); font-weight: 500; }
.jj-gst-meter-track { height: 6px; border-radius: 4px; overflow: hidden; }
.jj-gst-meter-fill  { height: 100%; border-radius: 4px; }
.jj-gst-meter-track.is-ok   { background: var(--jj-sev-ok-soft); }
.jj-gst-meter-track.is-ok   .jj-gst-meter-fill { background: var(--jj-sev-ok); }
.jj-gst-meter-track.is-warn { background: var(--jj-sev-warn-soft); }
.jj-gst-meter-track.is-warn .jj-gst-meter-fill { background: var(--jj-sev-warn); }
.jj-gst-meter-track.is-crit { background: var(--jj-sev-crit-soft); }
.jj-gst-meter-track.is-crit .jj-gst-meter-fill { background: var(--jj-sev-crit); }

.jj-gst-cell-motivo { display: flex; flex-direction: column; gap: 3px; font-size: 13px; min-width: 0; }
.jj-gst-motivo { color: var(--jj-ink); }
.jj-gst-parte  { font-size: 12px; color: var(--jj-text-4); }
.jj-gst-parte strong { color: var(--jj-text-2); font-weight: 500; }
.jj-gst-nota   { font-size: 12px; color: var(--jj-text-3); font-style: italic; }
.jj-gst-passo  { color: var(--jj-text-3); }

.jj-gst-acoes { display: flex; align-items: center; gap: 10px; justify-content: flex-end; white-space: nowrap; }
.jj-gst-link {
  background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--jj-orange-ink); cursor: pointer;
}
.jj-gst-link:hover { text-decoration: underline; }
.jj-gst-link.is-muted { color: var(--jj-text-4); font-weight: 400; }
.jj-gst-icon-btn {
  width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--jj-text-3); background: var(--jj-off-white);
}
.jj-gst-icon-btn.is-wa:hover { color: var(--jj-white); background: var(--jj-wa); }

.jj-gst-editor {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 12px; align-items: end;
  padding: 12px 4px 4px;
}
.jj-gst-editor label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--jj-text-3); }
.jj-gst-editor select, .jj-gst-editor input {
  height: 40px; border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-field);
  padding: 0 12px; font-size: 13.5px; color: var(--jj-ink); background: var(--jj-white);
}
.jj-gst-editor select:focus, .jj-gst-editor input:focus { outline: 2px solid var(--jj-orange-200); border-color: var(--jj-orange); }
.jj-gst-editor-acoes { display: flex; align-items: center; gap: 14px; height: 40px; }
.jj-gst-btn {
  height: 40px; padding: 0 18px; border: 0; border-radius: var(--jj-r-pill);
  background: var(--jj-orange); color: var(--jj-white); font: inherit; font-size: 13px; cursor: pointer;
}
.jj-gst-btn:disabled { background: var(--jj-disabled); cursor: default; }

/* Quem está segurando a carteira: barras de um tom só, contagem rotulada */
.jj-gst-partes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 18px; }
.jj-gst-parte-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--jj-divider);
  font-size: 14px; color: var(--jj-ink);
}
.jj-gst-parte-head strong { font-size: 22px; font-weight: 500; }
.jj-gst-bar { margin-bottom: 12px; }
.jj-gst-bar-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--jj-text-2); margin-bottom: 5px; }
.jj-gst-bar-label strong { color: var(--jj-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.jj-gst-bar-track { height: 6px; background: var(--jj-panel-2); border-radius: 4px; }
.jj-gst-bar-fill  { height: 100%; background: var(--jj-text-4); border-radius: 4px; }
.jj-gst-vazio { font-size: 12.5px; color: var(--jj-text-5); }
.jj-gst-sem-motivo {
  margin-top: 14px; background: none; border: 1px dashed var(--jj-border-2); border-radius: var(--jj-r-box);
  padding: 10px 14px; width: 100%; text-align: left; font: inherit; font-size: 13px; color: var(--jj-text-3); cursor: pointer;
}
.jj-gst-sem-motivo:hover { border-color: var(--jj-orange-200); color: var(--jj-orange-ink); }

/* Celular e telas estreitas: a fila vira cartões empilhados */
@media (max-width: 900px) {
  .jj-gst-kpis, .jj-gst-partes { grid-template-columns: 1fr; }
  .jj-gst-hero-value { font-size: 40px; }
  .jj-gst-row {
    grid-template-columns: 1fr auto; row-gap: 10px;
    grid-template-areas: "cli cli" "sit val" "met met" "mot mot" "aco aco";
  }
  .jj-gst-row.is-header { display: none; }
  .jj-gst-cell-cliente { grid-area: cli; }
  .jj-gst-c-sit        { grid-area: sit; }
  .jj-gst-valor        { grid-area: val; }
  .jj-gst-c-met        { grid-area: met; }
  .jj-gst-cell-motivo  { grid-area: mot; }
  .jj-gst-acoes        { grid-area: aco; justify-content: flex-start; }
  .jj-gst-editor       { grid-column: 1 / -1; }
  .jj-gst-editor { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Esteira da Central de Leads (JJEsteira)
   Setor Comercial = roxo; Operação = verde-água; Contrato assinado = passagem
   entre os dois; Atrito = atenção. Intensidade do pagamento usa a paleta de
   status (sempre com rótulo). O laranja da marca segue só como destaque.
   ═══════════════════════════════════════════════════════════════════════════ */
.jjx {
  --jj-com: #7F77DD;  --jj-com-soft: #EEEDFE;  --jj-com-ink: #3C3489;
  --jj-ope: #1D9E75;  --jj-ope-soft: #E1F5EE;  --jj-ope-ink: #085041;
  --jj-sev-ok:   #0ca30c;  --jj-sev-ok-soft:   #E6F5E6;  --jj-sev-ok-ink:   #0A6E0A;
  --jj-sev-warn: #FAB219;  --jj-sev-warn-soft: #FEF3D6;  --jj-sev-warn-ink: #6B4A00;
  --jj-sev-crit: #D03B3B;  --jj-sev-crit-soft: #FBE5E5;  --jj-sev-crit-ink: #A12828;
}

/* seletor de vista da Central */
.jj-vistas { display: inline-flex; gap: 4px; padding: 4px; background: var(--jj-panel-2); border-radius: var(--jj-r-pill); margin: 4px 0 16px; }
.jj-vista {
  border: 0; background: none; font: inherit; font-size: 13px; color: var(--jj-text-3);
  padding: 7px 16px; border-radius: var(--jj-r-pill); cursor: pointer;
}
.jj-vista.is-on { background: var(--jj-white); color: var(--jj-ink); box-shadow: var(--jj-shadow-soft); }
.jj-vista-qtd { margin-left: 6px; font-size: 11.5px; color: var(--jj-text-5); }

/* linha das vistas, com a contagem do filtro ao lado */
.jj-vistas-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 12px; }
.jj-vistas-linha .jj-vistas { margin: 0; }
.jj-vistas-linha .jj-result-count { margin: 0; }

/* taxas: no encontro das etapas (largo) ou numa linha discreta (estreito) */
.jj-est-conector {
  flex: 0 0 58px; position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding-top: 14px; min-height: 60px;
}
.jj-est-conector::before {
  content: ''; position: absolute; top: 25px; left: -6px; right: -6px; height: 1px; background: var(--jj-border-2); z-index: 0;
}
.jj-est-conector-taxa {
  position: relative; z-index: 1; font-size: 12.5px; font-weight: 500; color: var(--jj-ink);
  background: var(--jj-white); border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-pill); padding: 2px 9px; line-height: 17px;
}
.jj-est-conector-rotulo { position: relative; z-index: 1; font-size: 10px; color: var(--jj-text-4); text-align: center; line-height: 1.2; padding: 0 2px; background: var(--jj-off-white); }
.jj-est-conector.is-passagem { flex-basis: 20px; min-height: 0; }
.jj-est-conector.is-passagem::before { display: none; }
.jj-est-conector.is-passagem .jj-est-conector-rotulo { color: var(--jj-orange-ink); white-space: nowrap; writing-mode: vertical-rl; transform: rotate(180deg); padding: 6px 0; background: none; }
.jj-est-taxas { display: none; }

/* quadro: colunas neutras; a cor de cada etapa é a mesma do status, só no ponto */
.jj-est-board { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 12px; align-items: flex-start; overscroll-behavior-x: contain; }
.jj-est-col {
  flex: 0 0 288px; background: var(--jj-panel-2); border-radius: 16px;
  display: flex; flex-direction: column; max-height: calc(100vh - 140px); min-height: 220px;
}
/* Comercial em laranja suave; Contrato assinado é a passagem, tracejado. Operação fica neutra. */
.jj-est-col.is-comercial { background: var(--jj-orange-50); box-shadow: inset 0 0 0 1px var(--jj-orange-200); }
.jj-est-col.is-passagem  { background: linear-gradient(90deg, var(--jj-orange-50), var(--jj-panel-2)); border: 1px dashed var(--jj-orange-200); }
.jj-est-col.is-comercial .jj-est-col-sub, .jj-est-col.is-passagem .jj-est-col-sub { color: var(--jj-orange-ink); }
.jj-est-col.is-comercial .jj-est-col-qtd { background: var(--jj-white); }
.jj-est-col-head { padding: 12px 14px 8px; }
.jj-est-col-nome { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--jj-ink); min-width: 0; }
.jj-est-col-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.jj-est-col.is-atrito .jj-est-col-nome svg { color: var(--jj-st-warn-dot); flex: none; }
.jj-est-col-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jj-est-col-qtd { flex: none; font-size: 12px; font-weight: 400; color: var(--jj-text-3); background: var(--jj-white); border-radius: var(--jj-r-pill); padding: 0 8px; line-height: 20px; }
.jj-est-col-sub { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--jj-text-4); margin-top: 3px; padding-left: 17px; }
.jj-est-col-body { padding: 2px 8px 8px; overflow-y: auto; flex: 1; min-height: 120px; border-radius: 0 0 16px 16px; transition: background .15s ease; }
.jj-est-col-body.is-over { background: var(--jj-orange-50); }
.jj-est-vazio { font-size: 12px; color: var(--jj-text-5); text-align: center; padding: 22px 8px; border: 1px dashed var(--jj-border-2); border-radius: 12px; }
.jj-est-mais { width: 100%; margin-top: 4px; background: none; border: 1px dashed var(--jj-border-2); border-radius: var(--jj-r-field); padding: 8px; font: inherit; font-size: 12px; color: var(--jj-text-3); cursor: pointer; }

/* card */
.jj-est-arrasta { margin-bottom: 8px; border-radius: 14px; }
.jj-est-arrasta:focus-visible { outline: 2px solid var(--jj-orange); outline-offset: 1px; }
.jj-card {
  background: var(--jj-white); border: 1px solid var(--jj-border); border-radius: 14px;
  padding: 11px 12px 10px; box-shadow: var(--jj-shadow-soft); cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.jj-card:hover { border-color: var(--jj-border-2); box-shadow: 0 4px 14px rgba(36, 36, 36, .07); }
.is-dragging .jj-card { box-shadow: var(--jj-shadow-pop); transform: rotate(1.5deg); }
.jj-card-topo { display: flex; align-items: center; gap: 6px; min-height: 24px; }
.jj-card-tags { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.jj-card-tag {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; line-height: 18px; padding: 0 7px;
  border-radius: 6px; background: var(--jj-panel-2); color: var(--jj-text-3);
  white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis;
}
.jj-card-tempo { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--jj-text-4); white-space: nowrap; }
.jj-card-tempo.is-atrasado { color: var(--jj-sev-crit-ink); font-weight: 500; }
.jj-card-mais {
  width: 26px; height: 26px; margin-right: -5px; border: 0; border-radius: 8px; background: none;
  color: var(--jj-text-4); display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.jj-card-mais:hover, .jj-card-mais[aria-expanded="true"] { background: var(--jj-panel-2); color: var(--jj-ink); }
.jj-card-nome {
  display: block; margin-top: 6px; background: none; border: 0; padding: 0; font: inherit; font-size: 14px;
  font-weight: 500; line-height: 1.3; color: var(--jj-ink); text-align: left; cursor: pointer;
}
.jj-card-nome:hover { color: var(--jj-orange-ink); }
.jj-card-sub { font-size: 11.5px; color: var(--jj-text-4); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jj-card-linha { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 7px; font-size: 12px; }
.jjx .jj-card-fone { display: inline-flex; align-items: center; gap: 5px; color: var(--jj-text-2); white-space: nowrap; }
.jjx .jj-card-fone svg { color: var(--jj-wa); }
.jjx .jj-card-fone:hover { color: var(--jj-wa); }
.jj-card-fone.is-vazio { color: var(--jj-text-5); }
.jj-card-data { display: inline-flex; align-items: center; gap: 4px; color: var(--jj-text-4); font-size: 11.5px; white-space: nowrap; }
.jj-card-data.is-recebido { color: var(--jj-sev-ok-ink); background: var(--jj-sev-ok-soft); padding: 1px 7px; border-radius: var(--jj-r-pill); font-weight: 500; }
.jj-card-data.is-semdata { color: var(--jj-sev-warn-ink); }
.jj-date.is-recebido { color: var(--jj-sev-ok-ink); font-weight: 500; }
.jj-card-menu button small { display: block; font-size: 11px; color: var(--jj-sev-warn-ink); margin-top: 1px; }
.jj-card-menu button.is-warn { align-items: flex-start; height: auto; padding: 7px 10px; flex-direction: column; gap: 0; }
.jj-card-menu button.is-warn svg { display: none; }
.jj-lm-aviso { margin-top: 14px; font-size: 12.5px; color: var(--jj-sev-warn-ink); background: var(--jj-sev-warn-soft); border-radius: 10px; padding: 9px 12px; }
.jj-lm-aviso strong { font-weight: 500; }
.jj-lm-aviso.is-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--jj-sev-ok-ink); background: var(--jj-sev-ok-soft); }
.jj-card-valores {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; padding: 7px 10px;
  background: var(--jj-off-white); border-radius: 10px;
}
.jj-card-valores > div { min-width: 0; }
.jj-card-valores span { display: block; font-size: 10.5px; color: var(--jj-text-4); white-space: nowrap; }
.jj-card-valores strong { display: block; margin-top: 1px; font-size: 13px; font-weight: 500; color: var(--jj-ink); white-space: nowrap; }
.jj-card-valores strong.is-hon { color: var(--jj-sev-ok-ink); }
.jj-card .jj-est-tags { margin-top: 8px; }
.jj-card-docs {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px;
  border-radius: var(--jj-r-pill); background: var(--jj-sev-warn-soft); color: var(--jj-sev-warn-ink);
}
.jj-card-docs.is-ok { background: var(--jj-sev-ok-soft); color: var(--jj-sev-ok-ink); }
.jj-card-rodape { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--jj-divider); }
.jj-card-rodape .jj-status-select { flex: 1; min-width: 0; }
.jj-card-av {
  width: 26px; height: 26px; border-radius: 50%; flex: none; object-fit: cover;
  background: var(--jj-orange-100); color: var(--jj-orange-ink); font-size: 10px; font-weight: 500;
  display: inline-grid; place-items: center;
}

/* seletor de etapa compacto (card) e popovers */
.jj-status-select.is-sm .jj-status-badge { height: 26px; font-size: 11.5px; padding: 0 10px; gap: 6px; max-width: 100%; }
.jj-status-badge-txt { overflow: hidden; text-overflow: ellipsis; }
.jj-popover { position: fixed; z-index: 500; background: var(--jj-white); border-radius: 14px; box-shadow: var(--jj-shadow-pop); padding: 6px; }
.jj-popover textarea.jj-input { height: auto; padding: 8px 10px; font-size: 13px; line-height: 1.45; resize: vertical; }
.jj-popover input.jj-input { height: 42px; font-size: 13.5px; }
.jj-status-date-step { padding: 4px; }
.jj-status-check { display: flex; gap: 8px; align-items: center; font-size: 12.5px; margin: 10px 4px 0; cursor: pointer; color: var(--jj-text-2); }
.jj-status-step-acoes { display: flex; gap: 8px; margin-top: 10px; }
.jjx .jj-status-step-acoes .jj-btn-soft { flex: 1; height: 40px; justify-content: center; }
.jj-status-opt-hint { margin-left: auto; font-size: 11px; color: var(--jj-text-4); }
.jjx .jj-btn-soft.is-primary { background: var(--jj-orange); border-color: var(--jj-orange); color: var(--jj-white); }
.jjx .jj-btn-soft.is-primary:hover:not(:disabled) { background: var(--jj-orange-press); border-color: var(--jj-orange-press); color: var(--jj-white); }
.jjx .jj-btn-soft.is-primary:disabled { background: var(--jj-disabled); border-color: var(--jj-disabled); cursor: default; }
.jj-card-menu { display: flex; flex-direction: column; }
.jj-card-menu button, .jjx .jj-card-menu a {
  display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px;
  background: none; font: inherit; font-size: 13px; color: var(--jj-text-2); text-align: left; cursor: pointer;
}
.jj-card-menu button:hover, .jjx .jj-card-menu a:hover { background: var(--jj-off-white); color: var(--jj-ink); }
.jj-card-menu .is-danger { color: var(--jj-danger); }
.jj-card-menu .is-danger:hover { background: var(--jj-neg-soft); color: var(--jj-neg-ink); }
.jj-card-menu hr { border: 0; border-top: 1px solid var(--jj-divider); margin: 4px 2px; }
.jj-card-coments { padding: 4px; }
.jj-card-coment { padding: 8px 2px; }
.jj-card-coment + .jj-card-coment { border-top: 1px solid var(--jj-divider); }
.jj-card-coment-autor { font-size: 12px; font-weight: 500; color: var(--jj-ink); }
.jj-card-coment-autor span { font-weight: 400; color: var(--jj-text-4); }
.jj-card-coment-texto { font-size: 12.5px; color: var(--jj-text-2); margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 84px; overflow-y: auto; }
.jj-card-coment-vazio { font-size: 12.5px; color: var(--jj-text-4); padding: 2px 2px 6px; }
.jj-card-coment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.jjx .jj-card-coment-form .jj-btn-soft { align-self: flex-end; height: 34px; }

/* comentários: vermelho enquanto o lead não tiver nenhum */
.jj-est-coment { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 2px 7px; border-radius: var(--jj-r-pill); background: var(--jj-panel-2); color: var(--jj-text-2); }
.jj-est-coment.is-zero { background: var(--jj-sev-crit-soft); color: var(--jj-sev-crit-ink); }
.jj-est-coment.is-btn { border: 0; font: inherit; font-size: 11px; height: 24px; padding: 0 8px; cursor: pointer; flex: none; }
.jj-est-coment.is-btn:hover { filter: brightness(.95); }

/* data de pagamento com intensidade */
.jj-est-pgto { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: var(--jj-r-pill); color: var(--jj-text-2); background: var(--jj-panel-2); white-space: nowrap; }
.jj-est-pgto strong { font-weight: 500; }
.jj-est-pgto.is-quente  { background: var(--jj-sev-crit-soft); color: var(--jj-sev-crit-ink); animation: jjPulsoPgto 2.4s ease-in-out infinite; }
.jj-est-pgto.is-vencido { background: var(--jj-sev-crit-soft); color: var(--jj-sev-crit-ink); }
.jj-est-pgto.is-proximo { background: var(--jj-sev-warn-soft); color: var(--jj-sev-warn-ink); }
.jj-est-pgto.is-semana  { background: var(--jj-panel-2); color: var(--jj-text-2); }
.jj-est-pgto.is-normal  { background: none; color: var(--jj-text-3); padding-left: 0; }
.jj-est-pgto.is-semdata { background: none; border: 1px dashed var(--jj-border-2); color: var(--jj-text-4); }
@keyframes jjPulsoPgto {
  0%, 100% { box-shadow: 0 0 0 0 rgba(208, 59, 59, .28); }
  50%      { box-shadow: 0 0 0 5px rgba(208, 59, 59, 0); }
}
@media (prefers-reduced-motion: reduce) { .jj-est-pgto.is-quente { animation: none; } }

/* marca 100% finalizado e origem do atrito */
.jj-est-tag100 {
  display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: 11px; padding: 2px 8px;
  border-radius: var(--jj-r-pill); border: 1px dashed var(--jj-border-2); background: none; color: var(--jj-text-3); cursor: pointer;
}
.jj-est-tag100.is-on { border: 1px solid transparent; background: var(--jj-sev-ok-soft); color: var(--jj-sev-ok-ink); }
.jj-est-tag100.is-static { cursor: default; }
.jj-est-origem { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: var(--jj-r-pill); background: var(--jj-sev-warn-soft); color: var(--jj-sev-warn-ink); }

/* passo extra ao mover */
.jj-est-overlay { position: fixed; inset: 0; background: rgba(36, 36, 36, .35); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.jj-est-dialog { background: var(--jj-white); border-radius: var(--jj-r-card); padding: 22px 24px; width: 100%; max-width: 440px; box-shadow: var(--jj-shadow-pop); display: flex; flex-direction: column; gap: 14px; }
.jj-est-dialog-t { display: flex; align-items: center; gap: 8px; font-size: 18px; color: var(--jj-ink); }
.jj-est-dialog-t svg { color: var(--jj-sev-warn-ink); }
.jj-est-dialog-sub { font-size: 13px; color: var(--jj-text-3); margin-top: -8px; }
.jj-est-dialog-sub strong { color: var(--jj-text-2); font-weight: 500; }
.jj-est-campo { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--jj-text-3); }
.jj-est-campo em, .jj-est-check em { font-style: normal; color: var(--jj-text-5); }
.jj-est-campo input, .jj-est-campo textarea {
  border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-field); padding: 10px 12px;
  font: inherit; font-size: 13.5px; color: var(--jj-ink); resize: vertical;
}
.jj-est-campo input:focus, .jj-est-campo textarea:focus { outline: 2px solid var(--jj-orange-200); border-color: var(--jj-orange); }
.jj-est-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--jj-ink); cursor: pointer; }
.jj-est-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--jj-sev-ok); }
.jj-est-check span { display: flex; flex-direction: column; gap: 2px; }
.jj-est-check strong { font-weight: 500; }
.jj-est-erro { font-size: 12.5px; color: var(--jj-sev-crit-ink); }
.jj-est-dialog-acoes { display: flex; justify-content: flex-end; gap: 10px; }
.jj-est-btn { height: 40px; padding: 0 20px; border: 0; border-radius: var(--jj-r-pill); background: var(--jj-orange); color: var(--jj-white); font: inherit; font-size: 13.5px; cursor: pointer; }
.jj-est-btn:disabled { background: var(--jj-disabled); cursor: default; }

/* lista: indicador de comentários na linha */
.jj-row-coment { display: inline-flex; margin-top: 4px; }

.jj-est-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* atalhos para as etapas: só aparecem quando nem todas as colunas cabem */
.jj-est-atalhos { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 2px; }
.jj-est-atalhos button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--jj-border); border-radius: var(--jj-r-pill); background: var(--jj-white);
  font: inherit; font-size: 12.5px; color: var(--jj-text-2); cursor: pointer; white-space: nowrap;
}
.jj-est-atalhos button:hover { border-color: var(--jj-orange-line); color: var(--jj-ink); }
.jj-est-atalhos button > span:last-child { font-size: 11.5px; color: var(--jj-text-4); }
.jj-est-atalhos svg { color: var(--jj-st-warn-dot); }


@media (max-width: 760px) {
  /* Celular: uma coluna por vez, com encaixe ao deslizar; a próxima aparece na borda. */
  .jj-est-board { scroll-snap-type: x mandatory; gap: 10px; }
  .jj-est-col { flex-basis: min(84vw, 320px); scroll-snap-align: start; max-height: calc(100vh - 110px); }
  .jj-est-conector { display: none; }
  .jj-est-taxas { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; font-size: 11.5px; color: var(--jj-text-4); }
  .jj-est-taxas strong { font-weight: 500; color: var(--jj-ink); }
  .jj-vistas { max-width: 100%; overflow-x: auto; }
  .jj-vista { white-space: nowrap; padding: 7px 12px; }
  /* Filtros em duas colunas e mais baixos: empilhados, empurravam a esteira para fora da tela. */
  .jj-filters { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
  .jj-filters > .jj-field { grid-column: 1 / -1; }
  .jj-filters .jj-field, .jj-filters .jj-select, .jj-filters .jj-more-btn { height: 42px; font-size: 13px; }
  .jj-h1.is-lg { font-size: 30px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Dashboard: fechados × recebidos por data de fechamento (JJFechamentos)
   Uma barra por dia: o fechado em cinza, o já recebido preenchendo por dentro,
   em verde (cor do status Recebido). Largura fixa e grupo centralizado — em
   monitor largo, barras finas espalhadas não se liam. Texto sempre em tinta.
   ═══════════════════════════════════════════════════════════════════════════ */
.jj-fech { background: var(--jj-white); border-radius: var(--jj-r-card); padding: 26px 30px 24px; margin-top: 22px; box-shadow: var(--jj-shadow-card); }
.jj-fech-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.jj-fech-head .jj-card-note { max-width: 560px; }
.jj-fech-toggle { flex: none; background: none; border: 1px solid var(--jj-border); border-radius: var(--jj-r-pill); height: 32px; padding: 0 14px; font: inherit; font-size: 12.5px; color: var(--jj-text-2); cursor: pointer; }
.jj-fech-toggle:hover { border-color: var(--jj-orange-line); color: var(--jj-orange-ink); }
.jj-fech-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; margin-top: 18px; align-items: start; }
.jj-fech-main { min-width: 0; }
.jj-fech-legenda { display: flex; align-items: center; gap: 18px; font-size: 12px; color: var(--jj-text-3); }
.jj-fech-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.jj-fech i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.jj-fech i.is-fechado { background: var(--jj-text-6); }
.jj-fech i.is-recebido { background: var(--jj-st-mint-dot); }
.jj-fech i.is-inadimplente { background: var(--jj-sev-crit); }
.jj-fech i.is-andamento { background: var(--jj-panel-2); border: 1px solid var(--jj-text-6); }
.jj-fech-vazio { font-size: 13px; color: var(--jj-text-4); padding: 60px 0; text-align: center; border: 1px dashed var(--jj-border-2); border-radius: 14px; margin-top: 14px; }
.jj-fech-plot { display: flex; gap: 10px; margin-top: 16px; }
.jj-fech-eixo { display: flex; flex-direction: column; justify-content: space-between; height: 200px; margin-top: 22px; font-size: 11px; color: var(--jj-text-5); text-align: right; min-width: 18px; font-variant-numeric: tabular-nums; }
.jj-fech-eixo span { line-height: 0; }
.jj-fech-area { position: relative; flex: 1; min-width: 0; }
.jj-fech-grade { position: absolute; left: 0; right: 0; top: 22px; height: 200px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.jj-fech-grade i { display: block; width: 100%; height: 1px; border-radius: 0; background: var(--jj-divider); }
.jj-fech-grade i:last-child { background: var(--jj-border-2); }
.jj-fech-barras { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: clamp(6px, 2vw, 28px); height: 248px; padding: 0 8px; overflow-x: auto; }
.jj-fech-grupo {
  flex: 0 0 auto; width: 48px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  height: 100%; padding: 0; border: 0; background: none; font: inherit; cursor: default; border-radius: 8px;
}
.jj-fech-grupo:hover, .jj-fech-grupo.is-ativo { background: var(--jj-off-white); }
.jj-fech-grupo:focus-visible { outline: 1px solid var(--jj-orange-200); outline-offset: -1px; }
.jj-fech-val { height: 22px; font-size: 12px; color: var(--jj-text-3); line-height: 22px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jj-fech-val b { font-weight: 500; color: var(--jj-sev-ok-ink); }
.jj-fech-bar { position: relative; display: block; width: 30px; max-height: 200px; background: var(--jj-text-6); border-radius: 6px 6px 0 0; overflow: hidden; transition: height .35s ease; }
.jj-fech-grupo:not(.is-vazio) .jj-fech-bar { min-height: 3px; }
.jj-fech-bar i.is-recebido { position: absolute; left: 0; right: 0; bottom: 0; width: auto; border-radius: 0; transition: height .35s ease; }
.jj-fech-grupo:hover .jj-fech-bar, .jj-fech-grupo.is-ativo .jj-fech-bar { background: var(--jj-text-5); }
.jj-fech-rotulo { height: 26px; line-height: 26px; font-size: 11.5px; color: var(--jj-text-4); white-space: nowrap; }
.jj-fech-rotulo.is-oculto { visibility: hidden; }
.jj-fech-tip {
  position: absolute; top: 0; right: 0; z-index: 2; display: flex; flex-direction: column; gap: 4px;
  background: var(--jj-white); border: 1px solid var(--jj-border); border-radius: 12px; box-shadow: var(--jj-shadow-pop);
  padding: 10px 14px; font-size: 12.5px; color: var(--jj-text-2); pointer-events: none; max-width: 300px;
}
.jj-fech-tip strong { font-weight: 500; color: var(--jj-ink); }
.jj-fech-tip span { display: inline-flex; align-items: center; gap: 7px; }
.jj-fech-tip em { font-style: normal; font-size: 11.5px; color: var(--jj-text-4); margin-top: 2px; }
/* lado: resumo do período */
.jj-fech-lado { background: var(--jj-off-white); border-radius: 16px; padding: 18px 20px; }
.jj-fech-lado-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.jj-fech-lado-num { font-size: 30px; font-weight: 300; line-height: 1.1; color: var(--jj-ink); }
.jj-fech-lado-num.is-recebido { color: var(--jj-sev-ok-ink); font-weight: 400; }
.jj-fech-lado-leg { font-size: 13px; color: var(--jj-text-2); margin-top: 2px; }
.jj-fech-lado-sub { font-size: 11.5px; color: var(--jj-text-4); margin-top: 1px; }
.jj-fech-faixa { display: flex; gap: 2px; height: 10px; margin-top: 16px; border-radius: 5px; overflow: hidden; background: var(--jj-border); }
.jj-fech-faixa i { height: 100%; width: 0; border-radius: 0; border: 0; }
.jj-fech-faixa i.is-andamento { background: var(--jj-text-6); }
.jj-fech-lista { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jj-fech-lista li { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 8px; font-size: 12.5px; color: var(--jj-text-2); }
.jj-fech-lista strong { font-weight: 500; color: var(--jj-ink); font-variant-numeric: tabular-nums; }
.jj-fech-lista em { font-style: normal; font-size: 11.5px; color: var(--jj-text-4); min-width: 64px; text-align: right; }
.jj-fech-tabela-wrap { overflow-x: auto; margin-top: 4px; }
.jj-fech-tabela { width: 100%; border-collapse: collapse; font-size: 12.5px; color: var(--jj-text-2); }
.jj-fech-tabela th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--jj-text-4); padding: 8px 10px; border-bottom: 1px solid var(--jj-border); }
.jj-fech-tabela td { padding: 8px 10px; border-bottom: 1px solid var(--jj-divider); white-space: nowrap; }
.jj-fech-tabela td:first-child { text-transform: capitalize; }
.jj-fech-aviso { font-size: 11.5px; color: var(--jj-text-4); margin-top: 14px; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .jj-fech-bar, .jj-fech-bar i.is-recebido { transition: none; } }
@media (max-width: 1100px) {
  .jj-fech-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .jj-fech { padding: 20px 16px; }
  .jj-fech-head { flex-direction: column; gap: 10px; }
  .jj-fech-barras { justify-content: flex-start; gap: 10px; }
  .jj-fech-grupo { width: 40px; }
  .jj-fech-bar { width: 24px; }
  .jj-fech-tip { position: static; margin-top: 10px; max-width: none; }
  .jj-fech-plot { flex-wrap: wrap; }
  .jj-fech-lado-top { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Painel de TV (JJTv): aba própria, fundo claro, letra grande para ler a
   3 metros. Laranja só como destaque; status com as cores da esteira.
   ═══════════════════════════════════════════════════════════════════════════ */
/* A página rola; cada coluna da esteira rola por dentro, como no Kanban. */
.jj-tv { min-height: 100vh; box-sizing: border-box; background: var(--jj-off-white); padding: 18px 28px 18px; display: flex; flex-direction: column; gap: 14px; font-size: 16px; color: var(--jj-ink); }
.jj-tv-topo { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.jj-tv-marca { display: flex; align-items: center; gap: 14px; }
.jj-tv-logo { width: 46px; height: 46px; border-radius: 14px; background: var(--jj-orange); color: var(--jj-white); display: grid; place-items: center; font-size: 24px; font-weight: 600; }
.jj-tv-titulo { font-size: 22px; font-weight: 500; }
.jj-tv-sub { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--jj-text-4); margin-top: 2px; }
.jj-tv-pulso { width: 8px; height: 8px; border-radius: 50%; background: var(--jj-sev-ok); animation: jjPulsoPgto 2.4s ease-in-out infinite; }
.jj-tv-periodos { display: flex; align-items: center; gap: 4px; padding: 4px; background: var(--jj-white); border-radius: var(--jj-r-pill); box-shadow: var(--jj-shadow-soft); flex-wrap: wrap; }
.jj-tv-periodo { border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--jj-text-3); padding: 8px 14px; border-radius: var(--jj-r-pill); cursor: pointer; }
.jj-tv-periodo.is-on { background: var(--jj-orange); color: var(--jj-white); }
.jj-tv-periodo:hover:not(.is-on) { background: var(--jj-off-white); color: var(--jj-ink); }
.jj-tv-datas { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px 0 4px; font-size: 12.5px; color: var(--jj-text-4); }
.jj-tv-datas input { height: 32px; border: 1px solid var(--jj-border-2); border-radius: 10px; padding: 0 8px; font: inherit; font-size: 13px; color: var(--jj-ink); background: var(--jj-white); }
.jj-tv-relogio { text-align: right; }
.jj-tv-hora { font-size: 40px; font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.jj-tv-data { font-size: 14px; color: var(--jj-text-4); text-transform: capitalize; margin-top: 4px; }

.jj-tv-placar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.jj-tv-tile { background: var(--jj-white); border-radius: 20px; padding: 16px 22px; box-shadow: var(--jj-shadow-card); border-top: 5px solid var(--jj-text-6); }
.jj-tv-tile.is-recebido { border-top-color: var(--jj-st-mint-dot); }
.jj-tv-tile.is-receber { border-top-color: var(--jj-orange); }
.jj-tv-tile-rotulo { font-size: 14px; color: var(--jj-text-3); letter-spacing: .02em; }
.jj-tv-tile-valor { font-size: 40px; font-weight: 400; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.jj-tv-tile.is-recebido .jj-tv-tile-valor { color: var(--jj-sev-ok-ink); }
.jj-tv-tile-sub { font-size: 13.5px; color: var(--jj-text-4); margin-top: 6px; }
.jj-tv-tile-sub .is-alerta { color: var(--jj-sev-crit-ink); font-weight: 500; }

.jj-tv-alertas { display: flex; gap: 12px; flex-wrap: wrap; }
.jj-tv-alerta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--jj-r-pill); background: var(--jj-sev-warn-soft); color: var(--jj-sev-warn-ink); font-size: 15px; }
.jj-tv-alerta strong { font-weight: 500; }
.jj-tv-alerta.is-quente { background: var(--jj-sev-crit-soft); color: var(--jj-sev-crit-ink); }

/* Esteira na largura toda (como o Kanban); embaixo, o feed e os últimos leads lado a lado. */
.jj-tv-corpo { display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }
.jj-tv-esteira { flex: none; }
.jj-tv-secao-titulo { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--jj-text-4); margin-bottom: -4px; }
.jj-tv-baixo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.jj-tv-esteira { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
/* As colunas e cards são os mesmos do Kanban (.jj-est-col / .jj-card), só travados na altura da TV. */
.jj-tv .jj-est-col { flex: none; width: auto; max-height: 70vh; min-height: 260px; }
.jj-tv .jj-est-col-body { overflow-y: auto; }
.jj-tv .jj-card { cursor: default; margin-bottom: 8px; padding: 10px 11px 9px; }
.jj-tv .jj-card:hover { border-color: var(--jj-border); box-shadow: var(--jj-shadow-soft); }
.jj-tv .jj-card-nome { font-size: 13.5px; }
.jj-tv .jj-card-valores { margin-top: 7px; padding: 6px 9px; }
.jj-tv .jj-card-rodape { margin-top: 8px; padding-top: 8px; }
.jj-tv .jj-card-rodape .jj-tv-badge { flex: 1; min-width: 0; height: 24px; font-size: 11px; padding: 0 9px; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 24px; }
.jj-tv .jj-card-av { margin-left: auto; }
.jj-tv .jj-card.is-mudou { box-shadow: 0 0 0 3px var(--jj-orange-200); animation: jjTvMudou 1.2s ease-in-out 2; }
.jj-tv .jj-est-mais.is-static { cursor: default; border-style: solid; }
.jj-tv-col { background: var(--jj-white); border-radius: 18px; padding: 14px 12px 12px; box-shadow: var(--jj-shadow-card); display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.jj-tv-col.is-comercial { background: var(--jj-orange-50); box-shadow: inset 0 0 0 1px var(--jj-orange-200); }
.jj-tv-col.is-passagem { background: linear-gradient(180deg, var(--jj-orange-50), var(--jj-white)); box-shadow: inset 0 0 0 1px var(--jj-orange-200); }
.jj-tv-col.is-atrito { box-shadow: inset 0 0 0 1px var(--jj-sev-warn); }
.jj-tv-col-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.jj-tv-col-nome { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 500; line-height: 1.2; min-width: 0; }
.jj-tv-col.is-atrito .jj-tv-col-nome svg { color: var(--jj-st-warn-dot); }
.jj-tv-col-qtd { font-size: 24px; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.jj-tv-col-valor { font-size: 13px; color: var(--jj-text-4); margin-top: 2px; }
.jj-tv-col-lista { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: hidden; }
.jj-tv-mini { background: var(--jj-white); border: 1px solid var(--jj-border); border-radius: 10px; padding: 7px 9px; min-width: 0; transition: box-shadow .3s ease; }
.jj-tv-mini.is-mudou { box-shadow: 0 0 0 3px var(--jj-orange-200); animation: jjTvMudou 1.2s ease-in-out 2; }
@keyframes jjTvMudou { 50% { background: var(--jj-orange-100); } }
.jj-tv-mini-nome { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13.5px; font-weight: 500; line-height: 1.25; overflow: hidden; }
.jj-tv-mini-sub { display: block; font-size: 11.5px; color: var(--jj-text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jj-tv-mais { font-size: 12px; color: var(--jj-text-4); text-align: center; padding: 2px; }
.jj-tv-vazio { font-size: 13px; color: var(--jj-text-5); text-align: center; padding: 10px 0; }

.jj-tv-feed { background: var(--jj-white); border-radius: 18px; padding: 16px 18px; box-shadow: var(--jj-shadow-card); display: flex; flex-direction: column; min-height: 0; }
.jj-tv-feed-titulo, .jj-tv-rodape-titulo { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--jj-text-4); }
.jj-tv-feed-lista { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.jj-tv-ev { display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; font-size: 14px; line-height: 1.3; flex: none; }
.jj-tv-ev.is-novo { background: var(--jj-orange-50); }
.jj-tv-ev strong { font-weight: 500; }
.jj-tv-ev em { font-style: normal; color: var(--jj-orange-ink); }
.jj-tv-ev q { quotes: '“' '”'; color: var(--jj-text-3); }
.jj-tv-ev-quem { font-weight: 500; }
.jj-tv-ev-ico { color: var(--jj-text-5); display: inline-flex; width: 14px; }
.jj-tv-ev.is-comentario .jj-tv-ev-ico { color: var(--jj-text-4); }
.jj-tv-ev.is-marca .jj-tv-ev-ico { color: var(--jj-sev-ok-ink); }
.jj-tv-ev-quando { font-size: 12px; color: var(--jj-text-5); white-space: nowrap; }
.jj-tv-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--jj-orange-100); color: var(--jj-orange-ink); font-size: 12px; font-weight: 500; display: inline-grid; place-items: center; flex: none; }

.jj-tv-rodape { background: var(--jj-white); border-radius: 18px; padding: 16px 18px; box-shadow: var(--jj-shadow-card); position: sticky; top: 14px; }
.jj-tv-recentes { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.jj-tv-recente { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; background: var(--jj-off-white); border-radius: 12px; padding: 8px 12px; min-width: 0; flex: none; }
.jj-tv-recente .jj-card-av { width: 30px; height: 30px; font-size: 11px; }
.jj-tv-recente-txt { min-width: 0; }
.jj-tv-recente-nome { font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jj-tv-recente-sub { font-size: 12px; color: var(--jj-text-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jj-tv-recente-meta { font-size: 11.5px; color: var(--jj-text-5); text-align: right; white-space: nowrap; line-height: 1.3; }

@media (max-width: 1500px) {
  .jj-tv-tile-valor { font-size: 36px; }
}
@media (max-width: 1200px) {
  .jj-tv-baixo { grid-template-columns: 1fr; }
  .jj-tv-esteira { grid-template-columns: repeat(4, minmax(0, 1fr)); height: auto; }
  .jj-tv-placar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .jj-tv-pulso, .jj-tv .jj-card.is-mudou { animation: none; } }

/* ═══ Configurações › Equipe (JJEquipe) ═══ */
.jjx .jj-modal.is-config { max-width: min(680px, calc(100vw - 40px)); }
.jj-equipe { margin-top: 14px; }
.jj-equipe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 8px; }
.jj-equipe-campo { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--jj-text-3); min-width: 0; }
.jj-equipe-campo em { font-style: normal; color: var(--jj-text-5); }
.jj-equipe-campo input, .jj-equipe-campo select {
  height: 42px; border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-field); padding: 0 12px;
  font: inherit; font-size: 13.5px; color: var(--jj-ink); background: var(--jj-white); width: 100%; min-width: 0;
}
.jj-equipe-campo input:focus, .jj-equipe-campo select:focus { outline: 2px solid var(--jj-orange-200); border-color: var(--jj-orange); }
.jj-equipe-campo small { font-size: 11.5px; color: var(--jj-text-5); }
.jj-equipe-senha { display: flex; gap: 6px; }
.jj-equipe-senha input { flex: 1; }
.jj-equipe-senha button { flex: none; height: 42px; padding: 0 10px; border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-field); background: var(--jj-white); font: inherit; font-size: 12px; color: var(--jj-text-2); cursor: pointer; }
.jj-equipe-senha button:hover { border-color: var(--jj-orange-line); color: var(--jj-orange-ink); }
.jj-equipe-msg { margin-top: 12px; font-size: 12.5px; border-radius: 10px; padding: 9px 12px; display: flex; align-items: center; gap: 6px; }
.jj-equipe-msg.is-erro { background: var(--jj-sev-crit-soft); color: var(--jj-sev-crit-ink); }
.jj-equipe-msg.is-ok { background: var(--jj-sev-ok-soft); color: var(--jj-sev-ok-ink); }
.jj-equipe-msg strong { font-weight: 500; }
.jj-equipe-lista { list-style: none; margin: 8px 0 0; padding: 0; max-height: 240px; overflow-y: auto; }
.jj-equipe-lista li { display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--jj-divider); font-size: 13px; }
.jj-equipe-acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.jj-equipe-visao { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--jj-text-3); cursor: pointer; white-space: nowrap; }
.jj-equipe-visao input { accent-color: var(--jj-orange); }
.jj-equipe-lista .jj-card-av { width: 30px; height: 30px; font-size: 11px; }
.jj-equipe-nome { display: flex; flex-direction: column; min-width: 0; color: var(--jj-ink); }
.jj-equipe-nome small { font-size: 11.5px; color: var(--jj-text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jj-equipe-cargo { font-size: 11.5px; padding: 2px 9px; border-radius: var(--jj-r-pill); background: var(--jj-panel-2); color: var(--jj-text-2); white-space: nowrap; }
.jj-equipe-cargo.is-socio, .jj-equipe-cargo.is-admin { background: var(--jj-orange-100); color: var(--jj-orange-ink); }
.jj-equipe-cargo.is-manager { background: var(--jj-st-lilac-soft); color: var(--jj-st-lilac-ink); }
.jj-equipe-status { font-size: 11px; color: var(--jj-text-5); }
.jj-equipe-vazio { font-size: 12.5px; color: var(--jj-text-4); padding: 10px 4px; }
.jj-equipe-nota { font-size: 11.5px; color: var(--jj-text-4); margin-top: 10px; }
@media (max-width: 640px) { .jj-equipe-grid { grid-template-columns: 1fr; } }

/* etiqueta do escritório parceiro no card e na lista */
.jj-card-tag.is-escritorio, .jj-tag.is-escritorio { background: var(--jj-st-lilac-soft); color: var(--jj-st-lilac-ink); }

/* diagnóstico do próprio acesso nas Configurações */
.jj-acesso-diag { margin-top: 14px; font-size: 12.5px; line-height: 1.5; padding: 9px 12px; border-radius: 10px; background: var(--jj-sev-warn-soft); color: var(--jj-sev-warn-ink); }
.jj-acesso-diag.is-ok { background: var(--jj-sev-ok-soft); color: var(--jj-sev-ok-ink); }
.jj-acesso-diag strong { font-weight: 500; }

/* SLA (dias úteis no status) e previsão do banco no card — spec de recebimento, seção 5 */
.jj-card-sla { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: var(--jj-r-pill); white-space: nowrap; }
.jj-card-sla i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.jj-card-sla.is-verde    { background: var(--jj-sev-ok-soft);   color: var(--jj-sev-ok-ink); }
.jj-card-sla.is-amarelo  { background: var(--jj-sev-warn-soft); color: var(--jj-sev-warn-ink); }
.jj-card-sla.is-vermelho { background: var(--jj-sev-crit-soft); color: var(--jj-sev-crit-ink); }
.jj-card-previsao { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: var(--jj-r-pill); background: var(--jj-panel-2); color: var(--jj-text-2); white-space: nowrap; }
.jj-card-previsao.is-ok { background: var(--jj-sev-ok-soft); color: var(--jj-sev-ok-ink); }
.jj-card-acao { margin-top: 8px; font-size: 11.5px; line-height: 1.35; color: var(--jj-text-2); background: var(--jj-off-white); border-radius: 8px; padding: 6px 8px; }
.jj-card-acao strong { font-weight: 500; color: var(--jj-ink); }
.jj-card-acao span { color: var(--jj-text-4); }
.jj-card-acao.is-atrasada { background: var(--jj-sev-crit-soft); color: var(--jj-sev-crit-ink); }
.jj-card-acao.is-atrasada span, .jj-card-acao.is-atrasada strong { color: var(--jj-sev-crit-ink); }

/* Dashboard: Time interno × Escritórios (JJOrigemFiltro) */
.jj-origem { margin-top: 18px; background: var(--jj-white); border-radius: var(--jj-r-panel); box-shadow: var(--jj-shadow-soft); padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; }
.jj-origem-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.jj-origem-op { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid var(--jj-border); background: var(--jj-white); border-radius: 12px; padding: 7px 14px; font: inherit; cursor: pointer; text-align: left; }
.jj-origem-op:hover { border-color: var(--jj-orange-line); }
.jj-origem-op.is-on { border-color: var(--jj-orange); background: var(--jj-orange-50); }
.jj-origem-rotulo { font-size: 13.5px; color: var(--jj-ink); font-weight: 500; }
.jj-origem-num { font-size: 11.5px; color: var(--jj-text-4); font-variant-numeric: tabular-nums; }
.jj-origem-sel { height: 40px; min-width: 220px; }
.jj-origem-barra { grid-column: 1 / -1; display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--jj-border); }
.jj-origem-barra i, .jj-origem-legenda i { display: block; height: 100%; }
.jj-origem i.is-interno { background: var(--jj-orange); }
.jj-origem i.is-escritorio { background: var(--jj-st-lilac-dot); }
.jj-origem-legenda { grid-column: 1 / -1; display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12px; color: var(--jj-text-3); }
.jj-origem-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.jj-origem-legenda i { width: 9px; height: 9px; border-radius: 3px; }
.jj-origem-nota { color: var(--jj-text-5); }
@media (max-width: 760px) { .jj-origem { grid-template-columns: 1fr; } .jj-origem-sel { min-width: 0; width: 100%; } }

/* Fase 3: ações de recebimento no card */
button.jj-card-previsao { border: 0; font: inherit; font-size: 11px; cursor: pointer; }
.jj-card-previsao.is-acao { background: var(--jj-white); border: 1px dashed var(--jj-sev-ok); color: var(--jj-sev-ok-ink); }
.jj-card-previsao.is-acao:hover { background: var(--jj-sev-ok-soft); }
.jj-card-previsao.is-alerta { background: var(--jj-sev-warn-soft); color: var(--jj-sev-warn-ink); }
.jj-card-painel { margin-top: 8px; padding: 8px; border-radius: 10px; background: var(--jj-off-white); border: 1px solid var(--jj-border); display: grid; gap: 6px; cursor: default; }
.jj-card-painel-t { font-size: 11.5px; font-weight: 500; color: var(--jj-ink); }
.jj-card-painel textarea, .jj-card-painel input[type=date] { border: 1px solid var(--jj-border-2); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 12.5px; color: var(--jj-ink); background: var(--jj-white); resize: vertical; width: 100%; box-sizing: border-box; }
.jj-card-painel-data { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--jj-text-3); }
.jj-card-painel-data input { width: auto; flex: 1; }
.jj-card-painel-acoes { display: flex; justify-content: flex-end; gap: 6px; }
.jj-card-painel-acoes button { border: 1px solid var(--jj-border-2); background: var(--jj-white); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12px; color: var(--jj-text-2); cursor: pointer; }
.jj-card-painel-acoes button.is-primary { background: var(--jj-orange); border-color: var(--jj-orange); color: var(--jj-white); }
.jj-card-painel-acoes button:disabled { background: var(--jj-disabled); border-color: var(--jj-disabled); color: var(--jj-white); cursor: default; }

/* Lead › Histórico (linha do tempo) */
.jj-linha-tempo { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-height: 380px; overflow-y: auto; }
.jj-linha-tempo li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding: 0 0 14px; position: relative; }
.jj-linha-tempo li::before { content: ''; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--jj-border); }
.jj-linha-tempo li:last-child::before { display: none; }
.jj-linha-tempo-ponto { width: 14px; height: 14px; border-radius: 50%; background: var(--jj-white); border: 3px solid var(--jj-orange); margin-top: 3px; box-sizing: border-box; }
.jj-linha-tempo-t { font-size: 13.5px; color: var(--jj-ink); font-weight: 500; }
.jj-linha-tempo-sub { font-size: 12px; color: var(--jj-text-4); margin-top: 1px; }
.jj-linha-tempo-nota { font-size: 12.5px; color: var(--jj-text-2); margin-top: 4px; background: var(--jj-off-white); border-radius: 8px; padding: 6px 9px; }

/* Fase 4: SLA na lista, "Só vermelhos" e ordenação */
.jj-vistas-extras { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jj-so-vermelhos { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--jj-border); border-radius: var(--jj-r-pill); background: var(--jj-white); font: inherit; font-size: 12.5px; color: var(--jj-text-2); cursor: pointer; }
.jj-so-vermelhos i { width: 8px; height: 8px; border-radius: 50%; background: var(--jj-sev-crit); }
.jj-so-vermelhos.is-on { background: var(--jj-sev-crit-soft); border-color: var(--jj-sev-crit); color: var(--jj-sev-crit-ink); }
.jj-ordem { height: 34px; font-size: 12.5px; }
.jj-row-sla { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.jj-row-acao { margin-top: 5px; font-size: 11.5px; color: var(--jj-text-3); max-width: 220px; }
.jj-resp-name small.jj-resp-ops { display: block; font-size: 11px; color: var(--jj-text-4); }

/* Fase 5: "Contar por", meta do mês e taxa abaixo da meta */
.jj-contar-por { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; color: var(--jj-text-4); }
.jj-contar-por > span { margin-right: 4px; }
.jj-contar-por button { border: 1px solid var(--jj-border); background: var(--jj-white); border-radius: var(--jj-r-pill); padding: 6px 12px; font: inherit; font-size: 12.5px; color: var(--jj-text-2); cursor: pointer; }
.jj-contar-por button.is-on { background: var(--jj-ink); border-color: var(--jj-ink); color: var(--jj-white); }
.jj-big-rate.is-abaixo { color: var(--jj-sev-crit-ink); }
.jj-meta { margin-top: 18px; background: var(--jj-white); border-radius: var(--jj-r-card); box-shadow: var(--jj-shadow-card); padding: 22px 26px; display: grid; gap: 12px; }
.jj-meta-topo { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.jj-meta-valor { font-size: 15px; color: var(--jj-text-3); margin-top: 6px; }
.jj-meta-valor strong { font-size: 32px; font-weight: 400; color: var(--jj-sev-ok-ink); }
.jj-meta-valor span { color: var(--jj-text-4); }
.jj-meta-numeros { display: flex; gap: 26px; flex-wrap: wrap; }
.jj-meta-numeros > div { display: grid; }
.jj-meta-numeros b { font-size: 20px; font-weight: 400; font-variant-numeric: tabular-nums; }
.jj-meta-numeros b.is-previsto { color: var(--jj-ink); }
.jj-meta-numeros b.is-falta { color: var(--jj-sev-crit-ink); }
.jj-meta-numeros b.is-ok { color: var(--jj-sev-ok-ink); }
.jj-meta-numeros span { font-size: 12px; color: var(--jj-text-4); }
.jj-meta-barra { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--jj-border); gap: 2px; }
.jj-meta-barra i, .jj-meta-legenda i { display: block; height: 100%; }
.jj-meta i.is-recebido { background: var(--jj-st-mint-dot); }
.jj-meta i.is-previsto { background: repeating-linear-gradient(135deg, var(--jj-st-mint) 0 6px, var(--jj-sev-ok-soft) 6px 12px); }
.jj-meta i.is-falta { background: var(--jj-border); }
.jj-meta-legenda { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 12px; color: var(--jj-text-3); }
.jj-meta-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.jj-meta-legenda i { width: 10px; height: 10px; border-radius: 3px; }

/* Gestão › Operação do dia (fila, previsão de caixa, relatório) */
.jj-opdia { background: var(--jj-white); border-radius: var(--jj-r-card); box-shadow: var(--jj-shadow-card); padding: 22px 26px; margin-bottom: 22px; display: grid; gap: 14px; }
.jj-opdia-topo { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.jjx .jj-opdia-abas { margin-top: 0; border-bottom: 0; }
.jj-opdia-filas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.jj-opdia-fila { background: var(--jj-off-white); border-radius: 14px; padding: 12px; border-top: 4px solid var(--jj-text-6); min-width: 0; }
.jj-opdia-fila.is-confirmar { border-top-color: var(--jj-st-blue-dot); }
.jj-opdia-fila.is-cobrar { border-top-color: var(--jj-orange); }
.jj-opdia-fila.is-escalar { border-top-color: var(--jj-sev-crit); }
.jj-opdia-fila.is-destravar { border-top-color: var(--jj-sev-warn); }
.jj-opdia-fila-t { display: grid; gap: 2px; margin-bottom: 8px; }
.jj-opdia-fila-t strong { font-size: 14px; font-weight: 500; color: var(--jj-ink); }
.jj-opdia-fila-t span { font-size: 12px; color: var(--jj-text-4); }
.jj-opdia-fila ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.jj-opdia-fila li { background: var(--jj-white); border-radius: 10px; padding: 8px 10px; display: grid; gap: 3px; }
.jj-opdia-nome { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 500; color: var(--jj-ink); text-align: left; cursor: pointer; }
.jj-opdia-nome:hover { color: var(--jj-orange-ink); }
.jj-opdia-sub { font-size: 11.5px; color: var(--jj-text-3); }
.jj-opdia-acao { justify-self: start; display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--jj-sev-ok); background: var(--jj-white); color: var(--jj-sev-ok-ink); border-radius: var(--jj-r-pill); padding: 2px 9px; font: inherit; font-size: 11px; cursor: pointer; }
.jj-opdia-vazio, .jj-opdia-mais { font-size: 12px; color: var(--jj-text-5); }
.jj-opdia-caixa table { width: 100%; border-collapse: collapse; font-size: 13px; }
.jj-opdia-caixa th { text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--jj-text-4); padding: 8px 10px; border-bottom: 1px solid var(--jj-border); }
.jj-opdia-caixa td { padding: 9px 10px; border-bottom: 1px solid var(--jj-divider); font-variant-numeric: tabular-nums; }
.jj-opdia-caixa tr.is-atual td { background: var(--jj-orange-50); font-weight: 500; }
.jj-opdia-caixa tr.is-atrasado td { color: var(--jj-sev-crit-ink); }
.jj-opdia-barra { display: inline-block; width: 120px; height: 8px; border-radius: 4px; background: var(--jj-border); margin-right: 10px; vertical-align: middle; overflow: hidden; }
.jj-opdia-barra i { display: block; height: 100%; background: var(--jj-st-mint-dot); }
.jj-opdia-total { font-size: 13px; color: var(--jj-text-3); }
.jj-opdia-total strong { color: var(--jj-ink); font-weight: 500; }
.jj-opdia-rel { display: grid; gap: 10px; }
.jj-opdia-rel pre { margin: 0; white-space: pre-wrap; background: var(--jj-off-white); border-radius: 12px; padding: 14px 16px; font: 12.5px/1.55 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--jj-ink); max-height: 420px; overflow: auto; }
.jj-opdia-rel .jj-modal-btn { justify-self: start; }
@media (max-width: 1100px) { .jj-opdia-filas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .jj-opdia-filas { grid-template-columns: 1fr; } .jj-opdia-caixa { overflow-x: auto; } .jj-opdia-barra { width: 60px; } }

/* Mudança de status sem documentação completa */
.jj-semdocs .jj-confirm-text strong { color: var(--jj-text-1, inherit); font-weight: 600; }
.jj-semdocs form { margin-top: 18px; text-align: left; }
.jj-semdocs-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--jj-text-2, inherit); }
.jj-semdocs textarea { width: 100%; box-sizing: border-box; }
.jj-semdocs-nota { font-size: 12px; color: var(--jj-text-3); margin-top: 6px; line-height: 1.45; }
.jj-semdocs .jj-modal-btn[disabled] { opacity: .5; cursor: not-allowed; }
.jj-card-docs.is-excecao { border-style: dashed; }

/* Cliente de redução (comissão de 100%): tag e filtro */
.jj-card-tag.is-reducao, .jj-tag.is-reducao { display: inline-flex; align-items: center; gap: 3px; background: var(--jj-st-mint-soft); color: var(--jj-st-mint-ink); }
.jj-so-reducao { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--jj-border); border-radius: var(--jj-r-pill); background: var(--jj-white); font: inherit; font-size: 12.5px; color: var(--jj-text-2); cursor: pointer; }
.jj-so-reducao svg { color: var(--jj-st-mint-ink); }
.jj-so-reducao.is-on { background: var(--jj-st-mint-soft); border-color: var(--jj-st-mint-ink); color: var(--jj-st-mint-ink); }

/* Link de convite: geração (Configurações › Equipe) e página do convite */
.jj-convite-form { margin-top: 22px; }
.jj-convite-link { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.jj-convite-link input { flex: 1 1 260px; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-field); font: inherit; font-size: 12.5px; color: var(--jj-text-2); background: var(--jj-bg, #faf8f6); }
.jj-convite-link a.jj-modal-btn { text-decoration: none; display: inline-flex; align-items: center; }

.jj-convite { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--jj-bg, #f7f4f1); box-sizing: border-box; }
.jj-convite-caixa { width: 100%; max-width: 420px; background: var(--jj-white); border-radius: 18px; box-shadow: var(--jj-shadow-card); padding: 32px 28px; box-sizing: border-box; text-align: center; }
.jj-convite-logo { height: 36px; margin: 0 auto 18px; display: block; }
.jj-convite h1 { font-size: 20px; font-weight: 500; margin: 0 0 6px; color: var(--jj-text-1, #1a1a1a); }
.jj-convite-sub { font-size: 13px; color: var(--jj-text-3); margin: 0 0 20px; line-height: 1.5; }
.jj-convite-sub strong { color: var(--jj-text-1, #1a1a1a); font-weight: 600; }
.jj-convite form { text-align: left; }
.jj-convite form h1, .jj-convite form .jj-convite-sub { text-align: center; }
.jj-convite-campo { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--jj-text-3); margin-bottom: 12px; }
.jj-convite-campo em { font-style: normal; color: var(--jj-text-5); }
.jj-convite-campo input { height: 42px; padding: 0 12px; border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-field); font: inherit; font-size: 14px; color: var(--jj-text-1, #1a1a1a); background: var(--jj-white); box-sizing: border-box; width: 100%; }
.jj-convite-campo input[readonly] { background: var(--jj-bg, #faf8f6); color: var(--jj-text-3); }
.jj-convite-campo input:focus { outline: 2px solid var(--jj-orange-200); border-color: var(--jj-orange); }
.jj-convite-campo small.is-erro { color: var(--jj-sev-crit-ink); font-size: 11.5px; }
.jj-convite-senha { display: flex; gap: 6px; }
.jj-convite-senha input { flex: 1; }
.jj-convite-senha button { flex: none; height: 42px; padding: 0 10px; border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-field); background: var(--jj-white); font: inherit; font-size: 12px; color: var(--jj-text-2); cursor: pointer; }
.jj-convite-enviar { width: 100%; margin-top: 8px; justify-content: center; }
.jj-convite-enviar[disabled] { opacity: .5; cursor: not-allowed; }
.jj-convite-ico { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.jj-convite-ico.is-ok { background: var(--jj-st-green-soft); color: var(--jj-st-green-ink); }
.jj-convite-ico.is-erro { background: var(--jj-sev-crit-soft); color: var(--jj-sev-crit-ink); }


/* ============================================================
   Auditoria de 06/11/2026 (impeccable): contraste, foco visível,
   login, ficha do lead, Gestão e Lista no celular.
   ============================================================ */

/* Laranja como TEXTO usa o tom escuro; o #FF6709 fica para fundos e marcas. */
.jjx .jj-origin, .jjx .jj-net, .jjx .jj-tab.is-on, .jjx .jj-input.is-accent { color: var(--jj-orange-ink); }

/* Foco visível ao navegar pelo teclado (antes só a borda mudava, 1,4:1). */
.jjx :is(.jj-input, .jj-select, .jj-nova-select, .jj-range input):focus-visible {
  outline: 2px solid var(--jj-orange-ink); outline-offset: 1px;
}
.jjx :is(.jj-search, .jj-field):focus-within { outline: 2px solid var(--jj-orange-ink); outline-offset: 1px; }

/* Login: centralizado na tela (antes ficava preso no canto superior esquerdo). */
.jj-login-tela {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: 24px 16px; box-sizing: border-box; background: var(--jj-bg, #F6F5F2);
}

/* Ficha do lead: largura de verdade, altura estável (a barra de abas não pula). */
.jjx .jj-modal.is-lead {
  width: min(760px, calc(100vw - 40px));
  height: min(820px, calc(100vh - 40px));
  height: min(820px, calc(100dvh - 40px));
  display: flex; flex-direction: column;
}
.jjx .jj-modal.is-lead .jj-tabs { flex: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.jjx .jj-modal.is-lead .jj-tabs::-webkit-scrollbar { display: none; }
.jjx .jj-modal.is-lead .jj-tab { white-space: nowrap; flex: none; }

/* Gestão no celular: a coluna não estoura a tela; as abas rolam por dentro. */
.jj-opdia { grid-template-columns: minmax(0, 1fr); }
.jjx .jj-opdia-abas { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.jjx .jj-opdia-abas::-webkit-scrollbar { display: none; }
.jjx .jj-opdia-abas .jj-tab { white-space: nowrap; flex: none; }

/* Lista da Central até 1240px: cada lead vira um bloco, com as ações à vista
   (antes, de 760 a 1240px, a tabela rolava para os lados e cortava colunas). */
@media (max-width: 1240px) {
  .jj-table { overflow: visible; }
  .jj-table-inner { min-width: 0; }
  .jj-th { display: none; }
  .jj-tr { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; padding: 16px; align-items: start; }
  .jj-tr > :nth-child(1), .jj-tr > :nth-child(4), .jj-tr > :nth-child(7) { grid-column: 1 / -1; }
  .jj-tr > :nth-child(3), .jj-tr > :nth-child(6) { text-align: right; justify-self: end; }
  .jj-row-actions { justify-content: flex-start; padding-top: 4px; border-top: 1px solid var(--jj-divider); }
}

/* Alvos de toque: no celular/tablet, botões pequenos ganham área de 40px. */
@media (pointer: coarse) {
  .jj-act { min-width: 40px; min-height: 40px; }
  .jj-gst-link { min-height: 40px; display: inline-flex; align-items: center; }
}
.jjx .jj-modal.is-lead { overflow: hidden; }
.jjx .jj-modal.is-lead > .jj-modal-head, .jjx .jj-modal.is-lead > .jj-tabs, .jjx .jj-modal.is-lead > .jj-modal-actions { flex: none; }
.jjx .jj-lead-corpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; margin-right: -4px; }
@media (max-width: 640px) {
  .jjx .jj-modal.is-lead { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
}

/* ============================================================
   Escritórios (JJEscritorios.tsx): lista com o estado de cada
   escritório, convite por link e detalhe. Laranja só na ação.
   ============================================================ */
.jj-esc-resumo { margin: 18px 0 0; font-size: 14px; color: var(--jj-text-3); }
.jj-esc-resumo strong { color: var(--jj-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.jj-esc-resumo strong.is-alerta { color: var(--jj-sev-crit-ink); }

.jj-esc-barra { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 18px 0 14px; }
.jj-esc-filtros { display: inline-flex; gap: 4px; padding: 4px; background: var(--jj-white); border: 1px solid var(--jj-border); border-radius: var(--jj-r-pill); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.jj-esc-filtros button { border: 0; background: transparent; padding: 8px 14px; border-radius: var(--jj-r-pill); font: inherit; font-size: 13px; color: var(--jj-text-3); cursor: pointer; white-space: nowrap; min-height: 36px; }
.jj-esc-filtros button.is-on { background: var(--jj-ink); color: var(--jj-white); }
.jj-esc-busca { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; background: var(--jj-white); border: 1px solid var(--jj-border); border-radius: var(--jj-r-pill); color: var(--jj-text-4); min-width: 260px; flex: 0 1 340px; box-sizing: border-box; }
.jj-esc-busca:focus-within { outline: 2px solid var(--jj-orange-ink); outline-offset: 1px; }
.jj-esc-busca input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--jj-ink); flex: 1; min-width: 0; }

.jj-esc-lista { list-style: none; margin: 0; padding: 0; background: var(--jj-white); border-radius: var(--jj-r-box, 18px); border: 1px solid var(--jj-border); overflow: hidden; }
.jj-esc-item {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 1.3fr) auto;
  gap: 8px 18px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--jj-divider);
}
.jj-esc-item:last-child { border-bottom: 0; }
.jj-esc-nome { font-size: 15px; font-weight: 500; color: var(--jj-ink); overflow-wrap: anywhere; }
.jj-esc-quem { font-size: 12.5px; color: var(--jj-text-4); margin-top: 2px; overflow-wrap: anywhere; }
.jj-esc-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 10px; border-radius: var(--jj-r-pill); white-space: nowrap; }
.jj-esc-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.jj-esc-status.is-ativo { background: var(--jj-st-green-soft); color: var(--jj-st-green-ink); }
.jj-esc-status.is-aguardando { background: var(--jj-st-amber-soft); color: var(--jj-st-amber-ink); }
.jj-esc-status.is-vencido { background: var(--jj-sev-crit-soft, #FBE5E5); color: var(--jj-sev-crit-ink, #A12828); }
.jj-esc-status.is-inativo { background: var(--jj-off-white); color: var(--jj-text-4); }
.jj-esc-numeros { display: flex; gap: 16px; font-size: 13px; color: var(--jj-text-4); flex-wrap: wrap; }
.jj-esc-numeros strong { color: var(--jj-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.jj-esc-acoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.jj-esc-acoes .jj-modal-btn { min-height: 40px; }
.jj-esc-item-link { grid-column: 1 / -1; }

.jj-esc-link { display: grid; gap: 10px; margin-top: 4px; }
.jj-esc-link input { width: 100%; box-sizing: border-box; height: 42px; padding: 0 12px; border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-field, 12px); background: var(--jj-off-white); font: inherit; font-size: 12.5px; color: var(--jj-text-2); }
.jj-esc-link-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.jj-esc-link-acoes .jj-modal-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.jj-esc-nota { font-size: 12px; color: var(--jj-text-4); }
.jj-esc-texto { font-size: 13.5px; color: var(--jj-text-3); line-height: 1.55; margin: 6px 0 16px; }
.jj-esc-texto strong { color: var(--jj-ink); font-weight: 500; }
.jj-esc-vazio { font-size: 13px; color: var(--jj-text-4); padding: 12px 0; }

.jjx .jj-modal.jj-esc-novo { width: min(480px, calc(100vw - 40px)); }
.jjx .jj-modal.jj-esc-detalhe { width: min(720px, calc(100vw - 40px)); }
.jj-esc-detalhe-corpo { display: grid; gap: 22px; margin-top: 18px; }
.jj-esc-pessoas, .jj-esc-leads { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.jj-esc-pessoas li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--jj-divider); }
.jj-esc-pessoa { font-size: 13.5px; color: var(--jj-ink); display: grid; overflow-wrap: anywhere; }
.jj-esc-pessoa small { font-size: 12px; color: var(--jj-text-4); }
.jj-esc-cargo { font-size: 12px; color: var(--jj-text-3); }
.jj-esc-leads li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--jj-divider); font-size: 13px; color: var(--jj-ink); }
.jj-esc-leads li small { color: var(--jj-text-4); font-size: 12px; white-space: nowrap; }
.jj-esc-convidar { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--jj-off-white); }
.jj-esc-convidar-linha { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.jj-esc-convidar-linha input, .jj-esc-convidar-linha select { height: 42px; padding: 0 12px; border: 1px solid var(--jj-border-2); border-radius: var(--jj-r-field, 12px); background: var(--jj-white); font: inherit; font-size: 13.5px; color: var(--jj-ink); min-width: 0; }
.jj-esc-convidar-linha :is(input, select):focus-visible { outline: 2px solid var(--jj-orange-ink); outline-offset: 1px; }

@media (max-width: 900px) {
  .jj-esc-item { grid-template-columns: minmax(0, 1fr) auto; padding: 16px; }
  .jj-esc-principal { grid-column: 1 / -1; }
  .jj-esc-numeros { grid-column: 1 / -1; }
  .jj-esc-acoes { grid-column: 1 / -1; justify-content: flex-start; }
  .jj-esc-busca { min-width: 0; flex: 1 1 100%; }
}
@media (max-width: 560px) {
  .jj-esc-convidar-linha { grid-template-columns: 1fr; }
  .jj-esc-status { white-space: normal; }
}
.jjx .jj-modal-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.jj-esc-link { max-width: 640px; }
.jj-esc-link-acoes .jj-modal-btn { flex: 0 0 auto; justify-content: center; }
.jj-esc-item-link { padding: 4px 0 2px; }
@media (max-width: 560px) {
  .jj-esc-link-acoes .jj-modal-btn { flex: 1 1 100%; min-width: 0; }
}

/* ============================================================
   Varredura visual (06/11/2026): botões e responsividade
   ============================================================ */
/* Barra do topo no celular: os ícones encolhem/rolam e nunca cobrem o "Sair". */
@media (max-width: 860px) {
  .jj-nav-logo { flex: none; }
  .jj-nav-items { flex: 1 1 auto; min-width: 0; scrollbar-width: none; margin: 0 8px; }
  .jj-nav-items::-webkit-scrollbar { display: none; }
  .jj-nav-items > * { flex: none; }
  .jj-nav-foot { flex: none; }
}
@media (max-width: 420px) {
  .jj-nav { padding: 10px 12px; }
  .jj-nav-logo { width: 36px; height: 36px; }
  .jj-nav-items { gap: 6px; margin: 0 6px; }
  .jj-nav-btn { width: 42px; height: 42px; border-radius: 12px; }
}
/* Botões das janelas: ícone e texto sempre na mesma linha, centralizados
   (antes o ícone ficava "flutuando" em cima do texto quando o botão apertava). */
.jjx .jj-modal-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; line-height: 1.2; padding: 0 16px; }
.jjx .jj-modal-btn svg { flex: none; }
/* Arquivo do contrato na aba Análise: nome numa linha só, com reticências. */
.jjx .jj-analise-file { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 100%; }
.jjx .jj-analise-file-nome { flex: 1 1 160px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
@media (max-width: 640px) {
  /* Cabeçalho da ficha: nome com tamanho que cabe e telefone/origem sem corte. */
  .jjx .jj-modal.is-lead .jj-modal-title { font-size: 18px; line-height: 1.25; }
  .jjx .jj-lead-modal-id .jj-modal-sub { white-space: normal; overflow: visible; }
  .jjx .jj-lead-modal-id .jj-resp-av.is-lg { width: 40px; height: 40px; font-size: 13px; }
  .jjx .jj-lead-modal-id .jj-status-badge.is-static { margin-left: 53px; }
}
/* Cabeçalho das janelas no celular: o "×" fica sempre ao lado do título
   (a regra antiga deixava ele cair numa linha própria). */
@media (max-width: 640px) {
  .jjx .jj-modal-head { flex-wrap: nowrap; gap: 12px; }
  .jjx .jj-modal-head > :first-child { flex: 1 1 auto; min-width: 0; }
  .jjx .jj-modal-x { flex: none; }
}
@media (max-width: 640px) {
  /* Ficha: avatar | nome e contato em largura total; a etiqueta de status vai embaixo. */
  .jjx .jj-lead-modal-id { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 6px; align-items: center; }
  .jjx .jj-lead-modal-id .jj-status-badge.is-static { grid-column: 2; justify-self: start; margin-left: 0; }
  /* Rodapé: "Fechar" e "Salvar alterações" lado a lado, sem quebrar o texto. */
  .jjx .jj-modal-actions.is-split { gap: 8px; }
  .jjx .jj-modal-actions.is-split .jj-modal-btn { white-space: nowrap; padding: 0 10px; font-size: 13.5px; height: 46px; }
  .jjx .jj-modal-actions.is-split .jj-modal-btn svg { display: none; }
}
/* Nomes clicáveis da Gestão e da Operação do dia: área de toque maior no celular. */
@media (max-width: 860px) {
  .jj-opdia-nome, .jj-gst-nome { min-height: 36px; display: inline-flex; align-items: center; text-align: left; }
}
/* Ficha do lead sempre inteira na tela: desconta a margem da camada escura
   (40px em cima e embaixo no computador; 8px no celular). */
.jjx .jj-modal.is-lead { height: min(820px, calc(100vh - 80px)); height: min(820px, calc(100dvh - 80px)); }
@media (max-width: 640px) {
  .jj-overlay { padding: 8px; }
  .jjx .jj-modal.is-lead { width: calc(100vw - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); }
}
/* Toda janela cabe na tela; o conteúdo rola por dentro. */
.jjx .jj-modal { max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 640px) {
  .jjx .jj-modal { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); max-width: calc(100vw - 16px); }
}
/* Botões de janela: texto numa linha só; crescem para caber, sem quebrar. */
.jjx .jj-modal-actions .jj-modal-btn { white-space: nowrap; flex: 1 0 auto; }
/* Lista em blocos: dois blocos lado a lado no tablet, um no celular. */
@media (min-width: 761px) and (max-width: 1240px) {
  .jj-table-inner { display: grid; grid-template-columns: 1fr 1fr; }
  .jj-table-inner > :not(.jj-tr) { grid-column: 1 / -1; }
  .jj-table-inner > .jj-tr:nth-child(even) { box-shadow: inset -1px 0 0 var(--jj-divider); }
}
/* Links de texto: área de toque maior sem mexer no desenho (padding + margem negativa). */
.jj-gst-link, .jj-th button, .jjx .jj-analise-file.is-link, .jjx .jj-total-link { padding-block: 8px; margin-block: -8px; }
/* Nome do cliente na fila da Gestão: quebra linha em vez de cortar com reticências. */
.jj-gst-nome { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; text-align: left; }
/* Nome da etapa nos cards do topo da Central: até duas linhas, sem cortar
   ("Envio de Documentação" saía "Envio de Documentaç…" em telas grandes). */
.jj-status-bar { white-space: normal; text-overflow: clip; overflow: visible; line-height: 1.3; min-height: 2.6em; }
.jjx.jj-portal { background: transparent; }

/* ── Acessos (JJAcessos.tsx) ─────────────────────────────────────────── */
.jj-ac-barra-dir { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex: 1 1 auto; }
.jj-ac-explica { margin: -4px 0 12px; }
.jj-ac-aviso { margin: 0 0 12px; }
.jj-ac-item {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 10px 18px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--jj-divider);
}
.jj-ac-item:last-child { border-bottom: 0; }
.jj-ac-item.is-inativo .jj-ac-quem { opacity: .6; }
.jj-ac-quem { display: flex; gap: 12px; align-items: center; min-width: 0; }
.jj-ac-quem .jj-card-av { flex: none; }
.jj-ac-quem-txt { min-width: 0; }
.jj-ac-voce { margin-left: 8px; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: var(--jj-r-pill); background: var(--jj-off-white); color: var(--jj-text-3); vertical-align: 2px; }
.jj-ac-info { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.jj-ac-cargo-tag { font-size: 12.5px; font-weight: 500; color: var(--jj-ink); }
.jj-ac-acesso { font-size: 12px; color: var(--jj-text-4); }
.jj-ac-visao { min-width: 0; }
.jj-ac-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--jj-text-2); cursor: pointer; min-height: 40px; position: relative; }
.jj-ac-switch input { position: absolute; opacity: 0; width: 40px; height: 24px; margin: 0; cursor: pointer; }
.jj-ac-switch-trilho { flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--jj-border-2, #D9D5CF); position: relative; transition: background .15s ease; }
.jj-ac-switch-trilho::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s ease; }
.jj-ac-switch input:checked + .jj-ac-switch-trilho { background: var(--jj-st-green-ink, #15803d); }
.jj-ac-switch input:checked + .jj-ac-switch-trilho::after { transform: translateX(16px); }
.jj-ac-switch input:focus-visible + .jj-ac-switch-trilho { outline: 2px solid var(--jj-orange-ink); outline-offset: 2px; }
.jj-ac-switch input:disabled + .jj-ac-switch-trilho { opacity: .5; }

.jjx .jj-modal.jj-ac-modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
.jj-ac-corpo { display: grid; gap: 16px; margin: 18px 0 4px; }
.jj-ac-corpo .jj-equipe-grid { margin-top: 0; }
.jj-ac-grupo { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.jj-ac-grupo legend { font-size: 12.5px; color: var(--jj-text-3); padding: 0; margin-bottom: 6px; }
.jj-ac-cargos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jj-ac-cargo { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--jj-border-2); border-radius: 14px; cursor: pointer; background: var(--jj-white); }
.jj-ac-cargo.is-on { border-color: var(--jj-ink); box-shadow: inset 0 0 0 1px var(--jj-ink); }
.jj-ac-cargo input { margin: 3px 0 0; accent-color: var(--jj-ink); flex: none; }
.jj-ac-cargo span { display: grid; gap: 2px; min-width: 0; }
.jj-ac-cargo strong { font-size: 13.5px; font-weight: 500; color: var(--jj-ink); }
.jj-ac-cargo small { font-size: 12px; color: var(--jj-text-4); line-height: 1.4; }
.jj-ac-cargo:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.jj-ac-chave { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--jj-off-white); cursor: pointer; }
.jj-ac-chave input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--jj-ink); flex: none; }
.jj-ac-chave span { display: grid; gap: 3px; }
.jj-ac-chave strong { font-size: 13.5px; font-weight: 500; color: var(--jj-ink); }
.jj-ac-chave small { font-size: 12px; color: var(--jj-text-4); line-height: 1.45; }
.jj-ac-nota { font-size: 12px; color: var(--jj-text-4); line-height: 1.45; }
.jj-ac-pronto { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--jj-st-green-soft); color: var(--jj-st-green-ink); font-size: 13px; }
.jj-ac-pronto > div:first-child { display: flex; gap: 6px; align-items: center; }
.jj-ac-pronto pre { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--jj-white); color: var(--jj-ink); font: inherit; font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.jj-ac-pronto-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.jj-ac-pronto-acoes .jj-modal-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

@media (max-width: 900px) {
  .jj-ac-item { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  .jj-ac-quem { grid-column: 1 / -1; }
  .jj-ac-info { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .jj-ac-visao { grid-column: 1; }
  .jj-ac-item .jj-esc-acoes { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .jj-ac-barra-dir { justify-content: flex-start; flex: 1 1 100%; }
}
@media (max-width: 560px) {
  .jj-ac-cargos { grid-template-columns: 1fr; }
  .jj-ac-corpo .jj-equipe-grid { grid-template-columns: 1fr; }
  .jj-ac-pronto-acoes .jj-modal-btn { flex: 1 1 100%; }
}
.jj-ac-switch { white-space: nowrap; }
@media (max-width: 900px) {
  .jj-ac-item .jj-esc-acoes .jj-modal-btn { min-width: 88px; }
}
@media (max-width: 900px) {
  .jj-ac-info { grid-column: 1 / -1; }
  .jj-ac-item .jj-esc-acoes { grid-column: 2; grid-row: auto; }
}

/* ── Tutorial de primeiro acesso (JJTutorial.tsx) ────────────────────── */
.jj-tut-fundo { position: fixed; inset: 0; z-index: 400; background: rgba(28, 24, 20, .38); display: flex; align-items: flex-end; justify-content: center; padding: 24px; box-sizing: border-box; animation: jj-tut-in .2s ease; }
.jj-tut { width: min(600px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; background: var(--jj-white); border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.22); padding: 20px 24px 20px; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; animation: jj-tut-sobe .28s cubic-bezier(.2,.8,.2,1); }
.jj-tut-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.jj-tut-contador { font-size: 12px; color: var(--jj-text-4); font-variant-numeric: tabular-nums; }
.jj-tut-pular { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--jj-text-3); cursor: pointer; padding: 8px 4px; min-height: 36px; }
.jj-tut-pular:hover { color: var(--jj-ink); }
.jj-tut-barra { height: 4px; border-radius: 4px; background: var(--jj-off-white); overflow: hidden; }
.jj-tut-barra span { display: block; height: 100%; background: var(--jj-orange); border-radius: 4px; transition: width .3s ease; }
.jj-tut-conteudo { display: grid; gap: 12px; animation: jj-tut-in .25s ease; }
.jj-tut-conteudo h2 { margin: 2px 0 0; font-size: 22px; line-height: 1.25; font-weight: 500; color: var(--jj-ink); letter-spacing: -.01em; }
.jj-tut-texto { font-size: 14px; line-height: 1.6; color: var(--jj-text-2); }
.jj-tut-texto p { margin: 0 0 8px; }
.jj-tut-texto p:last-child { margin-bottom: 0; }
.jj-tut-texto ul, .jj-tut-texto ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.jj-tut-texto strong { color: var(--jj-ink); font-weight: 500; }
.jj-tut-dica { margin-top: 10px !important; padding: 10px 12px; border-radius: 12px; background: var(--jj-off-white); font-size: 13px; }
.jj-tut-etapas { list-style: none; padding: 0 !important; gap: 10px !important; }
.jj-tut-etapas li { display: flex; gap: 12px; align-items: flex-start; }
.jj-tut-etapas li > span:last-child { display: grid; gap: 1px; }
.jj-tut-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 500; margin-top: 1px; }
.jj-tut-num.is-comercial { background: var(--jj-orange-50); color: var(--jj-orange-ink); box-shadow: inset 0 0 0 1px var(--jj-orange-200); }
.jj-tut-num.is-operacao { background: var(--jj-off-white); color: var(--jj-ink); box-shadow: inset 0 0 0 1px var(--jj-border-2); }
.jj-tut-num.is-atrito { background: var(--jj-st-amber-soft); color: var(--jj-st-amber-ink); }
.jj-tut-tag { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: var(--jj-r-pill); font-weight: 500; }
.jj-tut-tag.is-comercial { background: var(--jj-orange-50); color: var(--jj-orange-ink); box-shadow: inset 0 0 0 1px var(--jj-orange-200); }
.jj-tut-tag.is-operacao { background: var(--jj-off-white); color: var(--jj-ink); box-shadow: inset 0 0 0 1px var(--jj-border-2); }
.jj-tut-esteira { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.jj-tut-col { border-radius: 10px; padding: 8px 6px; min-height: 92px; display: flex; flex-direction: column; gap: 5px; background: var(--jj-off-white); box-shadow: inset 0 0 0 1px var(--jj-border); animation: jj-tut-sobe .35s ease both; }
.jj-tut-col span { font-size: 10.5px; line-height: 1.25; color: var(--jj-ink); font-weight: 500; min-height: 26px; }
.jj-tut-col i { display: block; height: 16px; border-radius: 5px; background: var(--jj-white); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.jj-tut-col.is-comercial { background: var(--jj-orange-50); box-shadow: inset 0 0 0 1px var(--jj-orange-200); }
.jj-tut-col.is-atrito { background: var(--jj-st-amber-soft); box-shadow: none; }
.jj-tut-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #111; }
.jj-tut-video iframe, .jj-tut-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.jj-tut-acoes { display: flex; justify-content: space-between; gap: 10px; padding-top: 4px; }
.jj-tut-acoes .jj-modal-btn { min-width: 120px; min-height: 44px; justify-content: center; }
@keyframes jj-tut-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes jj-tut-sobe { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .jj-tut-fundo { padding: 10px; }
  .jj-tut { padding: 16px; border-radius: 18px; max-height: calc(100dvh - 20px); }
  .jj-tut-conteudo h2 { font-size: 19px; }
  .jj-tut-esteira { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .jj-tut-acoes .jj-modal-btn { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .jj-tut-fundo, .jj-tut, .jj-tut-conteudo, .jj-tut-col { animation: none; }
}
.jj-nav-ajuda > span[aria-hidden] { width: 20px; height: 20px; border-radius: 50%; border: 1.7px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; line-height: 1; }
.jj-tut-col span { overflow-wrap: anywhere; }
