/* Tablero de producción — pantalla tipo aeropuerto / TV */

.logistica-tv-board {
	--tv-bg: #0b1220;
	--tv-panel: #121a2b;
	--tv-line: #243047;
	--tv-text: #e8eef8;
	--tv-muted: #93a4c3;
	--tv-accent: #38bdf8;
	--tv-warn: #f59e0b;
	--tv-danger: #ef4444;
	--tv-ok: #22c55e;
	background:
		radial-gradient(1200px 500px at 10% -10%, rgba(56, 189, 248, 0.16), transparent 60%),
		radial-gradient(900px 400px at 90% 0%, rgba(34, 197, 94, 0.1), transparent 55%),
		var(--tv-bg);
	border: 1px solid var(--tv-line);
	border-radius: 16px;
	color: var(--tv-text);
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: calc(100vh - 120px);
	padding: 18px;
}

.logistica-tv-board:fullscreen,
.logistica-tv-board:-webkit-full-screen {
	border-radius: 0;
	height: 100vh;
	min-height: 100vh;
	overflow: auto;
	width: 100vw;
}

.logistica-tv-board__header {
	align-items: end;
	display: grid;
	gap: 16px;
	grid-template-columns: minmax(0, 1.4fr) auto minmax(220px, 0.8fr);
}

