/* ========================================================================== 
   Sistema de Ventas · Punto de venta v42
   Modo operativo de ancho completo inspirado en interfaces POS modernas.
   Se activa en ventas, notas, cotizaciones, compras y creación de GRE mediante body.pos-mode.
   ========================================================================== */

:root {
    --pos-rail-width: 86px;
    --pos-border: #dfe3ec;
    --pos-border-soft: #e8ebf1;
    --pos-surface: #ffffff;
    --pos-control: #f4f6fa;
    --pos-text: #120736;
    --pos-muted: #7c8497;
    --pos-primary: #31127d;
    --pos-primary-hover: #251064;
    --pos-accent: #ff006e;
}

/* ---------- Shell operativo: sidebar colapsado por defecto ---------- */
body.pos-mode {
    background: #EDEFF5;
}

body.pos-mode .sidebar {
    width: var(--pos-rail-width);
    overflow: visible;
    transition: width .2s ease, transform .22s ease;
}

body.pos-mode .app-main {
    margin-left: var(--pos-rail-width);
    transition: margin-left .2s ease;
}

body.pos-mode .sidebar-brand {
    min-height: 74px;
    justify-content: center;
    padding: 0 10px;
}

body.pos-mode .sidebar-brand .brand-copy,
body.pos-mode .sidebar-category,
body.pos-mode .sidebar-direct-link > span:last-child,
body.pos-mode .sidebar-summary-main > span:last-child,
body.pos-mode .sidebar-chevron,
body.pos-mode .sidebar-submenu,
body.pos-mode .sidebar-footer-copy {
    display: none !important;
}

body.pos-mode .sidebar-nav {
    padding: 10px 11px 16px;
}

body.pos-mode .sidebar-direct-link,
body.pos-mode .sidebar-group > summary {
    min-height: 50px;
    justify-content: center;
    padding: 10px;
    border-radius: 10px;
}

body.pos-mode .sidebar-summary-main {
    justify-content: center;
    gap: 0;
}

body.pos-mode .sidebar .nav-icon {
    width: 22px;
    height: 22px;
}

body.pos-mode .sidebar-footer {
    justify-content: center;
    margin: 8px 10px 10px;
    padding: 8px;
}

body.pos-mode .sidebar-toggle {
    display: inline-flex;
}

body.pos-mode .app-topbar {
    min-height: 66px;
    height: 66px;
    padding-inline: 18px 22px;
}

body.pos-mode .topbar-context strong {
    font-size: 20px;
    line-height: 28px;
}

body.pos-mode .topbar-quick-actions {
    gap: 6px;
}

body.pos-mode .topbar-quick-link {
    min-height: 38px;
}

body.pos-mode .app-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 16px 18px 86px;
}

/* Expandir temporalmente el menú desde el botón superior. */
body.pos-mode.pos-sidebar-expanded .sidebar {
    width: var(--sidebar-width, 286px);
}

body.pos-mode.pos-sidebar-expanded .app-main {
    margin-left: var(--sidebar-width, 286px);
}

body.pos-mode.pos-sidebar-expanded .sidebar-brand {
    justify-content: flex-start;
    padding: 0 20px;
}

body.pos-mode.pos-sidebar-expanded .sidebar-brand .brand-copy,
body.pos-mode.pos-sidebar-expanded .sidebar-direct-link > span:last-child,
body.pos-mode.pos-sidebar-expanded .sidebar-summary-main > span:last-child,
body.pos-mode.pos-sidebar-expanded .sidebar-chevron,
body.pos-mode.pos-sidebar-expanded .sidebar-footer-copy {
    display: initial !important;
}

body.pos-mode.pos-sidebar-expanded .sidebar-category {
    display: block !important;
}

body.pos-mode.pos-sidebar-expanded .sidebar-direct-link,
body.pos-mode.pos-sidebar-expanded .sidebar-group > summary {
    justify-content: flex-start;
    padding: 9px 12px;
}

body.pos-mode.pos-sidebar-expanded .sidebar-group > summary {
    justify-content: space-between;
}

body.pos-mode.pos-sidebar-expanded .sidebar-summary-main {
    justify-content: flex-start;
    gap: 11px;
}

body.pos-mode.pos-sidebar-expanded .sidebar-group[open] .sidebar-submenu {
    display: block !important;
}

body.pos-mode.pos-sidebar-expanded .sidebar-footer {
    justify-content: flex-start;
    padding: 11px 12px;
}

/* ---------- Superficies generales del POS ---------- */
.pos-workspace {
    width: 100%;
    min-width: 0;
    color: var(--pos-text);
}

.pos-form {
    display: grid;
    gap: 12px;
}

.pos-sheet {
    min-width: 0;
    margin: 0;
    border: 1px solid var(--pos-border-soft);
    border-radius: 12px;
    background: var(--pos-surface);
    box-shadow: 0 2px 9px rgba(31, 38, 58, .035);
}

/* ---------- Encabezado empresa / fechas ---------- */
.pos-business-header {
    min-height: 126px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 18px 22px;
}

.pos-company-block {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.pos-company-logo {
    width: 116px;
    height: 76px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fc;
    color: var(--pos-primary);
}

.pos-company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pos-company-logo span {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.04em;
}

.pos-company-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.pos-company-trade {
    color: var(--pos-accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pos-company-copy > strong {
    max-width: 820px;
    color: #24175d;
    font-size: 16px;
    font-weight: 600;
    line-height: 23px;
}

.pos-company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    color: #555d71;
    font-size: 13px;
}

.pos-header-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 220px));
    gap: 18px;
}

.pos-header-dates label,
.pos-field,
.pos-payment-grid label,
.pos-credit-grid label {
    display: grid;
    gap: 6px;
    color: #22253b;
    font-size: 13px;
    font-weight: 500;
    line-height: 19px;
}

.pos-form input:not([type="checkbox"]):not([type="radio"]),
.pos-form select,
.pos-form textarea {
    width: 100%;
    border: 1px solid #d8ddea;
    border-radius: 7px;
    color: var(--pos-text);
    background: var(--pos-control);
    box-shadow: none;
    font-family: "Poppins", sans-serif !important;
    font-size: 13px;
    font-weight: 400;
}

.pos-form input:not([type="checkbox"]):not([type="radio"]),
.pos-form select {
    min-height: 40px;
    padding: 8px 12px;
}

.pos-form textarea {
    min-height: 62px;
    padding: 9px 12px;
    resize: vertical;
}

.pos-form input:focus,
.pos-form select:focus,
.pos-form textarea:focus {
    border-color: #9e8bc9;
    outline: 3px solid rgba(75, 35, 145, .08);
    background: #fff;
}

/* ---------- Datos del documento ---------- */
.pos-document-section {
    padding: 16px 18px 13px;
}

.pos-control-grid {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(160px, .95fr) minmax(190px, 1.05fr) minmax(135px, .8fr) minmax(135px, .75fr);
    gap: 14px;
    align-items: start;
}

.pos-field-hint {
    min-height: 16px;
    color: var(--pos-muted);
    font-size: 10.5px;
    font-weight: 400;
    line-height: 15px;
}

/* ---------- Cliente ---------- */
.pos-customer-section {
    padding: 16px 18px;
}

.pos-customer-row {
    display: grid;
    grid-template-columns: minmax(340px, 1.25fr) minmax(300px, .9fr) auto;
    gap: 16px;
    align-items: end;
}

.pos-customer-field {
    max-width: 720px;
}

.pos-customer-address-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    position: relative;
    color: #22253b;
    font-size: 13px;
    font-weight: 600;
}

.pos-customer-address-field select {
    width: 100%;
    min-height: 40px;
    padding: 0 34px 0 11px;
    border: 1px solid #d8deea;
    border-radius: 7px;
    background: #fff;
    color: #30364a;
    font: 400 12px/1.4 "Poppins", sans-serif;
}

.pos-customer-address-field select:disabled {
    background: #f5f7fa;
    color: #9aa1ae;
}

.pos-customer-address-field small {
    color: #7b8495;
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.35;
}

.pos-customer-field > label {
    display: block;
    margin-bottom: 6px;
    color: #22253b;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.pos-customer-field .field-action-row {
    gap: 0;
}

.pos-customer-field select {
    border-radius: 7px 0 0 7px;
}

.pos-customer-create {
    width: 44px !important;
    min-width: 44px;
    height: 40px;
    border-radius: 0 7px 7px 0 !important;
    border-left: 0 !important;
    color: var(--pos-primary) !important;
    background: var(--ui-primary-soft) !important;
    font-size: 20px !important;
}

