/* PROTEA Admin Frontend — chrome MVP.
   Estilos mínimos con clases semánticas BEM listas para que diseño sustituya
   los valores. Reusa los tokens de paleta ya definidos en admin.css/public.css.
   --------------------------------------------------------------------------- */

:root {
	--pst-a-orange: #FF3401;
	--pst-a-orange-dark: #DE2D00;
	--pst-a-orange-soft: #FFE3DC;
	--pst-a-blue: #3D8CF1;
	--pst-a-blue-soft: #E8F2FF;
	--pst-a-teal: #2F7A6B;
	--pst-a-teal-soft: #E3F1EE;
	--pst-a-sand: #B46F2B;
	--pst-a-sand-soft: #FBEFDE;
	--pst-a-ink: #1F2937;
	--pst-a-muted: #6B7280;
	--pst-a-border: #D1D5DB;
	--pst-a-border-soft: #E5E7EB;
	--pst-a-bg: #FFFFFF;
	--pst-a-bg-alt: #F9FAFB;
	--pst-a-danger: #DC2626;
	--pst-a-success: #16A34A;

	--pst-admin-header-h: 64px;
	--pst-admin-sidebar-w: 240px;
	--pst-admin-content-max: 1280px;
}

/* Reset suave y base ---------------------------------------------------- */

/* WP empuja `html` con margin-top cuando muestra la admin bar; el filtro
   `show_admin_bar` la oculta en /admin/, pero hay temas/plugins que la
   re-inyectan. Forzamos margen 0 y, si el WP admin bar aparece a pesar
   del filtro, lo ocultamos visualmente. */
html.pst-admin-html, html.pst-admin-html.wp-toolbar { margin-top: 0 !important; padding-top: 0 !important; }
body.pst-admin #wpadminbar { display: none !important; }

html, body {
	margin: 0;
	padding: 0;
	background: var(--pst-a-bg-alt);
	color: var(--pst-a-ink);
	font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

* { box-sizing: border-box; }

/* Reset de enlaces dentro del panel — sube especificidad para ganarle al
   tema activo de WP (que suele forzar text-decoration: underline en todos
   los `a`). Por defecto sin subrayado; solo subraya al hover en links
   "de contenido" (no en chrome ni botones). */
.pst-admin a { color: var(--pst-a-blue); text-decoration: none; }
.pst-admin a:hover { text-decoration: none; }

/* Excepción: links explícitos dentro de celdas (raros, normalmente la fila
   entera es clicable via data-href + JS) se subrayan al hover. */
.pst-admin .pst-table tbody a:hover { text-decoration: underline; }

/* Chrome (logo, breadcrumb, sidebar, header, botones) nunca se subraya. */
.pst-admin .pst-admin__brand,
.pst-admin .pst-admin__brand:hover,
.pst-admin .pst-admin__breadcrumb a,
.pst-admin .pst-admin__breadcrumb a:hover,
.pst-admin .pst-admin__nav-link,
.pst-admin .pst-admin__nav-link:hover,
.pst-admin .pst-admin__user-logout,
.pst-admin .pst-admin__user-logout:hover,
.pst-admin .pst-admin__nav-wp-link,
.pst-admin .pst-admin__nav-wp-link:hover,
.pst-admin .pst-btn,
.pst-admin .pst-btn:hover { text-decoration: none; }

.pst-admin h1, .pst-admin h2, .pst-admin h3, .pst-admin h4 { margin: 0 0 0.5em; font-weight: 600; color: var(--pst-a-ink); }
.pst-admin p { margin: 0 0 1em; }

.pst-admin__skip-link {
	position: absolute;
	top: -40px; left: 0;
	background: var(--pst-a-ink); color: #fff;
	padding: 8px 16px; z-index: 9999;
}
.pst-admin__skip-link:focus { top: 0; }

/* Header ---------------------------------------------------------------- */

.pst-admin__header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--pst-admin-header-h);
	background: var(--pst-a-bg);
	border-bottom: 1px solid var(--pst-a-border-soft);
}

