/* admin-contenido — rediseño 2026 (rama rediseno). Estilos propios; los componentes base están en css/sistema.css. */
/* ═══════════════════════════════════════════════════
   ADMINISTRACIÓN › CONTENIDO (js/contenido.js) — prefijo adm-
   Solo owner. Sale del prototipo v2 aprobado (prototipo/v2/modulos/
   administracion.js, 28/09/2026). La vista previa del banner y el visor de
   PDF usan las clases ini- de css/inicio.css.
   ═══════════════════════════════════════════════════ */

.adm { display: flex; flex-direction: column; gap: var(--bp-e-8); }
.adm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.adm-trunca { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-min0 { min-width: 0; }
.adm-nowrap { white-space: nowrap; }
.adm-ico { width: 16px; height: 16px; flex: none; }
.adm-mt3 { margin-top: var(--bp-e-3); }
.adm-mt4 { margin-top: var(--bp-e-4); }
.adm-h3 { font: var(--bp-t-h3); margin-top: var(--bp-e-1); }
.adm-vacio-t { color: var(--bp-texto); }
/* bp-campo, bp-campo__error y adm-form son flex: sin esto, el atributo hidden no oculta. */
.adm [hidden], .adm-form [hidden], .adm-form[hidden], .adm-fieldset[hidden], .adm-archivo [hidden] { display: none !important; }
.adm-esq { height: 48px; }
.adm-esq--alta { height: 280px; margin-top: var(--bp-e-4); }

.adm-bloque { display: flex; flex-direction: column; gap: var(--bp-e-4); scroll-margin-top: var(--bp-e-6); }
.adm-bloque__cab { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--bp-e-3) var(--bp-e-4); flex-wrap: wrap; }
.adm-bloque__cab > div:first-child { max-width: 72ch; }
.adm-bloque__cab .bp-chico { margin-top: var(--bp-e-1); color: var(--bp-texto-2); }
.adm-acciones { display: flex; gap: var(--bp-e-2); flex-wrap: wrap; align-items: center; }
.adm-acciones--fila { justify-content: flex-end; flex-wrap: nowrap; }
.adm-herr { display: flex; align-items: center; justify-content: space-between; gap: var(--bp-e-3); flex-wrap: wrap; }
.adm-filtros { display: flex; align-items: center; gap: var(--bp-e-2); flex-wrap: wrap; }
.adm-card-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--bp-e-3); margin-bottom: var(--bp-e-4); flex-wrap: wrap; }
.adm-card-cab--tabla { padding: var(--bp-e-5) var(--bp-e-5) 0; }
.adm-nota { font: var(--bp-t-chico); color: var(--bp-texto-3); margin-top: var(--bp-e-1); max-width: 72ch; }
.adm .bp-tabla-scroll { position: relative; }
.adm-card-tabla { padding: 0; overflow: hidden; scroll-margin-top: var(--bp-e-6); }
.adm-card-tabla .adm-card-cab { padding: var(--bp-e-5) var(--bp-e-5) 0; }
.adm-vacio-fila td { text-align: center; color: var(--bp-texto-3); padding: var(--bp-e-8) var(--bp-e-4); }
.adm-borde-arriba { border-top: 1px solid var(--bp-linea); }

/* Formularios en panel lateral */
.adm-form { display: flex; flex-direction: column; gap: var(--bp-e-4); }
.adm-fila2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bp-e-3); }
@media (max-width: 560px) { .adm-fila2 { grid-template-columns: minmax(0, 1fr); } }
.adm-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--bp-e-2); }
.adm-fieldset legend { padding: 0; margin-bottom: var(--bp-e-2); }
.adm-seg { align-self: flex-start; }
.adm-pie { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--bp-e-2); width: 100%; }
.adm-pie__izq { margin-right: auto; }

/* Novedades */
.adm-nov { display: flex; align-items: center; gap: var(--bp-e-3); min-width: 240px; }
.adm-mini { display: block; width: 72px; height: 44px; flex: none; border-radius: var(--bp-radio-sm); object-fit: cover; object-position: 50% 22%; background: var(--bp-n-950); }
.adm-mini--imagen { object-fit: contain; }
.adm-mover { display: inline-flex; align-items: center; gap: var(--bp-e-1); }
.adm-mover .bp-num { min-width: 18px; text-align: center; font-weight: 600; }
.adm-prev { display: flex; flex-direction: column; gap: var(--bp-e-2); padding-bottom: var(--bp-e-4); border-bottom: 1px solid var(--bp-linea); background: var(--bp-superficie); }
@media (min-width: 900px) and (min-height: 860px) { .adm-prev { position: sticky; top: calc(-1 * var(--bp-e-5)); z-index: 2; padding-top: var(--bp-e-5); margin-top: calc(-1 * var(--bp-e-5)); } }
.adm-prev__cab { display: flex; align-items: center; justify-content: space-between; gap: var(--bp-e-3); flex-wrap: wrap; }
.adm-prev__marco { position: relative; overflow: hidden; border-radius: var(--bp-radio-md); border: 1px solid var(--bp-linea); }
.adm-prev__escala { transform-origin: top left; }
.adm-prev__marco.is-movil { background: var(--bp-n-800); }
.adm-fotos { max-height: 288px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: var(--bp-e-2); padding: 3px; }
.adm-foto { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: var(--bp-radio-sm); overflow: hidden; cursor: pointer; background: var(--bp-superficie-2); }
.adm-foto img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.adm-foto input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
.adm-foto:has(input:checked) { outline: 3px solid var(--bp-rojo); outline-offset: -3px; }
.adm-foto:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--bp-foco); }
.adm-foto__ok { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--bp-rojo); color: var(--bp-blanco); display: none; place-items: center; }
.adm-foto__ok svg { width: 12px; height: 12px; }
.adm-foto:has(input:checked) .adm-foto__ok { display: grid; }
.adm-archivo { display: flex; align-items: center; gap: var(--bp-e-3); flex-wrap: wrap; }
.adm-archivo__mini { width: 112px; height: 40px; flex: none; object-fit: contain; border-radius: var(--bp-radio-sm); background: var(--bp-n-950); }
.adm-archivo__mini.is-movil { width: 56px; height: 56px; }
.adm-archivo__input { font: var(--bp-t-chico); color: var(--bp-texto-2); max-width: 100%; }
.adm-archivo__input::file-selector-button { height: var(--bp-control-sm); margin-right: var(--bp-e-3); padding: 0 var(--bp-e-3); font: var(--bp-t-fuerte); color: var(--bp-texto); background: transparent; border: 1px solid var(--bp-linea-fuerte); border-radius: var(--bp-radio-sm); cursor: pointer; }
.adm-contador { font: var(--bp-t-chico); color: var(--bp-texto-3); font-variant-numeric: tabular-nums; }