.pos-igv-check {
    min-height: 40px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 0 4px 5px 0;
    color: #4d5365;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

/* ---------- Buscador / grilla de productos ---------- */
.pos-products-section {
    overflow: hidden;
}

.pos-product-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto auto;
    gap: 10px;
    padding: 15px 16px 9px;
}

.pos-search-box {
    min-width: 0;
    position: relative;
}

.pos-search-box svg {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    color: #8b93a5;
    transform: translateY(-50%);
}

.pos-search-box input {
    padding-left: 40px !important;
}

.pos-add-product,
.pos-add-line {
    min-height: 40px;
    padding-inline: 18px !important;
}

.pos-add-product {
    border-color: var(--pos-primary) !important;
    background: var(--pos-primary) !important;
}

.pos-add-product:hover {
    background: var(--pos-primary-hover) !important;
}

.pos-search-options {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 17px 10px;
    color: #7f8799;
    font-size: 11px;
}

.pos-search-options kbd {
    padding: 1px 6px;
    border: 1px solid #d9ddea;
    border-radius: 4px;
    background: #f7f8fb;
    color: #4a5062;
    font: 500 10px/16px "Poppins", sans-serif;
}

.pos-lines-wrap {
    margin: 0;
    border-top: 1px solid var(--pos-border-soft);
    border-radius: 0;
}

.pos-lines-table {
    width: 100%;
    min-width: 1120px;
    margin: 0;
}

.pos-lines-table thead th {
    padding: 11px 10px;
    border-bottom: 1px solid #dfe3ec;
    color: #11131c;
    background: #f3f5f9;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    white-space: nowrap;
}

.pos-lines-table tbody td {
    padding: 9px 8px;
    vertical-align: top;
    border-bottom: 1px solid #edf0f5;
    background: #fff;
}

.pos-lines-table tbody tr:last-child td {
    border-bottom: 0;
}

.pos-lines-table select,
.pos-lines-table input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 36px;
    padding: 6px 8px;
    background: #f7f8fb;
    font-size: 12px;
}

.pos-lines-table .sale-product {
    min-width: 300px;
}

.pos-lines-table .sale-quantity {
    min-width: 92px;
}

.pos-lines-table .sale-price,
.pos-lines-table .sale-reference-value,
.pos-lines-table .sale-discount {
    min-width: 116px;
}

.pos-lines-table .sale-line-total {
    min-width: 98px;
    padding-top: 17px;
    color: #17122d;
    font-weight: 600;
}

.pos-lines-table .sale-serials {
    min-width: 170px;
}

.pos-lines-table .sale-stock-hint {
    display: block;
    margin-top: 3px;
    color: #9299aa;
    font-size: 9.5px !important;
    line-height: 13px !important;
}

.pos-lines-table .icon-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
    margin-top: 2px;
    border-radius: 7px;
}

/* ---------- Pago / resumen ---------- */
.pos-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 12px;
    align-items: start;
}

.pos-payment-card,
.pos-totals-card {
    padding: 16px 18px;
}

.pos-section-title {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.pos-section-title h2 {
    margin: 0 !important;
    color: #17122d !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 22px !important;
}

.pos-section-title > div > span {
    display: block;
    margin-top: 2px;
    color: #858c9c;
    font-size: 10.5px;
}

.pos-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
}

.pos-status-badge.is-success {
    color: #08764a;
    background: #e9fbf3;
}

.pos-status-badge.is-warning {
    color: #9b5a00;
    background: #fff4dc;
}

.pos-payment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 12px;
}

.pos-credit-details {
    margin-top: 14px;
    border-top: 1px solid #eceff4;
    padding-top: 10px;
}

.pos-credit-details > summary {
    cursor: pointer;
    color: #3d2c70;
    font-size: 11.5px;
    font-weight: 500;
}

.pos-credit-grid {
    display: grid;
    grid-template-columns: 150px 190px minmax(240px, 1fr);
    gap: 12px;
    margin-top: 11px;
}

.pos-notes-field {
    grid-column: auto;
}

.pos-installment-preview {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #e3e5ef;
    border-radius: 7px;
    color: #737a8c;
    background: #f8f9fc;
    font-size: 10.5px;
    line-height: 16px;
}

.pos-totals-card {
    position: sticky;
    top: 80px;
}

.pos-totals-card dl {
    margin: 0;
}

.pos-totals-card dl > div {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 0;
    border-bottom: 1px solid #edf0f4;
}

.pos-totals-card dt,
.pos-totals-card dd {
    margin: 0;
    font-size: 11.5px;
}

.pos-totals-card dt {
    color: #747b8b;
    font-weight: 400;
}

.pos-totals-card dd {
    color: #21183d;
    font-weight: 500;
}

.pos-totals-card .grand-total {
    min-height: 54px;
    margin: 8px -8px -4px;
    padding: 10px 8px;
    border: 0;
    border-radius: 9px;
    background: var(--ui-primary-soft);
}

.pos-totals-card .grand-total dt {
    color: #2c1d61;
    font-size: 14px;
    font-weight: 600;
}

.pos-totals-card .grand-total dd {
    color: var(--pos-primary);
    font-size: 20px;
    font-weight: 700;
}

/* ---------- Barra de acciones fija ---------- */
.pos-action-bar {
    position: fixed;
    right: 18px;
    bottom: 12px;
    left: calc(var(--pos-rail-width) + 18px);
    z-index: 42;
    min-height: 58px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 9px 12px;
    border: 1px solid rgba(214, 218, 230, .94);
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 30px rgba(24, 27, 45, .10);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: left .2s ease;
}

body.pos-mode.pos-sidebar-expanded .pos-action-bar {
    left: calc(var(--sidebar-width, 286px) + 18px);
}

.pos-action-copy {
    min-width: 0;
    color: #858b99;
    font-size: 10.5px;
    text-align: right;
}

.pos-action-bar .button {
    min-height: 40px;
    margin: 0;
}

.pos-confirm-sale {
    min-width: 172px;
    border-color: var(--pos-primary) !important;
    background: var(--pos-primary) !important;
}

.pos-confirm-sale:hover {
    background: var(--pos-primary-hover) !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1450px) {
    .pos-control-grid {
        grid-template-columns: 1.65fr .9fr 1fr .75fr .75fr;
    }

    .pos-business-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .pos-company-logo {
        width: 96px;
    }
}

@media (max-width: 1180px) {
    body.pos-mode .sidebar {
        width: min(88vw, 292px);
        transform: translateX(-100%);
    }

    body.pos-mode.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.pos-mode .app-main,
    body.pos-mode.pos-sidebar-expanded .app-main {
        margin-left: 0;
    }

    body.pos-mode .sidebar-brand,
    body.pos-mode .sidebar-direct-link,
    body.pos-mode .sidebar-group > summary,
    body.pos-mode .sidebar-footer {
        justify-content: flex-start;
    }

    body.pos-mode .sidebar-brand {
        padding: 0 20px;
    }

    body.pos-mode .sidebar-brand .brand-copy,
    body.pos-mode .sidebar-summary-main > span:last-child,
    body.pos-mode .sidebar-chevron,
    body.pos-mode .sidebar-footer-copy,
    body.pos-mode .sidebar-category {
        display: initial !important;
    }

    body.pos-mode .sidebar-category {
        display: block !important;
    }

    body.pos-mode .sidebar-group[open] .sidebar-submenu {
        display: block !important;
    }

    body.pos-mode .sidebar-summary-main {
        justify-content: flex-start;
        gap: 11px;
    }

    body.pos-mode .sidebar-group > summary {
        justify-content: space-between;
    }

    body.pos-mode .pos-action-bar,
    body.pos-mode.pos-sidebar-expanded .pos-action-bar {
        left: 18px;
    }

    .pos-business-header {
        grid-template-columns: 1fr;
    }

    .pos-header-dates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-control-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pos-field-wide {
        grid-column: span 2;
    }

    .pos-bottom-grid {
        grid-template-columns: minmax(0, 1fr) 310px;
    }
}

