/* Perfil del Contratante V2 — estilos del front */

.pcv2-wrap{max-width:1000px;margin:2em auto;font-family:inherit;color:#333;}

/* Pestañas */
.pcv2-tabs-nav{display:flex;flex-wrap:wrap;gap:.5em;border-bottom:2px solid #e2e2e2;margin-bottom:1.5em;}
.pcv2-tab-btn{
	display:inline-block;background:#f4f4f4;border:none;border-radius:6px 6px 0 0;
	padding:.75em 1.25em;font-weight:600;color:#555;text-decoration:none;
}
.pcv2-tab-btn:hover{background:#e6e6e6;}
.pcv2-tab-btn.is-active{background:#0a4c8a;color:#fff;}

/* Filtros */
.pcv2-filtros{display:flex;flex-wrap:wrap;gap:1.5em;align-items:center;margin-bottom:1.5em;padding:.75em 1em;background:#f7f7f7;border-radius:6px;}
.pcv2-filtros label{font-weight:600;}
.pcv2-filtros select{margin-left:.4em;font-weight:400;}

.pcv2-empty{padding:2em;text-align:center;color:#777;background:#f7f7f7;border-radius:6px;}
.pcv2-count{color:#777;font-size:.9em;margin-top:1em;}

/* Listado / fichas de expediente ---------------------------------- */
.pcv2-list{display:flex;flex-direction:column;gap:.6em;}

.pcv2-item{border:1px solid #e2e2e2;border-radius:6px;background:#fff;overflow:hidden;}
.pcv2-item-summary{
	cursor:pointer;list-style:none;display:flex;align-items:center;gap:1em;
	padding:.9em 1.2em;
}
.pcv2-item-summary::-webkit-details-marker{display:none;}
.pcv2-item-summary::after{content:"+ ver ficha";margin-left:auto;font-size:.85em;color:#0a4c8a;white-space:nowrap;}
.pcv2-item[open] .pcv2-item-summary::after{content:"– ocultar ficha";}

.pcv2-cell-numero{flex:0 0 130px;font-weight:700;color:#0a4c8a;}
.pcv2-cell-titulo{flex:1 1 auto;}
.pcv2-cell-fecha{flex:0 0 150px;color:#666;}
.pcv2-cell-estado{flex:0 0 120px;text-align:right;}

.pcv2-badge{
	display:inline-block;padding:.25em .7em;border-radius:999px;font-size:.8em;font-weight:700;color:#fff;
}
.pcv2-badge-abierta{background:#1a7f37;}
.pcv2-badge-cerrada{background:#6e7781;}
.pcv2-badge-adjudicada{background:#0a4c8a;}
.pcv2-badge-suspendida{background:#b32d2e;}

.pcv2-item-detalle{padding:0 1.2em 1.2em;border-top:1px solid #eee;}
.pcv2-item-detalle dl{display:grid;grid-template-columns:200px 1fr;gap:.5em 1em;margin:1em 0 0;}
.pcv2-item-detalle dt{font-weight:700;color:#555;}
.pcv2-item-detalle dd{margin:0;}

.pcv2-docs-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5em;}
.pcv2-docs-list a{display:inline-flex;align-items:center;gap:.5em;color:#0a4c8a;text-decoration:none;font-weight:500;}
.pcv2-docs-list a:hover{text-decoration:underline;}
.pcv2-icon{
	display:inline-flex;align-items:center;justify-content:center;width:1.4em;height:1.4em;
	border-radius:50%;background:#0a4c8a;color:#fff;font-size:.75em;flex-shrink:0;
}

/* Paginación */
.pcv2-paginacion{display:flex;align-items:center;gap:1em;justify-content:center;margin-top:1.5em;}
.pcv2-pg-link{color:#0a4c8a;font-weight:600;text-decoration:none;}
.pcv2-pg-link:hover{text-decoration:underline;}
.pcv2-pg-status{color:#777;}

/* Contratos menores (años / trimestres) */
.pcv2-year{border:1px solid #e2e2e2;border-radius:6px;margin-bottom:.75em;overflow:hidden;}
.pcv2-year summary{cursor:pointer;list-style:none;padding:.9em 1.2em;font-weight:700;background:#f7f7f7;color:#0a4c8a;}
.pcv2-year summary::-webkit-details-marker{display:none;}
.pcv2-year summary::after{content:"+";float:right;}
.pcv2-year[open] summary::after{content:"–";}
.pcv2-year-body{padding:1em 1.2em;}

.pcv2-menores-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.7em;}
.pcv2-menor-link{display:inline-flex;align-items:center;gap:.6em;color:#0a4c8a;text-decoration:none;font-weight:600;}
.pcv2-menor-link:hover{text-decoration:underline;}
.pcv2-menor-pendiente{color:#999;font-weight:600;}
.pcv2-menor-pendiente em{font-weight:400;}

/* ------------------------------------------------------------------ *
 * Responsive: en móvil, cada "fila" pasa de línea horizontal a tarjeta
 * apilada, mostrando la etiqueta de cada dato (patrón tabla -> tarjetas)
 * ------------------------------------------------------------------ */
@media (max-width:700px){
	.pcv2-tab-btn{flex:1 1 100%;text-align:left;}

	.pcv2-item-summary{flex-direction:column;align-items:stretch;gap:.4em;}
	.pcv2-item-summary::after{margin-left:0;}

	.pcv2-cell{display:flex;justify-content:space-between;gap:1em;}
	.pcv2-cell::before{content:attr(data-label);font-weight:700;color:#777;font-size:.8em;}
	.pcv2-cell-numero,.pcv2-cell-titulo,.pcv2-cell-fecha,.pcv2-cell-estado{flex:none;text-align:right;}

	.pcv2-item-detalle dl{grid-template-columns:1fr;}
	.pcv2-item-detalle dt{margin-top:.75em;}
}
