
:root {
  --admin-primary: #221c36;
  --admin-primary-foreground: #dcdade;
  --admin-muted-foreground: #71717A;

  
  --admin-white: #ffffff;
  --admin-gray-50: #f0f3f6;
  --admin-gray-100: #e7e7e7;
  --admin-gray-200: #d6d8da;
  --admin-gray-300: #bababb;
  --admin-gray-400: #b0b0b0;
  --admin-gray-900: #1a1a1a;
  
  --admin-danger: #e71e09;
  --admin-info-bg: #ebf4fa;
  --admin-info-fg: #1b4e7a;
  
  --admin-space-xs: 0.25rem;
  --admin-space-sm: 0.5rem;
  --admin-space-md: 0.75rem;
  --admin-space-lg: 1rem;
  --admin-space-xl: 1.5rem;
  --admin-space-2xl: 2rem;
  
  --admin-text-xs: 0.75rem;
  --admin-text-sm: 0.875rem;
  --admin-text-base: 1rem;
  --admin-text-lg: 1.125rem;
  --admin-text-xl: 1.25rem;
  
  --admin-radius-sm: 0.25rem;
  --admin-radius-md: 0.5rem;
  --admin-radius-lg: 0.75rem;
  --admin-radius-full: 9999px;
  
  --admin-border-width: 1px;
  --admin-border-width-thick: 4px;
  
  --admin-transition-fast: 0.15s ease;
  --admin-transition-base: 0.2s ease;
  --admin-transition-slow: 0.3s ease;
  
  --admin-bg-base: var(--admin-white);
  --admin-bg-muted: var(--admin-gray-50);
  --admin-bg-selected: #f3f3f5;
  --admin-bg-hover: var(--admin-gray-200);
  --admin-bg-disabled: var(--admin-gray-50);
  
  --admin-sidebar-bg: #F2F2F2;
  --admin-sidebar-hover: #C3C3C4;
  --admin-sidebar-selected: #DBDBDB;
  
  --admin-text-primary: var(--admin-primary);
  --admin-text-secondary: var(--admin-gray-900);
  --admin-text-muted: var(--admin-muted-foreground);
  --admin-text-inverse: var(--admin-white);
  --admin-text-disabled: var(--admin-gray-400);
  
  --admin-border-default: var(--admin-gray-100);
  --admin-border-muted: var(--admin-gray-400);
  --admin-border-strong: var(--admin-gray-300);
  --admin-border-focus: var(--admin-primary);
  --admin-border-disabled: var(--admin-gray-300);
  
  --admin-icon-default: var(--admin-gray-900);
  --admin-icon-muted: var(--admin-gray-400);
  --admin-icon-inverse: var(--admin-white);
  --admin-icon-danger: var(--admin-danger);
  
  --admin-focus-ring-width: 2px;
  --admin-focus-ring-offset: 2px;
  --admin-focus-ring-color: var(--admin-primary);
}

.admin-text-error {
  color: #DC2626;
}
.admin-settings-page ::selection,
.admin-sidebar ::selection,
.admin-card ::selection,
.admin-input::selection,
.admin-textarea::selection {
  background-color: var(--admin-primary) !important;
  color: var(--admin-white) !important;
}


.admin-sidebar {
  background-color: var(--admin-sidebar-bg) !important;
}

.admin-sidebar-header,
.admin-sidebar-content {
  background-color: var(--admin-sidebar-bg) !important;
}

.admin-sidebar-item {
  transition: background-color var(--admin-transition-base) !important;
  border-radius: var(--admin-radius-md) !important;
}

.admin-sidebar-item:hover {
  background-color: var(--admin-sidebar-hover) !important;
}

.admin-sidebar-item--active,
.admin-sidebar-item-active,
.admin-sidebar-item[data-active="true"] {
  background-color: var(--admin-sidebar-selected) !important;
}

.admin-section-title {
  color: var(--admin-text-primary) !important;
}

.admin-section-icon {
  color: var(--admin-text-primary) !important;
}

