/* Montserrat (SIL Open Font License 1.1) — Copyright 2024 The Montserrat.Git Project Authors */
@font-face{font-family:'Montserrat';font-style:normal;font-weight:400 900;font-display:swap;src:url(fuentes/montserrat-latin.woff2) format('woff2')}
/* Rendición de Cuentas · San Jerónimo · 2.º semestre 2026
   Estilo: lienzo azul noche + figuras geométricas en los colores del municipio (inspirado en las piezas Genially de la alcaldía). */
:root {
  --scale: 1;
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  /* paleta municipal */
  --navy: #2d2b52;
  --navy-2: #24224a;
  --navy-3: #1b1a38;
  --sj-yellow: #ffe500;
  --sj-red: #e30613;
  --sj-green: #009639;
  --sj-orange: #f39200;
  --sj-gold: #b8975f;
  --brand-red: var(--sj-red);
  --brand-green: var(--sj-green);
  --brand-yellow: var(--sj-yellow);
  /* lienzo (cambia con el tema) */
  --canvas: var(--navy);
  --on-canvas: #ffffff;
  --on-canvas-2: #cfcdf0;
  --canvas-title: var(--sj-yellow);
  --canvas-line: rgba(255, 255, 255, .16);
  --canvas-soft: rgba(255, 255, 255, .08);
  /* tarjetas (siempre claras para leer tablas y cifras) */
  --surface: #ffffff;
  --surface-2: #f5f6fb;
  --surface-3: #eaecf4;
  --line: #dfe1eb;
  --line-2: #eceef5;
  --ink: #1e1d3a;
  --ink-2: #3d3c5e;
  --ink-3: #66658a;
  --focus: #ffe500;
  --shadow-1: 0 2px 6px rgba(10, 9, 30, .12), 0 8px 24px rgba(10, 9, 30, .12);
  --shadow-2: 0 6px 18px rgba(10, 9, 30, .22), 0 18px 48px rgba(10, 9, 30, .25);
  --radius: 20px;
  /* acento (lo redefine cada secretaría) */
  --accent: var(--sj-yellow);
  --accent-text: #6b5a00;
  --accent-ink: var(--navy-3);
  --accent-soft: #fff8c7;
  --accent-mid: #f3df5a;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --canvas: #f1f2f8;
  --on-canvas: #1e1d3a;
  --on-canvas-2: #55547a;
  --canvas-title: #2d2b52;
  --canvas-line: #d9dbe7;
  --canvas-soft: #ffffff;
  --shadow-1: 0 1px 3px rgba(30, 29, 58, .08), 0 6px 18px rgba(30, 29, 58, .07);
  --focus: #1f6fd1;
  color-scheme: light;
}

/* identidad por secretaría
   --accent: marcas y bloques · --accent-text: texto sobre blanco · --cover: fondo de portada · --d1..3: figuras */
