/* Shared visual treatment for purchases, stock transfers, and stock adjustments. */
.operations-page {
    min-height: calc(100vh - 50px);
    background: #f6f8fc;
}

.operations-page-header {
    padding: 24px 24px 16px;
}

.operations-page-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}

.operations-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 13px;
    font-size: 19px;
    box-shadow: inset 0 0 0 1px rgba(23, 105, 232, 0.07);
}

.adjustment-icon {
    background: #eeeafd;
    color: #7255d9;
}

.transfer-icon {
    background: #e8f7f7;
    color: #159a9c;
}

.return-icon {
    background: #fff3e4;
    color: #d9891d;
}

.purchase-icon {
    background: #eaf2ff;
    color: #1769e8;
}

.operations-page-header h1 {
    margin: 0 0 4px;
    color: #172542;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.2;
}

.operations-page-header p {
    margin: 0;
    color: #758099;
    font-size: 13px;
}

.operations-shortcut-icon {
    margin-left: 4px;
    padding: 8px;
    border-radius: 8px;
    background: #eef2f7;
    color: #66728a !important;
    cursor: help;
}

.operations-page-content {
    padding: 0 24px 24px;
}

.operations-page-content > .box,
.operations-page-content > form > .box,
.operations-page-content .operations-card,
.operations-page-content .operation-card,
.operations-filters > .box {
    margin-bottom: 18px;
    overflow: visible;
    border: 1px solid #e5eaf2;
    border-top: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(22, 39, 75, 0.06);
}

.operations-page-content > .box > .box-header,
.operations-page-content > form > .box > .box-header,
.operations-page-content .operations-card > .box-header,
.operations-page-content .operation-card > .box-header,
.operations-filters > .box > .box-header {
    min-height: 62px;
    padding: 17px 20px;
    border-bottom: 1px solid #edf0f5;
    border-radius: 12px 12px 0 0;
}

.operations-page .box-header .box-title {
    color: #263754;
    font-size: 16px;
    font-weight: 700;
    line-height: 28px;
}

.operations-page-content > .box > .box-body,
.operations-page-content > form > .box > .box-body,
.operations-page-content .operations-card > .box-body,
.operations-page-content .operation-card > .box-body,
.operations-filters > .box > .box-body {
    padding: 20px;
}

.operations-card-tools {
    top: 13px !important;
    right: 18px !important;
}

.operations-tool-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.operations-primary-button,
.operations-save-button,
.operations-print-button,
.operations-return-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 0 !important;
    padding: 9px 16px;
    border: 0;
    border-radius: 7px;
    box-shadow: 0 6px 14px rgba(23, 105, 232, 0.18);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.operations-primary-button,
