/* ==========================================================================
   GN6 TPV+ · Ajustes del layout para el TPV (se carga después de gn6shell.css)
   - Sin menú lateral: las opciones van en botones en la barra superior
   - "Opciones" es un botón desplegable
   ========================================================================== */

/* sin menú lateral */
.gn6-no-sidebar .gn6-sidebar,
.gn6-no-sidebar .gn6-backdrop,
.gn6-no-sidebar #toggle-menu-hide { display: none !important; }
.gn6-no-sidebar .gn6-main { margin-left: 0 !important; }

/* cabecera: logo del cliente · botones · marca centrada · utilidades */
.gn6-tpv .gn6-topbar {
    gap: 6px;
    background-color: #F0F0F0;
    margin-bottom: 5px;
}
.gn6-top-logo { display: none; flex: none; align-items: center; height: 100%; padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--fn-line); }
.gn6-top-logo.is-loaded { display: none; }
.gn6-top-logo img { max-height: 30px; max-width: 120px; object-fit: contain; display: block; }

.gn6-topmenu { display: flex; align-items: center; gap: 4px; flex: none; min-width: 0; }
.gn6-tm-btn {
    position: relative;
    height: 36px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0 12px;
    border: 1px solid transparent; border-radius: 9px;
    background: transparent;
    color: var(--fn-text-2);
    font-family: inherit; font-size: 14px; font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.gn6-tm-btn > i:first-child { font-size: 16px; color: var(--fn-muted); }
.gn6-tm-btn:hover { background: var(--fn-hover); color: var(--fn-text); }
.gn6-tm-btn.is-active {
    background: var(--fn-surface);
    border-color: var(--fn-line);
    color: var(--fn-red);
    box-shadow: var(--fn-shadow-sm);
}
.gn6-tm-btn.is-active > i:first-child { color: var(--fn-red); }
/* punto: opción abierta en una pestaña (no activa) */
.gn6-tm-btn > .gn6-dot { position: absolute; top: 5px; right: 5px; margin: 0; }
.gn6-tm-btn.is-open:not(.is-active) > .gn6-dot { display: block; }
.gn6-tm-chev { font-size: 13px; color: var(--fn-muted); transition: transform .15s; }
.gn6-tm-wrap:has(.gn6-drop.is-open) .gn6-tm-chev { transform: rotate(180deg); }
.gn6-tm-wrap:has(.gn6-drop.is-open) .gn6-tm-more { background: var(--fn-hover); color: var(--fn-text); }

/* desplegable "Opciones" (se abre hacia la derecha del botón) */
.gn6-tm-drop { left: 0; right: auto; min-width: 250px; }
.gn6-tm-item { position: relative; }
.gn6-tm-item i { width: 18px; text-align: center; }
.gn6-tm-item.is-active { background: var(--fn-red-50); color: var(--fn-red); }
.gn6-tm-item.is-active i { color: var(--fn-red); }
.gn6-tm-item > .gn6-dot { margin-left: auto; }
.gn6-tm-item.is-open:not(.is-active) > .gn6-dot { display: block; }

/* botón del cajón */
.gn6-cajon-btn i { color: var(--fn-red); }

/* logo de Abazal y versión al pie del menú del usuario */
.gn6-user-version { margin-top: 6px; padding: 10px 10px 4px; border-top: 1px solid var(--fn-line); }

/* tamaños de letra (Grande / Normal / Reducida) */
html[data-gn6-densidad="grande"] .gn6-tm-btn { font-size: 13.5px; }
html[data-gn6-densidad="normal"] .gn6-tm-btn { height: 32px; font-size: 13px; padding: 0 10px; }
html[data-gn6-densidad="normal"] .gn6-tm-btn > i:first-child { font-size: 15px; }
html[data-gn6-densidad="reducida"] .gn6-tm-btn { height: 28px; font-size: 12.5px; padding: 0 9px; gap: 6px; border-radius: 7px; }
html[data-gn6-densidad="reducida"] .gn6-tm-btn > i:first-child { font-size: 13.5px; }
html[data-gn6-densidad="reducida"] .gn6-top-logo img { max-height: 24px; }

/* el nombre del usuario nunca en dos líneas */
.gn6-tpv .gn6-user-btn span { white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }

/* pantallas estrechas: se recoge lo menos importante para que todo quepa en una línea */
@media (max-width: 1440px) {
    .gn6-tpv .gn6-verifactu span { display: none; }
}
@media (max-width: 1280px) {
    .gn6-tpv .gn6-topbar .gn6-brand-name { display: none; }
    .gn6-tpv .gn6-hide-sm { display: none !important; }
    .gn6-tpv .gn6-user-btn span { display: none; }
}
@media (max-width: 1100px) {
    .gn6-tm-btn:not(.gn6-tm-more) > span:not(.gn6-dot) { display: none; }
    .gn6-tm-btn { padding: 0 10px; }
}
@media (max-width: 760px) {
    .gn6-tpv .gn6-topbar .gn6-brand { display: none; }
    .gn6-top-logo { display: none !important; }
    .gn6-tm-more > span { display: none; }
    .gn6-topmenu { flex: 1 1 auto; }
}

/* ==========================================================================
   TICKET (TPV)
   ========================================================================== */
/* nada a la derecha: sin índice de secciones ni "Pago Ticket"; el ticket ocupa todo el ancho */
.gn6-tpv .gn6-has-totalsbar > .gn6-side { display: none !important; }
.gn6-tpv .gn6-page-editor-content.gn6-has-totalsbar > .dx-popup-content { padding-right: var(--fn-editor-pad) !important; }

/* cabecera del ticket (Id, Nº Ticket, Tipo, Fecha, Entidad, Dto.) como tarjeta blanca */
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] {
    background: var(--fn-surface);
    border: 1px solid var(--fn-line);
    border-radius: var(--fn-radius-lg);
    box-shadow: var(--fn-shadow-sm);
    padding: 12px 16px 8px;
    margin-bottom: 10px;
}
/* las rayas de separación sobran con las tarjetas */
.gn6-tpv .gn6-page-editor .popupedicion > .form > hr { display: none; }