@media (max-width: 820px) {
    body.pos-mode .app-content {
        padding: 10px 10px 94px;
    }

    .pos-business-header,
    .pos-document-section,
    .pos-customer-section,
    .pos-payment-card,
    .pos-totals-card {
        padding: 14px;
    }

    .pos-company-block {
        align-items: flex-start;
    }

    .pos-company-logo {
        width: 72px;
        height: 58px;
    }

    .pos-control-grid,
    .pos-payment-grid,
    .pos-credit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-field-wide,
    .pos-notes-field {
        grid-column: span 2;
    }

    .pos-customer-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pos-product-toolbar {
        grid-template-columns: 1fr auto;
    }

    .pos-add-line {
        grid-column: 1 / -1;
    }

    .pos-bottom-grid {
        grid-template-columns: 1fr;
    }

    .pos-totals-card {
        position: static;
    }

    .pos-action-copy {
        display: none;
    }

    .pos-action-bar {
        grid-template-columns: auto 1fr;
    }

    .pos-confirm-sale {
        justify-self: stretch;
    }
}

@media (max-width: 560px) {
    .pos-header-dates,
    .pos-control-grid,
    .pos-payment-grid,
    .pos-credit-grid {
        grid-template-columns: 1fr;
    }

    .pos-field-wide,
    .pos-notes-field {
        grid-column: auto;
    }

    .pos-product-toolbar {
        grid-template-columns: 1fr;
    }

    .pos-add-product,
    .pos-add-line {
        width: 100%;
    }

    .pos-search-options {
        flex-wrap: wrap;
    }

    .pos-action-bar {
        right: 10px;
        bottom: 8px;
        left: 10px !important;
    }

    .pos-action-bar .button {
        min-width: 0;
    }
}

/* ==========================================================================
   v43 · Condición de pago SUNAT + pagos múltiples en el POS
   ========================================================================== */
.pos-payment-condition-row {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(260px, 1fr);
    gap: 18px;
    align-items: end;
    margin-bottom: 14px;
}

.pos-payment-condition-field {
    display: grid;
    gap: 6px;
    color: #22253b;
    font-size: 13px;
    font-weight: 500;
    line-height: 19px;
}

.pos-payment-condition-field select {
    min-height: 42px;
    border-color: #cfd5e2;
    background: #f3f5f9;
    font-size: 14px;
}

.pos-payment-condition-help {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e3e7ef;
    border-radius: 9px;
    color: #60687a;
    background: #fafbfc;
    font-size: 11.5px;
    line-height: 17px;
}

.pos-header-dates label.is-disabled {
    opacity: .62;
}

.pos-header-dates label.is-disabled input {
    background: #f0f2f6;
    cursor: not-allowed;
}

.pos-credit-config {
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #e2e6ef;
    border-radius: 10px;
    background: #fafbfc;
}

.pos-credit-config .pos-credit-grid {
    grid-template-columns: 150px 190px minmax(260px, 1fr);
    margin-top: 0;
}

.pos-credit-date-note {
    min-height: 40px;
    display: grid;
    align-content: center;
    gap: 1px;
    padding: 5px 2px;
}

.pos-credit-date-note strong {
    color: #292d3d;
    font-size: 12px;
    font-weight: 500;
}

.pos-credit-date-note span {
    color: #858c9c;
    font-size: 10.5px;
    line-height: 15px;
}

.pos-payment-table-wrap {
    overflow-x: auto;
    border-top: 1px solid #edf0f4;
    padding-top: 12px;
}

.pos-payment-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    table-layout: fixed;
}

.pos-payment-table th {
    padding: 9px 10px;
    border-bottom: 1px solid #dfe3eb;
    color: #11131c;
    background: #f1f3f6;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-align: left;
}

.pos-payment-table th:nth-child(1) { width: 23%; }
.pos-payment-table th:nth-child(2) { width: 23%; }
.pos-payment-table th:nth-child(3) { width: 27%; }
.pos-payment-table th:nth-child(4) { width: 18%; }
.pos-payment-table th:nth-child(5) { width: 48px; }

.pos-payment-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #edf0f4;
    vertical-align: middle;
    background: #fff;
}

.pos-payment-table select,
.pos-payment-table input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 38px !important;
    padding: 7px 10px !important;
    border-radius: 7px !important;
    background: #f3f5f9 !important;
    font-size: 12.5px !important;
}

.pos-payment-destination {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid #d8ddea;
    border-radius: 7px;
    color: #24283a;
    background: #f3f5f9;
    font-size: 12px;
    line-height: 18px;
}

.pos-payment-table .pos-remove-payment {
    margin: 0 auto;
}

.pos-add-payment-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 8px;
    padding: 5px 6px;
    border: 0;
    color: #087ce8;
    background: transparent;
    font: 400 12.5px/18px "Poppins", sans-serif;
    cursor: pointer;
}

.pos-add-payment-link span {
    color: #1298ef;
    font-size: 20px;
    font-weight: 500;
    line-height: 16px;
}

.pos-add-payment-link:hover:not(:disabled) {
    color: #075fae;
}

.pos-add-payment-link:disabled {
    color: #a2a9b8;
    cursor: not-allowed;
}

.pos-payment-warning {
    display: block;
    margin: 4px 5px 0;
    color: #9a6508;
    font-size: 10.5px;
    line-height: 16px;
}

.pos-payment-card .pos-notes-field {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    color: #22253b;
    font-size: 12px;
    font-weight: 500;
}

