.harmonia-products {
    min-width: 0;
}

.harmonia-invoice .harmonia-products > .card-header .btn-tool {
    color: var(--harmonia-accent);
}

.harmonia-products-search label {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .35rem;
    font-size: .95rem;
    font-weight: 700;
}

.harmonia-products-search label i {
    color: var(--harmonia-accent, #6326e6);
    font-size: 1.15rem;
}

.harmonia-products-search-field {
    position: relative;
}

.harmonia-products-search-field > i {
    position: absolute;
    inset-inline-start: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #474079;
    pointer-events: none;
}

.harmonia-products-search-field .form-control {
    min-height: 2.25rem;
    padding-inline-start: 2.75rem;
    scroll-margin-top: 5rem;
    border: 1px solid var(--harmonia-border, #c9bef6) !important;
    border-radius: .65rem;
    background-color: rgba(255, 255, 255, .35);
    box-shadow: 0 3px 7px rgba(75, 52, 160, .09);
}

.harmonia-products-toolbar,
.harmonia-products-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.harmonia-products-toolbar {
    gap: .65rem clamp(.65rem, 2.4vw, 2rem);
    margin-block: 1.25rem;
}

.harmonia-products-total {
    display: flex;
    flex: 1 1 40%;
    min-height: 3rem;
    align-items: center;
    gap: clamp(.65rem, 1.15vw, 1.2rem);
    padding: .4rem clamp(.7rem, 1.25vw, 1.25rem);
    border-radius: .75rem;
    background: linear-gradient(100deg, #f0e9fc, #e6dcfb 64%, #cabaf8);
    color: var(--harmonia-ink, #171344);
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
}

.harmonia-products-total i,
.harmonia-products-total strong {
    color: var(--harmonia-accent, #6326e6);
}

.harmonia-products-total i {
    font-size: 1.25rem;
}

.harmonia-products-total strong {
    padding-inline-start: clamp(.65rem, 1.35vw, 1.5rem);
    border-inline-start: 1px solid #c8b9f1;
    font-size: clamp(1.2rem, 1.7vw, 1.75rem);
    line-height: 1;
}

.harmonia-products-actions {
    gap: .55rem .85rem;
    margin-inline-start: auto;
}

.harmonia-products-table {
    min-width: 0;
    border: 1px solid var(--harmonia-border, #c9bef6);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .28);
}

.harmonia-products-table .dataTables_scrollHead {
    border-radius: .8rem .8rem 0 0;
    background: linear-gradient(110deg, #7750d9, #624ac4);
}

.harmonia-products-table table.dataTable thead th {
    color: #fff;
    font-size: .8rem;
}

.harmonia-products-table .dataTables_scrollHead thead th {
    padding: .65rem .6rem;
    border-bottom: 0;
    white-space: nowrap;
}

.harmonia-products-table .dataTables_scrollHead thead .sorting,
.harmonia-products-table .dataTables_scrollHead thead .sorting_asc,
.harmonia-products-table .dataTables_scrollHead thead .sorting_desc {
    padding-inline-end: 1.25rem;
}

.harmonia-products-table table.dataTable tbody td {
    color: var(--harmonia-ink, #171344);
}

.harmonia-products-empty {
    display: none;
    padding: .9rem .75rem .7rem;
    color: var(--harmonia-ink, #171344);
    text-align: center;
}

/* DataTables supplies the empty cell. Keep the visual state outside its managed rows. */
.harmonia-products-table:has(.dataTables_empty) .dataTables_scrollHead {
    overflow-x: auto !important;
}

.harmonia-products-table:has(.dataTables_empty) .dataTables_scrollBody {
    height: 0 !important;
    border-bottom: 0 !important;
    visibility: hidden;
}

.harmonia-products-table:has(.dataTables_empty) .harmonia-products-empty {
    display: grid;
    justify-items: center;
}

.harmonia-products-empty svg {
    max-width: 100%;
    margin-bottom: .2rem;
}

.harmonia-products-empty strong {
    font-size: 1.15rem;
    line-height: 1.25;
}

.harmonia-products-empty p {
    margin: .1rem 0 .35rem;
    color: #4c466d;
}

.harmonia-products-empty a {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 2.2rem;
    padding: .3rem 1rem;
    border-radius: 999px;
    background: #e8dcfc;
    color: var(--harmonia-accent, #6326e6);
    font-size: .9rem;
    font-weight: 700;
}

.harmonia-products-empty a:hover,
.harmonia-products-empty a:focus-visible {
    background: #dcc9fb;
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .harmonia-products-actions {
        width: 100%;
        margin-inline-start: 0;
    }
}
