/**
 * @copyright Movilidad RAY
 * @author Nucliux Solutions (Epalazue)
 * @version 1.0.0b (Octubre 2026)
 * @since 1.0.0
 */

@import "variables.css?v=1.0.0a";
@import "reset.css?v=1.0.0a";
@import "login.css?v=1.0.0a";
@import "menu.css?v=1.0.0a";
@import "modal.css?v=1.0.0a";
@import "fontawesome/css/all.min.css";
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

html, body {
	background: var(--ray-surface);
	color: var(--ray-text);
	font-family: var(--font-family);
	font-size: 16px;
	line-height: 1.5;
}

h1, h2, h3 {
	font-family: var(--font-display);
	color: var(--ray-heading);
	font-weight: 700;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

.oculto { display: none !important; }

.alerta {
	margin-bottom: 1rem;
	color: var(--ray-alert);
	font-weight: 600;
	text-align: center;
}

.alerta--exito { color: var(--ray-exito); }

.entrada {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--ray-border);
	border-radius: var(--radius);
	background: var(--ray-white);
	color: var(--ray-text);
}

.entrada:focus {
	outline: none;
	border-color: var(--ray-green);
	box-shadow: 0 0 0 3px var(--ray-focus);
}

.boton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: var(--touch);
	padding: 0.75rem 1.25rem;
	border: 0;
	border-radius: var(--radius);
	background: var(--ray-green-dark);
	color: var(--ray-on-primary);
	font-weight: 600;
	cursor: pointer;
	box-shadow: var(--shadow);
}

.boton:hover { background: var(--ray-green-deep); }
.boton:disabled { opacity: 0.55; cursor: not-allowed; }

.boton-alt {
	background: var(--ray-white);
	color: var(--ray-heading);
	border: 2px solid var(--ray-green);
	box-shadow: none;
}

html[data-tema="oscuro"] .boton-alt {
	background: transparent;
	color: var(--ray-on-primary);
	border-color: var(--ray-green);
}

.boton-alt:hover,
html[data-tema="oscuro"] .boton-alt:hover {
	background: var(--ray-green);
	border-color: var(--ray-green);
	color: var(--ray-on-primary);
}

.boton-peligro {
	background: var(--ray-alert);
}

.boton-peligro:hover {
	background: var(--ray-alert);
	opacity: 0.82;
}

.admin-shell {
	display: flex;
	min-height: 100vh;
}

.admin-shell__content {
	flex: 1;
	margin-left: var(--menu-width);
	min-width: 0;
	transition: margin-left 0.2s ease;
}

.admin-shell--menu-colapsado .admin-shell__content {
	margin-left: var(--menu-width-collapsed);
}

.admin-topbar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1.25rem;
	background: var(--ray-topbar);
	border-bottom: 1px solid var(--ray-border);
	color: var(--ray-text);
}

.admin-main {
	padding: 1.5rem;
}

.seccion__cabecera {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.seccion__botones {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: flex-start;
}

.tarjeta {
	padding: 1.25rem;
	background: var(--ray-white);
	border: 1px solid var(--ray-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.tabla-wrap { overflow-x: auto; }

.tabla {
	width: 100%;
	background: var(--ray-white);
	border-radius: var(--radius);
	overflow: hidden;
}

.tabla th, .tabla td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--ray-border);
	text-align: left;
}

.tabla th {
	background: var(--ray-green-dark);
	color: var(--ray-on-primary);
	font-weight: 600;
}

.tabla__acciones {
	display: inline-flex;
	align-items: center;
	gap: 0.9rem;
	white-space: nowrap;
}

.tabla__acciones a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 0.35rem;
	border-radius: var(--radius);
	color: var(--ray-heading);
	font-size: 1.05rem;
}

.tabla__acciones a:hover {
	background: rgba(47, 171, 93, 0.15);
	color: var(--ray-green-deep);
}

.tabla__acciones a[title="Eliminar"]:hover {
	background: rgba(198, 40, 40, 0.12);
	color: var(--ray-alert);
}

.formulario {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	max-width: 560px;
}