@media (max-width: 1180px) {
    .pos-payment-condition-row {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .pos-credit-config .pos-credit-grid {
        grid-template-columns: 140px 170px minmax(220px, 1fr);
    }
}

@media (max-width: 820px) {
    .pos-payment-condition-row,
    .pos-credit-config .pos-credit-grid {
        grid-template-columns: 1fr;
    }

    .pos-payment-condition-help {
        min-height: 0;
    }
}


/* ========================================================================== 
   v44 · Selector de lista de precios del producto
   ========================================================================== */
.pos-product-toolbar {
    grid-template-columns: minmax(280px, 1fr) minmax(180px, 220px) auto auto;
    align-items: end;
}

.pos-price-level {
    min-width: 0;
    display: grid;
    gap: 3px;
    margin: 0;
    color: #5c6576;
    font-size: 11px;
    font-weight: 500;
    line-height: 15px;
}

.pos-price-level select {
    width: 100%;
    min-height: 40px;
    margin: 0;
    border: 1px solid #d6dce7;
    border-radius: 8px;
    background: #fff;
    color: #120736;
    font: 400 13px/20px "Poppins", sans-serif;
}

@media (max-width: 980px) {
    .pos-product-toolbar {
        grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) auto;
    }

    .pos-add-line {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .pos-product-toolbar {
        grid-template-columns: 1fr;
    }

    .pos-price-level,
    .pos-add-product,
    .pos-add-line {
        width: 100%;
    }
}

/* ======================================================================
   v47 · Buscador editable de productos + selector rápido de 3 precios
   ====================================================================== */
.sale-product-cell {
    position: relative;
    min-width: 360px;
}

.sale-product-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

.sale-product-search-picker {
    position: relative;
    width: 100%;
}

.pos-lines-table .sale-product-search-input {
    width: 100%;
    min-width: 330px;
    height: 40px;
    padding: 7px 36px 7px 12px !important;
    border: 1px solid #cfd5e2;
    border-radius: 9px;
    background: #fff !important;
    color: #120736;
    font: 400 13px/20px "Poppins", sans-serif;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.pos-lines-table .sale-product-search-input:hover {
    border-color: #b7bfd0;
}

.pos-lines-table .sale-product-search-input:focus {
    border-color: #5b38a4;
    box-shadow: 0 0 0 3px rgba(91, 56, 164, .12);
    background: #fff !important;
}

.sale-product-search-chevron {
    position: absolute;
    top: 50%;
    right: 12px;
    color: #7e8799;
    font-size: 17px;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-54%);
}

.pos-product-picker-popup {
    position: fixed;
    z-index: 1800;
    max-height: min(420px, calc(100vh - 30px));
    overflow: hidden;
    border: 1px solid #d8dde8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(25, 24, 45, .18), 0 3px 10px rgba(25, 24, 45, .08);
    color: #120736;
    font-family: "Poppins", sans-serif;
}

.pos-product-picker-popup.is-hidden {
    display: none !important;
}

.pos-product-picker-head,
.pos-product-picker-result {
    display: grid;
    grid-template-columns: minmax(270px, 1fr) 70px repeat(3, minmax(118px, 132px));
    align-items: center;
}

.pos-product-picker-head {
    min-height: 42px;
    padding: 0 10px;
    border-bottom: 1px solid #e2e6ef;
    background: #f4f6fa;
    color: #34394a;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
}

.pos-product-picker-head span {
    padding: 0 8px;
}

.pos-product-picker-head span:nth-child(n+2) {
    text-align: center;
}

.pos-product-picker-body {
    max-height: 355px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.pos-product-picker-result {
    min-height: 62px;
    padding: 7px 10px;
    border-bottom: 1px solid #edf0f5;
    background: #fff;
    transition: background-color .12s ease;
}

.pos-product-picker-result:last-child {
    border-bottom: 0;
}

.pos-product-picker-result:hover,
.pos-product-picker-result.is-keyboard-active {
    background: var(--ui-primary-soft);
}

.pos-product-result-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 6px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.pos-product-result-main:hover,
.pos-product-result-main:focus-visible {
    background: #eeeafd;
    outline: none;
}

.pos-product-result-name {
    width: 100%;
    overflow: hidden;
    color: #17122d;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-product-result-meta {
    color: #81899b;
    font-size: 10px !important;
    font-weight: 400;
    line-height: 14px !important;
}

.pos-product-result-stock {
    justify-self: center;
    min-width: 34px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eef7f2;
    color: #087b4d;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.pos-product-price-choice {
    min-width: 0;
    min-height: 43px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    margin: 0 4px;
    padding: 5px 7px;
    border: 1px solid #d8dce8;
    border-radius: 9px;
    background: #fff;
    color: #201a3b;
    cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}

.pos-product-price-choice small {
    color: #7d8494;
    font-size: 9px !important;
    font-weight: 600;
    line-height: 11px !important;
    text-transform: uppercase;
}

.pos-product-price-choice strong {
    color: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 15px;
    white-space: nowrap;
}

.pos-product-price-choice:hover,
.pos-product-price-choice:focus-visible {
    transform: translateY(-1px);
    outline: none;
    box-shadow: 0 4px 10px rgba(25, 24, 45, .08);
}

.pos-product-price-choice.price-level-1 {
    border-color: #d8c8fa;
    background: var(--ui-primary-soft);
    color: #4c218e;
}

.pos-product-price-choice.price-level-1:hover,
.pos-product-price-choice.price-level-1:focus-visible {
    border-color: var(--ui-primary);
    background: var(--ui-primary-soft);
}

.pos-product-price-choice.price-level-2 {
    border-color: #ffd5b4;
    background: #fff8f1;
    color: #bb5700;
}

.pos-product-price-choice.price-level-2:hover,
.pos-product-price-choice.price-level-2:focus-visible {
    border-color: #ff7a00;
    background: #fff0e1;
}

.pos-product-price-choice.price-level-3 {
    border-color: #bfead7;
    background: #f1fbf6;
    color: #087b4d;
}

.pos-product-price-choice.price-level-3:hover,
.pos-product-price-choice.price-level-3:focus-visible {
    border-color: #00a85f;
    background: #e8f8f0;
}

.pos-product-picker-empty {
    padding: 22px 18px;
    color: #777f90;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 900px) {
    .pos-product-picker-popup {
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
    }

    .pos-product-picker-head,
    .pos-product-picker-result {
        grid-template-columns: minmax(190px, 1fr) 55px repeat(3, 98px);
    }

    .pos-product-price-choice strong {
        font-size: 10px;
    }
}

/* v55 · Confirmación inmediata de venta / Nota de Venta con impresión directa. */
.sale-completion-dialog {
    width: min(620px, calc(100vw - 28px));
    max-width: 620px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: #17122f;
    overflow: visible;
}

.sale-completion-dialog::backdrop {
    background: rgba(15, 18, 31, .55);
    backdrop-filter: blur(1.5px);
}

.sale-completion-panel {
    overflow: hidden;
    border: 1px solid #e1e4ec;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 28px 75px rgba(20, 16, 52, .22);
}

.sale-completion-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 24px 16px;
}

.sale-completion-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.sale-completion-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #0f9d68;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

.sale-completion-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: #7a8190;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.sale-completion-header h2 {
    margin: 0;
    color: #17122f;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.35;
}

.sale-completion-close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 0;
    border-radius: 8px;
    background: #f4f5f8;
    color: #6f7584;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.sale-completion-close:hover,
.sale-completion-close:focus-visible {
    background: #eceef4;
    color: #26155f;
    outline: none;
}

.sale-completion-status {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
    margin: 0 24px;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
}

.sale-completion-status.is-success {
    border-color: #caeedc;
    background: #effaf4;
    color: #087447;
}

.sale-completion-status.is-pending {
    border-color: #f1dfb4;
    background: #fff9e9;
    color: #835a00;
}

.sale-completion-status.is-danger {
    border-color: #f2c9c9;
    background: #fff2f2;
    color: #a52a2a;
}

.sale-completion-status-dot {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: currentColor;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.sale-completion-status strong {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 600;
}

.sale-completion-status p {
    margin: 0;
    color: inherit;
    font-size: 12px;
    line-height: 1.55;
}

.sale-completion-print {
    padding: 22px 24px 20px;
}

.sale-completion-print h3 {
    margin: 0 0 4px;
    color: #17122f;
    font-size: 14px;
    font-weight: 500;
}

.sale-completion-print > p {
    margin: 0 0 15px;
    color: #7d8492;
    font-size: 11px;
    line-height: 1.55;
}

.sale-completion-formats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.sale-format-button {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 11px 8px;
    border: 1px solid #d7cbf4;
    border-radius: 10px;
    background: var(--ui-primary-soft);
    color: var(--ui-primary);
    text-decoration: none;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}

.sale-format-button span {
    font-size: 17px;
    font-weight: 500;
}

.sale-format-button small {
    color: #81769d;
    font-size: 10px;
    font-weight: 400;
}

.sale-format-button:hover,
.sale-format-button:focus-visible {
    transform: translateY(-1px);
    border-color: #4c1d95;
    background: var(--ui-primary-soft);
    box-shadow: 0 7px 16px rgba(55, 28, 114, .09);
    outline: none;
}

.sale-completion-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px 20px;
    border-top: 1px solid #eceef3;
    background: #fbfbfd;
}

.sale-completion-link {
    color: #655c78;
    font-size: 12px;
    text-decoration: none;
}

.sale-completion-link:hover { color: var(--ui-primary); }

.sale-completion-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 620px) {
    .sale-completion-header { padding: 20px 18px 14px; }
    .sale-completion-status { margin: 0 18px; }
    .sale-completion-print { padding: 18px; }
    .sale-completion-formats { grid-template-columns: 1fr; }
    .sale-format-button { min-height: 58px; }
    .sale-completion-footer { padding: 15px 18px 18px; align-items: stretch; flex-direction: column; }
    .sale-completion-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .sale-completion-actions .button { text-align: center; }
}

/* v56 · Condición de pago + descuento global, sin texto auxiliar lateral. */
.pos-payment-condition-row {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, .62fr);
    align-items: end;
}
.pos-global-discount-field {
    max-width: 260px;
    justify-self: end;
}
.pos-global-discount-field input {
    width: 100%;
    min-height: 42px;
}
@media (max-width: 720px) {
    .pos-payment-condition-row { grid-template-columns: 1fr; }
    .pos-global-discount-field { max-width: none; justify-self: stretch; }
}

