/* Plan Único 2027 · IPUC El Porvenir — LLENOS del Espíritu Santo */
:root {
  --azul-900: #0b1d33; --azul-800: #0f2744; --azul-700: #17365d; --azul-500: #2d5b8f; --azul-100: #e6eef8;
  --oro: #e8b44c; --oro-600: #c9922a; --oro-100: #fdf3dc;
  --tinta: #1c2533; --tenue: #5d6b7e; --borde: #dbe3ee; --fondo: #f6f8fb; --blanco: #fff;
  --ok: #1f8a5b; --ok-100: #e3f5ec; --pend: #b7791f; --pend-100: #fff4dc; --mal: #c0392b; --mal-100: #fdeceb;
  --festivo: #d9534f; --festivo-100: #fdecec; --inst: #6b46c1; --inst-100: #efe9fb;
  --radio: 16px; --sombra: 0 10px 30px -12px rgba(15, 39, 68, .25); --sombra-s: 0 2px 8px rgba(15, 39, 68, .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 var(--sans); color: var(--tinta); background: var(--fondo); -webkit-font-smoothing: antialiased; }
a { color: var(--azul-500); }
h1, h2, h3 { font-family: var(--serif); color: var(--azul-800); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); } h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); } h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.tenue { color: var(--tenue); }
.saltar { position: absolute; left: -999px; } .saltar:focus { left: 1rem; top: 1rem; z-index: 99; background: #fff; padding: .5rem 1rem; }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }

/* ---------- barra ---------- */
.barra { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: .7rem clamp(1rem, 3vw, 2.5rem);
  background: rgba(11, 29, 51, .92); backdrop-filter: blur(12px); color: #fff; box-shadow: 0 4px 20px rgba(0, 0, 0, .15); }
.marca { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; margin-right: auto; }
.marca strong { display: block; font-family: var(--serif); font-size: 1.15rem; letter-spacing: .02em; }
.marca small { display: block; color: #b9c7da; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.llama { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(160deg, var(--oro), #f3d38b); position: relative; flex: none; box-shadow: 0 0 18px rgba(232, 180, 76, .5); }
.llama::after { content: ""; position: absolute; inset: 7px 10px 6px; background: var(--azul-800); clip-path: path("M7 0C10 6 14 8 14 13a7 7 0 0 1-14 0C0 8 4 6 7 0z"); }
.nav { display: flex; gap: .25rem; }
.nav a { color: #d6e0ee; text-decoration: none; padding: .5rem .8rem; border-radius: 999px; font-weight: 500; font-size: .95rem; transition: .2s; }
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.activo { background: var(--oro); color: var(--azul-900); }
.contador { background: var(--mal); color: #fff; border-radius: 999px; font-size: .72rem; padding: .05rem .45rem; margin-left: .2rem; }
.quien { font-size: .82rem; color: #b9c7da; text-align: right; line-height: 1.25; }
.quien b { color: #fff; display: block; font-weight: 600; }
.menu-btn { display: none; background: none; border: 1px solid rgba(255, 255, 255, .3); color: #fff; font-size: 1.3rem; border-radius: 10px; padding: .2rem .6rem; }
@media (max-width: 980px) {
  .menu-btn { display: block; order: 2; }
  .quien { display: none; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--azul-900); padding: .5rem 1rem 1rem; }
  .nav.abierto { display: flex; }
}

main { min-height: 70vh; outline: none; }
.envoltura { max-width: 1240px; margin: 0 auto; padding: clamp(1.2rem, 3vw, 2.5rem); }
.cargando { display: grid; place-items: center; gap: 1rem; padding: 6rem 1rem; color: var(--tenue); }
.cargando span { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--azul-100); border-top-color: var(--oro); animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- portada ---------- */
.heroe { position: relative; overflow: hidden; color: #fff; background:
  radial-gradient(1200px 500px at 85% -10%, rgba(232, 180, 76, .35), transparent 60%),
  radial-gradient(800px 400px at -10% 110%, rgba(45, 91, 143, .7), transparent 60%),
  linear-gradient(160deg, var(--azul-900), var(--azul-700)); }
.heroe .envoltura { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(3rem, 8vw, 6rem); display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .heroe .envoltura { grid-template-columns: 1fr; } }
.heroe h1 { color: #fff; font-size: clamp(2.8rem, 7vw, 5.4rem); letter-spacing: .01em; margin-bottom: .2em; }
.heroe h1 em { font-style: normal; background: linear-gradient(90deg, var(--oro), #ffe3a3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.heroe .versiculo { font-family: var(--serif); font-size: 1.2rem; color: #dbe6f4; max-width: 34ch; border-left: 3px solid var(--oro); padding-left: 1rem; }
.etiqueta { display: inline-block; text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; color: var(--oro); font-weight: 700; margin-bottom: 1rem; }
.heroe .acciones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.tarjeta-cuenta { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); border-radius: 22px; padding: 1.6rem; backdrop-filter: blur(6px); }
.tarjeta-cuenta .cifra { font-family: var(--serif); font-size: 3.2rem; color: var(--oro); line-height: 1; }
.barra-prog { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; margin: .4rem 0 1rem; }
.barra-prog > i { display: block; height: 100%; background: linear-gradient(90deg, var(--oro), #ffe3a3); border-radius: inherit; transition: width .8s ease; }
.claro .barra-prog { background: var(--azul-100); }
.mini-datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1rem; }
.mini-datos div { background: rgba(255, 255, 255, .06); border-radius: 12px; padding: .7rem; text-align: center; }
.mini-datos b { display: block; font-size: 1.5rem; color: #fff; }
.mini-datos span { font-size: .75rem; color: #b9c7da; }

.seccion { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.seccion.blanca { background: #fff; }
.rejilla { display: grid; gap: 1.2rem; }
.rejilla.dos { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.rejilla.tres { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.4rem; box-shadow: var(--sombra-s); }
.tarjeta.realce { border-top: 4px solid var(--oro); }
.paso { display: flex; gap: 1rem; } .paso .num { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--azul-800); color: var(--oro); display: grid; place-items: center; font-weight: 700; }
.carta { font-family: var(--serif); font-size: 1.12rem; line-height: 1.75; max-width: 72ch; }
.carta p:first-letter { }
.firma { font-family: var(--serif); font-style: italic; color: var(--azul-700); }
.pilares { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.pilar { padding: 1.2rem; border-radius: 14px; background: linear-gradient(180deg, var(--azul-100), #fff); border: 1px solid var(--borde); }
.pilar b { display: block; color: var(--azul-800); font-family: var(--serif); font-size: 1.1rem; }
.cita { font-size: .82rem; color: var(--oro-600); font-weight: 600; }
.reparto { display: flex; height: 54px; border-radius: 14px; overflow: hidden; font-weight: 700; color: #fff; margin: 1rem 0; }
.reparto div { display: grid; place-items: center; padding: 0 .6rem; text-align: center; font-size: .9rem; line-height: 1.15; }
.reparto .r70 { flex: 7; background: var(--azul-700); } .reparto .r30 { flex: 3; background: var(--oro-600); }

/* ---------- botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; gap: .45rem; border: 0; border-radius: 999px; padding: .7rem 1.25rem; font: 600 .95rem var(--sans);
  cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; background: var(--azul-700); color: #fff; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--sombra-s); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.oro { background: var(--oro); color: var(--azul-900); }
.btn.claro { background: #fff; color: var(--azul-800); border: 1px solid var(--borde); }
.btn.fantasma { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.btn.ok { background: var(--ok); } .btn.mal { background: var(--mal); }
.btn.chico { padding: .4rem .85rem; font-size: .85rem; }
.btn.grande { padding: 1rem 1.6rem; font-size: 1.05rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .35rem; color: var(--azul-800); }
.ayuda { font-weight: 400; color: var(--tenue); font-size: .82rem; display: block; margin-top: .15rem; }
input, select, textarea { width: 100%; font: inherit; padding: .7rem .85rem; border: 1px solid var(--borde); border-radius: 12px; background: #fff; color: var(--tinta); transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul-500); box-shadow: 0 0 0 4px rgba(45, 91, 143, .15); }
textarea { min-height: 96px; resize: vertical; }
.campo { margin-bottom: 1rem; }
.fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-op { position: relative; } .chip-op input { position: absolute; opacity: 0; }
.chip-op span { display: inline-block; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--borde); background: #fff; cursor: pointer; font-size: .88rem; font-weight: 500; }
.chip-op input:checked + span { background: var(--azul-700); color: #fff; border-color: var(--azul-700); }
.chip-op input:focus-visible + span { outline: 3px solid var(--oro); }

/* ---------- etiquetas de estado ---------- */
.estado { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; white-space: nowrap; }
.estado::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.e-APROBADA, .e-APROBADO { background: var(--ok-100); color: var(--ok); }
.e-PROPUESTA, .e-ENVIADO, .e-BORRADOR, .e-SOLO_ADJUNTO { background: var(--pend-100); color: var(--pend); }
.e-RECHAZADA, .e-DEVUELTO, .e-SIN_INICIAR { background: var(--mal-100); color: var(--mal); }
.e-NO_APLICA { background: #eef1f5; color: var(--tenue); }
.aviso { border-radius: 12px; padding: .7rem .9rem; font-size: .9rem; margin: .5rem 0; display: flex; gap: .55rem; align-items: flex-start; }
.aviso::before { font-weight: 800; }
.aviso.festivo { background: var(--festivo-100); color: #8f2d2a; } .aviso.festivo::before { content: "⚑"; }
.aviso.inst { background: var(--inst-100); color: #4c2f94; } .aviso.inst::before { content: "🔒"; }
.aviso.conflicto { background: var(--pend-100); color: #7a5113; } .aviso.conflicto::before { content: "⚠"; }
.aviso.info { background: var(--azul-100); color: var(--azul-800); } .aviso.info::before { content: "ℹ"; }
.aviso.bien { background: var(--ok-100); color: #155f3f; } .aviso.bien::before { content: "✓"; }

/* ---------- calendario ---------- */
.cal-cabecera { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; margin-bottom: 1.2rem; }
.cal-cabecera h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cal-cabecera .crecer { flex: 1; }
.segmentado { display: inline-flex; background: #fff; border: 1px solid var(--borde); border-radius: 999px; padding: .2rem; }
.segmentado button { border: 0; background: none; padding: .45rem 1rem; border-radius: 999px; font: 600 .88rem var(--sans); color: var(--tenue); cursor: pointer; }
.segmentado button.activo { background: var(--azul-700); color: #fff; }
.leyenda { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--tenue); margin: .2rem 0 1rem; }
.leyenda i { display: inline-block; width: .8rem; height: .8rem; border-radius: 4px; margin-right: .35rem; vertical-align: -1px; }
.mes-grande { background: #fff; border: 1px solid var(--borde); border-radius: 20px; overflow: hidden; box-shadow: var(--sombra-s); }
.mes-grande .semana, .mes-grande .dias { display: grid; grid-template-columns: repeat(7, 1fr); }
.mes-grande .semana div { padding: .7rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--tenue); background: #fafbfd; border-bottom: 1px solid var(--borde); text-align: center; }
.dia { min-height: 118px; border: 0; border-right: 1px solid var(--borde); border-bottom: 1px solid var(--borde); padding: .45rem; cursor: pointer; position: relative; transition: background .15s; background: #fff; text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; gap: .25rem; }
.dia:nth-child(7n) { border-right: 0; }
.dia:hover { background: #f7faff; }
.dia.fuera { background: #fafbfc; color: #b9c2cf; cursor: default; }
.dia .n { font-weight: 700; font-size: .9rem; display: flex; justify-content: space-between; align-items: center; }
.dia.hoy .n b { background: var(--oro); color: var(--azul-900); border-radius: 999px; padding: 0 .45rem; }
.dia.festivo { background: linear-gradient(180deg, var(--festivo-100), #fff 60%); }
.dia.inst { background: repeating-linear-gradient(-45deg, var(--inst-100), var(--inst-100) 8px, #fff 8px, #fff 16px); }
.dia.libre-culto { box-shadow: inset 0 0 0 2px rgba(232, 180, 76, .55); }
.dia .marca-esp { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.dia.festivo .marca-esp { color: var(--festivo); } .dia.inst .marca-esp { color: var(--inst); }
.ev { font-size: .74rem; line-height: 1.25; padding: .2rem .4rem; border-radius: 6px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.PROPUESTA { background: #fff !important; border: 1.5px dashed currentColor; }
.ev.mas { background: none; color: var(--tenue); padding: 0 .2rem; }
.dia .conf { position: absolute; top: .4rem; right: .4rem; color: var(--pend); font-weight: 800; }
@media (max-width: 760px) {
  .dia { min-height: 64px; padding: .3rem; } .dia .marca-esp { display: none; } .ev { font-size: 0; height: 6px; padding: 0; border-width: 1px; } .ev.mas { display: none; }
  .mes-grande .semana div { font-size: .62rem; padding: .4rem 0; letter-spacing: 0; }
}
.anio { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.mini-mes { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 1rem; }
.mini-mes h3 { font-size: 1rem; display: flex; justify-content: space-between; align-items: baseline; cursor: pointer; }
.mini-mes h3 small { font-family: var(--sans); font-size: .72rem; color: var(--tenue); }
.mini-mes .dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.md { aspect-ratio: 1; border-radius: 7px; padding: 0; font-size: .72rem; display: grid; place-items: center; cursor: pointer; border: 0; background: #f1f4f8; color: var(--tinta); position: relative; font-family: var(--sans); }
.md.vacio { background: none; cursor: default; }
.md.aprob { background: var(--azul-700); color: #fff; }
.md.pend { background: var(--pend-100); color: var(--pend); box-shadow: inset 0 0 0 1.5px var(--pend); }
.md.festivo { box-shadow: inset 0 0 0 2px var(--festivo); }
.md.inst { background: var(--inst); color: #fff; }
.md.libre-culto { background: #fff; box-shadow: inset 0 0 0 1.5px var(--oro); }
.md.conf::after { content: ""; position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--mal); }

/* ---------- panel lateral ---------- */
.panel-lateral { position: fixed; inset: 0; z-index: 50; }
.panel-fondo { position: absolute; inset: 0; background: rgba(11, 29, 51, .45); animation: aparece .2s; }
.panel-cuerpo { position: absolute; right: 0; top: 0; bottom: 0; width: min(560px, 100%); background: var(--fondo); overflow-y: auto; padding: 1.6rem; box-shadow: -20px 0 50px rgba(0, 0, 0, .2); animation: entra .25s ease; }
.cerrar { position: absolute; top: .8rem; right: .8rem; border: 0; background: #fff; width: 2.4rem; height: 2.4rem; border-radius: 50%; font-size: 1.4rem; cursor: pointer; box-shadow: var(--sombra-s); }
@keyframes entra { from { transform: translateX(40px); opacity: 0; } }
@keyframes aparece { from { opacity: 0; } }
.item-act { background: #fff; border: 1px solid var(--borde); border-left: 5px solid var(--color, var(--azul-700)); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .6rem; }
.item-act h4 { margin: 0 0 .2rem; font-size: 1rem; }
.item-act .meta { font-size: .82rem; color: var(--tenue); }
.botonera { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }

/* ---------- ministerio / tablas ---------- */
.cabecera-pag { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.medidor { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 1rem 1.2rem; }
.medidor .reparto { height: 34px; font-size: .85rem; margin: .6rem 0; }
.lista-est { display: grid; gap: .7rem; }
.est { background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 1rem 1.1rem; display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; }
.est h4 { margin: 0; font-size: 1.02rem; color: var(--azul-800); }
.est p { margin: .2rem 0 0; color: var(--tenue); font-size: .9rem; white-space: pre-line; }
.pill { font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--azul-100); color: var(--azul-700); }
.pill.LLENOS { background: var(--oro-100); color: #8a5c12; } .pill.TRIBUS { background: #e7f3ef; color: #1f6d52; }
table.tabla { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--sombra-s); font-size: .92rem; }
.tabla th { text-align: left; background: var(--azul-800); color: #fff; padding: .7rem .9rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.tabla td { padding: .65rem .9rem; border-bottom: 1px solid var(--borde); vertical-align: top; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla-env { overflow-x: auto; }
.tarjeta-min { display: flex; flex-direction: column; gap: .6rem; }
.tarjeta-min h3 { margin: 0; }
.tarjeta-min .datos { display: flex; gap: 1rem; font-size: .82rem; color: var(--tenue); }
.vacio-estado { text-align: center; padding: 3rem 1rem; color: var(--tenue); }
.vacio-estado b { display: block; font-family: var(--serif); font-size: 1.4rem; color: var(--azul-800); margin-bottom: .4rem; }
.checklist li { margin: .4rem 0; }
.checklist .ok { color: var(--ok); } .checklist .no { color: var(--mal); }
.pestanas { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.avisos { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: .5rem; width: min(520px, calc(100% - 2rem)); }
.toast { background: var(--azul-900); color: #fff; padding: .85rem 1.1rem; border-radius: 14px; box-shadow: var(--sombra); animation: entra .2s; white-space: pre-line; }
.toast.error { background: var(--mal); } .toast.bien { background: var(--ok); }
.pie { text-align: center; padding: 2.5rem 1rem; background: var(--azul-900); color: #c9d6e7; font-family: var(--serif); }
.pie .tenue { color: #8ea3bd; font-family: var(--sans); font-size: .82rem; }
.oculto { display: none !important; }
@media print { .barra, .pie, .botonera, .btn { display: none !important; } }
