body {
    background: #f6f7fb;
}

.card {
    border-radius: 14px;
}

.navbar {
    background: #000970 !important;
}

.navbar-brand {
    font-weight: 700;
}

.table td,
.table th {
    vertical-align: middle;
}

.modal-xl {
    max-width: 1100px;
}

.pos-screen {
    display: grid;
    grid-template-columns: minmax(0, 50%) minmax(320px, 50%);
    gap: 1rem;
    align-items: start;
}

.pos-products-panel {
    min-width: 0;
}

.pos-cart-panel {
    position: sticky;
    top: 1rem;
}

.pos-cart-card {
    border-radius: 22px;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 1rem;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.pos-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: .75rem;
    text-align: left;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    cursor: pointer;
}

.pos-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .10);
    border-color: #0d6efd;
}

.pos-product-img {
    height: 135px;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pos-no-image {
    color: #64748b;
    font-size: .9rem;
}

.pos-product-info {
    padding-top: .75rem;
}

.pos-product-title {
    font-weight: 600;
    line-height: 1.2;
    min-height: 38px;
    color: #111827;
}

.pos-product-meta {
    margin-top: .5rem;
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    color: #475569;
    font-size: .92rem;
}

.pos-cart-items {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    max-height: 330px;
    overflow-y: auto;
    padding-right: .25rem;
}

.pos-cart-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: .65rem;
}

.pos-cart-item-main {
    margin-bottom: .5rem;
}

.pos-cart-controls {
    display: grid;
    grid-template-columns: 34px minmax(70px, 1fr) 34px 34px auto auto;
    gap: .35rem;
    align-items: center;
}

.pos-discount-btn {
    white-space: nowrap;
}

.pos-cart-subtotal {
    font-weight: 700;
    text-align: right;
    margin-top: .4rem;
}

.pos-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .4rem;
}

.pos-total-main {
    font-size: 1.25rem;
    border-top: 1px solid #e5e7eb;
    padding-top: .5rem;
}

@media (max-width: 992px) {
    .pos-screen {
        grid-template-columns: 1fr;
    }

    .pos-cart-panel {
        position: static;
    }

    .pos-product-grid {
        max-height: none;
    }

    .pos-cart-controls {
        grid-template-columns: 34px minmax(70px, 1fr) 34px 34px;
    }

    .pos-discount-btn {
        grid-column: span 2;
    }
}

.customer-search-wrap {
    position: relative;
}

.customer-search-results {
    display: none;
    position: absolute;
    z-index: 1050;
    left: 0;
    right: 0;
    top: calc(100% + .25rem);
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
}

.customer-search-results.show {
    display: block;
}

.customer-search-item {
    width: 100%;
    border: 0;
    background: #fff;
    text-align: left;
    padding: .75rem 1rem;
    border-bottom: 1px solid #f1f3f5;
}

.customer-search-item:hover,
.customer-search-item:focus {
    background: #f6f7fb;
}

.customer-search-item small {
    display: block;
    color: #6c757d;
    margin-top: .15rem;
}

.sales-products-cell {
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
