/* Panel de noticias · Liceo PAC
 * Se carga después de BaseLayout.css: reutiliza sus tokens (--color-*, --radius-*)
 * y sus clases .btn / .btn--primary / .btn--light, y agrega lo propio del panel.
 */

.adm {
  --adm-bg: #f3f6fb;
  --adm-line: #dbe3ee;
  --adm-input: #cdd7e5;
  --adm-soft: #f7f9fd;
  --adm-ok: #1f7a4a;
  --adm-ok-bg: #e6f5ec;
  --adm-warn: #9a5b00;
  --adm-danger: #a6333d;
  --adm-danger-bg: #fcecee;
  --adm-ease: cubic-bezier(.16, 1, .3, 1);
  --adm-shadow: 0 1px 2px rgb(20 42 92 / .06), 0 6px 20px -6px rgb(20 42 92 / .12);
  --adm-bar-h: 60px;

  background: var(--adm-bg);
  color: var(--color-text);
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 1rem;
}

.adm ::selection { background: var(--color-primary-highlight); color: var(--color-surface-dark); }
.adm :focus-visible { outline: 3px solid var(--color-primary-strong); outline-offset: 2px; }
:where(.adm) :where(input, textarea, button, select) { font: inherit; color: inherit; }
.adm textarea { caret-color: var(--color-primary); }

.ico { width: 20px; height: 20px; flex-shrink: 0; }
.ico--sm { width: 16px; height: 16px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

[hidden] { display: none !important; }

/* ---------- Botones (extienden .btn del sitio) ---------- */

.adm .btn { border-radius: 10px; gap: 8px; transition: background .15s var(--adm-ease), transform .15s var(--adm-ease), box-shadow .15s var(--adm-ease), color .15s; white-space: nowrap; }
.adm .btn:active { transform: translateY(1px) scale(.99); }
.adm .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.adm .btn--primary { box-shadow: 0 1px 2px rgb(20 42 92 / .2), 0 6px 16px -6px rgb(36 80 155 / .55); }
.adm .btn--primary:hover { transform: translateY(-1px); }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 1rem; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: .88rem; }
.btn--block { width: 100%; }