/* v57 · Descuento global por porcentaje o monto. */
.pos-payment-condition-row {
    grid-template-columns: minmax(220px, .9fr) minmax(360px, 1.1fr);
    gap: 18px;
}
.pos-global-discount-control {
    display: grid;
    grid-template-columns: minmax(150px, .85fr) minmax(150px, 1fr);
    gap: 10px 12px;
    align-items: end;
}
.pos-global-discount-control label {
    min-width: 0;
}
.pos-global-discount-control select,
.pos-global-discount-control input {
    width: 100%;
    min-height: 42px;
}
.pos-global-discount-control input { text-align: right; }
.pos-global-discount-control small {
    grid-column: 1 / -1;
    color: #7b8192;
    line-height: 1.35;
    margin-top: -2px;
}
@media (max-width: 980px) {
    .pos-payment-condition-row { grid-template-columns: 1fr; }
    .pos-global-discount-control { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .pos-global-discount-control { grid-template-columns: 1fr; }
    .pos-global-discount-control small { grid-column: auto; }
}

/* ========================================================================== 
   v58 · Cotizaciones alineadas visualmente con el Punto de Venta
   ========================================================================== */
.quotation-pos-workspace {
    width: 100%;
    min-width: 0;
}

.quotation-pos-form {
    padding-bottom: 2px;
}

.quotation-control-grid {
    grid-template-columns: minmax(260px, 1.65fr) minmax(190px, 1fr) minmax(160px, .85fr) minmax(150px, .75fr);
}

.quotation-control-grid input[readonly] {
    color: #4d5264;
    background: #f1f3f7;
    cursor: default;
}

.quotation-products-section .pos-lines-table {
    min-width: 930px;
}

.quotation-product-cell {
    min-width: 390px;
}

.quotation-products-section .quotation-quantity {
    min-width: 105px;
}

.quotation-products-section .quotation-price,
.quotation-products-section .quotation-discount {
    min-width: 135px;
}

.quotation-products-section .quotation-line-total {
    min-width: 110px;
}

.quotation-stock-hint.is-zero,
.pos-product-result-stock.is-zero {
    color: #976000;
    background: #fff5db;
}

.quotation-reference-badge {
    color: #17643e;
    background: #eaf8f0;
}

.quotation-pos-discount-row {
    max-width: 700px;
    margin-bottom: 14px;
}

.quotation-terms-card .quotation-global-discount-control {
    display: grid;
    grid-template-columns: minmax(170px, .8fr) minmax(170px, 1fr);
    gap: 10px 12px;
    align-items: end;
}

.quotation-terms-card .quotation-global-discount-control label {
    min-width: 0;
    display: grid;
    gap: 6px;
    color: #22253b;
    font-size: 13px;
    font-weight: 500;
    line-height: 19px;
}

.quotation-terms-card .quotation-global-discount-control input {
    text-align: right;
}

.quotation-terms-card .quotation-global-discount-control small {
    grid-column: 1 / -1;
    margin-top: -2px;
    color: #7b8192;
    font-size: 10.5px;
    line-height: 1.45;
}

.quotation-notes-details {
    margin-top: 8px;
}

.quotation-notes-details[open] > summary {
    margin-bottom: 10px;
}

.quotation-totals {
    position: sticky;
    top: 82px;
}

.quotation-action-bar .pos-action-copy {
    text-align: center;
}

.quotation-product-picker-popup .pos-product-result-main {
    cursor: pointer;
}

@media (max-width: 1180px) {
    .quotation-control-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .quotation-control-grid {
        grid-template-columns: 1fr;
    }
    .quotation-terms-card .quotation-global-discount-control {
        grid-template-columns: 1fr 1fr;
    }
    .quotation-totals {
        position: static;
    }
}

@media (max-width: 560px) {
    .quotation-terms-card .quotation-global-discount-control {
        grid-template-columns: 1fr;
    }
    .quotation-terms-card .quotation-global-discount-control small {
        grid-column: auto;
    }
}

/* ========================================================================== 
   v59 · Revisión de descuentos de cotizaciones antes de emitir comprobante
   ========================================================================== */
.pos-quotation-discount-approved {
    display: inline-flex;
    margin-left: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e8f8ee;
    color: #137a3f;
    font-size: 11px;
    font-weight: 600;
}


.pos-quotation-discount-rejected {
    display: inline-flex;
    margin-left: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fff3f5;
    color: #ad2347;
    font-size: 11px;
    font-weight: 600;
}

.quotation-discount-review-dialog {
    width: min(860px, calc(100vw - 28px));
    max-height: min(88vh, 820px);
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 24px 75px rgba(18, 7, 54, .24);
}
.quotation-discount-review-dialog::backdrop {
    background: rgba(18, 24, 38, .54);
    backdrop-filter: blur(1.5px);
}
.quotation-discount-review-panel {
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 820px);
    overflow: auto;
    background: #fff;
}
.quotation-discount-review-header {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 15px;
    align-items: start;
    padding: 24px 26px 18px;
    border-bottom: 1px solid #eceef4;
}
.quotation-discount-review-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ff006e;
    background: #fff0f6;
    border: 1px solid #ff8dbd;
    font-size: 20px;
    font-weight: 700;
}
.quotation-discount-review-header h2 {
    margin: 3px 0 7px;
    color: #211532;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 600;
}
.quotation-discount-review-header p {
    margin: 0;
    color: #6f7280;
    font-size: 13px;
    line-height: 1.55;
}
.quotation-discount-review-warning {
    margin: 16px 26px 0;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid #f3d089;
    background: #fff8e8;
    color: #795214;
    font-size: 12px;
}
.quotation-discount-review-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 18px 26px;
}
.quotation-discount-review-summary > div {
    display: grid;
    gap: 4px;
    padding: 13px 15px;
    border: 1px solid #e7e9f0;
    border-radius: 12px;
    background: #fafbfe;
}
.quotation-discount-review-summary span {
    color: #777d8c;
    font-size: 11px;
}
.quotation-discount-review-summary strong {
    color: #28213d;
    font-size: 16px;
    font-weight: 600;
}
.quotation-discount-review-summary .is-total {
    border-color: color-mix(in srgb, var(--ui-primary) 25%, var(--ui-border));
    background: var(--ui-primary-soft);
}
.quotation-discount-review-summary .is-total strong { color: var(--ui-primary); }

