/* AUDIN — Auditorias: atividades PAINT compactas, com detalhes completos. */
body.auditorias-page .audit-activities-page{max-width:1240px;padding:19px 20px 55px;min-width:0}
body.auditorias-page .audit-heading{align-items:center;margin-bottom:13px;gap:16px}
body.auditorias-page .audit-heading h1{font-size:clamp(1.6rem,3vw,2.05rem);margin:2px 0 4px}
body.auditorias-page .audit-heading p:not(.eyebrow){font-size:.86rem}
body.auditorias-page .audit-heading-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
body.auditorias-page .audit-heading-actions button{padding:11px 14px;min-height:42px;border-radius:10px;font-weight:700;font-size:.83rem;white-space:nowrap}
body.auditorias-page #importPaint{
 background:#fff;color:#244879;border:1px solid #b7c9e3
}
body.auditorias-page #importPaint:hover{background:#eaf2ff}
body.auditorias-page .audit-filters{
 display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,205px) auto;
 gap:12px;align-items:end;margin-bottom:10px;
 padding:12px 15px;border:1px solid #d7e2f0;border-radius:12px;background:#fff;
}
body.auditorias-page .audit-filters label{
 display:grid;gap:5px;min-width:0;font-weight:700;font-size:.8rem;color:#324d76
}
body.auditorias-page .audit-filters input,body.auditorias-page .audit-filters select{width:100%;min-height:40px}
body.auditorias-page .audit-filters>button{
 min-height:40px;padding:9px 13px;border-radius:9px;
 border:1px solid #b7c9e3;background:#eef4ff;color:#284875;font-weight:700
}
body.auditorias-page .audit-summary{font-size:.8rem;color:#536a8c;margin:0 0 11px}
body.auditorias-page #notice{margin:6px 0;font-size:.84rem}
body.auditorias-page #notice:empty{display:none}
body.auditorias-page .audit-groups{display:grid;gap:13px}
body.auditorias-page .audit-group{
 margin:0;overflow:visible;min-width:0;border:1px solid #d9e3f0;
 border-radius:13px;background:#fff;box-shadow:0 4px 16px #17295c0a;
}
body.auditorias-page .audit-group>summary{
 display:flex;justify-content:space-between;gap:12px;
 cursor:pointer;align-items:center;padding:13px 16px;
 color:#1d3e74;font-weight:750;font-size:.93rem;list-style:none
}
body.auditorias-page .audit-group>summary::-webkit-details-marker{display:none}
body.auditorias-page .audit-group>summary::before{
 content:'▸';font-size:.88rem;color:#4d70a2
}
body.auditorias-page .audit-group[open]>summary::before{content:'▾'}
body.auditorias-page .audit-group>summary>span:first-child{flex:1}
body.auditorias-page .audit-count{
 border-radius:999px;background:#eef3fc;padding:4px 9px;color:#60789c;
 font-size:.75rem;font-weight:700
}
body.auditorias-page .audit-list{border-top:1px solid #dce5f1}
body.auditorias-page .audit-row{
 display:grid;grid-template-columns:60px minmax(0,2fr) minmax(115px,1fr) 76px 112px 108px;
 align-items:center;gap:12px;padding:12px 16px;min-width:0;
 border-bottom:1px solid #e5ecf5;
}
body.auditorias-page .audit-row:last-child{border-bottom:0}
body.auditorias-page .audit-row:hover{background:#f8fbff}
body.auditorias-page .audit-row>div{min-width:0}
body.auditorias-page .audit-row .audit-object{
 color:#183963;font-size:.85rem;line-height:1.36;font-weight:750;
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
 line-clamp:2;overflow:hidden;overflow-wrap:anywhere
}
body.auditorias-page .audit-row .audit-id{
 font-weight:750;color:#3d5c86;font-size:.85rem;text-align:center
}
body.auditorias-page .audit-row .audit-meta{
 font-size:.8rem;color:#536c8e;line-height:1.45;overflow-wrap:anywhere;text-align:center
}
body.auditorias-page .audit-row .audit-meta small{display:block;color:#69809e;font-size:.72rem}
body.auditorias-page .audit-row .audit-status{
 text-align:center;display:inline-block;max-width:100%;border-radius:8px;
 background:#eaf0fc;color:#284a79;font-size:.76rem;padding:6px 8px;overflow-wrap:normal
}
body.auditorias-page .audit-status.completed{background:#def4e9;color:#186442}
body.auditorias-page .audit-status.progress{background:#e6f0ff;color:#255495}
body.auditorias-page .audit-status.stopped{background:#f9e7e7;color:#973333}
body.auditorias-page .audit-row-actions{display:flex;justify-content:flex-end;gap:5px}
body.auditorias-page .audit-row-actions button{
 display:grid;place-items:center;min-width:32px;width:32px;height:34px;
 padding:0;border-radius:8px;border:1px solid #becfe8;
 background:#f7faff;color:#25528c;cursor:pointer
}
body.auditorias-page .audit-row-actions button.danger{color:#b5323b;border-color:#edc7cb}
body.auditorias-page .audit-row-actions button:hover{background:#e6f0fe}
body.auditorias-page .audit-row-actions svg{width:17px;height:17px}
body.auditorias-page .audit-details{
 grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
 gap:10px 16px;align-items:start;background:#f5f9ff;
 border-radius:9px;padding:14px;margin-top:2px;
}
body.auditorias-page .audit-details[hidden]{display:none!important}
body.auditorias-page .audit-detail{min-width:0}
body.auditorias-page .audit-detail.wide{grid-column:1/-1}
body.auditorias-page .audit-detail dt{
 color:#5b7395;font-weight:750;font-size:.74rem;margin-bottom:5px
}
body.auditorias-page .audit-detail dd{
 margin:0;color:#263b5a;font-size:.85rem;white-space:pre-wrap;
 overflow-wrap:anywhere;line-height:1.5
}
body.auditorias-page .audit-empty{
 padding:24px;border:1px dashed #c3d2e7;border-radius:12px;
 background:#fff;text-align:center;color:#617593
}
body.auditorias-page .audit-dialog{
 width:min(850px,calc(100% - 24px));max-height:92dvh;overflow:auto
}
body.auditorias-page .audit-dialog form{padding:21px 24px}
body.auditorias-page .audit-dialog .dialog-head h2{font-size:1.2rem;margin:0 0 18px}
body.auditorias-page .audit-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
body.auditorias-page .audit-fields>label{min-width:0;display:grid;gap:6px;font-size:.82rem;font-weight:700}
body.auditorias-page .audit-fields textarea{resize:vertical}
body.auditorias-page .audit-legacy{padding:10px;border:1px solid #dbe5f2;border-radius:10px}
body.auditorias-page .audit-legacy summary{cursor:pointer;font-size:.81rem;font-weight:650}
body.auditorias-page .audit-legacy label{margin:10px 0 7px;display:grid;gap:5px}
body.auditorias-page .audit-legacy small{font-size:.75rem;color:#667b9b}
body.auditorias-page .audit-import-dialog{
 width:min(960px,calc(100% - 22px));max-height:92dvh;
 overflow:auto;padding:20px 24px;border-radius:16px;background:#fff;color:#243b5f
}
body.auditorias-page .audit-import-head{
 display:flex;justify-content:space-between;align-items:flex-start;gap:12px
}
body.auditorias-page .audit-import-head h2{font-size:1.25rem;margin:5px 0}
body.auditorias-page .audit-import-dialog>p{font-size:.83rem;line-height:1.5;color:#5e7391}
body.auditorias-page .audit-import-controls{
 display:grid;grid-template-columns:minmax(170px,1fr) auto minmax(100px,130px) auto;
 gap:9px;align-items:end
}
body.auditorias-page .audit-import-controls label{display:grid;gap:5px;font-size:.81rem;font-weight:700;min-width:0}
body.auditorias-page .audit-import-controls select{width:100%;min-width:0;height:41px}
body.auditorias-page .audit-import-controls button{
 min-height:41px;border-radius:9px;padding:9px 12px;border:1px solid #bbcee8;
 background:#f0f5ff;color:#244a7f;font-weight:700;white-space:nowrap
}
body.auditorias-page .audit-import-controls button.primary{background:#17295c;color:#fff}
body.auditorias-page #paintImportNotice{margin:12px 0;font-size:.84rem;color:#516a8a}
body.auditorias-page .audit-import-help{margin:6px 0 12px}
body.auditorias-page .audit-import-candidate{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;margin-bottom:12px
}
body.auditorias-page .audit-import-candidate label{display:grid;gap:4px;min-width:0;font-size:.79rem;font-weight:650}
body.auditorias-page .audit-import-candidate label.wide{grid-column:1/-1}
body.auditorias-page .audit-import-candidate textarea{resize:vertical}
body.auditorias-page .audit-import-text{display:grid;gap:7px;font-size:.8rem;font-weight:700;margin-bottom:12px}
body.auditorias-page .audit-import-text textarea{
 width:100%;min-height:155px;resize:vertical;background:#f7faff;font-size:.81rem;
 white-space:pre-wrap;line-height:1.45
}
body.auditorias-page #usePaint{padding:11px 16px;border-radius:9px}
html[data-theme="dark"] body.auditorias-page .audit-filters,
html[data-theme="dark"] body.auditorias-page .audit-group,
html[data-theme="dark"] body.auditorias-page .audit-empty,
html[data-theme="dark"] body.auditorias-page .audit-import-dialog{
 background:#1e2e46;color:#f2f7ff;border-color:#4b6284
}
html[data-theme="dark"] body.auditorias-page .audit-group>summary,
html[data-theme="dark"] body.auditorias-page .audit-row .audit-object{color:#f1f6ff}
html[data-theme="dark"] body.auditorias-page .audit-row{border-color:#3f536e}
html[data-theme="dark"] body.auditorias-page .audit-row:hover{background:#283d58}
html[data-theme="dark"] body.auditorias-page :is(.audit-filters label,.audit-row .audit-meta,.audit-summary,.audit-row .audit-id){color:#d0e0f5}
html[data-theme="dark"] body.auditorias-page .audit-details{background:#293f5d}
html[data-theme="dark"] body.auditorias-page .audit-detail dt{color:#b7cde8}
html[data-theme="dark"] body.auditorias-page .audit-detail dd{color:#f2f7ff}
html[data-theme="dark"] body.auditorias-page .audit-count{background:#364c6a;color:#d5e5f8}
html[data-theme="dark"] body.auditorias-page .audit-row-actions button{background:#304663;color:#f3f7ff;border-color:#607ca2}
html[data-theme="dark"] body.auditorias-page .audit-row-actions button.danger{color:#ffcbd1;border-color:#976671}
html[data-theme="dark"] body.auditorias-page #importPaint,
html[data-theme="dark"] body.auditorias-page .audit-import-controls button:not(.primary),
html[data-theme="dark"] body.auditorias-page .audit-filters>button{
 background:#2f4667;color:#eef6ff;border-color:#5a759c
}
html[data-theme="dark"] body.auditorias-page .audit-status{background:#335172;color:#ebf5ff}
html[data-theme="dark"] body.auditorias-page .audit-status.completed{background:#2c6550;color:#e6fff3}
html[data-theme="dark"] body.auditorias-page .audit-status.stopped{background:#63394b;color:#ffe8f0}
html[data-theme="dark"] body.auditorias-page .audit-import-dialog>p,
html[data-theme="dark"] body.auditorias-page #paintImportNotice{color:#c7d8ed}
html[data-theme="dark"] body.auditorias-page .audit-import-text textarea{background:#182c45;color:#e9f5ff}
@media(max-width:850px){
 body.auditorias-page .audit-activities-page{padding:16px 13px 38px}
 body.auditorias-page .audit-row{
  grid-template-columns:50px minmax(0,1fr) minmax(100px,.6fr) 102px 103px;
  gap:8px;padding:11px 12px
 }
 body.auditorias-page .audit-hours{display:none}
 body.auditorias-page .audit-import-controls{grid-template-columns:1fr 1fr}
 body.auditorias-page .audit-import-controls label:first-child{grid-column:1/-1}
}
@media(max-width:650px){
 body.auditorias-page .audit-heading{flex-direction:column;align-items:stretch}
 body.auditorias-page .audit-heading-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body.auditorias-page .audit-heading-actions button{min-width:0;width:100%;white-space:normal;padding:10px}
 body.auditorias-page .audit-filters{grid-template-columns:1fr 1fr;gap:9px;padding:10px}
 body.auditorias-page .audit-filters label:first-child{grid-column:1/-1}
 body.auditorias-page .audit-filters>button{grid-column:1/-1}
 body.auditorias-page .audit-row{
  display:grid;grid-template-columns:1fr auto;gap:6px 10px;
  padding:12px;align-items:center
 }
 body.auditorias-page .audit-row .audit-id{grid-row:1;grid-column:1;text-align:left;font-size:.73rem}
 body.auditorias-page .audit-row .audit-object{grid-row:2;grid-column:1/-1}
 body.auditorias-page .audit-row .audit-period{grid-row:3;grid-column:1;text-align:left}
 body.auditorias-page .audit-row .audit-status-box{grid-row:3;grid-column:2}
 body.auditorias-page .audit-row-actions{grid-row:1;grid-column:2}
 body.auditorias-page .audit-row .audit-hours{display:none}
 body.auditorias-page .audit-row .audit-source{display:none}
 body.auditorias-page .audit-details{grid-template-columns:1fr 1fr}
 body.auditorias-page .audit-fields{grid-template-columns:1fr}
 body.auditorias-page .audit-fields .wide{grid-column:1}
 body.auditorias-page .audit-dialog form{padding:16px}
 body.auditorias-page .audit-import-dialog{padding:16px}
 body.auditorias-page .audit-import-candidate{grid-template-columns:1fr}
 body.auditorias-page .audit-import-candidate label.wide{grid-column:1}
}
@media(max-width:400px){
 body.auditorias-page .audit-heading-actions{grid-template-columns:1fr}
 body.auditorias-page .audit-import-controls{grid-template-columns:1fr}
 body.auditorias-page .audit-import-controls label:first-child{grid-column:1}
 body.auditorias-page .audit-details{grid-template-columns:1fr}
}

/* 13/10/2026: diálogos e filtros com espaço próprio, sem sobreposição. */
body.auditorias-page dialog.audit-import-dialog,
body.auditorias-page dialog.audit-dialog{
 box-sizing:border-box;position:fixed;inset:0;margin:auto;
 max-width:calc(100vw - 28px);max-height:calc(100dvh - 32px);
 overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
}
body.auditorias-page dialog::backdrop{background:rgba(5,24,51,.72)}
body.auditorias-page .audit-import-controls{grid-template-columns:minmax(0,2fr) auto minmax(0,1fr) auto}
body.auditorias-page .audit-import-controls>*{min-width:0}
body.auditorias-page .audit-import-controls :is(button,select){box-sizing:border-box;min-width:0;max-width:100%}
body.auditorias-page .audit-import-head button{flex:0 0 auto}
body.auditorias-page .audit-row{min-width:0}
@media(max-width:800px){
 body.auditorias-page .audit-import-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 body.auditorias-page .audit-import-controls label:first-child{grid-column:1/-1}
}
@media(max-width:600px){
 body.auditorias-page .audit-import-controls{grid-template-columns:minmax(0,1fr)}
 body.auditorias-page .audit-import-controls>*,
 body.auditorias-page .audit-import-controls label:first-child{grid-column:1}
 body.auditorias-page .audit-import-controls button{width:100%;white-space:normal}
 body.auditorias-page .audit-import-dialog{padding:16px 14px}
 body.auditorias-page .audit-filters{grid-template-columns:minmax(0,1fr)}
 body.auditorias-page .audit-filters>*,
 body.auditorias-page .audit-filters label:first-child{grid-column:1}
 body.auditorias-page .audit-heading-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 body.auditorias-page .audit-row{grid-template-columns:minmax(0,1fr) auto}
 body.auditorias-page .audit-row .audit-object{min-width:0;overflow-wrap:anywhere}
}
