/* Simuladores de vibraciones (señal ISO y espectro FFT). Prefijo .vsim */
.vsim { background: var(--card, #fff); border: 1px solid var(--line, #cfdae6); border-radius: 8px; padding: 18px; margin: 26px 0; display: flex; flex-direction: column; gap: 14px; color: var(--navy, #0b1f33); min-width: 0; }
.vsim * { box-sizing: border-box; }
.vs-head { display: flex; flex-direction: column; gap: 2px; }
.vs-head strong { font-size: 1.1rem; color: var(--navy, #0b1f33); }
.vs-head span { color: var(--muted, #4a5d70); font-size: .92rem; line-height: 1.5; }
.vs-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .vs-grid { grid-template-columns: minmax(0, 1fr); } }
.vs-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vsim fieldset { border: 1px solid var(--line, #cfdae6); border-radius: 6px; padding: 10px 12px 12px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.vsim legend { font-weight: 700; font-size: .9rem; padding: 0 6px; color: var(--navy, #0b1f33); }
.vs-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; min-width: 0; }
.vs-row > label { font-size: .88rem; font-weight: 600; flex: 0 0 auto; }
.vsim input[type=text], .vsim select { font: inherit; font-size: .92rem; padding: 7px 9px; border: 1px solid var(--line, #cfdae6); border-radius: 4px; background: #fff; color: var(--navy, #0b1f33); max-width: 100%; min-width: 0; }
.vsim input[type=text] { width: 6.5em; }
.vsim input[type=range] { flex: 1 1 140px; min-width: 0; accent-color: var(--accent, #e0731a); height: 28px; }
.vsim input[type=checkbox], .vsim input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent, #e0731a); flex: 0 0 auto; }
.vsim button { font: inherit; font-weight: 600; font-size: .92rem; padding: 9px 14px; border-radius: 4px; border: 1px solid var(--navy, #0b1f33); background: var(--navy, #0b1f33); color: #fff; cursor: pointer; min-height: 40px; }
.vsim button.ghost { background: transparent; color: var(--navy, #0b1f33); }
.vsim button.acc { background: var(--accent, #e0731a); border-color: var(--accent, #e0731a); color: #0b1f33; }
.vsim button:disabled, .vsim input:disabled, .vsim select:disabled { opacity: .45; cursor: not-allowed; }
.vsim button:focus-visible, .vsim input:focus-visible, .vsim select:focus-visible, .vsim canvas:focus-visible, .vsim summary:focus-visible { outline: 3px solid var(--accent, #e0731a); outline-offset: 2px; }
.vs-unit { font-size: .85rem; color: var(--muted, #4a5d70); }
.vs-canvas { display: block; width: 100%; border: 1px solid var(--line-soft, #e1e8ef); border-radius: 6px; background: #fff; touch-action: pan-y; }
.vs-cap { margin: 0; font-size: .82rem; color: var(--muted, #4a5d70); line-height: 1.5; }
.vs-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; table-layout: fixed; }
.vs-table th, .vs-table td { border: 1px solid var(--line, #cfdae6); padding: 5px 6px; text-align: right; overflow-wrap: anywhere; }
.vs-table th:first-child, .vs-table td:first-child { text-align: left; }
.vs-table thead th { background: #f3f6f9; font-weight: 700; }
.vs-table caption { text-align: left; font-weight: 700; padding-bottom: 4px; font-size: .9rem; }
.vs-formulas { border-left: 4px solid var(--accent, #e0731a); background: #fff7ef; border-radius: 4px; padding: 9px 12px; font-size: .88rem; line-height: 1.7; margin: 0; overflow-wrap: anywhere; }
.vs-formulas b { font-variant-numeric: tabular-nums; }
.vs-bar { position: relative; display: flex; height: 38px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line, #cfdae6); }
.vs-seg { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; color: #0b1f33; min-width: 0; }
.vs-zA { background: #5cb85c; } .vs-zB { background: #b8dc6a; } .vs-zC { background: #f6d44a; } .vs-zD { background: #f08a3c; } .vs-zE { background: #d9342b; color: #fff; }
.vs-mark { position: relative; height: 22px; margin-top: 2px; }
.vs-mark i { position: absolute; top: 0; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 12px solid #0b1f33; transform: translateX(-50%); }
.vs-mark b { position: absolute; top: 10px; transform: translateX(-50%); font-size: .75rem; white-space: nowrap; }
.vs-zone { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line, #cfdae6); background: #f8fafc; }
.vs-zone .badge { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem; color: #0b1f33; }
.vs-zone p { margin: 0; font-size: .92rem; line-height: 1.5; }
.vs-msg { margin: 0; padding: 8px 10px; border-radius: 4px; font-size: .88rem; line-height: 1.45; background: #f3f6f9; }
.vs-msg.ok { background: #effaf2; color: #155724; font-weight: 600; }
.vs-msg.bad { background: #fdecec; color: #721c24; font-weight: 600; }
.vs-msg.warn { background: #fff6e0; color: #6b4b00; }
.vs-faults { display: flex; flex-direction: column; gap: 6px; }
.vs-fault { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line, #cfdae6); }
.vs-fault:last-child { border-bottom: 0; }
.vs-fault label { font-size: .9rem; font-weight: 600; line-height: 1.3; }
.vs-fault label small { display: block; font-weight: 400; color: var(--muted, #4a5d70); font-size: .78rem; }
.vs-fault input[type=range] { grid-column: 2; width: 100%; flex: none; }
.vs-hide { display: none !important; }
.vs-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.vs-tabs button { background: #f3f6f9; color: var(--muted, #4a5d70); border-color: var(--line, #cfdae6); }
.vs-tabs button[aria-pressed="true"] { background: var(--navy, #0b1f33); color: #fff; border-color: var(--navy, #0b1f33); }
.vs-freqs { font-size: .82rem; }
.vs-freqs summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.vs-chal { border: 2px dashed var(--accent, #e0731a); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: #fffaf4; }
.vs-chal h4 { margin: 0; font-size: 1rem; }
.vs-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px 12px; }
.vs-opts label { display: flex; gap: 8px; align-items: center; font-size: .9rem; padding: 4px 0; }
.vs-read { font-variant-numeric: tabular-nums; font-size: .88rem; min-height: 1.4em; margin: 0; font-weight: 600; }

@media (max-width: 900px) { .vs-grid > .vs-col:nth-child(2) { order: -1; } }