.pst-admin__header-inner {
	display: flex;
	align-items: center;
	height: 100%;
	padding: 0 24px 0 27px;
	gap: 24px;
}

.pst-admin__brand {
	display: flex;
	align-items: center;
	gap: 0;
	color: var(--pst-a-ink);
	font-weight: 700;
	letter-spacing: 0.02em;
	flex: 0 0 auto;
}
.pst-admin__brand:hover { text-decoration: none; }
.pst-admin__brand-logo {
	display: block;
	height: 45px;
	width: auto;
}
.pst-admin__brand-name {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: var(--pst-orange);
	text-transform: uppercase;
}

.pst-admin__breadcrumb {
	flex: 1;
	margin-left: calc(var(--pst-admin-sidebar-w) - 220px);
}
.pst-admin__breadcrumb-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; font-size: 13px; color: var(--pst-a-muted); }
.pst-admin__breadcrumb-item:not(:last-child)::after { content: "›"; padding-left: 8px; color: var(--pst-a-border); }
.pst-admin__breadcrumb-item--current { color: var(--pst-a-ink); font-weight: 500; }

.pst-admin__user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.pst-admin__user-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px; height: 32px;
	border-radius: 50%;
	background: var(--pst-a-orange-soft);
	color: var(--pst-a-orange);
	font-weight: 600;
}
.pst-admin__user-name { color: var(--pst-a-ink); text-decoration: none; }
.pst-admin__user-name:hover { color: var(--pst-a-orange); text-decoration: underline; }
.pst-admin__user-logout { color: var(--pst-a-muted); }
.pst-admin__user-logout:hover { color: var(--pst-a-danger); }

/* Shell + sidebar ------------------------------------------------------- */

.pst-admin__shell {
	display: grid;
	grid-template-columns: var(--pst-admin-sidebar-w) 1fr;
	min-height: calc(100vh - var(--pst-admin-header-h));
}

.pst-admin__sidebar {
	background: var(--pst-a-bg);
	border-right: 1px solid var(--pst-a-border-soft);
	padding: 24px 0;
	position: sticky;
	top: var(--pst-admin-header-h);
	height: calc(100vh - var(--pst-admin-header-h));
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

.pst-admin__nav-group { margin-bottom: 24px; }
.pst-admin__nav-heading {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--pst-a-muted);
	margin: 0 0 8px;
	padding: 0 24px;
}
.pst-admin__nav-list { list-style: none; margin: 0; padding: 0; }
.pst-admin__nav-item { margin: 0; }
.pst-admin__nav-link {
	display: block;
	padding: 10px 24px;
	color: var(--pst-a-ink);
	font-size: 14px;
	border-left: 3px solid transparent;
}
.pst-admin__nav-link:hover { background: var(--pst-a-bg-alt); text-decoration: none; }
.pst-admin__nav-item.is-active .pst-admin__nav-link {
	background: var(--pst-a-orange-soft);
	color: var(--pst-a-orange);
	border-left-color: var(--pst-a-orange);
	font-weight: 600;
}

.pst-admin__nav-foot {
	margin-top: auto;
	padding: 16px 24px;
	border-top: 1px solid var(--pst-a-border-soft);
}
.pst-admin__nav-wp-link { font-size: 12px; color: var(--pst-a-muted); }

/* Main / content -------------------------------------------------------- */

.pst-admin__main {
	padding: 32px;
	max-width: var(--pst-admin-content-max);
	width: 100%;
}

/* Más ancho útil para el editor de cuestionarios. */
.pst-admin--section-cuestionarios .pst-admin__main {
	max-width: 1680px;
}

/* Notices --------------------------------------------------------------- */

