/* Metronic bootstrap5 Select2 (plugins.bundle.css) */
.select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--selected:after {
    all: unset !important;
}

/* Inline order result alerts under Đặt hàng button */
#order-form-alert {
    max-height: 220px;
    overflow-y: auto;
}
#order-form-alert .order-form-alert-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.925rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}
#order-form-alert .order-form-alert-item:last-child {
    margin-bottom: 0;
}
#order-form-alert .order-form-alert-item i {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    margin: 0;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    vertical-align: middle;
}
#order-form-alert .order-form-alert-item span {
    display: inline-block;
    line-height: 1.4;
    vertical-align: middle;
}
#order-form-alert .order-form-alert-item.is-success,
#order-form-alert .order-form-alert-item.is-success i {
    color: #17c653 !important;
}
#order-form-alert .order-form-alert-item.is-error,
#order-form-alert .order-form-alert-item.is-error i {
    color: #f8285a !important;
}
[data-bs-theme="dark"] #order-form-alert .order-form-alert-item.is-success,
[data-bs-theme="dark"] #order-form-alert .order-form-alert-item.is-success i {
    color: #47cd89 !important;
}

#order-form .select2-container {
    width: 100% !important;
}
#order-form .select2-container .select2-selection--single {
    min-height: 42px;
    display: flex;
    align-items: center;
    border-radius: 0.475rem !important;
    border: 1px solid var(--bs-gray-300, #dbdfe9) !important;
    background-color: var(--bs-gray-100, #f9f9f9) !important;
    padding: 0.55rem 2.4rem 0.55rem 0.85rem !important;
    box-shadow: none !important;
}
#order-form .select2-container .select2-selection--single .select2-selection__rendered {
    display: block;
    padding: 0 !important;
    line-height: 1.5;
    color: var(--bs-gray-700, #4b5675);
}
#order-form .select2-container .select2-selection--single .select2-selection__arrow {
    display: none;
}
#order-form .select2-container.select2-container--focus .select2-selection--single,
#order-form .select2-container.select2-container--open .select2-selection--single {
    border-color: var(--bs-primary, #1b84ff) !important;
}
#order-form .select2-dropdown {
    border-radius: 0.475rem !important;
}
[data-bs-theme="dark"] #order-form .select2-container .select2-selection--single {
    background-color: #1e1e2d !important;
    border-color: #323248 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] #order-form .select2-container .select2-selection--single .select2-selection__rendered {
    color: #fff !important;
}

/* Style cho dropdown menu Select2 */
.select2-dropdown {
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.select2-dropdown.order-select-dropdown .select2-search,
.select2-dropdown.order-select-dropdown .select2-search--dropdown {
    display: none !important;
}
.select2-dropdown.order-select-dropdown {
    border: 1px solid #e4e6ef;
    border-radius: 0.55rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    padding: 4px 0;
}
.select2-dropdown.order-select-dropdown .select2-results__options,
.select2-dropdown.quick-search-dropdown .select2-results__options {
    max-height: 380px;
    overflow-y: auto;
}
#order-form {
    position: relative;
}
#order-form > .select2-container--open {
    z-index: 1080 !important;
}
.select2-dropdown.order-select-dropdown .select2-results__option,
.select2-dropdown.quick-search-dropdown .select2-results__option {
    padding: 0.65rem 1.15rem !important;
    margin: 0 !important;
    min-height: 0;
    display: block;
    color: var(--bs-gray-700, #252f4a);
    line-height: 1.5;
}
.select2-dropdown.order-select-dropdown .select2-results__option--highlighted,
.select2-dropdown.quick-search-dropdown .select2-results__option--highlighted {
    background-color: var(--bs-component-hover-bg, rgba(27, 132, 255, 0.08)) !important;
    color: var(--bs-component-hover-color, #1b84ff) !important;
}
[data-bs-theme="dark"] .select2-dropdown.order-select-dropdown {
    background: #1c1c28;
    border-color: #2b2b40;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
[data-bs-theme="dark"] .select2-dropdown.order-select-dropdown .select2-results__option {
    color: #e4e6ef !important;
}
[data-bs-theme="dark"] .select2-dropdown.order-select-dropdown .select2-results__option--highlighted[aria-selected] {
    background-color: rgba(27, 132, 255, 0.18) !important;
    color: #69b4ff !important;
}

/* Thêm CSS cho loader */
.form-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(6px);
    border-radius: 0.375rem;
}

/* Dark mode support cho loader */
[data-bs-theme="dark"] .form-loader {
    background: rgba(33, 37, 41, 0.95);
}

.form-loader .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--bs-primary);
}

.form-loader .loading-text {
    margin-top: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--bs-body-color);
    text-align: center;
}

/* Đảm bảo text hiển thị rõ trong cả light và dark mode */
[data-bs-theme="dark"] .form-loader .loading-text {
    color: #fff;
}

[data-bs-theme="light"] .form-loader .loading-text {
    color: #333;
}

.form-container {
    position: relative;
}

