/**
 * CRM: Kanban do funil e trilha de etapas. CSS estatico (o Tailwind do
 * Filament e pre-compilado e nao conhece classes novas). Usa os tokens do
 * Filament (--gray-*, --primary-*) para claro e escuro; a cor de cada etapa
 * chega por --stage. Movimento so em transform/opacity/box-shadow.
 */
.nc-kb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.nc-kb-search { position: relative; flex: 1 1 18rem; max-width: 26rem; }
.nc-kb-search input {
    width: 100%; height: 2.5rem; padding: 0 .75rem 0 2.25rem; border-radius: .75rem;
    border: 1px solid rgb(var(--gray-200)); background: #fff; font: inherit; font-size: .875rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.nc-kb-search input:focus { outline: none; border-color: rgb(var(--primary-500)); box-shadow: 0 0 0 4px rgb(var(--primary-500) / .12); }
.nc-kb-search-icon { position: absolute; left: .7rem; top: 50%; width: 1rem; height: 1rem; transform: translateY(-50%); color: rgb(var(--gray-400)); }
.nc-kb-seg { display: inline-flex; padding: 3px; border-radius: .75rem; background: rgb(var(--gray-100)); }
.nc-kb-seg button { border: 0; background: transparent; padding: .4rem .9rem; border-radius: .6rem; font-size: .8125rem; font-weight: 600; color: rgb(var(--gray-600)); cursor: pointer; }
.nc-kb-seg button.is-on { background: #fff; color: rgb(var(--gray-950)); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.nc-kb-seg button:focus-visible { outline: 2px solid rgb(var(--primary-500)); outline-offset: 1px; }
.nc-kb-hint { font-size: .75rem; color: rgb(var(--gray-500)); }

.nc-kb { display: flex; gap: .875rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; scroll-snap-type: x proximity; transition: opacity .15s ease; }
.nc-kb.is-busy { opacity: .7; }
.nc-kb-col {
    flex: 0 0 18.5rem; display: flex; flex-direction: column; max-height: calc(100vh - 13rem);
    border-radius: 1rem; background: rgb(var(--gray-50)); border: 1px solid rgb(var(--gray-200));
    scroll-snap-align: start;
}
.nc-kb-col-head { padding: .85rem .9rem .7rem; border-top: 4px solid var(--stage); border-radius: 1rem 1rem 0 0; }
.nc-kb-col-title { display: flex; align-items: center; gap: .5rem; }
.nc-kb-col-title h2 { margin: 0; font-size: .9rem; font-weight: 800; letter-spacing: -.01em; color: rgb(var(--gray-950)); flex: 1; }
.nc-kb-col-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--stage); }
.nc-kb-count { min-width: 1.5rem; padding: 0 .4rem; border-radius: 999px; background: rgb(var(--gray-200)); font-size: .72rem; font-weight: 700; text-align: center; color: rgb(var(--gray-700)); }
.nc-kb-col-meta { display: flex; justify-content: space-between; margin-top: .35rem; font-size: .75rem; color: rgb(var(--gray-500)); font-variant-numeric: tabular-nums; }
.nc-kb-col-meta strong { color: rgb(var(--gray-800)); font-weight: 700; }

