/* Shared mobile chrome. Fiscal forms and desktop layout retain their own contracts. */
.vx-mobile-context { display: none; }
@media screen and (max-width: 820px) {
  body:is(.vx-on, .vx-chrome) .vx-mobile-context {
    display: flex; flex-direction: column; gap: 4px; margin: 12px 12px 8px;
    padding: 12px 14px; border: 1px solid var(--vx-border, #dbe4ef);
    border-radius: 12px; background: var(--vx-surface, #fff); color: var(--vx-text, #0f172a);
    font: 14px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }
  body:is(.vx-on, .vx-chrome) .vx-mobile-context strong { font-size: 17px; }
  body:is(.vx-on, .vx-chrome) .vx-mobile-context span { color: var(--vx-text-muted, #475569); }
  /* Home uses the same Help/Exit shell, while retaining its company switcher. */
  body.vx-menu-page.vx-on .vx-appbar,
  body.vx-menu-page.vx-on .vx-appbar #vxTopFaroTrigger {
    display: flex !important; visibility: visible !important; pointer-events: auto !important;
  }
  body.vx-menu-page.vx-on .vx-hub-ambient-hud { position: relative; z-index: auto; }
  /* Phone concepts retain all seven original values, with room to read them. */
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #ConceptosTitulos > tbody > tr:first-child { display: none; }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #ConceptosTitulos,
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #ConceptosTitulos > tbody,
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #ConceptosTitulos > tbody > tr,
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #ConceptosTitulos > tbody > tr > td[colspan] {
    display: block; width: 100%; box-sizing: border-box;
  }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #ConceptosTitulos > tbody > tr:first-child { display: none; }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #Conceptos,
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #Conceptos > tbody { display: block; width: 100%; min-width: 0 !important; }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #ConceptosTitulos_fs { min-width: 0 !important; }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #Conceptos .vx-mobile-concept {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
    width: 100%; box-sizing: border-box;
    padding: 14px; margin: 12px 0; background: var(--vx-surface, #fff);
    border: 1px solid var(--vx-border, #dbe4ef); border-radius: 12px;
  }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #Conceptos .vx-mobile-concept > td {
    display: block; width: auto !important; padding: 0 !important; min-width: 0;
    font-size: 16px !important; line-height: 1.5; text-align: left; overflow-wrap: anywhere;
  }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #Conceptos .vx-mobile-concept > td::before {
    content: attr(data-mobile-label); display: block; color: var(--vx-text-muted, #475569);
    font-size: 12px; font-weight: 600;
  }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #Conceptos .vx-mobile-concept > td:nth-child(4) { grid-column: 1 / -1; grid-row: 2; }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #Conceptos .vx-mobile-concept > td:first-child {
    grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 12px;
  }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #Conceptos .vx-mobile-concept > td:first-child::before { display: none; }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #Conceptos .vx-mobile-concept [data-mobile-action] {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 48px; min-height: 48px; padding: 0 10px; border-radius: 8px;
    border: 1px solid var(--vx-border, #dbe4ef); text-decoration: none;
  }
  body:is(.vx-on, .vx-chrome).vx-page-nvocfd40 #Conceptos [data-mobile-action]::after { content: attr(data-mobile-action); font-size: 14px; }
  /* Help must sit above the shared bars and remain dismissible on a phone. */
  body:is(.vx-on, .vx-chrome) .vxf-backdrop { z-index: 2200; }
  body:is(.vx-on, .vx-chrome) .vxf-panel {
    z-index: 2201; max-height: 100dvh; overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px); box-sizing: border-box;
  }
  body:is(.vx-on, .vx-chrome) .vxf-head { flex-shrink: 0; }
  body:is(.vx-on, .vx-chrome) .vxf-close { min-width: 48px; min-height: 48px; }
  body:is(.vx-on, .vx-chrome).vx-mobile-has-actions {
    padding-bottom: var(--vx-mobile-footer-space, 190px) !important;
    scroll-padding-bottom: var(--vx-mobile-footer-space, 190px);
  }
  body:is(.vx-on, .vx-chrome) {
    --vx-bottomnav-h: 64px;
    --vx-mobile-actions-h: 112px;
    scroll-padding-top: 72px;
    scroll-padding-bottom: 190px;
  }
  body:is(.vx-on, .vx-chrome) input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
  body:is(.vx-on, .vx-chrome) select, body:is(.vx-on, .vx-chrome) textarea { font-size: 16px !important; }
  body:is(.vx-on, .vx-chrome) input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
  body:is(.vx-on, .vx-chrome) select { min-height: 48px !important; box-sizing: border-box; }
  body:is(.vx-on, .vx-chrome) button, body:is(.vx-on, .vx-chrome) .vx-btn, body:is(.vx-on, .vx-chrome) .vx-bnav-link,
  body:is(.vx-on, .vx-chrome) .vx-mas-link { min-height: 48px; touch-action: manipulation; }
  body:is(.vx-on, .vx-chrome) .vx-bottomnav, body.vx-menu-page.vx-on .vx-bottomnav {
    display: flex !important; visibility: visible !important; pointer-events: auto !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 0 8px env(safe-area-inset-bottom, 0px);
    background: var(--vx-surface, #fff); border-top: 1px solid var(--vx-border, #dbe4ef);
    box-shadow: 0 -4px 18px rgba(15,23,42,.06); z-index: 1100;
  }
  body:is(.vx-on, .vx-chrome) .vx-bottomnav .vx-bnav-link {
    justify-content: center; gap: 3px; padding: 6px 2px; min-width: 0;
    min-height: 64px; font-size: 11px; line-height: 1.2;
  }
  body:is(.vx-on, .vx-chrome) .vx-bottomnav .ico { font-size: 21px; }
  body:is(.vx-on, .vx-chrome) .vx-bottomnav .active { background: rgba(37,99,235,.07); border-radius: 12px; }
  body.vx-menu-page.vx-on { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }
  body.vx-menu-page #vxHubBottomDock { display: none !important; }
  body:is(.vx-on, .vx-chrome) #vx-kernel-trigger { display: none !important; }
  body:is(.vx-on, .vx-chrome) .vx-mobile-console-button { width: 100%; text-align: left; }
  body:is(.vx-on, .vx-chrome) .vx-appbar { padding: 0 12px; gap: 8px; }
  body:is(.vx-on, .vx-chrome) .vx-appbar #vxTopMandoTrigger { display: none !important; }
  body:is(.vx-on, .vx-chrome) .vx-appbar #vxSpotlightTrigger {
    flex: 0 0 48px !important; width: 48px !important; min-width: 48px !important;
    height: 48px !important; padding: 0 !important; justify-content: center;
  }
  body:is(.vx-on, .vx-chrome) .vx-appbar #vxSpotlightTrigger .vx-sc-placeholder,
  body:is(.vx-on, .vx-chrome) .vx-appbar #vxSpotlightTrigger .vx-sc-kbd { display: none !important; }
  body:is(.vx-on, .vx-chrome) .vx-appbar #vxTopFaroTrigger { min-height: 48px !important; flex-shrink: 0; }
  body:is(.vx-on, .vx-chrome) .vx-appbar .vx-usermenu { min-height: 48px; display: inline-flex; align-items: center; }
  body:is(.vx-on, .vx-chrome) .vx-appbar .vx-appbar-menu { display: none !important; }
  body:is(.vx-on, .vx-chrome) .vx-appbar .vx-appbar-pill-btn { min-height: 42px; }
  body:is(.vx-on, .vx-chrome) .vx-sheet { z-index: 1200; }
  body:is(.vx-on, .vx-chrome) .vx-sheet-backdrop { z-index: 1199; }
  body:is(.vx-on, .vx-chrome) .vx-sheet-panel { max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
  body:is(.vx-on, .vx-chrome) .vx-mas-scroll { max-height: calc(100dvh - 160px); overflow-y: auto; overscroll-behavior: contain; }
  body:is(.vx-on, .vx-chrome) .vx-mas-link { padding: 12px; line-height: 1.35; }
  body:is(.vx-on, .vx-chrome) .ui-dialog .ui-dialog-buttonpane button { min-height: 48px !important; }
  body:is(.vx-on, .vx-chrome) .ui-dialog .ui-dialog-titlebar-close {
    min-width: 48px; min-height: 48px; color: #0f172a !important; background: #fff !important;
  }
  body:is(.vx-on, .vx-chrome) .ui-dialog .ui-dialog-titlebar-close::before { content: '×'; font-size: 24px; }
  body:is(.vx-on, .vx-chrome) .ui-dialog .ui-dialog-titlebar-close .ui-button-icon { display: none; }
  body:is(.vx-on, .vx-chrome) .vx-dock-footer {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    height: auto !important; min-height: 100px !important; padding: 8px 12px !important;
    display: grid !important; grid-template-columns: 1fr !important; gap: 6px !important;
    z-index: 1090 !important; box-sizing: border-box;
  }
  body:is(.vx-on, .vx-chrome) .vx-dock-left { justify-content: space-between; gap: 8px !important; min-width: 0; }
  body:is(.vx-on, .vx-chrome) .vx-dock-total-preview { gap: 6px; }
  body:is(.vx-on, .vx-chrome) .vx-dock-total-value { font-size: 18px !important; }
  body:is(.vx-on, .vx-chrome) .vx-dock-total-label { font-size: 10px; }
  body:is(.vx-on, .vx-chrome) .vx-dock-draft-status { display: block !important; font-size: 11px; max-width: 48%; }
  body:is(.vx-on, .vx-chrome) .vx-dock-right { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; width: 100%; }
  body:is(.vx-on, .vx-chrome) .vx-dock-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; width: 100%; }
  body:is(.vx-on, .vx-chrome) .vx-dock-ledger { display: flex; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
  body:is(.vx-on, .vx-chrome) .vx-dock-metric { min-width: 0; }
  body:is(.vx-on, .vx-chrome) .vx-dock-ledger .vx-dock-draft-status { max-width: 100%; }
  body:is(.vx-on, .vx-chrome) .vx-btn-save-draft {
    display: inline-flex !important; justify-content: center; align-items: center;
    min-height: 48px !important; padding: 8px !important; font-size: 12px !important; white-space: normal;
  }
  body:is(.vx-on, .vx-chrome) .vx-btn-stamp { min-height: 48px !important; padding: 8px !important; font-size: 12px !important; white-space: normal; }
  body:is(.vx-on, .vx-chrome).vx-mobile-has-actions .vx-cockpit-shell { padding-bottom: var(--vx-mobile-footer-space, 190px) !important; }
  body:is(.vx-on, .vx-chrome) .vx-pass-client-meta { min-width: 0; }
  body:is(.vx-on, .vx-chrome) .vx-pass-top { gap: 8px; }
  body:is(.vx-on, .vx-chrome) .vx-pass-client-name { font-size: 14px; }
  body:is(.vx-on, .vx-chrome) .vx-pass-money { min-width: 80px; }
  body:is(.vx-on, .vx-chrome) .vx-pass-middle { flex-wrap: wrap; gap: 6px; }
  body:is(.vx-on, .vx-chrome) .vx-pass-status { white-space: normal; }
  body:is(.vx-on, .vx-chrome) .vx-pass-actions button, body:is(.vx-on, .vx-chrome) .vx-pass-actions a { min-height: 48px !important; }
  body:is(.vx-on, .vx-chrome) .vx-drawer-overlay { z-index: 1300; }
  body:is(.vx-on, .vx-chrome) .vx-drawer-panel {
    height: 100dvh !important; max-height: 100dvh !important; width: 100% !important;
    max-width: 100% !important; display: flex !important; flex-direction: column; overflow: hidden;
  }
  body:is(.vx-on, .vx-chrome) .vx-drawer-header { padding: 12px 16px; flex-shrink: 0; }
  body:is(.vx-on, .vx-chrome) .vx-drawer-title { font-size: 19px; }
  body:is(.vx-on, .vx-chrome) #frmStudioReceptor { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  body:is(.vx-on, .vx-chrome) .vx-drawer-tabs { flex-shrink: 0; padding: 8px 12px; }
  body:is(.vx-on, .vx-chrome) .vx-drawer-body { min-height: 0; flex: 1; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
  body:is(.vx-on, .vx-chrome) .vx-drawer-footer { flex-shrink: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom,0px)); }
  body:is(.vx-on, .vx-chrome) .vx-form-group label { text-align: left; }
  body:is(.vx-on, .vx-chrome) .vx-drawer-feedback { padding: 12px; margin-bottom: 16px; border: 1px solid #fecaca; border-radius: 10px; color: #991b1b; background: #fef2f2; font-size: 14px; }
  body.vx-page-productos #vx_productos_studio_root { padding: 12px; margin: 8px 0; width: 100%; max-width: 100%; }
  body.vx-page-productos #vx_productos_studio_root .vx-studio-header {
    display: flex !important; flex-direction: column; align-items: stretch;
    height: auto !important; min-height: 0 !important; gap: 12px;
  }
  body.vx-page-productos #vx_productos_studio_root .vx-studio-title-block { width: 100%; min-width: 0; gap: 8px; }
  body.vx-page-productos #vx_productos_studio_root .vx-studio-title { font-size: 22px; }
  body.vx-page-productos #vx_productos_studio_root .vx-filter-pills-bar { width: 100%; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  body.vx-page-productos #vx_productos_studio_root .vx-studio-controls { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  body.vx-page-productos #vx_productos_studio_root .vx-search-box { grid-column: 1 / -1; width: 100%; order: 1; }
  body.vx-page-productos #vx_productos_studio_root #vx_studio_search { width: 100% !important; min-width: 0; }
  body.vx-page-productos #vx_productos_studio_root #vx_btn_new_product { grid-column: 1 / -1; order: 2; justify-content: center; }
  body.vx-page-productos #vx_productos_studio_root .vx-view-toggle { grid-column: 1 / -1; order: 3; }
  body.vx-page-productos #vx_productos_studio_root .vx-view-toggle .vx-view-btn { flex: 1; }
  body.vx-page-productos #vx_productos_studio_root .vx-studio-selectall-btn { order: 4; }
  body.vx-page-productos #vx_productos_studio_root #vx_btn_switch_classic { order: 5; }
  body.vx-page-productos #vx_productos_studio_root .vx-split-container,
  body.vx-page-productos #vx_productos_studio_root .vx-split-stream {
    width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
  }
  body.vx-page-productos #vx_productos_studio_root .vx-split-stream { overflow-x: hidden; }
  body.vx-page-productos #vx_productos_studio_root .vx-split-row {
    width: 100%; min-width: 0; box-sizing: border-box; gap: 8px; padding: 10px 8px;
  }
  body.vx-page-productos #vx_productos_studio_root .vx-split-cbox { flex: 0 0 18px; }
  body.vx-page-productos #vx_productos_studio_root .vx-split-thumb,
  body.vx-page-productos #vx_productos_studio_root .vx-split-thumb-placeholder {
    flex: 0 0 40px; width: 40px; height: 40px;
  }
  body.vx-page-productos #vx_productos_studio_root .vx-split-meta { flex: 1 1 0; min-width: 0; }
  body.vx-page-productos #vx_productos_studio_root .vx-split-sub { min-width: 0; overflow: hidden; white-space: nowrap; }
  body.vx-page-productos #vx_productos_studio_root .vx-split-sub > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.vx-page-productos #vx_productos_studio_root .vx-split-price-box { flex: 0 0 auto; max-width: 88px; }
  body.vx-page-productos #vx_productos_studio_root .vx-split-price { font-size: 12px; white-space: nowrap; }
  body.vx-page-productos #vx_studio_drawer { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; }
  body.vx-page-productos #vx_studio_drawer .vx-drawer-body { min-height: 0; padding-bottom: 100px; }
  body.vx-page-productos #vx_studio_drawer .vx-shortcut-bar { display: none; }
  body.vx-page-productos #vx_studio_drawer .vx-product-drawer-actions {
    position: absolute; bottom: 0; left: 0; right: 0; margin: 0 !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-top: 1px solid var(--vx-border, #dbe4ef); z-index: 2;
  }
  body.vx-page-productos #vx_studio_drawer .vx-product-drawer-actions button { flex: 1; min-height: 48px; }
  body:is(.vx-on, .vx-chrome).vx-mobile-keyboard .vx-bottomnav,
  body:is(.vx-on, .vx-chrome).vx-mobile-keyboard .vx-dock-footer { visibility: hidden !important; pointer-events: none !important; }
  body:is(.vx-on, .vx-chrome) :focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  body:is(.vx-on, .vx-chrome) *, body:is(.vx-on, .vx-chrome) *::before, body:is(.vx-on, .vx-chrome) *::after {
    animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