.operations-print-button {
    background: linear-gradient(135deg, #2376ec, #1262df);
}

.operations-save-button {
    background: linear-gradient(135deg, #27bf7a, #17a765);
    box-shadow: 0 6px 14px rgba(28, 174, 105, 0.2);
}

.operations-return-button {
    background: linear-gradient(135deg, #f1a43b, #df8718);
    box-shadow: 0 6px 14px rgba(223, 135, 24, 0.18);
}

.operations-primary-button:hover,
.operations-primary-button:focus,
.operations-print-button:hover,
.operations-print-button:focus {
    background: linear-gradient(135deg, #1268e7, #0d57cb);
    color: #fff;
}

.operations-save-button:hover,
.operations-save-button:focus {
    background: linear-gradient(135deg, #1fb36f, #11965a);
    color: #fff;
}

.operations-return-button:hover,
.operations-return-button:focus {
    background: linear-gradient(135deg, #e99627, #cc7710);
    color: #fff;
}

.operations-page .form-group > label {
    margin-bottom: 7px;
    color: #35435e;
    font-size: 12px;
    font-weight: 600;
}

.operations-page .form-control,
.operations-page .select2-container .select2-selection--single {
    min-height: 40px;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: #273650;
    font-size: 12px;
}

.operations-page textarea.form-control {
    min-height: 82px;
    resize: vertical;
}

.operations-page .form-control:focus,
.operations-page .select2-container--focus .select2-selection--single {
    border-color: #8bb3ee;
    box-shadow: 0 0 0 3px rgba(23, 105, 232, 0.09);
}

.operations-page .input-group-addon {
    border-color: #dfe5ef;
    border-radius: 8px 0 0 8px;
    background: #f4f7fb;
    color: #63708a;
}

.operations-page .input-group .form-control:last-child {
    border-radius: 0 8px 8px 0;
}

.operations-page .help-block {
    color: #8791a5;
    font-size: 10px;
    line-height: 1.45;
}

.operations-filters .box {
    border-top: 1px solid #e5eaf2;
}

.operations-filters .box-header {
    background: #fbfcfe;
}

/*.operations-filters .box-title::before {
    margin-right: 7px;
    color: #1769e8;
    font-family: FontAwesome;
    content: '\f0b0';
}*/

.operations-filters .form-group {
    margin-bottom: 14px;
}

.operations-table-wrap,
.operation-lines-wrap {
    overflow-x: auto;
    border-radius: 9px;
}

.operations-table.dataTable tbody td {
    vertical-align: middle;
}

.operations-table.dataTable thead th:last-child,
.operations-table.dataTable tbody td:last-child {
    min-width: 145px;
}

.operation-products-card > .box-header {
    background: #fbfcfe;
}

.operation-products-card > .box-header .box-title::before {
    display: inline-block;
    margin-right: 8px;
    color: #1769e8;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: '\f1b3';
}

.operation-products-card .input-group {
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
}

.operation-lines-table,
#purchase_entry_table,
#stock_adjustment_product_table,
#stock_return_products_table {
    min-width: 760px;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e7f0;
    border-radius: 9px;
    background: #fff;
}

.operation-lines-table thead th,
#purchase_entry_table thead th,
#stock_adjustment_product_table thead th,
#stock_return_products_table thead th {
    padding: 11px 9px;
    vertical-align: middle;
    border-top: 0 !important;
    border-right: 1px solid #e1e6ef !important;
    border-bottom: 1px solid #dfe5ef !important;
    background: #f4f6fa !important;
    color: #40506e !important;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.operation-lines-table tbody td,
#purchase_entry_table tbody td,
#stock_adjustment_product_table tbody td,
#stock_return_products_table tbody td {
    padding: 9px;
    vertical-align: middle;
    border-top: 1px solid #e7ebf2;
    border-right: 1px solid #e7ebf2;
    color: #34415e;
    font-size: 11px;
}

.operation-lines-table tfoot td,
#purchase_entry_table tfoot td,
#stock_adjustment_product_table tfoot td,
#stock_return_products_table tfoot td {
    padding: 10px;
    border-top: 1px solid #dfe5ef;
    background: #f8fafc;
    color: #33415c;
    font-size: 11px;
}

.operation-lines-table .form-control,
#purchase_entry_table .form-control,
#stock_adjustment_product_table .form-control,
#stock_return_products_table .form-control {
    min-width: 72px;
    min-height: 34px;
    height: 34px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
}
 

.operation-summary-card .text-right > b,
.purchase-form-page #grand_total,
.purchase-form-page #payment_due,
.stock-transfer-form-page #final_total_text {
    color: #1d3154;
    font-size: 15px;
    font-weight: 700;
}

.purchase-form-page .multi-input {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 58%);
    width: 100%;
}

.purchase-form-page .purchase-field-label {
    grid-column: 1 / -1;
    margin-bottom: 7px;
    color: #35435e;
    font-size: 12px;
    font-weight: 600;
}

.purchase-form-page .purchase-field-label label {
    margin: 0;
}

.purchase-form-page .multi-input > .form-control {
    width: 100% !important;
    float: none !important;
}

.purchase-form-page .multi-input > .form-control:first-of-type {
    border-radius: 8px 0 0 8px;
}

.purchase-form-page .multi-input > .form-control:last-child {
    margin-left: -1px;
    border-radius: 0 8px 8px 0;
}

.purchase-supplier-input .input-group-addon {
    width: 42px;
    padding: 0;
    text-align: center;
    background: #f2f6fc;
    color: #62708a;
}

.purchase-supplier-input .select2-container,
.purchase-supplier-input > .form-control {
    width: 100% !important;
}

