/* ==========================================================================
   Autoprotecta v2 — folha de estilo da aplicação

   Sem framework de CSS e sem passo de build: o servidor IIS serve este arquivo
   direto. As cores NUNCA aparecem cravadas aqui — vêm das variáveis que o
   layout injeta a partir da marca do tenant (App\Domain\Tenant\Branding).

   Sumário
     1. Reset e tokens
     2. Tipografia e utilitários
     3. Shell (sidebar, topbar, conteúdo)
     4. Componentes (cards, botões, tabelas, badges, alertas, formulários)
     5. Telas específicas
     6. Animações
     7. Responsivo
   ========================================================================== */

/* ============================ 1. Reset e tokens =========================== */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

:root {
    /* Sobrescritos em runtime pelo tenant — estes são apenas o fallback. */
    --brand-primary: #FB4516;
    --brand-primary-dark: #e03d12;
    --brand-primary-light: #ff6b3d;
    --brand-primary-rgb: 251, 69, 22;
    --brand-ink: #0C0C0C;
    --brand-surface: #F5F5F5;
    --brand-line: #E2E2E2;

    --c-white: #ffffff;
    --c-text: #17181A;
    --c-text-soft: #5B6067;
    --c-text-faint: #8A9099;
    --c-success: #10B981;
    --c-success-bg: #ECFDF5;
    --c-warning: #F59E0B;
    --c-warning-bg: #FFFBEB;
    --c-danger: #EF4444;
    --c-danger-bg: #FEF2F2;
    --c-info: #3B82F6;
    --c-info-bg: #EFF6FF;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-full: 999px;

    --shadow-sm: 0 1px 2px rgba(12, 12, 12, .06);
    --shadow: 0 2px 8px rgba(12, 12, 12, .07);
    --shadow-lg: 0 12px 32px rgba(12, 12, 12, .12);

    --sidebar-w: 264px;
    --sidebar-w-collapsed: 76px;
    --topbar-h: 68px;
    --drawer-width: 50%;
    --drawer-z: 60;

    --font: 'Satoshi', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
            Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', Consolas, monospace;

    --ease: cubic-bezier(.4, 0, .2, 1);
}

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--c-text);
    background: var(--brand-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
svg { width: 1.25em; height: 1.25em; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

[x-cloak] { display: none !important; }

::selection { background: rgba(var(--brand-primary-rgb), .22); }

:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/*
 * Pular para o conteúdo — primeiro foco da página.
 *
 * Quem navega por teclado ou leitor de tela não deveria percorrer os ~25 links
 * da sidebar em toda troca de tela. Fica fora da viewport até receber foco.
 */
.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    padding: 10px 18px;
    background: var(--brand-ink);
    color: #fff;
    font-weight: 600;
    font-size: .88rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    transform: translateY(calc(-100% - 20px));
    transition: transform .18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ==================== 2. Tipografia e utilitários ==================== */

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }

.muted   { color: var(--c-text-soft); }
.faint   { color: var(--c-text-faint); }
.small   { font-size: .82rem; }
.tiny    { font-size: .72rem; }
.strong  { font-weight: 700; }
.mono    { font-family: var(--font-mono); font-size: .85em; }
.nowrap  { white-space: nowrap; }
.right   { text-align: right; }
.center  { text-align: center; }
.uppercase { text-transform: uppercase; letter-spacing: .08em; }
.text-primary { color: var(--brand-primary); }
.text-success { color: var(--c-success); }
.text-danger  { color: var(--c-danger); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.stack     { display: flex; flex-direction: column; gap: 20px; }
.stack-sm  { display: flex; flex-direction: column; gap: 10px; }
.mt-2      { margin-top: 8px; }
.mt-3      { margin-top: 14px; }
.row       { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-top   { align-items: flex-start; }
.wrap      { flex-wrap: wrap; }
.grow      { flex: 1; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* ========================= 3. Shell da aplicação ========================= */

.app-shell { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    background: var(--brand-ink);
    color: rgba(255, 255, 255, .82);
    transition: width .22s var(--ease);
}

.sidebar-collapsed .app-sidebar { width: var(--sidebar-w-collapsed); }

.sidebar-brand {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--topbar-h);
    padding: 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-brand img { height: 30px; width: auto; }
.sidebar-brand-icon { display: none; }

.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0 10px; }
.sidebar-collapsed .sidebar-brand-full { display: none; }
.sidebar-collapsed .sidebar-brand-icon { display: block; }

.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--brand-primary);
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform .22s var(--ease);
}

.sidebar-toggle svg { width: 14px; height: 14px; }
.sidebar-collapsed .sidebar-toggle { transform: translateY(-50%) rotate(180deg); }

.sidebar-panel-label {
    padding: 16px 20px 4px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

.sidebar-collapsed .sidebar-panel-label { display: none; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 12px 20px; }

.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 3px; }

.sidebar-group-title {
    padding: 18px 8px 6px;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .34);
}

.sidebar-collapsed .sidebar-group-title {
    padding: 14px 0 6px;
    text-align: center;
    font-size: 0;
}

.sidebar-collapsed .sidebar-group-title::after {
    content: '';
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, .1);
    margin: 0 12px;
}

.sidebar-list { display: flex; flex-direction: column; gap: 2px; }

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: .92rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .74);
    transition: background .16s var(--ease), color .16s var(--ease);
}

.sidebar-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.sidebar-link.is-active {
    background: rgba(var(--brand-primary-rgb), .16);
    color: var(--brand-primary-light);
    font-weight: 600;
}

.sidebar-link.is-active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: var(--brand-primary);
}

.sidebar-icon { display: grid; place-items: center; flex-shrink: 0; width: 20px; }
.sidebar-icon svg { width: 19px; height: 19px; }

.sidebar-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-sprint {
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, .1);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .5);
}

.sidebar-collapsed .sidebar-label,
.sidebar-collapsed .sidebar-sprint { display: none; }

.sidebar-collapsed .sidebar-link { justify-content: center; padding: 11px 0; }

/* Tooltip quando recolhida */
.sidebar-collapsed .sidebar-link::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--brand-ink);
    box-shadow: var(--shadow-lg);
    font-size: .8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s var(--ease);
}

.sidebar-footer {
    padding: 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; }

.sidebar-user-info { overflow: hidden; }
.sidebar-user-info strong {
    display: block;
    font-size: .85rem;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-user-info small {
    display: block;
    font-size: .72rem;
    color: rgba(255, 255, 255, .45);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-collapsed .sidebar-user-info { display: none; }
.sidebar-collapsed .sidebar-user { justify-content: center; }

.avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--brand-primary);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
}

/* Com foto o círculo vira moldura: a imagem preenche e o fundo da marca some. */
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }

.sidebar-logout { display: block; }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(12, 12, 12, .5);
}

/* Menu aberto no celular trava a rolagem do fundo, como a cortina já fazia. */
body.menu-open { overflow: hidden; }

/* ---- Main ---- */

.app-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-w);
    transition: margin-left .22s var(--ease);
}

.sidebar-collapsed .app-main { margin-left: var(--sidebar-w-collapsed); }

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--topbar-h);
    padding: 0 28px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--brand-line);
}

.topbar-burger { display: none; }

.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 1.22rem; }
.topbar-title p { font-size: .82rem; color: var(--c-text-soft); }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.app-content { flex: 1; padding: 28px; }

/* ---- Navegação sem recarregar (public/assets/js/nav.js) ---- */

/*
 * Fita de progresso da troca de tela. Só entra em cena se a resposta demorar
 * mais que um piscar (o JS segura 120 ms antes de mostrar), então navegação
 * rápida continua parecendo instantânea.
 */
.pjax-progress {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 90;
    width: 0;
    height: 3px;
    background: var(--brand-primary);
    opacity: 0;
    pointer-events: none;
}

.pjax-progress.is-loading {
    width: 80%;
    opacity: 1;
    transition: width 6s cubic-bezier(.1, .7, .2, 1);
}

.pjax-progress.is-done {
    width: 100%;
    opacity: 0;
    transition: width .2s var(--ease), opacity .3s .1s var(--ease);
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 28px;
    border-top: 1px solid var(--brand-line);
    font-size: .78rem;
    color: var(--c-text-faint);
}

.app-footer-note { font-weight: 600; }

/* ---- Faixa de personificação ---- */

.impersonation-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px 24px;
    background: var(--c-warning);
    color: #3B2A05;
    font-size: .88rem;
}

.impersonation-bar-text { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.impersonation-badge {
    padding: 2px 9px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, .18);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ============================ 4. Componentes ============================ */

/* ---- Card ---- */

.card {
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-bottom: 1px solid var(--brand-line);
}

.card-head h2 { font-size: 1rem; }
.card-head p { font-size: .82rem; color: var(--c-text-soft); margin-top: 2px; }

.card-body { padding: 22px; }
.card-body.is-flush { padding: 0; }

.card-foot {
    padding: 14px 22px;
    border-top: 1px solid var(--brand-line);
    background: #FAFAFA;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    font-size: .82rem;
}

/* ---- Estatística ---- */

.stat {
    position: relative;
    overflow: hidden;
    padding: 20px 22px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-text-faint);
}

.stat-value {
    display: block;
    margin-top: 8px;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.stat-hint { display: block; margin-top: 6px; font-size: .8rem; color: var(--c-text-soft); }

.stat-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    background: rgba(var(--brand-primary-rgb), .1);
    color: var(--brand-primary);
}

.stat-icon svg { width: 20px; height: 20px; }

/*
 * Lista de fatos — a ficha de um registro (contrato, associado…).
 *
 * Todo item tem a mesma forma: rótulo em caixa alta, o valor e, se couber, linhas
 * de apoio. Antes cada item escolhia o próprio <p> (`.strong`, `.small muted`,
 * `.mono small`…) e os tamanhos e pesos não conversavam entre si. O rótulo é cinza
 * soft e não faint: faint sobre branco não passa de 3:1.
 */
.fact-list { display: flex; flex-direction: column; margin: 0; }
.fact { padding: 13px 0; border-bottom: 1px solid var(--brand-line); }
.fact:first-child { padding-top: 0; }
.fact:last-child { padding-bottom: 0; border-bottom: 0; }
.fact-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--c-text-soft);
}
.fact-value {
    margin: 3px 0 0;
    font-size: .98rem;
    font-weight: 600;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.fact-sub {
    margin: 3px 0 0;
    font-size: .84rem;
    line-height: 1.4;
    color: var(--c-text-soft);
    overflow-wrap: anywhere;
}
.fact-sub + .fact-sub { margin-top: 1px; }
.fact-sub.is-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.fact-note { margin: 4px 0 0; font-size: .78rem; line-height: 1.4; color: var(--c-text-soft); }
/* Código (placa, ID): mono do tamanho do texto ao redor, no tom do valor. */
.fact-code { font-family: var(--font-mono); font-size: .92em; font-weight: 600; letter-spacing: .04em; color: var(--c-text); }

/* ---- Botões ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background .16s var(--ease), transform .12s var(--ease), box-shadow .16s var(--ease);
}

.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }

.btn-primary { background: var(--brand-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-primary-dark); box-shadow: var(--shadow); }

.btn-dark { background: var(--brand-ink); color: #fff; }
.btn-dark:hover { background: #262626; }

.btn-ghost { background: var(--c-white); border: 1px solid var(--brand-line); color: var(--c-text); }
.btn-ghost:hover { background: #FAFAFA; border-color: #cfcfcf; }

.btn-xs { padding: 4px 10px; font-size: .74rem; gap: 5px; }
.btn-xs svg { width: 14px; height: 14px; }
.btn-sm { padding: 6px 13px; font-size: .8rem; }
.btn-lg { padding: 12px 26px; font-size: .95rem; }
.btn-block { display: flex; width: 100%; }

.btn-icon { padding: 8px; }
.btn-icon svg { width: 18px; height: 18px; }

.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Badges ---- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.badge-neutral { background: #EFF0F1; color: var(--c-text-soft); }
.badge-success { background: var(--c-success-bg); color: #047857; }
.badge-warning { background: var(--c-warning-bg); color: #B45309; }
.badge-danger  { background: var(--c-danger-bg);  color: #B91C1C; }
.badge-info    { background: var(--c-info-bg);    color: #1D4ED8; }
.badge-primary { background: rgba(var(--brand-primary-rgb), .12); color: var(--brand-primary-dark); }

.badge-level { color: #fff; }

/* ---- Tabela ---- */

.table-wrap { position: relative; overflow-x: auto; }

/*
 * Barra de rolagem horizontal no TOPO (S25) — montada pelo scroll-topbar.js
 * nos blocos marcados com `data-scroll-topbar`.
 *
 * E um irmao vazio logo acima do quadro: o filho tem a largura do conteudo,
 * a altura e so a da barra. Fica `sticky` logo abaixo da topbar, com z-index
 * menor que o dela (30) para deslizar por baixo em vez de cobri-la — foi o
 * erro que o comentario do `.kanban-col-head` ja registrava.
 */
.scroll-topbar {
    position: sticky;
    top: var(--topbar-h);
    z-index: 20;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 8px;
    background: var(--brand-surface);
    border-radius: var(--radius-full);
    scrollbar-width: thin;
}

/* Altura 1px: o trilho nao desenha nada, quem aparece e a barra do navegador. */
.scroll-topbar-track { height: 1px; }

.scroll-topbar::-webkit-scrollbar { height: 10px; }
.scroll-topbar::-webkit-scrollbar-track { background: transparent; }
.scroll-topbar::-webkit-scrollbar-thumb {
    background: rgba(12, 12, 12, .22);
    border-radius: var(--radius-full);
}
.scroll-topbar::-webkit-scrollbar-thumb:hover { background: rgba(12, 12, 12, .34); }

.table { font-size: .88rem; }

.table thead th {
    position: sticky;
    top: 0;
    padding: 11px 18px;
    background: #FAFAFA;
    border-bottom: 1px solid var(--brand-line);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--c-text-faint);
    text-align: left;
    white-space: nowrap;
}

.table tbody td {
    padding: 13px 18px;
    border-bottom: 1px solid #F0F0F0;
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s var(--ease); }
.table tbody tr:hover { background: #FCFCFC; }

.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.table-empty { padding: 48px 24px; text-align: center; color: var(--c-text-faint); }

/*
 * Ações no fim de uma linha de tabela.
 *
 * Cada ação com efeito é um <form> próprio (POST + CSRF), e form é bloco: sem
 * isto, "subir / descer / editar / remover" empilhariam em quatro linhas e
 * inflariam a altura da linha. Combine sempre com `.btn-xs`.
 */
.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.table-actions form { display: contents; }

/*
 * Kanban do funil (Sprint 17).
 *
 * Rola na horizontal em vez de espremer as colunas: um funil de cinco etapas
 * numa tela de notebook daria 180px por coluna, e cartão de 180px não cabe o
 * nome do lead. Cada coluna tem largura fixa e a barra horizontal é honesta
 * sobre o que existe fora da vista.
 *
 * `position: relative` faz o quadro ser o bloco de contenção dos `.sr-only`
 * dos cartões (absolute). Sem ele, os das colunas fora da vista escapavam do
 * `overflow-x` e esticavam a PÁGINA: a barra do navegador rolava para uma
 * faixa vazia ao lado do menu.
 */
.kanban {
    position: relative;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
    align-items: flex-start;
}

.kanban-col {
    flex: 0 0 268px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/*
 * O handoff: a linha entre o que o Pleno entrega e o que o Sênior assume.
 *
 * É um separador VERTICAL entre duas colunas, não uma coluna — cartão nenhum
 * para aqui. Por isso `flex: 0 0 auto` e largura mínima: ele não pode roubar
 * espaço das colunas de verdade num quadro que já rola na horizontal.
 *
 * `align-self: stretch` não serve: o quadro alinha por `flex-start` e as
 * colunas têm alturas diferentes conforme o número de cartões — esticar faria
 * o separador acompanhar a coluna mais alta e ficar desproporcional. Altura
 * fixa alinhada ao cabeçalho é o que mantém a leitura.
 */
.kanban-handoff {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 86px;
    padding-top: 6px;
    text-align: center;
}

.kanban-handoff-side {
    font-size: .68rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--c-text-soft);
    text-transform: uppercase;
    letter-spacing: .02em;
}

.kanban-handoff-side em {
    font-style: normal;
    font-weight: 400;
    color: var(--c-text-faint);
    text-transform: none;
    letter-spacing: 0;
}

.kanban-handoff-rule {
    width: 1px;
    flex: 1 1 auto;
    min-height: 18px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--brand-line) 20%,
        var(--brand-line) 80%,
        transparent
    );
}

.kanban-handoff-label {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), .08);
    border-radius: var(--radius-full);
    padding: 3px 8px;
    white-space: nowrap;
}

/*
 * Sem `position: sticky`: o quadro rola na HORIZONTAL, e um cabeçalho grudado
 * no topo da janela sobe por cima da barra de título quando a página rola —
 * foi o que aconteceu na primeira versão.
 */
.kanban-col-head {
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-top: 3px solid var(--brand-primary);
    border-radius: var(--radius-lg);
    padding: 10px 12px;
}

.kanban-card {
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    padding: 12px;
    transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}

.kanban-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.kanban-empty {
    padding: 14px;
    text-align: center;
    font-size: .8rem;
    color: var(--c-text-soft);
    border: 1px dashed var(--brand-line);
    border-radius: var(--radius-lg);
}

/*
 * Cartão rico do funil (formato PowerCRM, Sprint 22).
 *
 * Os selos (situação, origem, nº de propostas) ficam numa linha própria que
 * quebra sozinha; o rodapé separa "o que falta fazer" (follow-up, à esquerda)
 * de "de quem é" (avatar do responsável, à direita) — a mesma leitura do
 * cartão do PowerCRM. A etapa se muda arrastando o cartão (ou pela cortina da
 * negociação) — o seletor que ficava aqui só inchava o cartão.
 *
 * A régua ✓/✕ (`.crm-steps`, montada por `CardProgress`) mostra o que já foi feito
 * do aceite em diante — Pago · Documentos · Vistoria · Contrato assinado · Ativo —
 * e o que falta, para ler de relance: feito em verde, pendente em cinza apagado — o
 * vermelho fica para o que está atrasado de verdade, não para o que ainda vai
 * acontecer. Cada passo tem a dica no `title`. Antes do aceite não há régua.
 */
.crm-card-tags { gap: 6px; margin-top: 8px; }

.crm-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--brand-line);
}

.crm-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .68rem;
    line-height: 1.3;
}

.crm-steps li { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.crm-steps li > span:first-child { font-weight: 700; }
.crm-steps .is-done { color: #047857; }
.crm-steps .is-todo { color: var(--c-text-soft); opacity: .75; }

.crm-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    background: var(--c-text);
    color: #fff;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.crm-avatar-lg { width: 44px; height: 44px; font-size: 1rem; }

/*
 * Detalhe da negociação (formato PowerCRM, Sprint 22).
 *
 * Duas colunas: o miolo em abas à esquerda, o rail fixo de contexto à direita
 * (responsável, comissão, situação). No celular o rail desce para baixo do
 * conteúdo — a decisão da negociação continua sendo a primeira coisa na tela.
 */
.crm-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}

.crm-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.crm-rail { display: flex; flex-direction: column; gap: 14px; }

.crm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    border-bottom: 1px solid var(--brand-line);
}

.crm-tab {
    appearance: none;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 10px 14px;
    font: inherit;
    font-weight: 600;
    color: var(--c-text-soft);
    cursor: pointer;
    transition: color .15s var(--ease), border-color .15s var(--ease);
}

.crm-tab:hover { color: var(--c-text); }

.crm-tab.is-active {
    color: var(--brand-primary-dark);
    border-bottom-color: var(--brand-primary);
}

.crm-rail-owner { display: flex; align-items: center; gap: 12px; }

.crm-rail-facts { display: flex; flex-direction: column; gap: 14px; }
.crm-rail-facts p { margin: 2px 0 0; }

@media (max-width: 900px) {
    .crm-detail { grid-template-columns: minmax(0, 1fr); }
}

/*
 * Drag & drop do funil + a negociação na cortina lateral (Sprint 22).
 *
 * O cartão inteiro é a alça de arrasto e o alvo de clique; o `<select>` de etapa
 * segue como saída de teclado (`@click.stop`), então arrastar não é a única
 * forma de mover — decisão herdada do S17. Clicar abre a negociação na cortina
 * padrão do sistema (`.drawer-root`), não num modal.
 */
.kanban-card.is-clickable { cursor: pointer; }
.kanban-card.is-dragging { opacity: .45; }

.kanban-col.is-drop {
    outline: 2px dashed var(--brand-primary);
    outline-offset: -2px;
    border-radius: var(--radius-lg);
    background: rgba(var(--brand-primary-rgb), .05);
}

/*
 * Trava de rolagem própria da cortina do CRM. A `drawer-open` do appShell é
 * ligada/desligada pelos drawers de formulário internos (Nova proposta), e não
 * pode destravar o fundo enquanto a cortina da negociação segue aberta.
 */
body.crm-drawer-open { overflow: hidden; }

/*
 * Dentro da cortina (50% da tela), a negociação empilha numa coluna só — o rail
 * desce para baixo das abas, como já acontece no responsivo (< 900px).
 */
.crm-detail.is-fragment { grid-template-columns: minmax(0, 1fr); }

/* Cabeçalho de identidade do lead, no topo do miolo carregado na cortina. */
.crm-record-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.crm-record-head h2 { margin: 2px 0 0; }

/*
 * Formulário de "Nova proposta" / "Registrar" inline na aba — não uma cortina
 * aninhada. Um drawer dentro do drawer da negociação (que tem `transform`) se
 * posicionava relativo a ele e cortava o conteúdo.
 */
.crm-inline-form {
    background: var(--brand-surface);
    border-bottom: 1px solid var(--brand-line);
}

.crm-inline-form .stack { gap: 14px; }

/*
 * Valor que reduz o saldo (Sprint 14).
 *
 * O extrato precisa distinguir entrada de saída num relance, e o sinal sozinho
 * não resolve: numa coluna de números alinhada à direita, "−" e "+" ficam
 * distantes do olho. A cor vem do token de perigo, não de um vermelho cravado.
 */
.is-negative { color: var(--c-danger); }

/* ---- Alertas ---- */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: .88rem;
    animation: slide-down .3s var(--ease);
}

.alert-icon { flex-shrink: 0; margin-top: 1px; }
.alert-icon svg { width: 18px; height: 18px; }

.alert-success { background: var(--c-success-bg); border-color: #A7F3D0; color: #065F46; }
.alert-error   { background: var(--c-danger-bg);  border-color: #FECACA; color: #991B1B; }
/* `alert-danger` é o nome do pwa.css; seis telas do painel o usavam aqui sem
   estilo nenhum — o erro da Nova proposta saía como texto solto (07/11/2026). */
.alert-danger  { background: var(--c-danger-bg);  border-color: #FECACA; color: #991B1B; }
.alert-warning { background: var(--c-warning-bg); border-color: #FDE68A; color: #92400E; }
.alert-info    { background: var(--c-info-bg);    border-color: #BFDBFE; color: #1E40AF; }

.alert-list { margin-top: 6px; padding-left: 16px; list-style: disc; }
.alert-list li { margin-top: 2px; }

/* O pedido de aprovação que nasce com a proposta (07/11/2026): para quem vai e
   o que o cliente vê até a decisão. Tom de aviso — não é erro, é espera. */
.approval-box {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #FDE68A;
    border-radius: var(--radius);
    background: var(--c-warning-bg);
    color: #92400E;
}
.approval-box-title { margin: 0 0 4px; font-size: .9rem; }
.approval-box .tiny { margin: 0; color: #92400E; }
.approval-box label { color: #92400E; }

/* ---- Modal único: aviso, erro, sucesso e confirmação (07/11/2026) ----
   `partials/ui-dialog` + `assets/js/ui-dialog.js`. No celular é uma folha presa
   embaixo (o polegar alcança o botão); a partir de 641px, um cartão no centro.
   Acima da cortina (60) e do visor de fotos (300). */
.ui-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.ui-dialog-root[hidden] { display: none; }
.ui-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 12, .45);
    opacity: 0;
    transition: opacity .18s var(--ease);
}
.ui-dialog {
    position: relative;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 22px 20px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--c-white);
    box-shadow: var(--shadow-lg);
    transform: translateY(24px);
    opacity: 0;
    transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.ui-dialog-root.is-open .ui-dialog-backdrop { opacity: 1; }
.ui-dialog-root.is-open .ui-dialog { transform: none; opacity: 1; }
body.ui-dialog-open { overflow: hidden; }

.ui-dialog-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    border-radius: var(--radius-full);
    background: var(--c-info-bg);
    color: var(--c-info);
}
.ui-dialog-icon svg { width: 22px; height: 22px; }
.ui-dialog-icon.is-error   { background: var(--c-danger-bg);  color: var(--c-danger); }
.ui-dialog-icon.is-warning { background: var(--c-warning-bg); color: var(--c-warning); }
.ui-dialog-icon.is-success { background: var(--c-success-bg); color: var(--c-success); }
.ui-dialog-icon.is-confirm { background: rgba(var(--brand-primary-rgb), .1); color: var(--brand-primary); }

.ui-dialog-title { font-size: 1.08rem; font-weight: 700; color: var(--c-text); margin-bottom: 6px; }
.ui-dialog-body { font-size: .92rem; color: var(--c-text-soft); }
.ui-dialog-body p + p { margin-top: 8px; }
.ui-dialog-body .alert-list { margin-top: 8px; }
.ui-dialog-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 20px;
}
.ui-dialog-actions .btn { width: 100%; min-height: 46px; }
/* `.btn` e `.alert` têm `display` próprio, que vence o atributo `hidden`. */
.ui-dialog-actions .btn[hidden],
.alert[hidden] { display: none; }

@media (min-width: 641px) {
    .ui-dialog-root { align-items: center; padding: 24px; }
    .ui-dialog {
        max-width: 440px;
        padding: 26px 26px 22px;
        border-radius: var(--radius-lg);
        transform: translateY(8px) scale(.98);
    }
    .ui-dialog-actions { flex-direction: row; justify-content: flex-end; }
    .ui-dialog-actions .btn { width: auto; min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ui-dialog, .ui-dialog-backdrop { transition: none; }
}

/* Ação destrutiva (confirmar exclusão no modal). */
.btn-danger { background: var(--c-danger); color: #fff; box-shadow: var(--shadow-sm); }
.btn-danger:hover { background: #DC2626; box-shadow: var(--shadow); }

/* ---- Formulários ---- */

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--c-text-soft);
}

.input, .select, .textarea {
    width: 100%;
    padding: 10px 13px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    font-size: .92rem;
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), .14);
}

.input.has-error { border-color: var(--c-danger); }

.input-sm {
    padding: 6px 10px;
    font-size: .82rem;
    border-radius: var(--radius-sm);
}

.field-error { font-size: .78rem; color: var(--c-danger); }
.field-hint  { font-size: .78rem; color: var(--c-text-faint); }

/*
 * Campo de senha com o olho (assets/js/password-toggle.js).
 *
 * O invólucro é criado pelo script em volta de todo `input[type=password]` —
 * nenhuma view precisa lembrar dele. O botão fica dentro do campo, e não ao
 * lado, porque é assim que a pessoa procura: no fim da própria linha digitada.
 */
.input-reveal { position: relative; display: block; width: 100%; }
.input-reveal > .input { padding-right: 46px; }

.input-reveal-btn {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--c-text-faint);
    cursor: pointer;
    transition: color .16s var(--ease), background .16s var(--ease);
}

.input-reveal-btn:hover { color: var(--c-text); background: rgba(12, 12, 12, .05); }
.input-reveal-btn:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 1px; }
.input-reveal-btn svg { width: 18px; height: 18px; }