.formulario__grupo {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.formulario__grupo label {
	font-weight: 600;
	color: var(--ray-heading);
}

.formulario__ayuda {
	color: var(--ray-muted);
	font-size: 0.875rem;
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	border-radius: var(--radius-pill);
	background: rgba(47, 171, 93, 0.15);
	color: var(--ray-heading);
	font-size: 0.8rem;
	font-weight: 600;
}

.badge--off {
	background: rgba(92, 111, 104, 0.15);
	color: var(--ray-muted);
}

.stat-numero {
	margin: 0;
	font-size: 2rem;
	font-weight: 700;
	color: var(--ray-heading);
	line-height: 1.2;
}

html[data-tema="oscuro"] .stat-numero {
	color: #FFFFFF;
}

.inicio-lead {
	margin-bottom: 1.25rem;
	color: var(--ray-muted);
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 1rem;
}

.stat-sub {
	margin: 0.35rem 0 0;
	font-size: 0.85rem;
	color: var(--ray-muted);
}

.inicio-bloque {
	margin-top: 2rem;
}

.inicio-bloque__cabecera {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.inicio-bloque__titulo {
	margin: 0;
	font-size: 1.15rem;
}

.inicio-aviso {
	margin: 0 0 1rem;
	color: var(--ray-muted);
	font-size: 0.92rem;
}

.inicio-paneles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1rem;
	margin-top: 1.25rem;
}

.inicio-panel__titulo {
	margin: 0 0 1rem;
	font-size: 1rem;
}

.ranking__vacio {
	margin: 0;
	color: var(--ray-muted);
	font-size: 0.92rem;
}

.ranking__fila + .ranking__fila {
	margin-top: 0.75rem;
}

.ranking__meta {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.3rem;
	font-size: 0.92rem;
}

.ranking__total {
	color: var(--ray-muted);
	font-variant-numeric: tabular-nums;
}

.ranking__barra {
	height: 8px;
	border-radius: 999px;
	background: rgba(47, 171, 93, 0.12);
	overflow: hidden;
}

.ranking__barra span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--ray-green);
}

.inicio-horarios {
	margin-top: 1rem;
}

.horarios__resumen {
	margin: 0;
	font-size: 0.88rem;
	color: var(--ray-muted);
}

.horarios__chart {
	display: grid;
	grid-template-columns: 36px 1fr;
	gap: 0.5rem;
	margin-top: 1rem;
}

.horarios__eje {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-end;
	height: 160px;
	padding-bottom: 1.1rem;
	font-size: 0.7rem;
	color: var(--ray-muted);
	font-variant-numeric: tabular-nums;
}

.horarios__graf {
	position: relative;
	min-width: 0;
}

.horarios__guias {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 160px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	pointer-events: none;
}

.horarios__guias i {
	display: block;
	height: 1px;
	background: var(--ray-border);
	opacity: 0.7;
}

.horarios__cols {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: 4px;
	height: 160px;
	padding-bottom: 1.1rem;
}

.horarios__col {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
}

