/* --- 1. NOTIFICAÇÕES E STATUS --- */
#status_msg { 
  position: fixed; top: 0; left: 0; width: 100%; padding: 8px; 
  text-align: center; font-size: 13px; font-weight: bold; 
  display: none; z-index: 100; 
  background: var(--primary-color); 
  color: var(--text-dark);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* --- 2. ÁREA DE CLIPBOARD E IMPORTAÇÃO --- */
.clipboard-controls { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.btn-clip { 
  background: var(--bg-highlight); 
  border: 1px solid var(--border-light); 
  color: var(--primary-color); 
  border-radius: 4px; padding: 2px 10px; font-size: 14px; cursor: pointer; 
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

#import_area { 
  display: none; 
  background: var(--bg-menu); 
  padding: 10px; 
  border: 1px solid var(--primary-color); 
  border-radius: 6px; 
  margin-bottom: 10px;
  box-sizing: border-box; 
}

#import_input { 
  width: 100%; 
  height: 50px; 
  padding: 8px; 
  background: var(--bg-black); 
  border: 1px solid var(--border-main); 
  color: var(--op-profit); 
  font-family: monospace; 
  font-size: 12px; 
  margin-bottom: 8px;
  resize: none; 
  outline: none;
  box-sizing: border-box; 
  display: block; 
}

/* --- 3. ELEMENTOS DE LAYOUT (SEÇÕES E GRIDS) --- */
.secao { 
  background: var(--bg-container); 
  padding: 15px; 
  border-radius: var(--radius-large); 
  border: 1px solid var(--border-main); 
  margin-bottom: 15px; 
  line-height: 1.6; 
}

.titulo-secao { 
  font-size: 0.9rem; 
  font-weight: bold; 
  color: var(--primary-color); 
  margin-bottom: 12px; 
  text-transform: uppercase; 
  border-bottom: 1px solid var(--border-main); 
  padding-bottom: 6px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

/* --- 4. BOTÕES E CONTROLES DE SELEÇÃO --- */
.btn-all { 
  width: 100%; padding: 15px; 
  background: var(--primary-color); 
  color: var(--text-dark); 
  border: none; border-radius: 6px; font-weight: bold; margin-top: 15px; 
}

.btn-json { 
  background: var(--border-main); 
  border: 1px solid var(--border-light); 
  color: var(--primary-color); 
  border-radius: 6px; padding: 5px 8px; cursor: pointer; 
  font-size: 0.8rem; font-weight: bold; transition: 0.2s; 
  display: flex; align-items: center; gap: 5px; 
}
.btn-json:hover { background: var(--border-light); border-color: var(--primary-color); }

.lado-selecao { display: flex; gap: 10px; margin-bottom: 20px; }
.btn-lado { 
  flex: 1; padding: 14px; font-weight: bold; border-radius: 10px; 
  border: 2px solid var(--border-light); cursor: pointer; 
  background: var(--bg-input); 
  color: var(--ajuda-seletor-s); font-size: 0.9rem; 
}
.btn-lado.ativo-compra { border-color: #27ae60; background: var(--op-compra); }
.btn-lado.ativo-venda { border-color: #e74c3c; background: var(--op-venda); }

/* --- 5. GRUPO DE INPUTS E CAIXAS ESPECIAIS --- */
.input-group { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.box-in { flex: 1; position: relative; }
.box-in span { position: absolute; left: 10px; top: 6px; font-size: 0.7rem; color: var(--text-gray); text-transform: uppercase; font-weight: bold; }

.plus-page input {
  width: 100%;
  padding: 22px 10px 8px 10px;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-input);
  color: var(--text-white);
}
.plus-page input:focus { border-color: var(--primary-color); outline: none; background: #2a2a2a; }
.plus-page input[type="radio"] { accent-color: var(--primary-color); transform: scale(1.2); }

.check-ativo { width: 20px; height: 20px; cursor: pointer; accent-color: var(--primary-color); }

.linha-especial { display: flex; gap: 10px; margin-bottom: 20px; }
.box-especial { 
  background: var(--bg-highlight); 
  padding: 10px; border-radius: 10px; border: 1px solid var(--border-light); 
}
.box-especial.alav { flex: 1; border-color: var(--op-venda); background: var(--iten-alert-bg); }
.box-especial.ticker { flex: 1; border-color: var(--border-main); background: var(--bg-menu); }
.box-especial.preco-destaque { flex: 1.6; border-color: var(--primary-color); }
.box-especial label { font-size: 0.7rem; color: var(--primary-color); font-weight: bold; display: block; margin-bottom: 5px; text-transform: uppercase; }

/* --- 6. CÁLCULOS E API --- */
.area-calculo { display: flex; gap: 10px; align-items: center; }
.col-auto { display: flex; flex-direction: column; align-items: center; gap: 4px; }
button#calcular { 
  flex: 1; padding: 10px; font-size: 1.1rem; 
  background-color: var(--primary-color); 
  color: var(--text-dark); border: none; border-radius: 10px; cursor: pointer; font-weight: bold; 
}

.btn-cotacao-wrapper { width: 100%; margin-top: 20px; display: flex; align-items: center; gap: 10px; }
.btn-cotacao { 
  flex: 1; padding: 12px; background: var(--bg-input); 
  color: var(--primary-color); 
  border: 1px solid var(--primary-color); border-radius: 8px; cursor: pointer; font-weight: bold; text-transform: uppercase; 
}

#painelApi { 
  display: none; background: var(--bg-menu); padding: 15px; 
  border-radius: 10px; border: 1px solid var(--primary-color); margin-top: 10px; 
}
.api-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-main); }
.val-api { font-weight: bold; color: var(--op-profit); font-size: 0.9rem; }

