/* estornos-v2.css — aba Estornos (Benefícios) repaginada (30/10/2026). Escopada em #benef-panel-estornos;
   carrega depois do app.css/mobile.css. O detalhe do cálculo (.est-calc-*) continua no app.css. */
#benef-panel-estornos .est2 { display: flex; flex-direction: column; gap: 14px; }
#benef-panel-estornos .est2-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
#benef-panel-estornos .est2-tit { margin: 0; font-size: 20px; font-weight: 800; color: #1a1f2e; }
#benef-panel-estornos .est2-desc { margin: 4px 0 0; font-size: 13.5px; color: #5b6472; max-width: 720px; }
#benef-panel-estornos .est2-topo-acoes { display: flex; gap: 8px; flex: 0 0 auto; }
#benef-panel-estornos .est2-baixar, #benef-panel-estornos .est2-lote { white-space: nowrap; }
#benef-panel-estornos .est2-lote:disabled { opacity: .45; cursor: not-allowed; }
#benef-panel-estornos .est2-baixar b { font-weight: 700; }

/* cards de resumo (clicáveis = filtro) */
#benef-panel-estornos .est2-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
#benef-panel-estornos .est2-kpi { position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; background: #fff; border: 1.5px solid #e3e6ea; border-radius: 14px; padding: 14px 16px 13px 18px; cursor: pointer; overflow: hidden; transition: border-color .15s, box-shadow .15s; font: inherit; color: inherit; }
#benef-panel-estornos .est2-kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #1a7a4a; }
#benef-panel-estornos .est2-kpi.k-valor::before { background: #2b6cb0; }
#benef-panel-estornos .est2-kpi.k-desat::before { background: #d1971f; }
#benef-panel-estornos .est2-kpi.k-enviar::before { background: #7c3aed; }
#benef-panel-estornos .est2-kpi.k-conf::before { background: #ea580c; }
#benef-panel-estornos .est2-kpi:hover { box-shadow: 0 3px 12px rgba(0,0,0,.07); }
#benef-panel-estornos .est2-kpi.on { border-color: #1a7a4a; box-shadow: 0 0 0 3px #e3f2e9; }
#benef-panel-estornos .est2-kpi-rot { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; }
#benef-panel-estornos .est2-kpi-val { font-size: 26px; font-weight: 800; color: #1a1f2e; line-height: 1.15; }
#benef-panel-estornos .est2-kpi-sub { font-size: 12px; color: #6b7280; }

/* filtros */
#benef-panel-estornos .est2-filtros { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
#benef-panel-estornos .est2-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #6b7280; }
#benef-panel-estornos .est2-f .select-sm { min-width: 170px; height: 36px; }
#benef-panel-estornos .est2-busca { flex: 1; min-width: 220px; height: 36px; padding: 0 12px; border: 1.5px solid #dde1e7; border-radius: 8px; font: inherit; font-size: 14px; }
#benef-panel-estornos .est2-busca:focus { outline: none; border-color: #1a7a4a; }
#benef-panel-estornos .est2-chips { display: flex; gap: 8px; flex-wrap: wrap; }
#benef-panel-estornos .est2-chip { height: 32px; padding: 0 13px; border: 1.5px solid #dde1e7; border-radius: 20px; background: #fff; font: inherit; font-size: 13px; color: #1f2a24; cursor: pointer; }
#benef-panel-estornos .est2-chip b { margin-left: 4px; color: #6b7280; }
#benef-panel-estornos .est2-chip.on { border-color: #1a7a4a; background: #e8f5ee; }
#benef-panel-estornos .est2-chip.on b { color: #1a7a4a; }

