/* ==========================================================================
   iswcontrol_horario · hoja de estilos
   Convenciones ISW: prefijo isw-, border-radius 0, tipografia legible,
   paginacion en lugar de scroll.
   Copyright (C) 2026 ILETSOFT / ServiciosWebSC · GPL-3.0-or-later
   ========================================================================== */

.isw-ch-wrap,
.isw-ch-wrap * {
	box-sizing: border-box;
	border-radius: 0 !important;
}

.isw-ch-wrap {
	font-size: 15px;
	line-height: 1.45;
	color: #1d1d1d;
}

/* --- Barra superior -------------------------------------------------------- */

.isw-ch-topbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-end;
	padding: 10px 12px;
	margin-bottom: 10px;
	background: #f4f6f8;
	border: 1px solid #d5dbe0;
}

.isw-ch-campo {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 140px;
}

.isw-ch-campo label {
	font-size: 12.5px;
	font-weight: 600;
	color: #4a5560;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.isw-ch-campo input,
.isw-ch-campo select,
.isw-ch-campo textarea {
	height: 34px;
	padding: 4px 8px;
	font-size: 15px;
	border: 1px solid #b9c2ca;
	background: #fff;
	color: #1d1d1d;
}

.isw-ch-campo textarea {
	height: auto;
	min-height: 70px;
	resize: vertical;
}

.isw-ch-campo-ancho {
	min-width: 100%;
	flex: 1 1 100%;
}

.isw-ch-campo-check {
	flex-direction: row;
	align-items: center;
	gap: 6px;
	min-width: auto;
	padding-bottom: 6px;
}

.isw-ch-campo-check label {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
	font-size: 14px;
}

/* --- Botones --------------------------------------------------------------- */

.isw-ch-btn {
	display: inline-block;
	min-height: 34px;
	padding: 6px 14px;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid #2c5a86;
	background: #2c5a86;
	color: #fff;
}

.isw-ch-btn:hover {
	background: #234a70;
	color: #fff;
	text-decoration: none;
}

.isw-ch-btn[disabled],
.isw-ch-btn.isw-ch-btn-off {
	cursor: not-allowed;
	opacity: 0.5;
}

.isw-ch-btn-sec {
	background: #fff;
	color: #2c5a86;
}

.isw-ch-btn-sec:hover {
	background: #e8eef4;
	color: #234a70;
}

.isw-ch-btn-ok {
	border-color: #2f7a48;
	background: #2f7a48;
}

.isw-ch-btn-ok:hover {
	background: #266239;
}

.isw-ch-btn-peligro {
	border-color: #a8352c;
	background: #a8352c;
}

.isw-ch-btn-peligro:hover {
	background: #8c2b23;
}

.isw-ch-btn-mini {
	min-height: 26px;
	padding: 2px 8px;
	font-size: 13px;
	font-weight: 500;
}

/* --- Tabla ---------------------------------------------------------------- */

.isw-ch-tabla {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #d5dbe0;
}

.isw-ch-tabla th {
	padding: 8px 8px;
	font-size: 12.5px;
	font-weight: 700;
	text-align: left;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: #3b4651;
	background: #eceff2;
	border-bottom: 2px solid #c9d1d8;
	white-space: nowrap;
}

.isw-ch-tabla td {
	padding: 7px 8px;
	font-size: 14.5px;
	border-bottom: 1px solid #e6eaee;
	vertical-align: middle;
}

.isw-ch-tabla tbody tr:hover {
	background: #f7f9fb;
}

.isw-ch-tabla .isw-ch-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.isw-ch-tabla .isw-ch-centro {
	text-align: center;
}

.isw-ch-fila-alerta {
	box-shadow: inset 3px 0 0 #d6604d;
}

.isw-ch-fila-detalle td {
	background: #f7f9fb;
	padding: 8px 12px;
	font-size: 14px;
}

.isw-ch-subtabla {
	width: 100%;
	border-collapse: collapse;
	margin-top: 4px;
}

.isw-ch-subtabla th,
.isw-ch-subtabla td {
	padding: 4px 8px;
	font-size: 13.5px;
	border-bottom: 1px solid #dfe5ea;
	text-align: left;
}

.isw-ch-vacio {
	padding: 24px 12px;
	text-align: center;
	color: #6b7784;
	font-size: 15px;
	background: #fff;
	border: 1px solid #d5dbe0;
	border-top: 0;
}

/* --- Badges de estado ----------------------------------------------------- */

.isw-ch-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 12.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	border: 1px solid transparent;
	white-space: nowrap;
}