/*
 * Rótulo de um BLOCO, não de um campo (Sprint 21).
 *
 * Uma grade de toggles ou uma lista de chips não tem `<input>` para o `<label>`
 * apontar, e usar `.field label` ali produziria um rótulo órfão. Mesma
 * tipografia do label de campo, para os dois lerem como a mesma coisa.
 */
.field-label {
    display: block;
    margin-bottom: 10px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--c-text-soft);
}

/*
 * Rótulo com um atalho à direita ("Senha … Esqueci minha senha").
 *
 * O link fica na linha do label, não abaixo do campo: é onde a pessoa já está
 * olhando quando percebe que não lembra a senha.
 */
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-link {
    font-size: .78rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-transform: none;
    letter-spacing: 0;
}
.field-link:hover { color: var(--brand-primary-dark); text-decoration: underline; }

.input-color {
    width: 46px;
    height: 40px;
    padding: 3px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    background: var(--c-white);
    cursor: pointer;
}

/* ---- Select pesquisável (S24) — `partials/search-select` ---- */

/*
 * Um <select> nativo não filtra: com as 90 marcas ou as 245 versões da FIPE, a
 * pessoa rola atrás do item no escuro. Aqui o campo fechado tem a mesma cara de
 * um `.select` (para a linha do formulário não desalinhar) e, aberto, vira uma
 * lista com busca em cima.
 */
.search-select { position: relative; }

.search-select label { cursor: pointer; }

.search-select-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    font-family: inherit;
    color: var(--c-text);
    cursor: pointer;
}

.search-select-control.is-placeholder .search-select-value { color: var(--c-text-faint); }

.search-select-control.is-open {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), .14);
}

.search-select-control:disabled {
    background: var(--brand-surface);
    color: var(--c-text-faint);
    cursor: not-allowed;
}

/* O rótulo escolhido pode ser longo ("GOL 1.6 MI TOTAL FLEX 8V 4P"): corta com
   reticências em vez de esticar o campo e quebrar a grade. */
.search-select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-select-caret {
    flex-shrink: 0;
    display: inline-flex;
    color: var(--c-text-faint);
    transition: transform .16s var(--ease);
}

.search-select-caret svg { width: 16px; height: 16px; }
.search-select-control.is-open .search-select-caret { transform: rotate(180deg); }

.search-select-pop {
    position: absolute;
    z-index: 30;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: search-select-in .12s var(--ease);
}

@keyframes search-select-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.search-select-search {
    position: relative;
    padding: 8px;
    border-bottom: 1px solid var(--brand-line);
}

.search-select-search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    display: inline-flex;
    color: var(--c-text-faint);
    pointer-events: none;
}

.search-select-search-icon svg { width: 15px; height: 15px; }

.search-select-query {
    width: 100%;
    padding: 8px 10px 8px 34px;
    background: var(--brand-surface);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .88rem;
}

.search-select-query:focus {
    outline: none;
    background: var(--c-white);
    border-color: var(--brand-primary);
}

/* Rola por dentro: a lista nunca empurra o botão de salvar para fora da tela. */
.search-select-list {
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 4px;
    list-style: none;
}

.search-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    color: var(--c-text);
    cursor: pointer;
}

/* Teclado e mouse apontam o MESMO item: o cursor segue o ponteiro no
   @mousemove, então não existem dois destaques disputando a atenção. */
.search-select-option.is-active { background: rgba(var(--brand-primary-rgb), .1); }
.search-select-option.is-picked { font-weight: 600; }

.search-select-mark {
    flex-shrink: 0;
    display: inline-flex;
    color: var(--brand-primary);
}

.search-select-mark svg { width: 15px; height: 15px; }

.search-select-empty,
.search-select-count {
    padding: 10px;
    font-size: .8rem;
    color: var(--c-text-faint);
}

.search-select-count {
    padding: 6px 10px;
    border-top: 1px solid var(--brand-line);
    background: var(--brand-surface);
    text-align: right;
}

/* Prévia de assets na tela Marca */
.brand-preview {
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.brand-preview-ink {
    padding: 14px;
    background: var(--brand-ink);
}

.brand-preview-ink img {
    display: block;
    max-height: 40px;
    width: auto;
}

.brand-preview-login {
    display: flex;
    align-items: flex-end;
    min-height: 160px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, .72);
    background:
        linear-gradient(
            160deg,
            rgba(12, 12, 12, .78) 0%,
            rgba(12, 12, 12, .55) 45%,
            rgba(12, 12, 12, .82) 100%
        ),
        var(--auth-aside-bg, none) center / cover no-repeat,
        var(--brand-ink);
    border: 1px solid var(--brand-line);
}

.brand-preview-login.is-empty {
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(420px 180px at 78% 20%, rgba(var(--brand-primary-rgb), .22), transparent 62%),
        linear-gradient(155deg, #141414 0%, var(--brand-ink) 55%);
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: var(--c-text);
    cursor: pointer;
    user-select: none;
}

.check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--brand-primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* ---- Checkbox em linha (formulários de configuração) ---- */

.check-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--c-text-soft);
    cursor: pointer;
    user-select: none;
}

.check-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-primary);
    cursor: pointer;
}

/*
 * Grade de toggles selecionáveis (área de atuação; qualquer config de liga/desliga
 * sobre um conjunto finito: 27 UFs, tipos de veículo…). O tile inteiro é clicável,
 * marcado = verde. Beira o `.check`, mas com peso visual de cartão em vez de linha.
 */
/* Lista de escolha múltipla compacta: caixa, nome e preço na mesma linha. */
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.pick-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border: 1px solid var(--brand-line); border-radius: var(--radius-md, 10px);
    background: var(--c-surface, #fff); cursor: pointer; min-width: 0;
    font-size: .88rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--c-text);
}
.pick-item:hover { border-color: var(--c-text-faint); }
.pick-item input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--brand-primary); }
.pick-item .pick-name { flex: 1; min-width: 0; line-height: 1.25; }
.pick-item .pick-price { flex: none; font-weight: 700; font-size: .82rem; color: var(--c-text-soft); white-space: nowrap; }
.pick-item:has(input:checked) { border-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .07); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border: 1.5px solid var(--brand-line);
    border-radius: var(--radius-sm);
    background: var(--c-white);
    cursor: pointer;
    user-select: none;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}
.opt:hover { border-color: var(--c-text-faint); }
.opt input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--c-success);
    cursor: pointer;
    flex-shrink: 0;
}
.opt .opt-body { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.opt .opt-title { font-weight: 600; font-size: .9rem; color: var(--c-text); }
.opt .opt-sub { font-size: .74rem; color: var(--c-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt:has(input:checked) { border-color: var(--c-success); background: var(--c-success-bg); }
.opt:has(input:not(:checked)) .opt-title { color: var(--c-text-soft); }
/* Ponto de marca: sinaliza que este item foge da política padrão (é uma exceção). */
.opt-mark { position: absolute; top: 7px; right: 9px; width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--brand-primary); }

/*
 * Árvore marca ▸ família ▸ versão da tabela de preços (Sprint 21).
 *
 * O conjunto aqui é grande demais para uma `.opt-grid` — uma marca sozinha tem
 * 245 versões. A árvore mantém tudo fechado por padrão e abre uma família por
 * vez; a rolagem é interna, para o passo não empurrar o botão de salvar para
 * fora da tela.
 */
.model-tree { max-height: 520px; overflow: auto; padding-right: 4px; }
.model-tree details {
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: var(--c-surface);
}
.model-tree summary {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--c-text);
    cursor: pointer;
    list-style: none;
}
.model-tree summary::-webkit-details-marker { display: none; }
.model-tree summary::before { content: "▸"; margin-right: 8px; color: var(--c-text-faint); }
.model-tree details[open] > summary::before { content: "▾"; }
.model-tree details[open] > summary { border-bottom: 1px solid var(--brand-line); }
.model-tree .model-count { margin-left: 8px; font-weight: 500; color: var(--c-text-faint); font-size: .76rem; }
/* "Selecionar todos" só desta família: à direita do resumo, sem o peso do nome. */
.model-tree .model-all { margin-left: auto; padding-left: 12px; font-size: .76rem; font-weight: 500; }
.model-tree .model-row { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 26px; }
.model-tree .model-row + .model-row { border-top: 1px solid var(--brand-line-soft, var(--brand-line)); }
.model-tree .model-row .input { max-width: 116px; }

/* Coluna das marcas, ao lado da árvore: rola sozinha e marca a marca aberta. */
.brand-list { max-height: 520px; overflow: auto; }
.brand-list .is-open { font-weight: 700; color: var(--brand-primary); }

/*
 * Chip removível — listas abertas que não cabem numa grade fixa (cidades, marcas,
 * palavras de modelo não atendidas). `is-block` lê como exclusão; `is-allow` como
 * exceção que libera.
 */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 13px;
    border-radius: var(--radius-full);
    background: var(--brand-surface);
    border: 1px solid var(--brand-line);
    font-size: .85rem;
    font-weight: 600;
    color: var(--c-text);
}
.tag.is-block { background: var(--c-danger-bg); border-color: #f4cfcf; color: #b42318; }
.tag.is-allow { background: var(--c-success-bg); border-color: #bfe9d6; color: #0f7a56; }
.tag .tag-meta { font-weight: 500; opacity: .75; font-size: .76rem; }
.tag form { display: inline-flex; margin: 0; }
.tag-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-full);
    background: transparent;
    color: inherit;
    opacity: .55;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}
.tag-x:hover { opacity: 1; background: rgba(0, 0, 0, .08); }

/* ---- Campo de link copiável ---- */

.copy-field { display: flex; gap: 8px; }
.copy-field .input { background: #FAFAFA; font-size: .82rem; }

/* ---- Barra de progresso ---- */

.bar { height: 8px; border-radius: var(--radius-full); background: #EDEDED; overflow: hidden; }
.bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--brand-primary);
    transform-origin: left;
    animation: grow-x .7s var(--ease) both;
}

/*
 * Variantes da barra (Sprint 15).
 *
 * No relatório de receita × despesa as duas tabelas têm a mesma forma, e só a
 * cor separa entrada de saída. Com a barra na cor da marca nos dois blocos, a
 * página inteira lê como uma coisa só.
 */
.bar-success .bar-fill,
.bar-fill.bar-success { background: var(--c-success); }
.bar-danger .bar-fill,
.bar-fill.bar-danger  { background: var(--c-danger); }

/*
 * Indicador que também é filtro — `a.stat.stat-link` (acompanhamento de vistorias).
 *
 * O número "Precisa de você: 4" só é útil se levar aos quatro. O cartão inteiro
 * é o link, e o ativo ganha a borda da marca para dizer qual recorte está aberto.
 */
.stat-link { display: block; color: inherit; text-decoration: none; }
.stat-link:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-link.is-active { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), .12); }
.stat-link .stat-hint { display: block; margin-top: 4px; }

/*
 * O que falta na negociação — `.journey-card` (Domain\Crm\NegotiationChecklist).
 *
 * Seis etapas numa faixa só, porque a pergunta é "onde a venda parou?" e a
 * resposta é uma posição. A etapa com você ganha a cor da marca; a que está com
 * o cliente, o azul de acompanhamento; a que deu problema, o vermelho. O que
 * depende de uma etapa anterior fica esmaecido — existe, mas ainda não é hora.
 */
/* Cabeçalho: o próximo passo à esquerda, o placar "5/6" à direita. */
.journey-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.journey-eyebrow { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-soft); }
.journey-title { margin-top: 2px; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.journey-score { display: flex; align-items: baseline; gap: 1px; flex: none; font-variant-numeric: tabular-nums; color: var(--c-text-soft); }
.journey-score strong { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--c-text); }
.journey-score span { font-size: 1rem; font-weight: 700; }
.journey-head.is-todo .journey-score strong { color: var(--brand-primary); }
.journey-head.is-waiting .journey-score strong { color: var(--c-info); }
.journey-head.is-blocked .journey-score strong { color: var(--c-danger); }
.journey-head.is-done .journey-score strong { color: var(--c-success); }

/* Progresso: um segmento por etapa, na cor do estado. */
.journey-bar { display: flex; gap: 4px; margin: 12px 0 18px; padding: 0; list-style: none; }
.journey-bar li { flex: 1; height: 6px; border-radius: 999px; background: var(--brand-line); }
.journey-bar .is-done { background: var(--c-success); }
.journey-bar .is-todo { background: var(--brand-primary); }
.journey-bar .is-waiting { background: var(--c-info); }
.journey-bar .is-blocked { background: var(--c-danger); }

/* A lista: uma linha por etapa, ligadas por um fio vertical (a jornada). */
.journey { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; position: relative; }
.journey::before { content: ""; position: absolute; left: 25px; top: 20px; bottom: 20px; width: 2px; background: var(--brand-line); }

.journey-step {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    background: var(--c-white);
}

.journey-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--brand-line); color: var(--c-text-soft);
    font-size: .8rem; font-weight: 800;
    box-shadow: 0 0 0 4px var(--c-white);
}
.journey-dot svg { width: 15px; height: 15px; }
.journey-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.journey-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.journey-label { font-size: .95rem; font-weight: 800; line-height: 1.25; }
/* "OK" ou "Falta — com quem", como etiqueta na cor da etapa. */
.journey-status {
    padding: 2px 9px; border-radius: 999px;
    background: var(--brand-line); color: var(--c-text-soft);
    font-size: .68rem; font-weight: 800; white-space: nowrap;
}
/* Uma frase só: o que aconteceu (feita) ou o que fazer / esperar (pendente). */
.journey-text { font-size: .8rem; line-height: 1.4; color: var(--c-text-soft); }
.journey-step-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Feita: linha baixa, verde calmo, sem destaque. */
.journey-step.is-done { background: var(--c-success-bg); border-color: rgba(16, 185, 129, .25); padding-top: 8px; padding-bottom: 8px; }
.journey-step.is-done .journey-dot { background: var(--c-success); color: var(--c-white); box-shadow: 0 0 0 4px var(--c-white); }
.journey-step.is-done .journey-label { font-size: .88rem; font-weight: 700; }
.journey-step.is-done .journey-status { background: rgba(16, 185, 129, .16); color: var(--c-success); }
.journey-step.is-done .journey-text { font-size: .76rem; }

/* Pendente: a faixa lateral grossa e a etiqueta cheia mostram, de longe, o que falta. */
.journey-step.is-todo, .journey-step.is-waiting, .journey-step.is-blocked {
    padding-top: 14px; padding-bottom: 14px; border-left-width: 5px;
    box-shadow: 0 4px 14px rgba(12, 12, 12, .07);
}
.journey-step.is-todo { border-color: rgba(var(--brand-primary-rgb), .45); border-left-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .05); }
.journey-step.is-todo .journey-dot { background: var(--brand-primary); color: var(--c-white); }
.journey-step.is-todo .journey-status { background: var(--brand-primary); color: var(--c-white); }
.journey-step.is-waiting { border-color: rgba(59, 130, 246, .45); border-left-color: var(--c-info); background: var(--c-info-bg); }
.journey-step.is-waiting .journey-dot { background: var(--c-info); color: var(--c-white); }
.journey-step.is-waiting .journey-status { background: var(--c-info); color: var(--c-white); }
.journey-step.is-blocked { border-color: var(--c-danger); border-left-color: var(--c-danger); background: var(--c-danger-bg); }
.journey-step.is-blocked .journey-dot { background: var(--c-danger); color: var(--c-white); }
.journey-step.is-blocked .journey-status { background: var(--c-danger); color: var(--c-white); }
.journey-step.is-todo .journey-text, .journey-step.is-waiting .journey-text, .journey-step.is-blocked .journey-text { color: var(--c-text); }
/* A etapa que está na vez ganha ainda um anel. */
.journey-step.is-next { box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), .16), 0 6px 18px rgba(12, 12, 12, .09); }
.journey-step.is-waiting.is-next { box-shadow: 0 0 0 3px rgba(59, 130, 246, .18), 0 6px 18px rgba(12, 12, 12, .09); }
.journey-step.is-blocked.is-next { box-shadow: 0 0 0 3px rgba(239, 68, 68, .2), 0 6px 18px rgba(12, 12, 12, .09); }
/* Travada: tracejada e sem sombra; o texto segue legível (sem `opacity`). */
.journey-step.is-locked { background: transparent; border: 1px dashed var(--c-text-faint); }
.journey-step.is-locked .journey-label { color: var(--c-text-soft); font-weight: 700; }
.journey-step.is-locked .journey-dot { background: transparent; border: 1px dashed var(--c-text-faint); box-shadow: 0 0 0 4px var(--c-white); }

/*
 * Correção por item na revisão da vistoria — `.insp-correction`.
 *
 * Mora dentro do próprio item, e não numa lista à parte: quem revisa decide
 * olhando a foto, e o motivo escrito ao lado dela é o que o cliente vai ler.
 */
.insp-correction { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.insp-correction .input { max-width: 520px; }
.insp-correction-reason { margin-top: 6px; font-size: .82rem; color: var(--c-text-soft); }

/*
 * Sininho de avisos — `.topbar-bell` (layouts/app) e a lista `.notice-list`.
 *
 * O aviso existe para levar a algum lugar, então a linha inteira é o botão. O
 * não lido tem o ponto da marca à esquerda: é a única diferença visual, e basta.
 */
.topbar-bell { position: relative; margin-left: auto; }
.topbar-bell + .topbar-actions { margin-left: 8px; }

.topbar-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-full);
    background: var(--c-white);
    color: var(--c-text-soft);
    cursor: pointer;
}

.topbar-bell-btn:hover { color: var(--c-text); box-shadow: var(--shadow-sm); }
.topbar-bell-btn svg { width: 18px; height: 18px; }

.topbar-bell-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: var(--brand-primary);
    color: var(--c-white);
    font-size: .68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.topbar-bell-pop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    width: min(380px, calc(100vw - 32px));
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
    box-shadow: var(--shadow-lg);
}

.topbar-bell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--brand-line);
}

.notice-list { margin: 0; padding: 0; list-style: none; }
.notice-row + .notice-row { border-top: 1px solid var(--brand-line); }

.notice-open {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: start;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.notice-open:hover { background: var(--brand-surface); }
.notice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-surface);
    color: var(--c-text-faint);
}

.notice-icon svg { width: 16px; height: 16px; }
.notice-row.is-unread .notice-icon { background: rgba(var(--brand-primary-rgb), .12); color: var(--brand-primary); }
.notice-row.is-unread .notice-text strong::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--brand-primary);
    vertical-align: middle;
}

/* Selo de contagem no item do menu (Agenda: retornos de hoje e atrasados). */
.sidebar-badge {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: var(--brand-primary);
    color: var(--c-white);
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
}

.sidebar-collapsed .sidebar-badge { display: none; }

/* Reagendar na própria linha da agenda: quebra para baixo das ações. */
.agenda-reschedule { display: flex; flex-direction: column; gap: 6px; flex-basis: 100%; margin-top: 6px; }
.agenda-reschedule .input { width: auto; }

@media (max-width: 640px) {
    .journey-step { grid-template-columns: 28px minmax(0, 1fr); }
    .journey-step-actions { grid-column: 2; justify-content: flex-start; }
}

/* ---- Meus Ganhos (Sprint 7) ---- */

/* Ponto de cor inline (legenda de tipo de comissão no extrato). */
.dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: var(--radius-full);
    margin-right: 6px;
    vertical-align: baseline;
}

/* Gráfico de rosca (ApexCharts). Altura fixa para não pular no carregamento. */
.chart-donut { min-height: 240px; }

/* --------------------------------------------------------------------------
   Faixa de graduação.

   A equipe representa cada graduação por uma cor, como faixa de karatê. A cor
   chega por `--belt`, vinda de network_levels.color — nunca fixa aqui, porque
   nível é dado e o admin pode repintar.

   A escada de carreira saiu de propósito (S24): mostrar "o próximo degrau"
   para quem tem perfil de Sênior e nunca vai querer ser Diretor é prometer uma
   progressão que não existe. A tela mostra o que a pessoa É.
   -------------------------------------------------------------------------- */
.belt {
    --belt: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius-full);
    background: color-mix(in srgb, var(--belt) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--belt) 34%, transparent);
    color: var(--c-text);
    line-height: 1.15;
    max-width: 100%;
}
.belt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--belt);
    color: #fff;
    flex-shrink: 0;
}
.belt-icon svg { width: 60%; height: 60%; }
.belt-text { display: flex; flex-direction: column; min-width: 0; }
.belt-text strong { font-weight: 700; white-space: nowrap; }
.belt-text small { color: var(--c-text-soft); font-size: .74rem; }

.belt-sm { padding: 2px 10px 2px 2px; gap: 7px; }
.belt-sm .belt-icon { width: 20px; height: 20px; }
.belt-sm .belt-text strong { font-size: .76rem; }

.belt-md { padding: 4px 14px 4px 4px; }
.belt-md .belt-icon { width: 28px; height: 28px; }
.belt-md .belt-text strong { font-size: .85rem; }

.belt-lg { padding: 8px 20px 8px 8px; gap: 14px; }
.belt-lg .belt-icon { width: 46px; height: 46px; }
.belt-lg .belt-text strong { font-size: 1.15rem; }

/* Faixa clara (o Pleno é BRANCO): ícone branco sobre fundo branco desaparece,
   e a pílula sem contorno some no cartão. `partials/belt` mede a luminância da
   cor e marca a classe — a régua vai do branco ao preto e as duas pontas
   precisam ser legíveis. */
.belt-light { background: color-mix(in srgb, var(--belt) 26%, transparent); }
.belt-light .belt-icon {
    color: #1A1A1A;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-text) 22%, transparent);
}

/* A régua das cinco faixas: contexto sem prometer promoção. */
.belt-rule { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.belt-rule-item {
    flex: 1 1 88px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    text-align: center;
}
.belt-rule-item.is-current { background: color-mix(in srgb, var(--belt) 10%, transparent); }
.belt-rule-swatch { width: 100%; height: 7px; border-radius: var(--radius-full); background: var(--belt); }
.belt-rule-item:not(.is-current) .belt-rule-swatch { opacity: .3; }
.belt-rule-item span { font-size: .72rem; color: var(--c-text-faint); }
.belt-rule-item.is-current span { color: var(--c-text); font-weight: 700; }

/* Foto do consultor. Sem foto, as iniciais no lugar. */
.consultant-photo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--brand-surface);
    border: 2px solid var(--belt, var(--brand-line));
    color: var(--c-text-soft);
    font-weight: 700;
    text-transform: uppercase;
}
.consultant-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.consultant-photo-sm { width: 32px; height: 32px; font-size: .72rem; }
.consultant-photo-md { width: 48px; height: 48px; font-size: .9rem; }
.consultant-photo-lg { width: 96px; height: 96px; font-size: 1.6rem; }

/* Controle segmentado (abas do simulador). */
.seg {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--brand-surface);
    border-radius: var(--radius);
}
.seg-btn {
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: .9rem;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--c-text-soft);
    white-space: nowrap;
    transition: background .16s var(--ease), color .16s var(--ease);
}
.seg-btn:hover { color: var(--c-text); }
.seg-btn.is-active {
    background: var(--c-white);
    color: var(--c-text);
    box-shadow: var(--shadow-sm);
}

/*
 * Sub-navegação em abas dentro de uma tela (partials/subnav).
 *
 * Reaproveita o segmentado, mas é bloco: fica entre o topo da página e o
 * conteúdo, com respiro próprio. Sobre fundo surface o `.seg` sumiria — por
 * isso a versão em abas ganha fundo branco e borda.
 */
.subnav {
    display: flex;
    margin-bottom: 4px;
    max-width: 100%;
    overflow-x: auto;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav .seg-btn.is-active { background: rgba(var(--brand-primary-rgb), .1); color: var(--brand-primary-dark); box-shadow: none; }

/* Rótulo de seção dentro de um formulário. */
.section-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--c-text-soft);
    font-weight: 600;
    margin: 22px 0 10px;
}

/* Amostra da cor de marca de um tenant (listagem do super admin). */
.brand-swatch { display: inline-flex; align-items: center; gap: 6px; }
.brand-swatch-chip {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(12, 12, 12, .12);
    flex: none;
}
.brand-swatch-chip.is-lg { width: 26px; height: 26px; border-radius: 6px; }

/*
 * Cartão de plano de assinatura do SaaS (super admin).
 *
 * Um cartão por plano do cardápio: preço em destaque, limites, recursos
 * inclusos e quantos tenants assinam. Vira componente para não repetir
 * `style=` em cada card.
 */
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 4px 0; }
.plan-price strong { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; }

.plan-limits { display: flex; flex-direction: column; gap: 4px; }
.plan-limits li { font-size: .72rem; color: var(--c-text-soft); }
.plan-limits strong { color: var(--c-text); }

.plan-features { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.plan-feature { display: flex; align-items: center; gap: 7px; font-size: .72rem; color: var(--c-text-faint); }
.plan-feature svg { width: 13px; height: 13px; flex: none; }
.plan-feature.is-on { color: var(--c-text); font-weight: 600; }
.plan-feature.is-on svg { color: var(--c-success); }

.plan-foot {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--brand-line);
    font-size: .72rem;
    color: var(--c-text-soft);
}

/*
 * Verificação em duas etapas (Sprint 12).
 *
 * O código de 6 dígitos é o campo mais digitado da tela: fonte mono, grande e
 * espaçada, para não errar 0 por O nem 1 por l ao copiar do celular.
 */
.input-code {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    letter-spacing: .3em;
    text-align: center;
    padding: 12px 13px;
}
.input-code::placeholder { letter-spacing: .3em; color: var(--c-text-faint); }

/* Códigos de recuperação: aparecem uma vez, então precisam ser fáceis de copiar. */
.recovery-codes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}
.recovery-codes li {
    padding: 10px 14px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    letter-spacing: .06em;
    text-align: center;
    user-select: all;
}

.setup-steps { counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.setup-steps li {
    counter-increment: step;
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: .9rem;
}
.setup-steps li::before {
    content: counter(step);
    flex: none;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-full);
    background: rgba(var(--brand-primary-rgb), .12);
    color: var(--brand-primary-dark);
    font-size: .74rem;
    font-weight: 700;
}

.setup-details summary { font-size: .82rem; color: var(--c-text-soft); cursor: pointer; }
.setup-uri {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--brand-surface);
    border-radius: var(--radius-sm);
    word-break: break-all;
    user-select: all;
}

