/* Dashboard Workbench Styles */
.dashboard {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--dss-bg-void);
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--dss-space-4) var(--dss-space-6);
  background: var(--dss-bg-surface);
  border-bottom: 1px solid var(--dss-border);
}

.dashboard-header__left {
  display: flex;
  align-items: center;
  gap: var(--dss-space-4);
}

.back-button {
  display: flex;
  align-items: center;
  gap: var(--dss-space-2);
  padding: var(--dss-space-2) var(--dss-space-3);
  color: var(--dss-text-secondary);
  border-radius: var(--dss-radius);
  transition: all var(--dss-duration-response) var(--dss-ease-smooth);
}

.back-button:hover {
  background: var(--dss-bg-elevated);
  color: var(--dss-text-primary);
}

.back-button svg {
  width: 16px;
  height: 16px;
}

.team-indicator {
  display: flex;
  align-items: center;
  gap: var(--dss-space-2);
}

.team-indicator__dots {
  display: flex;
  gap: 4px;
}

.team-indicator__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--dss-radius-full);
  background: var(--dss-text-muted);
  transition: background var(--dss-duration-response) var(--dss-ease-smooth);
}

.team-indicator__dot.active {
  background: var(--dss-accent-pulse);
}

.team-indicator__name {
  font-size: var(--dss-text-lg);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-header__right {
  display: flex;
  align-items: center;
  gap: var(--dss-space-3);
}

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--dss-radius);
  color: var(--dss-text-secondary);
  transition: all var(--dss-duration-response) var(--dss-ease-smooth);
}

.icon-button:hover {
  background: var(--dss-bg-elevated);
  color: var(--dss-text-primary);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

/* Metrics Bar */
.metrics-bar {
  display: flex;
  justify-content: center;
  gap: var(--dss-space-8);
  padding: var(--dss-space-6);
  background: var(--dss-bg-space);
  border-bottom: 1px solid var(--dss-border);
}

.metric {
  text-align: center;
  padding: var(--dss-space-4) var(--dss-space-6);
  background: var(--dss-bg-surface);
  border-radius: var(--dss-radius-lg);
  min-width: 140px;
}

.metric__label {
  font-size: var(--dss-text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dss-text-muted);
  margin-bottom: var(--dss-space-2);
}

.metric__value {
  font-size: var(--dss-text-2xl);
  font-weight: 700;
  color: var(--dss-text-primary);
}

.metric__value--success {
  color: var(--dss-accent-pulse);
}

.metric__value--warning {
  color: var(--dss-accent-alert);
}

/* Action Zone */
.action-zone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--dss-space-8);
  overflow-y: auto;
}

.action-zone__content {
  max-width: 800px;
  width: 100%;
  text-align: center;
}

.action-zone__title {
  font-size: var(--dss-text-3xl);
  font-weight: 300;
  color: var(--dss-text-secondary);
  margin-bottom: var(--dss-space-4);
}

.action-zone__subtitle {
  font-size: var(--dss-text-base);
  color: var(--dss-text-muted);
}

/* Action Dock */
.action-dock {
  display: flex;
  justify-content: center;
  gap: var(--dss-space-4);
  padding: var(--dss-space-6);
  background: var(--dss-bg-surface);
  border-top: 1px solid var(--dss-border);
}

.action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--dss-space-2);
  padding: var(--dss-space-4) var(--dss-space-6);
  background: var(--dss-bg-elevated);
  border: 1px solid var(--dss-border);
  border-radius: var(--dss-radius-lg);
  color: var(--dss-text-secondary);
  min-width: 120px;
  transition: all var(--dss-duration-response) var(--dss-ease-smooth);
}

.action-button:hover {
  background: var(--dss-bg-space);
  border-color: var(--dss-accent-pulse);
  color: var(--dss-text-primary);
  box-shadow: var(--dss-glow-soft);
}

