/* Gesprel — app de captura. Mobile-first: el escenario real es un teléfono
   dentro de una planta, a veces con guantes puestos. Blancos generosos,
   objetivos táctiles grandes, nada que exija precisión de dedo. */

.gsp {
	--verde: #1F512B;
	--verde-hondo: #14361D;
	--verde-suave: #5E9370;
	--tinte: #EDF3EE;
	--tinte2: #DCE8DF;
	--tinta: #1A211C;
	--gris: #5C6B60;
	--linea: #DDE4DE;
	--alerta: #9C5326;

	/* Ancho fluido: en el teléfono el aire crece con la pantalla y en el
	   escritorio la columna se mantiene legible. El padding inferior es
	   holgado a propósito — la barra de envío es sticky y se monta sobre el
	   contenido mientras se hace scroll; sin ese colchón, tapa el último campo. */
	width: 100%;
	max-width: 820px;
	margin: 0 auto;
	padding: 0 clamp(16px, 5vw, 40px) 96px;
	color: var(--tinta);
	font-size: 16px;          /* 16px evita el zoom automático de iOS al enfocar */
	line-height: 1.55;
	-webkit-text-size-adjust: 100%;
}

.gsp *, .gsp *::before, .gsp *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- cabecera */

.gsp-cab { padding: 20px 0 16px; border-bottom: 2px solid var(--tinte2); margin-bottom: 20px; }
.gsp-cab h1 { font-size: 24px; line-height: 1.2; margin: 0; color: var(--verde); font-weight: 600; }
.gsp-sub { margin: 4px 0 0; color: var(--gris); font-size: 14px; }

.gsp-volver {
	background: none; border: 0; padding: 6px 0; margin-bottom: 8px;
	color: var(--verde-suave); font-size: 15px; cursor: pointer;
	min-height: 40px;
}

/* ------------------------------------------------------------------ botones */

.gsp-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 52px; padding: 14px 22px;
	border: 0; border-radius: 8px;
	font-size: 16px; font-weight: 600; cursor: pointer;
	font-family: inherit;
}
.gsp-btn-primario { background: var(--verde); color: #fff; width: 100%; }
.gsp-btn-primario:active { background: var(--verde-hondo); }
.gsp-btn-primario:disabled { opacity: .6; }

.gsp-acciones { margin-bottom: 24px; }

/* ------------------------------------------------------------------- listas */

.gsp-item {
	display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
	padding: 14px 0; border-bottom: 1px solid var(--linea);
}
.gsp-item strong { display: block; font-weight: 600; }
.gsp-meta { color: var(--gris); font-size: 14px; }
.gsp-item-der { text-align: right; flex-shrink: 0; }
.gsp-fecha { display: block; font-size: 14px; color: var(--gris); font-variant-numeric: tabular-nums; }
.gsp-cod {
	display: inline-block; margin-top: 4px; padding: 2px 8px;
	background: var(--tinte); color: var(--verde);
	border-radius: 20px; font-size: 12px; font-weight: 600;
}

.gsp-grupo { margin-bottom: 28px; }
.gsp-grupo h2 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--verde-suave); margin: 0 0 10px; }

/* Título en su propia línea y el código debajo, pegado. Antes iban enfrentados
   en una fila: con nombres largos —«Inspección de Seguridad Vehicular»— el
   título se partía en dos y el código quedaba flotando lejos, a la derecha. */
.gsp-tarjeta {
	display: flex; flex-direction: column; align-items: flex-start; gap: 0;
	width: 100%; min-height: 60px; padding: 14px 16px;
	margin-bottom: 8px; text-align: left;
	background: #F7FAF8; border: 1px solid var(--linea); border-radius: 8px;
	font-size: 16px; font-family: inherit; color: var(--tinta); cursor: pointer;
}
.gsp-tarjeta strong { display: block; width: 100%; font-weight: 600; line-height: 1.35; }
.gsp-tarjeta .gsp-cod { margin-top: 3px; }
.gsp-tarjeta:active { background: var(--tinte); }

/* ---------------------------------------------------------------- formulario */

