/* =========================================================
   ASTRENMED • ATLAS DE OFTALMOLOGIA — CSS DOS ARTIGOS
   Vale para todos os artigos (modelos "completo" e "compacto").
   Escopo: .mfha (página) e .mfha-modal (popups, criados no <body>).
   Identidade: hero verde-azulado do atlas (#0d9488 → #0f766e → #115e59),
   títulos azul-marinho (#163256), abas e lateral no padrão dos artigos antigos.
   ========================================================= */

.mfha,
.mfha-modal {
  --mfha-pri: #0d9488;
  --mfha-pri-l: #e8f7f5;
  --mfha-pri-b: #b9e6df;
  --mfha-pri-d: #0f766e;
  --mfha-pri-dd: #115e59;
  --mfha-pri-s: #5eead4;
  --mfha-navy: #2b4c7e;
  --mfha-navy-l: #eef4fb;
  --mfha-head: #163256;
  --mfha-body: #3f4b5b;
  --mfha-muted: #6b7280;
  --mfha-bg: #fff;
  --mfha-bg-s: #f8fafc;
  --mfha-border: #dce6f2;
  --mfha-border-l: #e8eef6;

  --mfha-ok: #0f8f5f;      --mfha-ok-bg: #e9f8f0;      --mfha-ok-b: #bfe8d3;
  --mfha-alt: #1f6fb2;     --mfha-alt-bg: #eaf3fc;     --mfha-alt-b: #c4dcf3;
  --mfha-warn: #a86800;    --mfha-warn-bg: #fff7e6;    --mfha-warn-b: #f5dcaa;
  --mfha-dang: #c0392b;    --mfha-dang-bg: #fdeeee;    --mfha-dang-b: #f4c5c0;
  --mfha-prova: #6b47c2;   --mfha-prova-bg: #f3effc;   --mfha-prova-b: #dccff6;

  --mfha-r: 20px;
  --mfha-r-s: 12px;
  --mfha-sh: 0 8px 30px rgba(43, 76, 126, .07);
  --mfha-sh-h: 0 2px 4px rgba(43, 76, 126, .06), 0 14px 32px rgba(43, 76, 126, .13);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--mfha-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.mfha { width: 100%; max-width: 1400px; margin: 0 auto; }

.mfha *, .mfha *::before, .mfha *::after,
.mfha-modal *, .mfha-modal *::before, .mfha-modal *::after { box-sizing: border-box; }

/* Reset de controles (o Astra estiliza button/input globalmente) */
.mfha button, .mfha-modal button {
  font-family: inherit; font-size: inherit; line-height: 1.3; color: inherit;
  background: none; border: 0; border-radius: 0; padding: 0; margin: 0;
  box-shadow: none; text-transform: none; letter-spacing: normal; cursor: pointer;
  touch-action: manipulation;
}
.mfha button:focus-visible, .mfha-modal button:focus-visible,
.mfha summary:focus-visible { outline: 3px solid var(--mfha-pri-s); outline-offset: 2px; }

.mfha h1, .mfha h2, .mfha h3, .mfha h4,
.mfha-modal h2, .mfha-modal h3, .mfha-modal h4 {
  font-family: inherit; color: var(--mfha-head); margin: 0; line-height: 1.25; letter-spacing: -.01em;
}
.mfha p, .mfha-modal p { margin: 0 0 .75em; }
.mfha p:last-child, .mfha-modal p:last-child { margin-bottom: 0; }
.mfha a { color: var(--mfha-pri-d); }
.mfha strong, .mfha b, .mfha em,
.mfha-modal strong, .mfha-modal b, .mfha-modal em { display: inline; }
.mfha strong, .mfha-modal strong { color: var(--mfha-head); font-weight: 700; }
.mfha code, .mfha-modal code { font-size: .85em; background: #eef3f8; padding: 1px 5px; border-radius: 4px; }

/* =========================================================
   BREADCRUMBS + HERO
   ========================================================= */
.mfha-bc {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  font-size: 13px; color: var(--mfha-muted); padding: 4px 0 14px;
}
.mfha-bc a { color: var(--mfha-muted); text-decoration: none; }
.mfha-bc a:hover { color: var(--mfha-pri); }
.mfha-bc i { font-size: 9px; opacity: .6; }
.mfha-bc strong { color: var(--mfha-head); font-weight: 600; }

.mfha-hero {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff; padding: 34px 32px 30px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 52%, #115e59 100%);
  box-shadow: 0 14px 40px rgba(13, 40, 46, .18);
}
.mfha-hero::before {
  content: ""; position: absolute; top: -90px; right: -80px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, .30), transparent 70%); pointer-events: none;
}
.mfha-hero::after {
  content: ""; position: absolute; left: -100px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, .45), transparent 70%); pointer-events: none;
}
.mfha-hero-in { position: relative; z-index: 1; max-width: 860px; }
.mfha-compacto .mfha-hero-in { max-width: none; }
.mfha-hero-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22); padding: 6px 14px; border-radius: 999px;
}
.mfha-hero-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mfha-pri-s); animation: mfha-pulso 1.4s infinite; }
@keyframes mfha-pulso { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) { .mfha-hero-dot { animation: none; } }
.mfha .mfha-hero h1 { color: #fff; font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -1px; line-height: 1.06; margin: 14px 0 6px; }
.mfha-hero-alt { font-size: 14.5px; color: #c9f5ee; margin: 0 0 6px; }
.mfha-hero-sub { font-size: 15.5px; line-height: 1.65; color: rgba(255,255,255,.9); max-width: 720px; margin: 8px 0 0; }
.mfha .mfha-hero-sub strong, .mfha .mfha-hero-alt strong, .mfha .mfha-hero-sub em { color: #fff; }
.mfha-hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.mfha-hero-pills span {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); padding: 7px 13px; border-radius: 999px;
}
.mfha-hero-pills i { color: var(--mfha-pri-s); }
.mfha-hero-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font-size: 12.5px; color: #c9f1eb; }
.mfha-hero-meta:empty { display: none; }
.mfha-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Ficha do modelo compacto (4 itens no hero) */
.mfha-hero-ficha { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 18px 0 0; }
.mfha-hero-ficha > div { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.mfha-hero-ficha dt { display: flex; align-items: center; gap: 6px; margin: 0 0 3px; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--mfha-pri-s); }
.mfha-hero-ficha dd { margin: 0; font-size: 14px; font-weight: 800; color: #fff; line-height: 1.35; }

/* =========================================================
   CARDS-RESUMO
   ========================================================= */
.mfha-resumo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: -22px 18px 0; position: relative; z-index: 2; }
.mfha .mfha-resumo-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
  background: var(--mfha-bg); border: 1px solid var(--mfha-border); border-radius: var(--mfha-r);
  padding: 18px; box-shadow: var(--mfha-sh); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.mfha .mfha-resumo-card:hover { transform: translateY(-3px); box-shadow: var(--mfha-sh-h); border-color: var(--mfha-pri-b); background: var(--mfha-bg); }
.mfha-resumo-ic {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--mfha-pri-l); color: var(--mfha-pri); font-size: 17px;
}
.mfha-resumo-card > strong { font-size: 15.5px; }
.mfha-resumo-txt { font-size: 13.5px; color: var(--mfha-body); line-height: 1.5; flex: 1; }
.mfha-resumo-mais { font-size: 13px; font-weight: 600; color: var(--mfha-pri); display: inline-flex; gap: 6px; align-items: center; }
.mfha-resumo-card:hover .mfha-resumo-mais i { transform: translateX(3px); }
.mfha-resumo-mais i { transition: transform .18s; }


/* =========================================================
   LAYOUT
   ========================================================= */
.mfha-page { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; margin-top: 18px; }
.mfha-resumo + .mfha-page { margin-top: 22px; }
.mfha-main { min-width: 0; }
.mfha-side { display: flex; flex-direction: column; gap: 16px; }

/* =========================================================
   ABAS — barra branca no padrão dos artigos do atlas
   ========================================================= */
.mfha-tabs {
  display: grid; grid-template-columns: repeat(var(--mfha-col, 6), minmax(0, 1fr)); gap: 6px; padding: 8px; margin: 0 0 18px;
  background: #fff; border: 1px solid var(--mfha-border); border-radius: 14px; box-shadow: var(--mfha-sh);
}
.mfha .mfha-tab {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 10px; border-radius: 11px;
  font-size: 12.8px; font-weight: 700; color: #64748b; background: #fff; text-align: center; line-height: 1.2; transition: background .2s, color .2s;
}
.mfha .mfha-tab i { font-size: 13px; flex: 0 0 auto; }
.mfha .mfha-tab:hover { color: var(--mfha-pri-d); background: var(--mfha-bg-s); }
.mfha .mfha-tab.mfha-on { color: var(--mfha-pri-dd); background: var(--mfha-pri-l); }
.mfha .mfha-tab.mfha-on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 50px; background: var(--mfha-pri); }
.mfha .mfha-tab.mfha-on i { color: var(--mfha-pri); }

