/* --- ConsultaPrecios.razor.css --- */
/* ConsultaPrecios.razor.css */

.consulta-precios-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1rem;
    max-width: 100%;
    margin: 0 auto;
    animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HEADER */
.page-header-card-compact {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(17, 17, 17, 0.02);
}

.page-header-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header-icon-mini {
    font-size: 1.5rem;
    color: #10b981; /* Verde esmeralda para precios */
}

.page-header-title-wrapper h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
    letter-spacing: -0.02em;
}

/* BÚSQUEDA Y FILTROS */
.search-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    box-shadow: 0 4px 12px rgba(17, 17, 17, 0.02);
}

.search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
}

.input-modern {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    color: #1f2937;
    background-color: #f9fafb;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.input-modern:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.btn-consultar {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-consultar:hover:not(:disabled) {
    background: #1f2937;
    transform: translateY(-1px);
}

.btn-consultar:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-toggle-settings {
    background: #ffffff;
    color: #4b5563;
    border: 1px solid #d1d5db;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-toggle-settings:hover {
    background: #f3f4f6;
    color: #111827;
}

.btn-toggle-settings.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

/* SETTINGS MODAL */
.settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.settings-modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.settings-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: #111827;
}

.settings-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-modal-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-modal-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

.select-modern {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1f2937;
    background-color: #f9fafb;
    box-sizing: border-box;
}

.settings-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.btn-action-primary {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    width: 100%;
}

.btn-action-primary:hover {
    background: #2563eb;
}

/* PRODUCT GRID */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* PRODUCT CARD */
.product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.product-code-badge {
    background: #f3f4f6;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.025em;
}

.product-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-status.inactive {
    color: #ef4444;
}

.product-desc {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-radius: 8px;
    padding: 0.75rem;
}

.info-col {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.info-label {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
}

.text-danger {
    color: #ef4444 !important;
}

/* MULTI-PRICE DISPLAY ZONE */
.price-zone {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px dashed #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
}

.prices-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
    width: 100%;
}

.price-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 65px;
}

.price-pill-label {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 2px;
}

.price-pill-amount {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

/* EMPTY STATE & LOADING */
.empty-state-card {
    background: #ffffff;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #6b7280;
    text-align: center;
    margin-top: 1rem;
}

.empty-state-card i {
    font-size: 2.5rem;
    color: #9ca3af;
}

.empty-state-card p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

/* MEDIA QUERIES - COMPACT MOBILE VIEW */
@media (max-width: 640px) {
    .consulta-precios-page {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-consultar, .btn-toggle-settings {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* COMPACT CARD */
    .product-card {
        padding: 0.85rem;
        gap: 0.65rem;
    }
    
    .product-desc {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
    }
    
    .price-pill-amount {
        font-size: 1.05rem;
    }
    
    .price-pill {
        padding: 0.25rem 0.5rem;
        min-width: 60px;
    }
}


/* --- Facturacion.razor.css --- */
.pos-page {
    height: calc(100svh - 4.5rem);
    background: #f5f6f8;
    color: #111827;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 14px;
    padding: 0.8rem 1rem;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
    margin-bottom: 1rem;
}

.pos-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.pos-brand__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #101828;
    color: #fff;
    flex: 0 0 auto;
}

.pos-brand h1 {
    font-size: 1.1rem;
    line-height: 1.15;
    margin: 0;
    font-weight: 850;
    letter-spacing: 0;
}

.pos-brand p {
    margin: 0.2rem 0 0;
    color: #667085;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pos-icon-btn,
.pos-tool-btn,
.pos-secondary-btn {
    border: 1px solid #d8dee8;
    background: #fff;
    color: #111827;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 750;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pos-icon-btn {
    width: 42px;
    padding: 0;
}

.pos-tool-btn,
.pos-secondary-btn {
    padding: 0 0.9rem;
}

.pos-icon-btn:active,
.pos-tool-btn:active,
.pos-secondary-btn:active,
.pos-emit-btn:active,
.pos-payments button:active,
.pos-segment button:active {
    transform: translateY(1px);
}

.pos-workspace {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
    gap: 1rem;
}

.pos-sale,
.pos-panel {
    min-width: 0;
}

.pos-sale {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 0;
    overflow: hidden;
}

.pos-panel {
    align-self: end;
    min-height: 0;
    position: sticky;
    bottom: 1rem;
    z-index: 20;
}

.pos-scanbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
}

.pos-input-wrap {
    position: relative;
    min-height: 52px;
}

.pos-input-wrap > i:first-child {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #667085;
    pointer-events: none;
}

.pos-input,
.pos-plain-input,
.pos-inline-input input,
.pos-field select {
    width: 100%;
    border: 1px solid #d8dee8;
    background: #fff;
    color: #101828;
    border-radius: 12px;
    min-height: 52px;
    font: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.pos-input {
    padding: 0 3rem;
    height: 52px;
    font-weight: 650;
}

.pos-plain-input,
.pos-field select {
    padding: 0 0.9rem;
}

.pos-input:focus,
.pos-plain-input:focus,
.pos-inline-input input:focus,
.pos-field select:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.pos-input-spinner {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #0f766e;
}

.pos-cart {
    flex: 1;
    min-height: 0;
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pos-cart__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #edf0f5;
}

.pos-cart__head strong {
    font-size: 0.95rem;
}

.pos-cart__head button {
    border: 0;
    background: transparent;
    color: #b42318;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pos-items {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    overflow-y: auto;
}

.pos-item {
    border: 1px solid #edf0f5;
    border-radius: 10px;
    background: #fff;
    padding: 0.55rem 0.65rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.pos-item__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.pos-item__main span {
    color: #667085;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.7rem;
}

.pos-item__main strong {
    font-size: 0.9rem;
    line-height: 1.15;
}

.pos-item__main small,
.pos-item__side small {
    color: #667085;
    font-size: 0.72rem;
}

.pos-item__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.18rem;
    text-align: right;
}

.pos-item__side > strong {
    font-size: 0.92rem;
}

.pos-qty-static {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pos-qty-static span {
    font-size: 0.76rem;
    font-weight: 700;
    color: #475467;
    background: #f2f4f7;
    padding: 0.16rem 0.42rem;
    border-radius: 7px;
}

.pos-delete-btn {
    border: 1px solid #fecdca;
    background: #fffbfa;
    color: #b42318;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.pos-delete-btn:hover:not(:disabled) {
    background: #fdf2f2;
    border-color: #fda29b;
}

.pos-delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pos-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #667085;
    padding: 2rem 2rem 3rem;
}

.pos-empty span {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #eef6f5;
    color: #0f766e;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.pos-empty h2 {
    color: #101828;
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
}

.pos-empty p {
    margin: 0;
    max-width: 320px;
}

.pos-card,
.pos-summary {
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 14px;
    padding: 0.9rem;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.pos-card__title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.pos-card__title span {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #f2f4f7;
    color: #344054;
}

.pos-card__title strong {
    font-size: 0.95rem;
}

.pos-card--modal {
    box-shadow: none;
    margin-bottom: 0;
}

.pos-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    background: #f2f4f7;
    padding: 0.25rem;
    border-radius: 11px;
    margin-bottom: 0.75rem;
}

.pos-segment button {
    border: 0;
    border-radius: 9px;
    min-height: 40px;
    background: transparent;
    color: #475467;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.pos-segment button.is-active {
    background: #fff;
    color: #101828;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
}

.pos-segment--soft button.is-active {
    color: #0f766e;
}

.pos-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.65rem;
    margin-bottom: 0.5rem;
}

.pos-field label {
    color: #475467;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pos-inline-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 0.45rem;
}

.pos-inline-input input {
    padding: 0 0.9rem;
}

.pos-inline-input button {
    border: 0;
    border-radius: 12px;
    background: #0f766e;
    color: #fff;
    cursor: pointer;
}

.pos-customer {
    background: #f8fafc;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.75rem;
}

.pos-customer span,
.pos-customer small {
    color: #667085;
    font-size: 0.82rem;
}

.pos-customer strong {
    font-size: 0.92rem;
    line-height: 1.25;
}

.pos-customer--compact {
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    margin-top: 0.6rem;
    background: #f6f8fb;
}

.pos-payments {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.pos-payment {
    border: 1px solid #d8dee8;
    background: #fff;
    border-radius: 11px;
    min-height: 52px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    color: #344054;
}

.pos-payment-icon,
.pos-payment-logo,
.pos-payment-mark {
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 1.45rem;
}

.pos-payment-icon {
    font-size: 1.05rem;
    line-height: 1;
    text-align: center;
}

.pos-payment-logo {
    display: block;
    object-fit: contain;
}

.pos-payment-mark {
    border-radius: 7px;
    display: inline-grid;
    place-items: center;
    background: #dcfae6;
    color: #067647;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0;
}

.pos-payment--visa .pos-payment-icon {
    color: #1a1f71;
}

.pos-payment--transfer .pos-payment-icon {
    color: #475467;
}

.pos-payment.is-active {
    border-color: #0f766e;
    background: #eef6f5;
    color: #0f766e;
}

.pos-change {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.65rem;
    background: #ecfdf3;
    color: #067647;
    border-radius: 12px;
    padding: 0.75rem;
}

.pos-change.is-pending {
    background: #fff4ed;
    color: #b93815;
}

.pos-change span {
    font-weight: 800;
}

.pos-change strong {
    font-size: 1.1rem;
}

.pos-summary {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
}

.pos-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #475467;
}

.pos-summary strong {
    color: #101828;
}

.pos-summary__total {
    border-top: 1px solid #edf0f5;
    padding-top: 0.75rem;
}

.pos-summary__total span {
    font-size: 1rem;
    font-weight: 850;
    color: #101828;
}

.pos-summary__total strong {
    font-size: 1.65rem;
}

.pos-emit-btn {
    border: 0;
    border-radius: 12px;
    min-height: 52px;
    background: #101828;
    color: #fff;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    box-shadow: 0 10px 20px rgba(16, 24, 40, 0.18);
}

.pos-emit-btn:disabled,
.pos-icon-btn:disabled,
.pos-tool-btn:disabled,
.pos-cart__head button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pos-state {
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
}

.pos-state--error {
    background: #fff5f5;
    border-color: #fecdca;
    color: #b42318;
}

.pos-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(16, 24, 40, 0.34);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
}

.pos-modal-overlay--top {
    padding-top: max(0.7rem, env(safe-area-inset-top, 0px));
}

.pos-modal {
    width: min(100%, 440px);
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18);
    box-sizing: border-box;
}