/* Custom giao diện cho quick-search-service */
.select2-dropdown.quick-search-dropdown .select2-search--dropdown {
    display: block !important;
    padding: 10px 12px 8px;
}
.select2-dropdown.quick-search-dropdown .select2-search__field {
    min-height: 46px !important;
    height: 46px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    border-radius: 0.475rem !important;
    border: 1px solid #e4e6ef !important;
    box-sizing: border-box !important;
}
[data-bs-theme="dark"] .select2-dropdown.quick-search-dropdown .select2-search__field {
    min-height: 46px !important;
    height: 46px !important;
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #fff !important;
}
.quick-service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 8px;
    font-size: 15px;
}
.quick-service-item .service-id {
    color: #007bff;
    font-weight: bold;
    margin-right: 8px;
    min-width: 60px;
    display: inline-block;
}
.quick-service-item .service-name {
    flex: 1;
    color: #222;
    font-weight: 500;
}
.quick-service-item .service-badges {
    margin-left: 8px;
}
.quick-service-item .service-price {
    color: #e53935;
    font-weight: bold;
    margin-left: 12px;
    min-width: 40px;
    text-align: right;
    display: inline-block;
}
.select2-results__option--highlighted[aria-selected] .quick-service-item {
    background: #f0f8ff;
}

/* CSS cho multi-order modal */
.multi-orders-list {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background: white;
}

.multi-order-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.multi-order-item:last-child {
    border-bottom: none;
}

