.categories-tree {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  padding: 8px 0;
}

.tree-category {
  margin-bottom: 6px;
}
.tree-category .tree-category-header {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
  user-select: none;
  border-radius: 4px;
}
.tree-category .tree-category-header:hover {
  background-color: #f8f9fa;
}
.tree-category .tree-category-header.expanded {
  background-color: #f0f4ff;
}
.tree-category .tree-category-header .tree-toggle {
  font-size: 13px;
  color: #9fa5ad;
  transition: transform 0.2s;
  min-width: 14px;
}
.tree-category .tree-category-header .tree-spacer {
  width: 14px;
  display: inline-block;
}
.tree-category .tree-category-header .category-icon {
  font-size: 18px;
  color: #2c7be5;
}
.tree-category .tree-category-header .category-name {
  font-weight: 600;
  color: #212529;
  font-size: 14px;
  flex: 1;
}
.tree-category .tree-category-header .category-count {
  font-size: 12px;
  color: #9fa5ad;
  font-weight: 400;
}
.tree-category .tree-category-children {
  padding-left: 32px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.tree-category-all {
  margin-bottom: 6px;
}
.tree-category-all .tree-all-header {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
  user-select: none;
  border-radius: 4px;
}
.tree-category-all .tree-all-header:hover {
  background-color: #f8f9fa;
}
.tree-category-all .tree-all-header.expanded {
  background-color: #e8f3ff;
}
.tree-category-all .tree-all-header .tree-toggle {
  font-size: 12px;
  color: #9fa5ad;
  transition: transform 0.2s;
  min-width: 14px;
}
.tree-category-all .tree-all-header .all-icon {
  font-size: 16px;
  color: #6c757d;
}
.tree-category-all .tree-all-header .all-name {
  font-weight: 500;
  color: #424652;
  font-size: 13px;
  flex: 1;
}
.tree-category-all .tree-all-header .all-count {
  font-size: 11px;
  color: #9fa5ad;
  font-weight: 400;
}
.tree-category-all .tree-all-offers {
  padding-left: 32px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.tree-subcategory {
  margin-bottom: 6px;
}
.tree-subcategory .tree-subcategory-header {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
  user-select: none;
  border-radius: 4px;
}
.tree-subcategory .tree-subcategory-header:hover {
  background-color: #f8f9fa;
}
.tree-subcategory .tree-subcategory-header.expanded {
  background-color: #e8f3ff;
}
.tree-subcategory .tree-subcategory-header .tree-toggle {
  font-size: 12px;
  color: #9fa5ad;
  transition: transform 0.2s;
  min-width: 14px;
}
.tree-subcategory .tree-subcategory-header .tree-spacer {
  width: 14px;
  display: inline-block;
}
.tree-subcategory .tree-subcategory-header .subcategory-icon {
  font-size: 16px;
  color: #7b8ba0;
}
.tree-subcategory .tree-subcategory-header .subcategory-name {
  font-weight: 500;
  color: #424652;
  font-size: 13px;
  flex: 1;
}
.tree-subcategory .tree-subcategory-header .subcategory-count {
  font-size: 11px;
  color: #9fa5ad;
  font-weight: 400;
}
.tree-subcategory .tree-subcategory-children {
  padding-left: 32px;
  margin-top: 6px;
  margin-bottom: 6px;
}
.tree-subcategory .tree-subcategory-offers {
  padding-left: 32px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.tree-offer {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  border-radius: 4px;
  margin: 3px 0;
}
.tree-offer:hover {
  background-color: #f8f9fa;
}
.tree-offer.active {
  background-color: #d9ecff;
  border-left: 3px solid #2c7be5;
  padding-left: 9px;
}
.tree-offer.active .offer-icon {
  color: #2c7be5;
}
.tree-offer.active .offer-name {
  font-weight: 600;
  color: #2c7be5;
}
.tree-offer .offer-icon {
  font-size: 16px;
  color: #95a5b8;
  transition: color 0.2s;
}
.tree-offer .offer-name {
  font-size: 13px;
  color: #4a5568;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creatives-container {
  padding: 0;
}

.channel-section {
  border-bottom: 1px solid #e9ecef;
}
.channel-section:last-child {
  border-bottom: none;
}
.channel-section .channel-header {
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s;
  user-select: none;
}
.channel-section .channel-header:hover {
  background-color: #f8f9fa;
}
.channel-section .channel-header.collapsed i.fe-chevron-down {
  display: none;
}
.channel-section .channel-header.collapsed i.fe-chevron-right {
  display: inline-block;
}
.channel-section .channel-header:not(.collapsed) i.fe-chevron-down {
  display: inline-block;
}
.channel-section .channel-header:not(.collapsed) i.fe-chevron-right {
  display: none;
}
.channel-section .channel-header h6 {
  font-weight: 600;
  color: #212529;
  margin: 0;
}
.channel-section .channel-header .badge {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 12px;
}
.channel-section .channel-header .btn-add-creative {
  font-size: 13px;
  padding: 4px 12px;
}
.channel-section .creatives-list {
  padding: 0 20px 16px 20px;
}

.creative-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  transition: all 0.2s;
}
.creative-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #2c7be5;
}
.creative-item:last-child {
  margin-bottom: 0;
}
.creative-item .creative-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 12px;
}
.creative-item .creative-item-icon i {
  font-size: 24px;
  color: #9fa5ad;
}
.creative-item .creative-item-info {
  flex: 1;
  min-width: 0;
}
.creative-item .creative-item-title {
  font-weight: 500;
  color: #212529;
  font-size: 14px;
  margin-bottom: 4px;
}
.creative-item .creative-item-format {
  margin-bottom: 6px;
}
.creative-item .creative-item-format .badge {
  font-size: 11px;
  padding: 3px 8px;
}
.creative-item .creative-item-description {
  color: #6c757d;
  font-size: 13px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.creative-item .creative-item-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #9fa5ad;
}
.creative-item .creative-item-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.creative-item .creative-item-meta .meta-item i {
  font-size: 14px;
}
.creative-item .creative-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 12px;
}
.creative-item .creative-item-actions .btn {
  padding: 4px 8px;
  font-size: 12px;
}

