body { background: #f5f7fb; }
.card { border: 0; border-radius: 1rem; box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, .08); }
.table thead th { white-space: nowrap; }
.table td { vertical-align: middle; }
.edit-input { min-width: 0; }
.changed { background: #fff3cd !important; }
.small-muted { font-size: .85rem; color: #6c757d; }
.action-cell { white-space: nowrap; width: 1%; }
.login-card { max-width: 430px; margin: 7vh auto; }
.badge-soft { background: #eef2ff; color: #3730a3; }

.product-row {
    cursor: pointer;
}

.product-row:has(.inline-field.changed) {
    cursor: default;
}

#productDetailsModal .modal-body {
    background: #f8f9fa;
}

.product-table {
    table-layout: auto;
    width: 100%;
    font-size: .92rem;
}

.product-table th,
.product-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.product-table th {
    width: 1%;
}

.product-table .form-control-sm {
    padding-left: .35rem;
    padding-right: .35rem;
}

.product-table .inline-field {
    min-width: 0;
    width: 100%;
}

/* Give useful text fields the space, not the short numeric fields. */
.product-table .col-product_name {
    min-width: 260px;
    width: 28%;
}

.product-table .col-description {
    min-width: 360px;
    width: 38%;
}

.product-table .col-brand {
    min-width: 110px;
}

.product-table .col-manufacturer_pn,
.product-table .col-supplier_sku {
    min-width: 130px;
}

.product-table .col-supplier_name,
.product-table .col-category {
    min-width: 120px;
}

/* Compact columns: only wide enough for header/value, leaving room for Product Name and Description. */
.product-table .col-stock_on_hand {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    text-align: center;
}

.product-table .col-cost_price,
.product-table .col-your_price_ex_gst,
.product-table .col-your_price_inc_gst,
.product-table .col-rrp_price,
.product-table .col-profit,
.product-table .col-profit_margin {
    width: 92px;
    min-width: 92px;
    max-width: 104px;
    text-align: right;
}

.product-table .col-stock_on_hand input {
    text-align: center;
}

.product-table .col-cost_price input,
.product-table .col-your_price_ex_gst input,
.product-table .col-your_price_inc_gst input,
.product-table .col-rrp_price input {
    text-align: right;
}

.product-table .profit-display,
.product-table .margin-display {
    padding-left: .45rem;
    padding-right: .45rem;
}

.price-cell {
    min-width: 0;
}

#columnsModal .form-check-input {
    cursor: pointer;
}

.product-row:focus {
    outline: 2px solid rgba(13, 110, 253, .35);
    outline-offset: -2px;
}

.product-row .inline-field,
.product-row .action-cell {
    cursor: auto;
}

.chart-wrap { position: relative; min-height: 340px; width: 100%; }