.pst-admin__notice {
	margin-bottom: 24px;
	padding: 12px 16px;
	border-radius: 4px;
	border: 1px solid;
}
.pst-admin__notice--success { background: var(--pst-a-teal-soft); border-color: var(--pst-a-teal); color: var(--pst-a-teal); }
.pst-admin__notice--error   { background: #FDECEC; border-color: var(--pst-a-danger); color: var(--pst-a-danger); }
.pst-admin__notice--info    { background: var(--pst-a-blue-soft); border-color: var(--pst-a-blue); color: var(--pst-a-blue); }
.pst-admin__notice-message { margin: 0; font-size: 13px; }

/* Page header / toolbar ------------------------------------------------- */

.pst-page__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}
.pst-page__title { font-size: 24px; font-weight: 700; margin: 0; }
.pst-page__subtitle { font-size: 14px; color: var(--pst-a-muted); margin: 4px 0 0; }
.pst-page__actions { display: flex; gap: 8px; }

.pst-page__toolbar {
	display: flex;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

/* Botones --------------------------------------------------------------- */
/* Reglas prefijadas con `.pst-admin` para superar a `.pst-admin a` (que el
   theme bleed obliga a fijar a azul). Sin el prefijo, los <a class="pst-btn">
   heredarían el azul de los enlaces. */

.pst-admin .pst-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 16px;
	border-radius: 4px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--pst-a-ink);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 120ms, border-color 120ms, color 120ms;
}
.pst-admin .pst-btn:hover { text-decoration: none; }