/* Botão que se comporta como link (dentro de um form que só faz POST). */
.link-button {
    color: var(--brand-primary);
    font-weight: 600;
    font-size: inherit;
}
.link-button:hover { color: var(--brand-primary-dark); text-decoration: underline; }

/* Selo de elegibilidade. */
.eligibility-seal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: .9rem;
}
.eligibility-seal.is-eligible { background: var(--c-success-bg); color: var(--c-success); }
.eligibility-seal.is-blocked { background: var(--c-warning-bg); color: var(--c-warning); }

/* ---- Vistoria (Sprint 13) ---- */

/*
 * Um item do checklist na tela de revisão. Não é `.card`: são doze itens dentro
 * de um card de etapa, e card dentro de card viraria uma escada de sombras.
 * Separador leve, hierarquia pelo espaçamento.
 */
.insp-item {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--brand-line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.insp-item:last-child { padding-bottom: 0; border-bottom: 0; }
.insp-item h3 { font-size: 1rem; }
.insp-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/*
 * Item que a condicional deixou de fora. Fica visível e esmaecido: quem revisa
 * precisa ver que a pergunta existia e que foi legitimamente pulada — sumir
 * pareceria checklist incompleto.
 */
.insp-item.is-skipped { opacity: .55; }

/* Observação que o vistoriador digitou no item. */
.insp-note {
    padding: 10px 14px;
    border-left: 3px solid var(--brand-primary);
    background: var(--brand-surface);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: .9rem;
    color: var(--c-text-soft);
}

/* Galeria das mídias de um item. */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.media-tile {
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--c-white);
}

.media-tile img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .2s var(--ease);
}

.media-tile:hover img { transform: scale(1.03); }

.media-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    aspect-ratio: 4 / 3;
    background: var(--brand-surface);
    color: var(--c-text-soft);
}

.media-tile figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 10px;
    border-top: 1px solid var(--brand-line);
}

/* ============================ 5. Telas ============================ */

/* ---- Login ---- */

.auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    background: var(--brand-ink);
}

/* Com os três cartões fora (S24) sobrou só o bloco de cima — que centralizado
   ocupa a lateral melhor do que ancorado no topo com o resto vazio. */
.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(1000px 520px at 78% 12%, rgba(var(--brand-primary-rgb), .28), transparent 62%),
        linear-gradient(155deg, #141414 0%, var(--brand-ink) 55%);
}

/* Foto enviada em Marca → cover + véu escuro para o texto continuar legível */
.auth-aside.has-bg {
    background:
        linear-gradient(
            160deg,
            rgba(12, 12, 12, .78) 0%,
            rgba(12, 12, 12, .58) 42%,
            rgba(12, 12, 12, .82) 100%
        ),
        radial-gradient(900px 480px at 85% 8%, rgba(var(--brand-primary-rgb), .22), transparent 58%),
        var(--auth-aside-bg, none) center / cover no-repeat,
        var(--brand-ink);
}

.auth-aside::after {
    content: '';
    position: absolute;
    right: -140px;
    bottom: -140px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-primary-rgb), .16), transparent 68%);
    pointer-events: none;
}

.auth-aside.has-bg::after {
    opacity: .45;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 48px;
    background: var(--brand-surface);
}

.auth-aside-top {
    position: relative;
    z-index: 1;
    max-width: 440px;
}

.auth-aside h2 {
    margin-top: 42px;
    font-size: 2.15rem;
    line-height: 1.15;
    letter-spacing: -.03em;
}

.auth-aside h2 em { font-style: normal; color: var(--brand-primary); }

.auth-card { width: 100%; max-width: 400px; }

.auth-card h1 { font-size: 1.65rem; letter-spacing: -.025em; }
.auth-card > p { margin-top: 6px; margin-bottom: 30px; color: var(--c-text-soft); font-size: .9rem; }

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-hint {
    margin-top: 26px;
    padding: 15px 17px;
    border: 1px dashed var(--brand-line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .6);
    font-size: .78rem;
    color: var(--c-text-soft);
}

.auth-hint strong { display: block; margin-bottom: 8px; color: var(--c-text); font-size: .74rem;
                    letter-spacing: .08em; text-transform: uppercase; }

.auth-hint-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.auth-hint-row code { font-family: var(--font-mono); font-size: .76rem; }

/* Rodapé das telas de acesso: voltar para o login, ir para a recuperação. */
.auth-alt {
    margin-top: 26px;
    text-align: center;
    font-size: .85rem;
    color: var(--c-text-soft);
}
.auth-alt a { color: var(--brand-primary); font-weight: 600; }
.auth-alt a:hover { color: var(--brand-primary-dark); text-decoration: underline; }

/* ---- Placeholder de sprint ---- */

.placeholder { max-width: 720px; }

.placeholder-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: var(--radius-lg);
    background: rgba(var(--brand-primary-rgb), .1);
    color: var(--brand-primary);
}

.placeholder-icon svg { width: 30px; height: 30px; }

.placeholder h2 { margin-top: 22px; font-size: 1.4rem; }
.placeholder-summary { margin-top: 10px; color: var(--c-text-soft); }

.placeholder-features { margin-top: 24px; display: flex; flex-direction: column; gap: 11px; }

.placeholder-feature { display: flex; gap: 11px; align-items: flex-start; font-size: .9rem; }

.placeholder-feature-mark {
    flex-shrink: 0;
    margin-top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-primary);
}

/* ---- Matriz de comissão ---- */

.matrix th:first-child,
.matrix td:first-child {
    position: sticky;
    left: 0;
    background: var(--c-white);
    font-weight: 700;
    z-index: 1;
}

.matrix thead th:first-child { background: #FAFAFA; }

.matrix .rate-slot { font-weight: 700; font-variant-numeric: tabular-nums; }
.matrix .rate-cumulative { display: block; font-size: .72rem; color: var(--c-text-faint); margin-top: 2px; }

.matrix-cell-edit {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 96px;
}

.matrix-cell-edit .input {
    width: 100%;
    max-width: 112px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.matrix td.num { vertical-align: middle; }

.inline-edit-panel {
    padding: 14px;
    margin-top: 8px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    min-width: 280px;
}

.inline-edit-panel .stack { gap: 12px; }

/* ---- Cortina lateral (drawer) ---- */

.drawer-root {
    position: fixed;
    inset: 0;
    z-index: var(--drawer-z);
    pointer-events: none;
}

.drawer-root.is-open { pointer-events: auto; }

.drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 12, .45);
    opacity: 0;
    transition: opacity .24s var(--ease);
}

.drawer-root.is-open .drawer-backdrop { opacity: 1; }

.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--drawer-width);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--c-white);
    box-shadow: var(--shadow-lg);
    border-left: 1px solid var(--brand-line);
    transform: translateX(100%);
    /*
     * Fechada, a cortina sai da tela mas a sombra (blur de 32px) vazava pela
     * borda direita. Numa tela com muitas cortinas (o sinistro tem ~30) as
     * sombras empilhavam e viravam uma faixa escura. `visibility` some com ela
     * depois que a saída termina — e tira do Tab os campos das fechadas.
     */
    visibility: hidden;
    transition: transform .28s var(--ease), visibility 0s linear .28s;
}

.drawer-root.is-open .drawer-panel {
    transform: translateX(0);
    visibility: visible;
    transition: transform .28s var(--ease), visibility 0s;
}

/*
 * Cortina obrigatória (trava de cotação até o pré-cadastro Asaas): já nasce
 * aberta, entra deslizando e não tem como fechar. O formulário dentro dela é o
 * mesmo da carteira; em meia tela, três colunas apertam — duas bastam.
 */
.drawer-root.is-forced .drawer-panel { animation: drawer-forced-in .3s var(--ease); }
.drawer-root.is-forced .drawer-body .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* O que é o Asaas e como o pagamento funciona — dentro da cortina obrigatória. */
.gate-explain { display: flex; flex-direction: column; gap: 22px; margin-bottom: 4px; }

.gate-hero {
    display: flex;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), .10), rgba(var(--brand-primary-rgb), .03));
    border: 1px solid rgba(var(--brand-primary-rgb), .22);
}
.gate-hero-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--brand-primary);
    color: #fff;
}
.gate-hero-icon svg { width: 22px; height: 22px; }
.gate-hero h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.gate-hero p { font-size: .92rem; color: var(--c-text-soft); }
.gate-hero-list { list-style: none; margin-top: 10px; display: grid; gap: 6px; font-size: .88rem; }
.gate-hero-list li { position: relative; padding-left: 22px; }
.gate-hero-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .42em;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--c-success);
    border-bottom: 2px solid var(--c-success);
    transform: rotate(-45deg);
}

.gate-flow { list-style: none; display: flex; flex-direction: column; margin-top: 10px; }
.gate-flow li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.gate-flow li:last-child { padding-bottom: 0; }
.gate-flow li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 34px;
    bottom: 2px;
    width: 2px;
    background: var(--brand-line);
}
.gate-flow-num {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--c-white);
    border: 2px solid var(--brand-line);
    color: var(--c-text-soft);
    font-weight: 700;
    font-size: .85rem;
}
.gate-flow-num-hot { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.gate-flow li > div > strong { display: block; font-size: .95rem; }
.gate-flow p { margin-top: 2px; font-size: .86rem; color: var(--c-text-soft); }

.gate-callout {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--c-warning-bg);
    border: 1px solid rgba(245, 158, 11, .35);
    font-size: .88rem;
}
.gate-callout-icon { flex: none; color: var(--c-warning); }
.gate-callout-icon svg { width: 20px; height: 20px; }

/* "Já tenho conta": informar a chave PIX em vez de criar outra, recolhido por padrão. */
.gate-existing {
    position: relative;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
    margin-bottom: 4px;
}
.gate-existing > summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 44px 14px 16px;
    cursor: pointer;
    list-style: none;
}
.gate-existing > summary::-webkit-details-marker { display: none; }
.gate-existing > summary::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 12px;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--brand-primary);
}
.gate-existing[open] > summary::after { content: "–"; }
.gate-existing > summary span { font-size: .84rem; color: var(--c-text-soft); }
.gate-existing-body { display: grid; gap: 14px; padding: 4px 16px 16px; }

@keyframes drawer-forced-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@media (max-width: 720px) {
    .drawer-root.is-forced .drawer-body .grid-3 { grid-template-columns: 1fr; }
}

.drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--brand-line);
    flex-shrink: 0;
}

.drawer-head h2 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.3;
}

.drawer-head p {
    margin-top: 4px;
    color: var(--c-text-soft);
    font-size: .9rem;
}

.drawer-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.drawer-body {
    flex: 1;
    overflow: auto;
    padding: 22px;
}

.drawer-body > .stack { gap: 18px; }

.drawer-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 22px;
    border-top: 1px solid var(--brand-line);
    background: var(--c-white);
    flex-shrink: 0;
}

body.drawer-open { overflow: hidden; }

/* ---- Árvore da rede ---- */

.tree { display: flex; flex-direction: column; gap: 4px; }

.tree-node {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    transition: border-color .16s var(--ease), transform .16s var(--ease);
    animation: fade-up .35s var(--ease) both;
}

.tree-node:hover { border-color: var(--brand-primary); transform: translateX(2px); }
.tree-node.is-root { border-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .04); }

.tree-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--brand-line);
    background: var(--brand-surface);
    color: var(--c-text-soft);
    font-weight: 700;
    line-height: 1;
}

.tree-toggle:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.tree-rail { flex-shrink: 0; width: 3px; height: 30px; border-radius: 2px; }

.tree-node-info { flex: 1; min-width: 0; }
.tree-node-info strong { display: block; font-size: .9rem; }
.tree-node-info span { font-size: .76rem; color: var(--c-text-faint); }

.tree-node-meta { display: flex; align-items: center; gap: 18px; text-align: right; }
.tree-node-meta div span { display: block; font-size: .66rem; text-transform: uppercase;
                           letter-spacing: .08em; color: var(--c-text-faint); }
.tree-node-meta div strong { font-size: .95rem; font-variant-numeric: tabular-nums; }

/* ---- Kit de adesão ---- */

.kit-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border-bottom: 1px solid #F0F0F0;
}

.kit-item:last-child { border-bottom: 0; }

.kit-item-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: rgba(var(--brand-primary-rgb), .1);
    color: var(--brand-primary);
}

.kit-item-info { flex: 1; min-width: 0; }
.kit-item-info strong { display: block; font-size: .92rem; }
.kit-item-info span { font-size: .8rem; color: var(--c-text-soft); }

/* ---- Onboarding público ---- */

.onboarding-page {
    min-height: 100vh;
    padding: 40px 24px;
    color: #fff;
    background:
        radial-gradient(900px 520px at 72% 8%, rgba(var(--brand-primary-rgb), .2), transparent 60%),
        linear-gradient(170deg, #151515 0%, var(--brand-ink) 60%);
}

.onboarding-shell { max-width: 1180px; margin: 0 auto; }

.onboarding-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.onboarding-head-title { text-align: right; }
.onboarding-head-title span { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
                              color: rgba(255, 255, 255, .45); }
.onboarding-head-title strong { display: block; font-size: .92rem; }
.onboarding-head-title strong em { font-style: normal; color: var(--brand-primary); }

.steps { display: flex; align-items: center; justify-content: center; margin-bottom: 44px; }

.step { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.step-dot {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .18);
    font-size: .85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .45);
}

.step.is-current .step-dot { border-color: var(--brand-primary); color: var(--brand-primary); }
.step span { font-size: .74rem; color: rgba(255, 255, 255, .45); }
.step.is-current span { color: #fff; font-weight: 600; }

.step-line { width: 88px; height: 1px; margin: 0 4px 24px; background: rgba(255, 255, 255, .14); }

.onboarding-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 26px; }

.panel-dark {
    padding: 34px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 20px;
}

.panel-dark h1 { font-size: 2rem; letter-spacing: -.03em; }
.panel-dark > p { margin-top: 8px; color: rgba(255, 255, 255, .58); }

.referred-by {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 11px 18px;
    border: 1px solid var(--brand-primary);
    border-radius: var(--radius);
    background: rgba(var(--brand-primary-rgb), .1);
    font-size: .9rem;
}

.referred-by svg { color: var(--brand-primary); }

.benefit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }

.benefit {
    padding: 18px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius);
}

.benefit svg { color: var(--brand-primary); margin-bottom: 12px; width: 22px; height: 22px; }
.benefit strong { display: block; font-size: .9rem; }
.benefit span { font-size: .78rem; color: rgba(255, 255, 255, .5); }

.badge-card {
    padding: 26px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 20px;
    text-align: center;
}

.badge-card-label { font-size: .64rem; letter-spacing: .24em; text-transform: uppercase;
                    color: rgba(255, 255, 255, .42); }

.badge-photo {
    display: grid;
    place-items: center;
    margin: 20px 0;
    aspect-ratio: 1;
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(var(--brand-primary-rgb), .08));
    border: 1px dashed rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .2);
}

.badge-photo svg { width: 60px; height: 60px; }

.badge-name { font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; }

.badge-meta {
    display: flex;
    justify-content: space-between;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .72rem;
    color: rgba(255, 255, 255, .42);
}

.price-card {
    margin-top: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 20px;
}

.price-card-label { font-size: .64rem; letter-spacing: .24em; text-transform: uppercase;
                    color: rgba(255, 255, 255, .42); }
.price-card-value { margin-top: 8px; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.price-card-note { font-size: .8rem; color: rgba(255, 255, 255, .5); }

.kit-list { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1);
            display: flex; flex-direction: column; gap: 10px; }

.kit-list-item { display: flex; align-items: center; gap: 10px; font-size: .84rem; }
.kit-list-item svg { flex-shrink: 0; width: 15px; height: 15px; color: var(--brand-primary); }
.kit-list-item span { color: rgba(255, 255, 255, .68); }
/* O selo dentro do item ("Contratado à parte") é um `span`, e `.kit-list-item span`
   (mais específica que `.badge-neutral`) o deixava com texto branco sobre o fundo
   claro do selo — o balão aparecia vazio. No painel escuro o selo vira translúcido. */
.kit-list-item .badge { margin-left: 4px; background: rgba(255, 255, 255, .14); color: #fff; }

.legal-note {
    margin-top: 30px;
    padding: 15px 18px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .07);
    font-size: .76rem;
    color: rgba(255, 255, 255, .5);
}

/* ---- Wizard de adesão (passos 2 a 7) ---- */

.step.is-done .step-dot {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: #fff;
}

.step-line.is-done { background: var(--brand-primary); }

.wizard-title { font-size: 1.55rem; letter-spacing: -.025em; }
.wizard-sub { margin-top: 6px; color: rgba(255, 255, 255, .55); }

.wizard-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.wizard-form .span-2 { grid-column: span 2; }

/* Campos sobre fundo escuro: o .input padrão é para painel claro. */
.panel-dark .input,
.panel-dark .select {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .12);
    color: #fff;
}

.panel-dark .input::placeholder { color: rgba(255, 255, 255, .3); }

/*
 * O popup nativo do <select> abre com fundo branco do sistema, mas as opções
 * herdam o color:#fff do campo escuro — texto branco sobre branco, invisível.
 * Forçamos cor escura nas opções para que fiquem legíveis na lista aberta.
 */
.panel-dark .select option {
    color: var(--c-text, #17181A);
    background: #fff;
}

/*
 * O select pesquisável no fundo escuro: o campo fechado já herda `.input`, só
 * o que o navegador desenhava sozinho (placeholder, seta, desabilitado) precisa
 * de cor aqui. A lista aberta continua clara de propósito — é o mesmo contraste
 * do popup nativo logo acima, e o que sustenta a leitura de 500 modelos.
 */
.panel-dark .search-select-control.is-placeholder .search-select-value { color: rgba(255, 255, 255, .3); }
.panel-dark .search-select-control.is-open { background: rgba(255, 255, 255, .07); }
.panel-dark .search-select-caret { color: rgba(255, 255, 255, .45); }

.panel-dark .search-select-control:disabled {
    background: rgba(255, 255, 255, .03);
    color: rgba(255, 255, 255, .35);
}

.panel-dark .input:focus,
.panel-dark .select:focus {
    border-color: var(--brand-primary);
    background: rgba(255, 255, 255, .07);
}

.panel-dark .input.has-error { border-color: var(--c-danger); }
.panel-dark .field label { color: rgba(255, 255, 255, .55); }
.panel-dark .field-hint { color: rgba(255, 255, 255, .35); }

.panel-dark .input[type="file"] { padding: 8px 12px; font-size: .85rem; }

.field-label-loose {
    margin-top: 26px;
    margin-bottom: 12px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}

.wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 32px;
}

.btn-ghost-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .75);
}

.btn-ghost-light:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.referred-by.is-warning {
    border-color: var(--c-warning);
    background: rgba(245, 158, 11, .1);
}

.referred-by.is-warning svg { color: var(--c-warning); }

/* Tamanhos de camiseta */

.size-grid { display: flex; flex-wrap: wrap; gap: 10px; }

.size-option {
    min-width: 62px;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .8);
    font-weight: 700;
    transition: border-color .16s var(--ease), background .16s var(--ease), transform .12s var(--ease);
}

.size-option:hover { border-color: rgba(255, 255, 255, .3); }

.size-option.is-selected {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), .16);
    color: #fff;
    transform: translateY(-1px);
}

/* Contrato e aceite */

.contract-box {
    margin-top: 24px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .03);
    overflow: hidden;
}

.contract-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: .9rem;
}

.contract-box-body {
    max-height: 230px;
    overflow-y: auto;
    padding: 16px 18px;
    font-size: .82rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .6);
}

.contract-box-body::-webkit-scrollbar { width: 6px; }
.contract-box-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .14);
    border-radius: 3px;
}

.accept-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .03);
    font-size: .88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .78);
    cursor: pointer;
    transition: border-color .16s var(--ease);
}

.accept-box:hover { border-color: rgba(255, 255, 255, .24); }
.accept-box.has-error { border-color: var(--c-danger); }

.accept-box input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: var(--brand-primary);
    cursor: pointer;
}

/* Foto do crachá */

.badge-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

/* Pagamento */

.pay-amount {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 26px;
    padding: 20px 22px;
    border-radius: var(--radius);
    background: rgba(var(--brand-primary-rgb), .1);
    border: 1px solid rgba(var(--brand-primary-rgb), .3);
}

.pay-amount span { font-size: .8rem; color: rgba(255, 255, 255, .6); }
.pay-amount strong { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }

.pay-methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.pay-method {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .03);
}

.pay-method-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(var(--brand-primary-rgb), .14);
    color: var(--brand-primary);
}

.pay-method-icon svg { width: 17px; height: 17px; }
.pay-method strong { display: block; font-size: .86rem; }
.pay-method span { font-size: .72rem; color: rgba(255, 255, 255, .45); }

.pay-pix,
.pay-slip { margin-top: 24px; }
.pay-pix .input,
.pay-slip .input { background: rgba(255, 255, 255, .05); }

/* QR Code do PIX: fundo branco obrigatorio — leitor nao le QR invertido. */
.pay-qr {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
}

.pay-qr img {
    background: #FFF;
    padding: 10px;
    border-radius: 10px;
    max-width: 100%;
    height: auto;
}

/* --------------------------- Checkout (publico) ---------------------------
   As formas de pagamento alem do PIX. Elas vivem FECHADAS embaixo do QR, e
   nao lado a lado com ele: o PIX e o caminho que a operacao quer, e um seletor
   de tres abas iguais transformaria a escolha padrao numa decisao.

   O painel publico e escuro (`.panel-dark`), entao tudo aqui e transparencia
   sobre branco, nunca cor solida — e a mesma linguagem de `.pay-method`. */
.checkout-more { margin-top: 26px; text-align: left; }

.checkout-more-label {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .4);
    margin-bottom: 10px;
}

.checkout-option {
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .03);
    overflow: hidden;
}

.checkout-option + .checkout-option { margin-top: 10px; }

.checkout-option.is-open {
    border-color: rgba(var(--brand-primary-rgb), .35);
    background: rgba(255, 255, 255, .045);
}

/* O cabecalho inteiro e o botao — alvo de toque grande no celular, que e onde
   a maioria paga. Botao pequeno ao lado de um titulo clicavel produz aquele
   toque que "nao faz nada". */
.checkout-option-head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.checkout-option-title { flex: 1; min-width: 0; }
.checkout-option-title strong { display: block; font-size: .88rem; }
.checkout-option-title span { font-size: .74rem; color: rgba(255, 255, 255, .45); }

.checkout-chevron {
    flex-shrink: 0;
    color: rgba(255, 255, 255, .35);
    transition: transform .18s ease;
}

.checkout-chevron svg { width: 16px; height: 16px; display: block; }
.checkout-option.is-open .checkout-chevron { transform: rotate(180deg); }

.checkout-option-body {
    padding: 4px 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.checkout-option-body .field { margin-top: 14px; }
.checkout-option-body .input { background: rgba(255, 255, 255, .05); }

/* Mes / ano / CVV e CPF / CEP / numero: tres campos curtos numa linha so.
   Empilhados, o formulario de cartao passa de uma tela inteira no celular e a
   pessoa perde de vista o botao de pagar. */
.checkout-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.checkout-row-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

/* O consentimento do debito automatico. Caixa grande e texto clicavel: e uma
   autorizacao recorrente, e tem de ser dificil de marcar sem querer e facil de
   marcar de proposito. */
.checkout-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 13px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .03);
    font-size: .78rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, .7);
    cursor: pointer;
}

.checkout-consent input {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: var(--brand-primary);
}

.pay-waiting {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 22px;
    padding: 15px 18px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: .86rem;
    color: rgba(255, 255, 255, .65);
}

.pulse-dot {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c-warning);
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .35; transform: scale(.82); }
}

/* Boas-vindas */

.welcome-wrap { display: grid; place-items: center; padding: 20px 0 60px; }
.welcome-card { max-width: 560px; width: 100%; text-align: center; }

.welcome-check {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: rgba(16, 185, 129, .16);
    color: var(--c-success);
    animation: fade-up .45s var(--ease) both;
}

.welcome-check svg { width: 32px; height: 32px; }

.welcome-card h1 { font-size: 1.9rem; letter-spacing: -.03em; }

.welcome-id {
    margin-top: 26px;
    padding: 20px;
    border-radius: var(--radius);
    background: rgba(var(--brand-primary-rgb), .1);
    border: 1px solid rgba(var(--brand-primary-rgb), .3);
}

.welcome-id span {
    display: block;
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
}

.welcome-id strong { display: block; margin-top: 6px; font-size: 2rem; letter-spacing: .1em; }

.welcome-links { margin-top: 26px; text-align: left; }

/* ---- Contratação concluída (/contratar/pronto) ----
   Página larga em duas colunas no desktop (o que se faz agora | o que
   acompanha) e uma coluna enxuta no celular. Os cartões ficam direto sobre o
   fundo: o painel-dentro-de-painel de antes comia um terço da largura do
   celular em margem. O `.panel-dark` vai na raiz só para herdar os campos
   escuros do checkout — a caixa dele é desligada aqui. */

.onboarding-page.is-compact .onboarding-head { margin-bottom: 28px; }

.done-page.panel-dark {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 0 40px;
    background: none;
    border: 0;
    border-radius: 0;
}

.done-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 18px;
    margin-bottom: 22px;
}

.done-hero-check {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(16, 185, 129, .16);
    color: var(--c-success);
    animation: fade-up .45s var(--ease) both;
}

.done-hero-check svg { width: 26px; height: 26px; }
.done-hero h1 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.03em; }
.done-hero p { margin-top: 5px; font-size: .92rem; color: rgba(255, 255, 255, .58); }

.done-plate {
    padding: 10px 18px;
    border-radius: var(--radius);
    background: rgba(var(--brand-primary-rgb), .1);
    border: 1px solid rgba(var(--brand-primary-rgb), .3);
    text-align: right;
}

.done-plate span {
    display: block;
    font-size: .62rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
}

.done-plate strong { display: block; margin-top: 2px; font-size: 1.45rem; letter-spacing: .12em; }

.done-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

/* Uma coluna só (cancelado, sem consultor): a página inteira estreita, e não só
   o cartão — o cabeçalho de 1080px sobre um cartão centralizado ficava torto. */
.done-page.panel-dark.is-single { max-width: 640px; }
.done-page.is-single .done-grid { grid-template-columns: minmax(0, 1fr); }
.done-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.done-card {
    padding: 24px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 20px;
}

.done-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.done-card-title {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
}

.done-card-text { margin-top: 8px; font-size: .86rem; line-height: 1.5; color: rgba(255, 255, 255, .68); }
.done-card-text .faint { display: block; margin-top: 4px; font-size: .78rem; color: rgba(255, 255, 255, .42); }

.done-tag,
.done-due {
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    font-size: .72rem;
    white-space: nowrap;
    color: rgba(255, 255, 255, .6);
}

/* Pagamento: o total encabeça, as parcelas dele logo embaixo. */
.done-total {
    margin-top: 8px;
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.done-total-of { margin-top: 4px; font-size: .84rem; color: rgba(255, 255, 255, .55); }

.done-items { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }

.done-items li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: .84rem;
    color: rgba(255, 255, 255, .58);
}