.pos-modal--wide {
    width: min(100%, 760px);
    height: calc(100svh - 1.4rem);
    display: flex;
    flex-direction: column;
}

.pos-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.pos-modal__header h2 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    font-size: 1rem;
}

.pos-input-wrap--modal {
    flex: 0 0 auto;
}

.pos-search-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.pos-search-item {
    border: 1px solid #e3e7ee;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    padding: 0.8rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    text-align: left;
    cursor: pointer;
}

.pos-search-item:hover,
.pos-search-item:focus-visible {
    outline: none;
    border-color: #0f766e;
    background: #fbfefd;
}

.pos-search-item span {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.pos-search-item small {
    color: #667085;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.pos-search-item strong {
    line-height: 1.25;
}

.pos-search-item em {
    color: #667085;
    font-style: normal;
    font-size: 0.8rem;
}

.pos-search-item b {
    white-space: nowrap;
}

.pos-search-empty {
    min-height: 220px;
    border: 1px dashed #cfd6e2;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #667085;
    text-align: center;
    padding: 1rem;
}

.pos-modal-note {
    color: #667085;
    font-size: 0.82rem;
    margin: 0.75rem 0 0;
}

.pos-modal--success {
    text-align: center;
}

.pos-success-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ecfdf3;
    color: #067647;
    margin: 0 auto 0.75rem;
    font-size: 1.55rem;
}

.pos-modal--success h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.pos-ticket-code {
    background: #f8fafc;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
}

.pos-ticket-code span {
    display: block;
    color: #667085;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.pos-ticket-code strong {
    font-size: 1.5rem;
}

.pos-sale-resume {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    margin-bottom: 0.85rem;
}

.pos-sale-resume div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #667085;
}

.pos-sale-resume strong {
    color: #101828;
    text-align: right;
}

.pos-modal-actions {
    display: grid;
    gap: 0.6rem;
}

.pos-modal-actions--split {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: center;
}

.pos-modal-actions--split .pos-secondary-btn,
.pos-modal-actions--split .pos-emit-btn {
    width: 100%;
    min-height: 52px;
}

