.reconciliation-view .content-card { margin-bottom: 20px; padding: 22px; }
.recon-notice { padding: 15px 18px; border-left: 4px solid #345675; background: #eef4f9; color: #29435b; }
.recon-notice.is-error { border-color: #b23c36; background: #fff0ed; color: #8c2924; }
.recon-toolbar { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; margin: 15px 0; }
.recon-toolbar label { flex: 1; min-width: 180px; }
.reconciliation-view label { display: grid; gap: 7px; font-weight: 600; }
.reconciliation-view select, .reconciliation-view input:not([type=checkbox]), .reconciliation-view textarea { width: 100%; padding: 10px; border: 1px solid #cdd6df; border-radius: 8px; color: #253b50; background: #fff; }
.recon-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin: 20px 0; }
.recon-kpis article { padding: 18px; border: 1px solid #dce4ec; border-radius: 12px; background: #f8fafc; display: grid; gap: 8px; }
.recon-kpis article > strong { font-size: 23px; }
.recon-kpis small { line-height: 1.5; color: #53697e; }
.recon-balance { padding: 12px; background: #f1f6f3; border-radius: 8px; line-height: 1.7; }
.recon-bars { display: grid; gap: 10px; margin: 20px 0; }
.recon-bars button { display: grid; grid-template-columns: 2fr 2fr 45px; gap: 16px; align-items: center; padding: 12px; text-align: left; background: #f8fafc; border: 1px solid #dce4ec; border-radius: 8px; cursor: pointer; }
.recon-bars meter { width: 100%; height: 22px; accent-color: #345675; }
.recon-bars small { display: block; margin-top: 5px; color: #53697e; font-size: 12px; }
.recon-bars meter::-webkit-meter-optimum-value { background: var(--recon-color, #56728a); }
.recon-bars [data-recon-filter="DIVERGENCIA_FAVORECIDO"], .recon-bars [data-recon-filter="MULTIPLOS_CANDIDATOS"] { --recon-color: #b28a49; }
.recon-bars [data-recon-filter="NAO_LOCALIZADO_NO_SISTEMA"] { --recon-color: #a66e69; }
.recon-item { border: 1px solid #dce4ec; border-radius: 12px; padding: 18px; margin: 16px 0; }
.recon-item-title { display: flex; gap: 15px; justify-content: space-between; flex-wrap: wrap; }
.recon-item-title span { padding: 5px 10px; background: #eef3f8; border-radius: 8px; font-size: 12px; }
.recon-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 16px 0; }
.recon-comparison > div { background: #f7f9fb; border-radius: 9px; padding: 16px; display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.recon-candidate { margin-top: 12px; padding: 12px; background: white; border: 1px solid #dce4ec; display: grid; gap: 5px; }
.recon-warning { padding: 10px; background: #fff3d8; color: #735317; }
.recon-setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.recon-dialog { width: min(720px,92vw); max-height: 88vh; overflow: auto; border: 0; border-radius: 16px; padding: 26px; box-shadow: 0 20px 80px #12243b40; }
.recon-dialog::backdrop { background: #182c4570; }
.recon-dialog form, .recon-dialog label { display: grid; gap: 14px; }
.recon-dialog input, .recon-dialog textarea, .recon-dialog select { width: 100%; padding: 10px; border: 1px solid #cdd6df; border-radius: 8px; }
.recon-dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: #f7f9fb; padding: 12px; }
.reconciliation-view [hidden] { display: none !important; }
#directorOpenReconciliation { margin-bottom: 18px; }
.recon-filter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding-top: 16px; }
.recon-documents { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px; background: #eef4f9; border-radius: 8px; margin: 12px 0; }
.recon-documents strong { flex-basis: 100%; }
.recon-work { display: grid; gap: 6px; border-left: 4px solid #56728a; background: #f4f7fa; padding: 14px; margin: 12px 0; }
.recon-work p { margin: 0; }
.recon-work.is-overdue { border-color: #b28a49; background: #fff3d8; }
.recon-muted { color: #53697e; font-size: 13px; line-height: 1.5; }
.recon-audit-event { padding: 16px 0; border-bottom: 1px solid #dce4ec; }
.recon-audit-event > small { display: block; margin-top: 8px; color: #53697e; }
.recon-evidence-choice { grid-template-columns: auto 1fr auto; align-items: center; }
.recon-evidence-choice input { width: auto; }
.recon-bars [data-recon-current="VALIDADO"] { --recon-color: #548371; }
.recon-bars [data-recon-current="DOCUMENTOS"], .recon-bars [data-recon-current="RESSALVA"] { --recon-color: #b28a49; }
.recon-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding: 0; list-style: none; margin: 20px 0; }
.recon-steps li { display: flex; gap: 12px; align-items: start; border: 1px solid #dce4ec; border-radius: 12px; background: #fff; padding: 16px; }
.recon-steps b { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: #e6eef3; color: #253b50; }
.recon-steps span { display: block; margin-top: 5px; color: #53697e; font-size: 13px; line-height: 1.5; }
.recon-scope, .recon-reading, .recon-snapshot { padding: 14px 16px; background: #eef4f9; border-radius: 9px; line-height: 1.6; overflow-wrap: anywhere; }
.recon-scope > span { display: block; }
.recon-scope details { margin-top: 10px; }
.recon-help { line-height: 1.6; margin-top: 14px; }
.recon-reading p { margin: 8px 0 0; }
.recon-snapshot { background: #fff5df; color: #735317; }
.recon-quick-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.recon-quick-filters button { white-space: normal; }
.recon-reason { line-height: 1.5; }
.recon-reason small { display: block; color: #53697e; }
.recon-next { padding: 12px; border-left: 3px solid #56728a; background: #eef4f9; line-height: 1.6; }
.reconciliation-view summary { cursor: pointer; }
.recon-history-record { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid #dce4ec; flex-wrap: wrap; }
.reconciliation-view button:focus-visible, .reconciliation-view summary:focus-visible { outline: 3px solid #345675; outline-offset: 3px; }
.recon-executive { border: 1px solid #dce4ec; border-radius: 12px; padding: 18px; background: #fafcfd; line-height: 1.6; }
.recon-executive h4 { margin: 0 0 8px; font-size: 19px; }
.recon-executive-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.recon-executive-cards article { display: grid; gap: 8px; padding: 16px; border: 1px solid currentColor; border-radius: 10px; }
.recon-executive-cards strong { font-size: 28px; }
.recon-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.recon-legend span { padding: 7px 10px; border: 1px solid currentColor; border-radius: 8px; font-size: 13px; }
.reconciliation-view .recon-tone-green { background: #e8f5ed; color: #205c37; }
.reconciliation-view .recon-tone-yellow { background: #fff4d6; color: #725215; }
.reconciliation-view .recon-tone-red { background: #fff0ed; color: #982c29; }
.reconciliation-view .recon-tone-neutral { background: #eef4f9; color: #29435b; }
.recon-alert-green { border-left: 5px solid #287944; }
.recon-alert-yellow { border-left: 5px solid #a37312; }
.recon-alert-red { border-left: 5px solid #b53933; }
.recon-alert-neutral { border-left: 5px solid #56728a; }
.recon-grid-scroll { overflow: auto; max-height: 70vh; border: 1px solid #cdd6df; border-radius: 8px; }
.recon-grid-scroll:focus-visible { outline: 3px solid #345675; outline-offset: 3px; }
.recon-grid { width: 100%; min-width: 1320px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.recon-grid caption { text-align: left; padding: 12px; background: #eef4f9; line-height: 1.5; }
.recon-grid th { position: sticky; top: 0; z-index: 1; background: #e6eef3; text-align: left; }
.recon-grid th, .recon-grid td { padding: 10px 12px; border-right: 1px solid #dce4ec; border-bottom: 1px solid #dce4ec; vertical-align: top; }
.recon-grid-row:nth-of-type(odd) { background: #f8fafc; }
.recon-grid-row:hover { background: #eef4f9; }
.recon-grid td small { display: block; margin-top: 6px; color: #53697e; font-size: 11px; }
.recon-grid td > span { display: inline-block; padding: 5px 8px; border-radius: 5px; }
.recon-grid-money { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.recon-grid td:nth-child(4), .recon-grid td:nth-child(5), .recon-grid td:nth-child(10) { min-width: 190px; max-width: 280px; overflow-wrap: anywhere; }
.recon-detail-dialog { width: min(1100px,92vw); }
.recon-detail-dialog .recon-item { margin-bottom: 0; }
.recon-row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.recon-row-actions button { border: 1px solid currentColor; border-radius: 7px; padding: 9px 12px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.recon-row-actions .recon-validate { background: #e8f5ed; color: #205c37; }
.recon-row-actions .recon-reject { background: #fff0ed; color: #982c29; }
.recon-row-actions button:disabled { background: #eef1f4; color: #53697e; cursor: not-allowed; }
.recon-grid td.recon-payee-attention { background: #fff4d6; }
.recon-name-warning { color: #725215; font-weight: 600; line-height: 1.5; margin: 8px 0 0; }
.recon-reference { display: grid; gap: 5px; padding: 0; background: transparent; border: 0; color: #254f78; text-align: left; text-decoration: underline; cursor: pointer; overflow-wrap: anywhere; }
.recon-grid td:nth-child(6) { min-width: 170px; max-width: 230px; }
.recon-line-history { line-height: 1.5; margin-bottom: 8px; }
.recon-grid tr > :last-child { position: sticky; right: 0; background: #f8fafc; border-left: 1px solid #cdd6df; min-width: 230px; }
.recon-grid th:last-child { background: #e6eef3; z-index: 2; }
@media(max-width: 800px) { .recon-executive-cards { grid-template-columns: 1fr; } }
@media(max-width: 800px) { .recon-steps { grid-template-columns: 1fr; } }
@media(max-width: 650px) { .recon-filter-grid { grid-template-columns: 1fr; } }
@media(max-width: 1000px) { .recon-kpis { grid-template-columns: 1fr 1fr; } }
@media(max-width: 650px) { .recon-kpis, .recon-comparison, .recon-setup-grid { grid-template-columns: 1fr; } .recon-bars button { grid-template-columns: 1fr 1fr 30px; gap: 8px; } }

.recon-filter-group-label { flex-basis: 100%; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #53697e; margin-top: 10px; padding-bottom: 2px; border-bottom: 1px solid #dce4ec; }
.recon-filter-group-label:first-child { margin-top: 0; }
.recon-filter-group-risk { color: #8c2924; border-color: #e4b3b0; }
.recon-risk-high { border-color: #b53933 !important; color: #8c2924 !important; background: #fff0ed !important; }
.recon-risk-high:hover { background: #fde2dd !important; }
.recon-risk-medium { border-color: #a37312 !important; color: #725215 !important; background: #fff4d6 !important; }
.recon-risk-medium:hover { background: #ffedba !important; }
/* Grupos de filtro: separação e organização visual */
.recon-quick-filters { gap: 6px 8px; }
.recon-filter-group-label { margin-top: 14px; padding: 4px 0; font-size: 12px; }
.recon-quick-filters button { font-size: 12px; padding: 6px 12px; border-radius: 6px; }
.recon-risk-high { font-weight: 600; }
.recon-risk-medium { font-weight: 600; }


/* === Confidence badges === */
.recon-conf { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; min-width: 40px; }
.recon-conf-high { background: #dcf5e5; color: #1a6b35; border: 1px solid #a3ddb8; }
.recon-conf-med { background: #fff4d6; color: #725215; border: 1px solid #e8d08a; }
.recon-conf-low { background: #fff0ed; color: #982c29; border: 1px solid #e4b3b0; }
.recon-conf-none { background: #f0f3f7; color: #8a99a9; border: 1px solid #d4dce5; }

/* === Row tone highlights === */
.recon-grid-row.recon-grid-green { border-left: 3px solid #2e8b57; }
.recon-grid-row.recon-grid-yellow { border-left: 3px solid #c99a2e; }
.recon-grid-row.recon-grid-red { border-left: 3px solid #c0392b; }

/* === Table improvements === */
.recon-grid th { padding: 8px 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #345675; background: #e8eef4; border-bottom: 2px solid #b8c8d8; }
.recon-grid td { padding: 8px 10px; font-size: 13px; line-height: 1.4; }
.recon-grid-row { transition: background 0.1s; }
.recon-grid-row:hover { background: #e8f0f8 !important; }
.recon-grid td:nth-child(9) { min-width: 120px; white-space: nowrap; text-align: center; }

/* === Hover on cards === */
.recon-executive-cards article { transition: box-shadow 0.2s; }
.recon-executive-cards article:hover { box-shadow: 0 4px 16px #1224380d; }
.recon-kpis article { transition: box-shadow 0.2s; }
.recon-kpis article:hover { box-shadow: 0 4px 16px #1224380d; }

/* === Export button === */
.recon-btn-export { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 1.5px solid #345675; background: #eef4f9; color: #345675; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.recon-btn-export:hover { background: #345675; color: #fff; box-shadow: 0 2px 8px #34567540; }

/* === Status blocks: extração vs conciliação (#14) === */
.recon-status-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
@media(max-width: 700px) { .recon-status-blocks { grid-template-columns: 1fr; } }
.recon-extraction-ok { padding: 12px 16px; border-radius: 10px; background: #e8f5ed; border: 1px solid #a3ddb8; }
.recon-extraction-ok > span { font-weight: 600; color: #1a6b35; }
.recon-extraction-ok > small { display: block; margin-top: 4px; color: #3a7d50; font-size: 12px; line-height: 1.5; }
.recon-extraction-warn { padding: 12px 16px; border-radius: 10px; background: #fff0ed; border: 1px solid #e4b3b0; }
.recon-extraction-warn > span { font-weight: 600; color: #982c29; }
.recon-extraction-warn > small { display: block; margin-top: 4px; color: #a04540; font-size: 12px; line-height: 1.5; }
.recon-conciliation-status { padding: 12px 16px; border-radius: 10px; }
.recon-conciliation-status > span { font-weight: 600; }
.recon-conciliation-status > small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; }
.recon-conciliation-pending { background: #fff4d6; border: 1px solid #e8d08a; color: #725215; }
.recon-conciliation-done { background: #e8f5ed; border: 1px solid #a3ddb8; color: #1a6b35; }

/* === Progress bar (#15) === */
.recon-progress { margin: 12px 0 16px; }
.recon-progress-bar { display: flex; height: 10px; border-radius: 6px; background: #e6eef3; overflow: hidden; }
.recon-progress-fill { height: 100%; transition: width 0.3s; }
.recon-progress-green { background: #2e8b57; }
.recon-progress-neutral { background: #7a99b2; }
.recon-progress-labels { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: #53697e; }
.recon-progress-labels strong { margin-left: auto; color: #253b50; }

/* === Page size selector (#03) === */
.recon-page-size { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #53697e; }
.recon-page-size select { width: auto; padding: 4px 8px; border: 1px solid #cdd6df; border-radius: 6px; font-size: 13px; background: #fff; color: #253b50; }

/* === Aviso de decisões novas: não desloca a lista em leitura === */
.recon-update-notice { position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; gap: 12px; align-items: center; max-width: min(520px, calc(100vw - 48px)); padding: 12px 16px; border: 1px solid #a37312; border-radius: 10px; background: #fff4d6; color: #725215; box-shadow: 0 8px 24px #12243826; line-height: 1.4; }
.recon-update-notice button { flex-shrink: 0; }

/* === Par de estorno e movimento sem lançamento no ERP === */
.recon-grid-row.recon-grid-reversal { background: #f4f1fb; }
.recon-reversal-note, .recon-missing-erp { display: grid; gap: 4px; padding: 8px 10px; border-radius: 8px; line-height: 1.45; font-size: 12px; }
.recon-reversal-note { background: #ece6f8; color: #4a3577; border: 1px solid #c9bce8; }
.recon-missing-erp { background: #fff0ed; color: #8c2924; border: 1px solid #e4b3b0; }
.recon-reversal-note strong, .recon-missing-erp strong { font-size: 13px; }
.recon-conf-reversal { background: #ece6f8; color: #4a3577; border: 1px solid #c9bce8; }
.recon-row-actions .recon-justify { background: #fff0ed; color: #8c2924; }

/* === Alerta de movimentos sem lançamento no ERP === */
.recon-missing-alert { padding: 16px 18px; margin: 14px 0; border-radius: 10px; background: #fff0ed; border: 1px solid #e4b3b0; border-left: 5px solid #b53933; line-height: 1.6; }
.recon-missing-alert > strong { display: block; font-size: 15px; color: #8c2924; }
.recon-missing-alert p { margin: 6px 0 0; color: #982c29; font-size: 13px; }
.recon-missing-action { margin-top: 10px; padding: 8px 16px; border: 1.5px solid #b53933; border-radius: 8px; background: #fff; color: #982c29; font-weight: 600; font-size: 13px; cursor: pointer; }
.recon-missing-action:hover { background: #b53933; color: #fff; }
.recon-statement-dialog { width: min(1000px,94vw); }
.recon-statement-image { display: block; width: 100%; height: auto; border: 1px solid #cdd6df; border-radius: 8px; background: #fff; }
.recon-statement-button { margin-top: 8px; }
