/* Gestão TT | Importação de materiais por armário */
body.mt-import-open{overflow:hidden!important}
.mt-import-overlay[hidden]{display:none!important}
.mt-import-overlay{position:fixed;inset:0;z-index:2147482800;background:rgba(8,8,8,.55);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:18px}
.mt-import-dialog{width:min(900px,100%);max-height:94dvh;background:#fff;color:#080808;border:1px solid #E4E4E1;border-radius:19px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 30px 95px rgba(8,8,8,.18);font:400 13px/1.5 Inter,Arial,sans-serif}
.mt-import-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:21px 26px 18px;border-bottom:1px solid #EBEBE9}
.mt-import-kicker{font-size:10px;letter-spacing:.11em;font-weight:850;color:#E2001B}
.mt-import-head h3{font-size:23px;line-height:1.18;letter-spacing:-.035em;color:#080808;margin:4px 0 8px}
.mt-import-head p{font-size:12px;line-height:1.45;color:#626262;margin:0}
.mt-import-close{background:#F7F7F5;color:#333;border:1px solid #E6E6E3;border-radius:9px;width:35px;height:35px;flex:0 0 35px;font-size:24px;cursor:pointer}
.mt-import-body{padding:19px 26px 23px;overflow-y:auto;min-height:0}
.mt-import-guide{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#FCF8F8;border:1px solid #F7BCBC;border-radius:12px;padding:14px 16px;margin-bottom:16px}
.mt-import-guide strong{font-size:13px;color:#080808}
.mt-import-guide p{font-size:11.5px;line-height:1.5;color:#555;margin:4px 0 0;max-width:570px}
.mt-import-downloads{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.mt-import-template{padding:10px 13px;border-radius:9px;background:#fff;border:1px solid #E2001B;color:#99001A;font-size:11px;font-weight:850;white-space:nowrap;cursor:pointer}
.mt-import-file-field{border:1px dashed #D6D6D3;border-radius:11px;padding:13px 15px;background:#FAFAF9;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;color:#080808;font-weight:750;font-size:12px}
.mt-import-file-field input{max-width:100%;color:#555;font-size:12px}
.mt-import-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:15px}
.mt-import-option{display:flex;gap:11px;border:1px solid #E6E6E3;border-radius:11px;padding:13px;background:#fff;cursor:pointer;align-items:flex-start}
.mt-import-option input{width:17px;height:17px;flex:0 0 17px;accent-color:#E2001B;margin-top:2px}
.mt-import-option span{display:flex;flex-direction:column;gap:4px}
.mt-import-option strong{font-size:11.5px;color:#080808;line-height:1.3}
.mt-import-option small{font-size:10.5px;color:#626262;line-height:1.4}
.mt-import-warning{margin:14px 0 13px;padding:11px 13px;background:#F7F7F5;color:#555;font-size:11px;line-height:1.5;border-radius:9px;border:1px solid #E8E8E5}
.mt-import-warning strong{color:#080808}
.mt-import-feedback{border:1px solid #E6E6E3;border-radius:10px;padding:10px 13px;margin:0 0 14px;background:#F9F9F8;color:#494949;font-size:11.5px;line-height:1.5}
.mt-import-feedback[hidden]{display:none!important}
.mt-import-feedback[data-level="ok"]{background:#EFF9F2;color:#226341;border-color:#CFE9D7}
.mt-import-feedback[data-level="error"]{background:#FFF2F4;color:#99001A;border-color:#F7BCBC}
.mt-import-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:12px 0}
.mt-import-summary[hidden]{display:none!important}
.mt-import-summary>div{border:1px solid #E6E6E3;border-radius:10px;padding:11px 9px;background:#FFF;min-width:0}
.mt-import-summary strong{display:block;color:#080808;font-size:19px;font-weight:900;line-height:1.15}
.mt-import-summary span{display:block;color:#626262;font-size:10px;margin-top:5px;line-height:1.25}
.mt-import-summary .has-errors{background:#FFF2F4;border-color:#F7BCBC}
.mt-import-summary .has-errors strong{color:#99001A}
.mt-import-preview{max-height:258px;border:1px solid #E6E6E3;border-radius:10px;overflow:auto}
.mt-import-preview[hidden]{display:none!important}
.mt-import-preview table{width:100%;border-collapse:collapse;min-width:580px}
.mt-import-preview th,.mt-import-preview td{padding:9px 10px;text-align:left;border-bottom:1px solid #F0F0ED;font-size:11px;vertical-align:top;color:#303030}
.mt-import-preview th{background:#F7F7F5;color:#555;font-size:10px;position:sticky;top:0;z-index:1;font-weight:850}
.mt-import-preview td:nth-child(2),.mt-import-preview td:nth-child(3){max-width:215px;overflow-wrap:anywhere}
.mt-import-state{display:inline-block;border-radius:6px;padding:4px 6px;font-size:10px;font-weight:850;white-space:nowrap}
.mt-import-state.create{background:#EDF8F0;color:#286646}
.mt-import-state.update{background:#FFF1DD;color:#86540B}
.mt-import-state.skip{background:#F1F1F1;color:#626262}
.mt-import-state.error{background:#FFF1F2;color:#99001A}
.mt-import-issues{display:block;color:#99001A;font-size:10px;margin-top:5px;line-height:1.35}
.mt-import-failure{color:#99001A!important;font-size:11px!important}
.mt-import-footer{display:flex;align-items:center;justify-content:space-between;gap:13px;padding:15px 26px;background:#F7F7F5;border-top:1px solid #E7E7E4;flex-wrap:wrap}
.mt-import-footer>span{font-size:10.5px;color:#626262;line-height:1.4;max-width:420px;overflow-wrap:anywhere}
.mt-import-footer>div{display:flex;gap:8px}
.mt-import-footer button{padding:11px 14px;min-height:40px;border-radius:9px;border:1px solid #D9D9D5;background:#fff;color:#080808;font-size:11px;font-weight:850;cursor:pointer}
.mt-import-footer .mt-import-primary{background:#E2001B;border-color:#E2001B;color:#fff}
.mt-import-footer button:disabled{background:#E3E3E1;border-color:#E3E3E1;color:#777;cursor:not-allowed}
@media(max-width:740px){
 .mt-import-overlay{padding:8px}
 .mt-import-dialog{max-height:97dvh;border-radius:14px}
 .mt-import-head{padding:16px}
 .mt-import-head h3{font-size:19px}
 .mt-import-body{padding:14px}
 .mt-import-guide{padding:12px}
 .mt-import-options{grid-template-columns:1fr}
 .mt-import-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
 .mt-import-footer{padding:13px 14px}
 .mt-import-footer>div{width:100%}
 .mt-import-footer button{flex:1}
}


/* Diagnóstico detalhado das linhas inválidas */
.mt-import-errors[hidden]{display:none!important}
.mt-import-errors{background:#FFF9FA;border:1px solid #E2001B;border-radius:12px;margin:14px 0 17px;overflow:hidden}
.mt-import-errors-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:14px 16px;background:#FFF1F3;border-bottom:1px solid #F7BCBC}
.mt-import-errors-head strong{color:#99001A;font-size:13px;display:block;font-weight:900}
.mt-import-errors-head p{color:#62464A;font-size:11px;line-height:1.45;margin:5px 0 0}
.mt-import-errors-head button{color:#99001A;border:1px solid #E2001B;background:white;border-radius:8px;padding:9px 12px;font-size:11px;font-weight:850;cursor:pointer}
.mt-import-errors-head button:hover{background:#FFF7F7}
.mt-import-errors-list{max-height:290px;overflow:auto}
.mt-import-error-item{padding:12px 16px;background:#FFF;border-bottom:1px solid #F2E5E7}
.mt-import-error-item:last-child{border-bottom:0}
.mt-import-error-line{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;font-size:11px;color:#404040}
.mt-import-error-number{background:#99001A;color:white;border-radius:6px;padding:5px 8px;font-size:11px;font-weight:900;white-space:nowrap}
.mt-import-error-context{overflow-wrap:anywhere;font-size:11px}
.mt-import-error-context strong{color:#080808}
.mt-import-error-item ul{margin:9px 0 8px;padding-left:22px;color:#99001A;font-size:11.5px;line-height:1.6}
.mt-import-error-item li{padding-left:1px}
.mt-import-error-item button{border:none;background:none;color:#99001A;padding:4px 0;font-size:11px;font-weight:850;text-decoration:underline;cursor:pointer}
.mt-import-preview tr.mt-import-row-error{background:#FFF2F4!important}
.mt-import-preview tr.mt-import-row-error td{border-bottom:1px solid #F7BCBC!important}
.mt-import-preview tr.is-focused{outline:2px solid #E2001B;outline-offset:-2px;background:#FFE7EA!important}
@media(max-width:740px){.mt-import-errors-head{padding:13px}.mt-import-error-item{padding:12px}}
