/*
 * MasterPlating V1068 — FMEA: "Etapas da Receita" em linhas legíveis e alinhadas
 * Defeito corrigido: a grade da linha (.fmea-recipe-stage-row-main) tinha 9 colunas para 10 elementos
 * (faltava a coluna do número da etapa), então tudo deslocava uma posição e a "Característica" caía numa
 * coluna de 34 px (texto quebrando letra a letra). Aqui a grade é refeita para os 10 elementos, com
 * cabeçalho único de colunas, fontes legíveis e selos/botões no padrão do sistema (V804 / global-v156).
 * Carregada depois de tela-laboratorio.css. Só aparência.
 */
:root{--fer-borda:#d5e2f1;--fer-linha:#e5edf6;--fer-titulo:#12315e;--fer-texto:#1b2433;--fer-suave:#5b6576;--fer-mudo:#8a96a8}

/* ---------- abas do FMEA: cabem em uma linha */
#main .fmea-card .fmea-tabs{gap:6px !important}
#main .fmea-card .fmea-tab{padding:7px 9px !important;gap:6px !important;font-size:12px !important}
#main .fmea-card .fmea-tab .fmt-ico{width:20px;height:20px;font-size:11px}
#main .fmea-card .fmea-tab .fmt-num{min-width:20px;height:18px;padding:0 6px;font-size:11px}
/* V1078: abas com fundo discreto no padrão visual do MasterPlating */
#main .fmea-card .fmea-tabs{align-items:center;padding:2px 0}
#main .fmea-card .fmea-tab{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:34px;border:1px solid #d2e0f1 !important;border-radius:10px !important;
  background:#f1f6fc !important;color:#294b73 !important;
  box-shadow:0 1px 2px rgba(18,49,94,.04);font-weight:500 !important;
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;
}
#main .fmea-card .fmea-tab:hover{background:#e7f0fc !important;border-color:#a9c7eb !important;color:#164f91 !important}
#main .fmea-card .fmea-tab:focus-visible{outline:2px solid #5b9ce5;outline-offset:2px}
#main .fmea-card .fmea-tab.active{
  background:#dceafe !important;border-color:#78a9e8 !important;color:#145bb1 !important;
  box-shadow:inset 0 -2px 0 #176bd1,0 1px 3px rgba(23,107,209,.10);font-weight:700 !important;
}
#main .fmea-card .fmea-tab .fmt-ico{background:#e1ecfa;color:#1766b3;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;flex:none}
#main .fmea-card .fmea-tab.active .fmt-ico{background:#176bd1;color:#fff}
#main .fmea-card .fmea-tab .fmt-num{background:#dce7f5;color:#31577f;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;font-weight:700}
#main .fmea-card .fmea-tab.active .fmt-num{background:#176bd1;color:#fff}
/* sem espaço para as 7 abas em uma linha: tira só o ícone (rótulo e contagem ficam) */
#main .fmea-card .fmea-tabs{container-type:inline-size}
@container (max-width:1150px){#main .fmea-card .fmea-tab .fmt-ico{display:none}}

/* ---------- lista de etapas */
#main .fmea-page .fmea-recipe-stages{padding:14px}
#main .fmea-page .fmea-recipe-stages-head h4{font-size:15px;color:var(--fer-titulo)}
#main .fmea-page .fmea-recipe-stages-head p{font-size:12px;color:var(--fer-suave)}
#main .fmea-page .fmea-recipe-stage-list{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;min-width:0}

/* grade única: número | etapa/tanque | função | característica | S | O | D | NPR | AP | ações */
#main .fmea-page .fmea-recipe-stage-cols,
#main .fmea-page .fmea-recipe-stage-row-main{display:grid;grid-template-columns:44px minmax(190px,1.3fr) minmax(150px,1fr) minmax(170px,1.2fr) 40px 40px 40px 54px 96px 76px;align-items:stretch;min-width:0}
#main .fmea-page .fmea-recipe-stage-cols{padding:0 1px 0 5px;margin-bottom:-1px}
#main .fmea-page .fmea-recipe-stage-cols span{padding:4px 8px;font-size:10.5px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;color:var(--fer-suave);text-align:left}
#main .fmea-page .fmea-recipe-stage-cols span:nth-child(n+5):nth-child(-n+9){text-align:center;padding-left:0;padding-right:0}
#main .fmea-page .fmea-recipe-stage-row-main>*{min-width:0}

#main .fmea-page .fmea-recipe-stage-row{border-radius:10px;background:#fff}
#main .fmea-page .fmea-recipe-stage-row.no-risks{background:#fbfcfe}
#main .fmea-page .fmea-recipe-stage-row .fmea-recipe-stage-number{align-self:center;justify-self:center;flex:none;width:28px;height:28px;margin:0;font-size:12px}

/* etapa / tanque */
#main .fmea-page .fmea-recipe-stage-row .fmea-recipe-stage-title{display:flex;flex-direction:column;justify-content:center;gap:2px;padding:9px 10px;min-width:0}
#main .fmea-page .fmea-recipe-stage-row .fmea-recipe-stage-title strong{font-size:13px;line-height:1.3;font-weight:600;color:var(--fer-titulo);overflow-wrap:anywhere}
#main .fmea-page .fmea-recipe-stage-row .fmea-recipe-stage-title small{font-size:11.5px;line-height:1.3;color:var(--fer-suave)}
#main .fmea-page .fmea-recipe-stage-row .fmea-recipe-stage-kind{align-self:flex-start;width:max-content;max-width:100%;height:20px;display:inline-flex;align-items:center;margin-top:3px;padding:0 8px;font-size:11px;font-weight:600;border-radius:10px}

/* função e característica: texto legível; rótulos só no cabeçalho (ficam acessíveis para leitor de tela) */
#main .fmea-page .fmea-recipe-stage-data{display:flex;flex-direction:column;justify-content:center;gap:0;padding:8px 10px;border-left:1px solid var(--fer-linha);overflow-wrap:anywhere}
#main .fmea-page .fmea-recipe-stage-data strong{font-size:12.5px;line-height:1.35;font-weight:500;color:var(--fer-texto)}
#main .fmea-page .fmea-recipe-stage-row.no-risks .fmea-recipe-stage-data strong{color:var(--fer-mudo);font-weight:400}
#main .fmea-page .fmea-recipe-stage-data small,
#main .fmea-page .fmea-recipe-stage-score small,
#main .fmea-page .fmea-recipe-stage-ap small{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* S O D NPR */
#main .fmea-page .fmea-recipe-stage-score{display:flex;align-items:center;justify-content:center;border-left:1px solid var(--fer-linha);padding:4px 0}
#main .fmea-page .fmea-recipe-stage-score strong{font-size:14px;font-weight:700;line-height:1;color:var(--fer-titulo);font-variant-numeric:tabular-nums}
#main .fmea-page .fmea-recipe-stage-score.empty strong{color:#b4bfcc;font-weight:500}
#main .fmea-page .fmea-recipe-stage-npr.danger strong{color:#9f2a20}
#main .fmea-page .fmea-recipe-stage-npr.amber strong{color:#8a3b00}
#main .fmea-page .fmea-recipe-stage-npr.ok strong{color:#1e6b40}

/* AP: selo no padrão V804 (22 px) */
#main .fmea-page .fmea-recipe-stage-ap{display:flex;align-items:center;justify-content:center;border-left:1px solid var(--fer-linha);padding:4px 6px}
#main .fmea-page .fmea-recipe-stage-ap span{display:inline-flex;align-items:center;justify-content:center;width:auto;max-width:100%;height:22px;padding:0 10px;border:1px solid transparent;border-radius:11px;font-size:11.5px;font-weight:600;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:var(--mps-normal-bg,#e3f4ea);color:var(--mps-normal-fg,#1e6b40);border-color:var(--mps-normal-bd,#b5dfc5)}
#main .fmea-page .fmea-recipe-stage-ap span.danger{background:var(--mps-critico-bg,#fbe3e1);color:var(--mps-critico-fg,#9f2a20);border-color:var(--mps-critico-bd,#f2b8b2)}
#main .fmea-page .fmea-recipe-stage-ap span.amber{background:var(--mps-alerta-bg,#fdecd9);color:var(--mps-alerta-fg,#8a3b00);border-color:var(--mps-alerta-bd,#f3c99d)}
#main .fmea-page .fmea-recipe-stage-ap span.empty{background:var(--mps-neutro-bg,#eef1f5);color:var(--mps-neutro-fg,#4f5b6d);border-color:var(--mps-neutro-bd,#dce3ec);font-weight:500}

/* ações: botões de 30 px no padrão */
#main .fmea-page .fmea-recipe-stage-row-actions{display:flex;align-items:center;justify-content:center;gap:6px;padding:4px 8px;border-left:1px solid var(--fer-linha)}
#main .fmea-page .fmea-stage-icon-action{width:30px;height:30px;min-width:30px;min-height:30px;padding:0;border:1px solid #c7d5e5;border-radius:7px;background:#fff;color:#1766b3;font-size:15px}
#main .fmea-page .fmea-stage-icon-action:hover{background:#eef5fc;border-color:#9bb8d8}
#main .fmea-page .fmea-stage-icon-action.add{font-size:18px}
#main .fmea-page .fmea-stage-icon-action[aria-expanded="true"]{background:#e7f1fd;border-color:#9bb8d8}

/* observações / condições da etapa */
#main .fmea-page .fmea-recipe-stage-extra{padding:0 12px 9px 52px}
#main .fmea-page .fmea-recipe-stage-extra span{font-size:11px}
#main .fmea-page .fmea-recipe-stage-row .fmea-recipe-stage-risk-details{margin:0 10px 10px 52px}

/* ---------- telas médias: duas linhas por etapa (rótulos voltam a aparecer) */
@media(max-width:1100px){
  #main .fmea-page .fmea-recipe-stage-cols{display:none}
  #main .fmea-page .fmea-recipe-stage-row-main{grid-template-columns:44px minmax(150px,1fr) 40px 40px 40px 54px 96px 76px}
  #main .fmea-page .fmea-recipe-stage-func{grid-column:1 / 5;grid-row:2;border-left:0;border-top:1px solid var(--fer-linha)}
  #main .fmea-page .fmea-recipe-stage-char{grid-column:5 / -1;grid-row:2;border-top:1px solid var(--fer-linha)}
  #main .fmea-page .fmea-recipe-stage-data small,#main .fmea-page .fmea-recipe-stage-score small,#main .fmea-page .fmea-recipe-stage-ap small{position:static;width:auto;height:auto;margin:0 0 1px;overflow:visible;clip:auto;font-size:10.5px;color:var(--fer-suave)}
  #main .fmea-page .fmea-recipe-stage-score{flex-direction:column;gap:2px}
  #main .fmea-page .fmea-recipe-stage-ap{flex-direction:column;gap:3px}
  #main .fmea-page .fmea-recipe-stage-number{grid-row:1}
}
/* celular: empilhado */
@media(max-width:640px){
  #main .fmea-page .fmea-recipe-stage-row-main{grid-template-columns:repeat(4,minmax(0,1fr))}
  #main .fmea-page .fmea-recipe-stage-number{grid-column:1;grid-row:1}
  #main .fmea-page .fmea-recipe-stage-title{grid-column:2 / -1;grid-row:1}
  #main .fmea-page .fmea-recipe-stage-func{grid-column:1 / -1;grid-row:2}
  #main .fmea-page .fmea-recipe-stage-char{grid-column:1 / -1;grid-row:3;border-left:0}
  #main .fmea-page .fmea-recipe-stage-score{grid-row:4;padding:8px 0;border-top:1px solid var(--fer-linha)}
  #main .fmea-page .fmea-recipe-stage-ap{grid-column:1 / 4;grid-row:5;border-left:0;border-top:1px solid var(--fer-linha)}
  #main .fmea-page .fmea-recipe-stage-row-actions{grid-column:4;grid-row:5;border-top:1px solid var(--fer-linha)}
  #main .fmea-page .fmea-recipe-stage-extra,#main .fmea-page .fmea-recipe-stage-row .fmea-recipe-stage-risk-details{margin-left:10px;padding-left:10px}
}


/* V1069 — detalhes de risco com hierarquia visual do sistema e ações compactas */
#main .fmea-page .fmea-recipe-stage-row-actions{min-width:0;gap:4px;padding:4px 5px}
#main .fmea-page .fmea-recipe-stage-row-actions .fmea-stage-icon-action{flex:0 0 30px;white-space:nowrap;overflow:hidden;text-overflow:clip}
#main .fmea-page .fmea-recipe-stage-row-actions .fmea-stage-icon-action[aria-expanded="true"]{color:#1766b3;background:#e7f1fd}
#main .fmea-page .fmea-recipe-stage-risk-details{display:grid;gap:8px;padding:8px 10px 10px;margin:0 10px 10px 52px;border:1px solid #d5e2f1;border-radius:10px;background:#f8fbff;min-width:0}
#main .fmea-page .fmea-recipe-stage-risk-details[hidden]{display:none !important}
#main .fmea-page .fmea-recipe-stage-risk-item{min-width:0;background:transparent;border:0;padding:0;margin:0}
#main .fmea-page .fmea-recipe-stage-risk-title{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:1px 2px 7px;border-bottom:1px solid #e1eaf5;margin-bottom:8px}
#main .fmea-page .fmea-recipe-stage-risk-title>strong{font-size:12px;line-height:1.35;color:#12315e;font-weight:700}
#main .fmea-page .fmea-recipe-stage-risk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;min-width:0}
#main .fmea-page .fmea-recipe-stage-risk-grid>div{display:flex;align-items:flex-start;gap:8px;min-width:0;padding:9px 10px;border:1px solid #d9e5f2;border-radius:8px;background:#fff;overflow-wrap:anywhere}
#main .fmea-page .fmea-recipe-stage-risk-grid>div>div{display:flex;flex-direction:column;gap:3px;min-width:0}
#main .fmea-page .fmea-recipe-stage-risk-grid .risk-detail-effect{background:#fff8f0;border-color:#ffc98e}
#main .fmea-page .fmea-recipe-stage-risk-grid .risk-detail-mode{background:#fff4f4;border-color:#f5c9ce}
#main .fmea-page .fmea-recipe-stage-risk-grid .risk-detail-cause{background:#fff4f4;border-color:#f5c9ce}
#main .fmea-page .fmea-recipe-stage-risk-grid .risk-detail-action{background:#f1fbf5;border-color:#b9e4ca}
#main .fmea-page .risk-detail-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 23px;width:23px;height:23px;border-radius:7px;background:rgba(255,255,255,.8);font-size:14px;font-weight:700;color:#b45309}
#main .fmea-page .risk-detail-mode .risk-detail-icon,#main .fmea-page .risk-detail-cause .risk-detail-icon{color:#c2414b}
#main .fmea-page .risk-detail-action .risk-detail-icon{color:#238453}
#main .fmea-page .fmea-recipe-stage-risk-grid small,#main .fmea-page .fmea-recipe-stage-risk-meta small{display:block;font-size:10px;line-height:1.3;color:#64748b;margin-bottom:3px}
#main .fmea-page .fmea-recipe-stage-risk-grid span:not(.risk-detail-icon){display:block;font-size:11px;line-height:1.4;color:#17365f;overflow-wrap:anywhere}
#main .fmea-page .fmea-recipe-stage-risk-meta{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;margin-top:8px;border:1px solid #e0eaf5;border-radius:8px;overflow:hidden;background:#fff}
#main .fmea-page .fmea-recipe-stage-risk-meta>div{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;padding:7px 9px;border-right:1px solid #e0eaf5;overflow-wrap:anywhere}
#main .fmea-page .fmea-recipe-stage-risk-meta>div:last-child{border-right:0}
#main .fmea-page .fmea-recipe-stage-risk-meta span{font-size:10.5px;line-height:1.35;color:#17365f}
#main .fmea-page .fmea-risk-status{align-self:flex-start;display:inline-flex;padding:3px 8px;border-radius:10px;font-size:10px;font-weight:600}
#main .fmea-page .fmea-risk-status.open{background:#fff0d6;color:#97500a}
#main .fmea-page .fmea-risk-status.done{background:#e4f5eb;color:#176b42}
@media(max-width:1100px){
 #main .fmea-page .fmea-recipe-stage-risk-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #main .fmea-page .fmea-recipe-stage-risk-meta{grid-template-columns:repeat(3,minmax(0,1fr))}
 #main .fmea-page .fmea-recipe-stage-risk-meta>div:nth-child(3){border-right:0}
 #main .fmea-page .fmea-recipe-stage-risk-meta>div:nth-child(n+4){border-top:1px solid #e0eaf5}
}
@media(max-width:640px){
 #main .fmea-page .fmea-recipe-stage-risk-details{margin:0 8px 8px;padding:8px}
 #main .fmea-page .fmea-recipe-stage-risk-grid{grid-template-columns:minmax(0,1fr)}
 #main .fmea-page .fmea-recipe-stage-risk-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
 #main .fmea-page .fmea-recipe-stage-risk-meta>div{border-top:1px solid #e0eaf5;border-right:1px solid #e0eaf5}
 #main .fmea-page .fmea-recipe-stage-risk-meta>div:nth-child(2n){border-right:0}
 #main .fmea-page .fmea-recipe-stage-risk-meta>div:nth-child(-n+2){border-top:0}
}


/* V1071 — Detalhes do risco mais compactos, alinhados e no padrão visual MasterPlating */
#main .fmea-page .fmea-recipe-stage-risk-details{
  gap:7px;padding:8px;margin:0 10px 9px 52px;background:#f7faff;border-color:#d5e2f1;
}
#main .fmea-page .fmea-recipe-stage-risk-item{min-width:0;}
#main .fmea-page .fmea-recipe-stage-risk-title{padding:2px 2px 6px;margin-bottom:7px;align-items:center;}
#main .fmea-page .fmea-recipe-stage-risk-title>strong{font-size:12px;line-height:1.35;}
#main .fmea-page .fmea-recipe-stage-risk-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;align-items:stretch;
}
#main .fmea-page .fmea-recipe-stage-risk-grid>div{
  display:grid;grid-template-columns:25px minmax(0,1fr);align-content:start;align-items:start;gap:7px;
  min-height:0;height:100%;box-sizing:border-box;padding:8px 9px;border-radius:8px;
}
#main .fmea-page .fmea-recipe-stage-risk-grid>div>div{display:flex;flex-direction:column;gap:4px;min-width:0;}
#main .fmea-page .fmea-recipe-stage-risk-grid .risk-detail-icon{
  flex:0 0 23px;width:23px;height:23px;margin-top:1px;border:1px solid rgba(18,49,94,.07);
}
#main .fmea-page .fmea-recipe-stage-risk-grid small{font-size:10px;line-height:1.3;font-weight:600;color:#5b6f89;margin:1px 0 0;}
#main .fmea-page .fmea-recipe-stage-risk-grid span:not(.risk-detail-icon){font-size:11px;line-height:1.4;color:#17365f;overflow-wrap:anywhere;}
#main .fmea-page .fmea-recipe-stage-risk-meta{
  grid-template-columns:repeat(6,minmax(0,1fr));margin-top:7px;border-radius:8px;
}
#main .fmea-page .fmea-recipe-stage-risk-meta>div{
  min-width:0;min-height:54px;box-sizing:border-box;padding:7px 9px;gap:4px;
}
#main .fmea-page .fmea-recipe-stage-risk-meta small{font-size:10px;line-height:1.25;font-weight:600;color:#64748b;margin:0;}
#main .fmea-page .fmea-recipe-stage-risk-meta span{font-size:10.5px;line-height:1.35;overflow-wrap:anywhere;}
#main .fmea-page .fmea-risk-status{padding:3px 8px;white-space:nowrap;}
@media(max-width:1100px){
 #main .fmea-page .fmea-recipe-stage-risk-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 #main .fmea-page .fmea-recipe-stage-risk-meta{grid-template-columns:repeat(3,minmax(0,1fr));}
 #main .fmea-page .fmea-recipe-stage-risk-meta>div:nth-child(3){border-right:0;}
 #main .fmea-page .fmea-recipe-stage-risk-meta>div:nth-child(n+4){border-top:1px solid #e0eaf5;}
}
@media(max-width:640px){
 #main .fmea-page .fmea-recipe-stage-risk-details{margin:0 8px 8px;padding:7px;}
 #main .fmea-page .fmea-recipe-stage-risk-grid{grid-template-columns:minmax(0,1fr);}
 #main .fmea-page .fmea-recipe-stage-risk-meta{grid-template-columns:repeat(2,minmax(0,1fr));}
 #main .fmea-page .fmea-recipe-stage-risk-meta>div{min-height:48px;}
}

