/**
 * MIHA Publicar Documentos — sitio: tarjeta «Archivo Documental», lista de
 * documentos, visor del PDF y aviso del panel. También da los componentes
 * base que reutiliza la gestión (botones, chips, tarjetas que se expanden).
 *
 * 1.2.0 · Unidad gráfica MIHA UI: los colores salen de los tokens --mui-*
 * (con la paleta MIHA como respaldo). La tarjeta del home es de vidrio con el
 * tinte del acento y conserva su proporción (escala con el ancho de la
 * columna). Los !important blindan frente a Elementor y al tema.
 */

/* ============================================================ Tokens */
.miha-docs, .miha-doclist, .miha-docview, .miha-doc-guard, .miha-doc-wrap, .miha-doc-ask, .miha-doc-toast {
	--md-acento: var(--mui-acento, #372677);
	--md-acento-rgb: var(--mui-acento-rgb, 55, 38, 119);
	--md-acento-claro: var(--mui-acento-claro, #b5addb);
	--md-acento-suave: var(--mui-acento-suave, rgba(55, 38, 119, .12));
	--md-acento-oscuro: var(--mui-acento-oscuro, #2b1f62);
	--md-tinta: var(--mui-tinta, #1e1838);
	--md-texto: var(--mui-texto-2, #3a3456);
	--md-tenue: var(--mui-tenue, #6e6886);
	--md-crema: var(--mui-crema, #f3ede6);
	--md-ok: var(--mui-ok, #1f7a47);
	--md-ambar: var(--mui-ambar, #b8690e);
	--md-error: var(--mui-error, #c2372c);
	--md-fuente: var(--mui-fuente, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	--md-display: var(--mui-display, "Urbanist", "Plus Jakarta Sans", system-ui, sans-serif);
	--md-curva: var(--mui-curva, cubic-bezier(.2, .8, .2, 1));
	--md-sombra: 0 1px 2px rgba(30, 22, 60, .05), 0 22px 46px -30px rgba(30, 22, 60, .5);
	--md-linea: rgba(30, 24, 56, .08);
	--md-blanco: linear-gradient(160deg, #fff, rgba(252, 250, 255, .96));
	--md-hero: radial-gradient(700px 300px at 0% 0%, rgba(255, 255, 255, .2), transparent 60%), linear-gradient(150deg, var(--md-acento), var(--md-acento-oscuro) 65%, var(--md-tinta));
}

.miha-docs *, .miha-docs *::before, .miha-docs *::after,
.miha-doclist *, .miha-doclist *::before, .miha-doclist *::after,
.miha-docview *, .miha-docview *::before, .miha-docview *::after,
.miha-doc-guard *, .miha-doc-guard *::before, .miha-doc-guard *::after { box-sizing: border-box; }

.md-ico { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: middle; }

@keyframes md-sube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes md-entra { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes md-gira { to { transform: rotate(360deg); } }

/* ============================================================ Botones base */
.md-go {
	display: inline-flex !important;
	align-items: center;
	gap: 0;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: #fff !important;
	font-family: var(--md-fuente) !important;
	font-size: 13.5px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	white-space: nowrap;
	cursor: pointer;
}
.md-go > span { display: inline-flex; align-items: center; gap: 8px; height: 44px; margin-right: -8px; padding: 0 22px 0 20px; border-radius: 999px 0 0 999px; background: var(--md-tinta); color: #fff; transition: background-color .3s ease; }
.md-go > i { width: 44px; height: 44px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--md-tinta); color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .92), 0 14px 26px -12px rgba(30, 24, 56, .85); transition: transform .5s var(--md-curva), background-color .3s ease; }
.md-go .md-ico { width: 16px; height: 16px; }
.md-go:hover > span, .md-go:hover > i, .md-go:focus-visible > span, .md-go:focus-visible > i { background: var(--md-acento); }
.md-go:hover > i { transform: translateX(3px) rotate(-8deg); }
.md-go:disabled { opacity: .55; cursor: wait; }

.md-b {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: auto !important;
	min-height: 42px !important;
	margin: 0 !important;
	padding: 0 18px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #fff !important;
	box-shadow: inset 0 0 0 1px rgba(30, 24, 56, .16) !important;
	color: var(--md-tinta) !important;
	font-family: var(--md-fuente) !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease, box-shadow .25s ease, transform .3s var(--md-curva);
}
.md-b:hover { color: var(--md-acento) !important; box-shadow: inset 0 0 0 1px rgba(var(--md-acento-rgb), .45) !important; transform: translateY(-1px); }
.md-b:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.md-b .md-ico { width: 15px; height: 15px; }
.md-b--ink { background: var(--md-tinta) !important; color: #fff !important; box-shadow: 0 14px 28px -16px rgba(30, 24, 56, .85) !important; }
.md-b--ink:hover { background: var(--md-acento) !important; color: #fff !important; }
.md-b--danger { color: var(--md-error) !important; box-shadow: inset 0 0 0 1px rgba(194, 55, 44, .35) !important; }
.md-b--danger:hover { background: var(--md-error) !important; color: #fff !important; box-shadow: none !important; }
.md-b--ghost { background: transparent !important; box-shadow: none !important; color: var(--md-texto) !important; }
.md-b--ghost:hover { background: rgba(30, 24, 56, .06) !important; box-shadow: none !important; color: var(--md-tinta) !important; }
.md-b--sm { min-height: 34px !important; padding: 0 14px !important; font-size: 12.5px !important; }

.md-iconbtn {
	width: 40px !important;
	height: 40px !important;
	min-height: 0 !important;
	flex: none;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	background: rgba(30, 24, 56, .05) !important;
	box-shadow: none !important;
	color: var(--md-tinta) !important;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease, transform .35s var(--md-curva);
}
.md-iconbtn:hover { background: var(--md-tinta) !important; color: #fff !important; transform: translateY(-1px); }
.md-iconbtn:disabled { opacity: .4; cursor: default; transform: none; }
.md-iconbtn .md-ico { width: 17px; height: 17px; }
.md-iconbtn--danger { color: var(--md-error) !important; background: rgba(194, 55, 44, .07) !important; }
.md-iconbtn--danger:hover { background: var(--md-error) !important; color: #fff !important; }

/* Segmentado (píldoras) */
.md-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(30, 24, 56, .06); }
.md-seg button {
	display: inline-flex !important;
	align-items: center;
	gap: 7px;
	width: auto !important;
	min-height: 36px !important;
	margin: 0 !important;
	padding: 0 15px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--md-texto) !important;
	font-family: var(--md-fuente) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	cursor: pointer;
	transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.md-seg button:hover { color: var(--md-tinta) !important; background: rgba(255, 255, 255, .75) !important; }
.md-seg button.is-active { background: var(--md-tinta) !important; color: #fff !important; box-shadow: 0 10px 20px -12px rgba(30, 24, 56, .9) !important; }
.md-seg button .md-ico { width: 15px; height: 15px; }

/* Chips y etiquetas */
.md-tag { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(30, 24, 56, .06); color: var(--md-texto); font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; }
.md-tag .md-ico { width: 13px; height: 13px; }
.md-dot { display: inline-block; width: 4px; height: 4px; margin: 0 8px; border-radius: 50%; background: currentColor; opacity: .5; vertical-align: middle; }
.md-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 16px; color: var(--md-tenue); font-family: var(--md-fuente); font-size: 13.5px; text-align: center; }
.md-empty .md-ico { width: 40px; height: 40px; padding: 9px; border-radius: 15px; background: var(--md-acento-suave); color: var(--md-acento); }

/* ============================================ Tarjeta «Archivo Documental» */
.miha-docs {
	/* La tarjeta escala con su ancho: conserva la proporción del home. */
	container-type: inline-size;
	width: 100%;
	margin: 0 auto;
	font-family: var(--md-fuente) !important;
	line-height: 1.15;
	text-align: left;
}
.miha-docs__in {
	position: relative;
	overflow: hidden;
	font-size: clamp(9px, 3.5cqw, 17px);
	padding: 1.2em 1em 1.15em;
	border-radius: max(22px, 1.9em);
	background: rgba(var(--md-acento-rgb), .8);
	background: linear-gradient(150deg, rgba(var(--md-acento-rgb), .74), color-mix(in srgb, var(--md-acento-oscuro) 86%, transparent));
	-webkit-backdrop-filter: blur(16px) saturate(1.2);
	backdrop-filter: blur(16px) saturate(1.2);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 30px 60px -34px rgba(var(--md-acento-rgb), .95);
	animation: md-sube .6s var(--md-curva) both;
}
.miha-docs__in::before { content: ""; position: absolute; right: -30%; top: -45%; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 68%); pointer-events: none; }

/* Título: «Archivo ——» / «Documental» */
.miha-docs__head { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .8em; margin: 0 .25em 1em; color: #fff; }
.miha-docs__title { display: flex; flex-direction: column; font-family: var(--md-display); font-weight: 300; letter-spacing: -.02em; }
.miha-docs__t1, .miha-docs__t2 { font-size: 2em; line-height: .98; }
.miha-docs__t2 { opacity: .82; }
.miha-docs__line { display: block; height: 1px; margin-top: .95em; margin-right: .2em; background: linear-gradient(90deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .15)); }

/* Botones de categoría */
.miha-docs__pills { position: relative; display: flex; flex-wrap: wrap; gap: .5em .45em; }
.miha-docs .miha-docs__pill {
	position: relative;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: .45em;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 3.3em;
	margin: 0 !important;
	padding: .45em .75em !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: rgba(255, 255, 255, .13) !important;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26) !important;
	color: #fff !important;
	font-family: var(--md-fuente) !important;
	font-size: 1em !important;
	font-weight: 500 !important;
	line-height: 1.08 !important;
	text-align: center;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	animation: md-entra .45s calc(var(--i, 0) * 40ms + .15s) var(--md-curva) both;
	transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, transform .4s var(--md-curva);
}
.miha-docs .miha-docs__pill:nth-child(1) { --i: 0; }
.miha-docs .miha-docs__pill:nth-child(2) { --i: 1; }
.miha-docs .miha-docs__pill:nth-child(3) { --i: 2; }
.miha-docs .miha-docs__pill:nth-child(4) { --i: 3; }
.miha-docs .miha-docs__pill:nth-child(5) { --i: 4; }
.miha-docs .miha-docs__pill:nth-child(6) { --i: 5; }
.miha-docs .miha-docs__pill:nth-child(7) { --i: 6; }
.miha-docs .miha-docs__pill:nth-child(n+8) { --i: 7; }
.miha-docs .miha-docs__pill:hover, .miha-docs .miha-docs__pill:focus-visible, .miha-docs .miha-docs__pill.is-active {
	background: #fff !important;
	box-shadow: 0 .9em 1.8em -1em rgba(20, 12, 50, .7) !important;
	color: var(--md-tinta) !important;
	transform: translateY(-2px);
	outline: 0;
}
.miha-docs__ico { width: 1.1em; height: 1.1em; flex: none; }
.miha-docs__label { min-width: 0; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.miha-docs__count {
	display: inline-grid;
	place-items: center;
	flex: none;
	min-width: 1.7em;
	height: 1.7em;
	padding: 0 .4em;
	border-radius: 999px;
	background: #fff;
	color: var(--md-tinta);
	font-size: .8em;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	transition: background-color .3s ease, color .3s ease;
}
.miha-docs .miha-docs__pill:hover .miha-docs__count, .miha-docs .miha-docs__pill.is-active .miha-docs__count { background: var(--md-tinta); color: #fff; }
.miha-docs__go { display: none; }
.miha-docs__go .md-ico { width: 1em; height: 1em; }

/* Diseño «home»: dos botones por fila, el ancho se ajusta al texto. */
.miha-docs--flujo .miha-docs__pill { flex: 1 1 40%; }
.miha-docs--flujo .miha-docs__pill--all { flex-grow: 1.4; }

/* Diseño «columna» (barra lateral de la entrada): filas con flecha. */
.miha-docs--columna .miha-docs__in { font-size: clamp(11px, 4.4cqw, 16px); }
.miha-docs--columna .miha-docs__pills { flex-direction: column; gap: .4em; }
.miha-docs--columna .miha-docs__pill { justify-content: flex-start; min-height: 3em; padding: .4em .5em .4em .9em !important; text-align: left; }
.miha-docs--columna .miha-docs__label { flex: 1; }
.miha-docs--columna .miha-docs__go { display: inline-flex; align-items: center; justify-content: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: rgba(255, 255, 255, .14); transition: transform .45s var(--md-curva), background-color .3s ease; }
.miha-docs--columna .miha-docs__pill:hover .miha-docs__go, .miha-docs--columna .miha-docs__pill.is-active .miha-docs__go { background: var(--md-tinta); color: #fff; transform: translateX(2px) rotate(-8deg); }

/* Diseño «cuadrícula» */
.miha-docs--cuadricula .miha-docs__in { font-size: clamp(11px, 2.2cqw, 16px); }
.miha-docs--cuadricula .miha-docs__pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(13em, 1fr)); gap: .55em; }
.miha-docs--cuadricula .miha-docs__pill { justify-content: flex-start; min-height: 3.6em; padding: .5em .6em .5em 1em !important; border-radius: 1.2em !important; text-align: left; }
.miha-docs--cuadricula .miha-docs__label { flex: 1; }

/* Sin tarjeta de fondo (sobre un contenedor claro): botones blancos. */
.miha-docs--plain .miha-docs__in { padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; overflow: visible; }
.miha-docs--plain .miha-docs__in::before { content: none; }
.miha-docs--plain .miha-docs__head { color: var(--md-tinta); }
.miha-docs--plain .miha-docs__line { background: linear-gradient(90deg, rgba(30, 24, 56, .25), rgba(30, 24, 56, 0)); }
.miha-docs--plain .miha-docs__pill { background: #fff !important; box-shadow: inset 0 0 0 1px var(--md-linea), var(--md-sombra) !important; color: var(--md-tinta) !important; }
.miha-docs--plain .miha-docs__ico { color: var(--md-acento); }
.miha-docs--plain .miha-docs__count { background: var(--md-acento-suave); color: var(--md-acento); }
.miha-docs--plain .miha-docs__pill:hover, .miha-docs--plain .miha-docs__pill.is-active { background: var(--md-tinta) !important; color: #fff !important; }
.miha-docs--plain .miha-docs__pill:hover .miha-docs__ico, .miha-docs--plain .miha-docs__pill.is-active .miha-docs__ico { color: #fff; }
.miha-docs--plain .miha-docs__pill:hover .miha-docs__count, .miha-docs--plain .miha-docs__pill.is-active .miha-docs__count { background: #fff; color: var(--md-tinta); }
.miha-docs--plain.miha-docs--columna .miha-docs__go { background: rgba(30, 24, 56, .06); }
.miha-docs--plain.miha-docs--columna .miha-docs__pill:hover .miha-docs__go, .miha-docs--plain.miha-docs--columna .miha-docs__pill.is-active .miha-docs__go { background: #fff; color: var(--md-tinta); }

/* ============================================================ Lista de documentos */
.miha-doclist { display: flex; flex-direction: column; gap: 14px; margin: 0 0 24px; color: var(--md-tinta); font-family: var(--md-fuente) !important; font-size: 14px; line-height: 1.5; text-align: left; }
.miha-doclist a { text-decoration: none; }

/* Chips de categoría */
.md-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.md-chip {
	display: inline-flex !important;
	align-items: center;
	gap: 7px;
	min-height: 38px;
	margin: 0 !important;
	padding: 0 6px 0 14px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #fff !important;
	box-shadow: inset 0 0 0 1px var(--md-linea) !important;
	color: var(--md-texto) !important;
	font-family: var(--md-fuente) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color .25s ease, color .25s ease, transform .3s var(--md-curva);
}
.md-chip .md-ico { width: 15px; height: 15px; color: var(--md-acento); }
.md-chip b { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--md-acento-suave); color: var(--md-acento); font-size: 11.5px; }
.md-chip:hover { color: var(--md-tinta) !important; transform: translateY(-1px); }
.md-chip.is-active { background: var(--md-tinta) !important; color: #fff !important; box-shadow: 0 10px 20px -12px rgba(30, 24, 56, .9) !important; }
.md-chip.is-active .md-ico { color: #fff; }
.md-chip.is-active b { background: rgba(255, 255, 255, .2); color: #fff; }

/* Buscador */
.md-search { display: flex; align-items: center; gap: 10px; margin: 0; }
.md-search__field { position: relative; flex: 1; display: flex; align-items: center; margin: 0; }
.md-search__field > .md-ico { position: absolute; left: 16px; width: 16px; height: 16px; color: var(--md-tenue); pointer-events: none; }
.md-search input[type="search"] {
	width: 100% !important;
	min-height: 46px !important;
	margin: 0 !important;
	padding: 6px 18px 6px 44px !important;
	border: 1px solid rgba(30, 24, 56, .14) !important;
	border-radius: 999px !important;
	background: #fff !important;
	box-shadow: var(--md-sombra) !important;
	color: var(--md-tinta) !important;
	font-family: var(--md-fuente) !important;
	font-size: 14px !important;
	outline: 0;
}
.md-search input[type="search"]:focus { border-color: rgba(var(--md-acento-rgb), .5) !important; box-shadow: 0 0 0 4px rgba(var(--md-acento-rgb), .12) !important; }

/* Tarjetas de documento que se expanden */
.md-docs { display: flex; flex-direction: column; gap: 8px; }
.md-doc { border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--md-linea), 0 1px 2px rgba(30, 22, 60, .04); animation: md-sube .45s calc(var(--i, 0) * 40ms) var(--md-curva) both; transition: box-shadow .35s ease; }
.md-doc:hover { box-shadow: inset 0 0 0 1px rgba(var(--md-acento-rgb), .25), 0 18px 34px -26px rgba(30, 22, 60, .6); }
.md-doc.is-open { box-shadow: inset 0 0 0 1px rgba(var(--md-acento-rgb), .25), var(--md-sombra); }
.md-doc__head, .md-xp__head {
	width: 100% !important;
	display: flex !important;
	align-items: center;
	gap: 13px;
	margin: 0 !important;
	padding: 11px 14px 11px 11px !important;
	border: 0 !important;
	border-radius: 22px !important;
	background: none !important;
	box-shadow: none !important;
	color: inherit !important;
	font-family: var(--md-fuente) !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	text-align: left !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	white-space: normal !important;
	cursor: pointer;
}
.md-doc__ico { width: 48px; height: 48px; flex: none; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--md-acento-suave); color: var(--md-acento); transition: background-color .35s ease, color .35s ease, transform .5s var(--md-curva); }
.md-doc__ico .md-ico { width: 22px; height: 22px; }
.md-doc.is-open .md-doc__ico { background: var(--md-acento); color: #fff; transform: rotate(-6deg); }
.md-doc__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.md-doc__t strong { font-size: 15px; font-weight: 700; color: var(--md-tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-doc__t small { display: flex; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--md-tenue); }
.md-doc__t small .md-ico { width: 13px; height: 13px; margin-right: 5px; }
.md-doc__sum { display: inline-flex; align-items: center; gap: 6px; }
.md-mas { width: 30px; height: 30px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(30, 24, 56, .07); color: var(--md-tinta); transition: transform .5s var(--md-curva), background-color .3s ease, color .3s ease; }
.md-mas .md-ico { width: 13px; height: 13px; }
.md-doc__head[aria-expanded="true"] .md-mas, .md-xp__head[aria-expanded="true"] .md-mas { transform: rotate(45deg); background: var(--md-tinta); color: #fff; }
.md-doc__body { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .55s var(--md-curva), opacity .35s ease; }
.md-doc__body > div { overflow: hidden; min-height: 0; }
.md-doc.is-open > .md-doc__body { grid-template-rows: 1fr; opacity: 1; }
.md-doc__in { display: flex; flex-direction: column; gap: 14px; padding: 2px 18px 18px 72px; }
.md-doc__frame { position: relative; height: 460px; border-radius: 18px; overflow: hidden; background: #f4f2f8 radial-gradient(circle at 50% 50%, rgba(var(--md-acento-rgb), .08), transparent 60%); box-shadow: inset 0 0 0 1px var(--md-linea); }
.md-doc__frame::before { content: ""; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; border: 3px solid rgba(30, 24, 56, .1); border-top-color: var(--md-acento); animation: md-gira .8s linear infinite; }
.md-doc__frame iframe { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.md-doc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Paginación */
.miha-doclist .md-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.miha-doclist .md-pager a, .miha-doclist .md-pager span { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; box-shadow: inset 0 0 0 1px var(--md-linea); color: var(--md-tinta); font-size: 13.5px; font-weight: 700; text-decoration: none !important; transition: background-color .25s ease, color .25s ease, transform .3s var(--md-curva); }
.miha-doclist .md-pager a:hover { transform: translateY(-2px); color: var(--md-acento); }
.miha-doclist .md-pager .is-active { background: var(--md-tinta); color: #fff; box-shadow: 0 10px 20px -12px rgba(30, 24, 56, .9); }

/* ============================================================ Visor del PDF */
.miha-docview { overflow: hidden; margin: 0 0 20px; border-radius: 26px; background: var(--md-blanco); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .95), var(--md-sombra); font-family: var(--md-fuente) !important; }
.miha-docview__frame-wrap { padding: 10px 10px 0; }
.miha-docview__frame { display: block; width: 100%; border: 0; border-radius: 18px; background: #f4f2f8; box-shadow: inset 0 0 0 1px var(--md-linea); }
.miha-docview__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px; }
.miha-docview--empty { display: flex; align-items: center; gap: 12px; padding: 22px; color: var(--md-tenue); font-size: 13.5px; }
.miha-docview--empty .md-ico { width: 38px; height: 38px; padding: 9px; border-radius: 13px; background: var(--md-acento-suave); color: var(--md-acento); }

/* ============================================================ Aviso sin permiso (panel) */
.miha-doc-guard { max-width: 520px; margin: 24px auto; padding: 30px 26px 26px; display: flex; flex-direction: column; align-items: center; gap: 12px; border-radius: 30px; background: var(--md-blanco); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .95), var(--md-sombra); color: var(--md-tinta); font-family: var(--md-fuente) !important; text-align: center; }
.miha-doc-guard__icon { width: 58px; height: 58px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--md-acento-suave); color: var(--md-acento); }
.miha-doc-guard__svg { width: 26px; height: 26px; }
.miha-doc-guard h3 { margin: 0 !important; font-family: var(--md-display) !important; font-size: 24px !important; font-weight: 400 !important; letter-spacing: -.02em; color: var(--md-tinta) !important; text-transform: none; }
.miha-doc-guard p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--md-tenue); }

/* ============================================================ Responsive */
.miha-doclist { container-type: inline-size; container-name: mdl; }
@container mdl (max-width: 620px) {
	.md-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -2px; padding: 2px 2px 6px; scrollbar-width: none; }
	.md-chips::-webkit-scrollbar { display: none; }
	.md-chip { flex: none; }
	.md-search .md-go > span { padding: 0 16px; }
	.md-doc__head { gap: 10px; padding: 9px 10px 9px 9px !important; }
	.md-doc__ico { width: 42px; height: 42px; border-radius: 14px; }
	.md-doc__sum { display: none; }
	.md-doc__in { padding: 2px 12px 14px; }
	.md-doc__frame { height: 380px; }
	.md-doc__actions .md-go { width: 100% !important; }
	.md-doc__actions .md-go > span { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	.miha-docs *, .miha-doclist *, .miha-docview * { animation: none !important; transition: none !important; }
}
