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


/* ============================================================
   BuildLedger Customer Payment Form - Uniform Sections + Spacing
   Use on:
   customer_payment Add page Custom CSS
   customer_payment Edit page Custom CSS
   customer_payment 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;
}

/* Cleaner body padding for named Customer Payment sections */
[data-itemid="bl_cp_customer"] .panel-body,
[data-itemid="bl_cp_document"] .panel-body,
[data-itemid="bl_cp_method"] .panel-body,
[data-itemid="bl_cp_currency"] .panel-body,
[data-itemid="bl_cp_remarks"] .panel-body,
[data-itemid="bl_cp_summary"] .panel-body,
[data-itemid="bl_cp_audit"] .panel-body {
    padding: 20px 28px !important;
}

/* Make section height more balanced */
[data-itemid="bl_cp_customer"] .panel,
[data-itemid="bl_cp_document"] .panel {
    min-height: 218px !important;
}

[data-itemid="bl_cp_method"] .panel,
[data-itemid="bl_cp_currency"] .panel {
    min-height: 260px !important;
}

[data-itemid="bl_cp_remarks"] .panel,
[data-itemid="bl_cp_summary"] .panel {
    min-height: 250px !important;
}

[data-itemid="bl_cp_audit"] .panel {
    min-height: 260px !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;
}

/* Extra vertical spacing for Customer Payment panels */
[data-itemid="bl_cp_customer"],
[data-itemid="bl_cp_document"],
[data-itemid="bl_cp_method"],
[data-itemid="bl_cp_currency"],
[data-itemid="bl_cp_remarks"],
[data-itemid="bl_cp_summary"],
[data-itemid="bl_cp_audit"] {
    margin-bottom: 22px !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 payment summary fields should look readonly */
input[name*="withholding_amount"],
input[name*="net_received_amount"],
input[name*="applied_amount"],
input[name*="unapplied_amount"] {
    background-color: #f7f7f7 !important;
}

/* Customer payment application computed/controlled fields */
input[name*="applied_at"] {
    background-color: #f7f7f7 !important;
}

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

/* Keep detail grid visually clean */
[data-itemtype="details_preview"] {
    clear: both !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;
    }

    [data-itemid="bl_cp_customer"] .panel,
    [data-itemid="bl_cp_document"] .panel,
    [data-itemid="bl_cp_method"] .panel,
    [data-itemid="bl_cp_currency"] .panel,
    [data-itemid="bl_cp_remarks"] .panel,
    [data-itemid="bl_cp_summary"] .panel,
    [data-itemid="bl_cp_audit"] .panel {
        min-height: auto !important;
    }
}