/* V1072 — Ênfase e cards no padrão visual MasterPlating/Henkaten */
#main .fmea-page .fmea-recipe-stage-risk-details{
  gap:9px;padding:10px;margin:0 10px 10px 52px;
  border:1px solid #cbdcf0;border-radius:10px;background:#f3f7fc;
  box-shadow:0 2px 7px rgba(23,54,95,.06);
}
#main .fmea-page .fmea-recipe-stage-risk-title{
  padding:2px 3px 8px;margin:0 0 1px;border-bottom:1px solid #d9e5f2;
}
#main .fmea-page .fmea-recipe-stage-risk-title>strong{
  font-size:13px;line-height:1.4;font-weight:700;color:#12315e;
}
#main .fmea-page .fmea-recipe-stage-risk-grid{gap:8px;}
#main .fmea-page .fmea-recipe-stage-risk-grid>div{
  position:relative;min-height:76px;padding:10px 11px;border-radius:9px;
  box-shadow:0 1px 2px rgba(18,49,94,.04);transition:box-shadow .15s ease,border-color .15s ease;
}
#main .fmea-page .fmea-recipe-stage-risk-grid>div:hover{
  box-shadow:0 3px 9px rgba(18,49,94,.09);border-color:#b6cce5;
}
#main .fmea-page .fmea-recipe-stage-risk-grid .risk-detail-effect{
  background:#fff8ed;border-color:#f4c27d;border-left:4px solid #f28c16;
}
#main .fmea-page .fmea-recipe-stage-risk-grid .risk-detail-mode{
  background:#fff4f4;border-color:#f2c3c7;border-left:4px solid #dc4545;
}
#main .fmea-page .fmea-recipe-stage-risk-grid .risk-detail-cause{
  background:#fff4f4;border-color:#f2c3c7;border-left:4px solid #dc4545;
}
#main .fmea-page .fmea-recipe-stage-risk-grid .risk-detail-action{
  background:#f0faf4;border-color:#b6dfc6;border-left:4px solid #29945e;
}
#main .fmea-page .fmea-recipe-stage-risk-grid .risk-detail-icon{
  width:25px;height:25px;flex-basis:25px;border-radius:8px;background:#fff;
  border:1px solid rgba(18,49,94,.1);font-size:14px;
}
#main .fmea-page .fmea-recipe-stage-risk-grid small{
  margin:1px 0 3px;font-size:10.5px;line-height:1.35;font-weight:700;color:#526984;
}
#main .fmea-page .fmea-recipe-stage-risk-grid span:not(.risk-detail-icon){
  font-size:11.5px;line-height:1.45;font-weight:600;color:#12315e;
}
#main .fmea-page .fmea-recipe-stage-risk-meta{
  gap:6px;margin-top:0;border:0;border-radius:0;background:transparent;overflow:visible;
}
#main .fmea-page .fmea-recipe-stage-risk-meta>div{
  min-height:58px;padding:8px 10px;gap:4px;border:1px solid #d7e3f1;border-radius:8px;
  background:#fff;box-shadow:0 1px 2px rgba(18,49,94,.03);
}
#main .fmea-page .fmea-recipe-stage-risk-meta>div:last-child{border-right:1px solid #d7e3f1;}
#main .fmea-page .fmea-recipe-stage-risk-meta small{font-size:10px;font-weight:700;color:#60758f;}
#main .fmea-page .fmea-recipe-stage-risk-meta span{font-size:11px;line-height:1.4;color:#17365f;}
#main .fmea-page .fmea-risk-status{padding:4px 9px;font-size:10.5px;font-weight:700;border:1px solid transparent;}
#main .fmea-page .fmea-risk-status.open{background:#fff0d6;color:#97500a;border-color:#f1d09a;}
#main .fmea-page .fmea-risk-status.done{background:#e4f5eb;color:#176b42;border-color:#b5dfc5;}
@media(max-width:1100px){
 #main .fmea-page .fmea-recipe-stage-risk-meta{gap:5px;}
 #main .fmea-page .fmea-recipe-stage-risk-meta>div{border:1px solid #d7e3f1!important;}
}
@media(max-width:640px){
 #main .fmea-page .fmea-recipe-stage-risk-details{margin:0 8px 8px;padding:8px;}
 #main .fmea-page .fmea-recipe-stage-risk-grid>div{min-height:68px;}
 #main .fmea-page .fmea-recipe-stage-risk-meta{gap:5px;}
}