.purchase-add-supplier {
    width: 42px;
    height: 40px;
    padding: 0;
    border: 1px solid #1769e8;
    border-radius: 0 8px 8px 0 !important;
    background: #1769e8 !important;
    color: #fff !important;
}

.purchase-add-supplier:hover,
.purchase-add-supplier:focus {
    border-color: #0f5fd8;
    background: #0f5fd8 !important;
}

.purchase-address-label {
    display: block;
    margin: 1px 0 5px;
    color: #45536c;
    font-size: 11px;
}

.purchase-supplier-address {
    min-height: 44px;
    padding: 8px 10px;
    border-left: 3px solid #8eb7ef;
    border-radius: 0 7px 7px 0;
    background: #f6f9fe;
    color: #5b6880;
    font-size: 10px;
    line-height: 1.4;
}

.purchase-order-row {
    margin-top: 5px;
}

.purchase-order-column .select2-container {
    width: 100% !important;
}

.purchase-order-column .select2-selection--multiple {
    min-height: 42px;
    padding: 3px 7px;
    border: 1px solid #dfe5ef !important;
    border-radius: 8px !important;
    background: #fff;
}

.purchase-order-column .select2-selection__choice {
    border: 0 !important;
    border-radius: 5px !important;
    background: #eaf2ff !important;
    color: #295b9f !important;
    font-size: 10px;
}

.purchase-product-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid #e4e9f1;
    border-radius: 10px;
    background: #f8fafc;
}

.purchase-product-toolbar > [class*='col-'] {
    width: auto;
    padding: 0;
    float: none;
}

.purchase-product-toolbar > .col-sm-8 {
    min-width: 240px;
    flex: 1 1 auto;
}

.purchase-product-toolbar .form-group {
    margin: 0;
}

.purchase-import-button,
.purchase-new-product-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.purchase-import-button {
    border: 0;
    background: #1769e8;
    box-shadow: 0 5px 12px rgba(23, 105, 232, 0.18);
    color: #fff;
}

.purchase-import-button i,
.purchase-new-product-button i {
    margin-right: 6px;
}

.purchase-new-product-button {
    border: 1px solid #b9d2f5;
    background: #eef5ff;
    color: #1769e8;
}

.purchase-new-product-button:hover,
.purchase-new-product-button:focus {
    border-color: #8eb7ef;
    background: #e3efff;
    color: #0f5fd8;
}

.purchase-form-page #upload_document {
    width: 100%;
    padding: 7px;
    border: 1px dashed #cad4e3;
    border-radius: 7px;
    background: #fbfcfe;
    font-size: 10px;
}

.purchase-form-page #purchase_entry_table {
    min-width: 1500px;
}

.purchase-form-page .payment_row {
    margin: 0;
    padding: 2px 0 0;
}

/* Detail and status modals. */
.operation-detail-dialog {
    width: min(1180px, calc(100% - 30px));
    margin: 30px auto;
}

.operation-detail-content,
.operation-status-content,
.operation-import-content {
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(10, 25, 55, 0.24);
}

.operation-detail-header,
.operation-status-header {
    display: flex;
    align-items: center;
    min-height: 68px;
    padding: 15px 20px;
    border-bottom: 1px solid #e9edf4;
    background: #fff;
}

.operation-detail-header::before,
.operation-detail-header::after,
.operation-status-header::before,
.operation-status-header::after {
    display: none;
    content: none;
}

.operation-detail-header .modal-title,
.operation-status-header .modal-title {
    order: 1;
    margin: 0;
    color: #172542;
    font-size: 17px;
    font-weight: 700;
}

.operation-detail-header .close,
.operation-status-header .close {
    order: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 0 0 auto;
    padding: 0;
    border-radius: 8px;
    background: #f4f6f9;
    color: #536078;
    opacity: 1;
    text-shadow: none;
}

.operation-detail-body,
.operation-import-body {
    max-height: calc(100vh - 190px);
    padding: 20px;
    overflow-y: auto;
    background: #fbfcfe;
}

.operation-detail-body .invoice-info {
    margin: 0 0 17px;
    padding: 15px 8px;
    border: 1px solid #e4e9f1;
    border-radius: 9px;
    background: #fff;
}

