[data-page="sales_view"][data-itemid="page_image_ash8f23hr"] {
  width: 400px;
}

/* ============================================================
   Sales Invoice Form Layout
   Make the left and right boxes cleaner and aligned
============================================================ */

[data-itemid="sec_customer"],
[data-itemid="sec_document"],
[data-itemid="sec_address"],
[data-itemid="sec_currency"],
[data-itemid="sec_remarks"],
[data-itemid="sec_summary"] {
    margin-bottom: 18px !important;
}

/* Row 1: Customer and Document should align */
[data-itemid="sec_customer"],
[data-itemid="sec_document"] {
    min-height: 445px !important;
}

/* Row 2: Address and Currency should align */
[data-itemid="sec_address"],
[data-itemid="sec_currency"] {
    min-height: 315px !important;
}

/* Row 3: Remarks and Summary should align */
[data-itemid="sec_remarks"],
[data-itemid="sec_summary"] {
    min-height: 230px !important;
}

/* Add cleaner spacing inside panels */
[data-itemid="sec_customer"] .panel-body,
[data-itemid="sec_document"] .panel-body,
[data-itemid="sec_address"] .panel-body,
[data-itemid="sec_currency"] .panel-body,
[data-itemid="sec_remarks"] .panel-body,
[data-itemid="sec_summary"] .panel-body {
    padding: 22px 28px !important;
}

/* Make form controls consistent width */
[data-pageid] input,
[data-pageid] select,
[data-pageid] textarea {
    max-width: 100%;
}

/* Detail grid should stay full width */
[data-itemid*="sales_detail"] {
    clear: both !important;
    width: 100% !important;
    margin-top: 20px !important;
}
/* ============================================================
   BuildLedger Sales Form - Uniform Sections + Better Spacing
   Use on:
   sales Add page Custom CSS
   sales Edit page Custom CSS
   sales View page Custom CSS
   ============================================================ */

/* Main panels */
.panel {
    margin-bottom: 22px !important;
    border-radius: 4px !important;
    border: 1px solid #dddddd !important;
    box-shadow: none !important;
}

/* Panel title */
.panel-heading {
    font-size: 15px !important;
    font-weight: 600 !important;
    padding: 10px 14px !important;
    background: linear-gradient(#f7f7f7, #e9e9e9) !important;
}

/* Panel body */
.panel-body {
    padding: 20px 28px !important;
}

/* Field spacing inside section */
.form-group {
    margin-bottom: 14px !important;
}

/* Inputs */
.form-control {
    max-width: 100% !important;
}

textarea.form-control {
    min-height: 92px !important;
}

/* Add space between left and right columns */
.rnr-c,
.bs-gridcell,
[data-cellid],
[data-pageid] .bs-gridcell {
    padding-left: 14px !important;
    padding-right: 14px !important;
}

/* Avoid first and last columns touching outer edge */
.rnr-c:first-child,
.bs-gridcell:first-child {
    padding-left: 0 !important;
}

.rnr-c:last-child,
.bs-gridcell:last-child {
    padding-right: 0 !important;
}

/* Details grid container */
[data-itemtype="details_preview"],
[data-itemtype="details"],
.r-details-wrapper,
.details-grid {
    margin-top: 28px !important;
    margin-bottom: 22px !important;
}

/* Details grid panel */
[data-itemtype="details_preview"] .panel,
[data-itemtype="details"] .panel,
.r-details-wrapper .panel {
    margin-top: 12px !important;
}

/* Details grid table */
.rnr-gridtable,
.table {
    margin-top: 10px !important;
}

/* Details table cells */
.rnr-gridtable th,
.rnr-gridtable td,
.table th,
.table td {
    padding: 8px 10px !important;
    vertical-align: middle !important;
}

/* Computed amount columns should look readonly */
input[name*="gross_amount"],
input[name*="vat_amount"],
input[name*="line_total_amount"],
input[name*="withholding_amount"],
input[name*="line_no"] {
    background-color: #f7f7f7 !important;
}

/* Improve page width spacing */
.container,
.bs-pagepanel {
    max-width: 1280px !important;
}

/* Mobile fallback */
@media (max-width: 991px) {
    .rnr-c,
    .bs-gridcell,
    [data-cellid],
    [data-pageid] .bs-gridcell {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .panel {
        margin-bottom: 18px !important;
    }
}