/* V1073 — Formulário de identificação/revisão do FMEA, padrão visual MasterPlating */
#main .fmea-page .fmea-header-form-shell{padding:0!important;overflow:hidden;background:#fff;border:1px solid #d5e2f1;border-radius:12px;box-shadow:0 3px 12px rgba(18,49,94,.06)}
#main .fmea-page .fmea-header-form{padding:0;min-width:0}
#main .fmea-page .fmea-header-form-head{display:flex;align-items:center;gap:12px;padding:15px 18px;border-bottom:1px solid #dce7f4;background:linear-gradient(110deg,#f3f8ff,#fff)}
#main .fmea-page .fmea-header-form-icon{display:flex;align-items:center;justify-content:center;flex:0 0 42px;width:42px;height:42px;border-radius:10px;background:#e7f1ff;color:#1769bd;font-size:22px;font-weight:700}
#main .fmea-page .fmea-header-form-head h3{margin:0;color:#12315e;font-size:18px;line-height:1.3;font-weight:700}
#main .fmea-page .fmea-header-form-head p{margin:4px 0 0;color:#667b96;font-size:12px;line-height:1.4}
#main .fmea-page .fmea-header-form-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;padding:14px 18px 0;min-width:0}
#main .fmea-page .fmea-header-form-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
#main .fmea-page .fmea-header-form-grid-4{grid-template-columns:minmax(235px,1.35fr) minmax(175px,1fr) minmax(95px,.45fr) minmax(165px,.8fr)}
#main .fmea-page .fmea-header-form-grid-2{grid-template-columns:minmax(220px,.85fr) minmax(0,1.4fr);padding-top:12px;padding-bottom:16px}
#main .fmea-page .fmea-header-form-reason{padding:10px 18px 15px;min-width:0}
#main .fmea-page .fmea-header-form-reason .field textarea{min-height:66px;max-height:140px;resize:vertical}
#main .fmea-page .fmea-header-form .field{min-width:0;margin:0}
#main .fmea-page .fmea-header-form .field label{display:block;margin:0 0 6px;color:#435b78;font-size:12px;font-weight:700;line-height:1.35}
#main .fmea-page .fmea-header-form .fmea-required{color:#d94841}
#main .fmea-page .fmea-header-form .field input,
#main .fmea-page .fmea-header-form .field select,
#main .fmea-page .fmea-header-form .field textarea{box-sizing:border-box;width:100%;min-width:0;min-height:39px;border:1px solid #cbd9eb;border-radius:8px;background:#fff;padding:9px 11px;color:#17365f;font:inherit;font-size:13px;line-height:1.4;box-shadow:none;transition:border-color .15s ease,box-shadow .15s ease}
#main .fmea-page .fmea-header-form .field textarea{min-height:84px;resize:vertical}
#main .fmea-page .fmea-header-form .field input:focus,
#main .fmea-page .fmea-header-form .field select:focus,
#main .fmea-page .fmea-header-form .field textarea:focus{outline:none;border-color:#2f80d5;box-shadow:0 0 0 3px rgba(47,128,213,.12)}
#main .fmea-page .fmea-header-form .field input:disabled{background:#f2f5f9;color:#7d8da3;cursor:not-allowed}
#main .fmea-page .fmea-header-form .field>small{display:block;margin-top:5px;color:#8292a8;font-size:10.5px;line-height:1.4}
#main .fmea-page .fmea-label-line{display:flex;align-items:center;justify-content:space-between;gap:8px}
#main .fmea-page .fmea-char-count{font-size:10px;color:#8393a8;font-variant-numeric:tabular-nums;white-space:nowrap}
#main .fmea-page .fmea-char-count.is-limit{color:#c2413a;font-weight:700}
#main .fmea-page .fmea-header-form-actions{display:flex;align-items:center;gap:8px;padding:13px 18px 16px;border-top:1px solid #e3ebf5;background:#fbfdff}
#main .fmea-page .fmea-header-form-actions button{min-height:34px;padding:7px 14px;border-radius:7px;font-size:12px;font-weight:600;cursor:pointer}
#main .fmea-page .fmea-header-form-actions .fmea-cancel{border:1px solid #cbd9eb;background:#fff;color:#365574}
#main .fmea-page .fmea-header-form-actions .fmea-cancel:hover{background:#f1f6fc;border-color:#a9bfd9}
@media(max-width:1000px){
 #main .fmea-page .fmea-header-form-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
 #main .fmea-page .fmea-header-form-grid-4>.field:first-child{grid-column:1/-1}
}
@media(max-width:850px){
 #main .fmea-page .fmea-header-form-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
 #main .fmea-page .fmea-header-form-grid-3>.field:first-child{grid-column:1/-1}
 #main .fmea-page .fmea-header-form-grid-2{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:560px){
 #main .fmea-page .fmea-header-form-head{padding:12px}
 #main .fmea-page .fmea-header-form-grid,#main .fmea-page .fmea-header-form-grid-3,#main .fmea-page .fmea-header-form-grid-4,#main .fmea-page .fmea-header-form-grid-2{grid-template-columns:minmax(0,1fr);padding:12px 12px 0;gap:11px}
 #main .fmea-page .fmea-header-form-grid-3>.field:first-child,#main .fmea-page .fmea-header-form-grid-4>.field:first-child{grid-column:auto}
 #main .fmea-page .fmea-header-form-reason{padding:12px 12px 13px}
 #main .fmea-page .fmea-header-form-grid-2{padding-bottom:13px}
 #main .fmea-page .fmea-header-form-actions{padding:12px;flex-wrap:wrap}
}