.horarios__barra {
	width: 100%;
	max-width: 28px;
	border-radius: 5px 5px 2px 2px;
	background: var(--ray-green);
	opacity: 0.72;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.horarios__col--pico .horarios__barra {
	background: var(--ray-green-dark);
	opacity: 1;
	box-shadow: 0 0 0 2px rgba(47, 171, 93, 0.25);
}

.horarios__col--vacia .horarios__barra {
	opacity: 0.2;
	background: var(--ray-muted);
}

.horarios__col:hover .horarios__barra,
.horarios__col:focus-within .horarios__barra {
	opacity: 1;
	transform: scaleX(1.05);
}

.horarios__hora {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.68rem;
	color: var(--ray-muted);
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.horarios__hora--oculta {
	opacity: 0;
}

.horarios__col:nth-child(3n+1) .horarios__hora--oculta {
	opacity: 0;
}

.horarios__tooltip {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	padding: 0.3rem 0.5rem;
	border-radius: 6px;
	background: var(--ray-green-deep);
	color: #fff;
	font-size: 0.72rem;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	z-index: 2;
	transition: opacity 0.12s ease;
}

.horarios__col:hover .horarios__tooltip,
.horarios__col:focus-within .horarios__tooltip {
	opacity: 1;
}

.horarios__leyenda {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 0.85rem;
	font-size: 0.82rem;
	color: var(--ray-muted);
}

.horarios__swatch {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	margin-right: 0.35rem;
	background: var(--ray-green);
	opacity: 0.72;
	vertical-align: middle;
}

.horarios__swatch--pico {
	background: var(--ray-green-dark);
	opacity: 1;
}

.horarios__swatch--busquedas {
	background: #7BC99A;
	opacity: 0.95;
}

.dau__cols {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: 6px;
	height: 160px;
	padding-bottom: 2rem;
}

.dau__col {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
}

.dau__pares {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 2px;
	width: 100%;
}

.dau__barra {
	width: 45%;
	max-width: 14px;
	border-radius: 4px 4px 2px 2px;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.dau__barra--usuarios {
	background: var(--ray-green);
	opacity: 0.85;
}

.dau__barra--busquedas {
	background: #7BC99A;
	opacity: 0.7;
}

.dau__col--pico .dau__barra--usuarios {
	background: var(--ray-green-dark);
	opacity: 1;
	box-shadow: 0 0 0 2px rgba(47, 171, 93, 0.25);
}

.dau__col:hover .dau__barra,
.dau__col:focus-within .dau__barra {
	opacity: 1;
	transform: scaleY(1.02);
}

.dau__label {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1.1;
	font-size: 0.68rem;
	color: var(--ray-muted);
	white-space: nowrap;
}

.dau__label strong {
	font-weight: 600;
	color: var(--ray-text);
	font-size: 0.72rem;
}

.dau__col .horarios__tooltip {
	bottom: calc(100% + 6px);
}

@media (max-width: 700px) {
	.dau__cols { gap: 3px; }
	.dau__barra { max-width: 10px; }
	.dau__label strong { font-size: 0.62rem; }
	.dau__label small { display: none; }
}

@media (max-width: 700px) {
	.horarios__cols { gap: 2px; }
	.horarios__barra { max-width: 18px; }
	.inicio-bloque__cabecera { flex-wrap: wrap; }
}

/* DataTables en modo oscuro */
html[data-tema="oscuro"] .dataTables_wrapper,
html[data-tema="oscuro"] .dataTables_info,
html[data-tema="oscuro"] .dataTables_length,
html[data-tema="oscuro"] .dataTables_filter,
html[data-tema="oscuro"] .dataTables_paginate {
	color: var(--ray-text);
}

html[data-tema="oscuro"] table.dataTable tbody tr {
	background: var(--ray-white);
	color: var(--ray-text);
}

html[data-tema="oscuro"] table.dataTable.stripe tbody tr.odd,
html[data-tema="oscuro"] table.dataTable.display tbody tr.odd {
	background: rgba(47, 171, 93, 0.06);
}

html[data-tema="oscuro"] .dataTables_wrapper .dataTables_paginate .paginate_button {
	color: var(--ray-text) !important;
}

html[data-tema="oscuro"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
	background: var(--ray-green) !important;
	border-color: var(--ray-green) !important;
	color: var(--ray-on-primary) !important;
}

.boton--grande {
	min-height: 48px;
	padding: 0.85rem 1.25rem;
	font-size: 1rem;
}

.formulario__fila {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.mapa-parada-wrap {
	margin-top: 0.75rem;
}

.mapa-parada {
	width: 100%;
	height: 320px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--ray-border, #d7e0d9);
}

.mapa-captura {
	width: 100%;
	height: min(55vh, 480px);
	min-height: 280px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--ray-border, #d7e0d9);
}

.mapa-marcador-orden {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.mapa-marcador-orden--activo {
	transform: scale(1.15);
	box-shadow: 0 0 0 3px rgba(47, 171, 93, 0.45);
}

.captura-vista .captura-barra,
.captura-vista .captura-form,
.captura-vista .captura-lista {
	margin-bottom: 1rem;
}

.captura-acciones {
	margin-top: 0.75rem;
	flex-wrap: wrap;
}

.captura-lista__titulo {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
	color: var(--ray-heading);
}

.captura-secuencia {
	margin: 0;
	padding-left: 1.25rem;
}

.captura-secuencia li {
	margin-bottom: 0.35rem;
}

.captura-secuencia__coords {
	color: var(--ray-muted);
	font-size: 0.9em;
}

.captura-secuencia__vacio {
	list-style: none;
	margin-left: -1.25rem;
	color: var(--ray-muted);
}

.filtros-paradas,
.filtros-reportes {
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem 1rem;
}

.filtros-inicio {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: flex-start;
	gap: 0.65rem 0.75rem;
	margin: 0.75rem 0 1rem;
	padding: 0.85rem 1rem;
	border: 1px solid var(--ray-border);
	border-radius: var(--radius);
	background: var(--ray-white);
}

.filtros-inicio .formulario__grupo {
	margin: 0;
}

.filtros-inicio__campo {
	width: 140px;
	max-width: 100%;
}

.filtros-inicio__campo .entrada {
	width: 100%;
}

.filtros-inicio__acciones {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.filtros-inicio__periodo {
	margin: 0;
	flex: 1 1 160px;
	align-self: center;
	color: var(--ray-muted);
	font-size: 0.88rem;
}

.tarjeta--placeholder {
	border-style: dashed;
	background: transparent;
	box-shadow: none;
	opacity: 0.92;
}

.tarjeta--placeholder .inicio-panel__titulo {
	color: var(--ray-muted);
}

.password-field {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: stretch;
}

.password-field .entrada {
	flex: 1 1 220px;
	min-width: 0;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: 0.02em;
}

.password-field__acciones {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.password-field__acciones .boton {
	white-space: nowrap;
}

.reporte-meta {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 0.85rem 1rem;
}

.reporte-meta__label {
	display: block;
	font-size: 0.8rem;
	color: var(--ray-muted);
	margin-bottom: 0.15rem;
}

.galeria {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.75rem;
}

.galeria__item {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--ray-border, #d7e0d9);
	aspect-ratio: 1;
	background: rgba(47, 171, 93, 0.06);
}

.galeria__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.badge--informal {
	background: rgba(230, 145, 0, 0.16);
	color: #8A5300;
	border: 1px dashed rgba(230, 145, 0, 0.7);
}

html[data-tema="oscuro"] .badge--informal {
	color: #FFC870;
}

.mapa-marcador-orden--informal {
	border-style: dashed;
	border-color: #FFC870;
}

.mapa-marcador-ref {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(92, 111, 104, 0.55);
	border: 2px solid #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sentido-tabs {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	padding: 0.25rem;
	border: 1px solid var(--ray-border);
	border-radius: var(--radius-pill);
	background: var(--ray-surface);
}

.sentido-tabs__opcion {
	min-height: var(--touch, 44px);
	padding: 0.45rem 1rem;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--ray-heading);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.sentido-tabs__opcion--activo {
	background: var(--ray-green-dark);
	color: var(--ray-on-primary);
}

.sentido-tabs__conteo {
	opacity: 0.75;
	font-weight: 400;
}

.sentido-leyenda {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ray-heading);
}

.sentido-leyenda__item {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.sentido-leyenda__linea {
	display: inline-block;
	width: 28px;
	height: 4px;
	border-radius: 2px;
}

.sentido-leyenda__linea--punteada {
	background: transparent;
	border-top: 4px dashed currentColor;
	height: 0;
}

#ruta-secuencia-ambos {
	margin-top: 1rem;
}

.captura-sugerencia {
	margin: 0.75rem 0 0;
	padding: 0.85rem 1rem;
	border: 1px dashed var(--ray-green);
	border-radius: var(--radius);
	background: rgba(47, 171, 93, 0.08);
}

.captura-sugerencia__texto {
	margin: 0 0 0.65rem;
}

.parada-foto {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-start;
}

.parada-foto__vista {
	width: 220px;
	max-width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--ray-border, #d7e0d9);
	background: rgba(47, 171, 93, 0.06);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ray-muted);
	font-size: 0.875rem;
}

.parada-foto__vista img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.parada-foto__acciones {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.parada-miniatura {
	width: 40px;
	height: 40px;
	border-radius: 6px;
	object-fit: cover;
	vertical-align: middle;
	border: 1px solid var(--ray-border, #d7e0d9);
}

.parada-rutas {
	margin: 0;
	padding-left: 1.25rem;
}

.parada-rutas li {
	margin-bottom: 0.35rem;
}

.parada-rutas__quitar {
	margin-left: 0.5rem;
	color: var(--ray-alert);
	font-size: 0.875rem;
}

@media (max-width: 900px) {
	.admin-shell__content,
	.admin-shell--menu-colapsado .admin-shell__content { margin-left: 0; }
	.admin-main { padding: 1rem; }
	.mapa-parada { height: 55vh; min-height: 280px; }
	.formulario__fila { grid-template-columns: 1fr; }
}