.done-items li strong { font-weight: 600; text-align: right; color: rgba(255, 255, 255, .88);
                        font-variant-numeric: tabular-nums; }

.done-items.is-summary { gap: 0; }
.done-items.is-summary li { padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.done-items.is-summary li:first-child { border-top: 0; }

.done-monthly {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, .12);
    font-size: .76rem;
    color: rgba(255, 255, 255, .45);
}

.done-pay .checkout > .field-label-loose:first-child,
.done-pay .checkout > p:first-child { margin-top: 22px !important; }

.done-wait {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: .82rem;
    color: rgba(255, 255, 255, .65);
}

.done-wait > span:nth-child(2) { flex: 1; }
.done-wait .btn svg { width: 14px; height: 14px; }

/* Passos: lista numerada com o fio ligando as marcas. */
.done-steps { margin-top: 16px; }

.done-step {
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 22px;
}

.done-step:last-child { padding-bottom: 0; }

.done-step::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 36px;
    bottom: 6px;
    width: 1px;
    background: rgba(255, 255, 255, .12);
}

.done-step:last-child::before { display: none; }

.done-step-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid rgba(var(--brand-primary-rgb), .65);
    font-size: .8rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.done-step-mark svg { width: 15px; height: 15px; }
.done-step.is-done .done-step-mark { background: var(--c-success); border-color: var(--c-success); color: #fff; }

.done-step-body > strong { display: block; padding-top: 5px; font-size: .95rem; }
.done-step-body > p { margin-top: 4px; font-size: .84rem; line-height: 1.5; color: rgba(255, 255, 255, .62); }
.done-step-body > .done-step-note { margin-top: 8px; font-size: .74rem; color: rgba(255, 255, 255, .42); }

.done-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Documentos: uma linha por documento, botões só no que falta. */
.done-docs { margin-top: 10px; }
.done-doc { padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.done-doc:last-child { padding-bottom: 0; }
.done-doc-row { display: flex; align-items: center; gap: 12px; }

.done-doc-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .6);
}

.done-doc-icon svg { width: 16px; height: 16px; }
.done-doc.is-accepted .done-doc-icon { background: rgba(16, 185, 129, .16); color: var(--c-success); }
.done-doc.is-rejected .done-doc-icon { background: rgba(239, 68, 68, .16); color: #FCA5A5; }

.done-doc-name { flex: 1; min-width: 0; font-size: .88rem; font-weight: 600; }
.done-doc-name small { display: block; font-size: .72rem; font-weight: 400; color: rgba(255, 255, 255, .42); }

.done-doc-reason,
.done-doc-actions,
.done-doc-sending { margin-left: 46px; }

.done-doc-reason { margin-top: 8px; font-size: .8rem; color: #FCA5A5; }
.done-doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.done-doc-actions label { margin: 0; cursor: pointer; }
.done-doc-actions svg { width: 14px; height: 14px; }
.done-doc-sending { margin-top: 8px; font-size: .74rem; color: rgba(255, 255, 255, .45); }

/* No painel escuro o selo claro do sistema vira translúcido. */
.done-page .badge-success { background: rgba(16, 185, 129, .16); color: #6EE7B7; }
.done-page .badge-danger  { background: rgba(239, 68, 68, .16);  color: #FCA5A5; }
.done-page .badge-info    { background: rgba(59, 130, 246, .18); color: #93C5FD; }
.done-page .badge-neutral { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .6); }

/* Consultor: uma linha só. */
.done-seller { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px 20px; }

.done-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(var(--brand-primary-rgb), .16);
    font-size: .9rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.done-seller-info { flex: 1; min-width: 140px; }
.done-seller-info span { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .42); }
.done-seller-info strong { display: block; margin-top: 2px; font-size: .95rem; }
.done-seller-info small { display: block; font-size: .78rem; color: rgba(255, 255, 255, .5); }
.done-seller-btn svg { width: 15px; height: 15px; }

.done-page > .done-foot {
    margin-top: 24px;
    text-align: center;
    font-size: .76rem;
    color: rgba(255, 255, 255, .4);
}

@media (max-width: 900px) {
    .done-page.panel-dark { max-width: 640px; }
    .done-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
    .onboarding-page.is-compact { padding: 18px 14px; }
    .onboarding-page.is-compact .onboarding-head { margin-bottom: 18px; }
    .onboarding-page.is-compact .onboarding-head img { height: 28px; width: auto; }
    .onboarding-page.is-compact .onboarding-head-title { display: none; }

    .done-hero { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 14px; margin-bottom: 16px; }
    .done-hero-check { width: 42px; height: 42px; }
    .done-hero-check svg { width: 22px; height: 22px; }
    .done-hero h1 { font-size: 1.35rem; }
    .done-hero p { font-size: .86rem; }

    .done-plate {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
    }

    .done-plate strong { margin-top: 0; font-size: 1.2rem; }

    .done-col { gap: 14px; }
    .done-grid { gap: 14px; }
    .done-card { padding: 18px; border-radius: 16px; }
    .done-card-title { letter-spacing: .1em; }
    .done-total { font-size: 2rem; }

    .done-actions { flex-direction: column; align-items: stretch; }
    .done-actions .btn { width: 100%; justify-content: center; }

    .done-doc-reason,
    .done-doc-actions,
    .done-doc-sending { margin-left: 0; }
    .done-doc-actions form { flex: 1; }
    .done-doc-actions label { width: 100%; justify-content: center; }

    .done-seller-btn { width: 100%; justify-content: center; }
}

/* ---- Venda direta: escolha de plano e memória do cálculo ---- */

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.plan-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    text-align: left;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .8);
    transition: border-color .16s var(--ease), background .16s var(--ease), transform .12s var(--ease);
}

.plan-card:hover { border-color: rgba(255, 255, 255, .28); transform: translateY(-2px); }

.plan-card.is-selected {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), .12);
    color: #fff;
}

.plan-card-name {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

.plan-card-price { font-size: .9rem; color: rgba(255, 255, 255, .6); }
.plan-card-price strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.plan-card-price small { font-size: .8rem; }

.plan-card-join { font-size: .78rem; color: rgba(255, 255, 255, .5); }

.plan-card-benefits {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-card-benefits li { display: flex; align-items: center; gap: 7px; font-size: .8rem; }
.plan-card-benefits svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--brand-primary); }

/* Memória do cálculo na proposta */

.breakdown {
    margin-top: 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius);
    overflow: hidden;
}

.breakdown-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    font-size: .88rem;
    color: rgba(255, 255, 255, .68);
}

.breakdown-row:last-child { border-bottom: 0; }
.breakdown-row em { font-style: normal; font-size: .76rem; color: rgba(255, 255, 255, .4); }
.breakdown-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }

.breakdown-row.is-subtotal {
    background: rgba(255, 255, 255, .03);
    color: rgba(255, 255, 255, .85);
}

.breakdown-row.is-total {
    background: rgba(var(--brand-primary-rgb), .12);
    color: #fff;
    font-weight: 700;
}

.breakdown-row.is-total strong { font-size: 1.05rem; }

/* Memória de cálculo fechada: quem quer somar, abre; quem quer o preço, não tropeça. */

.mini-details { margin-top: 14px; }

.mini-details > summary {
    cursor: pointer;
    list-style: none;
    font-size: .78rem;
    color: rgba(255, 255, 255, .5);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mini-details > summary::-webkit-details-marker { display: none; }
.mini-details > summary::before { content: "+ "; text-decoration: none; }
.mini-details[open] > summary::before { content: "− "; }
.mini-details[open] > summary { color: rgba(255, 255, 255, .7); }
.mini-details .breakdown { margin-top: 10px; }
.welcome-links .field-label-loose { margin-top: 0; }

/* ---- Página de erro ---- */

.error-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 40px;
    text-align: center;
    background: var(--brand-ink);
    color: #fff;
}

.error-code { font-size: 5.5rem; font-weight: 800; letter-spacing: -.05em; color: var(--brand-primary);
              line-height: 1; }
.error-page h1 { margin-top: 12px; font-size: 1.4rem; }
.error-page p { margin-top: 8px; color: rgba(255, 255, 255, .55); max-width: 460px; }
.error-page .btn { margin-top: 28px; }

/* ---- Carteira: a tela inicial do consultor, no jeito de app de banco ---- */
/* Cartão escuro com o saldo, atalhos redondos, listas no formato de feed.
   Tudo nos tokens de marca: o laranja entra como brilho e como ação. */

.wallet { gap: 18px; }

.wallet-hero {
    position: relative;
    overflow: hidden;
    padding: 24px 26px 22px;
    border-radius: var(--radius-lg);
    color: var(--c-white);
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(var(--brand-primary-rgb), .38) 0%, rgba(var(--brand-primary-rgb), 0) 55%),
        radial-gradient(80% 90% at 0% 100%, rgba(var(--brand-primary-rgb), .14) 0%, rgba(var(--brand-primary-rgb), 0) 60%),
        var(--brand-ink);
    box-shadow: var(--shadow-lg);
}

.wallet-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.wallet-hero-hello {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.wallet-hero-label {
    display: block;
    margin-top: 14px;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .62);
}

.wallet-eye {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, .1);
    color: var(--c-white);
    cursor: pointer;
    transition: background .2s var(--ease);
}

.wallet-eye:hover { background: rgba(255, 255, 255, .18); }
.wallet-eye:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.wallet-eye svg { width: 20px; height: 20px; }

.wallet-hero-value {
    margin: 4px 0 0;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.wallet-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .85);
    font-size: .8rem;
    font-weight: 600;
}

.wallet-hero-pill svg { width: 15px; height: 15px; }
.wallet-hero-pill.is-open { background: rgba(var(--brand-primary-rgb), .9); color: var(--c-white); }

.wallet-hero-split {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.wallet-hero-split dt {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}

.wallet-hero-split dd {
    margin: 4px 0 0;
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Atalhos: o círculo com o ícone e o rótulo embaixo, como no app do banco. */
.wallet-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.wallet-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px 12px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
    color: var(--c-text);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}

.wallet-action:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(var(--brand-primary-rgb), .35); }
.wallet-action:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.wallet-action.is-disabled { cursor: not-allowed; opacity: .5; transform: none; box-shadow: none; }

.wallet-action-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(var(--brand-primary-rgb), .1);
    color: var(--brand-primary);
}

.wallet-action-icon svg { width: 20px; height: 20px; }
.wallet-action-icon.is-primary { background: var(--brand-primary); color: var(--c-white); }

/* A transferência que espera a decisão de quem está logado. */
.wallet-callout {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(var(--brand-primary-rgb), .35);
    border-radius: var(--radius);
    background: rgba(var(--brand-primary-rgb), .06);
}

.wallet-callout-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }

/* Listas no formato de feed: ícone redondo, texto, valor à direita. */
.wallet-companies,
.wallet-feed { list-style: none; margin: 0; padding: 0; }

.wallet-company,
.wallet-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 22px;
    border-top: 1px solid var(--brand-line);
}

.wallet-company:first-child,
.wallet-feed-item:first-child { border-top: 0; }

.wallet-feed-icon {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--brand-surface);
    color: var(--c-text-soft);
}

.wallet-feed-icon svg { width: 18px; height: 18px; }
.wallet-feed-icon.is-in { background: var(--c-success-bg); color: var(--c-success); }
.wallet-feed-icon.is-out { background: rgba(var(--brand-primary-rgb), .1); color: var(--brand-primary); }

.wallet-company-main,
.wallet-feed-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.wallet-company-side,
.wallet-feed-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
    flex-shrink: 0;
}

.wallet-company-why { max-width: 200px; }

.wallet-feed-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.wallet-amount {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.01em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.wallet-amount.is-in { color: var(--c-success); }
.wallet-amount.is-out { color: var(--c-text); }
.wallet-amount.is-muted { color: var(--c-text-faint); }

.wallet-empty { display: flex; align-items: center; gap: 14px; }

.wallet-account { display: flex; align-items: flex-start; gap: 14px; }

/* O valor em destaque no alto da cortina (saque, nota, transferência). */
.wallet-sheet-amount {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--brand-surface);
}

.wallet-sheet-amount strong {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.wallet-sheet-amount strong.is-in { color: var(--c-success); }

.wallet-amount-input { font-size: 1.3rem; font-weight: 700; }

@media (max-width: 760px) {
    .wallet-hero { padding: 20px 18px 18px; border-radius: var(--radius); }
    .wallet-hero-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wallet-actions { gap: 6px; }
    .wallet-action { padding: 10px 2px; border-color: transparent; background: transparent; font-size: .72rem; }
    .wallet-action:hover { transform: none; box-shadow: none; }
    .wallet-action-icon { width: 48px; height: 48px; background: var(--c-white); box-shadow: var(--shadow-sm); }
    .wallet-company,
    .wallet-feed-item { padding: 14px 16px; flex-wrap: wrap; }
    .wallet-company-side,
    .wallet-feed-side { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding-left: 54px; text-align: left; }
    .wallet-company-why { max-width: none; }
    .wallet-callout { flex-wrap: wrap; }
    .wallet-callout-body { flex-basis: calc(100% - 56px); }
    .wallet-callout .btn { margin-left: 54px; }
}

/* ============================ 6. Animações ============================ */

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes grow-x {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

.animate-in { animation: fade-up .4s var(--ease) both; }
.delay-1 { animation-delay: .05s; }
.delay-2 { animation-delay: .1s; }
.delay-3 { animation-delay: .15s; }
.delay-4 { animation-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ============================ 7. Responsivo ============================ */

@media (max-width: 1100px) {
    .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-sidebar { grid-template-columns: minmax(0, 1fr); }
    .onboarding-grid { grid-template-columns: minmax(0, 1fr); }
    /* Numa coluna só, o cartão de preço cairia depois de tudo. Ele é o que o
       cliente abriu o link para ver — sobe para o topo no celular. */
    .onboarding-grid.is-price-first > aside { order: -1; }
}

@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { display: none; }
}

@media (max-width: 720px) {
    .app-sidebar { transform: translateX(-100%); transition: transform .24s var(--ease); }
    .app-sidebar.is-open { transform: translateX(0); }
    .app-main { margin-left: 0 !important; }
    .topbar-burger { display: grid; place-items: center; width: 38px; height: 38px;
                     border-radius: var(--radius-sm); border: 1px solid var(--brand-line); }
    .sidebar-toggle { display: none; }
    .app-topbar { padding: 0 16px; gap: 12px; }
    /*
     * As ações do topo (Funil, Link de pagamento, …) alargavam a PÁGINA no
     * celular: a negociação abria com 530 px num aparelho de 360 e o navegador
     * afastava o zoom — tudo miúdo, e o modal ficava fora da tela (07/11/2026).
     * Agora elas rolam dentro da barra.
     */
    .topbar-actions {
        flex-shrink: 1;
        min-width: 0;
        max-width: 62vw;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .topbar-actions::-webkit-scrollbar { display: none; }
    .topbar-actions > * { flex-shrink: 0; }
    .topbar-burger, .topbar-bell { flex-shrink: 0; }
    .app-content { padding: 18px 16px; }

    /*
     * Numa faixa de 68px o subtítulo não cabe junto do menu e das ações — some,
     * e o título trunca em vez de empurrar os botões para fora da tela.
     */
    .topbar-title p { display: none; }
    .topbar-title h1 { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .subnav { border-radius: var(--radius-sm); }

    .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: minmax(0, 1fr); }
    .benefit-grid { grid-template-columns: minmax(0, 1fr); }
    .panel-dark { padding: 24px; }
    .stat-value { font-size: 1.6rem; }

    /* Wizard de adesão em coluna única */
    .wizard-form { grid-template-columns: minmax(0, 1fr); }
    .wizard-form .span-2 { grid-column: span 1; }
    .pay-methods { grid-template-columns: minmax(0, 1fr); }
    /* Mes e ano cabem juntos em 320px; CVV desce sozinho. Espremer os tres
       faz o campo de ano ficar com largura de dois digitos. */
    .checkout-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .checkout-row-2 { grid-template-columns: minmax(0, 1fr); }
    .wizard-actions { flex-direction: column-reverse; align-items: stretch; }
    .wizard-actions .btn { width: 100%; }
    .wizard-title { font-size: 1.3rem; }
    .pay-amount { flex-direction: column; align-items: flex-start; gap: 4px; }
    .pay-amount strong { font-size: 1.6rem; }
    .welcome-id strong { font-size: 1.6rem; }

    .drawer-panel { width: 100%; border-left: none; }
}

@media print {
    .app-sidebar, .app-topbar, .app-footer, .impersonation-bar { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .card { break-inside: avoid; box-shadow: none; }
}

/* ------------------------------------------------------------------ */
/* Cotador do CRM (S23)                                                 */
/* Os cartões de oferta e as opções (.plan-card, .size-option,         */
/* .accept-box) reaproveitam as classes do wizard público, que são     */
/* pensadas para o fundo escuro do .panel-dark (texto branco). Dentro  */
/* do drawer claro do painel esse texto sumia. Aqui elas recebem as    */
/* cores do painel — escopadas ao .crm-cotador para não afetar a       */
/* venda pública.                                                      */
/* ------------------------------------------------------------------ */
.crm-cotador .size-option {
    border: 1px solid var(--brand-line);
    background: var(--c-white);
    color: var(--c-text);
}
.crm-cotador .size-option:hover { border-color: var(--c-text-faint); }
.crm-cotador .size-option.is-selected {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), .08);
    color: var(--c-text);
}

.crm-cotador .accept-box {
    border: 1px solid var(--brand-line);
    background: var(--c-white);
    color: var(--c-text);
}
.crm-cotador .accept-box:hover { border-color: var(--c-text-faint); }

.crm-cotador .plan-card {
    border: 1px solid var(--brand-line);
    background: var(--c-white);
    color: var(--c-text);
}
.crm-cotador .plan-card:hover { border-color: var(--c-text-faint); }
.crm-cotador .plan-card.is-selected {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), .06);
    color: var(--c-text);
}
.crm-cotador .plan-card-price { color: var(--c-text-soft); }
.crm-cotador .plan-card-price strong { color: var(--c-text); }
.crm-cotador .plan-card-join { color: var(--c-text-soft); }
.crm-cotador .plan-card-benefits { border-top-color: var(--brand-line); }
.crm-cotador .plan-card-benefits li { color: var(--c-text-soft); }

/* --------------------------------------------------------------------------
   Assistente de proposta (S24).

   O consultor monta a venda em quatro passos com o resumo sempre à vista —
   ele está com o cliente no telefone, e perder o que já preencheu para trocar
   de tela é perder a venda. Por isso uma tela só, com `x-show` nos passos.
   -------------------------------------------------------------------------- */
.wizard-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.wizard-step {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1 1 150px;
    padding: 10px 14px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
    font-size: .84rem;
    color: var(--c-text-faint);
}
.wizard-step.is-current {
    border-color: var(--brand-primary);
    color: var(--c-text);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--brand-primary);
}
.wizard-step.is-done { color: var(--c-text-soft); }
.wizard-dot {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: var(--brand-surface);
    font-size: .76rem;
    font-weight: 700;
}
.wizard-step.is-current .wizard-dot { background: var(--brand-primary); color: #fff; }
.wizard-step.is-done .wizard-dot { background: var(--c-success); color: #fff; }

/* Uma oferta = um plano dentro de uma tabela. A linha inteira é o alvo do
   clique: em telefone, acertar o radinho de 16px é hostil. */
.offer-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--brand-line);
    cursor: pointer;
}
.offer-row:last-child { border-bottom: 0; }
.offer-row:hover { background: var(--brand-surface); }
.offer-row.is-chosen { background: rgba(var(--brand-primary-rgb), .06); }
.offer-row-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.offer-row-info strong { font-size: .95rem; }
.offer-row-info span { font-size: .8rem; color: var(--c-text-soft); }
.offer-row-price { text-align: right; }
.offer-row-price strong { display: block; font-size: 1.05rem; font-family: var(--font-mono); }
.offer-row-price span { font-size: .74rem; color: var(--c-text-faint); }

/* O que a oferta entrega — `partials/offer-coverage`. Duas colunas: a cobertura
   padrão (o que já está no preço) e os opcionais (o que se acrescenta). Empilha
   em telefone, onde a lista de opcionais é a que o consultor mais rola. */
.offer-coverage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 16px 18px 18px;
    border-top: 1px solid var(--brand-line);
}
.offer-coverage-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
}
.offer-coverage-col .section-label { margin: 0; }
.offer-coverage-lead { margin: 0; font-size: .78rem; line-height: 1.4; color: var(--c-text-soft); }
.offer-coverage-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.offer-coverage-list > li { display: flex; flex-direction: column; gap: 1px; }
.offer-coverage-list strong { font-size: .86rem; }
.offer-coverage-list strong.is-superseded { text-decoration: line-through; color: var(--c-text-faint); }
.offer-coverage-note { display: block; font-size: .76rem; line-height: 1.4; color: var(--c-text-soft); }
.offer-coverage-empty { margin: 0; font-size: .78rem; color: var(--c-text-soft); }
.offer-coverage-facts {
    margin: 4px 0 0;
    padding-top: 10px;
    border-top: 1px dashed var(--brand-line);
}
.offer-coverage-facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-text-soft); }
.offer-coverage-facts dd { margin: 2px 0 0; font-size: .95rem; }

.offer-optional {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    background: var(--brand-surface);
}
label.offer-optional { cursor: pointer; }
label.offer-optional:hover { border-color: rgba(var(--brand-primary-rgb), .45); }
.offer-optional.is-selected { border-color: rgba(var(--brand-primary-rgb), .6); background: rgba(var(--brand-primary-rgb), .06); }
.offer-optional.is-blocked { opacity: .55; cursor: not-allowed; }
.offer-optional input[type="checkbox"] { flex-shrink: 0; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand-primary); }
.offer-optional-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.offer-optional-body strong { font-size: .86rem; }
.offer-optional-price { font-size: .8rem; font-weight: 700; font-family: var(--font-mono); color: var(--c-text); }
.offer-optional-cota { font-size: .76rem; color: var(--c-text-soft); }

@media (max-width: 760px) {
    .offer-coverage { grid-template-columns: minmax(0, 1fr); padding: 14px; }
}

/* Compacto (07/11/2026): cobertura padrão recolhível e opcional numa linha. */
details.offer-coverage-included > summary {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    list-style: none;
}
details.offer-coverage-included > summary::-webkit-details-marker { display: none; }
details.offer-coverage-included > summary::after {
    content: '';
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid var(--c-text-faint);
    border-bottom: 2px solid var(--c-text-faint);
    transform: rotate(45deg);
    transition: transform .16s var(--ease);
}
details.offer-coverage-included[open] > summary::after { transform: rotate(-135deg); }
.offer-coverage-count { font-weight: 600; color: var(--c-text-faint); }
.offer-optional { align-items: center; }
.offer-optional-body { flex: 1; }
.offer-optional > .offer-optional-price { flex-shrink: 0; margin-left: auto; white-space: nowrap; }
.offer-optional-price small { font-weight: 500; color: var(--c-text-faint); }
.offer-coverage-note.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* "Por que outras tabelas não aparecem": diagnóstico, fechado por padrão. */
.sale-skipped > summary { cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--c-text-soft); }
.sale-skipped ul { margin: 6px 0 0; padding-left: 18px; }

/* O total no rodapé do passo — só no celular, onde o resumo some. */
.sale-total { display: none; font-size: .8rem; color: var(--c-text-soft); }
.sale-total strong { color: var(--c-text); font-family: var(--font-mono); }

/* --------------------------------------------------------------------------
   A venda pelo celular (07/11/2026) — Nova proposta, Nova cotação.
   Pedido: celular primeiro (360–414 px), menos texto, o botão de seguir
   sempre à vista. Escopo `.sale-flow`, para não mexer nas outras telas.
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    /* Os passos: uma linha de progresso (eram quatro cartões em 2×2, um quarto da tela). */
    .sale-flow .wizard-rail { flex-wrap: nowrap; gap: 4px; }
    .sale-flow .wizard-step {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        gap: 4px;
        padding: 4px 2px;
        border: 0;
        background: transparent;
        box-shadow: none;
        font-size: .7rem;
        text-align: center;
    }
    .sale-flow .wizard-step.is-current { box-shadow: none; }
    .sale-flow .wizard-step > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .sale-flow .wizard-dot { width: 28px; height: 28px; }

    /* Menos texto: o subtítulo de cada passo e o que é só de computador somem. */
    .sale-flow .card-head { padding: 14px 16px; }
    .sale-flow .card-head p { display: none; }
    .sale-flow .card-body { padding: 16px; }
    .sale-flow .card-body.is-flush { padding: 0; }
    .sale-flow .is-desktop-only { display: none !important; }

    /* O rodapé do passo fica preso embaixo: "Continuar" sempre ao alcance do polegar. */
    .sale-flow .card-foot {
        position: sticky;
        bottom: 0;
        z-index: 5;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(250, 250, 250, .97);
        box-shadow: 0 -8px 18px rgba(12, 12, 12, .06);
    }
    .sale-flow .card-foot > span.faint,
    .sale-flow .card-foot > span.tiny { display: none; }
    .sale-flow .card-foot .btn { min-height: 46px; }
    .sale-flow .card-foot .btn-primary { flex: 1 1 auto; }
    .sale-flow .sale-total { display: block; flex: 1 0 100%; order: -1; }
    .sale-flow .sale-summary { display: none; }

    /* Ofertas e opcionais mais enxutos. */
    .sale-flow .offer-row { padding: 12px 14px; gap: 10px; }
    .sale-flow .offer-coverage { padding: 12px; gap: 10px; }
    .sale-flow .offer-coverage-col { padding: 12px; }
    .sale-flow .offer-optional { padding: 10px; }
}

/* O papel de cada graduação na venda — a tela do Pleno. */
.role-step {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
}
.role-step-num {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: rgba(var(--brand-primary-rgb), .12);
    color: var(--brand-primary);
    font-weight: 700;
    font-size: .82rem;
}
.role-step strong { font-size: .95rem; }
.role-step span:not(.role-step-num) { font-size: .84rem; color: var(--c-text-soft); }

/* Percentual do PLUS e da adesão: arrastar comunica "de 0 a 50" melhor que
   um campo numérico — mas quem já sabe o número digita, então os dois
   convivem na mesma linha. */
.range {
    width: 100%;
    accent-color: var(--brand-primary);
    margin: 8px 0 2px;
}
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row .range { flex: 1; min-width: 0; }
.range-num { display: flex; align-items: center; gap: 6px; flex: none; }
.range-num .input { width: 84px; text-align: right; }
.range-num > span { color: var(--c-text-soft); font-weight: 600; }

.rule { border: 0; border-top: 1px solid var(--brand-line); margin: 4px 0; }

/* --------------------------------------------------------------------------
   Jornada de credenciamento (S24) — formulário de intenção, triagem, entrevista.
   -------------------------------------------------------------------------- */

/* O formulário público. Herda o painel escuro do onboarding. */
.intent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.intent-grid .span-2 { grid-column: 1 / -1; }

