/* TAXESPRO · portal de clientes: la parte que ve el cliente (inc/portal.php). Solo se carga en la página del portal.
   Colores y letras del tema (theme.json), con un valor de reserva. La primera pieza monta sobre el banner azul de la
   página. Sin estilos en línea. Con «reducir movimiento», nada se mueve. */
.tp-pc {
	--pc-marino: var(--wp--preset--color--marino, #002347);
	--pc-marino-2: var(--wp--preset--color--marino-2, #0a3561);
	--pc-dorado: var(--wp--preset--color--dorado, #d6ba6c);
	--pc-dorado-oscuro: var(--wp--preset--color--dorado-oscuro, #9a7426);
	--pc-dorado-texto: var(--wp--preset--color--dorado-texto, #7a5d12);
	--pc-tinta: var(--wp--preset--color--tinta, #0b1f3a);
	--pc-pizarra: var(--wp--preset--color--pizarra, #3a4a60);
	--pc-gris: var(--wp--preset--color--gris, #5b6b80);
	--pc-linea: var(--wp--preset--color--linea, #e6ebf2);
	--pc-niebla: var(--wp--preset--color--niebla, #f6f9fd);
	--pc-crema: var(--wp--preset--color--crema, #f6f1e1);
	--pc-borde: #b9c6d8;
	--pc-metal: var(--wp--preset--gradient--metal, linear-gradient(140deg, #fff1bd 0%, #e3c06a 45%, #b8893a 100%));
	--pc-texto: var(--wp--preset--font-family--manrope, system-ui, sans-serif);
	--pc-titulo: var(--wp--preset--font-family--fraunces, Georgia, serif);
	position: relative;
	z-index: 1;
	color: var(--pc-tinta);
	font-family: var(--pc-texto);
}
/* Monta sobre el banner azul. Tres clases: la regla de WordPress para el primer bloque del contenido pesa (0,2,0) */
.tp-pc.tp-pc.tp-pc { margin-top: calc(-1 * (var(--wp--preset--spacing--50, 2.5rem) + 1.5rem)); }
.tp-pc--entrada, .tp-pc--codigo { max-width: 31rem; }
.tp-pc p { margin: 0 0 .9rem; }
.tp-pc h2 { margin: 0 0 .4rem; font-family: var(--pc-titulo); font-size: clamp(1.65rem, 3.4vw, 2.15rem); line-height: 1.15; color: var(--pc-marino); }
.tp-pc h3 { display: flex; align-items: center; gap: .55rem; margin: 0 0 .6rem; font-family: var(--pc-titulo); font-size: 1.3rem; line-height: 1.2; color: var(--pc-marino); }
.tp-pc__icono { flex: none; width: 1.15em; height: 1.15em; }
.tp-pc__solo-lector { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.tp-pc :is(a, button):focus-visible, .tp-pc__solo-lector:focus-visible + .tp-pc__boton { outline: 3px solid var(--pc-marino); outline-offset: 3px; box-shadow: 0 0 0 7px rgba(214, 186, 108, .55); }

/* La franja de la demostración */
.tp-pc__demo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem 1rem; margin-bottom: 1.1rem; padding: .7rem 1rem; border: 1px solid #e3cd88; border-radius: 16px; background: #fff8e1; color: #5a4406; font-size: .9rem; box-shadow: 0 14px 34px rgba(0, 35, 71, .16); }
.tp-pc .tp-pc__demo p { flex: 1 1 16rem; margin: 0; font-weight: 600; }
.tp-pc__demo nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.tp-pc .tp-pc__demo a { display: inline-flex; align-items: center; min-height: 36px; padding: .2rem .8rem; border: 1px solid #d9c27a; border-radius: 999px; background: #fff; color: #5a4406; font-weight: 700; text-decoration: none; }
.tp-pc .tp-pc__demo a[aria-current] { border-color: var(--pc-marino); background: var(--pc-marino); color: #fff; }

/* Tarjetas y botones */
.tp-pc__tarjeta { padding: clamp(1.25rem, 3vw, 1.9rem); border: 1px solid var(--pc-linea); border-radius: 24px; background: #fff; box-shadow: 0 24px 60px rgba(0, 35, 71, .09); }
.tp-pc .tp-pc__boton { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; box-sizing: border-box; padding: .8rem 1.6rem; border: 1px solid transparent; border-radius: 999px; background: var(--pc-marino); color: #fff; font: 800 1rem var(--pc-texto); text-decoration: none; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.tp-pc .tp-pc__boton:hover { background: var(--pc-marino-2); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 35, 71, .25); }
.tp-pc .tp-pc__boton--ancho { width: 100%; }
.tp-pc .tp-pc__boton--linea { border-color: var(--pc-borde); background: #fff; color: var(--pc-marino); }
.tp-pc .tp-pc__boton--linea:hover { background: var(--pc-niebla); color: var(--pc-marino); box-shadow: 0 10px 22px rgba(0, 35, 71, .12); }
.tp-pc__botones { display: flex; flex-wrap: wrap; gap: .6rem; }
.tp-pc .tp-pc__botones { margin: 0; }
.tp-pc__nota { display: flex; gap: .5rem; align-items: flex-start; color: var(--pc-gris); font-size: .92rem; }
.tp-pc .tp-pc__nota { margin: 1rem 0 0; }
.tp-pc__nota .tp-pc__icono { margin-top: .15em; color: var(--pc-dorado-oscuro); }
.tp-pc__entradilla { color: var(--pc-pizarra); }

/* Entrada y código */
.tp-pc__acceso { text-align: center; }
.tp-pc__acceso + .tp-pc__ayuda { margin-top: 1.2rem; }
.tp-pc__pasos { display: flex; gap: .4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.tp-pc__paso { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; line-height: 1.25; color: var(--pc-gris); }
.tp-pc__paso-n { position: relative; z-index: 1; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 1px solid var(--pc-linea); border-radius: 50%; background: var(--pc-niebla); font-weight: 800; }
.tp-pc__paso + .tp-pc__paso::before { content: ""; position: absolute; top: 1.05rem; right: calc(50% + 1.25rem); width: calc(100% - 2.1rem); height: 2px; background: var(--pc-linea); }
.tp-pc__paso--hecho + .tp-pc__paso::before { background: var(--pc-dorado); }
.tp-pc__paso--actual { color: var(--pc-tinta); }
.tp-pc__paso--actual .tp-pc__paso-n { border-color: var(--pc-marino); background: var(--pc-marino); color: #fff; box-shadow: 0 0 0 4px rgba(214, 186, 108, .5); }
.tp-pc__paso--hecho .tp-pc__paso-n { border-color: var(--pc-dorado); background: var(--pc-dorado); color: var(--pc-marino); }
.tp-pc__sello { display: inline-grid; place-items: center; width: 3.5rem; height: 3.5rem; margin-bottom: .7rem; border-radius: 50%; background: var(--pc-metal); color: var(--pc-marino); box-shadow: 0 12px 26px rgba(154, 116, 38, .35); }
.tp-pc__sello .tp-pc__icono { width: 1.65rem; height: 1.65rem; }
.tp-pc__campos { display: grid; gap: .35rem; margin: 1.2rem 0 1.1rem; text-align: left; }
.tp-pc__campos label { margin-top: .5rem; font-size: .93rem; font-weight: 700; }
.tp-pc__campos input { width: 100%; min-height: 52px; box-sizing: border-box; padding: .75rem 1rem; border: 1px solid var(--pc-borde); border-radius: 14px; background: #fff; color: var(--pc-tinta); font: 500 1.05rem var(--pc-texto); }
.tp-pc__campos input::placeholder { color: #8493a7; }
.tp-pc__campos input:focus-visible { border-color: var(--pc-marino); outline: 3px solid rgba(214, 186, 108, .9); outline-offset: 1px; }
.tp-pc__campos input.tp-pc__codigo { font-size: 1.5rem; font-weight: 800; letter-spacing: .4em; text-align: center; }
.tp-pc__acceso .tp-pc__nota { justify-content: center; text-align: left; }
.tp-pc__enlaces { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; font-weight: 700; }
.tp-pc .tp-pc__enlaces { margin: 1rem 0 0; }
.tp-pc .tp-pc__enlaces a { color: var(--pc-dorado-texto); }

/* Documentos: saludo y año */
.tp-pc__saludo { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; padding: clamp(1.4rem, 3.4vw, 2.2rem) clamp(1.4rem, 3.4vw, 2.2rem) clamp(1.4rem, 3.4vw, 2.2rem) calc(clamp(1.4rem, 3.4vw, 2.2rem) + 6px); overflow: hidden; border: 1px solid var(--pc-linea); border-radius: 24px; background: radial-gradient(560px 220px at 100% 0%, rgba(214, 186, 108, .26), transparent 70%), #fff; box-shadow: 0 24px 60px rgba(0, 35, 71, .14); }
.tp-pc__saludo::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--pc-metal); }
.tp-pc__saludo > div { flex: 1 1 22rem; }
.tp-pc .tp-pc__saludo .tp-pc__entradilla { max-width: 44ch; margin: 0; }
.tp-pc__segura { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 999px; background: #eaf6ee; color: #1f6f43; font-size: .86rem; font-weight: 700; }
.tp-pc .tp-pc__segura { margin: 0 0 .6rem; }
.tp-pc .tp-pc__salir { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem 1.1rem; border: 1px solid var(--pc-borde); border-radius: 999px; background: #fff; color: var(--pc-marino); font-weight: 700; text-decoration: none; }
.tp-pc .tp-pc__salir:hover { background: var(--pc-niebla); }
.tp-pc__anios { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.5rem 0 1.2rem; }
.tp-pc__anios-t { margin-right: .2rem; font-weight: 700; color: var(--pc-gris); }
.tp-pc__anio { min-height: 44px; padding: .45rem 1.2rem; border: 1px solid var(--pc-borde); border-radius: 999px; background: #fff; color: var(--pc-marino); font: 800 1rem var(--pc-texto); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.tp-pc__anio[aria-pressed="true"] { border-color: var(--pc-marino); background: var(--pc-marino); color: #fff; }
.tp-pc__rejilla { display: grid; gap: 1.4rem; align-items: start; }
@media (min-width: 900px) { .tp-pc__rejilla { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.tp-pc__columna { display: grid; gap: 1.4rem; }
/* En el móvil, lo que la oficina deja al cliente va justo después de subir (antes que la lista de lo enviado, que puede
   ser larga). «Enviados» no tiene nada que se pueda pulsar: el orden del teclado sigue siendo el que se ve. */
@media (max-width: 899px) {
	.tp-pc__rejilla { display: flex; flex-direction: column; }
	.tp-pc__columna { display: contents; }
	.tp-pc__subir { order: 1; }
	.tp-pc__entregados { order: 2; }
	.tp-pc__enviados { order: 3; }
	.tp-pc__ayuda { order: 4; }
	.tp-pc__proteccion { order: 5; }
}

/* Subir */
.tp-pc__zona { display: grid; justify-items: center; gap: .8rem; padding: clamp(1.4rem, 4vw, 2.2rem) 1rem; border: 2px dashed var(--pc-borde); border-radius: 20px; background: var(--pc-niebla); text-align: center; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.tp-pc__zona--encima { border-color: var(--pc-dorado-oscuro); background: var(--pc-crema); transform: scale(1.01); }
.tp-pc__zona > .tp-pc__icono { width: 2.5rem; height: 2.5rem; color: var(--pc-dorado-oscuro); }
.tp-pc .tp-pc__zona-texto { margin: 0; font-weight: 700; }
.tp-pc__zona .tp-pc__botones { justify-content: center; }
.tp-pc .tp-pc__camara { display: none; }
@media (hover: none) and (pointer: coarse) {
	.tp-pc .tp-pc__camara { display: inline-flex; }
	.tp-pc .tp-pc__zona-texto { display: none; }
}
.tp-pc__sin-js { padding: 1rem; border-radius: 14px; background: var(--pc-niebla); color: var(--pc-pizarra); }
.tp-pc--js .tp-pc__sin-js, .tp-pc:not(.tp-pc--js) .tp-pc__zona, .tp-pc:not(.tp-pc--js) .tp-pc__anios { display: none; }

/* Listas de documentos */
.tp-pc__lista, .tp-pc__cola, .tp-pc__proteccion ul { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.tp-pc__cola:not(:empty) { margin-top: 1rem; }
.tp-pc__doc, .tp-pc__subida { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; padding: .7rem .85rem; border: 1px solid var(--pc-linea); border-radius: 16px; background: #fff; }
.tp-pc__doc[hidden], .tp-pc__lista[hidden], .tp-pc__vacio[hidden] { display: none; }
.tp-pc__tipo { flex: none; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 12px; background: var(--pc-marino); color: var(--pc-dorado); font: 800 .72rem/1 var(--pc-texto); letter-spacing: .04em; }
.tp-pc__tipo--jpg, .tp-pc__tipo--jpeg, .tp-pc__tipo--png, .tp-pc__tipo--heic, .tp-pc__tipo--heif { border: 1px solid #e0d3a8; background: var(--pc-crema); color: var(--pc-dorado-texto); }
.tp-pc__doc-texto { flex: 1 1 9rem; min-width: 0; display: grid; gap: .15rem; }
.tp-pc__doc-nombre { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tp-pc__doc-dato { color: var(--pc-gris); font-size: .88rem; }
.tp-pc__estado { flex: none; display: inline-flex; align-items: center; gap: .3rem; color: #1f6f43; font-size: .88rem; font-weight: 700; }
.tp-pc__descargar { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .45rem 1.05rem; border: 0; border-radius: 999px; background: var(--pc-metal); color: var(--pc-marino); font: 800 .95rem var(--pc-texto); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.tp-pc__descargar:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(154, 116, 38, .35); }
@media (max-width: 520px) { .tp-pc__descargar { flex: 1 1 100%; } }
a.tp-pc__descargar, a.tp-pc__descargar:hover { text-decoration: none; color: var(--pc-marino); }
.tp-pc .tp-pc__pagar-form { margin: 0; }
.tp-pc__nuevo { display: inline-block; margin-left: .4rem; padding: .12rem .5rem; border-radius: 999px; background: var(--pc-marino); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
.tp-pc__cuenta { display: inline-grid; place-items: center; min-width: 1.7rem; height: 1.7rem; padding: 0 .4rem; box-sizing: border-box; border: 1px solid var(--pc-linea); border-radius: 999px; background: var(--pc-niebla); color: var(--pc-marino); font: 800 .85rem var(--pc-texto); }
.tp-pc .tp-pc__vacio { margin: 0; padding: 1rem; border-radius: 14px; background: var(--pc-niebla); color: var(--pc-pizarra); }
.tp-pc__barra { width: 100%; height: 8px; margin-top: .25rem; overflow: hidden; border: 0; border-radius: 999px; background: var(--pc-linea); appearance: none; -webkit-appearance: none; }
.tp-pc__barra::-webkit-progress-bar { background: var(--pc-linea); }
.tp-pc__barra::-webkit-progress-value { border-radius: 999px; background: var(--pc-metal); transition: width .2s ease; }
.tp-pc__barra::-moz-progress-bar { border-radius: 999px; background: #d6ba6c; }
.tp-pc__subida--error { border-color: #f1b8b8; background: #fdecec; }
.tp-pc__subida--error .tp-pc__doc-dato { color: #9b1c1c; font-weight: 600; }
.tp-pc__quitar { flex: none; min-height: 40px; padding: .3rem .9rem; border: 1px solid #e2a3a3; border-radius: 999px; background: #fff; color: #9b1c1c; font: 700 .9rem var(--pc-texto); cursor: pointer; }
.tp-pc__doc--recien { animation: tp-pc-destello 1.8s ease-out; }

/* Protección y avisos */
.tp-pc__proteccion li { display: flex; align-items: flex-start; gap: .55rem; }
.tp-pc__proteccion li .tp-pc__icono { margin-top: .2em; color: #1f6f43; }
.tp-pc__mensaje { position: fixed; left: 50%; bottom: 6.5rem; z-index: 60; width: max-content; max-width: min(92vw, 30rem); padding: .85rem 1.2rem; border-radius: 14px; background: var(--pc-marino); color: #fff; font-weight: 600; text-align: center; box-shadow: 0 18px 40px rgba(0, 35, 71, .35); transform: translateX(-50%); }
.tp-pc .tp-pc__mensaje { margin: 0; }
.tp-pc__mensaje:empty { display: none; }

@keyframes tp-pc-destello { from { background: #fbf3d6; box-shadow: 0 0 0 3px rgba(214, 186, 108, .6); } to { background: #fff; box-shadow: 0 0 0 0 rgba(214, 186, 108, 0); } }
@keyframes tp-pc-subir { from { opacity: .35; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
	.tp-pc__demo, .tp-pc__saludo, .tp-pc__tarjeta { animation: tp-pc-subir .6s cubic-bezier(.2, .7, .2, 1) both; }
	.tp-pc__columna > :nth-child(2), .tp-pc__acceso + .tp-pc__ayuda { animation-delay: .08s; }
	.tp-pc__columna > :nth-child(3) { animation-delay: .16s; }
}
@media (prefers-reduced-motion: reduce) {
	.tp-pc *, .tp-pc *::before, .tp-pc *::after { animation: none; transition: none; }
}

/* El aviso por correo (demostración) y el documento al que lleva el aviso */
.tp-pc--correo { max-width: 40rem; }
.tp-pc .tp-pc__boton--oro { background: var(--pc-metal); color: var(--pc-marino); }
.tp-pc .tp-pc__boton--oro:hover { background: var(--pc-metal); color: var(--pc-marino); box-shadow: 0 12px 26px rgba(154, 116, 38, .4); }
.tp-pc__doc--destacado { border-color: var(--pc-dorado-oscuro); background: #fffaf0; box-shadow: 0 0 0 3px rgba(214, 186, 108, .55); }
.tp-pc__del-aviso { padding: .6rem .9rem; border-radius: 12px; background: var(--pc-crema); color: #5a4406; font-size: .92rem; font-weight: 600; }
.tp-pc .tp-pc__del-aviso { margin: 0 0 .7rem; }
.tp-pc__carta { overflow: hidden; border: 1px solid var(--pc-linea); border-radius: 18px; background: #fff; box-shadow: 0 14px 34px rgba(0, 35, 71, .1); }
.tp-pc__carta-cabecera { display: grid; gap: .25rem; margin: 0; padding: .9rem 1.1rem; border-bottom: 1px solid var(--pc-linea); background: var(--pc-niebla); font-size: .92rem; }
.tp-pc__carta-cabecera div { display: flex; flex-wrap: wrap; gap: 0 .6rem; }
.tp-pc__carta-cabecera dt { flex: none; min-width: 3.8rem; color: var(--pc-gris); font-weight: 700; }
.tp-pc__carta-cabecera dd { flex: 1 1 14rem; margin: 0; font-weight: 600; overflow-wrap: anywhere; }   /* en el móvil baja a su propia línea: la dirección no se parte */
.tp-pc__carta-marca { padding: 1rem 1.3rem; background: var(--pc-marino); color: var(--pc-dorado); font: 700 1.25rem/1 var(--wp--preset--font-family--cinzel, Georgia, serif); letter-spacing: .14em; }
.tp-pc .tp-pc__carta-marca { margin: 0; }
.tp-pc__carta-cuerpo { padding: 1.3rem; }
.tp-pc__carta-nota { color: var(--pc-gris); font-size: .9rem; }
.tp-pc__carta-pie { padding-top: .9rem; border-top: 1px solid var(--pc-linea); color: var(--pc-gris); font-size: .82rem; }
.tp-pc .tp-pc__carta-pie { margin: 1rem 0 0; }

/* El menú de dentro del portal: documentos, facturas y mis datos */
.tp-pc__menu { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 0; }
.tp-pc .tp-pc__menu a { display: inline-flex; align-items: center; gap: .45rem; min-height: 46px; padding: .5rem 1.25rem; border: 1px solid var(--pc-borde); border-radius: 999px; background: #fff; color: var(--pc-marino); font-weight: 800; text-decoration: none; transition: background-color .2s ease, color .2s ease, transform .2s ease; }
.tp-pc .tp-pc__menu a:hover { background: var(--pc-niebla); transform: translateY(-1px); }
.tp-pc .tp-pc__menu a[aria-current] { border-color: var(--pc-marino); background: var(--pc-marino); color: #fff; }
.tp-pc__menu-n { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; box-sizing: border-box; border-radius: 999px; background: var(--pc-dorado); color: var(--pc-marino); font-size: .8rem; font-weight: 800; }
.tp-pc__menu + .tp-pc__rejilla { margin-top: 1.4rem; }

/* Facturas: importe, estado y cómo pagar */
.tp-pc__importe { flex: none; color: var(--pc-marino); font: 800 1.1rem var(--pc-texto); }
.tp-pc__pago { flex: none; padding: .2rem .7rem; border: 1px solid transparent; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.tp-pc__pago--pendiente { border-color: #ecd28a; background: #fff3d6; color: #6b4a00; }
.tp-pc__pago--pagada { border-color: #bfe3cb; background: #eaf6ee; color: #1f6f43; }
.tp-pc__pagar { flex: 1 1 100%; padding-top: .7rem; border-top: 1px solid var(--pc-linea); }
.tp-pc__pagar summary { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .3rem 1.1rem; border-radius: 999px; background: var(--pc-marino); color: #fff; font-weight: 800; cursor: pointer; list-style: none; }
.tp-pc__pagar summary::-webkit-details-marker { display: none; }
.tp-pc__pagar summary::after { content: "+"; font-weight: 800; }
.tp-pc__pagar[open] summary::after { content: "–"; }
.tp-pc__pagar summary:focus-visible { outline: 3px solid var(--pc-marino); outline-offset: 3px; box-shadow: 0 0 0 7px rgba(214, 186, 108, .55); }
.tp-pc__pagar-dentro { margin-top: .8rem; padding: 1rem; border-radius: 14px; background: var(--pc-niebla); }
.tp-pc .tp-pc__pagar-dentro p:last-child { margin-bottom: 0; }
.tp-pc__zelle { color: var(--pc-marino); font-weight: 800; white-space: nowrap; }

/* Mis datos */
.tp-pc h4 { margin: 1.5rem 0 .7rem; color: var(--pc-marino); font: 800 1.02rem var(--pc-texto); letter-spacing: .02em; }
.tp-pc__ficha { display: grid; gap: .9rem 1rem; }
.tp-pc__ficha + .tp-pc__ficha, .tp-pc__dependientes + p + template + .tp-pc__ficha, .tp-pc .tp-pc__ficha + p { margin-top: 1.2rem; }
@media (min-width: 620px) {
	.tp-pc__ficha { grid-template-columns: 1fr 1fr; }
	.tp-pc__campo--ancho { grid-column: 1 / -1; }
}
.tp-pc__campo { display: grid; gap: .3rem; align-content: start; min-width: 0; }
.tp-pc__campo--par { grid-template-columns: 1fr 1.3fr; gap: 1rem; }
.tp-pc__campo label { font-size: .93rem; font-weight: 700; }
.tp-pc__campo :is(input, select, textarea) { width: 100%; min-height: 50px; box-sizing: border-box; padding: .7rem .95rem; border: 1px solid var(--pc-borde); border-radius: 14px; background: #fff; color: var(--pc-tinta); font: 500 1.02rem var(--pc-texto); }
.tp-pc__campo textarea { min-height: 6rem; resize: vertical; }
.tp-pc__campo :is(input, select, textarea):focus-visible { border-color: var(--pc-marino); outline: 3px solid rgba(214, 186, 108, .9); outline-offset: 1px; }
.tp-pc__campo small { color: var(--pc-gris); font-size: .84rem; }
.tp-pc__ssn-guardado { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .8rem; min-height: 50px; padding: .3rem .95rem; box-sizing: border-box; border: 1px dashed var(--pc-borde); border-radius: 14px; background: var(--pc-niebla); font-weight: 700; }
.tp-pc .tp-pc__ssn-guardado { margin: 0; }
.tp-pc__ssn-nuevo { display: flex; align-items: center; gap: .5rem; }
.tp-pc__ssn-nuevo[hidden], .tp-pc__ssn-guardado[hidden] { display: none; }
.tp-pc__ssn-nuevo input { flex: 1; min-width: 0; letter-spacing: .08em; }
.tp-pc__enlace { flex: none; min-height: 40px; padding: .2rem .5rem; border: 0; background: none; color: var(--pc-dorado-texto); font: 800 .95rem var(--pc-texto); text-decoration: underline; cursor: pointer; }
.tp-pc__ssn-guardado .tp-pc__enlace { margin-left: -.5rem; }   /* si baja a la segunda línea, empieza donde el texto */
.tp-pc__dependientes { display: grid; gap: 1rem; }
.tp-pc__dependientes:not(:empty) { margin-bottom: 1rem; }
.tp-pc__dependiente { min-width: 0; margin: 0; padding: .9rem 1.1rem 1.1rem; border: 1px solid var(--pc-linea); border-radius: 18px; background: #fff; }
.tp-pc__dependiente legend { padding: 0 .5rem; color: var(--pc-marino); font-weight: 800; }
.tp-pc .tp-pc__dependiente-pie { margin: .8rem 0 0; text-align: right; }
.tp-pc:not(.tp-pc--js) :is([data-pc-ssn-cambiar], [data-pc-ssn-ver], [data-pc-anadir], [data-pc-quitar]) { display: none; }

/* El escáner de «Escanear documento» (assets/portal-escaner.js): a pantalla completa, fuera de .tp-pc (va en <body>) */
.tp-esc {
	--esc-fondo: #061426;
	--esc-panel: #0b1f3a;
	--esc-linea: rgba(214, 186, 108, .35);
	--esc-dorado: #d6ba6c;
	--esc-metal: linear-gradient(140deg, #fff1bd 0%, #e3c06a 45%, #b8893a 100%);
	--esc-texto: var(--wp--preset--font-family--manrope, system-ui, sans-serif);
	--esc-titulo: var(--wp--preset--font-family--fraunces, Georgia, serif);
	position: fixed; inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none;
	margin: 0; padding: 0 0 env(safe-area-inset-bottom); border: 0; box-sizing: border-box;
	background: radial-gradient(120% 80% at 50% 0%, #0d2a4d 0%, var(--esc-fondo) 60%); color: #fff;
	font-family: var(--esc-texto); overscroll-behavior: contain;
}
.tp-esc[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto auto auto auto; }
.tp-esc::backdrop { background: var(--esc-fondo); }
.tp-esc *, .tp-esc *::before, .tp-esc *::after { box-sizing: border-box; }
.tp-esc [hidden] { display: none !important; }
.tp-esc__oculto { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; }
.tp-esc button { font: inherit; }
.tp-esc :is(button, input, [tabindex]):focus-visible { outline: 3px solid var(--esc-dorado); outline-offset: 3px; }

.tp-esc__cabeza { display: flex; align-items: center; gap: .65rem; padding: max(.45rem, env(safe-area-inset-top)) .9rem .45rem; border-bottom: 1px solid var(--esc-linea); }
.tp-esc__titulo { flex: 1; min-width: 0; margin: 0; font: 600 1.05rem/1.2 var(--esc-titulo); color: #fff; }
.tp-esc__cuenta { font-size: .85rem; font-weight: 700; color: var(--esc-dorado); white-space: nowrap; }
.tp-esc__cerrar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--esc-linea); border-radius: 50%; background: transparent; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }

.tp-esc__escena { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 16px; touch-action: none; }
.tp-esc__marco { position: relative; border-radius: 6px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.tp-esc__foto { display: block; width: 100%; height: 100%; border-radius: 6px; }
.tp-esc__bordes { position: absolute; inset: 0; overflow: visible; touch-action: none; }
.tp-esc__sombra { fill: rgba(3, 10, 20, .58); }
.tp-esc__linea { fill: rgba(214, 186, 108, .08); stroke: var(--esc-dorado); stroke-width: 2.5; stroke-linejoin: round; }
.tp-esc__linea--mal { stroke: #ff8a7a; }
.tp-esc__asa { cursor: grab; outline: none; }
.tp-esc__toque { fill: transparent; }
.tp-esc__punto { fill: rgba(6, 20, 38, .55); stroke: var(--esc-dorado); stroke-width: 3; }
.tp-esc__asa--activa .tp-esc__punto, .tp-esc__asa:focus-visible .tp-esc__punto { fill: var(--esc-dorado); stroke: #fff; }
.tp-esc__lupa { position: absolute; top: 12px; left: 12px; width: 120px; height: 120px; border: 3px solid var(--esc-dorado); border-radius: 50%; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); pointer-events: none; }
.tp-esc__lupa--derecha { left: auto; right: 12px; }
.tp-esc__pagina { position: absolute; inset: 14px 74px 14px 14px; width: calc(100% - 88px); height: calc(100% - 28px); object-fit: contain; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .55)); }
.tp-esc__espera { position: absolute; inset: auto 1rem 1rem; margin: 0 auto; max-width: 22rem; padding: .7rem 1rem; border-radius: 999px; background: rgba(6, 20, 38, .88); border: 1px solid var(--esc-linea); text-align: center; font-weight: 700; }
.tp-esc--ocupado .tp-esc__escena { cursor: progress; }

.tp-esc__fallo { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 1rem; text-align: center; }
.tp-esc__fallo p { margin: 0; max-width: 26rem; }
.tp-esc__ayuda { margin: 0; padding: .4rem 1rem 0; text-align: center; font-size: .95rem; color: #dbe4ef; }
.tp-esc__ayuda:empty { display: none; }

.tp-esc__acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; padding: .6rem 1rem; }
.tp-esc__boton { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .7rem 1.5rem; border: 1px solid transparent; border-radius: 999px; font-weight: 800; cursor: pointer; }
.tp-esc__boton--oro { background: var(--esc-metal); color: #002347; }
.tp-esc__boton--linea { border-color: var(--esc-linea); background: transparent; color: #fff; }
.tp-esc__boton:disabled, .tp-esc__filtro:disabled, .tp-esc__icono-boton:disabled, .tp-esc__mini:disabled { opacity: .5; cursor: default; }
.tp-esc__filtros { display: flex; gap: .25rem; width: 100%; max-width: 26rem; padding: .25rem; border: 1px solid var(--esc-linea); border-radius: 999px; }
.tp-esc__filtro { flex: 1; min-height: 40px; padding: .4rem .5rem; border: 0; border-radius: 999px; background: transparent; color: #fff; font-size: .85rem; white-space: nowrap; font-weight: 700; cursor: pointer; }
.tp-esc__filtro[aria-pressed="true"] { background: var(--esc-dorado); color: #002347; }
.tp-esc__herramientas { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; flex-direction: column; gap: .5rem; }
.tp-esc__icono-boton { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid var(--esc-linea); border-radius: 50%; background: rgba(6, 20, 38, .82); color: #fff; cursor: pointer; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.tp-esc__icono-boton svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tp-esc__tira { display: flex; gap: .45rem; overflow-x: auto; padding: .1rem 1rem .55rem; scroll-snap-type: x proximity; }
.tp-esc__mini { position: relative; flex: none; display: grid; place-items: center; width: 46px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 7px; background: #fff; overflow: hidden; cursor: pointer; scroll-snap-align: start; }
.tp-esc__mini img { width: 100%; height: 100%; object-fit: cover; }
.tp-esc__mini[aria-current="true"] { border-color: var(--esc-dorado); box-shadow: 0 0 0 3px rgba(214, 186, 108, .35); }
.tp-esc__mini-num { position: absolute; right: 3px; bottom: 3px; min-width: 18px; padding: 0 4px; border-radius: 9px; background: #002347; color: #fff; font-size: .7rem; font-weight: 800; line-height: 18px; }
.tp-esc__mini--anadir { border: 2px dashed var(--esc-linea); background: transparent; color: var(--esc-dorado); font-size: 1.5rem; font-weight: 800; }
.tp-esc__mini-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.tp-esc__pie { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .6rem 1rem .8rem; border-top: 1px solid var(--esc-linea); background: rgba(6, 20, 38, .6); }
.tp-esc__campo { display: grid; gap: .25rem; min-width: 0; }
.tp-esc__etiqueta { font-size: .8rem; font-weight: 700; color: #dbe4ef; }
.tp-esc__nombre { width: 100%; min-height: 48px; padding: .55rem .8rem; border: 1px solid var(--esc-linea); border-radius: 12px; background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-size: 1rem; }
.tp-esc__nombre::placeholder { color: #9fb0c6; }
.tp-esc__privado { margin: 0; padding: 0 1rem .8rem; text-align: center; font-size: .8rem; color: #9fb0c6; }
.tp-esc__enviar { padding-left: 1.2rem; padding-right: 1.2rem; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
	.tp-esc[open] { animation: tp-esc-entra .22s ease-out; }
	@keyframes tp-esc-entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* «Mis datos» de verdad (inc/portal-datos.php): sin guardar todavía, errores por campo y el aviso de arriba del botón */
.tp-pc__estado--pendiente { color: var(--pc-dorado-texto); }
.tp-pc__campo--error input, .tp-pc__campo--error select, .tp-pc__campo--error textarea { border-color: #b3261e; box-shadow: 0 0 0 2px rgba(179, 38, 30, .15); }
.tp-pc__error-campo { display: block; margin-top: .3rem; color: #b3261e; font-size: .84rem; font-weight: 600; }
.tp-pc__datos-error { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 10px; background: #fdecea; color: #8c1d18; font-weight: 600; }
.tp-pc__datos-error[hidden], [data-pc-solo-casado][hidden] { display: none; }
/* El Seguro Social: campo de texto con máscara (no de contraseña, para que el navegador no lo guarde como una) */
.tp-pc__ssn-oculto { -webkit-text-security: disc; text-security: disc; }

/* «Contratistas (1099)» (inc/portal-1099.php): cada contratista, como un dependiente; el resumen y el aviso de «menos del mínimo» */
.tp-pc__ct-resumen { margin: 1rem 0; padding: .6rem 1rem; border-radius: 12px; background: var(--pc-niebla); color: var(--pc-marino); font-weight: 800; }
.tp-pc__ct-bajo { display: block; margin-top: .3rem; color: var(--pc-dorado-texto); font-size: .84rem; font-weight: 600; }
.tp-pc__ct-bajo[hidden], .tp-pc__vacio[hidden] { display: none; }
/* Cada contratista en una línea numerada (nombre, lo pagado y «Editar»); abierto, su ficha */
.tp-pc__ct-linea { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.tp-pc__ct-linea[hidden], [data-pc-ct-cuerpo][hidden] { display: none; }
.tp-pc__ct-num { flex: none; min-width: 1.5rem; color: var(--pc-marino); font-weight: 800; }
.tp-pc__ct-nombre { flex: 1 1 10rem; min-width: 0; overflow-wrap: anywhere; color: var(--pc-marino); font-weight: 700; }
/* Lo pagado y «Editar», a la derecha (en el móvil, en la segunda línea) */
.tp-pc__ct-pagado { margin-inline-start: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.tp-pc__contratista[data-pc-ct-cerrada] { padding: .7rem 1.1rem; }
.tp-pc__contratista[data-pc-ct-cerrada] > legend { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tp-pc__contratistas .tp-pc__botones { margin-top: 1rem; }

/* Una cuenta con varias clínicas (inc/portal-clinicas.php, 2026-11-20): «Clínica: …» encima del saludo */
.tp-pc .tp-pc__clinica { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; margin: 0 0 1rem; padding: 1rem 1.2rem; border-color: var(--pc-dorado-oscuro); }
.tp-pc__clinica label { font-size: 1rem; }
.tp-pc__clinica select { flex: 1 1 14rem; min-width: 0; max-width: 100%; min-height: 48px; padding: .5rem .8rem; border: 1px solid var(--pc-linea); border-radius: 12px; background: #fff; color: inherit; font: 600 1rem var(--pc-texto); }
.tp-pc__clinica .tp-pc__boton { min-height: 48px; padding: .6rem 1.3rem; }
.tp-pc .tp-pc__clinica .tp-pc__nota { flex-basis: 100%; margin: 0; }