.pst-admin .pst-btn--primary,
.pst-admin a.pst-btn--primary { background: var(--pst-a-orange); color: #fff; }
.pst-admin .pst-btn--primary:hover,
.pst-admin a.pst-btn--primary:hover { background: var(--pst-a-orange-dark); color: #fff; }

.pst-admin .pst-btn--secondary,
.pst-admin a.pst-btn--secondary { background: var(--pst-a-blue); color: #fff; }
.pst-admin .pst-btn--secondary:hover,
.pst-admin a.pst-btn--secondary:hover { background: var(--pst-a-blue); filter: brightness(0.92); color: #fff; }

.pst-admin .pst-btn--outline,
.pst-admin a.pst-btn--outline { border-color: var(--pst-a-border); color: var(--pst-a-ink); background: var(--pst-a-bg); }
.pst-admin .pst-btn--outline:hover,
.pst-admin a.pst-btn--outline:hover { border-color: var(--pst-a-ink); color: var(--pst-a-ink); }

.pst-admin .pst-btn--ghost,
.pst-admin a.pst-btn--ghost { color: var(--pst-a-blue); }
.pst-admin .pst-btn--ghost:hover,
.pst-admin a.pst-btn--ghost:hover { background: var(--pst-a-blue-soft); color: var(--pst-a-blue); }

.pst-admin .pst-btn--danger,
.pst-admin a.pst-btn--danger { border-color: var(--pst-a-danger); color: var(--pst-a-danger); background: var(--pst-a-bg); }
.pst-admin .pst-btn--danger:hover,
.pst-admin a.pst-btn--danger:hover { background: var(--pst-a-danger); color: #fff; }

.pst-admin .pst-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.pst-admin .pst-btn[disabled],
.pst-admin .pst-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Cards / paneles ------------------------------------------------------- */

.pst-card {
	background: var(--pst-a-bg);
	border: 1px solid var(--pst-a-border-soft);
	border-radius: 6px;
	padding: 24px;
}
.pst-card + .pst-card { margin-top: 16px; }
.pst-card__title { font-size: 16px; font-weight: 600; margin: 0 0 12px; }

/* KPI grid -------------------------------------------------------------- */

.pst-kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 32px;
}
.pst-kpi {
	background: var(--pst-a-bg);
	border: 1px solid var(--pst-a-border-soft);
	border-radius: 6px;
	padding: 20px;
}
.pst-kpi__label { font-size: 12px; color: var(--pst-a-muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 8px; }
.pst-kpi__value { font-size: 28px; font-weight: 700; color: var(--pst-a-ink); margin: 0; }

/* Tablas ---------------------------------------------------------------- */

.pst-table-wrap { background: var(--pst-a-bg); border: 1px solid var(--pst-a-border-soft); border-radius: 6px; overflow: hidden; }
.pst-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pst-table th, .pst-table td { text-align: left; padding: 12px 16px; vertical-align: middle; }
.pst-table thead th { background: var(--pst-a-bg-alt); color: var(--pst-a-muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--pst-a-border-soft); }
.pst-table thead th a { color: inherit; text-decoration: none; display: inline-block; }
.pst-table thead th a:hover { color: var(--pst-a-orange); }

/* Bar de filtros sobre listados ---------------------------------------- */
.pst-filters { margin-bottom: 16px; }
.pst-filters__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.pst-filters__field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; flex: 0 1 200px; }
.pst-filters__label { font-size: 12px; color: var(--pst-a-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pst-filters__actions { display: flex; gap: 8px; align-items: center; }
.pst-filters__summary { margin: 8px 0 0; font-size: 13px; color: var(--pst-a-muted); }

/* Bulk actions sobre listados ----------------------------------------- */
.pst-table__check { width: 1%; white-space: nowrap; }
.pst-table__check input[type="checkbox"] { margin: 0; cursor: pointer; }
.pst-bulk-bar { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-top: 12px; background: var(--pst-a-bg-alt); border: 1px solid var(--pst-a-border-soft); border-radius: 6px; }
.pst-bulk-bar__count { font-size: 13px; color: var(--pst-a-muted); margin-right: auto; }
.pst-table tbody tr { border-bottom: 1px solid var(--pst-a-border-soft); }
.pst-table tbody tr:last-child { border-bottom: 0; }
.pst-table tbody tr:hover { background: var(--pst-a-bg-alt); }
.pst-table__actions { width: 1%; white-space: nowrap; text-align: right; }

/* Fila clicable: el JS añade row-click sobre <tr data-href>. Se mantiene
   cursor pointer sólo en el área no-interactiva (acciones siguen normal). */
.pst-table tbody tr[data-href] { cursor: pointer; }
.pst-table tbody tr[data-href] td.pst-table__actions { cursor: default; }
.pst-table tbody tr[data-href]:focus { outline: 2px solid var(--pst-a-orange); outline-offset: -2px; }

/* Badges ---------------------------------------------------------------- */

.pst-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 500;
}
.pst-badge--draft    { background: var(--pst-a-border-soft); color: var(--pst-a-muted); }
.pst-badge--scheduled{ background: var(--pst-a-blue-soft);   color: var(--pst-a-blue); }
.pst-badge--open     { background: var(--pst-a-sand-soft);   color: var(--pst-a-sand); }
.pst-badge--closed   { background: var(--pst-a-teal-soft);   color: var(--pst-a-teal); }

/* Forms ----------------------------------------------------------------- */

.pst-form { max-width: 800px; }
.pst-admin .pst-cuestionario-form { max-width: none; }
.pst-form__row { margin-bottom: 16px; }
.pst-form__row--inline { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pst-form__row--two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .pst-form__row--two-col { grid-template-columns: 1fr; } }

.pst-form__label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--pst-a-ink);
	margin-bottom: 4px;
}
.pst-form__required { color: var(--pst-a-danger); }

.pst-input {
	width: 100%;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--pst-a-border);
	border-radius: 4px;
	background: var(--pst-a-bg);
	color: var(--pst-a-ink);
	font-size: 14px;
	font-family: inherit;
}
.pst-input:focus {
	outline: 0;
	border-color: var(--pst-a-orange);
	box-shadow: 0 0 0 3px var(--pst-a-orange-soft);
}
.pst-input--textarea { height: auto; padding: 10px 12px; resize: vertical; }
.pst-input--search { background-image: none; }
.pst-input--filter { width: auto; min-width: 160px; }
.pst-input:disabled { background: var(--pst-a-bg-alt); color: var(--pst-a-muted); cursor: not-allowed; }

.pst-form__actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--pst-a-border-soft);
}

/* Empty state ----------------------------------------------------------- */

