/*
 * Radzen Dialog Dark Theme CSS
 * Tùy chỉnh theme cho Radzen Dialog để hỗ trợ dark mode
 * Áp dụng cho tất cả các dialog components của Radzen
 */

/* ===== RADZEN DIALOG DARK THEME ===== */

/* Dialog container - nền chính của dialog */
html.dark-style .rz-dialog,
.dark-style .rz-dialog,
body.dark-style .rz-dialog,
[data-theme="theme-dark"] .rz-dialog {
    background-color: #2f3349 !important;
    color: #b6bee3 !important;
    border: 1px solid #444564 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    border-radius: 0.5rem !important;
}

/* Dialog titlebar - thanh tiêu đề */
html.dark-style .rz-dialog-titlebar,
.dark-style .rz-dialog-titlebar,
body.dark-style .rz-dialog-titlebar,
[data-theme="theme-dark"] .rz-dialog-titlebar {
    background-color: #2f3349 !important;
    color: #b6bee3 !important;
    border-bottom: 1px solid #444564 !important;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Dialog title text */
html.dark-style .rz-dialog-title,
.dark-style .rz-dialog-title,
body.dark-style .rz-dialog-title,
[data-theme="theme-dark"] .rz-dialog-title {
    color: #b6bee3 !important;
    font-weight: 600 !important;
}

/* Dialog content - nội dung chính */
html.dark-style .rz-dialog-content,
.dark-style .rz-dialog-content,
body.dark-style .rz-dialog-content,
[data-theme="theme-dark"] .rz-dialog-content {
    background-color: #2f3349 !important;
    color: #b6bee3 !important;
}

/* Close button - nút đóng dialog */
html.dark-style .rz-dialog-titlebar-close,
.dark-style .rz-dialog-titlebar-close,
body.dark-style .rz-dialog-titlebar-close,
[data-theme="theme-dark"] .rz-dialog-titlebar-close {
    color: #b6bee3 !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0.25rem !important;
    transition: background-color 0.2s ease !important;
}

/* Close button hover state */
html.dark-style .rz-dialog-titlebar-close:hover,
.dark-style .rz-dialog-titlebar-close:hover,
body.dark-style .rz-dialog-titlebar-close:hover,
[data-theme="theme-dark"] .rz-dialog-titlebar-close:hover {
    background-color: #444564 !important;
    color: #ffffff !important;
}

/* Close button icon */
html.dark-style .rz-dialog-titlebar-close .rzi,
.dark-style .rz-dialog-titlebar-close .rzi,
body.dark-style .rz-dialog-titlebar-close .rzi,
[data-theme="theme-dark"] .rz-dialog-titlebar-close .rzi {
    color: inherit !important;
}

/* Dialog mask/overlay - lớp phủ mờ phía sau dialog */
html.dark-style .rz-dialog-mask,
.dark-style .rz-dialog-mask,
body.dark-style .rz-dialog-mask,
[data-theme="theme-dark"] .rz-dialog-mask {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

/* ===== FORM ELEMENTS TRONG DIALOG ===== */

/* Labels trong dialog */
html.dark-style .rz-dialog .rz-label,
.dark-style .rz-dialog .rz-label,
body.dark-style .rz-dialog .rz-label,
[data-theme="theme-dark"] .rz-dialog .rz-label {
    color: #b6bee3 !important;
}

/* Input fields trong dialog */
html.dark-style .rz-dialog .rz-textbox,
html.dark-style .rz-dialog .rz-textarea,
html.dark-style .rz-dialog .rz-spinner-input,
.dark-style .rz-dialog .rz-textbox,
.dark-style .rz-dialog .rz-textarea,
.dark-style .rz-dialog .rz-spinner-input,
body.dark-style .rz-dialog .rz-textbox,
body.dark-style .rz-dialog .rz-textarea,
body.dark-style .rz-dialog .rz-spinner-input,
[data-theme="theme-dark"] .rz-dialog .rz-textbox,
[data-theme="theme-dark"] .rz-dialog .rz-textarea,
[data-theme="theme-dark"] .rz-dialog .rz-spinner-input {
    background-color: #444564 !important;
    color: #b6bee3 !important;
    border: 1px solid #5a5f7a !important;
}

/* Input focus state */
html.dark-style .rz-dialog .rz-textbox:focus,
html.dark-style .rz-dialog .rz-textarea:focus,
html.dark-style .rz-dialog .rz-spinner-input:focus,
.dark-style .rz-dialog .rz-textbox:focus,
.dark-style .rz-dialog .rz-textarea:focus,
.dark-style .rz-dialog .rz-spinner-input:focus,
body.dark-style .rz-dialog .rz-textbox:focus,
body.dark-style .rz-dialog .rz-textarea:focus,
body.dark-style .rz-dialog .rz-spinner-input:focus,
[data-theme="theme-dark"] .rz-dialog .rz-textbox:focus,
[data-theme="theme-dark"] .rz-dialog .rz-textarea:focus,
[data-theme="theme-dark"] .rz-dialog .rz-spinner-input:focus {
    border-color: #696cff !important;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25) !important;
}

/* Placeholder text */
html.dark-style .rz-dialog .rz-textbox::placeholder,
html.dark-style .rz-dialog .rz-textarea::placeholder,
.dark-style .rz-dialog .rz-textbox::placeholder,
.dark-style .rz-dialog .rz-textarea::placeholder,
body.dark-style .rz-dialog .rz-textbox::placeholder,
body.dark-style .rz-dialog .rz-textarea::placeholder,
[data-theme="theme-dark"] .rz-dialog .rz-textbox::placeholder,
[data-theme="theme-dark"] .rz-dialog .rz-textarea::placeholder {
    color: #8692d0 !important;
    opacity: 0.7 !important;
}

/* ===== DROPDOWN TRONG DIALOG ===== */

/* Dropdown container */
html.dark-style .rz-dialog .rz-dropdown,
.dark-style .rz-dialog .rz-dropdown,
body.dark-style .rz-dialog .rz-dropdown,
[data-theme="theme-dark"] .rz-dialog .rz-dropdown {
    background-color: #444564 !important;
    border: 1px solid #5a5f7a !important;
    color: #b6bee3 !important;
}

/* Dropdown label */
html.dark-style .rz-dialog .rz-dropdown-label,
.dark-style .rz-dialog .rz-dropdown-label,
body.dark-style .rz-dialog .rz-dropdown-label,
[data-theme="theme-dark"] .rz-dialog .rz-dropdown-label {
    color: #b6bee3 !important;
}

/* Dropdown trigger icon */
html.dark-style .rz-dialog .rz-dropdown-trigger-icon,
.dark-style .rz-dialog .rz-dropdown-trigger-icon,
body.dark-style .rz-dialog .rz-dropdown-trigger-icon,
[data-theme="theme-dark"] .rz-dialog .rz-dropdown-trigger-icon {
    color: #b6bee3 !important;
}

/* Dropdown panel */
html.dark-style .rz-dropdown-panel,
.dark-style .rz-dropdown-panel,
body.dark-style .rz-dropdown-panel,
[data-theme="theme-dark"] .rz-dropdown-panel {
    background-color: #444564 !important;
    border: 1px solid #5a5f7a !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

/* Dropdown items */
html.dark-style .rz-dropdown-item,
.dark-style .rz-dropdown-item,
body.dark-style .rz-dropdown-item,
[data-theme="theme-dark"] .rz-dropdown-item {
    color: #b6bee3 !important;
    background-color: transparent !important;
}

/* Dropdown item hover */
html.dark-style .rz-dropdown-item:hover,
.dark-style .rz-dropdown-item:hover,
body.dark-style .rz-dropdown-item:hover,
[data-theme="theme-dark"] .rz-dropdown-item:hover {
    background-color: #5a5f7a !important;
    color: #ffffff !important;
}

/* ===== SPINNER BUTTONS ===== */

/* Spinner buttons trong dialog */
html.dark-style .rz-dialog .rz-spinner-button,
.dark-style .rz-dialog .rz-spinner-button,
body.dark-style .rz-dialog .rz-spinner-button,
[data-theme="theme-dark"] .rz-dialog .rz-spinner-button {
    background-color: #5a5f7a !important;
    border: 1px solid #5a5f7a !important;
    color: #b6bee3 !important;
}

/* Spinner button hover */
html.dark-style .rz-dialog .rz-spinner-button:hover,
.dark-style .rz-dialog .rz-spinner-button:hover,
body.dark-style .rz-dialog .rz-spinner-button:hover,
[data-theme="theme-dark"] .rz-dialog .rz-spinner-button:hover {
    background-color: #696cff !important;
    border-color: #696cff !important;
    color: #ffffff !important;
}

/* ===== VALIDATION MESSAGES ===== */

/* Validation error messages */
html.dark-style .rz-dialog .validation-message,
html.dark-style .rz-dialog .field-validation-error,
.dark-style .rz-dialog .validation-message,
.dark-style .rz-dialog .field-validation-error,
body.dark-style .rz-dialog .validation-message,
body.dark-style .rz-dialog .field-validation-error,
[data-theme="theme-dark"] .rz-dialog .validation-message,
[data-theme="theme-dark"] .rz-dialog .field-validation-error {
    color: #ff6b6b !important;
}

/* ===== BUTTONS TRONG DIALOG ===== */

/* Primary buttons */
html.dark-style .rz-dialog .btn-primary,
.dark-style .rz-dialog .btn-primary,
body.dark-style .rz-dialog .btn-primary,
[data-theme="theme-dark"] .rz-dialog .btn-primary {
    background-color: #696cff !important;
    border-color: #696cff !important;
    color: #ffffff !important;
}

/* Secondary buttons */
html.dark-style .rz-dialog .btn-secondary,
.dark-style .rz-dialog .btn-secondary,
body.dark-style .rz-dialog .btn-secondary,
[data-theme="theme-dark"] .rz-dialog .btn-secondary {
    background-color: #5a5f7a !important;
    border-color: #5a5f7a !important;
    color: #b6bee3 !important;
}

/* Success buttons */
html.dark-style .rz-dialog .btn-success,
.dark-style .rz-dialog .btn-success,
body.dark-style .rz-dialog .btn-success,
[data-theme="theme-dark"] .rz-dialog .btn-success {
    background-color: #71dd37 !important;
    border-color: #71dd37 !important;
    color: #ffffff !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

/* Mobile adjustments */
@media (max-width: 768px) {
    html.dark-style .rz-dialog,
    .dark-style .rz-dialog,
    body.dark-style .rz-dialog,
    [data-theme="theme-dark"] .rz-dialog {
        margin: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
        max-height: calc(100vh - 2rem) !important;
    }
}

/* ===== SCROLLBAR STYLING ===== */

/* Custom scrollbar cho dialog content */
html.dark-style .rz-dialog-content::-webkit-scrollbar,
.dark-style .rz-dialog-content::-webkit-scrollbar,
body.dark-style .rz-dialog-content::-webkit-scrollbar,
[data-theme="theme-dark"] .rz-dialog-content::-webkit-scrollbar {
    width: 8px;
}

html.dark-style .rz-dialog-content::-webkit-scrollbar-track,
.dark-style .rz-dialog-content::-webkit-scrollbar-track,
body.dark-style .rz-dialog-content::-webkit-scrollbar-track,
[data-theme="theme-dark"] .rz-dialog-content::-webkit-scrollbar-track {
    background: #444564;
    border-radius: 4px;
}

html.dark-style .rz-dialog-content::-webkit-scrollbar-thumb,
.dark-style .rz-dialog-content::-webkit-scrollbar-thumb,
body.dark-style .rz-dialog-content::-webkit-scrollbar-thumb,
[data-theme="theme-dark"] .rz-dialog-content::-webkit-scrollbar-thumb {
    background: #5a5f7a;
    border-radius: 4px;
}

html.dark-style .rz-dialog-content::-webkit-scrollbar-thumb:hover,
.dark-style .rz-dialog-content::-webkit-scrollbar-thumb:hover,
body.dark-style .rz-dialog-content::-webkit-scrollbar-thumb:hover,
[data-theme="theme-dark"] .rz-dialog-content::-webkit-scrollbar-thumb:hover {
    background: #696cff;
}

/* ===== PROFILE DIALOG SPECIFIC STYLES ===== */

/* Profile dialog container */
.profile-dialog {
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
}

/* Avatar upload section */
.avatar-upload-section {
    text-align: center;
    margin-bottom: 1rem;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #e9ecef;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    transition: all 0.3s ease;
}

.avatar-preview:hover {
    border-color: #007bff;
}

/* Dark mode avatar preview */
html.dark-style .avatar-preview,
.dark-style .avatar-preview,
body.dark-style .avatar-preview,
[data-theme="theme-dark"] .avatar-preview {
    border-color: #444564 !important;
}

html.dark-style .avatar-preview:hover,
.dark-style .avatar-preview:hover,
body.dark-style .avatar-preview:hover,
[data-theme="theme-dark"] .avatar-preview:hover {
    border-color: #696cff !important;
}

.avatar-upload-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.avatar-upload-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* Password section */
.password-section {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Dark mode styling for password section border */
html.dark-style .password-section,
.dark-style .password-section,
body.dark-style .password-section,
[data-theme="theme-dark"] .password-section {
    border-top-color: #444564 !important;
}

/* Form sections */
.form-section {
    margin-bottom: 1.5rem;
}

.form-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Dark mode styling for h6 headings */
html.dark-style .form-section h6,
.dark-style .form-section h6,
body.dark-style .form-section h6,
[data-theme="theme-dark"] .form-section h6 {
    color: #ffffff !important;
}

/* Dialog actions styling */
.dialog-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Dark mode styling for dialog actions border */
html.dark-style .dialog-actions,
.dark-style .dialog-actions,
body.dark-style .dialog-actions,
[data-theme="theme-dark"] .dialog-actions {
    border-top-color: #444564 !important;
}

.dialog-actions .btn {
    width: 100%;
}

/* Dark mode styling for muted text */
html.dark-style .text-muted,
.dark-style .text-muted,
body.dark-style .text-muted,
[data-theme="theme-dark"] .text-muted {
    color: #8692d0 !important;
}

.form-control {
    width: 100%;
    box-sizing: border-box;
}

.container-fluid, .row {
    overflow-x: hidden;
}

.row.g-2 {
    margin: 0;
    --bs-gutter-y: 0.25rem;
}

.row.g-2 > * {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 0;
}

/* Giảm margin của FormGroup */
.form-section .mb-3 {
    margin-bottom: 0.25rem !important;
}

/* Giảm margin của col-12 trong form */
.form-section .col-12 {
    margin-bottom: 0.125rem;
}

/* Đặc biệt cho row cuối cùng trong mỗi section */
.form-section .row.g-2 .col-12:last-child {
    margin-bottom: 0;
}

/* Giảm padding của FormGroup */
.form-section .form-group {
    margin-bottom: 0.25rem !important;
}

/* Giảm margin của label */
.form-section label {
    margin-bottom: 0.25rem !important;
}

/* Giảm margin của validation message */
.form-section .validation-message {
    margin-top: 0.125rem !important;
    margin-bottom: 0 !important;
}

/* ===== PRODUCT DIALOG SPECIFIC STYLES ===== */

/* Product dialog styling */
.product-dialog .card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 6px 0 rgba(67, 89, 113, 0.12);
}

.product-dialog .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Avatar styling */
.product-dialog .avatar {
    position: relative;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-dialog .avatar-initial {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-weight: 500;
}

.product-dialog .bg-label-primary {
    background-color: rgba(105, 108, 255, 0.16) !important;
    color: #696cff !important;
}

.product-dialog .bg-label-success {
    background-color: rgba(40, 167, 69, 0.16) !important;
    color: #28a745 !important;
}

.product-dialog .bg-label-info {
    background-color: rgba(23, 162, 184, 0.16) !important;
    color: #17a2b8 !important;
}

.product-dialog .bg-label-warning {
    background-color: rgba(255, 171, 0, 0.16) !important;
    color: #ffab00 !important;
}

/* Form styling */
.product-dialog .form-control:focus,
.product-dialog .form-select:focus {
    border-color: #696cff;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
}

/* Button styling */
.product-dialog .btn {
    transition: all 0.2s ease;
}

.product-dialog .btn:hover {
    transform: translateY(-1px);
}

/* Mobile optimizations */
@media (max-width: 767.98px) {
    .product-dialog .mobile-header {
        position: sticky;
        top: 0;
        z-index: 1020;
        background: var(--bs-body-bg);
        border-bottom: 1px solid var(--bs-border-color);
        margin: -1rem -1rem 1rem -1rem;
        padding: 1rem;
    }
    
    .product-dialog .card {
        margin-bottom: 1rem;
    }
}

/* Dark mode support for product dialog */
html.dark-style .product-dialog .mobile-header,
.dark-style .product-dialog .mobile-header,
body.dark-style .product-dialog .mobile-header,
[data-theme="theme-dark"] .product-dialog .mobile-header {
    background: var(--bs-body-bg) !important;
    border-bottom-color: var(--bs-border-color) !important;
}

/* ===== CUSTOMER DIALOG SPECIFIC STYLES ===== */

/* Customer dialog styling */
.customer-dialog .card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 6px 0 rgba(67, 89, 113, 0.12);
}

.customer-dialog .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Customer dialog avatar */
.customer-dialog .avatar {
    position: relative;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.customer-dialog .avatar-initial {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Customer dialog avatar colors */
.customer-dialog .bg-label-primary {
    background-color: rgba(105, 108, 255, 0.16) !important;
    color: #696cff !important;
}

.customer-dialog .bg-label-success {
    background-color: rgba(40, 167, 69, 0.16) !important;
    color: #28a745 !important;
}

.customer-dialog .bg-label-info {
    background-color: rgba(23, 162, 184, 0.16) !important;
    color: #17a2b8 !important;
}

.customer-dialog .bg-label-warning {
    background-color: rgba(255, 171, 0, 0.16) !important;
    color: #ffab00 !important;
}

/* Customer dialog icon sizing */
.customer-dialog .ti-sm {
    font-size: 1.25rem;
}

/* Animation cho loading */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.customer-dialog .loading-animation {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Customer dialog form controls */
.customer-dialog .form-control:focus,
.customer-dialog .form-select:focus {
    border-color: #696cff;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
}

/* Customer dialog buttons */
.customer-dialog .btn {
    transition: all 0.2s ease;
}

.customer-dialog .btn:hover {
    transform: translateY(-1px);
}

/* Customer dialog card header styling */
.customer-dialog .card-header {
    background-color: rgba(67, 89, 113, 0.04);
    border-bottom: 1px solid rgba(67, 89, 113, 0.12);
}

.customer-dialog .card-header h6 {
    color: #566a7f;
    font-weight: 600;
}

/* Dark mode support for customer dialog */
html.dark-style .customer-dialog .card-header,
.dark-style .customer-dialog .card-header,
body.dark-style .customer-dialog .card-header,
[data-theme="theme-dark"] .customer-dialog .card-header {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-bottom-color: var(--bs-border-color) !important;
}

html.dark-style .customer-dialog .card-header h6,
.dark-style .customer-dialog .card-header h6,
body.dark-style .customer-dialog .card-header h6,
[data-theme="theme-dark"] .customer-dialog .card-header h6 {
    color: #b6bee3 !important;
}

/* Smooth transition cho address section */
.customer-dialog .address-section {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

/* Customer dialog form spacing */
.customer-dialog .card {
    margin-bottom: 1.5rem;
}

.customer-dialog .card:last-child {
    margin-bottom: 1rem;
}

/* Mobile optimizations for customer dialog */
@media (max-width: 767.98px) {
    .customer-dialog .mobile-header {
        position: sticky;
        top: 0;
        z-index: 1020;
        background: var(--bs-body-bg);
        border-bottom: 1px solid var(--bs-border-color);
        margin: -1rem -1rem 1rem -1rem;
        padding: 1rem;
    }
    
    .customer-dialog .card {
        margin-bottom: 1rem;
    }
}

/* ===== CUSTOMER SEARCH AUTOCOMPLETE STYLES ===== */

/* Customer search results styling */
.customer-search-results .list-group-item {
    border: 1px solid var(--bs-border-color);
    transition: all 0.2s ease;
}

.customer-search-results .list-group-item:hover {
    background-color: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary-border-subtle);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Avatar sizing for search results */
.customer-search-results .avatar-xs {
    width: 24px;
    height: 24px;
}

.customer-search-results .avatar-xs .avatar-initial {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
}

/* Badge styling in search results */
.customer-search-results .badge {
    font-size: 0.65rem;
    padding: 0.25em 0.5em;
}

/* Selected customer display styling */
.selected-customer-display .avatar-sm {
    width: 40px;
    height: 40px;
}

.selected-customer-display .avatar-sm .avatar-initial {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.selected-customer-display .badge {
    font-size: 0.7rem;
    padding: 0.3em 0.6em;
}

/* Phone badges styling */
.phone-badges .badge {
    font-size: 0.75rem;
    padding: 0.4em 0.7em;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Info badges styling */
.info-badges .badge {
    font-size: 0.7rem;
    padding: 0.3em 0.6em;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Dark mode support for customer search */
html.dark-style .customer-search-results .list-group-item:hover,
.dark-style .customer-search-results .list-group-item:hover,
body.dark-style .customer-search-results .list-group-item:hover,
[data-theme="theme-dark"] .customer-search-results .list-group-item:hover {
    background-color: rgba(105, 108, 255, 0.1) !important;
    border-color: rgba(105, 108, 255, 0.3) !important;
}

/* Responsive adjustments for customer search */
@media (max-width: 767.98px) {
    .customer-search-results .badge {
        font-size: 0.6rem;
        padding: 0.2em 0.4em;
    }
    
    .selected-customer-display .badge {
        font-size: 0.65rem;
        padding: 0.25em 0.5em;
    }
    
    .phone-badges .badge,
    .info-badges .badge {
        font-size: 0.65rem;
        padding: 0.3em 0.5em;
    }
}


/* ===== RADZEN SIDE DIALOG DARK THEME ===== */

/* Side Dialog container - nền chính của side dialog */
.rz-dialog-side {
    z-index: 1096 !important;
}

html.dark-style .rz-dialog-side,
.dark-style .rz-dialog-side,
body.dark-style .rz-dialog-side,
[data-theme="theme-dark"] .rz-dialog-side {
    background-color: #2f3349 !important;
    color: #b6bee3 !important;
    border: 1px solid #444564 !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4) !important;
    z-index: 1096 !important;
}

/* Side Dialog titlebar - thanh tiêu đề */
html.dark-style .rz-dialog-side-titlebar,
.dark-style .rz-dialog-side-titlebar,
body.dark-style .rz-dialog-side-titlebar,
[data-theme="theme-dark"] .rz-dialog-side-titlebar {
    background-color: #2f3349 !important;
    color: #b6bee3 !important;
    border-bottom: 1px solid #444564 !important;
}

/* Side Dialog title text */
html.dark-style .rz-dialog-side-title,
.dark-style .rz-dialog-side-title,
body.dark-style .rz-dialog-side-title,
[data-theme="theme-dark"] .rz-dialog-side-title {
    color: #b6bee3 !important;
    font-weight: 600 !important;
}

/* Side Dialog content - nội dung chính */
html.dark-style .rz-dialog-side-content,
.dark-style .rz-dialog-side-content,
body.dark-style .rz-dialog-side-content,
[data-theme="theme-dark"] .rz-dialog-side-content {
    background-color: #2f3349 !important;
    color: #b6bee3 !important;
}

/* Side Dialog close button - nút đóng side dialog */
html.dark-style .rz-dialog-side-titlebar-close,
.dark-style .rz-dialog-side-titlebar-close,
body.dark-style .rz-dialog-side-titlebar-close,
[data-theme="theme-dark"] .rz-dialog-side-titlebar-close {
    color: #b6bee3 !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0.25rem !important;
    transition: background-color 0.2s ease !important;
}

/* Side Dialog close button hover state */
html.dark-style .rz-dialog-side-titlebar-close:hover,
.dark-style .rz-dialog-side-titlebar-close:hover,
body.dark-style .rz-dialog-side-titlebar-close:hover,
[data-theme="theme-dark"] .rz-dialog-side-titlebar-close:hover {
    background-color: #444564 !important;
    color: #ffffff !important;
}

/* Side Dialog close button icon */
html.dark-style .rz-dialog-side-titlebar-close .rzi,
.dark-style .rz-dialog-side-titlebar-close .rzi,
body.dark-style .rz-dialog-side-titlebar-close .rzi,
[data-theme="theme-dark"] .rz-dialog-side-titlebar-close .rzi {
    color: inherit !important;
}

/* ===== FORM ELEMENTS TRONG SIDE DIALOG ===== */

/* Labels trong side dialog */
html.dark-style .rz-dialog-side .rz-label,
html.dark-style .rz-dialog-side label,
.dark-style .rz-dialog-side .rz-label,
.dark-style .rz-dialog-side label,
body.dark-style .rz-dialog-side .rz-label,
body.dark-style .rz-dialog-side label,
[data-theme="theme-dark"] .rz-dialog-side .rz-label,
[data-theme="theme-dark"] .rz-dialog-side label {
    color: #b6bee3 !important;
}

/* Input fields trong side dialog */
html.dark-style .rz-dialog-side .rz-textbox,
html.dark-style .rz-dialog-side .form-control,
html.dark-style .rz-dialog-side input[type="text"],
html.dark-style .rz-dialog-side input[type="password"],
html.dark-style .rz-dialog-side input[type="email"],
.dark-style .rz-dialog-side .rz-textbox,
.dark-style .rz-dialog-side .form-control,
.dark-style .rz-dialog-side input[type="text"],
.dark-style .rz-dialog-side input[type="password"],
.dark-style .rz-dialog-side input[type="email"],
body.dark-style .rz-dialog-side .rz-textbox,
body.dark-style .rz-dialog-side .form-control,
body.dark-style .rz-dialog-side input[type="text"],
body.dark-style .rz-dialog-side input[type="password"],
body.dark-style .rz-dialog-side input[type="email"],
[data-theme="theme-dark"] .rz-dialog-side .rz-textbox,
[data-theme="theme-dark"] .rz-dialog-side .form-control,
[data-theme="theme-dark"] .rz-dialog-side input[type="text"],
[data-theme="theme-dark"] .rz-dialog-side input[type="password"],
[data-theme="theme-dark"] .rz-dialog-side input[type="email"] {
    background-color: #444564 !important;
    color: #b6bee3 !important;
    border: 1px solid #5a5f7a !important;
}

/* Input focus state trong side dialog */
html.dark-style .rz-dialog-side .rz-textbox:focus,
html.dark-style .rz-dialog-side .form-control:focus,
html.dark-style .rz-dialog-side input:focus,
.dark-style .rz-dialog-side .rz-textbox:focus,
.dark-style .rz-dialog-side .form-control:focus,
.dark-style .rz-dialog-side input:focus,
body.dark-style .rz-dialog-side .rz-textbox:focus,
body.dark-style .rz-dialog-side .form-control:focus,
body.dark-style .rz-dialog-side input:focus,
[data-theme="theme-dark"] .rz-dialog-side .rz-textbox:focus,
[data-theme="theme-dark"] .rz-dialog-side .form-control:focus,
[data-theme="theme-dark"] .rz-dialog-side input:focus {
    border-color: #696cff !important;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25) !important;
}

/* Disabled inputs trong side dialog */
html.dark-style .rz-dialog-side .rz-textbox:disabled,
html.dark-style .rz-dialog-side .form-control:disabled,
html.dark-style .rz-dialog-side input:disabled,
.dark-style .rz-dialog-side .rz-textbox:disabled,
.dark-style .rz-dialog-side .form-control:disabled,
.dark-style .rz-dialog-side input:disabled,
body.dark-style .rz-dialog-side .rz-textbox:disabled,
body.dark-style .rz-dialog-side .form-control:disabled,
body.dark-style .rz-dialog-side input:disabled,
[data-theme="theme-dark"] .rz-dialog-side .rz-textbox:disabled,
[data-theme="theme-dark"] .rz-dialog-side .form-control:disabled,
[data-theme="theme-dark"] .rz-dialog-side input:disabled {
    background-color: #3a3f5a !important;
    color: #8692d0 !important;
    opacity: 0.7 !important;
}

/* Placeholder text trong side dialog */
html.dark-style .rz-dialog-side .rz-textbox::placeholder,
html.dark-style .rz-dialog-side .form-control::placeholder,
html.dark-style .rz-dialog-side input::placeholder,
.dark-style .rz-dialog-side .rz-textbox::placeholder,
.dark-style .rz-dialog-side .form-control::placeholder,
.dark-style .rz-dialog-side input::placeholder,
body.dark-style .rz-dialog-side .rz-textbox::placeholder,
body.dark-style .rz-dialog-side .form-control::placeholder,
body.dark-style .rz-dialog-side input::placeholder,
[data-theme="theme-dark"] .rz-dialog-side .rz-textbox::placeholder,
[data-theme="theme-dark"] .rz-dialog-side .form-control::placeholder,
[data-theme="theme-dark"] .rz-dialog-side input::placeholder {
    color: #8692d0 !important;
    opacity: 0.7 !important;
}

/* ===== BUTTONS TRONG SIDE DIALOG ===== */

/* Primary buttons trong side dialog */
html.dark-style .rz-dialog-side .btn-primary,
.dark-style .rz-dialog-side .btn-primary,
body.dark-style .rz-dialog-side .btn-primary,
[data-theme="theme-dark"] .rz-dialog-side .btn-primary {
    background-color: #696cff !important;
    border-color: #696cff !important;
    color: #ffffff !important;
}

/* Secondary buttons trong side dialog */
html.dark-style .rz-dialog-side .btn-secondary,
.dark-style .rz-dialog-side .btn-secondary,
body.dark-style .rz-dialog-side .btn-secondary,
[data-theme="theme-dark"] .rz-dialog-side .btn-secondary {
    background-color: #5a5f7a !important;
    border-color: #5a5f7a !important;
    color: #b6bee3 !important;
}

/* Warning buttons trong side dialog */
html.dark-style .rz-dialog-side .btn-warning,
.dark-style .rz-dialog-side .btn-warning,
body.dark-style .rz-dialog-side .btn-warning,
[data-theme="theme-dark"] .rz-dialog-side .btn-warning {
    background-color: #ffab00 !important;
    border-color: #ffab00 !important;
    color: #ffffff !important;
}

/* ===== VALIDATION MESSAGES TRONG SIDE DIALOG ===== */

/* Validation error messages trong side dialog */
html.dark-style .rz-dialog-side .validation-message,
html.dark-style .rz-dialog-side .field-validation-error,
.dark-style .rz-dialog-side .validation-message,
.dark-style .rz-dialog-side .field-validation-error,
body.dark-style .rz-dialog-side .validation-message,
body.dark-style .rz-dialog-side .field-validation-error,
[data-theme="theme-dark"] .rz-dialog-side .validation-message,
[data-theme="theme-dark"] .rz-dialog-side .field-validation-error {
    color: #ff6b6b !important;
}

/* ===== SCROLLBAR STYLING TRONG SIDE DIALOG ===== */

/* Custom scrollbar cho side dialog content */
html.dark-style .rz-dialog-side-content::-webkit-scrollbar,
.dark-style .rz-dialog-side-content::-webkit-scrollbar,
body.dark-style .rz-dialog-side-content::-webkit-scrollbar,
[data-theme="theme-dark"] .rz-dialog-side-content::-webkit-scrollbar {
    width: 8px;
}

html.dark-style .rz-dialog-side-content::-webkit-scrollbar-track,
.dark-style .rz-dialog-side-content::-webkit-scrollbar-track,
body.dark-style .rz-dialog-side-content::-webkit-scrollbar-track,
[data-theme="theme-dark"] .rz-dialog-side-content::-webkit-scrollbar-track {
    background: #444564;
    border-radius: 4px;
}

html.dark-style .rz-dialog-side-content::-webkit-scrollbar-thumb,
.dark-style .rz-dialog-side-content::-webkit-scrollbar-thumb,
body.dark-style .rz-dialog-side-content::-webkit-scrollbar-thumb,
[data-theme="theme-dark"] .rz-dialog-side-content::-webkit-scrollbar-thumb {
    background: #5a5f7a;
    border-radius: 4px;
}

html.dark-style .rz-dialog-side-content::-webkit-scrollbar-thumb:hover,
.dark-style .rz-dialog-side-content::-webkit-scrollbar-thumb:hover,
body.dark-style .rz-dialog-side-content::-webkit-scrollbar-thumb:hover,
[data-theme="theme-dark"] .rz-dialog-side-content::-webkit-scrollbar-thumb:hover {
    background: #696cff;
}

/* Radzen Dialog Button Customization - Make rz-secondary look like btn-secondary */
.rz-dialog-confirm-buttons .rz-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

.rz-dialog-confirm-buttons .rz-secondary:hover {
    background-color: #5c636a !important;
    border-color: #565e64 !important;
    color: #fff !important;
}

.rz-dialog-confirm-buttons .rz-secondary:focus {
    background-color: #5c636a !important;
    border-color: #565e64 !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.5) !important;
}

.rz-dialog-confirm-buttons .rz-secondary:active {
    background-color: #565e64 !important;
    border-color: #51585e !important;
    color: #fff !important;
}