.sec-hac { --accent: #5f6670; --accent-text: #4b5159; --accent-ink: #fff; --accent-soft: #f0f1f2; --accent-mid: #868c94; --cover: #50565f; --cover-title: var(--sj-yellow); --cover-ink: #fff; --d1: var(--sj-yellow); --d2: var(--sj-red); --d3: var(--sj-green); }
.sec-sal { --accent: #1f6fd1; --accent-text: #1a5fb4; --accent-ink: #fff; --accent-soft: #e9f1fc; --accent-mid: #a9c8f0; --cover: #1b5fc4; --cover-title: var(--sj-yellow); --cover-ink: #fff; --d1: var(--sj-yellow); --d2: var(--sj-red); --d3: var(--sj-green); }
.sec-dec { --accent: #dda700; --accent-text: #7f5e00; --accent-ink: #1b1a38; --accent-soft: #fdf5dc; --accent-mid: #f0d684; --cover: #f2c200; --cover-title: #1b1a38; --cover-ink: #1b1a38; --d1: var(--sj-green); --d2: var(--sj-red); --d3: var(--sj-yellow); }
.sec-edu { --accent: #e3590a; --accent-text: #b2440a; --accent-ink: #fff; --accent-soft: #fdeee4; --accent-mid: #f3b48e; --cover: #d6560a; --cover-title: #fff; --cover-ink: #fff; --d1: var(--sj-yellow); --d2: var(--sj-green); --d3: #d6560a; }
.sec-pla { --accent: #168a44; --accent-text: #11733a; --accent-ink: #fff; --accent-soft: #e6f4eb; --accent-mid: #9fd2b2; --cover: #0b8a3e; --cover-title: var(--sj-yellow); --cover-ink: #fff; --d1: var(--sj-yellow); --d2: var(--sj-red); --d3: #0b8a3e; }
.sec-gob { --accent: #d12230; --accent-text: #b01a25; --accent-ink: #fff; --accent-soft: #fce9ea; --accent-mid: #efa5ab; --cover: #c9131f; --cover-title: var(--sj-yellow); --cover-ink: #fff; --d1: var(--sj-yellow); --d2: var(--sj-green); --d3: #c9131f; }
.sec-com { --accent: #b5179e; --accent-text: #98148a; --accent-ink: #fff; --accent-soft: #f8e7f5; --accent-mid: #e2a3d8; --cover: #ae1585; --cover-title: var(--sj-yellow); --cover-ink: #fff; --d1: var(--sj-yellow); --d2: var(--sj-green); --d3: #ae1585; }
.cover-home { --cover: var(--sj-green); --cover-title: var(--sj-yellow); --cover-ink: #fff; --d1: var(--sj-yellow); --d2: var(--sj-red); --d3: var(--sj-green); }

* { box-sizing: border-box; }
html { font-size: calc(16px * var(--scale)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-weight: 500; color: var(--on-canvas); background: var(--canvas);
  line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.card :focus-visible, .modal :focus-visible { outline-color: #1f6fd1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- barra superior */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .9rem;
  padding: .55rem 1rem; background: var(--navy-3); color: #fff;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px;
  background: linear-gradient(90deg, var(--sj-red) 0 33.3%, var(--sj-yellow) 33.3% 66.6%, var(--sj-green) 66.6% 100%);
}
.brand { display: flex; align-items: center; gap: .75rem; min-width: 0; text-decoration: none; }
.brand .logo { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 0 0 3px rgba(255, 229, 0, .55); }
.brand .logo img { width: 36px; height: 36px; object-fit: contain; }
.brand-txt { min-width: 0; line-height: 1.15; }
.brand-txt b { display: block; font-weight: 900; font-size: 1.05rem; letter-spacing: -.01em; color: var(--sj-yellow); }
.brand-txt span { display: block; font-size: .78rem; color: #cfcdf0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: .45rem; flex-wrap: nowrap; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 2.45rem; min-width: 2.45rem;
  padding: 0 .7rem; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 999px; font-weight: 800; font-size: .85rem;
}
.icon-btn:hover { background: rgba(255, 255, 255, .18); }
.icon-btn[aria-pressed="true"] { background: var(--sj-yellow); color: var(--navy-3); border-color: var(--sj-yellow); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; flex: none; }
.icon-btn .lbl { white-space: nowrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .1); gap: 2px; }
.seg button { border: 0; background: transparent; padding: .45rem .85rem; border-radius: 999px; font-weight: 800; font-size: .8rem; color: #dcdaf5; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--sj-yellow); color: var(--navy-3); }
.menu-btn { display: none; }

/* ---------------------------------------------------------------- estructura */
.shell { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); min-height: calc(100vh - 3.6rem); }
body.nav-collapsed .shell { grid-template-columns: 0 minmax(0, 1fr); }
body.nav-collapsed .sidebar { visibility: hidden; }
.sidebar {
  --accent: var(--sj-yellow); --accent-ink: var(--navy-3);
  position: sticky; top: calc(3.6rem + 5px); align-self: start; height: calc(100vh - 3.6rem - 5px); overflow: auto;
  padding: 1rem .75rem 2rem; background: var(--navy-2); color: #fff; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.nav-title { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #a9a7d6; margin: 1rem .6rem .5rem; }
.nav-item {
  display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left; border: 0; background: transparent;
  padding: .55rem .65rem; border-radius: 12px; font-weight: 700; font-size: .88rem; color: #e7e6fb; text-decoration: none; line-height: 1.25;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.sidebar .sec-edu > .nav-item[aria-current="page"] { background: var(--accent-text); }
.nav-dot { width: .85rem; height: .85rem; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .22); }
.nav-item[aria-current="page"] .nav-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.nav-ico { width: 1.25rem; height: 1.25rem; flex: none; color: var(--sj-yellow); }
.nav-item[aria-current="page"] .nav-ico { color: inherit; }
.sidebar .chip { background: rgba(255, 255, 255, .12); color: #fff; }
.sidebar .nav-item[aria-current="page"] .chip { background: rgba(0, 0, 0, .14); color: inherit; }
.nav-sub { margin: .25rem 0 .45rem 1.45rem; padding-left: .6rem; border-left: 2px solid rgba(255, 255, 255, .16); }
.nav-sub .nav-item { font-size: .82rem; font-weight: 650; padding: .38rem .65rem; color: #cfcdf0; }
.nav-sub .nav-item[aria-current="page"] { background: var(--sj-yellow); color: var(--navy-3); }
.nav-foot { margin: 1.5rem .6rem 0; font-size: .72rem; color: #a9a7d6; line-height: 1.45; }

.main { min-width: 0; padding: 1.4rem 1.6rem 4rem; }
.view { max-width: 86rem; margin: 0 auto; }
.view > * { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.view > *:nth-child(2) { animation-delay: .05s; } .view > *:nth-child(3) { animation-delay: .1s; } .view > *:nth-child(4) { animation-delay: .15s; }
.view > *:nth-child(5) { animation-delay: .2s; } .view > *:nth-child(6) { animation-delay: .25s; } .view > *:nth-child(n+7) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.95); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- piezas comunes */
.card { background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-1); }
:root[data-theme="light"] .card { border: 1px solid var(--line); }
.card-pad { padding: 1.3rem 1.4rem; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt { margin-top: 1rem; } .mt2 { margin-top: 1.6rem; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
.h-sec { font-size: 1.75rem; font-weight: 900; margin: 2rem 0 .9rem; display: flex; align-items: center; gap: .3rem .8rem; flex-wrap: wrap; color: var(--canvas-title); letter-spacing: -.03em; }
.h-sec .h-num { font-size: 2.9rem; line-height: .9; color: var(--on-canvas); letter-spacing: -.05em; }
.h-sec .h-txt { display: flex; flex-direction: column; gap: .15rem; }
.h-sec small { font-size: .9rem; font-weight: 600; color: var(--on-canvas-2); letter-spacing: 0; }
.card h3 { font-size: 1.08rem; font-weight: 800; color: var(--ink); }
.card .sub { font-size: .82rem; color: var(--ink-3); font-weight: 600; margin-top: .2rem; }
.muted { color: var(--ink-3); }
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .76rem; font-weight: 800;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.chip svg { width: .95rem; height: .95rem; }
.chip.accent { background: var(--accent-soft); color: var(--accent-text); }
.chip.ok { background: #dff3e6; color: #0b6b33; }
.chip.warn { background: #fff4c2; color: #6b5300; }
.chip.info { background: #e3edfb; color: #1a5fb4; }
.chip.off { background: var(--surface-3); color: var(--ink-3); }
.btn {
  display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: .55rem 1rem; border-radius: 999px; font-weight: 800; font-size: .86rem; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn svg { width: 1.05rem; height: 1.05rem; }
.btn.sm { padding: .38rem .7rem; font-size: .78rem; }
.notice {
  display: flex; gap: .75rem; align-items: flex-start; padding: .95rem 1.1rem; border-radius: 16px; font-size: .9rem; font-weight: 700;
  background: var(--sj-yellow); color: var(--navy-3); box-shadow: var(--shadow-1);
}
.notice svg { width: 1.25rem; height: 1.25rem; flex: none; margin-top: .1rem; }
.notice.info { background: var(--surface); color: var(--ink-2); border-left: 6px solid var(--accent); }

/* ---------------------------------------------------------------- figuras geométricas */
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; border-radius: inherit; }
.shp { position: absolute; animation: shpIn .85s cubic-bezier(.2, .9, .3, 1.25) both; }
.shp-in { position: absolute; }
.sh-arch { border-radius: 999px 999px 0 0; }
.sh-circle { border-radius: 50%; }
.sh-sq { border-radius: 0; }
.sh-pill-l { border-radius: 999px 0 0 999px; }
.sh-tri-bl { clip-path: polygon(0 0, 0 100%, 100% 100%); }
.sh-tri-br { clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.sh-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.k-1 { background: var(--d1); color: var(--d1); }
.k-2 { background: var(--d2); color: var(--d2); }
.k-3 { background: var(--d3); color: var(--d3); }
.k-n { background: var(--navy-3); color: var(--navy-3); }
.k-w { background: #fff; color: #fff; }
.sh-sun { background: transparent !important; }
.sh-sun svg { display: block; width: 100%; height: 100%; animation: spin 60s linear infinite; }
@keyframes shpIn { from { opacity: 0; transform: translateY(45%) scale(.55); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- portadas */
.cover {
  --u: clamp(.55rem, .95vw, 1.1rem);
  position: relative; overflow: hidden; border-radius: 28px; background: var(--cover); color: var(--cover-ink);
  min-height: 25rem; display: grid; place-items: center; text-align: center; padding: 2.4rem calc(var(--u) * 19) 3rem;
  box-shadow: var(--shadow-2);
}
.cover-in { position: relative; z-index: 2; max-width: 52rem; }
.cover .badge-escudo { width: 7.2rem; height: 7.2rem; border-radius: 50%; background: #fff; display: grid; place-items: center; margin: 0 auto 1.1rem; box-shadow: 0 0 0 .45rem rgba(255, 255, 255, .25), 0 10px 30px rgba(0, 0, 0, .25); animation: pop .6s .1s cubic-bezier(.2, .9, .3, 1.3) both; }
.cover .badge-escudo img { width: 5.5rem; height: 5.5rem; object-fit: contain; }
.cover .eyebrow { font-size: .82rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--cover-ink); opacity: .92; }
.cover h1 { color: var(--cover-title); font-size: clamp(2.3rem, 4.3vw, 4rem); font-weight: 900; letter-spacing: -.04em; line-height: 1; margin: .45rem 0 .35rem; text-wrap: balance; }
.cover h1 span { color: var(--cover-ink); }
.cover .cover-sub { font-size: clamp(1.05rem, 1.9vw, 1.55rem); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cover-ink); }
.cover p { margin: .8rem auto 0; font-size: 1.02rem; max-width: 44rem; color: var(--cover-ink); opacity: .95; }
.cover .meta { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.1rem; }
.cover .chip { background: rgba(0, 0, 0, .24); color: var(--cover-ink); font-size: .82rem; }
.sec-dec .cover .chip { background: rgba(27, 26, 56, .1); }

.cover-sec { min-height: 16rem; place-items: center start; text-align: left; padding: 2rem calc(var(--u) * 21) 2.2rem 2.2rem; --u: clamp(.48rem, .75vw, .85rem); }
.cover-sec .cover-in { max-width: none; width: 100%; }
.cover-sec .cs-top { display: flex; align-items: center; gap: .8rem; }
.cover-sec .cs-ico { width: 3.6rem; height: 3.6rem; border-radius: 50%; background: #fff; color: var(--accent-text); display: grid; place-items: center; flex: none; box-shadow: 0 0 0 .35rem rgba(255, 255, 255, .22); }
.cover-sec .cs-ico svg { width: 1.9rem; height: 1.9rem; }
.cover-sec h1 { font-size: clamp(1.9rem, 3.3vw, 3rem); margin: .8rem 0 .35rem; }
.cover-sec .cs-resp { font-size: 1.05rem; font-weight: 700; color: var(--cover-ink); }
.cover-sec .meta { justify-content: flex-start; }
.cover-sec .edit-row { margin-top: .5rem; max-width: 34rem; }
/* fuera del Resumen: membrete y portada compactos para que el contenido entre en la primera pantalla */
.view[data-tab]:not([data-tab="resumen"]) .banner-card img { height: 4.6rem; }
.view[data-tab]:not([data-tab="resumen"]) .banner-side { display: none; }
.view[data-tab]:not([data-tab="resumen"]) .cover-sec { min-height: 0; padding-top: 1rem; padding-bottom: 1rem; --u: clamp(.3rem, .45vw, .5rem); }
.view[data-tab]:not([data-tab="resumen"]) .cover-sec h1 { font-size: clamp(1.35rem, 2.1vw, 1.9rem); margin: .35rem 0 .15rem; }
.view[data-tab]:not([data-tab="resumen"]) .cover-sec .cs-ico { width: 2.6rem; height: 2.6rem; }
.view[data-tab]:not([data-tab="resumen"]) .cover-sec .cs-ico svg { width: 1.4rem; height: 1.4rem; }
.view[data-tab]:not([data-tab="resumen"]) .cover-sec .meta { margin-top: .5rem; }
.view[data-tab]:not([data-tab="resumen"]) .h-sec { margin-top: 1rem; }

/* ---------------------------------------------------------------- indicadores (bloques sólidos) */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.kpi-row > * { animation: pop .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.kpi-row:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-row > *:nth-child(2) { animation-delay: .06s; } .kpi-row > *:nth-child(3) { animation-delay: .12s; } .kpi-row > *:nth-child(4) { animation-delay: .18s; } .kpi-row > *:nth-child(n+5) { animation-delay: .24s; }
.kpi { position: relative; padding: 1.15rem 1.3rem 1.25rem; overflow: hidden; border-radius: 22px; min-height: 8.6rem; box-shadow: var(--shadow-1); }
.kpi::after { content: ""; position: absolute; z-index: 0; right: -2.4rem; bottom: -2.4rem; width: 7.5rem; height: 7.5rem; border-radius: 50%; background: rgba(255, 255, 255, .14); pointer-events: none; }
.kpi > * { position: relative; z-index: 1; }
.kpi > .k-ico { position: absolute; }
.kpi .k-label { font-size: .92rem; font-weight: 800; line-height: 1.3; opacity: .92; position: relative; }
.kpi .k-value { font-size: 2.45rem; font-weight: 900; letter-spacing: -.04em; margin-top: .35rem; line-height: 1.05; position: relative; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .3rem; }
.kpi .k-value > span { white-space: nowrap; }
.kpi .k-value small { font-size: 1rem; font-weight: 800; letter-spacing: 0; opacity: .85; }
.kpi .k-note { font-size: .86rem; font-weight: 700; margin-top: .4rem; opacity: .88; position: relative; }
.kpi .k-ico { position: absolute; right: 1rem; top: 1rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .24); }
.kpi .k-ico svg { width: 1.35rem; height: 1.35rem; }
.kpi.has-ico .k-label { padding-right: 3rem; }
.tone-y { background: var(--sj-yellow); color: var(--navy-3); }
.tone-y .k-ico { background: rgba(27, 26, 56, .1); }
.tone-r { background: var(--sj-red); color: #fff; }
.tone-g { background: var(--sj-green); color: #fff; }
.tone-n { background: var(--navy-3); color: #fff; }
.tone-n .k-value { color: var(--sj-yellow); }
.tone-acc { background: var(--accent); color: var(--accent-ink); }
.tone-w { background: var(--surface); color: var(--ink); }
.tone-w .k-value { color: var(--accent-text); }
.tone-w .k-ico { background: var(--accent-soft); color: var(--accent-text); }
.tone-w::after, .tone-soft::after { background: var(--accent-soft); opacity: .7; }
.tone-soft { background: var(--accent-soft); color: var(--ink); box-shadow: none; }
.tone-soft .k-value { color: var(--accent-text); font-size: 2.1rem; }
.tone-soft .k-ico { background: #fff; color: var(--accent-text); }

/* ---------------------------------------------------------------- portada: secretarías */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 1rem; }
.sec-grid > * { animation: pop .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.sec-grid > *:nth-child(2) { animation-delay: .05s; } .sec-grid > *:nth-child(3) { animation-delay: .1s; } .sec-grid > *:nth-child(4) { animation-delay: .15s; }
.sec-grid > *:nth-child(5) { animation-delay: .2s; } .sec-grid > *:nth-child(6) { animation-delay: .25s; } .sec-grid > *:nth-child(n+7) { animation-delay: .3s; }
.sec-card {
  position: relative; display: flex; flex-direction: column; gap: .75rem; text-align: left; padding: 1.2rem 1.25rem 1.15rem; border-radius: 24px;
  background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-1); transition: transform .2s ease, box-shadow .2s ease; overflow: hidden;
  text-decoration: none; min-height: 11.5rem;
}
.sec-card::before { content: ""; position: absolute; right: -2.2rem; top: -2.2rem; width: 7.5rem; height: 7.5rem; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.sec-card::after { content: ""; position: absolute; right: 2.8rem; bottom: -1.6rem; width: 3.2rem; height: 3.2rem; background: rgba(255, 255, 255, .14); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.sec-card:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow-2); }
.sec-card .sc-head { display: flex; align-items: center; gap: .8rem; position: relative; z-index: 1; }
.sec-card .sc-ico { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--accent-text); flex: none; }
.sec-card .sc-ico svg { width: 1.55rem; height: 1.55rem; }
.sec-card .sc-name { font-weight: 900; font-size: 1.04rem; line-height: 1.2; letter-spacing: -.01em; }
.sec-card .sc-resp { font-size: .88rem; font-weight: 700; opacity: .9; }
.sec-card .sc-stats { display: flex; gap: 1.2rem; margin-top: auto; padding-top: .7rem; border-top: 1px solid rgba(255, 255, 255, .3); position: relative; z-index: 1; padding-right: 3rem; }
.sec-dec .sc-stats { border-top-color: rgba(27, 26, 56, .2); }
.sec-card .sc-stats b { display: block; font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; }
.sec-card .sc-stats span { font-size: .74rem; font-weight: 800; opacity: .88; }
.sec-card .sc-go { position: absolute; right: 1rem; bottom: 1rem; z-index: 1; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--accent-text); transition: transform .2s; }
.sec-card:hover .sc-go { transform: translateX(3px); }
.sec-card .sc-go svg { width: 1.25rem; height: 1.25rem; }

/* ---------------------------------------------------------------- secretaría */
.banner-card { overflow: hidden; background: #fff; padding: 0; display: flex; align-items: center; position: relative; border-radius: 22px; }
.banner-card img { display: block; height: clamp(6rem, 11vw, 10rem); width: auto; max-width: 80%; object-fit: contain; object-position: left center; }
.banner-side { margin-left: auto; padding: 1rem 1.8rem 1rem 1rem; text-align: right; color: var(--navy-3); line-height: 1.15; }
.banner-side small { display: block; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #66658a; }
.banner-side b { display: block; font-size: 1.6rem; font-weight: 900; letter-spacing: -.03em; margin-top: .2rem; }
.banner-side span { display: block; font-size: .95rem; font-weight: 800; color: var(--sj-red); margin-top: .15rem; }
.cover-sec { margin-top: 1rem; }

.tabs {
  position: sticky; top: calc(3.6rem + 5px); z-index: 20; display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem -.3rem 0; padding: .6rem .3rem;
  background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(8px);
}
.tab {
  border: 1px solid var(--canvas-line); background: var(--canvas-soft); padding: .45rem 1rem .45rem .45rem; border-radius: 999px; font-weight: 800; font-size: .9rem;
  color: var(--on-canvas); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; transition: background .15s, transform .15s;
}
.tab:hover { transform: translateY(-1px); border-color: var(--accent); }
.tab .tab-num { display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .76rem; font-weight: 900; }
.tab[aria-current="page"] { background: var(--sj-yellow); border-color: var(--sj-yellow); color: var(--navy-3); }
.tab[aria-current="page"] .tab-num { background: var(--navy-3); color: var(--sj-yellow); }
.tab .badge { font-size: .72rem; padding: .05rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .16); color: inherit; }
.tab[aria-current="page"] .badge { background: rgba(27, 26, 56, .14); }
:root[data-theme="light"] .tab .badge { background: var(--surface-3); }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.4rem; flex-wrap: wrap; }
.pager a { flex: 1 1 16rem; max-width: 28rem; display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border-radius: 22px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1); transition: transform .15s; }
.pager a:hover { transform: translateY(-2px); }
.pager a.next { margin-left: auto; text-align: right; flex-direction: row-reverse; }
.pager .pg-btn { width: 2.9rem; height: 2.9rem; border-radius: 50%; background: var(--sj-red); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 4px 12px rgba(227, 6, 19, .35); }
.pager .pg-btn svg { width: 1.35rem; height: 1.35rem; }
.pager .pg-txt { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.pager small { font-size: .72rem; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.pager b { font-size: .98rem; font-weight: 900; color: var(--ink); }

/* gráficos */
.chart-card { padding: 1.25rem 1.35rem 1.3rem; }
.chart-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.bars { display: flex; flex-direction: column; gap: .6rem; }
.bar-row { display: grid; grid-template-columns: minmax(8rem, 15rem) minmax(0, 1fr) auto; align-items: center; gap: .8rem; border-radius: 10px; padding: .2rem .3rem; }
.bar-row.clickable { cursor: pointer; }
.bar-row.clickable:hover { background: var(--surface-2); }
.bar-label { font-size: .86rem; font-weight: 800; line-height: 1.25; color: var(--ink-2); }
.bar-label small { display: block; font-weight: 600; color: var(--ink-3); font-size: .74rem; }
.bar-track { position: relative; height: 1.35rem; border-radius: 0 999px 999px 0; background: var(--surface-2); }
.bar-fill { height: 100%; border-radius: 0 999px 999px 0; background: var(--bar, var(--accent)); width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.sec-dec .bar-fill { box-shadow: inset 0 0 0 1.5px #7f5e00; }   /* amarillo sobre blanco: borde para llegar a 3:1 */
.bar-val { font-size: .9rem; font-weight: 900; white-space: nowrap; text-align: right; min-width: 5.5rem; color: var(--ink); }
.bar-val small { display: block; font-size: .72rem; font-weight: 700; color: var(--ink-3); }
.bars.stacked .bar-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: .3rem; padding: .35rem .3rem; }
.bars.stacked .bar-label { grid-column: 1 / -1; }
.bars.stacked .bar-label > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bars.stacked .bar-label small { display: inline; margin-left: .4rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .78rem; font-weight: 800; color: var(--ink-2); }
.legend i { display: inline-block; width: .85rem; height: .85rem; border-radius: 50%; margin-right: .35rem; vertical-align: -.1rem; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart text { font-family: var(--font); fill: var(--ink-2); font-size: 14px; font-weight: 700; }
svg.chart .axis-line { stroke: var(--line); stroke-width: 1; }
svg.chart .val { fill: var(--ink); font-weight: 900; font-size: 15px; }
svg.chart .mark { transition: opacity .15s; }
svg.chart .mark:hover { opacity: .82; }
.meter { position: relative; height: 1.15rem; border-radius: 999px; background: var(--accent-soft); overflow: visible; }
.meter .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.meter .limit { position: absolute; top: -.45rem; bottom: -.45rem; width: 3px; border-radius: 2px; background: var(--sj-red); }
.meter .limit span { position: absolute; top: -1.4rem; left: 50%; transform: translateX(-50%); font-size: .74rem; font-weight: 900; color: var(--sj-red); white-space: nowrap; }

/* top contratos */
.top-list { display: flex; flex-direction: column; }
.top-item { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: .85rem; align-items: center; padding: .8rem .4rem; border-top: 1px solid var(--line-2); cursor: pointer; border-radius: 12px; color: var(--ink); }
.top-item:first-child { border-top: 0; }
.top-item:hover { background: var(--accent-soft); }
.top-item .rank { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--accent); color: var(--accent-ink); }
.top-item .rank svg { width: 1.2rem; height: 1.2rem; }
.top-item .ti-obj { font-weight: 800; font-size: .92rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-item .ti-meta { font-size: .76rem; color: var(--ink-3); font-weight: 600; margin-top: .15rem; }
.top-item .ti-val { font-weight: 900; white-space: nowrap; color: var(--accent-text); font-size: 1.02rem; }

/* ---------------------------------------------------------------- contratos */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .9rem 1rem; }
.search { position: relative; flex: 1 1 18rem; min-width: 14rem; }
.search svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; color: var(--ink-3); }
.search input { width: 100%; padding: .65rem .9rem .65rem 2.5rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; color: var(--ink); }
.filters select { padding: .6rem 2rem .6rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; font-size: .85rem; max-width: 17rem; color: var(--ink); }
.filters .count { font-size: .86rem; font-weight: 700; color: var(--ink-2); margin-left: auto; white-space: nowrap; }
.filters .count b { color: var(--ink); }
.viewswitch { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 999px; }
.viewswitch button { border: 0; background: transparent; padding: .42rem .75rem; border-radius: 999px; font-weight: 800; font-size: .8rem; display: inline-flex; gap: .35rem; align-items: center; color: var(--ink-2); }
.viewswitch button svg { width: 1rem; height: 1rem; }
.viewswitch button[aria-pressed="true"] { background: var(--navy); color: var(--sj-yellow); }
.table-wrap { overflow-x: auto; }
table.ct { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
table.ct th {
  position: sticky; top: 0; text-align: left; font-size: .8rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--sj-yellow);
  background: var(--navy); padding: .8rem .85rem; white-space: nowrap;
}
table.ct thead th:first-child { border-top-left-radius: var(--radius); }
table.ct thead th:last-child { border-top-right-radius: var(--radius); }
table.ct th.r, table.ct td.r { text-align: right; }
table.ct td { padding: .85rem .85rem; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--ink); }
table.ct tbody tr { cursor: pointer; transition: background .12s; }
table.ct tbody tr:nth-child(even) { background: #fafbfe; }
table.ct tbody tr:hover { background: var(--accent-soft); }
table.ct .c-proy { max-width: 14rem; font-size: .86rem; color: var(--ink-2); font-weight: 600; }
table.ct .c-obj { min-width: 18rem; font-weight: 600; }
table.ct .c-fin { color: var(--ink-2); }
@media (max-width: 1600px) {
  table.ct .c-proy { max-width: 11rem; }
  table.ct .c-obj { min-width: 14rem; }
  table.ct .c-ctr { min-width: 8.5rem; }
  table.ct td, table.ct th { padding: .7rem .6rem; }
  table.ht td, table.ht th { padding: .5rem .45rem; }
}
table.ct .c-obj .code { display: inline-block; font-size: .72rem; font-weight: 900; color: var(--accent-ink); background: var(--accent); padding: .1rem .55rem; border-radius: 999px; margin-bottom: .35rem; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clamp4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
table.ct .c-date { white-space: nowrap; font-size: .86rem; font-weight: 700; }
table.ct .c-val { white-space: nowrap; font-weight: 900; color: var(--accent-text); }
table.ct .c-ctr { min-width: 11rem; font-weight: 800; font-size: .87rem; }
table.ct tfoot td { font-weight: 900; background: var(--sj-yellow); color: var(--navy-3); border-bottom: 0; }
table.ct tfoot td:first-child { border-bottom-left-radius: var(--radius); }
table.ct tfoot td:last-child { border-bottom-right-radius: var(--radius); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1rem; }
.ccard { display: flex; flex-direction: column; gap: .55rem; padding: 1.1rem 1.2rem; cursor: pointer; text-align: left; transition: transform .15s, box-shadow .15s; border-top: 6px solid var(--accent); }
.ccard:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.ccard .cc-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.ccard .cc-code { font-size: .76rem; font-weight: 900; color: var(--accent-ink); background: var(--accent); padding: .1rem .55rem; border-radius: 999px; }
.ccard .cc-obj { font-weight: 800; font-size: .96rem; line-height: 1.4; }
.ccard .cc-proy { font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.ccard .cc-ctr { font-size: .87rem; font-weight: 800; }
.ccard .cc-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--line-2); }
.ccard .cc-dates { font-size: .78rem; color: var(--ink-2); font-weight: 700; }
.ccard .cc-val { font-size: 1.2rem; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; color: var(--accent-text); }
.empty { padding: 2.4rem 1.5rem; text-align: center; color: var(--ink-3); }
.empty svg { width: 2.8rem; height: 2.8rem; color: var(--accent); }
.empty h3 { color: var(--ink); margin: .6rem 0 .3rem; font-size: 1.15rem; }
.empty p { margin: 0 auto; max-width: 38rem; font-weight: 600; }

/* cronograma */
.gantt { position: relative; }
.gantt-row { display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); align-items: center; gap: .8rem; min-height: 1.95rem; cursor: pointer; border-radius: 8px; }
.gantt-row:hover { background: var(--accent-soft); }
.gantt-row .g-lbl { font-size: .85rem; font-weight: 800; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-row .g-lbl small { color: var(--ink-3); font-weight: 600; }
.gantt-track { position: relative; height: 1.95rem; }
.gantt-bar { position: absolute; top: .5rem; height: .95rem; border-radius: 999px; background: var(--accent); min-width: 6px; }
.gantt-bar.cont::after { content: ""; position: absolute; right: -7px; top: 50%; transform: translateY(-50%); border: 7px solid transparent; border-left-color: var(--accent); border-right-width: 0; }
.gantt-axis { display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); gap: .8rem; margin-bottom: .3rem; }
.gantt-scale { position: relative; height: 1.4rem; }
.gantt-scale span { position: absolute; top: 0; font-size: .74rem; font-weight: 900; color: var(--ink-3); text-transform: uppercase; transform: translateX(-50%); white-space: nowrap; }
.gantt-lines { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.gantt-lines i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.gantt-lines i.today { width: 3px; border-radius: 2px; background: var(--sj-red); }

/* ---------------------------------------------------------------- logros / contenido editable */
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.blist { margin: .7rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.blist li { position: relative; padding: .75rem 1rem .75rem 2.9rem; border-radius: 14px; background: var(--surface-2); font-weight: 700; font-size: 1rem; line-height: 1.45; color: var(--ink); animation: rise .45s both; }
.blist li::before { content: ""; position: absolute; left: 1rem; top: 1.02rem; width: .85rem; height: .85rem; background: var(--accent); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.blist li:nth-child(3n+2)::before { background: var(--sj-yellow); }
.blist li:nth-child(3n)::before { background: var(--sj-red); }
.placeholder { padding: 1.4rem 1.2rem; border: 2px dashed var(--line); border-radius: 16px; color: var(--ink-3); font-weight: 700; font-size: .9rem; text-align: center; background: var(--surface); }
.view > .placeholder, .mt2 > .placeholder { border-color: var(--canvas-line); background: var(--canvas-soft); color: var(--on-canvas-2); }
.edit-row { display: flex; gap: .4rem; align-items: flex-start; }
.edit-row textarea, .edit-row input, .ed-input {
  flex: 1; width: 100%; padding: .55rem .75rem; border-radius: 12px; border: 1.5px solid var(--accent-mid); background: #fff; color: var(--ink); font-weight: 600; font-size: .92rem; resize: vertical;
}
.edit-row textarea:focus, .edit-row input:focus, .ed-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ed-mini { border: 1px solid var(--line); background: #fff; border-radius: 50%; width: 2.15rem; height: 2.15rem; display: inline-grid; place-items: center; flex: none; color: var(--ink-2); }
.ed-mini:hover { background: var(--surface-3); color: var(--ink); }
.ed-mini svg { width: 1rem; height: 1rem; }
.kpi-edit { display: grid; gap: .45rem; padding: 1rem; color: var(--ink); }
.kpi-edit label { font-size: .72rem; font-weight: 900; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
body.editing .editable-zone { outline: 2px dashed var(--sj-yellow); outline-offset: 5px; border-radius: 16px; }
body.editing .main { padding-bottom: 8rem; }
body.editing .toast { bottom: 5.5rem; }
.edit-bar {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 60; display: none; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: center;
  padding: .6rem .75rem; border-radius: 999px; background: var(--navy-3); color: #fff; box-shadow: var(--shadow-2); max-width: calc(100vw - 2rem); border: 2px solid var(--sj-yellow);
}
body.editing .edit-bar { display: flex; }
.edit-bar .eb-title { font-weight: 900; font-size: .85rem; padding: 0 .4rem; display: inline-flex; align-items: center; gap: .4rem; color: var(--sj-yellow); }
.edit-bar .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }
.edit-bar .btn:hover { background: rgba(255, 255, 255, .16); }
.edit-bar .btn.primary { background: var(--sj-green); border-color: var(--sj-green); }
.edit-bar .saved { font-size: .75rem; color: #cfcdf0; font-weight: 600; padding: 0 .3rem; }

/* ---------------------------------------------------------------- hacienda */
.hb-group { padding: 1.3rem 1.4rem; border-top: 6px solid var(--accent); }
.hb-group > h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.hb-text { margin: .5rem 0 0; color: var(--ink-2); font-size: .96rem; font-weight: 500; }
.hb-blocks { display: flex; flex-direction: column; gap: 1rem; margin-top: .9rem; }
.hb-group .card { box-shadow: none; border: 1px solid var(--line); }
table.ht { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; color: var(--ink); }
table.ht th { text-align: left; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--sj-yellow); padding: .65rem .75rem; background: var(--navy); }
table.ht thead th:first-child { border-top-left-radius: 12px; }
table.ht thead th:last-child { border-top-right-radius: 12px; }
table.ht td { padding: .62rem .75rem; border-bottom: 1px solid var(--line-2); font-weight: 600; }
table.ht tbody tr:nth-child(even) { background: #fafbfe; }
table.ht th.r, table.ht td.r { text-align: right; white-space: nowrap; }
table.ht tfoot td { font-weight: 900; background: var(--sj-yellow); color: var(--navy-3); border-bottom: 0; }
table.ht td input { width: 100%; min-width: 6rem; padding: .35rem .5rem; border: 1.5px solid var(--accent-mid); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 600; font-size: .85rem; }
table.ht td.r input { text-align: right; }
.pctbar { display: inline-flex; align-items: center; gap: .5rem; justify-content: flex-end; }
.pctbar i { display: inline-block; width: 4.4rem; height: .55rem; border-radius: 99px; background: var(--accent-soft); position: relative; overflow: hidden; }
.pctbar i b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 99px; }
.hb-note { font-size: .76rem; color: var(--ink-3); font-weight: 600; margin-top: .5rem; }
.foot-note { font-size: .78rem; color: var(--on-canvas-2); font-weight: 600; margin-top: 1.2rem; }
.ind { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.4rem; align-items: center; }
.ind .big { font-size: 3.8rem; font-weight: 900; letter-spacing: -.05em; line-height: 1; color: var(--accent-text); }
.ind .calc { display: grid; gap: .5rem; font-size: .9rem; }
.ind .calc div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .8rem; border-radius: 12px; background: var(--surface-2); font-weight: 600; }
.ind .calc b { font-weight: 900; }

/* ---------------------------------------------------------------- modal / tooltip / toast */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(14, 13, 34, .66); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow: auto; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(58rem, 100%); background: var(--surface); color: var(--ink); border-radius: 24px; box-shadow: var(--shadow-2); overflow: hidden; animation: popIn .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-head { padding: 1.3rem 1.5rem 1.2rem; background: var(--accent); color: var(--accent-ink); position: relative; overflow: hidden; }
.modal-head::after { content: ""; position: absolute; right: -2rem; bottom: -3rem; width: 8rem; height: 8rem; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.modal:not([class*="sec-"]) .modal-head { background: var(--navy); color: #fff; }
.modal:not([class*="sec-"]) .modal-head .mh-code { color: var(--sj-yellow); }
.modal-head .mh-code { font-size: .8rem; font-weight: 900; opacity: .95; letter-spacing: .05em; position: relative; z-index: 1; }
.modal-head h2 { font-size: 1.22rem; font-weight: 900; margin-top: .35rem; line-height: 1.35; padding-right: 2.6rem; position: relative; z-index: 1; }
.modal-head .x { position: absolute; right: .9rem; top: .9rem; z-index: 2; border: 0; background: rgba(255, 255, 255, .22); color: inherit; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; }
.modal-head .x svg { width: 1.2rem; height: 1.2rem; }
.modal-body { padding: 1.3rem 1.5rem 1.6rem; }
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .9rem 1.4rem; }
.dl > div small { display: block; font-size: .72rem; font-weight: 900; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.dl > div > span { font-weight: 700; font-size: .96rem; }
.money-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .7rem; margin: 1.1rem 0; }
.money-strip > div { padding: .8rem .95rem; border-radius: 16px; background: var(--surface-2); }
.money-strip > div:nth-child(3) { background: var(--accent); color: var(--accent-ink); }
.money-strip > div:nth-child(3) small { color: inherit; opacity: .85; }
.money-strip small { display: block; font-size: .72rem; font-weight: 900; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.money-strip b { font-size: 1.18rem; font-weight: 900; letter-spacing: -.02em; }
.timeline { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.timeline li { display: flex; gap: .7rem; align-items: center; font-size: .88rem; font-weight: 600; }
.timeline li i { width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); flex: none; }
.orig { margin-top: 1rem; font-size: .8rem; color: var(--ink-3); }
.orig summary { cursor: pointer; font-weight: 800; }
.orig p { margin: .5rem 0 0; font-family: var(--font); font-weight: 600; }
.tooltip {
  position: fixed; z-index: 90; pointer-events: none; max-width: 22rem; padding: .65rem .8rem; border-radius: 14px; background: var(--navy-3); color: #fff;
  font-size: .8rem; font-weight: 600; line-height: 1.4; box-shadow: var(--shadow-2); opacity: 0; transition: opacity .12s; border: 1px solid rgba(255, 229, 0, .5);
}
.tooltip.show { opacity: 1; }
.tooltip b { font-size: .98rem; font-weight: 900; display: block; color: var(--sj-yellow); }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 95; padding: .85rem 1.1rem; border-radius: 16px; background: var(--sj-yellow); color: var(--navy-3); font-weight: 800; font-size: .88rem; box-shadow: var(--shadow-2); animation: popIn .25s ease; }
.help-grid { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; font-size: .92rem; }
.help-grid kbd { display: inline-block; min-width: 2rem; text-align: center; padding: .15rem .45rem; border-radius: 8px; border: 1px solid var(--line); border-bottom-width: 3px; background: var(--surface-2); font-family: var(--font); font-weight: 900; font-size: .8rem; }

/* ---------------------------------------------------------------- pie */
.foot { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--canvas-line); font-size: .78rem; color: var(--on-canvas-2); font-weight: 600; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------------------------------------------------------------- sin animación (capturas / movimiento reducido) */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-actions .lbl { display: none; }
}
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 50; left: 0; top: calc(3.6rem + 5px); width: 18rem; box-shadow: var(--shadow-2); transform: translateX(-105%); transition: transform .2s ease; visibility: visible; }
  body.nav-open .sidebar { transform: none; }
  body.nav-collapsed .shell { grid-template-columns: minmax(0, 1fr); }
  .g2, .content-grid, .ind { grid-template-columns: minmax(0, 1fr); }
  .cover { padding: 2rem 1.3rem 9rem; min-height: 0; }
  .cover-sec { padding: 1.6rem 1.3rem 8.5rem; }
  .main { padding: 1rem 1rem 4rem; }
  .bar-row { grid-template-columns: minmax(6rem, 9rem) minmax(0, 1fr) auto; }
  .seg button { padding: .4rem .55rem; font-size: .72rem; }
}
@media (max-width: 760px) {
  .banner-side { display: none; }
  .banner-card img { max-width: 100%; height: auto; width: 100%; }
}
@media (max-width: 560px) {
  .g4, .g3 { grid-template-columns: minmax(0, 1fr); }
  .brand-txt span { display: none; }
  .seg { display: none; }
  .gantt-row, .gantt-axis { grid-template-columns: 7rem minmax(0, 1fr); }
  .h-sec .h-num { font-size: 2.2rem; }
}

/* ---------------------------------------------------------------- impresión */
@media print {
  .topbar, .sidebar, .tabs, .pager, .edit-bar, .filters .viewswitch, .no-print, .deco { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; color: #1e1d3a; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  .h-sec, .h-sec .h-num { color: #1e1d3a; }
}

/* ---------------------------------------------------------------- sectores (tonos del color de la secretaría: --sh / --sh-ink) */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1rem; }
.sector-card { overflow: hidden; border-top: 0; }
.sector-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .8rem 1.1rem; background: var(--sh); color: var(--sh-ink); font-weight: 900; font-size: 1.05rem; letter-spacing: -.01em; }
.sector-head small { font-size: .85rem; font-weight: 700; opacity: .9; }
.sector-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; padding: 1rem 1.1rem; }
.mini { display: flex; flex-direction: column; gap: .2rem; padding: .6rem .75rem; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.mini small { font-size: .74rem; font-weight: 900; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.mini b { font-size: 1.3rem; font-weight: 900; color: var(--ink); white-space: nowrap; }
.sector-meter { margin: 0 1.1rem 1.1rem; height: .7rem; }
.sector-meter .fill { background: var(--sh); }
.sector-box { overflow: hidden; margin-top: 1.1rem; border-left: 10px solid var(--sh); }
.sector-box > .sector-head { border-radius: 0; }
.sector-box .table-wrap { border-radius: 0; }
.sector-box table.ct thead th { border-radius: 0 !important; }
.sector-box .cards { padding: 1rem; }
.sector-chip { display: inline-block; padding: .12rem .6rem; border-radius: 999px; background: var(--sh); color: var(--sh-ink); font-size: .74rem; font-weight: 900; }
.c-tags { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .35rem; }
.c-tags .code { margin-bottom: 0 !important; }
.sector-sel { width: auto; max-width: 15rem; padding: .25rem .5rem; font-size: .8rem; }
.ccard .sector-chip, .ccard .sector-sel { align-self: flex-start; }
.gantt-group { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin: .7rem 0 .25rem; padding: .35rem .7rem; border-radius: 10px; background: var(--sh); color: var(--sh-ink); font-weight: 900; font-size: .9rem; position: relative; z-index: 1; }
.gantt-group small { font-weight: 700; }
.gantt-bar { background: var(--sh, var(--accent)); }

/* ---------------------------------------------------------------- logros y gestión · lo que viene */
.logros-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1rem; }
.logro { overflow: hidden; display: flex; flex-direction: column; }
.logro-sector { padding: .55rem 1.1rem; background: var(--sh, var(--accent)); color: var(--sh-ink, var(--accent-ink)); font-weight: 900; font-size: .85rem; }
.logro-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .55rem; }
.logro-body h3 { font-size: 1.08rem; }
.logro-body p, .viene p { margin: 0; color: var(--ink-2); font-weight: 500; line-height: 1.55; white-space: pre-line; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .45rem; margin-top: .3rem; }
.galeria .foto { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-3); cursor: pointer; }
.galeria .foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.galeria button.foto:hover img { transform: scale(1.05); }
.foto-x { position: absolute; top: .3rem; right: .3rem; width: 1.8rem; height: 1.8rem; }
.editing-card { padding: 1.1rem; gap: .7rem; }
.campo { display: flex; flex-direction: column; gap: .3rem; }
.campo > span { font-size: .72rem; font-weight: 900; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.logro-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.logro-actions .btn { cursor: pointer; }
.move-btns { display: flex; gap: .35rem; justify-content: flex-end; margin-left: auto; }
.viene-list { display: flex; flex-direction: column; gap: .8rem; }
.viene { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.25rem; }
.viene.editing-card { flex-direction: column; align-items: stretch; }
.viene-num { flex: none; width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 900; }
.viene h3 { font-size: 1.12rem; margin-bottom: .3rem; }
.lightbox { width: min(70rem, 100%); }
.lightbox-img { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto; border-radius: 12px; }
.lightbox-nav { display: flex; justify-content: center; gap: .6rem; margin-top: .9rem; }

/* ---------------------------------------------------------------- acceso y valores manuales */
.login { width: min(26rem, 100%); }
.login-form { display: flex; flex-direction: column; gap: .8rem; }
.login-err { color: #b01a25; font-weight: 800; font-size: .88rem; min-height: 1.2em; }
.kpi.kpi-edit { display: flex; flex-direction: column; gap: .45rem; }
.kpi.kpi-edit label { font-size: .78rem; font-weight: 900; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.mini .ed-input { padding: .35rem .5rem; font-size: .9rem; }