/* ------------------------------------------------------------------
   O formulario publico: uma pergunta por vez.

   A lista inteira numa pagina so mostrava de cara 11 perguntas e 40
   respostas. Uma parede dessas convida a abandonar antes de comecar,
   ou a responder no automatico para chegar ao fim — e a nota so vale
   alguma coisa se as respostas forem pensadas.
   ------------------------------------------------------------------ */

.iw { max-width: 760px; margin: 0 auto; }

/* A barra e o unico lugar onde o candidato ve quanto falta. Sem ela,
   "uma por vez" vira um corredor sem fim. */
.iw-bar {
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .09);
    overflow: hidden;
}

.iw-bar span {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(var(--brand-primary-rgb), .5), var(--brand-primary));
    transition: width .5s cubic-bezier(.22, 1, .36, 1);
}

.iw-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 13px 2px 20px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .4);
}

.iw-head-count b { color: var(--brand-primary); font-size: .84rem; }

/* Altura minima para o painel nao mudar de tamanho entre uma pergunta
   de duas linhas e outra de quatro opcoes longas: o passo trocando de
   altura a cada clique faz o botao fugir de baixo do cursor. */
.iw-step { min-height: 316px; }
.iw-step.is-in { animation: iwIn .42s cubic-bezier(.22, 1, .36, 1) both; }

@keyframes iwIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: none; }
}

.iw-title { font-size: 1.9rem; letter-spacing: -.03em; }
.iw-intro { margin-top: 10px; max-width: 56ch; font-size: .95rem; color: rgba(255, 255, 255, .58); }

.iw-eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

.iw-eyebrow svg { width: 12px; height: 12px; }
.iw-step.is-gate .iw-eyebrow { color: rgba(255, 255, 255, .7); }

.iw-q { display: flex; align-items: flex-start; gap: 14px; }

.iw-q-num {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(var(--brand-primary-rgb), .18);
    color: var(--brand-primary);
    font-size: .85rem;
    font-weight: 700;
}

.iw-q-num svg { width: 14px; height: 14px; }
.iw-step.is-gate .iw-q-num { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .9); }

.iw-q-label { font-size: 1.4rem; font-weight: 600; line-height: 1.35; letter-spacing: -.02em; }
.iw-q-hint { margin: 11px 0 0 46px; font-size: .86rem; color: rgba(255, 255, 255, .5); }

.iw-choices { display: flex; flex-direction: column; gap: 10px; margin: 24px 0 0 46px; }

.iw-choice {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 17px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .86);
    font-size: .95rem;
    cursor: pointer;
    transition: border-color .18s, background .18s, transform .18s;
}

.iw-choice:hover { border-color: rgba(var(--brand-primary-rgb), .55); transform: translateX(3px); }

/* O controle nativo sai de cena: quem marca o estado sao a borda e o
   .iw-choice-mark. Continua sendo um input de verdade — teclado, leitor
   de tela e o POST nao mudam. */
.iw-choice input { appearance: none; width: 0; height: 0; margin: 0; opacity: 0; }

.iw-choice-mark {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: var(--radius-full);
    color: transparent;
    transition: background .18s, border-color .18s, color .18s;
}

.iw-choice-mark svg { width: 13px; height: 13px; }
.iw-choice-text { flex: 1; }

.iw-choice-key {
    flex-shrink: 0;
    padding: 2px 7px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 5px;
    background: rgba(255, 255, 255, .05);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .7rem;
    color: rgba(255, 255, 255, .38);
}

.iw-choice:has(input:checked) {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), .14);
    color: #fff;
}

.iw-choice:has(input:checked) .iw-choice-mark {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.iw-choice:has(input:focus-visible) { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

.iw-text { width: calc(100% - 46px); margin: 24px 0 0 46px; }

.iw-error { margin-top: 20px; font-size: .87rem; color: var(--c-danger); }

.iw-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.iw-nav-end { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.iw-nav .btn svg { width: 15px; height: 15px; }
.iw-legal { max-width: 30ch; font-size: .78rem; color: rgba(255, 255, 255, .42); }
.iw-foot { margin-top: 20px; text-align: center; font-size: .8rem; color: rgba(255, 255, 255, .34); }

@media (max-width: 780px) {
    .iw-step { min-height: 0; }
    .iw-title { font-size: 1.5rem; }
    .iw-q-label { font-size: 1.16rem; }
    .iw-q-hint,
    .iw-choices { margin-left: 0; }
    .iw-text { width: 100%; margin-left: 0; }
    .iw-choice-key { display: none; }
    .iw-nav { flex-wrap: wrap; }
    .iw-nav-end { flex-direction: column-reverse; align-items: stretch; width: 100%; }
    .iw-nav-end .btn { width: 100%; }
    .iw-legal { max-width: none; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .iw-step.is-in { animation: none; }
    .iw-bar span { transition: none; }
    .iw-choice:hover { transform: none; }
}

/* A jornada que o candidato vê depois de enviar. */
.apply-path { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.apply-path-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 0;
    color: rgba(255, 255, 255, .42);
}
.apply-path-step strong { display: block; color: rgba(255, 255, 255, .62); font-size: .94rem; }
.apply-path-step span { font-size: .83rem; }
.apply-path-step.is-done strong,
.apply-path-step.is-current strong { color: #fff; }
.apply-path-step.is-current span { color: rgba(255, 255, 255, .7); }
.apply-path-dot {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, .08);
    font-size: .78rem;
    font-weight: 700;
}
.apply-path-dot svg { width: 15px; height: 15px; }
.apply-path-step.is-done .apply-path-dot { background: var(--c-success); color: #fff; }
.apply-path-step.is-current .apply-path-dot { background: var(--brand-primary); color: #fff; }

/* O mapa de calor da triagem.

   Cor é mais rápida que número numa fila de dezenas: o diretor precisa saber
   onde olhar primeiro sem ler nota por nota. A cor não decide nada — quem
   decide é a nota de corte. */
.heat { display: inline-flex; flex-direction: column; gap: 5px; min-width: 84px; }
.heat strong { font-size: .95rem; font-family: var(--font-mono); line-height: 1; }
.heat strong small { font-size: .72rem; color: var(--c-text-faint); font-weight: 400; }
.heat-bar { display: block; height: 5px; border-radius: var(--radius-full); background: var(--brand-line); }
.heat-bar > span { display: block; height: 100%; border-radius: var(--radius-full); }
.heat-quente strong { color: #D9480F; }
.heat-quente .heat-bar > span { background: linear-gradient(90deg, #FB4516, #F2B705); }
.heat-morno strong { color: #B7791F; }
.heat-morno .heat-bar > span { background: #F2B705; }
.heat-frio strong { color: var(--c-text-soft); }
.heat-frio .heat-bar > span { background: #93A5B1; }

/* As opções de uma pergunta, na tela do admin. */
.option-list { display: flex; flex-direction: column; gap: 6px; }
.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    background: var(--c-white);
}
.option-row > span:first-child { flex: 1; font-size: .9rem; }

/* --------------------------------------------------------------------------
   Ilustração do veículo na proposta (S24) — uma por tipo, em /admin/marca.

   A prévia tem fundo escuro porque é assim que a imagem aparece no cartão:
   testar sobre branco esconderia que o PNG não tem fundo transparente.
   -------------------------------------------------------------------------- */
.vehicle-art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}
.vehicle-art {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
}
.vehicle-art > strong { font-size: .88rem; }
.vehicle-art-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: linear-gradient(170deg, #16161a 0%, #0b0b0d 100%);
    text-align: center;
}
.vehicle-art-preview img { max-width: 100%; max-height: 100%; }
.vehicle-art-preview.is-empty { border: 1px dashed rgba(255, 255, 255, .18); }
.vehicle-art-preview .faint { color: rgba(255, 255, 255, .45); }

/* Os logotipos de montadora cadastrados. A previa e BRANCA, nao escura como a
   da ilustracao: no cartao eles ficam sobre uma placa branca, e mostra-los
   aqui sobre fundo preto esconderia justamente o erro que a tela precisa
   deixar obvio — o de subir a versao clara da marca. */
.brand-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    text-align: center;
}

.brand-logo > strong { font-size: .84rem; }

.brand-logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 76px;
    padding: 10px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    background: #fff;
}

.brand-logo-preview img { max-width: 100%; max-height: 100%; }


/* ==================================================================== */
/*  Ajustes de operação (S27)                                           */
/* ==================================================================== */

/* --------------------------------------------------------------------
   Graduação em pílula.

   `.badge-level` pinta o fundo com a cor do nível e escrevia sempre em
   branco. A régua vai do branco (Pleno) ao preto (Diretor): no Pleno o
   texto branco sumia sobre o fundo branco, e a própria pílula sumia no
   cartão. A tinta é decidida por `belt_ink()` no template; aqui fica o
   contorno, que resolve o segundo problema para qualquer cor clara.
   -------------------------------------------------------------------- */
.badge-level {
    color: #fff;
    border: 1px solid rgba(12, 12, 12, .16);
}

/* --------------------------------------------------------------------
   Assistentes dentro do painel.

   `.size-option`, `.accept-box` e `.plan-card` nasceram para o fundo
   escuro da venda pública (`.panel-dark`) — texto branco. O cotador do
   CRM já tinha o remendo escopado; faltavam os assistentes de "Nova
   cotação" e "Nova proposta", onde os botões de Pessoa física/jurídica
   e os cartões do passo 4 ficavam brancos no branco. `.app-content` é
   a área do painel: a venda pública não passa por ela.
   -------------------------------------------------------------------- */
.app-content .size-option {
    border: 1px solid var(--brand-line);
    background: var(--c-white);
    color: var(--c-text);
}
.app-content .size-option:hover { border-color: var(--c-text-faint); }
.app-content .size-option.is-selected {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), .08);
    color: var(--c-text);
}

.app-content .accept-box {
    border: 1px solid var(--brand-line);
    background: var(--c-white);
    color: var(--c-text);
}
.app-content .accept-box:hover { border-color: var(--c-text-faint); }

.app-content .plan-card {
    border: 1px solid var(--brand-line);
    background: var(--c-white);
    color: var(--c-text);
}
.app-content .plan-card:hover { border-color: var(--c-text-faint); }
.app-content .plan-card.is-selected {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), .06);
    color: var(--c-text);
}
.app-content .plan-card-price { color: var(--c-text-soft); }
.app-content .plan-card-price strong { color: var(--c-text); }
.app-content .plan-card-join { color: var(--c-text-soft); }
.app-content .plan-card-benefits { border-top-color: var(--brand-line); }
.app-content .plan-card-benefits li { color: var(--c-text-soft); }

/* A caixa do kit e a lista de fechadores também vinham do wizard escuro.
   O `span` precisa de regra própria: `.kit-list-item span` (a original) é mais
   específica que `.kit-list-item`, e sem isto o nome do Sênior continuava
   branco no branco — que foi exatamente o que sobrou na primeira passada. */
.app-content .kit-list { border-top-color: var(--brand-line); }
.app-content .kit-list-item { color: var(--c-text); }
.app-content .kit-list-item span { color: var(--c-text-soft); }
.app-content .kit-list-item strong { color: var(--c-text); }
.app-content .kit-list-item .faint { color: var(--c-text-faint); }
.app-content .kit-list-item .badge { background: #EFF0F1; color: var(--c-text-soft); }
.app-content .legal-note {
    background: var(--brand-surface);
    border-color: var(--brand-line);
    color: var(--c-text-soft);
}

/* --------------------------------------------------------------------
   Meus Ganhos: o total e a repartição.
   -------------------------------------------------------------------- */
.earnings-hero-top {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
}

.earnings-total {
    margin-top: 6px;
    font-size: clamp(2.1rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.05;
    font-family: var(--font-mono);
}

.earnings-hero-side {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.earnings-hero-side strong { display: block; font-size: 1.2rem; }

/* Uma barra só: própria x estrutura é uma comparação de duas partes de um
   inteiro, e duas barras separadas obrigavam a comparar comprimentos que
   não começam no mesmo ponto. */
.split-bar {
    display: flex;
    height: 12px;
    margin-top: 22px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--brand-surface);
}
.split-bar-own { background: var(--brand-primary); }
.split-bar-net { background: var(--c-info); }

.split-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 10px;
    font-size: .82rem;
    color: var(--c-text-soft);
}
.split-legend strong { color: var(--c-text); font-family: var(--font-mono); }
.split-legend .dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: var(--radius-full);
}
.dot-own { background: var(--brand-primary); }
.dot-net { background: var(--c-info); }

/* --------------------------------------------------------------------
   Meus Ganhos: navegação de mês, comparação e gráfico mês a mês.

   O mês é o título do bloco do total — antes ele morava num seletor na barra
   de cima, e no dia 1º a tela abria zerada sem dizer onde estava o mês fechado.
   -------------------------------------------------------------------- */
.period-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.period-nav-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-full);
    background: var(--c-white);
    color: var(--c-text);
    transition: border-color .16s var(--ease), background .16s var(--ease);
}
.period-nav-btn svg { width: 18px; height: 18px; }
a.period-nav-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary-dark); }
.period-nav-btn.is-disabled { opacity: .35; cursor: default; }

.period-nav-title {
    display: flex;
    align-items: center;
    gap: 4px 10px;
    flex-wrap: wrap;
    flex: 1 1 0;
    min-width: 0;
}
.period-nav-title strong {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.01em;
}
.period-nav-title strong span { font-weight: 500; color: var(--c-text-faint); }

.period-nav-today { flex-shrink: 0; }

/* A comparação com o mês anterior: um selo, e o selo é o atalho para ele. */
.trend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    background: #EFF0F1;
    color: var(--c-text-soft);
    transition: filter .16s var(--ease);
}
.trend-chip:hover { filter: brightness(.96); }
.trend-chip svg { width: 14px; height: 14px; }
.trend-chip.is-up { background: var(--c-success-bg); color: #047857; }
.trend-chip.is-down { background: var(--c-danger-bg); color: #B91C1C; }

/* O gráfico: uma coluna por mês, rolável na horizontal no celular. A rolagem
   é do próprio gráfico, nunca da página (a tela tem de caber em 360px). */
.month-chart {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(58px, 1fr);
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.month-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px 6px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
    scroll-snap-align: center;
    transition: background .16s var(--ease), border-color .16s var(--ease);
}
.month-col:hover { background: var(--brand-surface); }
.month-col.is-selected {
    background: rgba(var(--brand-primary-rgb), .08);
    border-color: rgba(var(--brand-primary-rgb), .45);
}

.month-col-value {
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
    font-family: var(--font-mono);
}
.month-col.is-empty .month-col-value { color: var(--c-text-faint); font-weight: 500; }

.month-col-bar {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    max-width: 34px;
    height: 120px;
    border-radius: 6px 6px 3px 3px;
    background: var(--brand-surface);
    overflow: hidden;
}
.month-col-own { background: var(--brand-primary); }
.month-col-net { background: var(--c-info); }
.month-col.is-now .month-col-bar { outline: 1px dashed var(--c-text-faint); outline-offset: 2px; }

.month-col-label {
    font-size: .78rem;
    font-weight: 600;
    text-transform: capitalize;
}
.month-col.is-selected .month-col-label { color: var(--brand-primary-dark); }
.month-col-year {
    min-height: 1em;
    font-size: .66rem;
    line-height: 1;
    color: var(--c-text-faint);
}

.month-chart-total { text-align: right; }
.month-chart-total strong { display: block; font-size: 1.1rem; }

@media (max-width: 600px) {
    .period-nav-today { width: 100%; justify-content: center; }
    /* O mês já se navega no corpo da tela; o seletor da barra só tirava o lugar do título. */
    .period-select { display: none; }
    .month-chart { grid-auto-columns: 62px; }
    .month-chart-total { text-align: left; }
}

/* --------------------------------------------------------------------
   Tipos de comissão: cartões clicáveis que abrem o extrato filtrado.
   -------------------------------------------------------------------- */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.type-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
    color: inherit;
    text-decoration: none;
    transition: border-color .16s var(--ease), transform .12s var(--ease),
                box-shadow .16s var(--ease);
}
.type-card:hover {
    border-color: var(--tipo, var(--brand-primary));
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.type-card-head { display: flex; align-items: center; gap: 8px; }
.type-card-head strong { font-size: .88rem; flex: 1; min-width: 0; }
.type-card-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--tipo) 14%, transparent);
    color: var(--tipo);
}
.type-card-icon svg { width: 15px; height: 15px; }
.type-card-share { font-size: .72rem; color: var(--c-text-faint); }
.type-card-value { font-size: 1.25rem; font-weight: 700; }
.type-card-foot { font-size: .72rem; color: var(--c-text-faint); }

/* --------------------------------------------------------------------
   Árvore da estrutura comercial: a linha de conexão com o pai.

   Sem ela, um nó indentado no meio de uma lista longa não diz de quem é
   filho — que era metade da queixa de "encavalando".
   -------------------------------------------------------------------- */
.tree-node { position: relative; }
.tree-node.is-child::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 0;
    bottom: 50%;
    width: 1px;
    background: var(--brand-line);
}
.tree-node.is-child::after {
    content: '';
    position: absolute;
    left: -14px;
    top: 50%;
    width: 12px;
    height: 1px;
    background: var(--brand-line);
}
.tree-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}
.tree-count { font-size: .78rem; color: var(--c-text-faint); }

/* Campo preenchido pelo sistema: parece campo, mas não se digita nele. */
.input.is-readonly {
    display: block;
    background: var(--brand-surface);
    color: var(--c-text-soft);
    cursor: default;
    margin: 0;
}

/* --------------------------------------------------------------------
   Conferência de documentos: a tela que decide se a vistoria nasce.

   O desenho anterior empilhava quatro blocos de mesmo peso — um alerta, os
   arquivos, uma tabela de quinze linhas e um cartão só para o botão. Tudo
   pedia a mesma atenção e nada dizia por onde começar. Aqui a hierarquia é
   explícita: um bloco de estado no topo (o que falta), duas etapas
   numeradas, e a confirmação numa barra fixa que acompanha a rolagem.
   -------------------------------------------------------------------- */

/* ---- O estado: uma frase, um ícone e o que ainda falta ---- */

.dr-hero {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    border: 1px solid var(--brand-line);
    border-left-width: 4px;
    border-radius: var(--radius-lg);
    background: var(--c-white);
    box-shadow: var(--shadow-sm);
}

.dr-hero h2 { font-size: 1.05rem; }
.dr-hero p { margin-top: 4px; font-size: .84rem; color: var(--c-text-soft); }

.dr-hero-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
}

.dr-hero-icon svg { width: 20px; height: 20px; }

.dr-hero.is-waiting { border-left-color: var(--c-warning); }
.dr-hero.is-waiting .dr-hero-icon { background: var(--c-warning-bg); color: #B45309; }
.dr-hero.is-ready { border-left-color: var(--brand-primary); }
.dr-hero.is-ready .dr-hero-icon { background: rgba(var(--brand-primary-rgb), .12); color: var(--brand-primary-dark); }
.dr-hero.is-done { border-left-color: var(--c-success); }
.dr-hero.is-done .dr-hero-icon { background: var(--c-success-bg); color: #047857; }
.dr-hero.is-idle { border-left-color: var(--c-info); }
.dr-hero.is-idle .dr-hero-icon { background: var(--c-info-bg); color: #1D4ED8; }

/*
 * As pendências são frases de ação ("ligue para o cliente e peça a CNH"), não
 * rótulos. O ponto âmbar diz quantas são antes de elas serem lidas.
 */
.dr-todo { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }

.dr-todo li {
    position: relative;
    padding-left: 18px;
    font-size: .82rem;
    color: var(--c-text);
}

.dr-todo li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: .55em;
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--c-warning);
}

/* O número da etapa dentro do título do cartão. */
.dr-step {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-right: 7px;
    border-radius: var(--radius-full);
    background: var(--brand-ink);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    vertical-align: 1px;
}

/* ---- Etapa 1: os arquivos, um cartão por documento ---- */

.dr-docs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 16px;
}

.dr-doc {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    padding: 16px;
    border: 1px solid var(--brand-line);
    border-top-width: 3px;
    border-radius: var(--radius);
    background: var(--c-white);
}

/* O estado do documento pinta a borda de cima: dá para varrer os dois cartões
   sem ler os selos. */
.dr-doc.is-accepted { border-top-color: var(--c-success); }
.dr-doc.is-pending { border-top-color: var(--c-warning); }
.dr-doc.is-rejected,
.dr-doc.is-missing { border-top-color: var(--c-danger); }

.dr-doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dr-doc-head strong { font-size: .95rem; }
.dr-doc-head p { margin-top: 3px; font-size: .74rem; color: var(--c-text-faint); }

.dr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 22px 16px;
    text-align: center;
    border: 1px dashed var(--brand-line);
    border-radius: var(--radius-sm);
    background: var(--brand-surface);
}

.dr-empty svg { width: 26px; height: 26px; color: var(--c-text-faint); margin-bottom: 4px; }
.dr-empty p { margin: 0; }

.dr-file { display: flex; flex-direction: column; gap: 10px; }
.dr-file + .dr-file { padding-top: 12px; border-top: 1px solid var(--brand-line); }

/*
 * A prévia é um retrato, não o documento: serve para saber se a foto está
 * inteira e legível. Quem precisa ler o chassi clica e abre em outra aba, ao
 * lado dos campos — que é como se confere de verdade.
 */
.dr-thumb {
    position: relative;
    display: grid;
    place-items: center;
    height: 210px;
    overflow: hidden;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    background: var(--brand-surface);
}

/* `contain`: a pergunta é "a foto está inteira?" — recortar as bordas escondia a resposta. */
.dr-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s var(--ease); }
.dr-thumb:hover img { transform: scale(1.03); }

/* A 1ª página do PDF (07/11/2026): o visualizador desenha no dobro e a caixa reduz
   à metade — cabe a largura da página e o topo, onde a CNH e o CRLV têm os dados. */
.dr-thumb-pdf { position: absolute; inset: 0; overflow: hidden; background: var(--c-white); }

.dr-thumb-pdf iframe {
    width: 200%;
    height: 200%;
    border: 0;
    transform: scale(.5);
    transform-origin: 0 0;
    pointer-events: none;
}

/* Quem responde ao clique é esta camada, por cima da prévia (o ícone é o `.pa-thumb-zoom`). */
.dr-thumb-hit {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: zoom-in;
    transition: background .15s var(--ease);
}

.dr-thumb-hit:hover { background: rgba(12, 12, 12, .1); }
.dr-thumb-hit:hover .pa-thumb-zoom,
.dr-thumb-hit:focus-visible .pa-thumb-zoom { opacity: 1; transform: none; }

.dr-thumb-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: .76rem;
    font-weight: 600;
    color: var(--c-text-soft);
}

.dr-thumb-file svg { width: 24px; height: 24px; }

.dr-file-body { min-width: 0; }
.dr-file-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dr-file-actions form { display: contents; }

/* O motivo da recusa é o que o cliente vai ouvir — fica citado, não escondido. */
.dr-reason {
    margin-top: 8px;
    padding: 7px 11px;
    border-left: 3px solid var(--c-danger);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--c-danger-bg);
    font-size: .78rem;
    color: #991B1B;
}

.dr-reject {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--brand-surface);
}

.dr-reject > .btn { align-self: flex-start; }

/*
 * O rodapé do cartão desce sozinho: com margin-top auto os dois cartões
 * terminam na mesma linha mesmo quando um tem prévia e o outro está vazio.
 */
.dr-doc-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--brand-line);
}

.dr-notes { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.dr-notes p { font-size: .74rem; color: var(--c-text-faint); }

.dr-extras { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--brand-line); }
.dr-extras > summary { cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--c-text-soft); }
.dr-extras > summary:hover { color: var(--c-text); }

/*
 * Documentos da proposta — `partials/proposal-attachments` (07/11/2026).
 *
 * Um documento, um estado: sem arquivo é uma área de envio (que aceita
 * arrastar); com arquivo é a miniatura, "Ver" e "Reenviar" — o campo de envio
 * some, para ninguém mandar a segunda cópia sem querer. A miniatura é a do
 * próprio arquivo (foto ou primeira página do PDF) e abre a prévia grande no
 * `<dialog>` `.pa-viewer`.
 */
.pa-list { display: flex; flex-direction: column; }

.pa-doc {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 0;
    border-top: 1px solid var(--brand-line);
    transition: background .15s var(--ease);
}

.pa-doc:first-child { padding-top: 0; border-top: 0; }
.pa-doc:last-child { padding-bottom: 4px; }

.pa-doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pa-doc-title { min-width: 0; }
.pa-doc-name { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.pa-doc-name strong { font-size: .95rem; }

.pa-doc-tag {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--c-text-faint);
    white-space: nowrap;
}

.pa-doc-hint { margin-top: 2px; font-size: .78rem; color: var(--c-text-faint); }
.pa-doc-head .badge { flex: none; }

/* Sem arquivo: a área inteira é o botão. */
.pa-drop {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border: 1.5px dashed #cfcfcf;
    border-radius: var(--radius);
    background: var(--brand-surface);
    text-align: left;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}

.pa-drop:hover:not(:disabled),
.pa-doc.is-drag .pa-drop {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb), .05);
}

.pa-drop:disabled { cursor: not-allowed; }
.pa-drop:disabled:not(.is-busy) { opacity: .55; }
.pa-drop.is-busy { cursor: progress; }

.pa-drop-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: var(--c-white);
    color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.pa-drop-icon svg { width: 22px; height: 22px; }
.pa-drop-text { display: flex; flex-direction: column; min-width: 0; }
.pa-drop-text strong { font-size: .88rem; color: var(--c-text); }
.pa-drop-text span { font-size: .75rem; color: var(--c-text-faint); }

.pa-spinner {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(var(--brand-primary-rgb), .25);
    border-top-color: var(--brand-primary);
    border-radius: var(--radius-full);
    animation: pa-spin .8s linear infinite;
}

@keyframes pa-spin { to { transform: rotate(360deg); } }

/* Com arquivo: miniatura à esquerda, nome e ações à direita. */
.pa-file {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
    transition: opacity .15s var(--ease);
}

.pa-file.is-busy { opacity: .6; }
.pa-doc.is-drag .pa-file { border-color: var(--brand-primary); border-style: dashed; }

.pa-thumb {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    overflow: hidden;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    background: var(--brand-surface);
}

.pa-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s var(--ease); }
.pa-thumb:hover img { transform: scale(1.05); }

/* A primeira página do PDF: o visualizador desenha a 420px e a caixa reduz.
   Sem clique nem rolagem — quem responde ao clique é a `.pa-thumb-hit`. */
.pa-thumb-pdf { position: absolute; inset: 0; overflow: hidden; background: var(--c-white); }

.pa-thumb-pdf iframe {
    width: 420px;
    height: 420px;
    border: 0;
    transform: scale(.2);
    transform-origin: 0 0;
    pointer-events: none;
}

.pa-thumb-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--c-text-soft);
}

.pa-thumb-file svg { width: 26px; height: 26px; color: var(--c-text-faint); }

.pa-thumb-hit {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: transparent;
    cursor: zoom-in;
    transition: background .15s var(--ease);
}

.pa-thumb-zoom {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: rgba(12, 12, 12, .62);
    color: #fff;
    opacity: 0;
    transform: scale(.9);
    transition: opacity .15s var(--ease), transform .15s var(--ease);
}