.multi-order-item.processing {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.multi-order-item.success {
    background-color: #d1e7dd;
    border-left: 4px solid #198754;
}

.multi-order-item.error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

.multi-order-item.waiting {
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
}

.multi-order-link {
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.multi-order-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.waiting {
    background-color: #e9ecef;
    color: #6c757d;
}

.status-badge.processing {
    background-color: #fff3cd;
    color: #664d03;
}

.status-badge.success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-badge.error {
    background-color: #f8d7da;
    color: #842029;
}

.order-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.multi-order-controls {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px;
    border-top: 1px solid #dee2e6;
    margin: -15px -15px 0 -15px;
}

[data-bs-theme="dark"] .multi-orders-list {
    background: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .multi-order-item {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .multi-order-item.waiting {
    background-color: #343a40;
}

[data-bs-theme="dark"] .multi-order-controls {
    background: #2b3035;
    border-top-color: #495057;
}

/* Styling cho multi-order pricing section */
.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
}

[data-bs-theme="dark"] .bg-gradient-light {
    background: linear-gradient(135deg, #2b3035 0%, #343a40 100%);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.multi-price-animation {
    transition: all 0.3s ease;
    animation: priceUpdate 0.5s ease-in-out;
}

@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.price-highlight {
    position: relative;
    overflow: hidden;
}

.price-highlight::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.price-highlight.animate::before {
    left: 100%;
}

/* Enhanced badge styling */
.badge.fs-6 {
    font-size: 0.9rem !important;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Enhanced card styling */
.card.border-0.shadow-sm {
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    transition: all 0.3s ease;
}

.card.border-0.shadow-sm:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1) !important;
    transform: translateY(-1px);
}

/* Enhanced inner pricing card */
.border.rounded-3.p-3.bg-white.shadow-sm {
    border: 1px solid rgba(79, 70, 229, 0.1) !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.05) !important;
    transition: all 0.2s ease;
}

.border.rounded-3.p-3.bg-white.shadow-sm:hover {
    border-color: rgba(79, 70, 229, 0.2) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1) !important;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .border.rounded-3.p-3.bg-white.shadow-sm {
    background-color: #2b3035 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .bg-light.bg-opacity-50 {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Select2 Dark Mode Styles */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-container .select2-selection--single .select2-selection__rendered {
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-selection__rendered {
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #adb5bd transparent transparent transparent !important;
}

[data-bs-theme="dark"] .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #adb5bd transparent !important;
}

/* Select2 Dropdown Dark Mode */
[data-bs-theme="dark"] .select2-dropdown {
    background-color: #2b3035 !important;
    border: 1px solid #495057 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
}

[data-bs-theme="dark"] .select2-search--dropdown {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field {
    background-color: #343a40 !important;
    border: 1px solid #495057 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field::placeholder {
    color: #adb5bd !important;
}

/* Select2 Results Dark Mode */
[data-bs-theme="dark"] .select2-results {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .select2-results__option {
    background-color: transparent !important;
    color: #e4e6ef !important;
}

[data-bs-theme="dark"] .select2-results__option--highlighted[aria-selected],
[data-bs-theme="dark"] .select2-results__option--highlighted,
[data-bs-theme="dark"] .select2-results__option[aria-selected="true"] {
    background-color: rgba(27, 132, 255, 0.16) !important;
    color: #e4e6ef !important;
}

[data-bs-theme="dark"] .select2-results__option .service-option-id,
[data-bs-theme="dark"] .select2-results__option .service-price-chip,
[data-bs-theme="dark"] .select2-results__option .service-price-chip * {
    color: #69b4ff !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .select2-results__option--highlighted,
[data-bs-theme="dark"] .select2-results__option[aria-selected="true"] {
    background-color: rgba(27, 132, 255, 0.16) !important;
    color: #e4e6ef !important;
}

/* Override cho quick-service-item trong dropdown */
[data-bs-theme="dark"] .select2-results__option .quick-service-item {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .select2-results__option--highlighted .quick-service-item {
    background-color: transparent !important;
}

/* Select2 Focus và Disabled States Dark Mode */
[data-bs-theme="dark"] .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

[data-bs-theme="dark"] .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #343a40 !important;
    color: #6c757d !important;
    border-color: #495057 !important;
}

/* Select2 Quick Service Item Dark Mode */
[data-bs-theme="dark"] .quick-service-item .service-id {
    color: #86b7fe !important;
}

[data-bs-theme="dark"] .quick-service-item .service-name {
    color: #fff !important;
}

[data-bs-theme="dark"] .quick-service-item .service-price {
    color: #ff6b6b !important;
}

[data-bs-theme="dark"] .select2-results__option--highlighted[aria-selected] .quick-service-item {
    background: transparent !important;
}

/* Đảm bảo service item colors trong dropdown */
[data-bs-theme="dark"] .select2-results .quick-service-item .service-id {
    color: #86b7fe !important;
}

[data-bs-theme="dark"] .select2-results .quick-service-item .service-name {
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-results .quick-service-item .service-price {
    color: #ff6b6b !important;
}

[data-bs-theme="dark"] .select2-dropdown .select2-results__option {
    color: #e4e6ef !important;
}

/* Select2 No Results Dark Mode */
[data-bs-theme="dark"] .select2-results__message {
    color: #adb5bd !important;
}

/* Select2 Loading Dark Mode */
[data-bs-theme="dark"] .select2-results__option[role="group"] {
    color: #adb5bd !important;
}

/* Select2 Clear Button Dark Mode */
[data-bs-theme="dark"] .select2-selection__clear {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .select2-selection__clear:hover {
    color: #fff !important;
}

/* Đảm bảo tất cả text trong select2 dark mode đều màu trắng */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--single *,
[data-bs-theme="dark"] .select2-selection--single,
[data-bs-theme="dark"] .select2-selection--single * {
    color: #fff !important;
}

/* Riêng cho placeholder text */
[data-bs-theme="dark"] .select2-selection__placeholder {
    color: #adb5bd !important;
}

/* Override mọi CSS có thể ghi đè */
[data-bs-theme="dark"] span.select2-selection__rendered {
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-container span.select2-selection__rendered {
    color: #fff !important;
}









/* ==================== ORDER SYSTEM STYLES ==================== */

/* Service Option Styles */
.service-option-image {
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: -3px;
    display: inline-block;
}
.service-detail-image {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
#serviceDescriptionContent {
    line-height: 1.5;
    word-break: normal;
    overflow-wrap: break-word;
}
#serviceDescriptionContent p {
    margin: 0;
}
#serviceDescriptionContent p + p {
    margin-top: 0.45rem;
}
#serviceDescriptionContent p:empty,
#serviceDescriptionContent p:has(> br:only-child) {
    display: none;
}

.service-option-clone {
    display: inline;
    width: auto;
    font-size: 0.95rem;
    line-height: 1.5;
    color: inherit;
}

.service-option-clone .service-option-id {
    font-weight: 700;
    color: inherit;
}

.service-option-clone .service-option-name {
    color: inherit;
    white-space: normal;
}

.service-option-clone .service-price-chip,
.service-option-clone .text-primary {
    color: var(--bs-primary, #1b84ff) !important;
    font-weight: 700;
    white-space: nowrap;
}

.service-option-clone .service-price-chip sup {
    font-size: 0.62em;
    font-weight: 700;
    top: -0.45em;
}

#service + .select2 .select2-selection__rendered,
#quick-search-service + .select2 .select2-selection__rendered {
    display: block !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select2-results__option .service-option-clone {
    padding: 0;
}

.service-option-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-option-content {
    flex-grow: 1;
}

.service-option-id {
    font-weight: bold;
    color: #1b84ff;
    margin-right: 8px;
    font-size: 13px;
}

.service-option-name {
    color: #333;
    font-size: 13px;
}

.service-option-price {
    margin-left: 12px;
    font-weight: bold;
    color: #1b84ff;
    font-size: 13px;
    white-space: nowrap;
}

/* Service Badge Styles */
.service-badge-cancel {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 6px;
    box-shadow: 0 1px 3px rgba(40, 167, 69, 0.3);
}

.service-badge-cancel.simple {
    margin-left: 6px;
    margin-right: 4px;
}

.service-badge-warranty {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 4px;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.3);
}

.service-badge-warranty.simple {
    margin-left: 0;
    margin-right: 4px;
}

.service-badge-slowmode {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 4px;
    box-shadow: 0 1px 3px rgba(255, 107, 53, 0.3);
}

.service-badge-slowmode.simple {
    margin-left: 0;
    margin-right: 4px;
}

.service-badge-maintenance,
.service-badge-overload {
    display: inline-flex !important;
    align-items: center;
    flex-shrink: 0;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    line-height: 1.2 !important;
    padding: 3px 10px !important;
    border-radius: 999px !important;
    margin-left: 8px;
    margin-right: 4px;
    vertical-align: middle;
    white-space: nowrap;
    opacity: 1 !important;
    animation: none !important;
    box-shadow: none !important;
}

.service-badge-maintenance {
    background-color: #F8285A !important;
    background-image: none !important;
    color: #fff !important;
    border: 1px solid #c0103a !important;
}

.service-badge-overload {
    background: linear-gradient(180deg, #FFE566 0%, #F6C000 100%) !important;
    color: #3D2E00 !important;
    border: 1px solid #E0B000 !important;
    box-shadow: 0 1px 2px rgba(246, 192, 0, 0.28) !important;
}

.service-option-clone.is-maintenance .service-badge-maintenance,
.select2-selection__rendered .service-badge-maintenance,
.select2-results__option .service-badge-maintenance {
    background-color: #F8285A !important;
    color: #fff !important;
}

.service-option-clone.is-overload .service-badge-overload,
.select2-selection__rendered .service-badge-overload,
.select2-results__option .service-badge-overload {
    background: linear-gradient(180deg, #FFE566 0%, #F6C000 100%) !important;
    color: #3D2E00 !important;
}

#service + .select2:has(.service-badge-maintenance) .select2-selection--single,
#quick-search-service + .select2:has(.service-badge-maintenance) .select2-selection--single {
    background-color: #fff1f2 !important;
    border-color: #F8285A !important;
}

#service + .select2:has(.service-badge-overload) .select2-selection--single,
#quick-search-service + .select2:has(.service-badge-overload) .select2-selection--single {
    background-color: #FFF8E1 !important;
    border-color: #F6C000 !important;
}

.select2-results__option:has(.service-badge-maintenance),
.select2-results__option:has(.service-option-clone.is-maintenance) {
    background-color: #fff1f2 !important;
}

.select2-results__option:has(.service-badge-overload),
.select2-results__option:has(.service-option-clone.is-overload) {
    background-color: #FFF8E1 !important;
}

.select2-results__option--highlighted:has(.service-badge-maintenance),
.select2-results__option--highlighted:has(.service-option-clone.is-maintenance) {
    background-color: #ffe4e8 !important;
    color: #252f4a !important;
}

.select2-results__option--highlighted:has(.service-badge-overload),
.select2-results__option--highlighted:has(.service-option-clone.is-overload) {
    background-color: #FFF1B8 !important;
    color: #252f4a !important;
}

.select2-results__option--highlighted:has(.service-badge-maintenance) .service-badge-maintenance,
.select2-results__option--highlighted:has(.service-option-clone.is-maintenance) .service-badge-maintenance {
    background-color: #F8285A !important;
    color: #fff !important;
}

.select2-results__option--highlighted:has(.service-badge-overload) .service-badge-overload,
.select2-results__option--highlighted:has(.service-option-clone.is-overload) .service-badge-overload {
    background: linear-gradient(180deg, #FFE566 0%, #F6C000 100%) !important;
    color: #3D2E00 !important;
}

[data-bs-theme="dark"] .service-badge-maintenance,
[data-bs-theme="dark"] .select2-selection--single .service-badge-maintenance,
[data-bs-theme="dark"] .select2-results__option .service-badge-maintenance {
    background-color: #ff2d55 !important;
    border-color: #ff6b88 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .service-badge-overload,
[data-bs-theme="dark"] .select2-selection--single .service-badge-overload,
[data-bs-theme="dark"] .select2-results__option .service-badge-overload {
    background: linear-gradient(180deg, #FFD84D 0%, #F5C400 100%) !important;
    border-color: #FFD84D !important;
    color: #1A1400 !important;
}

[data-bs-theme="dark"] #service + .select2:has(.service-badge-maintenance) .select2-selection--single,
[data-bs-theme="dark"] #quick-search-service + .select2:has(.service-badge-maintenance) .select2-selection--single {
    background-color: rgba(255, 45, 85, 0.16) !important;
    border-color: #ff2d55 !important;
}

[data-bs-theme="dark"] #service + .select2:has(.service-badge-overload) .select2-selection--single,
[data-bs-theme="dark"] #quick-search-service + .select2:has(.service-badge-overload) .select2-selection--single {
    background-color: rgba(246, 192, 0, 0.16) !important;
    border-color: #F6C000 !important;
}

[data-bs-theme="dark"] .select2-results__option:has(.service-badge-maintenance),
[data-bs-theme="dark"] .select2-results__option:has(.service-option-clone.is-maintenance) {
    background-color: rgba(255, 45, 85, 0.14) !important;
}

[data-bs-theme="dark"] .select2-results__option:has(.service-badge-overload),
[data-bs-theme="dark"] .select2-results__option:has(.service-option-clone.is-overload) {
    background-color: rgba(246, 192, 0, 0.14) !important;
}

[data-bs-theme="dark"] .select2-results__option--highlighted:has(.service-badge-maintenance),
[data-bs-theme="dark"] .select2-results__option--highlighted:has(.service-option-clone.is-maintenance) {
    background-color: rgba(255, 45, 85, 0.24) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-results__option--highlighted:has(.service-badge-overload),
[data-bs-theme="dark"] .select2-results__option--highlighted:has(.service-option-clone.is-overload) {
    background-color: rgba(246, 192, 0, 0.24) !important;
    color: #fff !important;
}

.service-badge-icon {
    font-size: 8px;
    margin-right: 2px;
}

/* Service Description Card */
.service-description-card {
    border: 1px dashed #dee2e6;
    background-color: #f8f9fa;
}

/* Processing Warning Overlay */
.processing-warning {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #ffc107 !important;
    animation: slideInRight 0.3s ease-out;
}

/* Modal Loading Overlay */
.modal-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal-loading-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    margin: 20px;
}

.modal-loading-spinner {
    width: 3rem;
    height: 3rem;
}

/* Quick Service Item */
.quick-service-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-service-item .service-id {
    font-weight: bold;
    color: #0d6efd;
}

.quick-service-item .service-name {
    flex: 1;
    color: #333;
}

.quick-service-item .service-price {
    font-weight: bold;
    color: #dc3545;
    white-space: nowrap;
}

/* Multi Order Item */
.multi-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.multi-order-item.waiting {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.multi-order-item.processing {
    background: #fff3cd;
    border-color: #ffc107;
    animation: pulse 1.5s infinite;
}

.multi-order-item.success {
    background: #d1e7dd;
    border-color: #28a745;
}

.multi-order-item.error {
    background: #f8d7da;
    border-color: #dc3545;
}

.multi-order-link {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
}

.status-badge.waiting {
    background: #e9ecef;
    color: #6c757d;
}

.status-badge.processing {
    background: #fff3cd;
    color: #856404;
}

.status-badge.success {
    background: #d1e7dd;
    color: #0f5132;
}

.status-badge.error {
    background: #f8d7da;
    color: #842029;
}

/* Order Spinner Animation */
.order-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #856404;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 4px;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark Mode Support */
[data-bs-theme="dark"] .service-option-name {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .service-description-card {
    border-color: #495057;
    background-color: #343a40;
}

[data-bs-theme="dark"] .modal-loading-content {
    background: #343a40;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .processing-warning {
    background: #343a40;
    border-left-color: #ffc107 !important;
}

[data-bs-theme="dark"] .quick-service-item .service-name {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .multi-order-item {
    border-color: #495057;
}

[data-bs-theme="dark"] .multi-order-item.waiting {
    background: #343a40;
    border-color: #495057;
}

[data-bs-theme="dark"] .multi-order-item.processing {
    background: #3d3629;
    border-color: #664d03;
}

[data-bs-theme="dark"] .multi-order-item.success {
    background: #262e24;
    border-color: #155724;
}

[data-bs-theme="dark"] .multi-order-item.error {
    background: #3d2426;
    border-color: #721c24;
}

[data-bs-theme="dark"] .status-badge.waiting {
    background: #495057;
    color: #adb5bd;
}

[data-bs-theme="dark"] .status-badge.processing {
    background: #3d3629;
    color: #ffda6a;
}

[data-bs-theme="dark"] .status-badge.success {
    background: #262e24;
    color: #75b798;
}

[data-bs-theme="dark"] .status-badge.error {
    background: #3d2426;
    color: #ea868f;
}

/* Service Loading Progress Styles */
#service-loading-progress {
    background: rgba(13, 110, 253, 0.05);
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    animation: fadeInUp 0.3s ease-out;
}

#service-loading-progress .progress {
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 0.25rem;
    overflow: hidden;
}

#service-loading-progress .progress-bar {
    background: linear-gradient(90deg, #0d6efd, #198754);
    transition: width 0.3s ease;
    border-radius: 0.25rem;
    position: relative;
    overflow: hidden;
}

#service-loading-progress .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lazy Loading Indicators */
.service-loading-placeholder {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(108, 117, 125, 0.05);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.service-loading-placeholder::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

.service-loading-placeholder::after {
    content: 'Đang tải dịch vụ...';
    color: #6c757d;
    font-size: 0.875rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Service Dropdown Optimizations */
#service option:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Loading States */
.form-loader {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

/* Cache Status Indicator */
.cache-status {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.cache-status.loading {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.2);
}

.cache-status.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.2);
}

/* Service Count Badge */
.service-count-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    background: linear-gradient(135deg, #0d6efd, #198754);
    color: white;
    margin-left: 0.5rem;
}

/* Performance Optimizations */
.select2-results__option--disabled {
    display: none !important;
}

.select2-dropdown {
    border: 1px solid rgba(13, 110, 253, 0.25);
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.15);
}

.select2-dropdown.order-select-dropdown .select2-results__option--highlighted .service-price-chip,
.select2-dropdown.quick-search-dropdown .select2-results__option--highlighted .service-price-chip {
    color: var(--bs-primary, #1b84ff) !important;
}

/* Chunk Loading Animation */
.chunk-loading {
    position: relative;
    overflow: hidden;
}

.chunk-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.1), transparent);
    animation: slideIn 1s infinite;
}

@keyframes slideIn {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* AI Modal Loading Overlay */
.ai-modal-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    border-radius: inherit;
}

.ai-modal-loading-overlay .spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

/* Modern Spinner Animation */
.ai-spinner {
    width: 80px;
    height: 80px;
    position: relative;
    animation: rotate 2s linear infinite;
}

.ai-spinner .circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.ai-spinner .circle-1 {
    border: 4px solid transparent;
    border-top-color: #667eea;
    animation: spin 1.5s ease-in-out infinite;
}

.ai-spinner .circle-2 {
    border: 4px solid transparent;
    border-right-color: #764ba2;
    animation: spin 2s ease-in-out infinite;
    animation-delay: 0.5s;
}

.ai-spinner .circle-3 {
    border: 4px solid transparent;
    border-bottom-color: #f093fb;
    animation: spin 1.8s ease-in-out infinite;
    animation-delay: 0.25s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Robot Icon Animation */
.ai-modal-loading-overlay .robot-icon {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
    animation: robotBounce 1s ease-in-out infinite;
}

@keyframes robotBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.1);
    }
}

.ai-modal-loading-overlay .loading-text {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.ai-modal-loading-overlay .loading-subtext {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
    max-width: 250px;
}

/* Dots Animation */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Modal Body Blur When Loading */
#aiCommentModal.loading .modal-body form {
    filter: blur(2px);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

#aiCommentModal.loading .modal-footer {
    pointer-events: none;
    opacity: 0.5;
}

/* ==================== DARK MODE STYLES ==================== */
[data-bs-theme="dark"] .ai-modal-loading-overlay {
    background: rgba(30, 30, 30, 0.95);
}

[data-bs-theme="dark"] .ai-modal-loading-overlay .loading-text {
    color: #e9ecef;
}

[data-bs-theme="dark"] .ai-modal-loading-overlay .loading-subtext {
    color: #adb5bd;
}

[data-bs-theme="dark"] .ai-modal-loading-overlay .robot-icon {
    color: #8b9ff7;
}

[data-bs-theme="dark"] .ai-spinner .circle-1 {
    border-top-color: #8b9ff7;
}

[data-bs-theme="dark"] .ai-spinner .circle-2 {
    border-right-color: #9f7aea;
}

[data-bs-theme="dark"] .ai-spinner .circle-3 {
    border-bottom-color: #f5a3ff;
}

/* Clone order layout alignment */
#kt_content_container .form-container {
    min-height: 240px;
}

/* Prevent native Velzon/Metronic select from stacking under Select2 */
#order-form select.js-order-select,
#order-form select.select2-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    background: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

#order-form .select2-container {
    width: 100% !important;
    display: block !important;
    z-index: 2;
}

#order-form .select2-container .select2-selection--single,
#order-form .select2-container .select2-selection--multiple {
    min-height: 44px;
    height: auto !important;
    padding: 0.65rem 2.5rem 0.65rem 1rem;
    background-color: #f9f9f9 !important;
    background-image: none !important;
    border: 1px solid #f1f1f4 !important;
    border-radius: 0.475rem;
    display: flex !important;
    align-items: center;
    box-shadow: none !important;
}

