/* Project custom utilities — loaded after Metronic's styles.css. */
:root{
    --color_p : #467fd0;
    --color_p_text : #fff;
    --color_d : #cc0033;
    --color_d_text : #fff;
}

.break-words {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.quantity-line-cell , .quantity-line-input{
    border: 1px solid #9f9fa9;
    border-left:none;
   width:80px;
    background-color: #ffedd4;
}
.quantity-line-input:has(.quantity-line-shop) {
    background-color: #ffedd4; 
}
.js-patch-inline-input[type="date"] {
        width: auto;
}
.order-riga-table, .uploaded-table, .movement-article-table {
    position:relative;
    thead {
        position: sticky !important;
        top: 0;
        z-index: 2;
        background-color: #99a1af;
    }
}
.table-gray-row {
    background-color: #e5e7eb;
}
.stretch-image {
    height: stretch;
    width: stretch;
    object-fit: cover;
    max-height: 700px;
}
.js-live-search-results
{
    max-height: 300px;
    overflow-y: auto;
}
.list-image {
    width: 100%;
    height: 100%;
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
}
.uploaded-table {
    
    tbody td {padding: 5px;}
}
.quantity-line-title {
    border-top: none;
    border-left: none;
    border-bottom: none;
}
.quantity-line-input, .uploaded-table {
    background: #fff;
    input[type="number"] {
        -moz-appearance: textfield;
    }
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    }
}
.quantity-line-cell:first-child, .quantity-line-input:first-child {
    border-left: 1px solid #9f9fa9;
    width: unset;
    min-width: 60px;
}

.justify-start {
    justify-content: flex-start;
}

.lookup-scroll-modal {
    width: min(24rem, calc(100vw - 2rem)) !important;
    max-width: calc(100vw - 2rem) !important;
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
}
.lookup-scroll-modal .kt-modal-header,
.lookup-scroll-modal .kt-modal-footer {
    flex-shrink: 0;
}
.lookup-scroll-modal .kt-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.lookup-scroll-modal .js-attach-list,
.lookup-scroll-modal .js-values-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.lookup-scroll-modal .js-attach-picker,
.lookup-scroll-modal .js-values-picker {
    flex-shrink: 0;
}

.max-w-sm  { max-width: 24rem; }
.max-w-md  { max-width: 28rem; }
.max-w-lg  { max-width: 32rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }

.stat-matrix-table th:first-child,
.stat-matrix-table td:first-child,
.stat-qty-table th:first-child,
.stat-qty-table td:first-child,
.stat-week-table th:first-child,
.stat-week-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: var(--card, #fff);
}
.stat-matrix-table thead th:first-child,
.stat-qty-table thead th:first-child,
.stat-week-table thead th:first-child {
    z-index: 2;
}
.stat-qty-table thead th,
.stat-week-table thead th,
.stat-matrix-table thead th {
    background-color: var(--muted, #f4f4f5);
}
.stat-qty-table thead th:first-child,
.stat-week-table thead th:first-child,
.stat-matrix-table thead th:first-child {
    background-color: var(--muted, #f4f4f5);
}
.stat-qty-table thead tr:first-child th {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--secondary-foreground, #4b5563);
}
.stat-qty-table tfoot td:first-child,
.stat-week-table tfoot td:first-child,
.stat-matrix-table tfoot td:first-child {
    background-color: var(--muted, #f4f4f5);
}

/* Statistics page */
.stat-filters-empty {
    border: 1px dashed var(--border, #d4d4d8);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    font-size: 0.8125rem;
    color: var(--secondary-foreground, #6b7280);
    background: var(--muted, #f4f4f5);
}
.stat-filter-row {
    display: grid;
    grid-template-columns: minmax(9rem, 12rem) minmax(4.5rem, 5.5rem) minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: start;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border, #e4e4e7);
    border-radius: 0.5rem;
    background: #fff;
}
@media (max-width: 767px) {
    .stat-filter-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "field remove"
            "op op"
            "value value";
    }
    .stat-filter-field { grid-area: field; }
    .stat-filter-op { grid-area: op; }
    .stat-filter-value { grid-area: value; }
    .stat-filter-row > .stat-remove { grid-area: remove; justify-self: end; }
}
.stat-filter-value {
    min-width: 0;
}
.stat-advanced {
    border-top: 1px solid var(--border, #e4e4e7);
    padding-top: 0.75rem;
}
.stat-advanced > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-size: 0.8125rem;
    color: var(--secondary-foreground, #6b7280);
}
.stat-advanced > summary::-webkit-details-marker {
    display: none;
}
.stat-advanced[open] > summary i {
    transform: rotate(180deg);
}
.stat-advanced-body {
    margin-top: 0.75rem;
}
.stat-dense-table td,
.stat-dense-table th {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
}
.stat-cell-empty {
    color: var(--muted-foreground, #a1a1aa);
}
.stat-cell-has-value {
    color: var(--foreground, #18181b);
    font-variant-numeric: tabular-nums;
}

.kt-modal.kt-modal-center.kt-modal-fit {
    inset: 0;
    width: 100%;
    max-width: 100vw;
    height: 100%;
    max-height: 100dvh;
    transform: none;
    translate: none;
    overflow: auto;
    padding: 1rem;
    box-sizing: border-box;
}
.kt-modal.kt-modal-center.kt-modal-fit.open {
    display: flex;
    align-items: center;
    justify-content: center;
}
.kt-modal.kt-modal-center.kt-modal-fit .kt-modal-content {
    max-width: min(28rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    box-sizing: border-box;
}
.kt-modal-content.lookup-scroll-modal {
    width: min(24rem, calc(100vw - 2rem)) !important;
    max-width: min(24rem, calc(100vw - 2rem)) !important;
}