@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&display=swap');

/* =====================================================================
   Identidade OSF no interior do painel.
   Dourado #fca311 sobre preto #0a0a0a, fundo #ebebed.
   Mira nos ganchos semanticos fi-* do Filament v3 (que nao tem regra
   propria: a estilizacao vem de utilitarios Tailwind inline no Blade,
   por isso o !important). Ver CLAUDE.md.
   ===================================================================== */

/* A largura da sidebar NAO vem daqui: e injetada inline pelo painel.
   Ver ->sidebarWidth() no AdminPanelProvider. */

/* O fundo do painel usa o CLARO PADRAO do Filament (bg-gray-50).
   Havia aqui um override para #ebebed (o cinza do design system antigo).
   Ele tinha especificidade 0,2,1 e ganhava do `.fi-body{#101010}` da tela
   de login (0,1,0) — resultado: o login ficava off-white em vez de escuro,
   e o painel ficava acinzentado em vez do claro normal. Removido. */

/* =====================================================================
   SIDEBAR — porte fiel da nav do index.php legado.
   A lista nativa do Filament fica ESCONDIDA e a nav vem do render hook
   SIDEBAR_NAV_START (resources/views/filament/sidebar/nav.blade.php), com
   as mesmas classes sb-* do legado. Tokens copiados do :root de la.
   ===================================================================== */

:root {
    --sb-bg: #0a0a0a;
    --sb-text: rgb(255 255 255 / 0.65);
    --sb-text-hi: #ffffff;
    --sb-line: rgb(255 255 255 / 0.08);
    --sb-hover: rgb(255 255 255 / 0.06);
}

/* fundo preto, sem sombra/anel do Filament */
.fi-sidebar,
.fi-sidebar-header {
    background-color: var(--sb-bg) !important;
}

.fi-sidebar {
    box-shadow: none !important;
    --tw-ring-color: transparent !important;
}

/* --- cabecalho: bloco alto e empilhado, no lugar da barra de 64px --- */
.fi-sidebar-header {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    box-shadow: inset 0 -1px 0 var(--sb-line) !important;
}

.fi-sidebar-header > div:first-child { width: 100%; }

/* o wrapper .fi-logo trava altura em 1.5rem e display:flex — solta os dois */
.fi-sidebar-header .fi-logo {
    display: block !important;
    width: 100%;
    height: auto !important;
}

.fi-sidebar-header a { display: block; text-decoration: none; }

.sb-logo {
    display: block;
    padding: 24px 20px 22px;
}

.sb-logo-icon {
    display: block;
    width: 48px;
    height: 40px;
    margin-bottom: 8px;
}

/* Wordmark e subtitulo sao SVG (ver brand.blade.php): as fontes da marca
   sao licenca de uso pessoal e nao podem ser publicadas como webfont.
   Altura fixa, largura automatica — o viewBox cuida da proporcao. */
.sb-logo-wordmark {
    display: block;
    height: 17px;
    width: auto;
    margin-bottom: 9px;
    color: #fff;
}

.sb-logo-sub {
    display: block;
    height: 8px;
    width: auto;
    max-width: 100%;
    color: rgb(255 255 255 / 0.4);
}

/* marca propria da conta (config/marcas.php): logo entregue pronto */
.sb-logo-propria img {
    display: block;
    height: 44px;
    width: auto;
    max-width: 100%;
}

/* --- area de nav: zera o padding do Filament e esconde a lista nativa --- */
.fi-sidebar-nav {
    gap: 0 !important;
    padding: 0 !important;
    scrollbar-gutter: auto !important;
}

.fi-sidebar-nav-groups { display: none !important; }

.sb-nav {
    flex: 1;
    padding: 14px 0 18px;
}

/* =====================================================================
   MENU revisado em 25/09/2026 (curadoria em
   osf-os/docs/curadoria-ui-ux-painel-2026-09-25.md): grupos por assunto,
   pílula recuada, contraste AA em todo texto, foco de teclado visível.
   ===================================================================== */

/* --- rótulo de grupo: legível (10,5px, contraste 5,3:1), não decorativo --- */
.sb-group-label {
    padding: 18px 22px 6px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 0.5);
}

/* --- itens: pílula recuada, alvo de 36px --- */
.sb-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    width: calc(100% - 20px);
    margin: 1px 10px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 20px;
    text-align: left;
    color: rgb(255 255 255 / 0.7);
    background: transparent;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
}

.sb-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0.75;
    transition: opacity 0.14s, color 0.14s;
}

.sb-label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sb-item:hover { background: rgb(255 255 255 / 0.06); color: #fff; }
.sb-item:hover .sb-icon { opacity: 1; }

.sb-item.active { background: rgb(252 163 17 / 0.12); color: #fff; }
.sb-item.active .sb-icon { opacity: 1; color: #fca311; }

/* a barra dourada na borda do menu, herança do legado */
/* pai de uma peça ativa do submenu: marcado, sem competir com o filho */
.sb-item.secao-ativa { color: #fff; }
.sb-item.secao-ativa .sb-icon { opacity: 1; color: #fca311; }

.sb-item.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 7px;
    bottom: 7px;
    width: 3px;
    background: #fca311;
    border-radius: 0 3px 3px 0;
}

/* foco de teclado sempre visível (antes não havia nenhum) */
.sb-item:focus-visible,
.sb-subitem:focus-visible,
.sb-chevron-btn:focus-visible,
.sb-sair:focus-visible {
    outline: 2px solid #fca311;
    outline-offset: 2px;
}

/* --- item que navega E expande (rótulo = link, chevron = toggle) --- */
.sb-item-wrap { position: relative; }

.sb-item-com-chevron { padding-right: 40px; }

.sb-chevron-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: rgb(255 255 255 / 0.55);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
}

.sb-chevron-btn:hover { background: rgb(255 255 255 / 0.1); color: #fff; }

.sb-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.sb-item-wrap.expanded .sb-chevron { transform: rotate(180deg); }

/* --- submenu: peças da esteira, selo P/1/2/3 na coluna do ícone --- */
.sb-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.24s ease;
}

.sb-submenu.open { max-height: 240px; padding: 2px 0 6px; }

.sb-subitem {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 1px 10px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 18px;
    color: rgb(255 255 255 / 0.62);
    text-decoration: none;
    border-radius: 7px;
    transition: background 0.12s, color 0.12s;
}

.sb-step {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: rgb(255 255 255 / 0.7);
    background: rgb(255 255 255 / 0.08);
    border-radius: 5px;
}

.sb-subitem:hover { background: rgb(255 255 255 / 0.05); color: #fff; }
.sb-subitem.active { background: rgb(255 255 255 / 0.05); color: #fff; font-weight: 500; }
.sb-subitem.active .sb-step { color: #0a0a0a; background: #fca311; }

/* --- celular: marca e respiros menores, para o menu caber sem rolar --- */
@media (max-width: 1023px) {
    .sb-logo { padding: 16px 20px 14px; }
    .sb-logo-icon { width: 40px; height: 33px; margin-bottom: 6px; }
    .sb-nav { padding: 8px 0 12px; }
    .sb-group-label { padding: 13px 22px 5px; }
}

/* --- rodapé: quem está logado + Sair --- */
.sb-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 16px;
    border-top: 1px solid var(--sb-line);
}

.sb-avatar {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fca311;
    background: rgb(252 163 17 / 0.14);
    border-radius: 50%;
}

.sb-foot-id {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.sb-foot-nome,
.sb-foot-email {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sb-foot-nome {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 16px;
    color: #fff;
}

.sb-foot-email {
    font-size: 11px;
    line-height: 15px;
    color: rgb(255 255 255 / 0.55);
}

.sb-sair {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: rgb(255 255 255 / 0.6);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
}

.sb-sair:hover { background: rgb(255 255 255 / 0.08); color: #fca311; }
.sb-sair svg { width: 17px; height: 17px; }

/* --- scrollbar fina, como no legado --- */
.fi-sidebar ::-webkit-scrollbar,
.fi-sidebar-nav::-webkit-scrollbar { width: 4px; }
.fi-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.fi-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgb(255 255 255 / 0.12);
    border-radius: 4px;
}

/* ---- topbar rente ao fundo, sem sombra cinza ---- */
.fi-topbar > div {
    box-shadow: inset 0 -1px 0 rgb(10 10 10 / 0.08) !important;
}

/* ---- titulos em Poppins (corpo fica em DM Sans, via ->font()) ---- */
.fi-header-heading,
.fi-section-header-heading,
.fi-modal-heading {
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* =====================================================================
   Componentes proprios da OSF (portados das paginas PHP legadas).
   Prefixo osf- pra nao colidir com o Filament; como nenhum utilitario
   Tailwind compete por esses seletores, aqui NAO precisa de !important.
   ===================================================================== */

:root {
    --osf-gold: #fca311;
    --osf-gold-light: rgb(252 163 17 / 0.12);
    --osf-gold-border: rgb(252 163 17 / 0.35);
    --osf-card: #ffffff;
    --osf-txt-h: #111111;
    --osf-txt-muted: #777777;

    --osf-medir: #fca311;
    --osf-adquirir: #2a7d4f;
    --osf-praticar: #c47b1a;
    --osf-alavancar: #5b4bb5;
}

/* ---- grid de cards de area ---- */
.osf-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.osf-nav-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.06);
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.osf-nav-card:not(.osf-nav-card-soon):hover {
    transform: translateY(-2px);
    border-color: var(--osf-gold-border);
    box-shadow: 0 6px 24px rgb(0 0 0 / 0.1);
}

.osf-nav-card-soon {
    border-style: dashed;
    box-shadow: none;
    opacity: 0.72;
    cursor: default;
}

.osf-nav-card-top { padding: 24px 22px 16px; }

.osf-nav-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    color: var(--osf-gold);
    background: var(--osf-gold-light);
    border-radius: 10px;
}

.osf-nav-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--osf-txt-h);
}

.osf-nav-card-body { flex: 1; padding: 0 22px 20px; }

.osf-nav-card-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--osf-txt-muted);
}

.osf-nav-card-footer { padding: 0 22px 22px; }

.osf-nav-card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #000;
    background: var(--osf-gold);
    border-radius: 8px;
    transition: background 0.16s;
}

.osf-nav-card:hover .osf-nav-card-btn:not(.osf-nav-card-btn-soon) { background: #ffba33; }

.osf-nav-card-btn-soon {
    color: #6b6b6b;
    background: rgb(0 0 0 / 0.05);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}

/* ---- secao MAPA ---- */
.osf-section { margin-top: 48px; }

.osf-section-title {
    margin-bottom: 10px;
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--osf-txt-h);
}

.osf-section-intro {
    max-width: 860px;
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--osf-txt-muted);
}

.osf-momento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.osf-momento-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.07);
    border-radius: 12px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.osf-momento-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(0 0 0 / 0.09);
}

.osf-momento-card-bar { width: 100%; height: 3px; }
.osf-s-medir .osf-momento-card-bar { background: var(--osf-medir); }
.osf-s-adquirir   .osf-momento-card-bar { background: var(--osf-adquirir); }
.osf-s-praticar  .osf-momento-card-bar { background: var(--osf-praticar); }
.osf-s-alavancar   .osf-momento-card-bar { background: var(--osf-alavancar); }

.osf-momento-card-inner {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px 20px 18px;
}

.osf-momento-label {
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.osf-s-medir .osf-momento-label { color: var(--osf-medir); }
.osf-s-adquirir   .osf-momento-label { color: var(--osf-adquirir); }
.osf-s-praticar  .osf-momento-label { color: var(--osf-praticar); }
.osf-s-alavancar   .osf-momento-label { color: var(--osf-alavancar); }

.osf-momento-phrase {
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--osf-txt-h);
}

.osf-momento-body {
    flex: 1;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--osf-txt-muted);
}
.osf-momento-body p { margin-bottom: 5px; }
.osf-momento-body p:last-child { margin-bottom: 0; }
.osf-momento-arrow { margin-right: 2px; }

.osf-momento-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgb(0 0 0 / 0.1);
}

.osf-momento-product-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--osf-txt-muted);
}

.osf-momento-product-name { font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; }
.osf-s-medir .osf-momento-product-name { color: var(--osf-medir); }
.osf-s-adquirir   .osf-momento-product-name { color: var(--osf-adquirir); }
.osf-s-praticar  .osf-momento-product-name { color: var(--osf-praticar); }
.osf-s-alavancar   .osf-momento-product-name { color: var(--osf-alavancar); }

/* ---- responsivo (mesmos breakpoints do legado) ---- */
@media (max-width: 1024px) {
    .osf-cards-grid, .osf-momento-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .osf-cards-grid, .osf-momento-grid { grid-template-columns: 1fr; }
}

/* ---- badge "Portfolio Ativo" na topbar ---- */
.osf-topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--osf-gold);
    background: var(--osf-gold-light);
    border: 1px solid var(--osf-gold-border);
    border-radius: 20px;
}

.osf-topbar-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--osf-gold);
    border-radius: 50%;
    animation: osf-pulse 2s infinite;
}

@keyframes osf-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@media (max-width: 420px) { .osf-topbar-badge { display: none; } }

/* =====================================================================
   CRM — quadro kanban do funil comercial.
   ===================================================================== */

.crm-resumo {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.crm-resumo-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 18px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 10px;
}

.crm-resumo-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--osf-txt-muted);
}

.crm-resumo-valor {
    font-size: 18px;
    font-weight: 700;
    color: var(--osf-txt-h);
}

.crm-resumo-ganho .crm-resumo-valor { color: #2a7d4f; }

/* separa os totais em R$ dos contadores da agenda */
.crm-resumo-divisor {
    align-self: stretch;
    width: 1px;
    margin: 6px 4px;
    background: rgb(128 128 128 / 0.3);
}

/* --- quadro --- */
.crm-board {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 14px;
}

.crm-col {
    display: flex;
    flex-direction: column;
    flex: 0 0 268px;
    width: 268px;
    padding: 12px;
    background: rgb(0 0 0 / 0.035);
    border: 1px solid rgb(0 0 0 / 0.07);
    border-radius: 12px;
    transition: background 0.15s, border-color 0.15s;
}

.crm-col-alvo {
    background: rgb(252 163 17 / 0.09);
    border-color: var(--osf-gold-border);
}

.crm-col-head { position: relative; padding: 2px 2px 12px; }

.crm-col-bar {
    display: block;
    width: 28px;
    height: 3px;
    margin-bottom: 9px;
    border-radius: 2px;
}

.crm-col-titulo {
    display: flex;
    align-items: center;
    gap: 7px;
}

.crm-col-nome {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--osf-txt-h);
}

.crm-col-qtd {
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
    color: var(--osf-txt-muted);
    background: rgb(0 0 0 / 0.06);
    border-radius: 20px;
}

.crm-col-total {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 700;
}

/* criterio da etapa (como no Kommo): 3 linhas, o texto inteiro no title */
.crm-col-descricao {
    display: -webkit-box;
    margin: 6px 0 0;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.4;
    color: var(--osf-txt-muted);
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    cursor: help;
}

/* --- cards --- */
.crm-col-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 40px;
}

.crm-card {
    display: block;
    padding: 12px 13px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-left: 3px solid var(--cor-etapa, #fca311);
    border-radius: 9px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.05);
    text-decoration: none;
    cursor: grab;
    transition: box-shadow 0.16s, transform 0.16s;
}

.crm-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgb(0 0 0 / 0.1);
}

.crm-card-voando { opacity: 0.4; cursor: grabbing; }

.crm-card-titulo {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--osf-txt-h);
}

.crm-card-empresa {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--osf-txt-muted);
}

.crm-card-valor {
    margin-top: 7px;
    font-size: 14px;
    font-weight: 700;
    color: var(--osf-txt-h);
}

.crm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgb(0 0 0 / 0.1);
    font-size: 10.5px;
    color: var(--osf-txt-muted);
}

.crm-col-vazia {
    padding: 14px 4px;
    font-size: 11.5px;
    text-align: center;
    color: var(--osf-txt-muted);
}

.crm-col-novo {
    display: block;
    margin-top: 10px;
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    text-decoration: none;
    color: var(--osf-txt-muted);
    border: 1px dashed rgb(0 0 0 / 0.18);
    border-radius: 8px;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.crm-col-novo:hover {
    color: #7a4d00;
    background: rgb(252 163 17 / 0.1);
    border-color: var(--osf-gold-border);
}

/* --- abas de funil (aparecem a partir do 2o funil) --- */
.crm-funis {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgb(0 0 0 / 0.08);
}

.crm-funil-aba {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--osf-txt-muted);
    background: transparent;
    border: 1px solid rgb(0 0 0 / 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: color 0.14s, background 0.14s, border-color 0.14s;
}

.crm-funil-aba:hover {
    color: var(--osf-txt-h);
    border-color: var(--osf-gold-border);
}

.crm-funil-aba-ativa {
    color: #7a4d00;
    background: var(--osf-gold-light);
    border-color: var(--osf-gold-border);
}

/* =====================================================================
   BASE DE CLIENTES — grade de cards + ficha.
   ===================================================================== */

.cli-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgb(0 0 0 / 0.08);
}

.cli-filtro-grupo { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.cli-select {
    padding: 6px 10px;
    font-size: 12px;
    color: var(--osf-txt-h);
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.12);
    border-radius: 8px;
}

