/* AUDIN — revisão responsiva 09/10/2026.
   Regras de acabamento isoladas, sem alterar as bases de dados. */
*,*::before,*::after{box-sizing:border-box}
html,body{max-width:100%;overflow-x:clip}
img,svg,canvas,video{max-width:100%}
button,a,input,select,textarea{max-width:100%}
main,.app,.heading,.module,.subview,.control-table,.table-scroll,.table-wrap{min-width:0}
header .top,header .header-inner{
 box-sizing:border-box!important;width:100%!important;
 max-width:100%!important;margin:0 auto!important;
 display:flex!important;justify-content:space-between!important;
 align-items:center!important;gap:12px!important;
}
header .brand,header .header-inner .brand{min-width:0!important;flex-shrink:1!important;max-width:100%;overflow:hidden}
header .brand img,header .header-inner .brand img{max-width:none!important;flex-shrink:0!important}
header .brand strong,header .brand-title h1{overflow-wrap:anywhere;white-space:normal;line-height:1.25}
header .brand small,header .brand-title p{min-width:0;overflow-wrap:anywhere}
header .user-pill,header .audin-header-actions{
 display:flex!important;flex-shrink:0!important;align-items:center!important;
 justify-content:flex-end!important;flex-wrap:nowrap!important;gap:7px!important;
 min-width:0;
}
header .audin-user-button,header .audin-theme-button,header .audin-history-link{
 flex:0 0 38px!important;min-width:38px!important;max-width:38px!important;
 width:38px!important;height:38px!important;
 display:inline-grid!important;place-items:center!important;
 padding:0!important;line-height:1!important;
}
header .back{white-space:nowrap;flex-shrink:0;padding:8px 10px;max-width:none}
header .user-pill #userLabel{min-width:0;max-width:170px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
header .user-pill #logoutButton{flex-shrink:0;max-width:none}
main{width:100%;max-width:min(1200px,100%)}
.modules,.module-grid,.mapped-cards,.form-grid,.org-layout,.grid{min-width:0}
.modules{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.module{min-width:0;overflow-wrap:anywhere}
.module h4,.module p{overflow-wrap:anywhere}
.audin-settings{max-width:calc(100vw - 24px)!important}
.audin-settings form{min-width:0}
.audin-settings input,.audin-settings select{max-width:100%;min-width:0}
dialog:not(.audin-settings){max-width:calc(100vw - 24px);max-height:calc(100dvh - 25px);overflow:auto}
dialog form{max-width:100%;min-width:0}
table{max-width:100%}
.table-wrap,.table-scroll{max-width:100%;-webkit-overflow-scrolling:touch}
button svg,a svg{pointer-events:none}
button:focus-visible,a:focus-visible{outline:2px solid #69A9F9;outline-offset:2px}
@media(max-width:1040px){
 header .top,header .header-inner{padding:9px 12px!important;gap:8px!important}
 header .brand img,header .header-inner .brand img{
  width:156px!important;min-width:156px!important;flex-basis:156px!important;height:78px!important
 }
 header .brand strong,header .brand-title h1{font-size:16px!important}
 header .brand small,header .brand-title p{font-size:10.5px!important}
 header .user-pill #userLabel{max-width:90px}
}
@media(max-width:790px){
 header .top,header .header-inner{flex-wrap:wrap!important;justify-content:space-between!important;min-height:76px!important}
 header .brand img,header .header-inner .brand img{
  width:116px!important;min-width:116px!important;flex-basis:116px!important;height:70px!important
 }
 header .brand strong,header .brand-title h1{font-size:14px!important}
 header .brand small,header .brand-title p{font-size:10px!important}
 header .top .audin-header-actions,header .header-inner .user-pill{margin-left:auto!important}
 header .user-pill #userLabel{display:none!important}
 header .user-pill{padding:5px 7px!important;gap:4px!important}
 header .user-pill #logoutButton{font-size:11px!important;padding:7px 9px!important}
 .modules{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .module{min-height:136px!important;padding:13px!important;gap:8px!important}
 .module-icon{width:37px!important;height:37px!important;font-size:18px!important}
 .module h4{font-size:13px!important}
 .module p{font-size:11px!important}
 .heading{flex-wrap:wrap;gap:10px}
 .heading button{max-width:100%}
 .record-actions{max-width:100%;gap:5px!important}
 .unit-work,.history-filters,.toolbar,.filters{max-width:100%}
 .toolbar{display:flex;flex-wrap:wrap;align-items:center}
 .toolbar button{min-width:0}
}
@media(max-width:520px){
 header .top,header .header-inner{padding:7px 9px!important;gap:6px!important}
 header .brand,header .header-inner .brand{max-width:calc(100% - 175px)!important;gap:6px!important}
 header .brand img,header .header-inner .brand img{
  width:90px!important;min-width:90px!important;flex-basis:90px!important;height:60px!important
 }
 header .brand small,header .brand-title p{display:none!important}
 header .brand strong,header .brand-title h1{font-size:12px!important}
 header .audin-header-actions,header .user-pill{gap:4px!important}
 header .audin-user-button,header .audin-theme-button,header .audin-history-link{
  flex-basis:33px!important;min-width:33px!important;max-width:33px!important;
  width:33px!important;height:33px!important
 }
 header .audin-header-actions .back{
  font-size:0!important;padding:7px 8px!important;
 }
 header .audin-header-actions .back::before{content:"←";font-size:18px;line-height:1}
 main{padding-left:12px!important;padding-right:12px!important}
 .modules{gap:9px!important}
 .module{min-height:125px!important;padding:12px!important}
 .module h4{font-size:12px!important}
 .module p{font-size:10.5px!important}
 .demand-card{gap:8px!important;padding:14px!important}
 .demand-card h3{font-size:16px!important}
 .demand-badge{height:42px!important;width:42px!important}
 .filters{gap:8px}
 input,select,textarea{font-size:16px}
}
@media(max-width:360px){
 header .brand strong,header .brand-title h1{display:none!important}
 header .brand,header .header-inner .brand{max-width:95px!important}
 header .user-pill #logoutButton{padding:6px 7px!important}
 .module h4{font-size:11px!important}
}
@media(hover:none){
 button,a,.module,.module-link{ -webkit-tap-highlight-color:transparent }
 header .audin-user-button,header .audin-theme-button,header .audin-history-link{touch-action:manipulation}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