/* V1074 — Espaçamento entre os cards de detalhes e a faixa de metadados do risco */
#main .fmea-page .fmea-recipe-stage-risk-meta{
  margin-top:12px !important;
}
@media(max-width:640px){
  #main .fmea-page .fmea-recipe-stage-risk-meta{margin-top:9px !important;}
}

/* V1076 — carregamento progressivo das etapas da Receita */
.fmea-recipe-loading {
  display: flex; align-items: center; gap: 9px; min-height: 40px;
  padding: 10px 13px; border: 1px dashed #cfdef0; border-radius: 9px;
  background: #f7faff; color: #617995; font-size: 12px;
}
.fmea-recipe-loading::before {
  content: ""; width: 14px; height: 14px; flex: 0 0 14px;
  border: 2px solid #d4e2f4; border-top-color: #2875cb; border-radius: 50%;
  animation: fmea-recipe-loading-spin .75s linear infinite;
}
@keyframes fmea-recipe-loading-spin { to { transform: rotate(360deg); } }


/* V1079 — Abas FMEA em uma única linha e títulos com maior hierarquia visual */
#main .fmea-card .fmea-tabs{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:5px !important;
  max-width:100%;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  white-space:nowrap;
  padding:3px 2px 6px !important;
  scrollbar-width:thin;
  scrollbar-color:#b9cde6 transparent;
}
#main .fmea-card .fmea-tab{
  flex:0 0 auto !important;
  white-space:nowrap !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  min-width:max-content;
  padding:6px 8px !important;
  gap:5px !important;
  font-size:11.5px !important;
  line-height:1.2 !important;
}
#main .fmea-card .fmea-tab .fmt-num{flex:0 0 auto;}
#main .fmea-card .fmea-tabs::-webkit-scrollbar{height:5px;}
#main .fmea-card .fmea-tabs::-webkit-scrollbar-thumb{background:#c8d8eb;border-radius:8px;}
#main .fmea-card .fmea-tabs::-webkit-scrollbar-track{background:transparent;}

/* Título da seção Receita com a marca laranja do MasterPlating */
#main .fmea-page .fmea-recipe-stages-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
  margin-bottom:10px;
}
#main .fmea-page .fmea-recipe-stages-head h4{
  display:flex;
  align-items:center;
  gap:9px;
  margin:0;
  color:#12315e;
  font-size:16px !important;
  line-height:1.3;
  font-weight:800 !important;
  letter-spacing:-.15px;
}
#main .fmea-page .fmea-recipe-stages-head h4::before{
  content:"";
  display:block;
  flex:0 0 3px;
  width:3px;
  height:19px;
  border-radius:3px;
  background:#ff8617;
}
#main .fmea-page .fmea-recipe-stages-head p{
  margin:4px 0 0 12px;
  color:#60758f;
  font-size:12px;
  line-height:1.4;
}
#main .fmea-page .fmea-recipe-badge{
  flex:0 0 auto;
  font-weight:700;
  border-color:#cbdcf2;
  background:#f0f6fd;
  color:#285680;
}