/* lista */
#benef-panel-estornos .est2-tabela { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid #e3e6ea; border-radius: 14px; overflow: hidden; }
#benef-panel-estornos .est2-tabela th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; background: #f7f8fa; padding: 11px 14px; border-bottom: 1px solid #e3e6ea; }
#benef-panel-estornos .est2-th-sub { display: block; font-size: 10.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #9aa1ab; }
#benef-panel-estornos .est2-tabela td { padding: 12px 14px; border-bottom: 1px solid #eef0f3; vertical-align: middle; font-size: 14px; }
#benef-panel-estornos .est2-tabela tr:last-child td { border-bottom: none; }
#benef-panel-estornos .est2-sel { width: 36px; text-align: center; padding-right: 0 !important; }
#benef-panel-estornos .est2-sel input { width: 16px; height: 16px; accent-color: #1a7a4a; cursor: pointer; }
#benef-panel-estornos .est2-pessoa { display: flex; align-items: flex-start; gap: 11px; min-width: 230px; }
#benef-panel-estornos td.est2-pessoa { display: table-cell; }
#benef-panel-estornos .est2-pessoa > div { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
#benef-panel-estornos td.est2-pessoa { padding-top: 13px; }
#benef-panel-estornos .est2-pessoa b { font-weight: 700; color: #1a1f2e; line-height: 1.25; }
#benef-panel-estornos .est2-av { float: left; margin-right: 11px; width: 36px; height: 36px; border-radius: 50%; background: #e8f5ee; color: #1a7a4a; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
#benef-panel-estornos .est2-sub { font-size: 12.5px; color: #6b7280; }
#benef-panel-estornos .est2-vals { display: flex; gap: 6px; flex-wrap: wrap; }
#benef-panel-estornos .est2-val { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 20px; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
#benef-panel-estornos .est2-val i { font-style: normal; font-size: 10.5px; font-weight: 800; color: #fff; border-radius: 12px; padding: 2px 7px; }
#benef-panel-estornos .est2-val.vt { background: #e8f0fb; color: #1e4f8a; }
#benef-panel-estornos .est2-val.vt i { background: #2b6cb0; }
#benef-panel-estornos .est2-val.va { background: #fbf1df; color: #8a5a10; }
#benef-panel-estornos .est2-val.va i { background: #b7791f; }
#benef-panel-estornos .est2-nada { font-size: 13px; color: #9aa1ab; }
#benef-panel-estornos .est2-avs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
#benef-panel-estornos .est2-tag { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 10px; padding: 2px 9px; cursor: help; white-space: nowrap; }
#benef-panel-estornos .est2-tag.laranja { background: #ffedd5; color: #9a3412; }
#benef-panel-estornos .est2-tag.amarelo { background: #fef3c7; color: #92400e; }
#benef-panel-estornos .est2-tag.azul { background: #e0e7ff; color: #1d4ed8; }
#benef-panel-estornos .est2-tag.cinza { background: #eef1f4; color: #4b5563; }
#benef-panel-estornos .est2-acoes, #benef-panel-estornos .est2-cartao { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
#benef-panel-estornos .est2-btn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1.5px solid #dde1e7; background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: #374151; cursor: pointer; white-space: nowrap; }
#benef-panel-estornos .est2-btn:hover { background: #f3f4f6; }
#benef-panel-estornos .est2-btn.verde { border-color: #b7dfc6; background: #e8f5ee; color: #1a7a4a; }
#benef-panel-estornos .est2-btn.verde:hover { background: #1a7a4a; color: #fff; }
#benef-panel-estornos .est2-btn.desat { border-color: #1a7a4a; color: #1a7a4a; }
#benef-panel-estornos .est2-btn.desat:hover { background: #1a7a4a; color: #fff; }
#benef-panel-estornos .est2-btn.saldo { border-color: #f0d49a; color: #92600a; }
#benef-panel-estornos .est2-btn.saldo:hover { background: #fdf3e0; }
#benef-panel-estornos .est2-cartao.ok, #benef-panel-estornos .est2-cartao.saldo { flex-direction: column; align-items: flex-start; gap: 2px; }
#benef-panel-estornos .est2-st { font-size: 13px; font-weight: 700; border-radius: 8px; padding: 3px 10px; }
#benef-panel-estornos .est2-st.ok { background: #e8f5ee; color: #1a7a4a; }
#benef-panel-estornos .est2-st.saldo { background: #fdf3e0; color: #92600a; }
#benef-panel-estornos .est2-por { font-size: 12px; color: #6b7280; }
#benef-panel-estornos .est2-calc { display: inline-block; margin-top: 7px; font-weight: 600; color: #1a7a4a; text-decoration: none; }
#benef-panel-estornos .est2-linha { display: inline-flex; gap: 10px; }
#benef-panel-estornos .est2-link { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: #6b7280; text-decoration: underline; cursor: pointer; }
#benef-panel-estornos .est2-row.feito td { background: #fafbfa; }
#benef-panel-estornos .est2-row.feito .est2-pessoa b { color: #4b5563; }
#benef-panel-estornos .est2-row.feito .est2-av { background: #eef1f4; color: #6b7280; }
#benef-panel-estornos .est-calc-row td { background: #f7f8fa; padding: 4px 14px 14px; }
#benef-panel-estornos .est-calc-box { margin: 0; border-radius: 10px; }
#benef-panel-estornos .est2-vazio { background: #fff; border: 1px dashed #dde1e7; border-radius: 14px; padding: 34px; text-align: center; color: #6b7280; font-size: 15px; }