.operation-detail-body .table-responsive {
    border: 1px solid #e3e8f1;
    border-radius: 8px;
}

.operation-detail-body .table {
    margin-bottom: 0;
}

.operation-detail-body .table th,
.operation-detail-body .table td {
    padding: 9px 10px;
    border-right: 1px solid #e5eaf1;
    font-size: 11px;
    vertical-align: middle;
}

.operation-detail-body .bg-green {
    background: #edf8f2 !important;
    color: #26794f !important;
}

.operation-detail-footer,
.operation-status-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #e9edf4;
    background: #fff;
}

.operation-detail-footer::before,
.operation-detail-footer::after,
.operation-status-footer::before,
.operation-status-footer::after {
    display: none;
}

.operation-status-dialog {
    width: min(520px, calc(100% - 30px));
    margin: 60px auto;
}

.operation-status-body {
    padding: 22px;
    background: #fbfcfe;
}

.operation-status-body .form-control {
    min-height: 42px;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    box-shadow: none;
}

.operation-import-dialog {
    width: min(860px, calc(100% - 30px));
    margin: 35px auto;
}

.operation-import-body .dropzone {
    margin: 10px 0 15px;
    border: 1px dashed #b8c8dc;
    border-radius: 10px;
    background: #f7faff;
}

.operation-import-table-wrap {
    max-height: 340px;
    overflow: auto;
    border: 1px solid #e3e8f1;
    border-radius: 8px;
}

.operation-import-table {
    margin: 0;
}

.operation-import-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f6fa;
}

.operation-import-table th,
.operation-import-table td {
    padding: 9px 11px;
    border-right: 1px solid #e5eaf1;
    font-size: 11px;
}

@media (max-width: 767px) {
    .operations-page-header {
        padding: 18px 14px 12px;
    }

    .operations-page-header h1 {
        font-size: 22px;
    }

    .operations-page-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 11px;
        font-size: 17px;
    }

    .operations-page-content {
        padding: 0 12px 18px;
    }

    .operations-page-content > .box > .box-body,
    .operations-page-content > form > .box > .box-body,
    .operations-page-content .operations-card > .box-body,
    .operations-page-content .operation-card > .box-body,
    .operations-filters > .box > .box-body {
        padding: 14px 12px;
    }

    .operations-card-tools {
        right: 12px !important;
    }

    .operations-tool-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .purchase-product-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 9px;
    }

    .purchase-product-toolbar > [class*='col-'],
    .purchase-product-toolbar > .col-sm-8,
    .purchase-import-button,
    .purchase-new-product-button {
        width: 100%;
        min-width: 0;
    }

    .purchase-order-column {
        width: 100%;
    }

    .operation-detail-dialog,
    .operation-status-dialog,
    .operation-import-dialog {
        width: calc(100% - 20px);
        margin: 20px auto;
    }

    .operation-detail-header,
    .operation-status-header {
        padding: 13px 14px;
    }

    .operation-detail-body,
    .operation-import-body {
        padding: 14px;
    }
}