.admin-subsection-title {
  color: var(--admin-text-primary) !important;
}


.admin-field-label {
  color: var(--admin-text-primary) !important;
  font-size: var(--admin-text-sm);
  font-weight: 500;
}

.admin-field-description {
  color: var(--admin-text-muted) !important;
  font-size: var(--admin-text-sm);
}

.admin-input {
  transition: border-color var(--admin-transition-base);
}

.admin-input:focus,
.admin-input:focus-visible,
input.admin-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  --tw-ring-shadow: none !important;
  border-color: var(--admin-border-default) !important;
}

.admin-input:disabled {
  background-color: var(--admin-bg-disabled) !important;
  color: var(--admin-text-disabled) !important;
  border-color: var(--admin-border-disabled) !important;
  cursor: not-allowed;
}

.admin-textarea {
  border-color: var(--admin-border-muted) !important;
  transition: border-color var(--admin-transition-base);
}

.admin-textarea:focus,
.admin-textarea:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  --tw-ring-shadow: none !important;
  border-color: var(--admin-border-default) !important;
}

.admin-select-trigger,
.admin-dropdown-trigger {
  transition: border-color var(--admin-transition-base);
}

.admin-dropdown-trigger:hover {
  background-color: var(--admin-bg-base) !important;
}

.admin-select-trigger[data-state="open"],
.admin-dropdown-trigger[data-state="open"] {
  border-color: var(--admin-border-focus) !important;
}

.admin-select-label {
  color: var(--admin-text-primary) !important;
  font-weight: 600 !important;
}

.admin-select-item,
.admin-dropdown-item {
  transition: background-color var(--admin-transition-base);
  cursor: pointer;
}

.admin-select-item:hover,
.admin-dropdown-item:hover,
.admin-select-item[data-highlighted="true"],
.admin-dropdown-item[data-highlighted="true"] {
  background-color: var(--admin-bg-hover) !important;
}

.admin-select-item[data-state="checked"],
.admin-select-item[data-selected="true"],
.admin-dropdown-item[data-selected="true"] {
  background-color: var(--admin-bg-selected) !important;
}

.admin-select-content,
.admin-dropdown-content,
[data-radix-select-content],
[data-radix-dropdown-content] {
  border-radius: var(--admin-radius-md) !important;
}

.admin-select-empty,
.admin-dropdown-empty,
[data-slot="select-empty"] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 200px !important;
  color: var(--admin-text-muted) !important;
}

.admin-switch[data-state="checked"] {
  background-color: var(--admin-primary) !important;
}

.admin-switch[data-state="unchecked"] {
  background-color: var(--color-gray-200) !important;
}

.admin-switch:focus-visible {
  outline: var(--admin-focus-ring-width) solid var(--admin-focus-ring-color) !important;
  outline-offset: var(--admin-focus-ring-offset) !important;
}

.admin-checkbox {
  border: var(--admin-border-width) solid var(--admin-border-strong) !important;
  border-radius: var(--admin-radius-sm);
  transition: all var(--admin-transition-base);
  cursor: pointer;
}

.admin-checkbox:hover:not(:disabled) {
  border-color: var(--admin-primary) !important;
}

.admin-checkbox[data-state="checked"],
.admin-checkbox.checked {
  background-color: var(--admin-primary) !important;
  border-color: var(--admin-primary) !important;
}

.admin-checkbox[data-state="checked"] i,
.admin-checkbox.checked i {
  color: var(--admin-icon-inverse) !important;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--admin-space-sm);
  padding: var(--admin-space-sm) var(--admin-space-lg);
  border-radius: var(--admin-radius-md);
  font-size: var(--admin-text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--admin-transition-base);
  border: var(--admin-border-width) solid transparent;
}

.admin-btn--primary {
  background-color: var(--admin-primary) !important;
  color: var(--admin-primary-foreground) !important;
  border-color: var(--admin-border-default) !important;
}

.admin-btn--primary:hover:not(:disabled) {
  opacity: 0.9;
}