/* --- 7. RESULTADOS E ALERTAS --- */
.res-container { display: none; gap: 12px; margin-top: 25px; }
.res-box { 
  flex: 1; padding: 15px; border-radius: 12px; 
  background: var(--bg-highlight); 
  border-top: 5px solid var(--primary-color); box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
}
.label-res { font-size: 0.75rem; color: var(--text-gray); text-transform: uppercase; margin-bottom: 6px; font-weight: bold; }
.valor-res { font-size: 1.2rem; font-weight: 800; }
.lucro { color: var(--op-profit); }
.prejuizo { color: var(--op-venda); }

.info-blue { font-size: 0.75rem; color: var(--brand-blue); margin-top: 4px; font-weight: bold; }
.divider { border-top: 1px dashed var(--border-light); margin: 12px 0; padding-top: 10px; }
.item-parcial { margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border-main); }

.alerta-stop { 
  margin-top: 12px; padding: 12px; background: #441111; 
  border: 2px solid var(--op-venda); border-radius: 10px; 
  color: #ffcccc; font-size: 0.85rem; font-weight: 800; text-align: center; 
}
.alerta-alvo { 
  margin-top: 12px; padding: 12px; background: #002200; 
  border: 2px solid var(--op-profit); border-radius: 10px; 
  color: #ccffcc; font-size: 0.85rem; font-weight: 800; text-align: center; 
}

.btn-limpar { 
  width: 100%; padding: 12px; margin-top: 20px; background: #331111; 
  color: #ff9999; border: 1px solid #552222; border-radius: 8px; cursor: pointer; font-weight: bold; font-size: 0.8rem; text-transform: uppercase; 
}

/* --- 8. ESPECÍFICOS TRADEPLUS --- */
.func-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.func-item { 
  background: var(--bg-highlight); 
  padding: 12px; border-radius: 8px; border-left: 4px solid var(--primary-color); 
}
.func-item b { color: var(--primary-color); display: block; margin-bottom: 5px; }
.func-item-alert { 
  background: var(--iten-alert-bg); padding: 12px; border-radius: 8px; border-left: 4px solid var(--op-venda); 
}
.badge { 
  background: var(--border-main); 
  color: var(--op-profit); 
  padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 1.0rem; 
}

.plus-page .input-group { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.plus-page .box-in { flex: 1; min-width: 0; }
.plus-page .check-ativo { width: 20px; height: 20px; flex: none; margin-left: 6px; }
.plus-page .input-group .box-in input { width: 100%; }

.checkbox-placeholder { width: 20px; height: 20px; flex: none; margin-left: 6px; }

/* --- ESTILO DISCRETO PARA SELEÇÃO DE ENTRADA (TRADE+) --- */
.modo-entrada-container { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
    margin-bottom: 20px; 
    font-size: 0.85rem; 
    color: var(--text-gray); 
}

.btn-modo-discreto { 
    background: var(--bg-highlight); 
    border: 1px solid var(--border-main); 
    color: var(--text-muted); 
    padding: 5px 12px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 0.8rem; 
    font-weight: bold; 
    transition: 0.2s ease; 
}

.btn-modo-discreto:hover { 
    border-color: var(--text-gray); 
    color: var(--text-white); 
}

.btn-modo-discreto.ativo { 
    border-color: var(--primary-color); 
    color: var(--primary-color); 
    background: rgba(230, 126, 0, 0.1); /* Destaque sutil usando a cor primária */
}

/* Correção para alinhar a interrogação ao lado do TICKER */
.ticker-flex-label {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    float: none !important;
}

.ticker-flex-label label {
    display: inline !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ticker-flex-label .help-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

 #status_msg { 
            position: fixed; top: 50px; left: 0; width: 100%; padding: 8px; 
            text-align: center; font-size: 13px; font-weight: bold; 
            display: none; z-index: 100; background: #f7931a; color: #000;
            box-shadow: 0 2px 10px rgba(0,0,0,0.5);
        }

/* --- ESTILO DO CHECKBOX DE MARGEM (LUCRO SOBRE O RISCO) --- */
.container-opcao-risco {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 15px 0 5px 0;
    font-size: 0.8rem;
    color: var(--text-gray);
    font-weight: bold;
    text-transform: uppercase;
}

.container-opcao-risco input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
    margin: 0;
}