.gsp-seccion { margin-bottom: 28px; }
.gsp-seccion h2 {
	font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
	color: var(--verde); margin: 0 0 14px; padding-bottom: 8px;
	border-bottom: 2px solid var(--tinte2);
}

.gsp-campo { margin-bottom: 22px; }
.gsp-label { display: block; font-weight: 600; margin-bottom: 8px; }
.gsp-req { color: var(--alerta); margin-left: 3px; }

.gsp input[type=text], .gsp input[type=date], .gsp textarea, .gsp select {
	width: 100%; min-height: 52px; padding: 13px 14px;
	border: 1px solid var(--linea); border-radius: 8px;
	font-size: 16px; font-family: inherit; color: var(--tinta); background: #fff;
}
.gsp textarea { min-height: 90px; resize: vertical; }
.gsp input:focus, .gsp textarea:focus, .gsp select:focus {
	outline: 2px solid var(--verde-suave); outline-offset: 1px; border-color: var(--verde-suave);
}

/* Opciones: una por línea y de alto completo. Con guantes puestos, tocar
   un radio de 20px es imposible; el objetivo es toda la fila. */
.gsp-opciones { display: flex; flex-direction: column; gap: 8px; }
.gsp-opcion {
	display: flex; align-items: center; gap: 12px;
	min-height: 52px; padding: 12px 16px;
	border: 1px solid var(--linea); border-radius: 8px;
	background: #fff; cursor: pointer;
}
.gsp-opcion input { width: 22px; height: 22px; accent-color: var(--verde); flex-shrink: 0; margin: 0; }
.gsp-opcion:has(input:checked) { border-color: var(--verde); background: var(--tinte); font-weight: 600; }

/* Desde tablet en adelante las respuestas van lado a lado: una barra de 800px
   de ancho para decir «Sí» se ve rota. En el teléfono se quedan apiladas y de
   ancho completo, que es lo que sirve con guantes puestos. */
