/* MED · selector de modo y MEDTAB (hoja estadística). Paleta del módulo MED. */
#section-med.active{display:flex;flex-direction:column}
#section-med>.vp-module-header{order:-3}
#section-med .medx-switch{order:-2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 18px}
#section-med .medx-tile{--type-color:#087c73;position:relative;min-height:112px;align-items:center;color:#173f3c;cursor:pointer;transition:translate .18s ease,box-shadow .18s ease,background-color .18s ease;outline:3px solid transparent;outline-offset:2px}
#section-med .medx-tab{--type-color:#1d5f99}
#section-med .medx-tile .vl-type-symbol{display:grid;place-items:center;min-width:58px;height:58px;border-radius:16px;background:var(--type-color);color:#fff;font-weight:800;font-size:15px;letter-spacing:.04em;flex:none}
#section-med .medx-copy{display:grid;gap:5px;min-width:0;padding-right:26px}
#section-med .medx-tile strong{font-size:19px}
#section-med .medx-tile small{font-size:13px;line-height:1.45;color:#3f5d5b}
#section-med .medx-tile:hover{translate:0 -2px;box-shadow:0 12px 26px color-mix(in srgb,var(--type-color) 24%,transparent)}
#section-med .medx-tile[aria-pressed=true]{outline-color:var(--type-color);background:color-mix(in srgb,var(--type-color) 18%,var(--card,#fff))}
#section-med .medx-tile[aria-pressed=true]::after{content:"✓";position:absolute;top:12px;right:14px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--type-color);color:#fff;font-weight:800;font-size:13px}
#section-med.medtab-on>:not(.vp-module-header):not(.medx-switch):not(#medtab):not(.vp-module-footer):not(dialog){display:none!important}