/* Cabeçalho de colunas mais evidente, sem alterar a grade de dados */
#main .fmea-page .fmea-recipe-stage-cols{
  align-items:center;
  min-height:28px;
  padding:0 1px 5px 5px !important;
  border-bottom:1px solid #cbdcf0;
  margin-bottom:2px !important;
}
#main .fmea-page .fmea-recipe-stage-cols span{
  color:#294b73 !important;
  font-size:10.5px !important;
  font-weight:800 !important;
  letter-spacing:.45px;
  line-height:1.25;
  white-space:nowrap;
}
@media(max-width:760px){
  #main .fmea-page .fmea-recipe-stages-head{align-items:flex-start;}
  #main .fmea-page .fmea-recipe-badge{white-space:normal;text-align:right;max-width:46%;}
  #main .fmea-card .fmea-tabs{scroll-snap-type:x proximity;}
  #main .fmea-card .fmea-tab{scroll-snap-align:start;}
}
@media(max-width:480px){
  #main .fmea-page .fmea-recipe-stages-head{flex-direction:column;}
  #main .fmea-page .fmea-recipe-badge{max-width:100%;text-align:left;}
}


/* V1080 — Cabeçalho de colunas de Etapas da Receita com maior contraste e alinhamento */
#main .fmea-page .fmea-recipe-stage-cols{
  display:grid;
  align-items:stretch;
  min-height:36px;
  box-sizing:border-box;
  margin:0 0 6px !important;
  padding:0 1px !important;
  border:1px solid #cbdcf0 !important;
  border-radius:8px;
  background:#eaf2fc;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
  overflow:hidden;
}
#main .fmea-page .fmea-recipe-stage-cols span{
  display:flex;
  align-items:center;
  min-width:0;
  box-sizing:border-box;
  padding:8px 10px !important;
  color:#193d66 !important;
  font-size:10.5px !important;
  line-height:1.2;
  font-weight:800 !important;
  letter-spacing:.45px;
  text-transform:uppercase;
  white-space:nowrap;
  border-right:1px solid #d5e2f1;
}
#main .fmea-page .fmea-recipe-stage-cols span:nth-child(n+5):nth-child(-n+9){
  justify-content:center;
  text-align:center;
  padding-left:2px !important;
  padding-right:2px !important;
}
#main .fmea-page .fmea-recipe-stage-cols span:last-child{border-right:0;}
#main .fmea-page .fmea-recipe-stage-cols + .fmea-recipe-stage-list{margin-top:0;}
@media(max-width:1100px){
  #main .fmea-page .fmea-recipe-stage-cols{display:none !important;}
}


/* V1081 — Indicadores S/O/D/NPR/AP com cores suaves no padrão MasterPlating.
   Alteração estritamente visual: mantém valores, classes de risco e cálculos originais. */
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(5),
#main .fmea-page .fmea-recipe-stage-cols span:nth-child(5){
  background:#fff0ef;
}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(5){
  border-left-color:#f4c5c1; border-radius:7px; margin:2px 0;
}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(5) strong,
#main .fmea-page .fmea-recipe-stage-cols span:nth-child(5){color:#b93832 !important;}

#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(6),
#main .fmea-page .fmea-recipe-stage-cols span:nth-child(6){
  background:#fff5e4;
}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(6){
  border-left-color:#f0d5a8; border-radius:7px; margin:2px 0;
}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(6) strong,
#main .fmea-page .fmea-recipe-stage-cols span:nth-child(6){color:#9a5a08 !important;}

#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(7),
#main .fmea-page .fmea-recipe-stage-cols span:nth-child(7){
  background:#edf5ff;
}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(7){
  border-left-color:#c5dbf8; border-radius:7px; margin:2px 0;
}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(7) strong,
#main .fmea-page .fmea-recipe-stage-cols span:nth-child(7){color:#1765b2 !important;}

#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-npr{
  margin:2px 0; border-radius:7px; background:#eef7f0; border-left-color:#b5dfc5;
}
#main .fmea-page .fmea-recipe-stage-cols span:nth-child(8){background:#e8f4ec;color:#176b42 !important;}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-npr.ok{
  background:#e8f7ee; border-left-color:#80c69b;
}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-npr.ok strong{color:#187747 !important;}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-npr.amber{
  background:#fff5e3; border-left-color:#edbd6f;
}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-npr.amber strong{color:#a15c00 !important;}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-npr.danger{
  background:#ffeded; border-left-color:#e99a95;
}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-npr.danger strong{color:#c5332b !important;}

#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-ap{
  background:#f2edfc; border-left-color:#d6c8f3; border-radius:7px; margin:2px 0;
}
#main .fmea-page .fmea-recipe-stage-cols span:nth-child(9){background:#f0eafa;color:#6542a3 !important;}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-ap span{font-weight:700;}
#main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score.empty{background:#f4f6f9;border-left-color:#e0e6ee;}
#main .fmea-page .fmea-recipe-stage-row.no-risks .fmea-recipe-stage-row-main > .fmea-recipe-stage-score,
#main .fmea-page .fmea-recipe-stage-row.no-risks .fmea-recipe-stage-row-main > .fmea-recipe-stage-npr,
#main .fmea-page .fmea-recipe-stage-row.no-risks .fmea-recipe-stage-row-main > .fmea-recipe-stage-ap{
  background:#f5f7fa;border-left-color:#e3e8ef;
}
@media(max-width:640px){
  #main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(5),
  #main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(6),
  #main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-score:nth-child(7),
  #main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-npr,
  #main .fmea-page .fmea-recipe-stage-row-main > .fmea-recipe-stage-ap{margin:0;border-radius:6px;}
}

/* V1082 — Tabela de falhas por variação responsiva, sem rolagem horizontal inferior.
   Mantém dados e comportamento da tabela; apenas redistribui as colunas disponíveis. */
#main .fmea-page [data-fmea-falhas] .fmea-table-wrap{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  overflow-x:hidden !important;
  overflow-y:visible;
}
#main .fmea-page [data-fmea-falhas] table.fmea-table{
  width:100% !important;
  min-width:0 !important;
  max-width:100%;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
}
#main .fmea-page [data-fmea-falhas] .fmea-table th,
#main .fmea-page [data-fmea-falhas] .fmea-table td{
  box-sizing:border-box;
  min-width:0;
  padding:7px 5px;
  white-space:normal !important;
  overflow-wrap:anywhere;
  word-break:normal;
  vertical-align:top;
  line-height:1.35;
}
#main .fmea-page [data-fmea-falhas] .fmea-table th{
  background:#eaf2fc;
  color:#193d66;
  font-size:10px;
  font-weight:800;
  letter-spacing:.1px;
  border-bottom:1px solid #cbdcf0;
}
#main .fmea-page [data-fmea-falhas] .fmea-table td{
  font-size:11px;
  color:#243f5a;
}
#main .fmea-page [data-fmea-falhas] .fmea-table tbody tr:nth-child(even) td{background:#f8fbff;}
#main .fmea-page [data-fmea-falhas] .fmea-table tbody tr:hover td{background:#eef5fd;}
#main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(1),
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(1){width:15%;}
#main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(2),
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(2){width:7%;}
#main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(3),
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(3){width:8%;}
#main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(4),
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(4){width:13%;}
#main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(5),
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(5){width:11%;}
#main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(6),
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(6){width:4%;text-align:center;}
#main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(7),
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(7){width:13%;}
#main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(8),
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(8){width:14%;}
#main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(9),
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(9){width:7%;}
#main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(10),
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(10){width:8%;}
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(1) strong{font-size:11px;line-height:1.35;}
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(1) small{display:inline-block;margin-top:3px;color:#617995;font-size:10px;line-height:1.3;}
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(6){font-weight:800;font-variant-numeric:tabular-nums;}
#main .fmea-page [data-fmea-falhas] .fmea-table td:last-child{white-space:normal !important;}
#main .fmea-page [data-fmea-falhas] .fmea-table td:last-child .fmea-link{
  display:block;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  margin:0 0 4px;
  padding:4px 3px;
  font-size:10px;
  line-height:1.2;
  white-space:normal;
  overflow-wrap:anywhere;
}
#main .fmea-page [data-fmea-falhas] .fmea-table td:last-child .fmea-link:last-child{margin-bottom:0;}
@media(max-width:760px){
  #main .fmea-page [data-fmea-falhas] .fmea-table th,
  #main .fmea-page [data-fmea-falhas] .fmea-table td{padding:6px 4px;font-size:10px;}
  #main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(1),
  #main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(1){width:14%;}
  #main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(2),
  #main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(2){width:7%;}
  #main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(3),
  #main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(3){width:8%;}
  #main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(4),
  #main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(4){width:13%;}
  #main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(5),
  #main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(5){width:11%;}
  #main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(6),
  #main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(6){width:4%;}
  #main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(7),
  #main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(7){width:13%;}
  #main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(8),
  #main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(8){width:14%;}
  #main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(9),
  #main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(9){width:8%;}
  #main .fmea-page [data-fmea-falhas] .fmea-table th:nth-child(10),
  #main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(10){width:8%;}
}
@media(max-width:560px){
  #main .fmea-page [data-fmea-falhas] .fmea-table th,
  #main .fmea-page [data-fmea-falhas] .fmea-table td{padding:5px 3px;font-size:9.5px;}
  #main .fmea-page [data-fmea-falhas] .fmea-table td:last-child .fmea-link{font-size:9px;padding:4px 2px;}
}