#order-form #service + .select2:has(.service-badge-maintenance) .select2-selection--single,
#order-form #quick-search-service + .select2:has(.service-badge-maintenance) .select2-selection--single {
    background-color: #fff1f2 !important;
    border-color: #F8285A !important;
}

#order-form #service + .select2:has(.service-badge-overload) .select2-selection--single,
#order-form #quick-search-service + .select2:has(.service-badge-overload) .select2-selection--single {
    background-color: #FFF8E1 !important;
    border-color: #F6C000 !important;
}

#order-form .select2-container .select2-selection__rendered {
    padding: 0 !important;
    line-height: 1.5 !important;
    color: #252f4a !important;
}

#order-form .select2-container .select2-selection__arrow {
    height: 100% !important;
    right: 10px !important;
    top: 0 !important;
}

#order-form .select2-container .select2-selection__placeholder {
    color: #99a1b7 !important;
}

[data-bs-theme="dark"] #order-form .select2-container .select2-selection--single,
[data-bs-theme="dark"] #order-form .select2-container .select2-selection--multiple {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] #order-form .select2-container .select2-selection__rendered {
    color: #e4e6ef !important;
}

[data-bs-theme="dark"] #order-form #service + .select2:has(.service-badge-maintenance) .select2-selection--single,
[data-bs-theme="dark"] #order-form #quick-search-service + .select2:has(.service-badge-maintenance) .select2-selection--single {
    background-color: rgba(255, 45, 85, 0.16) !important;
    border-color: #ff2d55 !important;
}

