/* Ajustes gerais da plataforma — 05/11/2026 */

/* ---------- 1) Topo do site: só ícone + nome ---------- */
body>header{min-width:0;max-width:100vw;box-sizing:border-box}
body>header .brand{min-width:0;flex:1 1 auto}
body:not(.mg-mode)>header .header-actions{display:flex!important;align-items:center;gap:4px!important;flex:0 0 auto}
body:not(.mg-mode)>header .header-actions button{display:inline-flex!important;align-items:center;gap:7px;width:auto!important;min-height:0!important;margin:0!important;border:0!important;border-radius:8px!important;padding:8px 10px!important;background:transparent!important;box-shadow:none!important;color:#20435a!important;font-size:14px!important;font-weight:700!important;cursor:pointer}
body:not(.mg-mode)>header .header-actions button:hover{background:#eef4f4!important;color:#0f7a66!important}
body:not(.mg-mode)>header .header-actions button[hidden]{display:none!important}
body>header .header-actions button svg{width:18px;height:18px;flex:0 0 18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body:not(.mg-mode)>header .header-actions button span{display:inline!important}
@media (max-width:600px){
  body:not(.mg-mode)>header{gap:6px!important;padding-left:10px!important;padding-right:6px!important}
  body:not(.mg-mode)>header .brand-name small{display:none!important}
  body:not(.mg-mode)>header .brand-name{font-size:15px!important;white-space:nowrap}
  body:not(.mg-mode)>header .brand-logo{width:34px!important;height:34px!important}
  body:not(.mg-mode)>header .header-actions{gap:0!important}
  body:not(.mg-mode)>header .header-actions button{flex-direction:column;gap:2px;padding:5px 7px!important;font-size:10.5px!important;font-weight:700!important;line-height:1.1}
  body:not(.mg-mode)>header .header-actions button svg{width:20px;height:20px}
}
@media (max-width:360px){body:not(.mg-mode)>header .brand-name{display:none!important}}

/* ---------- 2) Janelas no mesmo visual do "Gerenciar" ---------- */
#mg-own-password,#mg-team-dialog{width:min(560px,calc(100vw - 24px))!important;max-width:560px!important;max-height:calc(100vh - 24px)!important;margin:auto!important;padding:0!important;border:1px solid #365058!important;border-radius:15px!important;background:#101d22!important;color:#dcebed!important;box-shadow:0 28px 90px #000a!important;overflow:auto!important}
#mg-team-dialog{width:min(680px,calc(100vw - 24px))!important;max-width:680px!important}
#mg-own-password::backdrop,#mg-team-dialog::backdrop{background:#02090ccc;backdrop-filter:blur(3px)}
#mg-own-password .mg-dialog>header,#mg-team-dialog .mg-dialog>header{background:#13272d}
#mg-own-password .mg-dialog-grid label,#mg-team-dialog .mg-dialog-grid label{color:#a9c0c5!important}
#mg-own-password .mg-dialog-actions,#mg-team-dialog .mg-dialog-actions{border-bottom:0!important;border-radius:0 0 15px 15px}
#mg-own-password [data-password-error]{margin:0 24px 6px!important;color:#ffb7ba!important;font-size:12.5px;font-weight:700}
#mg-team-dialog .mg-dialog-permissions,#mg-team-dialog .mg-dialog-active{display:block;padding:6px 24px 14px;color:#cfe3e4}
#mg-team-dialog .mg-dialog-permissions>div{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:8px}
#mg-team-dialog .mg-dialog-permissions label,#mg-team-dialog .mg-dialog-active{display:flex;align-items:center;gap:8px;font-size:13px}
#mg-team-dialog input[type=checkbox],#mg-own-password input[type=checkbox]{width:18px!important;height:18px!important;margin:0!important;accent-color:#18aa89}

/* ---------- 3) Integrações lado a lado (sem rolar) ---------- */
#main .aj-integracoes .section-head .eyebrow,#main .aj-integracoes .integration-overview,#main .aj-integracoes .integration-tabs{display:none!important}
#main .aj-integracoes #integration-form{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:14px 16px;align-items:start;margin-top:16px}
#main .aj-integracoes .integration-content{display:block!important;margin:0!important}
#main .aj-integracoes .integration-content .integration-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px 12px!important}
#main .aj-integracoes .integration-security,#main .aj-integracoes .integration-revealed,#main .aj-integracoes .integration-actions{grid-column:1/-1;margin:0!important}
#main .aj-integracoes .integration-security{display:flex!important;align-items:center;justify-content:space-between;gap:14px}
#main .aj-integracoes .integration-actions{display:flex;justify-content:flex-end}
@media (max-width:1000px){#main .aj-integracoes #integration-form{grid-template-columns:minmax(0,1fr)}}
@media (max-width:600px){#main .aj-integracoes .integration-content .integration-grid{grid-template-columns:minmax(0,1fr)!important}#main .aj-integracoes .integration-security{flex-direction:column;align-items:stretch}}

/* ---------- 4) Formulários cabendo na tela do celular (nada cortado à direita) ---------- */
@media (max-width:700px){
  .cv-workspace,.cv-workspace>*,#document-form,#document-form .cv-step,#document-form .form-grid,#document-form label,#document-form .photo-in-personal{min-width:0!important;max-width:100%!important;box-sizing:border-box}
  #document-form .form-grid{grid-template-columns:minmax(0,1fr)!important}
  #document-form input,#document-form select,#document-form textarea{max-width:100%!important;min-width:0!important;box-sizing:border-box}
  #document-form .photo-file-controls{display:flex!important;flex-wrap:wrap!important;gap:6px!important;min-width:0}
  #document-form .photo-file-controls label{flex:1 1 100%;min-width:0}
  #document-form #photo{width:100%!important;max-width:100%!important}
  #document-form #remove-photo{white-space:normal!important}
  #document-form .cv-step-heading{flex-wrap:wrap;gap:8px}
}
