﻿@font-face {
    font-family: "samscommerce";
    src: url("/fonts/sams/samscommerce.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "samspro";
    src: url("/fonts/sams/samscommerce.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "samsdecorative";
    src: url("/fonts/sams/samsdecorative.woff2") format("woff2");
    font-display: swap;
}

:root {
    --sams-font-commerce: "samscommerce", "samspro", "Avenir Next", "Segoe UI", Arial, sans-serif;
    --sams-font-decorative: "samsdecorative", "samscommerce", "Avenir Next", Arial, sans-serif;
}

body {
    margin: 0;
    font-family: var(--store-font-base, var(--sams-font-commerce));
    background: var(--store-body-bg, #f4f6f8);
    color: var(--store-body-text, #17202a);
    font-size: var(--store-body-font-size, 15px);
    letter-spacing: 0;
}

.store-reconnect-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    pointer-events: none;
    display: none !important;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .36);
}

.store-reconnect-modal.store-reconnect-visible,
.store-reconnect-modal.components-reconnect-failed,
.store-reconnect-modal.components-reconnect-rejected {
    display: none !important;
}

.store-reconnect-modal.components-reconnect-hide {
    display: none !important;
}

.store-reconnect-card {
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #102033;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
    pointer-events: auto;
}

.store-reconnect-status {
    display: none;
}

.store-reconnect-status-loading {
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
}

.store-reconnect-status strong,
.store-reconnect-status span {
    display: block;
}

.store-reconnect-status strong {
    margin-bottom: 3px;
    color: #0f5f80;
    font-size: .95rem;
}

.store-reconnect-status span {
    color: #475569;
    font-size: .86rem;
}

.store-reconnect-status button {
    min-height: 34px;
    margin-top: 10px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: #0f5f80;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.store-reconnect-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #cfd8df;
    border-top-color: #008fca;
    border-radius: 999px;
    animation: process-loader-spin .75s linear infinite;
}

.store-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.components-reconnect-show .store-reconnect-status-loading {
    display: flex;
}

.components-reconnect-failed .store-reconnect-status-failed,
.components-reconnect-rejected .store-reconnect-status-rejected {
    display: block;
}

.components-reconnect-failed .store-reconnect-card,
.components-reconnect-rejected .store-reconnect-card {
    width: min(340px, calc(100vw - 32px));
    padding: 14px 16px;
    border: 1px solid rgba(15, 95, 128, .18);
}

.app-shell,
.app-shell button,
.app-shell input,
.app-shell select,
.app-shell textarea,
.dxbl {
    font-family: var(--sams-font-commerce) !important;
}

button,
input,
select,
textarea {
    font: inherit;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    background: #101828;
    color: #fff;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 24px;
}

/* 20260627 - ERP workspace tabs and order client picker */
.erp-workspace-tabs {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    min-height: 36px;
    padding: 0 18px;
    background: #dbeafe;
    border-bottom: 1px solid #cbd5e1;
    overflow-x: auto;
    overflow-y: hidden;
}

.erp-workspace-tab {
    display: inline-flex;
    align-items: center;
    max-width: 240px;
    height: 32px;
    margin-top: 4px;
    border: 1px solid #cbd5e1;
    border-radius: 3px 3px 0 0;
    background: #eef2f7;
    color: #334155;
}

.erp-workspace-tab.active {
    background: #ffffff;
    border-bottom-color: #ffffff;
    color: #0f172a;
}

.erp-workspace-tab-link,
.erp-workspace-tab-close {
    height: 30px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.erp-workspace-tab-link {
    min-width: 0;
    padding: 0 10px 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-workspace-tab-close {
    width: 26px;
    min-width: 26px;
    padding: 0;
    font-weight: 700;
    color: #64748b;
}

.erp-workspace-tab-close:hover {
    color: #dc2626;
}

.commercial-ficha-card .commercial-header-form .commercial-client-field .sap-inline-control {
    grid-template-columns: minmax(0, 1fr) 31px 31px !important;
}

.commercial-ficha-card .commercial-header-form .commercial-client-display {
    cursor: pointer;
    background: #ffffff;
}

.client-picker-body {
    display: grid;
    gap: 12px;
}

.client-picker-search {
    width: 100%;
}

.client-picker-results {
    display: grid;
    gap: 5px;
    max-height: min(520px, 58vh);
    overflow: auto;
    padding-right: 4px;
}

.client-picker-row {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #d8dee8;
    border-radius: 3px;
    background: #ffffff;
    color: #1f2937;
    text-align: left;
}

.client-picker-row:hover,
.client-picker-row.selected {
    border-color: #ff7a1a;
    background: #fff7ed;
}

.client-picker-empty {
    padding: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 3px;
    color: #64748b;
}

.commercial-ficha-card .commercial-shipping-logistics-form .commercial-shipping-agency-field {
    grid-column: 1 / span 8 !important;
}

.comercial-list-page .grid-panel,
.commercial-list-page .grid-panel,
.commercial-lines-wrap,
.commercial-delivery-popup .erp-grid-wrap {
    margin-bottom: 50px !important;
}

/* 2026-06-25: MalagaDive final storefront containment.
   Catalog/product/page stay wide; checkout, account and auth are constrained. */
.storefront-shell.theme-malagadive .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-inline: 0 !important;
}

.storefront-shell.theme-malagadive .storefront-catalog-shell,
.storefront-shell.theme-malagadive .store-product-detail,
.storefront-shell.theme-malagadive .store-page-shell {
    width: calc(100% - 48px) !important;
    max-width: none !important;
    margin: 24px auto !important;
}

.storefront-shell.theme-malagadive .store-checkout-shell,
.storefront-shell.theme-malagadive .store-account-shell,
.storefront-shell.theme-malagadive .store-register-shell,
.storefront-shell.theme-malagadive .store-login-content .store-account-login-card {
    width: min(100% - 48px, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell.theme-malagadive .store-cart-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 24px !important;
    align-items: start !important;
}

.storefront-shell.theme-malagadive .store-cart-line,
.storefront-shell.theme-malagadive .store-cart-summary {
    border: 1px solid #d8e4ee !important;
    border-radius: 5px !important;
    background: rgba(255, 255, 255, .82) !important;
    box-shadow: 0 18px 42px rgba(14, 36, 64, .08) !important;
}

.storefront-shell.theme-malagadive .store-cart-line {
    grid-template-columns: 104px minmax(0, 1fr) 104px 120px 74px !important;
    gap: 18px !important;
    align-items: center !important;
    padding: 18px !important;
}

.storefront-shell.theme-malagadive .store-cart-line img {
    width: 96px !important;
    height: 96px !important;
    object-fit: contain !important;
    border: 1px solid #d8e4ee !important;
    border-radius: 3px !important;
    background: #fff !important;
}

.storefront-shell.theme-malagadive .store-cart-line input,
.storefront-shell.theme-malagadive .store-coupon-form input {
    height: 42px !important;
    border-radius: 5px !important;
    border: 1px solid #b8c7d6 !important;
    background: #fff !important;
}

.storefront-shell.theme-malagadive .store-coupon-form > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 104px !important;
    gap: 8px !important;
    align-items: stretch !important;
}

.storefront-shell.theme-malagadive .store-cart-line button,
.storefront-shell.theme-malagadive .store-coupon-form button,
.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary,
.storefront-shell.theme-malagadive .store-cart-summary .store-action-secondary {
    min-height: 42px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
}

.storefront-shell.theme-malagadive .store-cart-line button,
.storefront-shell.theme-malagadive .store-coupon-form button {
    background: #f4ead5 !important;
    border-color: #f4ead5 !important;
    color: #7a4c00 !important;
}

.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary {
    width: 100% !important;
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
}

.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary:hover {
    background: #111827 !important;
    border-color: #111827 !important;
}

.storefront-shell.theme-malagadive .store-checkout-progress {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

@media (max-width: 900px) {
    .storefront-shell.theme-malagadive .storefront-catalog-shell,
    .storefront-shell.theme-malagadive .store-product-detail,
    .storefront-shell.theme-malagadive .store-page-shell,
    .storefront-shell.theme-malagadive .store-checkout-shell,
    .storefront-shell.theme-malagadive .store-account-shell,
    .storefront-shell.theme-malagadive .store-register-shell {
        width: calc(100% - 28px) !important;
    }

    .storefront-shell.theme-malagadive .store-cart-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line {
        grid-template-columns: 86px minmax(0, 1fr) !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line img {
        width: 80px !important;
        height: 80px !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line input,
    .storefront-shell.theme-malagadive .store-cart-line strong,
    .storefront-shell.theme-malagadive .store-cart-line button {
        grid-column: 2 !important;
        width: 100% !important;
    }

    .storefront-shell.theme-malagadive .store-coupon-form > div {
        grid-template-columns: 1fr !important;
    }
}

/* Bruja checkout: pago Stripe limpio, botones estables y sin radios enormes. */
.storefront-shell.theme-bruja .store-payment-methods,
.storefront-shell.theme-bruja .store-payment-methods.store-payment-method-list,
.storefront-shell.theme-bruja .store-payment-methods.store-payment-method-list.wide {
    display: grid !important;
    grid-template-columns: minmax(280px, 430px) !important;
    gap: 12px !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 430px !important;
}

.storefront-shell.theme-bruja .store-payment-method {
    width: 100% !important;
    min-height: 86px !important;
    padding: 14px 16px !important;
    border: 1px solid rgba(212, 175, 55, .48) !important;
    border-radius: 5px !important;
    background: rgba(255, 255, 255, .045) !important;
    color: #f8f1ff !important;
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) 108px !important;
    gap: 12px !important;
    align-items: center !important;
    text-align: left !important;
    box-shadow: none !important;
}

.storefront-shell.theme-bruja .store-payment-method.selected,
.storefront-shell.theme-bruja .store-payment-method:hover {
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, .26) !important;
}

.storefront-shell.theme-bruja .store-payment-radio {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(212, 175, 55, .7) !important;
    background: transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.storefront-shell.theme-bruja .store-payment-method.selected .store-payment-radio::after {
    content: "" !important;
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background: #d4af37 !important;
}

.storefront-shell.theme-bruja .store-payment-method-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
}

.storefront-shell.theme-bruja .store-payment-method-text strong {
    color: #fff !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.storefront-shell.theme-bruja .store-payment-method-text small {
    color: #d9c7e8 !important;
    font-size: .92rem !important;
    line-height: 1.25 !important;
}

.storefront-shell.theme-bruja .store-payment-method-logo {
    width: 108px !important;
    min-width: 108px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

.storefront-shell.theme-bruja .store-payment-logo-img.stripe {
    width: 98px !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    border-radius: 5px !important;
}

.storefront-shell.theme-bruja .store-checkout-actions {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

.storefront-shell.theme-bruja .store-checkout-actions .store-action-primary,
.storefront-shell.theme-bruja .store-checkout-actions .store-action-secondary,
.storefront-shell.theme-bruja .store-checkout-actions button,
.storefront-shell.theme-bruja .store-checkout-actions a {
    min-width: 180px !important;
    max-width: 220px !important;
    height: 42px !important;
    padding: 0 18px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.storefront-shell.theme-bruja .store-cart-line input[type="number"],
.storefront-shell.theme-bruja .store-coupon-form input,
.storefront-shell.theme-bruja .store-coupon-form button {
    border-radius: 5px !important;
}

@media (max-width: 640px) {
    .storefront-shell.theme-bruja .store-payment-methods,
    .storefront-shell.theme-bruja .store-payment-methods.store-payment-method-list,
    .storefront-shell.theme-bruja .store-payment-methods.store-payment-method-list.wide {
        grid-template-columns: 1fr !important;
        max-width: none !important;
    }

    .storefront-shell.theme-bruja .store-payment-method {
        grid-template-columns: 18px minmax(0, 1fr) 96px !important;
    }

    .storefront-shell.theme-bruja .store-payment-method-logo {
        width: 96px !important;
        min-width: 96px !important;
    }

    .storefront-shell.theme-bruja .store-payment-logo-img.stripe {
        width: 90px !important;
    }
}

/* 2026-06-27: overrides finales tras reglas historicas. */
.client-modern-page .client-main-form .client-type-field {
    grid-template-columns: 48px 220px !important;
    gap: 0 8px !important;
    max-width: 282px !important;
}

.client-modern-page .client-main-form .client-type-field > label {
    width: 48px !important;
}

.client-modern-page .client-main-form .client-type-field .dxbl-combobox,
.client-modern-page .client-main-form .client-type-field .dxbl-input-group,
.client-modern-page .client-main-form .client-type-field dxbl-combo-box {
    width: 220px !important;
    max-width: 220px !important;
}

.supplier-modern-page .supplier-contact-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 26px !important;
}

.supplier-modern-page .supplier-contact-form .sap-field {
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 10px !important;
}

.supplier-modern-page .supplier-contact-form .sap-field-phone {
    grid-column: span 4 !important;
    max-width: 380px !important;
}

.supplier-modern-page .supplier-contact-form .sap-field-line {
    grid-column: span 6 !important;
    max-width: 640px !important;
}

.line-editor-popup .dxbl-popup,
.line-editor-popup .dxbl-popup-root,
.line-editor-popup .dxbl-popup-content {
    width: min(860px, 96vw) !important;
    max-width: 96vw !important;
}

.line-editor-form .product-picker-rate-field,
.product-picker-selected .product-picker-rate-field {
    grid-column: span 4 !important;
    min-width: 260px !important;
}

.line-editor-form .product-picker-rate-field .dxbl-combobox,
.line-editor-form .product-picker-rate-field .dxbl-input-group,
.line-editor-form .product-picker-rate-field dxbl-combo-box,
.product-picker-selected .product-picker-rate-field .dxbl-combobox,
.product-picker-selected .product-picker-rate-field .dxbl-input-group,
.product-picker-selected .product-picker-rate-field dxbl-combo-box {
    width: 100% !important;
    min-width: 260px !important;
}

.line-editor-form .product-picker-warehouse-field {
    grid-column: span 6 !important;
}

.mailing-recipient-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mailing-recipient-actions .dx-check-line {
    min-height: 32px;
    align-items: center;
    gap: 8px;
}

@media (max-width: 760px) {
    .client-modern-page .client-main-form .client-type-field {
        grid-template-columns: 110px minmax(0, 1fr) !important;
        max-width: none !important;
    }

    .client-modern-page .client-main-form .client-type-field > label {
        width: auto !important;
    }

    .client-modern-page .client-main-form .client-type-field .dxbl-combobox,
    .client-modern-page .client-main-form .client-type-field .dxbl-input-group,
    .client-modern-page .client-main-form .client-type-field dxbl-combo-box,
    .line-editor-form .product-picker-rate-field .dxbl-combobox,
    .line-editor-form .product-picker-rate-field .dxbl-input-group,
    .line-editor-form .product-picker-rate-field dxbl-combo-box,
    .product-picker-selected .product-picker-rate-field .dxbl-combobox,
    .product-picker-selected .product-picker-rate-field .dxbl-input-group,
    .product-picker-selected .product-picker-rate-field dxbl-combo-box {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .line-editor-form .product-picker-rate-field,
    .product-picker-selected .product-picker-rate-field,
    .line-editor-form .product-picker-warehouse-field,
    .supplier-modern-page .supplier-contact-form .sap-field-phone,
    .supplier-modern-page .supplier-contact-form .sap-field-line {
        grid-column: 1 / -1 !important;
        max-width: none !important;
        min-width: 0 !important;
    }
}

/* 2026-06-27: ajustes finales de formularios y popups comerciales. */
.client-modern-page .client-main-form .client-type-field {
    grid-template-columns: 48px 220px !important;
    gap: 0 8px !important;
    max-width: 282px !important;
}

.client-modern-page .client-main-form .client-type-field > label {
    width: 48px !important;
}

.client-modern-page .client-main-form .client-type-field .dxbl-combobox,
.client-modern-page .client-main-form .client-type-field .dxbl-input-group {
    width: 220px !important;
    max-width: 220px !important;
}

.supplier-modern-page .supplier-contact-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 26px !important;
}

.supplier-modern-page .supplier-contact-form .sap-field {
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 10px !important;
}

.supplier-modern-page .supplier-contact-form .sap-field-phone {
    grid-column: span 4 !important;
    max-width: 380px !important;
}

.supplier-modern-page .supplier-contact-form .sap-field-line {
    grid-column: span 6 !important;
    max-width: 640px !important;
}

.line-editor-popup .dxbl-popup,
.line-editor-popup .dxbl-popup-root,
.line-editor-popup .dxbl-popup-content {
    width: min(860px, 96vw) !important;
    max-width: 96vw !important;
}

.line-editor-form .product-picker-rate-field,
.product-picker-selected .product-picker-rate-field {
    grid-column: span 4 !important;
    min-width: 260px !important;
}

.line-editor-form .product-picker-rate-field .dxbl-combobox,
.line-editor-form .product-picker-rate-field .dxbl-input-group,
.product-picker-selected .product-picker-rate-field .dxbl-combobox,
.product-picker-selected .product-picker-rate-field .dxbl-input-group {
    width: 100% !important;
    min-width: 260px !important;
}

.line-editor-form .product-picker-warehouse-field {
    grid-column: span 6 !important;
}

.mailing-recipient-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mailing-recipient-actions .dx-check-line {
    min-height: 32px;
    align-items: center;
    gap: 8px;
}

@media (max-width: 760px) {
    .client-modern-page .client-main-form .client-type-field {
        grid-template-columns: 110px minmax(0, 1fr) !important;
        max-width: none !important;
    }

    .client-modern-page .client-main-form .client-type-field > label {
        width: auto !important;
    }

    .client-modern-page .client-main-form .client-type-field .dxbl-combobox,
    .client-modern-page .client-main-form .client-type-field .dxbl-input-group,
    .line-editor-form .product-picker-rate-field .dxbl-combobox,
    .line-editor-form .product-picker-rate-field .dxbl-input-group,
    .product-picker-selected .product-picker-rate-field .dxbl-combobox,
    .product-picker-selected .product-picker-rate-field .dxbl-input-group {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .line-editor-form .product-picker-rate-field,
    .product-picker-selected .product-picker-rate-field,
    .line-editor-form .product-picker-warehouse-field,
    .supplier-modern-page .supplier-contact-form .sap-field-phone,
    .supplier-modern-page .supplier-contact-form .sap-field-line {
        grid-column: 1 / -1 !important;
        max-width: none !important;
        min-width: 0 !important;
    }
}

/* 2026-06-27: medidas semanticas comunes de formularios ERP.
   Objetivo: que Pais, Provincia, CP, telefono, email, codigos y DNI/CIF
   tengan una escala coherente entre clientes, proveedores y comerciales. */
:root {
    --erp-field-code: 300px;
    --erp-field-tax: 330px;
    --erp-field-country: 360px;
    --erp-field-province: 360px;
    --erp-field-city: 390px;
    --erp-field-postal: 250px;
    --erp-field-address: 760px;
    --erp-field-phone: 330px;
    --erp-field-email: 520px;
    --erp-field-trade-name: 620px;
}

.client-modern-page .client-main-form .sap-field-code,
.supplier-modern-page .supplier-main-form .sap-field-code,
.commercial-agent-page .commercial-agent-code-field {
    max-width: var(--erp-field-code) !important;
}

.client-modern-page .client-main-form .client-tax-field,
.supplier-modern-page .supplier-tax-field,
.commercial-agent-page .commercial-agent-tax-field {
    max-width: var(--erp-field-tax) !important;
}

.supplier-modern-page .supplier-address-form .supplier-country-field,
.commercial-agent-page .commercial-agent-tab-form .commercial-agent-place-field:nth-child(1) {
    grid-column: span 4 !important;
    max-width: var(--erp-field-country) !important;
}

.supplier-modern-page .supplier-address-form .supplier-province-field,
.commercial-agent-page .commercial-agent-tab-form .commercial-agent-place-field:nth-child(2) {
    grid-column: span 4 !important;
    max-width: var(--erp-field-province) !important;
}

.supplier-modern-page .supplier-address-form .supplier-city-field,
.commercial-agent-page .commercial-agent-tab-form .commercial-agent-place-field:nth-child(3) {
    grid-column: span 5 !important;
    max-width: var(--erp-field-city) !important;
}

.supplier-modern-page .supplier-address-form .sap-field-cp,
.commercial-agent-page .commercial-agent-cp-field {
    grid-column: span 3 !important;
    max-width: var(--erp-field-postal) !important;
}

.supplier-modern-page .supplier-address-form .supplier-street-field,
.commercial-agent-page .commercial-agent-address-field {
    grid-column: span 8 !important;
    max-width: var(--erp-field-address) !important;
}

.supplier-modern-page .supplier-contact-form .sap-field-phone,
.commercial-agent-page .commercial-agent-phone-field {
    grid-column: span 4 !important;
    max-width: var(--erp-field-phone) !important;
}

.supplier-modern-page .supplier-contact-form .sap-field-line,
.commercial-agent-page .commercial-agent-email-field {
    grid-column: span 7 !important;
    max-width: var(--erp-field-email) !important;
}

.client-modern-page .client-main-form .client-trade-field,
.supplier-modern-page .supplier-trade-field,
.commercial-agent-page .commercial-agent-trade-field {
    max-width: var(--erp-field-trade-name) !important;
}

@media (max-width: 900px) {
    .client-modern-page .client-main-form .sap-field-code,
    .client-modern-page .client-main-form .client-tax-field,
    .client-modern-page .client-main-form .client-trade-field,
    .supplier-modern-page .supplier-main-form .sap-field-code,
    .supplier-modern-page .supplier-tax-field,
    .supplier-modern-page .supplier-trade-field,
    .supplier-modern-page .supplier-address-form .supplier-country-field,
    .supplier-modern-page .supplier-address-form .supplier-province-field,
    .supplier-modern-page .supplier-address-form .supplier-city-field,
    .supplier-modern-page .supplier-address-form .supplier-street-field,
    .supplier-modern-page .supplier-address-form .sap-field-cp,
    .supplier-modern-page .supplier-contact-form .sap-field-phone,
    .supplier-modern-page .supplier-contact-form .sap-field-line,
    .commercial-agent-page .commercial-agent-code-field,
    .commercial-agent-page .commercial-agent-tax-field,
    .commercial-agent-page .commercial-agent-trade-field,
    .commercial-agent-page .commercial-agent-place-field,
    .commercial-agent-page .commercial-agent-address-field,
    .commercial-agent-page .commercial-agent-cp-field,
    .commercial-agent-page .commercial-agent-phone-field,
    .commercial-agent-page .commercial-agent-email-field {
        grid-column: 1 / -1 !important;
        max-width: none !important;
        width: 100% !important;
    }
}

/* FINAL OVERRIDE 20260626: comerciales y mailing, sin compactar de mas. */
.commercial-agent-page .commercial-agent-main-form,
.commercial-agent-page .commercial-agent-tab-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 28px !important;
    align-items: center !important;
}

.commercial-agent-page .sap-field {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    min-width: 0 !important;
}

.commercial-agent-page .sap-field > label {
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.commercial-agent-page .commercial-agent-code-field,
.commercial-agent-page .commercial-agent-type-field {
    grid-column: span 4 !important;
    grid-row: 1 !important;
    max-width: 430px !important;
}

.commercial-agent-page .commercial-agent-name-field,
.commercial-agent-page .commercial-agent-surname-field {
    grid-column: span 6 !important;
    grid-row: 2 !important;
}

.commercial-agent-page .commercial-agent-tax-field {
    grid-column: span 4 !important;
    grid-row: 3 !important;
    max-width: 360px !important;
}

.commercial-agent-page .commercial-agent-trade-field {
    grid-column: span 6 !important;
    grid-row: 4 !important;
    max-width: none !important;
}

.commercial-agent-page .commercial-agent-address-field {
    grid-column: span 8 !important;
    max-width: 860px !important;
}

.commercial-agent-page .commercial-agent-place-field,
.commercial-agent-page .commercial-agent-phone-field {
    grid-column: span 6 !important;
}

.commercial-agent-page .commercial-agent-email-field {
    grid-column: span 8 !important;
}

.commercial-agent-page .commercial-agent-cp-field {
    grid-column: span 3 !important;
    max-width: 300px !important;
}

.commercial-agent-page .commercial-agent-percent-field {
    grid-column: span 3 !important;
    max-width: 300px !important;
}

.commercial-agent-page .commercial-agent-status-field {
    grid-column: span 3 !important;
    max-width: 220px !important;
    margin-left: -14px !important;
}

.commercial-agent-page .commercial-agent-status-field .dxbl-checkbox {
    min-height: 32px !important;
}

.commercial-agent-page .commercial-agent-notes-field {
    grid-column: 1 / span 9 !important;
    align-items: start !important;
}

.commercial-agent-page .commercial-agent-notes-field > label {
    padding-top: 6px !important;
}

.commercial-agent-page input,
.commercial-agent-page .dxbl-text-edit,
.commercial-agent-page .dxbl-combobox,
.commercial-agent-page .dxbl-input-group {
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 3px !important;
}

.commercial-agent-page textarea {
    min-height: 160px !important;
    height: 160px !important;
    border-radius: 3px !important;
    resize: vertical !important;
}

.mailing-pro-panel .mailing-controls-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 26px !important;
    align-items: center !important;
}

.mailing-pro-panel .mailing-controls-form .sap-field {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    min-width: 0 !important;
}

.mailing-subject-field {
    grid-column: span 7 !important;
}

.mailing-mode-field {
    grid-column: span 5 !important;
}

.mailing-group-field {
    grid-column: span 5 !important;
}

.mailing-test-field {
    grid-column: span 6 !important;
}

.mailing-max-field {
    grid-column: span 3 !important;
    max-width: 320px !important;
}

.mailing-html-editor {
    min-height: 560px !important;
}

.mailing-preview {
    width: 100% !important;
    min-height: 560px !important;
    border: 1px solid #d8dee8 !important;
    border-radius: 3px !important;
    background: #fff !important;
}

@media (max-width: 900px) {
    .commercial-agent-page .commercial-agent-main-form,
    .commercial-agent-page .commercial-agent-tab-form,
    .mailing-pro-panel .mailing-controls-form {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .commercial-agent-page .sap-field,
    .commercial-agent-page .commercial-agent-code-field,
    .commercial-agent-page .commercial-agent-type-field,
    .commercial-agent-page .commercial-agent-name-field,
    .commercial-agent-page .commercial-agent-surname-field,
    .commercial-agent-page .commercial-agent-trade-field,
    .commercial-agent-page .commercial-agent-tax-field,
    .commercial-agent-page .commercial-agent-address-field,
    .commercial-agent-page .commercial-agent-place-field,
    .commercial-agent-page .commercial-agent-phone-field,
    .commercial-agent-page .commercial-agent-email-field,
    .commercial-agent-page .commercial-agent-cp-field,
    .commercial-agent-page .commercial-agent-percent-field,
    .commercial-agent-page .commercial-agent-status-field,
    .commercial-agent-page .commercial-agent-notes-field,
    .mailing-pro-panel .mailing-controls-form .sap-field,
    .mailing-subject-field,
    .mailing-mode-field,
    .mailing-group-field,
    .mailing-test-field,
    .mailing-max-field {
        grid-column: 1 / -1 !important;
        max-width: none !important;
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* 20260626 hard stop: clientes y marcas. Estas reglas van al final para que no las pisen intentos anteriores. */
.client-modern-page .client-main-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 28px !important;
    align-items: center !important;
}

.client-modern-page .client-main-form .sap-field {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
}

.client-modern-page .client-main-form .sap-field > label {
    color: #526173 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.client-modern-page .client-main-form .sap-field > :not(label) {
    min-width: 0 !important;
}

.client-modern-page .client-main-form .sap-field-code {
    grid-column: 1 / span 4 !important;
    grid-row: 1 !important;
}

.client-modern-page .client-main-form .client-type-field {
    grid-column: 5 / span 4 !important;
    grid-row: 1 !important;
}

.client-modern-page .client-main-form .client-name-field {
    grid-column: 1 / span 6 !important;
    grid-row: 2 !important;
}

.client-modern-page .client-main-form .client-surname-field {
    grid-column: 7 / span 6 !important;
    grid-row: 2 !important;
}

.client-modern-page .client-main-form .client-tax-field {
    grid-column: 1 / span 5 !important;
    grid-row: 3 !important;
}

.client-modern-page .client-main-form .client-trade-field {
    grid-column: 1 / span 8 !important;
    grid-row: 4 !important;
}

.client-modern-page .client-main-form .dxbl-text-edit,
.client-modern-page .client-main-form .dxbl-combobox,
.client-modern-page .client-main-form .dxbl-input-group {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 3px !important;
}

.client-modern-page .client-main-form .sap-field-code .dxbl-text-edit,
.client-modern-page .client-main-form .sap-field-code input {
    max-width: 160px !important;
}

.client-modern-page .client-main-form .client-type-field .dxbl-combobox,
.client-modern-page .client-main-form .client-type-field .dxbl-input-group {
    max-width: 220px !important;
}

.client-modern-page .client-main-form .client-tax-field .dxbl-text-edit,
.client-modern-page .client-main-form .client-tax-field input {
    max-width: 260px !important;
}

.master-editor-marcas {
    width: min(900px, calc(100vw - 48px)) !important;
    max-width: calc(100vw - 48px) !important;
}

.master-editor-marcas .dxbl-modal-content,
.master-editor-marcas .dxbl-popup-content,
.master-editor-marcas .dxbl-modal-body,
.master-editor-marcas .dxbl-popup-body,
.master-editor-marcas .master-editor-shell,
.master-editor-marcas .master-editor-card-clean {
    overflow: hidden !important;
}

.master-editor-marcas .dxbl-modal-body,
.master-editor-marcas .dxbl-popup-body {
    max-height: none !important;
    padding: 12px 18px !important;
}

.master-editor-marcas .master-editor-card-clean {
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

.master-editor-marcas .master-inline-actions,
.master-editor-marcas .erp-form-note {
    display: none !important;
}

.master-editor-marcas .master-sap-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 22px !important;
    align-items: center !important;
}

.master-editor-marcas .master-sap-form .sap-field {
    display: grid !important;
    grid-template-columns: 95px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
}

.master-editor-marcas .master-sap-form .sap-field > label {
    color: #526173 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.master-editor-marcas .master-field-codigo {
    order: 1 !important;
    grid-column: 1 / span 4 !important;
}

.master-editor-marcas .master-field-nombre {
    order: 2 !important;
    grid-column: 5 / span 8 !important;
}

.master-editor-marcas .master-field-enweb {
    order: 3 !important;
    grid-column: 1 / span 4 !important;
}

.master-editor-marcas .master-field-imagen {
    order: 4 !important;
    grid-column: 1 / -1 !important;
}

.master-editor-marcas .master-field-comentario {
    order: 5 !important;
    grid-column: 1 / -1 !important;
    align-items: start !important;
}

.master-editor-marcas .master-field-comentario > label {
    padding-top: 6px !important;
}

.master-editor-marcas .master-field-comentario .dxbl-memo,
.master-editor-marcas .master-field-comentario .dxbl-memo-edit,
.master-editor-marcas .master-field-comentario textarea,
.master-editor-marcas .master-field-comentario .dxbl-memo textarea {
    min-height: 96px !important;
    height: 96px !important;
    max-height: 96px !important;
}

.master-editor-marcas .master-field-imagen .media-picker {
    min-width: 0 !important;
    max-width: 100% !important;
}

.master-editor-marcas .master-field-imagen .media-picker-preview {
    max-width: 160px !important;
    max-height: 120px !important;
}

.master-editor-marcas .master-field-enweb .dx-check-line {
    min-height: 32px !important;
    max-width: 180px !important;
    align-items: center !important;
}

@media (max-width: 720px) {
    .client-modern-page .client-main-form {
        grid-template-columns: 1fr !important;
    }

    .client-modern-page .client-main-form .sap-field,
    .client-modern-page .client-main-form .sap-field-code,
    .client-modern-page .client-main-form .client-type-field,
    .client-modern-page .client-main-form .client-name-field,
    .client-modern-page .client-main-form .client-surname-field,
    .client-modern-page .client-main-form .client-tax-field,
    .client-modern-page .client-main-form .client-trade-field,
    .master-editor-marcas .master-field-codigo,
    .master-editor-marcas .master-field-nombre,
    .master-editor-marcas .master-field-enweb,
    .master-editor-marcas .master-field-imagen,
    .master-editor-marcas .master-field-comentario {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        width: 100% !important;
        max-width: none !important;
    }

    .client-modern-page .client-main-form .sap-field,
    .master-editor-marcas .master-sap-form .sap-field {
        grid-template-columns: 92px minmax(0, 1fr) !important;
    }
}

/* 20260626 comerciales + mailing: ajuste final sobre las pantallas reales. */
.commercial-agent-page .commercial-agent-main-form,
.commercial-agent-page .commercial-agent-tab-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 28px !important;
    align-items: center !important;
}

.commercial-agent-page .sap-field {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
}

.commercial-agent-page .sap-field > label {
    color: #526173 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.commercial-agent-page .commercial-agent-code-field {
    grid-column: 1 / span 4 !important;
    grid-row: 1 !important;
}

.commercial-agent-page .commercial-agent-type-field {
    grid-column: 5 / span 4 !important;
    grid-row: 1 !important;
}

.commercial-agent-page .commercial-agent-name-field {
    grid-column: 1 / span 6 !important;
    grid-row: 2 !important;
}

.commercial-agent-page .commercial-agent-surname-field {
    grid-column: 7 / span 6 !important;
    grid-row: 2 !important;
}

.commercial-agent-page .commercial-agent-tax-field {
    grid-column: 1 / span 5 !important;
    grid-row: 3 !important;
}

.commercial-agent-page .commercial-agent-trade-field {
    grid-column: 1 / span 6 !important;
    grid-row: 4 !important;
}

.commercial-agent-page .commercial-agent-address-field {
    grid-column: 1 / span 8 !important;
}

.commercial-agent-page .commercial-agent-place-field {
    grid-column: span 6 !important;
}

.commercial-agent-page .commercial-agent-cp-field {
    grid-column: span 4 !important;
    max-width: 320px !important;
}

.commercial-agent-page .commercial-agent-percent-field,
.commercial-agent-page .commercial-agent-status-field {
    grid-column: span 4 !important;
    max-width: 360px !important;
}

.commercial-agent-page .commercial-agent-status-field {
    margin-left: -18px !important;
}

.commercial-agent-page .commercial-agent-status-field .dxbl-checkbox,
.commercial-agent-page .commercial-agent-status-field .dx-check-line {
    min-width: 0 !important;
    max-width: 150px !important;
}

.commercial-agent-page .commercial-agent-notes-field {
    grid-column: 1 / span 10 !important;
    align-items: start !important;
}

.commercial-agent-page .commercial-agent-notes-field > label {
    padding-top: 6px !important;
}

.commercial-agent-page .commercial-agent-notes-field textarea {
    min-height: 160px !important;
    height: 160px !important;
}

.commercial-agent-page .commercial-agent-main-form .dxbl-text-edit,
.commercial-agent-page .commercial-agent-main-form .dxbl-combobox,
.commercial-agent-page .commercial-agent-main-form .dxbl-input-group,
.commercial-agent-page .commercial-agent-tab-form .dxbl-text-edit,
.commercial-agent-page .commercial-agent-tab-form .dxbl-combobox,
.commercial-agent-page .commercial-agent-tab-form .dxbl-input-group,
.commercial-agent-page .commercial-agent-main-form input,
.commercial-agent-page .commercial-agent-tab-form input {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 3px !important;
}

.commercial-agent-page .commercial-agent-code-field input,
.commercial-agent-page .commercial-agent-type-field input,
.commercial-agent-page .commercial-agent-tax-field input,
.commercial-agent-page .commercial-agent-cp-field input {
    max-width: 260px !important;
}

.mailing-pro-panel {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.mailing-controls-card,
.mailing-editor-card {
    margin-top: 16px !important;
}

.mailing-controls-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 24px !important;
    align-items: center !important;
}

.mailing-controls-form .sap-field {
    display: grid !important;
    grid-template-columns: 105px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    margin: 0 !important;
}

.mailing-controls-form .sap-field > label {
    color: #526173 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    text-align: left !important;
}

.mailing-subject-field {
    grid-column: span 7 !important;
}

.mailing-mode-field,
.mailing-group-field {
    grid-column: span 5 !important;
}

.mailing-test-field {
    grid-column: span 6 !important;
}

.mailing-max-field {
    grid-column: span 3 !important;
    max-width: 300px !important;
}

.mailing-html-editor {
    min-height: 560px !important;
}

.mailing-html-editor .dxbl-html-editor,
.mailing-html-editor .dxbl-htmleditor,
.mailing-html-editor iframe {
    min-height: 520px !important;
}

.mailing-tabs .dxbl-tabs-content-panel {
    padding-top: 16px !important;
}

.mailing-preview {
    width: 100% !important;
    min-height: 560px !important;
    border: 1px solid #d3dbe8 !important;
    border-radius: 3px !important;
    background: #fff !important;
}

.mailing-recipients-head {
    margin-bottom: 12px !important;
}

@media (max-width: 900px) {
    .commercial-agent-page .commercial-agent-main-form,
    .commercial-agent-page .commercial-agent-tab-form,
    .mailing-controls-form {
        grid-template-columns: 1fr !important;
    }

    .commercial-agent-page .sap-field,
    .commercial-agent-page .commercial-agent-code-field,
    .commercial-agent-page .commercial-agent-type-field,
    .commercial-agent-page .commercial-agent-name-field,
    .commercial-agent-page .commercial-agent-surname-field,
    .commercial-agent-page .commercial-agent-tax-field,
    .commercial-agent-page .commercial-agent-trade-field,
    .commercial-agent-page .commercial-agent-address-field,
    .commercial-agent-page .commercial-agent-place-field,
    .commercial-agent-page .commercial-agent-cp-field,
    .commercial-agent-page .commercial-agent-percent-field,
    .commercial-agent-page .commercial-agent-status-field,
    .commercial-agent-page .commercial-agent-notes-field,
    .mailing-controls-form .sap-field,
    .mailing-subject-field,
    .mailing-mode-field,
    .mailing-group-field,
    .mailing-test-field,
    .mailing-max-field {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
    }

    .commercial-agent-page .sap-field,
    .mailing-controls-form .sap-field {
        grid-template-columns: 96px minmax(0, 1fr) !important;
    }
}

/* 20260626 definitivo: no compactar clientes/comerciales, filas pedidas por Jose. */
.client-modern-page .client-main-form,
.commercial-agent-page .commercial-agent-main-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    column-gap: 28px !important;
    row-gap: 14px !important;
    align-items: center !important;
}

.client-modern-page .client-main-form .sap-field,
.commercial-agent-page .commercial-agent-main-form .sap-field {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    column-gap: 10px !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: none !important;
}

.client-modern-page .client-main-form .sap-field > label,
.commercial-agent-page .commercial-agent-main-form .sap-field > label {
    color: #526173 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.client-modern-page .client-main-form .sap-field-code,
.commercial-agent-page .commercial-agent-main-form .commercial-agent-code-field {
    grid-column: 1 / span 6 !important;
}

.client-modern-page .client-main-form .client-type-field,
.commercial-agent-page .commercial-agent-main-form .commercial-agent-type-field {
    grid-column: 7 / span 6 !important;
}

.client-modern-page .client-main-form .client-name-field,
.commercial-agent-page .commercial-agent-main-form .commercial-agent-name-field {
    grid-column: 1 / span 6 !important;
}

.client-modern-page .client-main-form .client-surname-field,
.commercial-agent-page .commercial-agent-main-form .commercial-agent-surname-field {
    grid-column: 7 / span 6 !important;
}

.client-modern-page .client-main-form .client-tax-field,
.commercial-agent-page .commercial-agent-main-form .commercial-agent-tax-field {
    grid-column: 1 / span 6 !important;
}

.client-modern-page .client-main-form .client-trade-field,
.commercial-agent-page .commercial-agent-main-form .commercial-agent-trade-field {
    grid-column: 1 / span 8 !important;
}

.client-modern-page .client-main-form .dxbl-text-edit,
.client-modern-page .client-main-form .dxbl-combobox,
.client-modern-page .client-main-form .dxbl-input-group,
.commercial-agent-page .commercial-agent-main-form input,
.commercial-agent-page .commercial-agent-main-form .dxbl-text-edit,
.commercial-agent-page .commercial-agent-main-form .dxbl-combobox,
.commercial-agent-page .commercial-agent-main-form .dxbl-input-group {
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 3px !important;
}

.commercial-agent-page .commercial-agent-tab-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    column-gap: 28px !important;
    row-gap: 14px !important;
    align-items: center !important;
}

.commercial-agent-page .commercial-agent-tab-form .sap-field {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    column-gap: 10px !important;
    align-items: center !important;
    min-width: 0 !important;
}

.commercial-agent-page .commercial-agent-address-field,
.commercial-agent-page .commercial-agent-notes-field {
    grid-column: 1 / -1 !important;
}

.commercial-agent-page .commercial-agent-place-field,
.commercial-agent-page .commercial-agent-phone-field,
.commercial-agent-page .commercial-agent-email-field {
    grid-column: span 6 !important;
}

.commercial-agent-page .commercial-agent-cp-field,
.commercial-agent-page .commercial-agent-percent-field,
.commercial-agent-page .commercial-agent-status-field {
    grid-column: span 4 !important;
}

.commercial-agent-page .commercial-agent-notes-field textarea {
    min-height: 180px !important;
    height: 180px !important;
}

/* Marcas en pagina: fuera del popup, con lectura de formulario ERP y subida de imagen. */
.master-list-page .master-inline-editor-page {
    background: #fff !important;
    border: 1px solid #cfd6df !important;
    border-radius: 3px !important;
    margin-top: 18px !important;
}

.master-list-page .master-inline-editor-page .master-inline-sap-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    column-gap: 28px !important;
    row-gap: 14px !important;
}

.master-list-page .master-inline-editor-page .sap-field {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    column-gap: 10px !important;
    align-items: center !important;
    grid-column: 1 / span 8 !important;
}

.master-list-page .master-inline-editor-page .sap-field > label {
    color: #526173 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    text-align: left !important;
}

.master-list-page .master-inline-editor-page .sap-field:has(textarea),
.master-list-page .master-inline-editor-page .sap-field.sap-field-full {
    grid-column: 1 / -1 !important;
    align-items: start !important;
}

.master-list-page .master-inline-editor-page .sap-field:has(textarea) > label {
    padding-top: 6px !important;
}

.master-list-page .master-inline-editor-page textarea,
.master-list-page .master-inline-editor-page .dxbl-memo textarea {
    min-height: 180px !important;
}

.master-list-page .master-inline-editor-page .media-picker,
.master-list-page .master-inline-editor-page .media-picker-root {
    max-width: 760px !important;
}

@media (max-width: 900px) {
    .client-modern-page .client-main-form,
    .commercial-agent-page .commercial-agent-main-form,
    .commercial-agent-page .commercial-agent-tab-form,
    .master-list-page .master-inline-editor-page .master-inline-sap-form {
        grid-template-columns: 1fr !important;
        row-gap: 12px !important;
    }

    .client-modern-page .client-main-form .sap-field,
    .commercial-agent-page .commercial-agent-main-form .sap-field,
    .commercial-agent-page .commercial-agent-tab-form .sap-field,
    .master-list-page .master-inline-editor-page .sap-field,
    .client-modern-page .client-main-form .sap-field-code,
    .client-modern-page .client-main-form .client-type-field,
    .client-modern-page .client-main-form .client-name-field,
    .client-modern-page .client-main-form .client-surname-field,
    .client-modern-page .client-main-form .client-tax-field,
    .client-modern-page .client-main-form .client-trade-field,
    .commercial-agent-page .commercial-agent-main-form .commercial-agent-code-field,
    .commercial-agent-page .commercial-agent-main-form .commercial-agent-type-field,
    .commercial-agent-page .commercial-agent-main-form .commercial-agent-name-field,
    .commercial-agent-page .commercial-agent-main-form .commercial-agent-surname-field,
    .commercial-agent-page .commercial-agent-main-form .commercial-agent-tax-field,
    .commercial-agent-page .commercial-agent-main-form .commercial-agent-trade-field {
        grid-column: 1 / -1 !important;
        max-width: none !important;
        width: 100% !important;
    }

    .client-page-header .header-actions,
    .commercial-agent-header .header-actions {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
}

/* Orden definitivo solicitado: clientes y comerciales. No compactar metiendo campos en huecos sobrantes. */
.client-modern-page .client-main-form .sap-field-code {
    grid-column: 1 / span 4 !important;
    max-width: 360px !important;
}

.client-modern-page .client-main-form .client-type-field {
    grid-column: 5 / span 4 !important;
    max-width: 360px !important;
}

.client-modern-page .client-main-form .client-name-field {
    grid-column: 1 / span 6 !important;
}

.client-modern-page .client-main-form .client-surname-field {
    grid-column: 7 / span 6 !important;
}

.client-modern-page .client-main-form .client-tax-field {
    grid-column: 1 / span 6 !important;
    max-width: 520px !important;
}

.client-modern-page .client-main-form .client-trade-field {
    grid-column: 1 / span 8 !important;
}

.client-modern-page .client-main-form .client-type-field .dxbl-combobox,
.client-modern-page .client-main-form .client-type-field .dxbl-input-group {
    min-width: 190px !important;
}

.commercial-agent-page .commercial-agent-code-field {
    grid-column: 1 / span 6 !important;
    max-width: 520px !important;
}

.commercial-agent-page .commercial-agent-name-field {
    grid-column: 1 / span 6 !important;
}

.commercial-agent-page .commercial-agent-surname-field {
    grid-column: 7 / span 6 !important;
}

.commercial-agent-page .commercial-agent-trade-field {
    grid-column: 1 / span 6 !important;
}

.commercial-agent-page .commercial-agent-tax-field {
    grid-column: 7 / span 4 !important;
    max-width: 420px !important;
}

.commercial-agent-page .commercial-agent-address-field {
    grid-column: 1 / -1 !important;
}

.commercial-agent-page .commercial-agent-place-field {
    grid-column: span 6 !important;
}

.commercial-agent-page .commercial-agent-cp-field {
    grid-column: span 4 !important;
    max-width: 360px !important;
}

.commercial-agent-page .commercial-agent-notes-field {
    grid-column: 1 / -1 !important;
}

.commercial-agent-page .commercial-agent-notes-field textarea {
    min-height: 180px !important;
}

@media (max-width: 900px) {
    .client-modern-page .client-main-form .sap-field-code,
    .client-modern-page .client-main-form .client-type-field,
    .client-modern-page .client-main-form .client-name-field,
    .client-modern-page .client-main-form .client-surname-field,
    .client-modern-page .client-main-form .client-tax-field,
    .client-modern-page .client-main-form .client-trade-field,
    .commercial-agent-page .commercial-agent-code-field,
    .commercial-agent-page .commercial-agent-name-field,
    .commercial-agent-page .commercial-agent-surname-field,
    .commercial-agent-page .commercial-agent-trade-field,
    .commercial-agent-page .commercial-agent-tax-field,
    .commercial-agent-page .commercial-agent-place-field,
    .commercial-agent-page .commercial-agent-cp-field {
        grid-column: 1 / -1 !important;
        max-width: none !important;
    }
}

/* 2026-06-25: cierre real. El catalogo no se acota; solo flujos privados/checkout. */
.storefront-shell:not(.theme-bruja) .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: clamp(14px, 2.6vw, 54px) !important;
}

.storefront-shell:not(.theme-bruja) .storefront-content:has(.store-checkout-shell),
.storefront-shell:not(.theme-bruja) .storefront-content:has(.store-account-shell),
.storefront-shell:not(.theme-bruja) .storefront-content:has(.store-account-login-card),
.storefront-shell:not(.theme-bruja) .storefront-content:has(.store-register-shell) {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
    padding-inline: 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-category-layout,
.storefront-shell:not(.theme-bruja) .store-catalog-layout,
.storefront-shell:not(.theme-bruja) .store-listing-layout,
.storefront-shell:not(.theme-bruja) .store-product-grid,
.storefront-shell:not(.theme-bruja) .store-product-detail,
.storefront-shell:not(.theme-bruja) .store-page-shell {
    max-width: none !important;
}

/* 2026-06-25: ajuste final tienda. Catalogo full width; checkout y cuenta contenidos. */
.storefront-shell:not(.theme-bruja) .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-shell,
.storefront-shell:not(.theme-bruja) .store-account-shell,
.storefront-shell:not(.theme-bruja) .store-register-shell,
.storefront-shell:not(.theme-bruja) .store-account-empty {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-search-form button,
.storefront-shell:not(.theme-bruja) .storefront-search button,
.storefront-shell:not(.theme-bruja) .store-search-submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-card,
.storefront-shell:not(.theme-bruja) .store-cart-line,
.storefront-shell:not(.theme-bruja) .store-cart-summary,
.storefront-shell:not(.theme-bruja) .store-payment-form,
.storefront-shell:not(.theme-bruja) .store-address-card,
.storefront-shell:not(.theme-bruja) .store-account-panel,
.storefront-shell:not(.theme-bruja) .store-account-tabs {
    border-radius: 5px !important;
    border-color: #c8d8e6 !important;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .05) !important;
}

.storefront-shell:not(.theme-bruja) .store-cart-summary,
.storefront-shell:not(.theme-bruja) .store-checkout-card {
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-cart-coupon button,
.storefront-shell:not(.theme-bruja) .store-cart-summary .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-payment-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-address-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-account-form .store-action-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    border-radius: 5px !important;
    color: #fff !important;
    line-height: 1 !important;
}

.storefront-shell:not(.theme-bruja) .store-cart-summary .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-payment-form .store-action-primary {
    width: min(100%, 260px) !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-cart-coupon {
    align-items: stretch !important;
}

.storefront-shell:not(.theme-bruja) .store-cart-coupon input {
    min-height: 44px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods,
.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list {
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method,
.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method {
    grid-template-columns: 26px minmax(0, 1fr) 190px !important;
    min-height: 92px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-text strong {
    font-size: 1.05rem !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-text small {
    display: block !important;
    margin-top: 2px !important;
    color: #475467 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-logo {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel > .store-account-form {
    max-width: 760px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
.storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
    grid-template-columns: 130px minmax(0, 1fr) !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head > div:last-child,
.storefront-shell:not(.theme-bruja) .store-account-contact,
.storefront-shell:not(.theme-bruja) .store-account-kpis,
.storefront-shell:not(.theme-bruja) .store-account-panel-title span,
.storefront-shell:not(.theme-bruja) .store-company-check {
    display: none !important;
}

.storefront-shell:not(.theme-bruja) .store-address-new,
.storefront-shell:not(.theme-bruja) .store-action-success {
    background: #079455 !important;
    border-color: #079455 !important;
    color: #fff !important;
    border-radius: 5px !important;
}

@media (max-width: 900px) {
    .storefront-shell:not(.theme-bruja) .storefront-content {
        width: 100% !important;
        max-width: none !important;
        padding-inline: 12px !important;
    }

    .storefront-shell:not(.theme-bruja) .store-checkout-shell,
    .storefront-shell:not(.theme-bruja) .store-account-shell,
    .storefront-shell:not(.theme-bruja) .store-register-shell,
    .storefront-shell:not(.theme-bruja) .store-account-empty {
        width: 100% !important;
        max-width: 100% !important;
        padding-inline: 12px !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method,
    .storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method {
        grid-template-columns: 24px minmax(0, 1fr) !important;
    }
}

/* 2026-06-25: refuerzo por cliente, independiente del theme activo en BD. */
.storefront-shell.client-malagadive .storefront-content,
.storefront-shell.client-camposlorca .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.storefront-shell.client-malagadive .store-checkout-shell,
.storefront-shell.client-camposlorca .store-checkout-shell,
.storefront-shell.client-malagadive .store-account-shell,
.storefront-shell.client-camposlorca .store-account-shell {
    width: min(100% - 32px, 1000px) !important;
    max-width: 1000px !important;
    margin: 34px auto 56px !important;
}

.storefront-shell.client-malagadive .store-category-page,
.storefront-shell.client-camposlorca .store-category-page,
.storefront-shell.client-malagadive .store-product-page,
.storefront-shell.client-camposlorca .store-product-page,
.storefront-shell.client-malagadive .store-home,
.storefront-shell.client-camposlorca .store-home {
    width: 100% !important;
    max-width: none !important;
}

.storefront-shell.client-malagadive .store-cart-items,
.storefront-shell.client-malagadive .store-cart-summary,
.storefront-shell.client-malagadive .store-address-panel,
.storefront-shell.client-malagadive .store-payment-panel,
.storefront-shell.client-malagadive .store-order-summary,
.storefront-shell.client-malagadive .store-account-panel,
.storefront-shell.client-camposlorca .store-cart-items,
.storefront-shell.client-camposlorca .store-cart-summary,
.storefront-shell.client-camposlorca .store-address-panel,
.storefront-shell.client-camposlorca .store-payment-panel,
.storefront-shell.client-camposlorca .store-order-summary,
.storefront-shell.client-camposlorca .store-account-panel {
    background: #f8fbff !important;
    border: 1px solid #c8d8e6 !important;
    border-radius: 5px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06) !important;
}

.storefront-shell.client-malagadive .store-cart-summary button,
.storefront-shell.client-camposlorca .store-cart-summary button,
.storefront-shell.client-malagadive .store-coupon-row button,
.storefront-shell.client-camposlorca .store-coupon-row button,
.storefront-shell.client-malagadive .store-search-button,
.storefront-shell.client-camposlorca .store-search-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 44px !important;
    border-radius: 5px !important;
    line-height: 1 !important;
}

.storefront-shell.client-malagadive .store-cart-summary .store-action-primary,
.storefront-shell.client-camposlorca .store-cart-summary .store-action-primary,
.storefront-shell.client-malagadive .store-payment-panel .store-action-primary,
.storefront-shell.client-camposlorca .store-payment-panel .store-action-primary {
    background: var(--store-primary) !important;
    color: #fff !important;
    border-color: var(--store-primary) !important;
}

.storefront-shell.client-malagadive .store-account-head > div > span:last-child,
.storefront-shell.client-camposlorca .store-account-head > div > span:last-child {
    display: none !important;
}

/* 2026-06-24: separacion verificada entre catalogo full-width y flujos compactos. */
.storefront-shell.client-malagadive.theme-malagadive .storefront-content,
.storefront-shell.client-camposlorca.theme-camposlorca .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-home,
.storefront-shell.client-malagadive.theme-malagadive .store-category-page,
.storefront-shell.client-malagadive.theme-malagadive .store-product-page,
.storefront-shell.client-malagadive.theme-malagadive .store-page,
.storefront-shell.client-camposlorca.theme-camposlorca .store-home,
.storefront-shell.client-camposlorca.theme-camposlorca .store-category-page,
.storefront-shell.client-camposlorca.theme-camposlorca .store-product-page,
.storefront-shell.client-camposlorca.theme-camposlorca .store-page {
    width: 100% !important;
    max-width: none !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-checkout-shell,
.storefront-shell.client-malagadive.theme-malagadive .store-account-shell,
.storefront-shell.client-camposlorca.theme-camposlorca .store-checkout-shell,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-shell {
    width: min(100% - 32px, 1000px) !important;
    max-width: 1000px !important;
    margin: 34px auto 56px !important;
    padding-inline: 0 !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-layout,
.storefront-shell.client-malagadive.theme-malagadive .store-payment-layout,
.storefront-shell.client-camposlorca.theme-camposlorca .store-cart-layout,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 20px !important;
    align-items: start !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-line,
.storefront-shell.client-malagadive.theme-malagadive .store-cart-summary,
.storefront-shell.client-malagadive.theme-malagadive .store-payment-form,
.storefront-shell.client-malagadive.theme-malagadive .store-account-panel,
.storefront-shell.client-camposlorca.theme-camposlorca .store-cart-line,
.storefront-shell.client-camposlorca.theme-camposlorca .store-cart-summary,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-form,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-panel {
    border-radius: 5px !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-summary,
.storefront-shell.client-malagadive.theme-malagadive .store-payment-form,
.storefront-shell.client-malagadive.theme-malagadive .store-account-panel,
.storefront-shell.client-camposlorca.theme-camposlorca .store-cart-summary,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-form,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-panel {
    background: #fff !important;
    border: 1px solid var(--store-line) !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-checkout-shell .store-action-primary,
.storefront-shell.client-malagadive.theme-malagadive .store-account-shell .store-action-primary,
.storefront-shell.client-camposlorca.theme-camposlorca .store-checkout-shell .store-action-primary,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-shell .store-action-primary {
    min-height: 44px !important;
    width: auto !important;
    min-width: 180px !important;
    max-width: 250px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-checkout-actions,
.storefront-shell.client-camposlorca.theme-camposlorca .store-checkout-actions {
    justify-content: center !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-coupon-form button,
.storefront-shell.client-camposlorca.theme-camposlorca .store-coupon-form button,
.storefront-shell.client-malagadive.theme-malagadive .store-search button,
.storefront-shell.client-camposlorca.theme-camposlorca .store-search button,
.storefront-shell.client-malagadive.theme-malagadive .storefront-search button,
.storefront-shell.client-camposlorca.theme-camposlorca .storefront-search button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-payment-methods,
.storefront-shell.client-malagadive.theme-malagadive .store-payment-methods.store-payment-method-list,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-methods,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-methods.store-payment-method-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    background: #fff !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-payment-methods .store-payment-method,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-methods .store-payment-method {
    display: grid !important;
    grid-template-columns: 26px minmax(0, 1fr) 180px !important;
    align-items: center !important;
    gap: 14px !important;
    min-height: 94px !important;
    padding: 16px 18px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--store-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
    background: #fff !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-payment-methods .store-payment-method:last-child,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-methods .store-payment-method:last-child {
    border-bottom: 0 !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-payment-methods .store-payment-method.selected,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-methods .store-payment-method.selected {
    background: #f4fbff !important;
    outline: 2px solid var(--store-primary) !important;
    outline-offset: -2px !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-payment-method-logo,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-method-logo {
    justify-self: end !important;
    width: 170px !important;
    max-width: 170px !important;
    min-height: 56px !important;
    padding: 6px 10px !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-payment-logo-img.stripe,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-logo-img.stripe {
    width: 150px !important;
    max-height: 44px !important;
    object-fit: contain !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-payment-method-text,
.storefront-shell.client-camposlorca.theme-camposlorca .store-payment-method-text {
    display: grid !important;
    gap: 4px !important;
    justify-items: start !important;
    text-align: left !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-account-head > div:last-child,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-head > div:last-child,
.storefront-shell.client-malagadive.theme-malagadive .store-account-contact,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-contact,
.storefront-shell.client-malagadive.theme-malagadive .store-account-kpis,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-kpis,
.storefront-shell.client-malagadive.theme-malagadive .store-account-panel-title span,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-panel-title span,
.storefront-shell.client-malagadive.theme-malagadive .store-company-check,
.storefront-shell.client-camposlorca.theme-camposlorca .store-company-check {
    display: none !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-account-shell,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-shell {
    display: grid !important;
    grid-template-columns: 210px minmax(0, 1fr) !important;
    gap: 18px !important;
    align-items: start !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-account-tabs,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-tabs {
    grid-column: 1 !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-account-panel,
.storefront-shell.client-malagadive.theme-malagadive .store-account-grid,
.storefront-shell.client-malagadive.theme-malagadive .store-account-grid-single,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-panel,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-grid,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-grid-single {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-account-panel > .store-account-form,
.storefront-shell.client-camposlorca.theme-camposlorca .store-account-panel > .store-account-form {
    max-width: 640px !important;
    margin-inline: auto !important;
}

@media (max-width: 900px) {
    .storefront-shell.client-malagadive.theme-malagadive .store-checkout-shell,
    .storefront-shell.client-malagadive.theme-malagadive .store-account-shell,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-checkout-shell,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-account-shell {
        width: min(100% - 20px, 1000px) !important;
        margin-block: 18px 36px !important;
    }

    .storefront-shell.client-malagadive.theme-malagadive .store-cart-layout,
    .storefront-shell.client-malagadive.theme-malagadive .store-payment-layout,
    .storefront-shell.client-malagadive.theme-malagadive .store-account-shell,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-cart-layout,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-payment-layout,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-account-shell {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell.client-malagadive.theme-malagadive .store-account-tabs,
    .storefront-shell.client-malagadive.theme-malagadive .store-account-panel,
    .storefront-shell.client-malagadive.theme-malagadive .store-account-grid,
    .storefront-shell.client-malagadive.theme-malagadive .store-account-grid-single,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-account-tabs,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-account-panel,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-account-grid,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-account-grid-single {
        grid-column: 1 !important;
    }

    .storefront-shell.client-malagadive.theme-malagadive .store-payment-methods .store-payment-method,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-payment-methods .store-payment-method {
        grid-template-columns: 24px minmax(0, 1fr) !important;
    }

    .storefront-shell.client-malagadive.theme-malagadive .store-payment-method-logo,
    .storefront-shell.client-camposlorca.theme-camposlorca .store-payment-method-logo {
        grid-column: 2 !important;
        justify-self: start !important;
        margin-top: 8px !important;
    }
}

/* 2026-06-23h: Campos checkout/account final override. Keep this block last. */
.storefront-shell:not(.theme-bruja) .storefront-content,
.storefront-shell:not(.theme-bruja) .store-checkout-shell,
.storefront-shell:not(.theme-bruja) .store-account-shell {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .storefront-content {
    padding-inline: 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head {
    grid-column: 1 / -1 !important;
    display: block !important;
    padding: 24px 28px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head > div:last-child,
.storefront-shell:not(.theme-bruja) .store-account-contact,
.storefront-shell:not(.theme-bruja) .store-account-kpis,
.storefront-shell:not(.theme-bruja) .store-account-panel-title span,
.storefront-shell:not(.theme-bruja) .store-company-check {
    display: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-shell {
    display: grid !important;
    grid-template-columns: 210px minmax(0, 1fr) !important;
    gap: 18px !important;
    align-items: start !important;
}

.storefront-shell:not(.theme-bruja) .store-account-tabs {
    grid-column: 1 !important;
    display: grid !important;
    gap: 8px !important;
    align-self: start !important;
    padding: 10px !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-account-tabs button {
    width: 100% !important;
    min-height: 40px !important;
    justify-content: flex-start !important;
    border-radius: 5px !important;
    text-align: left !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel,
.storefront-shell:not(.theme-bruja) .store-account-grid,
.storefront-shell:not(.theme-bruja) .store-account-grid-single {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel {
    padding: 24px 28px !important;
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel-title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 20px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel > .store-account-form {
    width: 100% !important;
    max-width: 640px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 13px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
.storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
    display: grid !important;
    grid-template-columns: 150px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form input,
.storefront-shell:not(.theme-bruja) .store-account-form select,
.storefront-shell:not(.theme-bruja) .store-address-linear-form input,
.storefront-shell:not(.theme-bruja) .store-address-linear-form select,
.storefront-shell:not(.theme-bruja) .store-checkout-form input,
.storefront-shell:not(.theme-bruja) .store-checkout-form select,
.storefront-shell:not(.theme-bruja) .store-checkout-form textarea {
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form > button,
.storefront-shell:not(.theme-bruja) .store-account-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-account-form .store-action-secondary,
.storefront-shell:not(.theme-bruja) .store-account-form .store-action-success,
.storefront-shell:not(.theme-bruja) .store-checkout-actions button {
    width: min(220px, 100%) !important;
    max-width: 220px !important;
    justify-self: center !important;
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-card {
    max-width: 430px !important;
    margin: 42px auto !important;
    padding: 28px !important;
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form {
    max-width: 360px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-login-field,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-inline-message,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-empty-actions,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-forgot-link {
    width: 100% !important;
    max-width: 360px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-login-field input {
    width: 100% !important;
    min-height: 44px !important;
    border-radius: 5px !important;
    text-align: left !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-check {
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-empty-actions {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-action-secondary {
    width: 160px !important;
    max-width: 160px !important;
    min-height: 42px !important;
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-forgot-link {
    display: block !important;
    text-align: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-layout {
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods,
.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method,
.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method {
    display: grid !important;
    grid-template-columns: 26px minmax(0, 1fr) 180px !important;
    align-items: center !important;
    justify-items: stretch !important;
    gap: 14px !important;
    min-height: 94px !important;
    padding: 16px 18px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--store-line) !important;
    border-radius: 0 !important;
    background: #fff !important;
    text-align: left !important;
    box-shadow: none !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method:last-child {
    border-bottom: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method.selected {
    background: #f4fbff !important;
    outline: 2px solid var(--store-primary) !important;
    outline-offset: -2px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-radio {
    display: inline-flex !important;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #98a2b3 !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method.selected .store-payment-radio {
    border-color: #ff6b00 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method.selected .store-payment-radio::after {
    content: "" !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #ff6b00 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-logo {
    justify-self: end !important;
    width: 170px !important;
    max-width: 170px !important;
    min-height: 56px !important;
    padding: 6px 10px !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-logo-img.stripe {
    width: 150px !important;
    max-height: 44px !important;
    object-fit: contain !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-logo-paypal strong {
    font-size: 1.8rem !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-text {
    display: grid !important;
    gap: 4px !important;
    justify-items: start !important;
    text-align: left !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-text small {
    max-width: 34ch !important;
    color: #475467 !important;
}

.storefront-shell:not(.theme-bruja) .store-address-new,
.storefront-shell:not(.theme-bruja) .store-action-success {
    background: #079455 !important;
    border-color: #079455 !important;
    color: #fff !important;
}

@media (max-width: 900px) {
    .storefront-shell:not(.theme-bruja) .storefront-content,
    .storefront-shell:not(.theme-bruja) .store-checkout-shell,
    .storefront-shell:not(.theme-bruja) .store-account-shell {
        max-width: 100% !important;
        padding-inline: 14px !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-shell,
    .storefront-shell:not(.theme-bruja) .store-payment-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-tabs,
    .storefront-shell:not(.theme-bruja) .store-account-panel,
    .storefront-shell:not(.theme-bruja) .store-account-grid,
    .storefront-shell:not(.theme-bruja) .store-account-grid-single {
        grid-column: 1 !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
    .storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method {
        grid-template-columns: 24px minmax(0, 1fr) !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-logo {
        grid-column: 2 !important;
        justify-self: start !important;
        margin-top: 8px !important;
    }
}

/* 2026-06-24: catalogo full width. Solo cuenta y checkout van centrados. */
.storefront-shell:not(.theme-bruja) .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: clamp(18px, 3vw, 54px) !important;
}

.storefront-shell:not(.theme-bruja) .storefront-content:has(.store-checkout-shell),
.storefront-shell:not(.theme-bruja) .storefront-content:has(.store-account-shell),
.storefront-shell:not(.theme-bruja) .storefront-content:has(.store-account-login-card),
.storefront-shell:not(.theme-bruja) .storefront-content:has(.store-register-shell) {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
    padding-inline: 14px !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-shell,
.storefront-shell:not(.theme-bruja) .store-account-shell,
.storefront-shell:not(.theme-bruja) .store-account-login-card,
.storefront-shell:not(.theme-bruja) .store-register-shell {
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-category-layout,
.storefront-shell:not(.theme-bruja) .store-catalog-layout,
.storefront-shell:not(.theme-bruja) .store-listing-layout,
.storefront-shell:not(.theme-bruja) .store-product-grid {
    max-width: none !important;
}

.storefront-shell:not(.theme-bruja) .store-search button,
.storefront-shell:not(.theme-bruja) .store-search-submit,
.storefront-shell:not(.theme-bruja) .store-search-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    line-height: 1 !important;
}

.storefront-shell:not(.theme-bruja) .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-action-secondary,
.storefront-shell:not(.theme-bruja) .store-action-success,
.storefront-shell:not(.theme-bruja) .store-checkout-actions a,
.storefront-shell:not(.theme-bruja) .store-checkout-actions button,
.storefront-shell:not(.theme-bruja) .store-cart-summary button,
.storefront-shell:not(.theme-bruja) .store-cart-summary a {
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-cart-layout {
    grid-template-columns: minmax(0, 1fr) 340px !important;
    gap: 24px !important;
    align-items: start !important;
}

.storefront-shell:not(.theme-bruja) .store-cart-line,
.storefront-shell:not(.theme-bruja) .store-cart-summary {
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.storefront-shell:not(.theme-bruja) .store-cart-summary .store-action-primary {
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    background: var(--store-primary) !important;
}

.storefront-shell:not(.theme-bruja) .store-coupon-form input,
.storefront-shell:not(.theme-bruja) .store-coupon-form button {
    min-height: 44px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods,
.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list {
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method,
.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method {
    grid-template-columns: 28px minmax(0, 1fr) 210px !important;
    min-height: 104px !important;
    border-radius: 0 !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-logo {
    width: 200px !important;
    max-width: 200px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-logo-img.stripe {
    width: 185px !important;
    max-height: 50px !important;
    object-fit: contain !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method.selected {
    outline-color: #ff6b00 !important;
    background: #fffaf5 !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head > div:last-child,
.storefront-shell:not(.theme-bruja) .store-account-contact,
.storefront-shell:not(.theme-bruja) .store-account-kpis,
.storefront-shell:not(.theme-bruja) .store-account-panel-title > span,
.storefront-shell:not(.theme-bruja) .store-company-check {
    display: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-shell {
    grid-template-columns: 230px minmax(0, 1fr) !important;
    gap: 20px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel > .store-account-form {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
.storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
    grid-template-columns: 150px minmax(0, 1fr) !important;
    gap: 12px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form button,
.storefront-shell:not(.theme-bruja) .store-account-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-account-form .store-action-secondary {
    width: min(100%, 220px) !important;
    max-width: 220px !important;
    justify-self: center !important;
}

.storefront-shell:not(.theme-bruja) .store-address-new,
.storefront-shell:not(.theme-bruja) .store-action-success {
    background: #079455 !important;
    border-color: #079455 !important;
    color: #fff !important;
}

@media (max-width: 900px) {
    .storefront-shell:not(.theme-bruja) .storefront-content {
        padding-inline: 14px !important;
    }

    .storefront-shell:not(.theme-bruja) .store-cart-layout,
    .storefront-shell:not(.theme-bruja) .store-account-shell,
    .storefront-shell:not(.theme-bruja) .store-payment-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-tabs,
    .storefront-shell:not(.theme-bruja) .store-account-panel,
    .storefront-shell:not(.theme-bruja) .store-account-grid,
    .storefront-shell:not(.theme-bruja) .store-account-grid-single {
        grid-column: 1 !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
    .storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method,
    .storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method {
        grid-template-columns: 28px minmax(0, 1fr) !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-logo {
        grid-column: 2 !important;
        justify-self: start !important;
        margin-top: 8px !important;
    }
}

/* MalagaDive: el catalogo y las fichas usan todo el ancho; solo carrito, checkout y area privada se acotan. */
.storefront-shell.client-malagadive.theme-malagadive .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-inline: 0 !important;
}

.storefront-shell.client-malagadive.theme-malagadive .storefront-catalog-shell,
.storefront-shell.client-malagadive.theme-malagadive .store-product-detail,
.storefront-shell.client-malagadive.theme-malagadive .store-page-shell {
    width: calc(100% - 48px) !important;
    max-width: none !important;
    margin: 24px auto !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-checkout-shell,
.storefront-shell.client-malagadive.theme-malagadive .store-account-shell,
.storefront-shell.client-malagadive.theme-malagadive .store-register-shell,
.storefront-shell.client-malagadive.theme-malagadive .store-login-content .store-account-login-card {
    width: min(100% - 48px, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 24px !important;
    align-items: start !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-line,
.storefront-shell.client-malagadive.theme-malagadive .store-cart-summary {
    border: 1px solid #d8e4ee !important;
    border-radius: 5px !important;
    background: rgba(255, 255, 255, .82) !important;
    box-shadow: 0 18px 42px rgba(14, 36, 64, .08) !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-line {
    grid-template-columns: 104px minmax(0, 1fr) 104px 120px 74px !important;
    gap: 18px !important;
    align-items: center !important;
    padding: 18px !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-line img {
    width: 96px !important;
    height: 96px !important;
    object-fit: contain !important;
    border: 1px solid #d8e4ee !important;
    border-radius: 3px !important;
    background: #fff !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-line input,
.storefront-shell.client-malagadive.theme-malagadive .store-coupon-form input {
    height: 42px !important;
    border-radius: 5px !important;
    border: 1px solid #b8c7d6 !important;
    background: #fff !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-coupon-form > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 104px !important;
    gap: 8px !important;
    align-items: stretch !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-line button,
.storefront-shell.client-malagadive.theme-malagadive .store-coupon-form button,
.storefront-shell.client-malagadive.theme-malagadive .store-cart-summary .store-action-primary,
.storefront-shell.client-malagadive.theme-malagadive .store-cart-summary .store-action-secondary {
    min-height: 42px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-line button,
.storefront-shell.client-malagadive.theme-malagadive .store-coupon-form button {
    background: #f4ead5 !important;
    border-color: #f4ead5 !important;
    color: #7a4c00 !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-summary .store-action-primary {
    width: 100% !important;
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-cart-summary .store-action-primary:hover {
    background: #111827 !important;
    border-color: #111827 !important;
}

.storefront-shell.client-malagadive.theme-malagadive .store-checkout-progress {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

@media (max-width: 900px) {
    .storefront-shell.client-malagadive.theme-malagadive .storefront-catalog-shell,
    .storefront-shell.client-malagadive.theme-malagadive .store-product-detail,
    .storefront-shell.client-malagadive.theme-malagadive .store-page-shell,
    .storefront-shell.client-malagadive.theme-malagadive .store-checkout-shell,
    .storefront-shell.client-malagadive.theme-malagadive .store-account-shell,
    .storefront-shell.client-malagadive.theme-malagadive .store-register-shell {
        width: calc(100% - 28px) !important;
    }

    .storefront-shell.client-malagadive.theme-malagadive .store-cart-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell.client-malagadive.theme-malagadive .store-cart-line {
        grid-template-columns: 86px minmax(0, 1fr) !important;
    }

    .storefront-shell.client-malagadive.theme-malagadive .store-cart-line img {
        width: 80px !important;
        height: 80px !important;
    }

    .storefront-shell.client-malagadive.theme-malagadive .store-cart-line input,
    .storefront-shell.client-malagadive.theme-malagadive .store-cart-line strong,
    .storefront-shell.client-malagadive.theme-malagadive .store-cart-line button {
        grid-column: 2 !important;
        width: 100% !important;
    }

    .storefront-shell.client-malagadive.theme-malagadive .store-coupon-form > div {
        grid-template-columns: 1fr !important;
    }
}

/* 2026-06-25: MalagaDive definitive override placed after shared checkout/account rules.
   Catalog and product views are full width; only account/auth/checkout are contained. */
.storefront-shell.theme-malagadive .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-inline: 0 !important;
}

.storefront-shell.theme-malagadive .storefront-catalog-shell,
.storefront-shell.theme-malagadive .store-product-detail,
.storefront-shell.theme-malagadive .store-page-shell {
    width: calc(100% - 48px) !important;
    max-width: none !important;
    margin: 24px auto !important;
}

.storefront-shell.theme-malagadive .store-checkout-shell,
.storefront-shell.theme-malagadive .store-account-shell,
.storefront-shell.theme-malagadive .store-register-shell,
.storefront-shell.theme-malagadive .store-login-content .store-account-login-card {
    width: min(100% - 48px, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell.theme-malagadive .store-cart-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 24px !important;
    align-items: start !important;
}

.storefront-shell.theme-malagadive .store-cart-line,
.storefront-shell.theme-malagadive .store-cart-summary {
    border: 1px solid #d8e4ee !important;
    border-radius: 5px !important;
    background: rgba(255, 255, 255, .82) !important;
    box-shadow: 0 18px 42px rgba(14, 36, 64, .08) !important;
}

.storefront-shell.theme-malagadive .store-cart-line {
    grid-template-columns: 104px minmax(0, 1fr) 104px 120px 74px !important;
    gap: 18px !important;
    align-items: center !important;
    padding: 18px !important;
}

.storefront-shell.theme-malagadive .store-cart-line img {
    width: 96px !important;
    height: 96px !important;
    object-fit: contain !important;
    border: 1px solid #d8e4ee !important;
    border-radius: 3px !important;
    background: #fff !important;
}

.storefront-shell.theme-malagadive .store-cart-line input,
.storefront-shell.theme-malagadive .store-coupon-form input {
    height: 42px !important;
    border-radius: 5px !important;
    border: 1px solid #b8c7d6 !important;
    background: #fff !important;
}

.storefront-shell.theme-malagadive .store-coupon-form > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 104px !important;
    gap: 8px !important;
    align-items: stretch !important;
}

.storefront-shell.theme-malagadive .store-cart-line button,
.storefront-shell.theme-malagadive .store-coupon-form button,
.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary,
.storefront-shell.theme-malagadive .store-cart-summary .store-action-secondary {
    min-height: 42px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
}

.storefront-shell.theme-malagadive .store-cart-line button,
.storefront-shell.theme-malagadive .store-coupon-form button {
    background: #f4ead5 !important;
    border-color: #f4ead5 !important;
    color: #7a4c00 !important;
}

.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary {
    width: 100% !important;
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
}

.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary:hover {
    background: #111827 !important;
    border-color: #111827 !important;
}

.storefront-shell.theme-malagadive .store-checkout-progress {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

@media (max-width: 900px) {
    .storefront-shell.theme-malagadive .storefront-catalog-shell,
    .storefront-shell.theme-malagadive .store-product-detail,
    .storefront-shell.theme-malagadive .store-page-shell,
    .storefront-shell.theme-malagadive .store-checkout-shell,
    .storefront-shell.theme-malagadive .store-account-shell,
    .storefront-shell.theme-malagadive .store-register-shell {
        width: calc(100% - 28px) !important;
    }

    .storefront-shell.theme-malagadive .store-cart-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line {
        grid-template-columns: 86px minmax(0, 1fr) !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line img {
        width: 80px !important;
        height: 80px !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line input,
    .storefront-shell.theme-malagadive .store-cart-line strong,
    .storefront-shell.theme-malagadive .store-cart-line button {
        grid-column: 2 !important;
        width: 100% !important;
    }

    .storefront-shell.theme-malagadive .store-coupon-form > div {
        grid-template-columns: 1fr !important;
    }
}

/* 2026-06-25: MalagaDive final storefront containment.
   Catalog/product remain wide; only checkout, account and auth screens are constrained. */
.storefront-shell.theme-malagadive .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-inline: 0 !important;
}

.storefront-shell.theme-malagadive .storefront-catalog-shell,
.storefront-shell.theme-malagadive .store-product-detail,
.storefront-shell.theme-malagadive .store-page-shell {
    width: calc(100% - 48px) !important;
    max-width: none !important;
    margin: 24px auto !important;
}

.storefront-shell.theme-malagadive .store-checkout-shell,
.storefront-shell.theme-malagadive .store-account-shell,
.storefront-shell.theme-malagadive .store-register-shell,
.storefront-shell.theme-malagadive .store-login-content .store-account-login-card {
    width: min(100% - 48px, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell.theme-malagadive .store-cart-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 24px !important;
    align-items: start !important;
}

.storefront-shell.theme-malagadive .store-cart-line,
.storefront-shell.theme-malagadive .store-cart-summary {
    border: 1px solid #d8e4ee !important;
    border-radius: 5px !important;
    background: rgba(255, 255, 255, .82) !important;
    box-shadow: 0 18px 42px rgba(14, 36, 64, .08) !important;
}

.storefront-shell.theme-malagadive .store-cart-line {
    grid-template-columns: 104px minmax(0, 1fr) 104px 120px 74px !important;
    gap: 18px !important;
    align-items: center !important;
    padding: 18px !important;
}

.storefront-shell.theme-malagadive .store-cart-line img {
    width: 96px !important;
    height: 96px !important;
    object-fit: contain !important;
    border: 1px solid #d8e4ee !important;
    border-radius: 3px !important;
    background: #fff !important;
}

.storefront-shell.theme-malagadive .store-cart-line input,
.storefront-shell.theme-malagadive .store-coupon-form input {
    height: 42px !important;
    border-radius: 5px !important;
    border: 1px solid #b8c7d6 !important;
    background: #fff !important;
}

.storefront-shell.theme-malagadive .store-coupon-form > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 104px !important;
    gap: 8px !important;
    align-items: stretch !important;
}

.storefront-shell.theme-malagadive .store-cart-line button,
.storefront-shell.theme-malagadive .store-coupon-form button,
.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary {
    min-height: 42px !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
}

.storefront-shell.theme-malagadive .store-cart-line button,
.storefront-shell.theme-malagadive .store-coupon-form button {
    background: #f4ead5 !important;
    border-color: #f4ead5 !important;
    color: #7a4c00 !important;
}

.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary {
    width: 100% !important;
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
}

.storefront-shell.theme-malagadive .store-checkout-progress {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

@media (max-width: 900px) {
    .storefront-shell.theme-malagadive .storefront-catalog-shell,
    .storefront-shell.theme-malagadive .store-product-detail,
    .storefront-shell.theme-malagadive .store-page-shell,
    .storefront-shell.theme-malagadive .store-checkout-shell,
    .storefront-shell.theme-malagadive .store-account-shell,
    .storefront-shell.theme-malagadive .store-register-shell {
        width: calc(100% - 28px) !important;
        margin-block: 16px !important;
    }

    .storefront-shell.theme-malagadive .store-cart-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line {
        grid-template-columns: 86px minmax(0, 1fr) !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line img {
        width: 78px !important;
        height: 78px !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line input,
    .storefront-shell.theme-malagadive .store-cart-line strong,
    .storefront-shell.theme-malagadive .store-cart-line button {
        grid-column: 2 !important;
        width: 100% !important;
    }
}

/* MalagaDive final overrides: catalog full width, checkout/account contained. */
.storefront-shell.theme-malagadive .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

.storefront-shell.theme-malagadive .storefront-catalog-shell,
.storefront-shell.theme-malagadive .store-product-detail,
.storefront-shell.theme-malagadive .store-page-shell {
    width: calc(100% - 48px) !important;
    max-width: none !important;
    margin-inline: 24px !important;
}

.storefront-shell.theme-malagadive .store-checkout-shell,
.storefront-shell.theme-malagadive .store-account-shell,
.storefront-shell.theme-malagadive .store-register-shell {
    width: min(100% - 48px, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell.theme-malagadive .store-cart-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 24px !important;
    align-items: start !important;
}

.storefront-shell.theme-malagadive .store-cart-line,
.storefront-shell.theme-malagadive .store-cart-summary {
    background: #f7fbff !important;
    border: 1px solid rgba(0, 129, 183, .22) !important;
    border-radius: 5px !important;
    box-shadow: 0 16px 34px rgba(7, 20, 32, .07) !important;
}

.storefront-shell.theme-malagadive .store-cart-line {
    display: grid !important;
    grid-template-columns: 112px minmax(0, 1fr) 96px 116px auto !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 20px !important;
}

.storefront-shell.theme-malagadive .store-cart-line img {
    width: 96px !important;
    height: 96px !important;
    object-fit: contain !important;
    background: #fff !important;
    border: 1px solid rgba(0, 129, 183, .16) !important;
    border-radius: 3px !important;
}

.storefront-shell.theme-malagadive .store-cart-line input,
.storefront-shell.theme-malagadive .store-coupon-form input {
    min-height: 42px !important;
    height: 42px !important;
    border-radius: 5px !important;
    border-color: rgba(7, 20, 32, .28) !important;
    background: #fff !important;
}

.storefront-shell.theme-malagadive .store-cart-line button,
.storefront-shell.theme-malagadive .store-coupon-form button,
.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary,
.storefront-shell.theme-malagadive .store-cart-summary .store-action-secondary {
    min-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 5px !important;
    line-height: 1 !important;
}

.storefront-shell.theme-malagadive .store-cart-line button,
.storefront-shell.theme-malagadive .store-coupon-form button {
    background: #eef8ff !important;
    border-color: rgba(0, 129, 183, .24) !important;
    color: #064260 !important;
}

.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary {
    width: 100% !important;
    background: #07111c !important;
    border-color: #07111c !important;
    color: #fff !important;
}

.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary:hover {
    background: #005f98 !important;
    border-color: #005f98 !important;
}

.storefront-shell.theme-malagadive .store-coupon-form > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 104px !important;
    gap: 10px !important;
    align-items: center !important;
}

.storefront-shell.theme-malagadive .store-checkout-progress {
    max-width: 840px !important;
    margin-inline: auto !important;
}

@media (max-width: 900px) {
    .storefront-shell.theme-malagadive .storefront-catalog-shell,
    .storefront-shell.theme-malagadive .store-product-detail,
    .storefront-shell.theme-malagadive .store-page-shell,
    .storefront-shell.theme-malagadive .store-checkout-shell,
    .storefront-shell.theme-malagadive .store-account-shell,
    .storefront-shell.theme-malagadive .store-register-shell {
        width: calc(100% - 20px) !important;
        margin-inline: 10px !important;
    }

    .storefront-shell.theme-malagadive .store-cart-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line {
        grid-template-columns: 88px minmax(0, 1fr) !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line img {
        width: 78px !important;
        height: 78px !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line input,
    .storefront-shell.theme-malagadive .store-cart-line strong,
    .storefront-shell.theme-malagadive .store-cart-line button {
        grid-column: 2 !important;
        justify-self: start !important;
    }

    .storefront-shell.theme-malagadive .store-coupon-form > div {
        grid-template-columns: 1fr !important;
    }
}

/* 2026-06-25: MalagaDive catalogue stays full-width. Only checkout/account are contained. */
.storefront-shell.theme-malagadive .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

.storefront-shell.theme-malagadive .storefront-catalog-shell,
.storefront-shell.theme-malagadive .store-product-detail,
.storefront-shell.theme-malagadive .store-page-shell {
    width: calc(100% - 48px) !important;
    max-width: none !important;
    margin-inline: 24px !important;
}

.storefront-shell.theme-malagadive .store-checkout-shell,
.storefront-shell.theme-malagadive .store-account-shell,
.storefront-shell.theme-malagadive .store-register-shell {
    width: min(100% - 48px, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell.theme-malagadive .store-cart-layout {
    gap: 22px !important;
    align-items: flex-start !important;
}

.storefront-shell.theme-malagadive .store-cart-line,
.storefront-shell.theme-malagadive .store-cart-summary {
    background: #f6fbff !important;
    border: 1px solid rgba(0, 129, 183, .22) !important;
    border-radius: 5px !important;
    box-shadow: 0 16px 36px rgba(7, 20, 32, .06) !important;
}

.storefront-shell.theme-malagadive .store-cart-line {
    grid-template-columns: 118px minmax(0, 1fr) 112px 128px auto !important;
    padding: 22px !important;
}

.storefront-shell.theme-malagadive .store-cart-line img {
    background: #fff !important;
    border: 1px solid rgba(0, 129, 183, .16) !important;
    border-radius: 3px !important;
}

.storefront-shell.theme-malagadive .store-cart-line input,
.storefront-shell.theme-malagadive .store-coupon-form input {
    min-height: 42px !important;
    border-radius: 5px !important;
    border-color: rgba(7, 20, 32, .35) !important;
    background: #fff !important;
}

.storefront-shell.theme-malagadive .store-cart-line button,
.storefront-shell.theme-malagadive .store-coupon-form button,
.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary {
    min-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 5px !important;
    line-height: 1 !important;
}

.storefront-shell.theme-malagadive .store-cart-line button,
.storefront-shell.theme-malagadive .store-coupon-form button {
    background: #e8f7ff !important;
    border-color: rgba(0, 129, 183, .22) !important;
    color: #064260 !important;
}

.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary {
    width: 100% !important;
    background: #07111c !important;
    border-color: #07111c !important;
    color: #fff !important;
}

.storefront-shell.theme-malagadive .store-cart-summary .store-action-primary:hover {
    background: #005f98 !important;
    border-color: #005f98 !important;
}

.storefront-shell.theme-malagadive .store-coupon-form > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 108px !important;
    gap: 10px !important;
    align-items: center !important;
}

@media (max-width: 900px) {
    .storefront-shell.theme-malagadive .storefront-catalog-shell,
    .storefront-shell.theme-malagadive .store-product-detail,
    .storefront-shell.theme-malagadive .store-page-shell,
    .storefront-shell.theme-malagadive .store-checkout-shell,
    .storefront-shell.theme-malagadive .store-account-shell,
    .storefront-shell.theme-malagadive .store-register-shell {
        width: calc(100% - 20px) !important;
        margin-inline: 10px !important;
    }

    .storefront-shell.theme-malagadive .store-cart-line {
        grid-template-columns: 96px minmax(0, 1fr) !important;
    }
}

/* 2026-06-23f: checkout/cuenta Campos, estilo PCComponentes y sin formularios desparramados */
.storefront-shell:not(.theme-bruja) .storefront-content {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
    padding-inline: 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-shell,
.storefront-shell:not(.theme-bruja) .store-account-shell {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head {
    grid-column: 1 / -1 !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head > div:last-child {
    display: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-shell {
    grid-template-columns: 210px minmax(0, 1fr) !important;
    gap: 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel {
    padding: 22px 24px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel-title span {
    display: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel > .store-account-form {
    max-width: 640px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
.storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
    grid-template-columns: 150px minmax(0, 1fr) !important;
    gap: 10px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-card {
    max-width: 430px !important;
    margin: 42px auto !important;
    padding: 28px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form {
    max-width: 360px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-login-field,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-inline-message,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-empty-actions,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-forgot-link {
    width: 100% !important;
    max-width: 360px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-login-field input {
    width: 100% !important;
    min-height: 44px !important;
    border-radius: 5px !important;
    text-align: left !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-check {
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-empty-actions {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-action-secondary {
    width: 160px !important;
    max-width: 160px !important;
    min-height: 42px !important;
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-forgot-link {
    display: block !important;
    text-align: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-layout {
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method {
    display: grid !important;
    grid-template-columns: 26px minmax(0, 1fr) 180px !important;
    align-items: center !important;
    justify-items: stretch !important;
    gap: 14px !important;
    min-height: 94px !important;
    padding: 16px 18px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--store-line) !important;
    border-radius: 0 !important;
    background: #fff !important;
    text-align: left !important;
    box-shadow: none !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method:last-child {
    border-bottom: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method.selected {
    background: #f4fbff !important;
    outline: 2px solid var(--store-primary) !important;
    outline-offset: -2px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-radio {
    display: inline-flex !important;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #98a2b3 !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method.selected .store-payment-radio {
    border-color: #ff6b00 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method.selected .store-payment-radio::after {
    content: "" !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #ff6b00 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method-logo {
    justify-self: end !important;
    width: 170px !important;
    max-width: 170px !important;
    min-height: 56px !important;
    padding: 6px 10px !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-logo-img.stripe {
    width: 150px !important;
    max-height: 44px !important;
    object-fit: contain !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-logo-paypal strong {
    font-size: 1.8rem !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method-text {
    justify-items: start !important;
    text-align: left !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method-text strong {
    font-size: 1.05rem !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method-text small {
    max-width: 34ch !important;
    color: #475467 !important;
}

.storefront-shell:not(.theme-bruja) .store-address-new {
    background: #079455 !important;
    border-color: #079455 !important;
    color: #fff !important;
}

@media (max-width: 900px) {
    .storefront-shell:not(.theme-bruja) .storefront-content,
    .storefront-shell:not(.theme-bruja) .store-checkout-shell,
    .storefront-shell:not(.theme-bruja) .store-account-shell {
        max-width: 100% !important;
        padding-inline: 14px !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-shell,
    .storefront-shell:not(.theme-bruja) .store-payment-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method {
        grid-template-columns: 24px minmax(0, 1fr) !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method-logo {
        grid-column: 2 !important;
        justify-self: start !important;
        margin-top: 8px !important;
    }
}

.brand-logo {
    display: block;
    width: 210px;
    max-width: 100%;
    max-height: 82px;
    height: auto;
    object-fit: contain;
}

.brand-subtitle {
    color: #98a2b3;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.side-tree {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.side-group {
    border-radius: 12px;
}

.side-group summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #f2f4f7;
    cursor: pointer;
    user-select: none;
}

.side-group summary::-webkit-details-marker {
    display: none;
}

.side-group summary::after {
    content: "\25b8";
    color: #98a2b3;
    font-size: .82rem;
    transition: transform .15s ease;
}

.side-group[open] > summary::after {
    transform: rotate(90deg);
}

.side-group summary:hover,
.side-link:hover,
.side-link.active {
    background: #1d2939;
    color: #fff;
}

.side-children {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 4px 0 8px 10px;
    padding-left: 12px;
    border-left: 1px solid rgba(208, 213, 221, .18);
}

.side-group.nested summary {
    color: #d0d5dd;
    font-size: .94rem;
}

.side-link {
    color: #d0d5dd;
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 10px;
}

.side-link.disabled {
    color: #667085;
    cursor: not-allowed;
}

.content {
    padding: 30px;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.dashboard-shortcut {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 18px;
    border: 1px solid rgba(208, 213, 221, .9);
    border-radius: 10px;
    background: #fff;
    color: #17202a;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .06);
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.dashboard-shortcut:hover {
    border-color: #9fb3d9;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .1);
    transform: translateY(-1px);
}

.dashboard-shortcut .erp-icon {
    width: 22px;
    height: 22px;
    color: #1f5eff;
}

.dashboard-shortcut span {
    color: #111827;
    font-size: 1.02rem;
    font-weight: 800;
}

.panel,
.data-table {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(208, 213, 221, .72);
    box-shadow: 0 10px 30px rgba(16, 24, 40, .08);
}

.panel {
    padding: 22px;
}

.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.dashboard-toolbar {
    flex-wrap: wrap;
    margin-bottom: 0;
}

.erp-home {
    display: grid;
    gap: 22px;
    max-width: 1180px;
}

.erp-home-welcome {
    padding: 6px 0 12px;
    border-bottom: 1px solid rgba(148, 163, 184, .35);
}

.erp-home-welcome h1 {
    margin: 8px 0 0;
    color: #101828;
    font-size: clamp(1.9rem, 2.7vw, 2.8rem);
    font-weight: 500;
    letter-spacing: 0;
}

.erp-home-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.erp-home-metric {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 13px;
    min-height: 112px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 8px;
    background: #fff;
    color: #101828;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.erp-home-metric:hover {
    border-color: rgba(31, 94, 255, .32);
    color: #101828;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.erp-home-metric-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(31, 94, 255, .09);
    color: #1f5eff;
}

.erp-home-metric-icon .erp-icon {
    width: 21px;
    height: 21px;
}

.erp-home-metric span {
    display: block;
    color: #475467;
    font-size: .86rem;
    font-weight: 700;
}

.erp-home-metric strong {
    display: block;
    margin-top: 4px;
    color: #101828;
    font-size: 1.72rem;
    font-weight: 650;
    line-height: 1.05;
}

.erp-home-metric small {
    display: block;
    margin-top: 8px;
    color: #667085;
    font-size: .84rem;
    line-height: 1.25;
}

.erp-home-metric-green .erp-home-metric-icon {
    background: rgba(5, 150, 105, .1);
    color: #047857;
}

.erp-home-metric-amber .erp-home-metric-icon {
    background: rgba(217, 119, 6, .12);
    color: #b45309;
}

.erp-home-metric-red .erp-home-metric-icon {
    background: rgba(220, 38, 38, .1);
    color: #b42318;
}

.erp-home-metric-loading span,
.erp-home-metric-loading strong,
.erp-home-metric-loading small {
    display: block;
    border-radius: 999px;
    background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
}

.erp-home-metric-loading span {
    width: 58%;
    height: 12px;
}

.erp-home-metric-loading strong {
    width: 42%;
    height: 28px;
}

.erp-home-metric-loading small {
    width: 76%;
    height: 10px;
}

.erp-ai-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
}

.erp-ai-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.erp-ai-kicker {
    display: block;
    color: #1f5eff;
    font-size: .78rem;
    font-weight: 750;
    text-transform: uppercase;
}

.erp-ai-head h2 {
    margin: 4px 0 0;
    color: #101828;
    font-size: 1.28rem;
    font-weight: 650;
    letter-spacing: 0;
}

.erp-ai-confirmation {
    max-width: 360px;
    color: #475467;
    font-size: .86rem;
    font-weight: 650;
    line-height: 1.35;
    text-align: right;
}

.erp-ai-head-status {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.erp-ai-agent-badge {
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    padding: 4px 10px;
    background: #f8fafc;
    color: #667085;
    font-size: .78rem;
    font-weight: 750;
}

.erp-ai-agent-badge.active {
    border-color: #b2ddff;
    background: #eff8ff;
    color: #175cd3;
}

.erp-ai-thread {
    display: grid;
    gap: 14px;
    min-height: 320px;
    max-height: 560px;
    overflow: auto;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 8px;
    background: #f8fafc;
}

.erp-ai-empty {
    display: grid;
    place-items: center;
    gap: 7px;
    min-height: 260px;
    color: #667085;
    text-align: center;
}

.erp-ai-empty strong {
    max-width: 620px;
    color: #101828;
    font-size: 1.04rem;
    font-weight: 650;
}

.erp-ai-empty span {
    max-width: 560px;
    font-size: .92rem;
    line-height: 1.45;
}

.erp-ai-message {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.erp-ai-message-user {
    grid-template-columns: minmax(0, 1fr) 34px;
}

.erp-ai-message-user .erp-ai-avatar {
    grid-column: 2;
    grid-row: 1;
    background: #1f5eff;
    color: #fff;
}

.erp-ai-message-user .erp-ai-bubble {
    grid-column: 1;
    justify-self: end;
    background: #1f5eff;
    color: #fff;
}

.erp-ai-message-user .erp-ai-role,
.erp-ai-message-user .erp-ai-bubble pre {
    color: #fff;
}

.erp-ai-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e9efff;
    color: #1f5eff;
    font-size: .72rem;
    font-weight: 800;
}

.erp-ai-bubble {
    width: fit-content;
    max-width: min(760px, 100%);
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 8px;
    background: #fff;
    color: #1d2939;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .045);
}

.erp-ai-role {
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.erp-ai-bubble pre {
    margin: 0;
    color: #1d2939;
    font-family: inherit;
    font-size: .93rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.erp-ai-message-files {
    margin-top: 10px;
}

.erp-ai-action-form {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, .24);
}

.erp-ai-action-form-head {
    display: grid;
    gap: 3px;
}

.erp-ai-action-form-head strong {
    color: #101828;
    font-size: .98rem;
}

.erp-ai-action-form-head span {
    color: #667085;
    font-size: .86rem;
}

.erp-ai-action-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.erp-ai-action-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.erp-ai-action-field span {
    color: #344054;
    font-size: .78rem;
    font-weight: 800;
}

.erp-ai-action-field input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, .42);
    border-radius: 8px;
    background: #fff;
    color: #101828;
    font: inherit;
    font-size: .9rem;
}

.erp-ai-action-field input:focus {
    border-color: rgba(31, 94, 255, .7);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(31, 94, 255, .12);
}

.erp-ai-action-field small {
    color: #667085;
    font-size: .72rem;
}

.erp-ai-action-submit {
    justify-self: start;
    min-height: 36px;
    padding: 8px 13px;
    border: 0;
    border-radius: 8px;
    background: #101828;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.erp-ai-action-submit:disabled {
    background: #d0d5dd;
    cursor: not-allowed;
}

.erp-ai-module-card {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(31, 94, 255, .16);
    border-radius: 10px;
    background: #f8fbff;
}

.erp-ai-module-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.erp-ai-module-head > div {
    display: grid;
    gap: 3px;
}

.erp-ai-module-head strong {
    color: #101828;
    font-size: 1rem;
}

.erp-ai-module-head span,
.erp-ai-module-meta span,
.erp-ai-module-card p {
    color: #667085;
    font-size: .82rem;
}

.erp-ai-module-status {
    padding: 4px 8px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #1f5eff !important;
    font-size: .72rem !important;
    font-weight: 800;
}

.erp-ai-module-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.erp-ai-module-meta span {
    padding: 5px 8px;
    border-radius: 7px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .24);
}

.erp-ai-module-card p {
    margin: 0;
    line-height: 1.45;
}

.erp-ai-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.erp-ai-module-grid > div {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .22);
}

.erp-ai-module-grid strong {
    color: #344054;
    font-size: .78rem;
}

.erp-ai-module-field-list {
    display: grid;
    gap: 6px;
    max-height: 260px;
    overflow: auto;
    padding-right: 2px;
}

.erp-ai-module-field {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 7px 8px;
    border-radius: 7px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .18);
    color: #101828;
    font-size: .82rem;
}

.erp-ai-module-field > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.erp-ai-module-field b {
    font-weight: 800;
    color: #101828;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-ai-module-field small {
    color: #667085;
    font-size: .72rem;
}

.erp-ai-module-field em {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1f5eff;
    font-size: .68rem;
    font-style: normal;
    font-weight: 800;
}

.erp-ai-module-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.erp-ai-module-actions span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #101828;
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
}

.erp-ai-grid-wrap {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, .24);
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.erp-ai-grid-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    color: #344054;
    font-size: .82rem;
}

.erp-ai-grid-head strong {
    color: #101828;
    font-size: .92rem;
}

.erp-ai-grid-head span {
    color: #667085;
}

.erp-ai-grid-head > div {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.erp-ai-grid-export {
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(31, 94, 255, .22);
    border-radius: 7px;
    background: #fff;
    color: #1f5eff;
    font: inherit;
    font-size: .76rem;
    font-weight: 800;
    cursor: pointer;
}

.erp-ai-grid-export:hover {
    background: #f5f8ff;
}

.erp-ai-grid-export.primary {
    border-color: #1f5eff;
    background: #1f5eff;
    color: #fff;
}

.erp-ai-grid-export.primary:hover {
    background: #174bd0;
}

.erp-ai-grid-export.danger {
    border-color: rgba(180, 35, 24, .2);
    background: #fff;
    color: #b42318;
}

.erp-ai-grid-export.danger:hover {
    background: #fff5f5;
}

.ai-modules-empty {
    display: grid;
    gap: 8px;
    padding: 28px;
    color: #667085;
}

.ai-modules-empty h2 {
    margin: 0;
    color: #101828;
    font-size: 1.1rem;
}

.ai-modules-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
}

.ai-modules-list,
.ai-module-detail {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.ai-modules-list-head,
.ai-module-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.ai-modules-list-head {
    padding: 0 2px 4px;
    color: #667085;
}

.ai-module-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.ai-module-new-form {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: #f8fbff;
}

.ai-modules-list-head strong {
    color: #101828;
}

.ai-modules-list-head span,
.ai-module-row em {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
}

.ai-modules-list-head span {
    background: #eef4ff;
    color: #1f5eff;
}

.ai-module-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 8px;
    background: #fff;
    color: #101828;
    text-align: left;
    cursor: pointer;
}

.ai-module-row.active {
    border-color: rgba(31, 94, 255, .46);
    background: #f8fbff;
}

.ai-module-row span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.ai-module-row strong,
.ai-module-row small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-module-row small {
    color: #667085;
    font-size: .76rem;
}

.ai-module-row em {
    flex: 0 0 auto;
    background: #ecfdf3;
    color: #027a48;
    font-style: normal;
}

.ai-module-detail-head {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, .24);
}

.ai-module-detail-head h2 {
    margin: 0;
    color: #101828;
    font-size: 1.35rem;
}

.ai-module-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ai-module-summary span,
.ai-module-config-grid > div {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: #fff;
    min-width: 0;
}

.ai-module-summary strong {
    color: #667085;
    font-size: .72rem;
    text-transform: uppercase;
}

.ai-module-description {
    margin: 0;
    color: #667085;
}

.ai-module-config-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr .8fr;
    gap: 12px;
}

.ai-module-builder-grid {
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 1fr) minmax(260px, .9fr);
    align-items: start;
}

.ai-module-builder-grid > div {
    align-content: start;
    max-height: 430px;
    overflow: auto;
}

.ai-module-visual-layer {
    display: grid;
    gap: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, .24);
}

.ai-module-related-fields {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: #f8fafc;
}

.ai-module-related-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.ai-module-config-grid h3 {
    margin: 0 0 4px;
    color: #344054;
    font-size: .82rem;
}

.ai-module-config-grid span,
.ai-module-field-pill {
    padding: 7px 9px;
    border-radius: 7px;
    background: #f8fafc;
    color: #101828;
    font-size: .82rem;
}

.ai-module-section-head,
.ai-module-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ai-module-section-head h3,
.ai-module-preview-head h3 {
    margin: 0;
}

.ai-module-save-order {
    padding: 5px 9px;
    border: 1px solid rgba(31, 94, 255, .25);
    border-radius: 7px;
    background: #fff;
    color: #1f5eff;
    font-size: .72rem;
    font-weight: 800;
    cursor: pointer;
}

.ai-module-field-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(148, 163, 184, .18);
    text-align: left;
    cursor: grab;
}

.ai-module-field-pill span:not(.drag-handle) {
    flex: 1 1 auto;
    padding: 0;
    background: transparent;
}

.ai-module-field-pill em {
    flex: 0 0 auto;
    padding: 0;
    color: #475467;
    font-size: .76rem;
    font-style: normal;
    font-weight: 800;
}

.ai-module-add-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 7px;
    background: #fff;
    color: #101828;
    text-align: left;
    cursor: pointer;
}

.ai-module-add-field:hover {
    border-color: rgba(31, 94, 255, .34);
    background: #f8fbff;
}

.ai-module-linked-field {
    margin-bottom: 8px;
    background: #f8fafc;
}

.ai-modules-table {
    display: grid;
    gap: 10px;
}

.ai-module-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 8px;
    background: #fff;
}

.ai-module-list-row > div:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ai-module-list-row strong,
.ai-module-list-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-module-list-row small {
    color: #667085;
    font-size: .78rem;
}

.ai-module-list-row em {
    padding: 4px 8px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #027a48;
    font-size: .7rem;
    font-style: normal;
    font-weight: 800;
}

.ai-module-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ai-module-add-field span {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-module-add-field small {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1f5eff;
    font-size: .68rem;
    font-weight: 800;
}

.ai-module-field-pill.dragging {
    opacity: .45;
    border-color: rgba(31, 94, 255, .52);
    background: #eef4ff;
}

.drag-handle {
    padding: 0;
    color: #98a2b3;
    font-weight: 900;
    letter-spacing: -1px;
}

.ai-module-preview {
    display: grid;
    gap: 12px;
    margin-top: 8px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: #fff;
}

.ai-module-preview-head span {
    color: #667085;
    font-size: .8rem;
}

.ai-module-preview-grid {
    min-width: 0;
}

.ai-module-grid-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.ai-module-grid-scroll .dxbl-grid,
.ai-module-preview-grid {
    min-width: 760px;
}

.ai-module-preview-grid .dxbl-scroll-viewer,
.erp-ai-result-grid .dxbl-scroll-viewer {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.ai-module-open-hint {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 14px;
    border: 1px dashed rgba(148, 163, 184, .44);
    border-radius: 8px;
    background: #f8fafc;
    color: #667085;
    font-size: .84rem;
    text-align: center;
}

.ai-module-crud-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: grid;
    place-items: start center;
    padding: 72px 18px 28px;
    overflow: auto;
    background: rgba(15, 23, 42, .38);
}

.ai-module-crud {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(15, 23, 42, .24);
}

.ai-module-crud-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.ai-module-crud .ai-module-preview-head {
    align-items: flex-start;
}

.ai-module-crud .form-control[readonly] {
    background: #f8fafc;
}

.ai-module-horizontal-field {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.ai-module-horizontal-field > span {
    margin: 0;
    text-align: right;
}

@media (max-width: 720px) {
    .ai-module-horizontal-field {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .ai-module-horizontal-field > span {
        text-align: left;
    }

    .ai-module-crud-backdrop {
        padding: 52px 10px 18px;
    }
}

.ai-module-json {
    display: grid;
    gap: 8px;
}

.ai-module-json summary {
    color: #344054;
    font-weight: 800;
    cursor: pointer;
}

.ai-module-json textarea {
    width: 100%;
    min-height: 260px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 8px;
    background: #101828;
    color: #f8fafc;
    font-family: Consolas, monospace;
    font-size: .78rem;
}

.ai-admin-layout {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 18px;
}

.ai-admin-tables,
.ai-admin-fields {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.ai-admin-table-list,
.ai-admin-field-list {
    display: grid;
    gap: 8px;
    max-height: 68vh;
    overflow: auto;
    padding-right: 4px;
}

.ai-admin-table-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 11px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 8px;
    background: #fff;
    color: #101828;
    text-align: left;
    cursor: pointer;
}

.ai-admin-table-row.active {
    border-color: rgba(31, 94, 255, .46);
    background: #f8fbff;
}

.ai-admin-table-row span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ai-admin-table-row strong,
.ai-admin-table-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-admin-table-row small,
.ai-admin-field-row small {
    color: #667085;
    font-size: .76rem;
}

.ai-admin-table-row em {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: .68rem;
    font-style: normal;
    font-weight: 800;
}

.ai-admin-table-row.active em,
.ai-admin-table-row:has(em:nth-child(2)) em {
    background: #eef4ff;
    color: #1f5eff;
}

.ai-admin-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid rgba(148, 163, 184, .26);
    border-radius: 8px;
    background: #fff;
    font-weight: 800;
}

.ai-admin-field-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #667085;
    font-size: .82rem;
}

.ai-admin-field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: #fff;
}

.ai-admin-field-row > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ai-admin-field-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .ai-admin-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.erp-ai-result-grid {
    max-width: 100%;
    min-width: 680px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .26);
    border-radius: 8px;
}

.erp-ai-result-grid .dxbl-grid,
.erp-ai-result-grid.dxbl-grid {
    max-height: 420px;
}

.erp-ai-choice-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.erp-ai-choice {
    min-height: 32px;
    padding: 7px 11px;
    border: 1px solid rgba(31, 94, 255, .24);
    border-radius: 999px;
    background: #fff;
    color: #1f3f7a;
    font: inherit;
    font-size: .8rem;
    font-weight: 800;
    cursor: pointer;
}

.erp-ai-choice:hover {
    background: #f5f8ff;
    border-color: rgba(31, 94, 255, .42);
}

.erp-ai-composer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 18px;
    background: #fff;
    overflow: visible;
}

.erp-ai-attach {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0;
    border: 1px solid rgba(148, 163, 184, .42);
    border-radius: 50%;
    background: #fff;
    color: #101828;
    cursor: pointer;
    overflow: visible;
    flex: 0 0 42px;
    font-size: 0;
    line-height: 0;
    align-self: center;
}

.erp-ai-attach:hover {
    border-color: rgba(31, 94, 255, .46);
    background: #f8fafc;
}

.erp-ai-attach svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.erp-ai-attach-input {
    position: fixed !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    clip-path: inset(50%);
    white-space: nowrap;
}

.erp-ai-prompt {
    width: 100%;
    min-height: 76px;
    max-height: 180px;
    resize: vertical;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    outline: none;
    background: #fff;
    color: #101828;
    box-sizing: border-box;
    font-family: inherit;
    font-size: .98rem;
    line-height: 1.45;
}

.erp-ai-prompt:focus {
    box-shadow: inset 0 0 0 1px rgba(31, 94, 255, .28);
}

.erp-ai-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.erp-ai-pending-files {
    margin-top: -4px;
    padding-left: 8px;
}

.erp-ai-file-list span {
    padding: 5px 8px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 6px;
    background: #f8fafc;
    color: #475467;
    font-size: .82rem;
    font-weight: 650;
}

.erp-ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.erp-ai-send {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #101828;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.erp-ai-send:hover:not(:disabled) {
    background: #1f5eff;
}

.erp-ai-send:disabled {
    background: #d0d5dd;
    color: #fff;
    cursor: not-allowed;
    opacity: 1;
}

.erp-ai-typing {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    min-height: 20px;
}

.erp-ai-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #98a2b3;
    animation: erp-ai-typing 1.1s infinite ease-in-out;
}

.erp-ai-typing span:nth-child(2) {
    animation-delay: .15s;
}

.erp-ai-typing span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes erp-ai-typing {
    0%,
    80%,
    100% {
        opacity: .35;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.erp-home-workline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 2px;
}

.erp-home-workline-label {
    margin-right: 6px;
    color: #667085;
    font-size: .83rem;
    font-weight: 750;
    text-transform: uppercase;
}

.erp-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, .36);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    color: #1d2939;
    text-decoration: none;
}

.erp-home-link:hover {
    border-color: rgba(31, 94, 255, .38);
    color: #1f5eff;
}

.erp-home-link .erp-icon {
    width: 17px;
    height: 17px;
}

.erp-home-link span {
    font-size: .92rem;
    font-weight: 650;
}

@media (max-width: 1120px) {
    .erp-home-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .erp-home-metrics {
        grid-template-columns: 1fr;
    }

    .erp-ai-head {
        display: grid;
    }

    .erp-ai-confirmation {
        max-width: none;
        text-align: left;
    }

    .erp-ai-head-status {
        justify-items: start;
    }

    .erp-ai-thread {
        max-height: 480px;
        padding: 12px;
    }

    .erp-ai-message,
    .erp-ai-message-user {
        grid-template-columns: 1fr;
    }

    .erp-ai-avatar {
        display: none;
    }

    .erp-ai-message-user .erp-ai-bubble {
        grid-column: 1;
    }

    .erp-ai-action-fields {
        grid-template-columns: 1fr;
    }

    .erp-ai-module-grid {
        grid-template-columns: 1fr;
    }

    .erp-ai-composer {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }
}

.toolbar input {
    min-width: 320px;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
}

.toolbar button {
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #101828, #344054);
    color: #fff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #eaecf0;
}

.data-table th {
    font-size: .82rem;
    text-transform: uppercase;
    color: #667085;
}

@media (max-width: 800px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0;
}

.eyebrow {
    margin: 0 0 4px;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #667085;
    font-weight: 700;
}

.subhead {
    margin-top: 6px;
    color: #667085;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.badge,
.status,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .78rem;
    font-weight: 700;
}

.badge {
    background: #eef4ff;
    color: #3538cd;
}

.status-success {
    background: #ecfdf3;
    color: #027a48;
}

.status-danger {
    background: #fef3f2;
    color: #b42318;
}

.status-muted {
    background: #f2f4f7;
    color: #475467;
}

.form-control {
    width: 100%;
    box-sizing: border-box;
    min-height: 32px;
    border: 1px solid #d0d5dd;
    border-radius: 3px;
    background: #fff;
    color: #101828;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

input.form-control:not([type="color"]),
textarea.form-control {
    padding: 6px 9px;
}

select.form-control {
    padding: 0 30px 0 9px;
}

.form-control:focus {
    border-color: #344054;
    box-shadow: 0 0 0 4px rgba(52, 64, 84, .12);
}

.form-control:disabled {
    background: #f9fafb;
    color: #667085;
    cursor: not-allowed;
}

.form-control[type="color"] {
    width: 72px;
    min-height: 32px;
    padding: 5px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) 120px repeat(3, minmax(150px, auto)) auto;
    gap: 12px;
    align-items: end;
}

.filter-grid label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: #475467;
}

.check-line {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    margin: 0;
    white-space: nowrap;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(16, 24, 40, .12);
}

.btn-primary {
    background: #101828;
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: #344054;
    border-color: #d0d5dd;
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
}

.clickable-table tbody tr {
    cursor: pointer;
}

.clickable-table tbody tr:hover td {
    background: #f9fafb;
}

.strong {
    font-weight: 800;
}

.number-cell {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.muted-panel,
.danger-panel {
    margin-top: 16px;
}

.muted-panel,
.muted-text {
    color: #667085;
}

.danger-panel {
    color: #b42318;
    background: #fff4f2;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.kpi-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kpi-card span,
.definition-grid span {
    color: #667085;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.kpi-card strong {
    font-size: 1.2rem;
}

.detail-section {
    margin-bottom: 16px;
}

.detail-section h2 {
    margin: 0 0 14px;
    font-size: 1.1rem;
}

.definition-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 14px;
}

.definition-grid.single {
    grid-template-columns: 1fr;
}

.definition-grid div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.long-text {
    margin-top: 16px;
    padding: 14px;
    background: #f9fafb;
    border-radius: 12px;
    color: #475467;
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #f2f4f7;
    color: #344054;
}

.tag-primary {
    background: #eef4ff;
    color: #3538cd;
}

.compact-table th,
.compact-table td {
    padding: 10px 12px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.photo-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid #eaecf0;
    border-radius: 14px;
    background: #fcfcfd;
}

.photo-card span,
.photo-card small {
    color: #667085;
    overflow-wrap: anywhere;
}

.photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef4ff, #f9fafb);
    color: #3538cd;
    font-size: 1.5rem;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .filter-grid,
    .detail-grid,
    .definition-grid,
    .two-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .page-header,
    .header-actions,
    .filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-grid,
    .detail-grid,
    .definition-grid,
    .two-columns {
        grid-template-columns: 1fr;
    }
}

.master-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
    align-items: start;
}

.master-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.master-nav a {
    color: #344054;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
}

.master-nav a.active,
.master-nav a:hover {
    background: #eef4ff;
    color: #3538cd;
}

.master-toolbar {
    margin-bottom: 0;
}

.master-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 16px 18px;
}

.form-panel {
    background: linear-gradient(180deg, #fff, #fcfcfd);
}

.form-field {
    display: grid;
    grid-template-columns: minmax(82px, 108px) minmax(0, 1fr);
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
}

.form-field span {
    color: #475467;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    text-transform: none;
}

.form-field.span-2,
.form-field.checkbox-field,
div.form-field {
    grid-template-columns: minmax(82px, 108px) minmax(0, 1fr);
}

.ai-module-crud .ai-module-horizontal-field.form-field {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.ai-module-crud .ai-module-horizontal-field.form-field > span {
    margin: 0;
    text-align: right;
}

.ai-module-crud .ai-module-horizontal-field.form-field > .form-control {
    width: 100%;
    min-width: 0;
}

@media (max-width: 520px) {
    .ai-module-crud .ai-module-horizontal-field.form-field {
        grid-template-columns: minmax(110px, 140px) minmax(0, 1fr);
        gap: 8px;
    }
}

.store-menu-title-cell {
    display: flex;
    align-items: center;
    min-width: 0;
}

.store-menu-title-cell strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-menu-editor-card {
    overflow: hidden;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
}

.store-menu-editor-card h2 {
    margin: 0;
    padding: 15px 18px;
    border-bottom: 1px solid #d0d5dd;
    background: #f8fafc;
    color: #344054;
    font-size: 1rem;
    font-weight: 800;
}

.store-menu-form-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.45fr) minmax(100px, .45fr) minmax(260px, 1fr);
    gap: 16px 18px;
    padding: 18px;
    align-items: end;
}

.store-menu-form-grid .span-2 {
    grid-column: span 2;
}

.store-menu-popup .store-menu-form-grid .form-control,
.store-menu-popup .store-menu-form-grid .pro-native-input,
.store-menu-popup .store-menu-form-grid input,
.store-menu-popup .store-menu-form-grid select {
    min-height: 42px;
    height: 42px;
    padding: 8px 14px;
    line-height: 24px;
    box-sizing: border-box;
}

.store-menu-order-field .form-control {
    text-align: right;
}

.store-menu-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    align-self: stretch;
}

.store-menu-options > span {
    color: #475467;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.store-menu-option-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    min-height: 42px;
}

.store-menu-option-list label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #344054;
    font-weight: 700;
    white-space: nowrap;
}

.store-menu-option-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6a00;
}

.master-form-grid textarea {
    min-height: 110px;
    resize: vertical;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 15px 18px;
}

.inline-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.inline-picker .form-control {
    min-width: 0;
}

.settings-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-color-text {
    max-width: 120px;
    text-transform: uppercase;
}

.store-meta-description {
    min-height: 100px;
    height: 100px;
    resize: vertical;
}

.store-color-field {
    display: grid;
    grid-template-columns: 48px minmax(96px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.store-color-native {
    width: 48px;
    height: 42px;
    padding: 4px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.store-color-palette {
    position: relative;
}

.store-color-palette summary {
    height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.store-color-palette summary::-webkit-details-marker {
    display: none;
}

.store-color-palette[open] summary {
    border-color: #1f5eff;
    color: #1f5eff;
}

.store-color-palette[open] > :not(summary) {
    position: absolute;
    right: 0;
    z-index: 20;
    min-width: 260px;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}

.settings-file-input {
    padding: 8px 10px;
}

.settings-help {
    margin: 14px 0 0;
    color: #475467;
    font-size: .88rem;
}

.settings-actions {
    margin-top: 18px;
}

.settings-actions-top {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 14px;
}

.settings-preview {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-preview-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    border: 1px dashed #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #667085;
    font-weight: 700;
}

.settings-preview-logo img {
    max-width: 220px;
    max-height: 90px;
    object-fit: contain;
}

.settings-preview-header {
    padding: 10px 12px;
    border-radius: 6px;
    color: #101828;
    font-weight: 800;
    text-align: center;
}

.settings-preview-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #344054;
    font-size: .9rem;
    line-height: 1.35;
    text-align: center;
}

.store-settings-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.store-settings-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.store-param-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 15px 18px;
}

.store-settings-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    margin-top: 16px;
    color: #344054;
    font-weight: 700;
}

.store-settings-checks label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.store-settings-preview {
    position: sticky;
    top: 22px;
}

.store-preview-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 104px;
    padding: 16px;
}

.store-preview-header img {
    max-width: 220px;
    max-height: 76px;
    object-fit: contain;
}

.store-preview-links {
    display: flex;
    gap: 10px;
    color: #154aed;
}

.store-page-content-field {
    display: grid;
    gap: 8px;
}

.store-page-editor-toolbar,
.store-editor-toolbar {
    position: sticky;
    z-index: 3;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: -4px 0 16px;
    padding: 12px 14px;
    border: 1px solid #d9e2ef;
    border-radius: 10px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.store-page-editor-toolbar > div,
.store-editor-toolbar > div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.store-page-editor-toolbar > div:first-child,
.store-editor-toolbar > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
}

.store-page-editor-toolbar strong,
.store-editor-toolbar strong {
    color: #101828;
}

.store-page-editor-toolbar span,
.store-editor-toolbar span {
    color: #667085;
    font-size: .88rem;
}

.store-page-html-editor,
.store-page-html-editor .dxbl-html-editor,
.store-page-html-editor .dxbl-html-editor-content,
.store-page-html-editor .dxbl-html-editor-body {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 520px !important;
    box-sizing: border-box !important;
}

.span-2 {
    grid-column: span 2;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-title-row h2 {
    margin: 0;
}

.actions-cell {
    text-align: right !important;
    white-space: nowrap;
}

.btn-small {
    min-height: 34px;
    padding: 6px 10px;
    font-size: .85rem;
}

.btn-danger {
    background: #fff;
    color: #b42318;
    border-color: #fecdca;
}

@media (max-width: 1000px) {
    .master-layout,
    .master-form-grid,
    .settings-layout,
    .settings-form-grid {
        grid-template-columns: 1fr;
    }

    .store-param-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }
}

.master-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #101828;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.master-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 24, 40, .12);
}

.master-card span {
    font-size: 1.05rem;
    font-weight: 800;
}

.master-card small {
    color: #667085;
    line-height: 1.45;
}

.success-panel {
    border-color: #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.confirm-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.confirm-panel p {
    margin: 6px 0 0;
}

.data-table .btn + .btn {
    margin-left: 6px;
}

.search-panel {
    margin-bottom: 16px;
}

.form-panel .section-title-row {
    padding-bottom: 14px;
    border-bottom: 1px solid #eaecf0;
}

.form-panel .section-title-row h2 {
    font-size: 1.25rem;
}

.form-field:has(.form-control:required) span::after {
    content: " *";
    color: #b42318;
}


.dx-search-panel,
.grid-panel {
    padding: 18px;
}

.search-form-layout .dxflGroupCell,
.master-dx-form .dxflGroupCell {
    padding-bottom: 12px;
}

.search-button-item .dxbl-fl-cpt,
.search-button-item label {
    visibility: hidden;
}

.erp-grid {
    border-radius: 14px;
    font-size: .96rem;
    overflow: hidden;
}

.erp-grid .dxbl-grid-header-row {
    background: #f8fafc;
}

.grid-actions,
.popup-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.editor-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    color: #475467;
}

.editor-summary strong {
    color: #101828;
    font-variant-numeric: tabular-nums;
}

.master-dx-form {
    --dxbl-fl-item-caption-font-size: .82rem;
}

.dx-field-control,
.dx-check-line {
    width: 100%;
}

.dx-check-line {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #344054;
}

.color-input {
    max-width: 82px;
}

.confirm-popup p {
    margin: 0 0 8px;
    color: #475467;
}

.confirm-popup strong {
    color: #101828;
}

.confirm-popup .dxbl-popup,
.confirm-popup .dxbl-modal {
    max-width: min(520px, 94vw) !important;
    max-height: min(360px, 92vh) !important;
}

.confirm-popup .dxbl-popup-body,
.confirm-popup .dxbl-modal-body {
    overflow: visible !important;
}

.confirm-popup .dxbl-popup-footer,
.confirm-popup .dxbl-modal-footer,
.confirm-popup .dxbl-popup-footer-content {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 2 !important;
}

.confirm-popup .popup-actions {
    width: 100% !important;
    margin-top: 0 !important;
}

.confirm-popup .popup-actions .dxbl-btn {
    min-width: 96px !important;
    visibility: visible !important;
    opacity: 1 !important;
}


.grid-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #667085;
    font-size: .84rem;
}

.grid-hint::before {
    content: "\21b5";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3538cd;
}

.erp-grid .dxbl-grid-table > tbody > tr {
    cursor: pointer;
}

.erp-grid .dxbl-grid-table > tbody > tr:hover > td {
    background: #f8fafc;
}

.master-editor-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pro-editor-summary {
    min-height: 74px;
    margin-bottom: 0;
    padding: 18px 20px;
    border: 1px solid rgba(53, 56, 205, .14);
    background:
        radial-gradient(circle at top left, rgba(53, 56, 205, .14), transparent 34%),
        linear-gradient(135deg, #ffffff, #f8fafc);
}

.editor-summary-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.editor-summary-main strong {
    font-size: 1.15rem;
}

.editor-kicker {
    color: #667085;
    font-size: .76rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.editor-code {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #101828;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.form-section-card {
    padding: 18px;
    border: 1px solid #eaecf0;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #fcfcfd);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.form-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eaecf0;
}

.form-section-heading span {
    display: block;
    color: #101828;
    font-size: 1rem;
}

.form-section-heading p {
    margin: 4px 0 0;
    color: #667085;
    font-size: .86rem;
}

.form-section-heading small {
    white-space: nowrap;
    color: #b42318;
    font-size: .78rem;
}

.pro-master-form .dxbl-fl-cpt {
    color: #475467;
    font-size: .78rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.pro-master-form .required-field .dxbl-fl-cpt {
    color: #101828;
}

.pro-master-form .readonly-field .dxbl-fl-cpt {
    color: #98a2b3;
}

.pro-native-input {
    border: 1px solid #d0d5dd;
    background: #fff;
}

.pro-native-input:disabled {
    background: #f9fafb;
    color: #667085;
}

.dx-check-line {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    background: #fcfcfd;
}

.side-group summary,
.side-group.nested summary,
.side-link {
    font-weight: 400 !important;
}

.master-editor-shell {
    gap: 10px;
}

.erp-record-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 7px 10px;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    background: #f7f9fb;
}

.erp-record-title {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.erp-record-title span {
    color: #667085;
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.erp-record-title strong {
    min-width: 0;
    color: #101828;
    font-size: .94rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-record-code {
    display: inline-flex;
    align-items: center;
    max-width: 260px;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid #cfd6e1;
    border-radius: 5px;
    background: #fff;
    color: #1d2939;
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-form-card {
    padding: 10px 12px 12px;
    border-radius: 8px;
    box-shadow: none;
    background: #fff;
}

.erp-form-note {
    margin: 0 0 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid #eaecf0;
    color: #667085;
    font-size: .76rem;
}

.erp-compact-form {
    width: 100%;
    min-width: 0;
}

.erp-compact-form .dxbl-fl .dxbl-row {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .35rem;
}

.erp-compact-form .dxbl-fl-ctrl,
.erp-compact-form .dxbl-fl-item,
.erp-compact-form .dxbl-fl-cpt {
    min-width: 0;
}

.pro-master-form .dxbl-fl-cpt,
.erp-compact-form .dxbl-fl-cpt {
    margin-bottom: 2px;
    color: #475467;
    font-size: .72rem;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
}

.dx-check-line {
    min-height: 30px !important;
    height: 30px;
    padding: 0 8px;
    border-radius: 5px;
    font-size: .84rem;
    box-sizing: border-box;
}

.color-input {
    width: 54px;
    max-width: 54px;
    height: 30px;
    min-height: 30px !important;
    padding: 2px;
}

.popup-actions {
    gap: 6px;
}

.grid-actions {
    gap: 5px;
}

.erp-grid .dxbl-grid-table > tbody > tr > td,
.erp-grid .dxbl-grid-table > thead > tr > th {
    padding-top: 6px;
    padding-bottom: 6px;
}

@media (max-width: 900px) {
    .erp-record-strip {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .erp-record-code {
        max-width: 100%;
    }
}

.product-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.product-main-panel {
    min-width: 0;
}

.product-side-panel {
    position: sticky;
    top: 12px;
    padding: 12px;
}

.product-image-box {
    display: grid;
    gap: 8px;
}

.product-image-empty {
    height: 190px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: rgba(255, 255, 255, .55);
    font-size: .8rem;
}

.product-flags {
    margin-top: 12px;
    display: grid;
    gap: 5px;
    font-size: .78rem;
}

.product-form-panel {
    padding: 10px 12px;
}

.erp-product-form .dxfl-groupbox-caption {
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}

.erp-product-form .dxfl-caption {
    font-size: .74rem;
    color: var(--muted);
    margin-bottom: 2px;
}

.erp-product-form input,
.erp-product-form textarea,
.product-tabs input,
.product-tabs textarea {
    box-sizing: border-box;
}

.html-editor-shell {
    margin-top: 10px;
}

.erp-field-label {
    display: block;
    margin: 0 0 5px;
    color: var(--muted);
    font-size: .74rem;
}

.product-html-editor {
    min-height: 360px;
    max-width: 100%;
}

.inline-checks {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 30px;
}

.left-actions {
    justify-content: flex-start;
}

.product-grid .dxbl-grid-table > tbody > tr {
    cursor: pointer;
}

@media (max-width: 980px) {
    .product-layout {
        grid-template-columns: 1fr;
    }

    .product-side-panel {
        position: static;
    }
}

.product-main-panel-full {
    width: 100%;
    min-width: 0;
}

.product-main-panel-full .product-tabs {
    width: 100%;
}

.form-note {
    margin-top: 10px;
    font-size: .78rem;
    color: var(--muted);
}

:root {
    --eliseo-primary: #1f5eff;
    --eliseo-primary-strong: #1647c7;
    --eliseo-primary-soft: #eef4ff;
    --eliseo-primary-border: #b8c9ff;
    --eliseo-border: #cfd7e6;
    --eliseo-text: #172033;
    --eliseo-muted: #667085;
}

body {
    font-family: Roboto, Inter, Aptos, "Helvetica Neue", Arial, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--eliseo-text);
}

.brand-title {
    font-weight: 650;
}

.badge {
    background: var(--eliseo-primary-soft);
    color: var(--eliseo-primary-strong);
    border: 1px solid var(--eliseo-primary-border);
}

.btn-primary,
.toolbar button {
    background: var(--eliseo-primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled),
.toolbar button:hover:not(:disabled) {
    background: var(--eliseo-primary-strong);
}

.btn-secondary,
.btn-danger,
.form-control,
.panel,
.data-table,
.erp-form-card,
.form-section-card,
.erp-record-strip {
    border-color: var(--eliseo-border);
}

.side-group summary:hover,
.side-link:hover,
.side-link.active {
    background: rgba(31, 94, 255, .16);
    color: #fff;
}

.master-nav a.active,
.master-nav a:hover,
.grid-hint::before,
.tag-primary {
    background: var(--eliseo-primary-soft);
    color: var(--eliseo-primary-strong);
}

.article-filter-panel {
    padding: 14px 16px 12px;
    margin-bottom: 14px;
    border-top: 3px solid var(--eliseo-primary);
}

.article-filter-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e4e9f2;
}

.article-filter-head strong {
    display: block;
    color: #111827;
    font-size: .95rem;
    font-weight: 650;
}

.article-filter-head span {
    display: block;
    margin-top: 2px;
    color: var(--eliseo-muted);
    font-size: .78rem;
}

.article-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.article-filter-form .dxbl-fl-cpt {
    color: #344054;
    font-size: .72rem;
}

.erp-filter-checks {
    min-height: 29px;
    padding-top: 2px;
    gap: 12px;
}

.erp-grid .dxbl-grid-filter-row td,
.erp-grid .dxbl-grid-header-row th {
    background: #f5f8ff;
}

.erp-grid .dxbl-grid-header-row th {
    color: #344054;
    border-bottom-color: var(--eliseo-primary-border);
}

.product-grid {
    border: 1px solid var(--eliseo-border);
}

.product-grid .dxbl-grid-table > tbody > tr:hover > td {
    background: #f7faff;
}

.status-success {
    background: #eaf4ff;
    color: #155eef;
}

@media (max-width: 800px) {
    .article-filter-head {
        flex-direction: column;
    }

    .article-filter-actions {
        width: 100%;
        justify-content: stretch;
    }
}

.seo-product-panel .dxbl-fl-cpt {
    color: var(--blue-700, #1d4ed8);
}

.report-viewer-panel {
    padding: 0;
    overflow: hidden;
    min-height: calc(100vh - 170px);
}

.eliseo-report-viewer {
    height: calc(100vh - 190px);
    min-height: 680px;
    border: 1px solid #c8d8ea;
}


.article-list-page {
    height: calc(100vh - 60px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.article-list-page > .page-header,
.article-list-page > .article-filter-panel {
    flex: 0 0 auto;
}

.article-grid-panel {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.article-grid-panel .grid-hint {
    flex: 0 0 auto;
}

.product-grid-stable {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.product-grid-stable .dxbl-grid,
.product-grid-stable.dxbl-grid {
    height: 100%;
    max-height: 100%;
}

.product-grid-stable .dxbl-grid-table td,
.product-grid-stable .dxbl-grid-table th,
.product-grid-stable td,
.product-grid-stable th {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.product-grid-stable .dxbl-grid-filter-row input,
.product-grid-stable .dxbl-grid-filter-row .dxbl-text-edit-input {
    min-width: 0;
}

.product-grid-stable .dxbl-grid-table > tbody > tr > td,
.product-grid-stable .dxbl-grid-table > thead > tr > th {
    padding-top: 8px;
    padding-bottom: 8px;
    line-height: 1.35;
    vertical-align: top;
}

@media (max-width: 1100px) {
    .article-list-page {
        height: auto;
        overflow: visible;
    }

    .article-grid-panel {
        overflow-x: auto;
    }
}

.article-filter-panel-compact {
    padding: 10px 12px;
}

.article-filter-head.compact {
    margin-bottom: 8px;
}

.article-simple-filter {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 105px auto;
    gap: 10px;
    align-items: end;
    min-width: 0;
}

.article-simple-filter label {
    display: block;
    margin: 0 0 3px;
    color: #475467;
    font-size: .72rem;
}

.article-search-box,
.article-limit-box {
    min-width: 0;
}

.article-switches {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 30px;
    font-size: .82rem;
}

.article-grid-panel {
    max-width: 100%;
}

.product-grid-stable,
.product-grid-stable .dxbl-grid-table {
    max-width: 100%;
}

.product-grid-stable .dxbl-grid-table td,
.product-grid-stable .dxbl-grid-table th {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.category-tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 12px;
    border-bottom: 1px solid #d9e0ea;
}

.category-tabs button {
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
    background: transparent;
    color: #475467;
    cursor: pointer;
}

.category-tabs button.active {
    background: #fff;
    border-color: #b8c0cc;
    color: #1f5eff;
}

.category-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 12px;
}

.upload-selector {
    min-width: 0;
    padding: 10px;
    border: 1px solid #d9e0ea;
    border-radius: 8px;
    background: #fff;
}

.upload-current {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.upload-preview {
    height: 84px;
    border: 1px dashed #b8c0cc;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: #f8fafc;
    overflow: hidden;
    color: #667085;
    font-size: .78rem;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.upload-current-info label {
    display: block;
    margin-bottom: 4px;
    font-size: .75rem;
    color: #475467;
}

.upload-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: .82rem;
}

.upload-actions-row input[type="file"] {
    max-width: 210px;
    font-size: .8rem;
}

.upload-message {
    margin-bottom: 8px;
    color: #475467;
    font-size: .78rem;
}

.upload-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 8px;
    max-height: 230px;
    overflow: auto;
}

.upload-thumb {
    padding: 4px;
    border: 1px solid #d9e0ea;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.upload-thumb.selected {
    border-color: #1f5eff;
    box-shadow: 0 0 0 2px rgba(31, 94, 255, .12);
}

.upload-thumb img {
    display: block;
    width: 100%;
    height: 58px;
    object-fit: cover;
    border-radius: 4px;
    background: #f3f5f8;
}

.upload-thumb span {
    display: block;
    margin-top: 3px;
    color: #475467;
    font-size: .68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .article-simple-filter,
    .category-media-grid {
        grid-template-columns: 1fr;
    }
}

.media-manager {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.media-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid #d7dde7;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 12px;
}

.media-toolbar strong {
    display: block;
    font-size: .95rem;
    color: #17202a;
}

.media-toolbar span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    margin-top: 2px;
}

.media-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.media-input-file {
    position: fixed;
    left: -10000px;
    top: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.media-upload-button {
    cursor: pointer;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    white-space: nowrap;
    overflow: hidden;
}

.media-message {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: .82rem;
}

.media-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 14px;
    min-height: 420px;
}

.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
    align-content: start;
    max-height: 560px;
    overflow: auto;
    padding: 2px;
}

.media-gallery.media-banner-mode {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.media-gallery.media-icon-mode {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

.media-card {
    border: 1px solid #d7dde7;
    background: #fff;
    border-radius: 10px;
    padding: 7px;
    text-align: left;
    cursor: pointer;
    min-width: 0;
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.media-card:hover,
.media-card.selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.media-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: linear-gradient(45deg, #f1f5f9 25%, #e2e8f0 25%, #e2e8f0 50%, #f1f5f9 50%, #f1f5f9 75%, #e2e8f0 75%);
    background-size: 18px 18px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.media-banner-mode .media-preview,
.media-picker-banner {
    aspect-ratio: 3.2 / 1;
}

.media-icon-mode .media-preview,
.media-picker-icon {
    aspect-ratio: 1 / 1;
}

.media-preview img,
.media-selected-preview img,
.media-picker-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.media-document-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 72px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-weight: 800;
    font-size: .9rem;
    letter-spacing: .04em;
    box-shadow: 0 10px 18px rgba(15, 23, 42, .12);
}

.media-document-preview-large {
    width: 86px;
    height: 108px;
    font-size: 1.1rem;
}

.media-name,
.media-meta {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-name {
    font-size: .78rem;
    color: #1f2937;
}

.media-meta {
    font-size: .72rem;
    color: #64748b;
}

.media-detail {
    border: 1px solid #d7dde7;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    min-width: 0;
}

.media-selected-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.media-detail dl {
    margin: 0 0 12px;
    font-size: .78rem;
}

.media-detail dt {
    color: #64748b;
    margin-top: 8px;
}

.media-detail dd {
    margin: 2px 0 0;
    color: #1f2937;
    word-break: break-all;
}

.media-empty,
.media-empty-detail {
    border: 1px dashed #cbd5e1;
    color: #64748b;
    border-radius: 10px;
    padding: 18px;
    background: #f8fafc;
}

.media-picker {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.media-picker-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border: 1px solid #d7dde7;
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
    color: #64748b;
    font-size: .78rem;
    min-width: 0;
}

.media-picker-preview.image-error {
    border-color: #f1b8b8;
    background: #fff7f7;
}

.media-picker-info {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.media-picker-info label {
    display: block;
    margin-bottom: 4px;
    font-size: .78rem;
    color: #475569;
}

.media-picker-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.grid-icon-actions {
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.grid-icon-actions .erp-row-icon-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 4px;
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #344054;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.grid-icon-actions .erp-row-icon-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #101828;
}

.grid-icon-actions .line-delete-button {
    color: #b42318;
}

.grid-icon-actions .line-delete-button:hover {
    border-color: #fda29b;
    background: #fff1f3;
    color: #912018;
}

.header-actions .dxbl-btn:has(.dx-icon-plus),
.list-toolbar-actions .dxbl-btn:has(.dx-icon-plus) {
    border-color: #f97316 !important;
    background: #f97316 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(249, 115, 22, .18) !important;
}

.header-actions .dxbl-btn:has(.dx-icon-plus):hover,
.list-toolbar-actions .dxbl-btn:has(.dx-icon-plus):hover {
    border-color: #ea580c !important;
    background: #ea580c !important;
    color: #fff !important;
}

.header-actions .dxbl-btn:has(.dx-icon-exportxlsx),
.list-toolbar-actions .dxbl-btn:has(.dx-icon-exportxlsx) {
    border-color: #17803d !important;
    background: #17803d !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(23, 128, 61, .16) !important;
}

.header-actions .dxbl-btn:has(.dx-icon-exportxlsx):hover,
.list-toolbar-actions .dxbl-btn:has(.dx-icon-exportxlsx):hover {
    border-color: #146c33 !important;
    background: #146c33 !important;
    color: #fff !important;
}

.header-actions .dxbl-btn:has(.dx-icon-exportpdf),
.list-toolbar-actions .dxbl-btn:has(.dx-icon-exportpdf) {
    border-color: #d92d20 !important;
    background: #d92d20 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(217, 45, 32, .16) !important;
}

.header-actions .dxbl-btn:has(.dx-icon-exportpdf):hover,
.list-toolbar-actions .dxbl-btn:has(.dx-icon-exportpdf):hover {
    border-color: #b42318 !important;
    background: #b42318 !important;
    color: #fff !important;
}

.header-actions .dxbl-btn:has(.dx-icon-plus) .dxbl-btn-caption,
.header-actions .dxbl-btn:has(.dx-icon-plus) .dxbl-image,
.header-actions .dxbl-btn:has(.dx-icon-plus) [class*="dx-icon"],
.list-toolbar-actions .dxbl-btn:has(.dx-icon-plus) .dxbl-btn-caption,
.list-toolbar-actions .dxbl-btn:has(.dx-icon-plus) .dxbl-image,
.list-toolbar-actions .dxbl-btn:has(.dx-icon-plus) [class*="dx-icon"],
.header-actions .dxbl-btn:has(.dx-icon-exportxlsx) .dxbl-btn-caption,
.header-actions .dxbl-btn:has(.dx-icon-exportxlsx) .dxbl-image,
.header-actions .dxbl-btn:has(.dx-icon-exportxlsx) [class*="dx-icon"],
.list-toolbar-actions .dxbl-btn:has(.dx-icon-exportxlsx) .dxbl-btn-caption,
.list-toolbar-actions .dxbl-btn:has(.dx-icon-exportxlsx) .dxbl-image,
.list-toolbar-actions .dxbl-btn:has(.dx-icon-exportxlsx) [class*="dx-icon"],
.header-actions .dxbl-btn:has(.dx-icon-exportpdf) .dxbl-btn-caption,
.header-actions .dxbl-btn:has(.dx-icon-exportpdf) .dxbl-image,
.header-actions .dxbl-btn:has(.dx-icon-exportpdf) [class*="dx-icon"],
.list-toolbar-actions .dxbl-btn:has(.dx-icon-exportpdf) .dxbl-btn-caption,
.list-toolbar-actions .dxbl-btn:has(.dx-icon-exportpdf) .dxbl-image,
.list-toolbar-actions .dxbl-btn:has(.dx-icon-exportpdf) [class*="dx-icon"] {
    color: #fff !important;
    fill: #fff !important;
}

.header-actions .dxbl-btn:disabled,
.list-toolbar-actions .dxbl-btn:disabled,
.header-actions .dxbl-btn.dxbl-disabled,
.list-toolbar-actions .dxbl-btn.dxbl-disabled {
    opacity: .55 !important;
    box-shadow: none !important;
}

.erp-grid .grid-icon-actions {
    gap: 8px;
}

.erp-grid .grid-icon-actions .erp-row-icon-btn,
.master-selector-grid .grid-icon-actions .erp-row-icon-btn,
.operations-task-list-grid .grid-icon-actions .erp-row-icon-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
}

.erp-grid .grid-icon-actions .erp-row-icon-btn .erp-icon,
.master-selector-grid .grid-icon-actions .erp-row-icon-btn .erp-icon,
.operations-task-list-grid .grid-icon-actions .erp-row-icon-btn .erp-icon {
    width: 16px !important;
    height: 16px !important;
}

.category-media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.media-page-panel {
    padding: 14px;
}

.product-images-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
}

.product-media-library {
    min-width: 0;
}

.article-simple-filter {
    grid-template-columns: minmax(260px, 1fr) 110px auto;
    align-items: end;
}

.article-list-page,
.article-grid-panel,
.product-grid,
.erp-grid {
    max-width: 100%;
    min-width: 0;
}

.article-grid-panel {
    overflow: hidden;
}

.product-grid .dxbl-grid-table {
    width: 100%;
}

@media (max-width: 1100px) {
    .media-layout,
    .product-images-layout {
        grid-template-columns: 1fr;
    }

    .media-toolbar {
        flex-direction: column;
    }

    .media-toolbar-actions {
        justify-content: flex-start;
    }

    .article-simple-filter {
        grid-template-columns: 1fr;
    }
}

.category-media-grid {
    align-items: start;
}

.media-picker {
    width: 100%;
    min-width: 0;
}

.media-picker-preview {
    min-height: 120px;
    border: 1px solid #d0d7e2;
    background: linear-gradient(45deg, #f8fafc 25%, #eef2f7 25%, #eef2f7 50%, #f8fafc 50%, #f8fafc 75%, #eef2f7 75%);
    background-size: 18px 18px;
}

.media-picker-banner,
.media-banner-mode .media-preview {
    aspect-ratio: 5 / 1 !important;
    min-height: 96px;
}

.category-banner-picker .media-picker-preview,
.category-banner-picker .media-picker-banner {
    aspect-ratio: 5 / 1 !important;
    min-height: 110px;
}

.product-images-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.product-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 12px;
    align-items: start;
}

.product-photo-card {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 10px;
    border: 1px solid #cfd7e6;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    min-width: 0;
}

.product-photo-card.is-main {
    border-color: #7d8898;
    box-shadow: inset 3px 0 0 #6b7280;
}

.product-photo-preview {
    aspect-ratio: 1 / 1;
    border: 1px solid #d0d7e2;
    background: #f4f6f9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #667085;
    font-size: .76rem;
}

.product-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-photo-fields {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.product-photo-fields .media-picker {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.product-photo-fields .media-picker-preview {
    min-height: 96px;
    aspect-ratio: 1 / 1;
}

.product-photo-fields .media-picker-info label {
    display: none;
}

.product-photo-fields .media-picker-actions {
    margin-top: 5px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.product-photo-options {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.product-photo-options .photo-order {
    width: 82px;
}

.product-photo-actions {
    display: flex;
    justify-content: flex-end;
}

.empty-media-state {
    border: 1px dashed #c9d2df;
    background: #f8fafc;
    color: #667085;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

@media (max-width: 820px) {
    .product-photo-grid {
        grid-template-columns: 1fr;
    }

    .product-photo-card {
        grid-template-columns: 1fr;
    }
}

.reference-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.category-banner-picker .media-picker {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    align-items: stretch !important;
}

.category-banner-picker .media-picker-preview,
.category-banner-picker .media-picker-banner {
    width: 100% !important;
    min-height: 132px !important;
    aspect-ratio: 6 / 1 !important;
}

.category-banner-picker .media-picker-info {
    width: 100% !important;
    min-width: 0 !important;
}

.category-banner-picker .media-picker-actions {
    justify-content: flex-start;
}

.product-add-photo-panel {
    border: 1px solid #cbd3df;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.product-add-photo-panel .media-picker {
    grid-template-columns: 120px minmax(0, 1fr);
}

@media (max-width: 900px) {
    .product-add-photo-panel,
    .reference-input-row {
        grid-template-columns: 1fr;
    }
}


.list-toolbar-panel {
    padding: 12px 14px;
}

.list-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
}

.master-list-toolbar {
    grid-template-columns: minmax(260px, 1fr) auto;
}

.list-toolbar label {
    display: block;
    margin: 0 0 4px;
    font-size: .78rem;
    color: var(--muted);
}

.list-toolbar-search,
.list-toolbar-limit,
.list-toolbar-actions,
.list-toolbar-checks {
    min-width: 0;
}

.list-toolbar-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    align-self: end;
    min-height: 42px;
    padding-bottom: 0;
}

.list-toolbar-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-self: end;
}

.erp-grid {
    max-width: 100%;
}

.erp-grid .dxbl-grid-table {
    width: 100%;
}

.erp-grid .dxbl-grid-header-row .dxbl-grid-header-content {
    min-width: 0;
}

.side-group summary,
.side-link {
    font-weight: 400 !important;
}

@media (max-width: 1180px) {
    .list-toolbar {
        grid-template-columns: 1fr 120px;
    }

    .list-toolbar-checks,
    .list-toolbar-actions {
        grid-column: 1 / -1;
    }

    .list-toolbar-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .list-toolbar,
    .master-list-toolbar {
        grid-template-columns: 1fr;
    }
}

/* DevExpress controls use the official Office White theme.
   Keep only outer layout spacing here; do not override internal buttons, inputs or paddings. */
.erp-air-form {
    --erp-field-height: 32px;
}

.erp-air-form .dxbl-fl .dxbl-row {
    row-gap: 18px !important;
}

.erp-air-form .dxbl-fl-cpt,
.erp-air-form .dxfl-caption,
.erp-field-label {
    display: block;
    width: 100%;
    padding-bottom: 6px;
    white-space: normal;
    line-height: 1.25;
    color: #334155;
    font-weight: 500;
}

.erp-air-form .dxbl-fl-ctrl {
    width: 100%;
    min-width: 0;
}

.erp-air-form .pro-native-input,
.erp-air-form .numeric-text-input {
    width: 100%;
    min-height: var(--erp-field-height);
    padding: 6px 9px;
    font-size: 14px;
    box-sizing: border-box;
}

.erp-form-card,
.product-form-panel {
    padding: 18px 20px 20px !important;
}

.product-main-panel-full {
    max-width: 100% !important;
}

.grid-panel,
.article-grid-panel {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

.erp-grid-fluid,
.erp-grid-fluid .dxbl-grid,
.erp-grid-fluid .dxbl-grid-table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}

.erp-grid-fluid .dxbl-grid-table th,
.erp-grid-fluid .dxbl-grid-table td {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

.erp-grid-fluid .dxbl-grid-cell,
.erp-grid-fluid .dxbl-grid-header-content {
    min-width: 0 !important;
    max-width: 100% !important;
}

@media (max-width: 1100px) {
    .erp-air-form .dxbl-fl .dxbl-row {
        row-gap: 14px !important;
    }

    .page-header.product-page-header,
    .page-header {
        gap: 16px;
        align-items: flex-start;
    }
}

.erp-air-form {
    --erp-field-height: 32px;
}

.erp-air-form .dxbl-fl .dxbl-row {
    row-gap: 18px !important;
}

.erp-air-form .dxbl-fl-cpt,
.erp-air-form .dxfl-caption,
.erp-field-label {
    display: block;
    width: 100%;
    padding-bottom: 6px;
    white-space: normal;
    line-height: 1.25;
    color: #334155;
    font-weight: 500;
}

.erp-air-form .dxbl-fl-ctrl {
    width: 100%;
    min-width: 0;
}

.erp-air-form .dxbl-text-edit,
.erp-air-form .dxbl-combobox,
.erp-air-form .dxbl-spin-edit,
.erp-air-form .dxbl-date-edit,
.erp-air-form .dxbl-memo {
    width: 100%;
    max-width: 100%;
}

.erp-air-form .pro-native-input,
.erp-air-form .numeric-text-input {
    width: 100%;
    min-height: var(--erp-field-height);
    padding: 7px 12px;
    font-size: 14px;
    box-sizing: border-box;
}

.erp-air-form .dxbl-memo {
    min-height: 96px;
}

.erp-grid-fluid,
.erp-grid-fluid .dxbl-grid {
    width: 100%;
    max-width: 100%;
}

.erp-grid-fluid .dxbl-grid-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

.erp-grid-fluid .dxbl-grid-table th,
.erp-grid-fluid .dxbl-grid-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}


.product-html-editor {
    min-height: 520px;
}

.reference-input-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.product-tabs .dxbl-tabs-item,
.product-tabs .dxbl-tabs-tab {
    min-width: fit-content;
}

.product-tabs .dxbl-tabs-tablist {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 6px 10px !important;
    overflow: visible !important;
    padding-bottom: 4px !important;
}

.product-tabs .dxbl-tabs-tab,
.product-tabs .dxbl-tabs-item {
    min-height: 40px !important;
    overflow: visible !important;
}

.product-photo-options .photo-order {
    width: 120px;
}
.erp-air-form .dxbl-text-edit,
.erp-air-form .dxbl-combobox,
.erp-air-form .dxbl-date-edit,
.erp-air-form .dxbl-memo,
.erp-native-input {
    border-radius: 6px !important;
    min-height: 38px;
}

.erp-native-input {
    display: block;
    width: 100%;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    padding: 7px 11px;
    font: inherit;
    box-sizing: border-box;
    outline: none;
}

.erp-native-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.erp-number-input {
    text-align: right;
}

.erp-air-form .dxbl-checkbox,
.erp-air-form .dxbl-check-edit,
.list-toolbar-checks .dxbl-checkbox,
.list-toolbar-checks .dxbl-check-edit {
    align-items: center;
    min-height: 38px;
}

.product-form-panel .dxbl-fl-gd > .dxbl-fl-gd-header,
.product-form-panel .dxbl-fl-group-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.product-html-editor {
    min-height: 620px !important;
}

.product-html-source .dxbl-memo-input,
.product-html-source textarea {
    min-height: 620px !important;
    font-family: Consolas, Monaco, monospace;
    line-height: 1.45;
}

.html-detail-tabs .dxbl-tabs-content-panel {
    padding-top: 14px;
}

.grid-panel,
.article-grid-panel {
    overflow: hidden !important;
}

.erp-grid,
.erp-grid .dxbl-grid,
.erp-grid .dxbl-grid-container,
.erp-grid .dxbl-grid-table {
    width: 100% !important;
    max-width: 100% !important;
}

.erp-grid .dxbl-grid-table {
    table-layout: fixed !important;
}

.erp-grid .dxbl-grid-table th,
.erp-grid .dxbl-grid-table td,
.erp-grid .dxbl-grid-cell,
.erp-grid .dxbl-grid-header-content {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.erp-grid .dxbl-grid-table > tbody > tr > td {
    height: 44px;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
}

.erp-grid .dxbl-grid-filter-row td {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

@media (max-width: 1200px) {
    .erp-air-form .dxbl-fl .dxbl-col-md-3,
    .erp-air-form .dxbl-fl .dxbl-col-md-4,
    .erp-air-form .dxbl-fl .dxbl-col-md-5,
    .erp-air-form .dxbl-fl .dxbl-col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

.product-main-panel,
.product-main-panel-full,
.product-tabs,
.product-tabs .dxbl-tabs,
.product-tabs .dxbl-tabs-content,
.product-tabs .dxbl-tabs-content-panel,
.html-editor-shell,
.html-detail-tabs,
.html-detail-tabs .dxbl-tabs,
.html-detail-tabs .dxbl-tabs-content,
.html-detail-tabs .dxbl-tabs-content-panel,
.product-html-editor,
.product-html-source,
.product-html-source .dxbl-memo-input,
.product-html-source textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.product-html-source textarea,
.product-html-source .dxbl-memo-input {
    resize: vertical;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.header-actions .dxbl-btn,
.list-toolbar-actions .dxbl-btn,
.product-photo-actions .dxbl-btn {
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
}

.header-actions .dxbl-btn .dxbl-btn-caption,
.list-toolbar-actions .dxbl-btn .dxbl-btn-caption,
.product-photo-actions .dxbl-btn .dxbl-btn-caption {
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-native-input[type=number]::-webkit-outer-spin-button,
.erp-native-input[type=number]::-webkit-inner-spin-button,
.product-tabs input[type=number]::-webkit-outer-spin-button,
.product-tabs input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.erp-native-input[type=number],
.product-tabs input[type=number] {
    -moz-appearance: textfield;
}

.process-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 24, 40, .28);
    backdrop-filter: blur(2px);
}

.process-loader-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 260px;
    padding: 18px 22px;
    border-radius: 18px;
    background: #fff;
    color: #17202a;
    font-weight: 700;
    box-shadow: 0 22px 60px rgba(16, 24, 40, .22);
}

.process-loader-spinner {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 3px solid #d0d5dd;
    border-top-color: #101828;
    animation: process-loader-spin .75s linear infinite;
}

@keyframes process-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.client-modern-page {
    max-width: 1180px;
    overflow: hidden;
}

.client-tabs,
.client-tabs .dxbl-tabs-content,
.client-tabs .dxbl-tabs-tabpane,
.client-tabs .dxbl-tabs-content-panel {
    max-width: 100%;
    overflow-x: hidden;
}

.client-linear-card {
    max-width: 860px;
}

.client-address-card {
    max-width: 960px;
}

.client-linear-form .dxbl-fl-gd,
.client-linear-form .dxbl-fl-group-content {
    max-width: 100%;
}

.client-linear-form .dxbl-fl-cpt {
    white-space: normal;
}

.client-address-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.client-address-item {
    padding: 18px;
    border: 1px solid #eaecf0;
    border-radius: 18px;
    background: #fcfcfd;
    margin-bottom: 18px;
}

.client-address-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.condition-grid-vertical {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.dxbl-btn,
.dx-button,
.header-actions .dxbl-btn,
.list-toolbar-actions .dxbl-btn {
    max-width: 100%;
}

.dxbl-btn .dxbl-btn-caption,
.dx-button .dx-button-content,
.header-actions .dxbl-btn .dxbl-btn-caption,
.list-toolbar-actions .dxbl-btn .dxbl-btn-caption {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .client-address-header,
    .client-address-title {
        flex-direction: column;
        align-items: stretch;
    }

    .client-linear-card,
    .client-address-card {
        max-width: 100%;
    }
}

.client-page-header,
.client-modern-page,
.client-form-card,
.client-address-card {
    width: 100%;
    max-width: none;
}

.client-modern-page {
    overflow: visible;
}

.client-tabs,
.client-tabs .dxbl-tabs-content,
.client-tabs .dxbl-tabs-tabpane,
.client-tabs .dxbl-tabs-content-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.client-form-card,
.client-address-card {
    margin-left: 0;
    margin-right: 0;
}

.client-smart-form .dxbl-fl-i {
    align-items: flex-start;
}

.field-xs,
.field-serie {
    width: 72px;
    max-width: 100%;
}

.field-code {
    width: 120px;
    max-width: 100%;
}

.field-cp {
    width: 140px;
    max-width: 100%;
}

.field-phone,
.field-nif {
    width: 190px;
    max-width: 100%;
}

.field-sm {
    width: 220px;
    max-width: 100%;
}

.field-md {
    width: 320px;
    max-width: 100%;
}

.field-money {
    width: 170px;
    max-width: 100%;
}

.field-lg {
    width: 520px;
    max-width: 100%;
}

.field-xl {
    width: min(860px, 100%);
    max-width: 100%;
}

.client-smart-form input,
.client-smart-form .dxbl-text-edit,
.client-smart-form .dxbl-combobox,
.client-smart-form .dxbl-memo,
.client-smart-form textarea {
    max-width: 100%;
}

.client-address-list {
    display: grid;
    gap: 12px;
}

.client-address-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid #eaecf0;
    border-radius: 16px;
    background: #fcfcfd;
}

.address-main {
    min-width: 0;
}

.address-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.address-text,
.address-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #667085;
    font-size: .92rem;
}

.address-meta {
    margin-top: 3px;
}

.default-pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3538cd;
    font-size: .78rem;
    font-weight: 700;
}

.address-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.empty-list-card {
    padding: 18px;
    border: 1px dashed #d0d5dd;
    border-radius: 16px;
    color: #667085;
    background: #f9fafb;
}

.condition-grid-wrap {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 24px;
}

.compact-options-card {
    margin-top: 18px;
}

.address-popup .dxbl-popup-body {
    overflow-x: hidden;
}

@media (max-width: 900px) {
    .client-address-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .address-actions {
        justify-content: flex-start;
    }

    .address-text,
    .address-meta {
        white-space: normal;
    }
}

.content {
    overflow-x: hidden;
}

.erp-page {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    box-sizing: border-box;
}

.erp-page > .page-header,
.erp-page > .product-main-panel,
.erp-page > .product-main-panel-full,
.erp-page > .panel,
.erp-page > .grid-panel,
.erp-page > .article-grid-panel,
.erp-page > section {
    max-width: 100%;
    box-sizing: border-box;
}

.erp-form-card,
.form-section-card,
.product-form-panel,
.panel {
    max-width: 100%;
    box-sizing: border-box;
}

.erp-air-form .dxbl-fl-ctrl,
.erp-air-form .dxbl-fl-item,
.erp-air-form .dxbl-fl-cpt {
    min-width: 0 !important;
}

.field-xs,
.field-serie {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 100% !important;
}

.field-code {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 100% !important;
}

.field-cp {
    width: 125px !important;
    min-width: 125px !important;
    max-width: 100% !important;
}

.field-phone,
.field-nif {
    width: 210px !important;
    min-width: 180px !important;
    max-width: 100% !important;
}

.field-sm {
    width: 220px !important;
    min-width: 180px !important;
    max-width: 100% !important;
}

.field-md {
    width: 330px !important;
    min-width: 240px !important;
    max-width: 100% !important;
}

.field-money {
    width: 180px !important;
    min-width: 150px !important;
    max-width: 100% !important;
}

.field-lg {
    width: 520px !important;
    min-width: 280px !important;
    max-width: 100% !important;
}

.field-xl,
.field-full {
    width: 100% !important;
    min-width: 320px !important;
    max-width: 900px !important;
}

.field-xs .dxbl-text-edit,
.field-xs .dxbl-combobox,
.field-serie .dxbl-text-edit,
.field-serie .dxbl-combobox,
.field-code .dxbl-text-edit,
.field-code .dxbl-combobox,
.field-cp .dxbl-text-edit,
.field-cp .dxbl-combobox,
.field-phone .dxbl-text-edit,
.field-phone .dxbl-combobox,
.field-nif .dxbl-text-edit,
.field-nif .dxbl-combobox,
.field-sm .dxbl-text-edit,
.field-sm .dxbl-combobox,
.field-md .dxbl-text-edit,
.field-md .dxbl-combobox,
.field-money .dxbl-text-edit,
.field-money .dxbl-combobox,
.field-lg .dxbl-text-edit,
.field-lg .dxbl-combobox,
.field-xl .dxbl-text-edit,
.field-xl .dxbl-combobox,
.field-full .dxbl-text-edit,
.field-full .dxbl-combobox {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.client-modern-page {
    max-width: 1180px !important;
    width: 100% !important;
    overflow: visible !important;
}

.client-page-header {
    max-width: 1180px !important;
}

.client-form-card,
.client-address-card {
    width: 100% !important;
    max-width: 1180px !important;
}

.client-tabs,
.client-tabs .dxbl-tabs,
.client-tabs .dxbl-tabs-content,
.client-tabs .dxbl-tabs-content-panel,
.client-tabs .dxbl-tabs-tabpane {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.address-popup .dxbl-popup,
.address-popup .dxbl-popup-content {
    max-width: 96vw !important;
}

.erp-grid,
.erp-grid-fluid,
.grid-panel,
.article-grid-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.grid-panel,
.article-grid-panel,
.erp-grid-wrap {
    overflow-x: auto !important;
    overflow-y: visible;
}

.erp-grid .dxbl-grid,
.erp-grid-fluid .dxbl-grid,
.erp-grid .dxbl-grid-container,
.erp-grid-fluid .dxbl-grid-container {
    max-width: 100% !important;
    min-width: 0 !important;
}

.erp-grid .dxbl-grid-table,
.erp-grid-fluid .dxbl-grid-table {
    width: 100% !important;
    table-layout: fixed !important;
}

.erp-grid .dxbl-grid-table th,
.erp-grid .dxbl-grid-table td,
.erp-grid-fluid .dxbl-grid-table th,
.erp-grid-fluid .dxbl-grid-table td {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.erp-grid .dxbl-grid-filter-row input,
.erp-grid-fluid .dxbl-grid-filter-row input,
.erp-grid .dxbl-grid-filter-row .dxbl-text-edit-input,
.erp-grid-fluid .dxbl-grid-filter-row .dxbl-text-edit-input {
    min-width: 0 !important;
}

.header-actions,
.list-toolbar-actions,
.popup-actions,
.address-actions {
    min-width: 0;
}

.header-actions .dxbl-btn,
.list-toolbar-actions .dxbl-btn,
.popup-actions .dxbl-btn,
.address-actions .dxbl-btn {
    min-width: 76px;
    max-width: 150px;
}

.header-actions .dxbl-btn .dxbl-btn-caption,
.list-toolbar-actions .dxbl-btn .dxbl-btn-caption,
.popup-actions .dxbl-btn .dxbl-btn-caption,
.address-actions .dxbl-btn .dxbl-btn-caption {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 1500px) {
    .erp-page {
        max-width: 1360px;
    }
}

@media (max-width: 1200px) {
    .erp-page {
        max-width: 100%;
    }

    .field-xs,
    .field-serie,
    .field-code,
    .field-cp,
    .field-phone,
    .field-nif,
    .field-sm,
    .field-md,
    .field-money,
    .field-lg,
    .field-xl,
    .field-full {
        min-width: 0 !important;
    }
}

.sap-page-header,
.sap-master-card {
    width: min(100%, 1240px) !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

.sap-page-header {
    align-items: flex-start;
}

.sap-master-card {
    background: #fff;
    border: 1px solid #d0d7e2;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
    padding: 22px;
    overflow: hidden;
}

.sap-card-title,
.sap-section-title {
    color: #10233f;
    font-weight: 700;
}

.sap-card-title {
    font-size: 1.05rem;
    margin-bottom: 18px;
}

.sap-section-title {
    font-size: .95rem;
    margin-bottom: 14px;
}

.sap-section {
    border-top: 1px solid #e4e9f0;
    padding: 20px 0 4px;
    margin-top: 4px;
    max-width: 100%;
    overflow: hidden;
}

.sap-section:first-child {
    border-top: 0;
}

.sap-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.sap-tabs {
    display: block;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-top: 22px;
}

.sap-tabs .dxbl-tabs,
.sap-tabs .dxbl-tabs-tablist,
.sap-tabs .dxbl-tabs-content,
.sap-tabs .dxbl-tabs-content-panel,
.sap-tabs .dxbl-tabs-tabpane {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

.sap-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px 24px;
    align-items: end;
    max-width: 100%;
}

.sap-popup-form {
    padding: 4px 2px 12px;
}

.sap-form-master {
    padding-bottom: 8px;
}

.sap-form-numbers {
    grid-template-columns: repeat(12, minmax(72px, 1fr));
}

.sap-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    box-sizing: border-box;
}

.sap-field > label {
    color: #344054;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.15;
    min-height: 15px;
}

.sap-field-xs { grid-column: span 1; min-width: 82px; max-width: 110px; }
.sap-field-day { grid-column: span 1; min-width: 90px; max-width: 110px; }
.sap-field-percent { grid-column: span 2; min-width: 126px; max-width: 160px; }
.sap-field-code { grid-column: span 2; min-width: 140px; max-width: 180px; }
.sap-field-cp { grid-column: span 2; min-width: 130px; max-width: 160px; }
.sap-field-ref { grid-column: span 5; min-width: 280px; max-width: 520px; }
.sap-field-short { grid-column: span 3; min-width: 180px; max-width: 260px; }
.sap-field-phone { grid-column: span 2; min-width: 160px; max-width: 210px; }
.sap-field-date { grid-column: span 2; min-width: 170px; max-width: 210px; }
.sap-field-money { grid-column: span 2; min-width: 150px; max-width: 190px; }
.sap-field-medium { grid-column: span 4; min-width: 250px; max-width: 360px; }
.sap-field-long { grid-column: span 6; min-width: 360px; max-width: 560px; }
.sap-field-full { grid-column: 1 / -1; min-width: 0; max-width: 940px; }
.sap-field-check { grid-column: span 3; min-width: 180px; max-width: 280px; }
.sap-field-button { grid-column: span 2; min-width: 120px; max-width: 150px; }

.commercial-form {
    gap: 14px;
}

.commercial-form .form-section {
    border: 1px solid #d9e1ea;
    border-radius: 6px;
    background: #fff;
    padding: 14px 16px 16px;
}

.commercial-form .form-section-title {
    margin: 0 0 12px;
    color: #1d2939;
    font-size: .94rem;
    font-weight: 700;
}

.commercial-section-grid {
    gap: 12px 18px;
}

.commercial-section-grid .sap-field-full {
    max-width: none;
}

.commercial-section-grid .sap-field-long {
    grid-column: span 8;
    max-width: none;
}

.commercial-section-grid .sap-field-medium {
    grid-column: span 4;
    max-width: none;
}

.commercial-conditions-grid .sap-field-code {
    grid-column: span 3;
    max-width: 180px;
}

.commercial-conditions-grid .sap-field-check {
    grid-column: span 3;
    justify-content: end;
}

.commercial-conditions-grid .sap-field-check .dxbl-checkbox {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

.sap-field .dxbl-text-edit,
.sap-field .dxbl-combobox,
.sap-field .dxbl-date-edit,
.sap-field .dxbl-memo,
.sap-field .form-control,
.sap-field .erp-native-input,
.sap-field input,
.sap-field textarea {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.sap-field .dxbl-text-edit,
.sap-field .dxbl-combobox,
.sap-field .dxbl-date-edit,
.sap-field .form-control,
.sap-field .erp-native-input {
    min-height: 38px !important;
    border-radius: 8px !important;
}

.sap-field .dxbl-memo textarea,
.sap-field textarea {
    resize: vertical;
}

.sap-inline-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sap-inline-control > .dxbl-text-edit,
.sap-inline-control > .dxbl-combobox,
.sap-inline-control > input {
    flex: 1 1 auto;
    min-width: 0 !important;
}

.sap-inline-control > .dxbl-btn {
    flex: 0 0 auto;
}

.sap-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px 24px;
    align-items: center;
    max-width: 920px;
}

.sap-html-section,
.html-editor-shell {
    max-width: 100% !important;
    overflow: hidden !important;
}

.sap-inner-tabs,
.html-detail-tabs,
.html-detail-tabs .dxbl-tabs,
.html-detail-tabs .dxbl-tabs-content,
.html-detail-tabs .dxbl-tabs-content-panel,
.html-detail-tabs .dxbl-tabs-tabpane {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

.product-html-editor,
.product-html-source,
.product-html-source .dxbl-memo,
.product-html-source textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.product-html-editor {
    min-height: 460px !important;
}

.product-html-source textarea {
    min-height: 460px !important;
    font-family: Consolas, "Courier New", monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.sap-address-list {
    display: grid;
    gap: 10px;
}

.client-address-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    max-width: 100%;
}

.address-main {
    min-width: 0;
}

.address-text,
.address-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.address-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.sap-actions .dxbl-btn,
.sap-field-button .dxbl-btn,
.product-images-toolbar .dxbl-btn,
.address-actions .dxbl-btn,
.popup-actions .dxbl-btn {
    min-width: 76px !important;
    max-width: 140px !important;
    overflow: hidden !important;
}

.sap-actions .dxbl-btn-caption,
.sap-field-button .dxbl-btn-caption,
.product-images-toolbar .dxbl-btn-caption,
.address-actions .dxbl-btn-caption,
.popup-actions .dxbl-btn-caption {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.erp-page {
    max-width: 1320px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

.content {
    overflow-x: hidden !important;
}

.grid-panel,
.article-grid-panel,
.erp-grid-wrap,
.sap-master-card .dxbl-grid,
.sap-master-card .dxbl-grid-container {
    max-width: 100% !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
}

.sap-order-input {
    width: 90px !important;
}

@media (max-width: 1180px) {
    .sap-page-header,
    .sap-master-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .sap-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .sap-field-xs,
    .sap-field-day,
    .sap-field-percent,
    .sap-field-code,
    .sap-field-cp,
    .sap-field-ref,
    .sap-field-short,
    .sap-field-phone,
    .sap-field-date,
    .sap-field-money,
    .sap-field-medium,
    .sap-field-long,
    .sap-field-full,
    .sap-field-check,
    .sap-field-button {
        grid-column: span 3;
        max-width: none;
        min-width: 0;
    }

    .sap-field-full {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .sap-form {
        grid-template-columns: 1fr;
    }

    .sap-field-xs,
    .sap-field-day,
    .sap-field-percent,
    .sap-field-code,
    .sap-field-cp,
    .sap-field-ref,
    .sap-field-short,
    .sap-field-phone,
    .sap-field-date,
    .sap-field-money,
    .sap-field-medium,
    .sap-field-long,
    .sap-field-full,
    .sap-field-check,
    .sap-field-button {
        grid-column: 1 / -1;
        max-width: none;
        min-width: 0;
    }

    .client-address-row {
        grid-template-columns: 1fr;
    }
}

.content {
    padding: 18px 22px;
    overflow-x: hidden;
}

.erp-page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    min-width: 0;
}

.erp-topline {
    max-width: 1240px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border: 1px solid #cfd7e6;
    border-radius: 4px;
    background: #fff;
    color: #344054;
    font-size: .78rem;
}

.user-chip a {
    color: #1f5eff;
    text-decoration: none;
    font-weight: 600;
}

.sap-page-header,
.page-header {
    margin-bottom: 10px;
}

.sap-master-card,
.erp-form-card,
.form-section-card,
.panel,
.data-table {
    border-radius: 4px !important;
    box-shadow: none !important;
}

.sap-master-card {
    padding: 10px 12px !important;
}

.permissions-card {
    overflow: hidden;
}

.permissions-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #d9e2ef;
    color: #52657f;
    font-size: 12px;
}

.permissions-matrix-wrap {
    max-width: 100%;
    overflow: auto;
}

.permissions-matrix {
    min-width: 980px;
}

.permissions-matrix th,
.permissions-matrix td {
    vertical-align: middle;
}

.permissions-matrix .permission-module {
    width: 120px;
}

.permissions-matrix .permission-action {
    width: 130px;
}

.permissions-matrix .permission-description {
    min-width: 360px;
}

.permissions-matrix .permission-role {
    min-width: 94px;
    text-align: center;
    white-space: nowrap;
}

.permissions-matrix .permission-check {
    text-align: center;
}

.permission-group-row td {
    background: #edf3f9;
    color: #0b2545;
    font-weight: 600;
    letter-spacing: 0;
}

.sap-card-title,
.sap-section-title {
    margin-bottom: 7px !important;
    font-size: .92rem !important;
    font-weight: 650;
}

.sap-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 7px 10px !important;
    align-items: end;
}

.sap-field {
    min-width: 0;
}

.sap-field label {
    display: block;
    margin: 0 0 2px !important;
    color: #475467;
    font-size: .72rem !important;
    line-height: 1.1;
    font-weight: 600;
}

.sap-field .dxbl-text-edit,
.sap-field .dxbl-combobox,
.sap-field .dxbl-spin-edit,
.sap-field .dxbl-memo,
.sap-field .form-control,
.pro-native-input,
.form-control {
    min-height: 31px !important;
    height: 31px;
    border-radius: 3px !important;
    font-size: .86rem;
}

.sap-field textarea,
.sap-field .dxbl-memo,
.sap-field .dxbl-memo textarea {
    height: auto !important;
    min-height: 76px !important;
}

.sap-field-code,
.sap-field-xs,
.sap-field-cp,
.sap-field-day,
.sap-field-money,
.sap-field-phone,
.sap-field-short,
.sap-field-medium,
.sap-field-long,
.sap-field-full,
.sap-field-check {
    grid-column: span 2;
}

.sap-field-xs,
.sap-field-day {
    grid-column: span 1;
    min-width: 74px;
}

.sap-field-code,
.sap-field-cp,
.sap-field-phone,
.sap-field-money,
.sap-field-short {
    grid-column: span 2;
    min-width: 120px;
}

.sap-field-medium {
    grid-column: span 3;
    min-width: 170px;
}

.sap-field-long {
    grid-column: span 4;
    min-width: 240px;
}

.sap-field-full {
    grid-column: span 8;
    min-width: 320px;
}

.sap-field-check {
    grid-column: span 2;
    min-width: 110px;
}

.sap-tabs {
    margin-top: 10px;
}

.sap-section {
    padding: 9px 0 0;
}

.sap-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
    gap: 5px 14px;
    align-items: center;
}

.sap-check-grid .dxbl-check,
.dx-check-line {
    border-radius: 3px !important;
    min-height: 27px !important;
    height: 27px !important;
    padding: 0 6px !important;
}

.btn,
.dxbl-btn {
    border-radius: 3px !important;
    min-height: 31px !important;
    padding: 5px 10px !important;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-small,
.btn-small.dxbl-btn {
    min-height: 27px !important;
    padding: 3px 7px !important;
    font-size: .78rem !important;
}

.table-wrap,
.erp-grid-wrap {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 4px !important;
}

.data-table th,
.data-table td {
    padding: 6px 8px !important;
    font-size: .84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-address-row {
    border-radius: 4px !important;
    padding: 8px 10px !important;
}

.login-body {
    min-height: 100vh;
    margin: 0;
    background: #eef3f8;
    color: #111827;
    font-family: Inter, Segoe UI, system-ui, -apple-system, sans-serif;
}

html.surface-switching body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: #050507;
}

html.surface-switching body::after {
    content: "";
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 2147483647;
    width: 86px;
    height: 3px;
    transform: translate(-50%, -50%);
    background: linear-gradient(90deg, #ff008f, #33c8ff, #ff008f);
    box-shadow: 0 0 24px rgba(255, 0, 143, .38);
}

.store-loading-shell {
    min-height: 100vh;
    background: #f6fafc;
    color: #142331;
}

.store-loading-content {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.storefront-loading-panel {
    width: min(420px, 100%);
    padding: 22px 24px;
    border: 1px solid #d8e4ea;
    background: rgba(255, 255, 255, .92);
    color: #64748b;
    text-align: center;
}

.storefront-loader-boot {
    min-height: 220px;
}

.storefront-loader-boot span {
    width: 44px;
    height: 44px;
    border-width: 4px;
}

.login-body:not(.store-login-body) {
    background: #050816;
    color: #f8fafc;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}

.login-card {
    width: min(326px, 100%);
    overflow: hidden;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .13);
}

.login-body:not(.store-login-body) .login-card {
    width: min(358px, 100%);
    border-color: rgba(255, 255, 255, .12);
    background: #050816;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .45);
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 22px 22px 7px;
    background: transparent;
}

.login-body:not(.store-login-body) .login-brand {
    margin: 0;
    padding: 26px 26px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    background: #050816;
}

.login-body:not(.store-login-body) .login-brand img {
    width: 100%;
    max-width: 278px;
    height: auto;
    max-height: 76px;
}

.login-body:not(.store-login-body) .login-wordmark {
    color: #ffffff;
}

.login-body:not(.store-login-body) .login-wordmark strong {
    color: #8fb2ff;
}

.login-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

.login-wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: #111827;
    font-size: 1.38rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

.login-wordmark strong {
    color: #1f5eff;
    font-style: italic;
    font-weight: 800;
}

.login-card h1 {
    margin: 12px 24px 0;
    color: #101828;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
}

.login-body:not(.store-login-body) .login-card h1 {
    color: #ffffff;
}

.login-card p {
    margin: 8px 26px 0;
    color: #667085;
    text-align: center;
}

.login-form {
    display: grid;
    gap: 10px;
    padding: 16px 24px 24px;
}

.login-body:not(.store-login-body) .login-form {
    padding: 18px 24px 26px;
}

.login-field {
    display: grid;
    gap: 4px;
    color: #475467;
    font-size: .76rem;
    font-weight: 600;
}

.login-body:not(.store-login-body) .login-field {
    color: #cbd5e1;
}

.login-field input {
    min-height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 6px 9px;
    color: #101828;
    background: #fff;
    font-size: .9rem;
}

.login-body:not(.store-login-body) .login-field input {
    border-color: #24324f;
    background: #0b1224;
    color: #ffffff;
}

.login-field input:focus {
    border-color: #1f5eff;
    outline: 2px solid rgba(31, 94, 255, .16);
}

.login-body:not(.store-login-body) .login-field input:focus {
    border-color: #2c7dff;
    outline: 2px solid rgba(44, 125, 255, .22);
}

.login-secondary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 24px;
    margin-top: 2px;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475467;
    font-size: .74rem;
    font-weight: 600;
    line-height: 1;
}

.login-body:not(.store-login-body) .login-remember {
    color: #b8c7e6;
}

.login-remember input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #1f5eff;
}

.login-body:not(.store-login-body) .login-remember input {
    accent-color: #2c7dff;
}

.login-secondary a {
    color: #1f5eff;
    font-size: .74rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.login-body:not(.store-login-body) .login-secondary a {
    color: #7db4ff;
}

.login-secondary a:hover {
    color: #164bd8;
    text-decoration: underline;
}

.login-body:not(.store-login-body) .login-secondary a:hover {
    color: #b8d5ff;
}

.login-form button,
.login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 14px;
    border: 0;
    border-radius: 4px;
    background: #1f5eff;
    color: #fff;
    text-decoration: none;
    font-weight: 650;
}

.login-body:not(.store-login-body) .login-form button,
.login-body:not(.store-login-body) .login-link {
    background: #157cff;
    box-shadow: 0 10px 24px rgba(21, 124, 255, .22);
}

.login-form button:hover,
.login-link:hover {
    background: #164bd8;
}

.login-body:not(.store-login-body) .login-form button:hover,
.login-body:not(.store-login-body) .login-link:hover {
    background: #2f8dff;
}

.login-error {
    margin: 14px 24px 0;
    padding: 8px 10px;
    border: 1px solid #fecdca;
    border-radius: 4px;
    background: #fef3f2;
    color: #b42318;
    font-size: .84rem;
}

.login-body:not(.store-login-body) .login-error {
    border-color: rgba(248, 113, 113, .4);
    background: rgba(127, 29, 29, .24);
    color: #fecaca;
}

.store-login-body {
    background: #f6fafc;
}

.store-login-body .store-login-shell {
    min-height: 100vh;
}

.store-login-content {
    display: grid;
    align-items: center;
    min-height: 500px;
    padding: 34px 18px 42px;
    background: #f6fafc;
}

.store-login-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    width: min(430px, 100%);
    margin: 0 auto;
}

.store-login-body .login-card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    border-color: #d8e4ea;
    box-shadow: 0 18px 38px rgba(7, 85, 123, .14);
}

.store-login-body .login-brand img {
    width: 142px;
    height: auto;
}

.store-login-body .login-wordmark {
    display: none;
}

.store-login-body .login-card h1 {
    color: var(--store-brand-primary-strong);
    font-size: 1.22rem;
}

.store-login-body .login-form {
    padding: 16px 26px 24px;
}

.store-login-body .login-field {
    gap: 5px;
}

.store-login-body .login-field input {
    min-height: 42px;
    border-radius: 6px;
    padding: 8px 11px;
}

.store-login-body .login-field input:focus {
    border-color: var(--store-input-border);
    outline-color: color-mix(in srgb, var(--store-action) 18%, transparent);
}

.store-login-body .login-secondary {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    margin-top: 6px;
    text-align: center;
}

.store-login-body .login-remember input {
    accent-color: var(--store-action);
}

.store-login-body .login-secondary a {
    color: var(--store-brand-primary-strong);
}

.store-login-body .login-form button {
    width: min(260px, 100%);
    min-height: 42px;
    justify-self: center;
    background: var(--store-action);
}

.store-login-body .login-form button:hover {
    background: var(--store-action-strong);
}

.store-login-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.store-login-header-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(0, 143, 202, .25);
    border-radius: 999px;
    background: #fff;
    color: #07557b;
    font-size: .82rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.store-login-header-actions a:hover {
    border-color: rgba(242, 140, 27, .45);
    color: #b95f00;
}

.store-login-register-card {
    display: grid;
    justify-items: center;
    gap: 9px;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 22px 26px;
    border: 1px solid #d8e4ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(7, 85, 123, .1);
    text-align: center;
}

.store-login-register-card span {
    color: var(--store-action);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-login-register-card h2 {
    margin: 0;
    color: var(--store-brand-primary-strong);
    font-size: 1.38rem;
    line-height: 1.15;
}

.store-login-register-card p {
    margin: 0;
    color: var(--store-panel-muted);
    font-size: .92rem;
    line-height: 1.55;
}

.store-login-register-card .store-action-primary {
    width: min(260px, 100%);
    min-height: 42px;
}

.store-login-body .theme-monkeyvapers .login-card,
.store-login-body .theme-monkeyvapers .store-login-register-card {
    border-color: rgba(255, 0, 143, .32);
    box-shadow: 0 18px 38px rgba(255, 0, 143, .12);
}

.store-login-body .theme-monkeyvapers .login-card h1,
.store-login-body .theme-monkeyvapers .store-login-register-card h2 {
    color: #111827;
}

.store-login-body .theme-monkeyvapers .login-field,
.store-login-body .theme-monkeyvapers .login-remember,
.store-login-body .theme-monkeyvapers .store-login-register-card p {
    color: #334155;
}

.store-login-body .theme-monkeyvapers .login-field input {
    border-color: rgba(255, 0, 143, .36);
    background: #ffffff;
    color: #111827;
}

.store-login-body .theme-monkeyvapers .login-field input:focus {
    border-color: #ff008f;
    outline-color: rgba(255, 0, 143, .22);
}

.store-login-body .theme-monkeyvapers .login-secondary a,
.store-login-body .theme-monkeyvapers .store-login-register-card span {
    color: #ff008f;
}

.store-login-body .theme-monkeyvapers .login-form button {
    background: #ff008f;
}

.store-login-body .theme-monkeyvapers .login-form button:hover {
    background: #d90078;
}

@media (max-width: 760px) {
    .store-login-content {
        padding: 24px 12px 34px;
    }

    .store-login-layout {
        grid-template-columns: 1fr;
    }

    .store-login-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .store-login-header-actions a {
        flex: 1 1 0;
    }
}

.role-check-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 6px 8px;
    border: 1px solid #cfd7e6;
    border-radius: 3px;
    min-height: 31px;
    background: #fff;
}

.role-check-list label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 !important;
    font-size: .84rem !important;
    color: #344054;
    text-transform: none;
}

.inline-help-box {
    min-height: 31px;
    display: flex;
    align-items: center;
    padding: 5px 8px;
    border: 1px solid #cfd7e6;
    border-radius: 3px;
    background: #f8fafc;
    color: #475467;
    font-size: .82rem;
}

.store-access-card {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #d8e0ec;
    border-radius: 6px;
    background: #fff;
}

.store-access-card-soft {
    background: #f8fafc;
}

.store-access-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.store-access-title-row strong {
    display: block;
    color: #101828;
    font-size: .95rem;
}

.store-access-title-row span {
    display: block;
    margin-top: 3px;
    color: #667085;
    font-size: .84rem;
}

.store-access-form {
    align-items: end;
}

.store-access-password-line,
.store-access-row-actions,
.store-access-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.store-access-password-line input {
    flex: 1 1 220px;
    min-width: 0;
}

.store-access-actions {
    margin-top: 12px;
}

.store-access-link-box {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #b7d7ff;
    border-radius: 6px;
    background: #f2f7ff;
}

.store-access-link-box span {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-size: .82rem;
    font-weight: 700;
}

@media (max-width: 980px) {
    .sap-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .sap-field-full,
    .sap-field-long {
        grid-column: span 6;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 12px;
    }

    .sap-form {
        grid-template-columns: 1fr;
    }

    .sap-field-code,
    .sap-field-xs,
    .sap-field-cp,
    .sap-field-day,
    .sap-field-money,
    .sap-field-phone,
    .sap-field-short,
    .sap-field-medium,
    .sap-field-long,
    .sap-field-full,
    .sap-field-check {
        grid-column: auto;
        min-width: 0;
    }
}

.sap-page-header,
.sap-master-card,
.erp-page,
.erp-topline {
    width: min(100%, 1080px) !important;
    max-width: 1080px !important;
}

.sap-master-card {
    padding: 10px 12px !important;
}

.sap-form {
    gap: 6px 9px !important;
}

.sap-field > label,
.sap-field label {
    margin-bottom: 1px !important;
}

.sap-field-line {
    grid-column: 1 / -1;
    max-width: 560px;
    min-width: 280px;
}

.sap-field .dxbl-spin-edit,
.sap-field .dxbl-spin-edit .dxbl-text-edit,
.sap-field .dxbl-spin-edit input,
.sap-field input[type="number"],
.sap-field .numeric-text-input,
.numeric-text-input {
    border-radius: 3px !important;
}

.sap-field .dxbl-spin-edit .dxbl-spin-btn,
.sap-field .dxbl-spin-edit .dxbl-edit-btn,
.sap-field .dxbl-spin-edit button {
    border-radius: 0 !important;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

@media (max-width: 720px) {
    .sap-field-line {
        grid-column: 1 / -1;
        max-width: none;
        min-width: 0;
    }
}


.list-page,
.article-list-page {
    width: 100% !important;
    max-width: none !important;
}

.list-page > .page-header,
.article-list-page > .page-header,
.list-page > .panel,
.article-list-page > .panel,
.list-page .grid-panel,
.article-list-page .grid-panel,
.list-page .list-toolbar-panel,
.article-list-page .list-toolbar-panel {
    width: 100% !important;
    max-width: none !important;
}

.erp-grid-fluid,
.erp-grid-fluid .dxbl-grid,
.erp-grid-fluid .dxbl-grid-table,
.grid-panel .dxbl-grid,
.article-grid-panel .dxbl-grid {
    width: 100% !important;
    max-width: 100% !important;
}

.grid-panel {
    overflow-x: auto !important;
}

.sap-field .numeric-text-input,
.sap-field input.numeric-text-input,
.sap-field .pro-native-input.numeric-text-input,
.numeric-text-input.form-control,
input.numeric-text-input,
.sap-field input[inputmode="decimal"],
.sap-field input[inputmode="numeric"] {
    border-radius: 3px !important;
    -webkit-border-radius: 3px !important;
    appearance: textfield;
    min-height: 31px !important;
    height: 31px !important;
}

.sap-field .dxbl-spin-edit,
.sap-field .dxbl-spin-edit *,
.sap-field .dxbl-spin-edit input,
.sap-field .dxbl-spin-edit .dxbl-text-edit,
.sap-field .dxbl-spin-edit .dxbl-edit,
.sap-field .dxbl-spin-edit .dxbl-input-group,
.sap-field .dxbl-spin-edit .dxbl-btn,
.sap-field .dxbl-spin-edit button {
    border-radius: 3px !important;
}

.sap-discounts-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(118px, 150px));
    gap: 7px 10px;
    align-items: end;
    width: fit-content;
    max-width: 100%;
}

.sap-discounts-row .sap-field-percent {
    grid-column: auto;
    min-width: 118px;
    max-width: 150px;
}

@media (max-width: 720px) {
    .sap-discounts-row {
        width: 100%;
        grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    }

    .sap-discounts-row .sap-field-percent {
        max-width: none;
    }
}

/* Size profiles by screen type */
.content {
    overflow-x: hidden;
}

.page-header,
.panel,
.sap-page-header,
.sap-master-card {
    box-sizing: border-box !important;
}

.sap-page-header,
.sap-master-card {
    width: min(100%, 1080px) !important;
    max-width: 1080px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.client-page-header,
.client-modern-page,
.sap-product-card {
    width: min(100%, 1200px) !important;
    max-width: 1200px !important;
}

.grid-panel,
.article-grid-panel,
.list-page .panel,
.list-page .grid-panel {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.grid-panel .dxbl-grid,
.article-grid-panel .dxbl-grid,
.grid-panel .dxbl-grid-table,
.article-grid-panel .dxbl-grid-table {
    max-width: 100% !important;
}

.dxbl-popup .sap-master-card,
.dxbl-popup .sap-page-header,
.dxbl-popup .panel,
.sap-popup-form {
    width: 100% !important;
    max-width: 760px !important;
}

.sap-form {
    column-gap: 16px !important;
    row-gap: 10px !important;
}

.sap-field {
    min-width: 0 !important;
    gap: 4px !important;
}

.sap-field-xs,
.sap-field-day {
    min-width: 86px !important;
    max-width: 112px !important;
}

.sap-field-percent,
.sap-field-money {
    min-width: 132px !important;
    max-width: 170px !important;
}

.sap-field-code,
.sap-field-cp {
    min-width: 130px !important;
    max-width: 180px !important;
}

.sap-field-phone,
.sap-field-date {
    min-width: 155px !important;
    max-width: 220px !important;
}

.sap-field-short {
    min-width: 180px !important;
    max-width: 280px !important;
}

.sap-field-medium {
    min-width: 240px !important;
    max-width: 420px !important;
}

.sap-field-long {
    min-width: 320px !important;
    max-width: 620px !important;
}

.sap-field-full {
    width: 100% !important;
    max-width: 100% !important;
}

.sap-field input,
.sap-field textarea,
.sap-field .form-control,
.sap-field .erp-native-input,
.sap-field .dxbl-text-edit,
.sap-field .dxbl-spin-edit,
.sap-field .dxbl-combobox,
.sap-field .dxbl-date-edit,
.sap-field .dxbl-memo,
.sap-field .dxbl-edit,
.sap-field .dxbl-input-group,
.sap-field .dxbl-input-group > .dxbl-text-edit {
    border-radius: 3px !important;
}

input[type="number"],
input.numeric-input,
.field-money input,
.field-percent input,
.sap-field-money input,
.sap-field-percent input {
    border-radius: 3px !important;
}

.sap-master-card {
    padding: 16px !important;
    border-radius: 8px !important;
}

.sap-card-title {
    margin-bottom: 12px !important;
}

.sap-section {
    padding-top: 14px !important;
}

@media (max-width: 1240px) {
    .client-page-header,
    .client-modern-page,
    .sap-product-card,
    .sap-page-header,
    .sap-master-card {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 820px) {
    .sap-form {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }

    .sap-field-xs,
    .sap-field-day,
    .sap-field-percent,
    .sap-field-code,
    .sap-field-cp,
    .sap-field-phone,
    .sap-field-date,
    .sap-field-money,
    .sap-field-short,
    .sap-field-medium,
    .sap-field-long,
    .sap-field-full,
    .sap-field-check,
    .sap-field-button {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

.erp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.erp-kpi {
    border: 1px solid var(--border-color, #d9dee8);
    background: #fff;
    padding: 8px 10px;
    min-height: 56px;
}

.erp-kpi span {
    display: block;
    font-size: 11px;
    color: #667085;
    margin-bottom: 4px;
}

.erp-kpi strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
}

.erp-compact-grid {
    margin-top: 8px;
}

.list-page,
.comercial-list-page,
.grid-panel-fluid {
    width: 100%;
    max-width: none;
}

.commercial-ficha-card {
    max-width: 1200px;
}

.commercial-header-form {
    grid-template-columns: repeat(auto-fit, minmax(110px, max-content));
}

.commercial-lines-wrap,
.client-contacts-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.commercial-lines-table,
.client-contacts-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1120px;
}

.client-contacts-table {
    min-width: 960px;
}

.commercial-lines-table th,
.commercial-lines-table td,
.client-contacts-table th,
.client-contacts-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 6px 6px;
    vertical-align: middle;
    white-space: nowrap;
}

.commercial-lines-table th,
.client-contacts-table th {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    background: #f8fafc;
}

.commercial-lines-table input,
.client-contacts-table input {
    height: 32px;
    min-height: 32px;
    border-radius: 3px;
}

.line-num { width: 42px; }
.line-ref { width: 130px; }
.line-qty { width: 82px; }
.line-money { width: 100px; }
.line-disc { width: 76px; }
.line-date { width: 130px; }
.line-check { width: 64px; }
.line-total { width: 110px; }
.line-actions { width: 52px; }
.line-total-cell { text-align: right; font-weight: 700; }

.commercial-totals {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.commercial-totals div {
    min-width: 130px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 8px 10px;
    background: #f8fafc;
}

.commercial-totals span {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
}

.commercial-totals strong {
    display: block;
    text-align: right;
    font-size: 16px;
}

.warning-panel {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

@media (max-width: 900px) {
    .commercial-ficha-card {
        max-width: 100%;
    }

    .commercial-header-form {
        grid-template-columns: 1fr;
    }
}

.comercial-list-page,
.list-page {
    width: 100%;
    max-width: none;
}

.grid-panel-fluid,
.erp-grid-fluid,
.commercial-grid {
    width: 100%;
    max-width: 100%;
}

.commercial-ficha-card {
    max-width: 1200px;
}

.commercial-lines-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.commercial-lines-table input.pro-native-input,
.commercial-lines-table .dxbl-text-edit,
.commercial-header-form input.pro-native-input,
.commercial-header-form .dxbl-text-edit {
    border-radius: 3px !important;
}

.erp-page {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.erp-topline {
    max-width: none !important;
}

.list-page,
.comercial-list-page,
.article-list-page {
    width: 100% !important;
    max-width: none !important;
}

.list-page .grid-panel,
.comercial-list-page .grid-panel,
.article-list-page .grid-panel,
.grid-panel-fluid,
.article-grid-panel {
    width: 100% !important;
    max-width: none !important;
}

.list-page .dxbl-grid,
.comercial-list-page .dxbl-grid,
.article-list-page .dxbl-grid,
.erp-grid-fluid,
.erp-grid-fluid .dxbl-grid,
.erp-grid-fluid .dxbl-grid-table {
    width: 100% !important;
    max-width: 100% !important;
}

.sap-page-header,
.sap-master-card,
.commercial-ficha-card {
    margin-left: auto !important;
    margin-right: auto !important;
}

.product-picker {
    display: grid;
    gap: 12px;
}

.product-picker-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.product-picker-grid-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #d9dee8;
    border-radius: 6px;
}

.product-picker-selected {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px 12px;
    align-items: end;
    border: 1px solid #d9dee8;
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
}

.product-picker-selected .sap-field-code { grid-column: span 2; }
.product-picker-selected .sap-field-long { grid-column: span 5; }
.product-picker-selected .sap-field-money,
.product-picker-selected .sap-field-percent,
.product-picker-selected .sap-field-date { grid-column: span 2; }
.product-picker-selected .sap-field-check { grid-column: span 1; }

.product-picker-message {
    padding: 10px 12px;
    border-radius: 6px;
}

@media (max-width: 900px) {
    .product-picker-search,
    .product-picker-selected {
        grid-template-columns: 1fr;
    }

    .product-picker-selected .sap-field-code,
    .product-picker-selected .sap-field-long,
    .product-picker-selected .sap-field-money,
    .product-picker-selected .sap-field-percent,
    .product-picker-selected .sap-field-date,
    .product-picker-selected .sap-field-check {
        grid-column: 1 / -1;
        max-width: none !important;
        width: 100% !important;
    }
}

/* 2026-05-19: listados full width y popup producto en pedidos */
.master-list-page,
.list-page,
.comercial-list-page,
.article-list-page {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.master-list-page > .page-header,
.master-list-page > .panel,
.master-list-page .list-toolbar-panel,
.master-list-page .grid-panel,
.list-page > .page-header,
.list-page > .panel,
.list-page .list-toolbar-panel,
.list-page .grid-panel,
.comercial-list-page > .page-header,
.comercial-list-page > .panel,
.comercial-list-page .list-toolbar-panel,
.comercial-list-page .grid-panel,
.article-list-page > .page-header,
.article-list-page > .panel,
.article-list-page .list-toolbar-panel,
.article-list-page .grid-panel {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

.master-list-page .dxbl-grid,
.master-list-page .dxbl-grid-container,
.master-list-page .dxbl-grid-table,
.list-page .dxbl-grid,
.list-page .dxbl-grid-container,
.list-page .dxbl-grid-table,
.comercial-list-page .dxbl-grid,
.comercial-list-page .dxbl-grid-container,
.comercial-list-page .dxbl-grid-table,
.article-list-page .dxbl-grid,
.article-list-page .dxbl-grid-container,
.article-list-page .dxbl-grid-table {
    width: 100% !important;
    max-width: none !important;
}

.master-list-page .grid-panel,
.list-page .grid-panel,
.comercial-list-page .grid-panel,
.article-list-page .grid-panel {
    overflow-x: auto !important;
}

.commercial-lines-table {
    width: 100% !important;
    min-width: 1520px;
    table-layout: fixed;
}

.commercial-lines-table .line-detail,
.commercial-lines-table .line-detail-cell {
    width: 360px;
    min-width: 360px;
}

.commercial-lines-table .line-detail-input {
    min-width: 340px !important;
}

.commercial-lines-table .line-disc {
    width: 92px;
    min-width: 92px;
}

.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-content,
.product-picker-popup .dxbl-popup-body {
    max-width: 96vw !important;
}

.product-picker-selected .product-picker-detail-field {
    grid-column: span 6 !important;
    max-width: none !important;
}

.product-picker-selected .sap-field-percent {
    min-width: 118px !important;
    max-width: none !important;
}

/* Ajuste final listados full-width y lineas comerciales compactas */
.content {
    min-width: 0 !important;
}

.erp-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.list-page,
.master-list-page,
.comercial-list-page,
.article-list-page {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.list-page > .page-header,
.master-list-page > .page-header,
.comercial-list-page > .page-header,
.article-list-page > .page-header,
.list-page > .panel,
.master-list-page > .panel,
.comercial-list-page > .panel,
.article-list-page > .panel,
.list-page .grid-panel,
.master-list-page .grid-panel,
.comercial-list-page .grid-panel,
.article-list-page .grid-panel,
.list-page .list-toolbar-panel,
.master-list-page .list-toolbar-panel,
.comercial-list-page .list-toolbar-panel,
.article-list-page .list-toolbar-panel {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.list-page .dxbl-grid,
.master-list-page .dxbl-grid,
.comercial-list-page .dxbl-grid,
.article-list-page .dxbl-grid,
.list-page .dxbl-grid-container,
.master-list-page .dxbl-grid-container,
.comercial-list-page .dxbl-grid-container,
.article-list-page .dxbl-grid-container,
.list-page .dxbl-grid-table,
.master-list-page .dxbl-grid-table,
.comercial-list-page .dxbl-grid-table,
.article-list-page .dxbl-grid-table,
.erp-grid-fluid,
.erp-grid-fluid .dxbl-grid,
.erp-grid-fluid .dxbl-grid-container,
.erp-grid-fluid .dxbl-grid-table {
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
}

.list-page .dxbl-grid table,
.master-list-page .dxbl-grid table,
.comercial-list-page .dxbl-grid table,
.article-list-page .dxbl-grid table {
    width: 100% !important;
    min-width: 100% !important;
}

.erp-grid,
.erp-grid .dxbl-grid-table,
.erp-grid .dxbl-grid-header-row,
.erp-grid .dxbl-grid-data-row {
    font-size: 12px !important;
}

.erp-grid .dxbl-grid-header-row > td,
.erp-grid .dxbl-grid-header-row > th,
.erp-grid .dxbl-grid-data-row > td,
.erp-grid .dxbl-grid-data-row > th {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    line-height: 1.25 !important;
}

.commercial-lines-table {
    min-width: 1260px !important;
    table-layout: fixed !important;
    font-size: 12px !important;
}

.commercial-lines-table th,
.commercial-lines-table td {
    padding: 3px 4px !important;
    height: 30px !important;
    line-height: 1.2 !important;
}

.commercial-lines-table input,
.commercial-lines-table .dxbl-text-edit,
.commercial-lines-table .dxbl-edit {
    height: 26px !important;
    min-height: 26px !important;
    font-size: 12px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

.commercial-lines-table .line-detail,
.commercial-lines-table .line-detail-cell {
    width: 460px !important;
    min-width: 460px !important;
}

.commercial-lines-table .line-detail-input {
    width: 100% !important;
    min-width: 440px !important;
}

.commercial-lines-table .line-ref { width: 118px !important; }
.commercial-lines-table .line-qty { width: 74px !important; }
.commercial-lines-table .line-money { width: 86px !important; }
.commercial-lines-table .line-disc { width: 74px !important; }
.commercial-lines-table .line-date { width: 116px !important; }
.commercial-lines-table .line-check { width: 52px !important; }
.commercial-lines-table .line-total { width: 92px !important; }
.commercial-lines-table .line-actions { width: 42px !important; }

.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    max-width: 96vw !important;
}

.product-picker {
    gap: 8px !important;
    font-size: 12px !important;
}

.product-picker-selected {
    padding: 8px !important;
    gap: 6px 8px !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
}

.product-picker-selected .product-picker-detail-field {
    grid-column: span 7 !important;
}

.product-picker-grid .dxbl-grid,
.product-picker-grid .dxbl-grid-table,
.product-picker-grid .dxbl-grid-header-row,
.product-picker-grid .dxbl-grid-data-row {
    font-size: 12px !important;
}

.product-picker-grid .dxbl-grid-header-row > td,
.product-picker-grid .dxbl-grid-header-row > th,
.product-picker-grid .dxbl-grid-data-row > td,
.product-picker-grid .dxbl-grid-data-row > th {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    line-height: 1.25 !important;
}

/* 2026-05-19: correcciones listados, popup producto y lineas pedido */
.content:has(.list-page),
.content:has(.master-list-page),
.content:has(.comercial-list-page),
.content:has(.article-list-page) {
    padding: 14px 16px !important;
    overflow-x: hidden !important;
}

.content:has(.list-page) .erp-page,
.content:has(.master-list-page) .erp-page,
.content:has(.comercial-list-page) .erp-page,
.content:has(.article-list-page) .erp-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.list-page,
.master-list-page,
.comercial-list-page,
.article-list-page,
.list-page > .panel,
.master-list-page > .panel,
.comercial-list-page > .panel,
.article-list-page > .panel,
.grid-panel-fluid {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.grid-panel-fluid,
.list-page .grid-panel,
.comercial-list-page .grid-panel,
.article-list-page .grid-panel,
.master-list-page .grid-panel {
    padding: 10px !important;
    overflow: hidden !important;
}

.erp-grid-fluid,
.erp-grid-fluid > *,
.erp-grid-fluid .dxbl-grid,
.erp-grid-fluid .dxbl-grid-container,
.erp-grid-fluid .dxbl-grid-table,
.commercial-grid,
.commercial-grid > *,
.commercial-grid .dxbl-grid,
.commercial-grid .dxbl-grid-container,
.commercial-grid .dxbl-grid-table {
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
}

.commercial-grid,
.commercial-grid .dxbl-grid-table,
.commercial-grid .dxbl-grid-header-row,
.commercial-grid .dxbl-grid-data-row,
.product-picker-grid,
.product-picker-grid .dxbl-grid-table,
.product-picker-grid .dxbl-grid-header-row,
.product-picker-grid .dxbl-grid-data-row {
    font-size: 11.5px !important;
}

.commercial-grid .dxbl-grid-table th,
.commercial-grid .dxbl-grid-table td,
.product-picker-grid .dxbl-grid-table th,
.product-picker-grid .dxbl-grid-table td {
    padding: 3px 5px !important;
    line-height: 1.15 !important;
}

.commercial-lines-wrap {
    overflow-x: hidden !important;
}

.commercial-lines-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 11.5px !important;
}

.commercial-lines-table th,
.commercial-lines-table td {
    padding: 2px 3px !important;
    height: 28px !important;
    line-height: 1.15 !important;
}

.commercial-lines-table input,
.commercial-lines-table .dxbl-text-edit,
.commercial-lines-table .dxbl-edit {
    height: 24px !important;
    min-height: 24px !important;
    font-size: 11.5px !important;
    padding: 1px 4px !important;
}

.commercial-lines-table .line-ref { width: 8.5% !important; }
.commercial-lines-table .line-detail,
.commercial-lines-table .line-detail-cell { width: 32% !important; min-width: 0 !important; }
.commercial-lines-table .line-detail-input { width: 100% !important; min-width: 0 !important; }
.commercial-lines-table .line-qty { width: 5.5% !important; }
.commercial-lines-table .line-money { width: 7% !important; }
.commercial-lines-table .line-disc { width: 5.5% !important; }
.commercial-lines-table .line-date { width: 8.5% !important; }
.commercial-lines-table .line-check { width: 4% !important; }
.commercial-lines-table .line-total { width: 7% !important; }
.commercial-lines-table .line-actions { width: 3.5% !important; }

.product-picker-grid .dxbl-grid-filter-row {
    display: none !important;
}

.product-picker-selected {
    grid-template-columns: 110px minmax(280px, 1fr) 86px 86px 74px 64px 112px 72px 56px auto !important;
    align-items: end !important;
}

.product-picker-selected .sap-field,
.product-picker-selected .product-picker-detail-field,
.product-picker-selected .sap-field-code,
.product-picker-selected .sap-field-long,
.product-picker-selected .sap-field-money,
.product-picker-selected .sap-field-percent,
.product-picker-selected .sap-field-date,
.product-picker-selected .sap-field-check {
    grid-column: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.product-picker-add-inline {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    min-width: 116px;
}

.product-picker-add-inline .dxbl-btn {
    white-space: nowrap !important;
}

@media (max-width: 1100px) {
    .commercial-lines-wrap {
        overflow-x: auto !important;
    }

    .commercial-lines-table {
        min-width: 980px !important;
    }

    .product-picker-selected {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 2026-05-19: ajuste final grids full width, filtro compacto y popup producto */
.erp-page {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sap-page-header,
.sap-master-card,
.commercial-ficha-card,
.product-main-panel,
.product-main-panel-full,
.form-section-card,
.erp-form-card {
    margin-left: auto !important;
    margin-right: auto !important;
}

.list-page,
.master-list-page,
.comercial-list-page,
.article-list-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.list-page > .page-header,
.master-list-page > .page-header,
.comercial-list-page > .page-header,
.article-list-page > .page-header,
.list-page > .panel,
.master-list-page > .panel,
.comercial-list-page > .panel,
.article-list-page > .panel,
.list-page .grid-panel,
.master-list-page .grid-panel,
.comercial-list-page .grid-panel,
.article-list-page .grid-panel,
.list-page .list-toolbar-panel,
.master-list-page .list-toolbar-panel,
.comercial-list-page .list-toolbar-panel,
.article-list-page .list-toolbar-panel {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.list-page .dxbl-grid,
.master-list-page .dxbl-grid,
.comercial-list-page .dxbl-grid,
.article-list-page .dxbl-grid,
.list-page .dxbl-grid-container,
.master-list-page .dxbl-grid-container,
.comercial-list-page .dxbl-grid-container,
.article-list-page .dxbl-grid-container,
.list-page .dxbl-grid-table,
.master-list-page .dxbl-grid-table,
.comercial-list-page .dxbl-grid-table,
.article-list-page .dxbl-grid-table {
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
}

.erp-grid .dxbl-grid-filter-row td,
.erp-grid-fluid .dxbl-grid-filter-row td,
.commercial-grid .dxbl-grid-filter-row td,
.product-grid-stable .dxbl-grid-filter-row td {
    background: #f1f5f9 !important;
    border-bottom: 1px solid #cbd5e1 !important;
    padding: 1px 4px !important;
    height: 24px !important;
    min-height: 24px !important;
}

.erp-grid .dxbl-grid-filter-row input,
.erp-grid-fluid .dxbl-grid-filter-row input,
.commercial-grid .dxbl-grid-filter-row input,
.product-grid-stable .dxbl-grid-filter-row input,
.erp-grid .dxbl-grid-filter-row .dxbl-text-edit-input,
.erp-grid-fluid .dxbl-grid-filter-row .dxbl-text-edit-input,
.commercial-grid .dxbl-grid-filter-row .dxbl-text-edit-input,
.product-grid-stable .dxbl-grid-filter-row .dxbl-text-edit-input {
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 4px !important;
    font-size: 11px !important;
    line-height: 18px !important;
}

.erp-grid .dxbl-grid-filter-row .dxbl-text-edit,
.erp-grid-fluid .dxbl-grid-filter-row .dxbl-text-edit,
.commercial-grid .dxbl-grid-filter-row .dxbl-text-edit,
.product-grid-stable .dxbl-grid-filter-row .dxbl-text-edit {
    min-height: 20px !important;
    height: 20px !important;
    border-radius: 2px !important;
    background: #fff !important;
}

.product-picker-grid .dxbl-grid-filter-row {
    display: table-row !important;
}

.product-picker-grid .dxbl-grid-table,
.product-picker-grid .dxbl-grid-header-row,
.product-picker-grid .dxbl-grid-data-row,
.product-picker-grid .dxbl-grid-filter-row {
    font-size: 11px !important;
}

.product-picker-grid .dxbl-grid-table th,
.product-picker-grid .dxbl-grid-table td {
    padding: 2px 4px !important;
    line-height: 1.12 !important;
}

.product-picker-selected {
    display: grid !important;
    grid-template-columns: 118px minmax(360px, 1fr) 80px 92px 74px 64px 116px 82px 60px 122px !important;
    gap: 6px 8px !important;
    padding: 8px !important;
    align-items: end !important;
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.product-picker-selected.is-empty {
    background: #f9fafb !important;
}

.product-picker-selected .sap-field,
.product-picker-selected .product-picker-ref-field,
.product-picker-selected .product-picker-detail-field,
.product-picker-selected .sap-field-code,
.product-picker-selected .sap-field-money,
.product-picker-selected .sap-field-percent,
.product-picker-selected .sap-field-date,
.product-picker-selected .sap-field-check {
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

.product-picker-selected label {
    font-size: 10.5px !important;
    margin-bottom: 2px !important;
}

.product-picker-selected input,
.product-picker-selected .dxbl-text-edit,
.product-picker-selected .dxbl-edit {
    height: 26px !important;
    min-height: 26px !important;
    font-size: 11.5px !important;
    border-radius: 2px !important;
}

.product-picker-add-inline .dxbl-btn,
.product-picker-popup .popup-actions .dxbl-btn,
.commercial-lines-table .dxbl-btn {
    min-height: 24px !important;
    height: 24px !important;
    padding: 1px 8px !important;
    font-size: 11px !important;
    line-height: 20px !important;
    white-space: nowrap !important;
}

.commercial-lines-table,
.commercial-lines-table input,
.commercial-lines-table .dxbl-text-edit,
.commercial-lines-table .dxbl-edit,
.commercial-lines-table .dxbl-btn {
    font-size: 11px !important;
}

.commercial-lines-table th,
.commercial-lines-table td {
    height: 26px !important;
    min-height: 26px !important;
    padding: 1px 3px !important;
    vertical-align: middle !important;
}

.commercial-lines-table input,
.commercial-lines-table .dxbl-text-edit,
.commercial-lines-table .dxbl-edit {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    box-sizing: border-box !important;
    border-radius: 2px !important;
}

.commercial-lines-table .dxbl-check {
    min-height: 24px !important;
    height: 24px !important;
}

.commercial-lines-table .line-detail,
.commercial-lines-table .line-detail-cell {
    width: 38% !important;
}

.commercial-lines-table .line-ref { width: 9% !important; }
.commercial-lines-table .line-qty { width: 5.2% !important; }
.commercial-lines-table .line-money { width: 6.8% !important; }
.commercial-lines-table .line-disc { width: 5.2% !important; }
.commercial-lines-table .line-date { width: 8% !important; }
.commercial-lines-table .line-check { width: 3.8% !important; }
.commercial-lines-table .line-total { width: 6.5% !important; }
.commercial-lines-table .line-actions { width: 3.2% !important; }

@media (max-width: 1260px) {
    .product-picker-selected {
        grid-template-columns: 118px minmax(320px, 1fr) 80px 92px 74px !important;
    }

    .product-picker-reserve-field,
    .product-picker-add-inline {
        align-self: end !important;
    }
}

@media (max-width: 900px) {
    .product-picker-selected {
        grid-template-columns: 1fr 1fr !important;
    }

    .product-picker-selected .product-picker-detail-field {
        grid-column: 1 / -1 !important;
    }
}

/* 2026-05-19: rows 35px, listados full-width real y popup producto en 2 lineas */
.app-shell .content > .erp-page {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.app-shell .content > .erp-page:has(.sap-master-card),
.app-shell .content > .erp-page:has(.commercial-ficha-card),
.app-shell .content > .erp-page:has(.client-modern-page),
.app-shell .content > .erp-page:has(.sap-product-card) {
    max-width: none !important;
}

.app-shell .content > .erp-page .sap-master-card,
.app-shell .content > .erp-page .commercial-ficha-card,
.app-shell .content > .erp-page .client-modern-page,
.app-shell .content > .erp-page .sap-product-card {
    margin-left: auto !important;
    margin-right: auto !important;
}

.app-shell .content > .erp-page .list-page,
.app-shell .content > .erp-page .master-list-page,
.app-shell .content > .erp-page .comercial-list-page,
.app-shell .content > .erp-page .article-list-page,
.app-shell .content > .erp-page .list-page > .page-header,
.app-shell .content > .erp-page .master-list-page > .page-header,
.app-shell .content > .erp-page .comercial-list-page > .page-header,
.app-shell .content > .erp-page .article-list-page > .page-header,
.app-shell .content > .erp-page .list-page > .panel,
.app-shell .content > .erp-page .master-list-page > .panel,
.app-shell .content > .erp-page .comercial-list-page > .panel,
.app-shell .content > .erp-page .article-list-page > .panel,
.app-shell .content > .erp-page .list-page .grid-panel,
.app-shell .content > .erp-page .master-list-page .grid-panel,
.app-shell .content > .erp-page .comercial-list-page .grid-panel,
.app-shell .content > .erp-page .article-list-page .grid-panel,
.app-shell .content > .erp-page .list-page .list-toolbar-panel,
.app-shell .content > .erp-page .master-list-page .list-toolbar-panel,
.app-shell .content > .erp-page .comercial-list-page .list-toolbar-panel,
.app-shell .content > .erp-page .article-list-page .list-toolbar-panel {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

.app-shell .content > .erp-page .list-page .dxbl-grid,
.app-shell .content > .erp-page .master-list-page .dxbl-grid,
.app-shell .content > .erp-page .comercial-list-page .dxbl-grid,
.app-shell .content > .erp-page .article-list-page .dxbl-grid,
.app-shell .content > .erp-page .list-page .dxbl-grid-container,
.app-shell .content > .erp-page .master-list-page .dxbl-grid-container,
.app-shell .content > .erp-page .comercial-list-page .dxbl-grid-container,
.app-shell .content > .erp-page .article-list-page .dxbl-grid-container,
.app-shell .content > .erp-page .list-page .dxbl-grid-table,
.app-shell .content > .erp-page .master-list-page .dxbl-grid-table,
.app-shell .content > .erp-page .comercial-list-page .dxbl-grid-table,
.app-shell .content > .erp-page .article-list-page .dxbl-grid-table {
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
}

.erp-grid .dxbl-grid-header-row,
.erp-grid .dxbl-grid-data-row,
.erp-grid .dxbl-grid-filter-row,
.erp-grid-fluid .dxbl-grid-header-row,
.erp-grid-fluid .dxbl-grid-data-row,
.erp-grid-fluid .dxbl-grid-filter-row,
.commercial-grid .dxbl-grid-header-row,
.commercial-grid .dxbl-grid-data-row,
.commercial-grid .dxbl-grid-filter-row,
.product-picker-grid .dxbl-grid-header-row,
.product-picker-grid .dxbl-grid-data-row,
.product-picker-grid .dxbl-grid-filter-row {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
}

.erp-grid .dxbl-grid-header-row > td,
.erp-grid .dxbl-grid-header-row > th,
.erp-grid .dxbl-grid-data-row > td,
.erp-grid .dxbl-grid-data-row > th,
.erp-grid .dxbl-grid-filter-row > td,
.erp-grid .dxbl-grid-filter-row > th,
.erp-grid-fluid .dxbl-grid-header-row > td,
.erp-grid-fluid .dxbl-grid-header-row > th,
.erp-grid-fluid .dxbl-grid-data-row > td,
.erp-grid-fluid .dxbl-grid-data-row > th,
.erp-grid-fluid .dxbl-grid-filter-row > td,
.erp-grid-fluid .dxbl-grid-filter-row > th,
.commercial-grid .dxbl-grid-header-row > td,
.commercial-grid .dxbl-grid-header-row > th,
.commercial-grid .dxbl-grid-data-row > td,
.commercial-grid .dxbl-grid-data-row > th,
.commercial-grid .dxbl-grid-filter-row > td,
.commercial-grid .dxbl-grid-filter-row > th,
.product-picker-grid .dxbl-grid-header-row > td,
.product-picker-grid .dxbl-grid-header-row > th,
.product-picker-grid .dxbl-grid-data-row > td,
.product-picker-grid .dxbl-grid-data-row > th,
.product-picker-grid .dxbl-grid-filter-row > td,
.product-picker-grid .dxbl-grid-filter-row > th {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 3px 6px !important;
    line-height: 1.15 !important;
    vertical-align: middle !important;
    font-size: 11.5px !important;
}

.erp-grid .dxbl-grid-filter-row > td,
.erp-grid .dxbl-grid-filter-row > th,
.erp-grid-fluid .dxbl-grid-filter-row > td,
.erp-grid-fluid .dxbl-grid-filter-row > th,
.commercial-grid .dxbl-grid-filter-row > td,
.commercial-grid .dxbl-grid-filter-row > th,
.product-picker-grid .dxbl-grid-filter-row > td,
.product-picker-grid .dxbl-grid-filter-row > th {
    background: #eaf2ff !important;
    border-bottom: 1px solid #b9cbe7 !important;
}

.erp-grid .dxbl-grid-filter-row input,
.erp-grid-fluid .dxbl-grid-filter-row input,
.commercial-grid .dxbl-grid-filter-row input,
.product-picker-grid .dxbl-grid-filter-row input,
.erp-grid .dxbl-grid-filter-row .dxbl-text-edit,
.erp-grid-fluid .dxbl-grid-filter-row .dxbl-text-edit,
.commercial-grid .dxbl-grid-filter-row .dxbl-text-edit,
.product-picker-grid .dxbl-grid-filter-row .dxbl-text-edit,
.erp-grid .dxbl-grid-filter-row .dxbl-text-edit-input,
.erp-grid-fluid .dxbl-grid-filter-row .dxbl-text-edit-input,
.commercial-grid .dxbl-grid-filter-row .dxbl-text-edit-input,
.product-picker-grid .dxbl-grid-filter-row .dxbl-text-edit-input {
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    font-size: 11px !important;
    line-height: 22px !important;
}

.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    width: min(1120px, 96vw) !important;
    max-width: 96vw !important;
}

.product-picker-selected {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 6px 8px !important;
    align-items: end !important;
    overflow: hidden !important;
}

.product-picker-selected .product-picker-ref-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-detail-field {
    grid-column: span 10 !important;
}

.product-picker-selected .product-picker-qty-field {
    grid-column: span 1 !important;
}

.product-picker-selected .product-picker-price-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-discount-field {
    grid-column: span 1 !important;
}

.product-picker-selected .product-picker-iva-field {
    grid-column: span 1 !important;
}

.product-picker-selected .product-picker-date-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-warehouse-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-reserve-field {
    grid-column: span 1 !important;
}

.product-picker-selected .product-picker-add-inline {
    grid-column: span 2 !important;
    min-width: 0 !important;
}

.product-picker-selected .product-picker-add-inline .dxbl-btn {
    width: 100% !important;
    min-width: 0 !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}

.product-picker-selected input,
.product-picker-selected .dxbl-text-edit,
.product-picker-selected .dxbl-edit {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 900px) {
    .product-picker-selected .product-picker-ref-field,
    .product-picker-selected .product-picker-detail-field,
    .product-picker-selected .product-picker-qty-field,
    .product-picker-selected .product-picker-price-field,
    .product-picker-selected .product-picker-discount-field,
    .product-picker-selected .product-picker-iva-field,
    .product-picker-selected .product-picker-date-field,
    .product-picker-selected .product-picker-warehouse-field,
    .product-picker-selected .product-picker-reserve-field,
    .product-picker-selected .product-picker-add-inline {
        grid-column: span 6 !important;
    }
}

.erp-page.list-page,
.erp-page.master-list-page,
.erp-page.article-list-page,
.erp-page.comercial-list-page,
.list-page,
.master-list-page,
.article-list-page,
.comercial-list-page {
    width: min(100%, 1600px) !important;
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.erp-page.article-list-page,
.erp-page.comercial-list-page,
.article-list-page,
.comercial-list-page {
    width: min(100%, 1700px) !important;
    max-width: 1700px !important;
}

.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    width: min(920px, 94vw) !important;
    max-width: 94vw !important;
}

.product-picker-selected {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 6px 8px !important;
    align-items: end !important;
}

.product-picker-selected .product-picker-ref-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-detail-field {
    grid-column: span 8 !important;
}

.product-picker-selected .product-picker-add-inline {
    grid-column: span 2 !important;
    align-self: end !important;
}

.product-picker-selected .product-picker-qty-field {
    grid-column: span 1 !important;
}

.product-picker-selected .product-picker-price-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-discount-field {
    grid-column: span 1 !important;
}

.product-picker-selected .product-picker-iva-field {
    grid-column: span 1 !important;
}

.product-picker-selected .product-picker-date-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-warehouse-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-reserve-field {
    grid-column: span 1 !important;
}

.product-picker-selected .product-picker-detail-field textarea,
.product-picker-selected .product-picker-detail-field .dxbl-memo-edit,
.product-picker-selected .product-picker-detail-field .dxbl-memo-edit textarea {
    min-height: 58px !important;
    max-height: 72px !important;
    resize: vertical !important;
    line-height: 1.25 !important;
}

.product-picker-selected .product-picker-add-inline .dxbl-btn {
    height: 31px !important;
    min-height: 31px !important;
}

@media (max-width: 980px) {
    .product-picker-selected .product-picker-ref-field,
    .product-picker-selected .product-picker-detail-field,
    .product-picker-selected .product-picker-add-inline,
    .product-picker-selected .product-picker-qty-field,
    .product-picker-selected .product-picker-price-field,
    .product-picker-selected .product-picker-discount-field,
    .product-picker-selected .product-picker-iva-field,
    .product-picker-selected .product-picker-date-field,
    .product-picker-selected .product-picker-warehouse-field,
    .product-picker-selected .product-picker-reserve-field {
        grid-column: span 6 !important;
    }

    .product-picker-selected .product-picker-detail-field {
        grid-column: span 12 !important;
    }
}

.erp-icon {
    display: inline-block;
    flex: 0 0 auto;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

.side-group summary,
.side-link {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
}

.side-group summary > span,
.side-link > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-group summary::after {
    margin-left: auto;
}

.side-group summary .erp-icon,
.side-link .erp-icon {
    width: 16px;
    height: 16px;
    opacity: .9;
}

.side-link.active .erp-icon,
.side-link:hover .erp-icon,
.side-group summary:hover .erp-icon {
    opacity: 1;
}

.side-link.disabled .erp-icon {
    opacity: .55;
}

.erp-action-icon {
    width: 15px;
    height: 15px;
    margin-right: 5px;
}

.erp-action-button,
.erp-row-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    border-radius: 3px;
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.erp-action-button:disabled,
.erp-row-icon-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.erp-action-primary {
    border-color: #ff7a1a;
    background: #ff7a1a;
    color: #ffffff;
}

.erp-action-secondary {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #0f172a;
}

.erp-icon {
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.erp-row-icon-btn {
    width: 26px;
    min-width: 26px;
    height: 24px;
    min-height: 24px;
    padding: 0;
}

.line-detail-inline,
.product-picker-detail-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 26px;
    gap: 4px;
    align-items: center;
    width: 100%;
}

.commercial-lines-table .line-detail-input {
    width: 100% !important;
    min-width: 0 !important;
}

.line-expanded-detail-row td {
    height: auto !important;
    max-height: none !important;
    padding: 4px 6px !important;
    background: #f8fafc;
    border-bottom: 1px solid #cbd5e1;
}

.line-expanded-detail-textarea {
    width: 100%;
    min-height: 92px;
    height: 92px;
    resize: vertical;
    font-size: 12px;
    line-height: 1.35;
    border-radius: 3px;
}

.line-delete-button {
    color: #b91c1c;
}

.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    width: min(960px, 94vw) !important;
    max-width: 94vw !important;
}

.product-picker-selected {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    align-items: end !important;
}

.product-picker-selected .product-picker-ref-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-detail-field {
    grid-column: span 8 !important;
}

.product-picker-selected .product-picker-add-inline {
    grid-column: span 2 !important;
    display: flex;
    align-items: end;
    justify-content: stretch;
}

.product-picker-add-button {
    width: 100%;
}

.product-picker-selected .product-picker-long-detail-field {
    grid-column: 1 / -1 !important;
}

.product-picker-long-detail {
    min-height: 84px;
    height: 84px;
    resize: vertical;
    font-size: 12px;
    line-height: 1.35;
    border-radius: 3px;
}

.product-picker-selected .product-picker-qty-field,
.product-picker-selected .product-picker-discount-field,
.product-picker-selected .product-picker-iva-field,
.product-picker-selected .product-picker-reserve-field {
    grid-column: span 1 !important;
}

.product-picker-selected .product-picker-price-field,
.product-picker-selected .product-picker-date-field,
.product-picker-selected .product-picker-warehouse-field {
    grid-column: span 2 !important;
}

.commercial-lines-table th,
.commercial-lines-table td {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
}

.erp-grid .dxbl-grid-filter-row > td,
.erp-grid-fluid .dxbl-grid-filter-row > td,
.commercial-grid .dxbl-grid-filter-row > td,
.product-picker-grid .dxbl-grid-filter-row > td {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    background: #eaf2ff !important;
}

@media (max-width: 900px) {
    .product-picker-selected .product-picker-ref-field,
    .product-picker-selected .product-picker-detail-field,
    .product-picker-selected .product-picker-add-inline,
    .product-picker-selected .product-picker-long-detail-field,
    .product-picker-selected .product-picker-qty-field,
    .product-picker-selected .product-picker-price-field,
    .product-picker-selected .product-picker-discount-field,
    .product-picker-selected .product-picker-iva-field,
    .product-picker-selected .product-picker-date-field,
    .product-picker-selected .product-picker-warehouse-field,
    .product-picker-selected .product-picker-reserve-field {
        grid-column: 1 / -1 !important;
    }
}

.erp-ribbon-panel {
    padding: 8px 10px !important;
    margin-bottom: 8px;
}

.erp-ribbon {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.erp-ribbon-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 10px;
    border-right: 1px solid #d9dee8;
}

.erp-ribbon-group:last-of-type {
    border-right: 0;
}

.erp-ribbon-button {
    height: 30px;
    min-height: 30px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

.erp-ribbon-button:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.erp-ribbon-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.erp-ribbon-danger {
    color: #b42318;
}

.erp-ribbon-info {
    margin-left: auto;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.erp-grid-check {
    width: 15px;
    height: 15px;
    margin: 0;
    vertical-align: middle;
}

.pedido-action-panel {
    margin-bottom: 8px;
}

.pedido-actionbar .erp-ribbon-button {
    font-weight: 500;
}

.work-orders-page .page-header {
    margin-bottom: 10px;
}

.work-orders-page .grid-panel-fluid {
    min-height: 420px;
}

.work-order-action-panel {
    margin-bottom: 8px;
}

.work-order-actionbar .erp-ribbon-button {
    font-weight: 500;
}

.work-order-popup .dxbl-popup-body,
.work-order-popup .dxbl-modal-body {
    max-height: calc(90vh - 54px);
    overflow: auto;
    background: #f8fafc;
}

.work-order-popup .dxbl-popup-footer,
.work-order-popup .dxbl-modal-footer,
.work-order-popup .dxbl-popup-footer-content {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: #fff;
    border-top: 1px solid rgba(148, 163, 184, .24);
}

.work-order-editor {
    display: grid;
    gap: 14px;
    padding: 2px;
}

.work-order-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.section-heading.compact {
    margin-bottom: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.section-heading.compact h2 {
    font-size: .98rem;
}

.section-heading.compact p {
    margin-top: 2px;
}

.work-order-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 12px 16px;
}

.work-order-fields-compact {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.work-order-checks > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    min-height: 38px;
}

.work-order-task-list {
    display: grid;
    gap: 8px;
}

.work-order-task-row {
    display: grid;
    grid-template-columns: minmax(230px, .72fr) minmax(260px, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 7px;
    background: #f8fafc;
}

.work-order-task-row .dxbl-checkbox,
.work-order-task-row .dxbl-check-edit {
    min-width: 0;
}

.work-order-material-list {
    display: grid;
    gap: 10px;
}

.work-order-material-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.15fr) minmax(220px, 1.1fr) minmax(96px, .38fr) minmax(96px, .38fr) minmax(160px, .72fr) auto;
    gap: 10px;
    align-items: end;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 7px;
    background: #f8fafc;
}

.work-order-material-row .dxbl-btn {
    min-height: 38px;
    white-space: nowrap;
}

.work-order-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
}

.work-order-inline-actions {
    position: sticky;
    bottom: -2px;
    z-index: 4;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 2px;
    padding: 12px 0 0;
    border-top: 1px solid rgba(148, 163, 184, .2);
    background: linear-gradient(180deg, rgba(248, 250, 252, .76), #f8fafc 34%);
}

.work-order-inline-actions .dxbl-btn {
    min-width: 120px;
}

@media (max-width: 1100px) {
    .work-order-fields,
    .work-order-fields-compact,
    .work-order-task-row,
    .work-order-material-row,
    .work-order-notes {
        grid-template-columns: 1fr;
    }

    .work-order-inline-actions {
        justify-content: stretch;
    }

    .work-order-inline-actions .dxbl-btn {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* Ficha de comerciales: pantalla completa, no popup. Sigue el criterio de pedidos/clientes. */
.commercial-agent-page .commercial-agent-main-form,
.commercial-agent-page .commercial-agent-tab-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 28px !important;
    align-items: center !important;
}

.commercial-agent-page .commercial-agent-main-form {
    padding-bottom: 18px !important;
}

.commercial-agent-page .sap-field {
    display: grid !important;
    grid-template-columns: 132px minmax(0, 1fr) !important;
    gap: 0 12px !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: none !important;
}

.commercial-agent-page .sap-field > label {
    color: #526173 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    margin: 0 !important;
    text-align: left !important;
}

.commercial-agent-page .commercial-agent-code-field,
.commercial-agent-page .commercial-agent-tax-field,
.commercial-agent-page .commercial-agent-name-field,
.commercial-agent-page .commercial-agent-surname-field {
    grid-column: span 6 !important;
}

.commercial-agent-page .commercial-agent-trade-field {
    grid-column: span 8 !important;
}

.commercial-agent-page .commercial-agent-email-field {
    grid-column: span 7 !important;
}

.commercial-agent-page .commercial-agent-phone-field,
.commercial-agent-page .commercial-agent-place-field {
    grid-column: span 6 !important;
}

.commercial-agent-page .commercial-agent-address-field,
.commercial-agent-page .commercial-agent-notes-field {
    grid-column: 1 / -1 !important;
}

.commercial-agent-page .commercial-agent-cp-field,
.commercial-agent-page .commercial-agent-percent-field,
.commercial-agent-page .commercial-agent-order-field,
.commercial-agent-page .commercial-agent-status-field {
    grid-column: span 4 !important;
}

.commercial-agent-page input,
.commercial-agent-page .dxbl-text-edit,
.commercial-agent-page .dxbl-combobox,
.commercial-agent-page .dxbl-input-group {
    min-height: 32px !important;
    height: 32px !important;
    border-radius: 3px !important;
}

.commercial-agent-page textarea {
    min-height: 120px !important;
    border-radius: 3px !important;
    resize: vertical !important;
}

.commercial-agent-page .commercial-agent-status-field .dxbl-checkbox {
    align-items: center !important;
    min-height: 32px !important;
}

@media (max-width: 1100px) {
    .commercial-agent-page .commercial-agent-main-form,
    .commercial-agent-page .commercial-agent-tab-form {
        grid-template-columns: 1fr !important;
    }

    .commercial-agent-page .sap-field,
    .commercial-agent-page .commercial-agent-name-field,
    .commercial-agent-page .commercial-agent-surname-field,
    .commercial-agent-page .commercial-agent-code-field,
    .commercial-agent-page .commercial-agent-trade-field,
    .commercial-agent-page .commercial-agent-tax-field,
    .commercial-agent-page .commercial-agent-email-field,
    .commercial-agent-page .commercial-agent-phone-field,
    .commercial-agent-page .commercial-agent-place-field,
    .commercial-agent-page .commercial-agent-address-field,
    .commercial-agent-page .commercial-agent-notes-field,
    .commercial-agent-page .commercial-agent-cp-field,
    .commercial-agent-page .commercial-agent-percent-field,
    .commercial-agent-page .commercial-agent-order-field,
    .commercial-agent-page .commercial-agent-status-field {
        grid-column: 1 / -1 !important;
    }
}

.operations-service-popup .dxbl-popup-body {
    overflow: auto;
}

.operations-service-form {
    grid-template-columns: minmax(260px, 1fr) minmax(180px, .45fr);
    align-items: start;
    gap: 16px 18px;
}

.operations-check-field {
    min-height: auto;
}

.operations-check-stack {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    min-height: 42px;
    padding: 8px 0;
}

.operations-check-stack.inline {
    justify-content: flex-start;
    min-height: 0;
    padding: 0;
}

.operations-task-editor {
    display: grid;
    gap: 10px;
}

.operations-task-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(220px, auto);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 8px;
    background: #f8fafc;
}

.operations-inline-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 1100px) {
    .operations-service-form,
    .operations-task-row {
        grid-template-columns: 1fr;
    }
}

.order-series-tabs-panel {
    padding: 6px 10px !important;
    margin-bottom: 8px;
}

.order-series-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.order-series-tab {
    height: 30px;
    min-width: 82px;
    border: 1px solid #cbd5e1;
    border-bottom-color: #9fb2ce;
    background: #eef4fb;
    color: #183252;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 3px 3px 0 0;
    cursor: pointer;
    white-space: nowrap;
}

.order-series-tab span {
    min-width: 20px;
    height: 18px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
}

.order-series-tab.active {
    background: #fff;
    border-color: #94a3b8;
    border-bottom-color: #fff;
    color: #0f172a;
}

.order-state-dot {
    --dot-color: #64748b;
    width: 11px;
    height: 11px;
    display: inline-block;
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.72) 0 14%, var(--dot-color) 48%, rgba(15,23,42,.2) 100%);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .14), 0 0 5px rgba(100, 116, 139, .18);
    vertical-align: middle;
}

.order-state-dot-ok {
    --dot-color: #2bd608;
    box-shadow: 0 0 0 1px rgba(34, 112, 9, .18), 0 0 5px rgba(234, 179, 8, .28);
}

.order-state-dot-warning {
    --dot-color: #f59e0b;
    box-shadow: 0 0 0 1px rgba(146, 64, 14, .18), 0 0 5px rgba(245, 158, 11, .26);
}

.order-state-dot-danger {
    --dot-color: #b91c1c;
    box-shadow: 0 0 0 1px rgba(127, 29, 29, .22), 0 0 5px rgba(99, 102, 241, .24);
}

.payment-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}

.commercial-action-panel {
    margin-top: -2px;
}

.pedidos-grid .dxbl-grid-table th:first-child,
.pedidos-grid .dxbl-grid-table td:first-child,
.pedidos-grid .dxbl-grid-table th:nth-child(2),
.pedidos-grid .dxbl-grid-table td:nth-child(2) {
    text-align: center;
}

.commercial-bottom-actions {
    max-width: 1200px;
    margin: 10px auto 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 0 0 0;
}

.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    max-width: 900px !important;
}

.product-picker-search {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 4px !important;
}

.product-picker-search > label {
    font-size: 11px;
    font-weight: 700;
    color: #344054;
}

.product-picker-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 8px;
    align-items: end;
}

.product-picker-search-button {
    height: 30px !important;
    min-height: 30px !important;
}

.product-picker-selected {
    grid-template-columns: 124px minmax(260px, 1fr) 132px !important;
    grid-template-areas:
        "ref detail add"
        "qty price discount"
        "iva date warehouse"
        "reserve reserve reserve" !important;
    max-width: 100% !important;
}

.product-picker-ref-field { grid-area: ref; }
.product-picker-detail-field { grid-area: detail; }
.product-picker-add-inline { grid-area: add; align-self: end; }
.product-picker-qty-field { grid-area: qty; }
.product-picker-price-field { grid-area: price; }
.product-picker-discount-field { grid-area: discount; }
.product-picker-iva-field { grid-area: iva; }
.product-picker-date-field { grid-area: date; }
.product-picker-warehouse-field { grid-area: warehouse; }
.product-picker-reserve-field { grid-area: reserve; max-width: 120px !important; }
.product-picker-long-detail-field {
    grid-column: 1 / -1 !important;
}

.product-picker-add-inline .erp-action-button {
    width: 100%;
    justify-content: center;
}

.erp-grid .dxbl-grid-filter-row td,
.erp-grid-fluid .dxbl-grid-filter-row td,
.commercial-grid .dxbl-grid-filter-row td,
.product-picker-grid .dxbl-grid-filter-row td,
.product-grid-stable .dxbl-grid-filter-row td {
    height: 35px !important;
    min-height: 35px !important;
    background: #eaf3ff !important;
    border-bottom: 1px solid #bdd7f5 !important;
    padding: 3px 5px !important;
}

.erp-grid .dxbl-grid-table > tbody > tr > td,
.erp-grid-fluid .dxbl-grid-table > tbody > tr > td,
.commercial-grid .dxbl-grid-table > tbody > tr > td,
.product-picker-grid .dxbl-grid-table > tbody > tr > td,
.product-grid-stable .dxbl-grid-table > tbody > tr > td {
    height: 35px !important;
    min-height: 35px !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}

.erp-grid .dxbl-grid-filter-row input,
.erp-grid-fluid .dxbl-grid-filter-row input,
.commercial-grid .dxbl-grid-filter-row input,
.product-picker-grid .dxbl-grid-filter-row input,
.product-grid-stable .dxbl-grid-filter-row input,
.erp-grid .dxbl-grid-filter-row .dxbl-text-edit-input,
.erp-grid-fluid .dxbl-grid-filter-row .dxbl-text-edit-input,
.commercial-grid .dxbl-grid-filter-row .dxbl-text-edit-input,
.product-picker-grid .dxbl-grid-filter-row .dxbl-text-edit-input,
.product-grid-stable .dxbl-grid-filter-row .dxbl-text-edit-input {
    height: 26px !important;
    min-height: 26px !important;
    line-height: 24px !important;
    font-size: 11.5px !important;
}

.commercial-lines-table th,
.commercial-lines-table td {
    height: 35px !important;
    min-height: 35px !important;
}

.commercial-lines-table input,
.commercial-lines-table .dxbl-text-edit,
.commercial-lines-table .dxbl-edit,
.commercial-lines-table .dxbl-btn,
.commercial-lines-table .erp-row-icon-btn {
    height: 28px !important;
    min-height: 28px !important;
}

@media (max-width: 820px) {
    .product-picker-search-row,
    .product-picker-selected {
        grid-template-columns: 1fr !important;
        grid-template-areas: none !important;
    }

    .product-picker-selected > * {
        grid-area: auto !important;
        grid-column: 1 / -1 !important;
    }

    .commercial-bottom-actions {
        max-width: 100%;
        flex-wrap: wrap;
    }
}

/* Revision 2026-05-19: base visual estable */
body {
    font-family: Roboto, Inter, Aptos, "Helvetica Neue", Arial, system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.sidebar {
    background: #080d1e !important;
}

.side-group summary:hover,
.side-link:hover,
.side-link.active {
    background: rgba(31, 94, 255, .22) !important;
}

.erp-popup .dxbl-popup-footer,
.erp-popup .dxbl-modal-footer,
.erp-popup .dxbl-popup-footer-content {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border-top: 1px solid #dbe3ef !important;
    background: #f8fafc !important;
}

.master-editor-shell .popup-actions.master-inline-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e4e9f2;
}

.master-sap-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
    align-items: end !important;
}

.master-sap-form .sap-field {
    min-width: 0 !important;
    max-width: none !important;
}

.master-sap-form .sap-field-medium,
.master-sap-form .sap-field-long {
    grid-column: span 4 !important;
}

.master-sap-form .sap-field-full {
    grid-column: 1 / -1 !important;
}

.master-editor-almacenes .master-sap-form .sap-field-long,
.master-editor-agencias-transporte .master-sap-form .sap-field-long,
.master-editor-fases-pedidos .master-sap-form .sap-field-long,
.master-editor-grupos-clientes .master-sap-form .sap-field-long,
.master-editor-bancos .master-sap-form .sap-field-long {
    grid-column: span 6 !important;
}

.master-editor-almacenes .master-sap-form .sap-field-full,
.master-editor-agencias-transporte .master-sap-form .sap-field-full,
.master-editor-fases-pedidos .master-sap-form .sap-field-full,
.master-editor-grupos-clientes .master-sap-form .sap-field-full,
.master-editor-bancos .master-sap-form .sap-field-full {
    grid-column: 1 / -1 !important;
}

.master-editor-fases-pedidos .sap-field-full .dxbl-memo textarea,
.master-editor-fases-pedidos .sap-field-full textarea {
    min-height: 240px !important;
}

.master-editor-popup .dxbl-popup-body,
.master-editor-popup .dxbl-modal-body {
    max-height: calc(92vh - 132px) !important;
    overflow: auto !important;
}

.master-editor-popup .dxbl-popup-footer,
.master-editor-popup .dxbl-modal-footer,
.master-editor-popup .dxbl-popup-footer-content {
    flex-shrink: 0 !important;
}

.master-editor-marcas .dxbl-popup-body,
.master-editor-marcas .dxbl-modal-body {
    padding-bottom: 118px !important;
}

.master-editor-marcas .master-sap-form .sap-field-full textarea,
.master-editor-marcas .master-sap-form .sap-field-full .dxbl-memo textarea {
    min-height: 120px !important;
}

.master-sap-form .sap-field-check {
    grid-column: span 3 !important;
    min-width: 0 !important;
}

.master-sap-form .sap-field-xs,
.master-sap-form .sap-field-day,
.master-sap-form .sap-field-money {
    grid-column: span 2 !important;
    min-width: 0 !important;
}

.dx-check-line,
.master-sap-form .dx-check-line {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 180px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.dx-check-line span {
    white-space: nowrap !important;
}

.color-input {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
}

@media (max-width: 900px) {
    .master-sap-form .sap-field,
    .master-sap-form .sap-field-medium,
    .master-sap-form .sap-field-long,
    .master-sap-form .sap-field-check,
    .master-sap-form .sap-field-xs,
    .master-sap-form .sap-field-day,
    .master-sap-form .sap-field-money {
        grid-column: 1 / -1 !important;
        max-width: 100% !important;
    }
}

/* Listados grandes: centrados, sin zona muerta infinita en monitores grandes */
.erp-page.list-page,
.erp-page.master-list-page,
.erp-page.article-list-page,
.erp-page.comercial-list-page,
.list-page,
.master-list-page,
.article-list-page,
.comercial-list-page {
    width: min(100%, 1680px) !important;
    max-width: 1680px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.article-list-page,
.comercial-list-page {
    width: min(100%, 1760px) !important;
    max-width: 1760px !important;
}

/* Grids 35px, filtro distinguible */
.erp-grid .dxbl-grid-header-row,
.erp-grid .dxbl-grid-data-row,
.erp-grid .dxbl-grid-filter-row,
.erp-grid-fluid .dxbl-grid-header-row,
.erp-grid-fluid .dxbl-grid-data-row,
.erp-grid-fluid .dxbl-grid-filter-row,
.commercial-grid .dxbl-grid-header-row,
.commercial-grid .dxbl-grid-data-row,
.commercial-grid .dxbl-grid-filter-row,
.product-picker-grid .dxbl-grid-header-row,
.product-picker-grid .dxbl-grid-data-row,
.product-picker-grid .dxbl-grid-filter-row {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
}

.erp-grid .dxbl-grid-filter-row > td,
.erp-grid-fluid .dxbl-grid-filter-row > td,
.commercial-grid .dxbl-grid-filter-row > td,
.product-picker-grid .dxbl-grid-filter-row > td {
    background: #eaf2ff !important;
}

.erp-grid .dxbl-grid-table th,
.erp-grid .dxbl-grid-table td,
.product-picker-grid .dxbl-grid-table th,
.product-picker-grid .dxbl-grid-table td,
.commercial-grid .dxbl-grid-table th,
.commercial-grid .dxbl-grid-table td {
    font-size: 11.5px !important;
    line-height: 1.15 !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}

/* Popup producto: 2 lineas compactas, sin desbordar */
.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    width: min(900px, 94vw) !important;
    max-width: 94vw !important;
}

.product-picker-search-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 130px !important;
    gap: 8px !important;
    align-items: end !important;
}

.product-picker-selected {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 6px 8px !important;
    overflow: hidden !important;
}

.product-picker-selected .product-picker-ref-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-detail-field { grid-column: span 8 !important; }
.product-picker-selected .product-picker-add-inline { grid-column: span 2 !important; }
.product-picker-selected .product-picker-long-detail-field { grid-column: 1 / -1 !important; }
.product-picker-selected .product-picker-qty-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-price-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-discount-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-iva-field { grid-column: span 1 !important; }
.product-picker-selected .product-picker-date-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-warehouse-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-reserve-field { grid-column: span 1 !important; }

.product-picker-selected .product-picker-add-inline .erp-action-button {
    width: 100% !important;
    height: 31px !important;
}

.product-picker-detail-inline,
.line-detail-inline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 28px !important;
    gap: 4px !important;
    align-items: center !important;
}

.commercial-lines-table .dxbl-combobox,
.commercial-lines-table .dxbl-text-edit,
.commercial-lines-table input,
.commercial-lines-table button {
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    box-sizing: border-box !important;
}

.commercial-client-field {
    grid-column: span 5 !important;
}

@media (max-width: 980px) {
    .product-picker-search-row,
    .product-picker-selected {
        grid-template-columns: 1fr 1fr !important;
    }
    .product-picker-selected .product-picker-ref-field,
    .product-picker-selected .product-picker-detail-field,
    .product-picker-selected .product-picker-add-inline,
    .product-picker-selected .product-picker-long-detail-field,
    .product-picker-selected .product-picker-qty-field,
    .product-picker-selected .product-picker-price-field,
    .product-picker-selected .product-picker-discount-field,
    .product-picker-selected .product-picker-iva-field,
    .product-picker-selected .product-picker-date-field,
    .product-picker-selected .product-picker-warehouse-field,
    .product-picker-selected .product-picker-reserve-field {
        grid-column: span 2 !important;
    }
}


/* 2026-05-19 revision: ribbon, compact CRUD popups, stable grids/forms */
.side-nav { background: #080d1e !important; }
.side-brand { background: #080d1e !important; }

.master-editor-card-clean {
    max-width: 760px !important;
    margin: 0 auto !important;
    padding: 18px 20px !important;
}

.master-editor-popup:not(.master-editor-popup-compact) .master-editor-shell {
    align-items: stretch !important;
}

.master-editor-popup:not(.master-editor-popup-compact) .master-editor-card-clean {
    width: 100% !important;
    max-width: none !important;
}

.master-editor-popup:not(.master-editor-popup-compact) .master-sap-form {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
}

.master-editor-popup:not(.master-editor-popup-compact) .sap-field-full,
.master-editor-popup:not(.master-editor-popup-compact) .sap-field-full .dxbl-text-edit,
.master-editor-popup:not(.master-editor-popup-compact) .sap-field-full .dxbl-memo-edit,
.master-editor-popup:not(.master-editor-popup-compact) .sap-field-full textarea {
    width: 100% !important;
    max-width: none !important;
}

.master-editor-shell .erp-record-strip {
    display: none !important;
}

.dxbl-popup .popup-actions,
.master-inline-actions,
.commercial-bottom-actions {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

.commercial-bottom-actions {
    max-width: 1200px !important;
    margin: 12px auto 0 auto !important;
    padding: 12px 0 0 0 !important;
}

.header-actions .dxbl-btn,
.commercial-bottom-actions .dxbl-btn,
.popup-actions .dxbl-btn {
    height: 34px !important;
    min-height: 34px !important;
}

.dx-ribbon-panel {
    padding: 0 !important;
    overflow: hidden !important;
}

.erp-dx-ribbon {
    width: 100% !important;
    border: 0 !important;
    background: #f8fafc !important;
}

.erp-ribbon-selection {
    padding: 6px 12px 8px 12px;
    font-size: 12px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.erp-grid .dxbl-grid-table > tbody > tr,
.erp-grid-fluid .dxbl-grid-table > tbody > tr,
.product-picker-grid .dxbl-grid-table > tbody > tr {
    height: 35px !important;
    min-height: 35px !important;
}

.erp-grid .dxbl-grid-filter-row,
.erp-grid-fluid .dxbl-grid-filter-row,
.product-picker-grid .dxbl-grid-filter-row {
    height: 35px !important;
    min-height: 35px !important;
    background: #eaf2ff !important;
}

.erp-grid .dxbl-grid-filter-row td,
.erp-grid-fluid .dxbl-grid-filter-row td,
.product-picker-grid .dxbl-grid-filter-row td {
    height: 35px !important;
    min-height: 35px !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    background: #eaf2ff !important;
}

.erp-grid .dxbl-grid-table th,
.erp-grid .dxbl-grid-table td,
.erp-grid-fluid .dxbl-grid-table th,
.erp-grid-fluid .dxbl-grid-table td {
    font-size: 12px !important;
}

.product-picker-popup .dxbl-popup-content {
    max-width: 94vw !important;
}

.product-picker-search {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 120px !important;
    gap: 8px !important;
    align-items: end !important;
}

.product-picker-search > label {
    grid-column: 1 / -1 !important;
}

.product-picker-search-button {
    width: 120px !important;
    height: 31px !important;
}

.product-picker-selected {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 7px 8px !important;
    padding: 9px !important;
}

.product-picker-selected .product-picker-ref-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-detail-field { grid-column: span 8 !important; }
.product-picker-selected .product-picker-add-inline { grid-column: span 2 !important; }
.product-picker-selected .product-picker-long-detail-field { grid-column: 1 / -1 !important; }
.product-picker-selected .product-picker-qty-field,
.product-picker-selected .product-picker-price-field,
.product-picker-selected .product-picker-discount-field,
.product-picker-selected .product-picker-date-field,
.product-picker-selected .product-picker-warehouse-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-iva-field,
.product-picker-selected .product-picker-reserve-field { grid-column: span 1 !important; }

.product-picker-selected .product-picker-add-inline .erp-action-button {
    width: 100% !important;
    height: 31px !important;
    min-height: 31px !important;
    padding: 0 8px !important;
}

.commercial-tabs .dxbl-tabs-content,
.commercial-tabs .dxbl-tabs-content-panel,
.commercial-tabs .dxbl-tabs-tabpane {
    overflow: visible !important;
    max-height: none !important;
}

.commercial-lines-table {
    font-size: 12px !important;
}

.commercial-lines-table th,
.commercial-lines-table td {
    height: 35px !important;
    min-height: 35px !important;
    padding: 3px 4px !important;
}

.line-action-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.line-action-buttons .erp-row-icon-btn,
.commercial-lines-table .erp-row-icon-btn {
    height: 26px !important;
    width: 26px !important;
    min-width: 26px !important;
}

@media (max-width: 980px) {
    .product-picker-search,
    .product-picker-selected {
        grid-template-columns: 1fr 1fr !important;
    }
    .product-picker-selected .sap-field,
    .product-picker-selected .product-picker-ref-field,
    .product-picker-selected .product-picker-detail-field,
    .product-picker-selected .product-picker-add-inline,
    .product-picker-selected .product-picker-long-detail-field,
    .product-picker-selected .product-picker-qty-field,
    .product-picker-selected .product-picker-price-field,
    .product-picker-selected .product-picker-discount-field,
    .product-picker-selected .product-picker-iva-field,
    .product-picker-selected .product-picker-date-field,
    .product-picker-selected .product-picker-warehouse-field,
    .product-picker-selected .product-picker-reserve-field {
        grid-column: span 2 !important;
    }
}


.commercial-tabs .dxbl-tabs-content-panel,
.commercial-tabs .dxbl-tabs-tabpane {
    overflow: visible !important;
    max-height: none !important;
}

.commercial-lines-wrap {
    overflow-x: hidden !important;
}

.commercial-lines-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
    font-size: 11.5px !important;
}

.commercial-lines-table th,
.commercial-lines-table td {
    height: 35px !important;
    padding: 3px 5px !important;
    line-height: 1.15 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.commercial-line-row {
    cursor: pointer;
}

.commercial-line-row:hover {
    background: #f8fbff;
}

.line-detail-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.line-detail-text,
.line-ref-cell,
.line-number-cell,
.line-check-cell {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-number-cell,
.line-total-cell {
    text-align: right;
}

.line-action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.line-expanded-detail-readonly {
    white-space: pre-wrap;
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-radius: 4px;
    padding: 8px 10px;
    color: #334155;
    line-height: 1.35;
}

.line-editor-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 10px 2px 4px;
}

.line-editor-form .sap-field {
    gap: 4px !important;
}

.line-editor-form .sap-field-full {
    grid-column: 1 / -1 !important;
    max-width: none !important;
}

.line-editor-long-detail {
    min-height: 110px !important;
    resize: vertical;
}

.commercial-bottom-actions {
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

.commercial-bottom-actions .dxbl-btn,
.header-actions .dxbl-btn {
    min-height: 34px !important;
    height: 34px !important;
}

@media (max-width: 980px) {
    .commercial-lines-wrap {
        overflow-x: auto !important;
    }
    .commercial-lines-table {
        min-width: 960px !important;
    }
}

/* Ficha pedido: acabado SAP compacto y tabla estable */
.commercial-ficha-header,
.commercial-ficha-card,
.commercial-bottom-actions {
    width: min(100%, 1320px) !important;
    max-width: 1320px !important;
}

.commercial-ficha-header {
    margin-bottom: 10px !important;
}

.commercial-ficha-header h1 {
    font-size: 32px !important;
    line-height: 1.05 !important;
}

.commercial-ficha-card {
    border-radius: 8px !important;
    padding: 16px !important;
}

.commercial-ficha-card .sap-card-title {
    margin-bottom: 12px !important;
}

.commercial-tabs {
    margin-top: 12px !important;
}

.commercial-tabs .sap-section {
    padding-top: 14px !important;
}

.commercial-lines-wrap {
    border: 1px solid #d7dee9 !important;
    border-radius: 6px !important;
    background: #fff !important;
    overflow-x: auto !important;
}

.commercial-lines-table {
    min-width: 900px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.commercial-lines-table th {
    height: 34px !important;
    border-bottom: 1px solid #d7dee9 !important;
    background: #f3f6fa !important;
}

.commercial-lines-table td {
    display: table-cell !important;
    height: 34px !important;
    max-height: 34px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

.commercial-lines-table .line-ref { width: 100px !important; }
.commercial-lines-table .line-detail { width: 210px !important; }
.commercial-lines-table .line-qty { width: 60px !important; }
.commercial-lines-table .line-money { width: 66px !important; }
.commercial-lines-table .line-disc { width: 52px !important; }
.commercial-lines-table .line-date { width: 74px !important; }
.commercial-lines-table .line-warehouse { width: 42px !important; }
.commercial-lines-table .line-check { width: 40px !important; }
.commercial-lines-table .line-total { width: 72px !important; }
.commercial-lines-table .line-actions { width: 58px !important; }

.commercial-lines-table td.line-ref-cell,
.commercial-lines-table td.line-detail-cell,
.commercial-lines-table td.line-number-cell,
.commercial-lines-table td.line-check-cell,
.commercial-lines-table td.line-total-cell {
    display: table-cell !important;
}

.commercial-lines-table .line-detail-text,
.commercial-lines-table .line-ref-cell,
.commercial-lines-table .line-number-cell,
.commercial-lines-table .line-check-cell,
.commercial-lines-table .line-warehouse-cell,
.commercial-lines-table .line-total-cell {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.commercial-lines-table .line-detail-inline {
    width: 100% !important;
}

.commercial-lines-table .line-detail-text {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.commercial-lines-table .line-number-cell,
.commercial-lines-table .line-total-cell {
    font-variant-numeric: tabular-nums;
    text-align: right !important;
}

.commercial-lines-table .line-action-buttons {
    justify-content: center !important;
}

.commercial-lines-table .line-expanded-detail-row td {
    height: auto !important;
    max-height: none !important;
    white-space: normal !important;
}

.commercial-totals {
    margin-top: 10px !important;
}

.commercial-totals div {
    border-radius: 6px !important;
    min-width: 150px !important;
    padding: 7px 10px !important;
}

/* Ajustes de ficha comercial: labels ligeras, envio y popup producto */
.commercial-ficha-card .sap-field > label,
.commercial-ficha-card .sap-field label,
.product-picker-popup .sap-field > label,
.product-picker-popup .sap-field label,
.product-picker-search > label {
    font-weight: 400 !important;
    white-space: nowrap !important;
    min-height: 0 !important;
}

.commercial-shipping-form .sap-field > label {
    text-align: right !important;
    line-height: 1.05 !important;
}

.commercial-shipping-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 8px 14px !important;
    align-items: center !important;
}

.commercial-shipping-form .sap-field {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) !important;
    gap: 6px !important;
    align-items: center !important;
    max-width: none !important;
}

.commercial-shipping-form .sap-field-long,
.commercial-shipping-form .sap-field-full {
    grid-column: span 6 !important;
}

.commercial-shipping-form .sap-field-medium {
    grid-column: span 4 !important;
}

.commercial-shipping-form .sap-field-short,
.commercial-shipping-form .sap-field-cp,
.commercial-shipping-form .sap-field-phone,
.commercial-shipping-form .sap-field-money,
.commercial-shipping-form .sap-field-date {
    grid-column: span 3 !important;
}

.commercial-shipping-form .dxbl-text-edit,
.commercial-shipping-form .dxbl-combobox,
.commercial-shipping-form .form-control,
.commercial-shipping-form input {
    min-height: 30px !important;
    height: 30px !important;
    border-radius: 3px !important;
    font-size: 12px !important;
}

.commercial-lines-table th {
    vertical-align: middle !important;
}

.commercial-lines-table .line-ref,
.commercial-lines-table .line-detail,
.commercial-lines-table .line-date,
.commercial-lines-table .line-warehouse,
.commercial-lines-table .line-check,
.commercial-lines-table .line-actions {
    text-align: left !important;
}

.commercial-lines-table .line-qty,
.commercial-lines-table .line-money,
.commercial-lines-table .line-disc,
.commercial-lines-table .line-total {
    text-align: right !important;
}

.commercial-lines-table .line-warehouse,
.commercial-lines-table .line-warehouse-cell,
.commercial-lines-table .line-check,
.commercial-lines-table .line-check-cell {
    text-align: center !important;
}

.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    max-width: 980px !important;
}

.product-picker-selected {
    grid-template-columns: 130px minmax(300px, 1fr) 120px 128px !important;
    grid-template-areas:
        "ref detail detail add"
        "qty price discount iva"
        "date warehouse reserve reserve"
        "long long long long" !important;
    gap: 9px 12px !important;
    align-items: end !important;
}

.product-picker-selected .product-picker-ref-field,
.product-picker-selected .product-picker-detail-field,
.product-picker-selected .product-picker-add-inline,
.product-picker-selected .product-picker-qty-field,
.product-picker-selected .product-picker-price-field,
.product-picker-selected .product-picker-discount-field,
.product-picker-selected .product-picker-iva-field,
.product-picker-selected .product-picker-date-field,
.product-picker-selected .product-picker-warehouse-field,
.product-picker-selected .product-picker-reserve-field,
.product-picker-selected .product-picker-long-detail-field {
    grid-column: auto !important;
    max-width: none !important;
    min-width: 0 !important;
}

.product-picker-long-detail-field {
    grid-area: long !important;
}

.product-picker-detail-inline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 30px !important;
    gap: 6px !important;
    align-items: center !important;
}

.product-picker-selected input,
.product-picker-selected textarea,
.product-picker-selected .dxbl-text-edit,
.product-picker-selected .dxbl-combobox,
.product-picker-selected .dxbl-edit {
    min-height: 30px !important;
    height: 30px !important;
    font-size: 12px !important;
}

.product-picker-long-detail {
    min-height: 96px !important;
    height: 96px !important;
    resize: vertical !important;
}

@media (max-width: 980px) {
    .commercial-shipping-form .sap-field {
        grid-template-columns: 1fr !important;
    }

    .commercial-shipping-form .sap-field > label {
        text-align: left !important;
    }

    .product-picker-selected {
        grid-template-columns: 1fr 1fr !important;
        grid-template-areas:
            "ref add"
            "detail detail"
            "qty price"
            "discount iva"
            "date warehouse"
            "reserve reserve"
            "long long" !important;
    }
}

/* Popup producto: reticula uniforme y compacta */
.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    max-width: 900px !important;
}

.product-picker-popup .dxbl-popup-body {
    padding: 12px 14px 10px !important;
}

.product-picker {
    gap: 10px !important;
}

.product-picker:focus {
    outline: none !important;
}

.product-picker-search-row {
    grid-template-columns: minmax(0, 1fr) 112px !important;
    gap: 8px !important;
}

.product-picker-search-button {
    width: 112px !important;
    min-width: 112px !important;
}

.product-picker-selected {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-areas:
        "ref detail detail add"
        "qty price discount iva"
        "date warehouse warehouse reserve"
        "long long long long" !important;
    column-gap: 10px !important;
    row-gap: 8px !important;
    padding: 10px !important;
    align-items: end !important;
}

.product-picker-selected .product-picker-ref-field { grid-area: ref !important; }
.product-picker-selected .product-picker-detail-field { grid-area: detail !important; }
.product-picker-selected .product-picker-add-inline { grid-area: add !important; }
.product-picker-selected .product-picker-qty-field { grid-area: qty !important; }
.product-picker-selected .product-picker-price-field { grid-area: price !important; }
.product-picker-selected .product-picker-discount-field { grid-area: discount !important; }
.product-picker-selected .product-picker-iva-field { grid-area: iva !important; }
.product-picker-selected .product-picker-date-field { grid-area: date !important; }
.product-picker-selected .product-picker-warehouse-field { grid-area: warehouse !important; }
.product-picker-selected .product-picker-reserve-field { grid-area: reserve !important; }
.product-picker-selected .product-picker-long-detail-field { grid-area: long !important; }

.product-picker-selected > .product-picker-ref-field,
.product-picker-selected > .product-picker-detail-field,
.product-picker-selected > .product-picker-add-inline,
.product-picker-selected > .product-picker-qty-field,
.product-picker-selected > .product-picker-price-field,
.product-picker-selected > .product-picker-discount-field,
.product-picker-selected > .product-picker-iva-field,
.product-picker-selected > .product-picker-date-field,
.product-picker-selected > .product-picker-warehouse-field,
.product-picker-selected > .product-picker-reserve-field,
.product-picker-selected > .product-picker-long-detail-field {
    width: 100% !important;
    max-width: none !important;
}

.product-picker-selected .sap-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.product-picker-selected label,
.product-picker-search > label {
    font-size: 11px !important;
    line-height: 1.1 !important;
}

.product-picker-detail-inline {
    grid-template-columns: minmax(0, 1fr) 28px !important;
}

.product-picker-detail-toggle,
.product-picker-selected .erp-row-icon-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
}

.product-picker-selected input,
.product-picker-selected .dxbl-text-edit,
.product-picker-selected .dxbl-combobox,
.product-picker-selected .dxbl-edit {
    height: 28px !important;
    min-height: 28px !important;
}

.product-picker-add-inline .erp-action-button {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 8px !important;
}

@media (max-width: 780px) {
    .product-picker-selected {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-areas:
            "ref add"
            "detail detail"
            "qty price"
            "discount iva"
            "date warehouse"
            "reserve reserve"
            "long long" !important;
    }
}

/* Popup producto: reticula SAP estable de 12 columnas */
.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    max-width: 900px !important;
    border-radius: 8px !important;
}

.product-picker-popup .dxbl-popup-header {
    min-height: 42px !important;
    padding: 10px 14px !important;
}

.product-picker-popup .dxbl-popup-body {
    padding: 10px 14px 8px !important;
}

.product-picker-popup .dxbl-popup-footer {
    padding: 8px 14px 10px !important;
}

.product-picker {
    gap: 8px !important;
}

.product-picker-search {
    gap: 4px !important;
}

.product-picker-search-row {
    grid-template-columns: minmax(0, 1fr) 104px !important;
    gap: 8px !important;
}

.product-picker-search-button {
    width: 104px !important;
    min-width: 104px !important;
}

.product-picker-selected {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-template-areas: none !important;
    grid-auto-flow: row !important;
    gap: 8px 10px !important;
    align-items: end !important;
    padding: 10px !important;
    background: #f9fafb !important;
    border: 1px solid #d8dee8 !important;
    border-radius: 6px !important;
}

.product-picker-selected > * {
    grid-area: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    width: 100% !important;
}

.product-picker-selected .product-picker-ref-field,
.product-picker-selected .product-picker-detail-field,
.product-picker-selected .product-picker-qty-field,
.product-picker-selected .product-picker-price-field,
.product-picker-selected .product-picker-long-detail-field,
.product-picker-selected .product-picker-discount-field,
.product-picker-selected .product-picker-iva-field,
.product-picker-selected .product-picker-date-field,
.product-picker-selected .product-picker-warehouse-field,
.product-picker-selected .product-picker-reserve-field,
.product-picker-selected .product-picker-line-actions {
    grid-area: auto !important;
}

.product-picker-selected .product-picker-ref-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-detail-field { grid-column: span 10 !important; }
.product-picker-selected .product-picker-qty-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-price-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-long-detail-field { grid-column: 1 / -1 !important; }
.product-picker-selected .product-picker-discount-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-iva-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-total-field { grid-column: span 4 !important; }
.product-picker-selected .product-picker-date-field { grid-column: span 3 !important; }
.product-picker-selected .product-picker-warehouse-field { grid-column: span 7 !important; }
.product-picker-selected .product-picker-reserve-field { grid-column: span 2 !important; }
.product-picker-selected .product-picker-line-actions { grid-column: 1 / -1 !important; }

.product-picker-selected .sap-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.product-picker-selected label,
.product-picker-search > label {
    color: #475467 !important;
    font-size: 10.5px !important;
    line-height: 1.1 !important;
}

.product-picker-selected input,
.product-picker-selected .dxbl-text-edit,
.product-picker-selected .dxbl-combobox,
.product-picker-selected .dxbl-edit,
.product-picker-search .dxbl-text-edit,
.product-picker-search input {
    height: 28px !important;
    min-height: 28px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
}

.product-picker-detail-inline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 28px !important;
    gap: 6px !important;
    align-items: end !important;
}

.product-picker-detail-toggle,
.product-picker-selected .erp-row-icon-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
}

.product-picker-long-detail {
    min-height: 84px !important;
    height: 84px !important;
    border-radius: 4px !important;
}

.product-picker-line-actions {
    display: flex !important;
    justify-content: flex-end !important;
    padding-top: 2px !important;
}

.product-picker-line-actions .product-picker-add-button {
    width: auto !important;
    min-width: 132px !important;
    height: 30px !important;
    min-height: 30px !important;
    justify-content: center !important;
}

.product-picker-message {
    padding: 7px 10px !important;
    font-size: 12px !important;
}

@media (max-width: 900px) {
    .product-picker-selected .product-picker-ref-field,
    .product-picker-selected .product-picker-qty-field,
    .product-picker-selected .product-picker-price-field,
    .product-picker-selected .product-picker-discount-field,
    .product-picker-selected .product-picker-iva-field,
    .product-picker-selected .product-picker-total-field,
    .product-picker-selected .product-picker-date-field,
    .product-picker-selected .product-picker-reserve-field {
        grid-column: span 6 !important;
    }

    .product-picker-selected .product-picker-detail-field,
    .product-picker-selected .product-picker-warehouse-field,
    .product-picker-selected .product-picker-long-detail-field,
    .product-picker-selected .product-picker-line-actions {
        grid-column: 1 / -1 !important;
    }
}

/* Breathing room between form inputs */
.commercial-shipping-form {
    column-gap: 22px !important;
    row-gap: 10px !important;
}

.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    max-width: 980px !important;
}

.product-picker-search-row {
    gap: 10px !important;
}

.product-picker-selected {
    gap: 10px 18px !important;
    padding: 12px !important;
}

.product-picker-selected .sap-field {
    gap: 5px !important;
}

/* Numeric inputs: fixed compact size app-wide */
:root {
    --erp-numeric-input-width: 76px;
    --erp-numeric-total-width: 104px;
}

.sap-field input.numeric-text-input,
.sap-field .pro-native-input.numeric-text-input,
input.numeric-text-input,
.sap-field input[inputmode="decimal"],
.sap-field input[inputmode="numeric"] {
    width: var(--erp-numeric-input-width) !important;
    min-width: var(--erp-numeric-input-width) !important;
    max-width: var(--erp-numeric-input-width) !important;
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.product-picker-selected .product-picker-total-field input.numeric-text-input {
    width: var(--erp-numeric-total-width) !important;
    min-width: var(--erp-numeric-total-width) !important;
    max-width: var(--erp-numeric-total-width) !important;
}

.product-picker-selected .product-picker-qty-field,
.product-picker-selected .product-picker-price-field,
.product-picker-selected .product-picker-discount-field,
.product-picker-selected .product-picker-iva-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-total-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-date-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-warehouse-field {
    grid-column: span 10 !important;
}

.product-picker-selected .product-picker-reserve-field {
    grid-column: span 2 !important;
}

@media (max-width: 900px) {
    .product-picker-selected .product-picker-ref-field,
    .product-picker-selected .product-picker-qty-field,
    .product-picker-selected .product-picker-price-field,
    .product-picker-selected .product-picker-discount-field,
    .product-picker-selected .product-picker-iva-field,
    .product-picker-selected .product-picker-total-field,
    .product-picker-selected .product-picker-date-field,
    .product-picker-selected .product-picker-reserve-field {
        grid-column: span 6 !important;
    }

    .product-picker-selected .product-picker-detail-field,
    .product-picker-selected .product-picker-warehouse-field,
    .product-picker-selected .product-picker-long-detail-field,
    .product-picker-selected .product-picker-line-actions {
        grid-column: 1 / -1 !important;
    }
}

/* Compact SAP-like product add form */
.commercial-shipping-form {
    column-gap: 14px !important;
    row-gap: 7px !important;
}

.commercial-lines-table table {
    border-spacing: 0 !important;
}

.commercial-lines-table th {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.commercial-lines-table td {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    height: 30px !important;
    min-height: 30px !important;
}

.commercial-lines-table .line-expanded-detail-row td {
    padding-top: 2px !important;
    padding-bottom: 4px !important;
}

.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    max-width: 820px !important;
}

.product-picker-popup .dxbl-popup-header {
    min-height: 34px !important;
    padding: 7px 12px !important;
}

.product-picker-popup .dxbl-popup-body {
    padding: 8px 12px 6px !important;
}

.product-picker-popup .dxbl-popup-footer {
    padding: 6px 12px 8px !important;
}

.product-picker {
    gap: 6px !important;
}

.product-picker-search {
    gap: 3px !important;
}

.product-picker-search-row {
    grid-template-columns: minmax(0, 1fr) 96px !important;
    gap: 7px !important;
}

.product-picker-search-button {
    width: 96px !important;
    min-width: 96px !important;
}

.product-picker-selected {
    gap: 6px 10px !important;
    padding: 8px !important;
}

.product-picker-selected .sap-field {
    gap: 2px !important;
}

.product-picker-selected label,
.product-picker-search > label {
    font-size: 10px !important;
}

.product-picker-selected input,
.product-picker-selected .dxbl-text-edit,
.product-picker-selected .dxbl-combobox,
.product-picker-selected .dxbl-edit,
.product-picker-search .dxbl-text-edit,
.product-picker-search input {
    height: 25px !important;
    min-height: 25px !important;
    font-size: 11.5px !important;
}

.product-picker-detail-inline {
    grid-template-columns: minmax(0, 1fr) 25px !important;
    gap: 5px !important;
}

.product-picker-detail-toggle,
.product-picker-selected .erp-row-icon-btn {
    width: 25px !important;
    min-width: 25px !important;
    height: 25px !important;
}

.product-picker-selected .product-picker-qty-field,
.product-picker-selected .product-picker-price-field,
.product-picker-selected .product-picker-discount-field,
.product-picker-selected .product-picker-iva-field,
.product-picker-selected .product-picker-total-field,
.product-picker-selected .product-picker-date-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-warehouse-field {
    grid-column: span 6 !important;
}

.product-picker-selected .product-picker-reserve-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-line-actions {
    grid-column: span 2 !important;
    align-self: end !important;
    padding-top: 0 !important;
}

.product-picker-line-actions .product-picker-add-button {
    width: 100% !important;
    min-width: 0 !important;
    height: 25px !important;
    min-height: 25px !important;
    padding: 0 8px !important;
}

.product-picker-message {
    padding: 5px 8px !important;
}

/* Width-focused product popup: narrower without crushing height */
.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    max-width: 720px !important;
}

.product-picker-popup .dxbl-popup-header {
    min-height: 42px !important;
    padding: 10px 14px !important;
}

.product-picker-popup .dxbl-popup-body {
    padding: 10px 14px 8px !important;
}

.product-picker-popup .dxbl-popup-footer {
    padding: 8px 14px 10px !important;
}

.product-picker-selected {
    gap: 8px 10px !important;
    padding: 10px !important;
}

.product-picker-selected .sap-field {
    gap: 3px !important;
}

.product-picker-selected label,
.product-picker-search > label {
    font-size: 10.5px !important;
}

.product-picker-selected input,
.product-picker-selected .dxbl-text-edit,
.product-picker-selected .dxbl-combobox,
.product-picker-selected .dxbl-edit,
.product-picker-search .dxbl-text-edit,
.product-picker-search input {
    height: 28px !important;
    min-height: 28px !important;
    font-size: 12px !important;
}

.product-picker-detail-inline {
    grid-template-columns: minmax(0, 1fr) 28px !important;
    gap: 6px !important;
}

.product-picker-detail-toggle,
.product-picker-selected .erp-row-icon-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
}

.product-picker-selected .product-picker-warehouse-field {
    grid-column: span 6 !important;
}

.product-picker-selected .product-picker-line-actions {
    grid-column: span 2 !important;
    align-self: end !important;
    padding-top: 0 !important;
}

.product-picker-line-actions .product-picker-add-button {
    width: 100% !important;
    min-width: 0 !important;
    height: 28px !important;
    min-height: 28px !important;
}

/* Narrow product popup */
.product-picker-popup .dxbl-popup,
.product-picker-popup .dxbl-popup-root,
.product-picker-popup .dxbl-popup-content {
    max-width: 640px !important;
}

.product-picker-selected .product-picker-qty-field,
.product-picker-selected .product-picker-price-field,
.product-picker-selected .product-picker-discount-field,
.product-picker-selected .product-picker-iva-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-total-field {
    grid-column: span 3 !important;
}

.product-picker-selected .product-picker-date-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-warehouse-field {
    grid-column: span 5 !important;
}

.product-picker-selected .product-picker-reserve-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-line-actions {
    grid-column: span 3 !important;
}

/* Edit line popup mirrors product add popup */
.line-editor-popup .dxbl-popup,
.line-editor-popup .dxbl-popup-root,
.line-editor-popup .dxbl-popup-content {
    max-width: 640px !important;
}

.line-editor-form {
    margin: 0 !important;
}

.line-editor-popup .product-picker-long-detail-field {
    grid-column: 1 / -1 !important;
}

.line-editor-popup .line-editor-long-detail {
    min-height: 84px !important;
    height: 84px !important;
}

/* Product popup with line discount */
.product-picker-selected .product-picker-line-discount-field {
    grid-area: auto !important;
    grid-column: span 2 !important;
    max-width: none !important;
    min-width: 0 !important;
    width: 100% !important;
}

.product-picker-selected .product-picker-qty-field,
.product-picker-selected .product-picker-price-field,
.product-picker-selected .product-picker-discount-field,
.product-picker-selected .product-picker-line-discount-field,
.product-picker-selected .product-picker-iva-field,
.product-picker-selected .product-picker-total-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-date-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-warehouse-field {
    grid-column: span 5 !important;
}

.product-picker-selected .product-picker-reserve-field {
    grid-column: span 2 !important;
}

.product-picker-selected .product-picker-line-actions {
    grid-column: span 3 !important;
}
.master-linked-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 6px;
    align-items: center;
}

.master-linked-control .master-link-button {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.master-selector-popup .dxbl-popup-body,
.master-selector-editor-popup .dxbl-popup-body {
    padding: 14px;
}

.master-selector-shell {
    display: grid;
    gap: 12px;
}

.master-selector-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.master-selector-search label {
    display: block;
    margin-bottom: 4px;
    color: #536176;
    font-size: 12px;
}

.master-selector-actions,
.master-selector-row-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.master-selector-message {
    margin: 0;
    padding: 8px 10px;
}

.master-selector-grid {
    max-height: 54vh;
}

.master-selector-editor {
    display: grid;
    gap: 10px;
}

@media (max-width: 720px) {
    .master-selector-toolbar {
        grid-template-columns: 1fr;
    }

    .master-selector-actions {
        justify-content: flex-start;
    }
}

/* Final ERP form grid fixes */
.master-linked-control {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
}

.master-linked-control > .dxbl-text-edit,
.master-linked-control > .dxbl-combobox,
.master-linked-control > .dxbl-edit,
.master-linked-control > input,
.master-linked-control > .form-control {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
}

.master-linked-control .numeric-text-input {
    max-width: none !important;
    width: 100% !important;
}

.master-linked-control .master-link-button {
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sap-product-card .sap-field:has(.master-linked-control),
.client-modern-page .sap-field:has(.master-linked-control) {
    min-width: 240px !important;
}

.sap-product-card .sap-field-short:has(.master-linked-control),
.sap-product-card .sap-field-xs:has(.master-linked-control),
.client-modern-page .sap-field-short:has(.master-linked-control),
.client-modern-page .sap-field-xs:has(.master-linked-control) {
    grid-column: span 3 !important;
}

.sap-product-card .sap-field-medium:has(.master-linked-control),
.client-modern-page .sap-field-medium:has(.master-linked-control) {
    grid-column: span 4 !important;
}

.product-picker-selected .master-linked-control {
    gap: 4px !important;
}

.product-picker-selected .master-linked-control .master-link-button {
    flex-basis: 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
}

.product-picker-selected .product-picker-iva-field,
.product-picker-selected .product-picker-warehouse-field {
    overflow: visible !important;
}

.product-picker-selected .product-picker-iva-field input,
.product-picker-selected .product-picker-warehouse-field .dxbl-text-edit,
.product-picker-selected .product-picker-warehouse-field .dxbl-combobox {
    min-width: 0 !important;
}

/* Compact master editors and stable commercial header grid */
.master-editor-popup-compact .dxbl-popup-body {
    padding: 12px 14px !important;
}

.master-editor-popup-compact .master-editor-shell {
    max-width: 560px !important;
    margin: 0 auto !important;
}

.master-editor-popup-compact .master-editor-card-clean {
    padding: 14px 16px !important;
}

.master-editor-popup-compact .erp-form-note {
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
}

.master-editor-popup-compact .master-sap-form {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
}

.master-editor-popup-compact .master-sap-form .sap-field {
    grid-column: span 3 !important;
    gap: 4px !important;
}

.master-editor-popup-compact .master-sap-form .sap-field-day,
.master-editor-popup-compact .master-sap-form .sap-field-money,
.master-editor-popup-compact .master-sap-form .sap-field-xs,
.master-editor-popup-compact .master-sap-form .sap-field-check {
    grid-column: span 2 !important;
}

.master-editor-popup-compact .master-sap-form .sap-field-full,
.master-editor-popup-compact .master-sap-form .sap-field-long {
    grid-column: 1 / -1 !important;
}

@media (max-width: 720px) {
    .master-editor-popup-compact .master-sap-form {
        grid-template-columns: 1fr !important;
    }

    .master-editor-popup-compact .master-sap-form .sap-field {
        grid-column: 1 / -1 !important;
    }
}

/* Final hardening for ERP forms with external master buttons */
.master-linked-control {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 30px !important;
    gap: 6px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
}

.master-linked-control > *:not(.master-link-button) {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.master-linked-control > .dxbl-text-edit,
.master-linked-control > .dxbl-combobox,
.master-linked-control > .dxbl-edit,
.master-linked-control > .dxbl-date-edit,
.master-linked-control > .form-control,
.master-linked-control > input {
    flex: initial !important;
}

.master-linked-control .master-link-button {
    grid-column: 2 !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    position: static !important;
}

.sap-product-card .sap-field:has(.master-linked-control),
.client-modern-page .sap-field:has(.master-linked-control),
.commercial-ficha-card .sap-field:has(.master-linked-control),
.product-picker-selected .sap-field:has(.master-linked-control) {
    max-width: none !important;
    overflow: visible !important;
}

.sap-product-card .sap-field-xs:has(.master-linked-control),
.client-modern-page .sap-field-xs:has(.master-linked-control),
.sap-product-card .sap-field-short:has(.master-linked-control),
.client-modern-page .sap-field-short:has(.master-linked-control) {
    grid-column: span 3 !important;
    min-width: 220px !important;
}

.sap-product-card .sap-field-medium:has(.master-linked-control),
.client-modern-page .sap-field-medium:has(.master-linked-control) {
    grid-column: span 4 !important;
    min-width: 260px !important;
}

.commercial-ficha-card .commercial-header-form .sap-field:has(.master-linked-control) {
    min-width: 240px !important;
}

.line-editor-popup .dxbl-popup,
.line-editor-popup .dxbl-popup-root,
.line-editor-popup .dxbl-popup-content {
    width: min(760px, 96vw) !important;
    max-width: 96vw !important;
}

.line-editor-popup .product-picker-selected .product-picker-iva-field {
    grid-column: span 2 !important;
}

.line-editor-popup .product-picker-selected .product-picker-total-field {
    grid-column: span 2 !important;
}

.line-editor-popup .product-picker-selected .product-picker-warehouse-field {
    grid-column: span 5 !important;
}

.product-picker-selected .master-linked-control {
    grid-template-columns: minmax(0, 1fr) 28px !important;
    gap: 5px !important;
}

.product-picker-selected .master-linked-control .master-link-button {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
}

.product-picker-selected .master-linked-control input.numeric-text-input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

@media (max-width: 900px) {
    .sap-product-card .sap-field-xs:has(.master-linked-control),
    .client-modern-page .sap-field-xs:has(.master-linked-control),
    .sap-product-card .sap-field-short:has(.master-linked-control),
    .client-modern-page .sap-field-short:has(.master-linked-control),
    .sap-product-card .sap-field-medium:has(.master-linked-control),
    .client-modern-page .sap-field-medium:has(.master-linked-control),
    .commercial-ficha-card .commercial-header-form .sap-field:has(.master-linked-control) {
        grid-column: 1 / -1 !important;
        min-width: 0 !important;
    }

    .line-editor-popup .product-picker-selected .product-picker-iva-field,
    .line-editor-popup .product-picker-selected .product-picker-total-field,
    .line-editor-popup .product-picker-selected .product-picker-warehouse-field {
        grid-column: 1 / -1 !important;
    }
}

/* Pedido/Presupuesto: SAP-style final polish */
.commercial-ficha-header,
.commercial-ficha-card,
.commercial-bottom-actions {
    width: min(100%, 1320px) !important;
    max-width: 1320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.commercial-ficha-header {
    align-items: flex-start !important;
    margin-bottom: 12px !important;
}

.commercial-ficha-header h1 {
    color: #0f172a !important;
    font-size: 32px !important;
    font-weight: 500 !important;
    line-height: 1.1 !important;
}

.commercial-ficha-header .subhead {
    color: #64748b !important;
    font-size: 14px !important;
}

.commercial-ficha-header .sap-actions,
.commercial-bottom-actions {
    gap: 8px !important;
}

.commercial-ficha-header .dxbl-btn,
.commercial-bottom-actions .dxbl-btn {
    min-width: 78px !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .08) !important;
}

.commercial-ficha-card {
    padding: 14px 16px 16px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    background: #ffffff !important;
}

.commercial-ficha-card .sap-card-title {
    margin: -14px -16px 12px !important;
    padding: 10px 16px !important;
    border-bottom: 1px solid #dbe3ef !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.commercial-tabs {
    margin-top: 8px !important;
}

.commercial-tabs .dxbl-tabs-tablist {
    border-bottom: 1px solid #cbd5e1 !important;
    gap: 18px !important;
}

.commercial-tabs .dxbl-tabs-tab {
    min-height: 38px !important;
    padding: 0 0 9px !important;
    color: #334155 !important;
    font-size: 14px !important;
    border-radius: 0 !important;
}

.commercial-tabs .dxbl-tabs-tab.dxbl-active,
.commercial-tabs .dxbl-tabs-tab[aria-selected="true"] {
    color: #f26b16 !important;
    border-bottom: 2px solid #f26b16 !important;
}

.commercial-tabs .dxbl-tabs-content-panel,
.commercial-tabs .dxbl-tabs-tabpane {
    padding-top: 14px !important;
}

.commercial-ficha-card .sap-section {
    padding-top: 0 !important;
}

.commercial-ficha-card .sap-section-header {
    align-items: center !important;
    margin-bottom: 8px !important;
}

.commercial-ficha-card .sap-section-title {
    color: #0f172a !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.commercial-lines-wrap {
    border: 1px solid #d5dde8 !important;
    border-radius: 5px !important;
    overflow-x: auto !important;
    background: #ffffff !important;
}

.commercial-lines-table {
    width: 100% !important;
    min-width: 1160px !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 12px !important;
}

.commercial-lines-table th {
    height: 33px !important;
    padding: 6px 7px !important;
    background: #f1f5f9 !important;
    border-bottom: 1px solid #d5dde8 !important;
    color: #61718a !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-align: left !important;
    line-height: 1.1 !important;
}

.commercial-lines-table td {
    height: 34px !important;
    min-height: 34px !important;
    padding: 5px 7px !important;
    border-bottom: 1px solid #e5eaf1 !important;
    color: #17202a !important;
    vertical-align: middle !important;
    line-height: 1.15 !important;
    background: #ffffff !important;
}

.commercial-line-row:hover td {
    background: #f8fafc !important;
}

.commercial-lines-table .line-ref { width: 118px !important; }
.commercial-lines-table .line-detail { width: auto !important; }
.commercial-lines-table .line-qty { width: 70px !important; }
.commercial-lines-table .line-money { width: 78px !important; }
.commercial-lines-table .line-disc { width: 70px !important; }
.commercial-lines-table .line-date { width: 94px !important; }
.commercial-lines-table .line-warehouse { width: 58px !important; }
.commercial-lines-table .line-check { width: 50px !important; }
.commercial-lines-table .line-total { width: 96px !important; }
.commercial-lines-table .line-actions { width: 62px !important; }

.commercial-lines-table .line-detail-inline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 5px !important;
}

.commercial-lines-table .line-detail-text,
.commercial-lines-table .line-ref-cell,
.commercial-lines-table .line-warehouse-cell {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.commercial-lines-table .line-number-cell,
.commercial-lines-table .line-total-cell {
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
}

.commercial-lines-table .line-total-cell {
    font-weight: 700 !important;
}

.commercial-lines-table .line-check-cell,
.commercial-lines-table .line-warehouse-cell {
    text-align: center !important;
}

.commercial-lines-table .line-action-buttons {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 5px !important;
}

.commercial-lines-table .erp-row-icon-btn {
    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    border-radius: 3px !important;
}

.commercial-totals {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    margin-top: 10px !important;
}

.commercial-totals div {
    width: 150px !important;
    min-height: 52px !important;
    padding: 9px 12px !important;
    border: 1px solid #d7dee9 !important;
    border-radius: 5px !important;
    background: #f8fafc !important;
    box-shadow: none !important;
}

.commercial-totals span {
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

.commercial-totals strong {
    color: #17202a !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums !important;
}

.commercial-bottom-actions {
    justify-content: flex-end !important;
    padding: 12px 0 0 !important;
}

.line-editor-popup .dxbl-popup,
.line-editor-popup .dxbl-popup-root,
.line-editor-popup .dxbl-popup-content {
    width: min(760px, 96vw) !important;
    max-width: 96vw !important;
    border-radius: 6px !important;
}

.line-editor-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
    padding: 10px !important;
    border-radius: 5px !important;
}

.line-editor-form .sap-field {
    gap: 3px !important;
}

.line-editor-form .product-picker-ref-field { grid-column: span 2 !important; }
.line-editor-form .product-picker-detail-field { grid-column: span 10 !important; }
.line-editor-form .product-picker-qty-field,
.line-editor-form .product-picker-price-field,
.line-editor-form .product-picker-discount-field,
.line-editor-form .product-picker-line-discount-field,
.line-editor-form .product-picker-iva-field,
.line-editor-form .product-picker-total-field {
    grid-column: span 2 !important;
}
.line-editor-form .product-picker-date-field { grid-column: span 3 !important; }
.line-editor-form .product-picker-warehouse-field { grid-column: span 7 !important; }
.line-editor-form .product-picker-reserve-field { grid-column: span 2 !important; }
.line-editor-form .product-picker-long-detail-field { grid-column: 1 / -1 !important; }


@media (max-width: 760px) {
    .commercial-ficha-header {
        flex-direction: column !important;
    }

    .commercial-ficha-header .sap-actions,
    .commercial-bottom-actions,
    .commercial-totals {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    .line-editor-form {
        grid-template-columns: 1fr !important;
    }

    .line-editor-form .sap-field {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }

    .commercial-totals div {
        width: min(100%, 180px) !important;
    }
}

/* Product detail and order header final alignment */
.sap-product-card,
.sap-product-card .sap-section,
.sap-product-card .sap-form,
.sap-product-card .sap-field,
.sap-product-card .sap-tabs,
.sap-product-card .dxbl-tabs-content-panel {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.sap-product-card .sap-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    align-items: end !important;
    overflow: hidden !important;
}

.sap-product-card .sap-field-full {
    grid-column: 1 / -1 !important;
    max-width: 100% !important;
}

.sap-product-card .sap-field-long {
    max-width: 100% !important;
}

.sap-product-card .sap-field .dxbl-text-edit,
.sap-product-card .sap-field .dxbl-combobox,
.sap-product-card .sap-field .dxbl-date-edit,
.sap-product-card .sap-field .dxbl-memo,
.sap-product-card .sap-field .form-control,
.sap-product-card .sap-field .erp-native-input,
.sap-product-card .sap-field input,
.sap-product-card .sap-field textarea,
.sap-product-card .product-html-editor,
.sap-product-card .product-html-source,
.sap-product-card .seo-json-editor {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.sap-product-card .sap-field textarea,
.sap-product-card .dxbl-memo-input {
    overflow-wrap: anywhere !important;
}

.sap-product-card .master-linked-control {
    grid-template-columns: minmax(0, 1fr) 32px !important;
    gap: 6px !important;
    overflow: visible !important;
}

.sap-product-card .master-linked-control .master-link-button {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
}

.product-images-toolbar {
    align-items: center !important;
}

.product-add-image-button {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 12px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Pedido: cabecera SAP compacta con etiquetas laterales */
.content:has(.commercial-ficha-card) {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.commercial-ficha-header,
.commercial-ficha-card,
.commercial-bottom-actions {
    width: 100% !important;
    max-width: 1380px !important;
}

.commercial-ficha-card .commercial-header-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 5px 12px !important;
    align-items: center !important;
}

.commercial-ficha-card .commercial-header-form .sap-field {
    display: grid !important;
    grid-template-columns: var(--pedido-label-width, 82px) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0 8px !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 32px !important;
}

.commercial-ficha-card .commercial-header-form .sap-field > label {
    grid-column: 1 !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 31px !important;
    min-height: 31px !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.commercial-ficha-card .commercial-header-form .sap-field > :not(label) {
    grid-column: 2 !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.commercial-ficha-card .commercial-header-form .dxbl-text-edit,
.commercial-ficha-card .commercial-header-form .dxbl-combobox,
.commercial-ficha-card .commercial-header-form .dxbl-date-edit,
.commercial-ficha-card .commercial-header-form .dxbl-edit,
.commercial-ficha-card .commercial-header-form .dxbl-input-group,
.commercial-ficha-card .commercial-header-form .form-control,
.commercial-ficha-card .commercial-header-form input,
.commercial-ficha-card .commercial-header-form .sap-inline-control {
    width: 100% !important;
    min-width: 0 !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
}

.commercial-ficha-card .commercial-header-form .sap-inline-control,
.commercial-ficha-card .commercial-header-form .master-linked-control {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 31px !important;
    align-items: center !important;
    gap: 5px !important;
}

.commercial-ficha-card .commercial-header-form .erp-row-icon-btn,
.commercial-ficha-card .commercial-header-form .master-link-button {
    width: 31px !important;
    min-width: 31px !important;
    max-width: 31px !important;
    height: 31px !important;
    min-height: 31px !important;
}

.commercial-ficha-card .commercial-header-form .commercial-shipping-flag .dxbl-checkbox,
.commercial-ficha-card .commercial-header-form .commercial-reserved-field .dxbl-checkbox,
.commercial-ficha-card .commercial-header-form .commercial-held-field .dxbl-checkbox {
    justify-content: flex-start !important;
    height: 31px !important;
    min-height: 31px !important;
}

.commercial-ficha-card .commercial-header-form .commercial-number-field { grid-column: 1 / span 3 !important; grid-row: 1 !important; --pedido-label-width: 66px; }
.commercial-ficha-card .commercial-header-form .commercial-date-field { grid-column: 4 / span 3 !important; grid-row: 1 !important; --pedido-label-width: 56px; }
.commercial-ficha-card .commercial-header-form .commercial-serie-field { grid-column: 7 / span 2 !important; grid-row: 1 !important; --pedido-label-width: 48px; }
.commercial-ficha-card .commercial-header-form .commercial-client-field { grid-column: 1 / span 3 !important; grid-row: 2 !important; --pedido-label-width: 66px; }

.commercial-ficha-card .commercial-header-form .commercial-state-field { grid-column: 9 / span 4 !important; grid-row: 1 !important; --pedido-label-width: 66px; }
.commercial-ficha-card .commercial-header-form .commercial-payment-state-field { grid-column: 4 / span 3 !important; grid-row: 2 !important; --pedido-label-width: 86px; }
.commercial-ficha-card .commercial-header-form .commercial-customer-ref-field { grid-column: 7 / span 3 !important; grid-row: 2 !important; --pedido-label-width: 78px; }
.commercial-ficha-card .commercial-header-form .commercial-delivery-field { grid-column: 10 / span 3 !important; grid-row: 2 !important; --pedido-label-width: 64px; }

.commercial-ficha-card .commercial-header-form .commercial-payment-field { grid-column: 1 / span 3 !important; grid-row: 3 !important; --pedido-label-width: 80px; }
.commercial-ficha-card .commercial-header-form .commercial-currency-field { grid-column: 4 / span 3 !important; grid-row: 3 !important; --pedido-label-width: 58px; }
.commercial-ficha-card .commercial-header-form .commercial-agent-field { grid-column: 7 / span 6 !important; grid-row: 3 !important; --pedido-label-width: 78px; }

.commercial-ficha-card .commercial-header-form .commercial-discount-field { grid-column: 1 / span 2 !important; grid-row: 4 !important; --pedido-label-width: 54px; }
.commercial-ficha-card .commercial-header-form .commercial-quick-discount-field { grid-column: 3 / span 2 !important; grid-row: 4 !important; --pedido-label-width: 76px; }
.commercial-ficha-card .commercial-header-form .commercial-shipping-flag { grid-column: 5 / span 2 !important; grid-row: 4 !important; --pedido-label-width: 58px; }
.commercial-ficha-card .commercial-header-form .commercial-reserved-field { grid-column: 7 / span 2 !important; grid-row: 4 !important; --pedido-label-width: 72px; }
.commercial-ficha-card .commercial-header-form .commercial-held-field { grid-column: 9 / span 2 !important; grid-row: 4 !important; --pedido-label-width: 66px; }
.commercial-ficha-card .commercial-header-form .commercial-held-reason-field { grid-column: 1 / span 4 !important; grid-row: 5 !important; --pedido-label-width: 66px; }

.commercial-ficha-card .commercial-header-form .commercial-observations-field {
    grid-column: 5 / span 8 !important;
    grid-row: 5 !important;
    --pedido-label-width: 96px;
}

.commercial-ficha-card .commercial-header-form .commercial-number-field,
.commercial-ficha-card .commercial-header-form .commercial-date-field,
.commercial-ficha-card .commercial-header-form .commercial-serie-field,
.commercial-ficha-card .commercial-header-form .commercial-client-field,
.commercial-ficha-card .commercial-header-form .commercial-state-field,
.commercial-ficha-card .commercial-header-form .commercial-payment-state-field,
.commercial-ficha-card .commercial-header-form .commercial-customer-ref-field,
.commercial-ficha-card .commercial-header-form .commercial-delivery-field,
.commercial-ficha-card .commercial-header-form .commercial-payment-field,
.commercial-ficha-card .commercial-header-form .commercial-currency-field,
.commercial-ficha-card .commercial-header-form .commercial-agent-field,
.commercial-ficha-card .commercial-header-form .commercial-discount-field,
.commercial-ficha-card .commercial-header-form .commercial-quick-discount-field,
.commercial-ficha-card .commercial-header-form .commercial-shipping-flag,
.commercial-ficha-card .commercial-header-form .commercial-reserved-field,
.commercial-ficha-card .commercial-header-form .commercial-held-field,
.commercial-ficha-card .commercial-header-form .commercial-held-reason-field,
.commercial-ficha-card .commercial-header-form .commercial-observations-field {
    --pedido-label-width: 76px !important;
}

.commercial-ficha-card .commercial-lines-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    border: 1px solid #d8dee8 !important;
    border-radius: 4px !important;
}

.commercial-ficha-card .commercial-lines-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 12px !important;
}

.commercial-ficha-card .commercial-lines-table th,
.commercial-ficha-card .commercial-lines-table td {
    height: 35px !important;
    padding: 5px 6px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.commercial-ficha-card .commercial-lines-table th {
    background: #f3f6fa !important;
    border-bottom: 1px solid #d8dee8 !important;
}

.commercial-ficha-card .commercial-lines-table .line-ref { width: 12.5% !important; }
.commercial-ficha-card .commercial-lines-table .line-detail,
.commercial-ficha-card .commercial-lines-table .line-detail-cell { width: 22.5% !important; min-width: 0 !important; }
.commercial-ficha-card .commercial-lines-table .line-qty { width: 5.2% !important; }
.commercial-ficha-card .commercial-lines-table .line-money { width: 6.5% !important; }
.commercial-ficha-card .commercial-lines-table .line-disc { width: 5.3% !important; }
.commercial-ficha-card .commercial-lines-table .line-date { width: 8.2% !important; }
.commercial-ficha-card .commercial-lines-table .line-warehouse { width: 4.2% !important; }
.commercial-ficha-card .commercial-lines-table .line-check { width: 4.2% !important; }
.commercial-ficha-card .commercial-lines-table .line-total { width: 7% !important; }
.commercial-ficha-card .commercial-lines-table .line-actions { width: 6% !important; }

.commercial-ficha-card .commercial-lines-table .line-detail-inline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 28px !important;
    gap: 5px !important;
    align-items: center !important;
}

.commercial-ficha-card .commercial-lines-table .line-detail-text,
.commercial-ficha-card .commercial-lines-table .line-ref-cell,
.commercial-ficha-card .commercial-lines-table .line-warehouse-cell,
.commercial-ficha-card .commercial-lines-table .line-check-cell {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.commercial-ficha-card .commercial-lines-table .line-action-buttons {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    white-space: nowrap !important;
}

.commercial-ficha-card .commercial-lines-table .line-action-buttons .erp-row-icon-btn {
    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
}

.commercial-ficha-card .commercial-subsection-title {
    margin-top: 16px !important;
    margin-bottom: 8px !important;
    padding-top: 10px !important;
    border-top: 1px solid #dbe3ef !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.commercial-ficha-card .commercial-status-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 10px 14px !important;
    align-items: end !important;
}

.commercial-ficha-card .commercial-status-form .sap-field-check {
    grid-column: span 2 !important;
}

.commercial-ficha-card .commercial-status-form .sap-field-medium {
    grid-column: span 4 !important;
}

.commercial-ficha-card .commercial-status-form .sap-field-full {
    grid-column: 1 / -1 !important;
    max-width: none !important;
}

.commercial-ficha-card .commercial-status-form .sap-field-full .dxbl-memo,
.commercial-ficha-card .commercial-status-form .sap-field-full textarea {
    min-height: 92px !important;
    height: auto !important;
    resize: vertical !important;
}

@media (max-width: 1180px) {
    .commercial-ficha-card .commercial-header-form {
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    }

    .commercial-ficha-card .commercial-header-form .sap-field {
        grid-template-columns: 92px minmax(0, 1fr) !important;
        grid-column: span 6 !important;
        grid-row: auto !important;
    }

    .commercial-ficha-card .commercial-header-form .commercial-client-field,
    .commercial-ficha-card .commercial-header-form .commercial-payment-field,
    .commercial-ficha-card .commercial-header-form .commercial-agent-field,
    .commercial-ficha-card .commercial-header-form .commercial-observations-field {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }

    .commercial-ficha-card .commercial-lines-wrap {
        overflow-x: auto !important;
    }

    .commercial-ficha-card .commercial-lines-table {
        min-width: 920px !important;
    }
}

@media (max-width: 760px) {
    .commercial-ficha-card .commercial-header-form {
        grid-template-columns: 1fr !important;
    }

    .commercial-ficha-card .commercial-header-form .sap-field {
        grid-template-columns: 92px minmax(0, 1fr) !important;
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }

    .commercial-ficha-card .commercial-header-form .sap-field > label {
        text-align: left !important;
    }
}

/* Pedido: envio ordenado y sin duplicar transporte de cabecera */
.commercial-ficha-card .commercial-shipping-form,
.commercial-ficha-card .commercial-shipping-logistics-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 8px 14px !important;
    align-items: center !important;
}

.commercial-ficha-card .commercial-shipping-form .sap-field,
.commercial-ficha-card .commercial-shipping-logistics-form .sap-field {
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    max-width: none !important;
}

.commercial-ficha-card .commercial-shipping-form .sap-field > label,
.commercial-ficha-card .commercial-shipping-logistics-form .sap-field > label {
    min-height: 31px !important;
    line-height: 31px !important;
    text-align: left !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
}

.commercial-ficha-card .commercial-shipping-form .dxbl-text-edit,
.commercial-ficha-card .commercial-shipping-form .dxbl-combobox,
.commercial-ficha-card .commercial-shipping-form .form-control,
.commercial-ficha-card .commercial-shipping-form input,
.commercial-ficha-card .commercial-shipping-logistics-form .dxbl-text-edit,
.commercial-ficha-card .commercial-shipping-logistics-form .dxbl-combobox,
.commercial-ficha-card .commercial-shipping-logistics-form .form-control,
.commercial-ficha-card .commercial-shipping-logistics-form input {
    width: 100% !important;
    min-width: 0 !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    border-radius: 3px !important;
    font-size: 12px !important;
}

.commercial-ficha-card .commercial-shipping-form .sap-inline-control,
.commercial-ficha-card .commercial-shipping-form .master-linked-control,
.commercial-ficha-card .commercial-shipping-logistics-form .sap-inline-control,
.commercial-ficha-card .commercial-shipping-logistics-form .master-linked-control {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 31px !important;
    align-items: center !important;
    gap: 5px !important;
}

.commercial-ficha-card .commercial-shipping-form .erp-row-icon-btn,
.commercial-ficha-card .commercial-shipping-form .master-link-button,
.commercial-ficha-card .commercial-shipping-logistics-form .erp-row-icon-btn,
.commercial-ficha-card .commercial-shipping-logistics-form .master-link-button {
    width: 31px !important;
    min-width: 31px !important;
    max-width: 31px !important;
    height: 31px !important;
    min-height: 31px !important;
}

.commercial-ficha-card .commercial-shipping-form .commercial-shipping-contact-field { grid-column: 1 / span 4 !important; grid-row: 1 !important; }
.commercial-ficha-card .commercial-shipping-form .commercial-shipping-document-field { grid-column: 5 / span 4 !important; grid-row: 1 !important; }
.commercial-ficha-card .commercial-shipping-form .commercial-shipping-name-field { grid-column: 9 / span 4 !important; grid-row: 1 !important; }
.commercial-ficha-card .commercial-shipping-form .commercial-shipping-address-field { grid-column: 1 / span 8 !important; grid-row: 2 !important; }
.commercial-ficha-card .commercial-shipping-form .commercial-shipping-postal-field { grid-column: 9 / span 4 !important; grid-row: 2 !important; }
.commercial-ficha-card .commercial-shipping-form .commercial-shipping-country-field { grid-column: 1 / span 4 !important; grid-row: 3 !important; }
.commercial-ficha-card .commercial-shipping-form .commercial-shipping-province-field { grid-column: 5 / span 4 !important; grid-row: 3 !important; }
.commercial-ficha-card .commercial-shipping-form .commercial-shipping-city-field { grid-column: 9 / span 4 !important; grid-row: 3 !important; }
.commercial-ficha-card .commercial-shipping-form .commercial-shipping-phone1-field { grid-column: 1 / span 4 !important; grid-row: 4 !important; }
.commercial-ficha-card .commercial-shipping-form .commercial-shipping-phone2-field { grid-column: 5 / span 4 !important; grid-row: 4 !important; }
.commercial-ficha-card .commercial-shipping-form .commercial-shipping-email-field { grid-column: 9 / span 4 !important; grid-row: 4 !important; }

.commercial-ficha-card .commercial-shipping-logistics-form .commercial-shipping-weight-field { grid-column: 1 / span 3 !important; }
.commercial-ficha-card .commercial-shipping-logistics-form .commercial-shipping-packages-field { grid-column: 4 / span 3 !important; }
.commercial-ficha-card .commercial-shipping-logistics-form .commercial-shipping-expedition-field { grid-column: 7 / span 3 !important; }
.commercial-ficha-card .commercial-shipping-logistics-form .commercial-shipping-date-field { grid-column: 10 / span 3 !important; }

.address-popup .sap-popup-form .sap-inline-control,
.address-popup .sap-popup-form .master-linked-control {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 31px !important;
    align-items: center !important;
    gap: 5px !important;
}

.address-popup .sap-popup-form .master-link-button {
    width: 31px !important;
    min-width: 31px !important;
    height: 31px !important;
    min-height: 31px !important;
}

@media (max-width: 1180px) {
    .commercial-ficha-card .commercial-shipping-form .sap-field,
    .commercial-ficha-card .commercial-shipping-logistics-form .sap-field {
        grid-column: span 6 !important;
        grid-row: auto !important;
    }

    .commercial-ficha-card .commercial-shipping-form .commercial-shipping-address-field,
    .commercial-ficha-card .commercial-shipping-form .commercial-shipping-province-field,
    .commercial-ficha-card .commercial-shipping-form .commercial-shipping-email-field,
    .commercial-ficha-card .commercial-shipping-logistics-form .commercial-shipping-expedition-field {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 760px) {
    .commercial-ficha-card .commercial-shipping-form,
    .commercial-ficha-card .commercial-shipping-logistics-form {
        grid-template-columns: 1fr !important;
    }

    .commercial-ficha-card .commercial-shipping-form .sap-field,
    .commercial-ficha-card .commercial-shipping-logistics-form .sap-field {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }
}

/* Pedido: importe y acciones de lineas sin desbordes */
.commercial-ficha-card .commercial-lines-wrap {
    overflow-x: auto !important;
}

.commercial-ficha-card .commercial-lines-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
}

.commercial-ficha-card .commercial-lines-table .line-ref { width: 9.2% !important; }
.commercial-ficha-card .commercial-lines-table .line-detail,
.commercial-ficha-card .commercial-lines-table .line-detail-cell { width: 22.5% !important; }
.commercial-ficha-card .commercial-lines-table .line-qty { width: 5.4% !important; }
.commercial-ficha-card .commercial-lines-table .line-money { width: 6% !important; }
.commercial-ficha-card .commercial-lines-table .line-disc { width: 5.3% !important; }
.commercial-ficha-card .commercial-lines-table .line-date { width: 8% !important; }
.commercial-ficha-card .commercial-lines-table .line-warehouse { width: 4.5% !important; }
.commercial-ficha-card .commercial-lines-table .line-check { width: 4.5% !important; }
.commercial-ficha-card .commercial-lines-table .line-total,
.commercial-ficha-card .commercial-lines-table .line-total-cell { width: 8.8% !important; }
.commercial-ficha-card .commercial-lines-table .line-actions,
.commercial-ficha-card .commercial-lines-table tr > td:last-child { width: 6.8% !important; }

.commercial-ficha-card .commercial-lines-table .line-total-cell {
    text-align: right !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums !important;
    padding-right: 8px !important;
}

.commercial-ficha-card .commercial-lines-table tr > td:last-child {
    padding-left: 4px !important;
    padding-right: 4px !important;
}

.commercial-ficha-card .commercial-lines-table .line-action-buttons {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 4px !important;
}

.line-editor-popup .product-picker-selected .product-picker-total-field {
    min-width: 0 !important;
    max-width: none !important;
}

.line-editor-popup .product-picker-selected .product-picker-total-field input.numeric-text-input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Comercial: albaranes y formato operativo */
.commercial-delivery-popup .commercial-delivery-lines-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
}

.commercial-delivery-popup .commercial-lines-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
}

.commercial-delivery-popup .commercial-delivery-lines-table th,
.commercial-delivery-popup .commercial-delivery-lines-table td {
    box-sizing: border-box !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.commercial-delivery-popup .commercial-delivery-lines-table .line-ref {
    width: 16% !important;
}

.commercial-delivery-popup .commercial-delivery-lines-table .line-detail {
    width: 40% !important;
}

.commercial-delivery-popup .commercial-delivery-lines-table .line-qty {
    width: 11% !important;
}

.commercial-delivery-popup .commercial-delivery-lines-table th:last-child,
.commercial-delivery-popup .commercial-delivery-lines-table td:last-child {
    width: 12% !important;
    min-width: 96px !important;
    text-align: right !important;
}

.commercial-delivery-popup .commercial-delivery-lines-table td:last-child input.numeric-text-input {
    display: inline-block !important;
    width: 72px !important;
    min-width: 0 !important;
    max-width: 72px !important;
    box-sizing: border-box !important;
    text-align: right !important;
}

.commercial-ficha-card .commercial-lines-table .line-ref-cell {
    white-space: nowrap !important;
}

.commercial-ficha-card .commercial-lines-table .line-number-cell input.numeric-text-input {
    width: 100% !important;
    min-width: 0 !important;
    text-align: right !important;
}

.commercial-ficha-header .sap-actions,
.commercial-bottom-actions.sap-actions,
.popup-footer-actions,
.popup-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
}

.commercial-bottom-actions .dxbl-btn,
.commercial-ficha-header .sap-actions .dxbl-btn,
.popup-footer-actions .erp-action-button,
.popup-actions .dxbl-btn {
    min-width: 82px !important;
    height: 34px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.popup-footer-actions .erp-action-button {
    padding: 0 14px !important;
}

/* Comercial: controles compactos y combos limpios en ficha */
.commercial-ficha-card .dxbl-text-edit-input,
.commercial-ficha-card .dxbl-combobox input,
.commercial-ficha-card .dxbl-input,
.commercial-ficha-card .dxbl-edit,
.commercial-ficha-card .form-control,
.commercial-ficha-card .pro-native-input,
.commercial-ficha-card input,
.commercial-ficha-card textarea,
.product-picker-popup .dxbl-text-edit-input,
.product-picker-popup .dxbl-combobox input,
.product-picker-popup .form-control,
.product-picker-popup .pro-native-input,
.product-picker-popup input,
.product-picker-popup textarea {
    font-size: 11.5px !important;
}

.commercial-ficha-card .sap-field > label,
.commercial-ficha-card .sap-field label,
.product-picker-popup .sap-field > label,
.product-picker-popup .sap-field label {
    font-size: 11.5px !important;
    font-weight: 400 !important;
}

.commercial-ficha-card .sap-inline-control.master-linked-control,
.commercial-ficha-card .master-linked-control,
.product-picker-popup .sap-inline-control.master-linked-control,
.product-picker-popup .master-linked-control {
    grid-template-columns: minmax(0, 1fr) !important;
}

.commercial-ficha-card .master-linked-control .master-link-button,
.product-picker-popup .master-linked-control .master-link-button {
    display: none !important;
}

.commercial-ficha-card .master-linked-control > *:not(.master-link-button),
.product-picker-popup .master-linked-control > *:not(.master-link-button) {
    width: 100% !important;
    min-width: 0 !important;
}

/* Categorias: evita que el formulario del popup fuerce ancho fuera del cuadro */
.category-editor-popup .dxbl-popup-body,
.category-editor-popup .dxbl-popup-content {
    overflow-x: hidden !important;
}

.category-editor-popup .erp-product-form,
.category-editor-popup .dxbl-fl,
.category-editor-popup .dxbl-fl-gd,
.category-editor-popup .dxbl-fl-group-content,
.category-editor-popup .dxbl-row,
.category-editor-popup .dxbl-fl-i,
.category-editor-popup .dxbl-fl-ctrl {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.category-editor-popup input,
.category-editor-popup textarea,
.category-editor-popup .dxbl-text-edit,
.category-editor-popup .dxbl-combobox,
.category-editor-popup .dxbl-memo,
.category-editor-popup .form-control,
.category-editor-popup .pro-native-input {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
}

.category-editor-popup .numeric-text-input {
    display: block !important;
}

.category-editor-popup .category-parent-combo {
    width: 100% !important;
    min-width: min(560px, 100%) !important;
}

/* Producto: formulario compacto tipo pedido, con etiquetas laterales */
.app-shell .content > .erp-page:has(.sap-product-card) .sap-page-header,
.app-shell .content > .erp-page .sap-product-card {
    width: min(100%, 1320px) !important;
    max-width: 1320px !important;
}

.sap-product-card .sap-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 6px 14px !important;
    align-items: center !important;
}

.sap-product-card .sap-field {
    display: grid !important;
    grid-template-columns: var(--product-label-width, 112px) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0 8px !important;
    max-width: none !important;
    min-height: 31px !important;
}

.sap-product-card .sap-field > label {
    grid-column: 1 !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #334155 !important;
    font-size: 11.5px !important;
    font-weight: 400 !important;
    line-height: 31px !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.sap-product-card .sap-field > :not(label) {
    grid-column: 2 !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.sap-product-card .sap-field-xs,
.sap-product-card .sap-field-day {
    grid-column: span 2 !important;
    min-width: 170px !important;
}

.sap-product-card .sap-field-percent,
.sap-product-card .sap-field-money,
.sap-product-card .sap-field-date,
.sap-product-card .sap-field-short {
    grid-column: span 3 !important;
    min-width: 230px !important;
}

.sap-product-card .sap-field-medium,
.sap-product-card .sap-field-check {
    grid-column: span 4 !important;
    min-width: 285px !important;
}

.sap-product-card .sap-field-long {
    grid-column: span 6 !important;
    min-width: 430px !important;
}

.sap-product-card .sap-field-full {
    grid-column: 1 / -1 !important;
    --product-label-width: 128px;
}

.sap-product-card .sap-field .dxbl-text-edit,
.sap-product-card .sap-field .dxbl-combobox,
.sap-product-card .sap-field .dxbl-date-edit,
.sap-product-card .sap-field .dxbl-edit,
.sap-product-card .sap-field .dxbl-input-group,
.sap-product-card .sap-field .form-control,
.sap-product-card .sap-field .erp-native-input,
.sap-product-card .sap-field input,
.sap-product-card .sap-field .sap-inline-control {
    width: 100% !important;
    min-width: 0 !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    font-size: 11.5px !important;
}

.sap-product-card .sap-field:has(.dxbl-memo) {
    align-items: start !important;
    min-height: 78px !important;
}

.sap-product-card .sap-field:has(.dxbl-memo) > label {
    align-self: start !important;
    line-height: 1.2 !important;
    padding-top: 8px !important;
}

.sap-product-card .sap-field .dxbl-memo,
.sap-product-card .sap-field textarea,
.sap-product-card .product-html-memo textarea,
.sap-product-card .product-long-text textarea {
    height: auto !important;
    min-height: 78px !important;
    max-height: none !important;
    font-size: 11.5px !important;
}

.sap-product-card .product-html-memo textarea {
    min-height: 132px !important;
    font-family: Consolas, "Courier New", monospace !important;
}

.sap-product-card .master-linked-control {
    grid-template-columns: minmax(0, 1fr) 30px !important;
    gap: 5px !important;
}

.sap-product-card .master-linked-control .master-link-button {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
}

.product-stock-kpis {
    grid-template-columns: repeat(6, minmax(120px, 1fr)) !important;
}

.product-stock-grid {
    max-width: 100% !important;
    overflow-x: auto !important;
}

.stock-subtitle {
    margin-top: 16px !important;
    margin-bottom: 8px !important;
}

.stock-manual-panel {
    margin: 16px 0 14px !important;
    padding: 14px 16px !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    background: rgba(255, 255, 255, 0.72) !important;
}

.product-stock-adjustment {
    align-items: end !important;
}

.product-stock-adjust-actions {
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 10px !important;
}

.product-html-preview {
    overflow-wrap: anywhere;
}

.sap-product-card .sap-form-master {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 6px 14px !important;
    --product-label-width: 86px;
}

.sap-product-card .sap-form-master .product-reference-field {
    grid-column: 1 / span 3 !important;
    grid-row: 1 !important;
}

.sap-product-card .sap-form-master .product-ean-field {
    grid-column: 1 / span 3 !important;
    grid-row: 3 !important;
}

.sap-product-card .sap-form-master .product-sale-ref-field {
    grid-column: 4 / span 3 !important;
    grid-row: 3 !important;
}

.sap-product-card .sap-form-master .product-detail-field {
    grid-column: 4 / -1 !important;
    grid-row: 1 !important;
}

.sap-product-card .sap-form-master .product-web-detail-field {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
}

.sap-product-card .product-composition-field {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    align-items: start !important;
    min-height: 330px !important;
}

.sap-product-card .product-composition-field > label {
    grid-column: 1 !important;
    align-self: start !important;
    padding: 0 !important;
    line-height: 16px !important;
}

.sap-product-card .product-composition-field > .product-composition-editor-shell {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
}

.product-composition-tabs,
.product-composition-tabs .dxbl-tabs,
.product-composition-tabs .dxbl-tabs-content,
.product-composition-tabs .dxbl-tabs-content-panel,
.product-composition-tabs .dxbl-tabs-tabpane {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.sap-product-card .product-composition-editor,
.sap-product-card .product-composition-editor .dxbl-html-editor,
.sap-product-card .product-composition-editor .dxbl-html-editor-content,
.sap-product-card .product-composition-editor .dxbl-html-editor-body,
.sap-product-card .product-html-memo,
.sap-product-card .product-html-memo .dxbl-memo,
.sap-product-card .product-html-memo textarea {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.sap-product-card .product-composition-editor {
    min-height: 520px !important;
}

.sap-product-card .product-composition-editor .dxbl-html-editor-content,
.sap-product-card .product-composition-editor .dxbl-html-editor-body,
.sap-product-card .product-html-memo textarea {
    min-height: 460px !important;
}

.sap-product-card .product-html-editor,
.sap-product-card .product-html-editor .dxbl-html-editor,
.sap-product-card .product-html-editor .dxbl-html-editor-content,
.sap-product-card .product-html-editor .dxbl-html-editor-body {
    width: 100% !important;
    min-height: 620px !important;
}

.sap-product-card .product-html-source,
.sap-product-card .product-html-source .dxbl-memo,
.sap-product-card .product-html-source textarea {
    width: 100% !important;
    min-height: 460px !important;
    font-family: Consolas, "Courier New", monospace !important;
}

.product-ai-section {
    max-width: 1180px !important;
}

.product-ai-actions {
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-start !important;
    margin-bottom: 16px !important;
}

.product-ai-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    max-width: 980px !important;
}

.product-ai-field {
    width: 100% !important;
    max-width: 100% !important;
}

.product-ai-field .dxbl-text-edit,
.product-ai-field .dxbl-memo,
.product-ai-field textarea,
.product-ai-field input {
    width: 100% !important;
    max-width: 100% !important;
}

.product-ai-field .dxbl-text-edit,
.product-ai-field input {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
}

.product-ai-field .dxbl-memo textarea,
.product-ai-field textarea {
    min-height: 86px !important;
    max-height: none !important;
}

.sap-product-card .product-seo-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 1180px !important;
}

.sap-product-card .product-seo-form .sap-field,
.sap-product-card .product-seo-form .sap-field-long,
.sap-product-card .product-seo-form .sap-field-medium,
.sap-product-card .product-seo-form .sap-field-percent,
.sap-product-card .product-seo-form .sap-field-check,
.sap-product-card .product-seo-form .sap-field-full {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    grid-column: auto !important;
}

.sap-product-card .product-seo-form .sap-field {
    display: grid !important;
    grid-template-columns: 154px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px 12px !important;
}

.sap-product-card .product-seo-form .sap-field > label {
    align-self: center !important;
    line-height: 31px !important;
    min-height: 31px !important;
    padding: 0 !important;
}

.sap-product-card .product-seo-form .sap-field > :not(label) {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.sap-product-card .product-seo-form .sap-field .dxbl-text-edit,
.sap-product-card .product-seo-form .sap-field .dxbl-combobox,
.sap-product-card .product-seo-form .sap-field .dxbl-input-group,
.sap-product-card .product-seo-form .sap-field .form-control,
.sap-product-card .product-seo-form .sap-field .erp-native-input,
.sap-product-card .product-seo-form .sap-field input {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
}

.sap-product-card .product-seo-form .sap-field:has(.dxbl-memo),
.sap-product-card .product-seo-form .sap-field:has(textarea) {
    align-items: start !important;
}

.sap-product-card .product-seo-form .sap-field:has(.dxbl-memo) > label,
.sap-product-card .product-seo-form .sap-field:has(textarea) > label {
    padding-top: 8px !important;
}

.sap-product-card .product-seo-form .dxbl-memo,
.sap-product-card .product-seo-form .seo-json-editor {
    width: 100% !important;
    max-width: 100% !important;
}

.sap-product-card .product-seo-form .dxbl-memo textarea,
.sap-product-card .product-seo-form textarea {
    height: auto !important;
    min-height: 112px !important;
    max-height: none !important;
}

.sap-product-card .product-seo-form .seo-json-editor,
.sap-product-card .product-seo-form .seo-json-editor .dxbl-memo {
    min-height: 300px !important;
}

.sap-product-card .product-seo-form .seo-json-editor textarea {
    min-height: 300px !important;
    font-family: Consolas, "Courier New", monospace !important;
}

@media (max-width: 980px) {
    .sap-product-card .sap-field-xs,
    .sap-product-card .sap-field-day,
    .sap-product-card .sap-field-percent,
    .sap-product-card .sap-field-money,
    .sap-product-card .sap-field-date,
    .sap-product-card .sap-field-short,
    .sap-product-card .sap-field-medium,
    .sap-product-card .sap-field-long,
    .sap-product-card .sap-field-full,
    .sap-product-card .sap-field-check {
        grid-column: 1 / -1 !important;
        min-width: 0 !important;
    }

    .sap-product-card .sap-field {
        grid-template-columns: 108px minmax(0, 1fr) !important;
    }

    .product-stock-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .sap-product-card .sap-form-master .product-reference-field,
    .sap-product-card .sap-form-master .product-ean-field,
    .sap-product-card .sap-form-master .product-sale-ref-field,
    .sap-product-card .sap-form-master .product-detail-field,
    .sap-product-card .sap-form-master .product-web-detail-field {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }
}

/* Tienda cliente */
.storefront-shell {
    --store-brand-primary: #008fca;
    --store-brand-primary-strong: #07557b;
    --store-accent: #f28c1b;
    --store-accent-strong: #d36f00;
    --store-action: var(--store-accent);
    --store-action-strong: var(--store-accent-strong);
    --store-ink: #142331;
    --store-line: #d8e4ea;
    --store-bg: #f5f8fa;
    --store-header-bg: #fff;
    --store-service-bg: var(--store-brand-primary-strong);
    --store-service-text: #f9fafb;
    --store-nav-bg: transparent;
    --store-nav-text: var(--store-ink);
    --store-nav-hover-bg: var(--store-brand-primary-strong);
    --store-nav-hover-text: #fff;
    --store-panel-bg: #fff;
    --store-panel-text: var(--store-ink);
    --store-panel-heading: var(--store-accent-text);
    --store-panel-heading-bg: transparent;
    --store-panel-link-hover: var(--store-action-strong);
    --store-panel-child-bg: transparent;
    --store-panel-child-border: transparent;
    --store-panel-child-hover-bg: transparent;
    --store-panel-divider: var(--store-line);
    --store-panel-muted: #64748b;
    --store-card-bg: #fff;
    --store-accent-text: var(--store-action-strong);
    --store-input-bg: linear-gradient(180deg, #ffffff, #f8fcfe);
    --store-input-border: rgba(0, 143, 202, .35);
    min-height: 100vh;
    background: var(--store-bg);
    color: var(--store-ink);
    font-family: var(--sams-font-commerce);
}

.storefront-shell a {
    color: inherit;
}

.storefront-shell.theme-malagadive *,
.storefront-shell.theme-malagadive *::before,
.storefront-shell.theme-malagadive *::after {
    border-radius: 0 !important;
}

.storefront-shell.theme-malagadive .storefront-search,
.storefront-shell.theme-malagadive .storefront-search button,
.storefront-shell.theme-malagadive .storefront-icon-link,
.storefront-shell.theme-malagadive .storefront-cart-link span,
.storefront-shell.theme-malagadive .storefront-menu-toggle,
.storefront-shell.theme-malagadive .store-action-primary,
.storefront-shell.theme-malagadive .store-action-secondary,
.storefront-shell.theme-malagadive .store-cart-feedback,
.storefront-shell.theme-malagadive .store-tech-button,
.storefront-shell.theme-malagadive .store-checkout-actions a,
.storefront-shell.theme-malagadive .store-checkout-actions button,
.storefront-shell.theme-malagadive .storefront-page-link,
.storefront-shell.theme-malagadive .stock-ok,
.storefront-shell.theme-malagadive .stock-muted,
.storefront-shell.theme-malagadive input:not([type="checkbox"]):not([type="radio"]),
.storefront-shell.theme-malagadive textarea,
.storefront-shell.theme-malagadive select {
    border-radius: 8px !important;
}

.storefront-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--store-header-bg);
    border-bottom: 1px solid var(--store-line);
    box-shadow: 0 8px 22px rgba(7, 85, 123, .08);
}

.storefront-servicebar {
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 7px 18px;
    background: var(--store-service-bg);
    color: var(--store-service-text);
    font-size: .78rem;
}

.storefront-servicebar a {
    color: #fff4df;
    font-weight: 800;
    text-decoration: none;
}

.storefront-mainbar,
.storefront-nav,
.storefront-content,
.storefront-footer {
    width: min(100% - 32px, 1440px);
    margin: 0 auto;
}

.storefront-mainbar {
    display: grid;
    grid-template-columns: 230px minmax(320px, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 16px 0 12px;
}

.storefront-logo-link {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.storefront-logo-link img {
    display: block;
    width: 206px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.storefront-shell.theme-monkeyvapers .storefront-mainbar {
    grid-template-columns: 128px minmax(320px, 1fr) auto;
}

.storefront-shell.theme-monkeyvapers .storefront-header {
    background: #050505;
    border-bottom-color: #ff008f;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.storefront-shell.theme-monkeyvapers .storefront-servicebar {
    background: #ff008f;
    color: #fff;
}

.storefront-shell.theme-monkeyvapers .storefront-mainbar {
    position: relative;
}

.storefront-shell.theme-monkeyvapers .storefront-mainbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff008f 14%, #33c8ff 50%, #ff008f 86%, transparent);
}

.storefront-shell.theme-monkeyvapers .storefront-logo-link {
    justify-content: center;
}

.storefront-shell.theme-monkeyvapers .storefront-logo-link img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.storefront-shell.theme-monkeyvapers .storefront-search {
    border-color: rgba(255, 0, 143, .7);
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    box-shadow: 0 0 0 1px rgba(255, 0, 143, .2), 0 12px 30px rgba(255, 0, 143, .16);
}

.storefront-shell.theme-monkeyvapers .storefront-search button {
    background: #ff008f;
    color: #fff;
}

.storefront-shell.theme-monkeyvapers .storefront-icon-link {
    border-color: rgba(255, 0, 143, .45);
    background: #0b0b0d;
    color: #33c8ff;
}

.storefront-shell.theme-monkeyvapers .storefront-icon-link:hover {
    border-color: #ff008f;
    background: #151015;
    color: #fff;
}

.storefront-shell.theme-monkeyvapers .storefront-cart-link span {
    border: 1px solid #050505;
    background: #ff008f;
}

.storefront-shell.theme-monkeyvapers .storefront-nav {
    border-top: 0;
    background: #050505;
    color: #f8fafc;
}

.storefront-shell.theme-monkeyvapers .storefront-nav > a,
.storefront-shell.theme-monkeyvapers .storefront-mega summary {
    color: #f8fafc;
}

.storefront-shell.theme-monkeyvapers .storefront-nav > a:hover,
.storefront-shell.theme-monkeyvapers .storefront-mega[open] summary,
.storefront-shell.theme-monkeyvapers .storefront-mega summary:hover {
    background: #ff008f;
    color: #fff;
}

.storefront-shell.theme-monkeyvapers .storefront-mega summary::after {
    color: #ff008f;
}

.storefront-shell.theme-monkeyvapers .storefront-mega-panel {
    border-color: rgba(255, 0, 143, .35);
    border-top-color: #ff008f;
    background: #101014;
    box-shadow: 0 24px 55px rgba(0, 0, 0, .42);
}

.storefront-shell.theme-monkeyvapers .storefront-mega-column h2 {
    border-bottom-color: rgba(255, 0, 143, .35);
    color: #ff008f;
}

.storefront-shell.theme-monkeyvapers .storefront-mega-column a {
    color: #f8fafc;
}

.storefront-shell.theme-monkeyvapers .storefront-mega-column a:hover {
    color: #33c8ff;
}

.storefront-shell.theme-akarodice .storefront-header {
    background: #050505;
    border-bottom-color: #f4ea00;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
}

.storefront-shell.theme-akarodice .storefront-servicebar {
    background: #f4ea00;
    color: #050505;
    font-weight: 900;
}

.storefront-shell.theme-akarodice .storefront-mainbar {
    grid-template-columns: 260px minmax(320px, 1fr) auto;
}

.storefront-shell.theme-akarodice .storefront-logo-link img {
    width: 236px;
    max-height: 102px;
    object-fit: contain;
}

.storefront-shell.theme-akarodice .storefront-search {
    border-color: rgba(244, 234, 0, .72);
    background: linear-gradient(180deg, #ffffff, #fbfbf2);
    box-shadow: 0 0 0 1px rgba(244, 234, 0, .18), 0 12px 30px rgba(0, 0, 0, .18);
}

.storefront-shell.theme-akarodice .storefront-search button {
    background: #f4ea00;
    color: #050505;
}

.storefront-shell.theme-akarodice .storefront-search button:hover {
    background: #fff45a;
}

.storefront-shell.theme-akarodice .storefront-icon-link {
    border-color: rgba(244, 234, 0, .46);
    background: #101010;
    color: #f4ea00;
}

.storefront-shell.theme-akarodice .storefront-icon-link:hover {
    border-color: #f4ea00;
    background: #f4ea00;
    color: #050505;
}

.storefront-shell.theme-akarodice .storefront-cart-link span {
    border: 1px solid #050505;
    background: #f4ea00;
    color: #050505;
}

.storefront-shell.theme-akarodice .storefront-nav {
    border-top: 1px solid rgba(244, 234, 0, .24);
    background: #050505;
    color: #f8fafc;
}

.storefront-shell.theme-akarodice .storefront-nav > a,
.storefront-shell.theme-akarodice .storefront-mega summary {
    color: #f8fafc;
}

.storefront-shell.theme-akarodice .storefront-nav > a:hover,
.storefront-shell.theme-akarodice .storefront-mega[open] summary,
.storefront-shell.theme-akarodice .storefront-mega summary:hover {
    background: #f4ea00;
    color: #050505;
}

.storefront-shell.theme-akarodice .storefront-mega summary::after {
    color: #f4ea00;
}

.storefront-shell.theme-akarodice .storefront-mega-panel {
    border-color: rgba(244, 234, 0, .34);
    border-top-color: #f4ea00;
    background: #101010;
    box-shadow: 0 24px 55px rgba(0, 0, 0, .38);
}

.storefront-shell.theme-akarodice .storefront-mega-column h2 {
    border-bottom-color: rgba(244, 234, 0, .34);
    color: #f4ea00;
}

.storefront-shell.theme-akarodice .storefront-mega-column a {
    color: #f8fafc;
}

.storefront-shell.theme-akarodice .storefront-mega-column a:hover {
    color: #f4ea00;
}

.storefront-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px;
    align-items: center;
    min-width: 0;
    height: 46px;
    padding: 4px;
    border: 1px solid var(--store-input-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--store-input-bg);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .78), 0 8px 18px rgba(7, 85, 123, .08);
}

.storefront-search input {
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--store-ink);
}

.storefront-search button,
.store-action-primary {
    border: 0;
    background: var(--store-action);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.storefront-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0 14px;
    line-height: 1;
    border-radius: 8px;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}

.storefront-search button span {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.storefront-search button .erp-icon,
.storefront-search button svg {
    display: block;
    flex: 0 0 auto;
    margin-top: 0;
    transform: translateY(0);
}

.storefront-search button:hover,
.store-action-primary:hover {
    background: var(--store-action-strong);
}

.store-action-primary:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.storefront-icon-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    white-space: nowrap;
}

.storefront-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 44px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: var(--store-nav-hover-bg);
    color: #fff;
    cursor: pointer;
}

.storefront-menu-toggle:hover,
.storefront-menu-toggle[aria-expanded="true"] {
    background: var(--store-action);
    border-color: var(--store-action);
}

.storefront-search button svg,
.storefront-icon-link svg,
.storefront-menu-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.storefront-icon-link,
.storefront-nav > a,
.storefront-mega summary {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: var(--store-nav-font-size, 15px);
    font-weight: 800;
}

.storefront-icon-link {
    justify-content: center;
    width: 44px;
    padding: 0;
    border: 1px solid var(--store-line);
    background: #f8fcfe;
    color: var(--store-brand-primary-strong);
    position: relative;
}

.storefront-shell.theme-malagadive .storefront-icon-link {
    border-color: rgba(200, 214, 229, .18);
    background: #0b0e14;
    color: #38bdf8;
}

.storefront-icon-link:hover {
    border-color: rgba(0, 143, 202, .45);
    background: rgba(0, 143, 202, .08);
}

.storefront-shell.theme-malagadive .storefront-icon-link:hover {
    border-color: rgba(56, 189, 248, .42);
    background: #111827;
}

.storefront-account-link.logged-in {
    border-color: rgba(16, 185, 129, .45);
    background: rgba(16, 185, 129, .12);
    color: #047857;
}

.storefront-shell.theme-malagadive .storefront-account-link,
.storefront-shell.theme-malagadive .storefront-account-link.logged-in {
    border-color: rgba(200, 214, 229, .18);
    background: #0b0e14;
    color: #22f078;
}

.storefront-account-link.logged-in:hover {
    border-color: #047857;
    background: rgba(16, 185, 129, .18);
}

.storefront-shell.theme-malagadive .storefront-account-link:hover,
.storefront-shell.theme-malagadive .storefront-account-link.logged-in:hover {
    border-color: rgba(34, 240, 120, .42);
    background: #111827;
    color: #62ff9f;
}

.storefront-shell.theme-malagadive .storefront-cart-link {
    color: #38bdf8;
}

.storefront-shell.theme-malagadive .storefront-icon-link .erp-icon {
    stroke-width: 2.15;
}

.storefront-cart-link span {
    position: absolute;
    right: -5px;
    top: -7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--store-action);
    color: #fff;
    font-size: .68rem;
    font-weight: 900;
}

.storefront-shell.theme-malagadive .storefront-cart-link span {
    border: 1px solid #0b0e14;
    background: var(--store-action);
    color: #fff;
}

.storefront-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    border-top: 1px solid var(--store-line);
    background: var(--store-nav-bg);
    color: var(--store-nav-text);
    scrollbar-width: none;
}

.storefront-shell.client-kronoprint .storefront-nav {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 max(24px, calc((100vw - 1440px) / 2 + 24px));
    box-sizing: border-box;
    border-top: 0;
    border-bottom: 1px solid rgba(227, 6, 19, .24);
}

.storefront-nav::-webkit-scrollbar {
    display: none;
}

.storefront-nav > a:hover,
.storefront-mega[open] summary,
.storefront-mega summary:hover {
    background: var(--store-nav-hover-bg);
    color: var(--store-nav-hover-text);
}

.storefront-mega {
    position: static;
}

.storefront-mega summary {
    list-style: none;
    cursor: pointer;
}

.storefront-mega summary::-webkit-details-marker {
    display: none;
}

.storefront-mega summary::after {
    content: "+";
    margin-left: 8px;
    color: var(--store-action);
    font-weight: 900;
}

.storefront-mega[open] summary::after {
    color: #fff;
    content: "-";
}

.storefront-mega-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 46px;
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--store-line);
    border-top: 3px solid var(--store-action);
    background: var(--store-panel-bg);
    box-shadow: 0 22px 50px rgba(7, 85, 123, .18);
}

.storefront-mega[open] .storefront-mega-panel {
    display: grid;
}

.storefront-mega-column {
    min-width: 0;
}

.storefront-mega-column h2 {
    margin: 0 0 10px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--store-panel-divider);
    background: transparent;
    color: var(--store-panel-heading);
    font-size: .95rem;
}

.storefront-mega-column h2 a {
    color: inherit;
    text-decoration: none;
}

.storefront-mega-column h2 a:hover {
    color: var(--store-panel-link-hover);
}

.storefront-mega-column a,
.storefront-category-rail a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    text-decoration: none;
}

.storefront-mega-column a {
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: var(--store-panel-text);
    font-size: .9rem;
}

.storefront-mega-column a:hover {
    background: transparent;
    color: var(--store-panel-link-hover);
}

.storefront-mega-column span,
.storefront-category-rail span,
.store-product-info strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.storefront-mega-column small,
.storefront-category-rail small {
    color: var(--store-panel-muted);
    font-variant-numeric: tabular-nums;
}

.storefront-content {
    padding: 22px 0 42px;
}

.storefront-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: end;
    min-height: 190px;
    margin-bottom: 22px;
    padding: 26px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: var(--store-card-bg);
}

.storefront-hero-copy p,
.storefront-results-head p,
.store-detail-brand p {
    margin: 0 0 6px;
    color: var(--store-accent-text);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.storefront-hero-copy h1,
.store-detail-summary h1 {
    margin: 0;
    max-width: 760px;
    color: var(--store-ink);
    font-size: 2.05rem;
    line-height: 1.08;
    letter-spacing: 0;
}

.storefront-hero-copy span {
    display: block;
    max-width: 620px;
    margin-top: 10px;
    color: #475569;
    font-size: 1.02rem;
}

.storefront-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(96px, 1fr));
    gap: 10px;
}

.storefront-hero-metrics div {
    padding: 14px;
    border: 1px solid var(--store-line);
    border-radius: 6px;
    background: #f8fcfe;
}

.storefront-hero-metrics strong {
    display: block;
    font-size: 1.45rem;
    font-variant-numeric: tabular-nums;
}

.storefront-hero-metrics span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}

.storefront-catalog-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.storefront-category-rail {
    position: sticky;
    top: 146px;
    display: grid;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
}

.storefront-category-rail a {
    min-height: 38px;
    padding: 0 10px;
    border-radius: 6px;
    color: var(--store-ink);
}

.storefront-category-rail a:hover,
.storefront-category-rail a.active {
    background: var(--store-brand-primary-strong);
    color: #fff;
}

.storefront-category-rail a.level-1 {
    margin-left: 10px;
    padding-left: 14px;
    border-left: 2px solid var(--store-brand-primary);
    background: rgba(15, 23, 42, .035);
    font-size: .9rem;
}

.storefront-category-rail a.level-2 {
    min-height: 32px;
    margin-left: 26px;
    padding-left: 12px;
    border-left: 1px solid rgba(15, 23, 42, .18);
    background: transparent;
    color: #475569;
    font-size: .84rem;
    font-weight: 600;
}

.storefront-category-rail a.level-1.active,
.storefront-category-rail a.level-2.active,
.storefront-category-rail a.level-1:hover,
.storefront-category-rail a.level-2:hover {
    border-left-color: var(--store-brand-primary-strong);
    background: var(--store-brand-primary-strong);
    color: #fff;
}

.storefront-category-rail a.active small,
.storefront-category-rail a:hover small {
    color: #f8fafc;
}

.storefront-products-area {
    min-width: 0;
}

.store-category-banner {
    width: 100%;
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
}

.store-category-banner img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
}

.store-brand-banner {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    min-height: 150px;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
}

.store-brand-banner-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    padding: 14px;
    border: 1px solid rgba(15, 95, 128, .12);
    background: #f8fafc;
}

.store-brand-banner-media img {
    display: block;
    max-width: 100%;
    max-height: 96px;
    object-fit: contain;
}

.store-brand-banner-media strong {
    color: var(--store-brand-primary);
    font-size: 2rem;
    font-weight: 900;
}

.store-brand-banner-copy {
    min-width: 0;
}

.store-brand-banner-copy p {
    margin: 0 0 5px;
    color: var(--store-accent);
    font-size: .8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-brand-banner-copy h1 {
    margin: 0;
    color: #0b1320;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1;
}

.store-brand-banner-copy span {
    display: inline-flex;
    margin-top: 10px;
    color: #475569;
    font-weight: 800;
}

.storefront-results-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.storefront-results-head h2 {
    margin: 0;
    font-size: 1.35rem;
}

.storefront-results-head > span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    background: rgba(0, 143, 202, .1);
    color: var(--store-brand-primary-strong);
    font-weight: 900;
    white-space: nowrap;
}

.storefront-catalog-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin: 4px 0 18px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--store-line) 72%, transparent);
    border-radius: 6px;
    background: color-mix(in srgb, var(--store-panel-bg, #fff) 78%, var(--store-bg, #f6f8fb));
    box-shadow: none;
}

.storefront-catalog-controls .catalog-filter-field {
    display: grid;
    gap: 5px;
    flex: 1 1 130px;
    min-width: 0;
    margin: 0;
    color: color-mix(in srgb, var(--store-ink) 78%, var(--store-muted));
    font-size: .74rem;
    font-weight: 800;
}

.storefront-catalog-controls .catalog-filter-brand {
    flex-basis: 210px;
    flex-grow: 1.35;
}

.storefront-catalog-controls .catalog-filter-price {
    flex-basis: 112px;
    flex-grow: .65;
}

.storefront-catalog-controls .catalog-filter-order {
    flex-basis: 150px;
    flex-grow: .9;
}

.storefront-catalog-controls .catalog-filter-size {
    flex-basis: 96px;
    flex-grow: .4;
}

.storefront-catalog-controls label span {
    display: block;
    line-height: 1.1;
}

.storefront-catalog-controls select,
.storefront-catalog-controls input {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid color-mix(in srgb, var(--store-line) 82%, transparent);
    border-radius: 5px;
    background: color-mix(in srgb, var(--store-panel-bg, #fff) 88%, transparent);
    color: var(--store-ink);
    font: inherit;
    line-height: 38px;
    box-sizing: border-box;
    outline: none;
}

.storefront-catalog-controls select {
    appearance: auto;
}

.storefront-catalog-controls select:focus,
.storefront-catalog-controls input:focus {
    border-color: var(--store-brand-primary-strong);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--store-brand-primary-strong) 16%, transparent);
}

.catalog-filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex: 0 0 auto;
}

.storefront-catalog-controls button,
.storefront-catalog-controls a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid color-mix(in srgb, var(--store-action-strong, var(--store-brand-primary-strong)) 90%, #000);
    border-radius: 999px;
    background: linear-gradient(135deg,
        var(--store-action, var(--store-brand-primary)) 0%,
        var(--store-action-strong, var(--store-brand-primary-strong)) 100%);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--store-action-strong, var(--store-brand-primary-strong)) 20%, transparent);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.storefront-catalog-controls button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--store-action-strong, var(--store-brand-primary-strong)) 26%, transparent);
}

.storefront-catalog-controls a {
    border-color: color-mix(in srgb, var(--store-line) 82%, transparent);
    background: color-mix(in srgb, var(--store-panel-bg, #fff) 72%, transparent);
    color: var(--store-ink);
    box-shadow: none;
}

.storefront-catalog-controls a:hover {
    border-color: color-mix(in srgb, var(--store-brand-primary-strong) 32%, var(--store-line));
    background: color-mix(in srgb, var(--store-panel-bg, #fff) 92%, var(--store-brand-primary) 8%);
    color: var(--store-brand-primary-strong);
}

.storefront-shell.theme-malagadive .storefront-catalog-controls {
    margin-top: 10px;
    padding: 12px;
    border-color: rgba(0, 143, 202, .18);
    border-radius: 6px;
    background: rgba(0, 143, 202, .045);
    box-shadow: none;
}

.storefront-shell.theme-malagadive .storefront-catalog-controls .catalog-filter-field {
    color: #234052;
    font-size: .74rem;
    font-weight: 800;
}

.storefront-shell.theme-malagadive .storefront-catalog-controls select,
.storefront-shell.theme-malagadive .storefront-catalog-controls input {
    min-height: 38px;
    border-color: rgba(15, 95, 128, .28);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, .86);
    line-height: 38px;
}

.storefront-shell.theme-malagadive .storefront-catalog-controls select:focus,
.storefront-shell.theme-malagadive .storefront-catalog-controls input:focus {
    border-color: #008fca;
    box-shadow: 0 0 0 2px rgba(0, 143, 202, .12);
}

.storefront-shell.theme-malagadive .storefront-catalog-controls button,
.storefront-shell.theme-malagadive .storefront-catalog-controls a {
    min-height: 38px;
    border-radius: 999px;
}

.storefront-shell.theme-malagadive .storefront-catalog-controls button {
    border-color: #0f5f80;
    background: #0f5f80;
    box-shadow: 0 8px 18px rgba(15, 95, 128, .18);
}

.storefront-shell.theme-malagadive .storefront-catalog-controls button:hover {
    border-color: #008fca;
    background: #008fca;
    box-shadow: 0 12px 24px rgba(0, 143, 202, .22);
}

.storefront-shell.theme-malagadive .storefront-catalog-controls a {
    border-color: rgba(15, 95, 128, .22);
    background: rgba(255, 255, 255, .62);
    color: #234052;
}

.storefront-shell.theme-malagadive .storefront-catalog-controls a:hover {
    border-color: rgba(0, 143, 202, .36);
    background: rgba(255, 255, 255, .9);
    color: #0f5f80;
}

.storefront-shell.theme-bruja .storefront-catalog-controls {
    border-color: rgba(212, 175, 55, .24);
    background: rgba(255, 255, 255, .035);
}

.storefront-shell.theme-bruja .storefront-catalog-controls .catalog-filter-field {
    color: #f4e7ff;
}

.storefront-shell.theme-bruja .storefront-catalog-controls select,
.storefront-shell.theme-bruja .storefront-catalog-controls input {
    border-color: rgba(212, 175, 55, .28);
    background: rgba(18, 8, 30, .82);
    color: #f8f2ff;
}

.storefront-shell.theme-bruja .storefront-catalog-controls select:focus,
.storefront-shell.theme-bruja .storefront-catalog-controls input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, .18);
}

.storefront-shell.theme-bruja .storefront-catalog-controls button {
    border-color: #6f3ab2;
    background: #6f3ab2;
    color: #fff;
}

.storefront-shell.theme-bruja .storefront-catalog-controls button:hover {
    border-color: #d4af37;
    background: #d4af37;
    color: #1b1024;
}

.storefront-shell.theme-bruja .storefront-catalog-controls a {
    border-color: rgba(212, 175, 55, .28);
    background: rgba(255, 255, 255, .06);
    color: #f8f2ff;
}

.storefront-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    align-items: stretch;
    gap: 14px;
}

.storefront-shell.theme-malagadive .storefront-product-grid:not(.store-home-product-grid) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1080px) {
    .storefront-shell.theme-malagadive .storefront-product-grid:not(.store-home-product-grid) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .store-brand-banner {
        grid-template-columns: 1fr;
        gap: 14px;
        text-align: center;
    }

    .store-brand-banner-media {
        min-height: 96px;
    }

    .storefront-shell.theme-malagadive .storefront-product-grid:not(.store-home-product-grid) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .storefront-catalog-controls {
        gap: 10px;
    }

    .catalog-filter-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .storefront-catalog-controls button,
    .storefront-catalog-controls a {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .storefront-shell.theme-malagadive .storefront-product-grid:not(.store-home-product-grid) {
        grid-template-columns: 1fr;
    }
}

.storefront-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.storefront-page-link,
.storefront-page-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    font-weight: 900;
    line-height: 1;
}

.storefront-page-link {
    border: 1px solid var(--store-line);
    background: #fff;
    color: var(--store-brand-primary-strong);
    text-decoration: none;
    transition: border-color .14s ease, background .14s ease, color .14s ease;
}

.storefront-page-link:hover {
    border-color: var(--store-brand-primary);
    background: rgba(0, 143, 202, .08);
}

.storefront-page-link.active {
    border-color: var(--store-brand-primary-strong);
    background: var(--store-brand-primary-strong);
    color: #fff;
}

.storefront-page-link.disabled {
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #94a3b8;
}

.storefront-page-side {
    min-width: 104px;
}

.storefront-page-gap {
    min-width: 24px;
    padding: 0;
    color: #64748b;
}

.store-product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
    color: var(--store-ink);
    text-decoration: none;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.storefront-shell.theme-malagadive .store-product-card {
    border: 0;
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.store-product-card:hover {
    transform: translateY(-2px);
    border-color: var(--store-brand-primary);
    box-shadow: 0 14px 28px rgba(7, 85, 123, .14);
}

.storefront-shell.theme-malagadive .store-product-card:hover {
    transform: none;
    border: 0;
    box-shadow: none;
}

.store-product-image {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #fbfdff;
    border-bottom: 1px solid var(--store-line);
}

.storefront-shell.theme-malagadive .store-product-image {
    background: #fff;
    border-bottom: 0;
}

.store-product-image > img {
    width: 100%;
    height: 100%;
    padding: 10px;
    object-fit: contain;
    box-sizing: border-box;
}

.store-product-image-brand {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 32px;
    padding: 4px;
    border-radius: 4px;
    border: 1px solid rgba(15, 95, 128, .14);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}

.store-product-image-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.store-product-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    padding: 12px;
}

.store-product-info small {
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: .75rem;
    font-weight: 900;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.store-product-brand-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.store-product-brand-row img {
    width: 34px;
    height: 22px;
    object-fit: contain;
    flex: 0 0 auto;
}

.store-product-info strong {
    display: -webkit-box;
    min-width: 0;
    min-height: 40px;
    color: var(--store-ink);
    font-size: .94rem;
    line-height: 1.28;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-product-short {
    display: -webkit-box;
    min-height: 36px;
    overflow: hidden;
    color: #475569;
    font-size: .82rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.store-product-info em {
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: .78rem;
    font-style: normal;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-product-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    align-items: end;
    min-width: 0;
    margin-top: auto;
    padding-top: 8px;
}

.store-product-bottom b {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-align: right;
    font-size: 1rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: normal;
}

.store-product-card-cta {
    display: none;
}

.storefront-shell.theme-malagadive .store-product-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 10px;
    padding: 0 14px;
    border-radius: 8px !important;
    background: #1e63f4;
    color: #fff;
    font-size: .93rem;
    font-weight: 900;
    text-align: center;
}

.storefront-shell.theme-malagadive .store-product-card:hover .store-product-card-cta {
    background: #0f43bd;
}

.stock-ok,
.stock-muted {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    max-width: 100%;
    overflow: hidden;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 4px;
    font-size: .73rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-ok {
    background: rgba(0, 143, 202, .1);
    color: var(--store-brand-primary-strong);
}

.stock-muted {
    background: #fff4df;
    color: #825100;
}

.storefront-loading,
.storefront-error,
.storefront-empty {
    padding: 22px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
    color: #475569;
}

.storefront-loader {
    display: grid;
    justify-items: center;
    gap: 12px;
    min-height: 180px;
    place-content: center;
    text-align: center;
}

.storefront-loader img {
    width: 82px;
    max-height: 82px;
    object-fit: contain;
    animation: store-logo-loader 1.8s linear infinite;
}

.storefront-loader span {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(15, 23, 42, .12);
    border-top-color: var(--store-brand-primary);
    border-radius: 999px;
    animation: store-logo-loader .8s linear infinite;
}

.storefront-loader p {
    margin: 0;
    color: var(--store-muted);
    font-weight: 800;
}

@keyframes store-logo-loader {
    to {
        transform: rotate(360deg);
    }
}

.storefront-loading.compact {
    margin-bottom: 14px;
}

.storefront-error {
    border-color: #f2aaa6;
    color: #b42318;
}

.store-product-detail {
    display: grid;
    grid-template-columns: minmax(320px, 52%) minmax(0, 1fr);
    grid-template-areas:
        "breadcrumbs breadcrumbs"
        "gallery summary"
        "gallery purchase"
        "description description"
        "related related";
    gap: 28px;
    align-items: start;
}

.store-product-detail.is-soft-loading {
    cursor: progress;
}

.store-product-detail.is-soft-loading .store-related-card {
    pointer-events: none;
}

.store-detail-gallery,
.store-detail-summary,
.store-detail-purchase,
.store-detail-breadcrumbs {
    min-width: 0;
}

.store-detail-gallery {
    grid-area: gallery;
}

.store-detail-summary {
    grid-area: summary;
}

.store-detail-purchase {
    grid-area: purchase;
}

.store-detail-main-image {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 520px;
    padding: 0;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
    cursor: zoom-in;
}

.store-detail-main-image img {
    width: 100%;
    max-height: 520px;
    padding: 18px;
    object-fit: contain;
    box-sizing: border-box;
}

.store-detail-main-image span {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(7, 85, 123, .88);
    color: #fff;
    font-size: .75rem;
    font-weight: 900;
}

.store-detail-thumbs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.store-detail-thumbs button {
    width: 100%;
    padding: 0;
    border: 1px solid var(--store-line);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.store-detail-thumbs button:hover,
.store-detail-thumbs button.active {
    border-color: var(--store-accent);
    box-shadow: 0 0 0 2px rgba(248, 137, 20, .16);
}

.store-detail-thumbs img {
    width: 100%;
    aspect-ratio: 1;
    padding: 6px;
    object-fit: contain;
    box-sizing: border-box;
}

.store-detail-summary,
.store-detail-purchase {
    padding: 22px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
}

.store-detail-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.store-detail-brand img {
    max-width: 112px;
    max-height: 42px;
    object-fit: contain;
}

.store-detail-breadcrumbs {
    grid-area: breadcrumbs;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 -8px;
    color: #64748b;
    font-size: .85rem;
    font-weight: 800;
}

.store-detail-breadcrumbs a {
    color: var(--store-brand-primary-strong);
    text-decoration: none;
}

.store-detail-summary h2 {
    margin: 10px 0 0;
    color: #475569;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.store-back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--store-brand-primary-strong);
    font-weight: 900;
    text-decoration: none;
}

.store-detail-meta,
.store-detail-tags,
.store-detail-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.store-detail-meta span,
.store-detail-tags a {
    padding: 6px 9px;
    border-radius: 5px;
    background: #f0f8fc;
    color: var(--store-brand-primary-strong);
    font-size: .82rem;
    text-decoration: none;
}

.store-detail-buybox {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 22px;
    padding: 16px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #f8fcfe;
}

.store-detail-buybox strong {
    font-size: 1.8rem;
}

.store-variant-picker {
    grid-column: 1 / -1;
    display: grid;
    gap: 14px;
    margin: 2px 0;
    color: var(--store-text);
    font-weight: 800;
}

.store-variant-picker > span,
.store-variant-step > span,
.store-variant-model > span {
    font-size: .82rem;
    color: var(--store-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.store-variant-model {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
}

.store-variant-model strong {
    overflow: hidden;
    color: var(--store-ink);
    font-size: .98rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.store-variant-step {
    display: grid;
    gap: 8px;
}

.store-variant-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 10px;
}

.store-variant-options button {
    display: grid;
    grid-template-rows: auto auto;
    gap: 6px;
    justify-items: center;
    max-width: 100%;
    min-height: 94px;
    padding: 8px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
    color: var(--store-text);
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.store-variant-options button:hover,
.store-variant-options button.active {
    border-color: var(--store-brand-primary);
    background: rgba(0, 143, 202, .08);
    color: var(--store-brand-primary-strong);
}

.store-variant-options button img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8fafc;
}

.store-variant-options button span {
    overflow: hidden;
    max-width: 100%;
    color: inherit;
    font-size: .76rem;
    font-weight: 900;
    text-overflow: ellipsis;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.store-paint-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.store-paint-options button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--store-line);
    border-radius: 999px;
    background: #fff;
    color: var(--store-text);
    font: inherit;
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
}

.store-paint-options button:hover,
.store-paint-options button.active {
    border-color: var(--store-brand-primary);
    background: rgba(0, 143, 202, .08);
    color: var(--store-brand-primary-strong);
}

.store-share-panel,
.store-hashtag-list,
.store-personalize-panel {
    grid-column: 1 / -1;
}

.store-share-panel,
.store-personalize-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .94)),
        var(--store-card-bg);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.store-share-panel > span,
.store-personalize-panel > span {
    color: var(--store-muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-share-actions,
.store-hashtag-list {
    display: grid;
    gap: 8px;
}

.store-share-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.store-hashtag-list {
    display: flex;
    flex-wrap: wrap;
}

.store-hashtag-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    min-width: 0;
    padding: 0 12px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 999px;
    background: #fff;
    color: var(--store-brand-primary-strong);
    font-size: .8rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.store-share-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid color-mix(in srgb, var(--store-brand-primary) 22%, transparent);
    border-radius: 999px;
    background: #fff;
    color: var(--store-brand-primary-strong);
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.store-share-actions svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.store-share-actions a:hover,
.store-hashtag-list a:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--store-brand-primary) 38%, transparent);
    background: var(--store-brand-primary);
    color: #fff;
    box-shadow: 0 12px 24px color-mix(in srgb, var(--store-brand-primary) 22%, transparent);
}

.store-personalize-panel label {
    display: grid;
    gap: 6px;
    color: var(--store-text);
    font-size: .9rem;
    font-weight: 900;
}

.store-personalize-preview {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.store-personalize-preview img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fafc;
}

.store-personalize-preview strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-action-primary {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
}

.store-inquiry-button,
.store-inquiry-form .store-action-primary {
    width: 100%;
    color: #fff !important;
}

.store-action-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
    color: var(--store-brand-primary-strong);
    font-weight: 900;
    text-decoration: none;
}

.store-action-secondary:hover {
    border-color: rgba(0, 143, 202, .42);
    background: rgba(0, 143, 202, .08);
}

.store-detail-cart-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.store-detail-cart-controls input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid var(--store-line);
    border-radius: 999px;
    font: inherit;
    font-weight: 900;
    text-align: center;
}

.store-detail-cart-controls .store-action-primary {
    grid-column: auto;
    min-height: 46px;
}

.store-detail-buybox > .store-action-secondary {
    grid-column: 1 / -1;
    min-height: 46px;
    width: 100%;
}

.store-tech-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin-top: 12px;
    border: 1px solid rgba(0, 143, 202, .28);
    border-radius: 6px;
    background: #fff;
    color: var(--store-brand-primary-strong);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.store-tech-button:hover {
    background: #f0f8fc;
}

.storefront-shell.theme-malagadive .store-detail-main-image,
.storefront-shell.theme-malagadive .store-detail-summary,
.storefront-shell.theme-malagadive .store-detail-purchase,
.storefront-shell.theme-malagadive .store-detail-buybox,
.storefront-shell.theme-malagadive .store-detail-thumbs button,
.storefront-shell.theme-malagadive .store-detail-description,
.storefront-shell.theme-malagadive .store-detail-specs div,
.storefront-shell.theme-malagadive .store-tech-list div {
    border: 0;
    box-shadow: none;
}

.storefront-shell.theme-malagadive .store-detail-summary,
.storefront-shell.theme-malagadive .store-detail-purchase,
.storefront-shell.theme-malagadive .store-detail-buybox,
.storefront-shell.theme-malagadive .store-detail-description,
.storefront-shell.theme-malagadive .store-detail-specs div {
    background: transparent;
}

.storefront-shell.theme-malagadive .store-product-detail {
    row-gap: 14px;
}

.storefront-shell.theme-malagadive .store-detail-main-image {
    min-height: clamp(320px, 52vw, 440px);
}

.storefront-shell.theme-malagadive .store-detail-main-image img {
    max-height: 440px;
    padding: 12px;
}

.storefront-shell.theme-malagadive .store-detail-buybox {
    margin-top: 12px;
    padding: 12px;
}

.storefront-shell.theme-malagadive .store-detail-description {
    padding-top: 8px;
}

.storefront-shell.theme-malagadive .store-detail-description-html > div {
    padding-top: 0 !important;
}

.storefront-shell.theme-malagadive .store-detail-description-html h2:first-child {
    margin-top: 0 !important;
}

.storefront-shell.theme-malagadive .storefront-catalog-shell {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.storefront-shell.theme-malagadive .storefront-category-rail {
    align-self: start;
    min-height: 0;
    padding: 10px;
    border: 1px solid #d1dce8;
    border-radius: 8px !important;
    background: #edf3f8;
    box-shadow: none;
    gap: 5px;
}

.storefront-shell.theme-malagadive .storefront-category-rail a {
    min-height: 38px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px !important;
    color: var(--store-ink);
    font-size: .92rem;
    font-weight: 650;
}

.storefront-shell.theme-malagadive .storefront-category-rail a:hover,
.storefront-shell.theme-malagadive .storefront-category-rail a.active {
    background: var(--store-brand-primary-strong);
    color: #fff;
    box-shadow: none;
}

.storefront-shell.theme-malagadive .storefront-category-rail small {
    color: #64748b;
    font-weight: 650;
}

.storefront-shell.theme-malagadive .storefront-category-rail a.active small,
.storefront-shell.theme-malagadive .storefront-category-rail a:hover small {
    color: #f8fafc;
}

.storefront-shell.theme-malagadive .storefront-category-rail a.subcategory {
    min-height: 34px;
    margin-left: 10px;
    padding-left: 14px;
    border-left: 2px solid #0086c3;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, .45);
    color: #334155;
    font-size: .86rem;
    font-weight: normal;
}

.storefront-shell.theme-malagadive .storefront-category-rail a.subcategory:hover,
.storefront-shell.theme-malagadive .storefront-category-rail a.subcategory.active {
    background: #0b0e14;
    color: #fff;
}

.store-cart-feedback {
    grid-column: 1 / -1;
    color: var(--store-brand-primary-strong);
    font-weight: 900;
    text-decoration: none;
}

.store-cart-feedback.error {
    color: #b42318;
}

.storefront-cms-page,
.store-checkout-shell {
    max-width: 1120px;
    margin: 0 auto;
}

.storefront-cms-page {
    padding: 30px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
}

.storefront-cms-page.cms-template-full {
    max-width: 1180px;
}

.storefront-cms-page.cms-template-centered {
    max-width: 880px;
    text-align: center;
}

.storefront-cms-page.cms-template-centered .storefront-cms-content {
    max-width: 760px;
    margin: 0 auto;
}

.storefront-cms-page.cms-template-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 24px;
    align-items: start;
}

.storefront-cms-page.cms-template-contact header,
.storefront-cms-page.cms-template-contact .storefront-cms-content {
    grid-column: 1;
}

.storefront-cms-page.cms-template-contact .store-account-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
}

.storefront-cms-page header p {
    margin: 0 0 8px;
    color: var(--store-action-strong);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.storefront-cms-page h1,
.store-checkout-shell h1 {
    margin: 0 0 20px;
    color: var(--store-ink);
    font-size: 2.2rem;
    line-height: 1.08;
}

.storefront-cms-content {
    color: #334155;
    line-height: 1.62;
}

.store-legal-block {
    max-width: 880px;
}

.storefront-cms-content h2 {
    margin: 24px 0 10px;
    padding-top: 4px;
    color: var(--store-ink);
    font-size: 1.08rem;
    line-height: 1.25;
}

.store-legal-block h2 {
    padding-left: 12px;
    border-left: 4px solid var(--store-accent);
}

.storefront-cms-content p {
    margin: 0 0 12px;
}

.storefront-cms-content strong {
    color: var(--store-ink);
}

.storefront-cms-content table {
    width: 100%;
    margin: 14px 0 20px;
    border-collapse: collapse;
    font-size: .92rem;
    line-height: 1.45;
}

.storefront-cms-content th,
.storefront-cms-content td {
    padding: 11px 12px;
    border: 1px solid var(--store-line);
    text-align: left;
    vertical-align: top;
}

.storefront-cms-content th {
    background: #f3f9fc;
    color: var(--store-brand-primary-strong);
    font-weight: 950;
}

.storefront-cms-content img {
    max-width: 100%;
    height: auto;
}

.store-checkout-shell {
    display: grid;
    gap: 18px;
}

.store-checkout-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.store-checkout-steps a,
.store-checkout-steps span,
.store-checkout-steps strong {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--store-line);
    border-radius: 6px;
    background: #fff;
    color: var(--store-brand-primary-strong);
    font-size: .84rem;
    font-weight: 900;
    text-decoration: none;
}

.store-checkout-steps strong {
    border-color: var(--store-brand-primary-strong);
    background: var(--store-brand-primary-strong);
    color: #fff;
}

.store-cart-layout,
.store-payment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}

.store-cart-lines {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.store-cart-line {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 92px 120px auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
}

.store-cart-line img {
    width: 92px;
    aspect-ratio: 1;
    padding: 6px;
    border: 1px solid var(--store-line);
    border-radius: 6px;
    object-fit: contain;
    box-sizing: border-box;
}

.store-cart-line div {
    min-width: 0;
}

.store-cart-line small,
.store-cart-line span {
    display: block;
    color: #64748b;
    font-weight: 800;
}

.store-cart-line a {
    display: block;
    color: var(--store-ink);
    font-weight: 900;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.store-cart-line input,
.store-checkout-form input,
.store-checkout-form select,
.store-checkout-form textarea,
.store-coupon-form input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--store-line);
    border-radius: 6px;
    background: #fff;
    color: var(--store-ink);
    font: inherit;
    box-sizing: border-box;
}

.store-cart-line input,
.store-checkout-form input,
.store-checkout-form select,
.store-coupon-form input {
    min-height: 42px;
    padding: 0 10px;
}

.store-checkout-form textarea {
    min-height: 92px;
    padding: 10px;
    resize: vertical;
}

.store-cart-line strong {
    text-align: right;
    white-space: nowrap;
}

.store-cart-line button,
.store-coupon-form button {
    min-height: 36px;
    border: 0;
    border-radius: 6px;
    background: #fff4df;
    color: #825100;
    font-weight: 900;
    cursor: pointer;
}

.store-cart-summary {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(7, 85, 123, .08);
}

.store-cart-summary h2 {
    margin: 0;
    color: var(--store-ink);
    font-size: 1.15rem;
}

.store-coupon-form {
    display: grid;
    gap: 7px;
}

.store-coupon-form label,
.store-checkout-form label {
    display: grid;
    gap: 7px;
    color: var(--store-ink);
    font-size: .84rem;
    font-weight: 900;
}

.store-coupon-form div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 8px;
}

.store-coupon-form .ok {
    color: var(--store-brand-primary-strong);
    font-weight: 900;
}

.store-coupon-form .error {
    color: #b42318;
    font-weight: 900;
}

.store-cart-summary dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.store-cart-summary dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.store-cart-summary dt,
.store-cart-summary dd {
    margin: 0;
}

.store-cart-summary dd {
    color: var(--store-ink);
    font-weight: 900;
}

.store-cart-summary dl div:last-child {
    padding-top: 10px;
    border-top: 1px solid var(--store-line);
    font-size: 1.15rem;
}

.store-checkout-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
}

.store-checkout-form .wide,
.store-checkout-form .storefront-error,
.store-checkout-form .storefront-info,
.store-checkout-actions,
.store-check {
    grid-column: 1 / -1;
}

.store-check {
    display: inline-flex !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-content: start;
}

.store-check input {
    width: auto;
    min-height: 0;
}

.store-checkout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.store-checkout-actions .store-action-primary,
.store-checkout-actions .store-action-secondary {
    width: 160px;
    min-height: 46px;
    justify-content: center;
    border-radius: 8px;
}

.store-checkout-form.store-register-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 14px 16px;
}

.store-register-shell {
    width: min(100%, 760px);
    margin-inline: auto;
}

.store-register-form > label:not(.store-check),
.store-register-form > .store-register-block,
.store-register-form > .store-checkout-actions,
.store-register-form > .store-password-status {
    grid-column: 1 / -1;
}

.store-register-form > label:not(.store-check) {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    font-size: .82rem;
}

.store-register-form input,
.store-register-form select {
    width: min(100%, var(--store-register-field-width, 100%));
    min-height: 34px;
    padding: 0 8px;
}

.store-register-form .store-field-xs {
    --store-register-field-width: 118px;
}

.store-register-form .store-field-sm {
    --store-register-field-width: 200px;
}

.store-register-form .store-field-md {
    --store-register-field-width: 310px;
}

.store-register-form .store-field-lg {
    --store-register-field-width: 470px;
}

.store-register-success {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.store-register-success-media {
    position: relative;
    width: min(100%, 430px);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--store-line);
    background: #f8fcfe;
}

.store-register-success-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    background: #fff;
}

.store-register-success-badge {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #047857;
    color: #fff;
    box-shadow: 0 10px 24px rgba(4, 120, 87, .28);
}

.store-register-form .store-required {
    font-weight: 950;
}

.store-register-block {
    grid-column: 1 / -1;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--store-line);
}

.store-register-block h2 {
    margin: 0;
    color: var(--store-brand-primary-strong);
    font-size: .92rem;
    line-height: 1.2;
}

.store-register-form .store-check {
    min-height: 28px;
    gap: 8px;
    font-size: .82rem;
}

.store-register-form .store-check input {
    width: 16px;
    height: 16px;
}

.store-register-consent {
    align-items: start;
}

.store-register-consent span {
    color: #334155;
    line-height: 1.35;
}

.store-register-consent a {
    color: var(--store-brand-primary-strong);
    font-weight: 900;
}

.store-register-form .store-checkout-actions {
    margin-top: 6px;
}

.store-register-form .store-action-primary,
.store-register-form .store-action-secondary {
    min-height: 44px;
    padding: 0 16px;
}

.store-password-status {
    margin: -2px 0 2px 148px;
    font-size: .78rem;
    font-weight: 900;
}

.store-password-status.error {
    color: #b42318;
}

.store-password-status.ok {
    color: #047857;
}

.store-payment-form {
    align-self: start;
}

.store-payment-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.store-payment-method {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    width: 100%;
    min-height: 94px;
    padding: 16px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
    color: var(--store-ink);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.store-payment-method:hover,
.store-payment-method.selected {
    border-color: var(--store-action);
    box-shadow: 0 14px 30px rgba(7, 85, 123, .12);
}

.store-payment-method.selected {
    background: color-mix(in srgb, var(--store-action) 7%, #fff);
}

.store-payment-method-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    min-height: 38px;
    border-radius: 8px;
    color: #fff;
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .02em;
}

.store-payment-method-logo.stripe {
    background: #635bff;
}

.store-payment-method-logo.paypal {
    background: #002c8a;
}

.store-payment-method-logo.offline {
    background: var(--store-ink);
}

.store-payment-method-text {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.store-payment-method-text strong {
    color: var(--store-ink);
    font-size: 1rem;
    font-weight: 950;
}

.store-payment-method-text small {
    color: #5b6678;
    font-size: .84rem;
    font-weight: 750;
    line-height: 1.35;
}

.store-payment-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(0, 143, 202, .28);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 143, 202, .08), rgba(255, 141, 20, .12));
}

.store-payment-choice strong,
.store-payment-choice span {
    display: block;
}

.store-payment-choice strong {
    color: var(--store-ink);
    font-size: 1rem;
}

.store-payment-choice span {
    color: #475569;
    font-size: .88rem;
    font-weight: 800;
}

.store-payment-choice .store-payment-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--store-ink);
    color: #fff;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

.store-payment-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    color: #475569;
}

.store-payment-line span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.store-payment-line strong {
    color: var(--store-ink);
    white-space: nowrap;
}

.storefront-warning {
    padding: 12px 14px;
    border: 1px solid rgba(255, 141, 20, .35);
    border-radius: 8px;
    background: #fff7ed;
    color: #8a4b00;
    font-weight: 900;
}

.storefront-info {
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--store-action) 24%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--store-action) 8%, #fff);
    color: var(--store-ink);
    font-weight: 800;
}

.store-payment-result {
    align-items: start;
    text-align: left;
}

.store-payment-result span {
    color: var(--store-action-strong);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-payment-result.ok span {
    color: var(--store-brand-primary-strong);
}

.store-detail-specs {
    padding: 0;
}

.store-detail-specs div {
    min-width: 120px;
    padding: 10px;
    border: 1px solid var(--store-line);
    border-radius: 6px;
}

.store-detail-specs dt {
    color: #64748b;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-detail-specs dd {
    margin: 3px 0 0;
}

.store-detail-description {
    grid-area: description;
    color: #334155;
    line-height: 1.55;
    padding: 24px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
}

.store-detail-description h2 {
    margin: 0 0 8px;
    color: var(--store-ink);
    font-size: 1.35rem;
}

.store-detail-description-html {
    overflow-wrap: anywhere;
}

.store-detail-description-html img,
.store-detail-description-html iframe {
    max-width: 100%;
}

.store-detail-description-html table {
    width: 100%;
    border-collapse: collapse;
}

.store-related-products {
    grid-area: related;
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .96)),
        #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}

.store-detail-description + .store-related-products {
    margin-top: 0;
}

.store-related-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.store-related-head span {
    color: var(--store-brand-primary-strong);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-related-head h2 {
    margin: 0;
    color: var(--store-ink);
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    line-height: 1.05;
}

.store-related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.store-related-card {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.store-related-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--store-brand-primary) 38%, transparent);
    box-shadow: 0 18px 34px rgba(15, 23, 42, .12);
}

.store-related-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 10px;
    border-radius: 10px;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, .98), rgba(241, 245, 249, .92)),
        #f8fafc;
}

.store-related-card strong {
    overflow: hidden;
    color: var(--store-ink);
    font-size: .95rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.store-related-card span {
    overflow: hidden;
    color: var(--store-muted);
    font-size: .82rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.store-related-card em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--store-brand-primary) 12%, #fff);
    color: var(--store-brand-primary-strong);
    font-style: normal;
    font-weight: 900;
}

.store-image-zoom {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(8, 23, 37, .86);
    cursor: zoom-out;
}

.store-image-zoom img {
    max-width: min(1120px, 96vw);
    max-height: 88vh;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.store-image-zoom button {
    position: absolute;
    top: 18px;
    right: 18px;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    background: var(--store-accent);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.store-tech-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(8, 23, 37, .72);
}

.store-tech-card {
    position: relative;
    width: min(720px, 100%);
    max-height: min(760px, 88vh);
    overflow: auto;
    padding: 26px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(7, 85, 123, .28);
}

.store-tech-kicker {
    margin: 0 0 4px;
    color: var(--store-action-strong);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-tech-card h2 {
    margin: 0 0 16px;
    color: var(--store-ink);
    font-size: 1.55rem;
}

.store-inquiry-card {
    width: min(640px, 100%);
}

.store-inquiry-product {
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--store-ink);
}

.store-inquiry-product strong,
.store-inquiry-product span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.store-inquiry-form {
    grid-template-columns: 1fr;
    padding: 0;
    border: 0;
    background: transparent;
}

.store-inquiry-form textarea {
    min-height: 128px;
}

.store-hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.store-tech-close {
    position: absolute;
    top: 14px;
    right: 14px;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: var(--store-accent);
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.store-tech-html {
    margin-bottom: 16px;
    color: #334155;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.store-tech-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.store-tech-list div {
    padding: 11px 12px;
    border: 1px solid var(--store-line);
    border-radius: 6px;
    background: #f8fcfe;
    min-width: 0;
}

.store-tech-list dt {
    color: #64748b;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-tech-list dd {
    margin: 3px 0 0;
    color: var(--store-ink);
    overflow-wrap: anywhere;
}

.storefront-footer {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    align-items: start;
    gap: 28px;
    padding: 24px 0 34px;
    border-top: 1px solid var(--store-line);
    color: #475569;
}

.storefront-footer section {
    display: grid;
    gap: 8px;
}

.storefront-footer h2 {
    margin: 0 0 3px;
    color: var(--store-ink);
    font-size: .95rem;
    text-transform: uppercase;
}

.storefront-footer a {
    color: var(--store-brand-primary-strong);
    font-weight: 900;
    text-decoration: none;
}

.storefront-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.storefront-social-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--store-line);
    background: rgba(255, 255, 255, .54);
    color: var(--store-brand-primary-strong);
    line-height: 0;
}

.storefront-social-links a span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.storefront-social-links .erp-icon {
    stroke-width: 1.7;
}

.storefront-powered {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--store-line);
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}

.storefront-powered a {
    color: var(--store-action-strong);
}

.storefront-shell.theme-malagadive .storefront-footer {
    padding: 28px 20px 34px;
    border-top: 1px solid #1e2535;
    background: #0b0e14;
    box-shadow: 0 0 0 100vmax #0b0e14;
    clip-path: inset(0 -100vmax);
    color: #c8d6e5;
}

.storefront-shell.theme-malagadive .storefront-footer h2 {
    color: #ffffff;
}

.storefront-shell.theme-malagadive .storefront-footer a {
    color: #c8d6e5;
}

.storefront-shell.theme-malagadive .storefront-footer a:hover {
    color: #38bdf8;
}

.storefront-shell.theme-malagadive .storefront-social-links a {
    border-color: #243047;
    border-radius: 999px !important;
    background: #111827;
    color: #38bdf8;
}

.storefront-shell.theme-malagadive .storefront-social-links a:hover {
    border-color: #38bdf8;
    color: #ffffff;
}

.storefront-shell.theme-malagadive .storefront-powered {
    border-top-color: #1e2535;
    color: #93a4b8;
}

.storefront-shell.theme-malagadive .storefront-powered a {
    color: #38bdf8;
}

.storefront-shell.theme-akarodice .storefront-footer,
.storefront-shell.client-akarodice .storefront-footer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    padding: 34px 24px 30px;
    border-top: 0;
    background: #0b0b0b;
    box-shadow: 0 0 0 100vmax #0b0b0b;
    clip-path: inset(0 -100vmax);
    color: rgba(255, 255, 255, .74);
}

.storefront-shell.theme-akarodice .storefront-footer h2,
.storefront-shell.client-akarodice .storefront-footer h2 {
    color: #ffffff;
    font-size: .82rem;
    letter-spacing: .12em;
}

.storefront-shell.theme-akarodice .storefront-footer p,
.storefront-shell.client-akarodice .storefront-footer p {
    max-width: 28ch;
    margin: 0;
    color: rgba(255, 255, 255, .68);
    line-height: 1.55;
}

.storefront-shell.theme-akarodice .storefront-footer a,
.storefront-shell.client-akarodice .storefront-footer a {
    color: rgba(255, 255, 255, .78);
}

.storefront-shell.theme-akarodice .storefront-footer a:hover,
.storefront-shell.client-akarodice .storefront-footer a:hover {
    color: #ff5757;
}

.storefront-shell.theme-akarodice .storefront-footer-social,
.storefront-shell.client-akarodice .storefront-footer-social {
    justify-self: stretch;
}

.storefront-shell.theme-akarodice .storefront-social-links a,
.storefront-shell.client-akarodice .storefront-social-links a {
    border-color: rgba(255, 255, 255, .16);
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .08);
    color: #ffffff;
}

.storefront-shell.theme-akarodice .storefront-social-links a:hover,
.storefront-shell.client-akarodice .storefront-social-links a:hover {
    border-color: rgba(255, 87, 87, .72);
    background: rgba(255, 87, 87, .14);
}

.storefront-shell.theme-akarodice .storefront-powered,
.storefront-shell.client-akarodice .storefront-powered {
    border-top-color: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .5);
}

.storefront-shell.theme-akarodice .storefront-powered a,
.storefront-shell.client-akarodice .storefront-powered a {
    color: #ff5757;
}

.store-age-gate-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(3, 7, 18, .82);
    backdrop-filter: blur(8px);
}

.store-age-gate-dialog {
    width: min(520px, 100%);
    padding: clamp(26px, 5vw, 42px);
    border: 1px solid color-mix(in srgb, var(--store-action) 45%, transparent);
    background: #050505;
    color: #f8fafc;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .5);
    text-align: center;
}

.store-age-gate-kicker {
    margin: 0 0 10px;
    color: var(--store-action);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.store-age-gate-dialog h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.85rem, 5vw, 3rem);
    line-height: 1;
}

.store-age-gate-dialog p {
    margin: 16px 0 0;
    color: #dbeafe;
    font-size: 1rem;
    line-height: 1.55;
}

.store-age-gate-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 28px;
}

.store-age-gate-actions button {
    min-height: 52px;
    border: 1px solid transparent;
    border-radius: 0;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.store-age-gate-accept {
    background: var(--store-action);
    color: #ffffff;
}

.store-age-gate-reject {
    border-color: rgba(255, 255, 255, .28) !important;
    background: transparent;
    color: #f8fafc;
}

.storefront-shell.theme-monkeyvapers .store-age-gate-dialog {
    border-color: rgba(255, 0, 143, .62);
    box-shadow: 0 0 38px rgba(255, 0, 143, .16), 0 28px 70px rgba(0, 0, 0, .58);
}

@media (max-width: 1080px) {
    .storefront-mainbar {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .storefront-shell.theme-akarodice .storefront-mainbar {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .storefront-icon-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .storefront-hero,
    .storefront-catalog-shell,
    .store-product-detail,
    .store-cart-layout,
    .store-payment-layout {
        grid-template-columns: 1fr;
    }

    .store-product-detail {
        grid-template-areas:
            "breadcrumbs"
            "summary"
            "gallery"
            "purchase"
            "description"
            "related";
    }

    .store-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .storefront-category-rail {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .storefront-shell.theme-malagadive .storefront-catalog-shell {
        grid-template-columns: 1fr;
    }

    .storefront-shell.theme-malagadive .storefront-category-rail {
        min-height: 0;
        padding: 8px;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 720px) {
    .store-share-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-related-products {
        padding: 18px;
    }

    .store-related-head {
        align-items: start;
        flex-direction: column;
    }

    .store-related-grid {
        grid-template-columns: 1fr;
    }

    .store-variant-options button {
        width: 100%;
    }

    .store-variant-options button span {
        max-width: 100%;
    }

    .storefront-servicebar {
        align-items: center;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .storefront-mainbar,
    .storefront-search {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .storefront-mainbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px;
        width: min(100% - 20px, 1440px);
    }

    .storefront-shell.theme-monkeyvapers .storefront-mainbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
        width: min(100% - 20px, 1440px);
    }

    .storefront-shell.theme-akarodice .storefront-mainbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
        width: min(100% - 20px, 1440px);
    }

    .storefront-search {
        order: 4;
        flex: 0 0 100%;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 44px;
        height: 44px;
    }

    .storefront-logo-link {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 142px);
    }

    .storefront-logo-link img {
        width: 150px;
        max-width: 100%;
    }

    .storefront-shell.theme-monkeyvapers .storefront-logo-link {
        justify-content: flex-start;
    }

    .storefront-shell.theme-monkeyvapers .storefront-logo-link img {
        width: 74px;
        height: 74px;
    }

    .storefront-shell.theme-akarodice .storefront-logo-link img {
        width: 150px;
        max-height: 64px;
    }

    .storefront-icon-actions {
        order: 2;
        flex: 0 0 auto;
        gap: 6px;
        justify-content: flex-end;
    }

    .storefront-icon-link,
    .storefront-menu-toggle {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
    }

    .storefront-menu-toggle {
        display: inline-flex;
        order: 3;
        flex: 0 0 auto;
    }

    .storefront-search button {
        height: 100%;
        min-height: 0;
        padding: 0;
    }

    .storefront-search {
        height: 44px;
        align-items: stretch;
    }

    .storefront-search input {
        display: flex;
        align-items: center;
        height: 100%;
        line-height: 1;
    }

    .storefront-search input::placeholder {
        line-height: normal;
    }

    .storefront-search button span {
        display: none;
    }

    .storefront-nav {
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 4px;
        margin-top: 0;
        padding: 8px;
        border: 1px solid var(--store-line);
        border-radius: 8px;
        background: var(--store-nav-bg);
        color: var(--store-nav-text);
        box-shadow: 0 16px 32px rgba(7, 85, 123, .12);
        overflow: visible;
        position: relative;
        z-index: 20;
        flex: 0 0 100%;
        width: 100%;
    }

    .storefront-header.menu-open .storefront-nav {
        display: flex;
    }

    .storefront-header.menu-open .storefront-search {
        position: relative;
        z-index: 1;
    }

    .storefront-nav > a,
    .storefront-mega summary {
        width: 100%;
        justify-content: space-between;
        box-sizing: border-box;
        font-size: var(--store-nav-mobile-font-size, 17px);
    }

    .storefront-shell.client-kronoprint .storefront-nav {
        border-color: rgba(227, 6, 19, .35);
        background: #111;
        color: #fff;
    }

    .storefront-shell.client-kronoprint .storefront-nav > a,
    .storefront-shell.client-kronoprint .storefront-mega summary {
        color: #fff;
    }

    .storefront-shell.client-kronoprint .storefront-nav > a:hover,
    .storefront-shell.client-kronoprint .storefront-mega[open] summary,
    .storefront-shell.client-kronoprint .storefront-mega summary:hover {
        background: #e30613;
        color: #fff;
    }

    .storefront-mega {
        position: static;
    }

    .storefront-mega-panel {
        position: static;
        inset: auto;
        max-height: min(420px, 54vh);
        overflow: auto;
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 4px 0 8px;
        padding: 10px 12px;
        border-top-width: 2px;
        box-shadow: none;
    }

    .storefront-hero {
        min-height: 0;
        padding: 18px;
    }

    .storefront-hero-metrics {
        grid-template-columns: 1fr;
    }

    .storefront-results-head {
        align-items: stretch;
        flex-direction: column;
    }

    .storefront-footer {
        grid-template-columns: 1fr 1fr;
    }

    .storefront-shell.theme-akarodice .storefront-footer,
    .storefront-shell.client-akarodice .storefront-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-inline: 18px;
    }

    .storefront-shell.theme-akarodice .storefront-footer-social,
    .storefront-shell.client-akarodice .storefront-footer-social {
        justify-self: start;
    }

    .store-account-grid {
        grid-template-columns: 1fr;
    }

    .storefront-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .storefront-pagination {
        justify-content: stretch;
    }

    .storefront-page-link {
        flex: 1 1 44px;
    }

    .storefront-page-gap {
        flex: 0 0 18px;
    }

    .storefront-products-area {
        order: 1;
    }

    .storefront-category-rail {
        order: 2;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 320px;
        overflow: auto;
    }

    .store-detail-main-image {
        min-height: 320px;
    }

    .store-cart-line {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .store-cart-line img {
        width: 74px;
    }

    .store-cart-line input,
    .store-cart-line strong,
    .store-cart-line button {
        grid-column: 2;
    }

    .store-cart-line strong {
        text-align: left;
    }

    .store-checkout-form {
        grid-template-columns: 1fr;
    }

    .store-checkout-actions {
        justify-content: stretch;
    }

    .store-checkout-actions > * {
        flex: 1 1 180px;
    }

    .store-register-form label:not(.store-check) {
        grid-template-columns: 132px minmax(0, 1fr);
        gap: 8px;
    }

    .store-register-shell {
        width: min(100%, 540px);
    }

    .store-password-status {
        margin-left: 140px;
    }

    .store-detail-thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .store-tech-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .storefront-mainbar {
        width: min(100% - 14px, 1440px);
        gap: 6px;
    }

    .storefront-shell.theme-monkeyvapers .storefront-mainbar {
        width: min(100% - 14px, 1440px);
    }

    .storefront-shell.theme-akarodice .storefront-mainbar {
        width: min(100% - 14px, 1440px);
    }

    .storefront-shell.theme-akarodice .storefront-footer,
    .storefront-shell.client-akarodice .storefront-footer {
        grid-template-columns: 1fr;
    }

    .storefront-logo-link img {
        width: 132px;
    }

    .storefront-shell.theme-monkeyvapers .storefront-logo-link img {
        width: 64px;
        height: 64px;
    }

    .storefront-shell.theme-akarodice .storefront-logo-link img {
        width: 132px;
        max-height: 56px;
    }

    .storefront-icon-link,
    .storefront-menu-toggle {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
    }

    .storefront-icon-actions {
        gap: 5px;
    }
}

@media (max-width: 430px) {
    .store-register-form label:not(.store-check) {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .store-password-status {
        margin-left: 0;
    }

    .storefront-product-grid {
        grid-template-columns: 1fr;
    }

    .storefront-page-side {
        min-width: 120px;
    }

    .storefront-footer {
        grid-template-columns: 1fr;
    }
}

.store-home-slider {
    position: relative;
    height: clamp(360px, 36vw, 620px);
    overflow: hidden;
    border-radius: 8px;
    background: #111827;
}

.storefront-shell.theme-malagadive .store-home-slider {
    width: var(--store-home-slider-width, 100%);
    margin-top: var(--store-home-slider-margin-top, 0);
    margin-right: var(--store-home-slider-margin-right, 0);
    margin-left: var(--store-home-slider-margin-left, 0);
    border-radius: var(--store-home-slider-radius, 8px);
}

.store-slide {
    position: absolute;
    inset: 0;
    display: block;
    color: #fff;
    opacity: 0;
    text-decoration: none;
    animation: store-slide-fade 15s infinite;
}

.store-slide-two {
    animation-delay: 5s;
}

.store-slide-three {
    animation-delay: 10s;
}

.store-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}

.store-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 85, 123, .66), rgba(7, 85, 123, .08) 58%, rgba(20, 35, 49, .18));
}

.store-slide span {
    position: absolute;
    left: 36px;
    bottom: 32px;
    z-index: 1;
    max-width: 520px;
    color: #fff;
    font-size: 2.3rem;
    font-weight: 900;
    line-height: 1.05;
}

.store-slide span:empty {
    display: none;
}

.storefront-shell.theme-monkeyvapers .store-slide::after {
    background: linear-gradient(90deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .02) 58%, rgba(0, 0, 0, .08));
}

.storefront-shell.theme-monkeyvapers .store-slide span {
    display: none;
}

.storefront-shell.theme-akarodice .store-slide::after {
    background: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .2) 58%, rgba(244, 234, 0, .12));
}

.storefront-shell.theme-akarodice .store-slide span {
    color: #f8fafc;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .72);
}

.storefront-shell.theme-akarodice .store-home-copy {
    background: #050505;
    color: #f8fafc;
}

.storefront-shell.theme-akarodice .store-home-copy p {
    color: #f4ea00;
}

.storefront-shell.theme-akarodice .store-section-title hr {
    border-top-color: #f4ea00;
}

.storefront-shell.theme-akarodice .store-section-title h2 {
    color: #050505;
}

.storefront-shell.theme-akarodice .storefront-page-link.active,
.storefront-shell.theme-akarodice .storefront-page-link:hover,
.storefront-shell.theme-akarodice .store-product-card-cta,
.storefront-shell.theme-akarodice .store-action-primary {
    background: #f4ea00;
    color: #050505;
}

@keyframes store-slide-fade {
    0%,
    30% {
        opacity: 1;
    }

    36%,
    94% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.store-home-copy {
    margin-top: 20px;
    padding: 42px 26px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    text-align: center;
}

.store-home-copy p {
    margin: 0 0 12px;
    color: var(--store-accent);
    font-family: var(--sams-font-decorative);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.store-home-copy h1 {
    margin: 0 auto;
    max-width: 980px;
    color: #fff;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
}

.store-home-copy h2 {
    max-width: 760px;
    margin: 14px auto 0;
    color: #f1f5f9;
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 1.35;
}

.store-home-categories {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.store-home-category {
    position: relative;
    min-height: 245px;
    overflow: hidden;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    text-decoration: none;
}

.store-home-category img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .22s ease;
}

.store-home-category::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .78));
}

.store-home-category:hover img {
    transform: scale(1.04);
}

.store-home-category span,
.store-home-category small {
    position: absolute;
    z-index: 1;
    left: 18px;
    right: 18px;
}

.store-home-category span {
    bottom: 42px;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.store-home-category small {
    bottom: 18px;
    color: rgba(255, 255, 255, .86);
    font-size: .9rem;
    font-weight: 800;
}

.store-home-brand-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-top: 22px;
}

.store-home-brand-card {
    position: relative;
    display: block;
    min-height: 300px;
    overflow: hidden;
    background: #0b0e14;
    color: #fff;
    isolation: isolate;
    text-decoration: none;
}

.store-home-brand-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, .06) 32%, rgba(0, 0, 0, .82) 100%);
    pointer-events: none;
}

.store-home-brand-media {
    position: absolute;
    inset: 0;
    display: block;
    min-width: 0;
    min-height: 100%;
    padding: 0;
    background: #0b0e14;
}

.store-home-brand-media img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    object-fit: cover;
    background: transparent;
    box-shadow: none;
    transition: transform .18s ease;
}

.store-home-brand-media strong {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0086c3 0%, #043f61 100%);
    color: #fff;
    font-size: 3rem;
    font-weight: 900;
    transition: transform .18s ease;
}

.store-home-brand-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    min-width: 0;
    padding: 22px;
    background: transparent;
}

.store-home-brand-text span {
    display: block;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.12;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .62);
    text-transform: uppercase;
}

.store-home-brand-card:hover .store-home-brand-media img,
.store-home-brand-card:hover .store-home-brand-media strong {
    transform: scale(1.04);
}

.store-home-section {
    margin-top: 34px;
}

.store-news-section {
    display: grid;
    grid-template-columns: minmax(220px, .38fr) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    margin-top: 34px;
    padding: 20px;
    border: 1px solid rgba(17, 24, 39, .12);
    border-radius: 8px;
    background: #fff;
}

.store-news-head {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 18px;
    border-radius: 8px;
    background: #111;
    color: #fff;
}

.store-news-head span,
.store-news-card span {
    color: #ff5757;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.store-news-head h2 {
    margin: 10px 0;
    color: #fff;
    font-size: 1.9rem;
    line-height: 1.05;
    text-transform: uppercase;
}

.store-news-head p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    line-height: 1.5;
}

.store-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.store-news-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 132px;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, .12);
    border-radius: 8px;
    background: #151515;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(17, 24, 39, .12);
}

.store-news-card img {
    width: 100%;
    height: 100%;
    min-height: 132px;
    object-fit: cover;
    background: #050505;
}

.store-news-card div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 16px;
}

.store-news-card h3 {
    margin: 7px 0 6px;
    color: #fff;
    font-size: 1.32rem;
    line-height: 1.05;
    text-transform: uppercase;
}

.store-news-card p {
    margin: 0;
    color: rgba(255, 255, 255, .74);
    font-size: .94rem;
    line-height: 1.45;
}

.store-news-card strong {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 30px;
    margin-top: 12px;
    padding: 0 11px;
    border-radius: 999px;
    background: #ff5757;
    color: #fff;
    font-size: .76rem;
    text-transform: uppercase;
}

.store-news-card:hover strong {
    background: #ffffff;
    color: #151515;
}

.store-section-title {
    max-width: 900px;
    margin: 0 auto 24px;
    text-align: center;
}

.store-section-title hr {
    margin: 12px 0;
    border: 0;
    border-top: 2px solid #111;
}

.store-section-title h2 {
    margin: 0;
    color: #111;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-section-title p {
    max-width: 650px;
    margin: 8px auto 0;
    color: #475569;
    font-size: 1.05rem;
}

.store-home-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.storefront-shell.theme-malagadive .store-home-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.storefront-shell.theme-akarodice .store-home-product-grid,
.storefront-shell.client-akarodice .store-home-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.store-home-product-grid .store-product-card {
    border-color: rgba(20, 20, 20, .16);
    box-shadow: 0 12px 32px rgba(17, 24, 39, .08);
}

.store-home-product-grid .store-product-image {
    min-height: 300px;
}

.store-home-product-grid .store-product-info {
    padding: 16px 18px 18px;
    text-align: center;
}

.store-home-product-grid .store-product-info strong {
    min-height: 50px;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.store-home-empty {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.store-home-wide-photo {
    margin-top: 36px;
    height: 360px;
    overflow: hidden;
    border-radius: 8px;
    background: #111827;
}

.store-home-wide-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.storefront-shell.theme-monkeyvapers .store-home-wide-photo {
    width: 100vw;
    height: clamp(300px, 30vw, 520px);
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
    background: #050505;
}

.storefront-shell.theme-monkeyvapers .store-home-wide-photo img {
    object-fit: cover;
    object-position: center center;
    background: #050505;
}

.storefront-results-head h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
}

.store-account-shell {
    display: grid;
    gap: 20px;
}

.store-account-head,
.store-account-empty,
.store-account-panel {
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(7, 85, 123, .08);
}

.store-account-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 26px;
}

.store-account-head p,
.store-account-empty p {
    margin: 0 0 8px;
    color: var(--store-action-strong);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-account-head h1,
.store-account-empty h1 {
    margin: 0;
    color: var(--store-ink);
    font-size: 2.4rem;
    line-height: 1.05;
}

.store-account-head span,
.store-account-empty span {
    display: block;
    margin-top: 8px;
    color: #64748b;
}

.store-account-contact {
    display: grid;
    gap: 6px;
    min-width: 220px;
    text-align: right;
    font-weight: 800;
}

.store-account-empty {
    max-width: 820px;
    margin: 36px auto;
    padding: 32px;
    text-align: center;
}

.store-account-welcome {
    position: relative;
    max-width: 920px;
    overflow: hidden;
    padding: 46px 34px;
    border-color: rgba(15, 23, 42, .08);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--store-brand-primary) 9%, #fff), #fff 48%, color-mix(in srgb, var(--store-action) 8%, #fff)),
        #fff;
    color: var(--store-ink);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.store-account-welcome::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 5px;
    background: linear-gradient(90deg, #0086c3, #1e63f4);
}

.store-account-welcome-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border: 1px solid var(--store-line);
    background: #fff;
    color: var(--store-ink);
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.store-account-welcome-mark img {
    max-width: 86%;
    max-height: 86%;
    object-fit: contain;
}

.store-account-empty.store-account-welcome p {
    color: var(--store-action-strong);
}

.store-account-empty.store-account-welcome h1 {
    color: var(--store-ink);
}

.store-account-empty.store-account-welcome span {
    max-width: 620px;
    margin: 12px auto 0;
    color: var(--store-panel-muted);
    font-size: 1.02rem;
    line-height: 1.5;
}

.store-account-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.store-account-empty-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    text-decoration: none;
}

.store-account-login-card {
    width: min(430px, 100%);
    max-width: 430px;
    margin: 34px auto 48px;
    padding: 28px 26px 30px;
}

.store-account-login-card .store-account-welcome-mark {
    margin-left: auto;
    margin-right: auto;
}

.store-account-login-card h1 {
    font-size: clamp(1.75rem, 4vw, 2.15rem);
}

.store-account-login-card > span {
    max-width: 340px;
}

.store-account-login-form {
    grid-template-columns: 1fr;
    width: min(340px, 100%);
    margin: 22px auto 0;
    text-align: left;
}

.store-account-login-form .wide,
.store-account-login-form .store-check,
.store-account-login-form .store-inline-message,
.store-account-login-form .store-account-empty-actions,
.store-account-login-form .store-account-forgot-link {
    grid-column: 1 / -1;
}

.store-account-login-form .store-check {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

.store-account-login-form .store-account-empty-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    margin-top: 8px;
}

.store-account-login-form .store-action-primary,
.store-account-login-form .store-action-secondary {
    width: min(260px, 100%);
    min-height: 42px;
    justify-content: center;
    text-align: center;
}

.store-account-login-form .store-account-forgot-link {
    display: block;
    color: var(--store-brand-primary-strong);
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.store-account-login-form .store-account-forgot-link:hover {
    text-decoration: underline;
}

.store-account-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.store-account-kpis div {
    padding: 18px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #fff;
}

.store-account-kpis span {
    display: block;
    color: #64748b;
    font-size: .8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-account-kpis strong {
    display: block;
    margin-top: 8px;
    color: var(--store-brand-primary-strong);
    font-size: 1.65rem;
    font-variant-numeric: tabular-nums;
}

.store-account-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.store-account-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--store-line);
    border-radius: 999px;
    background: #fff;
    color: var(--store-ink);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.store-account-tabs button:hover,
.store-account-tabs button.active {
    border-color: var(--store-brand-primary);
    background: var(--store-brand-primary);
    color: #fff;
}

.store-account-tabs button:hover {
    transform: translateY(-1px);
}

.store-account-tabs span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .08);
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
}

.store-account-tabs button.active span,
.store-account-tabs button:hover span {
    background: rgba(255, 255, 255, .22);
}

.store-account-panel {
    padding: 18px;
}

.store-account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.store-account-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.store-account-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.store-account-panel-title h2 {
    margin: 0;
    color: var(--store-ink);
    font-size: 1.4rem;
    text-transform: uppercase;
}

.store-account-panel-title span {
    color: #64748b;
    font-weight: 900;
}

.store-account-panel-title a,
.store-account-panel-title button {
    color: var(--store-brand-primary-strong);
    font: inherit;
    font-size: .86rem;
    font-weight: 900;
    text-decoration: none;
}

.store-account-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.store-account-form label {
    display: grid;
    gap: 7px;
    color: var(--store-ink);
    font-size: .84rem;
    font-weight: 900;
}

.store-account-form .wide,
.store-account-form .store-check,
.store-account-form .store-action-primary,
.store-account-form .store-inline-message,
.store-account-form .store-account-note,
.store-address-editor .store-checkout-actions {
    grid-column: 1 / -1;
}

.store-account-form input,
.store-account-form select,
.store-account-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--store-line);
    border-radius: 6px;
    background: #fff;
    color: var(--store-ink);
    font: inherit;
    box-sizing: border-box;
}

.store-account-form input,
.store-account-form select {
    min-height: 42px;
    padding: 0 10px;
}

.store-account-form textarea {
    min-height: 92px;
    padding: 10px;
    resize: vertical;
}

.store-account-form input:disabled {
    background: #edf2f7;
    color: #64748b;
    cursor: not-allowed;
}

.store-account-note {
    margin: 0;
    padding: 11px 12px;
    border-radius: 6px;
    background: #fff7ed;
    color: #9a4f00;
    font-size: .86rem;
    font-weight: 800;
}

.store-inline-message {
    padding: 11px 12px;
    border-radius: 6px;
    font-weight: 900;
}

.store-inline-message.ok {
    background: #e9f8ef;
    color: #166534;
}

.store-inline-message.error {
    background: #fff1f0;
    color: #b42318;
}

.store-address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.store-address-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #f8fcfe;
}

.store-address-card strong {
    color: var(--store-ink);
}

.store-address-card span,
.store-address-card small {
    color: #64748b;
    overflow-wrap: anywhere;
}

.store-address-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.store-address-card button,
.store-address-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 190px;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: var(--store-action);
    color: #fff;
    font: inherit;
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
}

.store-address-card button:hover,
.store-address-new:hover {
    background: var(--store-action-strong);
}

.store-address-new {
    margin-top: 12px;
}

.store-address-editor {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--store-line);
}

.store-checkout-address-book {
    margin-bottom: 18px;
}

.store-state-chip {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    width: fit-content;
    margin-left: auto;
    margin-bottom: 4px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(0, 143, 202, .1);
    color: var(--store-brand-primary-strong) !important;
}

.store-account-documents,
.store-account-shipments {
    display: grid;
    gap: 8px;
}

.store-account-documents article,
.store-account-shipments article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 58px;
    padding: 12px 14px;
    border: 1px solid var(--store-line);
    border-radius: 8px;
    background: #f8fcfe;
}

.store-account-documents article > div,
.store-account-shipments article {
    min-width: 0;
}

.store-account-documents article > div:last-child {
    text-align: right;
}

.store-account-documents strong,
.store-account-shipments strong {
    display: block;
    color: var(--store-ink);
}

.store-account-documents span,
.store-account-shipments span,
.store-account-shipments small {
    display: block;
    color: #64748b;
    font-weight: 800;
}

.store-account-documents b {
    display: block;
    color: var(--store-brand-primary-strong);
    font-size: 1.05rem;
    white-space: nowrap;
}

@media (max-width: 1080px) {
    .store-home-categories,
    .store-home-brand-grid,
    .store-home-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .storefront-shell.theme-malagadive .store-home-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .storefront-shell.theme-akarodice .store-home-product-grid,
    .storefront-shell.client-akarodice .store-home-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-home-copy h1 {
        font-size: 2.35rem;
    }

    .store-account-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .store-home-slider {
        height: 300px;
        min-height: 0;
    }

    .storefront-shell.theme-malagadive .store-home-slider {
        width: var(--store-home-slider-mobile-width, 100%);
        margin-top: var(--store-home-slider-mobile-margin-top, 0);
        margin-right: var(--store-home-slider-mobile-margin-right, 0);
        margin-left: var(--store-home-slider-mobile-margin-left, 0);
        height: var(--store-home-slider-mobile-height, 300px);
        border-radius: var(--store-home-slider-mobile-radius, 0);
    }

    .storefront-shell.theme-malagadive .store-slide img {
        object-position: var(--store-home-slider-mobile-position, center center);
    }

    .store-slide span {
        left: 20px;
        right: 20px;
        bottom: 22px;
        font-size: 1.6rem;
    }

    .store-home-copy {
        padding: 30px 18px;
    }

    .store-home-copy h1 {
        font-size: 1.85rem;
    }

    .store-home-copy h2 {
        font-size: 1.1rem;
    }

    .storefront-cms-page.cms-template-contact {
        grid-template-columns: 1fr;
    }

    .storefront-cms-page.cms-template-contact header,
    .storefront-cms-page.cms-template-contact .storefront-cms-content,
    .storefront-cms-page.cms-template-contact .store-account-panel {
        grid-column: 1;
        grid-row: auto;
    }

    .store-home-categories,
    .store-home-brand-grid,
    .store-home-product-grid {
        grid-template-columns: 1fr;
    }

    .store-news-section {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .store-news-head {
        padding: 16px;
    }

    .store-news-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .store-news-card img {
        min-height: 124px;
        max-height: none;
    }

    .storefront-shell.theme-malagadive .store-home-product-grid {
        grid-template-columns: 1fr;
    }

    .store-home-category {
        min-height: 220px;
    }

    .store-section-title h2,
    .storefront-results-head h1,
    .store-detail-summary h1 {
        font-size: 1.55rem;
    }

    .store-home-wide-photo {
        height: 260px;
    }

    .storefront-shell.theme-monkeyvapers .store-home-wide-photo {
        height: 220px;
    }

    .store-account-head,
    .store-account-documents article,
    .store-account-shipments article {
        grid-template-columns: 1fr;
    }

    .store-account-head {
        align-items: stretch;
        flex-direction: column;
        padding: 20px;
    }

    .store-account-head h1,
    .store-account-empty h1 {
        font-size: 1.65rem;
    }

    .store-account-contact,
    .store-account-documents article > div:last-child {
        text-align: left;
    }

    .store-account-form {
        grid-template-columns: 1fr;
    }

    .store-account-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-account-tabs button {
        width: 100%;
    }

    .store-state-chip {
        margin-left: 0;
    }

    .store-account-kpis {
        grid-template-columns: 1fr;
    }
}

html,
body {
    font-family: var(--sams-font-commerce) !important;
}

.informes-shell {
    display: grid;
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.informes-catalog-panel {
    max-height: calc(100vh - 155px);
    overflow: auto;
    padding: 12px;
}

.informes-area + .informes-area {
    margin-top: 7px;
}

.informes-area-toggle {
    align-items: center;
    background: #f7fafc;
    border: 1px solid #dce7ef;
    border-radius: 7px;
    color: #1b2d3d;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    text-align: left;
    width: 100%;
}

.informes-area-toggle:hover,
.informes-area.open .informes-area-toggle {
    background: #eaf6fc;
    border-color: #1da3d9;
}

.informes-area-toggle span {
    align-items: center;
    display: flex;
    gap: 7px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.informes-area-toggle small {
    background: #fff;
    border: 1px solid #dce7ef;
    border-radius: 999px;
    color: #5d6b7a;
    font-size: .72rem;
    font-weight: 800;
    min-width: 25px;
    padding: 2px 7px;
    text-align: center;
}

.informes-area-chevron {
    transition: transform .16s ease;
}

.informes-area.open .informes-area-chevron {
    transform: rotate(90deg);
}

.informes-area-body {
    display: grid;
    gap: 3px;
    padding: 7px 0 4px 8px;
}

.informe-button {
    align-items: flex-start;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #1b2d3d;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 9px;
    text-align: left;
    width: 100%;
}

.informe-button:hover {
    background: #f3f7fb;
    border-color: #d8e5ef;
}

.informe-button.active {
    background: #eaf6fc;
    border-color: #1da3d9;
}

.informe-button span {
    font-size: .86rem;
    font-weight: 800;
}

.informe-button small {
    color: #667788;
    font-size: .72rem;
    line-height: 1.25;
}

.informes-workarea {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.informe-title-row {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.informe-title-row h2,
.informe-result-header h2 {
    color: #1b2d3d;
    font-size: 1.05rem;
    margin: 0;
}

.informe-title-row span,
.informe-result-header span {
    color: #667788;
    font-size: .82rem;
}

.informe-filter-form {
    display: grid;
    gap: 9px 12px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.informe-check {
    align-items: center;
    display: flex;
    gap: 8px;
    min-height: 34px;
}

.informe-actions {
    margin-top: 12px;
}

.informe-result-panel {
    overflow: hidden;
}

.informe-result-header {
    align-items: center;
    border-bottom: 1px solid #dce7ef;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: -2px -2px 10px;
    padding: 0 2px 10px;
}

.informe-result-header strong {
    color: #1da3d9;
    font-size: .9rem;
}

.informe-table-wrap {
    overflow: auto;
    max-height: calc(100vh - 365px);
}

.informe-table {
    border-collapse: collapse;
    font-size: .82rem;
    min-width: 920px;
    width: 100%;
}

.informe-table th,
.informe-table td {
    border-bottom: 1px solid #edf2f6;
    padding: 7px 8px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.informe-table th {
    background: #f7fafc;
    color: #415365;
    font-size: .72rem;
    font-weight: 800;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 1;
}

.informe-table td {
    color: #203040;
}

.informe-table .is-right {
    text-align: right;
}

.informe-empty {
    color: #667788;
    padding: 18px !important;
    text-align: center !important;
}

@media (max-width: 980px) {
    .informes-shell {
        grid-template-columns: 1fr;
    }

    .informes-catalog-panel {
        max-height: none;
    }

    .informe-filter-form {
        grid-template-columns: 1fr;
    }
}

/* Keep DevExpress grid pagers visible after the compact ERP grid overrides. */
.article-list-page {
    height: auto !important;
    min-height: calc(100vh - 60px);
    overflow: visible !important;
}

.grid-panel,
.article-grid-panel {
    overflow-x: auto !important;
    overflow-y: visible !important;
}

.product-grid-stable,
.product-grid-stable .dxbl-grid,
.product-grid-stable.dxbl-grid {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
.article-search-input {
    min-height: 42px;
}

.product-categories-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-category-picker {
    display: grid;
    grid-template-columns: minmax(240px, 520px) auto;
    gap: 10px;
    align-items: end;
}

.product-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-category-row {
    display: grid;
    grid-template-columns: 72px minmax(180px, 1fr) 140px auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #d9e2ef;
    border-radius: 10px;
    background: #fff;
}

.product-category-row > span {
    font-weight: 700;
    color: #1f2937;
}

.storefront-shell.theme-bruja {
    --store-brand-primary: #6f2a8e;
    --store-brand-primary-strong: #2b1038;
    --store-accent: #c45cff;
    --store-accent-strong: #8f2cc2;
    --store-surface: #120b18;
    --store-surface-soft: #1c1025;
    --store-text: #f7f0ff;
    --store-muted: #cdb9d9;
    background:
        radial-gradient(circle at 18% 0%, rgba(212, 175, 55, .16), transparent 30rem),
        radial-gradient(circle at 82% 10%, rgba(111, 42, 142, .28), transparent 34rem),
        #09070d;
    color: var(--store-text);
}

.storefront-shell.theme-bruja .storefront-header,
.storefront-shell.theme-bruja .storefront-mainbar,
.storefront-shell.theme-bruja .storefront-servicebar,
.storefront-shell.theme-bruja .storefront-footer {
    background: rgba(9, 7, 13, .94);
    border-color: rgba(212, 175, 55, .22);
    color: var(--store-text);
}

.storefront-shell.theme-bruja .storefront-logo-link img {
    max-height: 72px;
    filter: invert(1) brightness(1.45) drop-shadow(0 0 18px rgba(196, 92, 255, .22));
}

.storefront-shell.theme-bruja .storefront-nav > a,
.storefront-shell.theme-bruja .storefront-mega summary,
.storefront-shell.theme-bruja .storefront-search,
.storefront-shell.theme-bruja .storefront-icon-link,
.storefront-shell.theme-bruja .storefront-cart-link {
    color: var(--store-text);
}

.storefront-shell.theme-bruja .storefront-nav .erp-icon,
.storefront-shell.theme-bruja .storefront-mega summary .erp-icon,
.storefront-shell.theme-bruja .storefront-icon-link .erp-icon,
.storefront-shell.theme-bruja .storefront-cart-link .erp-icon {
    color: #d4af37;
}

.storefront-shell.theme-bruja .storefront-mega-column h2 img {
    filter: brightness(0) saturate(100%) invert(79%) sepia(44%) saturate(636%) hue-rotate(5deg) brightness(89%) contrast(88%);
}

.storefront-shell.theme-bruja .storefront-mega-column h2 a:hover img {
    filter: brightness(0) invert(1);
}

.storefront-shell.theme-bruja .storefront-nav > a:hover .erp-icon,
.storefront-shell.theme-bruja .storefront-mega summary:hover .erp-icon,
.storefront-shell.theme-bruja .storefront-mega[open] summary .erp-icon,
.storefront-shell.theme-bruja .storefront-icon-link:hover .erp-icon,
.storefront-shell.theme-bruja .storefront-cart-link:hover .erp-icon {
    color: #fff8d6;
}

.storefront-shell.theme-bruja .storefront-search {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(212, 175, 55, .34);
    min-height: 48px;
    padding: 3px;
    align-items: stretch;
}

.storefront-shell.theme-bruja .storefront-search input {
    height: 100%;
    line-height: 1;
    color: var(--store-text);
}

.storefront-shell.theme-bruja .storefront-search input::placeholder {
    color: rgba(247, 240, 255, .66);
}

.storefront-shell.theme-bruja .storefront-search button,
.storefront-shell.theme-bruja .store-action-primary,
.storefront-shell.theme-bruja .store-product-card-cta {
    background: linear-gradient(135deg, #c45cff, #7c2db2);
    color: #ffffff;
    border: 0;
}

.storefront-shell.theme-bruja .storefront-search button {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    height: 100%;
    padding: 0 16px;
    line-height: 1;
}

.storefront-shell.theme-bruja .storefront-search button svg,
.storefront-shell.theme-bruja .storefront-search button .erp-icon {
    display: block;
    width: 18px;
    height: 18px;
}

.storefront-shell.theme-bruja .storefront-icon-link,
.storefront-shell.theme-bruja .storefront-cart-link {
    border-color: rgba(196, 92, 255, .42);
    background: rgba(255, 255, 255, .08);
    color: #ffffff;
}

.storefront-shell.theme-bruja .storefront-icon-link:hover,
.storefront-shell.theme-bruja .storefront-cart-link:hover {
    background: rgba(196, 92, 255, .22);
    border-color: rgba(196, 92, 255, .7);
}

.storefront-shell.theme-bruja .storefront-cart-link span {
    background: #c45cff;
    color: #ffffff;
}

.storefront-shell.theme-bruja .storefront-nav > a::before {
    content: "\2726";
    margin-right: 7px;
    color: #d9a7ff;
    font-size: .74rem;
    line-height: 1;
}

.storefront-shell.theme-bruja .storefront-nav > a:first-child::before {
    content: "\263d";
}

.storefront-shell.theme-bruja .storefront-mega summary::before {
    content: "\2609";
    margin-right: 8px;
    color: #d9a7ff;
    font-size: .82rem;
}

.storefront-shell.theme-bruja .store-slide::after {
    background:
        radial-gradient(circle at 50% 50%, rgba(196, 92, 255, .1), transparent 34%),
        linear-gradient(90deg, rgba(9, 7, 13, .78), rgba(9, 7, 13, .18) 46%, rgba(9, 7, 13, .55));
}

.storefront-shell.theme-bruja .store-slide span {
    max-width: 620px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.75rem, 4.2vw, 3.9rem);
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.02;
    text-transform: uppercase;
    text-shadow:
        0 0 14px rgba(196, 92, 255, .42),
        0 7px 22px rgba(0, 0, 0, .68);
}

.storefront-shell.theme-bruja .store-slide span::first-letter {
    font-size: 1.18em;
}

.storefront-shell.theme-bruja .store-home-slider,
.storefront-shell.theme-bruja .store-product-card,
.storefront-shell.theme-bruja .store-detail-gallery,
.storefront-shell.theme-bruja .store-detail-purchase,
.storefront-shell.theme-bruja .storefront-cms-page,
.storefront-shell.theme-bruja .storefront-products-panel {
    background: rgba(18, 11, 24, .88);
    border-color: rgba(212, 175, 55, .18);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .32);
}

.storefront-shell.theme-bruja .storefront-product-grid:not(.store-home-product-grid),
.storefront-shell.theme-bruja .store-home-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.storefront-shell.theme-bruja .store-product-card {
    border: 1px solid rgba(196, 92, 255, .22);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(25, 15, 33, .96), rgba(12, 8, 18, .96));
    color: #f7f0ff;
}

.storefront-shell.theme-bruja .store-product-card:hover {
    border-color: rgba(196, 92, 255, .72);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .42), 0 0 0 1px rgba(196, 92, 255, .18);
}

.storefront-shell.theme-bruja .store-product-card-cta {
    border: 1px solid rgba(212, 175, 55, .3);
    background: linear-gradient(135deg, #6f2a8e, #c45cff) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .28);
}

.storefront-shell.theme-bruja .store-product-card:hover .store-product-card-cta {
    background: linear-gradient(135deg, #d4af37, #8f2cc2) !important;
    color: #120817 !important;
}

.storefront-shell.theme-bruja .store-product-image {
    background: rgba(255, 255, 255, .04);
    border-bottom-color: rgba(196, 92, 255, .18);
}

.storefront-shell.theme-bruja .store-product-info strong {
    display: block;
    min-height: auto;
    color: #ffffff;
    font-size: .96rem;
    line-height: 1.28;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.storefront-shell.theme-bruja .store-product-short {
    min-height: 0;
    color: #d7c7e6;
    -webkit-line-clamp: 2;
}

.storefront-shell.theme-bruja .store-product-info small,
.storefront-shell.theme-bruja .store-product-info em,
.storefront-shell.theme-bruja .store-product-bottom b {
    color: #d7c7e6;
}

.storefront-shell.theme-bruja .store-product-bottom b {
    color: #ffffff;
}

.storefront-shell.theme-bruja .stock-ok {
    border: 1px solid rgba(80, 255, 190, .28);
    background: rgba(28, 215, 150, .16);
    color: #7dffd4;
}

.storefront-shell.theme-bruja .stock-muted {
    border: 1px solid rgba(255, 160, 120, .32);
    background: rgba(255, 128, 80, .13);
    color: #ffc2a5;
}

.storefront-shell.theme-bruja .store-checkout-shell {
    max-width: 1180px;
    padding: 24px;
    border: 1px solid rgba(212, 175, 55, .16);
    border-radius: 12px;
    background: rgba(18, 11, 24, .88);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .32);
}

.storefront-shell.theme-bruja .store-checkout-shell h1 {
    color: #fff;
}

.storefront-shell.theme-bruja .store-checkout-shell .storefront-empty,
.storefront-shell.theme-bruja .store-checkout-shell .storefront-warning,
.storefront-shell.theme-bruja .store-checkout-shell .storefront-error {
    border-color: rgba(196, 92, 255, .22);
    background: rgba(255, 255, 255, .035);
    color: #f7f0ff;
}

.storefront-shell.theme-bruja .store-checkout-shell .storefront-empty a {
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-checkout-steps a,
.storefront-shell.theme-bruja .store-checkout-steps span,
.storefront-shell.theme-bruja .store-checkout-steps strong {
    border-color: rgba(196, 92, 255, .28);
    background: rgba(255, 255, 255, .06);
    color: #d7c7e6;
}

.storefront-shell.theme-bruja .store-checkout-steps strong {
    border-color: rgba(212, 175, 55, .45);
    background: linear-gradient(135deg, #6f2a8e, #c45cff);
    color: #fff;
}

.storefront-shell.theme-bruja .store-cart-line,
.storefront-shell.theme-bruja .store-cart-summary {
    border-color: rgba(196, 92, 255, .22);
    background: linear-gradient(180deg, rgba(25, 15, 33, .96), rgba(12, 8, 18, .96));
    color: #f7f0ff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .26);
}

.storefront-shell.theme-bruja .store-cart-line img {
    border-color: rgba(196, 92, 255, .24);
    background: rgba(255, 255, 255, .05);
}

.storefront-shell.theme-bruja .store-cart-line a,
.storefront-shell.theme-bruja .store-cart-line strong,
.storefront-shell.theme-bruja .store-cart-summary h2,
.storefront-shell.theme-bruja .store-cart-summary dd,
.storefront-shell.theme-bruja .store-coupon-form label {
    color: #fff;
}

.storefront-shell.theme-bruja .store-cart-line small,
.storefront-shell.theme-bruja .store-cart-line span,
.storefront-shell.theme-bruja .store-cart-summary dt {
    color: #d7c7e6;
}

.storefront-shell.theme-bruja .store-cart-line input,
.storefront-shell.theme-bruja .store-coupon-form input {
    border-color: rgba(196, 92, 255, .25);
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.storefront-shell.theme-bruja .store-cart-line input:focus,
.storefront-shell.theme-bruja .store-coupon-form input:focus {
    border-color: rgba(212, 175, 55, .72);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .14);
}

.storefront-shell.theme-bruja .store-coupon-form input::placeholder {
    color: rgba(247, 240, 255, .62);
}

.storefront-shell.theme-bruja .store-cart-line button,
.storefront-shell.theme-bruja .store-coupon-form button {
    border: 1px solid rgba(212, 175, 55, .3);
    background: linear-gradient(135deg, #6f2a8e, #c45cff);
    color: #fff;
}

.storefront-shell.theme-bruja .store-cart-line button:hover,
.storefront-shell.theme-bruja .store-coupon-form button:hover {
    background: linear-gradient(135deg, #d4af37, #8f2cc2);
    color: #120817;
}

.storefront-shell.theme-bruja .store-cart-summary dl div:last-child {
    border-top-color: rgba(212, 175, 55, .2);
}

.storefront-shell.theme-bruja .store-detail-summary,
.storefront-shell.theme-bruja .store-detail-purchase,
.storefront-shell.theme-bruja .store-detail-description,
.storefront-shell.theme-bruja .store-detail-buybox,
.storefront-shell.theme-bruja .store-detail-specs div,
.storefront-shell.theme-bruja .store-share-panel,
.storefront-shell.theme-bruja .store-personalize-panel,
.storefront-shell.theme-bruja .store-related-products {
    border-color: rgba(196, 92, 255, .22);
    background: linear-gradient(180deg, rgba(24, 14, 34, .94), rgba(12, 8, 18, .96));
    color: #f7f0ff;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .32);
}

.storefront-shell.theme-bruja .store-detail-buybox {
    margin-top: 18px;
}

.storefront-shell.theme-bruja .store-detail-breadcrumbs {
    margin-bottom: 0;
    color: #cdb9d9;
}

.storefront-shell.theme-bruja .store-detail-breadcrumbs a {
    color: #d4af37;
    font-weight: 800;
    text-decoration: none;
}

.storefront-shell.theme-bruja .store-detail-breadcrumbs a:hover {
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-detail-brand {
    margin-bottom: 10px;
}

.storefront-shell.theme-bruja .store-detail-brand img {
    max-width: 104px;
    max-height: 54px;
    object-fit: contain;
}

.storefront-shell.theme-bruja .store-detail-buybox strong {
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-detail-main-image,
.storefront-shell.theme-bruja .store-detail-thumbs button {
    border-color: rgba(196, 92, 255, .2);
    background: radial-gradient(circle at center, rgba(255, 255, 255, .08), rgba(12, 8, 18, .92));
}

.storefront-shell.theme-bruja .store-detail-main-image span {
    background: rgba(196, 92, 255, .86);
}

.storefront-shell.theme-bruja .store-detail-summary h2,
.storefront-shell.theme-bruja .store-detail-description,
.storefront-shell.theme-bruja .store-detail-description p,
.storefront-shell.theme-bruja .store-detail-description span,
.storefront-shell.theme-bruja .store-related-head span,
.storefront-shell.theme-bruja .store-related-card span,
.storefront-shell.theme-bruja .store-detail-specs dt {
    color: #d7c7e6;
}

.storefront-shell.theme-bruja .store-detail-description-html,
.storefront-shell.theme-bruja .store-detail-description-html div,
.storefront-shell.theme-bruja .store-detail-description-html p,
.storefront-shell.theme-bruja .store-detail-description-html span,
.storefront-shell.theme-bruja .store-detail-description-html font,
.storefront-shell.theme-bruja .store-detail-description-html li,
.storefront-shell.theme-bruja .store-detail-description-html td {
    color: #e3d7ef !important;
    background-color: transparent !important;
}

.storefront-shell.theme-bruja .store-detail-description-html h1,
.storefront-shell.theme-bruja .store-detail-description-html h2,
.storefront-shell.theme-bruja .store-detail-description-html h3,
.storefront-shell.theme-bruja .store-detail-description-html strong,
.storefront-shell.theme-bruja .store-detail-description-html b,
.storefront-shell.theme-bruja .store-detail-description-html em {
    color: #fff8d6 !important;
}

.storefront-shell.theme-bruja .store-detail-description b,
.storefront-shell.theme-bruja .store-detail-description strong,
.storefront-shell.theme-bruja .store-detail-description h2,
.storefront-shell.theme-bruja .store-related-head h2 {
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-detail-meta span,
.storefront-shell.theme-bruja .store-detail-tags a,
.storefront-shell.theme-bruja .store-hashtag-list a {
    border: 1px solid rgba(196, 92, 255, .2);
    background: rgba(196, 92, 255, .12);
    color: #efdfff;
    box-shadow: none;
}

.storefront-shell.theme-bruja .store-detail-tags a:hover,
.storefront-shell.theme-bruja .store-hashtag-list a:hover {
    border-color: rgba(196, 92, 255, .58);
    background: rgba(196, 92, 255, .28);
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-share-panel {
    padding: 14px;
}

.storefront-shell.theme-bruja .store-share-panel > span {
    color: #d7c7e6;
}

.storefront-shell.theme-bruja .store-share-actions a {
    border-color: rgba(196, 92, 255, .28);
    background: rgba(255, 255, 255, .06);
    color: #f4e7ff;
    box-shadow: none;
}

.storefront-shell.theme-bruja .store-share-actions a:hover {
    border-color: rgba(196, 92, 255, .72);
    background: rgba(196, 92, 255, .26);
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-tech-button {
    border-color: rgba(196, 92, 255, .28);
    background: rgba(255, 255, 255, .06);
    color: #f4e7ff;
}

.storefront-shell.theme-bruja .store-related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.storefront-shell.theme-bruja .store-related-card {
    border-color: rgba(196, 92, 255, .18);
    background: linear-gradient(180deg, rgba(25, 15, 33, .96), rgba(12, 8, 18, .96));
    color: #f7f0ff;
    box-shadow: none;
    overflow: hidden;
}

.storefront-shell.theme-bruja .store-related-card:hover {
    border-color: rgba(196, 92, 255, .7);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .34);
}

.storefront-shell.theme-bruja .store-related-card img {
    background: radial-gradient(circle at center, rgba(196, 92, 255, .12), rgba(12, 8, 18, .96));
}

.storefront-shell.theme-bruja .store-related-card strong {
    color: #ffffff;
    -webkit-line-clamp: 2;
}

.storefront-shell.theme-bruja .store-related-card em {
    justify-self: start;
    width: auto;
    border: 1px solid rgba(212, 175, 55, .28);
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(196, 92, 255, .16);
    color: #ffffff;
}

.storefront-shell.theme-bruja .storefront-category-rail {
    border-color: rgba(196, 92, 255, .2);
    background: linear-gradient(180deg, rgba(18, 11, 24, .88), rgba(9, 7, 13, .88));
    box-shadow: 0 14px 40px rgba(0, 0, 0, .26);
    gap: 7px;
    padding: 12px;
}

.storefront-shell.theme-bruja .storefront-category-rail a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    border: 1px solid rgba(196, 92, 255, .12);
    background: rgba(255, 255, 255, .035);
    color: #f7f0ff;
}

.storefront-shell.theme-bruja .storefront-category-rail small {
    color: #cdb9d9;
    font-size: .72rem;
}

.storefront-shell.theme-bruja .storefront-category-rail a.level-1,
.storefront-shell.theme-bruja .storefront-category-rail a.level-2 {
    margin-left: 0;
    padding-left: 10px;
    border-left: 2px solid rgba(196, 92, 255, .28);
    background: rgba(255, 255, 255, .025);
    color: #eadff4;
}

.storefront-shell.theme-bruja .storefront-category-rail a.level-2 {
    min-height: 34px;
    padding-left: 18px;
    font-size: .84rem;
}

.storefront-shell.theme-bruja .storefront-category-rail a:hover,
.storefront-shell.theme-bruja .storefront-category-rail a.active,
.storefront-shell.theme-bruja .storefront-category-rail a.level-1:hover,
.storefront-shell.theme-bruja .storefront-category-rail a.level-2:hover,
.storefront-shell.theme-bruja .storefront-category-rail a.level-1.active,
.storefront-shell.theme-bruja .storefront-category-rail a.level-2.active {
    background: rgba(196, 92, 255, .2);
    border-color: rgba(196, 92, 255, .48);
    color: #ffffff;
}

.storefront-shell.theme-bruja .storefront-mega-panel {
    border-color: rgba(196, 92, 255, .22);
    background: rgba(12, 8, 18, .98);
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.storefront-shell.theme-bruja .storefront-mega-column h2 a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 10px;
    border: 1px solid rgba(196, 92, 255, .16);
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
    color: #ffffff;
}

.storefront-shell.theme-bruja .storefront-mega-column h2 a:hover {
    border-color: rgba(196, 92, 255, .5);
    background: rgba(196, 92, 255, .16);
}

.storefront-shell.theme-bruja .storefront-mega-column h2 img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(79%) sepia(44%) saturate(636%) hue-rotate(5deg) brightness(89%) contrast(88%) drop-shadow(0 0 10px rgba(212, 175, 55, .2));
}

.storefront-shell.theme-bruja .storefront-mega-column h2 a:hover img {
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 248, 214, .3));
}

.storefront-shell.theme-bruja .store-section-title h2,
.storefront-shell.theme-bruja .store-detail-summary h1,
.storefront-shell.theme-bruja .storefront-cms-page h1 {
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-home-intro {
    max-width: 980px;
    margin: 18px auto 0;
    color: #f7f0ff;
    font-size: 1.05rem;
    line-height: 1.75;
    text-transform: none;
    letter-spacing: 0;
}

.storefront-shell.theme-bruja .store-detail-meta span,
.storefront-shell.theme-bruja .store-product-card p,
.storefront-shell.theme-bruja .storefront-cms-page,
.storefront-shell.theme-bruja .storefront-footer p {
    color: var(--store-muted);
}

.storefront-shell.theme-bruja .storefront-footer {
    background: linear-gradient(180deg, #15091c, #07050b);
    border-top: 1px solid rgba(212, 175, 55, .34);
}

.storefront-shell.theme-bruja .storefront-footer h2 {
    color: #d4af37;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.storefront-shell.theme-bruja .storefront-footer a,
.storefront-shell.theme-bruja .storefront-nav a:hover,
.storefront-shell.theme-bruja .storefront-mega summary:hover {
    color: #ffffff;
}

.storefront-shell.theme-bruja .storefront-footer a:hover {
    color: #f0d28a;
}

.storefront-shell.theme-bruja .storefront-social-links {
    gap: 12px;
    align-items: center;
}

.storefront-shell.theme-bruja .storefront-social-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    min-height: 54px;
    padding: 0;
    border: 1px solid rgba(212, 175, 55, .52);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .18), rgba(196, 92, 255, .95));
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .34);
}

.storefront-shell.theme-bruja .storefront-social-links a span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.storefront-shell.theme-bruja .storefront-social-links .erp-icon {
    width: 24px;
    height: 24px;
}

.storefront-shell.theme-bruja .storefront-social-links a:hover {
    background: radial-gradient(circle at 30% 25%, #fff2ba, #d4af37);
    color: #120817;
}

.storefront-shell.theme-bruja .store-account-welcome {
    border-color: rgba(196, 92, 255, .28);
    background:
        radial-gradient(circle at 18% 8%, rgba(196, 92, 255, .24), transparent 26rem),
        linear-gradient(135deg, rgba(25, 15, 33, .96), rgba(8, 5, 12, .98));
}

.storefront-shell.theme-bruja .store-account-welcome::after {
    background: linear-gradient(90deg, #6f2a8e, #d4af37);
}

.storefront-shell.theme-bruja .store-account-welcome-mark {
    width: 82px;
    height: 82px;
    border-color: rgba(212, 175, 55, .34);
    background: rgba(255, 255, 255, .035);
}

.storefront-shell.theme-bruja .store-account-welcome-mark img {
    filter: invert(1) brightness(1.5) drop-shadow(0 0 14px rgba(196, 92, 255, .25));
}

.storefront-shell.theme-bruja .store-account-empty.store-account-welcome p {
    color: #d4af37;
}

.storefront-shell.theme-bruja .store-account-login-card {
    width: min(100%, 360px);
    margin: 30px auto 42px;
    padding: 22px 20px 24px;
    border: 1px solid rgba(212, 175, 55, .30);
    border-radius: 14px;
    text-align: center;
    background:
        radial-gradient(circle at 18% 0%, rgba(196, 92, 255, .30), transparent 22rem),
        radial-gradient(circle at 82% 18%, rgba(212, 175, 55, .16), transparent 18rem),
        linear-gradient(145deg, rgba(25, 12, 34, .98), rgba(8, 5, 12, .99));
    box-shadow: 0 28px 70px rgba(0, 0, 0, .40), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.storefront-shell.theme-bruja .store-account-login-card .store-account-welcome-mark {
    display: flex;
    justify-content: center;
    margin: 0 0 16px;
}

.storefront-shell.theme-bruja .store-account-login-card p {
    margin: 0 0 8px;
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.storefront-shell.theme-bruja .store-account-login-card h1 {
    margin: 0;
    max-width: none;
    color: #fff8d6;
    font-size: clamp(1.55rem, 5vw, 1.95rem);
    line-height: 1.06;
}

.storefront-shell.theme-bruja .store-account-login-card > span {
    display: block;
    max-width: none;
    margin: 12px auto 0;
    color: #dfd0ef;
    font-size: .9rem;
}

.storefront-shell.theme-bruja .store-account-login-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    width: 100%;
    margin: 20px auto 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: left;
}

.storefront-shell.theme-bruja .store-account-login-form label {
    color: #f7f0ff;
    font-size: .88rem;
    font-weight: 900;
}

.storefront-shell.theme-bruja .store-account-login-form input[type="text"],
.storefront-shell.theme-bruja .store-account-login-form input[type="password"] {
    min-height: 48px;
    margin-top: 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .07);
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-account-login-form .store-check {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 9px;
    margin: 0 auto;
    text-align: center;
}

.storefront-shell.theme-bruja .store-account-login-form .store-account-empty-actions {
    justify-content: center;
    align-items: center;
    margin-top: 6px;
    text-align: center;
}

.storefront-shell.theme-bruja .store-account-login-form .store-action-primary,
.storefront-shell.theme-bruja .store-account-login-form .store-action-secondary {
    min-height: 46px;
    width: min(100%, 220px);
    border-radius: 999px;
    padding-inline: 24px;
    justify-content: center;
    margin-inline: auto;
}

.storefront-shell.theme-bruja .store-account-login-form .store-action-primary {
    min-width: 0;
}

.storefront-shell.theme-bruja .store-account-forgot-link {
    display: block;
    width: 100%;
    color: #d4af37;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/mi-cuenta"]),
.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/recuperar-password"]) {
    width: min(100%, 360px);
    margin: 30px auto 42px;
    padding: 22px 20px 24px;
    border: 1px solid rgba(212, 175, 55, .30);
    border-radius: 14px;
    text-align: center;
    background:
        radial-gradient(circle at 18% 0%, rgba(196, 92, 255, .26), transparent 20rem),
        radial-gradient(circle at 82% 18%, rgba(212, 175, 55, .14), transparent 16rem),
        linear-gradient(145deg, rgba(25, 12, 34, .98), rgba(8, 5, 12, .99));
    box-shadow: 0 24px 58px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/mi-cuenta"]) h1,
.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/recuperar-password"]) h1 {
    margin: 0 0 20px;
    color: #fff8d6;
    font-size: clamp(1.45rem, 5vw, 1.85rem);
    line-height: 1.08;
}

.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/mi-cuenta"]) .store-checkout-form,
.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/recuperar-password"]) .store-checkout-form {
    display: grid;
    gap: 14px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: left;
}

.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/mi-cuenta"]) .store-checkout-actions,
.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/recuperar-password"]) .store-checkout-actions {
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/mi-cuenta"]) .store-action-primary,
.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/mi-cuenta"]) .store-action-secondary,
.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/recuperar-password"]) .store-action-primary,
.storefront-shell.theme-bruja .store-register-shell:has(.store-checkout-actions a[href="/recuperar-password"]) .store-action-secondary {
    width: min(100%, 220px);
    min-height: 46px;
    justify-content: center;
    margin-inline: auto;
}

.storefront-shell.theme-bruja .store-account-forgot-link:hover {
    color: #fff2ba;
    text-decoration: underline;
}

.storefront-shell.theme-bruja .store-account-empty-actions .store-action-secondary {
    border: 1px solid rgba(212, 175, 55, .36);
    background: rgba(196, 92, 255, .14);
    color: #ffffff;
    box-shadow: none;
}

.storefront-shell.theme-bruja .store-account-empty-actions .store-action-secondary:hover {
    border-color: rgba(212, 175, 55, .7);
    background: rgba(196, 92, 255, .28);
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-account-shell {
    width: min(100%, 980px);
    max-width: 980px;
    margin: 30px auto 52px;
    color: #f7f0ff;
}

.storefront-shell.theme-bruja .storefront-main:has(.store-account-shell) {
    display: block;
}

.storefront-shell.theme-bruja .store-account-head,
.storefront-shell.theme-bruja .store-account-panel,
.storefront-shell.theme-bruja .store-account-kpis div {
    border-color: rgba(212, 175, 55, .22);
    background:
        radial-gradient(circle at 12% 0%, rgba(196, 92, 255, .18), transparent 18rem),
        linear-gradient(135deg, #1a1022, #0a060f);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
}

.storefront-shell.theme-bruja .store-account-panel {
    padding: 22px;
}

.storefront-shell.theme-bruja .store-account-head p,
.storefront-shell.theme-bruja .store-account-kpis strong,
.storefront-shell.theme-bruja .store-account-panel-title h2,
.storefront-shell.theme-bruja .store-account-documents strong,
.storefront-shell.theme-bruja .store-account-shipments strong,
.storefront-shell.theme-bruja .store-account-form label,
.storefront-shell.theme-bruja .store-address-card strong {
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-account-head h1 {
    color: #d4af37;
}

.storefront-shell.theme-bruja .store-account-head span,
.storefront-shell.theme-bruja .store-account-kpis span,
.storefront-shell.theme-bruja .store-account-panel-title span,
.storefront-shell.theme-bruja .store-account-documents span,
.storefront-shell.theme-bruja .store-account-shipments span,
.storefront-shell.theme-bruja .store-account-shipments small,
.storefront-shell.theme-bruja .store-address-card span,
.storefront-shell.theme-bruja .store-address-card small {
    color: #d8c7e8;
}

.storefront-shell.theme-bruja .store-account-documents b,
.storefront-shell.theme-bruja .store-account-shipments b,
.storefront-shell.theme-bruja .store-account-documents article > div:last-child,
.storefront-shell.theme-bruja .store-account-documents article > div:last-child span,
.storefront-shell.theme-bruja .store-account-documents article > div:last-child b {
    color: #f4d978;
}

.storefront-shell.theme-bruja .store-account-tabs button {
    border-color: rgba(212, 175, 55, .26);
    background: rgba(19, 9, 26, .82);
    color: #f7f0ff;
}

.storefront-shell.theme-bruja .store-account-tabs button:hover,
.storefront-shell.theme-bruja .store-account-tabs button.active {
    border-color: rgba(212, 175, 55, .76);
    background: linear-gradient(135deg, #6f2a8e, #d4af37);
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-account-tabs span {
    background: rgba(255, 255, 255, .12);
    color: inherit;
}

.storefront-shell.theme-bruja .store-account-form input,
.storefront-shell.theme-bruja .store-account-form select,
.storefront-shell.theme-bruja .store-account-form textarea {
    border-color: rgba(212, 175, 55, .34);
    background: #100817;
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.storefront-shell.theme-bruja .store-account-form input::placeholder,
.storefront-shell.theme-bruja .store-account-form textarea::placeholder {
    color: rgba(247, 240, 255, .68);
    opacity: 1;
}

.storefront-shell.theme-bruja .store-account-form input:focus,
.storefront-shell.theme-bruja .store-account-form select:focus,
.storefront-shell.theme-bruja .store-account-form textarea:focus {
    border-color: #d4af37;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .16), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.storefront-shell.theme-bruja .store-checkout-form label {
    color: #f7f0ff;
}

.storefront-shell.theme-bruja .store-checkout-form {
    background: transparent;
    border-color: rgba(212, 175, 55, .18);
    color: #f7f0ff;
}

.storefront-shell.theme-bruja .store-checkout-form input,
.storefront-shell.theme-bruja .store-checkout-form select,
.storefront-shell.theme-bruja .store-checkout-form textarea {
    border-color: rgba(212, 175, 55, .34);
    background: rgba(10, 6, 14, .82);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.storefront-shell.theme-bruja .store-checkout-form input::placeholder,
.storefront-shell.theme-bruja .store-checkout-form textarea::placeholder {
    color: rgba(247, 240, 255, .66);
}

.storefront-shell.theme-bruja .store-checkout-form input:focus,
.storefront-shell.theme-bruja .store-checkout-form select:focus,
.storefront-shell.theme-bruja .store-checkout-form textarea:focus {
    border-color: #d4af37;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .16), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.storefront-shell.theme-bruja .store-account-form input:-webkit-autofill,
.storefront-shell.theme-bruja .store-account-form input:-webkit-autofill:hover,
.storefront-shell.theme-bruja .store-account-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    box-shadow: 0 0 0 1000px #100817 inset, 0 0 0 3px rgba(212, 175, 55, .16);
    caret-color: #ffffff;
}

.storefront-shell.theme-bruja .store-account-form input:disabled {
    background: rgba(255, 255, 255, .08);
    color: #cbb8de;
}

.storefront-shell.theme-bruja .store-account-form .store-check {
    padding: 10px 12px;
    border: 1px solid rgba(212, 175, 55, .2);
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
}

.storefront-shell.theme-bruja .store-account-form .store-check input {
    accent-color: #d4af37;
    box-shadow: none;
}

.storefront-shell.theme-bruja .store-account-form option {
    background: #120817;
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-account-note,
.storefront-shell.theme-bruja .store-inline-message {
    border-color: rgba(212, 175, 55, .26);
    background: rgba(196, 92, 255, .12);
    color: #f7f0ff;
}

.storefront-shell.theme-bruja .store-address-card,
.storefront-shell.theme-bruja .store-account-documents article,
.storefront-shell.theme-bruja .store-account-shipments article,
.storefront-shell.theme-bruja .storefront-empty {
    border-color: rgba(212, 175, 55, .18);
    background: rgba(255, 255, 255, .055);
    color: #f7f0ff;
}

.storefront-shell.theme-bruja .store-account-documents article,
.storefront-shell.theme-bruja .store-account-shipments article {
    min-height: auto;
}

.storefront-shell.theme-bruja .store-state-chip {
    background: rgba(196, 92, 255, .18);
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-search-cms-results {
    display: grid;
    gap: 16px;
    margin-bottom: 26px;
}

.storefront-shell.theme-bruja .store-search-cms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.storefront-shell.theme-bruja .store-search-cms-card {
    display: grid;
    gap: 10px;
    min-height: 178px;
    padding: 18px;
    border: 1px solid rgba(212, 175, 55, .24);
    border-radius: 10px;
    background:
        radial-gradient(circle at 12% 0%, rgba(196, 92, 255, .22), transparent 16rem),
        linear-gradient(135deg, #1a1022, #0a060f);
    color: #f7f0ff;
    text-decoration: none;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .28);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.storefront-shell.theme-bruja .store-search-cms-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, .68);
    box-shadow: 0 20px 44px rgba(0, 0, 0, .36), 0 0 0 1px rgba(212, 175, 55, .12);
}

.storefront-shell.theme-bruja .store-search-cms-card > span {
    justify-self: start;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(196, 92, 255, .18);
    color: #d4af37;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.storefront-shell.theme-bruja .store-search-cms-card strong {
    color: #ffffff;
    font-size: 1.12rem;
    line-height: 1.25;
}

.storefront-shell.theme-bruja .store-search-cms-card p {
    margin: 0;
    color: #d8c7e8;
    line-height: 1.55;
}

.storefront-shell.theme-bruja .storefront-cms-page {
    color: #f7f0ff;
}

.storefront-shell.theme-bruja .storefront-cms-page p,
.storefront-shell.theme-bruja .storefront-cms-page li {
    color: #e3d7ef;
}

.storefront-shell.theme-bruja .storefront-cms-content,
.storefront-shell.theme-bruja .storefront-cms-content div,
.storefront-shell.theme-bruja .storefront-cms-content p,
.storefront-shell.theme-bruja .storefront-cms-content li,
.storefront-shell.theme-bruja .storefront-cms-content span {
    color: #e3d7ef !important;
    background-color: transparent !important;
}

.storefront-shell.theme-bruja .storefront-cms-content h1,
.storefront-shell.theme-bruja .storefront-cms-content h2,
.storefront-shell.theme-bruja .storefront-cms-content h3,
.storefront-shell.theme-bruja .storefront-cms-content strong {
    color: #fff8d6 !important;
}

.storefront-shell.theme-bruja .storefront-cms-content a {
    color: #d4af37 !important;
}

.storefront-shell.theme-bruja img[src*="logo_negro.svg"] {
    filter: invert(1) brightness(1.45) drop-shadow(0 0 14px rgba(196, 92, 255, .24));
}

@media (max-width: 1180px) {
    .storefront-shell.theme-bruja .storefront-product-grid:not(.store-home-product-grid),
    .storefront-shell.theme-bruja .store-home-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .storefront-shell.theme-bruja .storefront-product-grid:not(.store-home-product-grid),
    .storefront-shell.theme-bruja .store-home-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 2026-06-22: checkout Campos Lorca, registro simple y pago visual Stripe/PayPal. */
.store-register-simple-form {
    max-width: 760px;
    margin-inline: auto;
}

.store-register-simple-form .store-register-block,
.store-register-simple-form .store-register-consent,
.store-register-simple-form .store-checkout-actions,
.store-register-simple-form .store-password-status {
    grid-column: 1 / -1;
}

.store-address-linear-form {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 980px;
}

.store-address-linear-form label {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.store-address-linear-form label.wide {
    grid-template-columns: 150px minmax(0, 1fr);
}

.store-address-linear-form label > input,
.store-address-linear-form label > select,
.store-address-linear-form label > textarea {
    width: 100%;
}

.store-address-linear-form textarea {
    min-height: 96px;
}

.store-payment-methods {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.store-payment-method {
    border-radius: 8px;
    background: #fff;
}

.store-payment-method-logo {
    width: 156px;
    min-width: 156px;
    height: 56px;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, .14);
    background: #fff !important;
    color: #0f172a;
}

.store-payment-logo-stripe {
    display: grid;
    gap: 3px;
    justify-items: center;
    line-height: 1;
}

.store-payment-logo-stripe .stripe-wordmark {
    color: #635bff;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.store-payment-logo-stripe .stripe-cards {
    display: flex;
    gap: 4px;
}

.store-payment-logo-stripe .stripe-cards span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
    background: linear-gradient(180deg, #fff, #edf2f7);
    color: #2563eb;
    font-size: 9px;
    font-weight: 800;
}

.store-payment-logo-paypal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 24px;
    letter-spacing: -.5px;
    line-height: 1;
}

.store-payment-logo-paypal strong:first-child {
    color: #003087;
}

.store-payment-logo-paypal strong:last-child {
    color: #009cde;
}

.store-paypal-later {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 156, 222, .28);
    border-radius: 8px;
    background: #f4fbff;
}

.store-paypal-later small {
    color: #334155;
    font-weight: 600;
}

.store-checkout-actions .store-action-primary,
.store-checkout-actions .store-action-secondary,
.store-account-empty-actions .store-action-primary,
.store-account-empty-actions .store-action-secondary {
    min-width: 170px;
    justify-content: center;
    text-align: center;
}

@media (max-width: 720px) {
    .store-address-linear-form label,
    .store-address-linear-form label.wide {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .store-payment-methods {
        grid-template-columns: 1fr;
    }

    .store-payment-method-logo {
        width: 136px;
        min-width: 136px;
    }
}

.storefront-shell.theme-bruja .store-action-primary,
.storefront-shell.theme-bruja .store-action-secondary,
.storefront-shell.theme-bruja .store-product-card-cta,
.storefront-shell.theme-bruja .store-detail-cart-controls button,
.storefront-shell.theme-bruja .store-detail-cart-controls a,
.storefront-shell.theme-bruja .store-checkout-actions button,
.storefront-shell.theme-bruja .store-checkout-actions a,
.storefront-shell.theme-bruja .store-account-panel-title button,
.storefront-shell.theme-bruja .store-address-card button,
.storefront-shell.theme-bruja .storefront-page-link,
.storefront-shell.theme-bruja .store-inquiry-button {
    border: 1px solid rgba(212, 175, 55, .28) !important;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .12), rgba(196, 92, 255, .94)) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .28);
}

.storefront-shell.theme-bruja .store-action-primary:hover,
.storefront-shell.theme-bruja .store-action-secondary:hover,
.storefront-shell.theme-bruja .store-product-card-cta:hover,
.storefront-shell.theme-bruja .store-detail-cart-controls button:hover,
.storefront-shell.theme-bruja .store-detail-cart-controls a:hover,
.storefront-shell.theme-bruja .store-checkout-actions button:hover,
.storefront-shell.theme-bruja .store-checkout-actions a:hover,
.storefront-shell.theme-bruja .store-account-panel-title button:hover,
.storefront-shell.theme-bruja .store-address-card button:hover,
.storefront-shell.theme-bruja .storefront-page-link:hover,
.storefront-shell.theme-bruja .store-inquiry-button:hover {
    border-color: rgba(212, 175, 55, .72) !important;
    background: radial-gradient(circle at 30% 25%, #fff2ba, #d4af37) !important;
    color: #120817 !important;
    transform: translateY(-1px);
}

.storefront-shell.theme-bruja .store-account-tabs button {
    border-color: rgba(212, 175, 55, .28);
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .08), rgba(196, 92, 255, .72));
    color: #ffffff;
}

.storefront-shell.theme-bruja .store-account-tabs button:hover,
.storefront-shell.theme-bruja .store-account-tabs button.active {
    border-color: rgba(212, 175, 55, .72);
    background: radial-gradient(circle at 30% 25%, #fff2ba, #d4af37);
    color: #120817;
}

.mailing-panel {
    display: grid;
    gap: 18px;
}

.mailing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.mailing-grid label,
.mailing-editor-label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-weight: 700;
}

.mailing-progress {
    display: grid;
    gap: 8px;
}

.mailing-progress > div {
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: #eef2f7;
}

.mailing-progress > div span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #155eef, #12b76a);
    transition: width .2s ease;
}

.mailing-editor {
    min-height: 680px;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    font-size: .92rem;
    line-height: 1.45;
}

.mailing-preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .85fr);
    gap: 18px;
    align-items: start;
}

.mailing-preview-layout section {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.mailing-preview-layout h2 {
    margin: 0;
    font-size: 1rem;
    color: #101828;
}

.mailing-preview {
    width: 100%;
    min-height: 680px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #ffffff;
}

@media (max-width: 1100px) {
    .mailing-grid,
    .mailing-preview-layout {
        grid-template-columns: 1fr;
    }
}

/* Bruja storefront fixes: keep glyphs and mobile menu independent from file encoding. */
.storefront-shell.theme-bruja .storefront-logo-link img,
.storefront-shell.theme-bruja img[src*="logo_blanco.svg"],
.storefront-shell.theme-bruja img[src*="logo_oro.svg"] {
    filter: drop-shadow(0 0 18px rgba(196, 92, 255, .22)) !important;
}

.storefront-shell.theme-bruja img[src*="logo_negro.svg"] {
    filter: invert(1) brightness(1.45) drop-shadow(0 0 14px rgba(196, 92, 255, .24)) !important;
}

.storefront-shell.theme-bruja .storefront-nav > a::before {
    content: "\2726" !important;
}

.storefront-shell.theme-bruja .storefront-nav > a:first-child::before {
    content: "\263D" !important;
}

.storefront-shell.theme-bruja .storefront-mega summary::before {
    content: "\2609" !important;
    flex: 0 0 auto;
}

.storefront-shell.theme-bruja .storefront-mega summary {
    gap: 8px;
    justify-content: flex-start;
}

.storefront-shell.theme-bruja .storefront-mega summary::after {
    content: "+";
    margin-left: auto;
    color: #d4af37;
    font-weight: 900;
}

.storefront-shell.theme-bruja .storefront-mega[open] summary::after {
    content: "-";
}

.storefront-shell.theme-bruja .storefront-catalog-controls {
    align-items: end;
}

.storefront-shell.theme-bruja .catalog-filter-actions button,
.storefront-shell.theme-bruja .catalog-filter-actions a {
    min-height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 720px) {
    .storefront-shell.theme-bruja .storefront-header:not(.menu-open) .storefront-nav {
        display: none !important;
    }

    .storefront-shell.theme-bruja .storefront-nav {
        background: rgba(9, 7, 13, .98);
        border-color: rgba(212, 175, 55, .28);
    }

    .storefront-shell.theme-bruja .storefront-nav > a,
    .storefront-shell.theme-bruja .storefront-mega summary {
        min-height: 46px;
        justify-content: flex-start;
        padding: 0 14px;
        text-align: left;
    }

    .storefront-shell.theme-bruja .storefront-mega {
        width: 100%;
    }

    .storefront-shell.theme-bruja .storefront-mega-panel {
        display: none;
        width: 100%;
        max-height: 58vh;
        margin: 6px 0 10px;
        padding: 12px;
        border: 1px solid rgba(212, 175, 55, .22);
        border-radius: 10px;
        background: rgba(18, 11, 24, .98);
    }

    .storefront-shell.theme-bruja .storefront-mega[open] .storefront-mega-panel {
        display: grid;
    }

    .storefront-shell.theme-bruja .storefront-mega-column h2 a {
        min-height: 44px;
        grid-template-columns: 30px minmax(0, 1fr);
    }
}

.article-list-page .product-grid-stable .dxbl-grid-table > tbody > tr > td,
.article-list-page .product-grid-stable .dxbl-grid-data-row > td {
    height: auto !important;
    min-height: 38px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    vertical-align: top !important;
}

.article-list-page .product-grid-stable .dxbl-grid-table > tbody > tr {
    height: auto !important;
}

/* Cleaning / operaciones: configuration popups need calm business forms, not the ultra-compact ERP grid style. */
.operations-service-popup .dxbl-popup-content {
    max-width: 1080px !important;
    margin: 0 auto !important;
}

.operations-service-popup .dxbl-popup-body {
    padding: 18px !important;
}

.operations-config-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px 18px;
    align-items: start;
    max-width: 880px;
    margin: 0 auto;
}

.operations-service-popup .operations-service-form {
    width: 100%;
    max-width: none;
}

.operations-config-field {
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.operations-config-field > label {
    margin: 0;
    color: #344054;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.25;
}

.operations-config-field > :not(label) {
    min-width: 0;
}

.operations-config-field:has(.dxbl-memo),
.operations-config-field:has(textarea) {
    align-items: start !important;
}

.operations-config-field:has(.dxbl-memo) > label,
.operations-config-field:has(textarea) > label {
    padding-top: 7px;
}

.operations-config-field-main {
    grid-column: 2;
}

.operations-config-field-order {
    grid-column: 1;
    grid-template-columns: 54px 96px;
    justify-content: start;
}

.operations-config-field-full {
    grid-column: 1 / -1;
}

.operations-config-form .dxbl-text-edit,
.operations-config-form .dxbl-spin-edit,
.operations-config-form .dxbl-memo,
.operations-config-form .dxbl-input-group,
.operations-config-form .dxbl-combobox,
.operations-config-form .dxbl-date-edit {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 32px !important;
    border-radius: 3px !important;
    box-sizing: border-box !important;
}

.operations-config-form .dxbl-spin-edit {
    max-width: 140px;
}

.operations-config-form .dxbl-memo,
.operations-config-form .dxbl-memo textarea {
    min-height: 88px !important;
    height: auto !important;
    resize: vertical !important;
}

.operations-config-form .operations-detail-memo,
.operations-config-form .operations-detail-memo textarea {
    min-height: 240px !important;
    height: 240px !important;
    width: 100% !important;
}

.operations-config-form .operations-check-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    min-height: 32px;
}

.operations-config-form .operations-task-editor {
    width: 100%;
    padding: 14px;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    background: #f8fafc;
}

.operations-task-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.operations-task-list-grid {
    min-height: 180px;
}

.work-orders-page .erp-grid,
.operations-service-popup .erp-grid,
.operations-task-list-grid,
.operations-list-page .erp-grid {
    font-size: .96rem !important;
}

.work-orders-page .erp-grid .dxbl-grid-table > tbody > tr > td,
.operations-service-popup .erp-grid .dxbl-grid-table > tbody > tr > td,
.operations-task-list-grid .dxbl-grid-table > tbody > tr > td,
.operations-list-page .erp-grid .dxbl-grid-table > tbody > tr > td {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.operations-task-popup .dxbl-popup-content {
    max-width: 760px !important;
}

.operations-task-popup-form {
    grid-template-columns: 132px minmax(0, 1fr);
    max-width: none;
    width: 100%;
}

.operations-task-popup-form .operations-config-field {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
}

.operations-task-popup-form .operations-config-field-order {
    grid-column: 1;
    max-width: 132px;
}

.operations-task-popup-form .operations-config-field-full {
    grid-column: 1 / -1;
}

.operations-task-popup-form .operations-task-popup-memo,
.operations-task-popup-form .operations-task-popup-memo textarea {
    min-height: 240px !important;
    height: 240px !important;
    width: 100% !important;
}

.operations-config-form .operations-task-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, auto);
    gap: 12px 16px;
    align-items: start;
    margin-bottom: 14px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    background: #fff;
}

.operations-config-form .operations-task-row:last-child {
    margin-bottom: 0;
}

.operations-config-form .operations-check-stack.inline {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-start;
    min-width: 250px;
}

.operations-config-form .operations-task-name,
.operations-config-form .operations-task-description {
    grid-column: 1;
}

.operations-config-form .operations-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.operations-config-field-tasks {
    grid-template-columns: 1fr;
    gap: 8px;
}

.operations-config-field-tasks > label {
    padding-left: 0;
}

.operations-config-field-tasks .operations-task-editor {
    max-width: 100%;
}

.operations-small-popup .operations-config-form,
.operations-simple-form {
    grid-template-columns: 1fr;
    max-width: 560px;
}

.operations-medium-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: 720px;
}

.operations-center-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.operations-medium-form .operations-config-field-main,
.operations-center-form .operations-config-field-main {
    grid-column: span 1;
}

.operations-small-popup .operations-config-field,
.operations-simple-form .operations-config-field {
    grid-template-columns: 126px minmax(0, 1fr);
}

.operations-template-form {
    grid-template-columns: minmax(0, 1fr) 280px;
}

.operations-template-form .operations-config-field:not(.operations-config-field-main):not(.operations-config-field-order):not(.operations-config-field-full) {
    grid-column: span 1;
}

.operations-template-form .operations-config-field:nth-of-type(3),
.operations-template-form .operations-config-field:nth-of-type(4) {
    grid-column: span 1;
}

@media (max-width: 900px) {
    .operations-config-form {
        grid-template-columns: 1fr;
    }

    .operations-config-field,
    .operations-config-field-order {
        grid-column: 1 / -1;
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .operations-config-form .operations-task-row {
        grid-template-columns: 1fr;
    }

    .operations-config-form .operations-check-stack.inline,
    .operations-config-form .operations-task-name,
    .operations-config-form .operations-task-description {
        grid-column: 1;
        grid-row: auto;
    }
}

/* Cleaning / operaciones final sizing pass.
   Keep DevExpress editors compact inside operation forms even when global button/input rules change. */
.operations-service-popup .operations-config-form,
.work-order-popup .work-order-editor {
    --operations-editor-height: 32px;
}

.operations-service-popup .operations-config-form .dxbl-text-edit,
.operations-service-popup .operations-config-form .dxbl-combobox,
.operations-service-popup .operations-config-form .dxbl-spin-edit,
.operations-service-popup .operations-config-form .dxbl-date-edit,
.operations-service-popup .operations-config-form .dxbl-input-group,
.work-order-popup .work-order-editor .dxbl-text-edit,
.work-order-popup .work-order-editor .dxbl-combobox,
.work-order-popup .work-order-editor .dxbl-spin-edit,
.work-order-popup .work-order-editor .dxbl-date-edit,
.work-order-popup .work-order-editor .dxbl-input-group {
    height: var(--operations-editor-height) !important;
    min-height: var(--operations-editor-height) !important;
    max-height: var(--operations-editor-height) !important;
    border-radius: 3px !important;
    box-sizing: border-box !important;
}

.operations-service-popup .operations-config-form .dxbl-text-edit input,
.operations-service-popup .operations-config-form .dxbl-combobox input,
.operations-service-popup .operations-config-form .dxbl-spin-edit input,
.operations-service-popup .operations-config-form .dxbl-date-edit input,
.work-order-popup .work-order-editor .dxbl-text-edit input,
.work-order-popup .work-order-editor .dxbl-combobox input,
.work-order-popup .work-order-editor .dxbl-spin-edit input,
.work-order-popup .work-order-editor .dxbl-date-edit input {
    height: calc(var(--operations-editor-height) - 2px) !important;
    min-height: calc(var(--operations-editor-height) - 2px) !important;
    line-height: 1.2 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.operations-service-popup .operations-config-form .dxbl-edit-btn,
.operations-service-popup .operations-config-form .dxbl-btn,
.operations-service-popup .operations-config-form button,
.work-order-popup .work-order-editor .dxbl-edit-btn,
.work-order-popup .work-order-editor .dxbl-btn,
.work-order-popup .work-order-editor button {
    min-height: var(--operations-editor-height) !important;
    height: var(--operations-editor-height) !important;
    max-height: var(--operations-editor-height) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    align-items: center !important;
    justify-content: center !important;
}

.operations-service-popup .operations-config-form .dxbl-spin-edit .dxbl-edit-btn,
.operations-service-popup .operations-config-form .dxbl-spin-edit button,
.work-order-popup .work-order-editor .dxbl-spin-edit .dxbl-edit-btn,
.work-order-popup .work-order-editor .dxbl-spin-edit button {
    width: 36px !important;
    min-width: 36px !important;
}

.operations-service-popup .operations-config-form .dxbl-memo,
.work-order-popup .work-order-editor .dxbl-memo {
    height: auto !important;
    min-height: 88px !important;
    max-height: none !important;
}

.operations-service-popup .operations-config-form .dxbl-memo textarea,
.work-order-popup .work-order-editor .dxbl-memo textarea {
    height: auto !important;
    min-height: 86px !important;
    line-height: 1.35 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.work-order-popup .work-order-fields .sap-field {
    min-width: 0;
}

.work-order-popup .work-order-fields .sap-field:has(label) .dxbl-combobox,
.work-order-popup .work-order-fields .sap-field:has(label) .dxbl-date-edit {
    max-width: 360px !important;
}

.work-order-popup .work-order-fields .sap-field:has(label) .dxbl-text-edit {
    max-width: 420px !important;
}

.work-order-popup .sap-field-full .dxbl-memo,
.work-order-popup .sap-field-full .dxbl-memo textarea {
    width: 100% !important;
    max-width: 100% !important;
}

.work-order-popup .work-order-notes-main .dxbl-memo,
.work-order-popup .work-order-notes-main .dxbl-memo textarea {
    min-height: 300px !important;
}

.work-order-popup .work-order-template-field .dxbl-combobox,
.work-order-popup .work-order-template-field .dxbl-input-group,
.work-order-popup .work-order-template-field .dxbl-text-edit,
.work-order-popup .work-order-service-field .dxbl-combobox,
.work-order-popup .work-order-service-field .dxbl-input-group,
.work-order-popup .work-order-service-field .dxbl-text-edit,
.work-order-popup .work-order-operator-field .dxbl-combobox,
.work-order-popup .work-order-operator-field .dxbl-input-group,
.work-order-popup .work-order-operator-field .dxbl-text-edit {
    width: 100% !important;
    max-width: 620px !important;
}

.work-order-popup .work-order-template-field {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, .18);
}

.work-order-popup .work-order-template-field > label {
    color: #667085;
}

.operations-service-popup .operations-config-form .operations-task-row,
.work-order-popup .work-order-task-row,
.work-order-popup .work-order-material-row {
    align-items: center !important;
}

.operations-service-popup .operations-config-form .operations-inline-actions .dxbl-btn,
.work-order-popup .work-order-inline-actions .dxbl-btn,
.work-order-popup .section-heading .dxbl-btn,
.work-order-popup .work-order-material-row > .dxbl-btn {
    height: auto !important;
    max-height: none !important;
    min-height: 32px !important;
    padding: 5px 10px !important;
}

.work-order-line-popup .work-order-line-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.work-order-line-popup .work-order-two-fields {
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(120px, 180px);
    gap: 14px;
    align-items: end;
}

.work-order-line-popup .dxbl-memo,
.work-order-line-popup .dxbl-memo textarea {
    min-height: 132px !important;
}

.work-order-lines-grid {
    margin-top: 10px;
}

/* Cleaning / operaciones: unified editor and filter sizing. */
.work-orders-page .master-list-toolbar,
.comercial-list-page .master-list-toolbar {
    align-items: end;
}

.operations-toolbar-date {
    flex: 0 0 156px !important;
    max-width: 156px !important;
}

.operations-toolbar-state {
    flex: 0 0 190px !important;
    max-width: 190px !important;
}

.operations-toolbar-take {
    flex: 0 0 112px !important;
    max-width: 112px !important;
}

.operations-toolbar-date .dxbl-date-edit,
.operations-toolbar-date .dxbl-input-group,
.operations-toolbar-date .dxbl-text-edit,
.operations-toolbar-state .dxbl-combobox,
.operations-toolbar-state .dxbl-input-group,
.operations-toolbar-state .dxbl-text-edit,
.operations-toolbar-take .dxbl-combobox,
.operations-toolbar-take .dxbl-input-group,
.operations-toolbar-take .dxbl-text-edit {
    width: 100% !important;
    min-width: 0 !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border-radius: 3px !important;
}

.operations-toolbar-date input,
.operations-toolbar-state input,
.operations-toolbar-take input {
    height: 30px !important;
    min-height: 30px !important;
    line-height: 1.2 !important;
}

.operations-service-popup .operations-config-form .erp-native-input,
.work-order-popup .work-order-editor .erp-native-input,
.operations-service-popup .operations-config-form .numeric-text-input,
.work-order-popup .work-order-editor .numeric-text-input {
    width: 100% !important;
    height: var(--operations-editor-height) !important;
    min-height: var(--operations-editor-height) !important;
    max-height: var(--operations-editor-height) !important;
    padding: 0 12px !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 3px !important;
    background: #fff !important;
    color: #101828 !important;
    box-sizing: border-box !important;
}

.operations-service-popup .operations-readonly-order {
    background: #f2f4f7 !important;
    color: #475467 !important;
    cursor: default !important;
}

.operations-popup-tabs {
    min-width: 0;
}

.operations-popup-tabs .dxbl-tabs-content-panel,
.operations-popup-tabs .dxbl-tabs-content {
    min-width: 0;
}

.operations-popup-tabs .dxbl-tabs-content-panel {
    padding-top: 14px !important;
}

.work-order-tabs .dxbl-tabs-content-panel {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 8px;
}

.work-order-popup .dxbl-popup-body,
.work-order-popup .dxbl-modal-body {
    overflow: hidden !important;
}

.work-order-task-row {
    grid-template-columns: 150px minmax(280px, .9fr) minmax(360px, 1.1fr) !important;
    align-items: start !important;
}

.work-order-popup .work-order-task-row .dxbl-memo,
.operations-service-popup .operations-task-row .dxbl-memo {
    min-height: 82px !important;
}

.work-order-popup .work-order-task-row .dxbl-memo textarea,
.operations-service-popup .operations-task-row .dxbl-memo textarea {
    min-height: 78px !important;
}

.operations-config-form .operations-task-row {
    grid-template-columns: minmax(0, 1fr) minmax(250px, auto) !important;
    align-items: start !important;
}

.operations-config-form .operations-task-text {
    grid-column: 1;
    width: 100% !important;
}

.operations-tab-task-editor {
    max-width: 920px;
    margin: 0 auto;
}

.operations-config-form .operations-check-stack.inline {
    align-self: center;
}

/* Parte de trabajo: tamano estable y controles coherentes.
   Este bloque va al final para ganar a reglas antiguas de operaciones/DevExpress. */
.work-order-popup {
    --work-order-control-width: 620px;
}

.work-order-popup .dxbl-popup {
    max-height: 90vh !important;
}

.work-order-popup .dxbl-popup-body,
.work-order-popup .dxbl-modal-body {
    height: calc(min(760px, 90vh) - 112px) !important;
    max-height: calc(min(760px, 90vh) - 112px) !important;
    overflow: auto !important;
    background: #f8fafc !important;
}

.work-order-popup .work-order-editor,
.work-order-popup .operations-popup-tabs,
.work-order-popup .work-order-tabs {
    min-height: 100%;
}

.work-order-popup .work-order-tabs .dxbl-tabs-content-panel {
    min-height: 520px !important;
    max-height: none !important;
    overflow: visible !important;
}

.work-order-popup .work-order-fields {
    grid-template-columns: 132px minmax(0, 1fr) !important;
    column-gap: 10px !important;
    row-gap: 12px !important;
    align-items: center !important;
}

.work-order-popup .work-order-fields > .sap-field,
.work-order-popup .work-order-fields > .sap-field-full,
.work-order-popup .work-order-client-field,
.work-order-popup .work-order-center-field,
.work-order-popup .work-order-service-field,
.work-order-popup .work-order-operator-field,
.work-order-popup .work-order-template-field {
    display: grid !important;
    grid-template-columns: 132px minmax(0, var(--work-order-control-width)) !important;
    grid-column: 1 / -1 !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: none !important;
    align-items: center !important;
}

.work-order-popup .work-order-fields > .sap-field > label {
    grid-column: 1 !important;
    margin: 0 !important;
    align-self: center !important;
    text-align: left !important;
    line-height: 32px !important;
}

.work-order-popup .work-order-fields > .sap-field > :not(label) {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: var(--work-order-control-width) !important;
}

.work-order-popup .work-order-fields .dxbl-combobox,
.work-order-popup .work-order-fields .dxbl-date-edit,
.work-order-popup .work-order-fields .dxbl-text-edit,
.work-order-popup .work-order-fields .dxbl-input-group,
.work-order-popup .work-order-fields .dxbl-edit {
    width: 100% !important;
    max-width: var(--work-order-control-width) !important;
}

.work-order-popup .work-order-template-field {
    margin-top: 2px !important;
    padding-top: 8px !important;
}

.work-order-popup .work-order-lines-grid,
.work-order-popup .work-order-lines-grid .dxbl-grid,
.work-order-popup .work-order-lines-grid .dxbl-grid-table {
    font-size: .96rem !important;
}

.work-order-popup .work-order-lines-grid .dxbl-grid-table th,
.work-order-popup .work-order-lines-grid .dxbl-grid-table td {
    font-size: .96rem !important;
    vertical-align: middle !important;
}

.work-order-popup .work-order-lines-grid .grid-icon-actions {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
}

.work-order-popup .work-order-lines-grid .erp-row-icon-btn {
    flex: 0 0 34px !important;
}

.work-order-popup .work-order-notes {
    display: grid !important;
    grid-template-columns: 132px minmax(0, 1fr) !important;
    column-gap: 10px !important;
    row-gap: 14px !important;
}

.work-order-popup .work-order-notes .sap-field {
    display: grid !important;
    grid-template-columns: 132px minmax(0, 1fr) !important;
    grid-column: 1 / -1 !important;
    gap: 10px !important;
    align-items: start !important;
    max-width: none !important;
}

.work-order-popup .work-order-notes .sap-field > label {
    grid-column: 1 !important;
    padding-top: 8px !important;
    line-height: 1.2 !important;
}

.work-order-popup .work-order-notes .sap-field > :not(label) {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
}

.work-order-popup .work-order-observations-memo,
.work-order-popup .work-order-observations-memo .dxbl-memo,
.work-order-popup .work-order-observations-memo textarea,
.work-order-popup .work-order-notes-main .dxbl-memo,
.work-order-popup .work-order-notes-main .dxbl-memo textarea {
    min-height: 300px !important;
    height: 300px !important;
    max-height: 300px !important;
    resize: vertical !important;
}

/* ERP common form layer */
.erp-form {
    --erp-label-width: 118px;
    --erp-field-gap: 10px;
    --erp-control-height: 32px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px 14px;
    align-items: start;
}

.erp-field {
    display: grid;
    grid-template-columns: var(--erp-label-width) minmax(0, 1fr);
    column-gap: var(--erp-field-gap);
    align-items: center;
    grid-column: span 4;
    min-width: 0;
}

.erp-field > label {
    margin: 0;
    color: #344054;
    font-size: .86rem;
    font-weight: 700;
    line-height: var(--erp-control-height);
    text-align: left;
}

.erp-field-top {
    align-items: start;
}

.erp-field-top > label {
    padding-top: 7px;
    line-height: 1.2;
}

.erp-field-control {
    min-width: 0;
}

.erp-field-xs { grid-column: span 2; max-width: 260px; }
.erp-field-short { grid-column: span 3; max-width: 360px; }
.erp-field-medium { grid-column: span 4; max-width: 480px; }
.erp-field-long { grid-column: span 7; max-width: 720px; }
.erp-field-full {
    grid-column: 1 / -1;
    max-width: none;
}

.erp-form .dxbl-text-edit,
.erp-form .dxbl-combobox,
.erp-form .dxbl-date-edit,
.erp-form .dxbl-input-group,
.erp-form .dxbl-edit,
.erp-form .form-control,
.erp-form .erp-native-input {
    min-height: var(--erp-control-height) !important;
    height: var(--erp-control-height) !important;
    max-height: var(--erp-control-height) !important;
    border-radius: 3px !important;
}

.erp-form .dxbl-text-edit input,
.erp-form .dxbl-combobox input,
.erp-form .dxbl-date-edit input,
.erp-form .form-control,
.erp-form .erp-native-input {
    min-height: calc(var(--erp-control-height) - 2px) !important;
    height: calc(var(--erp-control-height) - 2px) !important;
    line-height: 1.2 !important;
}

.erp-form .dxbl-memo,
.erp-form .dxbl-memo textarea,
.erp-form textarea {
    height: auto !important;
    max-height: none !important;
    border-radius: 3px !important;
}

/* Operaciones: parte de trabajo alineado con fichas de clientes/pedidos.
   Esta capa neutraliza los experimentos work-order anteriores sin tocar el resto del ERP. */
.work-order-popup.erp-form-popup .dxbl-popup-body,
.work-order-popup.erp-form-popup .dxbl-modal-body {
    background: #fff !important;
    overflow: auto !important;
}

.work-order-popup.erp-form-popup .work-order-editor {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    min-height: 0 !important;
}

.work-order-popup.erp-form-popup .work-order-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 18px 20px !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    background: #fff !important;
}

.work-order-popup.erp-form-popup .work-order-header-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 8px 12px !important;
    align-items: center !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .sap-field {
    display: grid !important;
    grid-template-columns: var(--pedido-label-width, 88px) minmax(0, 1fr) !important;
    gap: 0 8px !important;
    align-items: center !important;
    min-width: 0 !important;
    min-height: 32px !important;
    max-width: none !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .sap-field > label {
    grid-column: 1 !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 31px !important;
    min-height: 31px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .sap-field > :not(label) {
    grid-column: 2 !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .dxbl-text-edit,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-combobox,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-date-edit,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-edit,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-input-group,
.work-order-popup.erp-form-popup .work-order-header-form .form-control,
.work-order-popup.erp-form-popup .work-order-header-form input {
    width: 100% !important;
    min-width: 0 !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    border-radius: 3px !important;
}

.work-order-popup.erp-form-popup .work-order-client-field { grid-column: 1 / span 6 !important; grid-row: 1 !important; --pedido-label-width: 78px; }
.work-order-popup.erp-form-popup .work-order-center-field { grid-column: 7 / span 6 !important; grid-row: 1 !important; --pedido-label-width: 118px; }
.work-order-popup.erp-form-popup .work-order-template-field { grid-column: 1 / span 6 !important; grid-row: 2 !important; --pedido-label-width: 78px; }
.work-order-popup.erp-form-popup .work-order-incident-field { grid-column: 7 / span 6 !important; grid-row: 2 !important; --pedido-label-width: 118px; }
.work-order-popup.erp-form-popup .work-order-service-field { grid-column: 1 / span 6 !important; grid-row: 3 !important; --pedido-label-width: 78px; }
.work-order-popup.erp-form-popup .work-order-operator-field { grid-column: 7 / span 6 !important; grid-row: 3 !important; --pedido-label-width: 118px; }
.work-order-popup.erp-form-popup .work-order-date-field { grid-column: 1 / span 3 !important; grid-row: 4 !important; --pedido-label-width: 78px; }
.work-order-popup.erp-form-popup .work-order-state-field { grid-column: 4 / span 3 !important; grid-row: 4 !important; --pedido-label-width: 64px; }
.work-order-popup.erp-form-popup .work-order-start-field { grid-column: 7 / span 3 !important; grid-row: 4 !important; --pedido-label-width: 58px; }
.work-order-popup.erp-form-popup .work-order-end-field { grid-column: 10 / span 2 !important; grid-row: 4 !important; --pedido-label-width: 42px; }
.work-order-popup.erp-form-popup .work-order-billed-field { grid-column: 12 / span 1 !important; grid-row: 4 !important; --pedido-label-width: 0px; }
.work-order-popup.erp-form-popup .work-order-billed-field > label { display: none !important; }
.work-order-popup.erp-form-popup .work-order-billed-field .dxbl-checkbox {
    height: 31px !important;
    min-height: 31px !important;
    justify-content: flex-start !important;
}

.work-order-popup.erp-form-popup .work-order-incident-detail-field {
    grid-column: 1 / -1 !important;
    grid-row: 5 !important;
    --pedido-label-width: 118px;
}

.work-order-popup.erp-form-popup .work-order-tabs {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 3px !important;
    min-height: 0 !important;
    background: #fff !important;
}

.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content-panel,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-tabpane {
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
}

.work-order-popup.erp-form-popup [class*="scroll-button"],
.work-order-popup.erp-form-popup [class*="scroll-btn"],
.work-order-popup.erp-form-popup [class*="ScrollButton"],
.work-order-popup.erp-form-popup [class*="ScrollBtn"] {
    display: none !important;
}

.work-order-popup.erp-form-popup .work-order-tab-panel {
    min-height: 0 !important;
    padding: 16px 18px !important;
    border-radius: 3px !important;
    background: #fff !important;
}

.work-order-popup.erp-form-popup .work-order-lines-grid,
.work-order-popup.erp-form-popup .work-order-lines-grid .dxbl-grid,
.work-order-popup.erp-form-popup .work-order-lines-grid .dxbl-grid-container {
    border-radius: 3px !important;
}

.work-order-popup.erp-form-popup .work-order-lines-grid .grid-icon-actions {
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
}

.work-order-popup.erp-form-popup .work-order-observations-box,
.work-order-popup.erp-form-popup .work-order-observations-box .dxbl-memo,
.work-order-popup.erp-form-popup .work-order-observations-box textarea {
    width: 100% !important;
    min-height: 300px !important;
    height: 300px !important;
    max-height: none !important;
}

.erp-grid-actions {
    width: 100%;
    justify-content: center !important;
    flex-wrap: nowrap !important;
}

.operations-service-popup .dxbl-popup-body,
.operations-service-popup .dxbl-modal-body {
    background: #fff !important;
    overflow: auto !important;
}

.operations-service-popup .erp-form.operations-service-form {
    max-width: 960px;
    margin: 0 auto;
    padding: 8px 4px 2px;
}

.operations-service-popup .operations-detail-memo,
.operations-service-popup .operations-detail-memo textarea {
    min-height: 170px !important;
}

.operations-service-popup .operations-task-editor {
    max-width: none;
}

.operations-task-popup .dxbl-popup-body,
.operations-task-popup .dxbl-modal-body {
    background: #fff !important;
}

@media (max-width: 900px) {
    .erp-form {
        grid-template-columns: 1fr;
    }

    .erp-field,
    .erp-field-xs,
    .erp-field-short,
    .erp-field-medium,
    .erp-field-long,
    .erp-field-full {
        grid-column: 1 / -1;
        max-width: none;
    }
}

/* ERP common buttons. Keep action buttons readable and stop form sizing rules from shrinking them. */
.erp-popup.erp-form-popup .popup-actions {
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
}

.erp-popup.erp-form-popup .popup-actions .dxbl-btn {
    min-width: 118px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 16px !important;
    border-radius: 3px !important;
    font-size: .92rem !important;
    font-weight: 700 !important;
}

.erp-popup.erp-form-popup .popup-actions .dxbl-btn.dxbl-btn-primary {
    border-color: #f97316 !important;
    background: #f97316 !important;
    color: #fff !important;
}

.erp-popup.erp-form-popup .popup-actions .dxbl-btn.dxbl-btn-secondary {
    border-color: #d0d5dd !important;
    background: #fff !important;
    color: #344054 !important;
}

.erp-popup.erp-form-popup .operations-task-toolbar .dxbl-btn,
.erp-popup.erp-form-popup .section-heading .dxbl-btn {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 12px !important;
    border-radius: 3px !important;
    border-color: #f97316 !important;
    background: #f97316 !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.erp-popup.erp-form-popup .operations-task-toolbar .dxbl-btn *,
.erp-popup.erp-form-popup .section-heading .dxbl-btn * {
    color: #fff !important;
    fill: #fff !important;
}

.erp-grid-actions .erp-row-icon-btn {
    width: 38px !important;
    min-width: 38px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    border-radius: 3px !important;
    padding: 0 !important;
}

.work-order-popup.erp-form-popup .dxbl-popup-body,
.work-order-popup.erp-form-popup .dxbl-modal-body,
.work-order-line-popup.erp-form-popup .dxbl-popup-body,
.work-order-line-popup.erp-form-popup .dxbl-modal-body {
    background: #fff !important;
}

.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content-panel {
    overflow: visible !important;
}

/* Servicio: formulario clasico en una sola columna. Orden es de sistema, visible y no editable. */
.operations-service-popup .operations-service-form {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 10px !important;
    column-gap: 14px !important;
    max-width: 920px !important;
}

.operations-service-popup .operations-service-form .operations-config-field {
    grid-template-columns: 98px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
}

.operations-service-popup .operations-service-form .operations-config-field-order,
.operations-service-popup .operations-service-form .operations-config-field-main,
.operations-service-popup .operations-service-form .operations-config-field-full {
    grid-column: 1 / -1 !important;
}

.operations-service-popup .operations-service-form .operations-config-field-order {
    grid-template-columns: 98px 96px !important;
    justify-content: start !important;
}

.operations-service-popup .operations-service-form .operations-check-field {
    margin-top: 0 !important;
}

.work-order-material-row {
    align-items: end !important;
}

.popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
}

@media (max-width: 1100px) {
    .work-order-task-row {
        grid-template-columns: 1fr !important;
    }

    .operations-toolbar-date,
    .operations-toolbar-state {
        flex: 1 1 160px !important;
        max-width: none !important;
    }
}

.side-tree {
    display: flex;
    flex-direction: column;
}

.side-tree > .side-group-sales { order: 10; }
.side-tree > .side-group-purchases { order: 20; }
.side-tree > .side-group-stock { order: 30; }
.side-tree > .side-group-operations { order: 40; }
.side-tree > .side-group-store { order: 50; }
.side-tree > a[href="informes"] { order: 60; }
.side-tree > a[href="ia/modulos"] { order: 70; }
.side-tree > .side-group-general { order: 80; }
.side-tree > .side-group-security { order: 90; }

/* Operations final override: the previous operations block was still forcing
   the work-order popup to 760px and the tab content to 520px. */
.work-order-popup.erp-form-popup .dxbl-popup,
.work-order-popup.erp-form-popup .dxbl-modal {
    max-height: 88vh !important;
}

.work-order-popup.erp-form-popup .dxbl-popup-body,
.work-order-popup.erp-form-popup .dxbl-modal-body {
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(88vh - 112px) !important;
    overflow: auto !important;
    background: #fff !important;
}

.work-order-popup.erp-form-popup .work-order-editor,
.work-order-popup.erp-form-popup .operations-popup-tabs,
.work-order-popup.erp-form-popup .work-order-tabs,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content-panel {
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

.work-order-popup.erp-form-popup [class*="scroll-button"],
.work-order-popup.erp-form-popup [class*="scroll-btn"],
.work-order-popup.erp-form-popup [class*="ScrollButton"],
.work-order-popup.erp-form-popup [class*="ScrollBtn"] {
    display: none !important;
}

.work-order-popup.erp-form-popup .work-order-section {
    background: #fff !important;
}

.work-order-popup.erp-form-popup .work-order-observations-box,
.work-order-popup.erp-form-popup .work-order-observations-box .dxbl-memo,
.work-order-popup.erp-form-popup .work-order-observations-box .dxbl-text-edit,
.work-order-popup.erp-form-popup .work-order-observations-box .dxbl-input-group,
.work-order-popup.erp-form-popup .work-order-observations-box textarea {
    width: 100% !important;
    min-height: 300px !important;
    height: 300px !important;
    max-height: 300px !important;
}

.work-order-popup.erp-form-popup .work-order-observations-box textarea {
    line-height: 1.35 !important;
    padding: 10px 12px !important;
    resize: vertical !important;
    white-space: pre-wrap !important;
}

.work-order-popup.erp-form-popup .work-order-lines-grid,
.work-order-popup.erp-form-popup .work-order-lines-grid .dxbl-grid,
.work-order-popup.erp-form-popup .work-order-lines-grid .dxbl-grid-container,
.work-order-popup.erp-form-popup .work-order-lines-grid .dxbl-grid-table,
.erp-grid,
.erp-grid .dxbl-grid,
.erp-grid .dxbl-grid-container,
.erp-grid .dxbl-grid-table {
    border-radius: 3px !important;
}

/* Tabs in ERP popups must not create their own scrollbars/arrows. */
.erp-popup .dxbl-tabs,
.erp-popup .dxbl-tabs-tablist,
.erp-popup .dxbl-tabs-content,
.erp-popup .dxbl-tabs-content-panel,
.sap-tabs,
.sap-tabs .dxbl-tabs,
.sap-tabs .dxbl-tabs-tablist,
.sap-tabs .dxbl-tabs-content,
.sap-tabs .dxbl-tabs-content-panel {
    max-height: none !important;
    overflow: visible !important;
}

.erp-popup .dxbl-tabs-tablist,
.sap-tabs .dxbl-tabs-tablist {
    height: auto !important;
    min-height: 0 !important;
    flex-wrap: wrap !important;
}

.erp-popup [class*="tabs-scroll"],
.erp-popup [class*="TabsScroll"],
.erp-popup [class*="scroll-button"],
.erp-popup [class*="scroll-btn"],
.erp-popup [class*="ScrollButton"],
.erp-popup [class*="ScrollBtn"],
.sap-tabs [class*="tabs-scroll"],
.sap-tabs [class*="TabsScroll"],
.sap-tabs [class*="scroll-button"],
.sap-tabs [class*="scroll-btn"],
.sap-tabs [class*="ScrollButton"],
.sap-tabs [class*="ScrollBtn"] {
    display: none !important;
}

/* ERP Pro baseline: one visual contract for CRUD forms and grids. */
.admin-shell,
.erp-page,
.list-page,
.comercial-list-page {
    --erp-pro-bg: #f3f5f8;
    --erp-pro-panel: #ffffff;
    --erp-pro-line: #cfd6df;
    --erp-pro-line-soft: #e3e7ee;
    --erp-pro-ink: #202938;
    --erp-pro-muted: #667085;
    --erp-pro-input-height: 32px;
    --erp-pro-radius: 3px;
}

.content-area,
.app-main,
.erp-page,
.list-page,
.comercial-list-page {
    background: var(--erp-pro-bg, #f3f5f8) !important;
}

.panel,
.grid-panel,
.article-grid-panel,
.erp-form-card,
.commercial-ficha-card,
.erp-popup .dxbl-popup,
.erp-popup .dxbl-modal {
    border: 1px solid var(--erp-pro-line, #cfd6df) !important;
    border-radius: var(--erp-pro-radius, 3px) !important;
    background: var(--erp-pro-panel, #fff) !important;
    box-shadow: none !important;
}

.erp-popup .dxbl-popup-header,
.erp-popup .dxbl-modal-header {
    min-height: 44px !important;
    border-bottom: 1px solid var(--erp-pro-line, #cfd6df) !important;
    background: #f7f8fa !important;
}

.sap-field,
.erp-field,
.form-field {
    gap: 8px !important;
}

.sap-field > label,
.erp-field > label,
.form-field > label,
.form-field > span,
.list-toolbar label {
    margin: 0 !important;
    color: #344054 !important;
    font-size: .86rem !important;
    font-weight: 700 !important;
    line-height: var(--erp-pro-input-height, 32px) !important;
}

.sap-field .dxbl-text-edit,
.sap-field .dxbl-combobox,
.sap-field .dxbl-date-edit,
.sap-field .dxbl-spin-edit,
.sap-field .dxbl-input-group,
.sap-field .dxbl-edit,
.erp-field .dxbl-text-edit,
.erp-field .dxbl-combobox,
.erp-field .dxbl-date-edit,
.erp-field .dxbl-input-group,
.erp-field .dxbl-edit,
.form-field .dxbl-text-edit,
.form-field .dxbl-combobox,
.form-field .dxbl-date-edit,
.form-field .dxbl-input-group,
.list-toolbar .dxbl-text-edit,
.list-toolbar .dxbl-combobox,
.list-toolbar .dxbl-date-edit,
.form-control,
.erp-native-input {
    min-height: var(--erp-pro-input-height, 32px) !important;
    height: var(--erp-pro-input-height, 32px) !important;
    max-height: var(--erp-pro-input-height, 32px) !important;
    border-color: var(--erp-pro-line, #cfd6df) !important;
    border-radius: var(--erp-pro-radius, 3px) !important;
    background-color: #fff !important;
    color: var(--erp-pro-ink, #202938) !important;
    box-shadow: none !important;
}

.sap-field .dxbl-text-edit input,
.sap-field .dxbl-combobox input,
.sap-field .dxbl-date-edit input,
.erp-field .dxbl-text-edit input,
.erp-field .dxbl-combobox input,
.erp-field .dxbl-date-edit input,
.form-field .dxbl-text-edit input,
.form-field .dxbl-combobox input,
.form-field .dxbl-date-edit input,
.list-toolbar .dxbl-text-edit input,
.list-toolbar .dxbl-combobox input,
.list-toolbar .dxbl-date-edit input,
.form-control,
.erp-native-input {
    min-height: 30px !important;
    height: 30px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    font-size: .92rem !important;
    line-height: 1.2 !important;
}

.sap-field .dxbl-memo,
.sap-field textarea,
.erp-field .dxbl-memo,
.erp-field textarea,
.form-field textarea {
    border-color: var(--erp-pro-line, #cfd6df) !important;
    border-radius: var(--erp-pro-radius, 3px) !important;
    background: #fff !important;
    color: var(--erp-pro-ink, #202938) !important;
    box-shadow: none !important;
}

.mailing-editor-label textarea.form-control.mailing-editor {
    min-height: 680px !important;
    height: 680px !important;
    max-height: none !important;
    resize: vertical !important;
    font-family: Consolas, "Courier New", monospace !important;
    font-size: .92rem !important;
    line-height: 1.45 !important;
}

.erp-grid .dxbl-grid,
.erp-grid-fluid .dxbl-grid,
.erp-grid .dxbl-grid-container,
.erp-grid-fluid .dxbl-grid-container {
    border: 1px solid var(--erp-pro-line, #cfd6df) !important;
    border-radius: var(--erp-pro-radius, 3px) !important;
    background: #fff !important;
    box-shadow: none !important;
}

.erp-grid .dxbl-grid-table th,
.erp-grid-fluid .dxbl-grid-table th {
    background: #eef1f5 !important;
    color: #253044 !important;
    font-size: .91rem !important;
    font-weight: 800 !important;
}

.erp-grid .dxbl-grid-table td,
.erp-grid-fluid .dxbl-grid-table td {
    color: #273244 !important;
    font-size: .91rem !important;
    border-color: var(--erp-pro-line-soft, #e3e7ee) !important;
}

.erp-grid .dxbl-grid-table > tbody > tr:hover > td,
.erp-grid-fluid .dxbl-grid-table > tbody > tr:hover > td {
    background: #f7fafc !important;
}

.dxbl-btn.erp-export-button {
    height: 36px !important;
    min-height: 36px !important;
    border-radius: var(--erp-pro-radius, 3px) !important;
    padding: 0 14px !important;
    color: #fff !important;
    font-weight: 800 !important;
}

.dxbl-btn.erp-export-button *,
.dxbl-btn.erp-export-button .dxbl-btn-caption {
    color: #fff !important;
    fill: #fff !important;
}

.dxbl-btn.erp-export-excel {
    border-color: #16803c !important;
    background: #16803c !important;
}

.dxbl-btn.erp-export-pdf {
    border-color: #c62828 !important;
    background: #c62828 !important;
}

.dxbl-btn.erp-export-excel:hover {
    border-color: #11642f !important;
    background: #11642f !important;
}

.dxbl-btn.erp-export-pdf:hover {
    border-color: #9f1f1f !important;
    background: #9f1f1f !important;
}

/* Operations polish: compact ERP forms, no tab scrollbars, no oversized popups. */
.operations-service-popup.erp-form-popup .dxbl-popup,
.operations-service-popup.erp-form-popup .dxbl-modal,
.operations-template-popup.erp-form-popup .dxbl-popup,
.operations-template-popup.erp-form-popup .dxbl-modal,
.work-order-popup.erp-form-popup .dxbl-popup,
.work-order-popup.erp-form-popup .dxbl-modal {
    width: min(1040px, 96vw) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 88vh !important;
}

.operations-service-popup.erp-form-popup .dxbl-popup-body,
.operations-service-popup.erp-form-popup .dxbl-modal-body,
.operations-template-popup.erp-form-popup .dxbl-popup-body,
.operations-template-popup.erp-form-popup .dxbl-modal-body,
.work-order-popup.erp-form-popup .dxbl-popup-body,
.work-order-popup.erp-form-popup .dxbl-modal-body {
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(88vh - 104px) !important;
    overflow: auto !important;
    background: #fff !important;
}

.erp-popup .dxbl-tabs-content,
.erp-popup .dxbl-tabs-content-panel,
.erp-popup .dxbl-tabs-pane,
.operations-popup-tabs,
.operations-popup-tabs .dxbl-tabs-content,
.operations-popup-tabs .dxbl-tabs-content-panel,
.operations-popup-tabs .dxbl-tabs-pane {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

.erp-popup .dxbl-tabs-tablist {
    padding-right: 0 !important;
}

.erp-popup .dxbl-tabs-tablist::after,
.erp-popup .dxbl-tabs-tablist::before {
    display: none !important;
}

.operations-template-popup .work-order-section,
.work-order-popup .work-order-section {
    margin: 0 !important;
    padding: 18px 18px 20px !important;
    border-radius: 3px !important;
    box-shadow: none !important;
}

.operations-template-popup .operations-template-tasks .section-heading,
.work-order-popup .section-heading {
    align-items: center !important;
    margin-bottom: 14px !important;
}

.operations-template-popup .operations-inline-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin: 0 !important;
    height: 32px !important;
    max-height: 32px !important;
    align-self: center !important;
}

.operations-template-popup .operations-detail-memo,
.operations-template-popup .operations-detail-memo textarea,
.operations-service-popup .operations-detail-memo,
.operations-service-popup .operations-detail-memo textarea {
    min-height: 180px !important;
    height: 180px !important;
}

.operations-task-popup .operations-task-popup-memo,
.operations-task-popup .operations-task-popup-memo textarea,
.work-order-line-popup .dxbl-memo,
.work-order-line-popup .dxbl-memo textarea {
    min-height: 180px !important;
    height: 180px !important;
}

.work-order-popup .work-order-fields {
    grid-template-columns: 145px minmax(0, 560px) !important;
    row-gap: 10px !important;
    column-gap: 8px !important;
}

.work-order-popup .work-order-fields > .sap-field,
.work-order-popup .work-order-fields > .sap-field-full {
    display: grid !important;
    grid-template-columns: subgrid !important;
    grid-column: 1 / -1 !important;
    align-items: center !important;
    max-width: 720px !important;
}

.work-order-popup .work-order-fields > .sap-field > label {
    line-height: 32px !important;
    padding: 0 !important;
    text-align: left !important;
}

.work-order-popup .work-order-fields .dxbl-combobox,
.work-order-popup .work-order-fields .dxbl-date-edit,
.work-order-popup .work-order-fields .dxbl-text-edit,
.work-order-popup .work-order-fields .dxbl-input-group {
    width: 100% !important;
    max-width: 560px !important;
}

.work-order-popup .work-order-fields-compact {
    grid-template-columns: repeat(4, minmax(150px, 190px)) !important;
    align-items: end !important;
    column-gap: 14px !important;
}

.work-order-popup .work-order-fields-compact > .sap-field {
    display: block !important;
    max-width: 190px !important;
}

.work-order-popup .work-order-fields-compact > .sap-field > label {
    display: block !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
}

.work-order-popup .work-order-notes {
    display: block !important;
}

.work-order-popup .work-order-notes .sap-field {
    display: grid !important;
    grid-template-columns: 145px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: start !important;
}

.work-order-popup .work-order-observations-box,
.work-order-popup .work-order-observations-box .dxbl-memo,
.work-order-popup .work-order-observations-box .dxbl-input-group,
.work-order-popup .work-order-observations-box textarea,
.work-order-popup .work-order-observations-memo,
.work-order-popup .work-order-observations-memo textarea {
    min-height: 300px !important;
    height: 300px !important;
    max-height: 300px !important;
}

.work-order-popup .work-order-lines-grid .grid-icon-actions,
.operations-template-popup .work-order-lines-grid .grid-icon-actions {
    justify-content: flex-start !important;
    gap: 6px !important;
}

.work-order-popup .work-order-lines-grid .erp-row-icon-btn,
.operations-template-popup .work-order-lines-grid .erp-row-icon-btn {
    width: 34px !important;
    min-width: 34px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
}

/* Operations canonical layout: fixed order header + detail tabs. */
.work-orders-page {
    background: #f3f5f7;
}

.work-order-popup.erp-form-popup .dxbl-popup-body,
.work-order-popup.erp-form-popup .dxbl-modal-body {
    background: #f3f5f7 !important;
}

.work-order-fixed-header {
    display: block;
    margin-bottom: 12px;
}

.work-order-fixed-header .work-order-section {
    background: #fff !important;
}

.work-order-fixed-header .section-heading {
    margin-bottom: 10px !important;
}

.work-order-fixed-header .section-heading h2,
.work-order-tabs .section-heading h2 {
    margin: 0 !important;
}

.work-order-popup .work-order-main-section .work-order-fields {
    grid-template-columns: 130px minmax(0, 1fr) !important;
    max-width: 980px !important;
}

.work-order-popup .work-order-field-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 12px !important;
    grid-column: 1 / -1 !important;
    max-width: 720px !important;
}

.work-order-popup .work-order-field-row .sap-field {
    display: grid !important;
    grid-template-columns: 130px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
}

.work-order-popup .work-order-field-row .sap-field > label {
    line-height: 32px !important;
    margin: 0 !important;
}

.work-order-popup .work-order-field-row .dxbl-date-edit,
.work-order-popup .work-order-field-row .dxbl-combobox,
.work-order-popup .work-order-field-row .dxbl-input-group {
    width: 100% !important;
    max-width: 220px !important;
}

.work-order-popup .work-order-checks > div {
    display: flex !important;
    gap: 14px !important;
    align-items: center !important;
    min-height: 32px !important;
}

.work-order-popup .work-order-tabs {
    background: #fff;
    border: 1px solid #d8dee6;
    border-radius: 3px;
    padding: 10px 12px 12px;
    min-height: 360px;
}

.work-order-popup .work-order-tabs .dxbl-tabs-content,
.work-order-popup .work-order-tabs .dxbl-tabs-content-panel,
.work-order-popup .work-order-tabs .dxbl-tabs-tabpane {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

.work-order-popup .work-order-tabs .work-order-section {
    border: 0 !important;
    background: #fff !important;
    padding: 14px 0 0 !important;
}

.work-order-popup .work-order-observations-box,
.work-order-popup .work-order-observations-box .dxbl-memo,
.work-order-popup .work-order-observations-box .dxbl-input-group,
.work-order-popup .work-order-observations-box textarea,
.work-order-popup .work-order-observations-memo,
.work-order-popup .work-order-observations-memo textarea {
    min-height: 300px !important;
    height: 300px !important;
}

@media (max-width: 1100px) {
    .work-order-fixed-header {
        grid-template-columns: 1fr;
    }
}

/* Work orders final layout: header fields are fixed document data, tabs only hold detail lines. */
.work-order-popup.erp-form-popup {
    --work-order-label-width: 128px;
    --work-order-control-width: 560px;
}

.work-order-popup.erp-form-popup .dxbl-popup-body,
.work-order-popup.erp-form-popup .dxbl-modal-body {
    background: #fff !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(92vh - 108px) !important;
    overflow: auto !important;
    padding: 18px 20px !important;
}

.work-order-popup.erp-form-popup .work-order-editor,
.work-order-popup.erp-form-popup .work-order-fixed-header,
.work-order-popup.erp-form-popup .work-order-main-section,
.work-order-popup.erp-form-popup .work-order-tabs,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content-panel,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-tabpane {
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

.work-order-popup.erp-form-popup .work-order-fixed-header,
.work-order-popup.erp-form-popup .work-order-main-section {
    display: block !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.work-order-popup.erp-form-popup .work-order-main-section .work-order-fields {
    display: grid !important;
    grid-template-columns: var(--work-order-label-width) minmax(0, var(--work-order-control-width)) !important;
    gap: 9px 10px !important;
    align-items: center !important;
    width: fit-content !important;
    max-width: 100% !important;
}

.work-order-popup.erp-form-popup .work-order-main-section .sap-field {
    display: grid !important;
    grid-template-columns: subgrid !important;
    grid-column: 1 / -1 !important;
    gap: 10px !important;
    align-items: center !important;
    max-width: none !important;
    margin: 0 !important;
}

.work-order-popup.erp-form-popup .work-order-main-section .sap-field > label {
    grid-column: 1 !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 32px !important;
}

.work-order-popup.erp-form-popup .work-order-main-section .sap-field > :not(label) {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: var(--work-order-control-width) !important;
}

.work-order-popup.erp-form-popup .work-order-field-row {
    display: grid !important;
    grid-template-columns: minmax(0, 273px) minmax(0, 273px) !important;
    grid-column: 1 / -1 !important;
    gap: 10px 14px !important;
    width: var(--work-order-control-width) !important;
    max-width: var(--work-order-control-width) !important;
    margin-left: calc(var(--work-order-label-width) + 10px) !important;
}

.work-order-popup.erp-form-popup .work-order-field-row .sap-field {
    grid-template-columns: 62px minmax(0, 1fr) !important;
    grid-column: auto !important;
}

.work-order-popup.erp-form-popup .work-order-field-row .sap-field > :not(label) {
    max-width: none !important;
}

.work-order-popup.erp-form-popup .work-order-checks > div {
    display: flex !important;
    align-items: center !important;
    height: 32px !important;
    gap: 12px !important;
}

.work-order-popup.erp-form-popup .work-order-tabs {
    margin-top: 10px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 3px !important;
    background: #fff !important;
    box-shadow: none !important;
    min-height: 0 !important;
}

.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-tablist {
    flex-wrap: wrap !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content-panel {
    padding: 14px 0 0 !important;
}

.work-order-popup.erp-form-popup .work-order-tab-panel {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
}

.work-order-popup.erp-form-popup .work-order-tab-toolbar {
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    justify-content: flex-start !important;
}

.work-order-popup.erp-form-popup [class*="scroll-button"],
.work-order-popup.erp-form-popup [class*="scroll-btn"],
.work-order-popup.erp-form-popup [class*="ScrollButton"],
.work-order-popup.erp-form-popup [class*="ScrollBtn"] {
    display: none !important;
}

.work-order-popup.erp-form-popup .work-order-observations-box,
.work-order-popup.erp-form-popup .work-order-observations-box .dxbl-memo,
.work-order-popup.erp-form-popup .work-order-observations-box .dxbl-text-edit,
.work-order-popup.erp-form-popup .work-order-observations-box .dxbl-input-group,
.work-order-popup.erp-form-popup .work-order-observations-box textarea {
    min-height: 300px !important;
    height: 300px !important;
}

.work-order-popup.erp-form-popup .work-order-lines-grid,
.work-order-popup.erp-form-popup .work-order-lines-grid .dxbl-grid,
.work-order-popup.erp-form-popup .work-order-lines-grid .dxbl-grid-container,
.work-order-popup.erp-form-popup .work-order-lines-grid .dxbl-grid-table {
    border-radius: 3px !important;
}

@media (max-width: 900px) {
    .work-order-popup.erp-form-popup .work-order-main-section .work-order-fields {
        width: 100% !important;
        grid-template-columns: 1fr !important;
    }

    .work-order-popup.erp-form-popup .work-order-main-section .sap-field,
    .work-order-popup.erp-form-popup .work-order-field-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    .work-order-popup.erp-form-popup .work-order-main-section .sap-field > label,
    .work-order-popup.erp-form-popup .work-order-main-section .sap-field > :not(label),
    .work-order-popup.erp-form-popup .work-order-field-row .sap-field > label,
    .work-order-popup.erp-form-popup .work-order-field-row .sap-field > :not(label) {
        grid-column: 1 !important;
    }
}

/* Work order compact pairs: force real two-column rows for Fecha/Estado and Inicio/Fin. */
.work-order-popup.erp-form-popup .work-order-main-section .work-order-field-row {
    display: grid !important;
    grid-template-columns: 273px 273px !important;
    gap: 10px 14px !important;
    width: 560px !important;
    max-width: 560px !important;
    margin-left: 138px !important;
    align-items: center !important;
}

.work-order-popup.erp-form-popup .work-order-main-section .work-order-field-row > .sap-field {
    display: grid !important;
    grid-template-columns: 62px minmax(0, 1fr) !important;
    grid-column: auto !important;
    width: 273px !important;
    max-width: 273px !important;
    height: 32px !important;
    min-height: 32px !important;
    margin: 0 !important;
    gap: 8px !important;
    align-items: center !important;
}

.work-order-popup.erp-form-popup .work-order-main-section .work-order-field-row > .sap-field > label {
    grid-column: 1 !important;
    line-height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.work-order-popup.erp-form-popup .work-order-main-section .work-order-field-row > .sap-field > :not(label) {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
}

.work-order-popup.erp-form-popup .work-order-main-section .work-order-field-row .dxbl-date-edit,
.work-order-popup.erp-form-popup .work-order-main-section .work-order-field-row .dxbl-combobox,
.work-order-popup.erp-form-popup .work-order-main-section .work-order-field-row .dxbl-input-group {
    width: 100% !important;
    max-width: none !important;
    height: 32px !important;
    min-height: 32px !important;
}

/* FINAL override: partes usa el mismo lenguaje visual que clientes/facturas. */
.work-order-popup.erp-form-popup .dxbl-popup-body,
.work-order-popup.erp-form-popup .dxbl-modal-body {
    background: #fff !important;
    overflow: auto !important;
    padding: 18px 20px !important;
}

.work-order-popup.erp-form-popup .work-order-editor {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    min-height: 0 !important;
}

.work-order-popup.erp-form-popup .work-order-card {
    display: block !important;
    margin: 0 !important;
    padding: 18px 20px !important;
    border-radius: 3px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.work-order-popup.erp-form-popup .work-order-header-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 8px 12px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .sap-field {
    display: grid !important;
    grid-template-columns: var(--pedido-label-width, 82px) minmax(0, 1fr) !important;
    gap: 0 8px !important;
    align-items: center !important;
    min-height: 32px !important;
    max-width: none !important;
    margin: 0 !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .sap-field > label {
    grid-column: 1 !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 31px !important;
    min-height: 31px !important;
    white-space: nowrap !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .sap-field > :not(label) {
    grid-column: 2 !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .dxbl-text-edit,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-combobox,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-date-edit,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-edit,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-input-group {
    width: 100% !important;
    min-width: 0 !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    border-radius: 3px !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .dxbl-btn,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-edit-btn,
.work-order-popup.erp-form-popup .work-order-header-form button {
    min-height: 30px !important;
    height: 30px !important;
    max-height: 30px !important;
}

.work-order-popup.erp-form-popup .work-order-header-form input {
    min-height: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
}

.work-order-popup.erp-form-popup .work-order-client-field { grid-column: 1 / span 6 !important; grid-row: 1 !important; --pedido-label-width: 78px; }
.work-order-popup.erp-form-popup .work-order-center-field { grid-column: 7 / span 6 !important; grid-row: 1 !important; --pedido-label-width: 118px; }
.work-order-popup.erp-form-popup .work-order-template-field { grid-column: 1 / span 6 !important; grid-row: 2 !important; --pedido-label-width: 78px; }
.work-order-popup.erp-form-popup .work-order-incident-field { grid-column: 7 / span 6 !important; grid-row: 2 !important; --pedido-label-width: 118px; }
.work-order-popup.erp-form-popup .work-order-service-field { grid-column: 1 / span 6 !important; grid-row: 3 !important; --pedido-label-width: 78px; }
.work-order-popup.erp-form-popup .work-order-operator-field { grid-column: 7 / span 6 !important; grid-row: 3 !important; --pedido-label-width: 118px; }
.work-order-popup.erp-form-popup .work-order-date-field { grid-column: 1 / span 3 !important; grid-row: 4 !important; --pedido-label-width: 78px; }
.work-order-popup.erp-form-popup .work-order-state-field { grid-column: 4 / span 3 !important; grid-row: 4 !important; --pedido-label-width: 64px; }
.work-order-popup.erp-form-popup .work-order-start-field { grid-column: 7 / span 3 !important; grid-row: 4 !important; --pedido-label-width: 58px; }
.work-order-popup.erp-form-popup .work-order-end-field { grid-column: 10 / span 2 !important; grid-row: 4 !important; --pedido-label-width: 42px; }
.work-order-popup.erp-form-popup .work-order-billed-field { grid-column: 12 / span 1 !important; grid-row: 4 !important; --pedido-label-width: 0px; }
.work-order-popup.erp-form-popup .work-order-billed-field > label { display: none !important; }
.work-order-popup.erp-form-popup .work-order-incident-detail-field { grid-column: 1 / -1 !important; grid-row: 5 !important; --pedido-label-width: 118px; }

.work-order-popup.erp-form-popup .work-order-tabs,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content-panel,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-tabpane {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: #fff !important;
}

.work-order-popup.erp-form-popup .work-order-tab-panel {
    padding: 16px 18px !important;
    border-radius: 3px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.work-order-popup.erp-form-popup [class*="scroll-button"],
.work-order-popup.erp-form-popup [class*="scroll-btn"],
.work-order-popup.erp-form-popup [class*="ScrollButton"],
.work-order-popup.erp-form-popup [class*="ScrollBtn"] {
    display: none !important;
}

.work-order-popup.erp-form-popup .work-order-observations-box,
.work-order-popup.erp-form-popup .work-order-observations-box .dxbl-memo,
.work-order-popup.erp-form-popup .work-order-observations-box textarea {
    width: 100% !important;
    min-height: 300px !important;
    height: 300px !important;
    max-height: none !important;
}

@media (max-width: 980px) {
    .work-order-popup.erp-form-popup .work-order-header-form {
        grid-template-columns: 1fr !important;
    }

    .work-order-popup.erp-form-popup .work-order-header-form .sap-field {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}

/* 2026-06-21: saneamiento final de Partes. Misma lectura que pedidos/clientes, sin scroll en tabs. */
.work-order-popup.erp-form-popup,
.work-order-popup.erp-form-popup .dxbl-popup,
.work-order-popup.erp-form-popup .dxbl-modal {
    width: min(1180px, 96vw) !important;
    height: auto !important;
    max-height: 92vh !important;
}

.work-order-popup.erp-form-popup .dxbl-popup-body,
.work-order-popup.erp-form-popup .dxbl-modal-body {
    background: #fff !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(92vh - 110px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 16px 18px !important;
}

.work-order-popup.erp-form-popup .work-order-editor {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

.work-order-popup.erp-form-popup .work-order-card {
    margin: 0 !important;
    padding: 14px 16px !important;
    border: 1px solid #d8dee6 !important;
    border-radius: 3px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.work-order-popup.erp-form-popup .work-order-header-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 8px 12px !important;
    align-items: center !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .sap-field {
    display: grid !important;
    grid-template-columns: var(--pedido-label-width, 84px) minmax(0, 1fr) !important;
    gap: 0 8px !important;
    align-items: center !important;
    min-height: 32px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 32px !important;
    max-height: 32px !important;
    align-self: center !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .sap-field > label {
    grid-column: 1 !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 32px !important;
    white-space: nowrap !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .sap-field > :not(label) {
    grid-column: 2 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .dxbl-text-edit,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-combobox,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-date-edit,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-edit,
.work-order-popup.erp-form-popup .work-order-header-form .dxbl-input-group {
    width: 100% !important;
    min-width: 0 !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border-radius: 3px !important;
}

.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-client-field { grid-column: 1 / span 6 !important; grid-row: 1 !important; --pedido-label-width: 74px; }
.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-center-field { grid-column: 7 / span 6 !important; grid-row: 1 !important; --pedido-label-width: 116px; }
.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-template-field { grid-column: 1 / span 6 !important; grid-row: 2 !important; --pedido-label-width: 74px; }
.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-incident-field { grid-column: 7 / span 6 !important; grid-row: 2 !important; --pedido-label-width: 116px; }
.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-service-field { grid-column: 1 / span 6 !important; grid-row: 3 !important; --pedido-label-width: 74px; }
.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-operator-field { grid-column: 7 / span 6 !important; grid-row: 3 !important; --pedido-label-width: 116px; }
.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-date-field { grid-column: 1 / span 3 !important; grid-row: 4 !important; --pedido-label-width: 54px; }
.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-state-field { grid-column: 4 / span 3 !important; grid-row: 4 !important; --pedido-label-width: 54px; }
.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-start-field { grid-column: 7 / span 2 !important; grid-row: 4 !important; --pedido-label-width: 46px; }
.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-end-field { grid-column: 9 / span 2 !important; grid-row: 4 !important; --pedido-label-width: 34px; }
.work-order-popup.erp-form-popup .work-order-header-form .sap-field.work-order-billed-field { grid-column: 11 / span 2 !important; grid-row: 4 !important; --pedido-label-width: 0px; }
.work-order-popup.erp-form-popup .work-order-billed-field > label { display: none !important; }
.work-order-popup.erp-form-popup .work-order-billed-field .dxbl-checkbox { min-height: 32px !important; align-items: center !important; }
.work-order-popup.erp-form-popup .work-order-incident-detail-field { grid-column: 1 / -1 !important; grid-row: 5 !important; --pedido-label-width: 116px; }

.work-order-popup.erp-form-popup .work-order-tabs,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content-panel,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-tabpane,
.work-order-popup.erp-form-popup .work-order-tab-panel {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: #fff !important;
}

.work-order-popup.erp-form-popup .work-order-tabs {
    margin-top: 0 !important;
    padding: 0 !important;
    border: 1px solid #d8dee6 !important;
    border-radius: 3px !important;
    box-shadow: none !important;
}

.work-order-popup.erp-form-popup .work-order-tab-panel {
    padding: 14px 16px !important;
    border: 0 !important;
    box-shadow: none !important;
}

.work-order-popup.erp-form-popup [class*="scroll-button"],
.work-order-popup.erp-form-popup [class*="scroll-btn"],
.work-order-popup.erp-form-popup [class*="ScrollButton"],
.work-order-popup.erp-form-popup [class*="ScrollBtn"] {
    display: none !important;
}

.work-order-popup.erp-form-popup .work-order-observations-box,
.work-order-popup.erp-form-popup .work-order-observations-box .dxbl-memo,
.work-order-popup.erp-form-popup .work-order-observations-box .dxbl-input-group,
.work-order-popup.erp-form-popup .work-order-observations-box textarea,
.work-order-popup.erp-form-popup .work-order-observations-memo,
.work-order-popup.erp-form-popup .work-order-observations-memo textarea {
    min-height: 300px !important;
    height: 300px !important;
    width: 100% !important;
    max-height: none !important;
}

.work-order-popup.erp-form-popup .work-order-lines-grid,
.work-order-popup.erp-form-popup .work-order-lines-grid .dxbl-grid,
.work-order-popup.erp-form-popup .work-order-lines-grid .dxbl-grid-container {
    border-radius: 3px !important;
}

@media (max-width: 760px) {
    .work-order-popup.erp-form-popup .work-order-header-form {
        grid-template-columns: 1fr !important;
    }

    .work-order-popup.erp-form-popup .work-order-header-form .sap-field {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}

/* 2026-06-21: altura estable del editor de partes, con Observaciones 300px sin scroll de pestana. */
.work-order-popup.erp-form-popup,
.work-order-popup.erp-form-popup .dxbl-popup,
.work-order-popup.erp-form-popup .dxbl-modal {
    height: min(680px, 96vh) !important;
    max-height: 96vh !important;
}

.work-order-popup.erp-form-popup .dxbl-popup-body,
.work-order-popup.erp-form-popup .dxbl-modal-body {
    height: min(624px, calc(96vh - 66px)) !important;
    max-height: min(624px, calc(96vh - 66px)) !important;
    overflow-y: auto !important;
}

.work-order-popup.erp-form-popup .work-order-tabs,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-content-panel,
.work-order-popup.erp-form-popup .work-order-tabs .dxbl-tabs-tabpane,
.work-order-popup.erp-form-popup .work-order-tab-panel {
    overflow: visible !important;
}

/* 2026-06-22: checkout/cuenta cliente final - controles compactos, lineales y sin codigos internos visibles. */
.storefront-shell:not(.theme-bruja) .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-action-secondary,
.storefront-shell:not(.theme-bruja) .store-address-card button,
.storefront-shell:not(.theme-bruja) .store-address-new {
    width: auto;
    min-width: 150px;
    max-width: 250px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.storefront-shell:not(.theme-bruja) .store-account-empty-actions,
.storefront-shell:not(.theme-bruja) .store-checkout-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.storefront-shell:not(.theme-bruja) .store-account-login-card {
    width: min(520px, 100%);
    margin-inline: auto;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form {
    grid-template-columns: 1fr;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-empty-actions,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-forgot-link {
    justify-content: center;
    text-align: center;
}

.storefront-shell:not(.theme-bruja) .store-account-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.storefront-shell:not(.theme-bruja) .store-account-head,
.storefront-shell:not(.theme-bruja) .store-account-kpis {
    grid-column: 1 / -1;
}

.storefront-shell:not(.theme-bruja) .store-account-tabs {
    grid-column: 1;
    display: grid;
    gap: 8px;
    position: sticky;
    top: 16px;
    align-self: start;
}

.storefront-shell:not(.theme-bruja) .store-account-tabs button {
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 5px;
    justify-content: flex-start;
}

.storefront-shell:not(.theme-bruja) .store-account-panel,
.storefront-shell:not(.theme-bruja) .store-account-grid {
    grid-column: 2;
}

.storefront-shell:not(.theme-bruja) .store-account-form,
.storefront-shell:not(.theme-bruja) .store-address-linear-form {
    grid-template-columns: 1fr;
    gap: 10px;
}

.storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
.storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 38px;
}

.storefront-shell:not(.theme-bruja) .store-account-form .wide,
.storefront-shell:not(.theme-bruja) .store-address-linear-form .wide {
    grid-column: auto;
}

.storefront-shell:not(.theme-bruja) .store-account-form input,
.storefront-shell:not(.theme-bruja) .store-account-form select,
.storefront-shell:not(.theme-bruja) .store-address-linear-form input,
.storefront-shell:not(.theme-bruja) .store-address-linear-form select,
.storefront-shell:not(.theme-bruja) .store-payment-form textarea {
    min-height: 36px;
    border-radius: 5px;
}

.storefront-shell:not(.theme-bruja) .store-account-form textarea,
.storefront-shell:not(.theme-bruja) .store-address-linear-form textarea {
    min-height: 92px;
    border-radius: 5px;
}

.storefront-shell:not(.theme-bruja) .store-account-form .store-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.storefront-shell:not(.theme-bruja) .store-account-form .store-checkout-actions {
    grid-column: auto;
    justify-content: flex-start;
}

.storefront-shell:not(.theme-bruja) .store-address-grid {
    gap: 12px;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.storefront-shell:not(.theme-bruja) .store-payment-method,
.storefront-shell:not(.theme-bruja) .store-payment-method-logo,
.storefront-shell:not(.theme-bruja) .store-paypal-later {
    border-radius: 5px;
}

.storefront-shell:not(.theme-bruja) .store-payment-form .store-checkout-actions .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-payment-form .store-checkout-actions .store-action-secondary {
    width: min(220px, 100%);
}

@media (max-width: 860px) {
    .storefront-shell:not(.theme-bruja) .store-account-shell {
        grid-template-columns: 1fr;
    }

    .storefront-shell:not(.theme-bruja) .store-account-tabs,
    .storefront-shell:not(.theme-bruja) .store-account-panel,
    .storefront-shell:not(.theme-bruja) .store-account-grid {
        grid-column: 1;
    }

    .storefront-shell:not(.theme-bruja) .store-account-tabs {
        position: static;
    }

    .storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
    .storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
        grid-template-columns: 1fr;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods {
        grid-template-columns: 1fr;
    }
}

/* 2026-06-23: checkout cliente final - flujo de cuenta, carrito y pago saneado. */
.storefront-shell:not(.theme-bruja) .store-cart-feedback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid #abefc6;
    border-radius: 5px;
    background: #ecfdf3;
    color: #027a48;
    font-size: .95rem;
    font-weight: 900;
    text-decoration: none;
}

.storefront-shell:not(.theme-bruja) .store-cart-feedback.error {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.storefront-shell:not(.theme-bruja) .store-account-kpis {
    display: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-shell {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 20px;
}

.storefront-shell:not(.theme-bruja) .store-account-panel,
.storefront-shell:not(.theme-bruja) .store-account-grid,
.storefront-shell:not(.theme-bruja) .store-account-grid-single {
    width: 100%;
    min-width: 0;
}

.storefront-shell:not(.theme-bruja) .store-account-tabs {
    padding: 10px;
    border: 1px solid var(--store-line);
    border-radius: 5px;
    background: #fff;
}

.storefront-shell:not(.theme-bruja) .store-account-tabs button {
    border-radius: 5px;
    font-weight: 900;
}

.storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
.storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
    grid-template-columns: 135px minmax(0, 1fr);
    column-gap: 10px;
}

.storefront-shell:not(.theme-bruja) .store-account-form input,
.storefront-shell:not(.theme-bruja) .store-account-form select,
.storefront-shell:not(.theme-bruja) .store-address-linear-form input,
.storefront-shell:not(.theme-bruja) .store-address-linear-form select,
.storefront-shell:not(.theme-bruja) .store-checkout-form input,
.storefront-shell:not(.theme-bruja) .store-checkout-form select,
.storefront-shell:not(.theme-bruja) .store-checkout-form textarea {
    border-radius: 5px;
}

.storefront-shell:not(.theme-bruja) .store-checkout-steps {
    justify-content: flex-start;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

.storefront-shell:not(.theme-bruja) .store-checkout-steps a,
.storefront-shell:not(.theme-bruja) .store-checkout-steps span,
.storefront-shell:not(.theme-bruja) .store-checkout-steps strong {
    min-height: 36px;
    padding: 0 16px;
    border-radius: 5px;
}

.storefront-shell:not(.theme-bruja) .store-checkout-form {
    border-radius: 5px;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
}

.storefront-shell:not(.theme-bruja) .store-payment-method {
    min-height: 112px;
    border-radius: 5px;
}

.storefront-shell:not(.theme-bruja) .store-payment-method-logo {
    width: 116px;
    min-height: 54px;
    border-radius: 5px;
    background: #fff !important;
    color: var(--store-ink);
}

.storefront-shell:not(.theme-bruja) .store-payment-logo-stripe {
    display: grid;
    gap: 4px;
    justify-items: center;
    width: 100%;
    color: #635bff;
    font-family: Arial, sans-serif;
    font-weight: 950;
}

.storefront-shell:not(.theme-bruja) .stripe-wordmark {
    font-size: 1.35rem;
    line-height: 1;
    letter-spacing: -.02em;
}

.storefront-shell:not(.theme-bruja) .stripe-cards {
    display: flex;
    gap: 3px;
}

.storefront-shell:not(.theme-bruja) .stripe-cards span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 17px;
    border: 1px solid #d0d5dd;
    border-radius: 3px;
    background: #f9fafb;
    color: #101828;
    font-size: .55rem;
    font-weight: 950;
}

.storefront-shell:not(.theme-bruja) .store-payment-logo-paypal {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
    font-family: Arial, sans-serif;
    letter-spacing: -.03em;
}

.storefront-shell:not(.theme-bruja) .store-payment-logo-paypal strong:first-child {
    color: #003087;
    font-size: 1.35rem;
}

.storefront-shell:not(.theme-bruja) .store-payment-logo-paypal strong:last-child {
    color: #009cde;
    font-size: 1.35rem;
}

.storefront-shell:not(.theme-bruja) .store-payment-method-text strong {
    font-size: 1.08rem;
}

.storefront-shell:not(.theme-bruja) .store-payment-form .store-checkout-actions {
    justify-content: flex-end;
}

.storefront-shell:not(.theme-bruja) .store-payment-form .store-checkout-actions .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-payment-form .store-checkout-actions .store-action-secondary,
.storefront-shell:not(.theme-bruja) .store-account-empty-actions .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-account-empty-actions .store-action-secondary {
    width: min(220px, 100%);
    border-radius: 5px;
}

.storefront-shell:not(.theme-bruja) .store-address-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

@media (max-width: 860px) {
    .storefront-shell:not(.theme-bruja) .store-account-shell,
    .storefront-shell:not(.theme-bruja) .store-payment-layout {
        grid-template-columns: 1fr;
    }

    .storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
    .storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
        grid-template-columns: 1fr;
        row-gap: 6px;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods {
        grid-template-columns: 1fr;
    }
}

/* 2026-06-23b: Campos Lorca - cuenta, direcciones y pago con layout final y sin paneles estrechos. */
/* 2026-06-23c: cache marker para verificar despliegue de Campos Lorca. */
.storefront-shell:not(.theme-bruja) .store-account-shell {
    display: grid !important;
    grid-template-columns: 250px minmax(0, 1fr) !important;
    gap: 22px !important;
    align-items: start !important;
    width: min(100%, 1760px) !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head {
    grid-column: 1 / -1 !important;
}

.storefront-shell:not(.theme-bruja) .store-account-kpis {
    display: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-tabs {
    grid-column: 1 !important;
    width: 100% !important;
    align-self: start !important;
    justify-self: stretch !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel,
.storefront-shell:not(.theme-bruja) .store-account-grid,
.storefront-shell:not(.theme-bruja) .store-account-grid-single {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    justify-self: stretch !important;
}

.storefront-shell:not(.theme-bruja) .store-account-grid-single {
    display: block !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: min(760px, 100%) !important;
    max-width: 760px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check) {
    display: grid !important;
    grid-template-columns: 150px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    width: 100% !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form input,
.storefront-shell:not(.theme-bruja) .store-account-form select,
.storefront-shell:not(.theme-bruja) .store-account-form textarea,
.storefront-shell:not(.theme-bruja) .store-address-linear-form input,
.storefront-shell:not(.theme-bruja) .store-address-linear-form select,
.storefront-shell:not(.theme-bruja) .store-address-linear-form textarea,
.storefront-shell:not(.theme-bruja) .store-payment-form textarea {
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-account-form .store-action-secondary,
.storefront-shell:not(.theme-bruja) .store-address-linear-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-address-linear-form .store-action-secondary,
.storefront-shell:not(.theme-bruja) .store-payment-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-payment-form .store-action-secondary {
    width: min(220px, 100%) !important;
    max-width: 220px !important;
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-shell {
    display: block !important;
    width: min(100%, 1480px) !important;
    max-width: 1480px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-shell > h1 {
    text-align: left !important;
    margin: 22px 0 26px !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-address-book {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-address-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 12px !important;
}

.storefront-shell:not(.theme-bruja) .store-address-card,
.storefront-shell:not(.theme-bruja) .store-checkout-form,
.storefront-shell:not(.theme-bruja) .store-cart-summary,
.storefront-shell:not(.theme-bruja) .store-payment-method {
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-form.store-address-linear-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
    display: grid !important;
    grid-template-columns: 160px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    width: min(900px, 100%) !important;
}

.storefront-shell:not(.theme-bruja) .store-address-linear-form label.wide {
    width: min(1100px, 100%) !important;
}

.storefront-shell:not(.theme-bruja) .store-address-linear-form .store-checkout-actions {
    justify-content: flex-start !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 330px !important;
    gap: 22px !important;
    align-items: start !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(260px, 1fr)) !important;
    gap: 14px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method {
    min-height: 116px !important;
    padding: 16px 18px !important;
    align-items: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method-logo {
    width: 132px !important;
    min-width: 132px !important;
    min-height: 58px !important;
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-form .store-checkout-actions {
    justify-content: flex-end !important;
}

@media (max-width: 900px) {
    .storefront-shell:not(.theme-bruja) .store-account-shell,
    .storefront-shell:not(.theme-bruja) .store-payment-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-tabs,
    .storefront-shell:not(.theme-bruja) .store-account-panel,
    .storefront-shell:not(.theme-bruja) .store-account-grid,
    .storefront-shell:not(.theme-bruja) .store-account-grid-single {
        grid-column: 1 !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-tabs {
        position: static !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
    .storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods {
        grid-template-columns: 1fr !important;
    }
}

/* 2026-06-23e: Campos Lorca checkout/account final layout. */
.storefront-shell:not(.theme-bruja) .store-checkout-progress {
    display: grid !important;
    grid-template-columns: auto minmax(60px, 1fr) auto minmax(60px, 1fr) auto !important;
    align-items: start !important;
    gap: 14px !important;
    margin: 0 0 34px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-progress a,
.storefront-shell:not(.theme-bruja) .store-checkout-progress strong,
.storefront-shell:not(.theme-bruja) .store-checkout-progress span {
    display: grid !important;
    justify-items: center !important;
    gap: 8px !important;
    color: #98a2b3 !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    min-width: 88px !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-progress span span,
.storefront-shell:not(.theme-bruja) .store-checkout-progress a > span,
.storefront-shell:not(.theme-bruja) .store-checkout-progress strong > span {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #eef2f6 !important;
    color: #667085 !important;
    font-size: .92rem !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-progress em {
    font-style: normal !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-progress i {
    height: 4px !important;
    margin-top: 15px !important;
    border-radius: 99px !important;
    background: #e4e7ec !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-progress .done > span,
.storefront-shell:not(.theme-bruja) .store-checkout-progress .current > span {
    background: var(--store-accent, #23a6d5) !important;
    color: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-progress .done,
.storefront-shell:not(.theme-bruja) .store-checkout-progress .current {
    color: var(--store-ink, #101828) !important;
}

.storefront-shell:not(.theme-bruja) .store-account-contact,
.storefront-shell:not(.theme-bruja) .store-account-kpis,
.storefront-shell:not(.theme-bruja) .store-account-panel-title > span:empty {
    display: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head {
    grid-column: 1 / -1 !important;
    display: block !important;
}

.storefront-shell:not(.theme-bruja) .store-account-shell {
    display: grid !important;
    grid-template-columns: 240px minmax(0, 1fr) !important;
    gap: 22px !important;
    align-items: start !important;
}

.storefront-shell:not(.theme-bruja) .store-account-tabs {
    grid-column: 1 !important;
    display: grid !important;
    gap: 8px !important;
    align-self: start !important;
    padding: 10px !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-account-tabs button {
    min-height: 42px !important;
    width: 100% !important;
    border-radius: 5px !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel,
.storefront-shell:not(.theme-bruja) .store-account-grid,
.storefront-shell:not(.theme-bruja) .store-account-grid-single {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel-title {
    align-items: center !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    max-width: 980px !important;
    margin: 0 auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
.storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
    display: grid !important;
    grid-template-columns: 150px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form input,
.storefront-shell:not(.theme-bruja) .store-account-form select,
.storefront-shell:not(.theme-bruja) .store-address-linear-form input,
.storefront-shell:not(.theme-bruja) .store-address-linear-form select,
.storefront-shell:not(.theme-bruja) .store-checkout-form input,
.storefront-shell:not(.theme-bruja) .store-checkout-form select,
.storefront-shell:not(.theme-bruja) .store-checkout-form textarea {
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-check {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: fit-content !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-check input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form > button,
.storefront-shell:not(.theme-bruja) .store-account-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-account-form .store-action-secondary,
.storefront-shell:not(.theme-bruja) .store-account-form .store-action-success {
    width: min(240px, 100%) !important;
    max-width: 240px !important;
    justify-self: center !important;
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-action-success,
.storefront-shell:not(.theme-bruja) .store-address-new {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: min(240px, 100%) !important;
    min-height: 40px !important;
    border: 1px solid #079455 !important;
    border-radius: 5px !important;
    background: #079455 !important;
    color: #fff !important;
    font-weight: 900 !important;
}

.storefront-shell:not(.theme-bruja) .store-checkout-address-book {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-address-linear-form {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-address-linear-form .store-checkout-actions,
.storefront-shell:not(.theme-bruja) .store-payment-form .store-checkout-actions {
    justify-content: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(240px, 1fr)) !important;
    gap: 14px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 10px !important;
    min-height: 146px !important;
    padding: 18px !important;
    border-radius: 5px !important;
    text-align: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method-logo {
    width: 210px !important;
    max-width: 100% !important;
    min-height: 70px !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-logo-img.stripe {
    display: block !important;
    width: 190px !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-logo-paypal strong {
    font-size: 2rem !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method-text {
    display: grid !important;
    gap: 4px !important;
    justify-items: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method-text strong {
    font-size: 1.05rem !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method-text small {
    color: #667085 !important;
    font-size: .92rem !important;
}

.storefront-shell:not(.theme-bruja) .store-cart-feedback {
    background: #079455 !important;
    border-color: #079455 !important;
    color: #fff !important;
    border-radius: 5px !important;
}

@media (max-width: 900px) {
    .storefront-shell:not(.theme-bruja) .store-checkout-progress {
        grid-template-columns: 1fr 28px 1fr 28px 1fr !important;
        gap: 8px !important;
    }

    .storefront-shell:not(.theme-bruja) .store-checkout-progress a,
    .storefront-shell:not(.theme-bruja) .store-checkout-progress strong,
    .storefront-shell:not(.theme-bruja) .store-checkout-progress span {
        min-width: 0 !important;
        font-size: .82rem !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-shell,
    .storefront-shell:not(.theme-bruja) .store-payment-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-tabs,
    .storefront-shell:not(.theme-bruja) .store-account-panel,
    .storefront-shell:not(.theme-bruja) .store-account-grid,
    .storefront-shell:not(.theme-bruja) .store-account-grid-single {
        grid-column: 1 !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
    .storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods {
        grid-template-columns: 1fr !important;
    }
}

/* 2026-06-23g: override final checkout/cuenta Campos */
.storefront-shell:not(.theme-bruja) .storefront-content,
.storefront-shell:not(.theme-bruja) .store-checkout-shell,
.storefront-shell:not(.theme-bruja) .store-account-shell {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .storefront-content {
    padding-inline: 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head {
    grid-column: 1 / -1 !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head > div:last-child,
.storefront-shell:not(.theme-bruja) .store-account-panel-title span {
    display: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-shell {
    grid-template-columns: 210px minmax(0, 1fr) !important;
    gap: 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel {
    padding: 22px 24px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel > .store-account-form {
    max-width: 640px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
.storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
    grid-template-columns: 150px minmax(0, 1fr) !important;
    gap: 10px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-card {
    max-width: 430px !important;
    margin: 42px auto !important;
    padding: 28px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form {
    max-width: 360px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-login-field,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-inline-message,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-empty-actions,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-forgot-link {
    width: 100% !important;
    max-width: 360px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-login-field input {
    width: 100% !important;
    min-height: 44px !important;
    border-radius: 5px !important;
    text-align: left !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-check {
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-empty-actions {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-action-secondary {
    width: 160px !important;
    max-width: 160px !important;
    min-height: 42px !important;
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-forgot-link {
    display: block !important;
    text-align: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-layout {
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 18px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method {
    display: grid !important;
    grid-template-columns: 26px minmax(0, 1fr) 180px !important;
    align-items: center !important;
    justify-items: stretch !important;
    gap: 14px !important;
    min-height: 94px !important;
    padding: 16px 18px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--store-line) !important;
    border-radius: 0 !important;
    background: #fff !important;
    text-align: left !important;
    box-shadow: none !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method:last-child {
    border-bottom: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method.selected {
    background: #f4fbff !important;
    outline: 2px solid var(--store-primary) !important;
    outline-offset: -2px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-radio {
    display: inline-flex !important;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #98a2b3 !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method.selected .store-payment-radio {
    border-color: #ff6b00 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method.selected .store-payment-radio::after {
    content: "" !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #ff6b00 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method-logo {
    justify-self: end !important;
    width: 170px !important;
    max-width: 170px !important;
    min-height: 56px !important;
    padding: 6px 10px !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-logo-img.stripe {
    width: 150px !important;
    max-height: 44px !important;
    object-fit: contain !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-logo-paypal strong {
    font-size: 1.8rem !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method-text {
    justify-items: start !important;
    text-align: left !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method-text small {
    max-width: 34ch !important;
    color: #475467 !important;
}

.storefront-shell:not(.theme-bruja) .store-address-new {
    background: #079455 !important;
    border-color: #079455 !important;
    color: #fff !important;
}

@media (max-width: 900px) {
    .storefront-shell:not(.theme-bruja) .storefront-content,
    .storefront-shell:not(.theme-bruja) .store-checkout-shell,
    .storefront-shell:not(.theme-bruja) .store-account-shell {
        max-width: 100% !important;
        padding-inline: 14px !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-shell,
    .storefront-shell:not(.theme-bruja) .store-payment-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method {
        grid-template-columns: 24px minmax(0, 1fr) !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method-logo {
        grid-column: 2 !important;
        justify-self: start !important;
        margin-top: 8px !important;
    }
}

/* 2026-06-25: cuenta/checkout centrados; catalogo y categorias siguen full width. */
.storefront-shell:not(.theme-bruja) .store-checkout-shell,
.storefront-shell:not(.theme-bruja) .store-account-shell,
.storefront-shell:not(.theme-bruja) .storefront-content:has(.store-account-login-card),
.storefront-shell:not(.theme-bruja) .storefront-content:has(.store-register-shell) {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .storefront-content {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-account-head > div:last-child,
.storefront-shell:not(.theme-bruja) .store-account-contact,
.storefront-shell:not(.theme-bruja) .store-account-kpis,
.storefront-shell:not(.theme-bruja) .store-account-panel-title span,
.storefront-shell:not(.theme-bruja) .store-company-check {
    display: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-shell {
    display: grid !important;
    grid-template-columns: 210px minmax(0, 1fr) !important;
    gap: 18px !important;
    align-items: start !important;
}

.storefront-shell:not(.theme-bruja) .store-account-tabs {
    grid-column: 1 !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel,
.storefront-shell:not(.theme-bruja) .store-account-grid,
.storefront-shell:not(.theme-bruja) .store-account-grid-single {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
}

.storefront-shell:not(.theme-bruja) .store-account-panel > .store-account-form {
    max-width: 640px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-form label:not(.store-check),
.storefront-shell:not(.theme-bruja) .store-address-linear-form label:not(.store-check) {
    display: grid !important;
    grid-template-columns: 150px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-card {
    max-width: 430px !important;
    margin: 42px auto !important;
    padding: 28px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form {
    max-width: 360px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-login-field,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-inline-message,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-empty-actions,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-forgot-link {
    width: 100% !important;
    max-width: 360px !important;
    margin-inline: auto !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-empty-actions {
    justify-content: center !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-action-primary,
.storefront-shell:not(.theme-bruja) .store-account-login-form .store-action-secondary {
    width: 160px !important;
    max-width: 160px !important;
    border-radius: 5px !important;
}

.storefront-shell:not(.theme-bruja) .store-account-login-form .store-account-forgot-link {
    text-align: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods,
.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method,
.storefront-shell:not(.theme-bruja) .store-payment-methods.store-payment-method-list .store-payment-method {
    display: grid !important;
    grid-template-columns: 26px minmax(0, 1fr) 180px !important;
    align-items: center !important;
    gap: 14px !important;
    min-height: 94px !important;
    padding: 16px 18px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--store-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method:last-child {
    border-bottom: 0 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method.selected {
    background: #f4fbff !important;
    outline: 2px solid var(--store-primary) !important;
    outline-offset: -2px !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-radio {
    display: inline-flex !important;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #98a2b3 !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method.selected .store-payment-radio {
    border-color: #ff6b00 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-method.selected .store-payment-radio::after {
    content: "" !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #ff6b00 !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-logo {
    justify-self: end !important;
    width: 170px !important;
    max-width: 170px !important;
    min-height: 56px !important;
    padding: 6px 10px !important;
    border: 1px solid var(--store-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-logo-img.stripe {
    width: 150px !important;
    max-height: 44px !important;
    object-fit: contain !important;
}

.storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-text {
    display: grid !important;
    gap: 4px !important;
    justify-items: start !important;
    text-align: left !important;
}

.storefront-shell:not(.theme-bruja) .store-address-new {
    background: #079455 !important;
    border-color: #079455 !important;
    color: #fff !important;
}

@media (max-width: 900px) {
    .storefront-shell:not(.theme-bruja) .store-account-shell,
    .storefront-shell:not(.theme-bruja) .store-payment-layout {
        grid-template-columns: 1fr !important;
    }

    .storefront-shell:not(.theme-bruja) .store-account-tabs,
    .storefront-shell:not(.theme-bruja) .store-account-panel,
    .storefront-shell:not(.theme-bruja) .store-account-grid,
    .storefront-shell:not(.theme-bruja) .store-account-grid-single {
        grid-column: 1 !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method {
        grid-template-columns: 24px minmax(0, 1fr) !important;
    }

    .storefront-shell:not(.theme-bruja) .store-payment-methods .store-payment-method-logo {
        grid-column: 2 !important;
        justify-self: start !important;
        margin-top: 8px !important;
    }
}

.clientes-list-page .clientes-action-panel {
    margin-bottom: 8px;
}

.client-modern-page {
    border-radius: 6px !important;
    padding: 14px 16px 16px !important;
}

.client-modern-page .sap-card-title {
    margin-bottom: 10px !important;
}

.client-modern-page .sap-form {
    gap: 12px 22px !important;
    align-items: center !important;
}

.client-modern-page .sap-field {
    display: grid !important;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 6px 12px !important;
    min-width: 250px;
}

.client-modern-page .sap-field > label {
    min-height: 0;
    margin: 0;
    text-align: left !important;
    white-space: normal;
}

.client-modern-page .sap-field-full {
    max-width: none !important;
}

.client-modern-page .sap-field-full > label {
    align-self: start;
    padding-top: 7px;
}

.client-modern-page .sap-field-xs {
    min-width: 230px !important;
}

.client-modern-page .sap-field-short,
.client-modern-page .sap-field-day,
.client-modern-page .sap-field-percent,
.client-modern-page .sap-field-money {
    min-width: 260px !important;
    max-width: 330px !important;
}

.client-modern-page .sap-field-medium {
    min-width: 360px !important;
}

.client-modern-page .sap-field-long {
    min-width: 440px !important;
}

.client-modern-page .sap-field .dxbl-text-edit,
.client-modern-page .sap-field .dxbl-combobox,
.client-modern-page .sap-field .dxbl-date-edit,
.client-modern-page .sap-field .dxbl-edit,
.client-modern-page .sap-field .form-control,
.client-modern-page .sap-field .pro-native-input {
    min-height: 32px !important;
    height: 32px !important;
    border-radius: 3px !important;
}

.client-modern-page .sap-field .dxbl-memo,
.client-modern-page .sap-field textarea {
    min-height: 96px !important;
    height: auto !important;
}

.client-modern-page .sap-discounts-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 330px));
    gap: 12px 22px;
}

.client-modern-page .sap-field-check {
    grid-template-columns: 150px minmax(0, 1fr);
}

.client-modern-page .sap-check-grid {
    gap: 8px 24px;
}

.client-modern-page .sap-section {
    padding-top: 12px !important;
}

.client-modern-page .sap-tabs {
    margin-top: 14px !important;
}

@media (max-width: 820px) {
    .client-modern-page .sap-field,
    .client-modern-page .sap-field-check {
        grid-template-columns: 1fr;
        min-width: 0 !important;
        max-width: none !important;
    }

    .client-modern-page .sap-field > label {
        padding-top: 0;
    }

    .client-modern-page .sap-discounts-row {
        grid-template-columns: 1fr;
    }
}

/* Client ficha final layout: same dense ERP rhythm as commercial documents, without overlapping fields. */
.client-modern-page .client-main-form,
.client-modern-page .client-fiscal-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 8px 16px !important;
    align-items: center !important;
}

.client-modern-page .client-main-form .sap-field,
.client-modern-page .client-fiscal-form .sap-field {
    display: grid !important;
    grid-template-columns: 112px minmax(0, 1fr) !important;
    gap: 0 8px !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 32px !important;
}

.client-modern-page .client-main-form .sap-field > label,
.client-modern-page .client-fiscal-form .sap-field > label {
    text-align: left !important;
    justify-self: stretch !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    line-height: 32px !important;
    white-space: nowrap !important;
}

.client-modern-page .client-main-form .sap-field > :not(label),
.client-modern-page .client-fiscal-form .sap-field > :not(label) {
    min-width: 0 !important;
    width: 100% !important;
}

.client-modern-page .client-main-form .sap-field-code { grid-column: span 3 !important; }
.client-modern-page .client-main-form .sap-field-short { grid-column: span 3 !important; }
.client-modern-page .client-main-form .sap-field-long { grid-column: span 4 !important; }
.client-modern-page .client-main-form .sap-field-full { grid-column: span 6 !important; }

.client-modern-page .client-fiscal-form {
    gap: 10px 0 !important;
}

.client-modern-page .client-fiscal-row {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 10px 20px !important;
    align-items: center !important;
}

.client-modern-page .client-fiscal-form .sap-field-day {
    grid-template-columns: 104px minmax(80px, 1fr) !important;
}

.client-modern-page .client-fiscal-form .sap-field-percent {
    grid-template-columns: 104px minmax(90px, 1fr) !important;
}

.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(1) {
    grid-column: span 3 !important;
}

.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(2) {
    grid-column: span 9 !important;
}

.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(3),
.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(4) {
    grid-column: span 6 !important;
}

.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(1) {
    grid-column: 1 / -1 !important;
}

.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(2),
.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(3),
.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(4) {
    grid-column: span 4 !important;
    max-width: 360px !important;
}

.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(1) {
    grid-column: 1 / -1 !important;
}

.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(2),
.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(3),
.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(4) {
    grid-column: span 4 !important;
}

.client-modern-page .client-fiscal-form .sap-discounts-row {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px 20px !important;
    justify-content: stretch !important;
    padding-top: 10px !important;
    border-top: 1px solid #e3e7ee !important;
}

.client-modern-page .client-fiscal-form .sap-discounts-row .sap-field {
    grid-template-columns: 104px minmax(90px, 160px) !important;
    max-width: 320px !important;
}

.client-modern-page .client-main-form .dxbl-text-edit,
.client-modern-page .client-main-form .dxbl-combobox,
.client-modern-page .client-main-form .dxbl-input-group,
.client-modern-page .client-fiscal-form .dxbl-text-edit,
.client-modern-page .client-fiscal-form .dxbl-combobox,
.client-modern-page .client-fiscal-form .dxbl-date-edit,
.client-modern-page .client-fiscal-form .dxbl-input-group,
.client-modern-page .client-main-form input,
.client-modern-page .client-fiscal-form input {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border-radius: 3px !important;
}

.client-modern-page .client-fiscal-form .numeric-text-input {
    text-align: right !important;
}

.commercials-page .grid-panel {
    padding: 12px !important;
}

.commercial-editor-popup .commercial-form {
    display: block !important;
    padding: 0 !important;
}

.commercial-editor-popup .form-section {
    margin: 0 0 14px !important;
    padding: 16px 16px 18px !important;
    border: 1px solid var(--erp-pro-line, #cfd6df) !important;
    border-radius: 3px !important;
    background: #fff !important;
}

.commercial-editor-popup .form-section:last-child {
    margin-bottom: 0 !important;
}

.commercial-editor-popup .commercial-section-grid {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 10px 18px !important;
    align-items: center !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 8px !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: none !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field > label {
    text-align: left !important;
    line-height: 32px !important;
    white-space: nowrap !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field-full {
    grid-column: 1 / -1 !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field-long {
    grid-column: span 7 !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field-medium {
    grid-column: span 5 !important;
}

.commercial-editor-popup .commercial-conditions-grid .sap-field-code {
    grid-column: span 4 !important;
    max-width: 280px !important;
}

.commercial-editor-popup .commercial-conditions-grid .sap-field-check {
    grid-column: span 4 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.commercial-editor-popup .commercial-conditions-grid .sap-field-check > label {
    min-width: 110px !important;
}

.commercial-editor-popup .popup-actions {
    justify-content: center !important;
}

.commercial-editor-popup .popup-actions .dxbl-btn {
    min-width: 130px !important;
    height: 36px !important;
    border-radius: 3px !important;
}

@media (max-width: 1100px) {
    .client-modern-page .client-main-form .sap-field,
    .client-modern-page .client-fiscal-form .sap-field,
    .client-modern-page .client-main-form .sap-field-code,
    .client-modern-page .client-main-form .sap-field-short,
    .client-modern-page .client-main-form .sap-field-long,
    .client-modern-page .client-main-form .sap-field-full,
    .client-modern-page .client-fiscal-form > .sap-field {
        grid-column: 1 / -1 !important;
    }

    .client-modern-page .client-fiscal-row,
    .client-modern-page .client-fiscal-row-main,
    .client-modern-page .client-fiscal-row-payment,
    .client-modern-page .client-fiscal-row-commercial,
    .client-modern-page .client-fiscal-form .sap-discounts-row {
        grid-template-columns: 1fr !important;
    }

    .commercial-editor-popup .commercial-section-grid,
    .commercial-editor-popup .commercial-section-grid .sap-field,
    .commercial-editor-popup .commercial-section-grid .sap-field-long,
    .commercial-editor-popup .commercial-section-grid .sap-field-medium,
    .commercial-editor-popup .commercial-conditions-grid .sap-field-code,
    .commercial-editor-popup .commercial-conditions-grid .sap-field-check {
        display: grid !important;
        grid-column: 1 / -1 !important;
        grid-template-columns: 1fr !important;
        max-width: none !important;
    }

    .commercial-editor-popup .commercial-section-grid .sap-field > label {
        line-height: 1.2 !important;
        margin-bottom: 4px !important;
    }
}

/* Store account/login/register polish */
.store-login-body .store-login-content {
    padding-top: 34px !important;
    padding-bottom: 44px !important;
}

.store-login-body .store-login-layout {
    max-width: 940px !important;
    align-items: stretch !important;
}

.store-login-body .login-card {
    max-width: 430px !important;
    width: 100% !important;
    margin-inline: auto !important;
    border-radius: 5px !important;
}

/* Cliente ficha: reticula final limpia. La pantalla tiene sitio; priorizamos alineacion y lectura. */
.client-modern-page .client-main-form,
.client-modern-page .client-contact-form,
.client-modern-page .client-risk-form,
.client-modern-page .client-fiscal-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 12px 24px !important;
    align-items: center !important;
}

.client-modern-page .client-main-form .sap-field,
.client-modern-page .client-contact-form .sap-field,
.client-modern-page .client-risk-form .sap-field,
.client-modern-page .client-fiscal-form .sap-field {
    display: grid !important;
    grid-template-columns: 140px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
}

.client-modern-page .client-main-form .sap-field > label,
.client-modern-page .client-contact-form .sap-field > label,
.client-modern-page .client-risk-form .sap-field > label,
.client-modern-page .client-fiscal-form .sap-field > label {
    display: block !important;
    min-width: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #344054 !important;
    font-size: .86rem !important;
    font-weight: 800 !important;
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.client-modern-page .client-main-form .sap-field > :not(label),
.client-modern-page .client-contact-form .sap-field > :not(label),
.client-modern-page .client-risk-form .sap-field > :not(label),
.client-modern-page .client-fiscal-form .sap-field > :not(label) {
    min-width: 0 !important;
    width: 100% !important;
}

.client-modern-page .client-main-form .dxbl-text-edit,
.client-modern-page .client-main-form .dxbl-combobox,
.client-modern-page .client-main-form .dxbl-input-group,
.client-modern-page .client-contact-form input,
.client-modern-page .client-risk-form input,
.client-modern-page .client-fiscal-form input,
.client-modern-page .client-fiscal-form .dxbl-text-edit,
.client-modern-page .client-fiscal-form .dxbl-combobox,
.client-modern-page .client-fiscal-form .dxbl-date-edit,
.client-modern-page .client-fiscal-form .dxbl-input-group {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border-radius: 3px !important;
}

.client-modern-page .client-main-form .sap-field-code {
    grid-column: span 3 !important;
}

.client-modern-page .client-main-form .sap-field-short {
    grid-column: span 3 !important;
}

.client-modern-page .client-main-form .sap-field-long {
    grid-column: span 6 !important;
}

.client-modern-page .client-main-form .sap-field-full {
    grid-column: span 9 !important;
}

.client-modern-page .client-main-form .sap-field-code .dxbl-text-edit {
    max-width: 150px !important;
}

.client-modern-page .client-main-form .sap-field-short .dxbl-text-edit,
.client-modern-page .client-main-form .sap-field-short .dxbl-combobox {
    max-width: 190px !important;
}

.client-modern-page .client-contact-form .sap-field-line {
    grid-column: span 6 !important;
}

.client-modern-page .client-contact-form .sap-field-phone {
    grid-column: span 4 !important;
}

.client-modern-page .client-risk-form .sap-field-money {
    grid-column: span 4 !important;
    max-width: 420px !important;
}

.client-modern-page .client-risk-form .sap-field-money input {
    max-width: 180px !important;
    text-align: right !important;
}

.client-modern-page .client-fiscal-row {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 12px 24px !important;
    align-items: center !important;
}

.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(1) {
    grid-column: span 3 !important;
}

.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(2) {
    grid-column: span 9 !important;
}

.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(3),
.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(4),
.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(1),
.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(1) {
    grid-column: span 6 !important;
}

.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(2),
.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(3),
.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(4),
.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(2),
.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(3),
.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(4) {
    grid-column: span 4 !important;
    max-width: 430px !important;
}

.client-modern-page .client-fiscal-form .sap-field-day input,
.client-modern-page .client-fiscal-form .sap-field-percent input {
    max-width: 160px !important;
    text-align: right !important;
}

.client-modern-page .client-fiscal-form .sap-discounts-row {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px 24px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e3e7ee !important;
}

.client-modern-page .client-fiscal-form .sap-discounts-row .sap-field {
    max-width: 430px !important;
}

.client-modern-page .client-contacts-table {
    table-layout: fixed !important;
}

.client-modern-page .client-contacts-table th,
.client-modern-page .client-contacts-table td {
    vertical-align: middle !important;
}

.client-modern-page .client-contacts-table input {
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 3px !important;
}

@media (max-width: 1100px) {
    .client-modern-page .client-main-form,
    .client-modern-page .client-contact-form,
    .client-modern-page .client-risk-form,
    .client-modern-page .client-fiscal-form,
    .client-modern-page .client-fiscal-row,
    .client-modern-page .client-fiscal-form .sap-discounts-row {
        grid-template-columns: 1fr !important;
    }

    .client-modern-page .client-main-form .sap-field,
    .client-modern-page .client-contact-form .sap-field,
    .client-modern-page .client-risk-form .sap-field,
    .client-modern-page .client-fiscal-form .sap-field,
    .client-modern-page .client-main-form .sap-field-code,
    .client-modern-page .client-main-form .sap-field-short,
    .client-modern-page .client-main-form .sap-field-long,
    .client-modern-page .client-main-form .sap-field-full,
    .client-modern-page .client-contact-form .sap-field-line,
    .client-modern-page .client-contact-form .sap-field-phone,
    .client-modern-page .client-risk-form .sap-field-money,
    .client-modern-page .client-fiscal-row > .sap-field,
    .client-modern-page .client-fiscal-form .sap-discounts-row .sap-field {
        grid-column: 1 / -1 !important;
        max-width: none !important;
    }
}

.store-login-body .login-brand {
    display: none !important;
}

.store-login-body .login-card h1 {
    text-align: center !important;
    margin-bottom: 18px !important;
}

.store-login-body .login-field {
    font-size: 0 !important;
    gap: 0 !important;
}

.store-login-body .login-field input {
    font-size: 15px !important;
    height: 44px !important;
    border-radius: 5px !important;
}

.store-login-body .login-form button,
.store-login-body .store-login-register-card .store-action-primary {
    width: min(100%, 230px) !important;
    min-height: 42px !important;
    align-self: center !important;
    justify-content: center !important;
    border-radius: 5px !important;
}

.store-login-body .login-secondary {
    justify-content: center !important;
    text-align: center !important;
    gap: 12px 18px !important;
}

.store-login-body .login-remember {
    align-items: center !important;
    justify-content: center !important;
}

.store-login-body .store-login-register-card {
    border-radius: 5px !important;
}

.store-register-shell {
    max-width: 760px !important;
    border-radius: 5px !important;
}

.store-register-shell > h1 {
    text-align: center !important;
}

.store-register-simple-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
}

.store-register-simple-form > label:not(.store-check) {
    display: grid !important;
    grid-template-columns: 145px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
}

.store-register-simple-form input {
    border-radius: 5px !important;
    min-height: 42px !important;
}

.store-register-simple-form .store-checkout-actions {
    justify-content: center !important;
    gap: 12px !important;
}

.store-register-simple-form .store-action-primary,
.store-register-simple-form .store-action-secondary {
    width: min(100%, 220px) !important;
    justify-content: center !important;
    border-radius: 5px !important;
}

@media (max-width: 640px) {
    .store-register-simple-form > label:not(.store-check) {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }
}

/* Cliente ficha: ajuste final revisado contra captura. Mas filas limpias, no campos apretados. */
.client-modern-page .client-main-form,
.client-modern-page .client-contact-form,
.client-modern-page .client-risk-form,
.client-modern-page .client-fiscal-form {
    gap: 14px 28px !important;
}

.client-modern-page .client-main-form .sap-field,
.client-modern-page .client-contact-form .sap-field,
.client-modern-page .client-risk-form .sap-field,
.client-modern-page .client-fiscal-form .sap-field {
    grid-template-columns: 132px minmax(0, 1fr) !important;
}

.client-modern-page .client-main-form .client-name-field,
.client-modern-page .client-main-form .client-surname-field {
    grid-column: span 6 !important;
}

.client-modern-page .client-main-form .client-trade-field {
    grid-column: span 8 !important;
}

.client-modern-page .client-main-form .client-tax-field {
    grid-column: span 4 !important;
}

.client-modern-page .client-contact-form .sap-field-line,
.client-modern-page .client-contact-form .sap-field-phone,
.client-modern-page .client-risk-form .sap-field-money {
    grid-column: span 6 !important;
    max-width: none !important;
}

.client-modern-page .client-risk-form .sap-field-money input {
    max-width: 220px !important;
}

.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(1) {
    grid-column: span 3 !important;
}

.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(2) {
    grid-column: span 9 !important;
}

.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(3),
.client-modern-page .client-fiscal-row-main > .sap-field:nth-child(4),
.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(1),
.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(1) {
    grid-column: span 6 !important;
    max-width: none !important;
}

.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(2),
.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(3),
.client-modern-page .client-fiscal-row-payment > .sap-field:nth-child(4),
.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(2),
.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(3),
.client-modern-page .client-fiscal-row-commercial > .sap-field:nth-child(4) {
    grid-column: span 3 !important;
    max-width: none !important;
}

.client-modern-page .client-fiscal-form .sap-field-day input,
.client-modern-page .client-fiscal-form .sap-field-percent input {
    max-width: 150px !important;
}

.client-modern-page .client-fiscal-form .sap-discounts-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px 28px !important;
}

.client-modern-page .client-fiscal-form .sap-discounts-row .sap-field {
    max-width: none !important;
}

.client-page-header h1:focus,
.client-modern-page h1:focus {
    outline: none !important;
}

.commercial-editor-popup .dxbl-popup {
    max-width: 980px !important;
}

.commercial-editor-popup .commercial-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
}

.commercial-editor-popup .form-section {
    padding: 14px 16px !important;
    border: 1px solid #d8dee8 !important;
    border-radius: 3px !important;
    background: #fff !important;
}

.commercial-editor-popup .commercial-section-grid {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 12px 22px !important;
    align-items: center !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field {
    display: grid !important;
    grid-template-columns: 126px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: none !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field > label {
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field-full {
    grid-column: 1 / -1 !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field-half {
    grid-column: span 6 !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field-long {
    grid-column: span 7 !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field-medium {
    grid-column: span 5 !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field-code {
    grid-column: span 4 !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field-check {
    grid-column: span 4 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.commercial-editor-popup .commercial-section-grid input,
.commercial-editor-popup .commercial-section-grid textarea {
    border-radius: 3px !important;
}

.commercial-editor-popup .commercial-notes {
    min-height: 92px !important;
    resize: vertical !important;
}

/* ERP form cleanup: clientes, proveedores y comerciales siguen el criterio visual de pedidos. */
.client-modern-page .client-main-form .sap-field > label,
.client-modern-page .client-contact-form .sap-field > label,
.client-modern-page .client-risk-form .sap-field > label,
.client-modern-page .client-fiscal-form .sap-field > label,
.supplier-modern-page .supplier-main-form .sap-field > label,
.supplier-modern-page .supplier-contact-form .sap-field > label,
.supplier-modern-page .supplier-address-form .sap-field > label,
.commercial-editor-popup .commercial-section-grid .sap-field > label {
    color: #526173 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-align: left !important;
    line-height: 32px !important;
    margin: 0 !important;
}

.supplier-modern-page .supplier-main-form,
.supplier-modern-page .supplier-contact-form,
.supplier-modern-page .supplier-address-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 28px !important;
    align-items: center !important;
}

.supplier-modern-page .supplier-main-form .sap-field,
.supplier-modern-page .supplier-contact-form .sap-field,
.supplier-modern-page .supplier-address-form .sap-field {
    display: grid !important;
    grid-template-columns: 132px minmax(0, 1fr) !important;
    gap: 0 12px !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: none !important;
}

.supplier-modern-page .supplier-main-form .sap-field-code {
    grid-column: span 3 !important;
}

.supplier-modern-page .supplier-name-field,
.supplier-modern-page .supplier-trade-field {
    grid-column: span 6 !important;
}

.supplier-modern-page .supplier-tax-field,
.supplier-modern-page .supplier-main-form .sap-field-check {
    grid-column: span 3 !important;
}

.supplier-modern-page .supplier-contact-form .sap-field-line,
.supplier-modern-page .supplier-contact-form .sap-field-phone,
.supplier-modern-page .supplier-address-form .sap-field-long,
.supplier-modern-page .supplier-address-form .sap-field-medium {
    grid-column: span 6 !important;
}

.supplier-modern-page .supplier-address-form .sap-field-full {
    grid-column: span 8 !important;
}

.supplier-modern-page .supplier-address-form .sap-field-cp,
.supplier-modern-page .supplier-address-form .sap-field-check {
    grid-column: span 3 !important;
}

.supplier-modern-page .dxbl-text-edit,
.supplier-modern-page .dxbl-combobox,
.supplier-modern-page .dxbl-input-group,
.supplier-modern-page input,
.commercial-editor-popup .commercial-section-grid input,
.commercial-editor-popup .commercial-section-grid .dxbl-text-edit,
.commercial-editor-popup .commercial-section-grid .dxbl-combobox,
.commercial-editor-popup .commercial-section-grid .dxbl-input-group {
    min-height: 32px !important;
    height: 32px !important;
    border-radius: 3px !important;
}

.commercial-editor-popup .commercial-form {
    gap: 12px !important;
}

.commercial-editor-popup .commercial-tabs {
    margin-top: 0 !important;
}

.commercial-editor-popup .commercial-tabs .dxbl-tabs-content-panel {
    padding-top: 14px !important;
}

.commercial-editor-popup .form-section {
    padding: 12px 14px !important;
}

.commercial-editor-popup .commercial-main-section {
    padding: 14px 16px !important;
}

.commercial-editor-popup .commercial-main-section .sap-card-title {
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    color: #243044 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.commercial-editor-popup .commercial-section-grid {
    gap: 12px 24px !important;
}

.commercial-editor-popup .commercial-section-grid .sap-field {
    grid-template-columns: 128px minmax(0, 1fr) !important;
}

.commercial-editor-popup .commercial-status-field {
    min-height: 32px !important;
}

.commercial-editor-popup .commercial-status-field .dxbl-checkbox {
    align-items: center !important;
}

.commercial-editor-popup .popup-actions {
    justify-content: center !important;
}

.commercial-editor-popup .popup-actions .dxbl-btn {
    min-width: 132px !important;
    border-radius: 3px !important;
}

.commercial-editor-popup .commercial-inline-actions {
    margin-top: 14px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e3e7ee !important;
    justify-content: center !important;
}

/* Override final: ficha comercial pantalla completa, despues de los estilos globales ERP. */
.commercial-agent-page .commercial-agent-main-form,
.commercial-agent-page .commercial-agent-tab-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 28px !important;
    align-items: center !important;
}

.commercial-agent-page .commercial-agent-main-form {
    padding-bottom: 18px !important;
}

.commercial-agent-page .sap-field {
    display: grid !important;
    grid-template-columns: 132px minmax(0, 1fr) !important;
    gap: 0 12px !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: none !important;
}

.commercial-agent-page .sap-field > label {
    color: #526173 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    margin: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.commercial-agent-page .commercial-agent-name-field,
.commercial-agent-page .commercial-agent-surname-field {
    grid-column: span 6 !important;
}

.commercial-agent-page .commercial-agent-trade-field {
    grid-column: span 7 !important;
}

.commercial-agent-page .commercial-agent-tax-field {
    grid-column: span 5 !important;
}

.commercial-agent-page .commercial-agent-email-field {
    grid-column: span 7 !important;
}

.commercial-agent-page .commercial-agent-phone-field,
.commercial-agent-page .commercial-agent-place-field {
    grid-column: span 6 !important;
}

.commercial-agent-page .commercial-agent-address-field,
.commercial-agent-page .commercial-agent-notes-field {
    grid-column: 1 / -1 !important;
}

.commercial-agent-page .commercial-agent-cp-field,
.commercial-agent-page .commercial-agent-percent-field,
.commercial-agent-page .commercial-agent-order-field,
.commercial-agent-page .commercial-agent-status-field {
    grid-column: span 4 !important;
}

.commercial-agent-page input,
.commercial-agent-page .dxbl-text-edit,
.commercial-agent-page .dxbl-combobox,
.commercial-agent-page .dxbl-input-group {
    min-height: 32px !important;
    height: 32px !important;
    border-radius: 3px !important;
}

.commercial-agent-page textarea {
    min-height: 120px !important;
    border-radius: 3px !important;
    resize: vertical !important;
}

@media (max-width: 1100px) {
    .supplier-modern-page .supplier-main-form,
    .supplier-modern-page .supplier-contact-form,
    .supplier-modern-page .supplier-address-form {
        grid-template-columns: 1fr !important;
    }

    .supplier-modern-page .supplier-main-form .sap-field,
    .supplier-modern-page .supplier-contact-form .sap-field,
    .supplier-modern-page .supplier-address-form .sap-field,
    .supplier-modern-page .supplier-main-form .sap-field-code,
    .supplier-modern-page .supplier-name-field,
    .supplier-modern-page .supplier-trade-field,
    .supplier-modern-page .supplier-tax-field,
    .supplier-modern-page .supplier-main-form .sap-field-check,
    .supplier-modern-page .supplier-contact-form .sap-field-line,
    .supplier-modern-page .supplier-contact-form .sap-field-phone,
    .supplier-modern-page .supplier-address-form .sap-field-long,
    .supplier-modern-page .supplier-address-form .sap-field-medium,
    .supplier-modern-page .supplier-address-form .sap-field-full,
    .supplier-modern-page .supplier-address-form .sap-field-cp,
    .supplier-modern-page .supplier-address-form .sap-field-check {
        grid-column: 1 / -1 !important;
        max-width: none !important;
    }
}

/* Ajuste final 20260626: clientes/proveedores con proporciones tipo pedidos, sin compactar de mas. */
.client-modern-page .client-main-form,
.supplier-modern-page .supplier-main-form,
.supplier-modern-page .supplier-contact-form,
.supplier-modern-page .supplier-address-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 26px !important;
    align-items: center !important;
}

.client-modern-page .client-main-form .sap-field,
.supplier-modern-page .supplier-main-form .sap-field,
.supplier-modern-page .supplier-contact-form .sap-field,
.supplier-modern-page .supplier-address-form .sap-field {
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: none !important;
}

.client-modern-page .client-main-form .sap-field > label,
.supplier-modern-page .supplier-main-form .sap-field > label,
.supplier-modern-page .supplier-contact-form .sap-field > label,
.supplier-modern-page .supplier-address-form .sap-field > label {
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.client-modern-page .client-main-form .sap-field-code {
    grid-column: span 3 !important;
    max-width: 310px !important;
}

.client-modern-page .client-main-form .sap-field-short {
    grid-column: span 3 !important;
    max-width: 330px !important;
}

.client-modern-page .client-main-form .client-name-field,
.client-modern-page .client-main-form .client-surname-field {
    grid-column: span 6 !important;
}

.client-modern-page .client-main-form .client-trade-field {
    grid-column: span 8 !important;
}

.client-modern-page .client-main-form .client-tax-field {
    grid-column: span 4 !important;
    max-width: 420px !important;
}

.supplier-modern-page .supplier-main-form .sap-field-code {
    grid-column: span 3 !important;
    max-width: 310px !important;
}

.supplier-modern-page .supplier-name-field {
    grid-column: span 7 !important;
}

.supplier-modern-page .supplier-trade-field {
    grid-column: span 8 !important;
}

.supplier-modern-page .supplier-tax-field {
    grid-column: span 4 !important;
    max-width: 390px !important;
}

.supplier-modern-page .supplier-main-form .sap-field-check {
    grid-column: span 4 !important;
}

.supplier-modern-page .supplier-contact-form .sap-field-line {
    grid-column: span 7 !important;
}

.supplier-modern-page .supplier-contact-form .sap-field-phone {
    grid-column: span 4 !important;
    max-width: 390px !important;
}

.supplier-modern-page .supplier-address-form .sap-field-full {
    grid-column: 1 / -1 !important;
}

.supplier-modern-page .supplier-address-form .sap-field-long {
    grid-column: span 6 !important;
}

.supplier-modern-page .supplier-address-form .sap-field-medium {
    grid-column: span 4 !important;
}

.supplier-modern-page .supplier-address-form .supplier-country-field,
.supplier-modern-page .supplier-address-form .supplier-province-field {
    grid-column: span 4 !important;
    max-width: 360px !important;
}

.supplier-modern-page .supplier-address-form .supplier-city-field {
    grid-column: span 6 !important;
    max-width: 620px !important;
}

.supplier-modern-page .supplier-address-form .supplier-street-field {
    grid-column: span 8 !important;
    max-width: 860px !important;
}

.supplier-modern-page .supplier-address-form .sap-field-cp {
    grid-column: span 3 !important;
    max-width: 320px !important;
}

.supplier-modern-page .supplier-address-form .sap-field-check {
    grid-column: span 4 !important;
}

.supplier-modern-page .supplier-main-form input,
.supplier-modern-page .supplier-contact-form input,
.supplier-modern-page .supplier-address-form input,
.supplier-modern-page .supplier-main-form .dxbl-text-edit,
.supplier-modern-page .supplier-main-form .dxbl-combobox,
.supplier-modern-page .supplier-main-form .dxbl-input-group,
.supplier-modern-page .supplier-address-form .dxbl-text-edit,
.supplier-modern-page .supplier-address-form .dxbl-combobox,
.supplier-modern-page .supplier-address-form .dxbl-input-group,
.client-modern-page .client-main-form .dxbl-text-edit,
.client-modern-page .client-main-form .dxbl-combobox,
.client-modern-page .client-main-form .dxbl-input-group {
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 3px !important;
}

@media (max-width: 900px) {
    .client-page-header .header-actions,
    .supplier-page-header .header-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        justify-content: flex-start !important;
        align-items: center !important;
        width: 100% !important;
    }

    .client-page-header .header-actions .dxbl-btn,
    .supplier-page-header .header-actions .dxbl-btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        height: 38px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .client-modern-page .client-main-form,
    .supplier-modern-page .supplier-main-form,
    .supplier-modern-page .supplier-contact-form,
    .supplier-modern-page .supplier-address-form {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .client-modern-page .client-main-form .sap-field,
    .supplier-modern-page .supplier-main-form .sap-field,
    .supplier-modern-page .supplier-contact-form .sap-field,
    .supplier-modern-page .supplier-address-form .sap-field {
        grid-column: 1 / -1 !important;
        grid-template-columns: 110px minmax(0, 1fr) !important;
        max-width: none !important;
        width: 100% !important;
    }

    .client-modern-page .client-main-form .sap-field > label,
    .supplier-modern-page .supplier-main-form .sap-field > label,
    .supplier-modern-page .supplier-contact-form .sap-field > label,
    .supplier-modern-page .supplier-address-form .sap-field > label {
        white-space: normal !important;
    }

    .client-modern-page .client-tabs,
    .supplier-modern-page .supplier-tabs {
        min-width: 0 !important;
        overflow-x: auto !important;
    }
}

@media (max-width: 380px) {
    .client-modern-page .client-main-form .sap-field,
    .supplier-modern-page .supplier-main-form .sap-field,
    .supplier-modern-page .supplier-contact-form .sap-field,
    .supplier-modern-page .supplier-address-form .sap-field {
        grid-template-columns: 92px minmax(0, 1fr) !important;
        gap: 0 8px !important;
    }
}

/* 20260626: reglas finales explicitas. Clientes y marcas no deben depender de layouts genericos. */
.client-modern-page .client-main-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 28px !important;
    align-items: center !important;
}

.client-modern-page .client-main-form .sap-field {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    max-width: none !important;
}

.client-modern-page .client-main-form .sap-field > label {
    font-weight: 400 !important;
    text-align: left !important;
    line-height: 32px !important;
    white-space: nowrap !important;
}

.client-modern-page .client-main-form .sap-field-code {
    grid-column: 1 / span 4 !important;
}

.client-modern-page .client-main-form .client-type-field {
    grid-column: 5 / span 4 !important;
}

.client-modern-page .client-main-form .client-name-field {
    grid-column: 1 / span 6 !important;
}

.client-modern-page .client-main-form .client-surname-field {
    grid-column: 7 / span 6 !important;
}

.client-modern-page .client-main-form .client-tax-field {
    grid-column: 1 / span 5 !important;
}

.client-modern-page .client-main-form .client-trade-field {
    grid-column: 1 / span 8 !important;
}

.master-editor-marcas {
    width: min(980px, 96vw) !important;
}

.master-editor-marcas .dxbl-modal-body,
.master-editor-marcas .dxbl-popup-body {
    max-height: none !important;
    overflow: visible !important;
}

.master-editor-marcas .master-editor-card-clean {
    padding: 14px 18px !important;
}

.master-editor-marcas .master-inline-actions {
    display: none !important;
}

.master-editor-marcas .erp-form-note {
    margin-bottom: 10px !important;
}

.master-editor-marcas .master-sap-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 12px 20px !important;
    align-items: center !important;
}

.master-editor-marcas .master-sap-form .sap-field {
    display: grid !important;
    grid-template-columns: 105px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: none !important;
}

.master-editor-marcas .master-sap-form .sap-field > label {
    font-weight: 400 !important;
    text-align: left !important;
    line-height: 32px !important;
    white-space: nowrap !important;
}

.master-editor-marcas .master-field-codigo {
    order: 1 !important;
    grid-column: 1 / span 4 !important;
}

.master-editor-marcas .master-field-nombre {
    order: 2 !important;
    grid-column: 5 / span 8 !important;
}

.master-editor-marcas .master-field-enweb {
    order: 3 !important;
    grid-column: 1 / span 4 !important;
}

.master-editor-marcas .master-field-imagen {
    order: 4 !important;
    grid-column: 1 / -1 !important;
    align-items: start !important;
}

.master-editor-marcas .master-field-comentario {
    order: 5 !important;
    grid-column: 1 / -1 !important;
    align-items: start !important;
    min-height: 128px !important;
}

.master-editor-marcas .master-field-comentario .dxbl-memo,
.master-editor-marcas .master-field-comentario .dxbl-memo-edit,
.master-editor-marcas .master-field-comentario dxbl-input-editor,
.master-editor-marcas .master-field-comentario textarea,
.master-editor-marcas .master-field-comentario .dxbl-memo textarea {
    min-height: 112px !important;
    height: 112px !important;
}

.master-editor-marcas .master-field-enweb .dx-check-line {
    max-width: none !important;
    min-height: 32px !important;
    align-items: center !important;
}

@media (max-width: 720px) {
    .client-modern-page .client-main-form .sap-field-code,
    .client-modern-page .client-main-form .client-type-field,
    .client-modern-page .client-main-form .client-name-field,
    .client-modern-page .client-main-form .client-surname-field,
    .client-modern-page .client-main-form .client-tax-field,
    .client-modern-page .client-main-form .client-trade-field,
    .master-editor-marcas .master-field-codigo,
    .master-editor-marcas .master-field-nombre,
    .master-editor-marcas .master-field-enweb,
    .master-editor-marcas .master-field-imagen,
    .master-editor-marcas .master-field-comentario {
        grid-column: 1 / -1 !important;
    }
}

/* Comerciales: ficha completa con la misma lectura que clientes, sin campos tecnicos visibles. */
.commercial-agent-page .commercial-agent-main-form,
.commercial-agent-page .commercial-agent-tab-form {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 26px !important;
    align-items: center !important;
}

.commercial-agent-page .sap-field {
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    max-width: none !important;
}

.commercial-agent-page .sap-field > label {
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.commercial-agent-page .commercial-agent-code-field,
.commercial-agent-page .commercial-agent-tax-field,
.commercial-agent-page .commercial-agent-cp-field,
.commercial-agent-page .commercial-agent-percent-field,
.commercial-agent-page .commercial-agent-status-field {
    grid-column: span 4 !important;
    max-width: 390px !important;
}

.commercial-agent-page .commercial-agent-name-field,
.commercial-agent-page .commercial-agent-surname-field,
.commercial-agent-page .commercial-agent-phone-field,
.commercial-agent-page .commercial-agent-place-field {
    grid-column: span 6 !important;
}

.commercial-agent-page .commercial-agent-trade-field,
.commercial-agent-page .commercial-agent-email-field {
    grid-column: span 8 !important;
}

.commercial-agent-page .commercial-agent-address-field,
.commercial-agent-page .commercial-agent-notes-field {
    grid-column: 1 / -1 !important;
}

.commercial-agent-page .commercial-agent-notes-field {
    align-items: start !important;
}

.commercial-agent-page .commercial-agent-notes-field > label {
    padding-top: 6px !important;
}

.commercial-agent-page textarea {
    min-height: 180px !important;
    height: 180px !important;
    border-radius: 3px !important;
    resize: vertical !important;
}

/* Marcas: editor en pagina, labels a la izquierda y selector de logo visible. */
.master-inline-editor-page {
    margin-top: 18px !important;
}

.master-inline-editor-page .master-inline-actions {
    justify-content: flex-end !important;
    padding: 10px 0 14px !important;
    border-bottom: 1px solid #e3e7ee !important;
}

.master-inline-editor-page .master-inline-sap-form {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 14px 26px !important;
    align-items: center !important;
    padding-top: 16px !important;
}

.master-inline-editor-page .sap-field {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 0 10px !important;
    align-items: center !important;
    min-width: 0 !important;
}

.master-inline-editor-page .sap-field > label {
    color: #526173 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 32px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.master-inline-editor-page .sap-field-full {
    grid-column: 1 / -1 !important;
}

.master-inline-editor-page .sap-field-medium {
    grid-column: span 6 !important;
}

.master-inline-editor-page .sap-field-check,
.master-inline-editor-page .sap-field-day,
.master-inline-editor-page .sap-field-money {
    grid-column: span 4 !important;
}

.master-inline-editor-page .dxbl-memo,
.master-inline-editor-page textarea {
    min-height: 160px !important;
}

.master-inline-editor-page .media-picker {
    grid-column: auto !important;
    max-width: 760px !important;
}

.master-inline-editor-page .master-inline-footer-actions {
    justify-content: flex-end !important;
    margin-top: 18px !important;
    padding-top: 14px !important;
    border-top: 1px solid #e3e7ee !important;
}

@media (max-width: 900px) {
    .commercial-agent-page .commercial-agent-main-form,
    .commercial-agent-page .commercial-agent-tab-form,
    .master-inline-editor-page .master-inline-sap-form {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .commercial-agent-page .sap-field,
    .commercial-agent-page .commercial-agent-code-field,
    .commercial-agent-page .commercial-agent-tax-field,
    .commercial-agent-page .commercial-agent-name-field,
    .commercial-agent-page .commercial-agent-surname-field,
    .commercial-agent-page .commercial-agent-trade-field,
    .commercial-agent-page .commercial-agent-email-field,
    .commercial-agent-page .commercial-agent-phone-field,
    .commercial-agent-page .commercial-agent-place-field,
    .commercial-agent-page .commercial-agent-address-field,
    .commercial-agent-page .commercial-agent-notes-field,
    .commercial-agent-page .commercial-agent-cp-field,
    .commercial-agent-page .commercial-agent-percent-field,
    .commercial-agent-page .commercial-agent-status-field,
    .master-inline-editor-page .sap-field,
    .master-inline-editor-page .sap-field-full,
    .master-inline-editor-page .sap-field-medium,
    .master-inline-editor-page .sap-field-check,
    .master-inline-editor-page .sap-field-day,
    .master-inline-editor-page .sap-field-money {
        grid-column: 1 / -1 !important;
        max-width: none !important;
        width: 100% !important;
    }
}