.empty-state {
  display: none;
  padding: 60px 20px;
  text-align: center;
}
.empty-state i {
  font-size: 48px;
  color: #9fa5ad;
}
.empty-state p {
  margin-top: 16px;
  font-size: 14px;
  color: #6c757d;
}

.tree-loading {
  padding: 12px;
  text-align: center;
  color: #6c757d;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tree-loading .spinner-border-sm {
  width: 16px;
  height: 16px;
}

.tree-error {
  padding: 12px;
  text-align: center;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tree-error i {
  font-size: 16px;
}

.tree-empty {
  padding: 12px;
  text-align: center;
  color: #9fa5ad;
  font-size: 12px;
}

.categories-tree::-webkit-scrollbar {
  width: 6px;
}

.categories-tree::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.categories-tree::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.categories-tree::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.select2-results__option .banner-option-item {
  display: flex;
  align-items: center;
}
.select2-results__option .banner-preview-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 12px;
  flex-shrink: 0;
}
.select2-results__option .banner-option-text {
  flex: 1;
  min-width: 0;
}
.select2-results__option .banner-option-name {
  font-size: 14px;
  color: #424652;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#modal-add-banner-creative .select2-container {
  width: 100% !important;
}
#modal-add-banner-creative .select2-container--bootstrap4 .select2-selection {
  background-color: #f7f8f9;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  min-height: 45px;
}
#modal-add-banner-creative .select2-container--bootstrap4 .select2-selection__placeholder {
  color: #9fa5ad;
}
#modal-add-banner-creative .select2-dropdown {
  border-radius: 8px;
  border: 1px solid #ececee;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