.pa-thumb-zoom svg { width: 16px; height: 16px; }
.pa-thumb-hit:hover { background: rgba(12, 12, 12, .12); }
.pa-thumb-hit:hover .pa-thumb-zoom,
.pa-thumb-hit:focus-visible .pa-thumb-zoom { opacity: 1; transform: none; }

.pa-file-body { flex: 1; min-width: 0; }

.pa-file-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: .86rem;
    font-weight: 600;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-text);
}

.pa-file-name:hover { color: var(--brand-primary); }
.pa-file-meta { margin-top: 1px; font-size: .74rem; color: var(--c-text-faint); }

.pa-file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }

/* Remover é a ação rara: ícone discreto no fim da linha, não um terceiro botão igual aos outros. */
.pa-remove {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-left: auto;
    border-radius: var(--radius-sm);
    color: var(--c-text-faint);
    transition: color .15s var(--ease), background .15s var(--ease);
}

.pa-remove svg { width: 16px; height: 16px; }
.pa-remove:hover:not(:disabled) { color: var(--c-danger); background: var(--c-danger-bg); }
.pa-remove:disabled { opacity: .4; cursor: not-allowed; }

.pa-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: var(--c-danger-bg);
    font-size: .8rem;
    color: #991B1B;
}

.pa-error svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }

/* O que a leitura por IA propôs — logo abaixo do documento lido. */
.pa-read {
    padding: 12px 14px;
    border: 1px solid var(--c-info-bg);
    border-left: 3px solid var(--c-info);
    border-radius: var(--radius-sm);
    background: var(--c-info-bg);
}

.pa-read .pa-remove { margin-left: 0; }
.pa-read-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: .8rem; }
.pa-read-row span { color: var(--c-text-soft); }

.pa-foot {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--brand-line);
    font-size: .74rem;
    color: var(--c-text-faint);
}

/* A prévia grande. O reset global zera a margem — o `auto` é o que centraliza. */
.pa-viewer {
    width: min(980px, 94vw);
    height: min(90vh, 920px);
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--c-white);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.pa-viewer::backdrop { background: rgba(12, 12, 12, .62); }
.pa-viewer-box { display: flex; flex-direction: column; height: 100%; }

.pa-viewer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 12px 20px;
    border-bottom: 1px solid var(--brand-line);
}

.pa-viewer-title { flex: 1; min-width: 0; }
.pa-viewer-title strong { display: block; font-size: .95rem; }

.pa-viewer-title span {
    display: block;
    overflow: hidden;
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-text-faint);
}

.pa-viewer-body {
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: auto;
    background: var(--brand-surface);
}

.pa-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pa-viewer-body iframe { width: 100%; height: 100%; border: 0; }

.pa-viewer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
}

.pa-viewer-empty svg { width: 32px; height: 32px; color: var(--c-text-faint); }

@media (max-width: 640px) {
    .pa-file { align-items: flex-start; }
    .pa-thumb { width: 68px; height: 68px; }
    .pa-thumb-pdf iframe { transform: scale(.162); }
    .pa-viewer { width: 100vw; height: 100dvh; border-radius: 0; }
    .pa-hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .pa-spinner { animation-duration: 2s; }
    .pa-thumb img, .pa-thumb-zoom { transition: none; }
}

/* ---- Etapa 2: os campos, em blocos do tamanho de uma olhada ---- */

.dr-groups { display: flex; flex-direction: column; gap: 24px; }
.dr-group-head { margin-bottom: 10px; }

/* O título do bloco e o rótulo do campo são os dois em versalete nesta casa —
   o que separa um do outro é o peso e a cor, senão viravam a mesma coisa. */
.dr-group-head .section-label {
    margin: 0;
    font-weight: 800;
    letter-spacing: .07em;
    color: var(--c-text);
}

.dr-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(236px, 1fr));
    gap: 8px;
    /* Compensa o respiro interno do campo para o rótulo do bloco e o primeiro
       campo começarem na mesma vertical. */
    margin: 0 -12px;
}

/* Anda junto com `.field`, que já dá a coluna, o respiro e o rótulo em
   versalete. O que este acrescenta é a caixa que a divergência acende. */
.dr-field {
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
}

.dr-field-hint { font-size: .7rem; color: var(--c-text-faint); }

/*
 * Divergência não se esconde: é aqui, e só aqui, que um chassi lido errado
 * ainda custa barato. Âmbar quando os dois valores brigam (alguém precisa
 * decidir); azul quando o campo está vazio (é só copiar).
 */
.dr-field.is-conflict { background: var(--c-warning-bg); border-color: #FDE68A; }
.dr-field.is-fill { background: var(--c-info-bg); border-color: #BFDBFE; }

.dr-ai {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    padding: 5px 6px 5px 8px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    background: var(--c-white);
}

.dr-ai-tag {
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: var(--c-info-bg);
    color: #1D4ED8;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.dr-ai-value { flex: 1; min-width: 0; font-size: .78rem; font-weight: 600; overflow-wrap: anywhere; }

.dr-ai-use {
    flex-shrink: 0;
    padding: 3px 10px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-full);
    background: var(--c-white);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-text-soft);
    transition: background .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease);
}

.dr-ai-use:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.dr-ai-note { font-size: .68rem; color: var(--c-text-soft); }

.dr-ai-ok { display: flex; align-items: center; gap: 4px; font-size: .7rem; color: #047857; }
.dr-ai-ok svg { width: 13px; height: 13px; }

/* ---- A confirmação: fixa no rodapé, nunca fora de alcance ---- */

.dr-bar {
    position: sticky;
    bottom: 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 18px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    background: var(--c-white);
    box-shadow: var(--shadow-lg);
}

.dr-bar-text { display: flex; flex-direction: column; min-width: 0; }
.dr-bar-text strong { font-size: .9rem; }
.dr-bar-warn { margin-top: 2px; font-size: .72rem; font-weight: 700; color: #B45309; }

@media (max-width: 720px) {
    .dr-docs { grid-template-columns: minmax(0, 1fr); }
    .dr-fields { grid-template-columns: minmax(0, 1fr); }
    .dr-hero { padding: 16px; gap: 12px; }
    .dr-bar { flex-direction: column; align-items: stretch; bottom: 0; }
    .dr-bar form, .dr-bar .btn { width: 100%; }
}

/* ------------------------------------------------------------------ */
/* Configurações: as abas (partials/settings-hub) e os blocos de       */
/* formulário (.setting-block).                                        */
/*                                                                     */
/* O menu lateral tem um item só; as oito áreas viram abas aqui. Duas  */
/* fileiras: a ÁREA em cima (sublinhado, com ícone) e a SEÇÃO embaixo  */
/* (pílulas). Cada aba é um link — uma URL por tela.                   */
/* ------------------------------------------------------------------ */

.hub {
    margin-bottom: 20px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.hub-tabs,
.hub-sub {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}
.hub-tabs::-webkit-scrollbar,
.hub-sub::-webkit-scrollbar { display: none; }

.hub-tabs { gap: 2px; padding: 0 10px; }

.hub-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 14px 13px;
    border-bottom: 2px solid transparent;
    font-size: .9rem;
    font-weight: 600;
    color: var(--c-text-soft);
    white-space: nowrap;
    transition: color .16s var(--ease), border-color .16s var(--ease);
}
.hub-tab:hover { color: var(--c-text); }
.hub-tab.is-active { color: var(--brand-primary-dark); border-bottom-color: var(--brand-primary); }
.hub-tab-icon { display: inline-flex; }
.hub-tab-icon svg { width: 17px; height: 17px; }

.hub-sub {
    gap: 6px;
    padding: 10px 14px;
    background: #FAFAFA;
    border-top: 1px solid var(--brand-line);
}

.hub-sub-link {
    padding: 6px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-size: .84rem;
    font-weight: 600;
    color: var(--c-text-soft);
    white-space: nowrap;
    transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.hub-sub-link:hover { background: var(--c-white); color: var(--c-text); }
.hub-sub-link.is-active {
    background: var(--c-white);
    border-color: rgba(var(--brand-primary-rgb), .4);
    color: var(--brand-primary-dark);
    box-shadow: var(--shadow-sm);
}

/*
 * O formulário de uma seção: UM cartão, vários blocos. Cada bloco tem o
 * assunto à esquerda (título + uma frase) e os campos à direita — a tela lê
 * como uma lista de decisões, e o texto de apoio sai de cima dos campos.
 * O rodapé com "Salvar" gruda no pé da janela nas seções longas.
 */
.setting-block {
    display: grid;
    grid-template-columns: minmax(180px, 270px) minmax(0, 1fr);
    gap: 10px 36px;
    padding: 24px;
    border-top: 1px solid var(--brand-line);
}
.setting-block:first-child { border-top: 0; }

.setting-intro h3 { font-size: .95rem; }
.setting-intro p { margin-top: 4px; font-size: .82rem; color: var(--c-text-soft); }
.setting-intro .badge { margin-top: 8px; }

.setting-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    align-content: start;
}
.setting-fields > .is-wide { grid-column: 1 / -1; }
.setting-fields.is-single { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
.setting-fields.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Caixa de marcar dentro de um campo: frase normal, não o rótulo em caixa alta. */
.setting-fields .field > label.check {
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-text);
}

.setting-form > .card-foot {
    position: sticky;
    bottom: 0;
    z-index: 4;
    padding: 14px 24px;
}

/* Uma versão do contrato do consultor: recolhida, com o resumo na linha. */
.version-row { border: 1px solid var(--brand-line); border-radius: var(--radius); background: var(--c-white); }
.version-row > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    padding: 13px 16px;
    cursor: pointer;
    list-style: none;
}
.version-row > summary::-webkit-details-marker { display: none; }
.version-row > summary::before {
    content: '';
    align-self: center;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--c-text-faint);
    border-bottom: 2px solid var(--c-text-faint);
    transform: rotate(-45deg);
    transition: transform .16s var(--ease);
}
.version-row[open] > summary::before { transform: rotate(45deg); }
.version-row[open] > summary { border-bottom: 1px solid var(--brand-line); background: #FAFAFA; border-radius: var(--radius) var(--radius) 0 0; }
.version-row > form { padding: 16px; }

/* Dois cartões pequenos lado a lado (Cadastro + Suporte). */
.setting-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }

@media (max-width: 1100px) {
    .setting-block { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .setting-pair { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .setting-fields.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .hub-tabs { padding: 0 4px; }
    .hub-tab { padding: 13px 10px 11px; }
    .setting-block { padding: 18px 16px; }
    .setting-fields,
    .setting-fields.is-3 { grid-template-columns: minmax(0, 1fr); }
    .setting-form > .card-foot { padding: 12px 16px; }
}

/*
 * Cobranças — o quadro de mensalidades por dia de vencimento.
 *
 * Reaproveita `.stat`, `.seg`, `.badge`, `.btn`, `.field`, `.drawer-*` e `.check`.
 * O que é novo é só o quadro (`.coll-board`), o cartão de cobrança e o miolo da
 * cortina do cliente. Prefixo `coll-` em tudo: o kanban do CRM tem as próprias
 * classes (`.kanban-*`) e as duas famílias não se misturam — cartão de funil e
 * cartão de cobrança têm conteúdo e ritmo diferentes.
 *
 * As colunas dividem a largura igualmente (`--cols` vem da tela) e só rolam na
 * horizontal quando não cabem: três dias ficam lado a lado num notebook; num
 * celular cada coluna ocupa quase a tela e o quadro desliza entre elas.
 */
.coll-ok { color: #047857; }
.coll-bad { color: #B91C1C; }

.coll-period { display: inline-flex; align-items: center; gap: 4px; }
.coll-period form { margin: 0; }
.coll-period-select { min-width: 170px; font-weight: 600; }

.coll-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.coll-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.coll-search svg {
    position: absolute; left: 12px; top: 50%; width: 16px; height: 16px;
    transform: translateY(-50%); color: var(--c-text-faint); pointer-events: none;
}
.coll-search .input { padding-left: 36px; }

.coll-board {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), minmax(300px, 1fr));
    gap: 16px;
    align-items: start;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
}

.coll-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; scroll-snap-align: start; }

.coll-col-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-top: 3px solid var(--brand-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.coll-col-title { display: flex; align-items: center; gap: 12px; }

.coll-day {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(var(--brand-primary-rgb), .1);
    color: var(--brand-primary-dark);
    line-height: 1;
}
.coll-day small { font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.coll-day strong { font-size: 1.45rem; letter-spacing: -.02em; margin-top: -6px; }

.coll-count { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.coll-count strong { font-size: 1.1rem; letter-spacing: -.01em; }
.coll-of { font-size: .8rem; color: var(--c-text-soft); }

.coll-progress { display: flex; height: 8px; border-radius: var(--radius-full); background: #EDEDED; overflow: hidden; }
.coll-progress > span { background: var(--c-success); border-radius: var(--radius-full); transition: width .5s var(--ease); }

.coll-money { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--c-text-soft); }

.coll-filter { display: flex; width: 100%; gap: 2px; padding: 3px; }
.coll-filter .seg-btn {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    font-size: .74rem;
}
.coll-filter .seg-btn em {
    font-style: normal;
    font-size: .68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: rgba(12, 12, 12, .06);
    color: var(--c-text-soft);
}
.coll-filter .seg-btn.is-active em { background: rgba(var(--brand-primary-rgb), .14); color: var(--brand-primary-dark); }

.coll-cards { display: flex; flex-direction: column; gap: 8px; }

.coll-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 12px 12px 10px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-left: 4px solid var(--brand-line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: box-shadow .18s var(--ease), transform .18s var(--ease), border-color .18s var(--ease);
}
.coll-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.coll-card:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.coll-card.is-overdue { border-left-color: var(--c-danger); }
.coll-card.is-due_today { border-left-color: var(--c-warning); }
.coll-card.is-pending { border-left-color: var(--c-info); }
.coll-card.is-paid { border-left-color: var(--c-success); background: #FBFEFC; }

.coll-card-top { display: flex; align-items: center; gap: 10px; }
.coll-avatar {
    display: grid; place-items: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: var(--radius-full);
    background: var(--c-text); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.coll-card.is-paid .coll-avatar { background: #047857; }
.coll-card.is-overdue .coll-avatar { background: #B91C1C; }

/* `min-width: 0` na coluna flex: sem ele o nome comprido empurra o valor para fora do cartão. */
.coll-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.coll-who strong { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-who > span { font-size: .76rem; color: var(--c-text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-amount { font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.coll-card-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.coll-when { font-size: .76rem; color: var(--c-text-soft); }

.coll-flags { display: flex; flex-wrap: wrap; gap: 5px; }
.coll-flag {
    font-size: .68rem; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full);
    background: var(--brand-surface); color: var(--c-text-soft);
}
.coll-flag.is-warn { background: var(--c-warning-bg); color: #92400E; }
.coll-flag.is-contact { background: var(--c-info-bg); color: #1D4ED8; }

.coll-card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding-top: 9px; border-top: 1px solid var(--brand-line);
}
.coll-method { font-size: .76rem; color: var(--c-text-soft); }
.coll-more {
    margin-left: auto; display: inline-flex; align-items: center; gap: 2px;
    font-size: .74rem; color: var(--c-text-faint); font-weight: 600;
}
.coll-more svg { width: 14px; height: 14px; }
.coll-card:hover .coll-more { color: var(--brand-primary-dark); }

/* O botão de cobrar: verde do WhatsApp de propósito — é a cor que o admin já reconhece. */
.coll-wa {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: 0; border-radius: var(--radius-full);
    background: #25D366; color: #063B1D; font: inherit; font-size: .78rem; font-weight: 700;
    cursor: pointer; transition: background .16s var(--ease), transform .16s var(--ease);
}
.coll-wa svg { width: 16px; height: 16px; }
.coll-wa:hover:not(:disabled) { background: #1EBE5A; transform: translateY(-1px); }
.coll-wa:disabled { background: #E4E6EA; color: var(--c-text-faint); cursor: not-allowed; }
.coll-wa.is-sm { padding: 3px 10px; font-size: .74rem; }
.coll-wa.is-sm svg { width: 14px; height: 14px; }

.coll-empty {
    padding: 22px 14px; text-align: center; font-size: .82rem; color: var(--c-text-soft);
    border: 1px dashed var(--brand-line); border-radius: var(--radius-lg);
}

/* ---- Cortina do cliente ---- */
.coll-drawer.drawer-panel { width: max(var(--drawer-width), 600px); }

.coll-block {
    display: flex; flex-direction: column; gap: 14px; padding: 16px;
    background: var(--c-white); border: 1px solid var(--brand-line); border-radius: var(--radius-lg);
}
.coll-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.coll-block-head h3 { margin: 0; font-size: 1rem; }

.coll-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.coll-facts p { margin: 3px 0 0; }
.coll-links { display: flex; gap: 8px; flex-wrap: wrap; }

.coll-tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.coll-tally > div {
    display: flex; flex-direction: column; gap: 2px; padding: 12px 14px;
    background: var(--brand-surface); border-radius: var(--radius);
}
.coll-tally strong { font-size: 1.15rem; letter-spacing: -.01em; }
.coll-tally small { color: var(--c-text-soft); font-size: .74rem; }

.coll-waive { background: var(--c-warning-bg); border-color: #FDE68A; }
.coll-waive-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.coll-waive-head p { margin: 4px 0 0; }

.coll-alert { padding: 12px 14px; border-radius: var(--radius); font-size: .88rem; }
.coll-alert.is-error { background: var(--c-danger-bg); color: #B91C1C; }
.coll-alert.is-warn { background: var(--c-warning-bg); color: #92400E; font-size: .82rem; line-height: 1.45; }
.coll-alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.coll-inv-actions .btn.text-danger { color: var(--c-danger); }

.coll-invoices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.coll-inv {
    display: flex; flex-direction: column; gap: 10px; padding: 12px 14px;
    background: var(--c-white); border: 1px solid var(--brand-line); border-radius: var(--radius);
}
.coll-inv.is-focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), .1); }
.coll-inv-row { display: flex; align-items: center; gap: 12px; }
.coll-dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-line); }
.coll-inv.is-paid .coll-dot { background: var(--c-success); }
.coll-inv.is-overdue .coll-dot { background: var(--c-danger); }
.coll-inv.is-due_today .coll-dot { background: var(--c-warning); }
.coll-inv.is-pending .coll-dot { background: var(--c-info); }
.coll-inv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.coll-inv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-variant-numeric: tabular-nums; }
.coll-inv-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.coll-inv-actions .btn.is-on { background: rgba(var(--brand-primary-rgb), .1); color: var(--brand-primary-dark); }
.coll-inv-actions .coll-wa { margin-left: auto; }
.coll-inv-note { margin: 0; }

.coll-form {
    display: flex; flex-direction: column; gap: 12px;
}
.coll-panel {
    padding: 14px; background: var(--brand-surface); border-radius: var(--radius);
    animation: fade-up .25s var(--ease) both;
}
.coll-form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.coll-mode { display: flex; width: 100%; }
.coll-mode .seg-btn { flex: 1; padding: 7px 4px; font-size: .82rem; }
.coll-value-row { display: flex; align-items: flex-end; gap: 10px; }
.coll-value-row .field { flex: 1; margin: 0; }
.coll-unit .seg-btn { padding: 8px 14px; }

.coll-preview {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 10px 12px; background: var(--c-white); border: 1px dashed var(--brand-line);
    border-radius: var(--radius-sm); font-size: .86rem;
}
.coll-delta { margin-left: auto; font-weight: 700; font-size: .82rem; }
.coll-delta.is-down { color: #047857; }
.coll-delta.is-up { color: #B91C1C; }

/*
 * Cobrança unificada (partials/unified-billing + assets/js/unified-billing.js):
 * a cortina de Cobranças e a ficha do associado. Uma linha por placa com a
 * caixa de marcar — a linha inteira é clicável e marcada fica na cor da marca —,
 * os dias de vencimento num `.seg` e o rodapé com a soma e o botão.
 */
.ubc-body { display: flex; flex-direction: column; gap: 14px; }
.ubc-body p { margin: 0; }
.ubc-list { display: flex; flex-direction: column; gap: 8px; }
.ubc-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ubc-list-head .field-label { margin: 0; }
.ubc-plates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ubc-plate {
    display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 12px;
    border: 1px solid var(--brand-line); border-radius: var(--radius); background: var(--c-white);
    font-size: .88rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--c-text);
    cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease);
}
.ubc-plate:hover { border-color: var(--c-text-faint); }
.ubc-plate.is-on { border-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .06); }
.ubc-plate.is-locked { cursor: default; background: var(--brand-surface); }
.ubc-plate.is-locked:hover { border-color: var(--brand-line); }
.ubc-plate input[type="checkbox"] {
    flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--brand-primary); cursor: inherit;
}
.ubc-plate-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ubc-plate-id { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ubc-plate-id .faint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubc-plate-note { color: var(--c-text-soft); }
.ubc-plate-side {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* O dia de vencimento na frente da placa (e de cada cobrança por dia). */
.ubc-day-tag {
    flex: none; min-width: 58px; padding: 3px 8px; text-align: center;
    border: 1px solid var(--brand-line); border-radius: var(--radius-full); background: var(--brand-surface);
    color: var(--c-text-soft); font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ubc-day-tag.is-unified {
    border-color: rgba(var(--brand-primary-rgb), .35); background: rgba(var(--brand-primary-rgb), .08);
    color: var(--brand-primary-dark);
}
/* Selecionar: Todas · Dia 05 · Dia 15 · Dia 25 · Nenhuma */
.ubc-quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ubc-chip {
    padding: 5px 11px; border: 1px solid var(--brand-line); border-radius: var(--radius-full);
    background: var(--c-white); color: var(--c-text-soft); font: inherit; font-size: .78rem; font-weight: 600;
    font-variant-numeric: tabular-nums; cursor: pointer;
    transition: border-color .16s var(--ease), color .16s var(--ease), background .16s var(--ease);
}
.ubc-chip:hover:not(:disabled) { border-color: var(--brand-primary); color: var(--brand-primary-dark); }
.ubc-chip.is-active {
    border-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .08); color: var(--brand-primary-dark);
}
.ubc-chip:disabled { opacity: .55; cursor: default; }
/* As cobranças unificadas do cliente, uma por dia. */
.ubc-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ubc-group {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    border: 1px solid var(--brand-line); border-radius: var(--radius); background: var(--c-white); font-size: .86rem;
}
.ubc-group.is-current { border-color: var(--brand-primary); }
.ubc-group-info { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.ubc-group-actions { display: flex; gap: 4px; }
.ubc-day { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ubc-day .field-label { margin: 0; }
.ubc-warn { padding: 10px 12px; background: var(--c-warning-bg); color: #92400E; border-radius: var(--radius); }
.ubc-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding-top: 14px; border-top: 1px solid var(--brand-line);
}
.ubc-preview { font-size: .9rem; }
.ubc-impact { display: block; margin-top: 2px; }
.ubc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.ubc-carnet {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    background: var(--brand-surface); border-radius: var(--radius);
}
.ubc-carnet-icon { display: inline-flex; color: var(--c-text-soft); }
.ubc-carnet-icon svg { width: 18px; height: 18px; }
.ubc-carnet-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: .86rem; }

.coll-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.coll-chip {
    padding: 5px 11px; border: 1px solid var(--brand-line); border-radius: var(--radius-full);
    background: var(--c-white); color: var(--c-text-soft); font: inherit; font-size: .78rem; font-weight: 600;
    cursor: pointer; transition: border-color .16s var(--ease), color .16s var(--ease);
}
.coll-chip:hover { border-color: var(--brand-primary); color: var(--brand-primary-dark); }
.coll-chip.is-var { font-family: var(--font-mono); font-size: .74rem; }

.coll-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--brand-line); display: flex; flex-direction: column; gap: 14px; }
.coll-timeline li { position: relative; }
.coll-timeline li::before {
    content: ''; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--c-white); border: 2px solid var(--brand-primary);
}
.coll-timeline p { margin: 2px 0 0; }
.coll-reason { color: var(--c-text-soft); font-style: italic; }

/* ---- Mensagem do WhatsApp ---- */
.coll-tpl { font-size: .9rem; line-height: 1.5; resize: vertical; }
.coll-bubble {
    max-width: 92%; padding: 12px 14px; border-radius: 4px 14px 14px 14px;
    background: #DCF8C6; color: #111B21; font-size: .88rem; line-height: 1.5;
    box-shadow: 0 1px 1px rgba(12, 12, 12, .12); word-break: break-word;
}

/* ---- Aviso ---- */
.coll-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: calc(var(--drawer-z) + 5);
    max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px;
    background: var(--c-text); color: #fff; border-radius: var(--radius); font-size: .88rem; font-weight: 600;
    box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
    transform: translate(-50%, 12px); transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.coll-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.coll-toast.is-error { background: #B91C1C; }
.coll-toast.is-warn { background: #92400E; }

@media (max-width: 720px) {
    /* Quatro indicadores em 2 x 2: um por linha comeria a tela inteira antes do quadro. */
    .coll-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .coll-kpis .stat { padding: 14px; }
    .coll-kpis .stat-value { font-size: 1.25rem; }
    .coll-btn-label { display: none; }
    .coll-period-select { min-width: 0; }
    .coll-board { grid-template-columns: repeat(var(--cols, 3), minmax(86vw, 1fr)); }
    .coll-facts, .coll-tally { grid-template-columns: minmax(0, 1fr); }
    .coll-waive-head { flex-direction: column; }
    .coll-value-row { flex-direction: column; align-items: stretch; }
    .coll-drawer.drawer-panel { width: 100%; }
}

/* ---- Extrato: linha clicável e a cortina de detalhes ----
 * O selo da tabela diz só o estado; o passo a passo mora na cortina
 * (`partials/statement-detail-drawer`), desenhada com as peças de Cobranças
 * (`coll-block`, `coll-tally`, `coll-facts`, `coll-timeline`). Aqui só o que elas
 * não tinham: a linha clicável e o passo concluído x o que falta. */
.table tbody tr.is-clickable { cursor: pointer; }
.table tbody tr.is-clickable:hover { background: #FAFAFA; }
.table tbody tr.is-clickable:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -2px; }

.coll-tally .badge { align-self: flex-start; white-space: normal; text-align: left; line-height: 1.3; }
.coll-timeline li.is-done::before { background: var(--c-success); border-color: var(--c-success); }
.coll-timeline li:not(.is-done)::before { border-color: var(--brand-line); }
.coll-timeline li:not(.is-done) > strong { color: var(--c-text-soft); }

/* ---- Vistoria: a mesa de conferência (02/10/2026) ----
 *
 * `partials/inspection-detail`, a página da vistoria nos dois painéis. Quem aprova
 * olha vinte e quatro fotos e decide, então a foto é o elemento principal: grade
 * de miniaturas grandes, visualizador em tela cheia (`.rev-lb`) com a prova de
 * captura ao lado, e a decisão numa coluna que acompanha a rolagem (`.rev-aside`).
 * Prefixo `rev-` de propósito: `.insp-*` e `.media-*` continuam sendo da tela
 * antiga e de quem ainda a usa.
 */

.rev-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.rev-main { min-width: 0; }

/* A coluna da decisão acompanha a rolagem. O respiro de 2px (com margem negativa)
   existe para a sombra dos cartões não ser cortada pelo overflow. */
.rev-aside {
    position: sticky;
    top: calc(var(--topbar-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - var(--topbar-h) - 32px);
    overflow-y: auto;
    padding: 2px;
    margin: -2px;
    scrollbar-width: thin;
}

.rev-decision { border-top: 3px solid var(--brand-primary); }

/* ---- Resumo ---- */

.rev-hero { display: flex; flex-direction: column; gap: 18px; padding: 20px 22px; }
.rev-hero-top { display: flex; align-items: center; gap: 18px; }
.rev-hero-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rev-subject { font-size: .92rem; color: var(--c-text-soft); }
.rev-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.rev-jump { display: none; flex-shrink: 0; }

/* O anel de andamento: um conic-gradient com o miolo recortado por um ::before. */
.rev-ring {
    --p: 0;
    position: relative;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: conic-gradient(var(--brand-primary) calc(var(--p) * 1%), #EDEDED 0);
}
.rev-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--c-white); }
.rev-ring span { position: relative; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.rev-ring small { font-size: .62em; font-weight: 700; color: var(--c-text-soft); }

/* A placa, desenhada como placa. */
.rev-plate {
    align-self: flex-start;
    padding: 3px 14px;
    border: 2px solid var(--brand-ink);
    border-radius: var(--radius-sm);
    background: var(--c-white);
    box-shadow: inset 0 -3px 0 rgba(12, 12, 12, .08);
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .14em;
    line-height: 1.35;
}

.rev-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.rev-kpis > div { padding: 12px 14px; border-radius: var(--radius); background: var(--brand-surface); }
.rev-kpis dt { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--c-text-soft); }
.rev-kpis dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.rev-kpis dd small { font-size: .9rem; font-weight: 600; color: var(--c-text-faint); }
.rev-kpis .is-warn { background: var(--c-warning-bg); }
.rev-kpis .is-warn dd { color: #B45309; }

.rev-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; font-size: .86rem; color: var(--c-text-soft); }
.rev-facts li { display: inline-flex; align-items: center; gap: 6px; }
.rev-facts svg { width: 15px; height: 15px; color: var(--c-text-faint); }

.rev-callout {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--c-info-bg);
    font-size: .86rem;
    color: #1E40AF;
}

/* ---- Abas das etapas ---- */

.rev-stages { display: flex; align-items: flex-start; gap: 14px; }

.rev-stage-tabs { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; min-width: 0; }

.rev-stage-tab {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-full);
    background: var(--c-white);
    font: inherit;
    font-size: .82rem;
    font-weight: 600;
    color: var(--c-text-soft);
    cursor: pointer;
    transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.rev-stage-tab:hover { color: var(--c-text); border-color: #C9CBCF; }
.rev-stage-tab.is-active { border-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .08); color: var(--brand-primary-dark); }
.rev-stage-count { font-size: .74rem; font-variant-numeric: tabular-nums; color: var(--c-text-faint); }
.rev-stage-count.is-pending { padding: 0 6px; border-radius: var(--radius-full); background: var(--c-warning-bg); color: #B45309; font-weight: 700; }
.rev-stage-tab.is-active .rev-stage-count { color: inherit; opacity: .8; }
.rev-stage-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-line); }
.rev-stage-dot.is-done { background: var(--c-success); }
.rev-stage-dot.is-todo { background: var(--c-warning); }

.rev-only { flex-shrink: 0; margin-top: 2px; padding: 7px 12px; border-radius: var(--radius-full); background: var(--c-white); border: 1px solid var(--brand-line); font-size: .82rem; }
.rev-only-n { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: var(--radius-full); background: var(--c-warning-bg); color: #B45309; text-align: center; }

.rev-stage { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.rev-stage-title { display: flex; align-items: center; gap: 12px; }
.rev-stage-num {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(var(--brand-primary-rgb), .12);
    color: var(--brand-primary-dark);
    font-weight: 800;
}

/* ---- A grade de fotos ---- */

.rev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }

.rev-tile {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
    transition: box-shadow .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.rev-tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.rev-tile.is-correcting { border-color: #F59E0B; }
.rev-tile.is-marked { border-color: var(--c-danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, .18); }
.rev-tile.is-empty { border-style: dashed; }
.rev-tile.is-empty:hover { box-shadow: none; transform: none; }

.rev-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 0;
    background: #111;
    overflow: hidden;
    cursor: zoom-in;
}
.rev-thumb img,
.rev-thumb video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s var(--ease); }
.rev-tile:hover .rev-thumb img { transform: scale(1.04); }
.rev-thumb:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: -3px; }

.rev-num,
.rev-more {
    position: absolute;
    top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(12, 12, 12, .68);
    backdrop-filter: blur(4px);
    color: #fff;
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 700;
}
.rev-num { left: 8px; }
.rev-more { right: 8px; }
.rev-more svg { width: 12px; height: 12px; }

.rev-hover {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 26px 10px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .7));
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity .18s var(--ease);
}
.rev-hover svg { width: 16px; height: 16px; }
.rev-tile:hover .rev-hover,
.rev-thumb:focus-visible .rev-hover { opacity: 1; }

.rev-play,
.rev-file {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
}
.rev-play svg { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: rgba(12, 12, 12, .6); }
.rev-file svg { width: 32px; height: 32px; }

.rev-mark-flag {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 2;
    display: none;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--c-danger);
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
}
.rev-mark-flag svg { width: 13px; height: 13px; }
.rev-tile.is-marked .rev-mark-flag { display: inline-flex; }

.rev-thumb.is-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: repeating-linear-gradient(45deg, #FAFAFA, #FAFAFA 10px, #F3F3F4 10px, #F3F3F4 20px);
    color: var(--c-text-faint);
    font-size: .82rem;
    cursor: default;
}
.rev-thumb.is-empty svg { width: 28px; height: 28px; }

.rev-tile-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 0; }
.rev-tile-body h3 { font-size: .9rem; line-height: 1.3; }
.rev-tile-meta { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; }
.rev-tile-fix { font-size: .78rem; color: var(--c-text-soft); }
.rev-tile-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 12px; margin-top: auto; }
.rev-attach { display: contents; }
.rev-attach label { cursor: pointer; }
.rev-tile-actions .btn[aria-pressed="true"] { box-shadow: 0 2px 8px rgba(var(--brand-primary-rgb), .3); }
.rev-tile-body:last-child { padding-bottom: 12px; }

/* ---- Respostas que não são mídia ---- */

.rev-answers { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--brand-line); border-radius: var(--radius); }
.rev-answer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--brand-line);
}
.rev-answer:last-child { border-bottom: 0; }
.rev-answer.is-marked { background: var(--c-danger-bg); }
.rev-answer-label { display: flex; flex-direction: column; gap: 2px; }
.rev-answer-text { font-weight: 500; }
.rev-skipped { font-size: .8rem; color: var(--c-text-soft); }
.rev-nothing { padding: 32px 0; }

/* ---- Painel de decisão ---- */

.rev-two-steps { padding-top: 0; }
.rev-decision .card-body + form .card-body { padding-top: 0; }
.rev-two-steps p { display: flex; gap: 8px; }
.rev-two-steps svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--c-info); }