[data-bs-theme="dark"] #order-form #service + .select2:has(.service-badge-overload) .select2-selection--single,
[data-bs-theme="dark"] #order-form #quick-search-service + .select2:has(.service-badge-overload) .select2-selection--single {
    background-color: rgba(246, 192, 0, 0.16) !important;
    border-color: #F6C000 !important;
}
#kt_content_container .card.div-order,
#kt_content_container #serviceDetailsCard {
    height: 100%;
}
#kt_content_container .form-label {
    font-weight: 500;
}
#order-form .link-input-fieldset {
    border-color: #e4e6ef !important;
    border-width: 1px !important;
    border-radius: 12px !important;
    padding: 1.05rem 1rem 0.95rem !important;
}
#order-form .link-input-fieldset > legend {
    margin-bottom: 0.35rem;
    padding: 0 !important;
    float: none;
    width: auto;
    background: transparent !important;
    border: 0 !important;
    line-height: 1;
}
[data-bs-theme="dark"] #order-form .link-input-fieldset {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] #order-form .input-group-solid,
[data-bs-theme="dark"] #order-form .input-group,
[data-bs-theme="dark"] #order-form #link,
[data-bs-theme="dark"] #order-form #quantity,
[data-bs-theme="dark"] #order-form #multi-links-inline,
[data-bs-theme="dark"] #order-form .multi-link-editor,
[data-bs-theme="dark"] #order-form .form-control-solid,
[data-bs-theme="dark"] #order-form .form-select-solid {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] #order-form .link-input-fieldset > legend {
    background: transparent !important;
}

