/* ==========================================================================
   SECPLAM · FLUJO DEL CICLO, INICIO, VALIDACIÓN, POSTULACIÓN Y BOLETAS
   ========================================================================== */

/* ---------- Inicio: sin listados de proyectos (siguen en «Proyectos») ---------- */
#view-dashboard.fl-home > .filter-panel,
#view-dashboard.fl-home > .dashboard-split-layout { display: none !important; }
.fl-home-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.fl-hcard { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 16px 18px !important; font-family: inherit; border: 1px solid var(--border-color); cursor: pointer; transition: box-shadow 0.2s, transform 0.2s; min-width: 0; }
button.fl-hcard:hover { box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07); transform: translateY(-1px); }
section.fl-hcard { cursor: default; }
.fl-wide { grid-column: span 2; }
.fl-hcard h4 { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; font-weight: 700; color: var(--text-main); }
.fl-hcard h4 svg { width: 16px; height: 16px; color: var(--primary-start); }
.fl-hcard p { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }
.fl-big { display: flex; align-items: baseline; gap: 4px; }
.fl-big strong { font-size: 2.2rem; font-weight: 800; line-height: 1; color: color-mix(in srgb, var(--c) 80%, #000); }
.fl-big span { font-size: 0.9rem; font-weight: 700; color: var(--text-muted); }
.fl-bar { display: block; height: 8px; background: #eef2f7; border-radius: 4px; overflow: hidden; }
.fl-bar > span { display: block; height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.fl-bar.big { height: 12px; border-radius: 6px; margin: 8px 0; }
.fl-bar.sm { height: 6px; width: 60px; display: inline-block; vertical-align: middle; }
.fl-hlist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.fl-hlist li { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-main); font-weight: 600; min-width: 0; }
.fl-n { min-width: 30px; text-align: center; font-weight: 800; font-size: 0.78rem; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 70%, #000); }
.fl-date { font-size: 0.72rem; font-weight: 800; color: var(--primary-start); background: rgba(15, 76, 129, 0.07); padding: 1px 6px; border-radius: 5px; flex-shrink: 0; }
.fl-txt { display: flex; flex-direction: column; min-width: 0; }
.fl-txt, .fl-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-txt small { font-weight: 500; color: var(--text-muted); font-size: 0.7rem; }
.fl-ok { color: #047857 !important; font-weight: 600; }
.fl-muted { color: var(--text-muted); }
.fl-hbars { display: flex; flex-direction: column; gap: 4px; }
.fl-hbar { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; border: none; background: none; padding: 4px 6px; border-radius: 8px; font-family: inherit; text-align: left; font-size: 0.78rem; color: var(--text-main); font-weight: 600; }
button.fl-hbar { cursor: pointer; } button.fl-hbar:hover { background: #f8fafc; }
.fl-hbar > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-hbar strong { font-size: 0.78rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fl-hbar strong small { font-weight: 700; color: var(--text-muted); background: #f1f5f9; padding: 0 5px; border-radius: 4px; margin-left: 4px; }

/* ---------- Avance entre etapas ---------- */
.fl-paso { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.fl-paso span { font-size: 0.86rem; font-weight: 800; padding: 6px 14px; border-radius: 999px; color: color-mix(in srgb, var(--c) 70%, #000); background: color-mix(in srgb, var(--c) 10%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); }
.fl-paso svg { width: 20px; height: 20px; color: var(--text-muted); }
.cp-card-actions .cp-adv { background: rgba(15, 76, 129, 0.08); color: var(--primary-start); font-weight: 800; }
.cp-card-actions .cp-adv:hover { background: var(--primary-start); color: #fff; }

/* ---------- Ciclo del proyecto (ficha) ---------- */
.fl-ciclo { padding: 16px 20px !important; }
.fl-ciclo-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fl-ciclo-h h4 { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 700; color: var(--text-main); }
.fl-ciclo-h h4 svg { width: 16px; height: 16px; color: var(--primary-start); }
.fl-ciclo-h > span { font-size: 0.74rem; color: var(--text-muted); flex: 1; }
.fl-ciclo-h .btn { margin-left: auto; }
.fl-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.fl-steps li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; position: relative; padding: 0 4px; }
.fl-steps li::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: #e2e8f0; z-index: 0; }
.fl-steps li:first-child::before { display: none; }
.fl-steps li.is-pasada::before, .fl-steps li.is-actual::before { background: var(--primary-start); }
.fl-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; background: #f1f5f9; color: #94a3b8; border: 3px solid #fff; box-shadow: 0 0 0 1px #e2e8f0; }
.fl-dot svg { width: 16px; height: 16px; }
.is-pasada .fl-dot { background: var(--primary-start); color: #fff; box-shadow: none; }
.is-actual .fl-dot { background: var(--c); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, #fff); }
.fl-steps strong { font-size: 0.78rem; color: var(--text-main); margin-top: 4px; }
.is-futura strong { color: #55657a; font-weight: 600; }
.fl-steps em { font-style: normal; font-size: 0.68rem; color: var(--text-muted); line-height: 1.3; }
.fl-steps small { font-size: 0.68rem; font-weight: 800; color: var(--primary-start); background: rgba(15, 76, 129, 0.07); padding: 1px 6px; border-radius: 5px; }

/* ---------- Ciclo de Diseño de Construcción (10 Pasos) ---------- */
.fl-diseno-card { padding: 18px 22px !important; background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); border: 1px solid var(--border-color); border-left: 4px solid #0284c7; border-radius: 14px; box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04); margin-top: 14px; }
.fl-diseno-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fl-diseno-title { display: flex; align-items: center; gap: 10px; }
.fl-diseno-title h4 { margin: 0; font-size: 0.95rem; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.fl-diseno-badge { font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(2, 132, 199, 0.1); color: #0284c7; border: 1px solid rgba(2, 132, 199, 0.25); display: inline-flex; align-items: center; gap: 5px; }
.fl-diseno-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fl-diseno-bar-wrap { margin-bottom: 16px; }
.fl-diseno-bar-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.74rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.fl-diseno-bar { height: 7px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.fl-diseno-bar-fill { height: 100%; background: linear-gradient(90deg, #0284c7 0%, #059669 100%); border-radius: 999px; transition: width 0.4s ease; }
.fl-diseno-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); position: relative; gap: 4px; }
.fl-diseno-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; position: relative; cursor: pointer; padding: 8px 3px; border-radius: 8px; transition: background 0.2s, transform 0.15s; }
.fl-diseno-step:hover { background: rgba(2, 132, 199, 0.06); transform: translateY(-1px); }
.fl-diseno-step::before { content: ""; position: absolute; top: 22px; left: -50%; width: 100%; height: 3px; background: #e2e8f0; z-index: 0; }
.fl-diseno-step:first-child::before { display: none; }
.fl-diseno-step.is-done::before, .fl-diseno-step.is-current::before { background: #0284c7; }
.fl-diseno-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; background: #f1f5f9; color: #64748b; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; font-size: 0.75rem; font-weight: 800; transition: all 0.2s ease; }
.fl-diseno-step.is-done .fl-diseno-dot { background: #059669; color: #ffffff; box-shadow: 0 0 0 1px #059669; }
.fl-diseno-step.is-current .fl-diseno-dot { background: #0284c7; color: #ffffff; box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.25); }
.fl-diseno-step strong { font-size: 0.7rem; font-weight: 700; color: var(--text-main); line-height: 1.25; }
.fl-diseno-step.is-pending strong { color: #64748b; font-weight: 500; }
.fl-diseno-step small { font-size: 0.65rem; color: var(--text-muted); }
.fl-diseno-chips-area { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; max-width: 100%; margin-top: 2px; }
.fl-diseno-chip { font-size: 0.6rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; white-space: nowrap; }
@media (max-width: 1200px) { .fl-diseno-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 14px; } .fl-diseno-step:nth-child(6)::before { display: none; } }
@media (max-width: 640px) { .fl-diseno-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; } .fl-diseno-step::before { display: none; } }

/* ---------- Ciclo de Licitación (6 Fases) ---------- */
.fl-licitacion-card { 
  padding: 18px 22px !important; 
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfe 100%); 
  border: 1px solid var(--border-color); 
  border-left: 4px solid #4f46e5; 
  border-radius: 14px; 
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04); 
  margin-top: 14px; 
}
.fl-licitacion-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fl-licitacion-title { display: flex; align-items: center; gap: 10px; }
.fl-licitacion-title h4 { margin: 0; font-size: 0.95rem; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.fl-licitacion-badge { font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(79, 70, 229, 0.1); color: #4f46e5; border: 1px solid rgba(79, 70, 229, 0.25); display: inline-flex; align-items: center; gap: 5px; }
.fl-licitacion-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fl-licitacion-bar-wrap { margin-bottom: 16px; }
.fl-licitacion-bar-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.74rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.fl-licitacion-bar { height: 7px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.fl-licitacion-bar-fill { height: 100%; background: linear-gradient(90deg, #4f46e5 0%, #059669 100%); border-radius: 999px; transition: width 0.4s ease; }
.fl-licitacion-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; gap: 6px; }
.fl-licitacion-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; position: relative; cursor: pointer; padding: 8px 4px; border-radius: 8px; transition: background 0.2s, transform 0.15s; }
.fl-licitacion-step:hover { background: rgba(79, 70, 229, 0.06); transform: translateY(-1px); }
.fl-licitacion-step::before { content: ""; position: absolute; top: 22px; left: -50%; width: 100%; height: 3px; background: #e2e8f0; z-index: 0; }
.fl-licitacion-step:first-child::before { display: none; }
.fl-licitacion-step.is-done::before, .fl-licitacion-step.is-current::before { background: #4f46e5; }
.fl-licitacion-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; background: #f1f5f9; color: #64748b; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; font-size: 0.75rem; font-weight: 800; transition: all 0.2s ease; }
.fl-licitacion-step.is-done .fl-licitacion-dot { background: #059669; color: #ffffff; box-shadow: 0 0 0 1px #059669; }
.fl-licitacion-step.is-current .fl-licitacion-dot { background: #4f46e5; color: #ffffff; box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.25); }
.fl-licitacion-step strong { font-size: 0.74rem; font-weight: 700; color: var(--text-main); line-height: 1.25; }
.fl-licitacion-step.is-pending strong { color: #64748b; font-weight: 500; }
.fl-licitacion-step small { font-size: 0.67rem; color: var(--text-muted); }
.fl-licitacion-info-bar { margin-top: 14px; padding: 10px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.76rem; }
.fl-licitacion-info-item { display: flex; align-items: center; gap: 6px; color: var(--text-main); }
.fl-licitacion-info-item strong { color: #4f46e5; }
@media (max-width: 900px) { 
  .fl-licitacion-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; } 
  .fl-licitacion-step:nth-child(4)::before { display: none; } 
}
@media (max-width: 500px) { 
  .fl-licitacion-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; } 
  .fl-licitacion-step::before { display: none; } 
}

/* ---------- Validación ---------- */
#validacion-root { display: flex; flex-direction: column; gap: 16px; }
.fl-val-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; }
.fl-val-score { display: flex; gap: 20px; align-items: center; padding: 18px 22px !important; }
.fl-val-score .fl-big strong { font-size: 3rem; }
.fl-val-score > div:last-child { flex: 1; min-width: 0; }
.fl-val-score h3 { font-size: 1rem; font-weight: 800; color: var(--text-main); }
.fl-val-score p { font-size: 0.8rem; color: var(--text-muted); }
.fl-note { font-size: 0.74rem !important; line-height: 1.45; }
.fl-val-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 16px 18px !important; }
.fl-val-wrap { padding: 14px !important; }
.fl-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.76rem; color: var(--text-muted); font-weight: 600; margin: 0 4px 10px; }
.fl-legend b { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 5px; margin-right: 4px; }
.fl-x { background: #fef2f2; color: #b91c1c; } .fl-ok { background: #ecfdf5; color: #047857; } .fl-na { background: #f8fafc; color: #94a3b8; }
.fl-mtx-scroll { overflow: auto; max-height: calc(100vh - 330px); min-height: 320px; border: 1px solid var(--border-color); border-radius: 10px; }
.fl-mtx { border-collapse: separate; border-spacing: 0; font-size: 0.78rem; min-width: 100%; }
.fl-mtx thead th { position: sticky; top: 0; z-index: 3; background: #f8fafc; color: var(--text-muted); font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--border-color); vertical-align: bottom; }
.fl-mtx thead tr.fl-coltot th { top: 58px; background: #fff; font-size: 0.72rem; border-bottom: 2px solid var(--border-color); }
.fl-mtx thead th span { display: block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 0.72rem; margin: 0 auto; max-height: 150px; }
.fl-mtx thead tr:first-child th { height: 58px; }
.fl-mtx thead tr:first-child th:nth-child(-n+2) span { writing-mode: initial; transform: none; }
.fl-sticky { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; min-width: 280px; max-width: 320px; border-right: 1px solid var(--border-color); }
.fl-mtx thead .fl-sticky { z-index: 4; background: #f8fafc; }
.fl-mtx thead .fl-sticky small { font-weight: 800; background: #eef2f7; padding: 0 6px; border-radius: 5px; margin-left: 4px; }
.fl-mtx tbody th, .fl-mtx tbody td { padding: 6px; border-bottom: 1px solid #f1f5f9; }
.fl-mtx tbody tr:hover th, .fl-mtx tbody tr:hover td { background: #f8fafc; }
.fl-pname { all: unset; cursor: pointer; display: block; font-weight: 700; color: var(--text-main); font-size: 0.78rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.fl-pname:hover { color: var(--primary-start); text-decoration: underline; }
.fl-pname:focus-visible { outline: 2px solid #0f4c81; outline-offset: 2px; }
.fl-mtx tbody th small { display: block; font-weight: 500; color: var(--text-muted); font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-etq { font-size: 0.68rem; font-weight: 800; white-space: nowrap; padding: 2px 7px; border-radius: 6px; color: color-mix(in srgb, var(--c) 70%, #000); background: color-mix(in srgb, var(--c) 10%, #fff); }
.fl-c { text-align: center; font-weight: 800; font-size: 0.9rem; min-width: 34px; }
.fl-c.ok { color: #047857; background: #f0fdf4; }
.fl-c.na { color: #cbd5e1; }
.fl-c.x { background: #fef2f2; padding: 0 !important; }
.fl-c.x button { all: unset; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 100%; height: 30px; color: #b91c1c; font-weight: 800; }
.fl-c.x button:hover { background: #fee2e2; }
.fl-c.x button:focus-visible { outline: 2px solid #b91c1c; outline-offset: -2px; }
.fl-pct { white-space: nowrap; text-align: right; }
.fl-pct strong { font-size: 0.76rem; margin-left: 6px; }
.fl-empty { text-align: center; padding: 30px !important; color: #047857; font-weight: 700; }

/* ---------- Postulación ---------- */
.po-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.po-kpis > * { display: flex; flex-direction: column; gap: 2px; text-align: left; background: #fff; border: 1px solid var(--border-color); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px 14px; font-family: inherit; }
.po-kpis button { cursor: pointer; } .po-kpis button.active { box-shadow: inset 0 0 0 2px var(--c); background: color-mix(in srgb, var(--c) 5%, #fff); }
.po-kpis strong { font-size: 1.5rem; font-weight: 800; color: var(--text-main); line-height: 1.1; }
.po-kpis span { font-size: 0.74rem; font-weight: 700; color: var(--text-muted); line-height: 1.25; }
.po-kpis em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #000); }
.po-fuentes, .po-lista { padding: 16px 18px !important; margin-bottom: 16px; }
.po-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.po-sec-h h3 { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.po-sec-h h3 svg { width: 17px; height: 17px; color: var(--primary-start); }
.po-sec-h > span { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; }
.po-tools { display: flex; gap: 12px; align-items: center; }
.po-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.po-fcard { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid var(--border-color); background: #fff; border-radius: 10px; padding: 12px; font-family: inherit; cursor: pointer; }
.po-fcard:hover { border-color: var(--primary-start); }
.po-fcard.active { border-color: var(--primary-start); box-shadow: inset 0 0 0 1px var(--primary-start); background: rgba(15, 76, 129, 0.03); }
.po-fcard strong { font-size: 0.86rem; color: var(--text-main); }
.po-fcard > span { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; }
.po-fbar { display: flex !important; height: 6px; border-radius: 3px; overflow: hidden; background: #f1f5f9; margin-top: 4px; }
.po-items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.po-items > li { border: 1px solid var(--border-color); border-left: 4px solid var(--c); border-radius: 10px; background: #fff; overflow: hidden; }
.po-items > li.open { box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07); }
.po-row { width: 100%; display: grid; grid-template-columns: 230px minmax(0, 1fr) 120px 180px 50px 20px; gap: 12px; align-items: center; border: none; background: none; padding: 12px 14px; font-family: inherit; text-align: left; cursor: pointer; }
.po-row:hover { background: #fafbfc; }
.po-st { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 800; line-height: 1.25; color: color-mix(in srgb, var(--c) 70%, #000); }
.po-st svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--c); }
.po-name { display: flex; flex-direction: column; min-width: 0; }
.po-name strong { font-size: 0.84rem; color: var(--text-main); line-height: 1.3; }
.po-name small, .po-last small { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-monto { font-size: 0.86rem; font-weight: 800; color: var(--text-main); text-align: right; font-variant-numeric: tabular-nums; }
.po-last { display: flex; flex-direction: column; font-size: 0.74rem; font-weight: 700; color: var(--text-main); min-width: 0; }
.po-days { font-size: 0.74rem; font-weight: 800; color: var(--text-muted); text-align: right; }
.po-days.is-old { color: #b45309; }
.po-chev { width: 18px; height: 18px; color: #94a3b8; transition: transform 0.2s; }
.open .po-chev { transform: rotate(180deg); }
.po-det { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 20px; padding: 16px 18px 18px; border-top: 1px solid var(--border-color); background: #fcfdfe; }
.po-ball { border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); background: color-mix(in srgb, var(--c) 7%, #fff); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; margin-bottom: 10px; }
.po-ball span { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; color: var(--text-muted); }
.po-ball strong { font-size: 1rem; color: color-mix(in srgb, var(--c) 70%, #000); }
.po-ball em { font-style: normal; font-size: 0.74rem; color: var(--text-muted); }
.po-obs { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.po-obs strong { font-size: 0.76rem; color: #92400e; } .po-obs p { font-size: 0.8rem; color: var(--text-main); margin-top: 2px; }
.po-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 10px; }
.po-dl dt { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); }
.po-dl dd { font-size: 0.8rem; font-weight: 600; color: var(--text-main); word-break: break-word; }
.po-green { color: #047857 !important; }
.po-det-r h5 { font-size: 0.82rem; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.po-tl { list-style: none; padding: 0 0 0 4px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; border-left: 2px solid var(--border-color); }
.po-tl li { display: flex; gap: 10px; margin-left: -15px; }
.po-tl-ico { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.po-tl-ico svg { width: 13px; height: 13px; }
.po-fuente .po-tl-ico { background: #eef2ff; color: #4338ca; box-shadow: 0 0 0 1px #c7d2fe; }
.po-unidad .po-tl-ico { background: #ecfdf5; color: #047857; box-shadow: 0 0 0 1px #a7f3d0; }
.po-tl-h { display: flex; justify-content: space-between; gap: 10px; }
.po-tl-h strong { font-size: 0.8rem; color: var(--text-main); }
.po-tl-h time { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.po-tl p { font-size: 0.8rem; color: var(--text-main); line-height: 1.45; }
.po-tl small { font-size: 0.7rem; color: var(--text-muted); }
.po-empty { font-size: 0.8rem; color: var(--text-muted); background: #f8fafc; border: 1px dashed var(--border-color); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.po-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.po-actions .po-ok { color: #047857 !important; border-color: #a7f3d0 !important; }
.po-actions .po-no { color: #be123c !important; border-color: #fecdd3 !important; }

/* ---------- Boletas de garantía ---------- */
.ex-bol { padding: 16px 18px !important; margin-bottom: 14px; }
.ex-bol-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ex-bol-h h3 { display: flex; align-items: center; gap: 8px; font-size: 0.98rem; font-weight: 800; color: var(--text-main); }
.ex-bol-h h3 svg { width: 18px; height: 18px; color: #b45309; }
.ex-bol-h p { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.ex-bol-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ex-bol-kpis div { border: 1px solid var(--border-color); border-left: 4px solid var(--c); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.ex-bol-kpis strong { font-size: 1.2rem; font-weight: 800; color: var(--text-main); }
.ex-bol-kpis span { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.ex-bol-st { display: inline-block; font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; white-space: nowrap; color: color-mix(in srgb, var(--c) 70%, #000); background: color-mix(in srgb, var(--c) 11%, #fff); }
.ex-bol-t tr.bol-vencida td { background: #fffafa; }
.ex-bol-t tr.bol-cerrada td { color: var(--text-muted); }
.ex-bol-obra { max-width: 280px; white-space: normal !important; }
.ex-bol-acc { white-space: nowrap; }
.ex-bol-acc button { border: 1px solid var(--border-color); background: #fff; border-radius: 6px; font-family: inherit; font-size: 0.72rem; font-weight: 700; color: var(--text-main); padding: 3px 8px; margin-left: 4px; cursor: pointer; }
.ex-bol-acc button:hover { border-color: var(--primary-start); color: var(--primary-start); }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .fl-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .po-row { grid-template-columns: 170px minmax(0, 1fr) 110px 40px 20px; }
  .po-last { display: none; }
}
@media (max-width: 1024px) {
  .fl-val-top { grid-template-columns: 1fr; }
  .po-kpis, .ex-bol-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .po-det { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .fl-home-grid { grid-template-columns: 1fr; }
  .fl-wide { grid-column: auto; }
  .fl-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .fl-steps li:nth-child(4)::before { display: none; }
  .po-kpis, .ex-bol-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .po-row { grid-template-columns: 1fr auto; }
  .po-row .po-st { grid-column: 1 / -1; }
  .po-days, .po-chev { display: none; }
  .po-dl { grid-template-columns: 1fr; }
  .fl-sticky { min-width: 170px; max-width: 190px; }
  .fl-pname { max-width: 170px; }
  .fl-val-score { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .fl-hcard, .po-chev { transition: none; } button.fl-hcard:hover { transform: none; } }
.po-tl li > div { flex: 1; min-width: 0; }

/* ---------- Ciclo del proyecto: permanencia, avance interno, requisitos y fechas ---------- */
.fl-ciclo-h .fl-total { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); flex: 1; }
.fl-fechas-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed #d97706; background: #fffbeb; color: #92400e; border-radius: 8px; padding: 5px 10px; font-family: inherit; font-size: 0.76rem; font-weight: 700; cursor: pointer; }
.fl-fechas-btn:hover { background: #fef3c7; }
.fl-fechas-btn svg { width: 14px; height: 14px; }
.fl-steps li.has-prog::before { background: linear-gradient(to right, var(--primary-start) var(--prog), #e2e8f0 var(--prog)); }
.fl-steps li.is-recl .fl-dot { box-shadow: 0 0 0 4px #fff, 0 0 0 6px color-mix(in srgb, var(--c) 55%, #fff); outline: 2px dashed color-mix(in srgb, var(--c) 70%, #fff); outline-offset: 5px; }
.fl-perm { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 0.7rem; font-weight: 800; color: color-mix(in srgb, var(--s) 75%, #000); background: color-mix(in srgb, var(--s) 11%, #fff); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.fl-perm i { width: 7px; height: 7px; border-radius: 50%; background: var(--s); }
.fl-av { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 4px; width: 100%; max-width: 140px; }
.fl-av-bar { display: block; width: 100%; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.fl-av-bar i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.fl-av > span:last-child { font-size: 0.66rem; font-weight: 600; color: var(--text-muted); line-height: 1.2; }
.fl-perm-sub { margin: 12px 0 0; font-size: 0.76rem; color: var(--text-main); border-left: 3px solid var(--s); padding: 4px 10px; background: color-mix(in srgb, var(--s) 6%, #fff); border-radius: 0 6px 6px 0; }
.fl-req { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; }
.fl-req.is-ok { border-color: #a7f3d0; background: #ecfdf5; }
.fl-req-h { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 800; color: #92400e; }
.fl-req.is-ok .fl-req-h { color: #047857; }
.fl-req-h svg { width: 16px; height: 16px; }
.fl-req-l { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-rq { display: inline-flex; align-items: center; gap: 4px; font-family: inherit; font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 3px 9px; border: 1px solid #fca5a5; background: #fff; color: #b91c1c; cursor: pointer; }
button.fl-rq:hover { background: #fef2f2; }
.fl-rq.ok { border-color: #a7f3d0; color: #047857; cursor: default; }
.fl-rq svg { width: 12px; height: 12px; }
.fl-nota { margin: 8px 0 0; font-size: 0.7rem; color: var(--text-muted); }
.flf-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.flf-row { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: end; padding: 8px 10px; border: 1px solid var(--border-color); border-left: 4px solid var(--c); border-radius: 8px; }
.flf-et { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 800; color: var(--text-main); padding-bottom: 8px; }
.flf-et i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.flf-et em { font-style: normal; font-weight: 600; color: var(--text-muted); }
.gx-admin-sub { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border-color); }
.gx-admin-sub strong { font-size: 0.82rem; color: var(--text-main); }
.gx-admin-sub span { font-size: 0.74rem; color: var(--text-muted); }
@media (max-width: 768px) { .flf-row { grid-template-columns: 1fr; } .fl-ciclo-h .fl-total { flex-basis: 100%; } }

/* ---------- Ordenamiento por etapas ---------- */
.et-oculto { display: none !important; }
.et-sel-original { display: none !important; }
.et-nota { display: flex; align-items: flex-start; gap: 8px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; font-size: 0.8rem; line-height: 1.45; }
.et-nota svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.et-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.et-mini { display: flex; flex-direction: column; gap: 4px; }
.et-mini span { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.et-mini select { font-family: inherit; font-size: 0.86rem; padding: 9px 10px; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; color: var(--text-main); }
.et-mini select:disabled { background: #f8fafc; color: var(--text-muted); }
.gx-tab.et-tab-div { margin-left: 14px; position: relative; }
.gx-tab.et-tab-div::before { content: ""; position: absolute; left: -8px; top: 22%; bottom: 22%; width: 1px; background: var(--border-color); }
.gx-tab.et-tab-sec:not(.active) { color: #55657a; }
.et-lista { padding: 16px 18px !important; margin-bottom: 16px; border-top: 4px solid #d97706; }
.et-lista-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.et-ico { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #fffbeb; color: #b45309; }
.et-ico svg { width: 20px; height: 20px; }
.et-lista-h h3 { font-size: 0.98rem; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.et-n { font-size: 0.74rem; font-weight: 800; background: #b45309; color: #fff; border-radius: 999px; padding: 1px 9px; }
.et-lista-h p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }
.et-tw { overflow-x: auto; }
.et-t { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.et-t th { text-align: left; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); padding: 8px; border-bottom: 2px solid var(--border-color); background: #f8fafc; white-space: nowrap; }
.et-t td { padding: 8px; border-bottom: 1px solid var(--border-color); vertical-align: top; }
.et-t td:first-child { min-width: 240px; max-width: 340px; }
.et-ant { color: var(--text-muted); font-size: 0.74rem; min-width: 160px; }
.et-sug { display: inline-block; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; color: color-mix(in srgb, var(--c) 72%, #000); background: color-mix(in srgb, var(--c) 12%, #fff); white-space: nowrap; }
.et-t td small { display: block; font-size: 0.68rem; color: var(--text-muted); margin-top: 3px; }
.et-t select, .et-t input { font-family: inherit; font-size: 0.76rem; padding: 6px 8px; border: 1px solid var(--border-color); border-radius: 7px; background: #fff; display: block; width: 100%; min-width: 150px; margin-bottom: 4px; }
@media (max-width: 768px) { .et-dos { grid-template-columns: 1fr; } }

/* ---------- Depuración de históricos y Finalizados del año ---------- */
.dp-oculto { display: none !important; }
.dp-switch { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.dp-seg { display: inline-flex; background: #fff; border: 1px solid var(--border-color); border-radius: 10px; padding: 3px; gap: 3px; }
.dp-seg button { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; border-radius: 8px; padding: 7px 12px; font-family: inherit; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); cursor: pointer; }
.dp-seg button svg { width: 15px; height: 15px; }
.dp-seg button.on { background: #0f4c81; color: #fff; }
.dp-panel, .dp-fin { padding: 16px 18px !important; margin-bottom: 16px; }
.dp-fin { border-top: 4px solid #0f4c81; }
.dp-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.dp-ico { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #eef2ff; color: #4338ca; }
.dp-ico svg { width: 20px; height: 20px; }
.dp-h h3 { font-size: 0.98rem; font-weight: 800; color: var(--text-main); }
.dp-h p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.dp-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dp-kpis div { border: 1px solid var(--border-color); border-left: 4px solid var(--c); border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; }
.dp-kpis strong { font-size: 1.3rem; font-weight: 800; color: var(--text-main); }
.dp-kpis span { font-size: 0.74rem; font-weight: 700; color: var(--text-main); }
.dp-kpis em { font-style: normal; font-size: 0.68rem; color: var(--text-muted); }
.dp-tools { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.dp-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.dp-tab { border: 1px solid var(--border-color); background: #fff; border-radius: 999px; padding: 6px 11px; font-family: inherit; font-size: 0.76rem; font-weight: 700; color: var(--text-main); cursor: pointer; }
.dp-tab strong { color: color-mix(in srgb, var(--c) 75%, #000); margin-left: 2px; }
.dp-tab.on { background: color-mix(in srgb, var(--c) 72%, #000); border-color: color-mix(in srgb, var(--c) 72%, #000); color: #fff; }
.dp-tab.on strong { color: #fff; }
.dp-tools-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dp-sel select { font-family: inherit; font-size: 0.8rem; padding: 7px 9px; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; }
.dp-count { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; margin: 4px 0 8px; }
.dp-ano { border: 1px solid var(--border-color); border-radius: 12px; margin-bottom: 8px; background: #fff; }
.dp-ano summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; cursor: pointer; list-style: none; }
.dp-ano summary::-webkit-details-marker { display: none; }
.dp-ano summary::before { content: "▸"; color: var(--text-muted); transition: transform 0.2s; }
.dp-ano[open] summary::before { transform: rotate(90deg); }
.dp-ano-n { font-size: 1.05rem; font-weight: 800; color: var(--text-main); }
.dp-ano-c { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); }
.dp-chip { font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; color: color-mix(in srgb, var(--c) 75%, #000); background: color-mix(in srgb, var(--c) 11%, #fff); }
.dp-list { list-style: none; margin: 0; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.dp-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr); gap: 12px; align-items: center; border: 1px solid var(--border-color); border-left: 4px solid var(--c); border-radius: 10px; padding: 9px 12px; }
.dp-i-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dp-sit { align-self: flex-start; font-size: 0.68rem; font-weight: 800; padding: 1px 8px; border-radius: 6px; color: color-mix(in srgb, var(--c) 72%, #000); background: color-mix(in srgb, var(--c) 12%, #fff); }
.dp-cand { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 800; color: #6d28d9; }
.dp-cand svg { width: 12px; height: 12px; }
.dp-nom { text-align: left; font-weight: 700 !important; }
.dp-i-main small { font-size: 0.72rem; color: var(--text-muted); }
.dp-ev { font-style: italic; }
.dp-i-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dp-i-acc input { font-family: inherit; font-size: 0.76rem; padding: 6px 8px; border: 1px solid var(--border-color); border-radius: 7px; min-width: 0; }
.dp-btns { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.dp-b { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-color); background: #fff; border-radius: 7px; padding: 5px 9px; font-family: inherit; font-size: 0.72rem; font-weight: 700; cursor: pointer; color: var(--text-main); }
.dp-b svg { width: 13px; height: 13px; }
.dp-b.ok:hover { border-color: #059669; color: #047857; } .dp-b.no:hover { border-color: #dc2626; color: #b91c1c; }
.dp-b.cand { color: #6d28d9; border-color: #ddd6fe; } .dp-b.cand.on { background: #f5f3ff; }
.dp-b.ini { background: #0284c7; border-color: #0284c7; color: #fff; }
.dp-sinano { margin-top: 6px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; font-size: 0.8rem; color: #78350f; }
.dp-sinano ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dp-sinano li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border-radius: 8px; padding: 6px 8px; }
.dp-sinano li > span { flex: 1; min-width: 220px; color: var(--text-main); font-weight: 600; font-size: 0.78rem; }
.dp-sinano li small { display: block; color: var(--text-muted); font-weight: 500; }
.dp-sinano input { width: 90px; font-family: inherit; font-size: 0.8rem; padding: 6px 8px; border: 1px solid var(--border-color); border-radius: 7px; }
@media (max-width: 1100px) { .dp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dp-item { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .dp-kpis { grid-template-columns: 1fr 1fr; } .dp-i-acc { grid-template-columns: 1fr; } }

/* ---------- Sincronización con la planilla SUBDERE ---------- */
.sb-tarjeta { padding: 16px 18px !important; margin-bottom: 16px; border-top: 4px solid #0891b2; }
.sb-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.sb-ico { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #ecfeff; color: #0e7490; }
.sb-ico svg { width: 20px; height: 20px; }
.sb-h h3 { font-size: 0.98rem; font-weight: 800; color: var(--text-main); }
.sb-h p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }
.sb-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.sb-estado { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.sb-file { cursor: pointer; }
.sb-card { width: min(1180px, 100%) !important; }
.sb-res { font-size: 0.82rem; color: var(--text-main); margin-bottom: 10px; line-height: 1.5; }
.sb-warn { color: #b45309; }
.sb-tw { overflow-x: auto; max-height: 58vh; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 10px; }
.sb-t { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.sb-t th { position: sticky; top: 0; background: #f8fafc; text-align: left; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); padding: 8px; border-bottom: 2px solid var(--border-color); z-index: 1; }
.sb-t td { padding: 8px; border-bottom: 1px solid var(--border-color); vertical-align: top; color: var(--text-main); }
.sb-t td small { display: block; font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }
.sb-t td:first-child { min-width: 280px; }
.sb-t .sb-c { text-align: center; width: 60px; }
.sb-t input[type=checkbox] { width: 17px; height: 17px; accent-color: #0e7490; }
.sb-nf td { background: #fffbeb; } .sb-ret td { background: #fef2f2; }
.sb-et { display: inline-block; font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; color: color-mix(in srgb, var(--c) 72%, #000); background: color-mix(in srgb, var(--c) 12%, #fff); white-space: nowrap; }
.sb-ok { color: #059669; font-weight: 800; }
.sb-nota { font-size: 0.72rem; color: var(--text-muted); margin-top: 10px; line-height: 1.5; }
.sb-panel { padding: 16px 18px !important; border-top: 4px solid var(--s); margin-top: 16px; }
.sb-p-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sb-p-h h4 { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 800; color: var(--text-main); }
.sb-p-h h4 svg { width: 17px; height: 17px; color: #0e7490; }
.sb-sem { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 800; color: color-mix(in srgb, var(--s) 75%, #000); background: color-mix(in srgb, var(--s) 10%, #fff); padding: 3px 10px; border-radius: 999px; }
.sb-sem i { width: 8px; height: 8px; border-radius: 50%; background: var(--s); }
.sb-p-sub { font-size: 0.78rem; color: var(--text-muted); margin: 4px 0 12px; }
.sb-dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.sb-dl dt { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.sb-dl dd { margin: 2px 0 0; font-size: 0.86rem; font-weight: 700; color: var(--text-main); font-variant-numeric: tabular-nums; }
.sb-rend { margin-top: 12px; font-size: 0.76rem; font-weight: 700; color: var(--text-main); }
.sb-bar { display: block; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.sb-bar i { display: block; height: 100%; background: #0891b2; }
.sb-obs { margin-top: 12px; font-size: 0.8rem; color: var(--text-main); background: #fffbeb; border-radius: 8px; padding: 8px 10px; }
.sb-acc { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: 0.8rem; color: var(--text-main); background: #eff6ff; border-radius: 8px; padding: 8px 10px; }
.sb-acc svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: #1d4ed8; }
.sb-pie { font-size: 0.7rem; color: var(--text-muted); margin-top: 10px; }
@media (max-width: 900px) { .sb-dl { grid-template-columns: 1fr 1fr; } }

/* ---------- Depuración por fuente de financiamiento ---------- */
.dp-mat-w { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--border-color); border-radius: 12px; }
.dp-mat { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.dp-mat caption { caption-side: top; text-align: left; font-size: 0.74rem; font-weight: 700; color: var(--text-muted); padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid var(--border-color); }
.dp-mat th, .dp-mat td { padding: 7px 10px; border-bottom: 1px solid var(--border-color); text-align: center; }
.dp-mat thead th { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); background: #fff; white-space: nowrap; }
.dp-mat tbody th { text-align: left; }
.dp-mat tr.on { background: #f0f9ff; }
.dp-mf { display: inline-flex; align-items: center; gap: 8px; border: none; background: none; font-family: inherit; font-size: 0.8rem; font-weight: 700; color: var(--text-main); cursor: pointer; text-align: left; padding: 0; }
.dp-mf i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex-shrink: 0; }
.dp-mc { min-width: 38px; border: 1px solid var(--border-color); background: #fff; border-radius: 7px; padding: 3px 8px; font-family: inherit; font-size: 0.8rem; font-weight: 800; color: var(--text-main); cursor: pointer; }
.dp-mc:hover { border-color: #0f4c81; }
.dp-mc.ok { color: #047857; } .dp-mc.warn { color: #b45309; } .dp-mc.bad { color: #b91c1c; } .dp-mc.ciclo { color: #0e7490; background: #ecfeff; border-color: #a5f3fc; } .dp-mc.cand { color: #6d28d9; }
.dp-mc0 { color: #94a3b8; }
.dp-fu { margin-bottom: 14px; }
.dp-fu-h { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 800; color: var(--text-main); margin: 6px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--c); }
.dp-fu-h i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.dp-fu-h span { font-size: 0.74rem; font-weight: 600; color: var(--text-muted); }
.dp-alciclo { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 0.72rem; font-weight: 700; color: #0e7490; background: #ecfeff; border: 1px solid #a5f3fc; border-radius: 6px; padding: 2px 8px; }
.dp-alciclo svg { width: 13px; height: 13px; }
.dp-b.vuelve { background: #0e7490; border-color: #0e7490; color: #fff; }

/* ---------- Postulación: aprobados/elegibles sin financiamiento y financiamiento obtenido ---------- */
.po-head { display: grid; grid-template-columns: 210px minmax(0, 1fr) 110px 118px 92px 170px 64px 18px; gap: 10px; padding: 6px 14px; font-size: 0.68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.po-row.po-row2 { grid-template-columns: 210px minmax(0, 1fr) 110px 118px 92px 170px 64px 18px; }
.po-fu { font-size: 0.74rem; font-weight: 700; color: var(--text-main); }
.po-fp { font-size: 0.76rem; color: var(--text-main); font-variant-numeric: tabular-nums; }
.po-fp small { color: var(--text-muted); }
.po-sf { font-size: 0.72rem; font-weight: 700; line-height: 1.25; }
.po-sf-fav { color: #047857; } .po-sf-ok { color: #047857; } .po-sf-no { color: #be123c; } .po-sf-warn { color: #b45309; } .po-sf-pend { color: #55657a; }
.po-items > li.po-fav { background: #f0fdf4; border-color: #86efac !important; box-shadow: inset 4px 0 0 #059669; }
.po-items > li.po-fav .po-name strong { color: #065f46; }
.po-kpis .po-kfav { background: #ecfdf5; border-color: #a7f3d0; }
.po-kpis .po-kfav strong { color: #047857; }
.po-fin-btn { display: inline-flex; align-items: center; gap: 8px; background: #047857 !important; border-color: #047857 !important; font-weight: 800; letter-spacing: 0.02em; }
.po-fin-btn:hover { background: #065f46 !important; }
.po-finpanel { padding: 16px 18px !important; margin-top: 16px; border-top: 4px solid #059669; }
.po-finpanel h4 { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.po-finpanel h4 svg { width: 17px; height: 17px; color: #047857; }
.po-fin-est { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.po-fin-est svg { width: 14px; height: 14px; }
.po-fin-est.ok, .po-fin-est.fav { background: #ecfdf5; color: #047857; }
.po-fin-est.pend { background: #f1f5f9; color: #475569; } .po-fin-est.warn { background: #fffbeb; color: #92400e; }
.po-fin-txt { font-size: 0.8rem; color: var(--text-main); line-height: 1.5; margin: 0 0 10px; }
.po-fin-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 4px 0 0; }
.po-fin-dl dt { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.po-fin-dl dd { margin: 2px 0 0; font-size: 0.86rem; font-weight: 700; color: var(--text-main); }
.po-fin-obs { margin-top: 10px; font-size: 0.8rem; background: #f8fafc; border-radius: 8px; padding: 8px 10px; }
.po-fin-pie { font-size: 0.7rem; color: var(--text-muted); margin-top: 8px; }
@media (max-width: 1280px) { .po-head { display: none; } .po-row.po-row2 { grid-template-columns: 1fr 1fr; } .po-row.po-row2 .po-name { grid-column: 1 / -1; } }
@media (max-width: 768px) { .po-fin-dl { grid-template-columns: 1fr 1fr; } }

/* ---------- Sincronización SUBDERE ---------- */
#subdere-root { display: flex; flex-direction: column; gap: 16px; }
.sy-head { padding: 18px 20px !important; border-top: 4px solid #0e7490; }
.sy-head.is-old { border-top-color: #d97706; }
.sy-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.sy-h h2 { font-size: 1.1rem; font-weight: 800; color: var(--text-main); }
.sy-h p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; max-width: 110ch; }
.sy-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #f8fafc; border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 14px; }
.sy-ult { display: flex; flex-direction: column; gap: 2px; font-size: 0.8rem; color: var(--text-muted); }
.sy-ult strong { font-size: 0.9rem; color: var(--text-main); }
.sy-ult em { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-weight: 700; color: #92400e; }
.sy-ult em svg { width: 14px; height: 14px; }
.sy-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.sy-kpis div { background: #fff; border: 1px solid var(--border-color); border-left: 4px solid var(--c); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.sy-kpis strong { font-size: 1.15rem; font-weight: 800; color: var(--text-main); font-variant-numeric: tabular-nums; }
.sy-kpis span { font-size: 0.74rem; font-weight: 700; color: var(--text-main); }
.sy-kpis em { font-style: normal; font-size: 0.7rem; color: var(--text-muted); }
.sy-sec { padding: 16px 18px !important; }
.sy-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sy-sec-h h3 { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 800; color: var(--text-main); }
.sy-sec-h h3 svg { width: 17px; height: 17px; color: #0e7490; }
.sy-sec-h span { font-size: 0.74rem; color: var(--text-muted); }
.sy-prog { font-size: 0.86rem; font-weight: 800; color: #0e7490; margin: 12px 0 6px; }
.sy-prog span { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.sy-t td small { display: block; font-size: 0.68rem; color: var(--text-muted); }
.sy-ok { font-size: 0.7rem; font-weight: 700; color: #047857; white-space: nowrap; }
.sy-ko { font-size: 0.7rem; font-weight: 800; color: #b45309; background: #fffbeb; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.sy-up { font-weight: 800; color: #047857; } .sy-flat { font-weight: 700; color: #b45309; } .sy-mut { color: var(--text-muted); }
.sy-saldo { color: #b91c1c; }
.sb-res-k { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sb-res-k span { display: flex; align-items: baseline; gap: 6px; font-size: 1.3rem; font-weight: 800; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border-color); }
.sb-res-k em { font-style: normal; font-size: 0.76rem; font-weight: 700; color: var(--text-muted); }
.sb-res-k .k-n { color: #0e7490; } .sb-res-k .k-c { color: #b45309; } .sb-res-k .k-f { color: #b91c1c; } .sb-res-k .k-i { color: #047857; }
.sb-grp { border: 1px solid var(--border-color); border-radius: 10px; margin-bottom: 10px; }
.sb-grp summary { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 12px; cursor: pointer; font-weight: 800; color: var(--text-main); }
.sb-grp summary strong { font-size: 0.85rem; padding: 0 8px; border-radius: 999px; background: #f1f5f9; }
.sb-grp summary em { font-style: normal; font-size: 0.74rem; font-weight: 600; color: var(--text-muted); }
.sb-grp-nuevo summary { color: #0e7490; } .sb-grp-cambia summary { color: #b45309; } .sb-grp-nofig summary { color: #b91c1c; } .sb-grp-igual summary { color: #047857; }
.sb-grp .sb-tw { border: none; border-top: 1px solid var(--border-color); border-radius: 0 0 10px 10px; max-height: none; }
.sb-dif { margin: 0; padding-left: 16px; font-size: 0.74rem; color: var(--text-main); display: flex; flex-direction: column; gap: 2px; }
.sb-hist { margin-top: 12px; font-size: 0.76rem; }
.sb-hist strong { display: block; margin-bottom: 6px; color: var(--text-main); }
.sb-hist table { width: 100%; border-collapse: collapse; }
.sb-hist th, .sb-hist td { padding: 5px 8px; border-bottom: 1px solid var(--border-color); text-align: left; }
.sb-hist th { font-size: 0.68rem; color: var(--text-muted); }
.sb-hist .t-r { text-align: right; }
@media (max-width: 1280px) { .sy-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) { .sy-kpis { grid-template-columns: 1fr 1fr; } }
