.platform-keyboard { position:fixed; z-index:110000; inset:auto auto 14px 50%; margin:0; transform:translateX(-50%); width:min(880px,calc(100vw - 24px)); max-height:calc(100dvh - 30px); overflow:auto; padding:16px; border-radius:20px; border:1px solid var(--border-color); color:var(--text-main); background:var(--card-bg); box-shadow:0 -6px 60px rgba(35,25,65,.2); animation:keyboard-enter .2s ease-out; }
.platform-keyboard.numeric { width:min(410px,calc(100vw - 24px)); }
.keyboard-header { display:flex; gap:12px; align-items:center; justify-content:space-between; margin-bottom:12px; }
.keyboard-header > div { min-width:0; }
#keyboard-title { display:block; color:var(--text-muted); font-size:11px; }
#keyboard-preview { display:block; font-size:19px; font-weight:600; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; min-height:29px; }
#keyboard-close { min-height:44px; }
.keyboard-row { display:flex; gap:6px; margin-top:6px; justify-content:center; }
.keyboard-key { min-width:0; flex:1; min-height:48px; border:1px solid var(--border-color); border-radius:9px; color:var(--text-main); background:var(--bg-color); font-weight:600; font-size:16px; touch-action:manipulation; transition:background .12s,transform .12s; }
.keyboard-key:hover { background:var(--soft-purple); border-color:var(--primary-cyan); }
.keyboard-key:active { transform:scale(.95); }
.keyboard-key.key-wide { flex:1.8; font-size:12px; }
.keyboard-key.key-space { flex:5; font-size:12px; }
.keyboard-key.key-confirm { color:white; background:var(--primary-cyan); }
.keyboard-key[aria-pressed="true"] { background:var(--soft-purple); color:var(--primary-cyan); }
.keyboard-numbers { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.keyboard-numbers .keyboard-key { min-height:51px; }
body.platform-keyboard-open { padding-bottom:var(--platform-keyboard-height,350px); }
body.platform-keyboard-open #modal-quick-product { align-items:flex-start !important; padding-top:24px; padding-bottom:var(--platform-keyboard-height,350px); overflow-y:auto; }
@keyframes keyboard-enter { from { opacity:0; translate:0 18px; } to { opacity:1; translate:0 0; } }
.platform-keyboard::backdrop { background:transparent; pointer-events:none; }
body.platform-keyboard-open #global-modal { align-items:flex-start; padding-top:16px; }
body.platform-keyboard-open #global-modal .modal-container { max-height:max(180px,calc(100dvh - var(--platform-keyboard-height,350px) - 32px)); }
body.platform-keyboard-open .command-dialog { margin-top:20px; max-height:max(160px,calc(100dvh - var(--platform-keyboard-height,350px) - 40px)); overflow:auto; }
.keyboard-settings { grid-column:1 / -1; border:1px solid var(--border-color); border-radius:12px; padding:18px; margin-top:8px; background:var(--bg-color); }
.keyboard-settings-heading { display:flex; align-items:flex-start; gap:12px; margin-bottom:12px; }
.keyboard-settings-heading > i { color:var(--primary-cyan); font-size:24px; margin-top:3px; }
.keyboard-settings h3 { font-size:16px; }
.keyboard-settings-heading p,.keyboard-settings-note { color:var(--text-muted); font-size:11px; margin-top:5px; }
.keyboard-setting-row { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:74px; border-top:1px solid var(--border-color); padding:12px 0; cursor:pointer; }
.keyboard-setting-row strong,.keyboard-setting-row small { display:block; }
.keyboard-setting-row strong { font-size:13px; }
.keyboard-setting-row small { color:var(--text-muted); font-size:11px; margin-top:3px; }
.keyboard-setting-switch { position:relative; display:flex; gap:9px; align-items:center; flex-shrink:0; padding:4px; min-height:44px; }
.keyboard-setting-switch input { position:absolute; width:100%; height:100%; inset:0; opacity:0; cursor:pointer; margin:0; z-index:1; }
.keyboard-switch-track { width:42px; height:24px; background:var(--text-muted); opacity:.65; border-radius:14px; transition:background .2s,opacity .2s; position:relative; }
.keyboard-switch-track::after { content:''; width:18px; height:18px; position:absolute; top:3px; left:3px; border-radius:50%; background:#fff; transition:transform .2s; }
.keyboard-setting-switch input:checked + .keyboard-switch-track { background:var(--primary-cyan); opacity:1; }
.keyboard-setting-switch input:checked + .keyboard-switch-track::after { transform:translateX(18px); }
.keyboard-setting-switch input:focus-visible + .keyboard-switch-track { outline:3px solid var(--cyan-glow); outline-offset:4px; }
.keyboard-switch-answer { min-width:18px; font-size:12px; color:var(--text-muted); }
.keyboard-switch-answer::after { content:'No'; }
.keyboard-setting-switch input:checked ~ .keyboard-switch-answer::after { content:'Sí'; color:var(--primary-cyan); }
@media (max-width:600px) { .platform-keyboard { padding:10px; bottom:6px; } .keyboard-row { gap:3px; } .keyboard-key { min-height:44px; border-radius:6px; font-size:13px; } .keyboard-key.key-wide { font-size:10px; } .keyboard-setting-row { gap:10px; } }
@media (prefers-reduced-motion:reduce) { .platform-keyboard { animation:none; } .keyboard-key,.keyboard-switch-track,.keyboard-switch-track::after { transition:none; } }
