.contracts-head-btn.is-reconciliation[hidden] { display: none !important; }
.contracts-panel.is-sandbox .contracts-head-btn.is-reconciliation { color: #15456e; border-color: #a9c5db; background: #eaf4fa; }
.contracts-panel.is-reconciling .contracts-head-btn:not(.is-reconciliation),
.contracts-panel.is-reconciling .contracts-new-button { display: none; }
.ct-plantilla-field .flowmo-select-menu[data-open="true"] .flowmo-select-trigger,
.ct-plantilla-field .flowmo-select-menu .flowmo-select-inline-search { border-color: #527ea7; box-shadow: 0 0 0 2px #dceaf6; }
.ct-plantilla-field .flowmo-select-menu .flowmo-select-inline-search:focus { outline: 0; border-color: #527ea7; box-shadow: 0 0 0 2px #dceaf6; }
.ct-plantilla-options { background: #fff; border-color: #b8c9da; padding: 6px; gap: 2px; }
.ct-plantilla-options button { min-height: 39px; padding: 8px 11px; color: #1d334c; font-size: .82rem; font-weight: 600; }
.ct-plantilla-options button[aria-selected="true"] { background: #e8f1fa; color: #164877; }
.ct-plantilla-options button:hover, .ct-plantilla-options button:focus-visible { background: #eef5fb; color: #164877; }
.ct-reconcile { color: #17243a; padding: 24px; }
.ct-reconcile-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ct-reconcile-intro h2 { margin: 0; font-size: 1.3rem; }
.ct-reconcile-intro p { margin: 6px 0 0; color: #475569; font-size: .86rem; }
.ct-reconcile-intro-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex: none; }
.ct-reconcile-intro-actions button, .ct-reconcile-pagination button, .ct-reconcile-table td > button,
.ct-reconcile-dialog-actions button { font: inherit; cursor: pointer; border: 1px solid #afc1d2; border-radius: 8px; background: #fff; color: #164877; font-size: .81rem; font-weight: 700; padding: 8px 12px; }
.ct-reconcile-intro-actions button:first-child { background: #eaf4fa; }
.ct-reconcile-intro-actions button:hover, .ct-reconcile-pagination button:hover:not(:disabled),
.ct-reconcile-table td > button:hover { background: #eaf4fa; }
.ct-reconcile-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 20px 0 12px; }
.ct-reconcile-stats > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 16px; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; }
.ct-reconcile-stats small { color: #475569; font-size: .78rem; font-weight: 650; }
.ct-reconcile-stats strong { color: #112b4d; font-size: 1.34rem; }
.ct-reconcile-note { margin: 0 0 18px; padding: 10px 13px; background: #f1f5f9; border-left: 3px solid #4777a5; color: #344861; font-size: .8rem; line-height: 1.45; }
.ct-reconcile-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.ct-reconcile-filters label { display: flex; flex-direction: column; gap: 5px; min-width: 190px; color: #334155; font-size: .78rem; font-weight: 700; }
.ct-reconcile-filters .ct-reconcile-search { min-width: min(100%, 290px); flex: 1; }
.ct-reconcile-filters input, .ct-reconcile-filters select, .ct-reconcile-dialog select { min-height: 39px; width: 100%; box-sizing: border-box; border: 1px solid #b7c6d8; border-radius: 8px; background: #fff; color: #17243a; padding: 8px 10px; font: inherit; font-size: .82rem; }
.ct-reconcile-filters .flowmo-select-menu { min-width: 0; }
.ct-reconcile-filters .flowmo-select-trigger { min-height: 39px; font-size: .82rem; font-weight: 600; }
.ct-reconcile-table-wrap { overflow: auto; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; }
.ct-reconcile-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.ct-reconcile-table th { text-align: left; background: #eaf0f6; color: #24364d; font-size: .78rem; padding: 12px 14px; }
.ct-reconcile-table td { border-top: 1px solid #dbe3ec; color: #293a50; padding: 12px 14px; font-size: .81rem; vertical-align: middle; }
.ct-reconcile-table tr:hover td { background: #f5f9fc; }
.ct-reconcile-table td strong, .ct-reconcile-table td small { display: block; }
.ct-reconcile-table td strong { color: #132942; font-size: .82rem; }
.ct-reconcile-table td small { color: #52637a; font-size: .73rem; margin-top: 4px; line-height: 1.35; }
.ct-reconcile-table td:nth-child(1) { min-width: 160px; }
.ct-reconcile-table td:nth-child(2) { min-width: 175px; }
.ct-reconcile-table td:nth-child(4) { min-width: 185px; }
.ct-reconcile-badge { display: inline-block; padding: 5px 9px; border-radius: 6px; font-size: .73rem; font-weight: 750; white-space: nowrap; }
.ct-reconcile-badge.is-auto { color: #17523e; background: #e4f5e9; }
.ct-reconcile-badge.is-manual { color: #154b71; background: #e4f1fb; }
.ct-reconcile-badge.is-review { color: #744719; background: #fff1d8; }
.ct-reconcile-badge.is-missing { color: #813b36; background: #fceae7; }
.ct-reconcile-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 13px; color: #475569; font-size: .8rem; }
.ct-reconcile-pagination span { margin-right: auto; }
.ct-reconcile-pagination button:disabled { opacity: .45; cursor: default; }
.ct-reconcile-empty, .ct-reconcile-loading { text-align: center; color: #52637a; padding: 24px; }
.ct-reconcile-error { border: 1px solid #dba8a0; border-radius: 8px; background: #fff0ed; color: #8c352b; padding: 10px 13px; font-size: .8rem; }
.ct-reconcile-backdrop { position: fixed; inset: 0; z-index: 970; display: grid; place-items: center; background: #12243aa8; padding: 16px; }
.ct-reconcile-dialog { width: min(640px, 100%); max-height: 88vh; overflow: auto; background: #fff; border-radius: 13px; box-shadow: 0 25px 80px #0c1e3855; padding: 22px; }
.ct-reconcile-dialog header { display: flex; justify-content: space-between; gap: 14px; }
.ct-reconcile-dialog header small { color: #375c85; font-size: .73rem; font-weight: 700; }
.ct-reconcile-dialog h3 { margin: 4px 0; color: #142842; font-size: 1.16rem; }
.ct-reconcile-dialog p { color: #475569; line-height: 1.45; font-size: .8rem; }
.ct-reconcile-dialog header > button { border: 0; background: transparent; color: #45566d; font-size: 1.4rem; cursor: pointer; }
.ct-reconcile-dialog > label { display: block; color: #334155; font-size: .79rem; font-weight: 700; margin: 14px 0 6px; }
.ct-reconcile-dialog .flowmo-select-menu { min-width: 0; width: 100%; }
.ct-reconcile-suggestions { display: grid; gap: 7px; margin: 15px 0; }
.ct-reconcile-suggestions > strong { font-size: .78rem; color: #334155; }
.ct-reconcile-suggestions button { text-align: left; border: 1px solid #b9cbdc; border-radius: 8px; background: #f8fbfe; color: #153e68; cursor: pointer; padding: 9px 11px; font: inherit; font-size: .79rem; font-weight: 700; }
.ct-reconcile-suggestions button small { display: block; color: #52637a; font-weight: 500; margin-top: 3px; }
.ct-reconcile-suggestions button:hover { background: #eaf3fb; }
.ct-reconcile-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.ct-reconcile-dialog-actions button:last-child { color: #fff; background: #164877; border-color: #164877; }
.ct-reconcile-dialog-actions button:disabled { opacity: .55; cursor: wait; }
/* Personal de Lark sin expediente: cuentan en su plaza hasta que se marque. */
.ct-reconcile-personal { margin-top: 18px; border: 1px solid #d6e0ea; border-radius: 10px; background: #fff; padding: 10px 14px; }
.ct-reconcile-personal summary { cursor: pointer; color: #142842; font-weight: 700; font-size: .86rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ct-reconcile-personal summary span { color: #52637a; font-weight: 500; font-size: .78rem; }
.ct-reconcile-personal > p { color: #475569; font-size: .8rem; margin: 8px 0 10px; }
.ct-reconcile-personal tr.is-retirado td { color: #7a8797; }
.ct-reconcile-personal tr.is-retirado strong { text-decoration: line-through; }
@media (max-width: 900px) { .ct-reconcile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* En el telefono cada fila es una tarjeta: el boton se queda a la vista. */
@media (max-width: 600px) {
  .ct-reconcile-table { min-width: 0; }
  .ct-reconcile-table thead { display: none; }
  .ct-reconcile-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px; }
  .ct-reconcile-table tr + tr { border-top: 1px solid #dbe3ec; }
  .ct-reconcile-table tr:hover { background: #f5f9fc; }
  .ct-reconcile-table tr:hover td { background: transparent; }
  .ct-reconcile-table td { display: block; border: 0; padding: 0; }
  .ct-reconcile-table td:nth-child(n) { min-width: 0; }
  .ct-reconcile-table td:not(:last-child) { grid-column: 1; }
  .ct-reconcile-table td:last-child { grid-column: 2; grid-row: 1; align-self: start; }
  .ct-reconcile-table td[colspan] { grid-column: 1 / -1; }
}
@media (max-width: 600px) { .ct-reconcile { padding: 14px; } .ct-reconcile-intro { flex-wrap: wrap; } .ct-reconcile-intro-actions { justify-content: flex-start; } .ct-reconcile-stats { grid-template-columns: 1fr; } .ct-reconcile-filters label { width: 100%; } }
