/* SAL-GLOSSARIS-F4-V1 (25-10-2026) · Glossaris amb el model de la UV com a agent terminològic */
html.uvt-f1 .f1-extr.f4-actiu:not(.f4-antic) > :not(.f4):not(.f4-ret) { display: none !important; }
html.uvt-f1 .f1-extr.f4-actiu > .f4-ret { display: none; }
html.uvt-f1 .f1-extr.f4-actiu.f4-antic > .f4 { display: none !important; }
html.uvt-f1 .f1-extr.f4-actiu.f4-antic > .f4-ret { display: block; margin-bottom: 8px; }
html.uvt-f1 .f1-extr.f4-actiu:not(.f4-antic) { display: flex; flex-direction: column; min-height: 0; }
html.uvt-f1 .f4 { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 0; }
html.uvt-f1 .f4:not(.f4-amb-res) { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
html.uvt-f1 .f4 [hidden] { display: none !important; }
html.uvt-f1 .f4-lead { margin: 0; color: var(--f1-sec, #545454); }
html.uvt-f1 .f4-fila { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
html.uvt-f1 .f4-tip, html.uvt-f1 .f4-fx { border: 1px solid #082b4e; background: #fff; color: #082b4e; border-radius: 15px; padding: 3px 11px; cursor: pointer; }
html.uvt-f1 .f4-tip:hover, html.uvt-f1 .f4-fx:hover { background: #e6e3d2; }
html.uvt-f1 .f4-tip.act, html.uvt-f1 .f4-fx.act { background: #082b4e; color: #fff; }
html.uvt-f1 .f4-fx b { opacity: .75; margin-left: 2px; }
html.uvt-f1 .f4-dos { display: flex; gap: 10px; flex: 1 1 auto; min-height: 110px; }
html.uvt-f1 .f4-dos > div { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
html.uvt-f1 .f4-capt { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
html.uvt-f1 .f4-capt label { font-weight: 700; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.uvt-f1 .f4-puja { border: 1px solid #082b4e; background: #fff; color: #082b4e; border-radius: 2px; padding: 1px 8px; cursor: pointer; white-space: nowrap; }
html.uvt-f1 .f4-puja:hover { background: #e6e3d2; }
html.uvt-f1 .f4-dos textarea { flex: 1 1 auto; min-height: 48px; resize: none; border: 1px solid #b1b1b1; border-radius: 2px; padding: 7px 9px; }
html.uvt-f1 .f4-sense { display: none; flex: 1 1 auto; min-height: 48px; border: 1px dashed #b1b1b1; border-radius: 2px; padding: 7px 9px; background: #f5f4ee; color: #292a25; overflow: auto; }
html.uvt-f1 .f4.f4-mono #f4-d, html.uvt-f1 .f4.f4-mono .f4-puja-d { display: none !important; }
html.uvt-f1 .f4.f4-mono .f4-sense { display: block; }
html.uvt-f1 .f4-marq .f4-chk { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
html.uvt-f1 .f4.f4-amb-res > :is(.f4-lead, .f4-tipus, .f4-dos, .f4-opcions, .f4-marq) { display: none !important; }
html.uvt-f1 .f4-torna { display: flex; align-items: center; gap: 10px; }
html.uvt-f1 .f4-torna .f4-resum b { color: #013952; }
html.uvt-f1 .f1-graella.f4-ample { grid-template-columns: minmax(0, 1fr) !important; }
html.uvt-f1 .f1-graella.f4-ample > .f1-pan-man { display: none !important; }
html.uvt-f1 .f4-opcions label { display: inline-flex; align-items: center; gap: 6px; }
html.uvt-f1 .f4-opcions label > span { font-weight: 700; white-space: nowrap; }
html.uvt-f1 .f4-opcions select { padding: 4px 6px; max-width: 280px; }
html.uvt-f1 .f4-chk { white-space: nowrap; }
html.uvt-f1 .f4-marq > label[for="f4-mq"] { font-weight: 700; white-space: nowrap; }
html.uvt-f1 .f4-marq .f4-chk { font-weight: 400; }
html.uvt-f1 .f4-marq #f4-mq { flex: 1 1 200px; min-width: 0; padding: 4px 8px; border: 1px solid #b1b1b1; border-radius: 2px; }
html.uvt-f1 .f1-pan-tit .f4-altres { margin-left: auto; font: 400 var(--f1-p, 14px)/1.3 var(--f1-ff, Arial, sans-serif) !important; }
html.uvt-f1 .f4-enl { border: 0; background: none; color: #016ca2; text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }
html.uvt-f1 .f4-enl:hover { color: #013952; }
html.uvt-f1 .f4-progres { display: flex; align-items: center; gap: 10px; }
html.uvt-f1 .f4-barra { flex: 0 0 220px; height: 8px; background: #edeadf; border-radius: 4px; overflow: hidden; }
html.uvt-f1 .f4-barra i { display: block; height: 100%; width: 0; background: #016ca2; transition: width .4s; }
html.uvt-f1 .f4-msg { padding: 6px 10px; border-left: 4px solid #082b3e; background: #f5f4ee; }
html.uvt-f1 .f4-msg.f4-err { border-left-color: #b3261e; background: #fde7e6; color: #8E1B1B; }
html.uvt-f1 .f4-msg.f4-ok { border-left-color: #1e7e34; background: #e3f4e8; }
html.uvt-f1 .f4-res { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 160px; }
html.uvt-f1 .f4-cap-res { justify-content: space-between; }
html.uvt-f1 .f4-gl { color: #013952; font-weight: 700; }
html.uvt-f1 .f4-temps { color: #545454; }
html.uvt-f1 .f4-avisos { color: #6b4f00; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.uvt-f1 .f4-avisos span + span { margin-left: 14px; }
html.uvt-f1 .f4-taula-c { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid #dddddd; }
html.uvt-f1 .f4-taula { width: 100%; border-collapse: collapse; }
html.uvt-f1 .f4-taula th { position: sticky; top: 0; background: #edeadf; text-align: left; padding: 5px 6px; z-index: 1; }
html.uvt-f1 .f4-taula td { border-top: 1px solid #e8e8e8; padding: 5px 6px; vertical-align: top; }
html.uvt-f1 .f4-taula td:first-child, html.uvt-f1 .f4-taula th:first-child { width: 26px; text-align: center; }
html.uvt-f1 .f4-taula td.f4-o { width: 22%; }
html.uvt-f1 .f4-taula td.f4-t { width: 22%; }
html.uvt-f1 .f4-taula td.f4-t input { width: 100%; box-sizing: border-box; border: 1px solid #cfcfcf; border-radius: 2px; padding: 4px 6px; }
html.uvt-f1 .f4-taula td.f4-t input.f4-nt { margin-top: 4px; border-style: dashed; }
html.uvt-f1 .f4-taula td.f4-an { width: 20%; }
html.uvt-f1 .f4-taula td.f4-ve { width: 18%; }
html.uvt-f1 .f4-taula td.f4-est { width: 15%; }
html.uvt-f1 .f4-taula tr.f4-ok td { background: #f3faf4; }
html.uvt-f1 .f4-taula tr.f4-dis td { opacity: .6; }
html.uvt-f1 .f4-taula tr.f4-gen td.f4-o b { text-decoration: line-through; text-decoration-color: #b1b1b1; }
html.uvt-f1 .f4-taula small { display: block; color: #545454; margin-top: 2px; }
html.uvt-f1 .f4-taula small.f4-ctx { font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.uvt-f1 .f4-taula small.f4-font { color: #013952; }
html.uvt-f1 .f4-r, html.uvt-f1 .f4-cat { display: inline-block; background: #edeadf; color: #292a25; border-radius: 2px; padding: 0 5px; }
html.uvt-f1 .f4-b { display: inline-block; border-radius: 10px; padding: 1px 8px; font-weight: 700; }
html.uvt-f1 .f4-b-bo { background: #e3f4e8; color: #1d6b2f; }
html.uvt-f1 .f4-b-rev { background: #fff4cc; color: #6b4f00; }
html.uvt-f1 .f4-b-n { background: #eeeeee; color: #545454; }
html.uvt-f1 .f4-b-nou { background: #eef2f4; color: #013952; }
html.uvt-f1 .f4-b-tec { background: #013952; color: #fff; }
html.uvt-f1 .f4-prop { margin-top: 4px; border: 1px solid #016ca2; background: #fff; color: #016ca2; border-radius: 3px; padding: 2px 8px; cursor: pointer; }
html.uvt-f1 .f4-prop:hover { background: #eef2f4; }
html.uvt-f1 .f4-subst { display: flex; gap: 4px; align-items: center; margin-top: 3px; }
html.uvt-f1 .f4-buit { text-align: center; color: #545454; padding: 14px; }
html.uvt-f1 .f4-peu-res { flex: 0 0 auto; }
@media (max-height: 820px) { html.uvt-f1 .f4-lead { display: none; } html.uvt-f1 .f4-dos { min-height: 84px; } }
html.uvt-f1 .f4 > :not(.f4-res):not(.f4-dos), html.uvt-f1 .f4-res > :not(.f4-taula-c) { flex: 0 0 auto; }
/* Dins de l'ERPNext (body.sal-embed): els estils antics del mode incrustat (textareas de 250 px, taules amb capçalera
   blava i «overflow: hidden», selects alts) no s'apliquen a Memòries (F3) ni a Glossaris (F4) */
html.uvt-f1 body.sal-embed :is(.f3, .f4) textarea { min-height: 48px !important; height: auto; padding: 7px 9px !important; font-size: inherit !important; line-height: 1.5 !important; border-radius: 2px !important; border: 1px solid #b1b1b1 !important; }
html.uvt-f1 body.sal-embed :is(.f3, .f4) table textarea { min-height: 44px !important; padding: 4px 6px !important; }
html.uvt-f1 body.sal-embed :is(.f3, .f4) :is(select, input[type="text"]) { padding: 4px 6px !important; border-radius: 2px !important; font-size: inherit !important; }
html.uvt-f1 body.sal-embed :is(.f3, .f4) table { border-collapse: collapse !important; border-radius: 0 !important; overflow: visible !important; box-shadow: none !important; }
html.uvt-f1 body.sal-embed :is(.f3, .f4) table th { background: #edeadf !important; color: #292a25 !important; padding: 5px 6px !important; font-size: inherit !important; letter-spacing: 0 !important; }
html.uvt-f1 body.sal-embed :is(.f3, .f4) table td { padding: 5px 6px !important; font-size: inherit !important; border-bottom: 0 !important; background: transparent !important; }
html.uvt-f1 body.sal-embed :is(.f3-taula tr.f3-ok, .f4-taula tr.f4-ok) td { background: #f3faf4 !important; }