.btn--ghost { background: #fff; color: var(--color-surface-dark); box-shadow: inset 0 0 0 1.5px var(--adm-input); }
.btn--ghost:hover { background: var(--adm-soft); color: var(--color-surface-dark); box-shadow: inset 0 0 0 1.5px var(--color-primary-strong); }

.btn--soft { background: var(--color-primary-highlight); color: var(--color-surface-dark); }
.btn--soft:hover { background: #cadcf3; color: var(--color-surface-dark); }

.btn--glass { background: rgb(255 255 255 / .08); color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .32); backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgb(255 255 255 / .16); color: #fff; }

.btn--peligro { background: var(--adm-danger); color: #fff; }
.btn--peligro:hover { background: #8c2731; color: #fff; }

.btn--wa { background: #117a43; color: #fff; }
.btn--wa:hover { background: #0d6638; color: #fff; }
.btn--fb { background: #1464d0; color: #fff; }
.btn--fb:hover { background: #1055b3; color: #fff; }

.btn--cargando { position: relative; }
.btn--cargando::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgb(255 255 255 / .35); border-top-color: #fff;
  animation: girar .7s linear infinite;
}
.btn--cargando .ico { display: none; }
@keyframes girar { to { transform: rotate(360deg); } }

.link-btn {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  color: var(--color-primary); font-weight: 700; font-size: .88rem;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px;
}

.ibtn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border-radius: 10px; border: 0; background: transparent; cursor: pointer;
  color: var(--color-text-muted); transition: background .15s, color .15s;
}
.ibtn:hover { background: var(--color-primary-highlight); color: var(--color-surface-dark); }
.ibtn--wa:hover { background: #e3f4ea; color: #117a43; }
.ibtn--peligro:hover { background: var(--adm-danger-bg); color: var(--adm-danger); }

/* ---------- Barra superior ---------- */

.adm-bar {
  position: sticky; top: 0; z-index: 40;
  background: var(--color-surface-dark); color: #fff;
  padding-top: env(safe-area-inset-top);
  box-shadow: 0 1px 0 rgb(255 255 255 / .06), 0 8px 24px -12px rgb(9 18 40 / .5);
}
.adm-bar__inner {
  max-width: 1120px; margin: 0 auto; height: var(--adm-bar-h);
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.adm-bar__brand, .adm-bar__back {
  display: inline-flex; align-items: center; gap: 10px; color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em;
}
.adm-bar__brand:hover, .adm-bar__back:hover { color: var(--color-text-inverse-soft); }
.adm-bar__brand img { width: 34px; height: 34px; background: #fff; border-radius: 50%; padding: 2px; }
.adm-bar__back { font-family: var(--font-body); font-weight: 700; font-size: .95rem; padding: 8px 10px 8px 4px; margin-left: -4px; border-radius: 8px; }
.adm-bar__nav { display: flex; align-items: center; gap: 4px; }
.adm-bar__nav a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 8px;
  color: var(--color-text-inverse-soft); font-weight: 600; font-size: .9rem;
}
.adm-bar__nav a:hover { background: rgb(255 255 255 / .08); color: #fff; }
.adm-bar__nav .ico { width: 18px; height: 18px; }

@media (max-width: 599px) { .adm-hide-sm { display: none; } }

/* ---------- Alertas ---------- */

.adm-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 16px; border-radius: 12px; margin-bottom: 20px;
  font-size: .93rem; font-weight: 500; line-height: 1.45;
}
.adm-alert .ico { margin-top: 1px; }
.adm-alert--error { background: var(--adm-danger-bg); color: #8a2430; }
.adm-alert--ok { background: var(--adm-ok-bg); color: #175d38; }

/* ---------- Panel principal ---------- */

.adm-main { max-width: 1040px; margin: 0 auto; padding: 28px 20px 96px; }

.dash-hero {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 22px; padding: 40px 40px 32px;
  background: linear-gradient(155deg, #1b3a7a 0%, #142a5c 55%, #0f2149 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgb(20 42 92 / .12), 0 24px 48px -20px rgb(20 42 92 / .55);
}
.dash-hero__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 300px at 92% -10%, rgb(143 184 230 / .42), transparent 70%),
    radial-gradient(420px 260px at -5% 115%, rgb(47 102 179 / .5), transparent 70%);
}
.dash-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .14);
}
.dash-hero__hello {
  font-size: 2.1rem; letter-spacing: -.025em; color: #fff; margin-bottom: 14px;
}
.dash-hero__estado {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; line-height: 1.3;
  letter-spacing: -.01em; color: #fff; max-width: 40rem;
}
.dash-hero__texto { color: var(--color-text-inverse-soft); margin-top: 6px; max-width: 36rem; line-height: 1.55; padding-left: 24px; }
.dash-hero__acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.dash-hero__acciones .btn--light { box-shadow: 0 10px 24px -10px rgb(0 0 0 / .45); }
.dash-hero__cifras {
  display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 26px; padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / .14);
  color: var(--color-text-inverse-muted); font-size: .9rem;
}
.dash-hero__cifras strong { color: #fff; font-variant-numeric: tabular-nums; font-weight: 700; margin-right: 3px; }

.pulso {
  --c: #ff8f80;
  position: relative; width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent);
}
.dash-hero--tibio .pulso { --c: #ffc65c; }
.dash-hero--fresco .pulso { --c: #5fd39a; }
@media (prefers-reduced-motion: no-preference) {
  .pulso::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c);
    animation: latido 2.4s var(--adm-ease) infinite;
  }
}
@keyframes latido { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(3); opacity: 0; } }

.dash-sec { margin-top: 40px; }
.dash-sec__head { margin-bottom: 14px; }
.dash-sec__title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.25rem; color: var(--color-surface-dark); letter-spacing: -.015em;
}
.dash-sec__title .ico { color: var(--color-primary-strong); }
.dash-sec__sub { color: var(--color-text-muted); font-size: .92rem; margin-top: 4px; }
.contador {
  display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px;
  border-radius: 99px; background: var(--color-primary-highlight); color: var(--color-surface-dark);
  font-family: var(--font-body); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums;
}

.ideas, .lista {
  list-style: none; margin: 0; padding: 0;
  background: #fff; border-radius: 16px; box-shadow: var(--adm-shadow); overflow: hidden;
}
.idea, .fila { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.idea + .idea, .fila + .fila { border-top: 1px solid #edf1f7; }
.idea__fecha {
  width: 52px; height: 54px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-content: center; text-align: center; line-height: 1.05;
  background: var(--color-primary-highlight); color: var(--color-surface-dark);
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.idea__fecha b { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.02em; font-weight: 700; }
.idea--proximo .idea__fecha { background: var(--adm-soft); color: var(--color-text-muted); box-shadow: inset 0 0 0 1.5px var(--adm-line); }
.idea__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.idea__titulo { font-weight: 700; color: var(--color-surface-dark); line-height: 1.35; }
.idea__pista { font-size: .86rem; color: var(--color-text-muted); }

.fila { padding: 12px 12px 12px 14px; transition: background .15s; }
.fila:hover { background: var(--adm-soft); }
.fila__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; color: inherit; border-radius: 10px; }
.fila__link:hover { color: inherit; }
.fila__thumb {
  width: 76px; height: 58px; border-radius: 10px; overflow: hidden; flex-shrink: 0;
  background: var(--color-surface-2); color: #9aabc4; display: grid; place-items: center;
}
.fila__thumb img { width: 100%; height: 100%; object-fit: cover; }
.fila__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.fila__titulo {
  font-weight: 700; color: var(--color-surface-dark); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fila__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .84rem; color: var(--color-text-muted); }
.tag {
  color: var(--color-primary-strong); font-weight: 700; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .07em;
}
.fila__acciones { display: flex; gap: 2px; flex-shrink: 0; }
.fila--borrador .fila__thumb { outline: 2px dashed var(--adm-input); outline-offset: -2px; }
.fila__cta .ico { width: 16px; height: 16px; }

.vacio { background: #fff; border-radius: 16px; box-shadow: var(--adm-shadow); padding: 48px 24px; text-align: center; }
.vacio__ico { width: 44px; height: 44px; color: var(--color-primary-strong); margin: 0 auto 14px; }
.vacio__titulo { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--color-surface-dark); }
.vacio__texto { color: var(--color-text-muted); margin: 6px auto 20px; max-width: 30rem; }

.instalar {
  margin-top: 32px; display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: 16px; background: #fff; box-shadow: var(--adm-shadow);
}
.instalar__ico { width: 30px; height: 30px; color: var(--color-primary-strong); }
.instalar > div { flex: 1; }
.instalar__titulo { font-weight: 700; color: var(--color-surface-dark); }
.instalar__texto { font-size: .9rem; color: var(--color-text-muted); }

@media (max-width: 719px) {
  .adm-main { padding: 16px 14px 96px; }
  .dash-hero { padding: 28px 22px 22px; border-radius: 18px; }
  .dash-hero__hello { font-size: 1.7rem; }
  .dash-hero__estado { font-size: 1.12rem; align-items: flex-start; }
  .dash-hero__estado .pulso { margin-top: 7px; }
  .dash-hero__acciones .btn { width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-block: 10px; }
  .idea { flex-wrap: wrap; }
  .idea .btn { margin-left: 68px; }
  .fila { flex-wrap: wrap; padding: 12px; }
  .fila__link { gap: 12px; }
  .fila__thumb { width: 64px; height: 50px; }
  .fila__acciones { width: 100%; justify-content: flex-end; margin-top: -4px; }
  .fila--borrador .fila__cta { display: none; }
}

/* ---------- Diálogo ---------- */

.dlg {
  border: 0; padding: 0; border-radius: 18px; width: min(440px, calc(100vw - 32px));
  box-shadow: 0 30px 60px -20px rgb(9 18 40 / .5);
}
.dlg::backdrop { background: rgb(15 28 60 / .5); backdrop-filter: blur(3px); }
.dlg__box { padding: 26px; }
.dlg__title { font-size: 1.25rem; color: var(--color-surface-dark); margin-bottom: 10px; }
.dlg__text { color: var(--color-text-muted); line-height: 1.55; }
.dlg__text strong { color: var(--color-text); }
.dlg__acciones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) {
  .dlg[open] { animation: dlg-in .22s var(--adm-ease); }
}
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- Editor ---------- */

.adm--editor { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.ed { max-width: 1120px; margin: 0 auto; padding: 24px 20px 32px; }
.ed-head { margin-bottom: 18px; }
.ed-head__title { font-size: 1.75rem; color: var(--color-surface-dark); letter-spacing: -.02em; }
.ed-head__estado { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 6px; min-height: 22px; }
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px;
  background: #eef1f6; color: var(--color-text-muted); font-size: .76rem; font-weight: 700; letter-spacing: .02em;
}
.badge--ok { background: var(--adm-ok-bg); color: var(--adm-ok); }
.autosave { font-size: .84rem; color: var(--color-text-muted); }

.recuperar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px 12px 16px; border-radius: 12px; margin-bottom: 18px;
  background: #fff6e2; color: #6d4500; font-size: .92rem; font-weight: 500;
}
.recuperar p { flex: 1; min-width: 12rem; }

.pasos { margin-bottom: 20px; }
.pasos ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.paso-tab {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 12px; border: 0; background: none; cursor: pointer; text-align: left;
  border-bottom: 3px solid var(--adm-line);
  color: var(--color-text-muted); font-weight: 700; font-size: .95rem;
  transition: border-color .2s var(--adm-ease), color .2s;
}
.paso-tab:hover { color: var(--color-surface-dark); }
.paso-tab__n {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: .85rem; font-variant-numeric: tabular-nums;
  background: #fff; box-shadow: inset 0 0 0 1.5px var(--adm-input); transition: background .2s, color .2s, box-shadow .2s;
}
.paso-tab[aria-current] { color: var(--color-surface-dark); border-bottom-color: var(--color-primary); }
.paso-tab[aria-current] .paso-tab__n { background: var(--color-primary); color: #fff; box-shadow: none; }
.paso-tab.hecho { border-bottom-color: #9fbbe0; }
.paso-tab.hecho .paso-tab__n { background: var(--color-primary-highlight); color: var(--color-primary); box-shadow: none; }

.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.paso {
  background: #fff; border-radius: 18px; box-shadow: var(--adm-shadow);
  padding: 30px 30px 26px;
}
@media (prefers-reduced-motion: no-preference) {
  .paso:not([hidden]) { animation: paso-in .28s var(--adm-ease); }
}
@keyframes paso-in { from { opacity: 0; transform: translateY(8px); } }
.paso__title { font-size: 1.45rem; color: var(--color-surface-dark); letter-spacing: -.02em; outline: none; }
.paso__lead { color: var(--color-text-muted); margin: 6px 0 22px; line-height: 1.5; }
.paso__hint { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .86rem; color: var(--color-text-muted); }
.paso__hint .ico { color: var(--adm-ok); }
.nota {
  display: flex; align-items: flex-start; gap: 10px; margin: -6px 0 18px; padding: 12px 14px;
  border-radius: 12px; background: var(--color-primary-highlight); color: var(--color-surface-dark); font-size: .92rem; line-height: 1.45;
}

/* Zona para soltar fotos */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 40px 20px; border-radius: 16px; cursor: pointer; text-align: center;
  background: var(--adm-soft);
  border: 2px dashed #b8c7dd;
  transition: background .2s var(--adm-ease), border-color .2s, transform .2s var(--adm-ease);
}
.drop:hover, .drop:focus-within { border-color: var(--color-primary-strong); background: #eef4fc; }
.drop:focus-within { outline: 3px solid var(--color-primary-strong); outline-offset: 2px; }
.drop--activa { border-color: var(--color-primary); background: var(--color-primary-highlight); transform: scale(1.01); }
.drop__ico {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 6px;
  background: var(--color-primary); color: #fff;
  box-shadow: 0 10px 20px -8px rgb(36 80 155 / .6);
}
.drop__ico .ico { width: 28px; height: 28px; }
.drop__titulo { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--color-surface-dark); }
.drop__texto { color: var(--color-text-muted); font-size: .92rem; }
.drop--compacta { flex-direction: row; padding: 14px 18px; gap: 14px; justify-content: flex-start; text-align: left; }
.drop--compacta .drop__ico { width: 44px; height: 44px; border-radius: 12px; margin: 0; }
.drop--compacta .drop__ico .ico { width: 22px; height: 22px; }
.drop--compacta .drop__titulo { font-size: 1rem; }
.drop__titulo--mas { display: none; }
.drop--compacta .drop__titulo--mas { display: inline; }
.drop--compacta .drop__titulo--primera { display: none; }
.solo-touch { display: none; }
@media (hover: none) { .solo-touch { display: inline; } .solo-puntero { display: none; } }

/* Grilla de fotos */
.fotos {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.foto {
  position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  background: var(--color-surface-2); cursor: grab;
  box-shadow: 0 1px 2px rgb(20 42 92 / .1);
  transition: transform .2s var(--adm-ease), box-shadow .2s, opacity .2s;
}
.foto__img { width: 100%; height: 100%; object-fit: cover; }
.foto.es-portada { box-shadow: 0 0 0 3px var(--color-primary), 0 8px 18px -8px rgb(36 80 155 / .6); }
.foto.arrastrando { opacity: .4; }
.foto.sobre { transform: scale(.96); box-shadow: 0 0 0 3px var(--color-accent); }
.foto__portada {
  position: absolute; left: 8px; top: 8px; display: none; align-items: center; gap: 5px;
  padding: 4px 9px 4px 7px; border-radius: 99px; background: var(--color-primary); color: #fff;
  font-size: .74rem; font-weight: 700; box-shadow: 0 2px 6px rgb(0 0 0 / .25);
}
.foto.es-portada .foto__portada { display: inline-flex; }
.foto__acciones { position: absolute; right: 6px; top: 6px; display: flex; gap: 6px; }
.foto__btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: rgb(12 22 46 / .62); backdrop-filter: blur(6px);
  transition: background .15s, transform .15s var(--adm-ease);
}
.foto__btn .ico { width: 17px; height: 17px; }
.foto__btn:hover { background: rgb(12 22 46 / .85); transform: scale(1.06); }
.foto.es-portada .foto__estrella { display: none; }
@media (hover: hover) {
  .foto__acciones { opacity: 0; transition: opacity .15s; }
  .foto:hover .foto__acciones, .foto:focus-within .foto__acciones { opacity: 1; }
}
.foto__estado, .foto__error { position: absolute; inset: 0; display: none; }
.foto[data-estado="subiendo"] .foto__estado {
  display: flex; align-items: flex-end; padding: 10px;
  background: linear-gradient(to top, rgb(12 22 46 / .6), rgb(12 22 46 / .15));
}
.foto__barra { width: 100%; height: 6px; border-radius: 99px; background: rgb(255 255 255 / .3); overflow: hidden; }
.foto__barra span {
  display: block; height: 100%; width: 100%; border-radius: inherit; background: #fff;
  transform-origin: left; transform: scaleX(max(.06, var(--progreso, 0)));
  transition: transform .2s linear;
}
.foto[data-estado="subiendo"] .foto__acciones { display: none; }
.foto[data-estado="error"] .foto__error {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; text-align: center; color: #fff; font-size: .78rem; font-weight: 600; line-height: 1.3;
  background: rgb(120 22 34 / .85);
}
.foto__error-txt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.foto__reintentar {
  display: inline-flex; align-items: center; gap: 5px; border: 0; cursor: pointer;
  padding: 5px 10px; border-radius: 99px; background: #fff; color: #7a1f27; font-size: .76rem; font-weight: 700;
}
.foto[data-estado="error"] .foto__acciones { opacity: 1; }
.foto[data-estado="error"] .foto__estrella { display: none; }

/* Campos */
.fld { margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.fld__label { display: block; font-weight: 700; font-size: .93rem; color: var(--color-surface-dark); margin-bottom: 8px; padding: 0; }
.fld__label-fila { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.fld__label-fila .fld__label { margin: 0; }
.opcional { font-weight: 500; color: var(--color-text-muted); font-size: .84rem; margin-left: 4px; }
.fld__input {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--adm-input); border-radius: 12px; background: #fff;
  font-size: 1rem; line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
}
.fld__input::placeholder { color: #7d889c; }
.fld__input:hover { border-color: #b1c0d6; }
.fld__input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgb(47 102 179 / .18); }
.fld__input[aria-invalid="true"] { border-color: var(--adm-danger); box-shadow: 0 0 0 4px rgb(166 51 61 / .12); }
.fld__input--titulo { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.35; resize: none; overflow: hidden; }
.fld__input--cuerpo { min-height: 200px; resize: vertical; line-height: 1.65; }
.fld__input--otra { margin-top: 10px; max-width: 22rem; }
textarea.fld__input { display: block; }
.fld__pie { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; }
.fld__hint { font-size: .84rem; color: var(--color-text-muted); line-height: 1.45; margin-top: 7px; }
.fld__pie .fld__hint { margin: 0; }
.fld__contador { font-size: .8rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fld__contador.largo { color: var(--adm-warn); font-weight: 600; }
.campo-error { color: var(--adm-danger); font-size: .88rem; font-weight: 700; margin-top: 8px; }

.guia { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.guia span {
  padding: 4px 10px; border-radius: 99px; background: var(--color-surface-2);
  color: var(--color-text-muted); font-size: .8rem; font-weight: 600;
}

.redes {
  margin: 0 0 24px; border-radius: 14px;
  background: linear-gradient(135deg, #f2f6fd, #edf2fb);
  box-shadow: inset 0 0 0 1.5px #d4e0f1;
}
.redes summary {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  list-style: none; font-size: .93rem; color: var(--color-surface-dark); line-height: 1.4; border-radius: 14px;
}
.redes summary::-webkit-details-marker { display: none; }
.redes summary .ico { color: var(--color-primary); }
.redes summary strong { font-weight: 700; }
.redes[open] summary { padding-bottom: 8px; }
.redes__body { padding: 4px 16px 16px; }
.redes__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.redes__nota { font-size: .82rem; color: var(--color-text-muted); flex: 1; min-width: 14rem; }

/* Chips de selección */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-r { position: relative; display: inline-flex; }
.chip-r input[type="radio"] { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-r > span, .chip-r--fecha {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px;
  border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--adm-input);
  font-size: .92rem; font-weight: 600; color: var(--color-text); cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.chip-r:hover > span { box-shadow: inset 0 0 0 1.5px var(--color-primary-strong); }
.chip-r input:checked + span { background: var(--color-primary); color: #fff; box-shadow: none; }
.chip-r input:focus-visible + span { outline: 3px solid var(--color-primary-strong); outline-offset: 2px; }
.chip-r--fecha { padding: 0 6px 0 14px; color: var(--color-text-muted); }
.chip-r--fecha.activa { box-shadow: inset 0 0 0 2px var(--color-primary); color: var(--color-primary); }
.fecha-input { border: 0; background: none; min-height: 40px; padding: 0 8px 0 0; font-weight: 600; color: var(--color-text); }
.fecha-input:focus { outline: none; }
.chip-r--fecha:focus-within { outline: 3px solid var(--color-primary-strong); outline-offset: 2px; }

.resumen-auto {
  padding: 14px 16px; border-radius: 12px; background: var(--adm-soft);
  box-shadow: inset 0 0 0 1.5px var(--adm-line);
  color: var(--color-text-muted); line-height: 1.55; font-size: .95rem;
}

/* Vista previa */
.ed-preview { position: sticky; top: calc(var(--adm-bar-h) + 20px); }
.ed-preview__label { font-weight: 700; font-size: .88rem; color: var(--color-text-muted); margin-bottom: 10px; }
.pv-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgb(20 42 92 / .08), 0 18px 36px -18px rgb(20 42 92 / .35);
}
.pv-card__media { position: relative; aspect-ratio: 4 / 2.5; background: var(--color-surface-2); }
.pv-card__media img { width: 100%; height: 100%; object-fit: cover; }
.pv-card__vacia {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: #8193ad; font-size: .85rem; font-weight: 600;
}
.pv-card__vacia .ico { width: 30px; height: 30px; }
.pv-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.pv-card__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .74rem; }
.pv-card__cat { color: var(--color-primary-strong); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.pv-card__fecha { color: var(--color-text-muted); font-weight: 500; }
.pv-card__title { font-size: 1.08rem; color: var(--color-surface-dark); line-height: 1.3; overflow-wrap: anywhere; }
.pv-card__resumen { font-size: .87rem; color: var(--color-text-muted); line-height: 1.5; overflow-wrap: anywhere; }
.pv-card .es-vacio { color: #8f9bb0; }

.listo { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.listo li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--color-text-muted); }
.listo__ico {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--adm-input); color: transparent;
  transition: background .2s var(--adm-ease), color .2s, box-shadow .2s;
}
.listo__ico .ico { width: 13px; height: 13px; stroke-width: 3; }
.listo li.ok { color: var(--color-text); }
.listo li.ok .listo__ico { background: var(--adm-ok); color: #fff; box-shadow: none; }

/* Barra de acciones fija */
.ed-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgb(255 255 255 / .94); backdrop-filter: blur(12px);
  box-shadow: 0 -1px 0 var(--adm-line), 0 -10px 30px -18px rgb(20 42 92 / .35);
  padding-bottom: env(safe-area-inset-bottom);
}
.ed-bar__inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 10px;
}
.ed-bar__borrador { margin-right: auto; }
.ed-bar__principal { min-width: 13rem; }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translateX(-50%); width: max-content; max-width: calc(100vw - 28px);
  display: flex; align-items: center; gap: 14px; padding: 13px 16px 13px 18px; border-radius: 14px;
  background: var(--color-surface-dark); color: #fff; font-size: .93rem; font-weight: 500; line-height: 1.4;
  box-shadow: 0 16px 36px -12px rgb(9 18 40 / .55);
}
.toast--error { background: #7d1f2a; }
.toast--ok { background: #155a36; }
.toast__accion {
  border: 0; background: rgb(255 255 255 / .14); color: #fff; cursor: pointer; white-space: nowrap;
  padding: 7px 12px; border-radius: 8px; font-weight: 700; font-size: .86rem;
}
.toast__accion:hover { background: rgb(255 255 255 / .24); }
@media (prefers-reduced-motion: no-preference) {
  .toast:not([hidden]) { animation: toast-in .3s var(--adm-ease); }
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

@media (max-width: 1023px) {
  .ed-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ed-preview { position: static; display: none; }
  .ed[data-paso="3"] .ed-preview { display: block; max-width: 420px; }
}
@media (max-width: 719px) {
  .ed { padding: 16px 12px 24px; }
  .ed-head__title { font-size: 1.45rem; }
  .paso { padding: 22px 16px 20px; border-radius: 16px; }
  .paso__title { font-size: 1.3rem; }
  .paso-tab { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 6px 4px 10px; font-size: .84rem; }
  .fotos { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .drop { padding: 30px 16px; }
  .drop--compacta .drop__texto { display: none; }
  .ed-bar__inner { padding: 10px 12px; gap: 8px; }
  .ed-bar__inner .btn { padding: 0 14px; }
  .ed-bar__borrador span { display: none; }
  .ed-bar__borrador { margin-right: 0; }
  .ed-bar__principal { flex: 1; min-width: 0; }
  [data-atras] span { display: none; }
  .redes summary { font-size: .9rem; }
}

/* ---------- Ingreso ---------- */

.adm--login { background: #fff; }
.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login__intro {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end;
  padding: 56px; color: #fff;
  background: #142a5c url("login-liceo.jpg") center / cover no-repeat;
}
.login__intro::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgb(12 26 60 / .96) 0%, rgb(12 26 60 / .7) 40%, rgb(12 26 60 / .2) 75%),
    radial-gradient(600px 300px at 0% 100%, rgb(36 80 155 / .55), transparent 70%);
}
.login__intro-inner { max-width: 30rem; }
.login__intro-inner img { width: 64px; height: 64px; background: #fff; border-radius: 50%; padding: 4px; margin-bottom: 22px; box-shadow: 0 8px 24px rgb(0 0 0 / .3); }
.login__quote { font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; }
.login__quote-sub { color: var(--color-text-inverse-soft); margin-top: 14px; font-size: 1.05rem; line-height: 1.55; }

.login__panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 24px; background: var(--adm-bg); }
.login__card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 34px 30px 28px; box-shadow: var(--adm-shadow); }
.login__logo { display: none; width: 52px; height: 52px; margin-bottom: 14px; }
.login__title { font-size: 1.6rem; color: var(--color-surface-dark); letter-spacing: -.02em; }
.login__lead { color: var(--color-text-muted); margin: 6px 0 24px; }
.login__form .fld { margin-bottom: 18px; }
.login__help { margin-top: 20px; font-size: .86rem; color: var(--color-text-muted); line-height: 1.5; text-align: center; }
.login__site { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; }
.login__site .ico { width: 16px; height: 16px; }

.fld__pass { position: relative; }
.fld__pass .fld__input { padding-right: 52px; }
.fld__peek {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border: 0; border-radius: 10px; background: none; cursor: pointer;
  color: var(--color-text-muted); display: grid; place-items: center;
}
.fld__peek:hover { background: var(--adm-soft); color: var(--color-surface-dark); }
.fld__peek[aria-pressed="true"] { color: var(--color-primary); }

.check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 22px; font-size: .9rem; color: var(--color-text-muted); cursor: pointer; line-height: 1.4; position: relative; }
.check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.check__box {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--adm-input); color: transparent; background: #fff;
  transition: background .15s, box-shadow .15s;
}
.check__box .ico { width: 14px; height: 14px; stroke-width: 3; }
.check input:checked + .check__box { background: var(--color-primary); box-shadow: none; color: #fff; }
.check input:focus-visible + .check__box { outline: 3px solid var(--color-primary-strong); outline-offset: 2px; }

@media (max-width: 899px) {
  .login { grid-template-columns: 1fr; }
  .login__intro { display: none; }
  .login__panel {
    background:
      radial-gradient(500px 280px at 100% 0%, rgb(143 184 230 / .35), transparent 70%),
      var(--adm-bg);
  }
  .login__logo { display: block; }
  .login__card { padding: 28px 22px 24px; }
}

/* ---------- Publicada ---------- */

.adm--exito { background: var(--adm-bg); overflow-x: hidden; }
.exito {
  position: relative; isolation: isolate; max-width: 620px; margin: 0 auto;
  padding: 48px 20px 80px; text-align: center;
}
.exito__luz {
  position: absolute; z-index: -1; left: 50%; top: -40px; width: min(720px, 100vw); height: 420px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(143 184 230 / .55), rgb(143 184 230 / 0));
  pointer-events: none;
}
.exito__sello { width: 84px; height: 84px; margin: 0 auto 22px; }
.exito__sello svg { width: 100%; height: 100%; overflow: visible; }
.exito__sello circle { fill: var(--adm-ok); stroke: none; filter: drop-shadow(0 10px 18px rgb(31 122 74 / .4)); }
.exito__sello path { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; }
.exito__titulo { font-size: 2rem; letter-spacing: -.025em; color: var(--color-surface-dark); }
.exito__texto { color: var(--color-text-muted); font-size: 1.05rem; line-height: 1.55; margin: 10px auto 28px; max-width: 30rem; }

.exito__card {
  display: flex; text-align: left; background: #fff; border-radius: 16px; overflow: hidden; color: inherit;
  box-shadow: 0 1px 2px rgb(20 42 92 / .08), 0 22px 44px -20px rgb(20 42 92 / .4);
  transition: transform .2s var(--adm-ease), box-shadow .2s;
}
.exito__card:hover { color: inherit; transform: translateY(-2px); box-shadow: 0 1px 2px rgb(20 42 92 / .08), 0 28px 50px -20px rgb(20 42 92 / .45); }
.exito__media { width: 42%; flex-shrink: 0; background: var(--color-surface-2); min-height: 150px; }
.exito__media img { width: 100%; height: 100%; object-fit: cover; }
.exito__body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.exito__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .76rem; color: var(--color-text-muted); }
.exito__cat { color: var(--color-primary-strong); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.exito__nombre { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.3; color: var(--color-surface-dark); }
.exito__resumen { font-size: .88rem; color: var(--color-text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.exito__ver { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; color: var(--color-primary); font-weight: 700; font-size: .9rem; }

.compartir { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.exito__tip { margin-top: 14px; font-size: .88rem; color: var(--color-text-muted); }
.exito__siguiente { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--adm-line); }

/* El momento de la publicación: sello, check y tarjeta, en ese orden. */
@media (prefers-reduced-motion: no-preference) {
  .exito__luz { animation: luz 1.2s var(--adm-ease) both; }
  .exito__sello circle { transform-origin: center; animation: sello .5s var(--adm-ease) both; }
  .exito__sello path { animation: trazo .45s .28s var(--adm-ease) both; }
  .exito__titulo, .exito__texto { animation: subir .5s .35s var(--adm-ease) both; }
  .exito__card { animation: tarjeta .7s .5s var(--adm-ease) both; }
  .compartir, .exito__tip, .exito__siguiente { animation: subir .5s .75s var(--adm-ease) both; }
}
@keyframes luz { from { opacity: 0; transform: translateX(-50%) scale(.6); } }
@keyframes sello { from { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } }
@keyframes trazo { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes subir { from { opacity: 0; transform: translateY(10px); } }
@keyframes tarjeta { from { opacity: 0; transform: translateY(24px) scale(.97); filter: blur(6px); } }

@media (max-width: 599px) {
  .exito { padding-top: 32px; }
  .exito__titulo { font-size: 1.6rem; }
  .exito__card { flex-direction: column; }
  .exito__media { width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
  .compartir .btn { flex: 1 1 calc(50% - 10px); }
}