.pst-empty {
	background: var(--pst-a-bg);
	border: 1px dashed var(--pst-a-border);
	border-radius: 6px;
	padding: 48px 24px;
	text-align: center;
}
.pst-empty__title { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.pst-empty__text { font-size: 14px; color: var(--pst-a-muted); margin: 0 0 16px; }

/* Import CSV: detalle del resultado ------------------------------------ */

.pst-import-details { margin-top: 16px; padding: 12px; border: 1px solid var(--pst-a-border-soft); border-radius: 4px; background: var(--pst-a-bg-alt); }
.pst-import-details summary { cursor: pointer; font-weight: 500; color: var(--pst-a-ink); }
.pst-import-details[open] summary { margin-bottom: 12px; }
.pst-import-list { list-style: disc; margin: 0 0 0 20px; padding: 0; font-size: 13px; color: var(--pst-a-muted); }
.pst-import-list li { margin: 4px 0; }

/* Tabs del editor de cuestionarios (E2.1 Fase 2) ----------------------- */
/* Pills horizontales con la activa en outline naranja. Cambia paneles
   client-side via hash en URL (#preguntas / #configuracion). */

.pst-admin .pst-editor-tabs {
	display: flex;
	gap: 4px;
	margin: 0 0 24px;
	padding: 4px;
	background: var(--pst-a-bg-alt);
	border-radius: 999px;
	width: fit-content;
}
.pst-admin .pst-editor-tabs__item {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 16px;
	border-radius: 999px;
	border: 1px solid transparent;
	color: var(--pst-a-muted);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	transition: color 120ms, border-color 120ms, background-color 120ms;
}
.pst-admin .pst-editor-tabs__item:hover {
	color: var(--pst-a-ink);
	text-decoration: none;
}
.pst-admin .pst-editor-tabs__item.is-active {
	background: var(--pst-a-bg);
	border-color: var(--pst-a-orange);
	color: var(--pst-a-orange);
}

.pst-admin .pst-editor-panel[hidden] { display: none; }

/* Compatibilidad con clases wp-admin que reusa el editor v1 ------------ */
/* El editor de cuestionarios sigue usando `.wrap`, `.wp-heading-inline`,
   `.page-title-action`, `.notice notice-error`, etc. (heredado de wp-admin).
   Aquí los re-styleamos para que encajen en el chrome del panel. */

.pst-admin .wrap {
	margin: 0;
	max-width: none;
}

.pst-admin .wrap > h1.wp-heading-inline {
	font-size: 24px;
	font-weight: 700;
	color: var(--pst-a-ink);
	margin: 0 0 8px;
	display: inline-block;
	vertical-align: middle;
}

.pst-admin .wrap > .page-title-action,
.pst-admin .page-title-action {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 12px;
	margin-left: 8px;
	border: 1px solid var(--pst-a-border);
	border-radius: 4px;
	background: var(--pst-a-bg);
	color: var(--pst-a-ink);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	vertical-align: middle;
	transition: border-color 120ms, background-color 120ms;
}
.pst-admin .wrap > .page-title-action:hover,
.pst-admin .page-title-action:hover {
	border-color: var(--pst-a-ink);
	background: var(--pst-a-bg-alt);
	text-decoration: none;
	color: var(--pst-a-ink);
}

.pst-admin .wrap > hr.wp-header-end {
	border: 0;
	border-top: 1px solid var(--pst-a-border-soft);
	margin: 16px 0 24px;
}

/* Notices estilo wp-admin (`.notice .notice-error`, etc.) en el panel. */
.pst-admin .notice {
	margin: 0 0 16px;
	padding: 12px 16px;
	border-radius: 4px;
	border: 1px solid;
	background: var(--pst-a-bg);
}
.pst-admin .notice p { margin: 0; font-size: 13px; }
.pst-admin .notice-error { border-color: var(--pst-a-danger); background: #FDECEC; color: var(--pst-a-danger); }
.pst-admin .notice-success { border-color: var(--pst-a-success); background: var(--pst-a-teal-soft); color: var(--pst-a-teal); }
.pst-admin .notice-info { border-color: var(--pst-a-blue); background: var(--pst-a-blue-soft); color: var(--pst-a-blue); }
.pst-admin .notice-warning { border-color: var(--pst-a-sand); background: var(--pst-a-sand-soft); color: var(--pst-a-sand); }
.pst-admin .pst-hijo-banner { border-left: 4px solid var(--pst-a-blue); }

/* Form compat del editor de cuestionarios fuera de wp-admin ------------ */

.pst-admin .pst-cuestionario-form .form-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 20px;
}
.pst-admin .pst-cuestionario-form .form-table th,
.pst-admin .pst-cuestionario-form .form-table td {
	padding: 8px 10px 8px 0;
	vertical-align: top;
}
.pst-admin .pst-cuestionario-form .form-table th {
	width: 160px;
	font-size: 13px;
	font-weight: 600;
	color: var(--pst-a-ink);
}
.pst-admin .pst-cuestionario-form .form-table td label {
	font-size: 13px;
	font-weight: 500;
	color: var(--pst-a-ink);
}
.pst-admin .pst-cuestionario-form input[type="text"],
.pst-admin .pst-cuestionario-form input[type="email"],
.pst-admin .pst-cuestionario-form input[type="number"],
.pst-admin .pst-cuestionario-form textarea,
.pst-admin .pst-cuestionario-form select {
	font-family: inherit;
	font-size: 14px;
	line-height: 1.35;
	color: var(--pst-a-ink);
	border: 1px solid var(--pst-a-border);
	border-radius: 4px;
	background: var(--pst-a-bg);
}
.pst-admin .pst-cuestionario-form .regular-text {
	width: min(100%, 640px);
}
.pst-admin .pst-cuestionario-form .large-text {
	width: min(100%, 860px);
}
.pst-admin .pst-cuestionario-form textarea {
	min-height: 84px;
	padding: 8px 10px;
	resize: vertical;
}
.pst-admin .pst-cuestionario-form input[type="text"],
.pst-admin .pst-cuestionario-form input[type="email"],
.pst-admin .pst-cuestionario-form input[type="number"],
.pst-admin .pst-cuestionario-form select {
	height: 34px;
	padding: 0 10px;
}
.pst-admin .pst-cuestionario-form input:focus,
.pst-admin .pst-cuestionario-form textarea:focus,
.pst-admin .pst-cuestionario-form select:focus {
	outline: none;
	border-color: var(--pst-a-orange);
	box-shadow: 0 0 0 2px rgba(233, 84, 30, 0.16);
}

/* Asignar empleados (lista de checkboxes) ------------------------------ */

.pst-assign-toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }
.pst-assign-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--pst-a-border-soft); border-radius: 4px; padding: 8px; margin-bottom: 16px; }
.pst-assign-list__item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 4px; cursor: pointer; }
.pst-assign-list__item:hover { background: var(--pst-a-bg-alt); }
.pst-assign-list__item input[type="checkbox"] { margin: 0; }