.admin-btn--secondary {
  background-color: var(--admin-white) !important;
  color: var(--admin-text-primary) !important;
  border-color: var(--admin-border-default) !important;
}

.admin-btn--secondary:hover:not(:disabled) {
  background-color: var(--admin-bg-muted) !important;
}

.admin-btn--ghost {
  background-color: transparent !important;
  color: var(--admin-text-primary) !important;
  border: none !important;
}

.admin-btn--ghost:hover:not(:disabled) {
  background-color: var(--admin-bg-muted) !important;
}


.admin-card {
  background-color: var(--admin-white) !important;
  border: var(--admin-border-width) solid var(--admin-border-default) !important;
  border-radius: var(--admin-radius-lg);
  transition: all var(--admin-transition-base);
}

.admin-card:hover {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.admin-text-primary {
  color: var(--admin-text-primary) !important;
}

.admin-text-secondary {
  color: var(--admin-text-secondary) !important;
}

.admin-text-muted {
  color: var(--admin-text-muted) !important;
}

.admin-icon-default {
  color: var(--admin-icon-default) !important;
}


.admin-icon {
  color: var(--admin-icon-default) !important;
}

.admin-icon--muted {
  color: var(--admin-icon-muted) !important;
}

.dku-icon-chevron-down-16.admin-icon {
  color: var(--admin-icon-default) !important;
}

.admin-icon--trash {
  color: var(--admin-danger) !important;
  transition: all var(--admin-transition-base);
  cursor: pointer;
  background-color: transparent !important;
  border-radius: var(--admin-radius-sm);
  padding: var(--admin-space-xs);
  opacity: 1 !important;
}

.admin-icon--trash:hover {
  background-color: #fee !important;
}

.admin-tool-icon {
  color: var(--admin-text-primary) !important;
}

.admin-tool-title {
  color: var(--admin-text-primary) !important;
}

.admin-alert {
  gap: var(--admin-space-sm) !important;
  padding: var(--admin-space-md) var(--admin-space-lg);
  border-radius: var(--admin-radius-md);
}

.admin-alert--info {
  background-color: var(--admin-info-bg) !important;
  border: none !important;
}

.admin-alert--info .admin-alert-title,
.admin-alert--info [data-slot="alert-title"],
.admin-alert--info [class*="AlertTitle"] {
  color: var(--admin-info-fg) !important;
  font-weight: 400 !important;
}

.admin-alert--info .admin-alert-description,
.admin-alert--info [data-slot="alert-description"],
.admin-alert--info [class*="AlertDescription"],
.admin-alert--info p,
.admin-alert--info span {
  color: var(--admin-info-fg) !important;
}

.admin-alert--info > svg,
.admin-alert--info > i {
  background-color: var(--admin-info-fg) !important;
  color: transparent !important;
  border-radius: var(--admin-radius-full) !important;
  flex-shrink: 0 !important;
  width: 16px !important;
  height: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.admin-alert--info > i::before {
  content: '';
  position: absolute;
  width: 2px;
  height: 6px;
  background-color: var(--admin-info-bg);
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
}

.admin-alert--info > i::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: var(--admin-info-bg);
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: var(--admin-radius-full);
}

.admin-alert--warning {
  background-color: transparent !important;
  border: 1px solid #D1D5DB !important; /* gray-300 */
  border-left: 4px solid #F59E0B !important; /* amber-500 accent */
}

.admin-alert--warning .admin-alert-title,
.admin-alert--warning [data-slot="alert-title"],
.admin-alert--warning [class*="AlertTitle"] {
  color: var(--admin-text-primary) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
}

.admin-alert--warning .admin-alert-description,
.admin-alert--warning [data-slot="alert-description"],
.admin-alert--warning [class*="AlertDescription"],
.admin-alert--warning p,
.admin-alert--warning span,
.admin-alert--warning ul,
.admin-alert--warning li {
  color: var(--admin-text-secondary) !important;
}

.admin-alert--warning > svg,
.admin-alert--warning > i {
  color: #F59E0B !important; /* amber-500 */
  flex-shrink: 0 !important;
}

.admin-tool-selector-item,
.admin-model-selector-item {
  cursor: pointer !important;
  transition: background-color var(--admin-transition-base) !important;
  border: var(--admin-border-width) solid var(--admin-border-default) !important;
  border-radius: var(--admin-radius-md);
  background-color: var(--admin-bg-base) !important;
}

.admin-tool-selector-item:hover,
.admin-model-selector-item:hover {
  background-color: var(--admin-bg-base) !important;
}

.admin-tool-selector-item.selected,
.admin-tool-selector-item[data-selected="true"],
.admin-model-selector-item.selected,
.admin-model-selector-item[data-selected="true"] {
  background-color: var(--admin-bg-selected) !important;
  border-color: var(--admin-border-focus) !important;
}

.admin-tool-checkmark,
.admin-model-checkmark {
  color: var(--admin-text-primary) !important;
}

.admin-border {
  border-color: var(--admin-border-default) !important;
}

.admin-border--muted {
  border-color: var(--admin-border-muted) !important;
}

.admin-info-box {
  background: linear-gradient(to right, var(--admin-bg-muted), var(--admin-bg-selected)) !important;
  border-left: var(--admin-border-width-thick) solid var(--admin-border-focus) !important;
  border-radius: 0 var(--admin-radius-md) var(--admin-radius-md) 0 !important;
}

.admin-info-box p {
  color: var(--admin-text-primary) !important;
}

.admin-command-item[data-selected="true"] {
  background-color: var(--admin-bg-selected) !important;
}

[data-radix-select-viewport] [data-radix-collection-item][data-slot="label"],
.admin-select-label {
  color: var(--admin-text-primary) !important;
  font-weight: 600 !important;
}


[data-slot="collapsible-trigger"]:hover {
  background-color: var(--admin-bg-hover) !important;
}

.-rotate-90 {
  transform: rotate(-90deg);
}

.admin-card.group:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-card pre {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.admin-dropdown-content .hover\:bg-muted:hover {
  background-color: var(--admin-bg-hover) !important;
}

[data-state="open"] > [data-slot="collapsible-content"] {
  animation: slideDown 0.2s ease-out;
}

[data-state="closed"] > [data-slot="collapsible-content"] {
  animation: slideUp 0.2s ease-out;
}

@keyframes slideDown {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    height: var(--radix-collapsible-content-height);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    height: var(--radix-collapsible-content-height);
    opacity: 1;
  }
  to {
    height: 0;
    opacity: 0;
  }
}

.admin-btn-destructive {
  border: 1px solid var(--admin-border-default) !important;
  background: white !important;
  color: var(--admin-danger) !important;
  transition: all 0.2s ease !important;
  font-weight: 500 !important;
}

.admin-btn-destructive:hover {
  background: #fef2f2 !important;
  border-color: var(--admin-danger) !important;
}

.admin-btn-destructive:active {
  background: #fee2e2 !important;
}

.admin-btn-destructive i {
  color: var(--admin-danger) !important;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 500;
  border: 1px solid;
}

.admin-status-badge--enabled {
  background-color: var(--admin-bg-muted) !important;
  color: var(--admin-text-primary) !important;
  border-color: var(--admin-border-default) !important;
}

.admin-status-badge--disabled {
  background-color: #f9fafb !important;
  color: #6b7280 !important;
  border-color: #e5e7eb !important;
}


.admin-card[data-selected="true"],
.admin-card.selected {
  border-color: var(--admin-border-focus) !important;
  background-color: var(--admin-bg-selected) !important;
}

.admin-tool-card[data-selected="true"],
.admin-tool-card.selected {
  border-color: var(--admin-gray-400) !important;
}

.admin-sidebar-content {
  overflow-x: hidden !important;
}

.admin-sidebar-item {
  max-width: 100% !important;
}

.admin-sidebar-item span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.search-highlight {
  background-color: rgba(255, 235, 59, 0.4);
}