/* V1083 — Hierarquia visual da análise de falhas, seguindo o padrão MasterPlating (laranja, azul e branco). */
#main .fmea-page [data-fmea-falhas]{
  color:#17365f;
}
#main .fmea-page [data-fmea-falhas] h2,
#main .fmea-page [data-fmea-falhas] h3,
#main .fmea-page [data-fmea-falhas] .section-title,
#main .fmea-page [data-fmea-falhas] [class*="title"]{
  color:#17365f;
}
#main .fmea-page [data-fmea-falhas] h2,
#main .fmea-page [data-fmea-falhas] h3{
  font-weight:750;
  letter-spacing:-.25px;
}
#main .fmea-page [data-fmea-falhas] > p,
#main .fmea-page [data-fmea-falhas] .section-description,
#main .fmea-page [data-fmea-falhas] [class*="description"]{
  color:#647b98;
  line-height:1.55;
}
#main .fmea-page [data-fmea-falhas] button:not(.fmea-link){
  border-radius:8px;
}
#main .fmea-page [data-fmea-falhas] .fmea-table-wrap{
  border:1px solid #d7e3f2;
  border-radius:11px;
  background:#fff;
  box-shadow:0 2px 8px rgba(22,54,95,.04);
}
#main .fmea-page [data-fmea-falhas] .fmea-table th{
  background:#f1f5fa;
  color:#17365f;
  border-bottom:1px solid #d2dfef;
  padding-top:11px;
  padding-bottom:11px;
  text-transform:uppercase;
  letter-spacing:.15px;
}
#main .fmea-page [data-fmea-falhas] .fmea-table th svg,
#main .fmea-page [data-fmea-falhas] .fmea-table th i,
#main .fmea-page [data-fmea-falhas] .fmea-table th .icon{
  color:#f58220;
}
#main .fmea-page [data-fmea-falhas] .fmea-table td{
  padding-top:11px;
  padding-bottom:11px;
  color:#294866;
  border-bottom:1px solid #e7eef7;
}
#main .fmea-page [data-fmea-falhas] .fmea-table tbody tr:last-child td{border-bottom:0;}
#main .fmea-page [data-fmea-falhas] .fmea-table tbody tr:nth-child(even) td{background:#f9fbfe;}
#main .fmea-page [data-fmea-falhas] .fmea-table tbody tr:hover td{background:#fff8f0;}
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(1) strong{
  display:inline-block;
  color:#17365f;
  font-size:11.5px;
  font-weight:750;
}
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(1) small{color:#7489a3;}
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(6){color:#c92f2f;}
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(6) > *,
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(6) span{
  font-weight:800;
}
#main .fmea-page [data-fmea-falhas] .fmea-table td:nth-child(8){
  color:#17365f;
}
#main .fmea-page [data-fmea-falhas] .fmea-table td:last-child .fmea-link{
  min-height:29px;
  border-radius:7px;
  font-weight:600;
}
#main .fmea-page [data-fmea-falhas] .fmea-table td:last-child .fmea-link:first-child{
  border:1px solid #9ec5ff;
  background:#f5f9ff;
  color:#176bd1;
}
#main .fmea-page [data-fmea-falhas] .fmea-table td:last-child .fmea-link:last-child{
  border:1px solid #ffb8b8;
  background:#fff8f8;
  color:#d52f2f;
}
@media(max-width:760px){
  #main .fmea-page [data-fmea-falhas] .fmea-table th{padding-top:8px;padding-bottom:8px;}
  #main .fmea-page [data-fmea-falhas] .fmea-table td{padding-top:8px;padding-bottom:8px;}
}


/* V1084 — Refinamento dos títulos das colunas na tabela de falhas por variação.
   Evita quebra de palavra em DIREÇÃO e melhora a composição de TEMPO DE REAÇÃO. */
#main .fmea-page table thead th:nth-child(2),
#main .fmea-page [role="table"] [role="row"] [role="columnheader"]:nth-child(2){
  min-width:76px !important;
  white-space:nowrap !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  text-align:left;
  line-height:1.25 !important;
}
#main .fmea-page table thead th:nth-child(9),
#main .fmea-page [role="table"] [role="row"] [role="columnheader"]:nth-child(9){
  min-width:106px !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  text-wrap:balance;
  line-height:1.25 !important;
  text-align:left;
}
#main .fmea-page table thead th,
#main .fmea-page [role="table"] [role="columnheader"]{
  vertical-align:middle;
  padding-top:10px !important;
  padding-bottom:10px !important;
  color:#193d66;
  font-weight:800 !important;
  letter-spacing:.15px !important;
}

/* V1085 — Destaque do título e reorganização visual do formulário de falhas.
   Mantém a paleta institucional MasterPlating: azul, laranja, branco e cinza-claro. */
#main .fmea-page [data-fmea-falhas] > h2,
#main .fmea-page [data-fmea-falhas] > h3,
#main .fmea-page [data-fmea-falhas] .section-title{
  color:#17365f !important;
  font-size:clamp(18px,1.35vw,23px) !important;
  font-weight:800 !important;
  letter-spacing:-.35px !important;
  line-height:1.25 !important;
  margin:0 0 7px !important;
  padding:0 0 9px !important;
  border-bottom:2px solid #f58220;
  width:fit-content;
  max-width:100%;
}
#main .fmea-page [data-fmea-falhas] > p,
#main .fmea-page [data-fmea-falhas] .section-description{
  color:#647b98 !important;
  font-size:12px;
  line-height:1.55;
  max-width:1100px;
}
/* Formulário: cartão claro, sem cores fora do padrão do sistema. */
#main .fmea-page [data-fmea-falhas] form,
#main .fmea-page [data-fmea-falhas] .fmea-form,
#main .fmea-page [data-fmea-falhas] [class*="form-card"],
#main .fmea-page [data-fmea-falhas] [class*="formulario"]{
  box-sizing:border-box;
  min-width:0;
  border:1px solid #d4e1f1;
  border-radius:12px;
  background:#f5f8fc;
  padding:16px;
  box-shadow:0 3px 10px rgba(23,54,95,.05);
}
#main .fmea-page [data-fmea-falhas] form label,
#main .fmea-page [data-fmea-falhas] .fmea-form label,
#main .fmea-page [data-fmea-falhas] [class*="form-card"] label,
#main .fmea-page [data-fmea-falhas] [class*="formulario"] label{
  display:block;
  margin:0 0 6px;
  color:#294866;
  font-size:12px;
  font-weight:700;
  line-height:1.35;
}
#main .fmea-page [data-fmea-falhas] form input,
#main .fmea-page [data-fmea-falhas] form select,
#main .fmea-page [data-fmea-falhas] form textarea,
#main .fmea-page [data-fmea-falhas] .fmea-form input,
#main .fmea-page [data-fmea-falhas] .fmea-form select,
#main .fmea-page [data-fmea-falhas] .fmea-form textarea{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  min-width:0;
  border:1px solid #cbd9ea;
  border-radius:8px;
  background:#fff;
  color:#17365f;
  font:500 13px/1.4 Inter,Arial,sans-serif;
  padding:9px 11px;
  box-shadow:inset 0 1px 2px rgba(23,54,95,.025);
  transition:border-color .15s ease,box-shadow .15s ease;
}
#main .fmea-page [data-fmea-falhas] form input:focus,
#main .fmea-page [data-fmea-falhas] form select:focus,
#main .fmea-page [data-fmea-falhas] form textarea:focus,
#main .fmea-page [data-fmea-falhas] .fmea-form input:focus,
#main .fmea-page [data-fmea-falhas] .fmea-form select:focus,
#main .fmea-page [data-fmea-falhas] .fmea-form textarea:focus{
  outline:0;
  border-color:#f58220;
  box-shadow:0 0 0 3px rgba(245,130,32,.14);
}
#main .fmea-page [data-fmea-falhas] form textarea,
#main .fmea-page [data-fmea-falhas] .fmea-form textarea{min-height:68px;resize:vertical;}
#main .fmea-page [data-fmea-falhas] form button[type="submit"],
#main .fmea-page [data-fmea-falhas] .fmea-form button[type="submit"]{
  border:1px solid #e96f0a;
  border-radius:8px;
  background:#f58220;
  color:#fff;
  font-weight:700;
  padding:9px 16px;
  box-shadow:0 2px 4px rgba(245,130,32,.16);
}
#main .fmea-page [data-fmea-falhas] form button[type="submit"]:hover,
#main .fmea-page [data-fmea-falhas] .fmea-form button[type="submit"]:hover{background:#e96f0a;}
#main .fmea-page [data-fmea-falhas] form button[type="button"],
#main .fmea-page [data-fmea-falhas] .fmea-form button[type="button"]{
  border:1px solid #cbd9ea;
  border-radius:8px;
  background:#fff;
  color:#294866;
  padding:9px 14px;
}
@media(max-width:760px){
  #main .fmea-page [data-fmea-falhas] form,
  #main .fmea-page [data-fmea-falhas] .fmea-form,
  #main .fmea-page [data-fmea-falhas] [class*="form-card"],
  #main .fmea-page [data-fmea-falhas] [class*="formulario"]{padding:11px;}
}


