/* CaptaDoc v1.1.226 — acabamento mobile-first e expansão responsável no desktop. */
:root{
  --cd226-safe-bottom:env(safe-area-inset-bottom,0px);
  --cd226-page-gutter:clamp(12px,2.2vw,28px);
}

html{overflow-x:hidden;-webkit-text-size-adjust:100%}
body{max-width:100%;overflow-x:hidden}
button,a,input,select,textarea{touch-action:manipulation}
button,a,[role="button"]{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:3px solid rgba(11,148,107,.28)!important;
  outline-offset:2px!important;
}
input,select,textarea{font-size:max(16px,1em)}
img,svg,canvas{max-width:100%}

/* Home: continua compacta no celular, mas aproveita melhor monitores largos. */
body.cd146-home #homeScreen{
  width:100%!important;
  max-width:1240px!important;
  margin-inline:auto!important;
  padding-inline:var(--cd226-page-gutter)!important;
}
body.cd146-home .cd146-grid,
body.cd146-home .cd146-eco{gap:clamp(10px,1.5vw,18px)!important}
body.cd146-home .cd146-card,
body.cd146-home .cd146-eco-card{min-width:0!important}
body.cd146-home .cd146-card{min-height:clamp(132px,12vw,166px)!important}
body.cd146-home .cd146-card img{width:clamp(88px,9vw,126px)!important;height:clamp(88px,9vw,126px)!important}
body.cd146-home .cd146-card strong{font-size:clamp(18px,2vw,25px)!important}
body.cd146-home .cd146-eco-card{min-height:clamp(96px,9vw,126px)!important}
body.cd146-home .cd146-nexo-card{min-height:clamp(136px,13vw,172px)!important}

/* Editor: mais largo no PC, com hierarquia de uma coluna em telas menores. */
main{max-width:1320px}
#workspace{width:100%;max-width:1320px;margin-inline:auto;padding-inline:var(--cd226-page-gutter);box-sizing:border-box}
#workspace>.grid{grid-template-columns:minmax(0,1.16fr) minmax(350px,.84fr);gap:clamp(14px,2vw,24px)}
#workspace>.backrow{gap:12px}
#workspace>.backrow>.actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:100%}
#workspace>.backrow>.actions>button{min-width:0;min-height:44px;white-space:normal;line-height:1.15}
#workspace .card{min-width:0}
#workspace .preview-card{position:sticky;top:12px;align-self:start}
#workspace .row>*{min-width:0}

/* Barra final com as três ações essenciais sempre legíveis. */
#footerbar{padding-bottom:calc(8px + var(--cd226-safe-bottom))!important}
#footerbar>div{width:min(760px,100%);margin-inline:auto;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
#footerbar button:not(.hidden){min-width:0!important;min-height:50px!important;margin:0!important;padding:7px 9px!important}
#footerbar button .cost-badge{white-space:nowrap}

/* Microfone visível e alcançável; o comportamento existente permanece intacto. */
.cd212-mic-tab{
  left:10px!important;top:auto!important;bottom:calc(84px + var(--cd226-safe-bottom))!important;
  width:50px!important;height:50px!important;border-radius:16px!important;
  opacity:1!important;overflow:hidden!important;padding:0!important;
  justify-content:center!important;box-shadow:0 10px 26px rgba(4,72,53,.28)!important;
}
.cd212-mic-tab span{transform:scale(1)!important}
.cd212-mic-tab.expanded{width:92px!important;justify-content:center!important;padding-inline:10px!important;border-radius:18px!important}
.cd212-mic-tab.listening{width:118px!important}

/* Nexo fica acima da barra final e não disputa espaço com o microfone. */
.cd217-nexo-wrap{right:10px!important;bottom:calc(82px + var(--cd226-safe-bottom))!important}
.nexo-bubble{
  right:12px!important;bottom:calc(178px + var(--cd226-safe-bottom))!important;
  width:min(340px,calc(100vw - 24px))!important;max-width:340px!important;
}
.cd212-reader{bottom:calc(82px + var(--cd226-safe-bottom))!important}

/* Planos: comparação confortável em celular e maior aproveitamento no PC. */
body.plans-page .plans-shell{width:100%!important;max-width:1180px!important;padding-inline:var(--cd226-page-gutter)!important}
body.plans-page .plans-grid-compare{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important}
body.plans-page .plan-compare-card{min-width:0!important;display:flex!important;flex-direction:column!important}
body.plans-page .plan-compare-card>button{margin-top:auto!important;min-height:44px!important}
body.plans-page .modal-panel{max-height:calc(100dvh - 24px)!important;overflow:auto!important}