@media print {
    .operations-page,
    .operations-page-content {
        min-height: 0;
        padding: 0 !important;
        background: #fff !important;
    }

    .operations-page .box,
    .operation-detail-content {
        border: 0 !important;
        box-shadow: none !important;
    }

    .purchase-activities,
    .purchase-detail-content .operation-detail-footer {
        display: none !important;
    }

    .purchase-detail-dialog {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    .purchase-detail-content {
        width: 100% !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
        zoom: 78%;
    }

    .purchase-detail-content .operation-detail-header {
        min-height: 0 !important;
        padding: 3px 6px !important;
        border-bottom: 1px solid #bbb !important;
    }

    .purchase-detail-content .operation-detail-header .modal-title {
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    .purchase-detail-content .operation-detail-body {
        max-height: none !important;
        padding: 4px 5px !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .purchase-detail-content .row {
        margin-right: -3px !important;
        margin-left: -3px !important;
    }

    .purchase-detail-content [class*='col-'] {
        padding-right: 3px !important;
        padding-left: 3px !important;
    }

    .purchase-detail-content .invoice-info {
        margin-bottom: 4px !important;
        padding: 3px !important;
        border: 0 !important;
    }

    .purchase-detail-content address,
    .purchase-detail-content p,
    .purchase-detail-content .well {
        margin-bottom: 3px !important;
        padding: 2px 4px !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
    }

    .purchase-detail-content .table-responsive {
        margin-bottom: 3px !important;
        overflow: visible !important;
        border-radius: 0 !important;
    }

    .purchase-detail-content .table {
        margin-bottom: 3px !important;
    }

    .purchase-detail-content .table th,
    .purchase-detail-content .table td {
        height: auto !important;
        padding: 2px 3px !important;
        font-size: 8px !important;
        line-height: 1.1 !important;
    }

    .purchase-detail-content hr {
        margin: 3px 0 !important;
    }

    .purchase-detail-content .print_section img {
        width: auto !important;
        max-height: 28px !important;
        margin-top: 2px !important;
    }
}

/* Expenses use the same operation design language as stock transfers. */
.expense-icon {
    background: #fff0f1;
    color: #d94b5d;
}

.expense-category-icon {
    background: #fff3e4;
    color: #d9891d;
}

 
 

.expense-form-page #upload_document {
    width: 100%;
    padding: 7px;
    border: 1px dashed #cad4e3;
    border-radius: 7px;
    background: #fbfcfe;
    font-size: 10px;
}

.expense-form-page #purchase_entry_table {
    min-width: 720px;
}

.expense-form-page #purchase_entry_table td:nth-child(2) .form-control,
.expense-quick-add-dialog #expense_modal_items_table td:nth-child(2) .form-control {
    min-width: 240px;
}

.expense-add-item-button {
    margin-top: 12px !important;
}

.expense-submit-button {
    min-width: 130px;
    margin-bottom: 18px !important;
}

.expense-form-page #payment_due,
.expense-quick-add-dialog #expense_payment_due {
    display: inline-block;
    margin-left: 7px;
    padding: 6px 10px;
    border-radius: 7px;
    background: #fff1f3;
    color: #d94b5d;
    font-size: 15px;
    font-weight: 700;
}

.expense-form-page .payment_row,
.expense-quick-add-dialog .payment_row {
    margin: 0;
    padding: 14px;
    border: 1px solid #e4e9f1;
    border-radius: 9px;
    background: #fff;
}

.expense-quick-add-dialog {
    width: min(980px, calc(100% - 30px));
}

.expense-quick-add-body .form-group > label {
    margin-bottom: 7px;
    color: #35435e;
    font-size: 12px;
    font-weight: 600;
}

.expense-quick-add-body .form-control,
.expense-quick-add-body .select2-container .select2-selection--single {
    min-height: 40px;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    box-shadow: none;
    font-size: 12px;
}

.expense-quick-add-body textarea.form-control {
    min-height: 82px;
}

.expense-quick-add-body .input-group-addon {
    border-color: #dfe5ef;
    background: #f4f7fb;
    color: #63708a;
}

.expense-quick-add-body .help-block {
    color: #8791a5;
    font-size: 10px;
}

.expense-quick-add-body .operation-lines-table {
    min-width: 720px;
}

.expense-detail-body > .row:first-of-type p {
    margin: 0 0 14px;
    padding: 8px 11px;
    border-radius: 7px;
    background: #eef5ff;
    color: #345d91;
}

.expense-detail-body .invoice-col address {
    margin: 6px 0 0;
    line-height: 1.5;
}

.expense-detail-page .operation-detail-title {
    margin: 0 0 16px;
    padding: 14px 17px;
    border: 1px solid #e5eaf2;
    border-radius: 10px;
    background: #fff;
    color: #263754;
    font-size: 18px;
}

.expense-detail-page .operations-page-content > .row {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #e5eaf2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(22, 39, 75, 0.05);
}

.expense-detail-dialog {
    width: min(1160px, calc(100% - 30px));
}

.expense-detail-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.expense-detail-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff0f1;
    color: #d94b5d;
    font-size: 16px;
}

.expense-detail-heading .modal-title {
    margin: 0 0 2px;
    color: #1d2d4b;
    font-size: 17px;
    font-weight: 700;
}

.expense-detail-heading > div > span {
    color: #7b879b;
    font-size: 11px;
}

