/* ============================================================
   Farmácia Municipal (out/2026) — complementos do mc-modulo.css (prefixo fmu-).
   Só o que a fundação mm-* não cobre: balcão de dispensação (uso contínuo,
   lotes FEFO, conferência com alertas), cartões de divisão, painel de
   validade e inventário. Tokens --p-* (claro/escuro herdados de .mm/.mm-layer).
   (fm- já é usado pelo modal global de árvore familiar — por isso fmu-.)
   ============================================================ */

/* ---- Tela de sucesso dos modais ---- */
.fmu-ok { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 10px 8px; }
.fmu-ok-ico {
    width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--p-green-soft); color: var(--p-green); font-size: 36px; border: 1px solid var(--p-green-line);
}
.fmu-ok-tit { font-size: 1.12rem; font-weight: 800; color: var(--p-ink); letter-spacing: -.3px; }
.fmu-ok-sub { font-size: .8rem; font-weight: 600; color: var(--p-muted); }
.fmu-ok-tbl { width: min(760px, 100%); border: 1px solid var(--p-border); border-radius: 12px; text-align: left; margin: 6px 0; }

/* ---- Balcão: uso contínuo (coluna do paciente) ---- */
.fmu-uso {
    display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; border-radius: 10px;
    border: 1px solid var(--p-border); border-left: 3px solid var(--tom, var(--p-blue)); background: var(--p-surface);
}
.fmu-uso-nome { font-size: .74rem; font-weight: 700; color: var(--p-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmu-uso-sub { font-size: .64rem; font-weight: 600; color: var(--p-faint); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.fmu-uso-sub .mm-chip { font-size: .58rem; padding: .05rem .4rem; }
.fmu-tel { font-size: .74rem !important; }

/* ---- Balcão / entrada: editor do item ---- */
.fmu-editor {
    border: 1px solid var(--p-blue-line-soft); background: color-mix(in srgb, var(--p-blue-soft) 45%, var(--p-surface));
    border-radius: 14px; padding: 12px 14px; animation: mmFadeUp .25s var(--p-ease);
}
.fmu-editor-head { display: flex; align-items: center; gap: 10px; }
.fmu-editor-nome { font-size: .9rem; font-weight: 800; color: var(--p-ink); letter-spacing: -.2px; line-height: 1.25; }
.fmu-lotes { display: flex; flex-wrap: wrap; gap: 6px; }
.fmu-lote {
    display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
    padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--p-border); background: var(--p-surface);
    color: var(--p-text); transition: all .15s; font: inherit; min-width: 104px;
}
.fmu-lote:hover:not(:disabled) { border-color: var(--p-blue-line); }
.fmu-lote.on { border-color: var(--p-blue-light); background: var(--p-blue-soft); box-shadow: 0 0 0 3px var(--p-blue-line-soft); }
.fmu-lote:disabled { opacity: .45; }
.fmu-lote-n { font-size: .74rem; font-weight: 800; color: var(--p-ink); display: inline-flex; align-items: center; gap: 4px; }
.fmu-lote-s { font-size: .62rem; font-weight: 600; color: var(--p-faint); }
.fmu-calc {
    height: 36px; display: flex; align-items: center; padding: 0 .6rem; border-radius: 10px;
    background: var(--p-soft2); color: var(--p-ink); font-size: .8rem; font-weight: 700;
}

/* ---- Conferência (coluna da direita dos modais) ---- */
.fmu-conf {
    background: var(--p-surface); border: 1px solid var(--p-border); border-left: 4px solid var(--p-green);
    border-radius: 12px; padding: 9px 10px; display: flex; flex-direction: column; gap: 5px;
    animation: mmFadeUp .2s var(--p-ease);
}
.fmu-conf.aviso { border-left-color: var(--p-orange); }
.fmu-conf.bloq { border-left-color: var(--p-red); background: color-mix(in srgb, var(--p-red-soft) 55%, var(--p-surface)); }
.fmu-conf-nome { font-size: .76rem; font-weight: 800; color: var(--p-ink); line-height: 1.3; }
.fmu-conf-sub { font-size: .64rem; font-weight: 600; color: var(--p-faint); margin-top: 1px; }
.fmu-conf-qtd { width: 64px !important; text-align: right; flex: none; }
.fmu-conf-pos { font-size: .66rem; font-weight: 600; color: var(--p-muted); display: flex; align-items: center; gap: 5px; }
.fmu-alerta {
    display: flex; align-items: flex-start; gap: 6px; padding: 5px 8px; border-radius: 8px;
    background: var(--tom-soft); color: var(--tom); border: 1px solid var(--tom-line);
    font-size: .66rem; font-weight: 700; line-height: 1.4;
}
.fmu-alerta i { font-size: 13px; margin-top: 1px; flex: none; }
.fmu-conf-tot {
    display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--p-border);
    font-size: .74rem; font-weight: 600; color: var(--p-muted); background: var(--p-surface); flex: none;
}
.fmu-conf-tot b { color: var(--p-ink); font-weight: 800; font-size: .86rem; }

/* ---- Senha de autorização ---- */
.mm-confirm-ov input.fmu-senha { margin: -2px 0 16px; }
.mm-confirm-ov input.fmu-senha:not(:placeholder-shown) { letter-spacing: 3px; }

/* ---- Divisões de estoque (cartões clicáveis) ---- */
.fmu-divs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.fmu-div {
    position: relative; text-align: left; font: inherit; color: inherit; width: 100%;
    background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 14px; padding: 12px 14px;
    box-shadow: var(--p-shadow-sm); display: flex; flex-direction: column; gap: 8px; transition: all .18s;
}
button.fmu-div:hover, a.fmu-div:hover { border-color: var(--tom-line, var(--p-blue-line)); box-shadow: var(--p-shadow); transform: translateY(-1px); }
.fmu-div.on { border-color: var(--tom, var(--p-blue-light)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tom, var(--p-blue-light)) 16%, transparent); }
.fmu-div-top { display: flex; align-items: center; gap: 10px; }
.fmu-div-ico { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--tom-soft); color: var(--tom); flex: none; }
.fmu-div-nome { font-size: .84rem; font-weight: 800; color: var(--p-ink); line-height: 1.2; }
.fmu-div-sub { font-size: .66rem; font-weight: 600; color: var(--p-faint); }
.fmu-div-val { font-size: 1.35rem; font-weight: 800; color: var(--p-ink); letter-spacing: -.5px; line-height: 1; }
.fmu-div-val small { font-size: .7rem; font-weight: 700; color: var(--p-faint); margin-left: 3px; letter-spacing: 0; }
.fmu-div-edit { position: absolute; top: 8px; right: 8px; }