#order-form .link-mode-switch {
    display: inline-flex;
    align-items: stretch;
    gap: 4px;
    padding: 4px;
    border-radius: 999px !important;
    overflow: hidden;
    background: #eef1f6;
    box-shadow: inset 0 0 0 1px #e1e3ea;
}
#order-form .link-mode-option {
    margin: 0;
    cursor: pointer;
}
#order-form .link-mode-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
#order-form .link-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 108px;
    padding: 0.62rem 1.15rem;
    border-radius: 999px !important;
    color: #4b5675;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
#order-form .link-mode-btn i {
    font-size: 1.15rem;
    line-height: 1;
}
#order-form .link-mode-option:hover .link-mode-btn {
    color: #1b84ff;
    background: rgba(255, 255, 255, 0.85);
}
#order-form .link-mode-input:checked + .link-mode-btn,
#order-form .link-mode-option:has(.link-mode-input:checked) .link-mode-btn {
    color: #1b84ff;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}
#order-form .link-mode-input:focus-visible + .link-mode-btn {
    outline: 2px solid #1b84ff;
    outline-offset: 2px;
}
#order-form .link-mode-option:has(.link-mode-input:checked):hover .link-mode-btn {
    color: #1b84ff;
    background: #ffffff;
}

[data-bs-theme="dark"] #order-form .link-mode-switch {
    background: #17263c;
    box-shadow: inset 0 0 0 1px rgba(27, 132, 255, 0.28);
}
[data-bs-theme="dark"] #order-form .link-mode-btn {
    color: #9899ac;
}
[data-bs-theme="dark"] #order-form .link-mode-option:hover .link-mode-btn {
    color: #e4e6ef;
    background: rgba(50, 50, 72, 0.7);
}
[data-bs-theme="dark"] #order-form .link-mode-input:checked + .link-mode-btn,
[data-bs-theme="dark"] #order-form .link-mode-option:has(.link-mode-input:checked) .link-mode-btn,
[data-bs-theme="dark"] #order-form .link-mode-option:has(.link-mode-input:checked):hover .link-mode-btn {
    color: #fff;
    background: #1b84ff;
    box-shadow: 0 6px 16px rgba(27, 132, 255, 0.28);
}
.multi-link-editor {
    position: relative;
}
.multi-link-editor textarea {
    min-height: 168px;
    resize: vertical;
    padding-bottom: 2.35rem;
}
.multi-link-counter {
    position: absolute;
    right: 0.65rem;
    bottom: 0.55rem;
    z-index: 2;
    min-width: 2rem;
    height: 1.85rem;
    padding: 0 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    color: #ffffff !important;
    background: #1b84ff;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(27, 132, 255, 0.35);
    pointer-events: none;
    user-select: none;
}
.multi-link-counter.is-empty {
    color: #5e6278 !important;
    background: #eef3f7;
    box-shadow: none;
}
[data-bs-theme="dark"] .multi-link-counter {
    color: #ffffff !important;
    background: #1b84ff;
    box-shadow: 0 2px 8px rgba(27, 132, 255, 0.45);
}
[data-bs-theme="dark"] .multi-link-counter.is-empty {
    color: #a1a5b7 !important;
    background: #2b2f38;
    box-shadow: none;
}