.rev-hint { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--c-info-bg); }
.rev-hint svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--c-info); }

.rev-decide { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.rev-decide .btn { justify-content: center; padding: 12px 16px; font-size: .95rem; }
.rev-reject:hover { border-color: var(--c-danger); color: var(--c-danger); }

.rev-marks { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rev-mark {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--brand-line);
    border-left: 3px solid var(--c-danger);
    border-radius: var(--radius-sm);
    background: var(--c-white);
}
.rev-mark-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rev-mark-name { display: flex; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: .88rem; font-weight: 600; text-align: left; color: var(--c-text); cursor: pointer; }
.rev-mark-name:hover { text-decoration: underline; }
.rev-mark-x { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; font-size: 1.15rem; line-height: 24px; color: var(--c-text-soft); cursor: pointer; }
.rev-mark-x:hover { background: var(--c-danger-bg); color: var(--c-danger); }

/* ---- Visualizador ---- */

.rev-lb { position: fixed; inset: 0; z-index: 300; display: grid; grid-template-columns: minmax(0, 1fr) 340px; color: #fff; }
.rev-lb-backdrop { position: absolute; inset: 0; background: rgba(8, 8, 10, .95); }
.rev-lb-stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.rev-lb-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.rev-lb-ref { padding: 2px 10px; border-radius: var(--radius-full); background: var(--brand-primary); font-family: var(--font-mono); font-size: .78rem; font-weight: 700; }
.rev-lb-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; }
.rev-lb-count { font-size: .82rem; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .6); }
.rev-lb-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    cursor: pointer;
    transition: background .15s var(--ease);
}
.rev-lb-btn:hover { background: rgba(255, 255, 255, .22); }
.rev-lb-btn svg { width: 18px; height: 18px; }

.rev-lb-view { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 68px; overflow: hidden; }
.rev-lb-view.is-zoom { display: block; overflow: auto; }
.rev-lb-media { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; height: 100%; }
.rev-lb-pane { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 0; height: 100%; margin: 0; }
.rev-lb-pane figcaption { font-size: .78rem; font-weight: 600; color: rgba(255, 255, 255, .7); }
.rev-lb-pane img { max-width: 100%; max-height: calc(100% - 30px); object-fit: contain; border-radius: 6px; }
.rev-lb-media video { max-width: 100%; max-height: 100%; border-radius: 6px; }
.rev-lb-pane img { cursor: zoom-in; user-select: none; }

.rev-lb-view.is-zoom .rev-lb-media { display: block; width: 200%; height: auto; }
.rev-lb-view.is-zoom .rev-lb-pane { display: block; height: auto; }
.rev-lb-view.is-zoom .rev-lb-pane img { width: 100%; max-width: none; max-height: none; cursor: zoom-out; }
.rev-lb-view.is-compare .rev-lb-pane img { cursor: default; }
.rev-lb-view.is-compare.is-zoom { display: flex; overflow: hidden; }
.rev-lb-view.is-compare.is-zoom .rev-lb-media { display: flex; width: 100%; height: 100%; }
.rev-lb-view.is-compare.is-zoom .rev-lb-pane { display: flex; height: 100%; }
.rev-lb-view.is-compare.is-zoom .rev-lb-pane img { width: auto; max-width: 100%; max-height: calc(100% - 28px); }

.rev-lb-audio { flex-direction: column; gap: 18px; }
.rev-lb-audio svg { width: 56px; height: 56px; color: rgba(255, 255, 255, .6); }

.rev-lb-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .15s var(--ease);
}
.rev-lb-nav:hover { background: rgba(255, 255, 255, .26); }
.rev-lb-nav svg { width: 22px; height: 22px; }
.rev-lb-nav.is-prev { left: 12px; }
.rev-lb-nav.is-prev svg { transform: rotate(180deg); }
.rev-lb-nav.is-next { right: 12px; }

.rev-lb-strip { display: flex; gap: 8px; padding: 10px 16px 14px; overflow-x: auto; scrollbar-width: thin; }
.rev-lb-thumb {
    position: relative;
    flex-shrink: 0;
    width: 72px;
    height: 54px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: #1c1c20;
    color: #fff;
    cursor: pointer;
    opacity: .6;
    transition: opacity .15s var(--ease), border-color .15s var(--ease);
}
.rev-lb-thumb:hover { opacity: 1; }
.rev-lb-thumb.is-current { border-color: var(--brand-primary); opacity: 1; }
.rev-lb-thumb.is-marked { border-color: var(--c-danger); opacity: 1; }
.rev-lb-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rev-lb-thumb-file { display: grid; place-items: center; width: 100%; height: 100%; }
.rev-lb-thumb-file svg { width: 20px; height: 20px; }
.rev-lb-thumb-ref { position: absolute; left: 3px; bottom: 3px; padding: 0 5px; border-radius: 4px; background: rgba(12, 12, 12, .7); font-family: var(--font-mono); font-size: .62rem; font-weight: 700; }

.rev-lb-info { position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--c-white); color: var(--c-text); }
.rev-lb-info-body { flex: 1; min-height: 0; padding: 22px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.rev-lb-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-text-faint); }
.rev-lb-info h3 { font-size: 1.2rem; line-height: 1.25; }
.rev-lb-label { display: block; margin-bottom: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-text-soft); }
.rev-lb-help { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--brand-surface); font-size: .88rem; }
.rev-lb-block { display: flex; flex-direction: column; gap: 6px; }

.rev-proof { display: flex; flex-direction: column; margin: 0; border: 1px solid var(--brand-line); border-radius: var(--radius-sm); }
.rev-proof > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--brand-line); }
.rev-proof > div:last-child { border-bottom: 0; }
.rev-proof dt { font-size: .78rem; color: var(--c-text-soft); }
.rev-proof dd { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin: 0; font-size: .86rem; }
.rev-warn-line { font-size: .78rem; font-weight: 600; color: #B45309; }

.rev-before { display: flex; flex-wrap: wrap; gap: 8px; }
.rev-before-thumb { display: flex; flex-direction: column; gap: 3px; width: 92px; padding: 4px; border: 2px solid var(--brand-line); border-radius: var(--radius-sm); background: var(--c-white); color: var(--c-text-soft); font: inherit; cursor: pointer; }
.rev-before-thumb.is-on { border-color: var(--brand-primary); }
.rev-before-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }

.rev-lb-actions { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--brand-line); background: var(--brand-surface); }
.rev-lb-actions .btn { justify-content: center; }
.rev-lb-actions .btn kbd { margin-left: 4px; }
.rev-lb-remove:hover { color: var(--c-danger); }
.rev-lb-keys { padding: 10px 20px 14px; text-align: center; }

.rev kbd {
    display: inline-block;
    padding: 0 6px;
    border: 1px solid var(--brand-line);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: var(--c-white);
    font-family: var(--font-mono);
    font-size: .7rem;
    line-height: 1.5;
    color: var(--c-text-soft);
}
.rev-lb-actions .btn-primary kbd { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .2); color: #fff; }

@media (max-width: 1100px) {
    .rev-layout { grid-template-columns: minmax(0, 1fr); }
    .rev-aside { position: static; max-height: none; overflow: visible; padding: 0; margin: 0; }
    .rev-jump { display: inline-flex; }
}

@media (max-width: 900px) {
    .rev-lb { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
    .rev-lb-info { max-height: 46vh; border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg); }
    .rev-lb-info-body { padding: 16px; }
    .rev-lb-view { padding: 0 8px; }
    .rev-lb-nav { width: 38px; height: 38px; }
    .rev-lb-nav.is-prev { left: 6px; }
    .rev-lb-nav.is-next { right: 6px; }
    .rev-lb-strip { display: none; }
    .rev-lb-keys, .rev-lb-actions kbd { display: none; }
    .rev-lb-media { flex-direction: column; }
}

@media (max-width: 720px) {
    .rev-hero { padding: 16px; }
    .rev-hero-top { flex-wrap: wrap; }
    .rev-ring { width: 60px; height: 60px; }
    .rev-ring::before { inset: 6px; }
    .rev-plate { font-size: 1.15rem; }
    .rev-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .rev-tile-actions .btn span { white-space: normal; }
    .rev-answer { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .rev-stages { flex-direction: column; align-items: stretch; gap: 8px; }
    .rev-stage-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .rev-stage-tabs::-webkit-scrollbar { display: none; }
    .rev-jump { flex-basis: 100%; justify-content: center; }
    .rev-only { align-self: flex-start; }
    .rev-decide { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .rev-tile, .rev-tile:hover, .rev-thumb img { transition: none; transform: none; }
}

/* =========================================================================
 * Sinistros — o painel, a abertura e a tela do evento (docs/22-SINISTROS.md)
 *
 * Família `.claim-*`. Não reaproveita `.journey*` (CRM), `.coll-*` (cobrança) nem
 * `.steps` (onboarding): cada tela tem o seu ritmo, e o CSS de uma já vazou para
 * a outra (docs/10). O TOM de um bloco vem de UMA variável: `.claim-tone-*` define
 * --tone / --tone-bg / --tone-ink, e o resto só lê delas. Nunca só a cor: o texto
 * escrito ao lado diz o mesmo (rótulo da etapa, "vencida", "atrasado").
 * ========================================================================= */

.claim-tone-info    { --tone: var(--c-info);    --tone-bg: var(--c-info-bg);    --tone-ink: #1D4ED8; }
.claim-tone-warning { --tone: var(--c-warning); --tone-bg: var(--c-warning-bg); --tone-ink: #B45309; }
.claim-tone-success { --tone: var(--c-success); --tone-bg: var(--c-success-bg); --tone-ink: #047857; }
.claim-tone-danger  { --tone: var(--c-danger);  --tone-bg: var(--c-danger-bg);  --tone-ink: #B91C1C; }
.claim-tone-primary { --tone: var(--brand-primary); --tone-bg: rgba(var(--brand-primary-rgb), .1); --tone-ink: var(--brand-primary-dark); }
.claim-tone-neutral { --tone: var(--c-text-faint); --tone-bg: #EFF0F1; --tone-ink: var(--c-text-soft); }

/* A etapa em palavras: ponto + rótulo, na cor do tom. */
.claim-stage {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 11px 3px 9px;
    border-radius: var(--radius-full);
    background: var(--tone-bg);
    color: var(--tone-ink);
    font-size: .76rem;
    font-weight: 700;
    white-space: nowrap;
}
.claim-stage::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }

/* A placa em miniatura (Mercosul): cabe numa linha de lista, o que a do PWA não faz. */
.plate-chip {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1.5px solid #1B2A4A;
    border-radius: 6px;
    background: var(--c-white);
    color: #111827;
    font-family: var(--font-mono);
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .07em;
    line-height: 1;
    white-space: nowrap;
}
.plate-chip::before {
    content: 'BR';
    display: grid;
    place-items: center;
    padding: 0 5px;
    background: #1D4ED8;
    color: #fff;
    font-size: .5rem;
    letter-spacing: .1em;
}
.plate-chip > span { padding: 5px 9px 5px 7px; }
.plate-chip.is-lg { font-size: 1.15rem; border-radius: 8px; }
.plate-chip.is-lg::before { font-size: .62rem; padding: 0 7px; }
.plate-chip.is-lg > span { padding: 7px 13px 7px 10px; }

/* ------------------------------ Painel ------------------------------ */

.claim-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}
.claim-kpis-label {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.claim-kpis .stat { padding: 17px 19px; }
.claim-kpis .stat-value { font-size: 1.65rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
.claim-kpis .stat-hint { margin-top: 4px; }
.stat-hint.is-late { color: var(--c-danger); font-weight: 700; }
.claim-kpis .stat.stat-link.is-active .stat-label { color: var(--brand-primary-dark); }

.claim-attention {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 8px;
    padding: 12px 16px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.claim-attention-title {
    margin-right: 6px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-text-soft);
}
.claim-attention-calm { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--c-text-soft); }
.claim-attention-calm svg { width: 17px; height: 17px; color: var(--c-success); }

.claim-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 7px 5px 13px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-full);
    background: var(--c-white);
    color: var(--c-text-soft);
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.claim-chip b {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: var(--radius-full);
    background: rgba(var(--brand-primary-rgb), .12);
    color: var(--brand-primary-dark);
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
}
.claim-chip:hover { border-color: var(--brand-primary); color: var(--c-text); }
.claim-chip.is-active { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.claim-chip.is-active b { background: var(--brand-primary); color: #fff; }

.claim-filter-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px 5px 13px;
    border-radius: var(--radius-full);
    background: rgba(var(--brand-primary-rgb), .1);
    color: var(--brand-primary-dark);
    font-size: .84rem;
    font-weight: 700;
}
.claim-filter-note a {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(var(--brand-primary-rgb), .16);
    color: inherit;
    text-decoration: none;
}
.claim-filter-note a svg { width: 12px; height: 12px; }

.claim-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.claim-toolbar .field { margin: 0; }
.claim-search { position: relative; flex: 1 1 260px; max-width: 380px; }
.claim-search svg {
    position: absolute;
    left: 13px;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    color: var(--c-text-faint);
    pointer-events: none;
}
.claim-search .input { padding-left: 38px; padding-right: 78px; }
.claim-search-go {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 13px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--brand-ink);
    color: #fff;
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}
.claim-search-go:hover { background: var(--brand-primary-dark); }
.claim-more-filters { padding-top: 14px; border-top: 1px solid var(--brand-line); margin-top: 14px; }

/* A linha-resumo: o evento inteiro em um olhar. */
.claim-list { display: flex; flex-direction: column; gap: 10px; }
.claim-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
    gap: 10px 30px;
    align-items: center;
    padding: 16px 22px 16px 27px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: box-shadow .16s var(--ease), transform .16s var(--ease), border-color .16s var(--ease);
}
.claim-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--tone);
}
.claim-row:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: var(--c-text-faint); }
.claim-row:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.claim-row-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.claim-row-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.claim-row-protocol { font-family: var(--font-mono); font-size: .98rem; font-weight: 800; letter-spacing: -.01em; }
.claim-row-age { font-size: .78rem; color: var(--c-text-faint); }
.claim-row-age.is-late { color: var(--c-danger); font-weight: 700; }
.claim-row-who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
.claim-row-who strong { font-weight: 700; }
.claim-row-who > span { color: var(--c-text-soft); font-size: .9rem; }
.claim-row-meta { display: flex; flex-wrap: wrap; gap: 3px 16px; font-size: .82rem; color: var(--c-text-soft); }
.claim-row-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.claim-row-meta svg { width: 14px; height: 14px; color: var(--c-text-faint); }
.claim-row-aside { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.claim-row-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.claim-money span {
    display: block;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--c-text-faint);
}
.claim-money strong { display: block; font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.claim-money em { display: block; font-style: normal; font-size: .72rem; color: var(--c-text-faint); }
.claim-money em.is-ok { color: #047857; font-weight: 700; }
.claim-money em.is-late { color: var(--c-danger); font-weight: 700; }
.claim-row-next {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 11px;
    border-radius: var(--radius-sm);
    background: var(--tone-bg);
    color: var(--tone-ink);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.35;
}
.claim-row-next svg { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.claim-row-next small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.claim-row-next.is-calm { background: transparent; color: var(--c-text-faint); font-weight: 500; padding-left: 0; }

/* O quadro por etapa: colunas iguais, sem arrastar — mover a etapa é ação, não gesto. */
.claim-board { display: grid; grid-template-columns: repeat(7, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.claim-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.claim-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: var(--tone-bg);
    color: var(--tone-ink);
    font-size: .8rem;
    font-weight: 800;
}
.claim-col-head b { font-variant-numeric: tabular-nums; }
.claim-card {
    display: block;
    padding: 11px 13px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-left: 4px solid var(--tone);
    border-radius: var(--radius-sm);
    color: inherit;
    text-decoration: none;
    font-size: .82rem;
    transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
.claim-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.claim-card strong { display: block; font-family: var(--font-mono); font-size: .88rem; margin-bottom: 4px; }
.claim-card p { margin: 6px 0 0; color: var(--c-text-soft); line-height: 1.35; }
.claim-col-empty { padding: 14px 10px; text-align: center; font-size: .78rem; color: var(--c-text-faint); }

/* ------------------------------ Evento ------------------------------ */

.claim-head { padding: 20px 24px; }
.claim-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.claim-head-id { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.claim-protocol { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.claim-copy {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--c-text-faint);
    cursor: pointer;
}
.claim-copy:hover { background: var(--brand-surface); color: var(--c-text); }
.claim-copy.is-copied { color: var(--c-success); }
.claim-copy svg { width: 16px; height: 16px; }

/* O menu "Ações" do cabeçalho do evento. */
.claim-menu form { display: contents; }
.claim-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--c-text);
    font: inherit;
    font-size: .88rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.claim-menu-item svg { flex: none; width: 16px; height: 16px; color: var(--c-text-faint); }
.claim-menu-item:hover { background: var(--brand-surface); }
.claim-menu-item.is-danger { color: var(--c-danger); }
.claim-menu-item.is-danger svg { color: var(--c-danger); }
.claim-head-vehicle { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; }
.claim-head-vehicle strong { font-weight: 700; }
.claim-head-vehicle > span { color: var(--c-text-soft); }
.claim-head-facts { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; font-size: .86rem; color: var(--c-text-soft); }
.claim-head-facts > span { display: inline-flex; align-items: center; gap: 6px; }
.claim-head-facts svg { width: 15px; height: 15px; color: var(--c-text-faint); }
.claim-contact { display: inline-flex; gap: 6px; }

.claim-stepper-wrap { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--brand-line); overflow-x: auto; }
.claim-stepper { display: flex; min-width: 560px; margin: 0; padding: 0; list-style: none; }
.claim-step { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.claim-step::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 50%;
    width: 100%;
    height: 3px;
    background: var(--brand-line);
}
.claim-step:first-child::before { display: none; }
.claim-step.is-done::before, .claim-step.is-current::before, .claim-step.is-exit::before { background: var(--c-success); }
.claim-step-dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 2px solid var(--brand-line);
    border-radius: 50%;
    background: var(--c-white);
    color: var(--c-text-faint);
    font-size: .78rem;
    font-weight: 800;
}
.claim-step-dot svg { width: 15px; height: 15px; }
.claim-step.is-done .claim-step-dot { border-color: var(--c-success); background: var(--c-success); color: #fff; }
.claim-step.is-current .claim-step-dot {
    border-color: var(--tone);
    background: var(--tone-bg);
    color: var(--tone-ink);
    box-shadow: 0 0 0 5px var(--tone-bg);
}
.claim-step.is-exit .claim-step-dot { border-color: var(--tone); background: var(--tone); color: #fff; }
.claim-step-label { font-size: .8rem; font-weight: 700; color: var(--c-text-faint); line-height: 1.2; }
.claim-step.is-done .claim-step-label, .claim-step.is-current .claim-step-label, .claim-step.is-exit .claim-step-label { color: var(--c-text); }
.claim-step-date { min-height: 1em; font-size: .72rem; color: var(--c-text-faint); }
.claim-step.is-current .claim-step-date { color: var(--tone-ink); font-weight: 700; }

.claim-next {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px 18px;
    align-items: center;
    padding: 18px 22px;
    background: var(--c-white);
    border: 1px solid var(--brand-line);
    border-left: 5px solid var(--tone);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.claim-next-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--tone-bg);
    color: var(--tone-ink);
}
.claim-next-icon svg { width: 22px; height: 22px; }
.claim-next-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--tone-ink);
}
.claim-next-title { margin-top: 3px; font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
.claim-next-more { display: flex; flex-direction: column; gap: 3px; margin: 9px 0 0; padding: 0; list-style: none; font-size: .84rem; color: var(--c-text-soft); }
.claim-next-more li { display: flex; gap: 8px; }
.claim-next-more li::before { content: ''; flex: none; width: 5px; height: 5px; margin-top: 7px; border-radius: 50%; background: var(--c-text-faint); }
.claim-next-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.claim-next-actions form { display: contents; }

.claim-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.claim-aside { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.claim-aside .card-body { padding: 18px 20px; }
.claim-sum { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; }
.claim-sum li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .88rem; }
.claim-sum li span { color: var(--c-text-soft); }
.claim-sum li strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.claim-sum li.is-total { padding-top: 9px; border-top: 1px solid var(--brand-line); font-size: .95rem; }
.claim-sum li.is-total strong { font-size: 1.05rem; }
.claim-person { display: flex; align-items: center; gap: 10px; }
.claim-person + .claim-person { margin-top: 10px; }
.claim-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(var(--brand-primary-rgb), .12);
    color: var(--brand-primary-dark);
    font-size: .8rem;
    font-weight: 800;
}
.claim-person-name { font-weight: 700; font-size: .88rem; line-height: 1.2; }
.claim-person-role { font-size: .74rem; color: var(--c-text-faint); }

/* As abas: o `.hub-tab` do sistema, só que botão. */
.claim-tabs .hub-tab { border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.claim-tabs .hub-tab.is-active { border-bottom-color: var(--brand-primary); }
/* Em tela estreita as abas quebram de linha em vez de sumir atrás da rolagem. */
.claim-tabs .hub-tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 0; }
.claim-tabs .hub-tab { padding: 12px 12px 10px; }
.claim-tab-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    background: #EFF0F1;
    color: var(--c-text-soft);
    font-size: .72rem;
    font-weight: 800;
}
.claim-tab-count.is-warn { background: var(--c-warning-bg); color: #B45309; }
.claim-tab-count.is-ok { background: var(--c-success-bg); color: #047857; }
.claim-pane { padding: 22px; }
.claim-pane > .claim-block + .claim-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--brand-line); }
.claim-block-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.claim-block-head h3 { margin: 0; font-size: .98rem; }
.claim-block-head p { margin: 2px 0 0; font-size: .82rem; color: var(--c-text-soft); }

/* Fatos de cobertura: o que o jurídico precisa ver, escrito. */
.claim-facts { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.claim-fact {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    background: var(--tone-bg);
}
.claim-fact-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--tone); color: #fff; }
.claim-fact-icon svg { width: 13px; height: 13px; }
.claim-fact b { display: block; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--tone-ink); }
.claim-fact span { font-size: .86rem; color: var(--c-text); line-height: 1.4; }

.claim-note { padding: 12px 14px; border: 1px solid var(--brand-line); border-radius: var(--radius-sm); background: var(--brand-surface); }
.claim-note + .claim-note { margin-top: 8px; }
.claim-note p { margin: 0; white-space: pre-line; font-size: .9rem; line-height: 1.5; }
.claim-note small { display: block; margin-top: 6px; font-size: .74rem; color: var(--c-text-faint); }

/* Documentos: o checklist em espaços e a galeria do resto. */
.claim-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; }
.claim-slot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
    transition: border-color .15s var(--ease), background .15s var(--ease);
}
.claim-slot-head { display: flex; align-items: flex-start; gap: 11px; }
.claim-slot-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tone-bg);
    color: var(--tone-ink);
}
.claim-slot-icon svg { width: 15px; height: 15px; }
.claim-slot-name { font-weight: 700; font-size: .9rem; line-height: 1.25; }
.claim-slot-who { font-size: .78rem; color: var(--c-text-soft); }
.claim-slot.is-missing { border: 1.5px dashed var(--c-warning); background: var(--c-warning-bg); }
.claim-slot.is-filled { border-color: rgba(16, 185, 129, .45); }
.claim-slot.is-waived { background: var(--brand-surface); }
.claim-slot.is-over { border-color: var(--brand-primary); border-style: solid; background: rgba(var(--brand-primary-rgb), .08); }
.claim-slot-files { display: flex; flex-direction: column; gap: 4px; }
.claim-slot-file {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: .8rem;
    color: var(--c-text);
    text-decoration: none;
}
.claim-slot-file svg { flex: none; width: 14px; height: 14px; color: var(--c-text-faint); }
.claim-slot-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.claim-slot-file:hover { color: var(--brand-primary-dark); }
.claim-slot-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.claim-slot-actions form { display: contents; }
.claim-slot-hint { font-size: .76rem; color: var(--c-text-soft); }
.claim-slot-why { font-size: .78rem; color: var(--c-text-soft); font-style: italic; }