/* Definition list (datos del ciclo, etc.) ------------------------------ */

.pst-data-list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
@media (max-width: 640px) { .pst-data-list { grid-template-columns: 1fr; } }
.pst-data-list > div { display: flex; flex-direction: column; gap: 4px; }
.pst-data-list dt { font-size: 12px; color: var(--pst-a-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pst-data-list dd { margin: 0; font-size: 14px; color: var(--pst-a-ink); }

/* Respuestas detail (render del cuestionario con valores) -------------- */

.pst-respuesta-seccion { margin: 16px 0 24px; }
.pst-respuesta-seccion h3 { font-size: 14px; color: var(--pst-a-muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 12px; }
.pst-respuesta-subseccion { margin: 16px 0; padding-left: 16px; border-left: 2px solid var(--pst-a-border-soft); }
.pst-respuesta-subseccion h4 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.pst-respuesta-pregunta-list { margin: 0; }
.pst-respuesta-item { padding: 12px 0; border-bottom: 1px solid var(--pst-a-border-soft); }
.pst-respuesta-item:last-child { border-bottom: 0; }
.pst-respuesta-item__pregunta { display: flex; gap: 8px; align-items: baseline; font-weight: 500; margin-bottom: 6px; }
.pst-respuesta-item__key { flex: 0 0 auto; align-self: flex-start; padding: 2px 6px; border-radius: 3px; background: var(--pst-a-bg-alt); color: var(--pst-a-muted); font-size: 11px; font-family: monospace; line-height: 1.4; }
.pst-respuesta-item__texto { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.pst-respuesta-item__valor { margin: 0; padding-left: 0; color: var(--pst-a-ink); word-break: break-word; }
.pst-answer-empty { color: var(--pst-a-muted); font-style: italic; }
.pst-stars-readonly { color: var(--pst-a-orange); letter-spacing: 2px; }

/* Cuestionario detail (read-only) -------------------------------------- */

.pst-cuestionario-seccion { margin: 16px 0 24px; }
.pst-cuestionario-seccion h3 { font-size: 14px; color: var(--pst-a-muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 8px; }
.pst-cuestionario-subsecciones { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--pst-a-border-soft); }
.pst-cuestionario-subsecciones li { padding: 8px 16px; border-bottom: 1px solid var(--pst-a-border-soft); display: flex; justify-content: space-between; gap: 12px; }
.pst-cuestionario-subsecciones li:last-child { border-bottom: 0; }
.pst-muted { color: var(--pst-a-muted); font-size: 12px; }

/* Progress bar (KPIs de ciclo) ----------------------------------------- */

.pst-progress { display: flex; align-items: center; gap: 8px; }
.pst-progress__bar { flex: 1; height: 4px; background: var(--pst-a-border-soft); border-radius: 999px; overflow: hidden; }
.pst-progress__fill { height: 100%; background: var(--pst-a-orange); }
.pst-progress__label { font-size: 12px; color: var(--pst-a-muted); min-width: 40px; text-align: right; }

/* Responsive ------------------------------------------------------------ */

@media (max-width: 960px) {
	.pst-admin__breadcrumb { margin-left: 0; }
	.pst-admin__shell {
		grid-template-columns: 1fr;
	}
	.pst-admin__sidebar {
		position: static;
		height: auto;
		border-right: 0;
		border-bottom: 1px solid var(--pst-a-border-soft);
	}
	.pst-admin__main { padding: 20px; }
}

/* Login ----------------------------------------------------------------- */

html.pst-login-html,
body.pst-login {
	height: 100%;
	min-height: 100vh;
}

body.pst-login {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--pst-a-bg-alt);
	padding: 24px;
}

.pst-login__wrap {
	width: 100%;
	max-width: 420px;
}

.pst-login__card {
	background: var(--pst-a-bg);
	border: 1px solid var(--pst-a-border-soft);
	border-radius: 8px;
	padding: 40px 36px;
}

.pst-login__brand {
	display: flex;
	justify-content: center;
	margin-bottom: 28px;
}

.pst-login__logo {
	display: block;
	max-height: 56px;
	width: auto;
}

.pst-login__logo-text {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.06em;
	color: var(--pst-a-orange);
	text-transform: uppercase;
}

.pst-login__title {
	font-size: 18px;
	font-weight: 700;
	color: var(--pst-a-ink);
	margin: 0 0 24px;
	text-align: center;
}

.pst-login__error {
	background: #FDECEC;
	border: 1px solid var(--pst-a-danger);
	color: var(--pst-a-danger);
	border-radius: 4px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 20px;
}

.pst-login__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pst-login__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pst-login__label {
	font-size: 13px;
	font-weight: 500;
	color: var(--pst-a-ink);
}

.pst-login__input {
	width: 100%;
}

.pst-login__remember {
	display: flex;
	align-items: center;
}

.pst-login__check-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--pst-a-muted);
	cursor: pointer;
}

.pst-login__check-label input[type="checkbox"] {
	accent-color: var(--pst-a-orange);
	width: 15px;
	height: 15px;
	cursor: pointer;
}

.pst-login__submit {
	width: 100%;
	height: 44px;
	font-size: 15px;
	margin-top: 4px;
}

@media (max-width: 480px) {
	.pst-login__card { padding: 28px 20px; }
}