.action-button svg {
  width: 24px;
  height: 24px;
  color: var(--dss-accent-pulse);
}

.action-button__label {
  font-size: var(--dss-text-sm);
  font-weight: 500;
}

/* Team-specific accent colors */
.dashboard[data-team="ui"] {
  --dss-accent-pulse: #00d4aa;
  --dss-accent-pulse-rgb: 0, 212, 170;
}

.dashboard[data-team="ux"] {
  --dss-accent-pulse: #7c3aed;
  --dss-accent-pulse-rgb: 124, 58, 237;
}

.dashboard[data-team="qa"] {
  --dss-accent-pulse: #f59e0b;
  --dss-accent-pulse-rgb: 245, 158, 11;
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--dss-space-3);
  color: var(--dss-text-muted);
}

.loading__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--dss-border);
  border-top-color: var(--dss-accent-pulse);
  border-radius: var(--dss-radius-full);
  animation: spin 1s linear infinite;
}

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

/* Exit transitions */
.dashboard.exiting {
  animation: dashboardExit 0.3s var(--dss-ease-smooth) forwards;
}

@keyframes dashboardExit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* WebGL Fallback Styles */
.conscious-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.fallback-orb {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--dss-accent-pulse) 0%, transparent 70%);
  animation: fallbackPulse var(--dss-duration-breath) ease-in-out infinite;
}

.fallback-ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 2px solid var(--dss-accent-pulse);
  border-radius: 50%;
  opacity: 0.3;
  animation: fallbackRing var(--dss-duration-breath) ease-in-out infinite;
}

.fallback-ring--delayed {
  animation-delay: calc(var(--dss-duration-breath) / 2);
}

@keyframes fallbackPulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes fallbackRing {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.4;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: var(--dss-space-6);
  right: var(--dss-space-6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--dss-space-3);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--dss-space-3);
  padding: var(--dss-space-4) var(--dss-space-5);
  background: var(--dss-bg-elevated);
  border: 1px solid var(--dss-border);
  border-radius: var(--dss-radius-lg);
  box-shadow: var(--dss-glow-soft);
  animation: toastIn 0.3s var(--dss-ease-organic);
  min-width: 280px;
  max-width: 400px;
}

.toast--success {
  border-color: var(--dss-accent-pulse);
}

.toast--error {
  border-color: var(--dss-accent-error);
}

.toast--warning {
  border-color: var(--dss-accent-alert);
}

.toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast--success .toast__icon {
  color: var(--dss-accent-pulse);
}

.toast--error .toast__icon {
  color: var(--dss-accent-error);
}

.toast--warning .toast__icon {
  color: var(--dss-accent-alert);
}

.toast__message {
  flex: 1;
  font-size: var(--dss-text-sm);
  color: var(--dss-text-primary);
}

.toast__close {
  width: 16px;
  height: 16px;
  color: var(--dss-text-muted);
  cursor: pointer;
  transition: color var(--dss-duration-response);
}

.toast__close:hover {
  color: var(--dss-text-primary);
}

.toast.exiting {
  animation: toastOut 0.2s var(--dss-ease-smooth) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Error state for metrics */
.metric__value--error {
  color: var(--dss-accent-error);
}

/* Action button states */
.action-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.action-button.loading svg {
  animation: spin 1s linear infinite;
}

.action-button.success {
  border-color: var(--dss-accent-pulse);
  box-shadow: var(--dss-glow-soft);
}

.action-button.error {
  border-color: var(--dss-accent-error);
}

/* Responsive */
@media (max-width: 768px) {
  .team-cards {
    flex-direction: column;
    align-items: center;
  }

  .team-card {
    width: 100%;
    max-width: 280px;
  }

  .metrics-bar {
    flex-wrap: wrap;
    gap: var(--dss-space-4);
  }

  .metric {
    min-width: 120px;
  }

  .action-dock {
    flex-wrap: wrap;
  }

  .action-button {
    min-width: 100px;
  }
}