.quotation-discount-review-section {
    padding: 0 26px 18px;
}
.quotation-discount-review-section-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: end;
    margin-bottom: 10px;
}
.quotation-discount-review-section h3,
.quotation-discount-review-global h3 {
    margin: 2px 0 0;
    color: #26213a;
    font-size: 15px;
    font-weight: 600;
}
.quotation-discount-count {
    padding: 4px 9px;
    border-radius: 999px;
    background: #f0edf8;
    color: #4f347c;
    font-size: 10.5px;
    white-space: nowrap;
}
.quotation-discount-review-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e8ef;
    border-radius: 12px;
}
.quotation-discount-review-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}
.quotation-discount-review-table th {
    padding: 10px 12px;
    background: #f5f6f9;
    color: #44495a;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
}
.quotation-discount-review-table td {
    padding: 11px 12px;
    border-top: 1px solid #eceef3;
    color: #3a3d4b;
    font-size: 12px;
    vertical-align: middle;
}
.quotation-discount-review-table td strong { display: block; font-weight: 500; color: #242033; }
.quotation-discount-review-table td small { display: block; margin-top: 2px; color: #969aa6; font-size: 10px; }
.quotation-discount-money { color: #d21853 !important; font-weight: 600; white-space: nowrap; }

.quotation-discount-review-global {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin: 0 26px 18px;
    padding: 15px 17px;
    border-radius: 12px;
    border: 1px solid #ffd1df;
    background: #fff7fa;
}
.quotation-discount-review-global p {
    margin: 6px 0 0;
    color: #696b77;
    font-size: 12px;
    line-height: 1.5;
}
.quotation-discount-global-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 8px;
    min-width: 430px;
}
.quotation-discount-global-breakdown > div {
    display: grid;
    gap: 3px;
    padding: 9px 11px;
    border: 1px solid #eadfea;
    border-radius: 10px;
    background: rgba(255,255,255,.72);
}
.quotation-discount-global-breakdown span,
.quotation-discount-global-breakdown small { color: #858895; font-size: 10.5px; }
.quotation-discount-global-breakdown strong { color: #29223a; font-size: 14px; font-weight: 620; white-space: nowrap; }
.quotation-discount-global-breakdown .is-discount strong { color: #d21853; }
.quotation-discount-global-breakdown .is-payable { border-color: color-mix(in srgb, var(--ui-primary) 25%, var(--ui-border)); background: var(--ui-primary-soft); }
.quotation-discount-global-breakdown .is-payable strong { color: var(--ui-primary); font-size: 15px; }
.quotation-discount-global-breakdown > small { grid-column: 1 / -1; padding: 0 2px; }

.quotation-discount-review-note {
    margin: 0 26px 18px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #f4f6fa;
    color: #636879;
    font-size: 11.5px;
    line-height: 1.5;
}
.quotation-discount-review-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 16px 26px 20px;
    border-top: 1px solid #eceef3;
    background: #fbfbfd;
}
.quotation-discount-decision-form { margin: 0; }
.quotation-discount-reject {
    background: #fff;
    color: #c8234c;
    border: 1px solid #f0b4c4;
}
.quotation-discount-reject:hover,
.quotation-discount-reject:focus-visible { background: #fff2f5; color: #a7163c; }
.quotation-discount-accept {
    background: var(--ui-primary);
    color: #fff;
}
.quotation-discount-permission-message {
    margin-right: auto;
    max-width: 450px;
    color: #7a5963;
    font-size: 11.5px;
}

@media (max-width: 700px) {
    .quotation-discount-review-header { grid-template-columns: 42px minmax(0, 1fr); padding: 19px 18px 14px; }
    .quotation-discount-review-icon { width: 40px; height: 40px; font-size: 17px; }
    .quotation-discount-review-header h2 { font-size: 18px; }
    .quotation-discount-review-summary { grid-template-columns: 1fr; padding: 14px 18px; }
    .quotation-discount-review-section { padding: 0 18px 14px; }
    .quotation-discount-review-global { grid-template-columns: 1fr; margin: 0 18px 14px; }
    .quotation-discount-global-breakdown { grid-template-columns: 1fr; min-width: 0; }
    .quotation-discount-review-note { margin: 0 18px 14px; }
    .quotation-discount-review-footer { padding: 14px 18px 18px; flex-direction: column-reverse; align-items: stretch; }
    .quotation-discount-review-footer .button { width: 100%; text-align: center; }
    .quotation-discount-permission-message { margin: 0; max-width: none; }
}

/* v87 · Tipo de comprobante y serie separados. */
.pos-control-grid.pos-control-grid-document {
    grid-template-columns: minmax(190px, 1.15fr) minmax(130px, .75fr) minmax(160px, .95fr) minmax(180px, 1fr) minmax(130px, .75fr) minmax(130px, .75fr);
}
@media (max-width: 1450px) {
    .pos-control-grid.pos-control-grid-document { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .pos-control-grid.pos-control-grid-document { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .pos-control-grid.pos-control-grid-document { grid-template-columns: 1fr; }
}


/* v175 · Dirección de emisión alineada al selector global del sistema. */
.pos-customer-address-field .app-search-select { width: 100%; min-width: 0; }
.pos-customer-address-field .app-search-select-input {
    min-height: 40px !important;
    border-color: #d8deea !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #30364a !important;
    font-size: 12px !important;
}
.pos-customer-address-field .app-search-select-input:focus {
    border-color: var(--accent, #6f42c1) !important;
}
.pos-customer-address-field .app-search-select.is-disabled .app-search-select-input {
    background: #f5f7fa !important;
    color: #9aa1ae !important;
}
.pos-customer-address-field > .app-field-help-tip--floating { top: 0; right: 0; }


/* v178 · Logotipo compacto en modo operativo */
body.pos-mode .sidebar-brand.sidebar-brand--logo {
    min-height: 74px;
    padding: 10px;
}

body.pos-mode .sidebar-brand.sidebar-brand--logo .brand-logo-shell {
    width: 56px;
    min-height: 56px;
    padding: 8px;
    border-radius: 14px;
}

body.pos-mode .sidebar-brand.sidebar-brand--logo .brand-logo-shell img {
    max-height: 34px;
}

body.pos-mode.pos-sidebar-expanded .sidebar-brand.sidebar-brand--logo {
    justify-content: center;
    padding: 12px 16px;
}

body.pos-mode.pos-sidebar-expanded .sidebar-brand.sidebar-brand--logo .brand-logo-shell {
    width: 100%;
    min-height: 60px;
}


/* v179 · Logo visible en el rail operativo */
body.pos-mode .sidebar-brand.sidebar-brand--logo{min-height:78px;padding:6px}.pos-mode .sidebar-brand.sidebar-brand--logo .brand-logo-shell{width:72px;min-height:62px;padding:4px;border-radius:12px}.pos-mode .sidebar-brand.sidebar-brand--logo .brand-logo-shell img{width:auto;max-width:66px;max-height:54px}.pos-mode.pos-sidebar-expanded .sidebar-brand.sidebar-brand--logo{min-height:106px;padding:10px 16px}.pos-mode.pos-sidebar-expanded .sidebar-brand.sidebar-brand--logo .brand-logo-shell{width:100%;min-height:82px;padding:6px 10px}.pos-mode.pos-sidebar-expanded .sidebar-brand.sidebar-brand--logo .brand-logo-shell img{max-width:210px;max-height:70px}


/* v181 · Línea manual desde el buscador de productos */
.pos-product-picker-manual{width:100%;display:grid;gap:3px;padding:12px 16px;border:0;border-top:1px solid #e5e9f1;background:#f7f9fc;color:#24476d;text-align:left;cursor:pointer;font:inherit}.pos-product-picker-manual:hover,.pos-product-picker-manual:focus-visible{background:#edf4fb;outline:0}.pos-product-picker-manual strong{font-size:.82rem;font-weight:800}.pos-product-picker-manual small{color:#758197;font-size:.7rem;line-height:1.35}.sale-product-search-picker:has(+ *){} 


/* v184 · Miniaturas de producto ampliables en el buscador del POS */
.pos-product-result-main.pos-product-result-main-with-image{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:9px;padding:4px 6px}.pos-product-thumb{width:44px;height:44px;display:grid;place-items:center;overflow:hidden;padding:0;border:1px solid #dce3ed;border-radius:9px;background:#fff;cursor:zoom-in}.pos-product-thumb img{display:block;width:100%;height:100%;object-fit:cover}.pos-product-thumb:hover,.pos-product-thumb:focus-visible{border-color:#8aa8c7;box-shadow:0 0 0 3px rgba(35,95,151,.09);outline:0}.pos-product-thumb.is-empty{color:#a2abba;background:#f4f6f9;font-size:1rem;cursor:default}.pos-product-result-copy{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:3px 0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.pos-product-result-copy:hover .pos-product-result-name,.pos-product-result-copy:focus-visible .pos-product-result-name{color:#235f97}.pos-product-result-copy:focus-visible{outline:0}.pos-product-image-dialog{width:min(760px,calc(100vw - 30px));max-width:760px;padding:0;border:0;border-radius:18px;background:transparent;box-shadow:0 30px 80px rgba(15,23,42,.35)}.pos-product-image-dialog::backdrop{background:rgba(15,23,42,.66);backdrop-filter:blur(2px)}.pos-product-image-dialog-panel{position:relative;overflow:hidden;border-radius:18px;background:#fff}.pos-product-image-dialog-close{position:absolute;z-index:2;top:12px;right:12px;width:40px;height:40px;border:0;border-radius:12px;background:rgba(15,23,42,.78);color:#fff;font-size:24px;line-height:1;cursor:pointer}.pos-product-image-dialog-stage{height:min(68vh,620px);display:grid;place-items:center;padding:28px;background:#f4f6fa}.pos-product-image-dialog-stage img{display:block;max-width:100%;max-height:100%;object-fit:contain;border-radius:10px}.pos-product-image-dialog-caption{padding:14px 18px;color:#27344a;font-size:.85rem;font-weight:700;border-top:1px solid #e5e9f0}@media(max-width:700px){.pos-product-picker-result{min-height:70px}.pos-product-result-main.pos-product-result-main-with-image{grid-template-columns:42px minmax(0,1fr)}.pos-product-thumb{width:38px;height:38px}}

/* v185 · Descuento global por monto con/sin IGV */
.pos-global-discount-control,.quotation-global-discount-control{align-items:end}.pos-global-discount-control>label,.quotation-global-discount-control>label{min-width:0}#sale-global-discount-tax-wrap,#quotation-global-discount-tax-wrap{min-width:168px}.pos-global-discount-control small,.quotation-global-discount-control small{grid-column:1/-1}

/* ---------- Punto POS: menú completamente oculto con apertura por hover ---------- */
.pos-sidebar-hover-zone{display:none}
@media (min-width:1181px){
    body.terminal-pos-mode .sidebar{
        width:var(--sidebar-width,276px)!important;
        transform:translateX(-100%)!important;
        overflow:hidden;
        transition:transform .18s ease!important;
        box-shadow:12px 0 36px rgba(15,23,42,.14);
    }
    body.terminal-pos-mode.pos-sidebar-expanded .sidebar{
        width:var(--sidebar-width,276px)!important;
        transform:translateX(0)!important;
    }
    body.terminal-pos-mode .app-main,
    body.terminal-pos-mode.pos-sidebar-expanded .app-main{
        margin-left:0!important;
    }
    body.terminal-pos-mode .sidebar-toggle{
        display:none!important;
    }
    body.terminal-pos-mode .pos-sidebar-hover-zone{
        position:fixed;
        inset:0 auto 0 0;
        z-index:69;
        display:block;
        width:14px;
        background:transparent;
    }
    body.terminal-pos-mode.pos-sidebar-expanded .pos-sidebar-hover-zone{
        pointer-events:none;
    }
    body.terminal-pos-mode.pos-sidebar-expanded .pos-action-bar{
        left:18px!important;
    }
}


/* v269 · POS: unidad/presentación a la derecha del producto + nueva línea por fila */
.pos-lines-table { min-width: 1060px; }
.pos-lines-table .sale-product-cell { min-width: 455px; }
.sale-product-main-row { display:flex; align-items:stretch; gap:8px; width:100%; min-width:0; }
.sale-product-main-row .sale-product-search-picker { flex:1 1 auto; min-width:0; }
.pos-lines-table .sale-product-main-row .sale-product-search-input { width:100%; min-width:270px; }
.pos-lines-table .sale-product-cell .sale-presentation-select {
    flex:0 0 150px;
    width:150px;
    min-width:150px;
    min-height:40px;
    margin:0;
    padding:7px 28px 7px 9px;
    border:1px solid #cfd5e2;
    border-radius:9px;
    background:#f8fbff;
    color:#334155;
    font-size:11.5px;
}
.pos-lines-table .sale-product-cell .sale-presentation-select:disabled { opacity:1; color:#64748b; cursor:default; }
.pos-lines-table .sale-line-actions {
    min-width:78px;
    padding-top:11px;
    white-space:nowrap;
}
.pos-lines-table .sale-line-actions .icon-button { display:inline-grid; place-items:center; vertical-align:top; margin:0 3px 0 0; }
.pos-lines-table .sale-line-actions .icon-button:last-child { margin-right:0; }
.sale-add-line-button { background:#e8f1ff; color:#245f93; font-weight:700; }
.sale-add-line-button:hover { background:#dbeafe; }
@media(max-width:900px){
    .pos-lines-table .sale-product-cell{min-width:420px}
    .pos-lines-table .sale-product-cell .sale-presentation-select{flex-basis:138px;width:138px;min-width:138px}
    .pos-lines-table .sale-product-main-row .sale-product-search-input{min-width:245px}
}


/* v270 · Nueva venta: sidebar completamente oculto como Punto POS */
@media (min-width:1181px){
    body.sales-create-hover-mode .sidebar{
        width:var(--sidebar-width,276px)!important;
        transform:translateX(-100%)!important;
        overflow:hidden;
        transition:transform .18s ease!important;
        box-shadow:12px 0 36px rgba(15,23,42,.14);
    }
    body.sales-create-hover-mode.pos-sidebar-expanded .sidebar{
        width:var(--sidebar-width,276px)!important;
        transform:translateX(0)!important;
    }
    body.sales-create-hover-mode .app-main,
    body.sales-create-hover-mode.pos-sidebar-expanded .app-main{
        margin-left:0!important;
    }
    body.sales-create-hover-mode .pos-sidebar-hover-zone{
        position:fixed;
        inset:0 auto 0 0;
        z-index:69;
        display:block;
        width:14px;
        background:transparent;
    }
    body.sales-create-hover-mode.pos-sidebar-expanded .pos-sidebar-hover-zone{
        pointer-events:none;
    }
    body.sales-create-hover-mode .app-content{
        padding-left:12px;
        padding-right:12px;
    }
    body.sales-create-hover-mode .pos-lines-table .sale-product-cell{
        min-width:560px;
        width:38%;
    }
    body.sales-create-hover-mode .pos-lines-table .sale-product-main-row .sale-product-search-input{
        min-width:360px;
    }
    body.sales-create-hover-mode .pos-lines-table .sale-product-cell .sale-presentation-select{
        flex:0 0 168px;
        width:168px;
        min-width:168px;
    }
}
@media (min-width:1181px){
    body.sales-create-hover-mode .sidebar-toggle{display:none!important;}
}

/* v278 · Venta detallada: afectación IGV por línea y valor referencial gratuito */
.sale-tax-detail-cell,.quotation-tax-detail-cell{min-width:210px;width:210px}
.sale-tax-detail-cell select,.quotation-tax-detail-cell select,.sale-tax-detail-cell input,.quotation-tax-detail-cell input{width:100%;min-height:42px;border:1px solid #d7e0eb;border-radius:10px;background:#fff;padding:7px 10px;font:inherit;color:#172033}
.sale-tax-detail-cell input,.quotation-tax-detail-cell input{margin-top:6px;background:#f8fbff}
.sale-tax-detail-cell .is-hidden,.quotation-tax-detail-cell .is-hidden{display:none!important}
body.sales-create-hover-mode .pos-lines-table:has(.sale-tax-detail-cell) .sale-product-cell{min-width:430px;width:31%}
@media(max-width:1180px){.sale-tax-detail-cell,.quotation-tax-detail-cell{min-width:190px;width:190px}}


/* v279 · POS/Cotizaciones: etiquetas compactas y mayor espacio para el nombre del producto */
.pos-lines-table .sale-quantity { min-width: 74px; width: 74px; }
.pos-lines-table .sale-price,
.pos-lines-table .sale-reference-value,
.pos-lines-table .sale-discount { min-width: 104px; width: 104px; }
.pos-lines-table .sale-line-total { min-width: 84px; }
.pos-lines-table .sale-line-actions { min-width: 72px; }
.pos-lines-table .sale-serials { min-width: 130px; }
.pos-lines-table .sale-series-button { min-width: 88px; padding-inline: 12px; white-space: nowrap; }
.pos-lines-table .sale-series-summary { display:block; margin-top:4px; font-size:11px; line-height:1.2; color:#64748b; }
.pos-lines-table .sale-product-cell { min-width: 540px; }
.pos-lines-table .sale-product-main-row .sale-product-search-input { min-width: 330px; }
.pos-lines-table .sale-product-cell .sale-presentation-select { flex:0 0 138px; width:138px; min-width:138px; }
body.sales-create-hover-mode .pos-lines-table .sale-product-cell { min-width: 620px; width: 42%; }
body.sales-create-hover-mode .pos-lines-table .sale-product-main-row .sale-product-search-input { min-width: 420px; }
body.sales-create-hover-mode .pos-lines-table .sale-product-cell .sale-presentation-select { flex:0 0 156px; width:156px; min-width:156px; }
body.sales-create-hover-mode .pos-lines-table:has(.sale-tax-detail-cell) .sale-product-cell { min-width: 500px; width: 36%; }
body.sales-create-hover-mode .pos-lines-table:has(.sale-tax-detail-cell) .sale-product-main-row .sale-product-search-input { min-width: 340px; }
@media(max-width:900px){
    .pos-lines-table .sale-product-cell{min-width:480px}
    .pos-lines-table .sale-product-main-row .sale-product-search-input{min-width:280px}
    .pos-lines-table .sale-product-cell .sale-presentation-select{flex-basis:132px;width:132px;min-width:132px}
}


/* v280 · Proporciones finas de la línea: nombre, unidad, precio, descuento y series */
.pos-lines-table{min-width:1260px}
.pos-lines-table th.sale-col-description{min-width:540px}
.pos-lines-table th.sale-col-affectation{min-width:205px}
.pos-lines-table th.sale-col-quantity{width:84px;min-width:84px;white-space:nowrap}
.pos-lines-table th.sale-col-price{width:120px;min-width:120px;white-space:nowrap}
.pos-lines-table th.sale-col-discount{width:88px;min-width:88px;white-space:nowrap}
.pos-lines-table th.sale-col-series{width:112px;min-width:112px;white-space:nowrap}
.pos-lines-table th.sale-col-total{width:90px;min-width:90px;white-space:nowrap}

.pos-lines-table .sale-product-cell{min-width:540px}
.pos-lines-table .sale-product-main-row{gap:8px;overflow:hidden}
.pos-lines-table .sale-product-main-row .sale-product-search-picker{min-width:0;overflow:hidden}
.pos-lines-table .sale-product-main-row .sale-product-search-input{min-width:0!important;width:100%;text-overflow:ellipsis}
.pos-lines-table .sale-product-cell .sale-presentation-select{
    flex:0 0 124px!important;
    width:124px!important;
    min-width:124px!important;
    max-width:124px!important;
    padding-left:8px;
    padding-right:24px;
    font-size:11px;
}
.pos-lines-table .sale-quantity-cell{width:84px;min-width:84px}
.pos-lines-table .sale-quantity{width:78px!important;min-width:78px!important}
.pos-lines-table .sale-price-cell{width:120px;min-width:120px}
.pos-lines-table .sale-price{width:114px!important;min-width:114px!important}
.pos-lines-table .sale-discount-cell{width:88px;min-width:88px}
.pos-lines-table .sale-discount{width:82px!important;min-width:82px!important}
.pos-lines-table .sale-series-cell{width:112px;min-width:112px;text-align:center}
.pos-lines-table .sale-series-picker{display:flex;flex-direction:column;align-items:center;gap:3px}
.pos-lines-table .sale-series-button{
    width:auto!important;
    min-width:76px!important;
    max-width:88px!important;
    padding:8px 13px!important;
    white-space:nowrap;
}
.pos-lines-table .sale-series-summary{white-space:nowrap;font-size:10px!important}
.pos-lines-table .sale-line-total{width:90px;min-width:90px;white-space:nowrap}
.pos-lines-table .sale-line-actions{width:72px;min-width:72px;white-space:nowrap}

@media (min-width:1181px){
    body.sales-create-hover-mode .pos-lines-table .sale-product-cell{min-width:575px;width:40%}
    body.sales-create-hover-mode .pos-lines-table .sale-product-cell .sale-presentation-select{
        flex-basis:124px!important;width:124px!important;min-width:124px!important;max-width:124px!important
    }
    body.sales-create-hover-mode .pos-lines-table:has(.sale-tax-detail-cell) .sale-product-cell{min-width:540px;width:35%}
}
@media(max-width:900px){
    .pos-lines-table .sale-product-cell{min-width:500px}
    .pos-lines-table .sale-product-cell .sale-presentation-select{
        flex-basis:118px!important;width:118px!important;min-width:118px!important;max-width:118px!important
    }
}


/* v281 · Cotizaciones: usar todo el ancho y ampliar el nombre del producto */
.quotation-products-section .pos-lines-table{
    width:100%;
    min-width:0;
    table-layout:fixed;
}
.quotation-products-section .quotation-product-cell,
.quotation-products-section .sale-product-cell{
    width:52%;
    min-width:520px;
}
.quotation-products-section .sale-product-main-row{
    gap:8px;
    overflow:hidden;
}
.quotation-products-section .sale-product-main-row .sale-product-search-picker{
    flex:1 1 auto;
    min-width:0;
    overflow:hidden;
}
.quotation-products-section .sale-product-main-row .quotation-product-search-input{
    width:100%;
    min-width:0 !important;
    text-overflow:ellipsis;
}
.quotation-products-section .sale-product-cell .sale-presentation-select{
    flex:0 0 118px !important;
    width:118px !important;
    min-width:118px !important;
    max-width:118px !important;
    font-size:11px;
}
.quotation-products-section .sale-col-affectation,
.quotation-products-section .quotation-tax-detail-cell{
    width:210px;
    min-width:210px;
}
.quotation-products-section .sale-col-quantity,
.quotation-products-section .sale-quantity-cell{
    width:88px;
    min-width:88px;
}
.quotation-products-section .quotation-quantity{
    width:82px !important;
    min-width:82px !important;
}
.quotation-products-section .sale-col-price,
.quotation-products-section .sale-price-cell{
    width:130px;
    min-width:130px;
}
.quotation-products-section .quotation-price{
    width:124px !important;
    min-width:124px !important;
}
.quotation-products-section .sale-col-discount,
.quotation-products-section .sale-discount-cell{
    width:92px;
    min-width:92px;
}
.quotation-products-section .quotation-discount{
    width:86px !important;
    min-width:86px !important;
}
.quotation-products-section .sale-col-total,
.quotation-products-section .quotation-line-total{
    width:88px;
    min-width:88px;
}
.quotation-products-section .pos-lines-table th:last-child,
.quotation-products-section .pos-lines-table td:last-child{
    width:58px;
    min-width:58px;
    white-space:nowrap;
}
@media (max-width: 900px){
    .quotation-products-section .quotation-product-cell,
    .quotation-products-section .sale-product-cell{
        min-width:460px;
    }
    .quotation-products-section .sale-product-cell .sale-presentation-select{
        flex-basis:112px !important;
        width:112px !important;
        min-width:112px !important;
        max-width:112px !important;
    }
}


/* v302 · Cotizaciones: columnas monetarias alineadas sin solapamiento */
.quotation-products-section .quotation-lines{table-layout:fixed;width:100%;}
.quotation-products-section .quotation-lines th,.quotation-products-section .quotation-lines td{box-sizing:border-box;}
.quotation-products-section .quotation-lines .sale-price-cell,.quotation-products-section .quotation-lines .sale-discount-cell{padding-left:7px!important;padding-right:7px!important;}
.quotation-products-section .quotation-lines .sale-price-cell{width:142px!important;min-width:142px!important;}
.quotation-products-section .quotation-lines .sale-discount-cell{width:118px!important;min-width:118px!important;}
.quotation-products-section .quotation-lines th.sale-col-price{width:142px!important;min-width:142px!important;text-align:left;}
.quotation-products-section .quotation-lines th.sale-col-discount{width:118px!important;min-width:118px!important;text-align:left;}
.quotation-products-section .quotation-lines .quotation-price,.quotation-products-section .quotation-lines .quotation-discount{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;}
.quotation-products-section .quotation-lines .quotation-line-total{width:96px!important;min-width:96px!important;text-align:right;}
.quotation-products-section .quotation-lines th.sale-col-total{width:96px!important;min-width:96px!important;text-align:right;}
@media(max-width:1320px){.quotation-products-section .quotation-lines{min-width:1240px!important;table-layout:fixed;}}

/* v308 · Entrega parcial y reserva de stock */
.pos-product-toolbar .pos-delivery-mode{display:grid;gap:5px;min-width:190px;color:#475467;font-size:.76rem;font-weight:700}
.pos-product-toolbar .pos-delivery-mode select{min-height:41px;padding:8px 10px;border:1px solid #d5dce7;border-radius:9px;background:#fff;color:#253041;font:inherit}
.pos-lines-table th.sale-col-delivered{width:118px;min-width:118px;white-space:nowrap}
.pos-lines-table .sale-delivered-cell{width:118px;min-width:118px}
.pos-lines-table .sale-delivered-cell input{width:100%;min-width:0;text-align:right}
.pos-lines-table .sale-delivery-hint{display:block;margin-top:4px;font-size:.66rem;line-height:1.25;white-space:nowrap}
.pos-lines-table .sale-delivered-quantity[readonly]{background:#f6f8fb;color:#667085}
@media(max-width:900px){.pos-product-toolbar .pos-delivery-mode{min-width:0;width:100%}.pos-lines-table th.sale-col-delivered,.pos-lines-table .sale-delivered-cell{width:110px;min-width:110px}}


/* v309 · Barra de productos alineada + acción Nueva línea visible */
.pos-product-toolbar {
    grid-template-columns: minmax(320px, 1fr) minmax(185px, 215px) minmax(185px, 215px) auto auto !important;
    align-items: end;
    column-gap: 10px;
    row-gap: 10px;
}
.pos-product-toolbar .pos-search-box {
    min-width: 0;
}
.pos-product-toolbar .pos-add-product,
.pos-product-toolbar .pos-add-line {
    align-self: end;
    min-height: 41px;
    white-space: nowrap;
}
.pos-product-toolbar .pos-add-line {
    border-color: var(--pos-primary) !important;
    background: var(--pos-primary) !important;
    color: #fff !important;
    box-shadow: 0 5px 14px color-mix(in srgb, var(--pos-primary) 18%, transparent);
}
.pos-product-toolbar .pos-add-line:hover {
    background: var(--pos-primary-hover) !important;
    border-color: var(--pos-primary-hover) !important;
}
@media (max-width: 1120px) {
    .pos-product-toolbar {
        grid-template-columns: minmax(260px, 1fr) minmax(170px, 210px) minmax(170px, 210px) auto !important;
    }
    .pos-product-toolbar .pos-add-line {
        grid-column: auto !important;
    }
    .pos-product-toolbar .pos-add-product {
        grid-column: auto;
    }
}
@media (max-width: 930px) {
    .pos-product-toolbar {
        grid-template-columns: minmax(0, 1fr) minmax(170px, 210px) !important;
    }
    .pos-product-toolbar .pos-delivery-mode,
    .pos-product-toolbar .pos-add-product,
    .pos-product-toolbar .pos-add-line {
        width: 100%;
    }
}
@media (max-width: 700px) {
    .pos-product-toolbar {
        grid-template-columns: 1fr !important;
    }
}

/* v339 · alerta inmediata cuando el precio queda debajo del costo */
.sale-price.is-below-cost{border-color:#dc2626!important;background:#fff1f2!important;color:#991b1b!important;box-shadow:0 0 0 2px rgba(220,38,38,.10)!important}
.sale-price-cost-warning{display:block;margin-top:4px;color:#dc2626;font-size:10px;font-weight:700;line-height:1.2;max-width:150px}
.sale-price-cost-warning[hidden]{display:none!important}
