/* =========================================================
 * Sales Module - static/css/sales.css
 * Styles for: New/Edit Sale forms, Sales list, Invoice view
 * ========================================================= */

/* ---------- Shared cards ---------- */
.card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
    color: #1f2937;
}

/* ---------- Sale form: product table ---------- */
#productTable {
    margin-bottom: 0;
}

#productTable thead th {
    background-color: #f8f9fa;
    color: #4b5563;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

#productTable td {
    vertical-align: middle;
}

#productTable select.form-select,
#productTable input.form-control {
    min-width: 110px;
}

/* Readonly / auto-filled fields (stock, price, total) */
#productTable input.stock,
#productTable input.price,
#productTable input.total {
    background-color: #f3f4f6;
    color: #374151;
    font-weight: 500;
    text-align: right;
    border-color: #e5e7eb;
}

#productTable input.total {
    color: #0f5132;
    font-weight: 700;
}

#productTable input.qty {
    text-align: center;
    font-weight: 600;
}

#productTable tbody tr:hover {
    background-color: #fbfbfd;
}

/* Remove row button */
#productTable .btn-danger {
    padding: 0.25rem 0.6rem;
    line-height: 1;
}

/* Add product button */
.card-header .btn-success {
    border-radius: 20px;
    font-weight: 500;
}

/* ---------- Live order summary box (injected by sales.js) ---------- */
#saleSummaryBox {
    background: #fbfbfd !important;
    border: 1px solid #eef0f2 !important;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #4b5563;
}

#saleSummaryBox div {
    padding: 0.15rem 0;
}

#saleSummaryBox .fs-5 {
    border-top: 1px dashed #d1d5db;
    margin-top: 0.4rem;
    padding-top: 0.5rem;
    color: #1f2937;
}

#saleSummaryBox #sumGrandTotal {
    color: #0d6efd;
}

#saleSummaryBox #sumDue {
    font-weight: 700;
}

/* ---------- Sales list page ---------- */
.table-hover tbody tr:hover {
    background-color: #f8f9fb;
}

.table td .badge {
    font-size: 0.78rem;
    padding: 0.45em 0.75em;
    font-weight: 600;
}

.table .btn-sm {
    margin-right: 2px;
}

/* ---------- Invoice view ---------- */
.invoice-card {
    border-radius: 14px;
}

.invoice-card .table thead.table-dark th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.invoice-card h3,
.invoice-card h5 {
    color: #1f2937;
}



/* ---------- Responsive tweaks ---------- */
@media (max-width: 767.98px) {
    #productTable select.form-select,
    #productTable input.form-control {
        min-width: 90px;
        font-size: 0.85rem;
    }

    #saleSummaryBox {
        text-align: left !important;
    }
}
/* ===========================
   Print Only
=========================== */

@media print{

    .navbar,
    .sidebar,
    .page-content,
    .inv-actions,
    .no-print{
        display:none !important;
    }

    body{
        margin:0;
        padding:0;
        background:#fff !important;
    }

    .invoice-wrap{
        padding:0 !important;
        margin:0 !important;
        background:#fff !important;
    }

    .sheet{
        width:100% !important;
        max-width:100% !important;
        margin:0 !important;
        box-shadow:none !important;
    }

}