/* botonera: todas las fotos del mismo tamaño (nunca a su tamaño real) */
.gn6-tpv #cardViewBotones .dx-card-cover {
    height: 96px !important; max-height: 96px !important; aspect-ratio: auto !important;
    background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.gn6-tpv #cardViewBotones .dx-card-cover img,
.gn6-tpv #cardViewBotones .dx-card-cover-image {
    width: 100% !important; height: 100% !important;
    max-width: 100%; max-height: 100%;
    object-fit: contain !important; display: block;
}
.gn6-tpv #cardViewBotones .dx-cardview-card { overflow: hidden; border-radius: 10px; }

/* ---- barra de totales: Nº unidades · Nº factura ······ TOTAL ---- */
.gn6-tpv .gn6-totalsbar .gn6-tot-hide { display: none !important; }
.gn6-tpv .gn6-totalsbar .dx-layout-manager { align-items: center; gap: 28px; }
.gn6-tpv .gn6-totalsbar .dx-field-item {
    flex: 0 1 auto; min-width: 0;
    flex-direction: row !important; align-items: center !important; gap: 10px;
}
.gn6-tpv .gn6-totalsbar .dx-field-item.gn6-tot-main { flex: 0 0 auto; margin-left: auto; order: 9; }
.gn6-tpv .gn6-totalsbar .dx-field-item-label { padding: 0 !important; }
.gn6-tpv .gn6-totalsbar .dx-field-item-label-text { color: var(--fn-muted) !important; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.gn6-tpv .gn6-totalsbar .dx-field-item-content { width: auto !important; }
.gn6-tpv .gn6-totalsbar .dx-field-item .dx-texteditor { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.gn6-tpv .gn6-totalsbar .dx-field-item .dx-texteditor::before,
.gn6-tpv .gn6-totalsbar .dx-field-item .dx-texteditor::after { display: none !important; }
.gn6-tpv .gn6-totalsbar .dx-field-item .dx-texteditor-input {
    height: auto !important; padding: 0 2px !important; background: transparent !important;
    font-weight: 700; color: var(--fn-text) !important; text-align: right;
}
.gn6-tpv .gn6-totalsbar [data-gn6-campo="totalunidades"] .dx-texteditor-input { width: 3.2em; }
.gn6-tpv .gn6-totalsbar [data-gn6-campo="facturayserie"] .dx-texteditor-input { width: 8em; text-align: left; }
.gn6-tpv .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-texteditor-input { color: var(--fn-red) !important; width: 4.6em; }
.gn6-tpv .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-field-item-label-text { color: var(--fn-red) !important; }

/* Totales NORMALES (ya grandes) */
html[data-gn6-totales="normales"] .gn6-tpv .gn6-totalsbar .dx-field-item-label-text { font-size: 13px !important; }
html[data-gn6-totales="normales"] .gn6-tpv .gn6-totalsbar .dx-field-item .dx-texteditor-input { font-size: 22px !important; line-height: 30px; }
html[data-gn6-totales="normales"] .gn6-tpv .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-texteditor-input { font-size: 32px !important; line-height: 40px; }
/* Totales GRANDES */
html[data-gn6-totales="grandes"] .gn6-tpv .gn6-totalsbar .dx-field-item-label-text { font-size: 15px !important; }
html[data-gn6-totales="grandes"] .gn6-tpv .gn6-totalsbar .dx-field-item .dx-texteditor-input { font-size: 28px !important; line-height: 36px; }
html[data-gn6-totales="grandes"] .gn6-tpv .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-texteditor-input { font-size: 44px !important; line-height: 52px; }

/* muestras del menú del usuario */
.gn6-tot-sample-l { font-size: 15px !important; font-weight: 700; min-width: 44px; }
.gn6-tot-sample-n { font-size: 12.5px !important; font-weight: 700; min-width: 44px; }
/* sin la columna de la derecha, el ticket usa todo el ancho */
.gn6-tpv .gn6-has-totalsbar .popupedicion > .form { width: 100% !important; max-width: 100% !important; flex: 1 1 100% !important; }

/* ==========================================================================
   TPV · BARRA INFERIOR DEL TICKET:  [botones]  [ #  Nº Fac.  TOTAL ]  [Cancelar Guardar]
   ========================================================================== */
html[data-gn6-totales="grandes"]  { --tpvbar-h: 116px; }
html[data-gn6-totales="normales"] { --tpvbar-h: 100px; }

/* fila original de botones del ticket: se mantiene (el módulo la usa) pero fuera de la vista */
.gn6-tob-oculta {
    position: absolute !important; left: -30000px !important; top: 0 !important;
    width: 1800px !important; visibility: hidden !important; pointer-events: none !important;
}
/* pie original (Cancelar / Guardar): lo tapa la barra nueva */
.gn6-has-tpvbar > .dx-popup-bottom { visibility: hidden; }

.gn6-tpvbar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
    height: var(--tpvbar-h, 116px);
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px;
    padding: 10px var(--fn-editor-pad);
    background: var(--fn-surface);
    border-top: 1px solid var(--fn-line);
    box-shadow: 0 -8px 24px -18px rgba(31, 29, 27, .35);
}
.gn6-tpvbar-acts { display: grid; grid-template-columns: repeat(3, minmax(130px, auto)); gap: 8px; align-content: center; }
.gn6-tpvbar-tots { min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--fn-line); border-right: 1px solid var(--fn-line); padding: 0 18px; }
.gn6-tpvbar-end { display: flex; flex-direction: column; gap: 8px; }

