.market-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 28, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.market-modal {
  background: var(--settings-card-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 18px;
  box-shadow: var(--settings-shadow-card);
  width: min(640px, 100%);
  max-height: min(70vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--settings-text-primary);
}

.market-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
}

.market-modal__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.market-modal__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--settings-text-secondary);
}

.market-modal__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--settings-text-tertiary);
}

.market-modal__status--running .market-modal__status-dot {
  background: var(--settings-accent);
  box-shadow: 0 0 0 0 rgba(10, 132, 255, 0.45);
  animation: market-pulse 1.4s ease-in-out infinite;
}

.market-modal__status--success .market-modal__status-dot {
  background: var(--settings-status-active);
}

.market-modal__status--failed .market-modal__status-dot {
  background: var(--settings-danger);
}

.market-modal__exit {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--settings-danger);
  background: rgba(255, 59, 48, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

@keyframes market-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(10, 132, 255, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(10, 132, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(10, 132, 255, 0);
  }
}

.market-modal__logs-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--settings-text-tertiary);
  padding: 0 20px 6px;
}

.market-modal__logs {
  flex: 1;
  min-height: 200px;
  max-height: 50vh;
  margin: 0 16px 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #11151c;
  color: #e6e8ee;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.market-modal__logs-empty {
  color: rgba(230, 232, 238, 0.4);
}

.market-modal__log-line {
  padding: 1px 0;
}

.market-modal__log-line--stderr {
  color: #ffb96b;
}

.market-modal__log-line--error {
  color: #ff6e6e;
  font-weight: 600;
}