.isw-ch-badge-abierta {
	background: #fdf3d3;
	border-color: #e0c56b;
	color: #6b5310;
}

.isw-ch-badge-cerrada {
	background: #e9edf1;
	border-color: #c2cbd3;
	color: #414c57;
}

.isw-ch-badge-validada {
	background: #dff0e3;
	border-color: #8ec39c;
	color: #1f5c33;
}

.isw-ch-badge-disputada {
	background: #fadedb;
	border-color: #d99e97;
	color: #8a2b22;
}

.isw-ch-badge-sistema {
	background: #fde8d3;
	border-color: #e0a76b;
	color: #7a4410;
}

.isw-ch-badge-anulada {
	background: #eeeeee;
	border-color: #cccccc;
	color: #777777;
	text-decoration: line-through;
}

.isw-ch-badge-alta {
	background: #fadedb;
	border-color: #d99e97;
	color: #8a2b22;
}

.isw-ch-badge-media {
	background: #fdf3d3;
	border-color: #e0c56b;
	color: #6b5310;
}

.isw-ch-badge-baja {
	background: #e9edf1;
	border-color: #c2cbd3;
	color: #414c57;
}

.isw-ch-chip {
	display: inline-block;
	padding: 1px 6px;
	margin-left: 4px;
	font-size: 11.5px;
	font-weight: 700;
	border: 1px solid #b9c2ca;
	background: #f2f5f7;
	color: #4a5560;
}

/* --- Paginacion ("Seguir leyendo" en lugar de scroll) --------------------- */

.isw-ch-paginacion {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: space-between;
	padding: 9px 12px;
	background: #f4f6f8;
	border: 1px solid #d5dbe0;
	border-top: 0;
	font-size: 14.5px;
}

.isw-ch-paginacion-botones {
	display: flex;
	gap: 6px;
	align-items: center;
}

.isw-ch-paginacion-info {
	color: #4a5560;
	font-variant-numeric: tabular-nums;
}

/* --- Rejilla de tarjetas del dashboard ----------------------------------- */

.isw-ch-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

.isw-ch-card {
	flex: 1 1 190px;
	min-width: 175px;
	padding: 11px 13px;
	background: #fff;
	border: 1px solid #d5dbe0;
	border-left: 4px solid #2c5a86;
}

.isw-ch-card-alerta {
	border-left-color: #a8352c;
}

.isw-ch-card-aviso {
	border-left-color: #cc8b26;
}

.isw-ch-card-ok {
	border-left-color: #2f7a48;
}

.isw-ch-card-titulo {
	font-size: 12.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: #6b7784;
	margin-bottom: 4px;
}

.isw-ch-card-valor {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
	color: #1d2b39;
	font-variant-numeric: tabular-nums;
}

.isw-ch-card-pie {
	margin-top: 3px;
	font-size: 13px;
	color: #6b7784;
}

/* --- Dos columnas -------------------------------------------------------- */

.isw-ch-cols {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-start;
}

.isw-ch-col-principal {
	flex: 1 1 620px;
	min-width: 320px;
}

.isw-ch-col-lateral {
	flex: 0 1 330px;
	min-width: 260px;
}

.isw-ch-bloque {
	background: #fff;
	border: 1px solid #d5dbe0;
	margin-bottom: 12px;
}

.isw-ch-bloque-titulo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	font-size: 13.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: #3b4651;
	background: #eceff2;
	border-bottom: 1px solid #c9d1d8;
}

.isw-ch-bloque-cuerpo {
	padding: 10px 12px;
}

.isw-ch-lista-alertas {
	margin: 0;
	padding: 0;
	list-style: none;
}

.isw-ch-lista-alertas li {
	padding: 8px 0;
	border-bottom: 1px solid #e6eaee;
}

.isw-ch-lista-alertas li:last-child {
	border-bottom: 0;
}

.isw-ch-alerta-cabecera {
	display: flex;
	gap: 6px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 3px;
}