#link-single-wrap .input-group {
    overflow: hidden;
    align-items: stretch;
}
#link-single-wrap .input-group > .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
#pasteFromClipboard {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px !important;
    min-width: 42px !important;
    height: auto !important;
    min-height: 100%;
    padding: 0 !important;
    border-radius: 0 0.475rem 0.475rem 0 !important;
    flex: 0 0 42px;
}
#pasteFromClipboard i {
    margin: 0 !important;
    font-size: 1.15rem !important;
    line-height: 1;
}
#pasteFromClipboard.is-pasted {
    color: #17c653 !important;
    background: rgba(23, 198, 83, 0.12) !important;
}
[data-bs-theme="dark"] #pasteFromClipboard.is-pasted {
    color: #50cd89 !important;
    background: rgba(23, 198, 83, 0.18) !important;
}

.quantity-charge-group {
    overflow: hidden;
    background-color: #f5f8fa;
    border: 1px solid #e4e6ef;
    border-radius: 0.475rem;
}
.quantity-charge-group > .form-control,
.quantity-charge-group > .form-control-solid,
.quantity-charge-group > input,
.quantity-charge-group > .input-group-text {
    border: 0 !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}
.quantity-charge-group > .input-group-text {
    padding-left: 0.35rem;
    padding-right: 0.75rem;
}

.quantity-charge-group .badge.charge,
#total-price.badge {
    background-color: #1b84ff !important;
    color: #fff !important;
    border-radius: 0.425rem;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4em 0.7em;
    line-height: 1.2;
    white-space: nowrap;
}

