/* 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}
}