/* Contenedor */
.medtab{order:-1;--mt-accent:#087c73;--mt-blue:#1d5f99;--mt-line:#cdd9e2;--mt-top:46%;display:flex;flex-direction:column;height:calc(100dvh - 150px);min-height:620px;border:1px solid #c8d8df;border-radius:18px;background:#f7fafb;box-shadow:0 12px 30px #0c2d3a14;overflow:hidden;color:#18343f;font:13px/1.35 Arial,sans-serif}
.medtab .vp-field-error{display:none!important}
.medtab.mt-drop-over{outline:3px dashed var(--mt-accent);outline-offset:-6px}
.mt-bar{display:flex;align-items:center;gap:2px;padding:6px 10px;background:linear-gradient(180deg,#fff,#eef4f6);border-bottom:1px solid var(--mt-line)}
.mt-menu{position:relative}
.mt-menubtn{min-height:32px;padding:5px 12px;border:1px solid transparent;border-radius:8px;background:transparent;color:#18343f;font:700 13px Arial,sans-serif;cursor:pointer}
.mt-menubtn:hover,.mt-menubtn[aria-expanded=true]{background:#e0efed;border-color:#bcdcd7}
.mt-drop{position:absolute;z-index:40;top:calc(100% + 4px);left:0;min-width:270px;padding:6px;border:1px solid #c8d8df;border-radius:12px;background:#fff;box-shadow:0 16px 36px #0c2d3a2e;animation:mt-pop .14s ease-out}
.mt-drop.mt-mega{display:grid;grid-template-columns:repeat(3,minmax(230px,1fr));gap:4px 10px;min-width:min(760px,90vw);padding:10px}
.mt-drop[hidden]{display:none}
.mt-group{display:grid;align-content:start}
.mt-group strong{padding:6px 10px 4px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--mt-accent)}
.mt-drop button{display:block;width:100%;text-align:left;padding:7px 10px;border:0;border-radius:8px;background:transparent;color:#18343f;font:13px Arial,sans-serif;cursor:pointer}
.mt-drop button:hover,.mt-drop button:focus-visible{background:#e8f4f2;color:#0b4f49;outline:none}
.mt-status{margin-left:auto;color:#53707a;font-size:12px}
.mt-quick{display:flex;flex-wrap:wrap;gap:6px;padding:8px 10px;background:#fbfdfd;border-bottom:1px solid var(--mt-line)}
.mt-quick button{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 11px;border:1px solid #c9dcdf;border-radius:9px;background:#fff;color:#18343f;font:700 12px Arial,sans-serif;cursor:pointer;transition:translate .14s ease,border-color .14s ease,box-shadow .14s ease}
.mt-quick button span{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:6px;background:#e3f2ef;color:var(--mt-accent);font-size:12px}
.mt-quick button:hover{translate:0 -1px;border-color:var(--mt-accent);box-shadow:0 6px 14px #087c7322}
.mt-quick .mt-q-io{margin-left:auto}.mt-quick .mt-q-io+.mt-q-io{margin-left:0}
.mt-quick .mt-q-io span{background:#e5eef8;color:var(--mt-blue)}
.mt-panes{flex:1;min-height:0;display:grid;grid-template-rows:var(--mt-top) 8px minmax(0,1fr)}
.mt-shead{display:flex;align-items:center;gap:10px;padding:6px 12px;background:#eef4f6;border-bottom:1px solid var(--mt-line);font-size:12.5px}
.mt-shead strong{color:#0b4f49}
.mt-session-count,.mt-hint{color:#5b7580}
.mt-shead .mt-mini{margin-left:auto}
.mt-mini{min-height:26px;padding:3px 10px;border:1px solid #c9dcdf;border-radius:7px;background:#fff;color:#2b4a54;font:700 11.5px Arial,sans-serif;cursor:pointer}
.mt-mini:hover{border-color:#b5475f;color:#8f2234}
.mt-session{display:flex;flex-direction:column;min-height:0;background:#fff}
.mt-results{flex:1;overflow:auto;padding:12px 16px;scroll-behavior:smooth}
.mt-split{background:linear-gradient(#dfe9ed,#cfdde3);cursor:row-resize;border-block:1px solid #bfd0d8}
.mt-split:hover{background:#b8d9d4}
.mt-sheet{display:flex;flex-direction:column;min-height:0}
.mt-empty{max-width:720px;margin:24px auto;padding:22px;border:1px dashed #b8d1d3;border-radius:14px;background:#f8fcfc;text-align:center;color:#3d5b62}
.mt-empty strong{display:block;font-size:16px;color:#0b4f49;margin-bottom:6px}

/* Hoja de trabajo */
.mt-grid{position:relative;flex:1;min-height:0;overflow:auto;background:#fff;outline:none}
.mt-grid:focus-visible{box-shadow:inset 0 0 0 2px #087c7355}
.mt-table{border-collapse:separate;border-spacing:0;table-layout:fixed;font:13px/1 Arial,sans-serif}
.mt-table th,.mt-table td{height:26px;padding:0 7px;border-right:1px solid #e1e8ec;border-bottom:1px solid #e1e8ec;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}
.mt-table td{width:112px;min-width:112px;max-width:112px;text-align:right;cursor:cell;color:#18343f}
.mt-table td.mt-text{text-align:left}
.mt-table thead th,.mt-table thead td{position:sticky;z-index:3;background:#e9f0f3}
.mt-table .mt-ids th{top:0;height:24px;text-align:center;font-weight:700;color:#2d4c57;border-bottom:1px solid #cfdbe1;cursor:pointer}
.mt-table .mt-names th,.mt-table .mt-names td{top:24px;height:28px;background:#f4f8fa;border-bottom:2px solid #9fbcc6;font-weight:700;color:#0b4f49;text-align:center}
.mt-table .mt-names td:empty::before{content:"título";color:#a7b8bf;font-weight:400;font-style:italic}
.mt-table .mt-corner{position:sticky;left:0;z-index:5;width:46px;min-width:46px;text-align:center;color:#6b8690;font-size:11px}
.mt-table .mt-corner-name{font-size:11px;color:#0b4f49}
.mt-table .mt-rownum{position:sticky;left:0;z-index:2;width:46px;min-width:46px;background:#f1f5f7;color:#6b8690;font-weight:400;font-size:11.5px;text-align:center}
.mt-table .mt-hsel{background:#d8ebe8!important;color:#0b4f49}
.mt-table td.mt-sel{background:#e3f2ef}
.mt-table td.mt-active{box-shadow:inset 0 0 0 2px var(--mt-accent);background:#fff}
.mt-table .mt-names td.mt-sel{background:#d8ebe8}
.mt-spacer td{padding:0!important;border:0!important;height:auto!important}
.mt-editor{position:absolute;z-index:6;box-sizing:border-box;margin:0;padding:0 7px;border:2px solid var(--mt-accent);border-radius:0;background:#fff;font:13px Arial,sans-serif;color:#18343f;outline:none;box-shadow:0 4px 12px #087c7333}
.mt-editor[hidden]{display:none}

/* Resultados */
.mt-result{margin:0 0 18px;padding:14px 16px 6px;border:1px solid #d6e3e8;border-left:4px solid var(--mt-accent);border-radius:12px;background:#fff;box-shadow:0 6px 18px #0c2d3a0d;animation:mt-in .32s cubic-bezier(.2,.8,.2,1)}
.mt-result header{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
.mt-result h4{margin:0;font-size:15px;color:#0b4f49}
.mt-result header span{color:#7a929b;font-size:11.5px}
.mt-result header>span{margin-right:auto}
.mt-tablewrap{margin:8px 0 12px;overflow-x:auto}
.mt-tablewrap h5{margin:0 0 5px;font-size:12.5px;color:#2d4c57}
.mt-rtable{width:auto!important;border-collapse:collapse;font-size:12.5px;min-width:260px}
.mt-rtable th.mt-numhead{text-align:right}
.mt-rtable th{padding:5px 10px;background:#eef4f6;border-bottom:1px solid #c7d6dc;text-align:left;color:#2d4c57;white-space:nowrap}
.mt-rtable td{padding:4px 10px;border-bottom:1px solid #edf2f4;white-space:nowrap}
.mt-rtable td.mt-numcell{text-align:right;font-variant-numeric:tabular-nums}
.mt-rtable tbody tr:hover td{background:#f5faf9}
.mt-na{color:#9aaeb6}
.mt-note{margin:5px 0 0;color:#5b7580;font-size:11.5px}
.mt-msg{margin:8px 0;padding:8px 11px;border-radius:8px;font-size:12.5px;background:#eef6fb;color:#1d4f73;border-left:3px solid var(--mt-blue)}
.mt-msg.mt-ok{background:#ecf7f0;color:#1f6a3d;border-left-color:#2e8b57}
.mt-msg.mt-warn{background:#fff4e5;color:#7a4a05;border-left-color:#d08a1a}
.mt-charts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(460px,1fr));gap:12px}
.mt-charts:not(.mt-charts-grid) .mt-chart{max-width:900px}
.mt-chart{margin:4px 0 10px;padding:8px 10px 4px;border:1px solid #e3ecef;border-radius:10px;background:#fdfefe}
.mt-chart figcaption{font-weight:700;color:#2d4c57;font-size:12.5px;margin-bottom:2px}
.mtc{width:100%;height:auto;display:block}
.mtc text{font-family:Arial,sans-serif}
.mtc-grid{stroke:#e6edf0}
.mtc-frame{fill:none;stroke:#b8c9d0}
.mtc-tick{fill:#56717b;font-size:11px}
.mtc-tickmark{stroke:#b8c9d0}
.mtc-axis{fill:#2d4c57;font-size:12px;font-weight:700}
.mtc-cl{stroke:var(--mtc-cl,#c0392b);stroke-width:1.6;stroke-dasharray:7 5;fill:none}
.mtc-center{stroke:var(--mtc-center,#2e8b57);stroke-width:1.6;fill:none}
.mtc-ref{stroke:var(--mtc-ref,#8aa0a8);stroke-width:1.2;stroke-dasharray:3 4}
.mtc-hlabel{font-size:10.5px;font-weight:700}
.mtc-cl-t{fill:var(--mtc-cl,#c0392b)}.mtc-center-t{fill:var(--mtc-center,#2e8b57)}.mtc-ref-t{fill:var(--mtc-ref,#6b8690)}
.mtc-spec{stroke:var(--mtc-spec,#b5475f);stroke-width:2;stroke-dasharray:8 4}
.mtc-spec-t{fill:var(--mtc-spec,#b5475f);font-size:11px;font-weight:800}
.mtc-target{stroke:var(--mtc-target,#2e8b57);stroke-width:1.6;stroke-dasharray:3 3}
.mtc-target-t{fill:var(--mtc-target,#2e8b57);font-size:11px;font-weight:800}
.mtc-whisker{stroke:#5b7580;stroke-width:1.3}
.mtc-out{fill:#b5475f;font-size:15px;font-weight:700}
.mtc-fail{fill:#c0392b;stroke:#fff;stroke-width:1}
.mtc-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:11.5px;color:#2d4c57;margin:2px 0 4px}
.mtc-legend span{display:inline-flex;align-items:center;gap:6px}
.mtc-legend i{display:inline-block;width:16px;height:10px;border:2px solid;border-radius:2px;box-sizing:border-box}
@media (prefers-reduced-motion:no-preference){
 .mt-result .mtc-bar{transform-box:fill-box;transform-origin:50% 100%;animation:mt-grow .5s cubic-bezier(.2,.8,.2,1) both}
 .mt-result .mtc-draw{stroke-dasharray:1;animation:mt-draw 1.1s ease-out both}
 .mt-result .mtc-pt{animation:mt-fade .4s ease-out .25s both}
}
@keyframes mt-grow{from{scale:1 0}to{scale:1 1}}
@keyframes mt-draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes mt-fade{from{opacity:0}to{opacity:1}}
@keyframes mt-in{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}
@keyframes mt-pop{from{opacity:0;translate:0 -4px}to{opacity:1;translate:0 0}}

/* Diálogos */
.mt-dialog{width:min(980px,calc(100vw - 24px));max-height:calc(100dvh - 40px);padding:0;border:1px solid #c8d8df;border-radius:16px;background:#fff;color:#18343f;box-shadow:0 24px 60px #0c2d3a55;font:13px/1.4 Arial,sans-serif}
.mt-dialog::backdrop{background:#0b263299;backdrop-filter:blur(3px)}
.mt-dialog>.vp-popup-close{display:none!important}
.mt-dhead{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:linear-gradient(180deg,#f4faf9,#e7f2f0);border-bottom:1px solid var(--mt-line,#cdd9e2);position:sticky;top:0;z-index:2}
.mt-dhead h3{margin:0;font-size:17px;color:#0b4f49}
.mt-x{width:34px;height:34px;border:1px solid #c9dcdf;border-radius:9px;background:#fff;font-size:20px;line-height:1;cursor:pointer;color:#2d4c57}
.mt-dbody{display:grid;grid-template-columns:230px minmax(0,1fr);gap:16px;padding:16px 18px;max-height:calc(100dvh - 190px);overflow:auto}
.mt-collist{border:1px solid #d6e3e8;border-radius:12px;background:#f7fbfb;padding:10px;align-self:start;position:sticky;top:0}
.mt-collist strong{display:block;margin-bottom:6px;color:#0b4f49}
.mt-collist ul{list-style:none;margin:0 0 6px;padding:0;max-height:330px;overflow:auto}
.mt-collist button{display:block;width:100%;text-align:left;padding:5px 7px;border:0;border-radius:7px;background:transparent;color:#18343f;font:12.5px Arial,sans-serif;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mt-collist button:hover{background:#e3f2ef}
.mt-collist b{color:#1d5f99;margin-right:4px}
.mt-collist small{color:#6b8690;font-size:11px}
.mt-form{display:grid;gap:11px;align-content:start}
.mt-form.mt-wide{grid-column:1/-1}
.mt-help{margin:0;padding:9px 12px;border-radius:10px;background:#eef7f5;color:#20514c;border-left:3px solid #087c73}
.mt-help code,.mt-dialog code{background:#fff;border:1px solid #d6e3e8;border-radius:5px;padding:0 4px;font-size:12px}
.mt-field{display:grid;gap:4px;margin:0;border:0;padding:0}
.mt-field[hidden],.mt-check[hidden]{display:none}
.mt-field>span,.mt-field legend{font-weight:700;color:#2d4c57;font-size:12.5px;padding:0}
.mt-field select,.mt-field input,.mt-field textarea{min-height:36px;padding:6px 10px;border:1px solid #c3d4da;border-radius:9px;background:#fff;font:13px Arial,sans-serif;color:#18343f;box-sizing:border-box;width:100%}
.mt-field textarea{font-family:Consolas,monospace;font-size:14px}
.mt-field select:focus,.mt-field input:focus,.mt-field textarea:focus{outline:none;border-color:#087c73;box-shadow:0 0 0 3px #087c7322}
.mt-multi,.mt-tests{display:flex;flex-wrap:wrap;gap:6px 14px;padding:8px 10px!important;border:1px solid #d6e3e8!important;border-radius:10px;background:#fbfdfd}
.mt-multi legend,.mt-tests legend{width:100%;margin-bottom:2px}
.mt-multi label,.mt-tests label,.mt-check{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;cursor:pointer}
.mt-keypad{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:5px}
.mt-keypad button,.mt-funcs button{min-height:32px;border:1px solid #c9dcdf;border-radius:8px;background:#fff;font:700 13px Arial,sans-serif;color:#18343f;cursor:pointer}
.mt-keypad button:hover,.mt-funcs button:hover{border-color:#087c73;background:#eef7f5}
.mt-funcs{display:flex;flex-wrap:wrap;gap:5px}
.mt-funcs button{padding:0 9px;font-size:11.5px;color:#1d5f99}
.mt-preview{overflow:auto;max-height:300px;border:1px solid #e1e8ec;border-radius:10px}
.mt-dfoot{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid #e1e8ec;background:#fafcfc;position:sticky;bottom:0}
.mt-derr{margin:0 auto 0 0;color:#a3233c;font-weight:700}
@media (max-width:820px){
 #section-med .medx-switch{grid-template-columns:1fr}
 .medtab{height:auto;min-height:0}
 .mt-panes{grid-template-rows:auto 8px 420px}
 .mt-results{max-height:60vh}
 .mt-dbody{grid-template-columns:1fr}
 .mt-drop.mt-mega{grid-template-columns:1fr;min-width:min(330px,92vw)}
 .mt-hint{display:none}
}
@media print{.mt-bar,.mt-quick,.mt-split,.mt-sheet{display:none!important}.medtab{height:auto;border:0}}
.mt-dialog [data-vp-close-original]{display:inline-flex!important;align-items:center;justify-content:center}

/* Edición directa de gráficos */
.mt-chart{position:relative}
.mt-chart figcaption{cursor:text;border-radius:6px;padding:1px 4px;margin-left:-4px}
.mt-chart figcaption:hover{background:#eef6f5;box-shadow:inset 0 0 0 1px #c5dfdb}
.mt-chart figcaption:focus{outline:2px solid #087c73;background:#fff}
.mtc-axis[data-edit]{cursor:text}
.mtc-axis[data-edit]:hover{fill:#087c73;text-decoration:underline}
.mtc-key{position:relative;display:inline-flex;align-items:center;gap:6px;padding:2px 6px;border-radius:7px;cursor:pointer}
.mtc-key:hover{background:#eef6f5}
.mtc-key input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;padding:0}
.mtc-key i{display:inline-block;width:16px;height:10px;border:2px solid;border-radius:2px;box-sizing:border-box}
.mtc-key i.mtc-key-line{height:0;border-width:0;border-top-width:3px;width:20px}
.mt-axis-edit{position:absolute;z-index:5;min-width:160px;padding:4px 8px;border:2px solid #087c73;border-radius:8px;font:700 12px Arial,sans-serif;color:#2d4c57;background:#fff;box-shadow:0 6px 16px #0c2d3a33}
.mt-edit-hint{position:absolute;bottom:6px;right:10px;font-size:11px;color:#7a929b;opacity:0;transition:opacity .2s ease;pointer-events:none}
.mt-chart:hover .mt-edit-hint{opacity:1}
.mt-studies{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 14px}
.mt-multi-opts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.mt-more{border-color:#087c73!important;color:#0b4f49!important}
@media (max-width:820px){.mt-studies{grid-template-columns:1fr}.mt-multi-opts{grid-template-columns:1fr 1fr}}
/* La sesión no se ensancha con tablas largas: cada tabla se desplaza dentro de su tarjeta */
.mt-panes{grid-template-columns:minmax(0,1fr)}
.medtab,.mt-session,.mt-sheet{overflow:clip}
.mt-result{min-width:0;max-width:100%}

/* Interlote guiado: columnas = lotes y ensayos a elegir. */
.mt-lots-dlg .mt-dbody{grid-template-columns:1fr}
.mt-lots{gap:14px}
.mt-lots-how{display:grid;grid-template-columns:auto minmax(0,1fr);gap:16px;align-items:center;padding:12px 14px;border-radius:12px;background:#eef7f5;border-left:3px solid #087c73}
.mt-lots-how ol{margin:0;padding-left:20px;display:grid;gap:4px;color:#20514c}
.mt-lots-demo{display:grid;grid-template-columns:repeat(3,62px);border:1px solid #b9cfd4;border-radius:8px;overflow:hidden;background:#fff;font-size:11px}
.mt-lots-demo span{display:grid;padding:3px 6px;background:#e3f2ef;border-bottom:1px solid #b9cfd4;color:#0b4f49;font-weight:700}
.mt-lots-demo span b{color:#1d5f99;font-size:10px}
.mt-lots-demo i{font-style:normal;padding:2px 6px;text-align:right;border-top:1px solid #edf3f5;color:#18343f}
.mt-lots-demo>*:nth-child(3n+2),.mt-lots-demo>*:nth-child(3n+3){border-left:1px solid #d6e3e8}
.mt-seg{display:flex;flex-wrap:wrap;gap:6px}
.mt-seg button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:9px 12px;border:1.5px solid #d6e3e8;border-radius:10px;background:#fff;color:#18343f;font:inherit;text-align:left;cursor:pointer}
.mt-seg button b{font-size:13.5px}
.mt-seg button small{font-size:11.5px;color:#4d6873}
.mt-seg button:hover{border-color:#087c73}
.mt-seg button[aria-pressed=true]{border-color:#087c73;background:#eaf6f3;box-shadow:inset 0 0 0 1px #087c73;color:#0b4f49}
.mt-seg button:focus-visible{outline:3px solid #8fd3cb;outline-offset:2px}
.mt-statgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.mt-statgrid[hidden]{display:none}
.mt-statgroup{display:flex;flex-direction:column;gap:5px}
.mt-statgroup b{font-size:11.5px;color:#40627a;letter-spacing:.02em}
.mt-statgroup label{display:flex;align-items:center;gap:6px;padding:5px 8px;border:1px solid #d6e3e8;border-radius:8px;background:#fff;font-size:12.5px;cursor:pointer;color:#18343f}
.mt-statgroup label:has(input:checked){border-color:#087c73;background:#eaf6f3;color:#0b4f49;font-weight:700}
.mt-statgroup input{accent-color:#087c73}
.mt-statquick{grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.mt-statquick .btn{min-height:30px;padding:4px 12px;font-size:12.5px}
.mt-statcount{font-size:12px;color:#4d6873}
/* Reglas que había dejado afuera por error (interlote, barra, accesos, casillas, informe, menú en columnas, rótulos, panel al pasar el cursor, copiar, decimales). Restauradas. */
.mt-seg label{cursor:pointer}
.mt-seg input{position:absolute;opacity:0;pointer-events:none}
.mt-seg span{display:inline-block;padding:7px 13px;border:1px solid #c3d4da;border-radius:999px;background:#fff;font-weight:700;font-size:12.5px;color:#2d4c57;transition:.15s}
.mt-seg input:checked+span{background:#087c73;border-color:#087c73;color:#fff;box-shadow:0 4px 12px #087c7333}
.mt-seg input:focus-visible+span{outline:3px solid #087c7344}
.mt-lotcols,.mt-lottests{padding:10px 12px!important;border:1px solid #d6e3e8!important;border-radius:12px;background:#fbfdfd}
.mt-lotcols legend,.mt-lottests legend{font-size:13px!important}
.mt-lotcount{font-weight:600;color:#087c73}
.mt-lotcount.mt-bad{color:#b23a48}
.mt-lotbtns{display:flex;gap:6px;margin:2px 0 8px}
.mt-lotgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:8px}
.mt-lotcard{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);gap:0 8px;align-items:center;padding:9px 10px;border:1px solid #d1dfe4;border-radius:10px;background:#fff;cursor:pointer;transition:.15s}
.mt-lotcard input{grid-row:span 2;accent-color:#087c73;width:17px;height:17px;margin:0}
.mt-lotcard b{position:absolute;top:6px;right:8px;font-size:10.5px;color:#1d5f99}
.mt-lotcard strong{font-size:13px;color:#18343f;overflow-wrap:break-word;padding-right:22px}
.mt-lotcard small{grid-column:2;color:#6b8690;font-size:11px}
.mt-lotcard:has(input:checked){border-color:#087c73;background:#eaf6f3;box-shadow:inset 0 0 0 1px #087c73}
.mt-lotcard:hover{border-color:#087c73}
.mt-lotstack{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mt-lotstack[hidden]{display:none}
.mt-lottests{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.mt-lottests>legend,.mt-lottests>.mt-lotbtns{grid-column:1/-1}
.mt-lottests>.mt-lotbtns{margin:0}
.mt-testgroup{display:grid;gap:6px;align-content:start}
.mt-testgroup h6{margin:0;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#087c73}
.mt-testcard{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:start;padding:7px 9px;border:1px solid #d9e5e9;border-radius:9px;background:#fff;cursor:pointer;transition:.15s}
.mt-testcard input{margin:2px 0 0;accent-color:#087c73;width:16px;height:16px}
.mt-testcard strong{display:block;font-size:12.5px;color:#18343f}
.mt-testcard small{display:block;font-size:11px;color:#6b8690;line-height:1.35}
.mt-testcard:has(input:checked){border-color:#087c73;background:#f0f8f6}
.mt-lotspecs{display:grid;grid-template-columns:1fr 1fr 2fr;gap:10px}
.mt-shake{animation:mt-shake .45s}
@keyframes mt-shake{20%,60%{transform:translateX(-5px)}40%,80%{transform:translateX(5px)}}
@media(max-width:760px){.mt-lots-how{grid-template-columns:1fr}.mt-lottests{grid-template-columns:1fr}.mt-lotspecs,.mt-lotstack{grid-template-columns:1fr}}
.mt-lots-how[hidden],.mt-lotspecnote[hidden]{display:none}
.mt-lots-demo i.mt-tx{text-align:left;color:#8f2234;font-weight:700}
.mt-lotstack{grid-template-columns:1fr!important}
.mt-lotfactor select{max-width:420px}
.mt-lotinfo{color:#087c73;font-weight:700;font-size:11.5px}
.mt-lotinfo.mt-bad{color:#b23a48}
.mt-auto{font-style:normal;font-weight:600;color:#087c73;margin-left:6px;font-size:11.5px}
.mt-lotcard[hidden]{display:none}
.mt-lotspecnote{margin:-4px 0 0;color:#6b8690;font-size:11.5px}

.mt-lots-dlg .mt-lotcard{display:flex!important;align-items:center;gap:9px;padding:9px 34px 9px 10px}
.mt-lots-dlg .mt-lotcard input{flex:none}
.mt-lotcard-t{display:flex;flex-direction:column;min-width:0;gap:1px}
.mt-lots-dlg .mt-lotcard strong{display:block;padding:0;overflow-wrap:break-word}
.mt-lots-dlg .mt-lotcard small{display:block;overflow-wrap:break-word}

/* Barra: accesos rápidos en una franja pareja (sin huecos) y archivos/informe a la derecha del menú. */
.mt-bar{flex-wrap:wrap;row-gap:6px}
.mt-timer{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:2px 10px 2px 8px;border-radius:999px;background:#eef4f6;border:1px solid #d3e1e6;color:#53707a;font-size:11.5px;white-space:nowrap}
.mt-timer i{width:14px;height:14px;border-radius:50%;border:2px solid currentColor;position:relative;flex:none}
.mt-timer i::after{content:"";position:absolute;left:50%;top:1px;width:2px;height:5px;margin-left:-1px;background:currentColor;border-radius:1px;transform-origin:50% 100%}
.mt-timer b{font:800 13px/1 Consolas,ui-monospace,monospace;color:#18343f;letter-spacing:.02em}
.mt-timer small{font-size:11px}
.mt-timer[data-state=active]{background:#e6f5f2;border-color:#9fd3c9;color:#087c73}
.mt-timer[data-state=active] i::after{animation:mt-tick 60s steps(60) infinite}
.mt-timer[data-state=done]{background:#ecf7f0;border-color:#a8d8b9;color:#1f6a3d}
@keyframes mt-tick{to{transform:rotate(360deg)}}
/* 12 accesos en filas completas: 12, 6, 4 o 3 por fila según el ancho (siempre parejas, sin huecos). */
.mt-quick{display:block;container-type:inline-size}
.mt-quick-in{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.mt-quick button{min-width:0;justify-content:center;padding:4px 7px}
.mt-quick button em{font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@container (min-width:520px){.mt-quick-in{grid-template-columns:repeat(4,minmax(0,1fr))}}
@container (min-width:760px){.mt-quick-in{grid-template-columns:repeat(6,minmax(0,1fr))}}
@container (min-width:1230px){.mt-quick-in{grid-template-columns:repeat(12,auto)}}
@media(max-width:900px){.mt-io{margin-left:0;width:100%;flex-wrap:wrap}.mt-status{order:5;width:100%;margin:0}}

/* Casillas y opciones de los cuadros de cada estudio. */
.mt-dialog input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:none;width:18px;height:18px;margin:0;border:1.5px solid #9fb8bf;border-radius:5px;background:#fff center/12px 12px no-repeat;cursor:pointer;transition:background-color .15s,border-color .15s,box-shadow .15s,transform .15s;vertical-align:middle}
.mt-dialog input[type=checkbox]:hover{border-color:#087c73;box-shadow:0 0 0 3px #087c731a}
.mt-dialog input[type=checkbox]:checked{background-color:#087c73;border-color:#087c73;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.4 6.3l2.3 2.3 4.9-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");animation:mt-check .22s cubic-bezier(.34,1.6,.6,1)}
.mt-dialog input[type=checkbox]:focus-visible{outline:none;box-shadow:0 0 0 3px #087c7340}
.mt-dialog input[type=checkbox]:disabled{opacity:.5;cursor:not-allowed}
@keyframes mt-check{from{transform:scale(.7)}to{transform:scale(1)}}
.mt-multi,.mt-tests{gap:7px!important}
.mt-multi label,.mt-tests label{padding:6px 11px 6px 8px;border:1px solid #d6e3e8;border-radius:9px;background:#fff;color:#18343f;transition:border-color .15s,background .15s,box-shadow .15s;user-select:none}
.mt-multi label:hover,.mt-tests label:hover{border-color:#087c73}
.mt-multi label:has(input:checked),.mt-tests label:has(input:checked){border-color:#087c73;background:#eaf6f3;box-shadow:inset 0 0 0 1px #087c73;color:#0b4f49;font-weight:700}
.mt-check{padding:7px 12px 7px 9px;border:1px solid #d6e3e8;border-radius:9px;background:#fff;width:fit-content;transition:.15s}
.mt-check:has(input:checked){border-color:#087c73;background:#eaf6f3;color:#0b4f49;font-weight:700}
.mt-studies{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
.mt-studies legend{grid-column:1/-1}

/* Exportar informe Word / PDF */
.mt-report-dlg{width:min(820px,calc(100vw - 24px))}
.mt-report-dlg .mt-dbody{grid-template-columns:1fr}
.mt-report-grid{display:grid;grid-template-columns:2fr 1.4fr 1fr;gap:10px}
.mt-fmt span{display:inline-flex;align-items:center;gap:8px;padding:8px 16px}
.mt-fmt i{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 3px;border-radius:5px;font-style:normal;font-weight:800;font-size:11px;color:#fff}
.mt-fw{background:#2b579a;font-family:Georgia,serif}
.mt-fp{background:#c0392b;font-size:8.5px!important}
.mt-report-time{display:flex;align-items:center;gap:10px;margin:0;padding:9px 12px;border-radius:10px;background:#f4f8fa;color:#38545e;font-size:12px}
.mt-report-time .mt-timer small{display:none}
@media(max-width:700px){.mt-report-grid{grid-template-columns:1fr}}
.mt-sheet .mt-shead .mt-status{order:3;margin:0 0 0 auto;width:auto;white-space:nowrap}
@media(max-width:900px){.mt-io{margin-left:0;width:100%;justify-content:flex-start}}
@media(max-width:700px){.mt-io{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.mt-io .mt-timer{grid-column:1/-1;justify-content:center}.mt-iob{justify-content:center;padding:3px 6px}}

/* Menú Estadísticas: los grupos fluyen en columnas (sin huecos entre títulos) y con renglones compactos. */
.mt-drop.mt-mega{display:block;columns:3 210px;column-gap:16px;min-width:min(760px,90vw);max-height:min(76vh,640px);overflow:auto;padding:10px 12px}
.mt-drop.mt-mega[hidden]{display:none}
.mt-mega .mt-group{display:block;break-inside:avoid;margin:0 0 8px}
.mt-mega .mt-group strong{display:block;padding:4px 10px 3px}
.mt-drop button{min-height:0!important;padding:4px 10px!important;line-height:1.35;font-size:13px}
@media(max-width:700px){.mt-drop.mt-mega{columns:1;min-width:min(330px,92vw)}}

/* Rótulos de observaciones */
.mtc .mtc-obs{cursor:pointer}
.mtc .mtc-obs:hover{fill:#087c73;font-weight:700;text-decoration:underline}
.mt-edit-hint:has(.mt-obs-btn){opacity:1}
.mt-edit-hint .mt-obs-btn{pointer-events:auto;min-height:22px;padding:2px 9px;margin-left:4px}
.mt-obs-dlg{width:min(620px,calc(100vw - 24px))}
.mt-obs-dlg .mt-dbody{grid-template-columns:1fr}
.mt-obs-tools{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}
.mt-obs-tools .mt-field{flex:1 1 240px}
.mt-obs-dlg textarea{font:13px/1.5 Consolas,ui-monospace,monospace!important}
/* Al editar un gráfico se vuelve a dibujar sin repetir la animación. */
.mtc-static .mtc-draw,.mtc-static .mtc-bar,.mtc-static .mtc-pt{animation:none!important;stroke-dasharray:none!important;opacity:1}
.mt-chart:has(.mt-obs-btn) .mt-edit-hint{position:static;display:flex;justify-content:flex-end;align-items:center;gap:4px;margin-top:4px;color:transparent;transition:color .2s}
.mt-chart:has(.mt-obs-btn):hover .mt-edit-hint{color:#7a929b}

/* Panel al pasar el cursor: patrones (gráficos de control) y resumen de capacidad */
.mt-chart{position:relative}
.mt-hover{position:absolute;top:44px;right:10px;z-index:6;width:min(340px,calc(100% - 20px));pointer-events:none;animation:mt-hv-in .16s ease-out}
@keyframes mt-hv-in{from{opacity:0;transform:translateY(-4px)}}
.mt-hv{padding:10px 12px;border-radius:12px;background:#fffffff2;border:1px solid #c8d8df;border-left:4px solid #1d5f99;box-shadow:0 12px 28px #0c2d3a33;font-size:12px;line-height:1.4;color:#18343f;backdrop-filter:blur(4px)}
.mt-hv>b{display:block;margin-bottom:4px;font-size:12.5px;color:#0b4f49}
.mt-hv p{margin:4px 0}
.mt-hv p span{color:#4a6670}
.mt-hv p em{font-style:normal;color:#6b8690;font-size:11.5px}
.mt-hv small{display:block;margin-top:6px;color:#6b8690;font-size:11px}
.mt-hv-ok{border-left-color:#2e8b57}
.mt-hv-warn{border-left-color:#d08a1a}
.mt-hv-bad{border-left-color:#c0392b}
.mt-hv-verdict{font-weight:800;font-size:13px}
.mt-hv-ok .mt-hv-verdict{color:#1f6a3d}.mt-hv-warn .mt-hv-verdict{color:#8a5a06}.mt-hv-bad .mt-hv-verdict{color:#a5281b}
.mt-hv dl{display:grid;grid-template-columns:auto 1fr auto 1fr;gap:2px 8px;margin:6px 0 0}
.mt-hv dt{color:#4a6670}
.mt-hv dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums}

/* Copiar gráficos y tablas */
.mt-chart:focus,.mt-tablewrap:focus{outline:none}
.mt-picked{outline:2px solid #087c73!important;outline-offset:3px;border-radius:12px}
.mt-tablewrap h5{display:flex;align-items:center;gap:8px}
.mt-tablewrap .mt-copy{margin-left:auto;opacity:0;transition:opacity .15s}
.mt-tablewrap:hover .mt-copy,.mt-tablewrap:focus-within .mt-copy,.mt-picked .mt-copy{opacity:1}
.mt-copied{animation:mt-copied .6s ease-out}
@keyframes mt-copied{0%{box-shadow:0 0 0 0 #087c7366}100%{box-shadow:0 0 0 14px #087c7300}}
.mt-hover{width:min(300px,calc(100% - 20px))}
.mt-hover.mt-hover-left{right:auto;left:74px}
.mt-hv{font-size:11.5px}
.mt-hv p{margin:5px 0;line-height:1.35}
.mt-hv p em{font-size:11px}
/* Decimales de la tabla de descriptivos */
.mt-dec{display:inline-flex;align-items:center;gap:4px;margin-left:10px;font-weight:500;font-size:11.5px;color:#526880}
.mt-dec b{min-width:46px;text-align:center;color:#12355b;font-variant-numeric:tabular-nums}
.mt-dec .mt-mini{min-width:22px;padding:1px 6px}
.mt-hv dt.mt-hv-w{grid-column:1}
.mt-hv dd.mt-hv-w{grid-column:2 / span 3}

/* Archivos e informe (Abrir, Excel, Word, PDF) a la derecha del menú, con ícono dibujado (antes la letra del ícono se leía junto al nombre: «WWord», «PDFPDF») */
.mt-io{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:6px;margin-left:auto;padding-left:10px}
.mt-iob{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:3px 10px;border:1px solid #c9dcdf;border-radius:9px;background:#fff;color:#18343f;font:700 12px Arial,sans-serif;cursor:pointer;white-space:nowrap;transition:border-color .14s,box-shadow .14s}
.mt-iob:hover{border-color:var(--mt-blue);box-shadow:0 6px 14px #1d5f9922}
.mt-iob:focus-visible{outline:3px solid #0b67c2;outline-offset:1px}
.mt-iob svg{width:18px;height:18px;flex:none;fill:#e5eef8;stroke:#1f4e79;stroke-width:1.2;stroke-linejoin:round;stroke-linecap:round}
.mt-iob svg .mt-ico-lines{fill:none}
.mt-iob.mt-iob-excel svg{fill:#e3f2ef;stroke:#0b7a5a}
.mt-iob.mt-iob-word svg{fill:#e5eef8;stroke:#1f5fb4}
.mt-iob.mt-iob-pdf svg{fill:#fde8e6;stroke:#b3261e}
.mt-iob em{font-style:normal}
@media (max-width:860px){.mt-io .mt-timer small{display:none}}