.nc-kb-list { flex: 1; min-height: 4rem; overflow-y: auto; padding: .25rem .6rem .6rem; display: flex; flex-direction: column; gap: .55rem; }
.nc-kb-card {
    position: relative; padding: .7rem .75rem .7rem .9rem; border-radius: .8rem; background: #fff; cursor: grab;
    border: 1px solid rgb(var(--gray-200)); box-shadow: 0 1px 2px rgb(0 0 0 / .04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.nc-kb-card::before { content: ''; position: absolute; left: 0; top: .7rem; bottom: .7rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--stage); opacity: .85; }
.nc-kb-card:hover { box-shadow: 0 8px 18px -10px rgb(0 0 0 / .25); border-color: rgb(var(--gray-300)); }
/* Card que acabou de mudar de etapa: pulso limao curto (confirma a acao). */
.nc-kb-landed { animation: nc-kb-land 700ms cubic-bezier(.2, .8, .2, 1); }
@keyframes nc-kb-land {
    0% { box-shadow: 0 0 0 0 rgb(174 201 11 / .7); }
    100% { box-shadow: 0 0 0 10px rgb(174 201 11 / 0); }
}
.nc-kb-card:active { cursor: grabbing; }
.nc-kb-ghost { opacity: .35; }
.nc-kb-chosen { box-shadow: 0 14px 28px -12px rgb(0 0 0 / .35); }
.nc-kb-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.nc-kb-code { font: 700 .68rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; color: rgb(var(--gray-500)); }
.nc-kb-temp { font-size: .66rem; font-weight: 700; padding: .12rem .45rem; border-radius: 999px; }
.nc-kb-temp-quente { background: #fde8e7; color: #b42318; }
.nc-kb-temp-morna { background: #fef3c7; color: #92400e; }
.nc-kb-temp-fria { background: #e0f2fe; color: #075985; }
.nc-kb-title { display: block; margin-top: .35rem; font-weight: 700; font-size: .875rem; line-height: 1.3; color: rgb(var(--gray-950)); text-decoration: none; }
.nc-kb-title:hover { text-decoration: underline; text-underline-offset: 2px; }
.nc-kb-title:focus-visible { outline: 2px solid rgb(var(--primary-500)); outline-offset: 2px; border-radius: 4px; }
.nc-kb-customer { margin: .15rem 0 0; font-size: .78rem; color: rgb(var(--gray-500)); }
.nc-kb-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: .55rem; gap: .5rem; }
.nc-kb-value { font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; color: rgb(var(--gray-900)); }
.nc-kb-chip { font-size: .68rem; font-weight: 700; padding: .12rem .45rem; border-radius: .4rem; background: rgb(var(--gray-100)); color: rgb(var(--gray-700)); }
.nc-kb-card-meta { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; font-size: .7rem; color: rgb(var(--gray-500)); }
.nc-kb-owner { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: rgb(var(--primary-600)); color: #fff; font-size: .62rem; font-weight: 800; }
.nc-kb-late { margin-left: auto; font-weight: 700; color: #b42318; }
.nc-kb-empty { margin: .25rem 0; padding: 1.1rem .5rem; border: 1.5px dashed rgb(var(--gray-300)); border-radius: .8rem; text-align: center; font-size: .78rem; color: rgb(var(--gray-500)); }
.nc-kb-add { display: flex; align-items: center; gap: .35rem; margin: 0 .6rem .7rem; padding: .5rem .6rem; border-radius: .65rem; font-size: .78rem; font-weight: 600; color: rgb(var(--gray-600)); text-decoration: none; transition: background-color .15s ease; }
.nc-kb-add:hover { background: rgb(var(--gray-100)); color: rgb(var(--gray-900)); }
.nc-kb-add-icon { width: 1rem; height: 1rem; }
.nc-kb-col-won .nc-kb-col-head, .nc-kb-col-lost .nc-kb-col-head { background: color-mix(in srgb, var(--stage) 7%, transparent); }

.dark .nc-kb-search input { background: rgb(var(--gray-900)); border-color: rgb(var(--gray-700)); color: rgb(var(--gray-100)); }
.dark .nc-kb-seg { background: rgb(var(--gray-800)); }
.dark .nc-kb-seg button { color: rgb(var(--gray-300)); }
.dark .nc-kb-seg button.is-on { background: rgb(var(--gray-900)); color: #fff; }
.dark .nc-kb-col { background: rgb(var(--gray-900)); border-color: rgb(var(--gray-800)); }
.dark .nc-kb-col-title h2, .dark .nc-kb-title { color: rgb(var(--gray-50)); }
.dark .nc-kb-count { background: rgb(var(--gray-800)); color: rgb(var(--gray-200)); }
.dark .nc-kb-col-meta strong, .dark .nc-kb-value { color: rgb(var(--gray-100)); }
.dark .nc-kb-card { background: rgb(var(--gray-800)); border-color: rgb(var(--gray-700)); }
.dark .nc-kb-chip { background: rgb(var(--gray-700)); color: rgb(var(--gray-200)); }
.dark .nc-kb-empty { border-color: rgb(var(--gray-700)); color: rgb(var(--gray-500)); }
.dark .nc-kb-add { color: rgb(var(--gray-400)); }
.dark .nc-kb-add:hover { background: rgb(var(--gray-800)); color: #fff; }
.dark .nc-kb-temp-quente { background: rgb(180 35 24 / .25); color: #fca5a5; }
.dark .nc-kb-temp-morna { background: rgb(146 64 14 / .3); color: #fcd34d; }
.dark .nc-kb-temp-fria { background: rgb(7 89 133 / .3); color: #7dd3fc; }

/* Trilha de etapas no topo da oportunidade. */
.nc-trail { display: flex; gap: .3rem; align-items: stretch; flex-wrap: wrap; }
.nc-trail-step { flex: 1 1 6rem; min-width: 5.5rem; }
.nc-trail-bar { display: block; height: .4rem; border-radius: 999px; background: rgb(var(--gray-200)); }
.nc-trail-feita .nc-trail-bar { background: var(--stage); opacity: .55; }
.nc-trail-atual .nc-trail-bar { background: var(--stage); box-shadow: 0 0 0 3px color-mix(in srgb, var(--stage) 25%, transparent); }
.nc-trail-name { display: block; margin-top: .4rem; font-size: .72rem; font-weight: 600; color: rgb(var(--gray-500)); }
.nc-trail-atual .nc-trail-name { color: rgb(var(--gray-950)); font-weight: 800; }
.nc-trail-closed { align-self: center; margin-left: .5rem; padding: .3rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 800; color: #fff; background: var(--stage); }
.nc-trail-closed small { font-weight: 600; opacity: .85; margin-left: .25rem; }
.dark .nc-trail-bar { background: rgb(var(--gray-700)); }
.dark .nc-trail-atual .nc-trail-name { color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .nc-kb-card, .nc-kb, .nc-kb-search input, .nc-kb-add { transition: none; }
    .nc-kb-card:hover { transform: none; }
    .nc-kb-landed, .nc-journey-step.is-done .nc-journey-line::after { animation: none; }
}
/* Jornada da oportunidade (Etapa 9). Cada passo concluido "carrega" a linha
   limao uma vez ao abrir a tela; o proximo passo ganha o anel e o botao
   preenchido. Estado sempre em texto (.nc-journey-state). */
.nc-journey { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.nc-journey-step {
    position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1rem .9rem;
    border-radius: 1rem; background: #fff; border: 1px solid rgb(var(--gray-200)); overflow: hidden;
}
.nc-journey-step.is-current { border-color: var(--nc-lime-ink, #5F7300); box-shadow: 0 0 0 3px rgb(174 201 11 / .22); }
.nc-journey-line { position: absolute; inset: 0 0 auto 0; height: 4px; background: rgb(var(--gray-100)); }
.nc-journey-line::after {
    content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #5F7300, #AEC90B);
    transform: scaleX(0); transform-origin: left center;
}
.nc-journey-step.is-done .nc-journey-line::after { transform: scaleX(1); animation: nc-journey-fill 520ms cubic-bezier(.2, .8, .2, 1) both; }
.nc-journey-step:nth-child(2).is-done .nc-journey-line::after { animation-delay: 120ms; }
.nc-journey-step:nth-child(3).is-done .nc-journey-line::after { animation-delay: 240ms; }
@keyframes nc-journey-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.nc-journey-head { display: flex; align-items: center; gap: .65rem; }
.nc-journey-dot {
    flex: none; display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
    font-size: .8rem; font-weight: 800; background: rgb(var(--gray-100)); color: rgb(var(--gray-600));
}
.nc-journey-dot svg { width: 1rem; height: 1rem; }
.is-done .nc-journey-dot { background: #AEC90B; color: #1D2327; }
.is-current .nc-journey-dot { background: #1D2327; color: #AEC90B; }
.nc-journey-state { margin: 0; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--gray-500)); }
.is-current .nc-journey-state, .is-done .nc-journey-state { color: #5F7300; }
.nc-journey-title { margin: 0; font-size: .95rem; font-weight: 800; letter-spacing: -.01em; color: rgb(var(--gray-950)); }
.nc-journey-summary { margin: .2rem 0 0; font-size: .875rem; font-weight: 700; color: rgb(var(--gray-900)); font-variant-numeric: tabular-nums; }
.nc-journey-detail { margin: 0; font-size: .8rem; line-height: 1.45; color: rgb(var(--gray-600)); }
.nc-journey-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin-top: auto; padding-top: .55rem; }
.nc-journey-action {
    display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 .9rem; border-radius: .6rem;
    font-size: .8125rem; font-weight: 700; text-decoration: none; color: rgb(var(--gray-800));
    border: 1px solid rgb(var(--gray-300)); background: #fff; transition: background-color .14s ease, box-shadow .14s ease;
}
.nc-journey-action:hover { background: rgb(var(--gray-50)); box-shadow: 0 2px 6px -2px rgb(0 0 0 / .14); }
.nc-journey-action.is-primary { background: rgb(var(--primary-600)); border-color: transparent; color: #fff; }
.nc-journey-action.is-primary:hover { background: rgb(var(--primary-500)); }
.nc-journey-action:active { transform: translateY(1px); }
.nc-journey-link { font-size: .8125rem; font-weight: 600; color: rgb(var(--gray-600)); text-decoration: underline; text-underline-offset: 3px; }
.nc-journey-link:hover { color: rgb(var(--gray-950)); }
.nc-journey-action:focus-visible, .nc-journey-link:focus-visible { outline: 2px solid #5F7300; outline-offset: 2px; }
.dark .nc-journey-step { background: rgb(var(--gray-900)); border-color: rgb(var(--gray-800)); }
.dark .nc-journey-step.is-current { border-color: #AEC90B; }
.dark .nc-journey-line { background: rgb(var(--gray-800)); }
.dark .nc-journey-dot { background: rgb(var(--gray-800)); color: rgb(var(--gray-300)); }
.dark .is-current .nc-journey-dot { background: #AEC90B; color: #1D2327; }
.dark .is-current .nc-journey-state, .dark .is-done .nc-journey-state { color: #AEC90B; }
.dark .nc-journey-title, .dark .nc-journey-summary { color: rgb(var(--gray-50)); }
.dark .nc-journey-detail, .dark .nc-journey-link { color: rgb(var(--gray-400)); }
.dark .nc-journey-action { background: rgb(var(--gray-800)); border-color: rgb(var(--gray-700)); color: rgb(var(--gray-100)); }
.dark .nc-journey-action.is-primary { background: #AEC90B; color: #1D2327; }
.dark .nc-journey-action:focus-visible, .dark .nc-journey-link:focus-visible { outline-color: #AEC90B; }
@media (prefers-reduced-motion: reduce) {
    .nc-journey-step.is-done .nc-journey-line::after { animation: none; }
    .nc-journey-action { transition: none; }
    .nc-journey-action:active { transform: none; }
}

/* Mapa aberto a partir de uma oportunidade: faixa de contexto acima do mapa. */
.nc-mapa-deal {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .9rem; padding: .7rem 1rem;
    border-radius: .9rem; background: rgb(174 201 11 / .12); border: 1px solid rgb(174 201 11 / .45);
    animation: nc-enter 220ms cubic-bezier(.2, .8, .2, 1) both;
}
.nc-mapa-deal p { flex: 1 1 18rem; margin: 0; font-size: .85rem; color: rgb(var(--gray-800)); }
.nc-mapa-deal strong { color: rgb(var(--gray-950)); }
.nc-mapa-deal-dot { width: .6rem; height: .6rem; border-radius: 50%; background: #5F7300; box-shadow: 0 0 0 4px rgb(174 201 11 / .3); }
.nc-mapa-deal-back { font-size: .8125rem; font-weight: 700; color: rgb(var(--gray-900)); text-decoration: underline; text-underline-offset: 3px; }
.nc-mapa-deal-back:focus-visible { outline: 2px solid #5F7300; outline-offset: 2px; border-radius: 3px; }
.dark .nc-mapa-deal p { color: rgb(var(--gray-200)); }
.dark .nc-mapa-deal strong, .dark .nc-mapa-deal-back { color: #fff; }
.dark .nc-mapa-deal-dot { background: #AEC90B; }
@media (prefers-reduced-motion: reduce) { .nc-mapa-deal { animation: none; } }

/* Recepcao da tela inicial (WelcomeOverview). O bloco grafite e o unico
   momento "forte" do painel; textos sobre ele: branco 15:1, cinza #C9D0D3
   11:1, limao 8,4:1. Atalhos em cards claros, o primeiro com a linha de carga. */
.nc-home { display: grid; gap: 1rem; }
.nc-home-head {
    position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 1.25rem 2rem; padding: 1.6rem 1.75rem; border-radius: 1.25rem; color: #fff;
    background:
        radial-gradient(520px 260px at 100% 0%, rgb(174 201 11 / .28), transparent 70%),
        radial-gradient(420px 240px at 0% 120%, rgb(98 108 112 / .55), transparent 70%),
        #1D2327;
    box-shadow: 0 24px 48px -30px rgb(29 35 39 / .6);
}
.nc-home-head::after {
    content: ''; position: absolute; inset: auto 0 0 0; height: 3px;
    background: linear-gradient(90deg, #5F7300, #AEC90B 55%, transparent);
    transform-origin: left center; animation: nc-journey-fill 800ms cubic-bezier(.2, .8, .2, 1) 150ms both;
}
.nc-home-eyebrow { margin: 0 0 .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #AEC90B; }
.nc-home-title { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.nc-home-stats { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.nc-home-stats li { display: grid; gap: .1rem; min-width: 7.5rem; }
.nc-home-stats strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.nc-home-stats span { font-size: .78rem; color: #C9D0D3; }
.nc-home-stats li.is-attention strong { color: #AEC90B; }
.nc-home-actions { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.nc-home-action {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem;
    border-radius: 1rem; background: #fff; border: 1px solid rgb(var(--gray-200)); text-decoration: none; color: inherit;
    transition: box-shadow .16s ease, border-color .16s ease;
}
.nc-home-action:hover { border-color: rgb(var(--gray-300)); box-shadow: 0 14px 28px -20px rgb(29 35 39 / .45); }
.nc-home-action:focus-visible { outline: 2px solid #5F7300; outline-offset: 2px; }
.nc-home-action.is-primary::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, #5F7300, #AEC90B);
}
.nc-home-action-icon {
    flex: none; display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .8rem;
    background: rgb(var(--gray-100)); color: rgb(var(--gray-700));
}
.nc-home-action.is-primary .nc-home-action-icon { background: #1D2327; color: #AEC90B; }
.nc-home-action-body { display: grid; gap: .15rem; min-width: 0; }
.nc-home-action-title { font-size: .95rem; font-weight: 800; letter-spacing: -.01em; color: rgb(var(--gray-950)); }
.nc-home-action-text { font-size: .8rem; line-height: 1.4; color: rgb(var(--gray-600)); }
.nc-home-action-arrow { margin-left: auto; flex: none; color: rgb(var(--gray-400)); transition: transform .16s ease, color .16s ease; }
.nc-home-action:hover .nc-home-action-arrow { transform: translateX(3px); color: rgb(var(--gray-900)); }
.dark .nc-home-head { box-shadow: none; outline: 1px solid rgb(255 255 255 / .06); }
.dark .nc-home-action { background: rgb(var(--gray-900)); border-color: rgb(var(--gray-800)); }
.dark .nc-home-action-icon { background: rgb(var(--gray-800)); color: rgb(var(--gray-200)); }
.dark .nc-home-action.is-primary .nc-home-action-icon { background: #AEC90B; color: #1D2327; }
.dark .nc-home-action-title { color: #fff; }
.dark .nc-home-action-text { color: rgb(var(--gray-400)); }
.dark .nc-home-action:focus-visible { outline-color: #AEC90B; }
@media (prefers-reduced-motion: reduce) {
    .nc-home-head::after { animation: none; }
    .nc-home-action, .nc-home-action-arrow { transition: none; }
    .nc-home-action:hover .nc-home-action-arrow { transform: none; }
}
