/* Configurações: submenus dentro de cada página (Personalização, Integrações), para rolar menos. */
.cfg-sub { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line, #e3e6ea); }
.cfg-subb { border: 1px solid transparent; background: transparent; color: var(--muted, #5b6676); font: inherit; font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.cfg-subb:hover { background: var(--soft, #eef1f5); color: inherit; }
.cfg-subb[aria-selected="true"] { background: var(--brand, #1d3557); color: var(--on-brand, #fff); }
.cfg-subb:focus-visible { outline: 2px solid var(--brand, #1d3557); outline-offset: 2px; }
.cfg-subp[hidden] { display: none; }

/* Lápis: abre a janela de edição (foto do perfil, marca da empresa). */
.cfg-av { position: relative; flex: none; }
.cfg-lapis { position: absolute; right: -6px; bottom: -6px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line, #e3e6ea); background: var(--surface, #fff); color: inherit; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.cfg-lapis.static { position: static; flex: none; box-shadow: none; }
.cfg-lapis:hover, .cfg-lapis:focus-visible { background: var(--soft, #eef1f5); border-color: var(--brand, #1d3557); outline: none; }
.cfg-lapis svg { width: 16px; height: 16px; }
.cfg-emp { display: flex; align-items: center; gap: 16px; }
.logo-prev.lg { width: 64px; height: 64px; object-fit: contain; border-radius: 14px; }
.cfg-pop { position: fixed; width: min(580px, 96vw); max-height: 92vh; margin: auto; padding: 0; border: 0; border-radius: 18px; overflow: auto; background: var(--surface, #fff); color: var(--fg, #1a2233); box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.cfg-pop::backdrop { background: rgba(12, 20, 36, .55); }
.cfg-pop .a-sec { margin: 0; border: 0; box-shadow: none; background: transparent; }
.cfg-pop-x { position: absolute; top: 12px; right: 14px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.cfg-pop-x:hover { background: var(--soft, #eef1f5); }

/* Mais respiro dentro da janela do lápis e formulário de dados do escritório ocupando a largura. */
.cfg-pop .a-sec { padding: 30px 28px 26px; }
.cfg-pop .a-sech { padding-right: 36px; }
#f-dados .g2c, #f-meus .g2c { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
#f-dados .f.full, #f-meus .f.full { grid-column: 1 / -1; }
#f-dados input, #f-meus input { width: 100%; }
@media (max-width: 560px) { #f-dados .g2c, #f-meus .g2c { grid-template-columns: 1fr; } }

/* Dados do escritório: advogados em linhas (nome + OAB lado a lado). */
.dd-advs-box { display: grid; gap: 10px; margin-top: 8px; }
#dd-advs { display: grid; gap: 12px; }
.dd-adv { display: grid; grid-template-columns: 1fr 170px 40px; gap: 12px; align-items: end; }
.dd-adv .f { margin: 0; }
.dd-adv input { width: 100%; }
.dd-rm { width: 40px; height: 40px; border: 1px solid var(--line, #e3e6ea); border-radius: 10px; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.dd-rm:hover, .dd-rm:focus-visible { background: var(--soft, #eef1f5); border-color: var(--brand, #1d3557); outline: none; }
#f-dados [data-adv-add] { justify-self: start; }
@media (max-width: 560px) { .dd-adv { grid-template-columns: 1fr 120px 40px; } }

/* Botão "+" e o menu que sobe do canto. */
.fab, html[data-menu="side"] body .fab { width: 56px; height: 56px; padding: 0; border-radius: 50%; justify-content: center; }
.fab svg, html[data-menu="side"] body .fab svg { width: 26px; height: 26px; }
.fab span, html[data-menu="side"] body .fab span { display: none; }
.fab-menu { position: fixed; z-index: 31; right: calc(24px + env(safe-area-inset-right, 0px)); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); width: 262px; padding: 8px; display: grid; gap: 4px; background: var(--surface, #fff); color: var(--fg, #1a2233); border: 1px solid var(--line, #e3e6ea); border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.fab-menu[hidden] { display: none; }
html:not([data-menu="side"]) body .fab-menu { bottom: calc(168px + env(safe-area-inset-bottom, 0px)); right: calc(22px + env(safe-area-inset-right, 0px)); }
.fab-it { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.fab-it:hover, .fab-it:focus-visible { background: var(--soft, #eef1f5); outline: none; }
.fab-it .ico { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--soft, #eef1f5); }
.fab-it svg { width: 16px; height: 16px; }
.fab-voltar { padding: 6px 10px; border: 0; background: transparent; color: var(--muted, #5b6676); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.fab-voltar:hover { color: inherit; }

/* Funil: seta ao lado do nome com o menu de opções. */
.kpipe { position: relative; }
.kpipe-seta { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.kpipe-seta:hover, .kpipe-seta:focus-visible { background: color-mix(in srgb, currentColor 20%, transparent); outline: none; }
.kpipe-seta svg { width: 14px; height: 14px; }
.kpipe-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 240px; padding: 6px; display: grid; gap: 2px; background: var(--surface, #fff); color: var(--fg, #1a2233); border: 1px solid var(--line, #e3e6ea); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .28); font-weight: 500; }
.kpipe-menu[hidden] { display: none; }
.kpipe-menu button { text-align: left; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.kpipe-menu button:hover:not([disabled]), .kpipe-menu button:focus-visible { background: var(--soft, #eef1f5); outline: none; }
.kpipe-menu button[disabled] { opacity: .55; cursor: default; }

/* Botão de perigo (Excluir). */
.btn.danger { background: #c62828; color: #fff; border-color: transparent; }
.btn.danger:hover, .btn.danger:focus-visible { background: #d93636; }
.btn.ghost.danger { background: transparent; color: #c62828; border: 1px solid #c62828; }

/* Armazenamento */
.arm-bar { height: 10px; border-radius: 99px; background: var(--line, #e5e7eb); overflow: hidden; margin: 4px 0 14px; }
.arm-bar i { display: block; height: 100%; background: var(--brand, #1f3a5f); border-radius: 99px; }
.arm-list { list-style: none; margin: 0 0 12px; padding: 0; }
.arm-list li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.arm-list li > span:first-child { flex: 1; }