.claim-drop {
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 22px 16px;
    border: 2px dashed var(--brand-line);
    border-radius: var(--radius);
    background: var(--brand-surface);
    color: var(--c-text-soft);
    text-align: center;
    cursor: pointer;
    transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.claim-drop svg { width: 28px; height: 28px; color: var(--brand-primary); }
.claim-drop strong { color: var(--c-text); font-size: .92rem; }
.claim-drop span { font-size: .8rem; }
.claim-drop:hover, .claim-drop.is-over { border-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .06); color: var(--c-text); }
.claim-drop.is-busy { opacity: .6; pointer-events: none; }

.claim-queue { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.claim-queue li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(120px, 190px) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-sm);
    background: var(--c-white);
    font-size: .84rem;
}
.claim-queue-thumb { display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 6px; background: var(--brand-surface); color: var(--c-text-faint); }
.claim-queue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.claim-queue-thumb svg { width: 16px; height: 16px; }
.claim-queue-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.claim-queue .select { padding: 6px 8px; font-size: .8rem; }

.claim-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.claim-file { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--brand-line); border-radius: var(--radius); background: var(--c-white); }
.claim-file.is-archived { opacity: .72; }
.claim-file-thumb { display: grid; place-items: center; height: 124px; overflow: hidden; background: var(--brand-surface); color: var(--c-text-faint); }
.claim-file-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s var(--ease); }
a.claim-file-thumb:hover img { transform: scale(1.03); }
.claim-file-thumb svg { width: 32px; height: 32px; }
.claim-file-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 6px; min-width: 0; }
.claim-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; font-weight: 600; }
.claim-file-meta { font-size: .74rem; color: var(--c-text-faint); }
.claim-file-type { margin-top: 4px; padding: 4px 6px; font-size: .76rem; }
.claim-file-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px 12px; margin-top: auto; }
.claim-file-actions form { display: contents; }
.claim-file-flag { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; color: #047857; }
.claim-file-flag svg { width: 12px; height: 12px; }

/* Histórico */
.claim-timeline { margin: 0; padding: 0; list-style: none; }
.claim-event { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 0 14px; padding-bottom: 18px; }
.claim-event::before { content: ''; position: absolute; left: 7px; top: 20px; bottom: 0; width: 2px; background: var(--brand-line); }
.claim-event:last-child { padding-bottom: 0; }
.claim-event:last-child::before { display: none; }
.claim-event-dot {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border: 3px solid var(--c-white);
    border-radius: 50%;
    background: var(--tone);
    box-shadow: 0 0 0 2px var(--tone);
}
.claim-event-title { font-size: .92rem; font-weight: 700; }
.claim-event-detail { margin-top: 2px; white-space: pre-line; font-size: .86rem; color: var(--c-text-soft); line-height: 1.45; }
.claim-event-meta { margin-top: 2px; font-size: .76rem; color: var(--c-text-faint); }

/* Pílulas de escolha (responsável, local do veículo…) e ladrilhos (motivo). */
.claim-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.claim-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1.5px solid var(--brand-line);
    border-radius: var(--radius-full);
    background: var(--c-white);
    color: var(--c-text-soft);
    font-size: .86rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.claim-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.claim-pill:hover { border-color: var(--c-text-faint); }
.claim-pill:has(input:checked) { border-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .08); color: var(--c-text); }
.claim-pill:has(input:focus-visible) { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

.claim-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.claim-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px 12px;
    border: 1.5px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
    color: var(--c-text-soft);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.claim-tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.claim-tile svg { width: 26px; height: 26px; color: var(--c-text-faint); }
.claim-tile:hover { border-color: var(--c-text-faint); }
.claim-tile:has(input:checked) { border-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .07); color: var(--c-text); }
.claim-tile:has(input:checked) svg { color: var(--brand-primary); }
.claim-tile:has(input:focus-visible) { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

/* A abertura em passos (cortina). */
.claim-wiz-nav { display: flex; gap: 8px; margin-bottom: 20px; }
.claim-wiz-pill {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--brand-surface);
    color: var(--c-text-faint);
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.claim-wiz-pill i {
    display: grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--c-white);
    font-style: normal;
    font-size: .74rem;
}
.claim-wiz-pill.is-current { background: rgba(var(--brand-primary-rgb), .1); color: var(--brand-primary-dark); }
.claim-wiz-pill.is-current i { background: var(--brand-primary); color: #fff; }
.claim-wiz-pill.is-done { color: #047857; }
.claim-wiz-pill.is-done i { background: var(--c-success); color: #fff; }
.claim-picked {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--brand-surface);
}
.claim-picked-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.claim-dup {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--c-warning-bg);
    color: #B45309;
    font-size: .86rem;
}
.claim-dup a { font-weight: 700; color: inherit; text-decoration: underline; }
.claim-third { padding: 14px; border: 1px solid var(--brand-line); border-radius: var(--radius); background: var(--brand-surface); }
.claim-third + .claim-third { margin-top: 10px; }

.claim-callout { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--tone-bg); color: var(--tone-ink); font-size: .86rem; line-height: 1.45; }

/* ------------------------------ Telas menores ------------------------------ */

@media (max-width: 1100px) {
    .claim-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .claim-layout { grid-template-columns: minmax(0, 1fr); }
    .claim-aside { position: static; }
}

@media (max-width: 900px) {
    .claim-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .claim-next { grid-template-columns: auto minmax(0, 1fr); }
    .claim-next-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
    .claim-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .claim-kpis .stat-value { font-size: 1.4rem; }
    .claim-head { padding: 16px; }
    .claim-protocol { font-size: 1.3rem; }
    .claim-head-vehicle { gap: 6px 10px; margin-top: 12px; }
    .claim-head-facts { gap: 3px 14px; font-size: .8rem; }
    .claim-stepper-wrap { margin-top: 16px; padding-top: 16px; }
    .claim-pane { padding: 16px; }
    .claim-queue li { grid-template-columns: auto minmax(0, 1fr) auto; }
    .claim-queue .select { grid-column: 1 / -1; order: 5; }
    .claim-wiz-pill span { display: none; }
    .claim-wiz-pill { justify-content: center; }
    .claim-row { padding: 14px 16px 14px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .claim-row, .claim-row:hover, .claim-card, .claim-card:hover { transition: none; transform: none; }
    .claim-file-thumb img { transition: none; }
}

/* ---------------------------------------------------------------------------
 * Custo dos veículos (docs/22 §9.3.1): o bloco de cada veículo e o orçamento editável.
 * ------------------------------------------------------------------------- */
.claim-repair {
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--c-white);
    overflow: hidden;
}
.claim-repair + .claim-repair { margin-top: 16px; }
.claim-repair.is-cancelled { opacity: .7; }
.claim-repair-head {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px;
    padding: 14px 18px; background: var(--brand-surface); border-bottom: 1px solid var(--brand-line);
}
.claim-repair-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
.claim-repair-title strong { font-size: .96rem; }
.claim-repair-title small { color: var(--c-text-faint); }
.claim-repair-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.claim-repair-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .88rem; }
.claim-repair-line > svg { width: 16px; height: 16px; flex: none; color: var(--c-text-faint); }
.claim-repair-line .faint { color: var(--c-text-faint); }
.claim-repair-line .is-warn { color: #B45309; font-weight: 600; }
.claim-repair-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
.claim-repair-actions form { display: contents; }
.claim-repair-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--brand-line); }

.claim-bar {
    flex: 1 1 140px; min-width: 120px; max-width: 260px; height: 8px;
    border-radius: var(--radius-full); background: #E5E7EB; overflow: hidden;
}
.claim-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--c-info); }
.claim-bar.is-late > i { background: var(--c-danger); }
.claim-bar.is-warn > i { background: var(--c-warning); }
.claim-bar.is-done > i { background: var(--c-success); }
/* Dentro de uma célula de tabela (fora de um flex): ocupa a célula, sem os limites do flex. */
.claim-bar.is-block { display: block; min-width: 0; max-width: none; }

.claim-budget { border-top: 1px solid var(--brand-line); padding: 16px 18px; }
.claim-budget-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; }
.claim-budget-head h4 { margin: 0; font-size: .9rem; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.claim-budget-head small { color: var(--c-text-faint); font-weight: 500; }
.claim-budget-table, .claim-report-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.claim-budget-table th, .claim-report-table th {
    padding: 7px 8px; text-align: left; font-size: .7rem; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; color: var(--c-text-faint); border-bottom: 1px solid var(--brand-line);
}
.claim-budget-table td, .claim-report-table td { padding: 8px; border-bottom: 1px solid var(--brand-line); vertical-align: middle; }
.claim-budget-table .num, .claim-report-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Relatório: no celular a tabela rola de lado dentro do .table-wrap, em vez de empilhar sem os títulos das colunas. */
.claim-report-table { min-width: 520px; }
.claim-report-table tfoot td { font-weight: 700; }
.claim-budget-table tr.is-removed td { color: var(--c-text-faint); text-decoration: line-through; }
.claim-budget-table .input, .claim-budget-table .select { padding: 6px 8px; font-size: .84rem; min-width: 0; }
.claim-budget-table .input.num { text-align: right; }
.claim-budget-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 22px; margin-top: 10px; font-size: .86rem; color: var(--c-text-soft); }
.claim-budget-foot strong { color: var(--c-text); font-variant-numeric: tabular-nums; }
.claim-budget-foot .is-total { font-size: 1rem; color: var(--c-text); }
.claim-budget-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.claim-budget-actions form { display: contents; }
.claim-budget-problems { margin: 10px 0 0; padding: 0; list-style: none; font-size: .82rem; color: #B45309; }
.claim-budget-problems li::before { content: '• '; }
.claim-revision { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--c-warning-bg); font-size: .86rem; }
.claim-revision b { color: #B45309; }
.claim-revision-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.claim-revision-actions form { display: contents; }
.claim-revisions { margin: 12px 0 0; padding: 0; list-style: none; font-size: .8rem; color: var(--c-text-soft); }
.claim-revisions li + li { margin-top: 3px; }
.claim-budget-editor { padding: 12px; margin-top: 8px; border: 1px dashed var(--brand-line); border-radius: var(--radius-sm); background: #FCFCFC; }
.claim-budget-editor .claim-budget-table { min-width: 780px; }
.claim-budget-editor .claim-budget-table td.span .input { min-width: 220px; }
.claim-budget-editor .claim-budget-table .select { min-width: 110px; }
.claim-budget-editor-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; margin-bottom: 12px; }
.claim-budget-editor-head .field { margin: 0; }
.part-condition { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-full); font-size: .72rem; font-weight: 700; }
.part-condition.is-success { background: var(--c-success-bg); color: #047857; }
.part-condition.is-info { background: var(--c-info-bg); color: #1D4ED8; }
.part-condition.is-warning { background: var(--c-warning-bg); color: #B45309; }
.part-condition.is-neutral { background: #EFF0F1; color: var(--c-text-soft); }
@media (max-width: 760px) {
    .claim-budget-table thead { display: none; }
    .claim-budget-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--brand-line); }
    .claim-budget-table td { border: 0; padding: 2px 0; }
    .claim-budget-table td.span { grid-column: 1 / -1; }
}

.claim-menu { position: relative; }
.claim-menu-pop {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; padding: 6px;
    background: var(--c-white); border: 1px solid var(--brand-line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.claim-pick { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; max-height: 340px; overflow-y: auto; }
.claim-pick-item {
    display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 12px; text-align: left; font: inherit;
    border: 1px solid var(--brand-line); border-radius: var(--radius-sm); background: var(--c-white); cursor: pointer;
}
.claim-pick-item:hover { border-color: var(--c-text-faint); }
.claim-pick-item.is-picked { border-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .06); }
.claim-pick-item small { color: var(--c-text-soft); }
.claim-pick-item small em { color: #B45309; font-style: normal; font-weight: 600; }
.claim-budget-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.claim-budget-files form { display: contents; }

/* Pagamento à oficina (docs/22 §10.7): o bloco do orçamento aprovado e as cortinas "Como pagar" e "Nota fiscal". */
.claim-payment { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--brand-line); }
.claim-payment-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 6px; }
.claim-payment-head h5 { margin: 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-soft); }
.claim-payment-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.claim-payment-list { margin: 0 0 6px; padding: 0; list-style: none; }
.claim-payment-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 7px 0; border-bottom: 1px solid var(--brand-line); font-size: .86rem; }
.claim-payment-list li:last-child { border-bottom: 0; }
.claim-payment-what { flex: 1 1 220px; min-width: 0; }
.claim-payment .is-warn { color: #B45309; font-weight: 600; }
.claim-choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--brand-line); border-radius: var(--radius-sm); cursor: pointer; }
.claim-choice:hover { border-color: var(--c-text-faint); }
.claim-choice.is-picked { border-color: var(--brand-primary); background: rgba(var(--brand-primary-rgb), .06); }
.claim-choice input { margin-top: 4px; }
.claim-choice span { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.claim-choice small { color: var(--c-text-soft); font-size: .78rem; line-height: 1.35; }
.claim-account { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--brand-surface); font-size: .88rem; }
.claim-account > div { display: flex; justify-content: space-between; gap: 12px; }
.claim-account span { color: var(--c-text-soft); }
.claim-account b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.claim-account .is-total { padding-top: 8px; border-top: 1px solid var(--brand-line); font-size: .98rem; }
.claim-account .is-total span { color: var(--c-text); font-weight: 700; }
/* ===== Lista de contratos: o que falta para ativar (05/11/2026) =====
   Embaixo da etiqueta de situação, uma linha por pendência — o administrativo
   lê na lista o que antes só via abrindo a placa. */
.pending-steps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pending-steps li { position: relative; padding-left: 12px; font-size: .72rem; line-height: 1.35; color: var(--c-text-soft); }
.pending-steps li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 5px; height: 5px; border-radius: 50%; background: var(--c-warning); }
.pending-steps li.is-signature::before { background: #CBD5E1; }
.pending-steps li.is-ready { color: #047857; font-weight: 600; }
.pending-steps li.is-ready::before { background: var(--c-success); }
/* Etapa do rastreador (docs/23 §9): pendente em amarelo, agendado em azul, instalado em verde. */
.pending-steps li.is-tracker-scheduled::before { background: var(--c-info, #3B82F6); }
.pending-steps li.is-tracker-installed { color: #047857; }
.pending-steps li.is-tracker-installed::before { background: var(--c-success); }
.pending-steps li.is-tracker-waived::before { background: #CBD5E1; }
/* ===== Cobranças: entradas em aberto e estrutura comercial no contato (05/11/2026) ===== */
.coll-entries .card-head h2 { display: flex; align-items: center; gap: 8px; }
.coll-entries-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.coll-team { padding-top: 12px; border-top: 1px solid var(--brand-line); }
.coll-team ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.coll-team li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 2px 12px; align-items: baseline; }
.coll-team-role { font-size: .74rem; font-weight: 600; color: var(--c-text-soft); text-transform: uppercase; letter-spacing: .03em; }
.coll-team-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.coll-team-who strong { font-size: .88rem; }
.coll-team-contact { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--c-text-soft); }
.coll-team-contact a { word-break: break-all; }
.coll-team-wa { margin-left: 6px; font-weight: 600; color: #128C7E; }
@media (max-width: 560px) { .coll-team li { grid-template-columns: minmax(0, 1fr); } }

/* ===== CRM: filtros do kanban (05/11/2026) ===== */
.crm-filters .crm-filter-check { height: 38px; padding: 0 4px; font-size: .82rem; color: var(--c-text-soft); }
.crm-filters .crm-filter-check input:disabled + span { opacity: .5; }

/*
 * ===== CRM: o que está parado (08/11/2026) =====
 *
 * Os quadros que tomaram o lugar do "Para hoje": um por passo da venda aceita
 * (FunnelPending), com a contagem grande para ler de longe. A cor diz de quem é
 * a vez — laranja (marca) = cobrar o cliente; azul = alguém daqui. Quadro zerado
 * fica cinza, com o ✓ em verde: não é link. O escolhido ganha o fundo da cor.
 */
.crm-pending-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.crm-pending-head h2 { margin: 0; font-size: 1.05rem; }
.crm-pending-head p { margin: 2px 0 0; font-size: .85rem; color: var(--c-text-soft); }

/* Seis quadros: uma linha no desktop, duas de três no meio, três de dois no
   celular — nunca um quadro sozinho na última linha. */
.crm-pending-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 1280px) { .crm-pending-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.crm-pending-tile {
    --tone: var(--brand-primary);
    --tone-rgb: var(--brand-primary-rgb);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 116px;
    padding: 14px 16px;
    border: 1px solid var(--brand-line);
    border-top: 3px solid var(--tone);
    border-radius: var(--radius);
    background: var(--c-white);
    color: var(--c-text);
    text-decoration: none;
    transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}

.crm-pending-tile.is-team { --tone: var(--c-info); --tone-rgb: 59, 130, 246; }

a.crm-pending-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(var(--tone-rgb), .45);
    border-top-color: var(--tone);
    color: var(--c-text);
}

a.crm-pending-tile:focus-visible { outline: 3px solid rgba(var(--tone-rgb), .35); outline-offset: 2px; }

.crm-pending-tile.is-active {
    background: rgba(var(--tone-rgb), .07);
    border-color: var(--tone);
    box-shadow: inset 0 0 0 1px var(--tone);
}

.crm-pending-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(var(--tone-rgb), .12);
    color: var(--tone);
}

.crm-pending-icon svg { width: 18px; height: 18px; }

.crm-pending-count {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1;
    color: var(--tone);
}

.crm-pending-label { margin-top: 10px; padding-right: 4px; font-size: .92rem; font-weight: 700; line-height: 1.25; }
.crm-pending-hint { font-size: .78rem; color: var(--c-text-soft); }
.crm-pending-tile.is-active .crm-pending-hint { color: var(--tone); font-weight: 600; }

.crm-pending-tile.is-empty { border-top-color: var(--brand-line); background: #FAFAFA; }
.crm-pending-tile.is-empty .crm-pending-icon { background: var(--brand-surface); color: var(--c-text-faint); }
.crm-pending-tile.is-empty .crm-pending-count,
.crm-pending-tile.is-empty .crm-pending-label { color: var(--c-text-faint); }
.crm-pending-tile.is-empty .crm-pending-hint { color: #047857; }

.crm-pending-note { margin: 12px 0 0; font-size: .85rem; color: var(--c-text-soft); }

.crm-pending-actions { display: inline-flex; justify-content: flex-end; gap: 6px; white-space: nowrap; }

.crm-btn-whatsapp { background: #25D366; color: #fff; }
.crm-btn-whatsapp:hover { background: #1EBE5A; color: #fff; }

@media (max-width: 560px) {
    .crm-pending-head { flex-direction: column; }
    .crm-pending-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
 * Ficha da placa (admin/contract-show) — prefixo .cs-
 * Cabeçalho com ações, chips de checklist, métricas, abas e cartões de resumo.
 * Reaproveita .card, .fact-list, .badge, .btn, .stat-label e os tokens de cor.
 * ========================================================================== */

.cs-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 20px 24px;
}
.cs-hero-main { display: flex; align-items: center; gap: 18px; flex: 1 1 360px; min-width: 0; }
.cs-hero-plate { flex: none; }
.cs-hero-id { min-width: 0; }
.cs-hero-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 6px; }
.cs-hero-title { font-size: 1.25rem; line-height: 1.25; overflow-wrap: anywhere; }
.cs-hero-sub { margin-top: 2px; font-size: .88rem; color: var(--c-text-soft); overflow-wrap: anywhere; }
.cs-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-hero-actions .btn { min-height: 44px; }

/* Checklist: o que já está resolvido ocupa um chip, não uma faixa. */
.cs-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 14px 6px 10px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-full);
    background: var(--c-white);
    color: var(--c-text);
    font-size: .82rem;
    text-decoration: none;
}
.cs-chip svg { width: 16px; height: 16px; flex: none; }
.cs-chip-label { color: var(--c-text-soft); }
.cs-chip-value { font-weight: 700; }
a.cs-chip { transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
a.cs-chip:hover { border-color: var(--c-text-faint); box-shadow: var(--shadow-sm); }
a.cs-chip:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.cs-chip.is-ok { background: var(--c-success-bg); border-color: #A7F3D0; }
.cs-chip.is-ok svg { color: #047857; }
.cs-chip.is-warn { background: var(--c-warning-bg); border-color: #FDE68A; }
.cs-chip.is-warn svg { color: #B45309; }
.cs-chip.is-danger { background: var(--c-danger-bg); border-color: #FECACA; }
.cs-chip.is-danger svg { color: #B91C1C; }
.cs-chip.is-info { background: var(--c-info-bg); border-color: #BFDBFE; }
.cs-chip.is-info svg { color: #1D4ED8; }
.cs-chip.is-neutral svg { color: var(--c-text-faint); }

.cs-cancelled { border-color: #FECACA; }

/* Valores numa linha só. */
.cs-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: var(--brand-line);
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.cs-metric { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; background: var(--c-white); min-width: 0; }
.cs-metric strong { font-size: 1.2rem; line-height: 1.2; font-variant-numeric: tabular-nums; }

/* Abas. */
.cs-tabsroot { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cs-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-bottom: 1px solid var(--brand-line);
    scrollbar-width: none;
}
.cs-tabs::-webkit-scrollbar { display: none; }
.cs-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-bottom: -1px;
    padding: 0 16px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--c-text-soft);
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color .16s var(--ease), border-color .16s var(--ease);
}
.cs-tab:hover { color: var(--c-text); }
.cs-tab:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -2px; border-radius: var(--radius-sm); }
.cs-tab.is-active { color: var(--brand-primary-dark); border-bottom-color: var(--brand-primary); }
.cs-tab-count {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: var(--radius-full);
    background: var(--brand-surface);
    color: var(--c-text-soft);
    font-size: .72rem;
    font-weight: 700;
    text-align: center;
}
.cs-tab.is-active .cs-tab-count { background: rgba(var(--brand-primary-rgb), .12); color: var(--brand-primary-dark); }

.cs-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cs-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.cs-info .card-head { padding: 14px 18px; }
.cs-info .card-body { padding: 16px 18px; }

/* Aviso discreto (permanência mínima): informa, não grita. */
.cs-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: .82rem; line-height: 1.4; color: var(--c-text-soft); }
.cs-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* Incluir opcional: recolhido atrás do botão; a grade rola em vez de esticar a página. */
.cs-optional-form { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--brand-line); }
.cs-pick.pick-list { max-height: 280px; overflow-y: auto; padding: 2px; }

@media (max-width: 900px) {
    .cs-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .cs-hero { padding: 16px; }
    .cs-hero-main { flex-direction: column; align-items: flex-start; gap: 12px; }
    .cs-hero-actions { width: 100%; }
    .cs-hero-actions .btn { flex: 1 1 auto; justify-content: center; }
    .cs-metric { padding: 12px 14px; }
    .cs-metric strong { font-size: 1.05rem; }
}

#rastreador { scroll-margin-top: 16px; }