@media (min-width: 721px) {
  #benef-panel-estornos .est2-acoes, #benef-panel-estornos .est2-cartao:not(.ok):not(.saldo) { flex-wrap: nowrap; }
}
@media (max-width: 1280px) {
  #benef-panel-estornos .est2-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  #benef-panel-estornos .est2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #benef-panel-estornos .est2-kpi:last-child:nth-child(odd) { grid-column: span 2; }
}
/* celular: cada pessoa vira um card */
@media (max-width: 720px) {
  #benef-panel-estornos .est2-topo { flex-direction: column; }
  #benef-panel-estornos .est2-topo-acoes { width: 100%; flex-direction: column; }
  #benef-panel-estornos .est2-baixar, #benef-panel-estornos .est2-lote { width: 100%; height: 42px; }
  #benef-panel-estornos .est2-kpi { padding: 12px 12px 11px 15px; }
  #benef-panel-estornos .est2-kpi-val { font-size: 21px; }
  #benef-panel-estornos .est2-f, #benef-panel-estornos .est2-f .select-sm, #benef-panel-estornos .est2-busca { width: 100%; min-width: 0; }
  #benef-panel-estornos .est2-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  #benef-panel-estornos .est2-chip { flex: 0 0 auto; }
  #benef-panel-estornos .est2-tabela, #benef-panel-estornos .est2-tabela tbody, #benef-panel-estornos .est2-tabela tr, #benef-panel-estornos .est2-tabela td { display: block; width: 100%; }
  #benef-panel-estornos .est2-tabela { border: 0; background: none; border-radius: 0; overflow: visible; }
  #benef-panel-estornos .est2-tabela thead { display: none; }
  #benef-panel-estornos .est2-row { position: relative; background: #fff; border: 1px solid #e3e6ea; border-radius: 14px; margin-top: 10px; padding: 4px 0; }
  #benef-panel-estornos .est2-tabela td { border-bottom: 0; padding: 8px 14px; }
  #benef-panel-estornos td.est2-sel { position: absolute; top: 12px; right: 12px; width: auto; padding: 0 !important; }
  #benef-panel-estornos td.est2-pessoa { padding-right: 44px; }
  #benef-panel-estornos .est2-tabela td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #9aa1ab; margin-bottom: 5px; }
  #benef-panel-estornos .est2-btn { height: 38px; flex: 1; }
  #benef-panel-estornos .est2-cartao.ok, #benef-panel-estornos .est2-cartao.saldo { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  #benef-panel-estornos .est-calc-row td { border: 1px solid #e3e6ea; border-top: 0; border-radius: 0 0 14px 14px; margin-top: -10px; padding-top: 14px; }
}