.expense-detail-info {
    display: flex;
    flex-wrap: wrap;
    padding: 0 !important;
    overflow: hidden;
}

.expense-detail-info-column {
    min-height: 100%;
    padding: 17px 18px !important;
}

.expense-detail-info-column + .expense-detail-info-column {
    border-left: 1px solid #e6ebf2;
}

.expense-detail-info-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    color: #2e4263;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.expense-detail-info-label i {
    color: #1769e8;
}

.expense-detail-info address {
    margin: 0 !important;
    color: #55637b;
    font-size: 11px;
}

.expense-detail-info address strong {
    color: #243754;
    font-size: 12px;
}

.expense-detail-meta {
    margin: 0;
}

.expense-detail-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px dashed #e5eaf1;
}

.expense-detail-meta > div:last-child {
    border-bottom: 0;
}

.expense-detail-meta dt,
.expense-detail-meta dd {
    margin: 0;
    font-size: 11px;
}

.expense-detail-meta dt {
    color: #748097;
    font-weight: 500;
}

.expense-detail-meta dd {
    color: #263b5c;
    font-weight: 700;
    text-align: right;
}

.expense-document-button {
    margin-top: 10px;
    border-radius: 7px;
}

.expense-detail-section {
    margin: 16px 0 0;
    padding: 14px;
    border: 1px solid #e3e8f1;
    border-radius: 10px;
    background: #fff;
}

.expense-detail-section-heading {
    margin-bottom: 12px;
}

.expense-detail-section-heading > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.expense-detail-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eaf2ff;
    color: #1769e8;
    font-size: 12px;
}

.expense-payment-icon {
    background: #eaf8f1;
    color: #249765;
}

.expense-detail-section-heading h5 {
    margin: 0;
    color: #243754;
    font-size: 13px;
    font-weight: 700;
}

.expense-detail-section-heading small {
    display: block;
    margin-top: 2px;
    color: #8a94a7;
    font-size: 10px;
}

.expense-detail-items-table {
    min-width: 690px;
}

.expense-detail-items-table th:first-child,
.expense-detail-items-table td:first-child {
    width: 46px;
}

.expense-detail-items-table .expense-item-description {
    min-width: 260px;
    color: #263b5c;
    font-weight: 600;
}

.expense-detail-items-table .expense-item-subtotal {
    color: #1769e8;
    font-weight: 700;
}

.expense-items-empty {
    padding: 25px !important;
    color: #8a94a7 !important;
}

.expense-items-empty i,
.expense-items-empty span {
    display: block;
}

.expense-items-empty i {
    margin-bottom: 7px;
    color: #b4bdcb;
    font-size: 20px;
}

.expense-detail-payment-table th,
.expense-detail-payment-table td {
    white-space: nowrap;
}

.expense-detail-bottom {
    margin-top: 16px;
}

.expense-detail-note-card {
    min-height: 98px;
    padding: 14px;
    border: 1px solid #e3e8f1;
    border-radius: 9px;
    background: #fff;
}

.expense-detail-note-card > span {
    display: block;
    margin-bottom: 9px;
    color: #6f7c92;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.expense-detail-note-card > span i {
    margin-right: 5px;
    color: #1769e8;
}

.expense-detail-note-card strong,
.expense-detail-note-card p {
    margin: 0;
    color: #293c5b;
    font-size: 12px;
    line-height: 1.55;
}

.expense-summary-wrap {
    border-color: #dce5f1 !important;
    background: #fff;
}

.expense-summary-table th,
.expense-summary-table td {
    padding: 10px 12px !important;
}

.expense-summary-table th {
    color: #65728a;
    font-weight: 600;
}

.expense-summary-table td {
    color: #2d4161;
    font-weight: 700;
}

.expense-summary-table .expense-summary-total th,
.expense-summary-table .expense-summary-total td {
    border-top: 2px solid #cfe0f7;
    background: #eef5ff;
    color: #155ebd;
    font-size: 13px;
}

.expense-activities-section {
    padding-bottom: 5px;
}

.expense-detail-barcode {
    margin-top: 16px;
}

