.commands-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.commands-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  position: relative;
  z-index: 100;
}

.commands-search-wrapper {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.commands-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white-dim);
  pointer-events: none;
}

.commands-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: var(--black-muted);
  border: 2px solid var(--white-faint);
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font-family);
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.commands-search:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-faint);
}

.commands-search::placeholder {
  color: var(--white-dim);
}

.commands-module-wrapper {
  min-width: 180px;
}

.commands-dropdown {
  position: relative;
}

.commands-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--black-muted);
  border: 2px solid var(--white-faint);
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font-family);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.commands-dropdown-trigger:hover {
  border-color: var(--pink);
}

.commands-dropdown.open .commands-dropdown-trigger {
  border-color: var(--pink);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.commands-dropdown-label {
  font-weight: 500;
}

.commands-dropdown-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.commands-dropdown.open .commands-dropdown-arrow {
  transform: rotate(180deg);
}

.commands-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--black-light);
  border: 2px solid var(--pink);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  transition: all 0.2s ease;
}

.commands-dropdown.open .commands-dropdown-menu {
  max-height: 300px;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
}

.commands-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  color: var(--white-soft);
  cursor: pointer;
  transition: all 0.1s ease;
}

.commands-dropdown-item:hover {
  background: var(--black-muted);
  color: var(--white);
}

.commands-dropdown-item.selected {
  background: var(--pink-faint);
  color: var(--pink);
}

.commands-dropdown-count {
  font-size: 0.75rem;
  color: var(--white-dim);
  background: var(--black-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

.commands-dropdown-item.selected .commands-dropdown-count {
  background: var(--pink-dim);
  color: var(--pink-light);
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.dashboardLayout-commands-stack .commands-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboardLayout-commands-stack .command-card {
  width: 100%;
}

.command-card {
  background: var(--black-light);
  border: 1px solid var(--white-faint);
  border-radius: 8px;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: border-color 0.15s ease;
}

.command-card:hover {
  border-color: var(--white-dim);
}

.command-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}

.command-card-info {
  flex: 1;
  min-width: 0;
}

.command-card-name {
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-card-module {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pink);
}

.command-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.command-card-settings {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--black-lighter);
  border: 2px solid var(--white-a30);
  box-shadow: 4px 4px 0 var(--white-a10);
  border-radius: 6px;
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 6px;
}

.command-card-settings:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--white-faint);
  border-color: var(--white-a50);
  color: var(--white);
}

.command-card-settings svg {
  width: 14px;
  height: 14px;
}

.command-card-settings img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.command-card-description {
  font-size: 0.75rem;
  color: var(--white-muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.command-toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.command-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.command-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--black-muted);
  border: 1px solid var(--white-faint);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.command-toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background: var(--white-dim);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.command-toggle-switch input:checked + .command-toggle-slider {
  background: var(--pink-dim);
  border-color: var(--pink);
}

.command-toggle-switch input:checked + .command-toggle-slider:before {
  transform: translateX(16px);
  background: var(--pink);
}

.command-toggle-switch input:disabled + .command-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.commands-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--black-a80);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.commands-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.commands-modal {
  background: var(--black-light);
  border: 2px solid var(--pink);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 8px 0 var(--pink-darker);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s ease;
}

.commands-modal-overlay.visible .commands-modal {
  transform: scale(1) translateY(0);
}

.commands-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 2px solid var(--white-faint);
  flex-shrink: 0;
}

.commands-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.commands-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 2px solid var(--white-faint);
  border-radius: 6px;
  color: var(--white-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}

.commands-modal-close:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-faint);
}

.commands-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.commands-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 2px solid var(--white-faint);
  flex-shrink: 0;
}

.commands-modal-divider {
  height: 1px;
  background: var(--white-faint);
  margin: var(--space-sm) 0;
}

.commands-switch-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.commands-switch-info {
  flex: 1;
}

.commands-switch-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  display: block;
  margin-bottom: 2px;
}

.commands-switch-description {
  font-size: 0.75rem;
  color: var(--white-dim);
  line-height: 1.4;
}

.commands-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.commands-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.commands-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--black-muted);
  border: 2px solid var(--white-faint);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.commands-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background: var(--white-dim);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.commands-switch input:checked + .commands-switch-slider {
  background: var(--success-dim);
  border-color: var(--success);
}

.commands-switch input:checked + .commands-switch-slider:before {
  transform: translateX(20px);
  background: var(--success);
}

.commands-switch input:focus + .commands-switch-slider {
  box-shadow: 0 0 0 3px var(--pink-faint);
}

.commands-input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.commands-input-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
}