.cli-limpar {
    padding: 6px 8px;
    font-size: 11px;
    color: var(--osf-txt-muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

/* --- grade --- */
.cli-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.cli-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 16px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-top: 3px solid rgb(0 0 0 / 0.12);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.05);
    text-decoration: none;
    transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}

.cli-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgb(0 0 0 / 0.1); }

.cli-card-r1 { border-top-color: #2a7d4f; }
.cli-card-r2 { border-top-color: #c47b1a; }
.cli-card-r3 { border-top-color: #8a8a8a; }
.cli-card-r4 { border-top-color: #a33a3a; }

.cli-card-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }

.cli-card-nome {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--osf-txt-h);
}

.cli-card-tier {
    flex-shrink: 0;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 20px;
}

.cli-tier-r1 { color: #1d5c39; background: rgb(42 125 79 / 0.14); }
.cli-tier-r2 { color: #8a5510; background: rgb(196 123 26 / 0.16); }
.cli-tier-r3 { color: #5c5c5c; background: rgb(0 0 0 / 0.07); }
.cli-tier-r4 { color: #8c2d2d; background: rgb(163 58 58 / 0.14); }

.cli-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.cli-tag {
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--osf-txt-muted);
    background: rgb(0 0 0 / 0.05);
    border-radius: 20px;
}

.cli-score-otimo { color: #1d5c39; background: rgb(42 125 79 / 0.13); }
.cli-score-bom { color: #8a5510; background: rgb(196 123 26 / 0.14); }
.cli-score-regular { color: #8c2d2d; background: rgb(163 58 58 / 0.12); }
.cli-tag-transicao { color: #4a3d99; background: rgb(91 75 181 / 0.13); }

.cli-card-servicos { display: flex; flex-wrap: wrap; gap: 4px; }

.cli-chip {
    padding: 2px 7px;
    font-size: 10px;
    color: #7a4d00;
    background: rgb(252 163 17 / 0.12);
    border-radius: 5px;
}

.cli-chip-mais { color: var(--osf-txt-muted); background: rgb(0 0 0 / 0.05); }
.cli-chip-vazio { color: var(--osf-txt-muted); background: transparent; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08); }

.cli-card-rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
    padding-top: 9px;
    border-top: 1px dashed rgb(0 0 0 / 0.1);
}

.cli-card-mrr { font-size: 15px; font-weight: 700; color: var(--osf-txt-h); }
.cli-card-mrr small { font-size: 10px; font-weight: 500; color: var(--osf-txt-muted); }

.cli-card-sinais { display: flex; gap: 5px; }

.cli-sinal {
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 600;
    color: var(--osf-txt-muted);
    background: rgb(0 0 0 / 0.05);
    border-radius: 20px;
}

.cli-sinal-alerta { color: #8c2d2d; background: rgb(163 58 58 / 0.13); }

.cli-card-passo {
    font-size: 11px;
    line-height: 1.4;
    color: var(--osf-txt-muted);
}

.cli-vazio { padding: 30px; text-align: center; color: var(--osf-txt-muted); }

/* --- ficha --- */
.cli-indicadores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.cli-ind {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 16px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 10px;
}

.cli-ind-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--osf-txt-muted);
}

.cli-ind-valor { font-size: 16px; font-weight: 700; color: var(--osf-txt-h); }
.cli-ind-valor.cli-tier-r1, .cli-ind-valor.cli-tier-r2,
.cli-ind-valor.cli-tier-r3, .cli-ind-valor.cli-tier-r4 {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 20px;
}

.cli-ind-dica { font-size: 10.5px; line-height: 1.4; color: var(--osf-txt-muted); }

.cli-alerta {
    margin-bottom: 14px;
    padding: 11px 15px;
    font-size: 12.5px;
    font-weight: 600;
    color: #8c2d2d;
    background: rgb(163 58 58 / 0.09);
    border: 1px solid rgb(163 58 58 / 0.25);
    border-radius: 9px;
}

.cli-proximo {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 16px;
    padding: 11px 15px;
    background: rgb(252 163 17 / 0.09);
    border: 1px solid var(--osf-gold-border);
    border-radius: 9px;
}

.cli-proximo-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7a4d00;
}

.cli-proximo-texto { flex: 1; font-size: 13px; font-weight: 600; color: var(--osf-txt-h); }
.cli-proximo-data { font-size: 11px; color: var(--osf-txt-muted); }

.cli-colunas {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    align-items: start;
}

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

.cli-narrativa, .cli-lateral { display: flex; flex-direction: column; gap: 14px; }

.cli-bloco {
    padding: 16px 18px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 11px;
}

.cli-bloco-titulo {
    margin-bottom: 9px;
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--osf-txt-h);
}

.cli-bloco-texto { font-size: 13px; line-height: 1.65; color: #3a3a3a; }
.cli-bloco-vazio { font-size: 12px; font-style: italic; color: var(--osf-txt-muted); }
.cli-bloco-nota { margin-bottom: 10px; font-size: 11px; line-height: 1.5; color: var(--osf-txt-muted); }

.cli-servico {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed rgb(0 0 0 / 0.08);
}

.cli-servico:last-of-type { border-bottom: none; }
.cli-servico-nome { font-size: 12.5px; font-weight: 600; color: var(--osf-txt-h); }
.cli-servico-tipo { font-size: 10.5px; color: var(--osf-txt-muted); }
.cli-servico-valor { font-size: 13px; font-weight: 700; color: var(--osf-txt-h); }

.cli-budget {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--osf-txt-muted);
    background: rgb(0 0 0 / 0.04);
    border-radius: 8px;
}

.cli-budget-nota { display: block; margin-top: 3px; font-size: 10px; font-style: italic; }

.cli-expansao {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 5px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid rgb(0 0 0 / 0.07);
    border-radius: 7px;
    transition: background 0.14s, border-color 0.14s;
}

.cli-expansao:hover { background: rgb(252 163 17 / 0.08); border-color: var(--osf-gold-border); }
.cli-expansao-nome { color: var(--osf-txt-h); }
.cli-expansao-preco { flex-shrink: 0; font-size: 11px; font-weight: 700; color: #7a4d00; }

/* --- Definicao de Tier --- */
.tier-nota {
    margin-bottom: 18px;
    padding: 16px 20px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 11px;
}

.tier-nota-titulo {
    margin-bottom: 8px;
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--osf-txt-h);
}

.tier-nota p { margin-bottom: 7px; font-size: 12.5px; line-height: 1.65; color: #3a3a3a; }
.tier-nota p:last-child { margin-bottom: 0; }

.tier-nota-aviso {
    margin-top: 10px !important;
    padding: 9px 12px;
    color: #7a4d00 !important;
    background: rgb(252 163 17 / 0.1);
    border-radius: 7px;
}

.tier-tabela-ctn {
    overflow-x: auto;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 12px;
}

.tier-tabela { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 12.5px; }

.tier-tabela thead th {
    padding: 13px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: left;
    color: #0a0a0a;
    background: #fca311;
    white-space: nowrap;
}

.tier-tabela thead th:not(:last-child) { box-shadow: inset -1px 0 0 rgb(0 0 0 / 0.12); }

.tier-tabela tbody td {
    padding: 13px 14px;
    color: #3a3a3a;
    border-bottom: 1px solid rgb(0 0 0 / 0.07);
}

.tier-tabela tbody td:not(:last-child) { border-right: 1px solid rgb(0 0 0 / 0.07); }
.tier-tabela tbody tr:nth-child(odd) { background: rgb(0 0 0 / 0.02); }
.tier-tabela tbody tr:last-child td { border-bottom: none; }

.tier-nome { font-weight: 700; color: var(--osf-txt-h) !important; white-space: nowrap; }
.tier-fee { font-weight: 700; color: var(--osf-txt-h) !important; white-space: nowrap; }
.tier-fee small { display: block; font-size: 9.5px; font-weight: 500; color: var(--osf-txt-muted); }

.tier-cliente {
    display: inline-block;
    margin: 2px 3px 2px 0;
    padding: 2px 8px;
    font-size: 10.5px;
    font-weight: 600;
    color: #7a4d00;
    background: rgb(252 163 17 / 0.13);
    border-radius: 20px;
    text-decoration: none;
}

.tier-cliente:hover { background: rgb(252 163 17 / 0.25); }
.tier-vazio { color: #bbb; }

.tier-pendente {
    margin-top: 14px;
    padding: 11px 15px;
    font-size: 12px;
    color: var(--osf-txt-muted);
    background: rgb(0 0 0 / 0.04);
    border-radius: 9px;
}

.tier-pendente a { color: #7a4d00; text-decoration: underline; }

/* --- gap de receita na ficha --- */
.cli-gap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
    padding: 13px 18px;
    background: rgb(0 0 0 / 0.04);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 10px;
}

.cli-gap-positivo { background: rgb(42 125 79 / 0.07); border-color: rgb(42 125 79 / 0.25); }
.cli-gap-label { display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--osf-txt-muted); }
.cli-gap-valor { display: block; margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--osf-txt-h); }

/* --- correcao dos filtros: a seta nativa do select montava em cima do texto --- */
.cli-filtros { align-items: flex-end; }

.cli-filtro-grupo { gap: 8px; }

.cli-select {
    /* tira a seta nativa e desenha a nossa, com espaco reservado */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-width: 190px;
    max-width: 100%;
    padding: 7px 32px 7px 12px;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.4;
    color: var(--osf-txt-h);
    background-color: var(--osf-card);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 13px 13px;
    border: 1px solid rgb(0 0 0 / 0.12);
    border-radius: 8px;
    cursor: pointer;
    text-overflow: ellipsis;
}

.cli-select:hover { border-color: var(--osf-gold-border); }

.cli-select:focus {
    outline: none;
    border-color: #fca311;
    box-shadow: 0 0 0 3px rgb(252 163 17 / 0.18);
}

.cli-limpar {
    align-self: center;
    flex-shrink: 0;
    padding: 7px 10px;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .cli-filtros { flex-direction: column; align-items: stretch; }
    .cli-filtro-grupo { width: 100%; }
    .cli-select { flex: 1; min-width: 0; }
}

/* --- semaforo do contrato --- */
.cli-contrato-verde { color: #1d5c39; background: rgb(42 125 79 / 0.15); }
.cli-contrato-amarelo { color: #8a5510; background: rgb(196 123 26 / 0.18); }
.cli-contrato-vermelho { color: #fff; background: #a33a3a; }
.cli-contrato-vencido { color: #fff; background: #7d1f1f; }

.cli-ind-valor.cli-contrato-verde,
.cli-ind-valor.cli-contrato-amarelo,
.cli-ind-valor.cli-contrato-vermelho,
.cli-ind-valor.cli-contrato-vencido {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 20px;
}

/* --- caixa x competencia --- */
.cli-resumo-nota {
    font-size: 10px;
    line-height: 1.3;
    color: var(--osf-txt-muted);
}

.crm-resumo-devido {
    background: rgb(163 58 58 / 0.07);
    border-color: rgb(163 58 58 / 0.25);
}

.crm-resumo-devido .crm-resumo-valor { color: #8c2d2d; }

.cli-tag-antecipado { color: #8c2d2d; background: rgb(163 58 58 / 0.12); }

.cli-card-semcaixa {
    display: block;
    margin-top: 1px;
    font-size: 9.5px;
    font-weight: 600;
    color: #8c2d2d;
}

.cli-antecipado {
    margin-bottom: 14px;
    padding: 14px 18px;
    background: rgb(163 58 58 / 0.07);
    border: 1px solid rgb(163 58 58 / 0.25);
    border-radius: 10px;
}

.cli-antecipado-titulo {
    margin-bottom: 11px;
    font-size: 13px;
    font-weight: 700;
    color: #8c2d2d;
}

.cli-antecipado-linhas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.cli-antecipado-nota {
    margin-top: 11px;
    font-size: 11.5px;
    line-height: 1.55;
    color: #6a4040;
}

/* --- bloco de contrato com progresso --- */
.cli-contrato-bloco {
    margin-bottom: 14px;
    padding: 14px 18px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 10px;
}

.cli-contrato-topo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 13px;
}

.cli-barra {
    height: 8px;
    overflow: hidden;
    background: rgb(0 0 0 / 0.08);
    border-radius: 20px;
}

.cli-barra-preenchida { height: 100%; border-radius: 20px; transition: width 0.3s; }
.cli-barra-verde { background: #2a7d4f; }
.cli-barra-amarelo { background: #c47b1a; }
.cli-barra-vermelho { background: #a33a3a; }
.cli-barra-vencido { background: #7d1f1f; }

.cli-barra-legenda {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 10.5px;
    color: var(--osf-txt-muted);
}

.cli-barra-legenda span:nth-child(2) { font-weight: 700; color: var(--osf-txt-h); }

/* =====================================================================
   FINANCEIRO — DRE de caixa.
   ===================================================================== */

.fin-mes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 18px;
}

.fin-mes-btn {
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 1;
    color: var(--osf-txt-muted);
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.14s, border-color 0.14s;
}

.fin-mes-btn:hover { color: #7a4d00; border-color: var(--osf-gold-border); }

.fin-mes-nome {
    min-width: 190px;
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-transform: capitalize;
    color: var(--osf-txt-h);
}

.fin-dre {
    margin-bottom: 16px;
    padding: 8px 22px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 12px;
}

.fin-linha {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgb(0 0 0 / 0.06);
}

.fin-linha:last-child { border-bottom: none; }

.fin-linha-label { font-size: 13px; font-weight: 600; color: var(--osf-txt-h); }
.fin-linha-valor { font-size: 17px; font-weight: 700; color: var(--osf-txt-h); white-space: nowrap; }

.fin-linha-sub { padding: 8px 0; }
.fin-linha-sub .fin-linha-label { font-weight: 400; color: var(--osf-txt-muted); }
.fin-linha-sub .fin-linha-valor { font-size: 14px; font-weight: 600; color: var(--osf-txt-muted); }

.fin-linha-total {
    border-top: 2px solid rgb(0 0 0 / 0.12);
    border-bottom: none;
}

.fin-linha-total .fin-linha-label { font-size: 14px; font-weight: 700; }
.fin-linha-total .fin-linha-valor { font-size: 21px; }

.fin-linha-prolabore {
    margin: 6px -22px -8px;
    padding: 15px 22px;
    background: rgb(252 163 17 / 0.12);
    border-top: 1px solid var(--osf-gold-border);
    border-radius: 0 0 11px 11px;
}

.fin-linha-prolabore .fin-linha-label { font-size: 14px; font-weight: 700; color: #7a4d00; }
.fin-linha-prolabore .fin-linha-valor { font-size: 24px; color: #7a4d00; }

.fin-positivo { color: #2a7d4f !important; }
.fin-negativo { color: #a33a3a !important; }

.fin-checks { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }

.fin-check {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 18px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 10px;
}

.fin-check-alerta { background: rgb(163 58 58 / 0.07); border-color: rgb(163 58 58 / 0.25); }
.fin-check-alerta .crm-resumo-valor { color: #8c2d2d; }

.fin-colunas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    align-items: start;
}

.fin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed rgb(0 0 0 / 0.08);
}

.fin-item:last-of-type { border-bottom: none; }
.fin-item-nome { font-size: 12.5px; font-weight: 600; color: var(--osf-txt-h); }
.fin-item-cliente { font-size: 10.5px; color: var(--osf-txt-muted); }
.fin-item-direita { display: flex; align-items: center; gap: 8px; }
.fin-item-valor { font-size: 13px; font-weight: 700; color: var(--osf-txt-h); white-space: nowrap; }

.fin-x {
    width: 20px;
    height: 20px;
    font-size: 15px;
    line-height: 1;
    color: #bbb;
    background: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.fin-x:hover { color: #a33a3a; background: rgb(163 58 58 / 0.1); }

.fin-repete {
    margin-left: 6px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--osf-txt-muted);
}

/* --- leitura estrategica do financeiro --- */
.fin-estrategia {
    margin-bottom: 16px;
    padding: 15px 20px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 11px;
}

.fin-estrategia-alerta {
    background: rgb(252 163 17 / 0.09);
    border-color: var(--osf-gold-border);
}

.fin-estrategia-titulo {
    margin-bottom: 10px;
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--osf-txt-h);
}

.fin-estrategia p { margin-bottom: 7px; font-size: 12.5px; line-height: 1.6; color: #3a3a3a; }
.fin-estrategia p:last-child { margin-bottom: 0; }

.fin-estrategia code {
    padding: 1px 5px;
    font-size: 11.5px;
    background: rgb(0 0 0 / 0.06);
    border-radius: 4px;
}

.fin-estrategia-numeros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.fin-estrategia-nota {
    margin-top: 12px !important;
    padding-top: 11px;
    font-size: 11.5px !important;
    color: var(--osf-txt-muted) !important;
    border-top: 1px dashed rgb(0 0 0 / 0.1);
}

.fin-teto-nota {
    margin-left: 7px;
    font-size: 10px;
    font-weight: 600;
    color: #7a4d00;
}

/* =====================================================================
   PORTFÓLIO — porte fiel do portfolio.php legado.
   CSS copiado do original; os tokens abaixo replicam os nomes que ele
   usava, pra não haver tradução no meio do caminho.
   ===================================================================== */

:root {
    --gold: #fca311;
    --gold-light: rgba(252, 163, 17, 0.12);
    --gold-border: rgba(252, 163, 17, 0.35);
    --bg-card: #ffffff;
    --txt-h: #111111;
    --txt-body: #3a3a3a;
    --txt-muted: #777777;

    --medir-c: #fca311; --medir-bg: rgba(252, 163, 17, 0.07); --medir-b: rgba(252, 163, 17, 0.30);
    --adquirir-c: #2a7d4f;   --adquirir-bg: rgba(42, 125, 79, 0.07);    --adquirir-b: rgba(42, 125, 79, 0.28);
    --praticar-c: #c47b1a;  --praticar-bg: rgba(196, 123, 26, 0.07);  --praticar-b: rgba(196, 123, 26, 0.28);
    --alavancar-c: #5b4bb5;   --alavancar-bg: rgba(91, 75, 181, 0.07);    --alavancar-b: rgba(91, 75, 181, 0.28);
}

.search-input { position: relative; max-width: 420px; margin-bottom: 16px; }
.search-input svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--txt-muted); }
.search-input input { width: 100%; padding: 9px 12px 9px 34px; font-family: inherit; font-size: 12.5px; background: #fff; border: 1px solid rgba(0,0,0,0.10); border-radius: 8px; color: var(--txt-body); transition: border-color .15s, box-shadow .15s; }
.search-input input:focus { outline: none; border-color: var(--gold-border); box-shadow: 0 0 0 3px var(--gold-light); }
.search-input input::placeholder { color: var(--txt-muted); }

.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filter-row-label { font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--txt-muted); min-width: 52px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { display: inline-flex; align-items: center; padding: 7px 14px; background: var(--bg-card); border: 1px solid rgba(0,0,0,0.10); border-radius: 20px; font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500; color: var(--txt-body); cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .12s; }
.filter-chip:hover { border-color: var(--gold-border); color: var(--txt-h); }
.filter-chip.active { background: var(--gold); border-color: var(--gold); color: #000; font-weight: 700; }
.filter-chip.active:hover { background: #ffba33; }

.cat-active-banner { display: none; align-items: center; gap: 10px; margin-bottom: 22px; padding: 10px 14px; background: var(--gold-light); border: 1px solid var(--gold-border); border-radius: 10px; font-size: 12.5px; color: var(--txt-h); }
.cat-active-banner.show { display: flex; }
.cat-active-banner b { font-weight: 700; }
.cat-active-banner a { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); text-decoration: none; transition: gap .15s; }
.cat-active-banner a:hover { gap: 8px; }
.cat-active-banner a svg { width: 13px; height: 13px; }

.results-count { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--txt-muted); margin: 14px 0 30px; }
.results-count b { color: var(--txt-h); font-weight: 700; }

/* ── trilho por linha ── */
.materials-section { margin-bottom: 36px; }
.materials-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.materials-section-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.section-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--gold-light); display: flex; align-items: center; justify-content: center; color: var(--gold); flex-shrink: 0; }
.section-icon svg { width: 16px; height: 16px; }
.s-medir .section-icon { background: var(--medir-bg); color: var(--medir-c); }
.s-adquirir   .section-icon { background: var(--adquirir-bg);   color: var(--adquirir-c); }
.s-praticar  .section-icon { background: var(--praticar-bg);  color: var(--praticar-c); }
.s-alavancar   .section-icon { background: var(--alavancar-bg);   color: var(--alavancar-c); }
.section-title { font-size: 16px; font-weight: 700; color: var(--txt-h); letter-spacing: -0.01em; }
.section-count { font-size: 11px; font-weight: 600; color: var(--txt-muted); letter-spacing: 0.04em; white-space: nowrap; }
.section-nav { display: flex; gap: 4px; flex-shrink: 0; }
.section-nav-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: var(--bg-card); border: 1px solid rgba(0,0,0,0.08); border-radius: 7px; color: var(--txt-muted); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.section-nav-btn:hover { background: var(--gold-light); border-color: var(--gold-border); color: var(--gold); }
.section-nav-btn svg { width: 14px; height: 14px; }

/* ── cards no trilho horizontal ── */
.material-rail { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-behavior: smooth; scroll-snap-type: x mandatory; }
.material-rail::-webkit-scrollbar { height: 4px; }
.material-rail::-webkit-scrollbar-track { background: transparent; }
.material-rail::-webkit-scrollbar-thumb { background: rgba(0,0,0,.10); border-radius: 4px; }
.material-rail::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.18); }

.material-card { flex: 0 0 280px; background: var(--bg-card); border-radius: 10px; border: 1px solid rgba(0,0,0,0.07); box-shadow: 0 1px 3px rgba(0,0,0,0.04); padding: 18px; display: flex; flex-direction: column; text-decoration: none; cursor: pointer; scroll-snap-align: start; transition: box-shadow .18s, transform .18s, border-color .18s; }
.material-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.08); transform: translateY(-2px); border-color: var(--gold-border); }
.material-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.material-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.material-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--gold-light); display: flex; align-items: center; justify-content: center; color: var(--gold); flex-shrink: 0; }
.material-icon svg { width: 16px; height: 16px; }
.s-medir .material-icon { background: var(--medir-bg); color: var(--medir-c); }
.s-adquirir   .material-icon { background: var(--adquirir-bg);   color: var(--adquirir-c); }
.s-praticar  .material-icon { background: var(--praticar-bg);  color: var(--praticar-c); }
.s-alavancar   .material-icon { background: var(--alavancar-bg);   color: var(--alavancar-c); }
.material-card-title { font-size: 13.5px; font-weight: 700; color: var(--txt-h); line-height: 1.3; }
.material-card-desc { font-size: 12px; color: var(--txt-muted); line-height: 1.55; flex: 1; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.material-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px dashed rgba(0,0,0,0.09); }
.material-card-price { font-size: 11.5px; font-weight: 700; color: var(--txt-h); }
.material-card-link { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; transition: gap .15s; }
.material-card:hover .material-card-link { gap: 7px; }
.material-card-link svg { width: 13px; height: 13px; }

/* ── tags ── */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.tag .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag-gold { background: var(--gold-light); color: var(--gold); border: 1px solid var(--gold-border); }
.tag-green { background: var(--adquirir-bg); color: var(--adquirir-c); border: 1px solid var(--adquirir-b); }
.tag-amber { background: var(--praticar-bg); color: var(--praticar-c); border: 1px solid var(--praticar-b); }
.tag-purple { background: var(--alavancar-bg); color: var(--alavancar-c); border: 1px solid var(--alavancar-b); }
.tag-neutral { background: rgba(0,0,0,0.05); color: var(--txt-muted); border: 1px solid rgba(0,0,0,0.10); }

/* ── estados vazios ── */
.materials-section.hidden { display: none; }
.products-empty { display: none; flex-direction: column; align-items: center; justify-content: center; padding: 56px 20px; text-align: center; }
.products-empty.show { display: flex; }
.products-empty-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--gold-light); border: 1px dashed var(--gold-border); display: flex; align-items: center; justify-content: center; color: var(--gold); margin-bottom: 18px; }
.products-empty-icon svg { width: 24px; height: 24px; }
.products-empty h3 { font-size: 16px; font-weight: 700; color: var(--txt-h); margin-bottom: 6px; }
.products-empty p { font-size: 13px; color: var(--txt-muted); max-width: 360px; line-height: 1.6; }

/* Rede de segurança: os SVG dos produtos vêm do banco SEM width/height.
   Se por qualquer motivo a regra de tamanho não chegar, o `overflow` e o
   `max-*` impedem que um ícone sem dimensão exploda o layout inteiro —
   vira defeito cosmético em vez de página quebrada. */
.material-icon,
.section-icon,
.products-empty-icon,
.cli-card-icon {
    overflow: hidden;
}

.material-icon > svg,
.section-icon > svg {
    max-width: 100%;
    max-height: 100%;
    flex-shrink: 0;
}

/* =====================================================================
   MODO ESCURO — opcional, no menu do usuário. O padrão é o claro.
   Como todos os componentes próprios leem dos tokens, retintar aqui
   ajusta portfólio, clientes, CRM, tier e financeiro de uma vez.
   ===================================================================== */

html.dark {
    --osf-card: #1e1e1e;
    --osf-txt-h: #f0f0f0;
    --osf-txt-muted: #9b9b9b;

    --bg-card: #1e1e1e;
    --txt-h: #f0f0f0;
    --txt-body: #d6d6d6;
    --txt-muted: #9b9b9b;
}

html.dark .cli-bloco,
html.dark .cli-ind,
html.dark .cli-card,
html.dark .crm-resumo-item,
html.dark .crm-card,
html.dark .fin-check,
html.dark .fin-dre,
html.dark .fin-estrategia,
html.dark .tier-nota,
html.dark .tier-tabela-ctn,
html.dark .material-card,
html.dark .cli-contrato-bloco {
    border-color: rgb(255 255 255 / 0.1);
}

html.dark .crm-col { background: rgb(255 255 255 / 0.04); border-color: rgb(255 255 255 / 0.08); }
html.dark .cli-select,
html.dark .search-input input,
html.dark .filter-chip { background: #1e1e1e; border-color: rgb(255 255 255 / 0.14); color: #e6e6e6; }
html.dark .filter-chip.active { background: var(--gold); color: #000; }
html.dark .tier-tabela tbody tr:nth-child(odd) { background: rgb(255 255 255 / 0.03); }
html.dark .tier-tabela tbody td { border-color: rgb(255 255 255 / 0.08); }
html.dark .material-card-foot,
html.dark .cli-card-rodape,
html.dark .cli-servico,
html.dark .fin-item { border-color: rgb(255 255 255 / 0.1); }
html.dark .tag-neutral { background: rgb(255 255 255 / 0.07); border-color: rgb(255 255 255 / 0.12); }

/* =====================================================================
   TECH STACKS — grade de sistemas. Estrutura adaptada da página de
   "Sistemas Operacionais" que o Lucas indexou como referência; cores e
   tipografia trocadas pela identidade OSF (dourado no lugar do vermelho).
   ===================================================================== */

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.stack-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
    transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}

.stack-card:hover {
    transform: translateY(-2px);
    border-color: var(--gold-border);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
}

.stack-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
    color: var(--gold);
    background: var(--gold-light);
    border-radius: 10px;
    overflow: hidden;
}

.stack-nome {
    margin-bottom: 12px;
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--txt-h);
}

.stack-desc {
    flex: 1;
    margin-bottom: 22px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--txt-muted);
}

.stack-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--txt-h);
    text-decoration: none;
    background: transparent;
    border: 1px solid rgb(0 0 0 / 0.12);
    border-radius: 9px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.stack-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.stack-btn:hover {
    color: #7a4d00;
    background: var(--gold-light);
    border-color: var(--gold-border);
}

.stack-btn-soon {
    color: var(--txt-muted);
    border-style: dashed;
    cursor: default;
}

.stack-btn-soon:hover { color: var(--txt-muted); background: transparent; border-color: rgb(0 0 0 / 0.12); }

html.dark .stack-card { border-color: rgb(255 255 255 / 0.1); }
html.dark .stack-btn { border-color: rgb(255 255 255 / 0.16); }


/* =====================================================================
   ESTADO DO BACKUP — alarme na Visão Geral.

   Duas vozes de propósito: o bloco de alerta (só aparece quando algo
   envelheceu) e o rodapé discreto (sempre visível, pra dar pra confiar
   sem perguntar). Aviso permanente e barulhento vira papel de parede.
   Cores reaproveitadas do semáforo de contrato, pra o painel inteiro
   falar a mesma língua: verde #2a7d4f, âmbar #c47b1a, vermelho #a33a3a.
   ===================================================================== */

.osf-backup-alerta {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 28px;
    padding: 16px 18px;
    border: 1px solid rgb(163 58 58 / 0.35);
    border-left: 4px solid #a33a3a;
    border-radius: 10px;
    background: rgb(163 58 58 / 0.06);
}

.osf-backup-alerta-icone {
    flex-shrink: 0;
    color: #a33a3a;
    margin-top: 1px;
}

.osf-backup-alerta-titulo {
    font-weight: 700;
    font-size: 14px;
    color: var(--txt-h);
    margin-bottom: 6px;
}

.osf-backup-alerta-linha {
    font-size: 13px;
    line-height: 1.55;
    color: var(--txt-body);
    margin-top: 4px;
}

.osf-backup-rodape {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 40px;
    padding-top: 14px;
    border-top: 1px solid rgb(0 0 0 / 0.08);
    font-size: 12px;
    color: var(--txt-muted);
}

.osf-backup-rodape-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.osf-backup-ponto {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.osf-backup-ponto-ok { background: #2a7d4f; }
.osf-backup-ponto-aviso { background: #c47b1a; }
.osf-backup-ponto-grave { background: #a33a3a; }

.osf-backup-ok { color: #1d5c39; }
.osf-backup-aviso { color: #8a5410; }
.osf-backup-grave { color: #a33a3a; }

.osf-backup-data { opacity: 0.7; }

html.dark .osf-backup-rodape { border-top-color: rgb(255 255 255 / 0.1); }
html.dark .osf-backup-ok { color: #5fbf8a; }
html.dark .osf-backup-aviso { color: #e0a352; }
html.dark .osf-backup-grave { color: #e08585; }

/* =====================================================================
   ORGANOGRAMA LOCX — diretorio de pessoas, nao diagrama de caixas.

   A primeira versao era um chaveamento de torneio: caixas de canto vivo,
   fio de 1px, a nota de cada pessoa impressa dentro do proprio no. Ficava
   correto e ilegivel — 22 blocos de texto competindo, e a hierarquia
   perdida no meio das notas.

   Esta versao inverte as prioridades. O cartao carrega so o que se le de
   relance (inicial, nome, cargo, uma legenda) e a nota vai pro painel da
   direita, sob demanda. A hierarquia volta a ser visivel porque virou
   FAIXA: cada nivel e uma secao com regua no topo, e o olho desce o
   espectro sem precisar seguir fio nenhum.

   Linguagem visual: diretorio de time — avatar circular, regua fina,
   respiro. O dourado OSF (#fca311) continua sendo o acento unico e agora
   marca ESTADO no anel do avatar, nao contorno de caixa.
   ===================================================================== */

.org {
    --o-linha: #e4e4e7;
    --o-ink: #18181b;
    --o-mute: #71717a;
    --o-surf: #ffffff;
    --o-surf-2: #fafafa;
    --o-av-bg: #f4f4f5;
    --o-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    display: flex;
    flex-direction: column;
    gap: 24px;
    color: var(--o-ink);
}

.org [x-cloak] { display: none !important; }

/* ---- barra de controles ---- */
.org-barra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.org-vistas {
    display: inline-flex;
    padding: 2px;
    background: var(--o-av-bg);
    border-radius: 999px;
}

.org-vista-btn {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--o-mute);
    transition: background 0.15s, color 0.15s;
}

.org-vista-btn:hover { color: var(--o-ink); }

.org-vista-on {
    background: var(--o-surf);
    color: var(--o-ink);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.org-legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--o-mute);
}

.org-chave { display: inline-flex; align-items: center; gap: 6px; }

/* bolinha da legenda = o mesmo anel do avatar, em miniatura */
.org-anel {
    display: block;
    width: 12px;
    height: 12px;
    background: var(--o-av-bg);
    border-radius: 50%;
}

.org-anel-aliado { box-shadow: 0 0 0 2px var(--osf-gold); }
.org-anel-cautela { box-shadow: 0 0 0 2px var(--o-ink); }
.org-anel-neutro { box-shadow: 0 0 0 1px var(--o-linha); }

/* ---- duas colunas: listas + painel ---- */
.org-corpo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
}

/* ---- eixo do espectro: a escala que costura as quatro faixas ---- */
.org-espectro { position: relative; padding-left: 44px; }

.org-espectro::before {
    content: '';
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 12px;
    width: 1px;
    background: var(--o-linha);
}

.org-eixo {
    position: absolute;
    top: -3px;
    left: -44px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    background: var(--o-surf);
    border: 1px solid var(--o-linha);
    border-radius: 50%;
    font-family: var(--o-mono);
    font-size: 11px;
    color: var(--o-mute);
}

/* ---- secao (faixa de nivel OU area) ---- */
.org-secao { position: relative; }
.org-secao + .org-secao { margin-top: 32px; }

.org-secao-cab {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--o-linha);
}

.org-secao-cab h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.org-secao-desc { flex: 1; font-size: 13px; color: var(--o-mute); }

/* contagem em mono: dado, nao texto */
.org-contagem {
    font-family: var(--o-mono);
    font-size: 12px;
    color: var(--o-mute);
}

.org-pendente {
    font-family: var(--o-mono);
    font-size: 11px;
    font-style: normal;
    letter-spacing: 0.04em;
    color: #8a5410;
}

.org-grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 24px 16px;
    padding-top: 20px;
}

/* ---- cartao de pessoa ---- */
.org-p {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 4px;
    margin: -4px;
    border-radius: 8px;
    text-align: left;
    transition: background 0.15s;
}

.org-p:hover { background: var(--o-surf-2); }
.org-p:hover .org-av { transform: translateY(-1px); }

.org-p-on { background: var(--o-av-bg); }

/* Com alguem escolhido, a lista se reorganiza sozinha: quem tem linha
   direta com a pessoa (chefe ou subordinado) fica marcado, o resto
   desbota. E assim que a hierarquia aparece numa lista por faixa. */
.org-p-off { opacity: 0.3; }
.org-p-lig .org-av { outline: 1px dashed var(--o-mute); outline-offset: 5px; }

.org-p-nome {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.org-p-cargo { font-size: 12px; line-height: 1.35; color: var(--o-mute); }

.org-p-legenda {
    margin-top: 2px;
    font-family: var(--o-mono);
    font-size: 11px;
    letter-spacing: 0.03em;
    color: #a1a1aa;
}

/* ---- avatar: inicial em disco; o ANEL diz a relacao ---- */
.org-av {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--o-av-bg);
    border-radius: 50%;
    font-family: var(--o-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--o-ink);
    transition: transform 0.15s;
}

/* Foto no lugar das iniciais. Nao ha nenhum preparo de imagem antes: o
   `cover` num quadrado ja resolve qualquer proporcao — retrato, paisagem
   ou print entram cortados pelo centro. O `overflow` corta a foto no
   circulo sem tocar no anel, que e box-shadow e vive fora da caixa. */
.org-av { overflow: hidden; }

.org-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* rosto costuma ficar no terco de cima; centralizar corta a testa */
    object-position: 50% 25%;
}

/* box-shadow e nao border: o anel nao pode empurrar o layout, e o offset
   de 2px so existe porque anel colado no disco vira contorno, nao estado */
.org-av-aliado { box-shadow: 0 0 0 2px var(--o-surf), 0 0 0 4px var(--osf-gold); }
.org-av-cautela { box-shadow: 0 0 0 2px var(--o-surf), 0 0 0 4px var(--o-ink); }
.org-av-neutro { box-shadow: 0 0 0 1px var(--o-linha); }

.org-av-voce {
    background: var(--osf-gold);
    color: #000;
    box-shadow: 0 0 0 2px var(--o-surf), 0 0 0 4px var(--osf-gold);
}

/* ---- painel de detalhe ---- */
.org-painel-fixo {
    position: sticky;
    top: 16px;
    padding: 20px;
    background: var(--o-surf-2);
    border: 1px solid var(--o-linha);
    border-radius: 12px;
}

.org-painel-cab {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--o-linha);
}

.org-painel-cab h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.org-painel-id { flex: 1; min-width: 0; }
.org-painel-id span { font-size: 12px; color: var(--o-mute); }

.org-av-lg { width: 44px; height: 44px; font-size: 14px; }

.org-fechar {
    margin: -4px -4px 0 0;
    padding: 0 4px;
    font-size: 20px;
    line-height: 1;
    color: var(--o-mute);
}

.org-fechar:hover { color: var(--o-ink); }

.org-ficha { padding: 12px 0; }

.org-ficha > div {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
    line-height: 1.45;
}

.org-ficha dt { color: var(--o-mute); }
.org-ficha dd { margin: 0; }

.org-painel-nota {
    padding-top: 12px;
    border-top: 1px solid var(--o-linha);
    font-size: 13px;
    line-height: 1.6;
}

.org-painel-dica {
    margin: 12px 0 4px;
    font-size: 12px;
    color: var(--o-mute);
}

.org-amb { padding: 12px 0; border-bottom: 1px solid var(--o-linha); }
.org-amb:last-child { border-bottom: 0; padding-bottom: 0; }
.org-amb strong { display: block; font-size: 13px; font-weight: 600; }
.org-amb p { margin-top: 2px; font-size: 12px; line-height: 1.5; color: var(--o-mute); }
/* organograma da operação: o que a cadeira responde */
.org-responde { margin-top: 6px; padding-left: 16px; list-style: disc; }
.org-responde li { font-size: 12px; line-height: 1.5; color: var(--o-mute); }
.org-responde li + li { margin-top: 4px; }

/* ---- rodape ---- */
.org-rodape {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--o-linha);
}

.org-rodape p {
    max-width: 92ch;
    font-size: 12px;
    line-height: 1.6;
    color: var(--o-mute);
}

/* ---- responsivo: o painel desce e deixa de ser sticky ---- */
@media (max-width: 1100px) {
    .org-corpo { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .org-painel-fixo { position: static; }
}

@media (max-width: 640px) {
    .org-grade { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 20px 12px; }
    .org-av { width: 44px; height: 44px; font-size: 13px; }

    /* o eixo custaria 44px de largura numa tela que nao tem — os titulos
       das faixas ja dao a ordem */
    .org-espectro { padding-left: 0; }
    .org-espectro::before,
    .org-eixo { display: none; }
}

/* ---- modo escuro ---- */
html.dark .org {
    --o-linha: rgb(255 255 255 / 0.12);
    --o-ink: #f4f4f5;
    --o-mute: #a1a1aa;
    --o-surf: #1e1e1e;
    --o-surf-2: rgb(255 255 255 / 0.03);
    --o-av-bg: rgb(255 255 255 / 0.08);
}

html.dark .org-vistas { background: rgb(255 255 255 / 0.06); }
html.dark .org-vista-on { background: #2a2a2a; box-shadow: none; }
html.dark .org-p:hover { background: rgb(255 255 255 / 0.04); }
html.dark .org-p-on { background: rgb(255 255 255 / 0.07); }
html.dark .org-p-legenda { color: #7c7c85; }
html.dark .org-pendente { color: #e0a352; }
html.dark .org-av-aliado { box-shadow: 0 0 0 2px #1e1e1e, 0 0 0 4px var(--osf-gold); }
html.dark .org-av-cautela { box-shadow: 0 0 0 2px #1e1e1e, 0 0 0 4px #d4d4d8; }
html.dark .org-av-voce { box-shadow: 0 0 0 2px #1e1e1e, 0 0 0 4px var(--osf-gold); }

/* =====================================================================
   CRM — Onda 1 (28/09/2026): menu, card com próximo passo e agenda.
   Plano: osf-os/docs/plano-painel-tres-ondas-2026-09-28.md
   ===================================================================== */

/* aba de funil virou link (o menu lateral acende o funil certo) */
a.crm-funil-aba { display: inline-flex; align-items: center; text-decoration: none; }

/* rodapé do card: próxima atividade e responsável */
.crm-card-rodape { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.crm-card-agenda { font-size: 10.5px; font-weight: 600; line-height: 1.3; color: var(--osf-txt-muted); }
.crm-card-agenda-atrasada { color: #b42318; }
.crm-card-agenda-vazia { font-weight: 500; font-style: italic; color: #9a6700; }
.crm-card-resp {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-left: auto;
    font-size: 9.5px;
    font-weight: 700;
    color: #7a4d00;
    background: var(--osf-gold-light);
    border-radius: 50%;
}
html.dark .crm-card-agenda-atrasada { color: #f97066; }
html.dark .crm-card-agenda-vazia { color: #f5b544; }
html.dark .crm-card-resp { color: #fca311; }

/* menu: contador de atrasadas e ponto dos subitens sem selo (funis) */
.sb-count {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 6px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: #0a0a0a;
    background: #fca311;
    border-radius: 10px;
}
.sb-ponto { flex-shrink: 0; display: grid; place-items: center; width: 18px; height: 18px; }
.sb-ponto::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: rgb(255 255 255 / 0.3); }
.sb-subitem:hover .sb-ponto::before { background: rgb(255 255 255 / 0.7); }
.sb-subitem.active .sb-ponto::before { background: #fca311; }

/* agenda */
.ag-filtro { display: flex; gap: 6px; margin-bottom: 16px; }
.ag-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.ag-bloco { padding: 14px 14px 10px; background: var(--osf-card); border: 1px solid rgb(0 0 0 / 0.08); border-radius: 12px; }
.ag-bloco-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ag-bloco-head h2 { font-size: 13px; font-weight: 700; color: var(--osf-txt-h); }
.ag-qtd { min-width: 22px; padding: 1px 7px; font-size: 11px; font-weight: 700; text-align: center; color: var(--osf-txt-muted); background: rgb(0 0 0 / 0.05); border-radius: 10px; }
.ag-perigo { border-color: rgb(180 35 24 / 0.35); }
.ag-perigo .ag-qtd { color: #fff; background: #b42318; }
.ag-destaque { border-color: var(--osf-gold-border); }
.ag-destaque .ag-qtd { color: #0a0a0a; background: #fca311; }
.ag-alerta { margin-top: 16px; border-style: dashed; }
.ag-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid rgb(0 0 0 / 0.06); }
.ag-bloco-head + .ag-item { border-top: 0; }
.ag-icone { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; color: var(--osf-txt-muted); }
.ag-corpo { flex: 1; min-width: 0; }
.ag-linha1 { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.ag-tipo { font-weight: 700; color: var(--osf-txt-h); }
.ag-quando { color: var(--osf-txt-muted); white-space: nowrap; }
.ag-perigo .ag-quando { color: #b42318; font-weight: 600; }
.ag-negocio { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--osf-txt-h); text-decoration: none; }
.ag-negocio:hover { text-decoration: underline; }
.ag-funil { display: block; font-size: 11px; font-weight: 400; color: var(--osf-txt-muted); }
.ag-nota { margin-top: 4px; font-size: 12px; color: var(--osf-txt-h); opacity: 0.85; }
.ag-resp { display: inline-block; margin-top: 4px; font-size: 10.5px; color: var(--osf-txt-muted); }
.ag-feita {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #2a7d4f;
    background: transparent;
    border: 1px solid rgb(42 125 79 / 0.35);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.14s;
}
.ag-feita:hover { background: rgb(42 125 79 / 0.1); }
.ag-feita:focus-visible { outline: 2px solid #fca311; outline-offset: 2px; }
.ag-feita-icone { width: 16px; height: 16px; }
.ag-vazio { padding: 8px 0; font-size: 12px; color: var(--osf-txt-muted); }
.ag-sempasso { display: grid; gap: 8px; }
.ag-sempasso a { font-size: 12.5px; font-weight: 600; color: var(--osf-txt-h); }
html.dark .ag-bloco { border-color: rgb(255 255 255 / 0.08); }
html.dark .ag-item { border-color: rgb(255 255 255 / 0.06); }
html.dark .ag-qtd { background: rgb(255 255 255 / 0.08); }
html.dark .ag-perigo .ag-quando { color: #f97066; }

/* =====================================================================
   CRM — Onda 2 (28/09/2026): relatórios, detalhe de ativo, token.
   ===================================================================== */
.rel-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; }
.rel-bloco { padding: 16px; background: var(--osf-card); border: 1px solid rgb(0 0 0 / 0.08); border-radius: 12px; }
.rel-bloco-largo { grid-column: 1 / -1; }
.rel-titulo-linha { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.rel-titulo { margin-bottom: 12px; font-size: 13px; font-weight: 700; color: var(--osf-txt-h); }
.rel-titulo-linha .rel-titulo { margin-bottom: 0; }
.rel-funis { display: flex; flex-wrap: wrap; gap: 6px; }
.rel-linha { margin-bottom: 10px; }
.rel-linha-topo { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 12.5px; }
.rel-rotulo { color: var(--osf-txt-h); }
.rel-numero { font-weight: 700; white-space: nowrap; color: var(--osf-txt-h); }
.rel-extra { font-weight: 500; color: var(--osf-txt-muted); }
.rel-trilho { height: 8px; overflow: hidden; background: rgb(0 0 0 / 0.06); border-radius: 4px; }
.rel-barra { display: block; height: 100%; background: #fca311; border-radius: 4px; }
.rel-barra-ganho { background: #2a7d4f; }
.rel-barra-perda { background: #a33a3a; }
.rel-vazio { font-size: 12px; color: var(--osf-txt-muted); }
.rel-nota { margin-top: 10px; font-size: 11px; color: var(--osf-txt-muted); }
.rel-aviso { margin-top: 12px; padding: 10px 12px; font-size: 12.5px; color: #7a4d00; background: var(--osf-gold-light); border: 1px solid var(--osf-gold-border); border-radius: 8px; }
.int-token { display: block; padding: 12px; font-size: 13px; word-break: break-all; user-select: all; background: rgb(0 0 0 / 0.05); border-radius: 8px; }
html.dark .rel-bloco { border-color: rgb(255 255 255 / 0.08); }
html.dark .rel-trilho { background: rgb(255 255 255 / 0.08); }
html.dark .rel-aviso { color: #fca311; }
html.dark .int-token { background: rgb(255 255 255 / 0.08); }

/* =====================================================================
   Onda 3 (28/09/2026): sinais do LinkedIn e posts.
   ===================================================================== */
.sn-board { margin-top: 16px; }
.sn-card { cursor: default; }
.sn-card:hover { transform: none; }
.sn-contas { display: flex; flex-wrap: wrap; gap: 8px; }
.sn-conta { padding: 6px 10px; font-size: 12px; color: var(--osf-txt-h); background: var(--osf-gold-light); border: 1px solid var(--osf-gold-border); border-radius: 8px; }
.sn-tipos { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 11.5px; color: var(--osf-txt-muted); }
.sn-porque { margin-top: 6px; font-size: 11.5px; line-height: 1.35; color: var(--osf-txt-h); }
.sn-acoes { display: flex; gap: 6px; margin-top: 8px; }
.sn-botao { padding: 5px 9px; font-size: 11px; font-weight: 600; color: var(--osf-txt-muted); background: transparent; border: 1px solid rgb(0 0 0 / 0.12); border-radius: 6px; cursor: pointer; }
.sn-botao:hover { color: var(--osf-txt-h); border-color: var(--osf-gold-border); }
.sn-botao-forte { color: #0a0a0a; background: #fca311; border-color: #fca311; }
.sn-botao-forte:hover { color: #0a0a0a; background: #ffb733; }
.sn-botao:focus-visible, .sn-link:focus-visible { outline: 2px solid #fca311; outline-offset: 2px; }
.sn-link { display: inline-block; margin-top: 8px; font-size: 11.5px; font-weight: 600; color: #7a4d00; }
.sn-post { margin-bottom: 12px; }
.sn-post .rel-titulo a { color: inherit; text-decoration: underline; text-decoration-color: var(--osf-gold-border); }
.sn-data { font-size: 11.5px; color: var(--osf-txt-muted); }
html.dark .sn-botao { border-color: rgb(255 255 255 / 0.16); }
html.dark .sn-link { color: #fca311; }

/* Finanças pessoais: estilos restritos ao novo controle mensal. */
.fp-page { --fp-border: rgb(0 0 0 / .09); --fp-muted: #62666b; display: grid; gap: 22px; color: var(--osf-txt-h); }
.fp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fp-period { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-period button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--fp-border); border-radius: 9px; background: var(--osf-card); }
.fp-period svg, .fp-private svg { width: 16px; height: 16px; flex-shrink: 0; }
.fp-month-label { font-size: 15px; font-weight: 700; margin-right: 8px; }
.fp-period input { border: 1px solid var(--fp-border); border-radius: 9px; padding: 6px 10px; background: var(--osf-card); font-size: 13px; max-width: 170px; color: inherit; }
.fp-private { display: flex; align-items: center; gap: 7px; color: var(--fp-muted); font-size: 12px; }
.fp-page button:focus-visible, .fp-page input:focus-visible, .fp-page a:focus-visible { outline: 2px solid var(--osf-gold); outline-offset: 3px; }
.fp-overview { display: grid; grid-template-columns: minmax(270px, .9fr) minmax(0, 1.4fr); gap: 20px; }
.fp-main { background: #101c23; color: #fff; border-radius: 18px; padding: 30px; position: relative; overflow: hidden; border-top: 3px solid var(--osf-gold); }
.fp-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: #cad3d8; }
.fp-main h2 { font-size: 17px; font-weight: 500; margin: 12px 0 8px; color: #e6eaec; }
.fp-balance { display: block; font-size: clamp(26px, 3vw, 38px); font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.3; overflow-wrap: anywhere; }
.fp-main .fp-negative { color: #ffb7ad; }
.fp-main-footer { margin-top: 28px; padding-top: 17px; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid rgb(255 255 255 / .15); font-size: 12px; }
.fp-main-footer span { color: #cad3d8; }
.fp-main-note { font-size: 11px; color: #cad3d8; margin-top: 12px; line-height: 1.5; }
.fp-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fp-kpi { display: flex; flex-direction: column; justify-content: center; padding: 22px 24px; border: 1px solid var(--fp-border); border-radius: 14px; background: var(--osf-card); gap: 8px; min-width: 0; }
.fp-kpi > span { font-size: 12px; color: var(--fp-muted); }
.fp-kpi > strong { font-size: clamp(20px, 2vw, 27px); letter-spacing: -.025em; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fp-kpi small { color: var(--fp-muted); font-size: 11px; }
.fp-origins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.fp-origins article { display: flex; align-items: center; gap: 14px; padding: 22px; border: 1px solid var(--fp-border); border-radius: 14px; background: var(--osf-card); flex-wrap: wrap; }
.fp-origin-icon { display: grid; place-items: center; height: 38px; width: 38px; background: var(--osf-gold-light); color: #966005; border-radius: 10px; flex-shrink: 0; }
.fp-origin-icon svg { height: 19px; width: 19px; }
.fp-origins h3 { font-size: 13px; font-weight: 600; }
.fp-origins p { color: var(--fp-muted); font-size: 11px; margin-top: 3px; }
.fp-origins article > strong { margin-left: auto; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.fp-origins small { display: block; font-size: 11px; color: var(--fp-muted); font-weight: 400; margin-top: 4px; }
.fp-context { font-size: 12px; line-height: 1.7; color: var(--fp-muted); }
.fp-context a { color: #875900; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.fp-context > span { display: block; margin-top: 4px; font-size: 11px; }
.fp-table { min-width: 0; }
html.dark .fp-page { --fp-border: rgb(255 255 255 / .12); --fp-muted: #b7bdc5; color: #f3f4f6; }
html.dark .fp-kpi, html.dark .fp-origins article, html.dark .fp-period button, html.dark .fp-period input { background: #182027; }
html.dark .fp-origin-icon, html.dark .fp-context a { color: var(--osf-gold); }
html.dark .fp-period input { color-scheme: dark; }
@media (max-width: 1100px) { .fp-overview { grid-template-columns: 1fr; } .fp-origins { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .fp-page { gap: 16px; } .fp-main { padding: 24px; } .fp-kpi { padding: 18px 16px; } .fp-month-label { display: none; } .fp-period { flex-wrap: nowrap; width: 100%; } .fp-period input { flex: 1; max-width: none; } .fp-origins article { padding: 18px; } .fp-origins article > strong { width: 100%; text-align: left; margin-left: 52px; } }

/* Auditoria de uso diário: previsão em destaque, células editáveis e cartões no celular. */
.fp-overview-compact .fp-main { padding: 22px 26px; }
.fp-overview-compact .fp-main h2 { margin-top: 8px; font-size: 15px; }
.fp-overview-compact .fp-main-footer { margin-top: 16px; padding-top: 12px; }
.fp-overview-compact .fp-kpis { gap: 10px; grid-template-rows: 1fr auto; }
.fp-overview-compact .fp-kpi { padding: 18px 20px; }
.fp-kpi-wide { grid-column: 1 / -1; }
.fp-source-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--fp-border); border-radius: 12px; background: var(--osf-card); }
.fp-source-strip > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 14px 20px; }
.fp-source-strip > div + div { border-left: 1px solid var(--fp-border); }
.fp-source-strip span, .fp-source-strip small { font-size: 12px; color: var(--fp-muted); }
.fp-source-strip strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.fp-source-strip small { width: 100%; }
.fp-table .fi-ta-text-input { min-width: 130px; max-width: 170px; }
.fp-table input { font-variant-numeric: tabular-nums; }
.fp-cell-error { color: #b42318; font-size: 11px; margin-top: 6px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.fp-cell-saving { color: var(--fp-muted); font-size: 11px; margin-top: 6px; }
html.dark .fp-cell-error { color: #ffb7ad; }
.fp-details { border: 1px solid var(--fp-border); border-radius: 12px; padding: 14px 18px; background: var(--osf-card); }
.fp-details summary { cursor: pointer; font-size: 12px; font-weight: 600; }
.fp-details summary:focus-visible { outline: 2px solid var(--osf-gold); outline-offset: 4px; }
.fp-details .fp-context { margin-top: 12px; }
.fp-details p + p { margin-top: 8px; }
.fp-sheet-actions { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; align-items: center; }
.fp-sheet-actions button { border: 1px solid var(--fp-border); border-radius: 8px; padding: 8px 12px; color: inherit; font-weight: 600; }
html.dark .fp-source-strip, html.dark .fp-details { background: #182027; }
@media (max-width: 600px) {
    .fp-overview-compact .fp-main { padding: 18px 20px; }
    .fp-overview-compact .fp-kpi { padding: 12px 14px; gap: 6px; }
    .fp-overview-compact .fp-kpi > strong { font-size: 20px; }
    .fp-source-strip > div { padding: 12px; gap: 4px; }
    .fp-source-strip strong { font-size: 16px; width: 100%; }
    .fp-table .fi-ta-table { display: block; }
    .fp-table .fi-ta-table thead { display: none; }
    .fp-table .fi-ta-table tbody { display: block; }
    .fp-table .fi-ta-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 8px; gap: 2px; }
    .fp-table .fi-ta-table tbody td { display: block; border: 0; min-width: 0; }
    .fp-table .fi-ta-table tbody td:first-child, .fp-table .fi-ta-table tbody td:nth-child(2), .fp-table .fi-ta-table tbody td:last-child { grid-column: 1 / -1; }
    .fp-table .fi-ta-text-input { min-width: 0; max-width: none; width: 100%; padding: 8px 12px; }
    .fp-input-orcamento::before, .fp-input-realizado::before { display: block; font-size: 11px; color: var(--fp-muted); margin-bottom: 6px; }
    .fp-input-orcamento::before { content: 'Previsto · R$'; }
    .fp-input-realizado::before { content: 'Realizado · R$'; }
}

/* =====================================================================
   CONTEUDO — quadro Disponivel / Agendado / Postado (20/10/2026).
   Reusa .crm-col, .crm-resumo e .crm-funil-aba; aqui so o que e proprio.
   ===================================================================== */
.cnt-perfis { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.cnt-perfil-aba { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.cnt-perfil-qtd { font-size: 10px; font-weight: 700; color: var(--osf-txt-muted); }
.cnt-ponto { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; }

.cnt-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}
.cnt-col { width: auto; min-width: 0; }

.cnt-card {
    display: flex;
    gap: 11px;
    padding: 10px;
    background: var(--osf-card);
    border: 1px solid rgb(0 0 0 / 0.08);
    border-left: 3px solid var(--cor-perfil, #8a8a8a);
    border-radius: 9px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.05);
    cursor: grab;
    transition: box-shadow 0.16s, transform 0.16s;
}
.cnt-card:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgb(0 0 0 / 0.1); }

/* 4:5, a proporcao do post no feed */
.cnt-thumb {
    flex: none;
    width: 64px;
    height: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(0 0 0 / 0.05);
    border-radius: 6px;
}
.cnt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cnt-thumb-vazia { padding: 4px; font-size: 9.5px; font-weight: 600; text-align: center; color: var(--osf-txt-muted); }

.cnt-card-corpo { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.cnt-card-titulo {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--osf-txt-h);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.cnt-card-titulo:hover { text-decoration: underline; text-underline-offset: 2px; }
.cnt-card-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 10.5px; color: var(--osf-txt-muted); }
.cnt-card-perfil { display: inline-flex; align-items: center; gap: 5px; }
.cnt-card-data { font-size: 11px; font-weight: 600; color: var(--osf-txt-h); font-variant-numeric: tabular-nums; }
.cnt-card-data-atrasada { color: #b42318; }
.cnt-card-previsto { font-size: 10.5px; font-weight: 600; color: var(--osf-txt-muted); font-variant-numeric: tabular-nums; }
.cnt-card-previsto-passou { color: #b42318; }
.cnt-card-link { font-size: 11px; font-weight: 600; color: #2a7d4f; text-decoration: none; }
.cnt-card-link:hover { text-decoration: underline; }

.cnt-card-mover { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.cnt-card-mover button {
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 600;
    color: var(--osf-txt-muted);
    background: transparent;
    border: 1px solid rgb(0 0 0 / 0.12);
    border-radius: 20px;
    cursor: pointer;
}
.cnt-card-mover button:hover { color: var(--osf-txt-h); border-color: var(--osf-gold-border); }

.cnt-card a:focus-visible,
.cnt-card-mover button:focus-visible,
.cnt-perfis a:focus-visible { outline: 2px solid var(--osf-gold); outline-offset: 2px; }

.cnt-dica { margin-top: 4px; font-size: 11.5px; color: var(--osf-txt-muted); }

/* falta produzir: borda tracejada e selo ambar, para nao ser confundida com peca pronta */
.cnt-card-produzir { border-style: dashed; border-left-style: solid; background: rgb(196 123 26 / 0.04); }
.cnt-card-falta {
    font-size: 10.5px;
    line-height: 1.35;
    color: #7a4a0c;
    overflow-wrap: anywhere;
}
.cnt-card-falta strong {
    display: inline-block;
    margin-right: 4px;
    padding: 0 6px;
    font-size: 9.5px;
    letter-spacing: 0.02em;
    color: #7a4a0c;
    background: rgb(196 123 26 / 0.16);
    border-radius: 20px;
}
.cnt-divisoria {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 2px 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7a4a0c;
}
.cnt-divisoria::after { content: ''; flex: 1; border-top: 1px dashed rgb(196 123 26 / 0.45); }
html.dark .cnt-divisoria { color: #f5c26b; }
.cnt-resumo-produzir { background: rgb(196 123 26 / 0.07); border-color: rgb(196 123 26 / 0.3); }
.cnt-resumo-produzir .crm-resumo-valor { color: #7a4a0c; }

html.dark .cnt-card { border-color: rgb(255 255 255 / 0.1); border-left-color: var(--cor-perfil, #8a8a8a); }
html.dark .cnt-card-produzir { border-color: rgb(255 255 255 / 0.18); border-left-color: var(--cor-perfil, #8a8a8a); background: rgb(196 123 26 / 0.06); }
html.dark .cnt-card-falta,
html.dark .cnt-card-falta strong,
html.dark .cnt-resumo-produzir .crm-resumo-valor { color: #f5c26b; }
html.dark .cnt-card-falta strong { background: rgb(196 123 26 / 0.22); }
html.dark .cnt-thumb { background: rgb(255 255 255 / 0.06); }
html.dark .cnt-card-mover button { border-color: rgb(255 255 255 / 0.16); }
html.dark .cnt-card-data-atrasada,
html.dark .cnt-card-previsto-passou { color: #f97066; }
html.dark .cnt-card-link { color: #6fcf97; }

/* publicar sozinho (21/10): verde sai, ambar espera alguem, vermelho precisa de conferencia */
.cnt-card-auto {
    align-self: flex-start;
    padding: 0 7px;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    border-radius: 20px;
    font-variant-numeric: tabular-nums;
}
.cnt-card-auto-ok { color: #1d6b40; background: rgb(42 125 79 / 0.13); }
.cnt-card-auto-espera,
.cnt-card-auto-andamento { color: #7a4a0c; background: rgb(196 123 26 / 0.16); }
.cnt-card-auto-erro { color: #b42318; background: rgb(180 35 24 / 0.1); }
html.dark .cnt-card-auto-ok { color: #6fcf97; background: rgb(42 125 79 / 0.25); }
html.dark .cnt-card-auto-espera,
html.dark .cnt-card-auto-andamento { color: #f5c26b; background: rgb(196 123 26 / 0.22); }
html.dark .cnt-card-auto-erro { color: #f97066; background: rgb(180 35 24 / 0.22); }

@media (max-width: 1024px) {
    .cnt-board { grid-template-columns: minmax(0, 1fr); }
}

/* ── CRM: score e nicho no card (prospecção, 13/11/2026) ───────────────── */
.crm-card-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.crm-card-score {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 1px 7px 1px 5px; border-radius: 999px;
    font-size: 11px; font-weight: 700; line-height: 1.6; font-variant-numeric: tabular-nums;
}
.crm-card-score-icone { width: 12px; height: 12px; }
.crm-card-score-a { background: var(--gold-light); color: #9a5b00; border: 1px solid var(--gold-border); }
.crm-card-score-b { background: rgb(47 128 168 / 0.10); color: #1f5f80; border: 1px solid rgb(47 128 168 / 0.30); }
.crm-card-score-c { background: rgba(0,0,0,0.05); color: var(--osf-txt-muted); border: 1px solid rgba(0,0,0,0.10); }
.crm-card-nicho {
    padding: 1px 7px; border-radius: 999px; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 10.5px; font-weight: 600; line-height: 1.6;
    background: rgb(91 75 181 / 0.10); color: #4a3d99; border: 1px solid rgb(91 75 181 / 0.25);
}
.crm-col-mais {
    display: block; margin-top: 4px; padding: 8px; border-radius: 8px; text-align: center;
    font-size: 12px; font-weight: 600; color: var(--osf-txt-muted); border: 1px dashed rgba(0,0,0,0.15);
}
.crm-col-mais:hover { color: #9a5b00; border-color: var(--gold-border); }
html.dark .crm-card-score-a { color: #fca311; background: rgb(252 163 17 / 0.12); }
html.dark .crm-card-score-b { color: #7cc4e4; background: rgb(47 128 168 / 0.18); border-color: rgb(124 196 228 / 0.30); }
html.dark .crm-card-score-c { background: rgb(255 255 255 / 0.07); border-color: rgb(255 255 255 / 0.12); }
html.dark .crm-card-nicho { color: #b5a8ff; background: rgb(91 75 181 / 0.22); border-color: rgb(181 168 255 / 0.30); }
html.dark .crm-col-mais { border-color: rgb(255 255 255 / 0.15); }

/* =====================================================================
   Roteiro comercial. Agenda (16/11/2026): mensagem pronta com copiar e
   WhatsApp, prefixo rc-. Playbooks e Artefatos (17/11/2026, 3ª versão):
   estrutura do portal de referencia com as cores da OSF, escopo .pbk.
   ===================================================================== */
.rc-msg-texto { margin-top: 6px; padding: 8px 10px; font-size: 12.5px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; color: var(--osf-txt-h); background: rgb(0 0 0 / 0.035); border-left: 3px solid var(--osf-gold); border-radius: 0 6px 6px 0; }
.rc-msg { margin-top: 6px; }
.rc-msg > summary { font-size: 11.5px; font-weight: 600; color: var(--osf-txt-muted); cursor: pointer; }
.rc-msg > summary:focus-visible { outline: 2px solid #fca311; outline-offset: 2px; }
.rc-msg-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rc-botao { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; font-size: 11.5px; font-weight: 600; color: var(--osf-txt-h); text-decoration: none; background: transparent; border: 1px solid var(--osf-gold-border); border-radius: 8px; cursor: pointer; }
.rc-botao:hover { background: var(--osf-gold-light); }
.rc-botao:focus-visible { outline: 2px solid #fca311; outline-offset: 2px; }
.rc-md { margin-top: 6px; font-size: 12.5px; line-height: 1.6; color: var(--osf-txt-h); overflow-x: auto; }
.rc-md > * + * { margin-top: 8px; }
.rc-md strong { font-weight: 700; }
.rc-md ul, .rc-md ol { padding-left: 18px; }
.rc-md ul { list-style: disc; }
.rc-md ol { list-style: decimal; }
.rc-md li + li { margin-top: 3px; }
.rc-md blockquote { padding: 6px 10px; background: rgb(0 0 0 / 0.035); border-left: 3px solid var(--osf-gold); border-radius: 0 6px 6px 0; }
.rc-md blockquote p + p { margin-top: 4px; }
.rc-md table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rc-md th, .rc-md td { padding: 6px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid rgb(0 0 0 / 0.08); }
.rc-md th { font-weight: 700; color: var(--osf-txt-muted); }
html.dark .rc-md th, html.dark .rc-md td { border-color: rgb(255 255 255 / 0.1); }
html.dark .rc-msg-texto, html.dark .rc-md blockquote { background: rgb(255 255 255 / 0.05); }

/* Playbooks e Artefatos, 3ª versão (17/11/2026): a estrutura do portal de
   referencia, so com as cores da OSF (pedido do Lucas). Escopo .pbk: os nomes
   nao colidem com o portfolio, que segue nas classes globais (filter-chip,
   material-card, tag). Texto dourado sobre branco usa #b26d00 (contraste);
   sobre o dourado, texto preto. */
.pbk {
    --pbk-borda: rgb(0 0 0 / 0.09);
    --pbk-borda-forte: rgb(0 0 0 / 0.14);
    --pbk-suave: rgb(0 0 0 / 0.035);
    --pbk-fundo: #f7f7f5;
    --pbk-ouro-txt: #b26d00;
    display: flex; flex-direction: column; gap: 24px;
    max-width: 1240px; color: var(--txt-body);
    animation: pbk-sobe .35s ease both;
}
html.dark .pbk { --pbk-borda: rgb(255 255 255 / 0.10); --pbk-borda-forte: rgb(255 255 255 / 0.16); --pbk-suave: rgb(255 255 255 / 0.05); --pbk-fundo: #161616; --pbk-ouro-txt: var(--gold); }
@keyframes pbk-sobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pbk { animation: none; } }
.pbk *:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* cabecalho */
.pbk-cab { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pbk-cab-detalhe { display: flex; flex-direction: column; gap: 16px; }
.pbk-linha-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.pbk-h1 { font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: var(--txt-h); }
.pbk-sub { margin-top: 8px; max-width: 56rem; font-size: 14px; line-height: 1.6; color: var(--txt-muted); }
.pbk-voltar { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; font-size: 14px; font-weight: 500; color: var(--txt-h); text-decoration: none; background: var(--bg-card); border: 1px solid var(--pbk-borda-forte); border-radius: 12px; transition: background .15s, border-color .15s; }
.pbk-voltar:hover { background: var(--gold-light); border-color: var(--gold-border); }
.pbk-voltar svg { width: 16px; height: 16px; }
.pbk-admin { display: flex; flex-wrap: wrap; gap: 6px; }
.pbk-admin a { display: inline-flex; align-items: center; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--txt-body); text-decoration: none; background: var(--bg-card); border: 1px dashed var(--pbk-borda-forte); border-radius: 999px; }
.pbk-admin a:hover { color: var(--txt-h); border-color: var(--gold-border); }
.pbk-vazio { font-size: 13px; color: var(--txt-muted); }

/* filtro */
.pbk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pbk-chip { padding: 7px 14px; font-family: inherit; font-size: 12px; font-weight: 500; color: var(--txt-h); background: var(--bg-card); border: 1px solid var(--pbk-borda-forte); border-radius: 999px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.pbk-chip:hover { border-color: var(--gold); }
.pbk-chip.on { color: #000; background: var(--gold); border-color: var(--gold); font-weight: 600; }

/* secoes e faixa de cards */
.pbk-sec { margin-top: 12px; }
.pbk-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pbk-sec-head h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--txt-h); }
.pbk-sec-head h2 small { font-size: 12px; font-weight: 500; color: var(--txt-muted); }
.pbk-ico { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--pbk-ouro-txt); background: var(--gold-light); border-radius: 10px; }
.pbk-ico svg { width: 16px; height: 16px; }
.pbk-nav { display: flex; gap: 6px; flex-shrink: 0; }
.pbk-nav button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--txt-h); background: var(--bg-card); border: 1px solid var(--pbk-borda-forte); border-radius: 10px; cursor: pointer; }
.pbk-nav button:hover { border-color: var(--gold); }
.pbk-nav svg { width: 16px; height: 16px; }
.pbk-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.pbk-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pbk-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; padding: 18px; color: inherit; text-decoration: none; background: var(--bg-card); border: 1px solid var(--pbk-borda); border-radius: 16px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); transition: transform .15s, box-shadow .15s, border-color .15s; }
.pbk-card:hover { transform: translateY(-2px); border-color: var(--gold-border); box-shadow: 0 10px 24px -14px rgb(0 0 0 / 0.35); }
.pbk-card h3 { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--txt-h); }
.pbk-card p { flex: 1; font-size: 13px; line-height: 1.55; color: var(--txt-muted); }
.pbk-card-pe { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pbk-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--pbk-ouro-txt); }
.pbk-link svg { width: 14px; height: 14px; transition: transform .15s; }
.pbk-card:hover .pbk-link svg { transform: translateX(2px); }
.pbk-uso { font-size: 11px; font-weight: 600; color: var(--txt-muted); }
.pbk-tag { align-self: flex-start; display: inline-flex; padding: 4px 10px; font-size: 11px; font-weight: 600; color: var(--txt-h); background: var(--pbk-suave); border-radius: 999px; white-space: nowrap; }
.pbk-tag-p { color: var(--pbk-ouro-txt); background: var(--gold-light); }
.pbk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

/* detalhe: grade de duas colunas */
.pbk-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .pbk-grid2 { grid-template-columns: minmax(0, 1fr); } }
.pbk-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pbk-box { padding: 20px; background: var(--bg-card); border: 1px solid var(--pbk-borda); border-radius: 12px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); }
.pbk-box > h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--txt-h); margin-bottom: 10px; }
.pbk-lat { position: sticky; top: 80px; }
@media (max-width: 1100px) { .pbk-lat { position: static; } }

/* dias na horizontal */
.pbk-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pbk-day { flex: 0 0 auto; min-width: 62px; padding: 8px 10px; font-family: inherit; font-size: 12px; text-align: center; color: var(--txt-muted); background: var(--bg-card); border: 1px solid var(--pbk-borda-forte); border-radius: 12px; cursor: pointer; transition: border-color .15s; }
.pbk-day:hover { border-color: var(--gold); }
.pbk-day b { display: block; font-size: 16px; color: var(--txt-h); }
.pbk-day.on { color: #000; background: var(--gold); border-color: var(--gold); }
.pbk-day.on b { color: #000; }
.pbk-dia-tit { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--txt-h); }
.pbk-dia-tit span { font-size: 14px; font-weight: 400; color: var(--txt-muted); }
.pbk-dia-nota { margin-top: -6px; font-size: 12px; color: var(--txt-muted); }

/* touchpoint */
.pbk-tp { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--bg-card); border: 1px solid var(--pbk-borda); border-radius: 16px; }
.pbk-tp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--txt-h); }
.pbk-tp-head > svg { width: 16px; height: 16px; color: var(--pbk-ouro-txt); flex-shrink: 0; }
.pbk-tp-acao { flex: 1; min-width: 0; font-weight: 400; color: var(--txt-muted); }
.pbk-tp-hora { margin-left: auto; padding: 2px 8px; font-size: 11px; font-weight: 600; color: var(--txt-muted); background: var(--pbk-suave); border-radius: 6px; white-space: nowrap; }
.pbk-tp-det { font-size: 13px; line-height: 1.55; color: var(--txt-muted); }
.pbk-quando { font-size: 12px; font-weight: 600; color: var(--txt-body); margin-bottom: 6px; }
.pbk-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.pbk-tab { padding: 5px 12px; font-family: inherit; font-size: 12px; color: var(--txt-h); background: var(--pbk-fundo); border: 1px solid var(--pbk-borda-forte); border-radius: 8px; cursor: pointer; }
.pbk-tab.on { color: #000; background: var(--gold); border-color: var(--gold); font-weight: 600; }
.pbk-script { position: relative; padding: 14px 44px 14px 14px; background: var(--pbk-fundo); border: 1px solid var(--pbk-borda); border-radius: 12px; }
.pbk-script pre { margin: 0; font-family: inherit; font-size: 13px; line-height: 1.6; color: var(--txt-h); white-space: pre-wrap; overflow-wrap: anywhere; }
.pbk-copy { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: var(--txt-muted); background: var(--bg-card); border: 1px solid var(--pbk-borda-forte); border-radius: 8px; cursor: pointer; }
.pbk-copy:hover { color: var(--txt-h); border-color: var(--gold); }
.pbk-copy.on { color: #2a7d4f; border-color: #2a7d4f; }
.pbk-copy svg { width: 14px; height: 14px; }
.pbk-ia { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--pbk-ouro-txt); background: var(--gold-light); border: 1px solid var(--gold-border); border-radius: 8px; cursor: pointer; }
.pbk-ia:hover { border-color: var(--gold); }
.pbk-ia svg { width: 14px; height: 14px; }
.pbk-aviso { padding: 16px; font-size: 13px; line-height: 1.55; color: var(--txt-muted); background: var(--bg-card); border: 1px dashed var(--pbk-borda-forte); border-radius: 14px; }
.pbk-rodape { font-size: 11.5px; line-height: 1.55; color: var(--txt-muted); }

/* cases relacionados */
.pbk-busca { width: 100%; margin: 4px 0 8px; padding: 8px 12px; font-family: inherit; font-size: 13px; color: var(--txt-h); background: var(--pbk-fundo); border: 1px solid var(--pbk-borda-forte); border-radius: 10px; }
.pbk-busca:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-light); }
.pbk-case { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--pbk-borda); }
.pbk-busca + .pbk-case { border-top: 0; }
.pbk-case div { flex: 1; min-width: 0; }
.pbk-case b { display: block; font-size: 13px; color: var(--txt-h); }
.pbk-case small { font-size: 12px; color: var(--txt-muted); }
.pbk-case a, .pbk-case-novo { font-size: 12px; font-weight: 600; color: var(--pbk-ouro-txt); text-decoration: none; }
.pbk-case a:hover, .pbk-case-novo:hover { text-decoration: underline; }
.pbk-case-vazio { font-size: 13px; line-height: 1.55; color: var(--txt-muted); margin-bottom: 8px; }

/* regras e respostas */
.pbk-regras { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; }
.pbk-regras dt { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--txt-muted); margin-bottom: 4px; }
.pbk-regras dd { font-size: 13px; line-height: 1.55; color: var(--txt-h); }
.pbk-resposta { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--pbk-borda); }
.pbk-resposta:first-child { padding-top: 0; border-top: 0; }
.pbk-resposta > b { font-size: 13px; color: var(--txt-h); }

/* roteiro: partes empilhadas e indice */
.pbk-bloco { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 80px; }
.pbk-bloco-cab { display: flex; align-items: center; gap: 10px; }
.pbk-bloco-cab h2 { flex: 1; font-size: 16px; font-weight: 600; color: var(--txt-h); }
.pbk-bloco-num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-size: 13px; font-weight: 700; color: #000; background: var(--gold); border-radius: 8px; }
.pbk-indice ol { display: flex; flex-direction: column; gap: 2px; }
.pbk-indice a { display: flex; gap: 10px; padding: 7px 8px; font-size: 13px; line-height: 1.4; color: var(--txt-body); text-decoration: none; border-radius: 8px; }
.pbk-indice a:hover { color: var(--txt-h); background: var(--gold-light); }
.pbk-indice a span { flex-shrink: 0; min-width: 18px; font-weight: 700; color: var(--pbk-ouro-txt); }
.pbk-md { font-size: 13.5px; line-height: 1.65; color: var(--txt-h); overflow-x: auto; }
.pbk-md > * + * { margin-top: 10px; }
.pbk-md strong { font-weight: 700; }
.pbk-md h1, .pbk-md h2, .pbk-md h3 { font-weight: 700; color: var(--txt-h); }
.pbk-md h2 { font-size: 17px; }
.pbk-md h3 { font-size: 15px; }
.pbk-md ul, .pbk-md ol { padding-left: 20px; }
.pbk-md ul { list-style: disc; }
.pbk-md ol { list-style: decimal; }
.pbk-md li + li { margin-top: 4px; }
.pbk-md a { color: var(--pbk-ouro-txt); text-decoration: underline; }
.pbk-md blockquote { padding: 8px 12px; background: var(--bg-card); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; }
.pbk-md blockquote p + p { margin-top: 4px; }
.pbk-md table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pbk-md th, .pbk-md td { padding: 8px 10px; text-align: left; vertical-align: top; border: 1px solid var(--pbk-borda-forte); }
.pbk-md th { font-weight: 600; color: #000; background: var(--gold); }
.pbk-md hr { border: 0; border-top: 1px solid var(--pbk-borda); margin: 18px 0; }
.pbk-script-md { padding-right: 48px; }

/* artefato como documento */
.pbk-doc { padding: 28px 32px; }
.pbk-doc section + section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--pbk-borda); }
.pbk-doc h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--txt-h); margin-bottom: 10px; scroll-margin-top: 80px; }
.pbk-doc .pbk-md { font-size: 14px; line-height: 1.7; }
@media (max-width: 640px) { .pbk-doc { padding: 20px 16px; } .pbk-h1 { font-size: 24px; } }

/* personalizar com IA */
.pbk-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pbk-modal-fundo { position: absolute; inset: 0; background: rgb(0 0 0 / 0.45); }
.pbk-modal-caixa { position: relative; display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; background: var(--bg-card); border: 1px solid var(--pbk-borda); border-radius: 16px; box-shadow: 0 24px 48px -16px rgb(0 0 0 / 0.4); }
.pbk-modal-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pbk-modal-cab h3 { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--txt-h); }
.pbk-modal-cab h3 svg { width: 18px; height: 18px; color: var(--pbk-ouro-txt); }
.pbk-modal-x { display: inline-flex; padding: 6px; color: var(--txt-muted); background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.pbk-modal-x:hover { color: var(--txt-h); background: var(--pbk-suave); }
.pbk-modal-x svg { width: 18px; height: 18px; }
.pbk-modal-lista { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; border: 1px solid var(--pbk-borda); border-radius: 10px; }
.pbk-modal-lista li + li { border-top: 1px solid var(--pbk-borda); }
.pbk-modal-lista button { width: 100%; padding: 10px 12px; font-family: inherit; font-size: 13px; text-align: left; color: var(--txt-h); background: transparent; border: 0; cursor: pointer; }
.pbk-modal-lista button:hover { background: var(--gold-light); }
.pbk-modal-lista button:disabled { opacity: .6; cursor: progress; }
.pbk-modal-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.pbk-botao { padding: 8px 14px; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--txt-h); background: var(--bg-card); border: 1px solid var(--pbk-borda-forte); border-radius: 10px; cursor: pointer; }
.pbk-botao:hover { border-color: var(--gold); }
.pbk-botao-p { color: #000; background: var(--gold); border-color: var(--gold); }
.pbk-botao-p:hover { background: #ffba33; }

/* =====================================================================
   WHATSAPP (OS-008, 16/11/2026): Inbox, tela WhatsApp e previa no card.
   Porte do Inbox do CRM da Infracao Zero, nos tokens da OSF. A pagina nao
   rola: lista e conversa rolam por dentro, como num aplicativo.
   ===================================================================== */
:root { --wa-bg: #ffffff; --wa-painel: #f7f7f5; --wa-linha: rgb(0 0 0 / 0.08); --wa-acento: #fca311; --wa-acento-rgb: 252 163 17; --wa-tinta: #0a0a0a; }
html.dark { --wa-bg: #141414; --wa-painel: #101010; --wa-linha: rgb(255 255 255 / 0.08); }

.wa {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    height: calc(100vh - 7.5rem);
    min-height: 480px;
    border: 1px solid var(--wa-linha);
    border-radius: 0.9rem;
    overflow: hidden;
    background: var(--wa-bg);
}

.wa-lista {
    display: flex; flex-direction: column;
    /* min-height: 0 nao e detalhe: sem ele a coluna nao encolhe e a lista nao rola */
    min-width: 0; min-height: 0; overflow: hidden;
    background: var(--wa-painel);
    border-right: 1px solid var(--wa-linha);
}
.wa-lista-cab { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .85rem 1rem .6rem; }
.wa-lista-cab h2 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--osf-txt-h); }
.wa-contadores { display: flex; gap: .35rem; }
.wa-pill { padding: .12rem .5rem; font-size: .68rem; white-space: nowrap; border-radius: 99px; color: #9a5d00; background: rgb(var(--wa-acento-rgb) / .15); }
html.dark .wa-pill { color: var(--wa-acento); }
.wa-pill-nao-lida { font-weight: 700; color: var(--wa-tinta) !important; background: var(--wa-acento); }

.wa .wa-canal { display: flex; align-items: center; gap: .4rem; margin: 0 1rem .5rem; padding: .4rem .6rem; font-size: .75rem; text-decoration: none; border-radius: .5rem; }
.wa .wa-canal-on { color: #1f7a45; background: rgb(42 125 79 / .1); }
html.dark .wa .wa-canal-on { color: #5fd391; }
.wa .wa-canal-off { font-weight: 500; color: #b42318; background: rgb(220 38 38 / .1); }
html.dark .wa .wa-canal-off { color: #f87171; }
.wa .wa-canal-tel { margin-left: auto; opacity: .7; }
.wa .wa-ponto { width: .5rem; height: .5rem; border-radius: 99px; background: #2a7d4f; box-shadow: 0 0 0 3px rgb(42 125 79 / .22); }

.wa-busca { padding: 0 1rem .5rem; }
.wa-busca input,
.wa-compositor textarea {
    width: 100%; padding: .5rem .75rem; font-size: .82rem; color: inherit;
    border: 1px solid var(--wa-linha); border-radius: .6rem; background: var(--wa-bg);
}
.wa-busca input:focus,
.wa-compositor textarea:focus { outline: none; border-color: var(--wa-acento); box-shadow: 0 0 0 3px rgb(var(--wa-acento-rgb) / .2); }

.wa-filtros { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0 1rem .6rem; }
.wa-chip { padding: .22rem .6rem; font-size: .72rem; color: inherit; cursor: pointer; opacity: .75; background: transparent; border: 1px solid var(--wa-linha); border-radius: 99px; }
.wa-chip:hover { opacity: 1; }
.wa-chip.ativo { font-weight: 600; color: var(--wa-tinta); opacity: 1; background: var(--wa-acento); border-color: var(--wa-acento); }

.wa-conversas { flex: 1; min-height: 0; overflow-y: auto; }
.wa-conversa { display: flex; gap: .65rem; width: 100%; padding: .6rem 1rem; text-align: left; color: inherit; cursor: pointer; background: transparent; border: 0; border-bottom: 1px solid var(--wa-linha); }
.wa-conversa:hover { background: rgb(var(--wa-acento-rgb) / .06); }
.wa-conversa.ativa { background: rgb(var(--wa-acento-rgb) / .13); }
.wa-conversa-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: .1rem; }
.wa-l1, .wa-l2 { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.wa-nome { overflow: hidden; font-size: .86rem; font-weight: 600; color: var(--osf-txt-h); white-space: nowrap; text-overflow: ellipsis; }
.wa-l1 time { flex-shrink: 0; font-size: .68rem; color: var(--osf-txt-muted); }
.wa-previa { overflow: hidden; font-size: .76rem; color: var(--osf-txt-muted); white-space: nowrap; text-overflow: ellipsis; }
.wa-badge { flex-shrink: 0; min-width: 1.2rem; padding: 0 .35rem; font-size: .66rem; font-weight: 700; line-height: 1.2rem; text-align: center; color: var(--wa-tinta); background: var(--wa-acento); border-radius: 99px; }
.wa-selo { align-self: flex-start; margin-top: .15rem; padding: .05rem .45rem; font-size: .64rem; color: var(--osf-txt-muted); border: 1px solid var(--wa-linha); border-radius: 99px; }
.wa-selo-negocio { color: #1f7a45; border-color: rgb(42 125 79 / .35); }
html.dark .wa-selo-negocio { color: #5fd391; }

.wa-avatar { display: grid; flex-shrink: 0; place-items: center; width: 2.6rem; height: 2.6rem; font-size: .95rem; font-weight: 700; text-transform: uppercase; color: #9a5d00; background: rgb(var(--wa-acento-rgb) / .18); border-radius: 99px; }
html.dark .wa-avatar { color: var(--wa-acento); }
.wa-avatar-g { width: 2.9rem; height: 2.9rem; font-size: 1.05rem; }
.wa-vazio-lista { padding: 1.5rem 1rem; font-size: .8rem; text-align: center; color: var(--osf-txt-muted); }
.wa-lista-pe { padding: .6rem 1rem; font-size: .68rem; line-height: 1.4; color: var(--osf-txt-muted); border-top: 1px solid var(--wa-linha); }

.wa-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wa .wa-vazio { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--osf-txt-muted); }
.wa .wa-vazio-icone { width: 3.5rem; height: 3.5rem; opacity: .45; }
.wa .wa-vazio h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.wa .wa-vazio p { margin: 0; font-size: .82rem; }

.wa-chat-cab { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; padding: .7rem 1rem; border-bottom: 1px solid var(--wa-linha); }
.wa-chat-id { display: flex; flex-direction: column; min-width: 0; }
.wa-chat-id strong { font-size: .92rem; font-weight: 600; color: var(--osf-txt-h); }
.wa-chat-id span { font-size: .74rem; color: var(--osf-txt-muted); }
.wa-chat-id .wa-via a { color: inherit; font-weight: 600; text-decoration: underline; }
.wa-chat-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-left: auto; }
.wa .wa-btn { display: inline-flex; align-items: center; padding: .35rem .7rem; font-size: .74rem; white-space: nowrap; text-decoration: none; cursor: pointer; border: 1px solid transparent; border-radius: .5rem; }
.wa .wa-btn-fantasma { color: inherit; background: transparent; border-color: var(--wa-linha); }
.wa .wa-btn-fantasma:hover { border-color: var(--wa-acento); }
.wa-voltar { display: none; align-items: center; justify-content: center; flex: 0 0 auto; width: 2rem; height: 2rem; color: inherit; cursor: pointer; background: transparent; border: 0; border-radius: .5rem; }
.wa-voltar svg { width: 1.2rem; height: 1.2rem; }

.wa-msgs { display: flex; flex: 1; flex-direction: column; gap: .35rem; min-height: 0; padding: 1rem 1.25rem; overflow-y: auto; background-image: radial-gradient(rgb(var(--wa-acento-rgb) / .06) 1px, transparent 1px); background-size: 22px 22px; }
.wa-dia { display: flex; justify-content: center; margin: .6rem 0; }
.wa-dia span { padding: .15rem .6rem; font-size: .68rem; color: var(--osf-txt-muted); background: var(--wa-painel); border: 1px solid var(--wa-linha); border-radius: 99px; }
.wa-msg { display: flex; }
.wa-msg-out { justify-content: flex-end; }
.wa-bolha { display: flex; flex-direction: column; max-width: min(68%, 34rem); padding: .45rem .7rem .3rem; font-size: .85rem; line-height: 1.45; color: var(--osf-txt-h); overflow-wrap: anywhere; background: var(--wa-painel); border: 1px solid var(--wa-linha); border-radius: .8rem; }
.wa-msg-out .wa-bolha { background: rgb(var(--wa-acento-rgb) / .14); border-color: rgb(var(--wa-acento-rgb) / .3); }
.wa-bolha time { align-self: flex-end; margin-top: .1rem; font-size: .62rem; color: var(--osf-txt-muted); }
.wa-texto { white-space: pre-wrap; }
.wa-img { display: block; max-width: 100%; max-height: 18rem; border-radius: .5rem; }
.wa-audio { display: flex; align-items: center; gap: .5rem; }
.wa-audio audio { max-width: 16rem; height: 2.2rem; }
.wa-audio-dur { font-size: .7rem; color: var(--osf-txt-muted); }
.wa-anexo { display: inline-flex; align-items: center; gap: .35rem; color: inherit; text-decoration: underline; }
.wa-anexo svg { width: 1rem; height: 1rem; }
.wa-sem-msg { margin: auto; font-size: .82rem; color: var(--osf-txt-muted); }

.wa-compositor { display: flex; align-items: flex-end; gap: .5rem; padding: .7rem 1rem; border-top: 1px solid var(--wa-linha); }
.wa-compositor textarea { flex: 1; min-height: 2.4rem; max-height: 8rem; resize: vertical; font-size: .86rem; background: var(--wa-painel); }
.wa-compositor textarea:disabled { cursor: not-allowed; opacity: .5; }
.wa-enviar { display: grid; flex-shrink: 0; place-items: center; width: 2.4rem; height: 2.4rem; color: var(--wa-tinta); cursor: pointer; background: var(--wa-acento); border: 0; border-radius: 99px; }
.wa-enviar svg { width: 1.05rem; height: 1.05rem; }
.wa-enviar:disabled { cursor: not-allowed; opacity: .4; }

/* celular: OU a lista OU a conversa, nunca empilhadas (empilhado, o campo
   de escrever ficava fora da tela; foi bug de uso na IZ) */
@media (max-width: 900px) {
    .wa { grid-template-columns: 1fr; height: auto; }
    .wa-lista { max-height: 70dvh; border-right: 0; }
    .wa:not(.wa-com-conversa) .wa-chat { display: none; }
    .wa-com-conversa .wa-lista { display: none; }
    .wa-com-conversa .wa-chat { height: calc(100dvh - 8rem); min-height: 26rem; }
    .wa-voltar { display: inline-flex; }
    .wa-bolha { max-width: 85%; }
}

/* tela Administracao → WhatsApp */
.wz { display: grid; gap: 1rem; max-width: 52rem; }
.wz-bloco { padding: 1rem 1.1rem; background: var(--osf-card); border: 1px solid rgb(0 0 0 / .08); border-radius: 12px; }
html.dark .wz-bloco { border-color: rgb(255 255 255 / .08); }
.wz-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.wz-cab h2 { font-size: .95rem; font-weight: 700; color: var(--osf-txt-h); }
.wz-estado { padding: .15rem .6rem; font-size: .72rem; font-weight: 700; border-radius: 99px; }
.wz-estado.wz-on { color: #fff; background: #2a7d4f; }
.wz-estado.wz-meio { color: var(--wa-tinta); background: var(--wa-acento); }
.wz-estado.wz-off { color: #fff; background: #b42318; }
.wz-dados { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin-bottom: 1rem; font-size: .85rem; }
.wz-dados dt { color: var(--osf-txt-muted); }
.wz-dados dd { color: var(--osf-txt-h); }
.wz-acoes { display: flex; flex-wrap: wrap; gap: .5rem; }
.wz-aviso { padding: .7rem .85rem; font-size: .82rem; background: rgb(var(--wa-acento-rgb) / .1); border: 1px solid rgb(var(--wa-acento-rgb) / .35); border-radius: .6rem; }
.wz-qr { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1rem; }
.wz-qr img { width: 15rem; height: 15rem; padding: .5rem; background: #fff; border-radius: .5rem; }
.wz-qr figcaption { flex: 1; min-width: 14rem; font-size: .82rem; color: var(--osf-txt-muted); }
.wz-codigo { display: flex; flex-direction: column; gap: .3rem; margin-top: 1rem; }
.wz-codigo strong { font-family: ui-monospace, Menlo, monospace; font-size: 1.8rem; letter-spacing: .2em; color: var(--osf-txt-h); }
.wz-codigo span { font-size: .82rem; color: var(--osf-txt-muted); }
.wz-travas { display: grid; gap: .55rem; padding-left: 1.1rem; font-size: .84rem; list-style: disc; color: var(--osf-txt-h); }
.wz-travas strong { font-weight: 600; }
.wz-evento { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; font-size: .82rem; border-top: 1px solid rgb(0 0 0 / .06); }
.wz-evento:first-of-type { border-top: 0; }
.wz-evento time { margin-left: auto; font-size: .74rem; color: var(--osf-txt-muted); }
.wz-ponto { width: .55rem; height: .55rem; border-radius: 99px; }
.wz-ponto.wz-on { background: #2a7d4f; }
.wz-ponto.wz-off { background: #b42318; }
.wz-vazio { font-size: .82rem; color: var(--osf-txt-muted); }
.wz-lista { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.wz-item { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem; font-size: .82rem; color: var(--osf-txt-h); border: 1px solid rgb(0 0 0 / .1); border-radius: 99px; }
.wz-item small { font-size: .72rem; color: var(--osf-txt-muted); }
.wz-item-ativo { border-color: rgb(var(--wa-acento-rgb) / .7); background: rgb(var(--wa-acento-rgb) / .1); }
html.dark .wz-item { border-color: rgb(255 255 255 / .12); }

/* previa da ultima mensagem no card do funil (quem enxerga a conversa) */
.crm-card-wa { display: flex; align-items: center; gap: .35rem; margin-top: .35rem; font-size: .72rem; color: var(--osf-txt-muted); }
.crm-card-wa span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.crm-card-wa b { margin-left: auto; padding: 0 .35rem; font-size: .64rem; color: #0a0a0a; background: #fca311; border-radius: 99px; }
.crm-card-wa-nova { color: var(--osf-txt-h); font-weight: 600; }
.crm-card-wa-icone { flex-shrink: 0; width: .85rem; height: .85rem; }

/* =====================================================================
   LEADS DE ENTRADA (17/11/2026): coluna fixa do quadro em funil com numero
   de WhatsApp ligado, e a conversa num painel lateral (espelho do WhatsApp).
   ===================================================================== */
.crm-col-entrada { background: rgb(37 211 102 / 0.06); border-color: rgb(37 211 102 / 0.28); }
html.dark .crm-col-entrada { background: rgb(37 211 102 / 0.07); border-color: rgb(37 211 102 / 0.22); }
.crm-entrada-fonte { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.crm-entrada-numero { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; font-size: 10.5px; font-weight: 600; color: #1f7a45; background: rgb(42 125 79 / 0.1); border-radius: 99px; }
.crm-entrada-ponto { width: 6px; height: 6px; background: #2a7d4f; border-radius: 99px; }
.crm-entrada-off { color: #b42318; background: rgb(220 38 38 / 0.1); }
.crm-entrada-off .crm-entrada-ponto { background: #b42318; }
.crm-entrada-alerta { margin: 0 0 8px; padding: 6px 8px; font-size: 11px; line-height: 1.35; color: #b42318; background: rgb(220 38 38 / 0.08); border-radius: 7px; }
.crm-entrada-pe { margin-top: 10px; font-size: 10.5px; line-height: 1.4; color: var(--osf-txt-muted); }

.crm-card-conversa { width: 100%; font: inherit; text-align: left; color: inherit; }
.crm-card-conversa-nova { border-color: rgb(37 211 102 / 0.45); }
.crm-card-conversa-aberta { box-shadow: 0 0 0 2px rgb(37 211 102 / 0.55); }
.crm-conversa-l1 { display: flex; align-items: center; gap: 8px; }
.crm-conversa-avatar { width: 2rem; height: 2rem; font-size: .8rem; }
.crm-conversa-id { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.crm-conversa-id .crm-card-titulo { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.crm-conversa-tel { font-size: 10.5px; color: var(--osf-txt-muted); }
.crm-conversa-hora { flex-shrink: 0; align-self: flex-start; font-size: 10.5px; color: var(--osf-txt-muted); }
.crm-card-wa-link { cursor: pointer; border-radius: 6px; }
.crm-card-wa-link:hover { color: var(--osf-txt-h); background: rgb(37 211 102 / 0.09); }

/* painel lateral: por cima do quadro, sem sair dele */
.crm-gaveta-fundo { position: fixed; inset: 0; z-index: 30; background: rgb(0 0 0 / 0.25); }
.wa.crm-gaveta {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 31;
    display: flex; width: min(460px, 100vw); height: 100dvh; min-height: 0;
    border-width: 0 0 0 1px; border-radius: 0;
    box-shadow: -12px 0 32px rgb(0 0 0 / 0.14);
}
.wa.crm-gaveta .wa-chat { display: flex; flex: 1; height: auto; min-height: 0; }
.crm-gaveta .wa-chat-cab { position: relative; padding-right: 3rem; }
.crm-gaveta-acoes { flex-basis: 100%; margin-left: 0; }
.crm-gaveta-fechar { position: absolute; top: .6rem; right: .6rem; display: grid; place-items: center; width: 2rem; height: 2rem; color: inherit; cursor: pointer; background: transparent; border: 0; border-radius: .5rem; }
.crm-gaveta-fechar:hover { background: rgb(0 0 0 / 0.06); }
.crm-gaveta-fechar svg { width: 1.2rem; height: 1.2rem; }
.crm-gaveta .wa-bolha { max-width: 85%; }

/* =====================================================================
   QUADRO DENSO (17/11/2026, pedido do Lucas com o Kommo de referencia):
   topo numa faixa so, colunas na altura da janela rolando por dentro,
   cabecalho e card enxutos. Sobrepoe as regras do quadro la de cima.
   `--crm-topo` e medido pela propria tela (funil.blade.php).
   ===================================================================== */
.fi-page:has(.crm-board) > section { gap: 10px; padding-block: 14px 0; }
.fi-page:has(.crm-board) .fi-header-heading { font-size: 1.25rem; line-height: 1.75rem; }
.fi-main:has(.crm-board) { max-width: none; }
.fi-page:has(.crm-board) .grid.flex-1 { gap: 8px; }

.crm-funis { gap: 4px; margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.crm-funil-aba { padding: 3px 10px; font-size: 11.5px; }

.crm-resumo { align-items: center; gap: 4px 14px; margin-bottom: 0; padding: 5px 10px; background: var(--osf-card); border: 1px solid rgb(0 0 0 / 0.08); border-radius: 8px; }
.crm-resumo .crm-resumo-item { flex-direction: row; align-items: baseline; gap: 6px; padding: 0; background: transparent; border: 0; border-radius: 0; }
.crm-resumo .crm-resumo-label { font-size: 9.5px; letter-spacing: 0.08em; }
.crm-resumo .crm-resumo-valor { font-size: 13px; font-variant-numeric: tabular-nums; }
.crm-resumo .crm-resumo-divisor { align-self: center; height: 14px; margin: 0; }
html.dark .crm-resumo { border-color: rgb(255 255 255 / 0.1); }

.crm-board { gap: 8px; height: calc(100dvh - var(--crm-topo, 190px) - 10px); min-height: 340px; padding-bottom: 6px; }
.crm-col { flex: 0 0 236px; width: 236px; max-height: 100%; min-height: 0; padding: 0; border-radius: 9px; }
.crm-col-head { flex-shrink: 0; padding: 7px 9px 6px; }
.crm-col-bar { position: absolute; top: 0; right: 0; left: 0; width: auto; height: 3px; margin: 0; border-radius: 9px 9px 0 0; }
.crm-col-titulo { gap: 6px; min-height: 20px; }
.crm-col-nome { overflow: hidden; font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
.crm-col-qtd { flex-shrink: 0; padding: 0 6px; font-size: 10px; line-height: 16px; }
.crm-col-total { flex-shrink: 0; margin: 0; font-size: 10.5px; color: var(--osf-txt-muted); font-variant-numeric: tabular-nums; }
.crm-col-add { flex-shrink: 0; display: grid; place-items: center; width: 18px; height: 18px; margin-left: auto; font-size: 14px; line-height: 1; text-decoration: none; color: var(--osf-txt-muted); border-radius: 5px; }
.crm-col-add:hover { color: #7a4d00; background: rgb(252 163 17 / 0.16); }
html.dark .crm-col-add:hover { color: #fca311; }
.crm-col-descricao { margin-top: 3px; font-size: 10px; line-height: 1.35; cursor: pointer; -webkit-line-clamp: 2; line-clamp: 2; }
.crm-col-descricao-aberta { display: block; -webkit-line-clamp: unset; line-clamp: unset; }

.crm-col-cards { flex: 1 1 auto; gap: 5px; min-height: 30px; padding: 0 6px 6px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.crm-col-vazia { padding: 8px 4px; font-size: 10.5px; }
.crm-col-mais { margin-top: 2px; padding: 5px; font-size: 10.5px; }

.crm-card { padding: 6px 8px 6px 9px; border-left-width: 2px; border-radius: 6px; box-shadow: none; cursor: pointer; }
.crm-card:hover { transform: none; box-shadow: 0 2px 8px rgb(0 0 0 / 0.1); }
.crm-card-aberto { box-shadow: 0 0 0 2px var(--osf-gold-border); }
.crm-card-l1 { display: flex; align-items: flex-start; gap: 6px; }
.crm-card-titulo { display: -webkit-box; flex: 1; min-width: 0; overflow: hidden; font-size: 11.5px; line-height: 1.3; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.crm-card-empresa { margin-top: 1px; overflow: hidden; font-size: 10.5px; white-space: nowrap; text-overflow: ellipsis; }
.crm-card-resp { width: 17px; height: 17px; margin-left: 0; font-size: 8px; }
.crm-card-wa { margin-top: 3px; font-size: 10.5px; }
.crm-card-rodape { flex-wrap: wrap; gap: 3px 6px; margin-top: 4px; }
.crm-card-rodape:not(:has(*)) { display: none; }
.crm-card-score { padding: 0 5px 0 3px; font-size: 9.5px; line-height: 1.5; }
.crm-card-score-icone { width: 10px; height: 10px; }
.crm-card-nicho { padding: 0 6px; font-size: 9.5px; line-height: 1.5; }
.crm-card-agenda { font-size: 9.5px; }
.crm-card-valor { margin: 0 0 0 auto; font-size: 11px; font-variant-numeric: tabular-nums; }
.crm-card-data { margin-left: auto; font-size: 9.5px; color: var(--osf-txt-muted); }

/* coluna de entrada no mesmo passo */
.crm-entrada-fonte { margin-top: 4px; }
.crm-entrada-numero { padding: 0 7px; font-size: 9.5px; line-height: 1.6; }
.crm-entrada-alerta { margin: 0 6px 6px; }
.crm-entrada-pe { flex-shrink: 0; margin: 0; padding: 5px 9px 7px; font-size: 9.5px; line-height: 1.35; }
.crm-card-conversa .crm-card-titulo { display: block; white-space: nowrap; text-overflow: ellipsis; }
.crm-conversa-l1 { gap: 7px; }
.crm-conversa-avatar { width: 1.6rem; height: 1.6rem; font-size: .68rem; }
.crm-conversa-tel, .crm-conversa-hora { font-size: 9.5px; }

/* painel lateral do lead (18/11/2026): ficha à esquerda, conversa à direita, em todo funil */
.wa.crm-gaveta { display: grid; grid-template-columns: 390px minmax(0, 1fr); width: min(1080px, 100vw); }
.crm-gaveta .wa-chat-cab { gap: .55rem; padding: .6rem .9rem; }
.crm-gaveta .wa-avatar-g { width: 2.3rem; height: 2.3rem; font-size: .9rem; }
.crm-gaveta .wa-chat-id { flex: 1; }
.crm-gaveta .wa-chat-id strong { font-size: .86rem; line-height: 1.25; }
.crm-gaveta .wa-chat-id span { font-size: .7rem; }
.crm-gaveta-etapa { width: 100%; min-width: 0; padding: .4rem 1.6rem .4rem .6rem; font-size: .8rem; font-weight: 600; color: inherit; background-color: var(--wa-bg); border: 1px solid var(--wa-linha); border-left: 4px solid var(--cor-etapa, #8a8a8a); border-radius: .55rem; }
.crm-gaveta-etapa:focus { outline: none; border-color: var(--wa-acento); box-shadow: 0 0 0 3px rgb(var(--wa-acento-rgb) / .2); }
html.dark .crm-gaveta-etapa option { color: #f0f0f0; background: #1e1e1e; }

/* ficha (18/11/2026, 2ª versão: blocos em cartões, rótulo ao lado do valor, selos com tom) */
.crm-ficha { display: flex; flex-direction: column; min-height: 0; background: var(--wa-painel); border-right: 1px solid var(--wa-linha); }
.crm-ficha-cab { display: flex; align-items: center; gap: .75rem; padding: 1.05rem 1rem .8rem; }
.crm-ficha-avatar { display: grid; flex-shrink: 0; place-items: center; width: 2.9rem; height: 2.9rem; font-size: 1rem; font-weight: 700; color: var(--wa-tinta); background: linear-gradient(135deg, #fcbf49, var(--wa-acento)); border-radius: 50%; box-shadow: 0 2px 8px rgb(var(--wa-acento-rgb) / .35); }
.crm-ficha-id { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.crm-ficha-id strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 1.02rem; font-weight: 700; line-height: 1.25; color: var(--osf-txt-h); overflow-wrap: anywhere; }
.crm-ficha-id span { font-size: .76rem; color: var(--osf-txt-muted); }
.crm-ficha-selos { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: 0 1rem .75rem; }
.crm-ficha-valor { padding: .1rem .5rem; font-size: .72rem; font-weight: 700; color: #157a41; background: rgb(31 157 85 / .12); border-radius: 999px; }
html.dark .crm-ficha-valor { color: #4ade80; }
.crm-ficha-etapa-rotulo { display: flex; flex-direction: column; gap: .3rem; padding: 0 1rem .7rem; }
.crm-ficha-etapa-rotulo > span, .crm-ficha-proximo span { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--osf-txt-muted); }
.crm-ficha-proximo { display: flex; gap: .6rem; margin: 0 1rem .9rem; padding: .6rem .75rem; background: var(--wa-bg); border: 1px solid var(--wa-linha); border-left: 3px solid #1f9d55; border-radius: .7rem; }
.crm-ficha-proximo-atrasado { border-left-color: #d64545; }
.crm-ficha-proximo-atrasado strong { color: #d64545; }
.crm-ficha-proximo-vazio { border-left-color: var(--wa-acento); }
.crm-ficha-proximo-icone { flex-shrink: 0; width: 1.15rem; height: 1.15rem; margin-top: .1rem; color: var(--osf-txt-muted); }
.crm-ficha-proximo div { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.crm-ficha-proximo strong { font-size: .82rem; color: var(--osf-txt-h); }
.crm-ficha-proximo p { margin: .1rem 0 0; font-size: .74rem; line-height: 1.4; color: var(--osf-txt-muted); }

.crm-ficha-corpo { display: flex; flex: 1; flex-direction: column; gap: .6rem; min-height: 0; padding: .75rem .75rem 1rem; overflow-y: auto; border-top: 1px solid var(--wa-linha); }
.crm-ficha-bloco { flex-shrink: 0; padding: .8rem .9rem .85rem; background: var(--wa-bg); border: 1px solid var(--wa-linha); border-radius: .85rem; box-shadow: 0 1px 2px rgb(0 0 0 / .03); }
.crm-ficha-bloco h4 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .65rem; font-size: .8rem; font-weight: 700; color: var(--osf-txt-h); }
.crm-ficha-bloco h4 svg { width: 1.45rem; height: 1.45rem; padding: .25rem; color: #b97700; background: rgb(var(--wa-acento-rgb) / .14); border-radius: .45rem; }
html.dark .crm-ficha-bloco h4 svg { color: var(--wa-acento); }

/* contato */
.crm-ficha-pessoa { display: flex; flex-direction: column; gap: .1rem; margin-bottom: .55rem; }
.crm-ficha-pessoa strong { font-size: .9rem; font-weight: 600; color: var(--osf-txt-h); }
.crm-ficha-pessoa span { font-size: .74rem; color: var(--osf-txt-muted); }
.crm-ficha-canais { display: flex; flex-direction: column; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.crm-ficha-canais li { display: flex; align-items: center; gap: .5rem; min-height: 2rem; padding: .2rem .45rem; border-radius: .5rem; }
.crm-ficha-canais li:hover { background: var(--wa-painel); }
.crm-ficha-canal-icone { flex-shrink: 0; width: 1rem; height: 1rem; color: var(--osf-txt-muted); }
.crm-ficha-canal-valor { min-width: 0; font-size: .82rem; color: var(--osf-txt-h); overflow-wrap: anywhere; text-decoration: none; }
a.crm-ficha-canal-valor:hover { text-decoration: underline; }
.crm-ficha-canal-vazio { font-size: .8rem; font-style: italic; color: var(--osf-txt-muted); }
.crm-ficha-tag { padding: .02rem .4rem; font-size: .64rem; font-weight: 600; color: var(--osf-txt-muted); background: rgb(0 0 0 / .05); border-radius: 999px; }
html.dark .crm-ficha-tag { background: rgb(255 255 255 / .07); }
.crm-ficha-acoes { display: inline-flex; gap: .15rem; margin-left: auto; }
.crm-ficha-acao { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; color: var(--osf-txt-muted); cursor: pointer; background: transparent; border: 0; border-radius: .45rem; }
.crm-ficha-acao:hover { color: var(--osf-txt-h); background: rgb(var(--wa-acento-rgb) / .16); }
.crm-ficha-acao svg { width: .95rem; height: .95rem; }
.crm-ficha-liberacao { display: flex; align-items: center; gap: .55rem; margin-top: .6rem; padding: .5rem .65rem; border-radius: .6rem; background: var(--tom-fundo); color: var(--tom-cor); }
.crm-ficha-liberacao > svg { flex-shrink: 0; width: 1.15rem; height: 1.15rem; }
.crm-ficha-liberacao div { display: flex; flex-direction: column; min-width: 0; }
.crm-ficha-liberacao span { font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .8; }
.crm-ficha-liberacao strong { font-size: .82rem; font-weight: 600; }

/* tons: verde (pronto), azul (andando), âmbar (esperando), vermelho (parou), neutro (nada decidido) */
.crm-tom-verde { --tom-cor: #157a41; --tom-fundo: rgb(31 157 85 / .12); }
.crm-tom-azul { --tom-cor: #1d4ed8; --tom-fundo: rgb(59 130 246 / .12); }
.crm-tom-ambar { --tom-cor: #9a6700; --tom-fundo: rgb(252 163 17 / .15); }
.crm-tom-vermelho { --tom-cor: #b42318; --tom-fundo: rgb(214 69 69 / .12); }
.crm-tom-neutro { --tom-cor: var(--osf-txt-muted); --tom-fundo: rgb(0 0 0 / .05); }
html.dark .crm-tom-verde { --tom-cor: #4ade80; }
html.dark .crm-tom-azul { --tom-cor: #93c5fd; --tom-fundo: rgb(59 130 246 / .18); }
html.dark .crm-tom-ambar { --tom-cor: #f5b544; }
html.dark .crm-tom-vermelho { --tom-cor: #f87171; --tom-fundo: rgb(214 69 69 / .18); }
html.dark .crm-tom-neutro { --tom-fundo: rgb(255 255 255 / .07); }

/* situação: opções do funil em selos */
.crm-ficha-grade { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem .6rem; }
.crm-ficha-item { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 0; }
.crm-ficha-item-largo { grid-column: 1 / -1; }
.crm-ficha-item-rotulo { font-size: .72rem; color: var(--osf-txt-muted); }
.crm-selo { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .2rem .6rem; font-size: .76rem; font-weight: 600; line-height: 1.35; color: var(--tom-cor); background: var(--tom-fundo); border-radius: 999px; }
.crm-selo:not(:has(.crm-selo-letra))::before { content: ''; flex-shrink: 0; width: .4rem; height: .4rem; background: currentColor; border-radius: 50%; }
.crm-selo-letra { display: grid; flex-shrink: 0; place-items: center; width: 1.15rem; height: 1.15rem; margin-left: -.35rem; font-size: .68rem; color: var(--wa-bg); background: var(--tom-cor); border-radius: 50%; }

/* negócio e do funil: rótulo à esquerda, valor à direita */
.crm-ficha-empresa { margin: 0 0 .5rem; font-size: .84rem; font-weight: 600; line-height: 1.4; color: var(--osf-txt-h); overflow-wrap: anywhere; }
.crm-ficha-linhas { margin: 0; }
.crm-ficha-linhas > div { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: .75rem; padding: .45rem 0; border-top: 1px dashed var(--wa-linha); }
.crm-ficha-linhas > div:first-child { border-top: 0; padding-top: .1rem; }
.crm-ficha-linhas dt { font-size: .76rem; color: var(--osf-txt-muted); }
.crm-ficha-linhas dd { margin: 0; font-size: .82rem; line-height: 1.45; color: var(--osf-txt-h); overflow-wrap: anywhere; white-space: pre-line; }
.crm-ficha-linhas > .crm-ficha-linha-longa { grid-template-columns: minmax(0, 1fr); gap: .2rem; }

/* observações */
.crm-ficha-notas { display: flex; flex-direction: column; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.crm-ficha-notas li { position: relative; padding-left: .85rem; font-size: .8rem; line-height: 1.5; color: var(--osf-txt-h); overflow-wrap: anywhere; }
.crm-ficha-notas li::before { content: ''; position: absolute; top: .6em; left: 0; width: .32rem; height: .32rem; background: var(--wa-acento); border-radius: 50%; }
.crm-ficha-notas b { display: block; font-size: .72rem; font-weight: 700; color: var(--osf-txt-muted); }
.crm-ficha-mais { margin-top: .6rem; padding: 0; font-size: .76rem; font-weight: 600; color: #b97700; cursor: pointer; background: none; border: 0; }
html.dark .crm-ficha-mais { color: var(--wa-acento); }
.crm-ficha-mais:hover { text-decoration: underline; }

.crm-ficha-dica { margin: 0; padding: .2rem .3rem; font-size: .76rem; line-height: 1.5; color: var(--osf-txt-muted); }
.crm-ficha-pe { flex-shrink: 0; padding: .7rem 1rem; border-top: 1px solid var(--wa-linha); }
.crm-ficha-pe .wa-btn { display: block; width: 100%; text-align: center; }

/* conversa nova: chat vazio de primeiro contato */
.crm-primeiro-selo { align-self: flex-start; margin-top: .15rem; padding: .05rem .5rem; font-weight: 700; color: #1f9d55; background: rgb(31 157 85 / .12); border-radius: 999px; }
.crm-primeiro { align-items: center; justify-content: center; }
.crm-primeiro-aviso { display: flex; flex-direction: column; align-items: center; gap: .55rem; max-width: 24rem; padding: 1.4rem 1.6rem; text-align: center; color: var(--osf-txt-muted); background: var(--wa-bg); border: 1px dashed var(--wa-linha); border-radius: .9rem; }
.crm-primeiro-icone { width: 2.2rem; height: 2.2rem; color: #1f9d55; }
.crm-primeiro-aviso strong { font-size: .9rem; font-weight: 600; color: var(--osf-txt-h); }
.crm-primeiro-aviso p { margin: 0; font-size: .76rem; line-height: 1.5; }
.crm-primeiro-compositor { align-items: stretch; }
.crm-primeiro-compositor .crm-chamar { flex-shrink: 0; align-self: flex-end; white-space: nowrap; }
.crm-primeiro-rodape { margin: 0; padding: 0 1rem .7rem; font-size: .7rem; line-height: 1.45; color: var(--osf-txt-muted); }
.crm-sem-conversa-alerta { padding: .3rem .7rem; font-weight: 600; color: #9a6700; background: rgb(252 163 17 / .12); border-radius: .5rem; }
html.dark .crm-sem-conversa-alerta { color: #f5b544; }
.crm-sem-conversa-tel { font-weight: 600; color: var(--osf-txt-h); text-decoration: underline; }
.crm-chamar { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; font-size: .82rem; font-weight: 700; text-decoration: none; color: #fff; background: #1f9d55; border-radius: .6rem; }
.crm-chamar:hover { background: #18834a; }
.crm-chamar svg { width: 1.05rem; height: 1.05rem; }

/* sugestões de mensagem (18/11/2026, fase 1): chips da cadência acima do campo; clicar só preenche */
.crm-sug { flex-shrink: 0; display: flex; flex-direction: column; gap: .4rem; padding: .55rem 1rem .1rem; border-top: 1px solid var(--wa-linha); }
.crm-sug-cab { display: flex; align-items: center; gap: .4rem; min-width: 0; font-size: .72rem; color: var(--osf-txt-muted); }
.crm-sug-cab strong { font-weight: 700; color: var(--osf-txt-h); }
.crm-sug-cab > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-sug-icone { width: 1rem; height: 1rem; flex-shrink: 0; color: #d97706; }
.crm-sug-cadencia { margin-left: auto; max-width: 14rem; padding: .15rem 1.6rem .15rem .5rem; font-size: .72rem; color: var(--osf-txt-h); background-color: var(--wa-bg); border: 1px solid var(--wa-linha); border-radius: .45rem; }
.crm-sug-chips { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .45rem; scrollbar-width: thin; }
.crm-sug-chip { flex: 0 0 auto; display: flex; flex-direction: column; gap: .1rem; width: 14.5rem; padding: .45rem .65rem; text-align: left; background: var(--wa-bg); border: 1px solid var(--wa-linha); border-radius: .65rem; cursor: pointer; transition: border-color .15s, background .15s; }
.crm-sug-chip:hover, .crm-sug-chip:focus-visible { border-color: rgb(var(--wa-acento-rgb) / .6); background: rgb(var(--wa-acento-rgb) / .06); outline: none; }
.crm-sug-chip b { overflow: hidden; font-size: .7rem; font-weight: 700; color: var(--osf-txt-h); text-overflow: ellipsis; white-space: nowrap; }
.crm-sug-chip span { display: -webkit-box; overflow: hidden; font-size: .7rem; line-height: 1.35; color: var(--osf-txt-muted); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.crm-sug-chip-toque { border-color: rgb(31 157 85 / .45); }
.crm-sug-chip-toque b { color: #1f9d55; }
.crm-sug + .wa-compositor { border-top: 0; padding-top: .35rem; }
@media (max-width: 768px) {
    .crm-sug-cab > span { display: none; }
    .crm-sug-chip { width: 12rem; }
}

/* janela estreita: ficha em cima (rola), conversa embaixo */
@media (max-width: 900px) {
    .wa.crm-gaveta { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 42%) minmax(0, 1fr); }
    .crm-ficha { border-right: 0; border-bottom: 1px solid var(--wa-linha); overflow-y: auto; }
    .crm-ficha-corpo { flex: none; overflow: visible; }
    /* o X fica no topo da gaveta, não no meio da tela */
    .crm-gaveta .wa-chat-cab { position: static; padding-right: .9rem; }
    .crm-ficha-cab { padding-right: 3rem; }
}

/* celular: colunas um pouco mais largas que o dedo, quadro com altura minima util */
@media (max-width: 768px) {
    .crm-board { min-height: 420px; }
    .crm-col { flex-basis: 78vw; width: 78vw; max-width: 300px; }
    .crm-ficha-linhas > div { grid-template-columns: 6.4rem minmax(0, 1fr); }
}