.mfha-aba { display: none; flex-direction: column; gap: 16px; }
.mfha-aba.mfha-on { display: flex; animation: mfha-in .25s ease; }
@keyframes mfha-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.mfha .mfha-quickbtn { display: none; }
.mfha-ref-web { background: var(--mfha-pri-l); color: var(--mfha-pri-d); }

/* =========================================================
   CARD DE SEÇÃO
   ========================================================= */
.mfha-card {
  background: var(--mfha-bg); border: 1px solid var(--mfha-border); border-radius: var(--mfha-r);
  padding: 24px; box-shadow: var(--mfha-sh); display: flex; flex-direction: column; gap: 16px;
}
.mfha-card > * { margin: 0; }
.mfha .mfha-card-tit { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; }
.mfha-card-tit > span {
  flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--mfha-pri-l); color: var(--mfha-pri); font-size: 16px;
}
.mfha-card-perigo { border-color: var(--mfha-dang-b); }
.mfha-card-perigo .mfha-card-tit > span { background: var(--mfha-dang-bg); color: var(--mfha-dang); }
.mfha-card-prova .mfha-card-tit > span { background: var(--mfha-prova-bg); color: var(--mfha-prova); }

.mfha .mfha-sub, .mfha-modal .mfha-sub { font-size: 16px; font-weight: 700; display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.mfha-sub i { color: var(--mfha-pri); font-size: 14px; }

/* Em 30 segundos */
.mfha-essencial {
  position: relative; overflow: hidden; background: #fff; border: 1px solid var(--mfha-pri-b);
  border-radius: var(--mfha-r); box-shadow: var(--mfha-sh);
}
.mfha-essencial-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 55%, #115e59 100%);
}
.mfha-essencial-head > span {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.16); color: #fff; font-size: 16px;
}
.mfha .mfha-essencial-head h2 { color: #fff; font-size: 16px; font-weight: 800; margin: 0; }
.mfha-essencial-head p { color: #c9f1eb; font-size: 12.5px; margin: 0; }
.mfha-essencial ol {
  list-style: none; margin: 0; padding: 16px 20px 18px; counter-reset: mfze;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.mfha-essencial li {
  position: relative; counter-increment: mfze; display: block; min-width: 0;
  padding: 12px 14px 12px 50px; border-radius: 12px; background: var(--mfha-bg-s); border: 1px solid var(--mfha-border-l);
  font-size: 14px; line-height: 1.5; color: var(--mfha-head);
}
.mfha-essencial li::before {
  content: counter(mfze); position: absolute; left: 12px; top: 12px; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; background: var(--mfha-pri-l); color: var(--mfha-pri-d); font-weight: 800; font-size: 13px;
}

/* =========================================================
   BLOCOS
   ========================================================= */

/* Frase-chave */
.mfha-chave {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--mfha-r-s);
  background: var(--mfha-head); color: #fff;
}
.mfha-chave i { color: var(--mfha-pri-s); font-size: 18px; margin-top: 3px; }
.mfha-chave p { font-size: 15.5px; font-weight: 600; color: #fff; }
.mfha .mfha-chave strong, .mfha-modal .mfha-chave strong { color: var(--mfha-pri-s); }

/* Alertas */
.mfha-alerta { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--mfha-r-s); border: 1px solid; font-size: 14.5px; }
.mfha-alerta > i { font-size: 16px; margin-top: 3px; flex: 0 0 auto; }
.mfha-alerta > div { min-width: 0; }
.mfha-alerta-tit { display: block; margin-bottom: 2px; }
.mfha-alerta-info    { background: var(--mfha-alt-bg);  border-color: var(--mfha-alt-b); }   .mfha-alerta-info > i    { color: var(--mfha-alt); }
.mfha-alerta-atencao { background: var(--mfha-warn-bg); border-color: var(--mfha-warn-b); }  .mfha-alerta-atencao > i { color: var(--mfha-warn); }
.mfha-alerta-perigo  { background: var(--mfha-dang-bg); border-color: var(--mfha-dang-b); }  .mfha-alerta-perigo > i  { color: var(--mfha-dang); }
.mfha-alerta-ok      { background: var(--mfha-ok-bg);   border-color: var(--mfha-ok-b); }    .mfha-alerta-ok > i      { color: var(--mfha-ok); }
.mfha-alerta-prova   { background: var(--mfha-prova-bg); border-color: var(--mfha-prova-b); } .mfha-alerta-prova > i  { color: var(--mfha-prova); }

/* Rótulo (badge) */
.mfha-rotulo {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.4;
  color: var(--mfha-pri-d); background: var(--mfha-pri-l); padding: 2px 8px; border-radius: 6px;
}
.mfha-rotulo i { font-size: 9px; }

/* Card com imagem */
.mfha-figcard {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: center;
  background: var(--mfha-bg-s); border: 1px solid var(--mfha-border-l); border-radius: var(--mfha-r); padding: 18px;
}
.mfha-figcard-sem, .mfha-figcard-largo { grid-template-columns: 1fr; }
.mfha-figcard-largo .mfha-fig img { max-height: 620px; }
.mfha-figcard-txt { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mfha .mfha-figcard-txt h3, .mfha-modal .mfha-figcard-txt h3 { font-size: 17.5px; }
.mfha-fig { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mfha .mfha-fig-btn, .mfha-modal .mfha-fig-btn,
.mfha .mfha-gal-img, .mfha-modal .mfha-gal-img {
  position: relative; display: block; width: 100%; border-radius: 12px; overflow: hidden; background: #e9f0f6; cursor: zoom-in;
}
.mfha-fig img { display: block; width: 100%; height: auto; max-height: 380px; object-fit: contain; background: #fff; }
.mfha-fig-zoom {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(6, 63, 60, .78); color: #fff; font-size: 14px; opacity: .9; transition: transform .15s;
}
.mfha-fig-btn:hover .mfha-fig-zoom, .mfha-gal-img:hover .mfha-fig-zoom { transform: scale(1.1); }
.mfha-fig figcaption { font-size: 12.5px; color: var(--mfha-muted); text-align: center; }
.mfha-fig-vazia {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  min-height: 200px; border: 2px dashed #c9d6e3; border-radius: 12px; padding: 18px; color: var(--mfha-muted); font-size: 13px; background: #fff;
}
.mfha-fig-vazia i { font-size: 28px; color: #b6c5d4; }
.mfha-fig-vazia small { font-size: 11px; opacity: .8; }

/* Galeria */
.mfha-galeria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mfha-gal-n1 { grid-template-columns: minmax(0, 420px); }
.mfha-gal-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mfha-gal-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mfha-gal-item {
  display: flex; flex-direction: column; background: var(--mfha-bg); border: 1px solid var(--mfha-border);
  border-radius: var(--mfha-r); overflow: hidden; transition: box-shadow .18s, transform .18s;
}
.mfha-gal-item:hover { box-shadow: var(--mfha-sh-h); transform: translateY(-2px); }
.mfha .mfha-gal-img, .mfha-modal .mfha-gal-img { border-radius: 0; aspect-ratio: 4 / 3; }
.mfha-gal-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mfha-gal-icone {
  aspect-ratio: 4 / 3; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--mfha-pri-l), #f3f9fd); color: var(--mfha-pri); font-size: 34px;
}
.mfha-gal-icone small { font-size: 11px; color: var(--mfha-muted); padding: 0 10px; text-align: center; }
.mfha-gal-txt { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.mfha .mfha-gal-txt h4, .mfha-modal .mfha-gal-txt h4 { font-size: 15.5px; }
.mfha-gal-txt p { font-size: 13.5px; line-height: 1.5; }

/* Mini-cards */
.mfha-cards { display: grid; gap: 12px; }
.mfha-col-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mfha-col-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mfha-col-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mfha-mini {
  background: var(--mfha-bg-s); border: 1px solid var(--mfha-border-l); border-left: 3px solid var(--mfha-pri-s);
  border-radius: 12px; padding: 14px 16px; min-width: 0;
}
.mfha-mini-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mfha-mini-head i { color: var(--mfha-pri); font-size: 15px; width: 18px; text-align: center; flex: 0 0 auto; }
.mfha .mfha-mini h4, .mfha-modal .mfha-mini h4 { font-size: 15px; }
.mfha-mini p { font-size: 14px; line-height: 1.55; }
.mfha-mini-perigo { border-left-color: var(--mfha-dang); }  .mfha-mini-perigo .mfha-mini-head i { color: var(--mfha-dang); }
.mfha-mini-atencao { border-left-color: #e3a634; }        .mfha-mini-atencao .mfha-mini-head i { color: var(--mfha-warn); }
.mfha-mini-ok { border-left-color: var(--mfha-ok); }        .mfha-mini-ok .mfha-mini-head i { color: var(--mfha-ok); }

/* Números */
.mfha-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.mfha-num {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px;
  background: linear-gradient(160deg, #fff, var(--mfha-pri-l)); border: 1px solid var(--mfha-pri-b);
}
.mfha-num i { color: var(--mfha-pri); font-size: 16px; margin-bottom: 4px; }
.mfha .mfha-num strong, .mfha-modal .mfha-num strong { font-size: 21px; font-weight: 800; color: var(--mfha-pri-dd); line-height: 1.15; }
.mfha-num span { font-size: 13px; line-height: 1.45; color: var(--mfha-body); }

/* Passos */
.mfha-passos { list-style: none; margin: 0; padding: 0; counter-reset: mfzp; display: flex; flex-direction: column; gap: 0; }
.mfha-passos > li { position: relative; display: block; padding: 0 0 18px 50px; counter-increment: mfzp; }
.mfha-passos > li::before {
  content: counter(mfzp); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: var(--mfha-pri);
  box-shadow: 0 0 0 4px var(--mfha-pri-l);
}
.mfha-passos > li::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--mfha-pri-b); }
.mfha-passos > li:last-child { padding-bottom: 0; }
.mfha-passos > li:last-child::after { display: none; }
.mfha-passo-tit { display: block; font-size: 15.5px; margin: 4px 0 2px; }
.mfha-passos p { font-size: 14.5px; }
.mfha-passos-fluxo { flex-direction: row; gap: 10px; }
.mfha-passos-fluxo > li { flex: 1; padding: 46px 14px 14px; background: var(--mfha-bg-s); border: 1px solid var(--mfha-border-l); border-radius: 12px; }
.mfha-passos-fluxo > li::before { left: 14px; top: 12px; width: 28px; height: 28px; font-size: 13px; }
.mfha-passos-fluxo > li::after { display: none; }

/* Listas */
.mfha-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mfha-lista > li { position: relative; display: block; padding-left: 28px; font-size: 14.5px; line-height: 1.55; }
.mfha-lista > li::before {
  font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 2px; font-size: 13px;
  width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
}
.mfha-lista-check > li::before { content: "\f00c"; color: var(--mfha-ok); background: var(--mfha-ok-bg); font-size: 10px; }
.mfha-lista-x > li::before { content: "\f00d"; color: var(--mfha-dang); background: var(--mfha-dang-bg); font-size: 10px; }
.mfha-lista-alerta > li::before { content: "\21"; color: var(--mfha-warn); background: var(--mfha-warn-bg); font-size: 10px; }
.mfha-lista-dot > li { padding-left: 20px; }
.mfha-lista-dot > li::before { content: ""; width: 7px; height: 7px; top: 9px; left: 4px; background: var(--mfha-pri); }

/* Comparar */
.mfha-comparar { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.mfha-comp { border-radius: 14px; padding: 16px; border: 1px solid var(--mfha-border); background: var(--mfha-bg-s); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mfha .mfha-comp h4, .mfha-modal .mfha-comp h4 { font-size: 15px; display: flex; gap: 8px; align-items: center; }
.mfha-comp p { font-size: 14px; }
.mfha-comp-ok      { background: var(--mfha-ok-bg);   border-color: var(--mfha-ok-b); }   .mfha-comp-ok h4 i { color: var(--mfha-ok); }
.mfha-comp-alt     { background: var(--mfha-alt-bg);  border-color: var(--mfha-alt-b); }  .mfha-comp-alt h4 i { color: var(--mfha-alt); }
.mfha-comp-atencao { background: var(--mfha-warn-bg); border-color: var(--mfha-warn-b); } .mfha-comp-atencao h4 i { color: var(--mfha-warn); }
.mfha-comp-perigo  { background: var(--mfha-dang-bg); border-color: var(--mfha-dang-b); } .mfha-comp-perigo h4 i { color: var(--mfha-dang); }
.mfha-comp-neutro h4 i { color: var(--mfha-pri); }

/* Tabelas */
.mfha-tabela-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--mfha-border); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.mfha-tabela { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 14px; margin: 0; background: #fff; }
.mfha-tabela th {
  background: var(--mfha-bg-s); color: var(--mfha-head); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em;
  text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--mfha-border);
}
.mfha-tabela td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--mfha-border-l); vertical-align: top; overflow-wrap: break-word; hyphens: auto; line-height: 1.5; }
.mfha-tabela tbody tr:last-child td { border-bottom: 0; }
.mfha-tabela tbody tr:nth-child(even) td { background: #fbfdff; }
.mfha-tabela td:first-child { font-weight: 600; color: var(--mfha-head); min-width: 130px; }
.mfha-tabela-nota { display: flex; gap: 8px; font-size: 13px; color: var(--mfha-muted); margin: 0; }
.mfha-tabela-nota i { color: var(--mfha-pri); margin-top: 3px; }

/* Selos de prioridade */
.mfha-nivel {
  display: inline-block; margin: 0 0 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; line-height: 1.3;
}
.mfha-nivel + * { display: block; }
.mfha-nivel-ok     { color: var(--mfha-ok);   background: var(--mfha-ok-bg);   border-color: var(--mfha-ok-b); }
.mfha-nivel-alt    { color: var(--mfha-alt);  background: var(--mfha-alt-bg);  border-color: var(--mfha-alt-b); }
.mfha-nivel-perigo { color: var(--mfha-dang); background: var(--mfha-dang-bg); border-color: var(--mfha-dang-b); }
.mfha-nivel-neutro { color: var(--mfha-muted); background: #f1f5f9; border-color: var(--mfha-border); }
.mfha-tx td:first-child .mfha-nivel { display: table; }

/* Medicamento citado no texto: link discreto que abre a ficha */
.mfha .mfha-med, .mfha-modal .mfha-med {
  display: inline; font: inherit; font-weight: 700; color: var(--mfha-pri-d); line-height: inherit; vertical-align: baseline;
  text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--mfha-pri-s); text-underline-offset: 3px;
}
.mfha .mfha-med:hover, .mfha-modal .mfha-med:hover { color: var(--mfha-pri); text-decoration-style: solid; background: none; }
.mfha-essencial-head .mfha-med, .mfha-chave .mfha-med { color: inherit; }

/* Rotas de tratamento */
.mfha-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mfha-rotas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 14px; }
.mfha-rota {
  --rc: var(--mfha-pri); --rc-soft: var(--mfha-pri-l); --rc-ink: var(--mfha-pri-dd);
  position: relative; background: #fff; border: 1px solid var(--mfha-border); border-radius: 16px; min-width: 0; overflow: hidden;
  transition: box-shadow .2s, border-color .2s; scroll-margin-top: 90px;
}
.mfha-rota::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--rc); }
.mfha-rota-blue   { --rc: #2b6cb0; --rc-soft: #eaf2fb; --rc-ink: #1d4f86; }
.mfha-rota-navy   { --rc: var(--mfha-head); --rc-soft: #e7edf6; --rc-ink: var(--mfha-head); }
.mfha-rota-amber  { --rc: #d69e2e; --rc-soft: var(--mfha-warn-bg); --rc-ink: var(--mfha-warn); }
.mfha-rota-red    { --rc: var(--mfha-dang); --rc-soft: var(--mfha-dang-bg); --rc-ink: #9b2c22; }
.mfha-rota-violet { --rc: var(--mfha-prova); --rc-soft: var(--mfha-prova-bg); --rc-ink: #4c3fa3; }
.mfha-rota:hover { border-color: var(--mfha-pri-b); box-shadow: var(--mfha-sh-h); }
.mfha-rota.mfha-aberta { grid-column: 1 / -1; border-color: var(--mfha-pri-b); box-shadow: var(--mfha-sh-h); }
.mfha .mfha-rota-head {
  width: 100%; height: 100%; min-height: 176px; display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: 1fr auto;
  column-gap: 14px; row-gap: 12px; padding: 18px 18px 16px 23px; text-align: left; align-items: start;
}
.mfha .mfha-rota-head:hover { background: transparent; }
.mfha-rota.mfha-aberta .mfha-rota-head { min-height: 0; height: auto; background: var(--rc-soft); border-bottom: 1px solid var(--mfha-border); }
.mfha-rota-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--rc-soft); color: var(--rc-ink); display: grid; place-items: center; font-size: 19px; }
.mfha-rota.mfha-aberta .mfha-rota-ic { background: #fff; }
.mfha-rota-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mfha-rota-chip { align-self: flex-start; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rc-ink); background: var(--rc-soft); border-radius: 999px; padding: 3px 10px; }
.mfha-rota.mfha-aberta .mfha-rota-chip { background: #fff; }
.mfha-rota-t { font-size: 17px; font-weight: 800; color: var(--mfha-head); line-height: 1.3; }
.mfha-rota-d { font-size: 13px; line-height: 1.6; color: var(--mfha-body); }
.mfha-rota-nomes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.mfha-rota-nomes span { font-size: 11px; font-weight: 700; color: var(--mfha-head); background: var(--mfha-bg-s); border: 1px solid var(--mfha-border-l); border-radius: 7px; padding: 3px 8px; }
.mfha-rota.mfha-aberta .mfha-rota-nomes { display: none; }
.mfha-rota-estado { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--mfha-border); }
.mfha-rota-n { font-size: 12px; font-weight: 700; color: var(--mfha-muted); }
.mfha-rota-go { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: var(--mfha-pri-d); background: var(--mfha-pri-l); border-radius: 9px; padding: 7px 12px; transition: background .2s, color .2s; }
.mfha-rota-go i { transition: transform .25s; font-size: 11px; }
.mfha-rota-head:hover .mfha-rota-go { background: var(--mfha-pri); color: #fff; }
.mfha-rota-fechar { display: none; }
.mfha-rota.mfha-aberta .mfha-rota-abrir { display: none; }
.mfha-rota.mfha-aberta .mfha-rota-fechar { display: inline; }
.mfha-rota.mfha-aberta .mfha-rota-go { background: #fff; }
.mfha-rota.mfha-aberta .mfha-rota-go i { transform: rotate(180deg); }
.mfha-rota-corpo { padding: 20px 22px 22px 25px; display: flex; flex-direction: column; gap: 14px; animation: mfha-in .25s ease; }
.mfha-rota-corpo[hidden] { display: none; }
.mfha-rota-quando { display: flex; align-items: flex-start; gap: 12px; background: var(--mfha-bg-s); border: 1px solid var(--mfha-border-l); border-radius: 12px; padding: 12px 14px; }
.mfha-rota-quando > i { margin-top: 4px; color: var(--mfha-pri); }
.mfha-rota-quando b { display: block; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mfha-head); margin-bottom: 2px; }
.mfha-rota-quando span { display: block; font-size: 13.5px; line-height: 1.65; }
.mfha-rota-pe { display: flex; justify-content: flex-end; }
.mfha .mfha-rota-recolher {
  display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 800; color: var(--mfha-head);
  border: 1px solid var(--mfha-border); background: #fff; border-radius: 10px; padding: 6px 12px 6px 6px;
}
.mfha .mfha-rota-recolher:hover { background: var(--mfha-bg-s); }
.mfha-rota-recolher > span { width: 24px; height: 24px; border-radius: 7px; background: var(--mfha-bg-s); display: grid; place-items: center; font-size: 11px; }

/* Tabela de dose (rotas e aba Posologia do popup) — padrão do bulário */
.mfha-dose { display: grid; gap: 9px; }
.mfha-dose + .mfha-dose { margin-top: 6px; }
.mfha-dose-head { display: flex; align-items: center; gap: 9px; padding: 0 2px; color: var(--mfha-pri-dd); }
.mfha-dose-head > i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--mfha-pri-l); color: var(--mfha-pri); font-size: 14px; flex: 0 0 auto; }
.mfha .mfha-dose-head strong, .mfha-modal .mfha-dose-head strong { font-size: 15px; font-weight: 800; color: var(--mfha-pri-dd); }
.mfha-dose-head > span { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--mfha-pri-l); color: var(--mfha-pri-d); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.mfha-dose-nota { margin: 0; font-size: 13px; color: var(--mfha-muted); }
.mfha-dose-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--mfha-border); border-radius: 14px; background: #fff; }
.mfha-dose-tab {
  width: 100%; min-width: 720px; margin: 0; border-collapse: collapse; border-spacing: 0; table-layout: fixed;
  background: #fff; color: var(--mfha-body); font-size: 13.5px;
}
.mfha-dose-tab th {
  padding: 12px 14px; background: #f6f8fa; border: 0; border-bottom: 1px solid var(--mfha-border);
  color: var(--mfha-muted); font-size: 11.5px; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: .055em;
}
.mfha-dose-tab th:nth-child(1) { width: 20%; }
.mfha-dose-tab th:nth-child(2) { width: 23%; }
.mfha-dose-tab th:nth-child(3) { width: 16%; }
.mfha-dose-tab th:nth-child(4) { width: 16%; }
.mfha-dose-tab th:nth-child(5) { width: 25%; }
.mfha-dose-tab td.mfha-dose-f, .mfha-dose-tab td.mfha-dose-d { padding-left: 12px; padding-right: 10px; }

.mfha-dose-tab td { padding: 12px 14px; border: 0; border-bottom: 1px solid #edf1f4; vertical-align: top; line-height: 1.48; overflow-wrap: break-word; background: #fff; }
.mfha-dose-tab tbody + tbody tr:first-child td { border-top: 2px solid #d5dde3; }
.mfha-dose-tab tbody:last-child tr:last-child td, .mfha-dose-tab tbody:last-child td[rowspan] { border-bottom: 0; }
.mfha-dose-tab tbody { --ind: #2f7a62; --ind-soft: #edf7f3; }
.mfha-dose-tab tbody.mfha-ind-1 { --ind: #396f9b; --ind-soft: #edf4f9; }
.mfha-dose-tab tbody.mfha-ind-2 { --ind: #765e9b; --ind-soft: #f3f0f8; }
.mfha-dose-tab tbody.mfha-ind-3 { --ind: #9a6b27; --ind-soft: #fbf4e9; }
.mfha-dose-tab tbody.mfha-ind-4 { --ind: #9a4e49; --ind-soft: #fbefee; }
.mfha-dose-tab tbody.mfha-ind-5 { --ind: #4b7180; --ind-soft: #eef5f7; }
.mfha-dose-tab td.mfha-dose-ind { background: var(--ind-soft); color: var(--ind); border-right: 1px solid #e3e9ee; }
.mfha-dose-tab td.mfha-dose-obs { border-left: 1px solid #edf1f4; color: var(--mfha-muted); }
.mfha-dose-ind-t { display: block; font-weight: 800; line-height: 1.35; color: var(--ind); }
.mfha-dose-ind-t strong, .mfha-dose-ind-t em { color: inherit; }
.mfha-dose-badge {
  display: inline-block; margin: 0 0 7px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; border: 1px solid; line-height: 1.3; white-space: normal;
  max-width: 100%; overflow-wrap: anywhere;
}
.mfha-dose-sub { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--mfha-muted); line-height: 1.4; }
.mfha-dose-main strong { display: block; color: var(--mfha-head); font-weight: 800; }
.mfha-dose-farm { display: block; font-size: 11.5px; font-weight: 600; color: var(--mfha-muted); margin-bottom: 1px; }
.mfha-fichas { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin-top: 10px; }
/* Ficha do medicamento: ícone ao lado do nome do fármaco */
.mfha .mfha-ficha.mfha-ficha-ic {
  display: inline-grid; place-items: center; vertical-align: middle; position: relative; top: -1px; width: 20px; height: 20px; padding: 0; margin-left: 5px;
  border-radius: 50%; border: 1px solid transparent; background: #fff; color: var(--ind, var(--mfha-pri));
  box-shadow: 0 1px 2px rgba(15,23,42,.12); font-size: 12px; line-height: 1; cursor: pointer;
}
.mfha .mfha-ficha.mfha-ficha-ic i { font-size: 12px; line-height: 1; color: inherit; display: block; }
.mfha .mfha-ficha.mfha-ficha-ic:hover { background: var(--ind, var(--mfha-pri)); border-color: var(--ind, var(--mfha-pri)); color: #fff; }
.mfha .mfha-ficha.mfha-ficha-ic:hover i { color: #fff; }
/* Associação: uma célula por fármaco, mesma família de cor + etiqueta */
.mfha-dose-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 6px; }
.mfha-dose-tags .mfha-dose-badge { margin: 0; }
.mfha-dose-assoc { display: inline-flex; max-width: 100%; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #fff; border: 1px dashed var(--ind); color: var(--ind); font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.mfha-dose-assoc i { font-size: 9px; }
.mfha-nowrap { white-space: nowrap; }
/* Associação (célula mesclada): um fármaco por linha, "+" entre eles, ícone à direita */
.mfha-dose-lista { display: flex; flex-direction: column; gap: 2px; }
.mfha-dose-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-weight: 800; line-height: 1.3; color: var(--ind); }
.mfha-dose-item .mfha-ficha.mfha-ficha-ic { flex: 0 0 auto; margin-left: 0; top: 0; }
.mfha-dose-sep { align-self: flex-start; display: grid; place-items: center; width: 18px; height: 18px; margin: 1px 0; border-radius: 50%; background: var(--ind); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
.mfha .mfha-ficha {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--mfha-head); background: var(--mfha-head);
  color: #fff; font-size: 11.5px; font-weight: 700; line-height: 1.25; transition: background .15s, border-color .15s;
}
.mfha .mfha-ficha span { white-space: normal; text-align: left; }
.mfha .mfha-ficha i { font-size: 8px; flex: 0 0 auto; }
.mfha .mfha-ficha:hover { background: var(--mfha-pri); border-color: var(--mfha-pri); color: #fff; }
.mfha .mfha-ficha i { color: var(--mfha-pri-s); }
.mfha .mfha-ficha:hover i { color: #fff; }

/* Detalhes recolhíveis */
.mfha-det { border: 1px solid var(--mfha-border); border-radius: 12px; background: #fff; overflow: hidden; }
.mfha-det > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  font-weight: 700; color: var(--mfha-head); font-size: 15px; background: var(--mfha-bg-s);
}
.mfha-det > summary::-webkit-details-marker { display: none; }
.mfha-det > summary > i:first-child { color: var(--mfha-pri); }
.mfha-det > summary > span { flex: 1; }
.mfha-det > summary > i:last-child { color: var(--mfha-muted); font-size: 12px; transition: transform .2s; }
.mfha-det[open] > summary > i:last-child { transform: rotate(180deg); }
.mfha-det[open] > summary { border-bottom: 1px solid var(--mfha-border-l); }
.mfha-det-corpo { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

/* Ferramentas */
.mfha-tool { border: 1px solid var(--mfha-alt-b); background: linear-gradient(180deg, #f5f9fe, #fff); border-radius: var(--mfha-r); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.mfha-tool-head { display: flex; gap: 12px; align-items: flex-start; }
.mfha-tool-head > i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--mfha-alt-bg); color: var(--mfha-alt); flex: 0 0 auto; }
.mfha-tool-head strong { font-size: 16px; display: block; }
.mfha-tool-head p { font-size: 13.5px; color: var(--mfha-muted); margin-top: 2px; }
.mfha-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.mfha-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mfha-campo label { font-size: 13px; font-weight: 700; color: var(--mfha-head); margin: 0; }
.mfha .mfha-campo select, .mfha .mfha-campo input,
.mfha-modal .mfha-campo select, .mfha-modal .mfha-campo input,
.mfha .mfha-calc-conc, .mfha-modal .mfha-calc-conc {
  width: 100%; min-height: 48px; font-size: 16px; font-family: inherit; color: var(--mfha-head);
  padding: 10px 38px 10px 12px; border: 1px solid var(--mfha-border); border-radius: 10px; background-color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; touch-action: manipulation; margin: 0; box-shadow: none;
}
.mfha .mfha-campo input, .mfha-modal .mfha-campo input { padding-right: 12px; }
.mfha-tool-res {
  padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px dashed var(--mfha-border); font-size: 14.5px; color: var(--mfha-muted);
}
.mfha-tool-res.mfha-res-info    { border: 1px solid var(--mfha-alt-b);  background: var(--mfha-alt-bg);  color: var(--mfha-body); }
.mfha-tool-res.mfha-res-ok      { border: 1px solid var(--mfha-ok-b);   background: var(--mfha-ok-bg);   color: var(--mfha-body); }
.mfha-tool-res.mfha-res-atencao { border: 1px solid var(--mfha-warn-b); background: var(--mfha-warn-bg); color: var(--mfha-body); }
.mfha-tool-res.mfha-res-perigo  { border: 1px solid var(--mfha-dang-b); background: var(--mfha-dang-bg); color: var(--mfha-body); }
.mfha-tool-nota { display: flex; gap: 8px; font-size: 12.5px; color: var(--mfha-muted); margin: 0; }
.mfha-tool-nota i { color: var(--mfha-warn); margin-top: 3px; }
.mfha-calc-lista { display: flex; flex-direction: column; gap: 8px; }
.mfha-calc-item {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 12px; align-items: center;
  padding: 12px 14px; background: #fff; border: 1px solid var(--mfha-border-l); border-radius: 12px;
}
.mfha-calc-nome { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mfha-calc-nome > span { font-size: 12.5px; color: var(--mfha-muted); }
.mfha .mfha-calc-conc, .mfha-modal .mfha-calc-conc { min-height: 40px; font-size: 16px; padding: 6px 30px 6px 10px; margin-top: 4px; max-width: 220px; }
.mfha-calc-saida { text-align: right; display: flex; flex-direction: column; }
.mfha-calc-dose { font-size: 20px; font-weight: 800; color: var(--mfha-pri-dd); }
.mfha-calc-sub { font-size: 12.5px; color: var(--mfha-muted); }
.mfha-calc-sub b { color: var(--mfha-warn); }

/* Referências */
.mfha-refs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mfha-ref {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 14px 16px; border: 1px solid var(--mfha-border); border-radius: 14px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.mfha-ref:hover { border-color: var(--mfha-pri-b); box-shadow: var(--mfha-sh); }
.mfha-ref-n { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--mfha-head); color: #fff; font-weight: 800; font-size: 13px; }
.mfha-ref-c { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mfha-ref-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mfha-ref-tipo { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.mfha-ref-of  { background: var(--mfha-ok-bg); color: var(--mfha-ok); }
.mfha-ref-dir { background: var(--mfha-alt-bg); color: var(--mfha-alt); }
.mfha-ref-man { background: var(--mfha-prova-bg); color: var(--mfha-prova); }
.mfha-ref-art { background: var(--mfha-warn-bg); color: var(--mfha-warn); }
.mfha-ref-ano { font-size: 12px; font-weight: 700; color: var(--mfha-muted); }
.mfha-ref-txt { font-size: 13.5px; line-height: 1.6; color: var(--mfha-body); overflow-wrap: anywhere; }
.mfha-ref-txt strong { display: inline; color: var(--mfha-head); }
.mfha-ref-txt a { color: var(--mfha-pri-d); font-weight: 600; }
.mfha-aviso { background: var(--mfha-bg); }

/* =========================================================
   LATERAL
   ========================================================= */
.mfha-side-card { background: var(--mfha-bg); border: 1px solid var(--mfha-border); border-radius: var(--mfha-r); padding: 18px; box-shadow: var(--mfha-sh); }
.mfha .mfha-side-card h3, .mfha-modal .mfha-side-card h3 { font-size: 14.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.mfha-side-card h3 i { color: var(--mfha-pri); }
.mfha-side-card.mfha-side-info { padding: 0; overflow: hidden; }
.mfha .mfha-side-info .mfha-side-head, .mfha-modal .mfha-side-info .mfha-side-head {
  margin: 0; padding: 15px 18px; border-bottom: 1px solid var(--mfha-border); font-size: 13.5px; font-weight: 800;
  letter-spacing: .03em; text-transform: uppercase; color: var(--mfha-navy);
}
.mfha-side-info dl { margin: 0; }
.mfha-side-info dl > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--mfha-border-l); }
.mfha-side-info dl > div:last-child { border-bottom: 0; }
.mfha-side-info dl > div > i { grid-row: span 2; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--mfha-pri-l); color: var(--mfha-pri-d); font-size: 12px; }
.mfha-side-info dt { font-size: 12px; font-weight: 800; color: var(--mfha-navy); line-height: 1.4; }
.mfha-side-info dd { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--mfha-body); }
.mfha-side-list { display: flex; flex-direction: column; gap: 10px; }
.mfha-side-item { display: flex; gap: 10px; align-items: flex-start; }
.mfha-side-item > i {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--mfha-warn-bg); color: var(--mfha-warn); font-size: 13px;
}
.mfha-side-item strong { display: block; font-size: 13.5px; }
.mfha-side-item p { font-size: 13px; line-height: 1.45; margin: 0; }
.mfha-rel-off {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  border: 1px dashed var(--mfha-border); color: var(--mfha-muted);
}
.mfha-rel-off > i { width: 16px; text-align: center; }
.mfha-rel-off > span { flex: 1; }
.mfha-rel-off small { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.mfha-rel { display: flex; flex-direction: column; gap: 8px; }
.mfha-rel a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--mfha-border-l); background: var(--mfha-bg-s); color: var(--mfha-head); font-size: 13.5px; font-weight: 600; transition: all .15s;
}
.mfha-rel a:hover { border-color: var(--mfha-pri-b); background: var(--mfha-pri-l); }
.mfha-rel a > i:first-child { color: var(--mfha-pri); width: 16px; text-align: center; }
.mfha-rel a > span { flex: 1; }
.mfha-rel a > i:last-child { font-size: 10px; color: var(--mfha-muted); }
.mfha-prova { background: linear-gradient(160deg, #fff, var(--mfha-prova-bg)); border-color: var(--mfha-prova-b); }
.mfha .mfha-prova h3 i, .mfha-modal .mfha-prova h3 i { color: var(--mfha-prova); }
.mfha-prova p { font-size: 13.5px; }
.mfha-prova-dest { font-weight: 600; color: var(--mfha-head); }
.mfha .mfha-btn-quiz, .mfha-modal .mfha-btn-quiz {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; min-height: 44px;
  border-radius: 12px; background: var(--mfha-prova); color: #fff; font-weight: 700; font-size: 14px; transition: filter .15s;
}
.mfha .mfha-btn-quiz:hover, .mfha-modal .mfha-btn-quiz:hover { filter: brightness(1.1); background: var(--mfha-prova); color: #fff; }

.mfha-footer {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--mfha-muted);
  border-top: 1px solid var(--mfha-border); padding: 18px 4px 6px; margin-top: 6px;
}
.mfha-footer i { color: var(--mfha-pri); margin-top: 3px; }

/* =========================================================
   MODAIS
   ========================================================= */
.mfha-modal {
  position: fixed; inset: 0; z-index: 999999; display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(6, 25, 45, .55); backdrop-filter: blur(3px);
}
.mfha-modal.mfha-aberto { display: flex; animation: mfha-fade .18s ease; }
@keyframes mfha-fade { from { opacity: 0; } to { opacity: 1; } }
.mfha-caixa {
  position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  overflow-y: auto; overscroll-behavior: contain; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.3);
  animation: mfha-sobe .22s ease;
}
@keyframes mfha-sobe { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.mfha-caixa-barra { position: sticky; top: 0; z-index: 3; display: flex; justify-content: flex-end; align-items: flex-start; gap: 8px; height: 0; padding: 0 12px; overflow: visible; }
.mfha-caixa-barra > button { margin-top: 12px; }
.mfha-modal .mfha-x, .mfha-modal .mfha-voltar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.95); color: var(--mfha-head); box-shadow: 0 2px 10px rgba(0,0,0,.15); font-size: 16px;
}
.mfha-modal .mfha-voltar[hidden] { display: none; }
.mfha-modal .mfha-x:hover, .mfha-modal .mfha-voltar:hover { background: #fff; color: var(--mfha-pri); }
.mfha-conteudo { padding: 0; }

/* Popup de resumo */
.mfha-pop { display: flex; flex-direction: column; gap: 16px; padding: 0 26px 26px; }
.mfha-pop-head {
  margin: 0 -26px; padding: 30px 112px 24px 26px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 50%, #115e59 100%); color: #fff;
}
.mfha-pop-kicker { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #c9f1eb; margin-bottom: 6px; }
.mfha-modal .mfha-pop-head h2 { color: #fff; font-size: 23px; font-weight: 800; }
.mfha-modal .mfha-pop-head strong { color: #fff; }

/* Popup de medicamento */
.mfha-caixa.mfha-caixa-med { overflow: hidden; display: flex; flex-direction: column; max-width: 860px; height: min(780px, calc(100dvh - 40px)); }
.mfha-caixa-med .mfha-conteudo { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mfha-medpop { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mfha-medpop-head { flex: 0 0 auto; display: flex; gap: 14px; align-items: center; padding: 18px 112px 14px 20px; border-bottom: 1px solid var(--mfha-border-l); }
.mfha-medpop-ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; background: var(--mfha-pri); color: #fff; }
.mfha-medpop-classe { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mfha-pri-d); }
.mfha-modal .mfha-medpop-head h2 { font-size: 19px; font-weight: 800; margin: 1px 0; }
.mfha-medpop-head p { font-size: 12.5px; color: var(--mfha-muted); margin: 0; }
.mfha-medpop-hl { flex: 0 0 auto; margin: 14px 20px 0; display: flex; flex-direction: column; gap: 4px; background: var(--mfha-dang-bg); border: 1px solid var(--mfha-dang-b); border-radius: 12px; padding: 11px 14px; }
.mfha-medpop-hl > span { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mfha-dang); }
.mfha-modal .mfha-medpop-hl > strong { font-size: 15px; font-weight: 800; color: var(--mfha-dang); line-height: 1.5; }
.mfha-mtabs { flex: 0 0 auto; display: flex; gap: 4px; padding: 10px 20px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--mfha-border); }
.mfha-mtabs::-webkit-scrollbar { display: none; }
.mfha-modal .mfha-mtab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; margin-bottom: -1px;
  font-size: 13px; font-weight: 700; color: #64748b; border-bottom: 3px solid transparent; white-space: nowrap; transition: color .2s, border-color .2s;
}
.mfha-modal .mfha-mtab:hover { color: var(--mfha-head); background: none; }
.mfha-modal .mfha-mtab.mfha-on { color: var(--mfha-head); border-bottom-color: var(--mfha-pri); }
.mfha-mtab.mfha-on i { color: var(--mfha-pri); }
.mfha-mpanes { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 22px; }
.mfha-mpane { display: none; flex-direction: column; gap: 12px; }
.mfha-mpane.mfha-on { display: flex; animation: mfha-in .2s ease; }
.mfha-mpane > * { margin: 0; }
.mfha-modal .mfha-lead { font-size: 15px; line-height: 1.7; color: var(--mfha-head); font-weight: 500; }
.mfha-modal .mfha-msub {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mfha-head); padding-bottom: 6px; border-bottom: 1px solid var(--mfha-border-l); margin-top: 6px;
}
.mfha-msub i { color: var(--mfha-pri); }
.mfha-kv { margin: 0; display: grid; border: 1px solid var(--mfha-border-l); border-radius: 12px; overflow: hidden; }
.mfha-kv > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; padding: 11px 14px; border-bottom: 1px solid var(--mfha-border-l); background: #fff; }
.mfha-kv > div:nth-child(even) { background: var(--mfha-bg-s); }
.mfha-kv > div:last-child { border-bottom: 0; }
.mfha-kv dt { font-size: 13px; font-weight: 800; color: var(--mfha-head); line-height: 1.5; }
.mfha-kv dd { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--mfha-body); }

/* Modal rápido (celular) */
.mfha-quick .mfha-side-card { box-shadow: none; }

/* Zoom de imagem */
.mfha-zoom .mfha-caixa { max-width: 1100px; background: #0b1622; }
.mfha-zoom img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 120px); object-fit: contain; }
.mfha-zoom figcaption { color: #c9d8ea; font-size: 13px; text-align: center; padding: 10px 16px 14px; }

/* Quiz */
.mfha-quiz { padding: 0 26px 26px; display: flex; flex-direction: column; gap: 16px; }
.mfha-quiz .mfha-pop-head { background: linear-gradient(135deg, #7b56d6, #5534a8); }
.mfha-quiz-corpo { display: flex; flex-direction: column; gap: 16px; }
.mfha-quiz-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--mfha-muted); }
.mfha-quiz-nivel { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; background: var(--mfha-prova-bg); color: var(--mfha-prova); }
.mfha-quiz-barra { height: 6px; border-radius: 6px; background: #eef1f6; overflow: hidden; }
.mfha-quiz-barra span { display: block; height: 100%; background: var(--mfha-prova); transition: width .3s; }
.mfha-modal .mfha-quiz-perg { font-size: 18px; font-weight: 700; line-height: 1.45; }
.mfha-quiz-ops { display: flex; flex-direction: column; gap: 10px; }
.mfha-modal .mfha-quiz-op {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--mfha-border); background: #fff; font-size: 15px; line-height: 1.45; transition: all .15s;
}
.mfha-modal .mfha-quiz-op:hover:not(:disabled) { border-color: var(--mfha-prova-b); background: var(--mfha-prova-bg); }
.mfha-quiz-letra { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #eef1f6; color: var(--mfha-head); }
.mfha-modal .mfha-quiz-op.mfha-certa { border-color: var(--mfha-ok); background: var(--mfha-ok-bg); }
.mfha-modal .mfha-quiz-op.mfha-certa .mfha-quiz-letra { background: var(--mfha-ok); color: #fff; }
.mfha-modal .mfha-quiz-op.mfha-errada { border-color: var(--mfha-dang); background: var(--mfha-dang-bg); }
.mfha-modal .mfha-quiz-op.mfha-errada .mfha-quiz-letra { background: var(--mfha-dang); color: #fff; }
.mfha-modal .mfha-quiz-op:disabled { cursor: default; }
.mfha-quiz-exp { padding: 14px 16px; border-radius: 12px; background: var(--mfha-bg-s); border-left: 4px solid var(--mfha-prova); font-size: 14.5px; }
.mfha-quiz-exp small { display: block; margin-top: 8px; color: var(--mfha-muted); font-size: 12.5px; }
.mfha-modal .mfha-quiz-btn {
  align-self: flex-end; min-height: 46px; padding: 10px 22px; border-radius: 12px; background: var(--mfha-prova); color: #fff; font-weight: 700; font-size: 15px;
}
.mfha-modal .mfha-quiz-btn:disabled { opacity: .4; cursor: not-allowed; }
.mfha-quiz-placar { text-align: center; padding: 10px 0; }
.mfha-quiz-placar strong { display: block; font-size: 44px; font-weight: 800; color: var(--mfha-prova); line-height: 1.1; }
.mfha-quiz-rev { display: flex; flex-direction: column; gap: 10px; }
.mfha-quiz-rev > div { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--mfha-border); font-size: 14px; }
.mfha-quiz-rev > div.mfha-certa { border-color: var(--mfha-ok-b); background: var(--mfha-ok-bg); }
.mfha-quiz-rev > div.mfha-errada { border-color: var(--mfha-dang-b); background: var(--mfha-dang-bg); }

html.mfha-trava, html.mfha-trava body { overflow: hidden; }

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 1100px) {
  .mfha-page { grid-template-columns: minmax(0, 1fr) 236px; gap: 18px; }
  .mfha-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mfha-col-4, .mfha-gal-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .mfha-page { grid-template-columns: 1fr; }
  .mfha-side, .mfha-resumo { display: none; }
  .mfha-hero { padding: 28px 22px 24px; border-radius: 18px; }
  .mfha-hero-sub { font-size: 15px; }
  .mfha .mfha-quickbtn {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-bottom: 12px;
    border-radius: 14px; background: var(--mfha-head); color: #fff; font-weight: 700; font-size: 15px;
  }
  .mfha .mfha-quickbtn i { color: var(--mfha-pri-s); }
  .mfha-tabs { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mfha .mfha-tab { flex: 0 0 156px; }
  .mfha-rotas { grid-template-columns: minmax(0, 1fr); }
  .mfha .mfha-rota-head { min-height: 0; }
  .mfha-tabs::-webkit-scrollbar { display: none; }
  .mfha-figcard { grid-template-columns: 1fr; }
  .mfha-col-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mfha-essencial ol { grid-template-columns: 1fr; }
  .mfha-passos-fluxo { flex-direction: column; gap: 8px; }
  .mfha-passos-fluxo > li { padding: 10px 14px 10px 52px; }
  .mfha-passos-fluxo > li::before { left: 12px; top: 50%; transform: translateY(-50%); }
  .mfha-passos-fluxo .mfha-passo-tit { margin-top: 0; }
  .mfha-kv > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (max-width: 700px) {
  .mfha-card { padding: 18px 16px; border-radius: 14px; }
  .mfha .mfha-card-tit { font-size: 18px; }
  .mfha-col-2, .mfha-col-3, .mfha-col-4 { grid-template-columns: 1fr; }
  .mfha-galeria, .mfha-gal-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mfha-gal-n1 { grid-template-columns: 1fr; }
  .mfha-gal-txt { padding: 10px 12px 12px; }

  /* tabelas viram cartões */
  .mfha-tabela-wrap { border: 0; overflow: visible; }
  .mfha-tabela, .mfha-tabela tbody, .mfha-tabela tr, .mfha-tabela td { display: block; width: 100%; }
  .mfha-tabela thead { display: none; }
  .mfha-tabela tr { border: 1px solid var(--mfha-border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: #fff; }
  .mfha-tabela tbody tr:nth-child(even) td { background: #fff; }
  .mfha-tabela td { padding: 8px 14px; border-bottom: 1px solid var(--mfha-border-l); }
  .mfha-tabela td::before {
    content: attr(data-label); display: block; font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .05em; color: var(--mfha-muted); margin-bottom: 2px;
  }
  .mfha-tabela td:first-child { background: var(--mfha-bg-s); padding-top: 12px; }
  .mfha-tabela tbody tr:nth-child(even) td:first-child { background: var(--mfha-bg-s); }
  .mfha-tabela td:first-child::before { display: none; }
  .mfha-calc-item { grid-template-columns: 1fr; }
  .mfha-calc-saida { text-align: left; }

  .mfha-modal { padding: 0; align-items: flex-end; }
  .mfha-caixa.mfha-caixa-med { height: 92dvh; }
  .mfha-caixa { max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; }
  .mfha-pop, .mfha-quiz { padding: 0 18px 22px; }
  .mfha-pop-head { margin: 0 -18px; padding: 26px 104px 20px 18px; }
  .mfha-medpop-head { padding: 16px 100px 12px 16px; }
  .mfha-medpop-hl { margin: 12px 16px 0; }
  .mfha-mtabs { padding: 8px 16px 0; }
  .mfha-mpanes { padding: 16px 16px 20px; }
  .mfha-rota-corpo { padding: 16px 14px 18px 18px; }
  .mfha-ref { grid-template-columns: 1fr; gap: 8px; }
  .mfha-dose-wrap { border: 0; overflow: visible; background: none; }
  .mfha-dose-tab, .mfha-dose-tab tbody { display: block; width: 100%; min-width: 0; }
  .mfha-dose-tab thead { display: none; }
  .mfha-dose-tab tbody { display: flex; flex-wrap: wrap; border: 1px solid var(--mfha-border); border-radius: 14px; overflow: hidden; margin-bottom: 10px; background: #fff; }
  .mfha-dose-tab tr { display: contents; }
  .mfha-dose-tab td { display: block; padding: 8px 14px; border: 0; border-bottom: 1px solid #edf1f4; }
  .mfha-dose-tab tbody + tbody tr:first-child td { border-top: 0; }
  .mfha-dose-tab td.mfha-dose-ind { order: 0; width: 100%; border-right: 0; padding: 11px 14px; }
  .mfha-fichas { flex-direction: row; flex-wrap: wrap; }
  .mfha-dose-tab td.mfha-dose-main { order: 1; width: 100%; padding-bottom: 2px; border-bottom: 0; }
  .mfha-dose-tab td.mfha-dose-f, .mfha-dose-tab td.mfha-dose-d { order: 1; width: 50%; padding-top: 2px; }
  .mfha-dose-tab td.mfha-dose-obs { order: 2; width: 100%; border-left: 0; border-bottom: 0; }
  .mfha-dose-tab td.mfha-dose-f::before, .mfha-dose-tab td.mfha-dose-d::before, .mfha-dose-tab td.mfha-dose-obs::before {
    content: attr(data-label); display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--mfha-muted);
  }
  .mfha-dose-main strong { font-size: 15px; }
  .mfha-zoom { align-items: center; padding: 10px; }
  .mfha-zoom .mfha-caixa { border-radius: 14px; }
}

/* =========================================================
   COMPONENTES DO ATLAS (imagem principal, estrutura em destaque,
   visor, vídeo, imagem pendente, diferencial, registro)
   ========================================================= */

/* Imagem principal (Visão geral do modelo completo) */
.mfha-principal { display: flex; flex-direction: column; gap: 8px; }
.mfha .mfha-principal .mfha-fig-btn { border-radius: 18px; border: 1px solid var(--mfha-border); background: #fff; }
.mfha-principal .mfha-fig-btn img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; background: #f4f7fa; transition: transform .3s; }
.mfha-principal .mfha-fig-btn:hover img { transform: scale(1.015); }
.mfha-principal .mfha-pend { min-height: 280px; }

/* "Principais achados" + "Estrutura em destaque" */
.mfha-destaque { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.mfha-destaque-pe { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.mfha-achados { margin: 0; padding: 0 0 0 4px; list-style: none; counter-reset: mfhaa; display: flex; flex-direction: column; gap: 8px; }
.mfha-achados li { position: relative; padding-left: 34px; font-size: 14.5px; line-height: 1.55; counter-increment: mfhaa; }
.mfha-achados li::before {
  content: counter(mfhaa); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center; background: var(--mfha-pri-l); color: var(--mfha-pri-d); font-size: 12px; font-weight: 800;
}
.mfha .mfha-estrutura .mfha-fig-btn { border: 1px solid var(--mfha-border); background: #fff; }
.mfha-estrutura .mfha-fig-btn img { display: block; width: 100%; height: auto; }
.mfha-estrutura p { font-size: 14px; }

/* Imagem / mídia genérica */
.mfha .mfha-fig-btn img, .mfha-modal .mfha-fig-btn img { display: block; width: 100%; height: auto; }

/* Imagem pendente: visitante vê ícone discreto; editor vê a descrição */
.mfha-pend {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 190px; padding: 18px; border-radius: 14px; color: #8aa0b3; font-size: 12.5px; font-weight: 600;
  background: linear-gradient(135deg, var(--mfha-pri-l), #f4f8fc); border: 1px solid var(--mfha-border-l);
}
.mfha-pend > i { font-size: 30px; color: #9fd6cf; }
.mfha-pend-adm { border: 2px dashed #e3a634; background: #fffaf0; color: #7a5a14; align-items: stretch; text-align: left; }
.mfha-pend-adm > i { color: #e3a634; align-self: center; }
.mfha .mfha-pend-adm strong, .mfha-modal .mfha-pend-adm strong { color: #7a4b00; text-align: center; font-size: 14px; display: block; }
.mfha-pend-adm span { font-size: 12px; font-weight: 500; line-height: 1.5; }
.mfha-pend-adm em { display: block; font-style: normal; font-weight: 500; font-size: 12.5px; line-height: 1.55; color: #4b3a12; background: #fff; border: 1px solid #f5dcaa; border-radius: 10px; padding: 8px 10px; }
.mfha-pend-adm small { font-size: 10.5px; text-align: center; opacity: .8; }

/* Visor (imagem clínica ↔ esquema, com leitura guiada) */
.mfha-visor { display: flex; flex-direction: column; gap: 12px; }
.mfha-seg { display: inline-flex; align-self: flex-start; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--mfha-bg-s); border: 1px solid var(--mfha-border); border-radius: 12px; max-width: 100%; }
.mfha .mfha-seg-btn, .mfha-modal .mfha-seg-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px;
  font-size: 12.8px; font-weight: 700; color: #64748b; transition: all .2s; white-space: nowrap;
}
.mfha .mfha-seg-btn:hover { color: var(--mfha-pri-d); }
.mfha .mfha-seg-btn.mfha-on { background: #fff; color: var(--mfha-pri-dd); box-shadow: 0 2px 8px rgba(43, 76, 126, .12); }
.mfha-vista { display: flex; flex-direction: column; gap: 10px; animation: mfha-in .25s ease; }
.mfha-vista[hidden] { display: none; }
.mfha-visor-frame { position: relative; }
.mfha .mfha-visor-frame .mfha-fig-btn { border-radius: 18px; border: 1px solid var(--mfha-border); background: #fff; }
.mfha-visor-frame .mfha-fig-btn img { max-height: 600px; object-fit: contain; background: #f4f7fa; }
.mfha-visor-frame .mfha-pend { min-height: 260px; }
.mfha-visor-tag {
  position: absolute; left: 14px; top: 14px; z-index: 2; background: rgba(15, 23, 42, .72); color: #fff; pointer-events: none;
  border-radius: 999px; padding: 5px 11px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.mfha-visor-cap { font-size: 13px; line-height: 1.6; color: var(--mfha-muted); margin: 0; }
.mfha-leitura { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.mfha-leitura-t { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mfha-navy); }
.mfha-leitura-t i { color: var(--mfha-pri); }
.mfha-leitura-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mfha-leitura-lista li { display: flex; gap: 11px; align-items: flex-start; background: var(--mfha-bg-s); border: 1px solid var(--mfha-border-l); border-radius: 12px; padding: 12px 13px; min-width: 0; }
.mfha-leitura-n { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; background: var(--mfha-pri); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.mfha .mfha-leitura-lista b { display: block; font-size: 13.5px; color: var(--mfha-head); margin-bottom: 2px; }
.mfha-leitura-lista span { display: block; font-size: 13px; line-height: 1.6; }
/* número do roteiro: centralizado (a regra acima também pega este span) */
.mfha-leitura-lista .mfha-leitura-n { display: grid; place-items: center; text-align: center; font-size: 11.5px; line-height: 1; }
/* texto que acompanha uma vista do visor (ex.: Estrutura em destaque no modelo completo) */
.mfha-visor-txt { display: flex; flex-direction: column; gap: 8px; background: var(--mfha-bg-s); border: 1px solid var(--mfha-border-l); border-radius: 12px; padding: 12px 14px; }
.mfha-visor-txt p { margin: 0; font-size: 14px; line-height: 1.65; }

/* Vídeo */
.mfha-video { border-radius: 16px; overflow: hidden; background: #0b1622; border: 1px solid var(--mfha-border); }
.mfha-video video { display: block; width: 100%; max-height: 560px; background: #0b1622; }
.mfha-fig-video .mfha-pend { min-height: 220px; }

/* Galeria (fotos com legenda longa) */
.mfha-gal-midia { position: relative; }
.mfha-gal-midia .mfha-pend { aspect-ratio: 4 / 3; min-height: 0; border-radius: 0; border: 0; }
.mfha-gal-midia .mfha-video { border-radius: 0; border: 0; }
.mfha-gal-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.mfha-gal-tags span { font-size: 11px; font-weight: 700; color: var(--mfha-pri-dd); background: var(--mfha-pri-l); border-radius: 7px; padding: 3px 8px; }
.mfha-gal-n2 .mfha-gal-txt p, .mfha-gal-n1 .mfha-gal-txt p { font-size: 13.8px; line-height: 1.6; }

/* Intro de aba */
.mfha-intro { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--mfha-r-s); background: var(--mfha-navy-l); border: 1px solid var(--mfha-border); font-size: 14.5px; }
.mfha-intro > i { color: var(--mfha-navy); margin-top: 4px; }

/* Diagnóstico diferencial */
.mfha-dif { border: 1px solid var(--mfha-border); border-radius: 14px; overflow: hidden; background: #fff; }
.mfha-dif-head, .mfha-dif-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, 1.3fr); }
.mfha-dif-head span { padding: 11px 14px; background: var(--mfha-bg-s); border-bottom: 1px solid var(--mfha-border); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mfha-muted); }
.mfha-dif-row > div { padding: 12px 14px; border-bottom: 1px solid var(--mfha-border-l); font-size: 14px; line-height: 1.55; min-width: 0; }
.mfha-dif-row:last-child > div { border-bottom: 0; }
.mfha-dif-row > div small { display: none; }
.mfha-dif-nome { display: flex; gap: 10px; align-items: flex-start; background: #fbfdff; }
.mfha-dif-nome > i { color: var(--mfha-pri); margin-top: 4px; width: 16px; text-align: center; flex: 0 0 auto; }
.mfha .mfha-dif-nome a { font-weight: 700; color: var(--mfha-pri-d); text-decoration: none; }
.mfha-dif-nome a i { font-size: 10px; margin-left: 6px; }
.mfha .mfha-dif-nome a:hover { text-decoration: underline; }
.mfha-dif-perigo .mfha-dif-nome > i { color: var(--mfha-dang); }
.mfha-dif-atencao .mfha-dif-nome > i { color: var(--mfha-warn); }
.mfha-dif-atual .mfha-dif-nome { background: var(--mfha-pri-l); }

/* Registro (modelo de prontuário) */
.mfha-registro { border: 1px solid var(--mfha-pri-b); border-radius: 14px; overflow: hidden; background: #fff; }
.mfha-registro-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--mfha-pri-l); color: var(--mfha-pri-dd); }
.mfha-registro-head b { flex: 1; font-size: 14px; }
.mfha .mfha-copiar { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px; background: #fff; color: var(--mfha-pri-dd); border: 1px solid var(--mfha-pri-b); }
.mfha .mfha-copiar:hover { background: var(--mfha-pri); color: #fff; }
.mfha .mfha-registro-txt { padding: 14px 16px; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.7; color: var(--mfha-head); }
.mfha-registro-pe { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px dashed var(--mfha-border); font-size: 12.5px; color: var(--mfha-muted); }
.mfha-registro-pe i { color: var(--mfha-pri); margin-top: 3px; }

/* Botão "Informações rápidas" (celular) e cards-resumo dentro do modal */
.mfha-quick-resumo { display: flex; flex-direction: column; gap: 8px; }
.mfha-modal .mfha-quick-resumo button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--mfha-border); background: #fff; }
.mfha-modal .mfha-quick-resumo button:hover { border-color: var(--mfha-pri-b); background: var(--mfha-pri-l); }
.mfha-quick-resumo button > i:first-child { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--mfha-pri-l); color: var(--mfha-pri); }
.mfha-quick-resumo button > span { flex: 1; font-size: 13px; line-height: 1.45; }
.mfha-quick-resumo button > span strong { display: block; font-size: 14px; }
.mfha-quick-resumo button > i:last-child { color: var(--mfha-muted); font-size: 11px; }
.mfha-quick .mfha-side-card { box-shadow: none; }
.mfha .mfha-quickbtn > span { flex: 1; text-align: left; }

/* Zoom: setas para navegar entre as imagens da aba */
.mfha-zoom .mfha-caixa { position: relative; }
.mfha-zoom figure { margin: 0; }
.mfha-modal .mfha-zoom-nav {
  display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 44px; height: 44px; border-radius: 50%;
  place-items: center; background: rgba(255,255,255,.92); color: var(--mfha-head); box-shadow: 0 2px 10px rgba(0,0,0,.25); font-size: 16px;
}
.mfha-modal.mfha-zoom-multi .mfha-zoom-nav { display: grid; }
.mfha-zoom-ant { left: 10px; }
.mfha-zoom-prox { right: 10px; }

/* =========================================================
   RESPONSIVO DOS COMPONENTES DO ATLAS
   ========================================================= */
@media (max-width: 1100px) {
  .mfha-destaque { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
  .mfha .mfha-quickbtn { justify-content: space-between; background: var(--mfha-navy-l); color: var(--mfha-navy); border: 1px solid var(--mfha-border); font-weight: 800; font-size: 14px; padding: 0 16px; }
  .mfha .mfha-quickbtn i { color: var(--mfha-pri); }
  .mfha-destaque, .mfha-destaque-pe { grid-template-columns: 1fr; }
  .mfha-hero-ficha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mfha-leitura-lista { grid-template-columns: 1fr; }
  .mfha .mfha-tab { flex: 0 0 auto; min-width: 132px; padding: 10px 14px; }
}
@media (max-width: 700px) {
  .mfha-hero { padding: 24px 18px 22px; }
  .mfha-hero-tag { font-size: 10px; letter-spacing: .06em; }
  .mfha-hero-ficha dd { font-size: 13px; }
  .mfha-galeria.mfha-gal-n2, .mfha-galeria.mfha-gal-n3 { grid-template-columns: 1fr; }
  .mfha-dif-head { display: none; }
  .mfha-dif-row { grid-template-columns: 1fr; border-bottom: 1px solid var(--mfha-border); }
  .mfha-dif-row:last-child { border-bottom: 0; }
  .mfha-dif-row > div { border-bottom: 0; padding: 8px 14px; }
  .mfha-dif-row > div:first-child { padding-top: 12px; }
  .mfha-dif-row > div:last-child { padding-bottom: 14px; }
  .mfha-dif-row > div small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mfha-muted); }
  .mfha .mfha-seg { display: flex; align-self: stretch; }
  .mfha .mfha-seg-btn { flex: 1 1 0; justify-content: center; padding: 8px; }
  .mfha-modal .mfha-zoom-nav { width: 38px; height: 38px; }
}