/* ---- Tabelas do módulo ---- */
.fmu-tbl tbody tr > td:first-child { box-shadow: inset 4px 0 0 var(--tom, transparent); }
.fmu-tbl td.strong .mm-chip { margin-left: 5px; }
:is(.mm, .mm-layer) .mm-tbl td.acoes .prmd-iconbtn { display: inline-flex; vertical-align: middle; }
.fmu-tipo-ico {
    width: 26px; height: 26px; border-radius: 8px; flex: none; display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; background: var(--tom-soft, var(--p-blue-soft)); color: var(--tom, var(--p-blue));
}
.fmu-linha { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fmu-sub { font-size: .66rem; font-weight: 600; color: var(--p-faint); margin-top: 1px; }
.fmu-pag { display: flex; align-items: center; gap: 6px; }
.fmu-pag-txt { font-size: .72rem; font-weight: 600; color: var(--p-muted); margin-right: auto; }

/* ---- Inventário ---- */
.fmu-inv-wrap { border: 1px solid var(--p-border); border-radius: 12px; max-height: calc(100vh - 330px); }
.mm-tbl tr.fmu-inv-dif td { background: color-mix(in srgb, var(--p-orange-soft) 60%, var(--p-surface)); }
.fmu-inv-in { width: 92px !important; text-align: right; display: inline-block !important; }

/* ---- Barras de validade (painel) ---- */
.fmu-faixas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

/* ---- Relatório: documento impresso ---- */
.fmu-rel-doc { color: var(--p-ink); }
.fmu-rel-head { display: flex; align-items: center; gap: 16px; border-bottom: 2px solid var(--p-ink); padding-bottom: 10px; margin-bottom: 10px; }
.fmu-rel-logo { width: 64px; height: 64px; object-fit: contain; flex: none; }
.fmu-rel-ent { font-size: .95rem; font-weight: 800; text-transform: uppercase; color: var(--p-ink); }
.fmu-rel-tipo { font-size: .84rem; font-weight: 700; color: var(--p-text); }
.fmu-rel-info { font-size: .68rem; color: var(--p-muted); }
.fmu-rel-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .72rem; color: var(--p-muted); margin-bottom: 10px; }
.fmu-rel-foot { margin-top: 14px; border-top: 1px solid var(--p-border); padding-top: 6px; font-size: .66rem; color: var(--p-faint); text-align: center; }
.fmu-rel-tipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