/* Perfil: conteúdo mais amplo no desktop e formulário linear no celular. */
.profile-brand-nav+main{width:100%;max-width:1180px!important;margin-inline:auto!important;padding-inline:var(--cd226-page-gutter)!important;box-sizing:border-box}
#profileApp>.profile-grid{grid-template-columns:minmax(0,1.25fr) minmax(290px,.75fr)!important;gap:20px!important}
#profileApp .card{min-width:0}
.pf-panel{max-height:calc(100dvh - 24px)!important}

/* Login simples, centrado e sem zoom bloqueado. */
.auth-shell{width:100%;max-width:600px!important;padding-inline:var(--cd226-page-gutter)!important;box-sizing:border-box}
.auth-card input,.auth-card button{min-height:46px}
.auth-shell~.cd212-mic-tab{bottom:calc(14px + var(--cd226-safe-bottom))!important}

/* Modais: margem segura e rolagem interna em qualquer telefone. */
.modalback,.cd-modal-layer,.clause-modal-layer,.cd212-modalback{padding:12px!important}
.modal,.cd-modal-card,.clause-modal-card,.cd212-modal{
  max-width:calc(100vw - 24px)!important;
  max-height:calc(100dvh - 24px)!important;
}

@media(max-width:1100px){
  #workspace>.grid{grid-template-columns:1fr}
  #workspace .preview-card{position:static}
  body.plans-page .plans-grid-compare{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #profileApp>.profile-grid{grid-template-columns:1fr!important}
}

@media(max-width:700px){
  :root{--cd226-page-gutter:12px}
  body.cd146-home #homeScreen{padding-inline:12px!important}
  body.cd146-home .cd146-grid,
  body.cd146-home .cd146-eco{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body.cd146-home .cd146-card{min-height:116px!important;padding:10px!important}
  body.cd146-home .cd146-card img{width:76px!important;height:76px!important}
  body.cd146-home .cd146-card strong{font-size:16px!important;line-height:1.1!important}
  body.cd146-home .cd146-card small{font-size:10px!important;line-height:1.25!important}
  body.cd146-home .cd146-eco-card{min-height:88px!important;padding:10px!important}
  body.cd146-home .cd146-nexo-card{min-height:126px!important}

  #workspace{padding-inline:10px}
  #workspace>.backrow{align-items:stretch!important;flex-direction:column!important}
  #workspace>.backrow>.actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #workspace>.backrow>.pill{align-self:flex-start}
  #workspace .card{padding:14px!important;border-radius:18px!important}
  #workspace .row{grid-template-columns:1fr!important}
  #workspace .fieldhead>.cd-field-action-tools{width:100%;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #workspace .fieldhead .uploadmini,#workspace .fieldhead .cd-library-picker{white-space:normal!important;line-height:1.2!important}

  #footerbar>div{gap:6px!important}
  #footerbar button:not(.hidden){min-height:52px!important;padding:6px 4px!important;font-size:11px!important}
  #footerbar .foot-ico{width:21px!important;height:21px!important}
  #footerbar button .cost-badge{font-size:8px!important;padding:2px 4px!important}

  .cd212-mic-tab{left:8px!important;bottom:calc(80px + var(--cd226-safe-bottom))!important;width:48px!important;height:48px!important}
  .cd217-nexo-wrap{right:7px!important;bottom:calc(78px + var(--cd226-safe-bottom))!important;width:64px!important;height:74px!important}
  .cd217-nexo-wrap>#nexoFab{width:64px!important;height:74px!important}
  .nexo-bubble{right:8px!important;bottom:calc(160px + var(--cd226-safe-bottom))!important;width:calc(100vw - 16px)!important;max-width:none!important}
  .cd212-reader{width:calc(100vw - 16px)!important;bottom:calc(78px + var(--cd226-safe-bottom))!important}

  .profile-brand-nav+main{padding-inline:12px!important}
  #profileApp .row,.billing-address-row{grid-template-columns:1fr!important}
  #profileApp .quick{grid-template-columns:1fr!important}
  #profileApp .clients-head .toolbar,#profileApp .client-actions{display:grid!important;grid-template-columns:1fr!important;width:100%}
  #profileApp .clients-head .toolbar button,#profileApp .client-actions button{width:100%;min-height:44px}

  .auth-head{grid-template-columns:44px minmax(0,1fr) 44px!important}
  .auth-home-brand img{width:62px!important;height:56px!important}
  .auth-home-brand strong{font-size:23px!important}
  .auth-card{padding:22px 18px!important;border-radius:24px!important}
  .auth-card h1{font-size:clamp(28px,8.5vw,34px)!important;line-height:1.08!important}
  .auth-card>p{font-size:16px!important;line-height:1.5!important}
  .auth-shell~.cd212-mic-tab{left:8px!important;bottom:calc(10px + var(--cd226-safe-bottom))!important;width:44px!important;height:44px!important;border-radius:14px!important}
}

@media(max-width:520px){
  body.plans-page .plans-shell{padding-inline:10px!important}
  body.plans-page .plans-grid-compare{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.plans-page .plan-compare-card{min-height:0!important}
  body.plans-page .plans-billing-grid{grid-template-columns:1fr!important}
  body.plans-page .plans-credit-actions{display:grid!important;grid-template-columns:1fr!important}
  body.plans-page .plans-credit-actions button{width:100%}
}

@media(max-width:370px){
  body.cd146-home .cd146-card img{width:66px!important;height:66px!important}
  body.cd146-home .cd146-card strong{font-size:15px!important}
  #footerbar button:not(.hidden){font-size:10px!important}
  #workspace>.backrow>.actions{grid-template-columns:1fr!important}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

@media print{
  .cd212-mic-tab,.cd212-reader,.cd217-nexo-wrap,.nexo-bubble,#footerbar,#cdFloatingDocTools{display:none!important}
}

/* CaptaDoc v1.1.240 — desktop confortável sem alterar o mobile-first. */
@media(min-width:1101px){
  main{max-width:1540px!important;padding-inline:24px!important}
  #workspace{max-width:1540px!important;padding-inline:24px!important}
  #workspace>.grid{grid-template-columns:minmax(520px,.92fr) minmax(620px,1.08fr)!important;gap:26px!important;align-items:start}
  #workspace>.grid>.card{padding:20px!important;border-radius:20px!important}
  #workspace .preview-card{top:14px!important}
  #workspace .paper{padding:40px 44px!important;min-height:820px!important;font-size:13.5px!important;line-height:1.68!important;border-radius:16px!important}
  #workspace .paper h2{font-size:16px!important}
  #workspace .paper h3{font-size:13.5px!important}
  #workspace .row{gap:12px!important}
  #workspace .row3{gap:12px!important}
  #workspace input,#workspace select,#workspace textarea{padding:11px 12px!important}
  #workspace .fieldhead{gap:10px!important;align-items:flex-start!important}
  #workspace .fieldhead>.cd-field-action-tools{flex:0 0 auto!important}
  #workspace>.backrow{padding:10px 12px!important}
  #workspace>.backrow>.actions{grid-template-columns:repeat(4,minmax(130px,1fr))!important}
  #footerbar>div{width:min(980px,100%)!important}
}
@media(min-width:1450px){
  main,#workspace{max-width:1660px!important}
  #workspace>.grid{grid-template-columns:minmax(600px,.9fr) minmax(720px,1.1fr)!important;gap:30px!important}
  #workspace .paper{padding:46px 52px!important;font-size:14px!important}
}

/* v1.1.241 — explorador móvel e documentos */
#czScrollCue,.cz-scroll-cue{display:none!important;pointer-events:none!important;animation:none!important}
.cd-pdf-sheet{font-family:Arial,sans-serif!important;line-height:1.15!important}
.cd-pdf-sheet .cz-doc-body p{text-align:justify!important;text-justify:inter-word!important;line-height:1.15!important;margin:6pt 0!important}
.cd-pdf-sheet .cz-doc-body h2,.cd-pdf-sheet .cz-doc-body h3{break-after:avoid-page!important;page-break-after:avoid!important}
@media(max-width:700px){
 .cd-explorer{display:block!important}
 .cd-explorer-side{display:flex!important;overflow-x:auto!important;gap:7px!important;width:100%!important;max-width:none!important;border-right:0!important;border-bottom:1px solid #e1ebe7!important;padding:8px 4px 10px!important;scrollbar-width:none!important}
 .cd-explorer-side::-webkit-scrollbar{display:none!important}
 .cd-explorer-side .cd-explorer-section-label{display:none!important}
 .cd-explorer-side button{flex:0 0 auto!important;width:auto!important;min-width:112px!important;padding:9px 11px!important;border-radius:12px!important}
 .cd-explorer-main{width:100%!important;padding:10px 0 0!important}
 .cd-explorer-files{grid-template-columns:1fr!important;gap:7px!important}
 .cd-explorer-file{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;text-align:left!important;min-height:68px!important;padding:9px 10px!important}
 .cd-explorer-file .cd-file-glyph{grid-row:1/3!important;align-self:center!important;font-size:27px!important}
 .cd-explorer-file strong,.cd-explorer-file small{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
 .cd-explorer-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
 .cd-explorer-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
 .cd-explorer-actions>[data-selection-label]{grid-column:1/-1!important}
}

/* v1.1.244 — Meus Arquivos volta ao padrão de explorador: arquivos e árvore de pastas lado a lado. */
@media(max-width:700px){
  .cd-adv-files .cd-explorer{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 132px!important;
    min-height:54dvh!important;
    max-height:68dvh!important;
    align-items:stretch!important;
    overflow:hidden!important;
  }
  .cd-adv-files .cd-explorer-main{
    grid-column:1!important;
    grid-row:1!important;
    width:auto!important;
    min-width:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  .cd-adv-files .cd-explorer-side{
    grid-column:2!important;
    grid-row:1!important;
    display:block!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    white-space:normal!important;
    border-left:1px solid #dbeae4!important;
    border-right:0!important;
    border-bottom:0!important;
    padding:8px 6px!important;
    background:#f3faf7!important;
  }
  .cd-adv-files .cd-explorer-side .cd-explorer-section-label{
    display:block!important;
    padding:8px 5px 5px!important;
    font-size:8px!important;
  }
  .cd-adv-files .cd-explorer-side button{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0 0 4px!important;
    padding:7px 6px 7px calc(6px + (var(--depth,0) * 8px))!important;
    border-radius:9px!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-align:left!important;
    font-size:10px!important;
    line-height:1.12!important;
  }
  .cd-adv-files .cd-folder-line{
    display:grid!important;
    grid-template-columns:16px minmax(0,1fr)!important;
    gap:2px!important;
    align-items:start!important;
  }
  .cd-adv-files .cd-folder-line>span:last-child{
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }
  .cd-adv-files .cd-explorer-side small{
    display:block!important;
    margin:3px 0 0 18px!important;
    font-size:8px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .cd-adv-files .cd-explorer-toolbar{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
    padding:7px!important;
  }
  .cd-adv-files .cd-explorer-toolbar button{font-size:10px!important;padding:7px 4px!important;min-height:34px!important}
  .cd-adv-files .cd-explorer-files{
    display:block!important;
    padding:7px!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    flex:1 1 auto!important;
  }
  .cd-adv-files .cd-explorer-file{
    display:grid!important;
    grid-template-columns:24px 28px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    gap:1px 5px!important;
    min-height:54px!important;
    padding:7px!important;
    margin-bottom:6px!important;
    border-radius:10px!important;
    align-items:center!important;
  }
  .cd-adv-files .cd-explorer-file input[type="checkbox"]{grid-column:1!important;grid-row:1/3!important;width:19px!important;height:19px!important;margin:0!important}
  .cd-adv-files .cd-explorer-file .cd-file-glyph{grid-column:2!important;grid-row:1/3!important;font-size:22px!important;align-self:center!important}
  .cd-adv-files .cd-explorer-file strong{grid-column:3!important;grid-row:1!important;font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-width:0!important}
  .cd-adv-files .cd-explorer-file small{grid-column:3!important;grid-row:2!important;font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-width:0!important}
  .cd-adv-files .cd-explorer-actions{
    display:flex!important;
    gap:4px!important;
    flex-wrap:wrap!important;
    padding:6px!important;
    max-height:112px!important;
    overflow:auto!important;
  }
  .cd-adv-files .cd-explorer-actions>[data-count]{width:100%!important;font-size:9px!important}
  .cd-adv-files .cd-explorer-actions button{flex:1 1 62px!important;min-width:0!important;padding:6px 4px!important;font-size:9px!important}
}
@media(max-width:390px){
  .cd-adv-files .cd-explorer{grid-template-columns:minmax(0,1fr) 116px!important}
}

/* v1.1.245 — Explorer: rolagem isolada, árvore à direita e ações sob demanda */
body.cd-modal-open{position:fixed!important;left:0;right:0;width:100%;overflow:hidden!important}
.cd-modal-layer{overscroll-behavior:contain;touch-action:auto}
.cd-modal-card{overflow:hidden!important;display:flex!important;flex-direction:column!important}
.cd-modal-body{min-height:0!important;overflow:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.cd-adv-files{min-height:0;display:flex;flex-direction:column}
.cd-adv-files .cd-explorer{min-height:0!important;flex:1 1 auto}
.cd-adv-files .cd-explorer-main{min-height:0!important}
.cd-adv-files .cd-explorer-files,.cd-adv-files .cd-explorer-side{min-height:0!important;overscroll-behavior:contain;touch-action:pan-y}
.cd-selection-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%}
.cd-selection-actions.hidden{display:none!important}.cd-selection-actions button{min-width:0!important;white-space:nowrap!important}
.cd-folder-manage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cd-folder-manage-grid button{min-height:42px}
.cd-company-sign-choice{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.cd-company-sign-choice label{display:flex;gap:7px;align-items:center;border:1px solid #dce9e3;border-radius:12px;padding:10px;background:#fff;font-size:12px;font-weight:800}.cd-company-sign-choice input{width:18px;height:18px}
@media(max-width:700px){
 .cd-modal-layer{padding:6px!important;align-items:stretch!important}
 .cd-modal-card{width:100%!important;max-height:calc(100dvh - 12px)!important;height:auto!important;margin:auto!important}
 .cd-adv-files{height:min(78dvh,720px)!important;overflow:hidden!important}
 .cd-adv-files .cd-explorer{grid-template-columns:minmax(0,1fr) 126px!important;height:100%!important;max-height:none!important}
 .cd-adv-files .cd-explorer-side{overflow-y:auto!important;overflow-x:hidden!important;max-height:none!important}
 .cd-adv-files .cd-explorer-main{display:flex!important;flex-direction:column!important;overflow:hidden!important}
 .cd-adv-files .cd-explorer-files{flex:1 1 auto!important;overflow-y:auto!important;max-height:none!important;padding-bottom:18px!important}
 .cd-adv-files .cd-explorer-actions{flex:0 0 auto!important;max-height:none!important;overflow:visible!important;padding-bottom:8px!important}
 .cd-selection-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .cd-selection-actions button{font-size:9px!important;padding:7px 3px!important}
 .cd-company-sign-choice{grid-template-columns:1fr!important}
}

/* v1.1.248 — fontes por seção e arquivos anexados */
.cd-section-sources{margin-top:14px;padding-top:12px;border-top:1px solid rgba(13,133,95,.18)}
.cd-section-source-title{font-size:.84rem;font-weight:800;color:#286553;margin-bottom:8px}
.cd-section-source-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-top:1px dashed rgba(13,133,95,.14)}
.cd-section-source-row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.84rem;font-weight:700;color:#30443e}
.cd-section-source-row>div{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.cd-section-source-row button{min-height:32px!important;padding:5px 8px!important;font-size:.72rem!important}
.cd-attachment-breadcrumb{padding:10px 12px;border-radius:14px;background:#eefaf5;color:#286553;margin-bottom:10px}
.cd-attachment-modal-list{display:grid;gap:10px;max-height:min(58vh,560px);overflow:auto;-webkit-overflow-scrolling:touch}
.cd-attachment-modal-row{padding:12px;border:1px solid rgba(13,133,95,.18);border-radius:16px;background:#fff;display:grid;gap:10px}
.cd-attachment-modal-row strong,.cd-attachment-modal-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cd-attachment-modal-row small{margin-top:4px;color:#708078}
.cd-link-button{border:0;background:none;color:#078b63;font-weight:800;padding:0;text-decoration:underline;cursor:pointer}
.cd-preview-zoombar{display:flex;align-items:center;justify-content:center;gap:10px;padding:7px 10px;border-bottom:1px solid rgba(0,0,0,.08);background:#f7faf9}
.cd-preview-zoombar button{min-width:42px!important;min-height:34px!important;padding:4px 10px!important}
.cd-preview-zoombar span{min-width:54px;text-align:center;font-weight:800;color:#294239}
.cd-file-preview{overflow:auto!important;-webkit-overflow-scrolling:touch!important}
.cd-file-preview img,.cd-file-preview iframe{transition:transform .12s ease}
@media(max-width:700px){
 .cd-section-source-row{align-items:flex-start;flex-direction:column}
 .cd-section-source-row>div{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}
 .cd-section-source-row button{width:100%}
}
