/* Estilo institucional de la plataforma de Papanicolaou, SOLCA Núcleo de Loja.
   Sin dependencias externas ni variables CSS, para que funcione igual en
   navegadores antiguos de las unidades y sin acceso a Internet. */

html, body { margin: 0; padding: 0; }
body {
	background: #F3F5F9;
	color: #1F2937;
	font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	/* El pie queda al fondo aunque haya poco contenido */
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
a { color: #0B6494; }
a:hover { color: #074A6E; }
h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px 0; color: #0B6494; }
h2 { font-size: 17px; font-weight: 600; margin: 24px 0 8px 0; color: #0F172A; }
h3 { font-size: 15px; font-weight: 600; font-style: normal; margin: 16px 0 8px 0; color: #0F172A; }
h3 hr, h1 hr { display: none; }

/* Cabecera: blanca, con el logo institucional como en los comunicados */
.barra-superior {
	background: #FFFFFF;
	border-bottom: 3px solid #0B6494;
	display: flex;
	align-items: center;
	padding: 0 24px;
	height: 64px;
	/* La cabecera queda fija al desplazarse en páginas largas */
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 100;
	flex-shrink: 0;
}
.marca { display: flex; align-items: center; text-decoration: none; margin-right: 32px; color: #0B6494; }
.marca img { height: 44px; width: auto; margin-right: 14px; padding-right: 14px; border-right: 1px solid #C9D9E5; }
.marca-texto { line-height: 1.2; color: #0B6494; }
.marca-texto strong { display: block; font-size: 16px; font-weight: 700; }
.marca-texto span { font-size: 12px; color: #5B6475; }

.menu-principal { display: flex; height: 100%; flex: 1; margin: 0; padding: 0; list-style: none; }
.menu-principal > li { position: relative; }
.menu-principal > li > a {
	display: block; height: 61px; line-height: 64px; padding: 0 14px;
	color: #344054; text-decoration: none; font-weight: 600;
	border-bottom: 3px solid transparent;
}
.menu-principal > li > a:hover { color: #0B6494; background: #F3F8FB; }
.menu-principal > li.active > a { color: #0B6494; border-bottom-color: #0B6494; }
.menu-principal ul {
	display: none; position: absolute; top: 64px; left: 0; min-width: 220px; z-index: 20;
	background: #FFFFFF; border: 1px solid #D9DEE7; border-radius: 0 0 6px 6px;
	box-shadow: 0 6px 16px rgba(15, 23, 42, .12); list-style: none; margin: 0; padding: 6px 0;
}
.menu-principal li:hover ul, .menu-principal li:focus-within ul { display: block; }
.menu-principal ul a { display: block; padding: 8px 16px; color: #1F2937; text-decoration: none; }
.menu-principal ul a:hover { background: #E8F2F8; color: #0B6494; }
.menu-usuario { margin-left: auto; }
.menu-usuario > a { font-weight: 500 !important; }
.menu-usuario ul { left: auto; right: 0; }

/* Migas y contenido */
.migas { margin: 0; padding: 12px 24px 0 24px; font-size: 13px; color: #5B6475; }
.migas a { color: #5B6475; text-decoration: none; }
.migas a:hover { text-decoration: underline; }
.migas span { color: #1F2937; }
.contenido { padding: 12px 24px 32px 24px; flex: 1 0 auto; }

.encabezado-pagina { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.encabezado-pagina p { margin: 0; color: #5B6475; }
.encabezado-pagina .acciones a { margin-left: 8px; }

.tarjeta {
	background: #FFFFFF; border: 1px solid #E2E6EE; border-radius: 8px;
	padding: 20px; margin-bottom: 16px;
}
.tarjeta > h2:first-child, .tarjeta > h3:first-child { margin-top: 0; }

/* Botones */
.boton, input[type=submit], input[type=button], button {
	display: inline-block; padding: 8px 16px; border-radius: 6px; border: 1px solid #C7CEDB;
	background: #FFFFFF; color: #1F2937; font: inherit; font-weight: 500; text-decoration: none;
	cursor: pointer; line-height: 1.3;
}
.boton:hover, input[type=button]:hover, button:hover { background: #F1F4F9; color: #0B6494; }
.boton-primario, input[type=submit] { background: #0B6494; border-color: #0B6494; color: #FFFFFF; }
.boton-primario:hover, input[type=submit]:hover { background: #0A577F; border-color: #0A577F; color: #FFFFFF; }
.boton-peligro { color: #B42318; border-color: #F1B8B2; }
.boton-peligro:hover { background: #FEF3F2; color: #912018; }

/* Estados de la solicitud */
.estado { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.estado-registrada { background: #E8F2F8; color: #0B6494; }
.estado-recibida { background: #FFF4D6; color: #7A4B00; }
.estado-resultado { background: #E3F4EA; color: #17653A; }

/* Progreso de la solicitud */
.pasos { display: flex; list-style: none; margin: 0 0 16px 0; padding: 0; }
.pasos li { flex: 1; position: relative; padding-top: 30px; text-align: center; font-size: 13px; color: #8A93A3; }
.pasos li:before {
	content: ""; position: absolute; top: 6px; left: 50%; margin-left: -9px;
	width: 14px; height: 14px; border-radius: 50%; background: #FFFFFF; border: 2px solid #C7CEDB; z-index: 1;
}
.pasos li:after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: #C7CEDB; }
.pasos li:first-child:after { display: none; }
.pasos li.hecho { color: #1F2937; }
.pasos li.hecho:before { background: #17653A; border-color: #17653A; }
.pasos li.hecho:after { background: #17653A; }
.pasos li small { display: block; color: #5B6475; }

/* Mensajes */
div.flash-success, div.flash-notice, div.flash-error {
	padding: 12px 16px; margin: 0 0 16px 0; border-radius: 6px; border: 1px solid; border-left-width: 4px;
}
div.flash-success { background: #ECF8F0; border-color: #17653A; color: #124D2D; }
div.flash-notice { background: #FFF8E6; border-color: #B7791F; color: #5C3D00; }
div.flash-error { background: #FEF3F2; border-color: #B42318; color: #7A1A12; }

/* Formularios */
div.form .row { margin: 0 0 14px 0; }
div.form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; color: #344054; }
div.form .rememberMe label, div.form input[type=radio] + label, div.form input[type=checkbox] + label { display: inline; font-weight: 400; }
div.form input[type=text], div.form input[type=password], div.form input[type=email], div.form input[type=date],
div.form select, div.form textarea {
	box-sizing: border-box; width: 100%; max-width: 420px; padding: 8px 10px; font: inherit;
	border: 1px solid #C7CEDB; border-radius: 6px; background: #FFFFFF; color: #1F2937;
}
div.form input:focus, div.form select:focus, div.form textarea:focus {
	outline: none; border-color: #0B6494; box-shadow: 0 0 0 3px rgba(11, 100, 148, .15);
}
div.form .rejilla { display: flex; flex-wrap: wrap; margin: 0 -10px; }
div.form .rejilla > .row { box-sizing: border-box; width: 33.33%; padding: 0 10px; min-width: 220px; }
div.form .note { color: #5B6475; font-size: 13px; }
div.form .required, span.required { color: #B42318; }
div.form .error input, div.form .error select, div.form .error textarea { border-color: #B42318; background: #FFFBFA; }
div.form .errorMessage { color: #B42318; font-size: 12px; margin-top: 4px; }
div.form .errorSummary { background: #FFF8E6; border: 1px solid #F0C36D; border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; color: #5C3D00; }
div.form .errorSummary p { margin: 0 0 6px 0; font-weight: 600; }
div.form .buttons { padding-top: 8px; border-top: 1px solid #E2E6EE; margin-top: 8px; }

/* Tablas (CGridView) */
.grid-view { padding-top: 0; }
.grid-view table.items { width: 100%; border-collapse: collapse; background: #FFFFFF; border: 1px solid #E2E6EE; }
.grid-view table.items th {
	background: #F7F8FB; color: #344054; font-size: 12px; font-weight: 600; text-transform: uppercase;
	letter-spacing: .02em; text-align: left; padding: 10px 12px; border-bottom: 1px solid #E2E6EE;
}
.grid-view table.items th a { color: #344054; text-decoration: none; }
.grid-view table.items td { padding: 10px 12px; border-bottom: 1px solid #EEF0F4; }
.grid-view table.items tr:hover td { background: #F3F8FB; }
.grid-view table.items tr.filters td { background: #FBFCFD; padding: 6px 12px; }
.grid-view table.items tr.filters input, .grid-view table.items tr.filters select {
	box-sizing: border-box; width: 100%; padding: 5px 8px; border: 1px solid #C7CEDB; border-radius: 4px; font: inherit; font-size: 13px;
}
.grid-view .summary { color: #5B6475; font-size: 13px; margin-bottom: 8px; text-align: right; }
.grid-view .empty { color: #5B6475; font-style: normal; }
.grid-view .pager { margin-top: 12px; text-align: right; }
/* Acciones de cada fila: íconos en una sola línea, con tooltip */
.grid-view td.columna-acciones, .grid-view th.columna-acciones { white-space: nowrap; width: 1%; text-align: right; }
.grid-view a.accion {
	display: inline-block; vertical-align: middle; width: 32px; height: 32px; line-height: 32px; margin-left: 2px;
	text-align: center; border-radius: 6px; color: #5B6475;
}
.grid-view a.accion svg { vertical-align: middle; }
.grid-view a.accion:hover, .grid-view a.accion:focus { background: #E8F2F8; color: #0B6494; outline: none; }
.grid-view a.accion-delete:hover, .grid-view a.accion-delete:focus { background: #FDECEA; color: #B42318; }
.solo-lector {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Ficha de detalle (CDetailView) */
table.detail-view { width: 100%; border-collapse: collapse; }
table.detail-view th, table.detail-view td { padding: 8px 12px; border-bottom: 1px solid #EEF0F4; text-align: left; vertical-align: top; }
table.detail-view th { width: 260px; color: #5B6475; font-weight: 500; }
table.detail-view tr.odd, table.detail-view tr.even { background: transparent; }

.pie {
	padding: 14px 24px; background: #0B6494; color: #FFFFFF; font-size: 12px;
	display: flex; justify-content: space-between; flex-wrap: wrap; flex-shrink: 0;
}
.pie a { color: #FFFFFF; margin-left: 16px; }

@media print {
	.barra-superior, .migas, .acciones, .pie { display: none; }
	body { background: #FFFFFF; display: block; }
	.tarjeta { border: 0; padding: 0; }
}

/* Operaciones de la página (antes "Menú de Operaciones") */
.acciones-pagina { float: right; margin: 0 0 12px 16px; max-width: 60%; }
ul.acciones { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; }
ul.acciones li { margin: 0 0 8px 8px; }
ul.acciones li.active a { background: #E8F2F8; }
#content > h1:first-child { margin-top: 4px; }
.subtitulo { color: #5B6475; margin: 0 0 16px 0; }
.clear { clear: both; }

/* Textos de ayuda */
.hint, p.hint { color: #5B6475; font-size: 13px; }
.note { color: #5B6475; font-size: 13px; }

/* Búsqueda avanzada */
div.search-form { background: #FFFFFF; border: 1px solid #E2E6EE; border-radius: 8px; padding: 16px 20px; margin: 12px 0 16px 0; }
a.search-button { display: inline-block; margin-bottom: 8px; }

/* Listas de tarjetas (CListView) */
div.view { background: #FFFFFF; border: 1px solid #E2E6EE; border-radius: 8px; padding: 14px 18px; margin: 0 0 12px 0; }
.list-view .summary { color: #5B6475; font-size: 13px; margin-bottom: 8px; }
.list-view .pager { margin-top: 12px; text-align: right; }

/* Paginador */
ul.yiiPager { display: inline-block; margin: 0; padding: 0; border: 0; font-size: 13px; }
ul.yiiPager li { display: inline; }
ul.yiiPager a { display: inline-block; padding: 4px 10px; margin-left: 4px; border: 1px solid #C7CEDB; border-radius: 4px; color: #1F2937; text-decoration: none; background: #FFFFFF; }
ul.yiiPager a:hover { border-color: #0B6494; color: #0B6494; }
ul.yiiPager .selected a { background: #0B6494; border-color: #0B6494; color: #FFFFFF; font-weight: 600; }
ul.yiiPager .hidden a { color: #B0B7C3; border-color: #E2E6EE; cursor: default; }
.pager .header { color: #5B6475; }

/* Tablas simples */
table.items { width: 100%; border-collapse: collapse; background: #FFFFFF; border: 1px solid #E2E6EE; }
table.items th { background: #F7F8FB; color: #344054; font-size: 12px; font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid #E2E6EE; }
table.items td { padding: 10px 12px; border-bottom: 1px solid #EEF0F4; }
.grid-view table.items th { text-transform: none; letter-spacing: 0; font-size: 13px; }
.grid-view-loading { opacity: .6; }

/* Página de inicio */
.indicadores { display: flex; flex-wrap: wrap; margin: 0 -8px 8px -8px; }
.indicador { flex: 1; min-width: 200px; margin: 0 8px 16px 8px; display: block; text-decoration: none; color: #1F2937;
	background: #FFFFFF; border: 1px solid #E2E6EE; border-top: 4px solid #0B6494; border-radius: 8px; padding: 16px 20px; }
.indicador:hover { box-shadow: 0 4px 12px rgba(15, 23, 42, .08); color: #1F2937; }
.indicador .numero { display: block; font-size: 32px; font-weight: 700; line-height: 1.2; }
.indicador .titulo { display: block; font-weight: 600; }
.indicador .detalle { display: block; color: #5B6475; font-size: 13px; }
.indicador-registrada { border-top-color: #0B6494; }
.indicador-recibida { border-top-color: #B7791F; }
.indicador-resultado { border-top-color: #17653A; }
.accesos .boton { margin: 0 8px 8px 0; }

/* Pantalla de ingreso */
.ingreso { max-width: 400px; margin: 40px auto; }
.ingreso .tarjeta { padding: 32px; }
.ingreso div.form input[type=text], .ingreso div.form input[type=password] { max-width: none; }
.ingreso input[type=submit] { width: 100%; padding: 10px 16px; }
.ingreso .enlaces { display: flex; justify-content: space-between; flex-wrap: wrap; font-size: 13px; margin-top: 12px; }

/* Formularios largos en columnas para aprovechar el ancho */
div.form.columnas .row { display: inline-block; vertical-align: top; box-sizing: border-box; width: 32%; min-width: 240px; padding-right: 16px; }
div.form.columnas .row.buttons, div.form.columnas .errorSummary { display: block; width: auto; }
div.form.columnas h3 { border-bottom: 1px solid #E2E6EE; padding-bottom: 4px; }
div.form .row input[type=checkbox] { margin-right: 8px; }

/* Aviso de navegador no compatible */
.aviso-navegador { margin: 12px 24px 0 24px !important; }

@media (max-width: 800px) {
	.barra-superior { flex-wrap: wrap; height: auto; padding: 8px 16px; position: static; }
	.menu-principal { flex-wrap: wrap; }
	.menu-principal > li > a { height: auto; line-height: 40px; }
	.acciones-pagina { float: none; max-width: none; margin: 0 0 12px 0; }
	ul.acciones { justify-content: flex-start; }
	ul.acciones li { margin: 0 8px 8px 0; }
	div.form.columnas .row { width: 100%; }
}

/* Detalle en dos columnas */
.columnas-detalle { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.columnas-detalle > .tarjeta { margin: 0 8px 16px 8px; min-width: 300px; }
.columnas-detalle > .principal { flex: 2; }
.columnas-detalle > .lateral { flex: 1; }
.columnas-detalle .lateral table.detail-view th { width: 45%; }
h1 .estado { vertical-align: middle; margin-left: 8px; }

/* Ajustes sobre los estilos propios de Yii */
div.form label.required { color: #344054; }
div.form label.required span.required { color: #B42318; }
span.null { color: #8A93A3; font-style: italic; }
.grid-view table.items tr.filters select { background: #FFFFFF; }
.grid-view table.items tr.even td { background: #FAFBFC; }
.grid-view table.items tr.selected td { background: #E8F2F8; }
.grid-view table.items tr.odd td { background: #FFFFFF; }

/* Buscador general de las listas */
.buscador-general { display: flex; flex-wrap: wrap; align-items: center; margin: 16px 0 12px 0; }
.buscador-general label { font-weight: 600; margin-right: 10px; color: #344054; }
.buscador-general input[type=search] {
	flex: 1 1 320px; max-width: 560px; height: 38px; padding: 0 12px; margin-right: 10px;
	border: 1px solid #C9D2DE; border-radius: 6px; font-size: 14px; background: #FFFFFF;
}
.buscador-general input[type=search]:focus { border-color: #0B6494; outline: 2px solid #CFE3EF; }
.buscador-general select { height: 38px; padding: 0 8px; border: 1px solid #C9D2DE; border-radius: 6px; background: #FFFFFF; margin-right: 10px; }
.buscador-general .ayuda-busqueda { flex-basis: 100%; margin-top: 4px; font-size: 12px; color: #5B6475; }
.buscador-general.texto-corto .ayuda-busqueda { color: #7A4B00; font-weight: 600; }
.grid-view table.items th a.asc, .grid-view table.items th a.desc { color: #0B6494; }

/* Presentación suave de la página de inicio y del ingreso */
@keyframes entrada-suave {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}
.entrada, .ingreso .tarjeta { animation: entrada-suave .5s ease-out both; }
.indicadores .indicador.entrada:nth-child(1) { animation-delay: .08s; }
.indicadores .indicador.entrada:nth-child(2) { animation-delay: .16s; }
.indicadores .indicador.entrada:nth-child(3) { animation-delay: .24s; }
.entrada-final { animation-delay: .34s; }
.indicador { transition: transform .15s ease-out, box-shadow .15s ease-out; }
.indicador:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
	.entrada, .ingreso .tarjeta { animation: none; }
	.indicador, .indicador:hover { transition: none; transform: none; }
}

/* Introducción animada del ingreso (views/site/_intro.php) */
.intro { display: none; }
.intro.intro-activa {
	position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	background: #0B6494; background: radial-gradient(circle at 50% 45%, #0E77AF 0%, #0B6494 45%, #074A6E 100%);
	color: #FFFFFF; cursor: pointer;
}
.intro-figura { width: 560px; max-width: 86vw; height: auto; overflow: visible; }
.intro-microscopio path, .intro-microscopio circle { stroke-dasharray: 400; stroke-dashoffset: 400; animation: intro-trazo 1s ease-out forwards; }
.intro-haz { opacity: 0; animation: intro-aparece .4s ease-out .8s forwards; }
.intro-campo { stroke-dasharray: 610; stroke-dashoffset: 610; animation: intro-trazo .7s ease-out .9s forwards; }
.intro-celula { opacity: 0; transform-box: fill-box; transform-origin: center; animation: intro-celula-aparece .5s ease-out forwards; }
.intro-texto { margin-top: 18px; text-align: center; opacity: 0; animation: intro-texto .6s ease-out 1.4s forwards; }
.intro-texto strong { display: block; font-size: 28px; font-weight: 700; letter-spacing: .3px; }
.intro-texto span { display: block; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; opacity: .85; margin-top: 4px; }
.intro-saltar {
	position: absolute; right: 24px; bottom: 24px; padding: 8px 14px; border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, .6); background: transparent; color: #FFFFFF; font-size: 13px; cursor: pointer;
}
.intro-saltar:hover, .intro-saltar:focus { background: rgba(255, 255, 255, .15); outline: none; }
.intro.intro-fin { animation: intro-salida .45s ease-in forwards; }
.intro.intro-saltada { animation: intro-salida .25s ease-in forwards; }
@keyframes intro-trazo { to { stroke-dashoffset: 0; } }
@keyframes intro-aparece { to { opacity: .8; } }
@keyframes intro-celula-aparece { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes intro-texto { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes intro-salida { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .intro.intro-activa { display: none; } }
@media (max-width: 800px) { .intro-texto strong { font-size: 22px; } }

/* Ayuda: botón de cada pantalla, panel lateral y sección del menú */
.barra-pagina { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px 0 24px; }
.barra-pagina .migas { padding: 0; }
.boton-ayuda {
	margin-left: auto; padding: 4px 12px 4px 4px; border-radius: 999px; font-size: 13px;
	color: #0B6494; border-color: #C9D9E5; white-space: nowrap;
}
.icono-ayuda {
	display: inline-block; width: 20px; height: 20px; line-height: 20px; margin-right: 6px;
	border-radius: 50%; background: #0B6494; color: #FFFFFF; font-weight: 700; text-align: center;
}
.panel-ayuda {
	position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%; z-index: 200;
	background: #FFFFFF; border-left: 1px solid #D9DEE7; box-shadow: -8px 0 24px rgba(15, 23, 42, .16);
	overflow-y: auto;
}
.panel-ayuda-cabecera {
	display: flex; align-items: center; justify-content: space-between;
	padding: 14px 20px; border-bottom: 3px solid #0B6494; background: #FFFFFF;
	position: -webkit-sticky; position: sticky; top: 0;
}
.panel-ayuda-cabecera strong { color: #0B6494; font-size: 15px; }
.panel-ayuda-cuerpo { padding: 4px 20px 20px 20px; }
.panel-ayuda-cuerpo h2 { margin-top: 16px; }
.panel-ayuda-cuerpo ul, .panel-ayuda-cuerpo ol, .ayuda-manual ul, .ayuda-manual ol { padding-left: 20px; }
.panel-ayuda-cuerpo li, .ayuda-manual li { margin-bottom: 4px; }
.panel-ayuda-mas { border-top: 1px solid #E2E6EE; padding-top: 12px; margin-top: 16px; }
.ayuda-indice { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.ayuda-indice li { margin: 0 8px 8px 0; }
.ayuda-manual h3 { border-bottom: 1px solid #E2E6EE; padding-bottom: 4px; }
.ayuda-preguntas details { border-bottom: 1px solid #E2E6EE; padding: 10px 0; }
.ayuda-preguntas summary { cursor: pointer; font-weight: 600; color: #0F172A; }
.ayuda-preguntas details p { margin: 8px 0 0 0; }
@media print {
	.boton-ayuda, .panel-ayuda, .ayuda-indice { display: none !important; }
}
@media (max-width: 800px) {
	.barra-pagina { flex-wrap: wrap; padding: 12px 16px 0 16px; }
	.boton-ayuda { margin-top: 8px; }
}