@media (min-width: 600px) {
	.gsp-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* ------------------------------------------------------------------- fotos */

.gsp-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gsp-btn-foto {
	background: var(--tinte); color: var(--verde); border: 1px dashed var(--verde-suave);
	width: 100%; margin-bottom: 12px;
}
.gsp-miniaturas { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.gsp-mini {
	position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
	background: var(--tinte); display: flex; align-items: center; justify-content: center;
}
.gsp-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gsp-subiendo span { color: var(--verde-suave); font-size: 20px; }
.gsp-quitar {
	position: absolute; top: 4px; right: 4px;
	width: 28px; height: 28px; border: 0; border-radius: 50%;
	background: rgba(0,0,0,.62); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}

.gsp-firma img {
	max-height: 90px; max-width: 100%; background: #fff;
	border: 1px solid var(--linea); border-radius: 8px; padding: 10px;
}
.gsp-nota { font-size: 13px; color: var(--gris); margin: 8px 0 0; }

/* ---------------------------------------------------------------- mi cuenta */

.gsp-cab-inicio { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }

/* El centrado tiene que ser explícito: el botón trae padding propio del
   navegador y el letter-spacing agregaba un hueco después de la última letra,
   que corría el texto hacia la izquierda. Sin letter-spacing en dos caracteres
   no se pierde nada. */
.gsp-cuenta-btn {
	flex-shrink: 0; width: 44px; height: 44px; padding: 0;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%; border: 1px solid var(--tinte2); background: var(--tinte);
	color: var(--verde); font-family: inherit; font-size: 14px; font-weight: 700;
	line-height: 1; cursor: pointer;
}
.gsp-cuenta-btn:active { background: var(--tinte2); }

.gsp-firma-caja { margin-bottom: 14px; }
.gsp-firma-vacia {
	margin: 0; padding: 20px 16px; text-align: center;
	background: #F7FAF8; border: 1px dashed var(--linea); border-radius: 8px;
	color: var(--gris); font-size: 14px;
}

.gsp-btn-texto {
	background: none; color: var(--alerta); width: 100%;
	min-height: 44px; font-weight: 500; text-decoration: underline;
}

.gsp-salir {
	display: block; margin-top: 32px; padding: 14px; text-align: center;
	color: var(--gris); font-size: 15px; text-decoration: none;
	border-top: 1px solid var(--linea);
}

/* ----------------------------------------------------------------- portada */

.gsp-portada {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	min-height: 82vh; padding: 32px 16px 48px; max-width: 440px;
}

.gsp-portada-caja {
	width: 100%; padding: 34px 28px 28px; text-align: center;
	background: #fff; border: 1px solid var(--linea); border-radius: 14px;
	box-shadow: 0 18px 44px -28px rgba(31, 81, 43, .38);
}

.gsp-emblema { line-height: 0; margin-bottom: 14px; }

.gsp-portada-marca {
	margin: 0; color: var(--verde); font-size: 23px; font-weight: 700;
	letter-spacing: .16em;
}
.gsp-portada-bajada {
	margin: 2px 0 0; color: var(--verde-suave); font-size: 13px;
	letter-spacing: .04em;
}
.gsp-portada-titulo {
	margin: 22px 0 20px; padding-top: 20px; border-top: 1px solid var(--tinte2);
	font-size: 17px; font-weight: 600; color: var(--tinta);
}

.gsp-portada-error { text-align: left; margin: 0 0 16px; font-size: 14px; }

.gsp-portada .login-username,
.gsp-portada .login-password { margin-bottom: 14px; text-align: left; }

.gsp-portada label {
	display: block; margin-bottom: 6px;
	font-size: 13px; font-weight: 600; color: var(--gris);
}
.gsp-portada input[type=text],
.gsp-portada input[type=password] {
	width: 100%; min-height: 52px; padding: 13px 14px;
	border: 1px solid var(--linea); border-radius: 8px;
	font-size: 16px; font-family: inherit; background: #fff; color: var(--tinta);
}
.gsp-portada input:focus {
	outline: 2px solid var(--verde-suave); outline-offset: 1px; border-color: var(--verde-suave);
}

.gsp-portada .login-remember { text-align: left; margin: 4px 0 18px; }
.gsp-portada .login-remember label {
	display: flex; align-items: center; gap: 9px;
	font-weight: 400; font-size: 14px; color: var(--gris); margin: 0;
}
.gsp-portada .login-remember input { width: 20px; height: 20px; accent-color: var(--verde); margin: 0; }

.gsp-portada .login-submit input[type=submit] {
	width: 100%; min-height: 52px; padding: 14px 22px;
	border: 0; border-radius: 8px; background: var(--verde); color: #fff;
	font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.gsp-portada .login-submit input[type=submit]:active { background: var(--verde-hondo); }

.gsp-portada-pie { margin: 18px 0 0; font-size: 14px; }
.gsp-portada-pie a { color: var(--verde-suave); text-decoration: none; }

.gsp-portada-firma { margin: 24px 0 0; font-size: 12.5px; color: var(--gris); text-align: center; }

/* Barra de envío fija: en un checklist de 40 preguntas, obligar a volver
   al final para enviar es una fricción gratuita. */
.gsp-enviar {
	position: sticky; bottom: 0; z-index: 5;
	padding: 14px 0 18px; margin-top: 8px;
	background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #fff 26%);
}

/* ------------------------------------------------------------------- varios */

.gsp-vacio, .gsp-cargando { color: var(--gris); padding: 28px 0; text-align: center; }
.gsp-error { color: var(--alerta); padding: 16px; background: #FAF1E9; border-radius: 8px; }
.gsp-aviso { padding: 16px; background: var(--tinte); border-radius: 8px; }

.gsp-toast {
	position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
	z-index: 999; max-width: calc(100vw - 32px);
	padding: 14px 22px; border-radius: 8px;
	background: var(--verde); color: #fff; font-weight: 600;
	box-shadow: 0 6px 24px rgba(0,0,0,.18);
	transition: opacity .4s, transform .4s;
}
.gsp-toast.error { background: var(--alerta); }
.gsp-toast.fuera { opacity: 0; transform: translate(-50%, 12px); }

@media (prefers-reduced-motion: reduce) {
	.gsp-toast { transition: none; }
}
