.forex-trading-bots-modal[hidden] {
  display: none !important;
}

.forex-trading-bots-modal {
  inset: 0;
  position: fixed;
  z-index: 80;
}

.forex-trading-bots-modal__backdrop {
  background: rgba(5, 10, 24, 0.76);
  inset: 0;
  position: absolute;
}

.forex-trading-bots-modal__dialog {
  background:
    radial-gradient(circle at top left, rgba(52, 84, 185, 0.16), transparent 32%),
    linear-gradient(180deg, #141d3d 0%, #0f1730 100%);
  border: 1px solid rgba(92, 116, 186, 0.18);
  border-radius: 22px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.44);
  color: #dbe4ff;
  left: 50%;
  max-height: calc(100vh - 48px);
  max-width: 720px;
  overflow: hidden;
  position: absolute;
  top: 24px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
}

.forex-trading-bots-modal__header {
  align-items: flex-start;
  border-bottom: 1px solid rgba(92, 116, 186, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
}

.forex-trading-bots-modal__eyebrow {
  color: #7da8ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.forex-trading-bots-modal__title {
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.forex-trading-bots-modal__subtitle {
  color: #8ea0ce;
  font-size: 13px;
  margin: 10px 0 0;
}

.forex-trading-bots-modal__close {
  align-items: center;
  background: transparent;
  border: 0;
  color: #dbe4ff;
  display: inline-flex;
  font-size: 34px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 32px;
}

.forex-trading-bots-modal__close:hover,
.forex-trading-bots-modal__close:focus {
  color: #ffffff;
  outline: none;
}

.forex-trading-bots-modal__body {
  max-height: calc(100vh - 138px);
  overflow-y: auto;
  padding: 18px 22px 22px;
}

.forex-trading-bots-modal__notice {
  border: 1px solid transparent;
  border-radius: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.forex-trading-bots-modal__notice.is-success {
  background: rgba(25, 135, 84, 0.14);
  border-color: rgba(25, 135, 84, 0.34);
  color: #93f0c1;
}

.forex-trading-bots-modal__notice.is-error {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.28);
  color: #ffb3bb;
}

.forex-trading-bots-modal__notice.is-warning {
  background: rgba(255, 193, 7, 0.12);
  border-color: rgba(255, 193, 7, 0.28);
  color: #ffd97d;
}

.forex-trading-bots-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.forex-trading-bots-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.forex-trading-bots-toolbar__stat {
  align-items: baseline;
  background: rgba(14, 22, 44, 0.88);
  border: 1px solid rgba(92, 116, 186, 0.14);
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  padding: 8px 12px;
}

.forex-trading-bots-toolbar__stat-label {
  color: #7f8fbe;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.forex-trading-bots-toolbar__count,
.forex-trading-bots-toolbar__balance {
  color: #f5f8ff;
  font-size: 13px;
  font-weight: 700;
}

.forex-trading-bots-toolbar__add,
.forex-trading-bots-row__save,
.forex-trading-bots-row__delete,
.forex-trading-bots-row__cancel {
  align-items: center;
  border: 0;
  background: transparent;
  color: #8ea0ce;
  display: inline-flex;
  font-size: 28px;
  font-weight: 400;
  height: 32px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 32px;
}

.forex-trading-bots-toolbar__add:hover,
.forex-trading-bots-toolbar__add:focus,
.forex-trading-bots-row__save:hover,
.forex-trading-bots-row__save:focus,
.forex-trading-bots-row__delete:hover,
.forex-trading-bots-row__delete:focus,
.forex-trading-bots-row__cancel:hover,
.forex-trading-bots-row__cancel:focus {
  color: #ffffff;
  outline: none;
}

.forex-trading-bots-toolbar__add:disabled,
.forex-trading-bots-row__save:disabled,
.forex-trading-bots-row__delete:disabled,
.forex-trading-bots-row__cancel:disabled {
  color: rgba(142, 160, 206, 0.42);
}

.forex-trading-bots-row__save.is-hidden {
  display: none;
}

.forex-trading-bots-panel {
  background: rgba(13, 21, 45, 0.78);
  border: 1px solid rgba(92, 116, 186, 0.12);
  border-radius: 18px;
  padding: 12px;
}

.forex-trading-bots-grid__head {
  color: #8ea0ce;
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 10px;
  grid-template-columns: minmax(0, 1.7fr) minmax(110px, 0.8fr) 72px auto;
  letter-spacing: 0.06em;
  padding: 6px 10px 12px;
  text-transform: uppercase;
}

.forex-trading-bots-grid__actions-label {
  text-align: right;
}

.forex-trading-bots-grid__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.forex-trading-bots-grid__loading,
.forex-trading-bots-grid__empty {
  color: #8ea0ce;
  padding: 14px 10px;
}

.forex-trading-bots-row {
  align-items: center;
  background: rgba(16, 24, 50, 0.92);
  border: 1px solid rgba(92, 116, 186, 0.12);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.7fr) minmax(110px, 0.8fr) 72px auto;
  padding: 12px;
}

.forex-trading-bots-row.is-new {
  border-color: rgba(112, 140, 228, 0.18);
}

.forex-trading-bots-row__field {
  min-width: 0;
}

.forex-trading-bots-row__field select,
.forex-trading-bots-row__field input {
  background: rgba(11, 18, 36, 0.96);
  border: 1px solid rgba(92, 116, 186, 0.16);
  border-radius: 12px;
  color: #f5f7ff;
  font-size: 14px;
  height: 46px;
  padding: 0 14px;
  width: 100%;
}

.forex-trading-bots-row__field input:focus,
.forex-trading-bots-row__field select:focus {
  border-color: rgba(112, 143, 232, 0.42);
  box-shadow: 0 0 0 3px rgba(52, 87, 200, 0.14);
  outline: none;
}

.forex-trading-bots-asset-picker {
  position: relative;
}

.forex-trading-bots-asset-picker__preview {
  align-items: center;
  background: rgba(11, 18, 36, 0.96);
  border: 1px solid rgba(92, 116, 186, 0.16);
  border-radius: 12px;
  color: #f5f7ff;
  display: flex;
  gap: 12px;
  height: 46px;
  padding: 0 42px 0 14px;
  pointer-events: none;
}

.forex-trading-bots-asset-picker__icon {
  align-items: center;
  border: 1px solid rgba(92, 116, 186, 0.24);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 18px;
  height: 18px;
  justify-content: center;
  overflow: hidden;
  width: 18px;
}

.forex-trading-bots-asset-picker__icon img {
  display: block;
  height: 18px;
  object-fit: cover;
  width: 18px;
}

.forex-trading-bots-asset-picker__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.forex-trading-bots-asset-picker__select {
  cursor: pointer;
  inset: 0;
  opacity: 0;
  position: absolute;
}

.forex-trading-bots-row__field--toggle {
  display: flex;
  justify-content: center;
}

.forex-trading-bots-row__toggle {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  min-width: 56px;
  padding: 0 10px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.forex-trading-bots-row__toggle.is-on {
  background: rgba(22, 122, 82, 0.22);
  border-color: rgba(36, 160, 106, 0.42);
  color: #9ef4cb;
}

.forex-trading-bots-row__toggle.is-off {
  background: rgba(184, 52, 67, 0.18);
  border-color: rgba(220, 83, 99, 0.34);
  color: #ffc0c7;
}

.forex-trading-bots-row__actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

body.is-forex-trading-bots-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .forex-trading-bots-modal__dialog {
    max-height: calc(100vh - 16px);
    top: 8px;
    width: calc(100% - 8px);
  }

  .forex-trading-bots-modal__header {
    padding: 16px 16px 14px;
  }

  .forex-trading-bots-modal__title {
    font-size: 22px;
  }

  .forex-trading-bots-modal__body {
    max-height: calc(100vh - 112px);
    padding: 14px 16px 16px;
  }

  .forex-trading-bots-toolbar {
    align-items: flex-start;
  }

  .forex-trading-bots-toolbar__meta {
    gap: 6px;
  }

  .forex-trading-bots-grid__head {
    display: none;
  }

  .forex-trading-bots-row {
    align-items: start;
    gap: 10px;
    grid-template-columns: 1fr 120px;
    padding: 10px;
  }

  .forex-trading-bots-row__field--toggle {
    justify-content: flex-start;
  }

  .forex-trading-bots-row__field--toggle,
  .forex-trading-bots-row__actions {
    align-items: center;
    grid-row: 2;
    min-height: 32px;
  }

  .forex-trading-bots-row__actions {
    justify-content: flex-end;
  }
}
