/* Estilos para o dashboard de monitoramento de robôs/estratégias */

.monitor-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.monitor-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  margin: 0;
}

.monitor-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.update-interval {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bot-status-panel {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 15px;
}

.bot-status-panel .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.bot-status-panel .col {
  flex: 1;
  min-width: 220px;
}

.strategies-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(800px, 1fr));
  gap: 20px;
}

.strategy-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.strategy-card .card-header {
  background-color: #f9f9f9;
  padding: 15px 20px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.strategy-card .card-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.strategy-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: #f0f0f0;
  color: #666;
}

.status-long {
  background-color: rgba(76, 175, 80, 0.15);
  color: #388e3c;
}

.status-short {
  background-color: rgba(244, 67, 54, 0.15);
  color: #d32f2f;
}

.status-running {
  background-color: rgba(33, 150, 243, 0.15);
  color: #1976d2;
}

.status-stopped {
  background-color: rgba(158, 158, 158, 0.15);
  color: #616161;
}

.status-error {
  background-color: rgba(244, 67, 54, 0.15);
  color: #d32f2f;
}

.btn-remove {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 5px;
}

.btn-remove:hover {
  color: #f44336;
}

.strategy-card .card-body {
  padding: 20px;
}

.strategy-card .card-footer {
  background-color: #f9f9f9;
  padding: 15px 20px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: -10px;
}

.col-70 {
  flex: 0 0 70%;
  max-width: 70%;
  padding: 10px;
}

.col-30 {
  flex: 0 0 30%;
  max-width: 30%;
  padding: 10px;
}

@media (max-width: 991px) {
  .col-70, .col-30 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.chart-container {
  height: 300px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 10px;
  background-color: #fdfdfd;
}

.metrics-panel, .signals-panel {
  background-color: #f9f9f9;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
}

.metrics-panel h4, .signals-panel h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 500;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric {
  padding: 8px;
  background-color: #fff;
  border-radius: 4px;
  border: 1px solid #e5e5e5;
}

.metric-title {
  font-size: 0.7rem;
  color: #666;
}

.metric-value {
  font-size: 1.2rem;
  font-weight: 600;
}

.positive {
  color: #4caf50; /* Verde */
}

.negative {
  color: #f44336; /* Vermelho */
}

.signals-list {
  max-height: 200px;
  overflow-y: auto;
}

.signal-item {
  padding: 8px;
  margin-bottom: 5px;
  background-color: #fff;
  border-radius: 4px;
  border-left: 3px solid #ccc;
}

.signal-item.signal-entry.long {
  border-left-color: #4caf50;
}

.signal-item.signal-entry.short {
  border-left-color: #f44336;
}

.signal-item.signal-exit {
  border-left-color: #ff9800;
}

.signal-time {
  font-size: 0.7rem;
  color: #666;
}

.signal-type {
  font-weight: 500;
}

.signal-price {
  font-size: 0.9rem;
}

.config-summary {
  font-size: 0.85rem;
  color: #666;
}

.actions {
  display: flex;
  gap: 10px;
}

.btn-edit, .btn-backtest {
  padding: 5px 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}

.btn-edit {
  background-color: #2196f3;
  color: white;
}

.btn-backtest {
  background-color: #ff9800;
  color: white;
}

.add-strategy-card {
  background-color: #f9f9f9;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  cursor: pointer;
  transition: all 0.2s;
}

.add-strategy-card:hover {
  background-color: #f0f0f0;
  border-color: #999;
}

.add-strategy-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #666;
}

.add-strategy-text {
  font-size: 1.1rem;
  color: #666;
}

/* Modal de edição */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  width: 600px;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 15px 20px;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 15px 20px;
  background-color: #f9f9f9;
  border-top: 1px solid #e5e5e5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Formulário */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-group-half {
  flex: 0 0 calc(50% - 7.5px);
}

.form-group-third {
  flex: 0 0 calc(33.333% - 10px);
}

.no-signals {
  color: #999;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/* Botões */
.btn {
  padding: 8px 15px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #2196f3;
  color: white;
}

.btn-secondary {
  background-color: #9e9e9e;
  color: white;
}

.btn-success {
  background-color: #4caf50;
  color: white;
}

.btn-danger {
  background-color: #f44336;
  color: white;
}

.btn-warning {
  background-color: #ff9800;
  color: white;
}

.btn-info {
  background-color: #00bcd4;
  color: white;
}