/* ===== Fase 13: conciliação por OFX. Upload (Padrao_Upload_Arquivo) e seleção em lote (Padrao_Selecao_em_Lote). Só tokens. ===== */

/* --- Upload: um componente, três estados --- */
.im-card { background: var(--card); border: 1px solid var(--borda); border-radius: var(--radius); padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.im-card .im-titulo { font-size: 1rem; font-weight: 600; color: var(--text); }
.im-card .im-sub { font-size: 0.8125rem; color: var(--text-secundario); margin-top: var(--sp-1); }
.im-conta { max-width: 360px; }
.im-conta label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: var(--sp-1); }
.im-inp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.im-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 150px; padding: var(--sp-5); border: 2px dashed var(--borda-forte); border-radius: var(--radius); background: var(--bg); color: var(--text-secundario); text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.im-drop:hover, .im-drop:focus-within { border-color: var(--cor-primaria); background: var(--cor-primaria-suave); }
.im-drop i { font-size: 36px; color: var(--cor-primaria); }
.im-drop .im-drop-txt { font-size: 0.875rem; font-weight: 500; color: var(--text); }
.im-drop .im-drop-dica { font-size: 0.75rem; color: var(--muted); }
.im-drop.over { border-style: solid; border-color: var(--cor-primaria); background: var(--cor-primaria-suave); }
.im-drop.loaded { border-style: solid; border-color: var(--sucesso); background: var(--sucesso-suave); }
.im-drop.loaded i { color: var(--sucesso-escura); }
.im-acao { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3); }
.im-msg { margin-right: auto; font-size: 0.8125rem; color: var(--text-secundario); }
.im-msg.ok { color: var(--sucesso-escura); }
.im-msg.erro { color: var(--erro-escura); }
.im-card .im-resultado { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); padding: var(--sp-3) 0; }
.im-card .im-resultado[hidden] { display: none; }
.im-card .im-resultado .spinner { width: 28px; height: 28px; border-width: 3px; }

/* --- Seleção em lote --- */
.tsel { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border: 2px solid var(--borda-forte); border-radius: 5px; background: var(--card); cursor: pointer; position: relative; vertical-align: middle; }
.tsel:hover { border-color: var(--cor-primaria); }
.tsel:focus-visible { outline: 2px solid var(--cor-primaria); outline-offset: 2px; }
.tsel:checked, .tsel:indeterminate { background: var(--cor-primaria); border-color: var(--cor-primaria); }
.tsel:checked::after { content: ''; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid var(--card); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tsel:indeterminate::after { content: ''; position: absolute; left: 3px; top: 6px; width: 8px; height: 2px; background: var(--card); }
.tsel:disabled { opacity: 0.45; cursor: not-allowed; }
th.col-sel, td.col-sel { width: 44px; text-align: center; }
.tsel-bar { position: fixed; bottom: 0; left: var(--sidebar-width); right: 0; z-index: var(--z-sticky); background: var(--grafite); color: var(--off-white); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); box-shadow: var(--sombra-elevada); }
.tsel-bar[hidden] { display: none; }
.tsel-esq, .tsel-dir { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.tsel-conta { font-size: 0.875rem; font-weight: 600; }
.tsel-link { background: none; border: none; padding: 0; font: inherit; font-size: 0.8125rem; color: var(--lilas); text-decoration: underline; cursor: pointer; }
.tsel-link:disabled { opacity: 0.6; cursor: wait; }
.tsel-bar .tsel-btn { height: var(--altura-controle); }
body.tsel-ativa .conteudo, body.tsel-ativa main { padding-bottom: 88px; }
@media (max-width: 768px) { :root { --sidebar-width: 0px; } .tsel-bar { padding: var(--sp-3); } .tb-acoes { flex-wrap: wrap; }
  .tsel-bar { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
  .tsel-esq { justify-content: space-between; }
  .tsel-dir { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
  .tsel-bar .tsel-btn { justify-content: center; width: 100%; }
}

/* --- Resumo da revisão --- */
.of-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.of-kpi { background: var(--card); border: 1px solid var(--borda); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4); }
.of-kpi .of-rot { font-size: 0.75rem; color: var(--text-secundario); text-transform: uppercase; letter-spacing: 0.04em; }
.of-kpi .of-val { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.of-cand { display: flex; flex-direction: column; gap: var(--sp-2); max-height: 320px; overflow-y: auto; }
.of-cand label { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--borda); border-radius: var(--radius-sm); cursor: pointer; font-size: 0.875rem; }
.of-cand label:hover { background: var(--cor-primaria-suave); }
.of-cand .of-cand-v { margin-left: auto; font-weight: 600; white-space: nowrap; }
.of-cand .of-exato { font-size: 0.7rem; }

.tb-raiz td .selo { white-space: nowrap; }
.of-aviso { display: flex; align-items: center; gap: var(--sp-2); }
.of-aviso:empty { display: none; }
.of-aviso .spinner { width: 16px; height: 16px; border-width: 2px; }
.im-arq { display: block; margin-top: 6px; font-weight: 600; color: var(--sucesso-escura); overflow-wrap: anywhere; }
.im-arq:empty { display: none; }