@media (max-width: 767px) {
    .expense-quick-add-dialog {
        width: calc(100% - 16px);
    }

    .expense-detail-dialog {
        width: calc(100% - 16px);
        margin: 8px auto;
    }

    .expense-detail-info {
        display: block;
    }

    .expense-detail-info-column + .expense-detail-info-column {
        border-top: 1px solid #e6ebf2;
        border-left: 0;
    }

    .expense-detail-note-card {
        min-height: 0;
        margin-bottom: 12px;
    }
}

/* CRM pages are decorated with operation components by crm-operations-theme.js. */
.crm-operations-page .operations-page-header > h1,
.crm-operations-theme .content-header > h1 {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0;
    color: #172542;
    font-size: 27px;
    font-weight: 700;
}

.crm-operations-page .operations-page-header > h1::before,
.crm-operations-theme .content-header > h1::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: #eaf2ff;
    color: #1769e8;
    font-family: 'Font Awesome 5 Free';
    font-size: 18px;
    font-weight: 900;
    content: '\f519';
}

.crm-operations-page .operations-page-header > h1 small,
.crm-operations-theme .content-header > h1 small {
    color: #758099;
    font-size: 13px;
    font-weight: 400;
}

.crm-module-nav-wrap {
    padding: 0 15px;
}

.crm-module-nav {
    min-height: 60px;
    margin: 4px 0 0 !important;
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(22, 39, 75, 0.06);
}

.crm-module-nav .navbar-header {
    min-height: 59px;
}

.crm-module-nav .navbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 59px;
    padding-top: 8px;
    padding-bottom: 8px;
    color: #263754;
    font-weight: 700;
}

.crm-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 37px;
    height: 37px;
    border-radius: 10px;
    background: #eaf2ff;
    color: #1769e8;
}

.crm-module-nav .navbar-nav > li > a {
    margin: 9px 2px;
    padding: 11px 12px;
    border-radius: 8px;
    color: #59677f;
    font-size: 12px;
    font-weight: 600;
}

.crm-module-nav .navbar-nav > li > a:hover,
.crm-module-nav .navbar-nav > li > a:focus {
    background: #f1f5fb;
    color: #1769e8;
}

.crm-module-nav .navbar-nav > .active > a,
.crm-module-nav .navbar-nav > .active > a:hover,
.crm-module-nav .navbar-nav > .active > a:focus {
    background: #eaf2ff;
    color: #1769e8;
}

.crm-module-nav .navbar-toggle {
    margin-top: 12px;
    border-color: #dfe5ef;
    border-radius: 8px;
}

.crm-module-nav .dropdown-menu {
    min-width: 205px;
    padding: 7px;
    border: 1px solid #e3e8f1;
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(10, 25, 55, 0.16);
}

.crm-module-nav .dropdown-menu > a {
    display: block;
    padding: 9px 11px;
    border-radius: 7px;
    color: #46546d;
}

.crm-module-nav .dropdown-menu > a:hover {
    background: #eaf2ff;
    color: #1769e8;
}

.crm-operations-theme .operations-tabs {
    margin-bottom: 18px;
}

.crm-operations-theme .info-box,
.crm-operations-theme .small-box {
    overflow: hidden;
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(22, 39, 75, 0.06);
}

.crm-operations-theme .info-box {
    min-height: 96px;
    background: #fff;
}

.crm-operations-theme .operation-detail-body .form-group > label {
    margin-bottom: 7px;
    color: #35435e;
    font-size: 12px;
    font-weight: 600;
}

.crm-operations-theme .operation-detail-body .form-control,
.crm-operations-theme .operation-detail-body .select2-container .select2-selection--single {
    min-height: 40px;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    box-shadow: none;
}

.crm-portal-theme .main-header .navbar,
.crm-portal-theme .main-header .logo {
    box-shadow: 0 3px 12px rgba(20, 43, 80, 0.08);
}

.crm-portal-theme .main-sidebar {
    box-shadow: 4px 0 18px rgba(20, 43, 80, 0.08);
}

.crm-portal-theme .sidebar-menu > li > a {
    margin: 3px 9px;
    border-radius: 8px;
}