/* botones (espejos de los del ticket) */
.gn6-pbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 14px;
    border: 1px solid var(--fn-line-2); border-radius: 10px;
    background: var(--fn-surface); color: var(--fn-text);
    font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
    cursor: pointer; transition: background .12s, border-color .12s, transform .05s;
}
.gn6-pbtn[hidden] { display: none !important; }
.gn6-pbtn:hover:not(:disabled) { background: var(--fn-hover); }
.gn6-pbtn:active:not(:disabled) { transform: translateY(1px); }
.gn6-pbtn:disabled { opacity: .45; cursor: default; }
.gn6-pbtn.is-default { border-color: var(--fn-red); color: var(--fn-red); }
.gn6-pbtn.is-success { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.gn6-pbtn.is-success:hover:not(:disabled) { background: #1a7c43; }
.gn6-pbtn.is-success kbd { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .45); color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.gn6-pbtn-save { background: var(--fn-red); border-color: var(--fn-red); color: #fff; min-width: 150px; }
.gn6-pbtn-save:hover:not(:disabled) { background: #23535f; }
.gn6-pbtn-cancel { min-width: 150px; }
html[data-gn6-totales="normales"] .gn6-pbtn { height: 36px; font-size: 13px; }

/* teclas gráficas [Ctrl] [F8] */
.gn6-keys { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; }
.gn6-keys kbd, .gn6-pbtn kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 20px; padding: 0 5px;
    border: 1px solid var(--fn-line-2); border-bottom-width: 2px; border-radius: 5px;
    background: #fbfaf9; color: var(--fn-text-2);
    font-family: inherit; font-size: 10.5px; font-weight: 700; line-height: 1;
    box-shadow: 0 1px 0 rgba(31, 29, 27, .08);
}
.dx-button-text.gn6-has-keys { display: inline-flex; align-items: center; }

/* totales dentro de la barra */
.gn6-tpvbar .gn6-totalsbar { position: static !important; height: auto !important; right: auto !important; padding: 0 !important; width: 100%; overflow: visible; }
.gn6-tpvbar .gn6-totalsbar .dx-layout-manager { justify-content: space-between; gap: 26px; }
.gn6-tpvbar .gn6-totalsbar .dx-field-item.gn6-tot-main { margin-left: auto; }
.gn6-tpvbar .gn6-totalsbar [data-gn6-campo="totaliva"] .dx-field-item-label { display: none !important; }
html[data-gn6-totales="grandes"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar .dx-field-item-label-text { font-size: 18px !important; }
html[data-gn6-totales="grandes"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar .dx-field-item .dx-texteditor-input { font-size: 32px !important; line-height: 40px; }
html[data-gn6-totales="grandes"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-texteditor-input { font-size: 56px !important; line-height: 64px; }
html[data-gn6-totales="normales"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar .dx-field-item-label-text { font-size: 15px !important; }
html[data-gn6-totales="normales"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar .dx-field-item .dx-texteditor-input { font-size: 26px !important; line-height: 32px; }
html[data-gn6-totales="normales"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-texteditor-input { font-size: 42px !important; line-height: 50px; }

/* pantallas más estrechas: botones en 2 columnas */
@media (max-width: 1400px) {
    .gn6-tpvbar { gap: 14px; }
    .gn6-tpvbar-acts { grid-template-columns: repeat(3, minmax(96px, auto)); gap: 6px; }
    .gn6-tpvbar-acts .gn6-pbtn { padding: 0 8px; font-size: 12px; }
    .gn6-tpvbar-acts .gn6-keys { margin-right: 5px; }
    .gn6-tpvbar-acts .gn6-keys kbd { font-size: 10px; padding: 1px 4px; }   /* hay poco sitio: la combinación entera, más pequeña */
    .gn6-pbtn-save, .gn6-pbtn-cancel { min-width: 120px; }
    .gn6-tpvbar-tots { padding: 0 12px; }
}
.gn6-pbtn.gn6-pbtn-save, .gn6-pbtn.gn6-pbtn-save.is-default { color: #fff !important; border-color: var(--fn-red) !important; }
.gn6-pbtn.gn6-pbtn-cancel.is-default { color: var(--fn-text); border-color: var(--fn-line-2); }

.gn6-tpvbar .gn6-totalsbar [data-gn6-campo="totalunidades"] .dx-texteditor-input { text-align: left !important; width: 2.6em !important; }

/* ==========================================================================
   TPV · AJUSTES v5
   ========================================================================== */
/* números de la barra: nunca cortados (alto y ancho suficientes) */
.gn6-tpvbar .gn6-totalsbar .dx-texteditor,
.gn6-tpvbar .gn6-totalsbar .dx-texteditor-container,
.gn6-tpvbar .gn6-totalsbar .dx-texteditor-input-container { height: auto !important; min-height: 0 !important; overflow: visible !important; }
.gn6-tpvbar .gn6-totalsbar .dx-field-item .dx-texteditor-input { overflow: visible; }
.gn6-tpvbar .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-texteditor-input { width: 7.2em !important; }
.gn6-tpvbar .gn6-totalsbar [data-gn6-campo="totalunidades"] .dx-texteditor-input { width: 3.4em !important; }
html[data-gn6-totales="grandes"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar .dx-field-item .dx-texteditor-input { height: 42px !important; line-height: 42px !important; }
html[data-gn6-totales="grandes"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-texteditor-input { height: 70px !important; line-height: 70px !important; }
html[data-gn6-totales="normales"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar .dx-field-item .dx-texteditor-input { height: 34px !important; line-height: 34px !important; }
html[data-gn6-totales="normales"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-texteditor-input { height: 54px !important; line-height: 54px !important; }

/* iconos en los botones de la barra */
.gn6-pbtn > i.dx-icon { font-size: 18px; width: auto; height: auto; line-height: 1; color: inherit; margin: 0; }
.gn6-pbtn > i.dx-icon::before { line-height: 1; }
.gn6-pbtn.is-success > i.dx-icon { color: #fff; }

/* la grid (pestañas Artículos / Servicios) mide lo mismo que la cabecera */
.gn6-tpv .gn6-page-editor [id$="_tab_frm_Albaranes_tabpanel"] { width: 100% !important; }

/* cabecera del ticket en UNA línea: Id · Nº Ticket · Tipo · Fecha · Entidad · Dto. */
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-responsivebox,
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-responsivebox .dx-box-flex,
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-responsivebox .dx-item,
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-responsivebox .dx-box-item-content,
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-responsivebox .dx-item-content { display: contents !important; }
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] > .dx-layout-manager { display: flex !important; flex-wrap: nowrap; align-items: center; gap: 10px; }
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-field-item { flex: 1 1 140px; min-width: 0; padding: 0 !important; margin: 0 !important; }
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-field-item:has(input[name="id"]),
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-field-item:has(input[name="descuento"]) { flex: 0 0 110px; }
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-field-item:has(input[name="id_cliente"]) { flex: 3 1 260px; }
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] { padding: 10px 14px !important; }

/* pestañas de la botonera (Libros, Papelería...): chips redondeados del tema */
.gn6-tpv #tabsViewBotonera { margin: 4px 0 10px; background: transparent !important; }
.gn6-tpv #tabsViewBotonera .dx-tabs-wrapper { display: flex !important; flex-wrap: wrap; gap: 8px; border: 0 !important; }
.gn6-tpv #tabsViewBotonera .dx-tabs-wrapper::after, .gn6-tpv #tabsViewBotonera::after { display: none !important; }
.gn6-tpv #tabsViewBotonera .dx-tab {
    flex: 0 0 auto !important; width: auto !important;
    padding: 0 18px !important; height: 40px; display: inline-flex !important; align-items: center;
    border: 1px solid var(--fn-line-2) !important; border-radius: 999px;
    background: var(--fn-surface) !important; color: var(--fn-text-2);
    font-weight: 600; box-shadow: var(--fn-shadow-sm);
    transition: background .12s, color .12s, border-color .12s;
}
.gn6-tpv #tabsViewBotonera .dx-tab::after, .gn6-tpv #tabsViewBotonera .dx-tab::before { display: none !important; }
.gn6-tpv #tabsViewBotonera .dx-tab .dx-tab-text { font-size: 14.5px; }
.gn6-tpv #tabsViewBotonera .dx-tab.dx-state-hover { background: var(--fn-hover) !important; color: var(--fn-text); }
.gn6-tpv #tabsViewBotonera .dx-tab.dx-tab-selected {
    background: var(--fn-red) !important; border-color: var(--fn-red) !important; color: #fff !important;
}
.gn6-tpv #tabsViewBotonera .dx-tab.dx-tab-selected .dx-tab-text,
.gn6-tpv #tabsViewBotonera .dx-tab.dx-tab-selected .dx-tab-text-span { color: #fff !important; }
.gn6-tpv #tabsViewBotonera .dx-tabs-nav-button { display: none !important; }
.gn6-tpv #tabsViewBotonera .dx-tabs-scrollable .dx-scrollable-content,
.gn6-tpv #tabsViewBotonera .dx-scrollable-container { overflow: visible !important; }

/* botonera: sin Expandir, búsqueda ni ordenación por título (más sitio para los botones) */
.gn6-tpv #cardViewBotones .dx-cardview-header-container,
.gn6-tpv #cardViewBotones > .dx-toolbar,
.gn6-tpv #cardViewBotones .dx-cardview-headers { display: none !important; }
.gn6-tpv #tabsViewBotonera .dx-tab-content::after { display: none !important; }
.gn6-tpv #tabsViewBotonera .dx-tab.dx-state-focused { outline: none; box-shadow: 0 0 0 3px rgba(40, 94, 108, .18); }
/* barra: el nº de factura más discreto que el total y con aire entre campos */
.gn6-tpvbar .gn6-totalsbar .dx-layout-manager { gap: 34px !important; }
html[data-gn6-totales="grandes"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar [data-gn6-campo="facturayserie"] .dx-texteditor-input { font-size: 22px !important; }
html[data-gn6-totales="normales"] .gn6-tpv .gn6-tpvbar .gn6-totalsbar [data-gn6-campo="facturayserie"] .dx-texteditor-input { font-size: 18px !important; }
.gn6-tpvbar .gn6-totalsbar [data-gn6-campo="facturayserie"] .dx-texteditor-input { width: 9em !important; color: var(--fn-text-2) !important; }

/* sin Maximizar / Minimizar en la cabecera del ticket */
.gn6-page-editor .dx-popup-title .dx-toolbar-item:has([id*="buttonMaxMin"]) { display: none !important; }
.gn6-tpvbar-end .gn6-pbtn-save { height: 100%; min-height: 56px; font-size: 16px; }



/* ==========================================================================
   v10 · TICKET RESPONSIVE
   ========================================================================== */
/* "Pago Ticket" (panel de información del ticket) no se muestra nunca:
   los totales van en la barra inferior y el cobro se hace con PAGAR */
.gn6-tpv .gn6-page-editor [id$="_frm_Info_Plus_prv"].formdreta { display: none !important; }

/* cabecera (identificación del ticket): salta de línea cuando no cabe */
.gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] > .dx-layout-manager { flex-wrap: wrap !important; row-gap: 10px; }
@media (max-width: 700px) {
    /* móvil: un campo por línea */
    .gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-field-item,
    .gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-field-item:has(input[name="id"]),
    .gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-field-item:has(input[name="descuento"]),
    .gn6-tpv .gn6-page-editor [id$="_frm_Albaranes"] .dx-field-item:has(input[name="id_cliente"]) { flex: 1 1 100% !important; max-width: 100%; }
}

/* barra inferior que NO cabe: deja de ser fija y va al final de la página */
.gn6-tpvbar.gn6-tpvbar-inline {
    position: static; height: auto; z-index: auto;
    display: flex; flex-direction: column; align-items: stretch; gap: 12px;
    margin: 14px 0 6px; padding: 14px;
    border: 1px solid var(--fn-line); border-radius: 12px; box-shadow: var(--fn-shadow-sm);
}
.gn6-tpvbar-inline .gn6-tpvbar-tots {
    order: 1; height: auto; padding: 4px 0 12px; border: 0; border-bottom: 1px solid var(--fn-line);
}
.gn6-tpvbar-inline .gn6-tpvbar-acts { order: 2; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.gn6-tpvbar-inline .gn6-tpvbar-end { order: 3; }
.gn6-tpvbar-inline .gn6-tpvbar-end .gn6-pbtn-save { width: 100%; min-height: 48px; }
.gn6-tpvbar-inline .gn6-totalsbar .dx-layout-manager { flex-wrap: wrap; gap: 14px 24px !important; justify-content: space-between; }
.gn6-tpvbar-is-inline > .dx-popup-bottom { display: none !important; }
@media (max-width: 520px) {
    .gn6-tpvbar-inline .gn6-tpvbar-acts { grid-template-columns: 1fr; }
    .gn6-tpvbar-inline .gn6-pbtn { width: 100%; height: 48px; }
    .gn6-tpvbar-inline .gn6-totalsbar .dx-field-item.gn6-tot-main { margin-left: 0; flex: 1 1 100%; }
    .gn6-tpvbar-inline .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-texteditor-input { width: 100% !important; text-align: right !important; }
}

/* pestaña de TICKET NUEVO (gn6tpv.html?nuevoticket=...): sólo el ticket */
html.gn6-embed .gn6-topbar,
html.gn6-embed .gn6-tabsbar,
html.gn6-embed .gn6-sidebar,
html.gn6-embed .gn6-page-header,
html.gn6-embed #gn6-empty { display: none !important; }
html.gn6-embed .gn6-main { padding-top: 0 !important; }
/* sin "+" para otro ticket dentro de la pestaña (Ctrl+Ins abre otra pestaña desde el TPV) */
html.gn6-embed .gn6-page-editor .dx-popup-title .dx-toolbar-item:has(.dx-icon-add) { display: none !important; }
/* el iframe de la pestaña ocupa todo el sitio */
.gn6-tabpage.gn6-nt-page > .gn6-page-header { display: none !important; }
.gn6-tabpage.gn6-nt-page .gn6view { padding: 0 !important; }
.gn6-tabpage.gn6-nt-page .gn6-iframe { border-radius: 0; background: transparent; }

/* botón APARTAR VENTA (entre el nº de factura y el total) */
.gn6-tpvbar .gn6-pbtn-apartar {
    order: 8; margin-left: auto; flex: 0 0 auto; align-self: center; height: 56px; padding: 0 14px; gap: 8px;
    border: 2px solid #c98a12; color: #9a6a0c; background: #fff8ea; font-size: 13px; line-height: 1.1;
    white-space: normal; text-align: left;
}
.gn6-tpvbar .gn6-pbtn-apartar span { display: block; width: 5.4em; }
.gn6-tpvbar .gn6-pbtn-apartar:hover { background: #fdeccb; }
.gn6-tpvbar .gn6-pbtn-apartar i { font-size: 18px; line-height: 1; }
html[data-gn6-totales="normales"] .gn6-tpvbar .gn6-pbtn-apartar { height: 46px; font-size: 12px; }
.gn6-tpvbar-inline .gn6-pbtn-apartar span { width: auto; }
.gn6-tpvbar .gn6-totalsbar .dx-layout-manager:has(.gn6-pbtn-apartar) { gap: 22px !important; }
.gn6-tpvbar .gn6-totalsbar .dx-layout-manager:has(.gn6-pbtn-apartar) .dx-field-item.gn6-tot-main { margin-left: 0 !important; }
.gn6-tpvbar .gn6-totalsbar .dx-field-item.gn6-tot-main .dx-texteditor-input { width: 5.6em !important; }
.gn6-tpvbar .gn6-totalsbar [data-gn6-campo="facturayserie"] .dx-texteditor-input { width: 7em !important; }
/* sin barra fija: el botón debajo del total, a todo el ancho */
.gn6-tpvbar-inline .gn6-pbtn-apartar { order: 10; flex: 1 1 100%; margin-left: 0; }
/* los importes de la barra son sólo lectura: no tapan el botón APARTAR VENTA */
.gn6-tpvbar .gn6-totalsbar .dx-texteditor-input { pointer-events: none; }
.gn6-tpvbar .gn6-pbtn-apartar { position: relative; z-index: 2; }
.gn6-tpvbar .gn6-totalsbar [data-gn6-campo="totalunidades"] .dx-texteditor-input { width: 2.6em !important; }
.gn6-tpvbar .gn6-totalsbar [data-gn6-campo="facturayserie"] .dx-texteditor-input { width: 6.4em !important; }

/* ==========================================================================
   v12 · LETRA DE LA BOTONERA (menú del usuario): normal / reducida / superreducida
   Solo afecta a los botones de la botonera (nombre y precio).
   ========================================================================== */
.gn6-tpv #cardViewBotones .dx-cardview-field-template > div > div { gap: 6px; }
.gn6-tpv #cardViewBotones .dx-cardview-field-template span:first-child {
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2;
}
.gn6-tpv #cardViewBotones .dx-cardview-field-template span:nth-child(2) { flex: 0 0 auto; line-height: 1.1; white-space: nowrap; }

html[data-gn6-botonera="normal"] .gn6-tpv #cardViewBotones .dx-cardview-field-template span:first-child { font-size: 13px !important; font-weight: 600; }
html[data-gn6-botonera="normal"] .gn6-tpv #cardViewBotones .dx-cardview-field-template span:nth-child(2) { font-size: 19px !important; }

html[data-gn6-botonera="reducida"] .gn6-tpv #cardViewBotones .dx-cardview-field-template span:first-child { font-size: 11px !important; font-weight: 600; }
html[data-gn6-botonera="reducida"] .gn6-tpv #cardViewBotones .dx-cardview-field-template span:nth-child(2) { font-size: 15.5px !important; }
html[data-gn6-botonera="reducida"] .gn6-tpv #cardViewBotones .dx-cardview-card-content { padding-top: 8px !important; padding-bottom: 8px !important; }

html[data-gn6-botonera="superreducida"] .gn6-tpv #cardViewBotones .dx-cardview-field-template span:first-child { font-size: 9.5px !important; font-weight: 600; }
html[data-gn6-botonera="superreducida"] .gn6-tpv #cardViewBotones .dx-cardview-field-template span:nth-child(2) { font-size: 12.5px !important; }
html[data-gn6-botonera="superreducida"] .gn6-tpv #cardViewBotones .dx-cardview-card-content { padding-top: 5px !important; padding-bottom: 5px !important; }

/* muestras del menú del usuario */
.gn6-bot-sample-n { font-size: 15px !important; font-weight: 700; }
.gn6-bot-sample-r { font-size: 12.5px !important; font-weight: 700; }
.gn6-bot-sample-s { font-size: 10px !important; font-weight: 700; }

/* altura de la tabla de líneas del ticket: grande / normal (la actual) / reducida (la altura la fija el JS).
   El tema trae un tope de 350px (o 650px "Expandir") para esta tabla que impedía que "Grande" se viera: se quita para esta tabla en concreto. */
#dtg_AlbaranesLineas_00001.datagridlineassmall,
#dtg_AlbaranesLineas_00001.datagridlineas { max-height: none !important; }

/* el ticket (editor dentro de la pestaña) no puede tapar el panel del chat ni los menús de la barra superior */
.gn6-tpv .gn6-content { isolation: isolate; }
/* menú del usuario largo: con scroll si no cabe en pantallas bajas */
.gn6-tpv .gn6-drop-user { max-height: calc(100vh - 70px); overflow-y: auto; }

/* letra de la botonera: el nombre puede ocupar dos líneas antes de cortarse */
.gn6-tpv #cardViewBotones .dx-cardview-field-template span:first-child {
    white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
