    /* ═══════════════════════════════════════════════════════════
       CADASTROS — cabeçalho de aba, listas em cartões, painel lateral,
       parâmetros. Classes com prefixo `cd-`. Movimento: mesma curva
       (--ease) e o mesmo ritmo das listas de Pendências/Matriz.
       ═══════════════════════════════════════════════════════════ */
    .cd-pagina { max-width: none; }
    .cd-cab { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
    .cd-ico { flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-border); }
    .cd-ico svg { width: 24px; height: 24px; }
    .cd-cab-txt { flex: 1; min-width: 0; }
    .cd-cab-txt h1 { font-size: var(--fs-xl); letter-spacing: -.015em; line-height: 1.2; display: flex; align-items: center; gap: 10px; }
    .cd-cab-txt h1 .n { font-size: var(--fs-xs); font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; letter-spacing: 0; }
    .cd-cab-txt p { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 4px; max-width: 640px; line-height: 1.5; }
    .cd-cab-acoes { display: flex; align-items: center; gap: 10px; }

    /* botões */
    .cd-b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: var(--fs-sm); font-weight: 600; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .2s var(--ease), background .25s, border-color .25s, box-shadow .25s, color .25s; }
    .cd-b:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
    .cd-b:active { transform: scale(.97); }
    .cd-b:disabled { opacity: .5; cursor: not-allowed; }
    .cd-b svg { width: 15px; height: 15px; }
    .cd-b.prim { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 28%, transparent); }
    .cd-b.prim:hover { background: var(--accent-strong); border-color: var(--accent-strong); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 36%, transparent); }
    .cd-b.perigo { background: var(--danger-fill); border-color: var(--danger-fill); color: #fff; }
    .cd-b.perigo:hover { background: var(--danger); border-color: var(--danger); }
    .cd-b.peq { padding: 6px 12px; border-radius: 8px; }

    .cd-busca { display: flex; align-items: center; gap: 8px; padding: 8px 12px; width: 220px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: border-color .25s, box-shadow .25s, width .4s var(--ease); }
    .cd-busca:focus-within { width: 290px; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .cd-busca svg { width: 16px; height: 16px; color: var(--text-mut); flex-shrink: 0; }
    .cd-busca input { border: none; outline: none; background: none; font: inherit; font-size: var(--fs-sm); width: 100%; color: var(--text); }

    /* etiquetas de filtro e de escolha */
    .cd-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
    .cd-chip { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: var(--fs-sm); font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor: pointer; transition: all .3s var(--ease); }
    .cd-chip:hover { border-color: var(--accent-border); color: var(--text); transform: translateY(-1px); }
    .cd-chip .q { font-size: var(--fs-xs); font-weight: 600; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-mut); transition: all .3s var(--ease); }
    .cd-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 28%, transparent); }
    .cd-chip.on .q { background: rgba(255, 255, 255, .22); color: #fff; }

    /* seção e grupo */
    .cd-sec { margin-bottom: 30px; }
    .cd-sec-cab { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
    .cd-sec-cab .tit { flex: 1; min-width: 200px; }
    .cd-sec-cab h2 { font-size: var(--fs-lg); line-height: 1.25; }
    .cd-sec-cab p { font-size: var(--fs-sm); color: var(--text-mut); margin-top: 2px; }
    .cd-sec-cab .cd-q { color: var(--text-mut); font-size: var(--fs-sm); }
    .cd-sec-cab .push { margin-left: auto; }
    .cd-grupo { margin-bottom: 26px; }
    .cd-grupo-cab { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
    .cd-num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); color: #fff; background: var(--accent); }
    .cd-grupo-cab h2 { font-size: var(--fs-md); }
    .cd-grupo-cab .cd-q { color: var(--text-mut); font-size: var(--fs-sm); }
    .cd-grupo-cab .cd-b { margin-left: auto; }

    /* linhas em cartão */
    .cd-linhas { display: flex; flex-direction: column; gap: 6px; }
    .cd-lin-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ease), opacity .35s var(--ease), margin .45s var(--ease); }
    .cd-lin-wrap.some { grid-template-rows: 0fr; opacity: 0; margin-bottom: -6px; }
    .cd-lin-in { overflow: hidden; min-height: 0; padding: 0 4px; margin: 0 -4px; }
    .cd-lin {
      position: relative; display: flex; align-items: center; gap: 14px;
      padding: 13px 14px 13px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
      cursor: pointer; opacity: 0;
      transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s, background .6s;
    }
    .cd-lin.in { opacity: 1; animation: cdEntra .6s var(--ease) var(--d, 0ms) backwards; }
    .cd-lin.in.quieto { animation: none; }
    @keyframes cdEntra { from { opacity: 0; transform: translateY(var(--dy, 10px)); } }
    .cd-lin:hover { transform: translateX(3px); border-color: var(--accent-border); box-shadow: 0 6px 18px rgba(23, 26, 43, .07); }
    .cd-lin.cd-flash, .cd-lin.cd-flash.in { animation: cdFlash 1.6s var(--ease); }
    @keyframes cdFlash { 0% { background: var(--ok-bg); border-color: var(--ok-fill); } 100% { background: var(--surface); } }
    .cd-lin .alca { flex-shrink: 0; margin-left: -4px; color: var(--border-strong); cursor: grab; display: grid; place-items: center; transition: color .2s; }
    .cd-lin:hover .alca { color: var(--text-mut); }
    .cd-lin .alca svg { width: 16px; height: 16px; }
    .cd-lin .cod { flex-shrink: 0; min-width: 40px; font-family: var(--mono); font-size: var(--fs-xs); font-weight: 600; color: var(--text-mut); }
    .cd-lin .dot { flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 3px var(--surface-3); }
    .cd-lin .nome { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .cd-lin .marcas { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
    .cd-lin.dragging { opacity: .4; }
    .cd-lin.drag-over { box-shadow: 0 -3px 0 var(--accent); }
    .cd-tag { font-size: var(--fs-xs); font-weight: 600; padding: 3px 10px; border-radius: 999px; letter-spacing: .01em; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
    .cd-tag.info { background: var(--info-bg); color: var(--info); } .cd-tag.ok { background: var(--ok-bg); color: var(--ok); }
    .cd-tag.warn { background: var(--warn-bg); color: var(--warn); } .cd-tag.violet { background: var(--violet-bg); color: var(--violet); }
    .cd-tag.marca { background: var(--accent-soft); color: var(--accent-strong); }   /* cargo: segue a cor do módulo */
    .cd-tag.danger { background: var(--danger-bg); color: var(--danger); } .cd-tag.na { background: none; color: var(--text-mut); box-shadow: inset 0 0 0 1px var(--border); }
    .cd-acoes { display: flex; gap: 2px; flex-shrink: 0; opacity: 0; transform: translateX(6px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
    .cd-lin:hover .cd-acoes, .cd-lin:focus-within .cd-acoes, .cd-lin.apagando .cd-acoes { opacity: 1; transform: none; }
    .cd-ib { width: 32px; height: 32px; border: none; background: none; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--text-mut); transition: background .2s, color .2s, transform .2s var(--ease); }
    .cd-ib:hover { background: var(--accent-soft); color: var(--accent); }
    .cd-ib.del:hover { background: var(--danger-bg); color: var(--danger); }
    .cd-ib:active { transform: scale(.9); }
    .cd-ib svg { width: 16px; height: 16px; }
    .cd-lin .cd-conf { display: none; flex: 1; align-items: center; gap: 10px; justify-content: flex-end; font-size: var(--fs-sm); }
    .cd-lin.apagando { background: var(--danger-soft); border-color: var(--danger-fill); cursor: default; }
    .cd-lin.apagando .nome, .cd-lin.apagando .marcas, .cd-lin.apagando .cod, .cd-lin.apagando .dot, .cd-lin.apagando .alca, .cd-lin.apagando .cd-acoes:not(.cd-conf) { display: none; }
    .cd-lin.apagando .cd-conf { display: flex; }
    .cd-lin.apagando .cd-conf span { margin-right: auto; color: var(--danger); font-weight: 600; }
    .cd-vazio { text-align: center; padding: 44px 20px; color: var(--text-mut); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 12px; font-size: var(--fs-sm); }
    .cd-vazio .cd-ico { margin: 0 auto 12px; }
    .cd-vazio h3 { color: var(--text); font-size: var(--fs-md); margin-bottom: 4px; }

    /* painel lateral: criar / editar */
    .cd-veu { position: fixed; inset: 0; z-index: 200; background: rgba(23, 26, 43, .38); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
    .cd-veu.aberto { opacity: 1; pointer-events: auto; }
    .cd-painel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 201; width: min(460px, 100vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: -18px 0 50px rgba(23, 26, 43, .18); transform: translateX(105%); visibility: hidden; transition: transform .5s var(--ease), visibility 0s .5s; }
    .cd-painel.aberto { transform: none; visibility: visible; transition: transform .5s var(--ease); }
    .cd-painel-cab { display: flex; align-items: center; gap: 14px; padding: 22px 24px 18px; border-bottom: 1px solid var(--border); }
    .cd-painel-cab h2 { font-size: var(--fs-lg); }
    .cd-painel-cab p { font-size: var(--fs-sm); color: var(--text-mut); margin-top: 2px; }
    .cd-painel-cab .cd-ib { margin-left: auto; }
    .cd-painel-corpo { flex: 1; overflow-y: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 22px; }
    .cd-painel.aberto .cd-campo { animation: cdEntra .55s var(--ease) backwards; }
    .cd-painel.aberto .cd-campo:nth-child(2) { animation-delay: 70ms; }
    .cd-painel.aberto .cd-campo:nth-child(3) { animation-delay: 140ms; }
    .cd-painel.aberto .cd-campo:nth-child(4) { animation-delay: 210ms; }
    .cd-painel.aberto .cd-campo:nth-child(n+5) { animation-delay: 280ms; }
    .cd-campo > label, .cd-campo > .rot { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 4px; }
    .cd-campo .aj { font-size: var(--fs-xs); color: var(--text-mut); margin-bottom: 8px; line-height: 1.45; }
    .cd-in { width: 100%; font: inherit; font-size: var(--fs-md); padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); outline: none; transition: border-color .25s, box-shadow .25s; }
    .cd-in:hover { border-color: var(--text-mut); }
    .cd-in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .cd-in.erro { border-color: var(--danger-fill); box-shadow: 0 0 0 3px var(--danger-soft); }
    textarea.cd-in { resize: vertical; line-height: 1.5; }
    .cd-msg-erro { font-size: var(--fs-xs); color: var(--danger); margin-top: 6px; display: none; }
    .cd-msg-erro.on { display: block; animation: cdEntra .3s var(--ease); }
    .cd-opcoes { display: flex; flex-direction: column; gap: 8px; }
    .cd-op { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font: inherit; font-size: var(--fs-sm); text-align: left; background: var(--surface); color: var(--text); transition: all .3s var(--ease); }
    .cd-op:hover { border-color: var(--accent-border); background: var(--surface-2); }
    .cd-op .cd-num { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); color: var(--text-mut); transition: all .3s var(--ease); }
    .cd-op .marca { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; color: #fff; transition: all .3s var(--ease); }
    .cd-op .marca svg { width: 12px; height: 12px; transform: scale(0); transition: transform .3s var(--ease); }
    .cd-op.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
    .cd-op.on .cd-num { background: var(--accent); color: #fff; }
    .cd-op.on .marca { background: var(--accent); border-color: var(--accent); }
    .cd-op.on .marca svg { transform: scale(1); }
    .cd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
    .cd-chips .cd-chip { padding: 6px 13px; }
    .cd-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 10px; flex-wrap: wrap; }
    .cd-seg button { border: none; background: none; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--text-dim); padding: 6px 14px; border-radius: 8px; cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease); }
    .cd-seg button:hover { color: var(--text); }
    .cd-seg button.on { background: var(--surface); color: var(--accent-strong); box-shadow: 0 1px 3px rgba(23, 26, 43, .12); }
    .cd-cor { display: flex; align-items: center; gap: 10px; }
    .cd-cor .amostra { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-3); }
    .cd-painel-pe { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-2); }

    /* parâmetros */
    .cd-params { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
    .cd-param { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: border-color .3s, box-shadow .3s, transform .35s var(--ease); animation: cdEntra .6s var(--ease) var(--d, 0ms) backwards; }
    .cd-param:hover { border-color: var(--accent-border); box-shadow: 0 8px 24px rgba(23, 26, 43, .07); transform: translateY(-2px); }
    .cd-param.mudou { border-color: var(--warn-fill); box-shadow: 0 0 0 3px var(--warn-soft); }
    .cd-param-topo { display: flex; align-items: center; gap: 12px; }
    .cd-param-topo .cd-ico { width: 40px; height: 40px; border-radius: 12px; }
    .cd-param-topo .cd-ico svg { width: 20px; height: 20px; }
    .cd-param-topo h3 { font-size: var(--fs-md); line-height: 1.25; }
    .cd-param p { font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.5; }
    .cd-param .exemplo { display: block; line-height: 1.5; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: var(--fs-sm); color: var(--text-mut); }
    .cd-param .exemplo b { font-family: var(--mono); color: var(--accent-strong); }
    .cd-stepper { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; transition: border-color .25s, box-shadow .25s; }
    .cd-stepper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .cd-stepper button { width: 42px; border: none; background: var(--surface-2); font: inherit; font-size: 18px; color: var(--text-dim); cursor: pointer; transition: background .2s, color .2s; }
    .cd-stepper button:hover { background: var(--accent-soft); color: var(--accent); }
    .cd-stepper button:active { background: var(--accent-border); }
    .cd-stepper input { flex: 1; min-width: 0; text-align: center; border: none; outline: none; font: inherit; font-size: var(--fs-lg); font-weight: 600; padding: 10px; background: var(--surface); color: var(--text); }
    .cd-barra { position: fixed; left: 50%; bottom: 24px; z-index: 190; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 20px; background: var(--ink); color: var(--ink-fg-hi); border-radius: 14px; box-shadow: 0 14px 40px rgba(23, 26, 43, .35); transform: translate(-50%, 160%); transition: transform .55s var(--ease); font-size: var(--fs-sm); }
    .cd-barra.on { transform: translate(-50%, 0); }
    .cd-barra .pt { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-warn); box-shadow: 0 0 0 4px rgba(251, 191, 36, .2); }
    .cd-barra .cd-b { background: transparent; border-color: var(--ink-line); color: var(--ink-fg-hi); }
    .cd-barra .cd-b:hover { background: var(--ink-2); }
    .cd-barra .cd-b.prim { background: var(--accent); border-color: var(--accent); }

    /* modelo de e-mail */
    .cd-duas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
    .cd-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
    .cd-card h3 { font-size: var(--fs-md); }
    .cd-card .cd-dica { font-size: var(--fs-xs); color: var(--text-mut); line-height: 1.45; margin-top: 6px; }
    .cd-card .cd-dica code { font-family: var(--mono); background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
    .cd-card-acoes { display: flex; gap: 10px; flex-wrap: wrap; }
    .cd-sticky { position: sticky; top: 80px; }
    @media (max-width: 1100px) { .cd-duas { grid-template-columns: 1fr; } .cd-sticky { position: static; } }
    @media (max-width: 760px) {
      .cd-cab { flex-wrap: wrap; } .cd-cab-acoes { width: 100%; } .cd-busca, .cd-busca:focus-within { width: 100%; }
      .cd-lin .marcas { display: none; }
    }

    /* ── movimento do sistema todo ── */
    .view.active { animation: cdVista .5s var(--ease); }
    @keyframes cdVista { from { opacity: 0; transform: translateY(8px); } }
    .btn, .btn-copy, .icon-btn, .subtab, .cat-item, .kpi { transition-property: background, border-color, color, box-shadow, transform, opacity; transition-duration: .25s; transition-timing-function: var(--ease); }
    .btn:not(:disabled):active, .btn-copy:active, .icon-btn:active { transform: scale(.97); }
    .kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(23, 26, 43, .08); }
    .cat-fill { transform-origin: left; animation: cdCresce .9s var(--ease) backwards; }
    @keyframes cdCresce { from { transform: scaleX(0); } }
    .nav { position: relative; }
    .nav-ind { position: absolute; left: 8px; width: calc(100% - 16px); top: 0; height: 0; border-radius: 9px; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent-strong) 45%, transparent); pointer-events: none; opacity: 0; transition: top .45s var(--ease), height .45s var(--ease), left .45s var(--ease), width .45s var(--ease), opacity .3s; }
    .nav-ind.on { opacity: 1; }
    .nav.com-ind .nav-item { position: relative; z-index: 1; }
    .nav.com-ind .nav-item.active { background: none; box-shadow: none; }
    .nav.com-ind .nav-item.active:hover { background: none; }

    @media (prefers-reduced-motion: reduce) {
      .cd-lin { opacity: 1; }
      .cd-lin.in, .cd-param, .cd-painel.aberto .cd-campo, .view.active, .cat-fill { animation: none; }
      .cd-lin, .cd-lin-wrap, .cd-painel, .cd-veu, .cd-barra, .cd-acoes, .cd-chip, .cd-op, .cd-seg button, .nav-ind { transition-duration: .01ms; }
    }

    /* ── CONVENIÊNCIAS ────────────────────────────────── */
    /* Botão × que limpa a busca (aparece só com texto digitado) */
    .search { position: relative; }
    .search-x {
      flex-shrink: 0; width: 22px; height: 22px; border: none; border-radius: 6px; padding: 0;
      display: grid; place-items: center; cursor: pointer; background: none; color: var(--text-mut);
    }
    .search-x:hover { background: var(--surface-2); color: var(--text); }
    .search-x svg { width: 12px; height: 12px; }
    .search-x[hidden] { display: none; }

    /* Ordenação da lista de Pendências */
    .ordem-linha {
      display: flex; align-items: center; gap: 8px; flex-shrink: 0;
      padding: 6px 12px; border-bottom: 1px solid var(--border);
      font-size: var(--fs-xs); color: var(--text-mut); font-weight: 600;
    }
    .ordem-linha select {
      flex: 1; min-width: 0; font: inherit; font-weight: 500; color: var(--text);
      border: 1px solid var(--border); border-radius: 6px; background: var(--surface); padding: 3px 6px; cursor: pointer;
    }

    /* "enviado hoje" na lista de Pendências */
    .li-chip.enviado { background: var(--ok-soft); color: var(--ok); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
    .li-chip.enviado svg { width: 11px; height: 11px; }

    /* Copiar o e-mail do destinatário */
    .pd-destino-copiar {
      flex-shrink: 0; width: 22px; height: 22px; border: none; border-radius: 6px; padding: 0;
      display: inline-grid; place-items: center; cursor: pointer; background: none; color: var(--text-mut);
    }
    .pd-destino-copiar:hover { background: var(--surface-2); color: var(--text); }
    .pd-destino-copiar svg { width: 13px; height: 13px; }

    /* "há 12 min" da última verificação, no cabeçalho */
    .lp-ago { font-size: var(--fs-xs); font-weight: 600; color: var(--ok); }
    .lp-ago.velho { color: var(--warn); background: var(--warn-soft); padding: 1px 8px; border-radius: 999px; }
    .lp-ago[hidden] { display: none; }

    /* Exportar Excel agora é link direto */
    a.top-btn { text-decoration: none; }

    /* Baixar modelo / Importar planilha (Matriz) */
    .mat-import-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
    .mat-import-acoes .btn { width: auto; height: 36px; padding: 0 14px; border-radius: 9px; text-decoration: none; white-space: nowrap; }
    .mat-import-acoes .btn-ghost { color: var(--text-dim); }
    .mat-import-acoes .btn-ghost:hover { color: var(--text); }
    .mat-import-acoes .btn svg { width: 16px; height: 16px; flex-shrink: 0; }
    .mat-acoes-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
    .btn.btn-mini { width: auto; padding: 7px 12px; font-size: var(--fs-xs); text-decoration: none; }
    .mat-import-lbl { position: relative; cursor: pointer; }
    .mat-import-lbl input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

    /* ── PAINEL LATERAL NA MATRIZ ─────────────────────── */
    .pl-extra { margin-right: auto; max-width: 100%; }
    /* rodapé do painel: os botões ficam na mesma linha e na mesma ordem, inclusive quando "Excluir" vira "Confirmar exclusão" */
    @media (min-width: 521px) { .cd-painel-pe { flex-wrap: nowrap; } .cd-painel-pe .cd-b { white-space: nowrap; flex: none; } }
    .pl-data { display: flex; gap: 8px; align-items: stretch; }
    .pl-data .cd-in { flex: 1; min-width: 0; }
    .pl-aviso {
      display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px;
      background: var(--info-bg); color: var(--info); font-size: var(--fs-sm); font-weight: 500; line-height: 1.45;
    }
    .pl-aviso svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

    /* Cadastro da unidade: resumo + botão Editar */
    .mat-cad-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 14px 16px 16px; margin-bottom: 18px; }
    .mat-cad-card.incompleto { border-color: var(--warn-fill); background: var(--warn-soft); }
    .mat-cad-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
    .mat-cad-topo h3 { font-size: var(--fs-md); font-weight: 600; }
    .mat-cad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; margin: 0; }
    .mat-cad-campo { min-width: 0; }
    .mat-cad-campo dt { font-size: var(--fs-xs); font-weight: 600; color: var(--text-mut); margin-bottom: 2px; }
    .mat-cad-campo dd { margin: 0; font-size: var(--fs-sm); font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
    .mat-cad-campo.falta dd { color: var(--warn); font-weight: 500; font-style: italic; }

    /* Fluxo: a linha inteira abre o painel de edição */
    .fx-item[data-etapa-editar] { cursor: pointer; transition: background .15s; }
    .fx-item[data-etapa-editar]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
    .fx-val {
      display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 8px; min-width: 0;
      font-size: var(--fs-sm); font-weight: 600; color: var(--text); background: var(--surface-3); border: 1px solid transparent;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .fx-val.vazio { background: none; border: 1px dashed var(--border-strong); color: var(--text-mut); font-weight: 500; }
    .fx-item:hover .fx-val.vazio { border-style: solid; border-color: var(--accent); color: var(--accent); }
    .fx-ctl.v-ok .fx-val      { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-fill); }
    .fx-ctl.v-analise .fx-val { background: var(--violet-bg); color: var(--violet); border-color: var(--violet-fill); }
    .fx-ctl.v-proc .fx-val    { background: var(--info-bg);   color: var(--info);   border-color: var(--info-fill); }
    .fx-ctl.v-pend .fx-val    { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn-fill); }
    .fx-ctl.v-data .fx-val    { background: var(--ok-soft);   color: var(--text);   border-color: var(--ok-fill); }
    .fx-lapis { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--text-mut); opacity: 0; transition: opacity .15s; }
    .fx-lapis svg { width: 14px; height: 14px; }
    .fx-item:hover .fx-lapis, .fx-item:focus-visible .fx-lapis { opacity: 1; }

    /* Menu lateral: espaçamento folgado em telas altas; vai apertando por degraus
       conforme a altura da janela, pra os 11 itens caberem sem rolar. Abaixo do
       último degrau o próprio menu rola (barra escondida). */
    @media (min-width: 961px) and (max-height: 1080px) {
      .nav { gap: 5px; }
      .nav-item { padding: 9px 2px 7px; gap: 4px; }
      .nav-label { padding: 12px 0 3px; }
    }
    @media (min-width: 961px) and (max-height: 960px) {
      .sidebar .brand { padding: 12px 0 10px; }
      .nav { gap: 4px; }
      .nav-item { padding: 8px 2px 6px; gap: 4px; }
      .nav-label { padding: 9px 0 3px; }
    }
    @media (min-width: 961px) and (max-height: 860px) {
      .nav { gap: 3px; }
      .nav-item { padding: 6px 2px 5px; gap: 3px; }
      .nav-label { padding: 7px 0 2px; }
    }