[data-bs-theme="dark"] .quantity-charge-group {
    background-color: #1e293b !important;
    border-color: #334155;
}
[data-bs-theme="dark"] .quantity-charge-group > .form-control,
[data-bs-theme="dark"] .quantity-charge-group > .form-control-solid,
[data-bs-theme="dark"] .quantity-charge-group > input[type="number"],
[data-bs-theme="dark"] .quantity-charge-group > .input-group-text {
    background: transparent !important;
    border: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.telegram-notice {
    padding: 0;
    border-radius: 0.85rem;
    background: linear-gradient(90deg, #e6eef9 0%, #eef4fb 100%);
    border: 1px solid #c9d8ee;
    overflow: hidden;
}
.telegram-notice-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
}
.telegram-notice-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #229ed9;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.55rem;
}
.telegram-notice-body {
    flex: 1 1 auto;
    min-width: 0;
}
.telegram-notice-title {
    font-size: 15px;
    font-weight: 700;
    color: #181c32;
    margin-bottom: 0.2rem;
}
.telegram-notice-text {
    font-size: 13px;
    color: #4b5675;
    line-height: 1.45;
}
.telegram-notice-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    background: #229ed9;
    color: #fff !important;
    border-radius: 0.55rem;
    padding: 0.55rem 0.95rem;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.telegram-notice-btn:hover {
    background: #1b8fc4;
    color: #fff !important;
}
.telegram-notice-close {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #99a1b7;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}
.telegram-notice-close:hover {
    background: rgba(27, 132, 255, 0.08);
    color: #1b84ff;
}
@media (max-width: 767.98px) {
    .telegram-notice-inner {
        position: relative;
        flex-wrap: wrap;
        padding-right: 2.5rem;
    }
    .telegram-notice-btn {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    .telegram-notice-close {
        position: absolute;
        top: 0.55rem;
        right: 0.55rem;
    }
}
[data-bs-theme="dark"] .telegram-notice {
    background: linear-gradient(90deg, #1b2437 0%, #1e1e2d 100%);
    border-color: #2b3a55;
}
[data-bs-theme="dark"] .telegram-notice-title {
    color: #fff;
}
[data-bs-theme="dark"] .telegram-notice-text {
    color: #9a9cae;
}

/* System notice banner (notice_home) */
.notice-home-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid #cfd9ea;
    border-radius: 10px;
    background: linear-gradient(90deg, #e6edf8 0%, #eef3fb 100%);
}
.notice-home-banner__icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 132, 255, 0.1);
    color: #1b84ff;
    font-size: 1.05rem;
}
.notice-home-banner__body {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #4b5675;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notice-home-banner__body p,
.notice-home-banner__body div {
    display: inline;
    margin: 0;
}
.notice-home-banner__body br {
    display: none;
}
[data-bs-theme="dark"] .notice-home-banner {
    background: #141516;
    border-color: #23252a;
}
[data-bs-theme="dark"] .notice-home-banner__icon {
    background: rgba(27, 132, 255, 0.16);
    color: #69b4ff;
}
[data-bs-theme="dark"] .notice-home-banner__body {
    color: #d0d6e0;
}

/* System notice popup modal */
.notice-home-modal {
    border: 1px solid #d7e0ef !important;
    border-radius: 12px !important;
    overflow: hidden;
    background: #f7f9fd !important;
    box-shadow: 0 16px 40px rgba(30, 50, 90, 0.12) !important;
}
.notice-home-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem !important;
    border-bottom: 1px solid #eff2f5 !important;
    background: transparent !important;
}
.notice-home-modal__title-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}
.notice-home-modal__icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 132, 255, 0.1);
    color: #1b84ff;
    font-size: 1.15rem;
}
.notice-home-modal__title {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em;
    color: #181c32 !important;
    line-height: 1.3;
}
.notice-home-modal__close {
    margin: 0 !important;
    opacity: 0.55;
}
.notice-home-modal__close:hover {
    opacity: 1;
}
.notice-home-modal__body {
    padding: 1rem 1.15rem !important;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #4b5675;
    max-height: min(50vh, 360px);
    overflow-y: auto;
    white-space: normal;
    height: auto !important;
    min-height: 0 !important;
}
.notice-home-modal__body p {
    margin: 0 0 0.45rem;
}
.notice-home-modal__body p:last-child {
    margin-bottom: 0;
}
.notice-home-modal__body p:empty,
.notice-home-modal__body p:has(> br:only-child) {
    display: none;
}
.notice-home-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.85rem 1.15rem !important;
    border-top: 1px solid #eff2f5 !important;
    background: #fafbfc !important;
}
.notice-home-modal__dismiss {
    padding: 8px 14px !important;
    min-height: 34px;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    border-radius: 8px !important;
    background: #1b84ff !important;
    border: 1px solid #1b84ff !important;
    color: #fff !important;
}
.notice-home-modal__dismiss:hover,
.notice-home-modal__dismiss:focus {
    background: #056ee9 !important;
    border-color: #056ee9 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .notice-home-modal {
    background: #0f1011 !important;
    border-color: #23252a !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
}
[data-bs-theme="dark"] .notice-home-modal__header {
    border-bottom-color: #23252a !important;
}
[data-bs-theme="dark"] .notice-home-modal__icon {
    background: rgba(27, 132, 255, 0.16);
    color: #69b4ff;
}
[data-bs-theme="dark"] .notice-home-modal__title {
    color: #f7f8f8 !important;
}
[data-bs-theme="dark"] .notice-home-modal__body {
    color: #d0d6e0;
}
[data-bs-theme="dark"] .notice-home-modal__footer {
    background: #141516 !important;
    border-top-color: #23252a !important;
}
[data-bs-theme="dark"] .notice-home-modal__close {
    filter: invert(1) grayscale(100%);
    opacity: 0.65;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
.platform-card {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    width: 100%;
}
.platform-card img,
.platform-card__icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}
.platform-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #0ea5e9;
}
.platform-card span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.platform-card:hover {
    border-color: #94a3b8;
}
.platform-card.is-active {
    background: #eef6f8;
    border-color: #14b8a6;
}
html[data-bs-theme="dark"] .platform-card {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}
html[data-bs-theme="dark"] .platform-card:hover {
    border-color: #64748b;
}
html[data-bs-theme="dark"] .platform-card.is-active {
    background: rgba(20, 184, 166, 0.16);
    border-color: #2dd4bf;
}
@media (max-width: 991.98px) {
    .platform-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 575.98px) {
    .platform-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}