.isw-ch-alerta-texto {
	font-size: 13.5px;
	color: #45515d;
}

.isw-ch-alerta-meta {
	margin-top: 3px;
	font-size: 12.5px;
	color: #6b7784;
}

/* --- Linea de tiempo de la jornada -------------------------------------- */

.isw-ch-timeline {
	position: relative;
	height: 34px;
	margin: 10px 0 4px;
	background: #e9edf1;
	border: 1px solid #c9d1d8;
}

.isw-ch-timeline-trabajo {
	position: absolute;
	top: 0;
	bottom: 0;
	background: #5a82af;
}

.isw-ch-timeline-pausa {
	position: absolute;
	top: 0;
	bottom: 0;
	background: #e0c56b;
}

.isw-ch-timeline-pausa-comp {
	position: absolute;
	top: 0;
	bottom: 0;
	background: #8ec39c;
}

.isw-ch-timeline-leyenda {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 12.5px;
	color: #6b7784;
}

.isw-ch-timeline-leyenda span::before {
	content: '';
	display: inline-block;
	width: 11px;
	height: 11px;
	margin-right: 4px;
	vertical-align: -1px;
	border: 1px solid #b9c2ca;
}

.isw-ch-leyenda-trabajo::before {
	background: #5a82af;
}

.isw-ch-leyenda-pausa::before {
	background: #e0c56b;
}

.isw-ch-leyenda-pausa-comp::before {
	background: #8ec39c;
}

/* --- Modal --------------------------------------------------------------- */

.isw-ch-modal-fondo {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10500;
	display: none;
	padding: 18px;
	background: rgba(20, 26, 32, 0.55);
}

.isw-ch-modal-fondo.isw-ch-visible {
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

.isw-ch-modal {
	width: 98vw;
	max-width: 1080px;
	max-height: 94vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #9aa6b1;
	box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3);
}

.isw-ch-modal-cabecera {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 11px 14px;
	background: #2c5a86;
	color: #fff;
}

.isw-ch-modal-titulo {
	font-size: 17px;
	font-weight: 700;
}

.isw-ch-modal-cerrar {
	padding: 0 8px;
	font-size: 22px;
	line-height: 1;
	color: #fff;
	background: none;
	border: 0;
	cursor: pointer;
}

.isw-ch-modal-cuerpo {
	padding: 14px;
	overflow: auto;
}

.isw-ch-modal-pie {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	padding: 11px 14px;
	background: #f4f6f8;
	border-top: 1px solid #d5dbe0;
}

.isw-ch-form-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.isw-ch-form-grid .isw-ch-campo {
	flex: 1 1 210px;
}

.isw-ch-aviso {
	padding: 9px 12px;
	margin-bottom: 10px;
	font-size: 14px;
	border-left: 4px solid #cc8b26;
	background: #fdf7e8;
	color: #5f4711;
}

.isw-ch-aviso-error {
	border-left-color: #a8352c;
	background: #fbeceb;
	color: #7a241d;
}

.isw-ch-aviso-ok {
	border-left-color: #2f7a48;
	background: #ecf5ef;
	color: #1f5c33;
}

.isw-ch-aviso-info {
	border-left-color: #2c5a86;
	background: #eef3f8;
	color: #234a70;
}

/* --- Pestanias del detalle ---------------------------------------------- */

.isw-ch-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	border-bottom: 2px solid #c9d1d8;
	margin-bottom: 12px;
}

.isw-ch-tab {
	padding: 7px 14px;
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
	background: #eceff2;
	border: 1px solid #d5dbe0;
	border-bottom: 0;
	color: #4a5560;
}

.isw-ch-tab.isw-ch-tab-activa {
	background: #fff;
	color: #1d2b39;
	border-color: #c9d1d8;
	box-shadow: inset 0 3px 0 #2c5a86;
}

.isw-ch-panel-tab {
	display: none;
}

.isw-ch-panel-tab.isw-ch-visible {
	display: block;
}

/* --- Aviso flotante ----------------------------------------------------- */

.isw-ch-toast {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 11000;
	max-width: 420px;
	padding: 11px 15px;
	font-size: 14.5px;
	color: #fff;
	background: #26333f;
	border-left: 5px solid #2f7a48;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
	display: none;
}

