.avatar-uploader {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	padding: 20px;
	background: #f8f9fa;
	border-radius: 12px;
	border: 1px solid #e9ecef;
}

.avatar-uploader__preview {
	flex-shrink: 0;
}

.avatar-uploader__preview img {
	display: block;
	border: 3px solid #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s ease;
}

.avatar-uploader__preview img:hover {
	transform: scale(1.05);
}

.avatar-uploader__controls {
	flex: 1;
	min-width: 0;
}

.avatar-uploader__label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 12px;
	border-radius: 6px;
	font-weight: 500;
	font-size: 0.875rem;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.avatar-uploader__label:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.avatar-uploader__label i {
	margin-right: 6px;
	font-size: 0.875rem;
}

.avatar-uploader__controls .btn-sm {
	padding: 6px 12px;
	font-size: 0.875rem;
	line-height: 1.5;
}

.avatar-uploader__input {
	position: relative;
}

.avatar-uploader__input input[type="file"] {
	opacity: 0;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
	.avatar-uploader {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	
	.avatar-uploader__controls {
		width: 100%;
	}
	
	.avatar-uploader__controls .d-flex {
		justify-content: center;
	}
    .avatar-uploader__preview {
        margin-left: auto;
        margin-right: auto;
    }
}
/* Components CSS - Tách từ inline styles */

/* Code Example Styles */
.code-example {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.code-example br {
    display: block;
    margin: 0.25rem 0;
}

/* Component Demo Styles */
.component-demo {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    margin: 1rem 0;
}

/* Toast Container Styles */
.toast-container {
    z-index: 1055;
}

.toast-container.position-fixed {
    position: fixed;
}

.toast-container.top-0 {
    top: 0;
}

.toast-container.end-0 {
    right: 0;
}

.toast-container.start-0 {
    left: 0;
}

.toast-container.bottom-0 {
    bottom: 0;
}

.toast-container.p-3 {
    padding: 1rem;
}

.toast-container.top-0.start-50 {
    top: 0;
    left: 50%;
}

.toast-container.translate-middle-x {
    transform: translateX(-50%);
}

.toast-container.bottom-0.start-50 {
    bottom: 0;
    left: 50%;
}

/* Toast Type Styles */
.toast.success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.toast.error {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.toast.warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.toast.info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #055160;
}

/* Bootstrap Autocomplete Styles */
.autocomplete-container {
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 #f8f9fa;
}

.autocomplete-container::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-container::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.autocomplete-container::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

.autocomplete-container::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.autocomplete-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-radius: 0.375rem;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.15s ease-in-out;
    font-size: 0.875rem;
    line-height: 1.5;
}

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

.autocomplete-item:hover,
.autocomplete-item-active {
    background-color: #f8f9fa;
    color: #495057;
}

.autocomplete-item-highlight {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* Legacy Autocomplete Dropdown Styles */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.autocomplete-dropdown .list-group {
    margin: 0;
    border-radius: 0.375rem;
}

.autocomplete-dropdown .list-group-item {
    border: none;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
}

.autocomplete-dropdown .list-group-item:last-child {
    border-bottom: none;
}

.autocomplete-dropdown .list-group-item:hover {
    background-color: #f8f9fa;
}

.autocomplete-dropdown .list-group-item:active {
    background-color: #e9ecef;
}

/* Form Component Styles */
.form-component {
    max-width: 100%;
}

.form-component .form-control {
    margin-bottom: 0.5rem;
}

.form-component .invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.form-component .is-invalid ~ .invalid-feedback {
    display: block;
}

.form-component .is-valid {
    border-color: #198754;
}

.form-component .is-invalid {
    border-color: #dc3545;
}

/* Image Upload Styles */
.image-upload-container {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.image-upload-container:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.image-upload-area {
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-area.dragover {
    border-color: #007bff;
    background: #e3f2fd;
    transform: scale(1.02);
}

/* Make label look like button */
.upload-btn {
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    border: 1px solid #0d6efd;
    color: #0d6efd;
    background-color: transparent;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.15s ease-in-out;
    margin: 0;
}

.upload-btn:hover {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Ensure label works properly */
.upload-btn:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* File input styling - hidden but clickable */
.image-upload-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* Ensure label can trigger hidden input */
.upload-btn {
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    border: 1px solid #0d6efd;
    color: #0d6efd;
    background-color: transparent;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.15s ease-in-out;
    margin: 0;
    pointer-events: auto;
}

.image-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.upload-title {
    color: #495057;
    margin: 0;
    font-weight: 500;
}

.upload-btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.upload-hint {
    color: #6c757d;
    font-size: 0.875rem;
    margin: 0;
}

/* Image Preview Container */
.image-preview-container {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.preview-title {
    color: #495057;
    margin: 0;
    font-weight: 500;
}

.remove-image {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.image-preview-item {
    position: relative;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.image-preview-item:hover {
    transform: scale(1.05);
}

.image-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.image-preview-item .remove-single {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview-item:hover .remove-single {
    opacity: 1;
}

.image-preview-item .file-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    text-align: center;
}

/* Drag and Drop States */
.image-upload-area.drag-over {
    border-color: #28a745;
    background: #d4edda;
}

.image-upload-area.drag-error {
    border-color: #dc3545;
    background: #f8d7da;
}

/* Loading State */
.image-upload-area.loading {
    pointer-events: none;
    opacity: 0.7;
}

.image-upload-area.loading .upload-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .image-upload-area {
        padding: 1.5rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .image-preview-item img {
        height: 100px;
    }
}

/* Modal Component Styles */
.modal .modal-dialog {
    margin: 1.75rem auto;
}

.modal .modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal .modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal .modal-body {
    padding: 1.5rem;
}

.modal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* Button Group Styles */
.btn-group .btn {
    margin-right: 0.5rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Card Styles */
.card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 10px;
}

.card-body {
    padding: 10px;
}

/* List Group Styles */
.list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1.25rem;
}

.list-group-item:first-child {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.list-group-item:last-child {
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Loading States */
.form-loading {
    position: relative;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-loading .form-control {
    opacity: 0.6;
}

/* Button Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading .btn-text {
    opacity: 0;
}

.btn-loading .btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
}

/* Form Validation Improvements */
.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Management */
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Animation Improvements */
.toast {
    transition: all 0.3s ease-in-out;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Admin Layout Styles */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.admin-sidebar.collapsed {
    width: 60px;
}

.admin-sidebar .sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #34495e;
    text-align: center;
}

.admin-sidebar .sidebar-header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #004aad;
}

.admin-sidebar .sidebar-header .logo.collapsed {
    font-size: 1.2rem;
}

.admin-sidebar .nav-link {
    color: #bdc3c7;
    padding: 0.75rem 1rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: #004aad;
    color: white;
}

.admin-sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

.admin-sidebar .nav-link .nav-text {
    margin-left: 10px;
    transition: opacity 0.3s ease;
}

.admin-sidebar .nav-link .nav-text .nav-zh {
    opacity: 0.9;
    font-size: 0.9em;
}

.admin-sidebar.collapsed .nav-link .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.admin-sidebar.collapsed .logo-img {
    height: 30px !important;
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.admin-main.collapsed {
    margin-left: 60px;
}

.admin-header {
    background: white;
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.admin-content {
    padding: 10px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.2rem;
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FDB800;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .component-demo {
        padding: 1rem;
    }
    
    .code-example {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
}
