/* =====================================================================
   PANEL MOTORIZADOS — Registro de Motorizados
   Alcaldía del Municipio Guanta
   ---------------------------------------------------------------------
   Layout tipo SIGRH: barra lateral fija (verde institucional) +
   área de contenido. Bootstrap 5.3 provee la base; aquí solo el
   look propio del panel.
   ===================================================================== */

:root {
	--mot-verde: #26b6b4;
	--mot-verde-oscuro: #17827f;
	--mot-verde-claro: #E6F7F6;
	--mot-borde: #e5e7eb;
	--mot-texto: #1f2937;
}

html, body {
	height: 100%;
}

body.mot-panel {
	background: #f3f4f6;
	color: var(--mot-texto);
	font-size: 0.95rem;
}

/* ---------- Barra lateral ---------- */
.mot-sidebar {
	position: fixed;
	inset: 0 auto 0 0;
	width: 240px;
	background: var(--mot-verde);
	color: #fff;
	display: flex;
	flex-direction: column;
	z-index: 1040;
}

.mot-sidebar-brand {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 1rem 1.1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.mot-sidebar-brand img {
	width: 42px;
	height: 42px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

.mot-sidebar-brand .titulo {
	font-weight: 700;
	line-height: 1.1;
	font-size: 0.98rem;
}

.mot-sidebar-brand .sub {
	font-size: 0.7rem;
	opacity: 0.85;
}

.mot-nav {
	padding: 0.75rem 0.6rem;
	flex: 1 1 auto;
	overflow-y: auto;
}

.mot-nav .mot-seccion {
	font-size: 0.66rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
	padding: 0.75rem 0.6rem 0.35rem;
}

.mot-nav a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: #fff;
	text-decoration: none;
	padding: 0.55rem 0.7rem;
	border-radius: 0.5rem;
	font-weight: 500;
	font-size: 0.92rem;
	margin-bottom: 0.15rem;
}

.mot-nav a i {
	width: 1.15rem;
	text-align: center;
	font-size: 0.95rem;
}

.mot-nav a:hover {
	background: rgba(255, 255, 255, 0.16);
}

.mot-nav a.activo {
	background: #fff;
	color: var(--mot-verde-oscuro);
	font-weight: 700;
}

/* Contador tipo burbuja dentro del enlace (docs vencidos). */
.mot-contador {
	margin-left: auto;
	background: #fff;
	color: var(--mot-verde-oscuro);
	font-size: 0.7rem;
	font-weight: 700;
	min-width: 1.35rem;
	height: 1.35rem;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 0.3rem;
}

.mot-nav a.activo .mot-contador {
	background: var(--mot-verde-oscuro);
	color: #fff;
}

.mot-sidebar-pie {
	padding: 0.8rem 1.1rem;
	font-size: 0.72rem;
	opacity: 0.85;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---------- Área de contenido ---------- */
.mot-contenido {
	margin-left: 240px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.mot-topbar {
	background: #fff;
	border-bottom: 1px solid var(--mot-borde);
	padding: 0.65rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	position: sticky;
	top: 0;
	z-index: 1020;
}

.mot-topbar .mot-burger {
	display: none;
}

.mot-main {
	flex: 1 1 auto;
	padding: 1.25rem;
	width: 100%;
	max-width: 1280px;
}

/* ---------- Botones institucionales ---------- */
.mot-btn-verde {
	background: var(--mot-verde);
	border-color: var(--mot-verde);
	color: #fff;
}

.mot-btn-verde:hover,
.mot-btn-verde:focus {
	background: var(--mot-verde-oscuro);
	border-color: var(--mot-verde-oscuro);
	color: #fff;
}

/* Barra de progreso de reportes */
.mot-barra { background: var(--mot-verde); }

/* ---------- Adjuntar fotos (mismo patrón del comprobante de pago
   de la APP: input oculto + label-botón, el "Browse" nativo no es
   traducible) ---------- */
.mot-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.mot-file-label {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	border: 1.5px dashed #26b6b4;
	border-radius: 10px;
	background: #E6F7F6;
	color: #17827f;
	font-size: 0.8rem;
	font-weight: 700;
	padding: 0.6rem 0.5rem;
	cursor: pointer;
	text-align: center;
	min-height: 42px;
	width: 100%;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.mot-file-label:active {
	background: #FBD9D0;
}

.mot-file-label i {
	font-size: 0.95rem;
	flex: 0 0 auto;
}

.mot-file-nombre {
	flex: 1 1 100%;
	font-weight: 500;
	font-size: 0.72rem;
	color: #6b7280;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Sin archivo elegido: el nombre no ocupa línea. */
.mot-file-nombre:empty {
	display: none;
}

/* Dos botones (cámara / galería) apilados en móvil. */
label.mot-file-label + label.mot-file-label {
	margin-top: 0.45rem;
}

/* Vista previa de la foto elegida + botón para quitarla. */
.mot-foto-prevista {
	margin-top: 0.5rem;
	text-align: center;
	border: 1.5px dashed var(--mot-borde);
	border-radius: 10px;
	padding: 0.45rem;
	background: #fbfbfc;
}

.mot-foto-prevista img {
	max-width: 100%;
	max-height: 150px;
	border-radius: 8px;
	display: block;
	margin: 0 auto;
}

.mot-foto-quitar {
	margin-top: 0.4rem;
	border: 1px solid #dc3545;
	background: #fff;
	color: #dc3545;
	border-radius: 8px;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.28rem 0.7rem;
	cursor: pointer;
}

.mot-foto-quitar:hover {
	background: #dc3545;
	color: #fff;
}

/* ---------- Visor de fotos (documentos) ---------- */
.mot-foto-thumb {
	padding: 0;
	border: 1.5px solid var(--mot-borde);
	border-radius: 8px;
	overflow: hidden;
	background: none;
	cursor: zoom-in;
	line-height: 0;
}

.mot-foto-thumb + .mot-foto-thumb {
	margin-left: 0.35rem;
}

.mot-foto-thumb img {
	width: 64px;
	height: 44px;
	object-fit: cover;
	display: block;
}

.mot-luz {
	position: fixed;
	inset: 0;
	background: rgba(17, 24, 39, 0.88);
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	cursor: zoom-out;
}

.mot-luz img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	background: #fff;
}

.mot-luz-cerrar {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 1.1rem;
	cursor: pointer;
}

.mot-luz-cerrar:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* ---------- Tarjetas y tablas ---------- */
.mot-card {
	background: #fff;
	border: 1px solid var(--mot-borde);
	border-radius: 0.75rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mot-stat {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 1rem 1.1rem;
}

.mot-stat .mot-stat-icono {
	width: 46px;
	height: 46px;
	border-radius: 0.65rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.15rem;
	color: #fff;
	flex: 0 0 auto;
}

.mot-tabla thead th {
	background: var(--mot-verde-claro);
	color: var(--mot-verde-oscuro);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-bottom: 1px solid var(--mot-borde) !important;
}

/* ---------- Login ---------- */
.mot-login-body {
	background: var(--mot-verde);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mot-login-card {
	width: 100%;
	max-width: 420px;
	border-radius: 1rem;
}

/* ---------- Horarios de circulación (patrones) ---------- */

/* Chips de día de la semana: punto verde si tiene rango. */
.hor-dias {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.hor-dia {
	position: relative;
	border: 1px solid var(--mot-borde);
	background: #fff;
	color: var(--mot-texto);
	border-radius: 18px;
	padding: 0.3rem 0.85rem;
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
}

.hor-dia.activa {
	background: var(--mot-verde);
	border-color: var(--mot-verde);
	color: #fff;
}

.hor-dia-punto {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--mot-verde);
	margin-left: 0.35rem;
	vertical-align: middle;
}

.hor-dia.activa .hor-dia-punto {
	background: #fff;
}

/* Franja de 24 horas: celdas contiguas seleccionables por arrastre
   (mouse y touch). touch-action evita el scroll al arrastrar. */
.hor-franja {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 2px;
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
}

@media (max-width: 640px) {
	.hor-franja { grid-template-columns: repeat(8, 1fr); }
}

.hor-celda {
	border: 1px solid var(--mot-borde);
	background: #fff;
	color: var(--mot-texto);
	border-radius: 6px;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.45rem 0;
	cursor: pointer;
}

.hor-celda:hover {
	border-color: var(--mot-verde);
}

.hor-celda.seleccionada {
	background: var(--mot-verde);
	border-color: var(--mot-verde-oscuro);
	color: #fff;
}

/* ---------- Progreso del asistente (nuevo motorizado) ---------- */
.mot-progreso {
	background: var(--mot-verde-claro);
	border: 1.5px solid var(--mot-verde);
	border-radius: 14px;
	padding: 0.8rem 1rem;
}

.mot-progreso-pasos {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.mot-paso {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	border-radius: 18px;
	padding: 0.32rem 0.8rem;
	font-size: 0.85rem;
	font-weight: 600;
	background: #fff;
	border: 1.5px solid var(--mot-borde);
	color: var(--mot-texto);
}

.mot-paso.activo {
	background: var(--mot-verde);
	border-color: var(--mot-verde-oscuro);
	color: #fff;
}

.mot-paso-flecha {
	color: var(--mot-verde-oscuro);
	font-size: 0.75rem;
}

/* ---------- Responsive: sidebar colapsable ---------- */
@media (max-width: 991.98px) {
	.mot-sidebar {
		transform: translateX(-100%);
		transition: transform 0.25s ease;
	}

	.mot-sidebar.abierto {
		transform: translateX(0);
	}

	.mot-contenido {
		margin-left: 0;
	}

	.mot-topbar .mot-burger {
		display: inline-flex;
	}
}