.fade-in {
    animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .pos-page {
        padding-bottom: 12.5rem;
    }

    .pos-workspace {
        grid-template-columns: 1fr;
    }

    .pos-panel {
        position: fixed;
        left: 1rem;
        right: 1rem;
        bottom: calc(0.75rem + env(safe-area-inset-bottom));
        z-index: 60;
        min-height: auto;
    }

    .pos-summary {
        padding: 0.75rem;
        gap: 0.45rem;
        box-shadow: 0 16px 40px rgba(16, 24, 40, 0.18);
    }

    .pos-summary__total {
        padding-top: 0.55rem;
    }

    .pos-summary__total strong {
        font-size: 1.3rem;
    }

    .pos-emit-btn {
        min-height: 46px;
    }


}

@media (max-width: 640px) {
    .pos-page {
        height: calc(100svh - 4.25rem);
        padding: 0.75rem 0.75rem 12.5rem;
    }

    .pos-header {
        padding: 0.65rem;
        border-radius: 12px;
    }

    .pos-brand__icon {
        width: 40px;
        height: 40px;
    }

    .pos-brand h1 {
        font-size: 1rem;
    }

    .pos-brand p {
        font-size: 0.76rem;
        max-width: 150px;
    }

    .pos-icon-btn {
        width: 40px;
        min-height: 40px;
    }

    .pos-scanbar {
        grid-template-columns: minmax(0, 1fr) 46px;
        gap: 0.45rem;
    }

    .pos-tool-btn {
        width: 46px;
        padding: 0;
    }

    .pos-tool-btn span {
        display: none;
    }

    .pos-input {
        font-size: 0.92rem;
        padding-left: 2.55rem;
    }



    .pos-item {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 0.5rem 0.55rem;
    }

    .pos-item__side {
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        text-align: right;
        flex-wrap: nowrap;
    }

    .pos-item__side > strong {
        font-size: 0.86rem;
    }

    .pos-item__side small {
        display: none;
    }

    .pos-delete-btn {
        width: 28px;
        height: 28px;
    }

    .pos-payments {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-denominations__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-denom-btn {
        min-height: 48px;
    }

    .pos-modal-overlay {
        padding: 0;
    }

    .pos-modal,
    .pos-modal--wide {
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 100svh;
        border-radius: 0;
        overflow-y: auto;
    }

    .pos-modal--wide {
        height: 100svh;
    }

    .pos-modal-actions--split {
        grid-template-columns: 1fr;
    }
}

.pos-modal-total {
    text-align: center;
    background: #f8fafc;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    padding: 0.85rem;
    margin-bottom: 1rem;
}

.pos-modal-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.pos-modal-steps span {
    min-height: 38px;
    border: 1px solid #e3e7ee;
    border-radius: 10px;
    background: #fff;
    color: #667085;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 850;
}

.pos-modal-steps span.is-active {
    border-color: #0f766e;
    background: #eef6f5;
    color: #0f766e;
}

.pos-modal-steps span.is-complete {
    border-color: #bbf7d0;
    background: #ecfdf3;
    color: #067647;
}

.pos-modal-total span {
    display: block;
    color: #475467;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.pos-modal-total strong {
    font-size: 1.6rem;
    color: #101828;
}

.pos-modal-payment-section {
    margin-bottom: 1.2rem;
}

.pos-modal-next-btn {
    margin-top: 0.85rem;
}

.pos-modal-emit-btn {
    margin-top: 0.5rem;
}

.pos-denominations {
    margin-top: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.pos-denominations__label {
    color: #475467;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pos-denominations__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
}

.pos-denom-btn {
    position: relative;
    border: 1.5px solid #d8dee8;
    background: #fff;
    border-radius: 11px;
    min-height: 52px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    font-family: inherit;
    transition: all 0.15s ease;
    overflow: hidden;
}

.pos-denom-btn__value {
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
    color: #101828;
}

.pos-denom-btn__currency {
    font-size: 0.65rem;
    font-weight: 750;
    color: #667085;
    line-height: 1;
}

.pos-denom-btn:active {
    transform: translateY(1px);
}

/* S/10 — warm brown/terracotta */
.pos-denom-btn--10 {
    border-color: #e7d5c0;
    background: linear-gradient(168deg, #fff9f2 0%, #fef3e8 100%);
}
.pos-denom-btn--10:hover {
    border-color: #d4a574;
    box-shadow: 0 4px 12px rgba(180, 130, 80, 0.15);
}
.pos-denom-btn--10 .pos-denom-btn__value { color: #8b5e3c; }
.pos-denom-btn--10 .pos-denom-btn__currency { color: #b8845c; }

/* S/20 — teal green */
.pos-denom-btn--20 {
    border-color: #b8e0d8;
    background: linear-gradient(168deg, #f2fcf9 0%, #e8f8f4 100%);
}
.pos-denom-btn--20:hover {
    border-color: #5bb89a;
    box-shadow: 0 4px 12px rgba(60, 160, 130, 0.15);
}
.pos-denom-btn--20 .pos-denom-btn__value { color: #1a6e56; }
.pos-denom-btn--20 .pos-denom-btn__currency { color: #3c9e7e; }

/* S/50 — deep blue/violet */
.pos-denom-btn--50 {
    border-color: #c4cde8;
    background: linear-gradient(168deg, #f4f5fc 0%, #eceef8 100%);
}
.pos-denom-btn--50:hover {
    border-color: #7b8bbf;
    box-shadow: 0 4px 12px rgba(90, 100, 180, 0.15);
}
.pos-denom-btn--50 .pos-denom-btn__value { color: #3d4a8c; }
.pos-denom-btn--50 .pos-denom-btn__currency { color: #6670a8; }

/* S/100 — rich red/amber */
.pos-denom-btn--100 {
    border-color: #e8c4c4;
    background: linear-gradient(168deg, #fdf4f2 0%, #faeae8 100%);
}
.pos-denom-btn--100:hover {
    border-color: #c07060;
    box-shadow: 0 4px 12px rgba(180, 80, 70, 0.15);
}
.pos-denom-btn--100 .pos-denom-btn__value { color: #8c3d3d; }
.pos-denom-btn--100 .pos-denom-btn__currency { color: #b06858; }

.pos-denom-exact {
    border: 1px solid #d8dee8;
    background: #f8fafc;
    border-radius: 9px;
    min-height: 34px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    color: #475467;
    transition: all 0.15s ease;
}

.pos-denom-exact:hover {
    border-color: #0f766e;
    color: #0f766e;
    background: #eef6f5;
}

.pos-denom-exact:active {
    transform: translateY(1px);
}

.pos-ticket-print-container {
    display: none;
}

@media print {
    @page {
        size: 80mm auto;
        margin: 0;
    }

    body * {
        visibility: hidden !important;
    }
    
    .pos-ticket-print-container {
        display: block !important;
        visibility: visible !important;
        position: absolute;
        inset: 0 auto auto 0;
        width: 76mm;
        max-width: 100%;
        margin: 0;
        padding: 2mm 2.5mm;
        font-family: 'Courier New', monospace;
        font-size: 9px;
        color: #000;
        background: #fff;
        box-sizing: border-box;
    }

    .pos-ticket-print-container * {
        visibility: visible !important;
    }

    .pos-ticket-print-container--legacy {
        display: none !important;
        visibility: hidden !important;
    }

    .pos-ticket-print-container--legacy * {
        visibility: hidden !important;
    }

    .pos-ticket-print-header,
    .pos-ticket-print-footer {
        text-align: center;
    }

    .pos-ticket-print-logo {
        display: block;
        width: 38mm;
        max-width: 100%;
        height: auto;
        margin: 0 auto 2mm;
        object-fit: contain;
    }

    .pos-ticket-print-header h2 {
        font-size: 9px;
        margin: 0;
        font-weight: 400;
        letter-spacing: 0.28em;
        text-transform: uppercase;
    }

    .pos-ticket-print-header p,
    .pos-ticket-print-info p,
    .pos-ticket-print-footer p {
        margin: 2px 0;
        line-height: 1.2;
    }

    .pos-ticket-print-header h3 {
        font-size: 10px;
        margin: 3px 0 1px 0;
        font-weight: 400;
    }

    .pos-ticket-print-header h4 {
        font-size: 10px;
        margin: 0;
        font-weight: 400;
    }

    .pos-ticket-separator {
        width: 100%;
        height: 1.2em;
        overflow: hidden;
        line-height: 1.2;
        margin: 2px 0;
        text-align: left;
        white-space: nowrap;
    }

    .pos-ticket-print-info {
        margin-bottom: 0;
        text-align: left;
    }

    .pos-ticket-print-items {
        width: 100%;
        border-collapse: collapse;
        margin: 0;
        table-layout: fixed;
    }

    .pos-ticket-print-items th {
        text-align: left;
        font-weight: 400;
        padding: 0;
    }

    .pos-ticket-head-separator th {
        padding: 0;
    }

    .pos-ticket-head-separator .pos-ticket-separator {
        margin: 0;
    }

    .pos-ticket-print-items td {
        padding: 1px 0;
        vertical-align: top;
        text-align: left;
    }

    .pos-ticket-print-items th:nth-child(1),
    .pos-ticket-print-items td:nth-child(1) {
        width: 46%;
    }

    .pos-ticket-print-items th:nth-child(2),
    .pos-ticket-print-items td:nth-child(2),
    .pos-ticket-print-items th:nth-child(3),
    .pos-ticket-print-items td:nth-child(3),
    .pos-ticket-print-items th:nth-child(4),
    .pos-ticket-print-items td:nth-child(4) {
        width: 18%;
    }

    .pos-text-right {
        text-align: right !important;
    }

    .pos-ticket-print-totals {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
    }

    .pos-ticket-print-totals > div {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 2mm;
        margin: 1px 0;
    }

    .pos-ticket-grand-total {
        font-weight: 400;
        font-size: 9px;
    }

    .pos-ticket-total-gap {
        height: 1.2em;
        min-height: 1.2em;
    }

    .pos-ticket-print-amount {
        text-align: left;
    }

    .pos-ticket-print-amount p {
        margin: 0;
        line-height: 1.2;
    }

    .pos-ticket-thanks {
        font-size: 9px;
        font-weight: 400;
        margin-top: 3px !important;
    }

    .pos-ticket-print-footer p {
        font-size: 8.5px;
        line-height: 1.35;
    }

    .pos-ticket-disclaimer {
        margin-top: 2mm !important;
        margin-bottom: 2mm !important;
    }
}


/* --- ImpresionEtiquetas.razor.css --- */
/* PAGINA BASE COMPACTA */
.impresion-etiquetas-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #1a1a1a;
    min-height: calc(100vh - 4.5rem);
    padding: 0.75rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 100%;
    margin: 0 auto;
}

/* HEADER CARD COMPACTO */
.page-header-card-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    padding: 0.25rem 0.5rem;
    margin: 0;
}

.page-header-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header-icon-mini {
    color: #353e53;
    font-size: 1.1rem;
}

.page-header-card-compact h1 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
}

.page-header-subtitle-mini {
    font-size: 0.8rem;
    color: #6b7280;
    margin-left: 0.5rem;
    font-weight: 400;
}

/* BÚSQUEDA COMPACTA */
.search-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    box-shadow: 0 4px 12px rgba(17, 17, 17, 0.02);
}

.search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.95rem;
}

.input-modern {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.input-modern:focus {
    border-color: #353e53;
    box-shadow: 0 0 0 3px rgba(53, 62, 83, 0.1);
}

.btn-consultar {
    background-color: #353e53;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
}

.btn-consultar:hover {
    background-color: #2b3344;
}

/* BOTÓN DE ENGRANAJE AJUSTES */
.btn-toggle-settings {
    background: #ffffff;
    color: #6b7280;
    border: 1px solid #cfd8cf;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    height: 42px;
}

.btn-toggle-settings:hover {
    background-color: #f3f4f6;
    color: #1a1a1a;
    border-color: #9ca3af;
}

.btn-toggle-settings.active {
    background-color: #eff6ff;
    color: #3b82f6;
    border-color: #bfdbfe;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* MODAL DE CONFIGURACIÓN Y AJUSTES */
.settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: fadeInModal 0.2s ease-out;
}

.settings-modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.settings-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.settings-modal-title i {
    color: #475569;
}

.settings-modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-modal-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.settings-modal-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.4rem;
}

.settings-modal-section-title i {
    color: #3b82f6;
}

.settings-modal-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.settings-modal-fields-grid .filter-item,
.settings-modal-fields-grid .config-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-modal-fields-grid label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.settings-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
    display: flex;
    justify-content: flex-end;
}

.w-full {
    width: 100%;
}

.input-modern-small {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.input-modern-small:focus {
    border-color: #353e53;
    box-shadow: 0 0 0 2px rgba(53, 62, 83, 0.1);
}

@keyframes slideDownPanel {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* DESKTOP STYLING */
@media (min-width: 1024px) {
    .main-grid {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        gap: 0.75rem;
    }

    /* wrappers are white cards */
    .card-wrapper {
        background: #ffffff;
        border: 1px solid #eaeaea;
        border-radius: 12px;
        padding: 0.85rem 1rem;
        box-shadow: 0 4px 12px rgba(17, 17, 17, 0.01);
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
    }

    .card-wrapper--info {
        grid-column: span 1;
    }

    .card-wrapper--preview {
        grid-column: span 1;
    }

    /* flat blocks inside cards */
    .block-card {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
    }

    /* info rows layout */
    .block-card--code-product {
        display: flex;
        flex-direction: column;
    }

    .item-row {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 0;
    }

    .item-row--divider {
        border-top: 1px solid #f3f4f6;
    }

    .block-card--unit, .block-card--stock {
        border-top: 1px solid #f3f4f6;
    }

    .block-card--unit .item-row, .block-card--stock .item-row {
        padding: 0.75rem 0 0 0;
    }

    /* price inside wrapper - compact */
    .block-card--price {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        flex: 1;
        border-bottom: 1px solid #f3f4f6;
        padding-bottom: 0.5rem;
    }

    .price-label {
        font-size: 0.775rem;
        color: #4b5563;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

    .price-display {
        font-size: 2.15rem;
        font-weight: 800;
        color: #1e1b4b; /* deep indigo */
    }

    .price-display .currency {
        font-size: 1.45rem;
        font-weight: 600;
    }

    .block-card--date {
        padding-top: 0.4rem;
    }

    .date-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* headers - compact */
    .block-card-header {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        border-bottom: 1px solid #f3f4f6;
        padding-bottom: 0.4rem;
        margin-bottom: 0.15rem;
    }

    .block-card-header i {
        color: #353e53;
        font-size: 1rem;
    }

    .block-card-header h2 {
        font-size: 0.95rem;
        font-weight: 700;
        margin: 0;
        color: #1f2937;
    }

    .btn-ver-mas {
        display: none; /* hidden on desktop */
    }

    /* action panel layout */
    .action-panel {
        grid-column: 2 / 4;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-top: 0.5rem;
    }

    .btn-action-primary, .btn-action-secondary {
        border-radius: 8px;
        padding: 0.85rem 1.5rem;
        font-weight: 700;
        font-size: 0.95rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: all 0.2s ease;
    }

    .btn-action-primary {
        background-color: #353e53;
        color: #ffffff;
        border: none;
        box-shadow: 0 4px 12px rgba(53, 62, 83, 0.2);
    }

    .btn-action-primary:hover {
        background-color: #2b3344;
    }

    .btn-action-secondary {
        background-color: #ffffff;
        color: #353e53;
        border: 1px solid #cfd8cf;
    }

    .btn-action-secondary:hover {
        background-color: #f9fafb;
    }
}

/* MOBILE STYLING */
@media (max-width: 1023px) {
    .btn-toggle-settings span,
    .btn-consultar span {
        display: none;
    }

    .btn-toggle-settings,
    .btn-consultar {
        padding: 0.65rem;
        width: 42px;
        justify-content: center;
    }

    .impresion-etiquetas-page {
        padding: 1rem 1rem calc(6.5rem + env(safe-area-inset-bottom, 0px));
        gap: 0.5rem;
    }

    .main-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    /* wrappers are white cards on mobile too */
    .card-wrapper--info {
        background: #ffffff;
        border: 1px solid #eaeaea;
        border-radius: 12px;
        padding: 0.85rem 1rem;
        box-shadow: 0 4px 12px rgba(17, 17, 17, 0.01);
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
    }

    /* info grid layout on mobile */
    .info-grid-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .info-grid-item--code {
        grid-column: span 2;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 0.5rem;
    }

    .info-grid-item--product {
        grid-column: span 2;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 0.5rem;
    }

    .info-grid-item--unit {
        grid-column: 1;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 0.5rem;
    }

    .info-grid-item--stock {
        grid-column: 2;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 0.5rem;
        padding-left: 0.5rem;
    }

    .info-grid-item--price {
        grid-column: 1;
        border-bottom: none;
        padding: 0;
        display: flex;
        align-items: stretch;
    }

    .info-grid-item--date {
        grid-column: 2;
        border-bottom: none;
        padding-left: 0.5rem;
        display: flex;
        align-items: center;
    }

    .info-grid-item--price .price-box-card {
        background: #f0f7ff; /* soft premium light blue background */
        border: 1px solid #e0eafd;
        border-radius: 12px;
        padding: 1.25rem 0.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        min-height: auto;
        gap: 0.75rem;
    }

    .info-grid-item--price .price-box-title-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.15rem;
        width: 85%;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #e0eafd;
    }

    .info-grid-item--price .price-box-label-line {
        font-size: 0.65rem;
        font-weight: 700;
        color: #64748b;
        text-transform: uppercase;
        line-height: 1.2;
    }

    .info-grid-item--price .price-box-value-container {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        justify-content: center;
        gap: 0.35rem;
    }

    .info-grid-item--price .price-box-currency {
        font-size: 1.2rem;
        font-weight: 700;
        color: #1e1b4b;
        line-height: 1;
    }

    .info-grid-item--price .price-box-amount {
        font-size: 2.2rem;
        font-weight: 800;
        color: #1e1b4b;
        line-height: 1;
        letter-spacing: -0.02em;
        margin-top: 0;
    }

    /* preview card wrapper */
    .card-wrapper--preview {
        background: #ffffff;
        border: 1px solid #eaeaea;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(17, 17, 17, 0.02);
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .block-card-header--preview {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f3f4f6;
        padding-bottom: 0.5rem;
    }

    .preview-header-left {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .preview-header-left i {
        color: #353e53;
        font-size: 1rem;
    }

    .btn-ver-mas {
        background: none;
        border: none;
        color: #353e53;
        font-weight: 600;
        font-size: 0.825rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0;
    }

    .block-card--preview-box {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
    }

    .block-card-header:not(.block-card-header--preview) {
        display: none; /* hidden on mobile */
    }

    /* action panel layout on mobile */
    .action-panel-inline {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #ffffff;
        padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 12px rgba(17, 17, 17, 0.05);
        border-top: 1px solid #eaeaea;
        margin: 0 !important;
        z-index: 100;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        box-sizing: border-box;
    }

    .btn-action-primary {
        background-color: #353e53;
        color: #ffffff;
        border: none;
        border-radius: 8px;
        padding: 0.85rem;
        font-weight: 700;
        font-size: 0.95rem;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .btn-action-secondary {
        display: none; /* hide secondary preview button on mobile */
    }
}

/* COMÚN DE FILAS */
.item-icon-box {
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.item-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.item-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.item-value {
    font-size: 0.95rem;
    color: #111827;
    font-weight: 600;
}

.text-danger {
    color: #ef4444 !important;
}

/* TICKET DE VISTA PREVIA (EMULANDO STICKER ZEBRA FÍSICO) */
.ticket-preview {
    display: flex;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    aspect-ratio: 2.64 / 1; /* Proporción aproximada 90x34mm */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.ticket-preview__left {
    flex: 0 0 65%;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
}

.ticket-desc {
    font-size: 0.85rem;
    font-weight: 800;
    color: #000;
    line-height: 1.1;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ticket-barcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.25rem;
}

.ticket-barcode-bars {
    width: 80%;
    height: 30px;
    background: repeating-linear-gradient(
        to right,
        #000,
        #000 2px,
        #fff 2px,
        #fff 4px,
        #000 4px,
        #000 5px,
        #fff 5px,
        #fff 8px
    );
}

.ticket-code {
    font-size: 0.75rem;
    font-weight: 600;
    color: #000;
    margin-top: 2px;
    letter-spacing: 2px;
}

.ticket-date {
    font-size: 0.65rem;
    color: #000;
    font-weight: 600;
}

.ticket-preview__right {
    flex: 0 0 35%;
    background: #ffeb3b; /* Amarillo clásico de etiquetas */
    padding: 0.75rem;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.ticket-price-val {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    color: #000;
}

.ticket-currency {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.ticket-amount {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -1px;
}

/* STATUS BAR */
.footer-info-bar {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.825rem;
    color: #6b7280;
    box-shadow: 0 4px 12px rgba(17, 17, 17, 0.02);
}

.footer-info-bar i {
    color: #3b82f6;
    font-size: 1rem;
}

/* ANIMACIONES */
.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SEARCH FILTERS */
.search-filters {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.75rem;
}

.filter-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
}

.select-modern {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    outline: none;
    background-color: #ffffff;
    color: #1a1a1a;
    transition: all 0.2s ease;
}

.select-modern:focus {
    border-color: #353e53;
    box-shadow: 0 0 0 3px rgba(53, 62, 83, 0.1);
}

@media (max-width: 640px) {
    .search-filters {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* CONFIG CARD */
.config-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 12px rgba(17, 17, 17, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-title i {
    color: #353e53;
    font-size: 1rem;
}

.config-title h2 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
}

.toggle-icon {
    color: #6b7280;
    font-size: 0.85rem;
}

.config-body {
    border-top: 1px solid #f3f4f6;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

.config-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.config-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
}

@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* EMPTY STATE CARD */
.empty-state-card {
    background: #ffffff;
    border: 1px dashed #cfd8cf;
    border-radius: 12px;
    padding: 3.5rem 1.5rem;
    text-align: center;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(17, 17, 17, 0.01);
}

.empty-state-card i {
    font-size: 2.5rem;
    color: #cbd5e1;
}

.empty-state-card p {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
}

/* MODAL DE BÚSQUEDA MULTI-COINCIDENCIA */
.product-search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: fadeInModal 0.2s ease-out;
}

.product-search-modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.product-search-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.product-search-modal-title i {
    color: #3b82f6;
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.product-search-modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.product-search-modal-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    margin-top: 0;
}

.product-search-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-search-item:hover {
    border-color: #3b82f6;
    background-color: #f0f7ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.05);
}

.product-search-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
}

.product-search-item-code {
    font-size: 0.85rem;
    font-weight: 700;
    color: #3b82f6;
    background-color: #eff6ff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    width: fit-content;
}

.product-search-item-desc {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

.product-search-item-action {
    color: #94a3b8;
    font-size: 1.1rem;
    transition: color 0.2s;
    padding-left: 1rem;
}

.product-search-item:hover .product-search-item-action {
    color: #3b82f6;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpModal {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* INFO GRID LAYOUT (DESKTOP) */
.info-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0.5rem 1.25rem;
    align-items: stretch;
}

.info-grid-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-grid-item--code {
    grid-column: 1;
    grid-row: 1;
}

.info-grid-item--product {
    grid-column: 1;
    grid-row: 2;
}

.info-grid-item--unit {
    grid-column: 1;
    grid-row: 3;
}

.info-grid-item--stock {
    grid-column: 1;
    grid-row: 4;
}

.info-grid-item--date {
    grid-column: 1;
    grid-row: 5;
    border-bottom: none;
}

.info-grid-item--price {
    grid-column: 2;
    grid-row: 1 / span 5;
    border-bottom: none;
    padding: 0;
    display: flex;
    align-items: stretch;
}

.price-box-card {
    background: #f0f7ff; /* soft premium light blue background */
    border: 1px solid #e0eafd;
    border-radius: 12px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem 0.3rem;
    box-sizing: border-box;
    min-height: 100%;
    text-align: center;
}

.price-box-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 0.5rem;
}

.price-box-label-line {
    font-size: 0.725rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.price-box-value-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.price-box-currency {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e1b4b;
}

.price-box-amount {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1e1b4b; /* deep indigo */
    line-height: 1;
}

/* COMPACT DATA ROWS & ICONS */
.info-icon-mini {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    width: 16px;
    text-align: center;
}

.item-copy-compact {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    text-align: left;
}

.item-label-compact {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.item-value-compact {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.35;
}

.action-panel-inline {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}






/* --- NuevoPedido.razor.css --- */
.scanbox-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #111111;
    min-height: calc(100svh - 4.5rem);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.5rem 0;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
    box-sizing: border-box;
}

.scanbox-header {
    margin-bottom: 1.25rem;
}

.scanbox-header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e9efe9;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(17, 17, 17, 0.04);
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
}

.scanbox-header:has(.input-modern:focus) .scanbox-header__top {
    border-color: #008a3d;
}

.scanbox-header__tools {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    align-items: center;
    flex: 0 0 auto;
}

.scanbox-header__top-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scanbox-header__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
}

.scanbox-header__brand h1 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #008a3d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scanbox-subtitle {
    margin: 0.3rem 0 0;
    color: #666;
    font-size: 0.95rem;
}

.badge-beta {
    background-color: #111;
    color: #1ed760;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 1px;
}

.scanbox-actions {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.btn-icon {
    background: #fff;
    border: 1px solid #eaeaea;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    font-size: 1.25rem;
    color: #111;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.btn-icon:active {
    transform: scale(0.95);
}

.btn-action {
    background-color: #fff;
    color: #111;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
    flex: 0 0 auto;
    min-width: 116px;
}

.scanbox-barcode-button {
    border-color: #cfd8cf;
    color: #111;
    box-shadow: none;
}

.btn-advanced-search {
    height: 42px;
    background: #fff;
    border: 1px solid #cfd8cf;
    border-radius: 9px;
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-weight: 500;
    font-family: inherit;
}

.btn-advanced-search--header {
    min-width: 122px;
    padding: 0 0.85rem;
    width: auto;
}

.btn-advanced-search:active {
    transform: translateY(1px);
}

.btn-action:active {
    background-color: #f0f0f0;
    transform: translateY(2px);
}

.scanbox-search-container {
    position: relative;
    flex: 1;
    min-width: 0;
}

.scanbox-search-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.scanbox-search-results--modal {
    flex: 1;
    max-height: none !important;
    margin: 1rem 0 0;
    min-height: 0;
}

.scanbox-search-item {
    border: 1px solid #eaeaea;
    border-radius: 14px;
    background: #fff;
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: pointer;
    color: inherit;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.scanbox-search-item:hover, .scanbox-search-item:focus-visible {
    border-color: #008a3d;
    box-shadow: 0 8px 25px rgba(0, 138, 61, 0.08);
    transform: translateY(-2px);
    outline: none;
}

.scanbox-search-item:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 138, 61, 0.05);
}

.scanbox-search-item__copy {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    flex: 1;
    padding-right: 1rem;
}

.scanbox-search-item__copy .product-name {
    font-size: 0.98rem;
    line-height: 1.25;
    color: #111;
    font-weight: 700;
}

.scanbox-search-item__copy .product-sku {
    color: #595959;
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.scanbox-search-item__copy .product-unit {
    color: #666;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #f4f5f7;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    width: fit-content;
    margin-top: 0.1rem;
}

.scanbox-search-item__action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111;
}

.add-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #f4f5f7;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.scanbox-search-item:hover .add-circle {
    background-color: #008a3d;
    color: #fff;
    transform: scale(1.1);
}

.scanbox-search-empty {
    background: #fafafa;
    border: 2px dashed #eaeaea;
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    color: #666;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 100%;
    min-height: 200px;
}

.scanbox-search-empty--animated {
    animation: fadeIn 0.4s ease forwards;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #008a3d;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-bottom: 0.75rem;
}

.empty-state-icon.text-muted {
    color: #999;
}

.loading-pulse {
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 138, 61, 0.2); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(0, 138, 61, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 138, 61, 0); }
}

.scanbox-search-empty p {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: #333;
}

.scanbox-search-empty small {
    color: #888;
    font-size: 0.85rem;
}

.search-icon {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    pointer-events: none;
}

.search-spinner {
    position: absolute;
    right: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: #008a3d;
    font-size: 1.1rem;
    pointer-events: none;
}

.input-modern {
    width: 100%;
    height: 100%;
    padding: 1rem 2.5rem 1rem 3rem;
    border: 2px solid transparent;
    background-color: #fff;
    border-radius: 12px;
    font-size: 1.05rem;
    box-shadow: none;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #111;
}

.input-modern--large {
    padding-top: 1.15rem;
    padding-bottom: 1.15rem;
    font-size: 1.1rem;
}

.input-modern:focus {
    outline: none;
    border-color: #008a3d;
    background-color: #fff;
    animation: inputPulseGlow 2s infinite ease-in-out;
}

.scanbox-search-container:focus-within .input-modern {
    border-color: #008a3d;
}

.input-modern:focus ~ .search-icon {
    color: #008a3d;
}

.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.icon-circle--green {
    background-color: rgba(0, 138, 61, 0.1);
    color: #008a3d;
    font-size: 0.9rem;
}

.scanbox-search-container.scanbox-search-container--hero {
    flex: 0 0 auto;
    height: 52px;
    margin-bottom: 0.5rem;
}

.scanbox-cart {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 1rem;
    scrollbar-width: none; /* Firefox */
}
.scanbox-cart::-webkit-scrollbar {
    display: none; /* Chrome */
}

.scanbox-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    text-align: center;
    padding-top: 1.5rem;
}

.scanbox-empty__pointer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    margin-top: -1rem;
    position: relative;
    color: #1ed760;
    font-size: 1.75rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    animation: floatUpDown 2.8s infinite ease-in-out;
    pointer-events: none;
}

.scanbox-empty__icon {
    position: relative;
    background: #fff;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #111;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.scanbox-empty__laser {
    position: absolute;
    left: 8%;
    right: 8%;
    height: 3px;
    background: #00a84c;
    box-shadow: 0 0 6px #00a84c, 0 0 12px rgba(0, 168, 76, 0.85);
    border-radius: 99px;
    animation: scannerLaser 5.2s infinite ease-in-out;
    pointer-events: none;
    z-index: 2;
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); opacity: 0.35; }
    50% { transform: translateY(-12px); opacity: 1; }
}

@keyframes scannerLaser {
    0%, 100% { top: 22%; opacity: 0; }
    12%, 88% { opacity: 1; }
    50% { top: 72%; opacity: 0.9; }
}

@keyframes inputPulseGlow {
    0%, 100% { box-shadow: 0 0 0 2px rgba(0, 138, 61, 0.12); border-color: #008a3d; }
    50% { box-shadow: 0 0 0 6px rgba(0, 138, 61, 0.32); border-color: #00a84c; }
}

.scanbox-empty h3 {
    color: #111;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.scanbox-item__meta {
    color: #666;
    font-size: 0.82rem;
}

.scanbox-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scanbox-item {
    background: #fff;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
}

.scanbox-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.scanbox-item__code {
    font-size: 0.7rem;
    color: #595959;
    font-family: monospace;
    letter-spacing: 1px;
}

.scanbox-item__desc {
    font-size: 0.96rem;
    font-weight: 600;
    color: #111;
    line-height: 1.2;
}

.scanbox-item__price-block {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin-left: 0.75rem;
}

.scanbox-item__price {
    font-size: 1rem;
    font-weight: 800;
    color: #111;
}

.scanbox-qty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8f9fa;
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.btn-qty {
    background: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
}

.btn-qty:active {
    transform: scale(0.9);
}

.qty-value {
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.scanbox-footer {
    position: sticky;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin-top: auto;
    background: #fff;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.08);
    z-index: 50;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.scanbox-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
}

.scanbox-totals span {
    font-weight: 600;
    color: #666;
    font-size: 0.82rem;
}

.total-amount {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1ed760; /* Vibrant Green Touch */
}

.btn-checkout {
    background-color: #111;
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 1rem;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 20px rgba(17,17,17,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scanbox-footer .btn-checkout {
    width: auto;
    min-width: 132px;
    padding: 0.85rem 1rem;
    border-radius: 999px;
}

.btn-checkout:active {
    transform: translateY(2px);
    box-shadow: 0 5px 10px rgba(17,17,17,0.2);
}

.btn-secondary-action {
    background: #fff;
    color: #111;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

.btn-checkout:disabled,
.btn-action:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.scanbox-state {
    background: #fff;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    border: 1px solid #eaeaea;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .scanbox-page {
        min-height: calc(100svh - 4.25rem);
        padding: 1rem 1rem 0;
    }

    .scanbox-header__top {
        align-items: center;
        flex-wrap: nowrap;
        padding: 0.65rem;
        gap: 0.4rem;
    }

    .scanbox-header__top-actions,
    .scanbox-header__tools {
        width: auto;
    }

    .scanbox-header__tools {
        justify-content: flex-end;
        gap: 0.35rem;
    }

    .btn-advanced-search--header {
        min-width: 0;
        width: auto;
        padding: 0 0.65rem;
    }

    .btn-advanced-search--header span {
        display: none;
    }

    .scanbox-header__brand h1 {
        font-size: 1rem;
    }

    .scanbox-header__brand {
        gap: 0.4rem;
    }

    .scanbox-header__tools .btn-icon,
    .btn-advanced-search--header {
        width: 40px;
        height: 40px;
        border-radius: 11px;
        font-size: 1rem;
    }

    .scanbox-footer {
        padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
        border-radius: 16px 16px 0 0;
    }

    .scanbox-actions {
        gap: 0.5rem;
    }

    .btn-action {
        min-width: 104px;
        padding: 0.9rem 0.8rem;
        font-size: 0.95rem;
        gap: 0.5rem;
    }

    .input-modern {
        font-size: 0.95rem;
        padding-left: 2.5rem;
    }

    .scanbox-search-results {
        max-height: 220px;
    }

    .scanbox-item {
        padding: 0.8rem 0.9rem;
    }

    .scanbox-modal-overlay--top {
        padding: 0;
    }

    .scanbox-modal-overlay--top .scanbox-modal {
        height: 100svh;
        max-height: 100svh;
        border-radius: 0;
        max-width: 100%;
        width: 100%;
        padding: 1.1rem 1rem 1rem;
    }
}

.scanbox-state {
    margin-top: 1rem;
    text-align: center;
}

.scanbox-state--error {
    border-color: #f0c4c4;
    background: #fff5f5;
    color: #8a1f1f;
}

/* Modals */
.scanbox-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(17, 17, 17, 0.28);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    padding: 1.5rem;
    padding-top: max(1.5rem, env(safe-area-inset-top, 0px));
}

.scanbox-modal-overlay--top {
    padding: max(0.75rem, env(safe-area-inset-top, 0px)) 1rem 1rem;
}

.scanbox-modal {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 18px;
    padding: 1.1rem 1rem 1rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.scanbox-modal-overlay--top .scanbox-modal {
    height: calc(100svh - 1.75rem);
    overflow: hidden;
    max-width: 680px;
    box-sizing: border-box;
}

.scanbox-modal-overlay--top .scanbox-modal__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.scanbox-modal--wide {
    max-width: 520px;
}

.scanbox-modal--history {
    height: auto;
    max-height: calc(100svh - 3rem);
}

.scanbox-modal--history .scanbox-history-list {
    flex: 1;
    min-height: 0;
    max-height: calc(100svh - 9rem);
}

.scanbox-modal-overlay--top .scanbox-modal--wide {
    max-width: 680px;
}

.scanbox-modal-actions {
    display: grid;
    gap: 0.75rem;
}

.scanbox-ticket-code {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.scanbox-ticket-code span {
    display: block;
    color: #666;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.scanbox-ticket-code strong {
    font-size: 1.55rem;
    letter-spacing: 1px;
}

.scanbox-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: min(70svh, 620px);
    overflow-y: auto;
}

.scanbox-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    background: #f8f9fa;
    border-radius: 14px;
    padding: 0.85rem;
}

.scanbox-history-item span {
    display: block;
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.scanbox-history-item .btn-secondary-action {
    margin-top: 0.4rem;
    padding: 0.55rem 0.8rem;
}

.scanbox-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.scanbox-modal__header h2 {
    font-weight: 800;
    margin: 0;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    letter-spacing: -0.2px;
}

.scanbox-modal__body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scanbox-tabs {
    display: flex;
    gap: 1.2rem;
    border-bottom: 1px solid #ececf0;
    margin: 0 -1rem 1rem;
    padding: 0 1rem;
}

.scanbox-tab {
    background: transparent;
    border: 0;
    color: #b7b7bd;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-family: inherit;
    font-weight: 800;
    padding: 0 0 0.75rem;
    position: relative;
}

.scanbox-tab--active {
    color: #008a3d;
}

.scanbox-tab--active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #008a3d;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    color: #333;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-success {
    background-color: #1ed760;
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

.scanbox-qr-wrapper {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.scanbox-qr-instruction {
    text-align: center;
    font-weight: 600;
    color: #666;
    margin-bottom: 2rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.slide-up {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Print splits styling */
.print-buttons-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.print-buttons-split .btn-checkout {
    padding: 0.85rem 0.5rem;
    font-size: 0.95rem;
}

.print-buttons-split .btn-checkout--barcode {
    background-color: #333;
}

.print-buttons-split .btn-checkout--qr {
    background-color: #008a3d;
}

.scanbox-history-item__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.print-split-compact {
    display: flex;
    gap: 0.4rem;
}

.btn-compact-print {
    background: #fff;
    color: #111;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.btn-compact-print:hover {
    border-color: #008a3d;
    color: #008a3d;
    background-color: rgba(0, 138, 61, 0.05);
}

.btn-compact-print:active {
    transform: scale(0.92);
}

/* Contenedor del escáner de cámara rediseñado como Bottom Sheet (Modal Overlay) */
.scanbox-camera-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(17, 17, 17, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1200;
    padding: 0;
}

.scanbox-camera-sheet {
    background: #fff;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
    animation: slideUpCamera 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.camera-viewport {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 4/3;
    border-radius: 16px;
    overflow: hidden;
    background-color: #000;
    border: 2px solid #eaeaea;
}

.btn-close-camera {
    width: 100%;
    max-width: 380px;
    padding: 0.9rem;
    border-radius: 12px;
    background-color: #ff3838;
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-close-camera:active {
    transform: scale(0.98);
    background-color: #e03030;
}

@keyframes slideUpCamera {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}



