body {
    background-color: #f4f6f9;
    font-size: 14px;
}

.erp-main {
    padding-top: 12px;
    padding-bottom: 48px;
}

.erp-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 34px;
    line-height: 34px;
    background: #ffffff;
    border-top: 1px solid #dee2e6;
    font-size: 13px;
    color: #6c757d;
}

.erp-page-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 0;
}

.erp-card {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.erp-card-header {
    background: #0d6efd;
    color: white;
    padding: 10px 14px;
    border-radius: 8px 8px 0 0;
}

.erp-search-box {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.table th {
    white-space: nowrap;
    vertical-align: middle;
}

.table td {
    vertical-align: middle;
}

.form-label {
    font-weight: 600;
    margin-bottom: 4px;
}

.form-control,
.form-select {
    border-radius: 6px;
}

.nav-tabs .nav-link {
    font-weight: 600;
}

.erp-required::after {
    content: " *";
    color: red;
}

.erp-form-actions {
    position: sticky;
    bottom: 34px;
    background: #ffffff;
    border-top: 1px solid #dee2e6;
    padding: 10px;
    z-index: 100;
}
.erp-wizard {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.erp-wizard-step {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    background: #e9ecef;
    color: #495057;
    font-weight: 600;
    text-align: center;
}

    .erp-wizard-step.active {
        background: #0d6efd;
        color: #fff;
    }

    .erp-wizard-step.completed {
        background: #198754;
        color: #fff;
    }

.erp-tab-pane {
    display: none;
}

    .erp-tab-pane.active {
        display: block;
    }
.input-group-text {
    min-width: 125px;
    font-weight: 600;
    justify-content: center;
}
.erp-field {
    width: 100%;
}

    .erp-field .input-group {
        width: 100%;
    }

    .erp-field .form-control {
        min-width: 0;
    }

.input-group-text {
    min-width: 130px;
    font-weight: 600;
    justify-content: center;
}

/* //phần code của Codex bổ sung// */
/* Giữ nhãn và Select2 trên cùng một dòng trong Bootstrap input-group. */
.input-group > .select2-container {
    position: relative;
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}

.input-group > .select2-container .select2-selection {
    min-height: 38px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .select2-container .select2-selection--single {
    display: flex;
    align-items: center;
}

.input-group > .select2-container .select2-selection--single .select2-selection__rendered {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: .75rem;
}

.input-group > .select2-container .select2-selection--single .select2-selection__arrow {
    top: 50%;
    transform: translateY(-50%);
}

/* //phần code của Codex bổ sung// */
/* Form viết tay: một label và một control trực tiếp sẽ dùng bố cục ngang. */
.erp-horizontal-field {
    display: grid;
    grid-template-columns: minmax(130px, auto) minmax(0, 1fr);
    align-items: stretch;
}

.erp-horizontal-field > label.form-label {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    min-height: 38px;
    margin: 0;
    padding: .375rem .75rem;
    font-weight: 600;
    text-align: center;
    background-color: var(--bs-tertiary-bg, #e9ecef);
    border: var(--bs-border-width, 1px) solid var(--bs-border-color, #dee2e6);
    border-radius: var(--bs-border-radius, .375rem) 0 0 var(--bs-border-radius, .375rem);
}

.erp-horizontal-field > .form-control,
.erp-horizontal-field > .form-select,
.erp-horizontal-field > .select2-container {
    grid-column: 2;
    width: 100% !important;
    min-width: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.erp-horizontal-field > .select2-container .select2-selection {
    min-height: 38px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.erp-horizontal-field > .text-danger,
.erp-horizontal-field > .invalid-feedback,
.erp-horizontal-field > .form-text {
    grid-column: 2;
}

@media (max-width: 575.98px) {
    .input-group-text,
    .erp-horizontal-field > label.form-label {
        min-width: 115px;
        padding-right: .5rem;
        padding-left: .5rem;
    }

    .erp-horizontal-field {
        grid-template-columns: minmax(115px, auto) minmax(0, 1fr);
    }
}
.erp-select-wrapper {
    flex: 1;
}

.erp-select-wrapper .erp-select-filter {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.erp-select-wrapper select {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.erp-lookup-result {
    position: absolute;
    z-index: 2000;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    max-height: 260px;
    overflow-y: auto;
    min-width: 360px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.erp-lookup-item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

    .erp-lookup-item:hover,
    .erp-lookup-item.active {
        background: #0d6efd;
        color: #fff;
    }

.erp-lookup-code {
    font-weight: 700;
}

.erp-lookup-text {
    font-size: 13px;
}
.erp-detail-group {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #fff;
}

.erp-detail-label {
    background: #f8f9fa;
    font-weight: 600;
    padding: 7px 10px;
    border-bottom: 1px solid #dee2e6;
}

.erp-detail-value {
    padding: 8px 10px;
    min-height: 38px;
}
.erp-lookup-result {
    position: absolute;
    z-index: 3000;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    max-height: 280px;
    overflow-y: auto;
    min-width: 420px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.erp-lookup-item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

    .erp-lookup-item:hover,
    .erp-lookup-item.active {
        background: #0d6efd;
        color: #fff;
    }

.erp-lookup-code {
    font-weight: 700;
}

.erp-lookup-text {
    font-size: 13px;
}

.erp-lookup-empty {
    padding: 8px 10px;
    color: #6c757d;
}
.erp-section {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #fff;
}

.erp-section-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 14px;
}

.erp-section-title {
    font-weight: 700;
    color: #0d6efd;
}

.erp-section-subtitle {
    font-size: 13px;
    color: #6c757d;
    margin-top: 2px;
}

.erp-section-body {
    padding: 14px;
}

/* //phần code của Codex bổ sung// */
/* Menu nghiệp vụ tài sản có nhiều nhóm: giữ chiều rộng dễ đọc và cuộn trong màn hình nhỏ. */
.erp-asset-menu {
    min-width: 360px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.erp-asset-menu .dropdown-header {
    color: #0d6efd;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

@media (max-width: 991.98px) {
    .erp-asset-menu {
        min-width: 100%;
        max-height: none;
    }
}
/* //phần code của Codex bổ sung// */