#modal-add-banner-creative .select2-search__field {
  background-color: #f7f8f9;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
}
#modal-add-banner-creative .select2-results__option {
  padding: 10px 12px;
}
#modal-add-banner-creative .select2-results__option--highlighted {
  background-color: #f7f8f9;
  color: #424652;
}
#modal-add-banner-creative .select2-results__option[aria-selected=true] {
  background-color: #e8f5ff;
}

.offers-search-container {
  border-bottom: 1px solid #e9ecef;
  padding: 12px;
}

.offers-search-form .input-group .form-control {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  transition: all 0.2s;
}
.offers-search-form .input-group .form-control:focus {
  background-color: #ffffff;
  border-color: #2c7be5;
  box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.1);
}
.offers-search-form .input-group .form-control::placeholder {
  color: #9fa5ad;
}
.offers-search-form .input-group .input-group-append {
  margin-left: -1px;
}
.offers-search-form .input-group .input-group-append .btn {
  background-color: transparent;
  border: 1px solid #e9ecef;
  border-left: none;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  color: #6c757d;
  transition: all 0.2s;
}
.offers-search-form .input-group .input-group-append .btn:hover {
  color: #212529;
  background-color: #f8f9fa;
}
.offers-search-form .input-group .input-group-append .btn i {
  font-size: 14px;
}

.offers-search-results {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 12px;
  border-top: 1px solid #e9ecef;
  padding-top: 8px;
}
.offers-search-results::-webkit-scrollbar {
  width: 6px;
}
.offers-search-results::-webkit-scrollbar-track {
  background: #f1f1f1;
}
.offers-search-results::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}
.offers-search-results::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.search-result-item {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  border-radius: 4px;
  margin: 3px 0;
}
.search-result-item:hover {
  background-color: #f8f9fa;
}
.search-result-item.active {
  background-color: #d9ecff;
  border-left: 3px solid #2c7be5;
  padding-left: 9px;
}
.search-result-item.active .search-result-icon {
  color: #2c7be5;
}
.search-result-item.active .search-result-title {
  font-weight: 600;
  color: #2c7be5;
}
.search-result-item .search-result-icon {
  font-size: 16px;
  color: #95a5b8;
  transition: color 0.2s;
  flex-shrink: 0;
}
.search-result-item .search-result-content {
  flex: 1;
  min-width: 0;
}
.search-result-item .search-result-title {
  font-size: 13px;
  color: #4a5568;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.search-result-item .search-result-title .search-highlight {
  background-color: #fff3cd;
  color: #856404;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
}
.search-result-item .search-result-meta {
  font-size: 11px;
  color: #9fa5ad;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-result-item .search-result-meta .meta-badge {
  background-color: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

mark.search-highlight {
  background-color: #fff3cd;
  color: #856404;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
}

.search-loading {
  padding: 16px;
  text-align: center;
  color: #6c757d;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.search-loading .spinner-border-sm {
  width: 14px;
  height: 14px;
}

.search-empty {
  padding: 16px;
  text-align: center;
  color: #9fa5ad;
  font-size: 12px;
}

.search-error {
  padding: 16px;
  text-align: center;
  color: #dc3545;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.search-error i {
  font-size: 14px;
}

.direct-offer-container {
  border-bottom: 1px solid #e9ecef;
  padding: 12px;
  background-color: #f8f9fa;
}

.direct-offer-header {
  font-size: 11px;
  color: #9fa5ad;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.direct-offer-item {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 4px;
  transition: all 0.2s;
}
.direct-offer-item.active {
  background-color: #d9ecff;
  border-left: 3px solid #2c7be5;
  padding-left: 9px;
}
.direct-offer-item.active .offer-icon {
  color: #2c7be5;
}
.direct-offer-item.active .offer-title {
  font-weight: 600;
  color: #2c7be5;
}
.direct-offer-item .offer-icon {
  font-size: 16px;
  color: #2c7be5;
  flex-shrink: 0;
}
.direct-offer-item .offer-content {
  flex: 1;
  min-width: 0;
}
.direct-offer-item .offer-title {
  font-size: 13px;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.direct-offer-item .offer-meta {
  font-size: 11px;
  color: #9fa5ad;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}