.isw-ch-toast.isw-ch-visible {
	display: block;
}

.isw-ch-toast-error {
	border-left-color: #d6604d;
}

.isw-ch-toast-aviso {
	border-left-color: #e0a300;
}

/* --- Cargando ----------------------------------------------------------- */

.isw-ch-cargando {
	padding: 20px 12px;
	text-align: center;
	color: #6b7784;
	font-size: 14.5px;
}

.isw-ch-mono {
	font-family: 'DejaVu Sans Mono', 'Courier New', monospace;
	font-size: 12.5px;
	word-break: break-all;
	color: #45515d;
}

/* --- Kiosco PWA --------------------------------------------------------- */

.isw-ch-kiosco {
	min-height: 100vh;
	margin: 0;
	padding: 4vh 4vw;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #14202b;
	color: #f2f5f7;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.isw-ch-kiosco-caja {
	width: 100%;
	max-width: 620px;
	text-align: center;
}

.isw-ch-kiosco h1 {
	font-size: 2.1em;
	margin: 0 0 6px;
	font-weight: 700;
}

.isw-ch-kiosco h2 {
	font-size: 1.8em;
	margin: 0 0 6px;
	font-weight: 700;
}

.isw-ch-kiosco p {
	font-size: 1.25em;
	margin: 6px 0 14px;
	color: #b9c6d2;
}

.isw-ch-kiosco-pin {
	width: 100%;
	max-width: 320px;
	height: 76px;
	margin: 0 auto 16px;
	display: block;
	font-size: 2.4em;
	letter-spacing: 0.35em;
	text-align: center;
	color: #14202b;
	background: #fff;
	border: 3px solid #5a82af;
}

.isw-ch-kiosco-teclado {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	max-width: 360px;
	margin: 0 auto 16px;
}

.isw-ch-kiosco-tecla {
	min-height: 72px;
	font-size: 1.9em;
	font-weight: 700;
	color: #f2f5f7;
	background: #24384c;
	border: 2px solid #35526e;
	cursor: pointer;
}

.isw-ch-kiosco-tecla:active {
	background: #35526e;
}

.isw-ch-kiosco-btn {
	display: block;
	width: 100%;
	max-width: 420px;
	min-height: 84px;
	margin: 10px auto;
	font-size: 1.7em;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #fff;
	background: #2f7a48;
	border: 3px solid #245f38;
	cursor: pointer;
}

.isw-ch-kiosco-btn-salida {
	background: #a8352c;
	border-color: #832721;
}

.isw-ch-kiosco-btn-pausa {
	background: #b8791a;
	border-color: #915e13;
}

.isw-ch-kiosco-btn-sec {
	min-height: 60px;
	font-size: 1.2em;
	background: #24384c;
	border-color: #35526e;
}

.isw-ch-kiosco-reloj {
	font-size: 3.1em;
	font-weight: 700;
	line-height: 1.1;
	margin: 12px 0;
	font-variant-numeric: tabular-nums;
}

.isw-ch-kiosco-estado {
	display: inline-block;
	padding: 6px 16px;
	margin-bottom: 10px;
	font-size: 1.15em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border: 2px solid #35526e;
	background: #24384c;
}

.isw-ch-kiosco-estado-dentro {
	border-color: #2f7a48;
	background: #1c4a2c;
}

.isw-ch-kiosco-estado-pausa {
	border-color: #b8791a;
	background: #5a3c0d;
}

.isw-ch-kiosco-msg {
	min-height: 2.6em;
	padding: 10px 14px;
	margin: 12px auto;
	max-width: 520px;
	font-size: 1.2em;
	border-left: 5px solid #5a82af;
	background: #1d2c3a;
	text-align: left;
}

.isw-ch-kiosco-msg-error {
	border-left-color: #d6604d;
}

.isw-ch-kiosco-msg-ok {
	border-left-color: #6fbf8a;
}

.isw-ch-oculto {
	display: none !important;
}

/* --- Impresion ---------------------------------------------------------- */

@media print {
	.isw-ch-topbar,
	.isw-ch-paginacion,
	.isw-ch-modal-fondo,
	.isw-ch-toast,
	.isw-ch-btn {
		display: none !important;
	}

	.isw-ch-tabla {
		border-color: #000;
	}
}