.crm-standalone-theme {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background: #f6f8fc;
    color: #172542;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

.crm-module-landing {
    width: min(540px, calc(100% - 30px));
    padding: 45px;
    border: 1px solid #e5eaf2;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(22, 39, 75, 0.11);
    text-align: center;
}

.crm-landing-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: #eaf2ff;
    color: #1769e8;
    font-size: 23px;
}

.crm-module-landing h1 {
    margin: 17px 0 8px;
}

.crm-module-landing p {
    margin: 0;
    color: #758099;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .crm-module-nav-wrap {
        padding: 0 8px;
    }

    .crm-module-nav .navbar-nav > li > a {
        margin: 3px 8px;
    }

    .crm-operations-page .operations-page-header > h1,
    .crm-operations-theme .content-header > h1 {
        font-size: 23px;
    }
}

/* Accounts and accounting reports share the operations visual system. */
.account-icon {
    background: #eaf2ff;
    color: #1769e8;
}

.account-flow-icon {
    background: #e8f7f7;
    color: #159a9c;
}

.account-report-icon {
    background: #eeeafd;
    color: #7255d9;
}

.operations-tabs {
    overflow: hidden;
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(22, 39, 75, 0.06);
}

.operations-tabs > .nav-tabs {
    display: flex;
    flex-wrap: wrap;
    padding: 11px 13px 0;
    border-bottom: 1px solid #edf0f5;
    background: #fbfcfe;
}

.operations-tabs > .nav-tabs > li {
    margin: 0 6px 10px 0;
    border: 0;
}

.operations-tabs > .nav-tabs > li > a {
    margin: 0;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #647189;
    font-size: 12px;
}

.operations-tabs > .nav-tabs > li.active > a {
    border-color: #cfe0fa;
    background: #eaf2ff;
    color: #1769e8;
}

.operations-tabs > .tab-content {
    padding: 18px;
}

.account-toolbar-card {
    border: 0 !important;
    box-shadow: none !important;
}

.account-toolbar-card > .box-body {
    padding: 10px 0 !important;
}

.account-summary-card {
    border-left: 3px solid #35b578 !important;
}

.account-summary-card #account_balance {
    color: #168c5a;
    font-size: 18px;
    font-weight: 700;
}

.account-filter-card {
    border-left: 3px solid #72a6ee !important;
}

.account-report-card {
    overflow: hidden !important;
}

.account-statement-wrap {
    border: 1px solid #e3e8f1;
}

.account-statement-table {
    min-width: 680px;
}

.account-statement-table > thead > tr > th {
    background: #eef4fd !important;
    color: #2c527f !important;
    font-size: 11px;
    text-align: center;
}

.account-statement-table table {
    min-width: 0;
    border: 1px solid #e5eaf2;
    border-radius: 7px;
}

.account-statement-table .remote-data,
.account-statement-table #total_assets,
.account-statement-table #total_liabilty,
.account-statement-table #total_credit,
.account-statement-table #total_debit {
    color: #1c477d;
    font-weight: 700;
}

.account-editor-dialog {
    width: min(780px, calc(100% - 30px));
}

.account-editor-body .form-group > label {
    margin-bottom: 7px;
    color: #35435e;
    font-size: 12px;
    font-weight: 600;
}

.account-editor-body .form-control,
.account-editor-body .select2-container .select2-selection--single {
    min-height: 40px;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    box-shadow: none;
    font-size: 12px;
}

.account-editor-body textarea.form-control {
    min-height: 82px;
}

.account-details-table {
    min-width: 620px;
}

.account-details-table .form-control {
    min-width: 180px;
}

.account-selected-account {
    padding: 11px 13px;
    border: 1px solid #cfe0fa;
    border-radius: 8px;
    background: #eef5ff;
    color: #295785;
}

@media (max-width: 767px) {
    .account-editor-dialog {
        width: calc(100% - 16px);
    }

    .operations-tabs > .tab-content {
        padding: 12px;
    }
}

@media print {
    .account-report-page .operations-page-content {
        padding: 0;
    }

    .account-statement-table {
        min-width: 0;
    }
}

@media print {
    .expense-detail-body > .row:first-of-type p {
        padding: 4px 7px;
    }

    .expense-detail-page .operations-page-content > .row {
        margin-bottom: 6px;
        padding: 7px;
        box-shadow: none;
    }
}