/* V1086 — Estilos aplicados ao HTML real da seção FMEA de falhas, montado dinamicamente. */
#main [data-fmea-falhas] .ff-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:4px 0 14px;padding:0 0 13px;border-bottom:1px solid #d8e4f2;}
#main [data-fmea-falhas] .ff-heading-copy{min-width:0;flex:1 1 480px;}
#main [data-fmea-falhas] .ff-title{display:block;margin:0 0 7px!important;padding:0 0 0 13px!important;border:0!important;border-left:4px solid #f58220!important;color:#17365f!important;font-size:clamp(19px,1.45vw,24px)!important;font-weight:800!important;letter-spacing:-.35px!important;line-height:1.3!important;width:auto!important;max-width:100%;}
#main [data-fmea-falhas] .ff-description{margin:0!important;color:#647b98!important;font-size:12.5px;line-height:1.55;max-width:1000px;}
#main [data-fmea-falhas] .ff-add-button{flex:0 0 auto;min-height:36px;padding:8px 14px;border:1px solid #e96f0a;border-radius:7px;background:#f58220;color:#fff;font-weight:700;box-shadow:0 2px 5px rgba(245,130,32,.16);}
#main [data-fmea-falhas] .ff-add-button:hover{background:#e96f0a;color:#fff;} #main [data-fmea-falhas] .ff-add-button:disabled{opacity:.55;cursor:not-allowed;}
#main [data-fmea-falhas] .ff-form-card{box-sizing:border-box;min-width:0;padding:16px;border:1px solid #d4e1f1;border-radius:10px;background:#f3f7fc!important;box-shadow:0 3px 10px rgba(23,54,95,.055);}
#main [data-fmea-falhas] .ff-form-card .grid{gap:12px 14px;margin-bottom:12px;} #main [data-fmea-falhas] .ff-form-card .field{min-width:0;}
#main [data-fmea-falhas] .ff-form-card .field label{display:block;margin:0 0 6px;color:#294866;font-size:12px;font-weight:700;line-height:1.4;}
#main [data-fmea-falhas] .ff-form-card .field input,#main [data-fmea-falhas] .ff-form-card .field select,#main [data-fmea-falhas] .ff-form-card .field textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%;border:1px solid #cbd9ea;border-radius:7px;background:#fff;color:#17365f;font:500 13px/1.4 Inter,Arial,sans-serif;padding:9px 10px;}
#main [data-fmea-falhas] .ff-form-card .field input:focus,#main [data-fmea-falhas] .ff-form-card .field select:focus,#main [data-fmea-falhas] .ff-form-card .field textarea:focus{outline:0;border-color:#f58220;box-shadow:0 0 0 3px rgba(245,130,32,.13);}
#main [data-fmea-falhas] .ff-form-card .field textarea{min-height:68px;resize:vertical;}
#main [data-fmea-falhas] .ff-form-card .btn-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding-top:12px;border-top:1px solid #dbe5f1;}
#main [data-fmea-falhas] .ff-form-card [data-ff-cancelar]{border:1px solid #cbd9ea;border-radius:7px;background:#fff;color:#294866;padding:8px 14px;font-weight:600;}
#main [data-fmea-falhas] .ff-form-card [data-ff-salvar]{border:1px solid #e96f0a;border-radius:7px;background:#f58220;color:#fff;padding:8px 15px;font-weight:700;}
#main [data-fmea-falhas] .ff-form-card [data-ff-salvar]:hover{background:#e96f0a;}
@media(max-width:700px){#main [data-fmea-falhas] .ff-header{align-items:flex-start;gap:10px;}#main [data-fmea-falhas] .ff-heading-copy{flex-basis:100%;}#main [data-fmea-falhas] .ff-add-button{width:100%;}#main [data-fmea-falhas] .ff-form-card{padding:11px;}#main [data-fmea-falhas] .ff-form-card .grid{gap:10px;margin-bottom:10px;}}

/* V1103 — Catálogo de FMEAs expansível: lista compacta, filtros e ações em lote. */
#main .fmea-page.fmea-catalog-page{display:flex;flex-direction:column;gap:10px;min-width:0}
#main .fmea-page.fmea-catalog-page>.fmea-standard-header{margin-bottom:0!important}
#main .fmea-catalog-toolbar{display:grid;grid-template-columns:minmax(230px,1.35fr) minmax(130px,.55fr) minmax(170px,.8fr) auto auto;gap:10px;align-items:end;padding:12px;border:1px solid #d9e5f3;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(18,49,94,.035);min-width:0}
#main .fmea-catalog-search{position:relative;display:flex;align-items:center;min-width:0;margin:0}
#main .fmea-catalog-search>span{position:absolute;left:12px;color:#50729c;font-size:22px;line-height:1;pointer-events:none}
#main .fmea-catalog-search input{width:100%;min-width:0;height:40px!important;padding:0 12px 0 39px!important;border:1px solid #cbdced!important;border-radius:8px!important;background:#fff!important;color:#17365d!important;font-size:13px!important;box-sizing:border-box}
#main .fmea-catalog-filter{display:flex;flex-direction:column;gap:4px;min-width:0;margin:0;color:#536c89;font-size:11px;font-weight:700}
#main .fmea-catalog-filter select{width:100%;min-width:0;height:40px!important;margin:0!important;padding:0 10px!important;border:1px solid #cbdced!important;border-radius:8px!important;background:#fff!important;color:#17365d!important;font-size:12px!important;box-sizing:border-box}
#main .fmea-catalog-bulk-actions{display:flex;align-items:center;gap:7px;justify-content:flex-end;flex-wrap:wrap}
#main .fmea-catalog-bulk-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:8px 11px;border:1px solid #bcd2ec;border-radius:8px;background:#fff;color:#164f91;font-size:12px;font-weight:650;white-space:nowrap;cursor:pointer}
#main .fmea-catalog-bulk-actions button:hover{background:#edf5ff;border-color:#8fb5e5}
#main .fmea-catalog-count{font-size:11px;color:#647b96;white-space:nowrap;text-align:right;padding-bottom:2px}
#main .fmea-card.fmea-accordion-card{padding:0!important;overflow:hidden;border:1px solid #d6e3f2!important;border-radius:12px!important;background:#fff!important;box-shadow:0 2px 8px rgba(18,49,94,.045)!important;margin:0 0 10px!important;min-width:0;transition:border-color .15s ease,box-shadow .15s ease}
#main .fmea-card.fmea-accordion-card.is-expanded{border-color:#ef9a42!important;box-shadow:0 2px 9px rgba(18,49,94,.06)!important}
#main .fmea-card.fmea-accordion-card[hidden]{display:none!important}
#main .fmea-card.fmea-accordion-card .fmea-card-head.fmea-doc-header{display:grid!important;grid-template-columns:32px minmax(220px,1fr) minmax(125px,.35fr) auto!important;align-items:center!important;justify-content:initial!important;gap:12px!important;padding:12px 13px!important;margin:0!important;border:0!important;border-bottom:0!important;border-radius:12px!important;background:linear-gradient(105deg,#fff 0%,#f8fbff 65%,#f2f7fd 100%)!important;cursor:pointer;min-width:0}
#main .fmea-card.fmea-accordion-card.is-expanded .fmea-card-head.fmea-doc-header{border-bottom:1px solid #dce7f3!important;border-radius:12px 12px 0 0!important;background:linear-gradient(105deg,#fff 0%,#f8fbff 55%,#fff7ed 100%)!important}
#main .fmea-card.fmea-accordion-card .fmea-expand-toggle{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;padding:0;border:1px solid #c8d9ed;border-radius:8px;background:#fff;color:#164f91;font-size:22px;line-height:1;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
#main .fmea-card.fmea-accordion-card .fmea-expand-toggle:hover{background:#edf5ff;border-color:#8fb5e5}
#main .fmea-card.fmea-accordion-card.is-expanded .fmea-expand-toggle{background:#f58220;border-color:#f58220;color:#fff}
#main .fmea-card.fmea-accordion-card .fmea-doc-heading{grid-column:auto;min-width:0;flex:initial}
#main .fmea-card.fmea-accordion-card .fmea-doc-titleline{gap:7px}
#main .fmea-card.fmea-accordion-card .fmea-doc-titleline .fmea-doc-accent{height:31px;margin-right:1px}
#main .fmea-card.fmea-accordion-card .fmea-doc-titleline .fmea-code{font-size:18px!important}
#main .fmea-card.fmea-accordion-card .fmea-doc-titleline .fmea-product{max-width:360px;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
#main .fmea-card.fmea-accordion-card .fmea-doc-meta{gap:4px 11px;margin:5px 0 0 7px!important;font-size:10.5px!important}
#main .fmea-card.fmea-accordion-card .fmea-card-kpis{display:flex;flex-direction:column;gap:4px;min-width:0;padding:3px 10px;border-left:1px solid #d8e4f2}
#main .fmea-card.fmea-accordion-card .fmea-card-kpis strong{font-size:12px;line-height:1.35;color:#153e72;font-weight:750;white-space:normal}
#main .fmea-card.fmea-accordion-card .fmea-card-kpis strong.has-open{color:#c2410c}
#main .fmea-card.fmea-accordion-card .fmea-card-kpis strong.no-analysis{color:#647b96;font-weight:650}
#main .fmea-card.fmea-accordion-card .fmea-card-kpis small{font-size:10.5px;line-height:1.35;color:#647b96}
#main .fmea-card.fmea-accordion-card .fmea-doc-actions{display:flex!important;align-items:center!important;align-self:center!important;justify-content:flex-end!important;gap:6px!important;flex:0 0 auto;padding:0!important;flex-wrap:wrap}
#main .fmea-card.fmea-accordion-card .fmea-doc-actions .fmea-link{min-height:34px;padding:7px 9px;font-size:11px;white-space:nowrap}
#main .fmea-card.fmea-accordion-card .fmea-card-content{padding:0 14px 14px;min-width:0}
#main .fmea-card.fmea-accordion-card .fmea-card-content[hidden]{display:none!important}
#main .fmea-card.fmea-accordion-card .fmea-card-content>.fmea-tabs{margin-top:10px!important}
#main .fmea-card.fmea-accordion-card .fmea-card-content>.fmea-recipe-stages{margin-top:10px!important}
#main .fmea-catalog-no-results{padding:20px;border:1px dashed #c8d8ea;border-radius:10px;text-align:center;background:#f7faff;color:#5b7391;font-size:13px}
#main .fmea-catalog-no-results[hidden]{display:none!important}
@media(max-width:1250px){
  #main .fmea-catalog-toolbar{grid-template-columns:minmax(220px,1.2fr) minmax(125px,.55fr) minmax(160px,.8fr);}
  #main .fmea-catalog-bulk-actions{grid-column:1/3;justify-content:flex-start}
  #main .fmea-catalog-count{grid-column:3;text-align:right;align-self:center}
  #main .fmea-card.fmea-accordion-card .fmea-card-head.fmea-doc-header{grid-template-columns:32px minmax(220px,1fr) minmax(110px,.35fr)!important}
  #main .fmea-card.fmea-accordion-card .fmea-doc-actions{grid-column:2/4;justify-content:flex-start!important}
}
@media(max-width:850px){
  #main .fmea-catalog-toolbar{grid-template-columns:minmax(0,1fr) minmax(120px,.6fr)}
  #main .fmea-catalog-search{grid-column:1/-1}
  #main .fmea-catalog-filter.fmea-process-filter{grid-column:2}
  #main .fmea-catalog-bulk-actions{grid-column:1/-1}
  #main .fmea-catalog-count{grid-column:1/-1;text-align:left}
  #main .fmea-card.fmea-accordion-card .fmea-card-head.fmea-doc-header{grid-template-columns:30px minmax(0,1fr)!important;gap:9px!important;align-items:start!important}
  #main .fmea-card.fmea-accordion-card .fmea-doc-heading{grid-column:2;grid-row:1;min-width:0}
  #main .fmea-card.fmea-accordion-card .fmea-expand-toggle{grid-column:1;grid-row:1;margin-top:2px}
  #main .fmea-card.fmea-accordion-card .fmea-card-kpis{grid-column:2;border-left:0;border-top:1px solid #e2eaf4;padding:7px 0 0;flex-direction:row;flex-wrap:wrap;gap:5px 16px}
  #main .fmea-card.fmea-accordion-card .fmea-doc-actions{grid-column:2;justify-content:flex-start!important;width:100%}
}
@media(max-width:520px){
  #main .fmea-catalog-toolbar{grid-template-columns:minmax(0,1fr)}
  #main .fmea-catalog-search,#main .fmea-catalog-filter,#main .fmea-catalog-filter.fmea-process-filter,#main .fmea-catalog-bulk-actions,#main .fmea-catalog-count{grid-column:1}
  #main .fmea-catalog-bulk-actions button{flex:1 1 auto}
  #main .fmea-card.fmea-accordion-card .fmea-doc-titleline .fmea-product{max-width:100%;white-space:normal;overflow:visible}
  #main .fmea-card.fmea-accordion-card .fmea-card-content{padding:0 8px 10px}
  #main .fmea-card.fmea-accordion-card .fmea-doc-actions .fmea-link{flex:1 1 auto}
}

/* V1104 — Corrige a grade dos cartões expansíveis de FMEA.
   O padrão global de cabeçalho injeta uma barra ::before. Nesta grade, ela era
   tratada como um item adicional e deslocava o botão, o título e as ações.
   O acento laranja correto já existe em .fmea-doc-titleline .fmea-doc-accent. */
#main .fmea-card.fmea-accordion-card > .fmea-card-head.fmea-doc-header::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
#main .fmea-card.fmea-accordion-card > .fmea-card-head.fmea-doc-header > .fmea-expand-toggle {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: center !important;
}
#main .fmea-card.fmea-accordion-card > .fmea-card-head.fmea-doc-header > .fmea-doc-heading {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  width: auto !important;
}
#main .fmea-card.fmea-accordion-card > .fmea-card-head.fmea-doc-header > .fmea-card-kpis {
  grid-column: 3 !important;
  grid-row: 1 !important;
}
#main .fmea-card.fmea-accordion-card > .fmea-card-head.fmea-doc-header > .fmea-doc-actions {
  grid-column: 4 !important;
  grid-row: 1 !important;
}
@media (max-width: 1250px) {
  #main .fmea-card.fmea-accordion-card > .fmea-card-head.fmea-doc-header > .fmea-doc-actions {
    grid-column: 2 / 4 !important;
    grid-row: 2 !important;
  }
}
@media (max-width: 850px) {
  #main .fmea-card.fmea-accordion-card > .fmea-card-head.fmea-doc-header > .fmea-expand-toggle { grid-column: 1 !important; grid-row: 1 !important; }
  #main .fmea-card.fmea-accordion-card > .fmea-card-head.fmea-doc-header > .fmea-doc-heading { grid-column: 2 !important; grid-row: 1 !important; }
  #main .fmea-card.fmea-accordion-card > .fmea-card-head.fmea-doc-header > .fmea-card-kpis { grid-column: 2 !important; grid-row: 2 !important; }
  #main .fmea-card.fmea-accordion-card > .fmea-card-head.fmea-doc-header > .fmea-doc-actions { grid-column: 2 !important; grid-row: 3 !important; }
}


/* V1128 — Espaçamento consistente entre ações Editar e Remover na tabela de falhas por variação.
   Escopo restrito à coluna de ações para não alterar menus, abas ou outros botões do sistema. */
#main .fmea-page [data-fmea-falhas] .fmea-table td .ff-row-actions{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-width:38px;
}
#main .fmea-page [data-fmea-falhas] .fmea-table td .ff-row-actions .fmea-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  margin:0 !important;
}