.logistica-tv-board__eyebrow {
	color: var(--tv-accent);
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.logistica-tv-board__title {
	color: #fff;
	font-size: clamp(1.6rem, 2.4vw, 2.2rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 4px 0 0;
}

.logistica-tv-board__subtitle {
	color: var(--tv-muted);
	margin: 4px 0 0;
}

.logistica-tv-board__clock-wrap {
	align-items: end;
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: right;
}

.logistica-tv-board__clock {
	color: #fff;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: clamp(2rem, 4vw, 3.2rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
}

.logistica-tv-board__refresh {
	color: var(--tv-muted);
	font-size: 12px;
}

.logistica-tv-board__toolbar {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

.logistica-tv-board__filter {
	display: grid;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
}

.logistica-tv-board__filter select {
	background: var(--tv-panel);
	border: 1px solid var(--tv-line);
	border-radius: 8px;
	color: var(--tv-text);
	min-height: 38px;
	min-width: 180px;
	padding: 6px 10px;
}

.logistica-tv-board__toolbar .button {
	align-items: center;
	display: inline-flex;
	gap: 6px;
}

.logistica-tv-board__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.logistica-tv-board__stats span {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--tv-line);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	padding: 6px 12px;
}

.logistica-tv-board__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.logistica-tv-board__chip {
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
}

.logistica-tv-board__chip--plan_a {
	background: rgba(239, 68, 68, 0.2);
	color: #fecaca;
}

.logistica-tv-board__chip--plan_b {
	background: rgba(56, 189, 248, 0.18);
	color: #bae6fd;
}

.logistica-tv-board__chip--plan_c {
	background: rgba(148, 163, 184, 0.2);
	color: #cbd5e1;
}

.logistica-tv-board__alert-chip--programado { background: #1e3a5f; color: #93c5fd; }
.logistica-tv-board__alert-chip--en_proceso { background: #14532d; color: #86efac; }
.logistica-tv-board__alert-chip--problemas_filtrado { background: #7c2d12; color: #fdba74; }
.logistica-tv-board__alert-chip--mantenimiento { background: #4c1d95; color: #ddd6fe; }
.logistica-tv-board__alert-chip--revision_material { background: #854d0e; color: #fde68a; }
.logistica-tv-board__alert-chip--cambio_referencia { background: #0e7490; color: #a5f3fc; }
.logistica-tv-board__alert-chip--detenido { background: #7f1d1d; color: #fecaca; }
.logistica-tv-board__alert-chip--finalizado { background: #064e3b; color: #6ee7b7; }

.logistica-tv-board__lanes {
	display: grid;
	gap: 12px;
	grid-auto-flow: column;
	grid-auto-columns: minmax(260px, 1fr);
	overflow-x: auto;
	padding-bottom: 8px;
}

.logistica-tv-board.is-etapa-focused .logistica-tv-board__lanes {
	grid-auto-columns: minmax(0, 1fr);
	grid-template-columns: minmax(0, 1fr);
}

.logistica-tv-board.is-etapa-focused .logistica-tv-board__lane.is-active-etapa {
	min-height: calc(100vh - 280px);
}

.logistica-tv-board.is-etapa-focused .logistica-tv-board__lane-body {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.logistica-tv-board__lane {
	background: var(--tv-panel);
	border: 1px solid var(--tv-line);
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	min-height: 420px;
}

.logistica-tv-board__lane[hidden],
.logistica-tv-board__lane.is-hidden-etapa {
	display: none !important;
}

.logistica-tv-board__lane-head {
	align-items: center;
	border-bottom: 1px solid var(--tv-line);
	display: flex;
	justify-content: space-between;
	padding: 12px 14px;
}

.logistica-tv-board__lane-head h3 {
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.04em;
	margin: 0;
	text-transform: uppercase;
}

.logistica-tv-board__lane-count {
	background: rgba(56, 189, 248, 0.15);
	border-radius: 999px;
	color: var(--tv-accent);
	font-size: 12px;
	font-weight: 800;
	min-width: 28px;
	padding: 2px 8px;
	text-align: center;
}

.logistica-tv-board__lane-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
}

.logistica-tv-card {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
	border: 1px solid var(--tv-line);
	border-left: 4px solid var(--tv-accent);
	border-radius: 12px;
	cursor: pointer;
	display: grid;
	gap: 8px;
	padding: 12px;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.logistica-tv-card:hover {
	border-color: #475569;
	transform: translateY(-1px);
}

.logistica-tv-card.is-plan_a { border-left-color: var(--tv-danger); }
.logistica-tv-card.is-plan_b { border-left-color: var(--tv-accent); }
.logistica-tv-card.is-plan_c { border-left-color: #94a3b8; }
.logistica-tv-card.is-overtime {
	animation: tv-board-pulse 1.6s ease-in-out infinite;
	border-color: rgba(239, 68, 68, 0.55);
	box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25);
}

@keyframes tv-board-pulse {
	0%, 100% { background-color: rgba(239, 68, 68, 0.08); }
	50% { background-color: rgba(239, 68, 68, 0.18); }
}

.logistica-tv-card__top {
	align-items: start;
	display: flex;
	gap: 8px;
	justify-content: space-between;
}

.logistica-tv-card__title {
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	margin: 0;
}

.logistica-tv-card__meta {
	color: var(--tv-muted);
	font-size: 12px;
	line-height: 1.35;
}

.logistica-tv-card__person {
	color: #f8fafc;
	font-size: 13px;
	font-weight: 700;
}

.logistica-tv-card__alert {
	border-radius: 8px;
	font-size: 12px;
	font-weight: 800;
	padding: 6px 8px;
	text-align: center;
}

.logistica-tv-card__timers {
	display: grid;
	gap: 6px;
	grid-template-columns: 1fr 1fr;
}

.logistica-tv-card__timer {
	background: rgba(0, 0, 0, 0.25);
	border-radius: 8px;
	padding: 6px 8px;
}

.logistica-tv-card__timer span {
	color: var(--tv-muted);
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.logistica-tv-card__timer strong {
	display: block;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
	font-weight: 800;
	margin-top: 2px;
}

.logistica-tv-card__timer.is-overtime strong {
	color: #fecaca;
}

.logistica-tv-board__empty {
	background: rgba(255, 255, 255, 0.04);
	border: 1px dashed var(--tv-line);
	border-radius: 12px;
	color: var(--tv-muted);
	margin: 0;
	padding: 28px;
	text-align: center;
}

.logistica-tv-board__dialog {
	background: #0f172a;
	border: 1px solid var(--tv-line);
	border-radius: 14px;
	color: var(--tv-text);
	max-width: 420px;
	padding: 0;
	width: calc(100% - 32px);
}

.logistica-tv-board__dialog::backdrop {
	background: rgba(2, 6, 23, 0.72);
}

.logistica-tv-board__edit-form {
	display: grid;
	gap: 12px;
	padding: 16px;
}

.logistica-tv-board__edit-form header {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.logistica-tv-board__edit-form h3 {
	margin: 0;
}

.logistica-tv-board__edit-form label {
	display: grid;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
}

.logistica-tv-board__edit-form input,
.logistica-tv-board__edit-form select {
	background: #111827;
	border: 1px solid var(--tv-line);
	border-radius: 8px;
	color: var(--tv-text);
	min-height: 38px;
	padding: 6px 10px;
}

.logistica-tv-board__edit-form footer {
	display: flex;
	gap: 8px;
}

@media (max-width: 1100px) {
	.logistica-tv-board__header {
		grid-template-columns: 1fr;
	}

	.logistica-tv-board__clock-wrap,
	.logistica-tv-board__toolbar {
		justify-content: flex-start;
		text-align: left;
	}
}