.commands-input-sublabel {
  font-size: 0.75rem;
  color: var(--white-dim);
}

.commands-multiselect {
  position: relative;
}

.commands-multiselect-trigger {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 42px;
  padding: 6px 12px;
  background: var(--black-muted);
  border: 2px solid var(--white-faint);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.commands-multiselect-trigger:hover, .commands-multiselect.open .commands-multiselect-trigger {
  border-color: var(--pink);
}

.commands-multiselect-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.commands-multiselect-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--black-lighter);
  border: 1px solid var(--white-faint);
  border-radius: 4px;
  font-size: 0.75rem;
}

.commands-multiselect-tag .commands-role-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.commands-multiselect-tag-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: transparent;
  border: none;
  color: var(--white-dim);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.commands-multiselect-tag-remove:hover {
  color: var(--danger);
}

.commands-multiselect-placeholder {
  color: var(--white-dim);
  font-size: 0.875rem;
}

.commands-multiselect-arrow {
  width: 16px;
  height: 16px;
  color: var(--white-dim);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.commands-multiselect.open .commands-multiselect-arrow {
  transform: rotate(180deg);
}

.commands-multiselect-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--black-light);
  border: 2px solid var(--pink);
  border-radius: 8px;
  max-height: 0;
  overflow: hidden;
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
}

.commands-multiselect.open .commands-multiselect-menu {
  max-height: 200px;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.commands-multiselect-search {
  flex: 1;
  min-width: 80px;
  padding: 4px 0;
  background: transparent;
  border: none;
  color: var(--white);
  font-family: var(--font-family);
  font-size: 0.875rem;
}

.commands-multiselect-search:focus {
  outline: none;
}

.commands-multiselect-search::placeholder {
  color: var(--white-dim);
}

.commands-multiselect-items {
  max-height: 150px;
  overflow-y: auto;
}

.commands-multiselect-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.commands-multiselect-item:hover {
  background: var(--black-muted);
}

.commands-multiselect-item.selected {
  display: none;
}

.commands-channel-item, .commands-role-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.commands-channel-hash {
  color: var(--white-dim);
}

.commands-role-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.commands-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 10px 24px;
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.commands-btn-cancel {
  background: var(--black-lighter);
  color: var(--white);
  border-color: var(--white-a30);
  box-shadow: 4px 4px 0 var(--white-a10);
}

.commands-btn-cancel:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--white-faint);
  border-color: var(--white-a50);
  color: var(--white);
}

.commands-btn-save {
  background: var(--black-lighter);
  color: var(--white);
  border-color: var(--pink);
  box-shadow: 4px 4px 0 var(--pink-darker);
}

.commands-btn-save:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--pink-darker);
}

.commands-btn-save:active, .commands-btn-cancel:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 currentColor;
}

.commands-modal-close {
  background: var(--black-lighter);
  color: var(--white);
  border: 2px solid var(--white-a30);
  box-shadow: 4px 4px 0 var(--white-a10);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.commands-modal-close:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--white-faint);
  border-color: var(--white-a50);
  color: var(--white);
}

.commands-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  text-align: center;
  color: var(--white-dim);
}

.commands-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.commands-empty p {
  font-size: 1rem;
  margin: 0;
}

.commands-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  gap: var(--space-md);
}

.commands-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--white-faint);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: commands-spin 0.8s linear infinite;
}

@keyframes commands-spin {
  to {
    transform: rotate(360deg);
  }
}

.commands-loading-text {
  color: var(--white-dim);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .commands-filters {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .commands-search-wrapper, .commands-module-wrapper {
    width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 768px) {
  .commands-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .command-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .command-card-controls {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 768px) {
  .commands-modal {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}

@media (max-width: 768px) {
  .commands-modal-overlay {
    padding: 0;
  }
}

.commands-dropdown-menu::-webkit-scrollbar, .commands-modal-body::-webkit-scrollbar, .commands-multiselect-menu::-webkit-scrollbar {
  width: 6px;
}

.commands-dropdown-menu::-webkit-scrollbar-track, .commands-modal-body::-webkit-scrollbar-track, .commands-multiselect-menu::-webkit-scrollbar-track {
  background: transparent;
}

.commands-dropdown-menu::-webkit-scrollbar-thumb, .commands-modal-body::-webkit-scrollbar-thumb, .commands-multiselect-menu::-webkit-scrollbar-thumb {
  background: var(--white-faint);
  border-radius: 3px;
}

.commands-dropdown-menu::-webkit-scrollbar-thumb:hover, .commands-modal-body::-webkit-scrollbar-thumb:hover, .commands-multiselect-menu::-webkit-scrollbar-thumb:hover {
  background: var(--white-dim);
}

