/* =====================================================================
 *  css-ia/last-operations.css — modal "Últimas operações por ativo"
 *  (js-ia/last-operations.js). Tudo prefixado com .ia-lastops-.
 * ===================================================================== */
.ia-lastops-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .55);
    font-family: Mulish, sans-serif;
}
.ia-lastops-overlay.ia-open { display: flex; }

.ia-lastops-modal {
    width: min(1400px, 96vw); max-height: 90vh;
    display: flex; flex-direction: column;
    background: #1e2831; border: 4px solid #141e28; border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    color: #AEBCC0; font-size: 13px; text-align: left;
}

.ia-lastops-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 15px; border-bottom: 1px solid #313b44;
}
.ia-lastops-title { font-size: 14px; font-weight: 700; color: #ecf0f1; }
.ia-lastops-tools { display: flex; align-items: center; gap: 10px; }
.ia-lastops-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #7d8b98; }
.ia-lastops-legend .ia-lastops-op { margin-left: 6px; }
/* input e select seguem o padrão global de css/web.css (input, select / :focus);
   aqui só a largura e detalhes de texto */
.ia-lastops-search { width: 140px; padding: 0 8px; text-transform: uppercase; }
.ia-lastops-bdi    { width: auto; min-width: 110px; padding: 0 6px; cursor: pointer; }
.ia-lastops-close {
    width: 28px; height: 28px; border: 0; border-radius: 4px; cursor: pointer;
    background: transparent; color: #7d8b98; font-size: 14px;
}
.ia-lastops-close:hover { background: #222e3a; color: #ecf0f1; }

.ia-lastops-body { overflow: auto; padding: 0 0 6px; }
.ia-lastops-empty { padding: 30px; text-align: center; color: #7d8b98; }

.ia-lastops-table { border-collapse: separate; border-spacing: 0; width: max-content; }
.ia-lastops-table th,
.ia-lastops-table td {
    padding: 9px 12px; white-space: nowrap; font-size: 14px;
    border-bottom: 1px solid #313b44; border-right: 1px solid #263039;
}
.ia-lastops-table th {
    position: sticky; top: 0; z-index: 2;
    background: #18212a; color: #00b0e6; font-size: 13px; font-weight: 700; text-align: left;
}
/* TH: ticker + preço atual e variação do dia (profitday) */
.ia-lastops-th { display: flex; align-items: baseline; gap: 10px; }
.ia-lastops-quote {
    display: inline-flex; align-items: baseline; gap: 6px;
    font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.ia-lastops-curr { color: #ecf0f1; }
.ia-lastops-var-pos  { color: #29cc90; }
.ia-lastops-var-neg  { color: #fe4d5f; }
.ia-lastops-var-zero { color: #7d8b98; }

.ia-lastops-table .ia-lastops-idx {
    position: sticky; left: 0; z-index: 1;
    width: 28px; text-align: center; color: #7d8b98; background: #1b242c;
}
.ia-lastops-table th.ia-lastops-idx { z-index: 3; background: #18212a; color: #7d8b98; }

/* célula em grade: badge | preço (alinhado à direita, largura fixa) | data —
   assim os 3 campos ficam na mesma posição em todas as linhas da coluna */
.ia-lastops-table td { text-align: left; }
.ia-lastops-cell {
    display: grid; grid-template-columns: 16px 7.5ch 5.5ch auto; align-items: center; column-gap: 7px;
}
/* quantidade: discreta, entre o preço e a data */
.ia-lastops-qty {
    text-align: center; font-size: 10px; color: #5f6d7a; font-variant-numeric: tabular-nums;
}
.ia-lastops-cell .ia-lastops-price { text-align: right; }
.ia-lastops-cell .ia-lastops-date  { margin-left: 0; }

.ia-lastops-op {
    display: inline-block; width: 16px; height: 16px; line-height: 16px; margin-right: 6px;
    border-radius: 3px; text-align: center; font-size: 10px; font-weight: 700; color: #fff;
}
.ia-lastops-buy  { background: #1f8f63; }
/* venda em âmbar (vermelho passa a ideia de prejuízo) */
.ia-lastops-sell { background: #c98a16; }
.ia-lastops-price { color: #ecf0f1; font-variant-numeric: tabular-nums; }
.ia-lastops-date  { margin-left: 8px; font-size: 11px; color: #7d8b98; font-variant-numeric: tabular-nums; }
.ia-lastops-cell .ia-lastops-op { margin-right: 0; }
