/* ================================================================
   WMS — v_bodega  |  Vista de pájaro + Modal de detalle
   ================================================================ */

/* ===== Página base ===== */
.wms-page {
	background: #f1f5f9;
	min-height: calc(100vh - 60px);
	padding: 18px;
	color: #17324d;
}

.wms-shell-card {
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 2px 8px rgba(0,0,0,.06);
	border: 1px solid #e2e8f0;
}

/* ===== Encabezado ===== */
.wms-header {
	background: linear-gradient(135deg,#1d3354 0%,#2a4a73 100%);
	border-radius: 14px;
	padding: 18px 22px;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.wms-header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #fff;
}

.wms-header p {
	margin: 4px 0 0;
	color: rgba(255,255,255,.65);
	font-size: 13px;
}

.wms-badge-loading {
	color: #6d8194;
	font-size: 13px;
	padding-top: 6px;
}

/* ===== Selector de bodegas ===== */
.wms-bodega-selector {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 14px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 10px 16px;
	box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.wms-bodega-selector-icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #edf2f7;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #5d7185;
	font-size: 16px;
	flex-shrink: 0;
}

.wms-bodega-selector-label {
	font-size: 14px;
	font-weight: 600;
	color: #456178;
	margin-right: 4px;
}

.wms-bodega-select {
	padding: 6px 32px 6px 12px;
	border: 2px solid #d4dfe8;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #1d3354;
	background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23456178' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center;
	background-size: 10px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	min-width: 220px;
	transition: border-color 0.18s;
}

.wms-bodega-select:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.wms-bodega-pill {
	border: 2px solid #d4dfe8;
	border-radius: 8px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	background: #ffffff;
	color: #456178;
	cursor: pointer;
	transition: all 0.18s ease;
	white-space: nowrap;
}

.wms-bodega-pill:hover {
	border-color: #3b82f6;
	color: #1e40af;
	background: #eff6ff;
}

.wms-bodega-pill.active {
	background: #1d3354;
	border-color: #1d3354;
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(29, 51, 84, 0.25);
}

/* ===== Leyenda ===== */
.wms-legend {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.wms-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #e8ecf1;
	border-radius: 8px;
	padding: 8px 12px;
	min-width: 130px;
	font-size: 12px;
}

.wms-legend-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex: 0 0 12px;
}

/* ===== Layout de vista de pájaro ===== */
.wms-bodega-layout {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

/* ===== Strip verticale de pisos ===== */
.wms-piso-strip {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	flex: 0 0 52px;
	padding-top: 16px; /* align with grid header row */
}

.wms-piso-strip-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #8fa3b3;
	margin-bottom: 2px;
}

.wms-piso-btn {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 2px solid #d4dfe8;
	background: #ffffff;
	font-weight: 700;
	font-size: 16px;
	color: #456178;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(18, 77, 112, 0.07);
	transition: all 0.15s ease;
	cursor: pointer;
}

.wms-piso-btn:hover {
	border-color: #17324d;
	color: #17324d;
	background: #f0f6fb;
}

.wms-piso-btn.active {
	background: #17324d;
	border-color: #17324d;
	color: #ffffff;
	box-shadow: 0 6px 20px rgba(23, 50, 77, 0.22);
}

/* ===== Tarjeta del grid (ocupa todo el ancho restante) ===== */
.wms-grid-card {
	flex: 1;
	min-width: 0;
	padding: 20px 22px 24px;
}

.wms-board-scroll {
	overflow-x: auto;
	padding-bottom: 4px;
}

/* ===== Tabla del plano → CSS Grid ===== */
.wms-grid-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	flex-wrap: wrap;
	gap: 8px;
}

.wms-grid-container {
	min-width: 100%;
}

.wms-grid-corner {
	/* empty top-left corner cell */
}

.wms-grid-col-hdr {
	color: #8fa3b3;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	font-weight: 700;
	text-align: center;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding-bottom: 4px;
}

.wms-grid-row-hdr {
	color: #8fa3b3;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 4px;
}

/* Etiqueta de grupo (rack/piso) — muy sutil, arriba de cada celda */
.wms-cell-rack-label {
	display: block;
	font-size: 7.5px;
	font-weight: 700;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	opacity: 0.55;
	margin-bottom: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.2;
}

/* Agrupación por fondo: el padding del wms-grid-cell-wrap crea el bloque continuo */
.wms-grid-cell-wrap {
	min-height: 0;
}

/* ===== Celdas del grid ===== */
.wms-cell {
	border: 1px solid rgba(23, 50, 77, 0.12);
	min-height: 68px;
	border-radius: 10px;
	padding: 7px 8px;
	text-align: left;
	color: #17324d;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-width: 0;
	cursor: pointer;
	background: rgba(200, 220, 235, 0.18);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
	box-sizing: border-box;
	overflow: hidden;
}

.wms-cell:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 22px rgba(23, 50, 77, 0.13);
}

.wms-cell.active {
	outline: 2px solid rgba(23, 50, 77, 0.28);
	outline-offset: 2px;
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(23, 50, 77, 0.16);
}

.wms-cell-empty {
	min-height: 72px;
	height: 100%;
	border-radius: 10px;
	background: #f2f5f8;
	border: 1px solid rgba(23, 50, 77, 0.04);
	cursor: default;
	box-sizing: border-box;
}

.wms-cell-code {
	font-weight: 700;
	font-size: 13px;
	display: block;
	margin-bottom: 5px;
}

.wms-cell-caption {
	font-size: 11px;
	color: #466174;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

/* ===== Estado vacío ===== */
.wms-empty-state {
	min-height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	text-align: center;
	color: #6d8194;
	background: #e8ecf1;
	border: 1px dashed #d4dee8;
	border-radius: 14px;
	padding: 20px;
}

.wms-empty-state-title {
	color: #17324d;
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 6px;
}

.wms-empty-state-copy {
	max-width: 620px;
	line-height: 1.6;
}

.wms-muted {
	color: #6d8194;
}

/* ===== Lista de inventario ===== */
.wms-inventory-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wms-inventory-item {
	border-top: 1px solid #edf2f7;
	padding: 12px 0;
}

.wms-empty-inventory {
	color: #6d8194;
	font-size: 13px;
	font-style: italic;
	padding: 12px 0;
}

/* ===== Métricas del detalle (usadas en modal) ===== */
.wms-detail-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 18px 0;
}

.wms-detail-metric {
	background: #e8ecf1;
	border-radius: 10px;
	padding: 12px;
}

.wms-detail-metric label {
	display: block;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #698094;
	margin-bottom: 4px;
}

.wms-detail-metric strong {
	font-size: 16px;
	color: #17324d;
}

/* ================================================================
   MODAL DE DETALLE DE POSICIÓN
   ================================================================ */

.wms-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(12, 24, 42, 0.44);
	z-index: 1060;
	animation: wmsOverlayIn 0.18s ease;
}

.wms-modal-box {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1070;
	width: 480px;
	max-width: calc(100vw - 28px);
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 16px 48px rgba(12, 24, 42, 0.2);
	animation: wmsModalIn 0.2s cubic-bezier(0.34, 1.14, 0.64, 1);
}

@keyframes wmsOverlayIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes wmsModalIn {
	from { opacity: 0; transform: translate(-50%, -44%); }
	to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* Cabecera del modal */
.wms-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	background: linear-gradient(135deg,#1d3354,#2a4a73);
	color: #fff;
}

.wms-modal-head-info {
	min-width: 0;
}

.wms-modal-head-right {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.wms-modal-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
}

.wms-estado-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 6px;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.wms-modal-close {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	border: 0;
	background: rgba(255,255,255,.18);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.12s, color 0.12s;
}

.wms-modal-close:hover {
	background: #e2e9f0;
	color: #17324d;
}

/* Cuerpo del modal */
.wms-modal-body {
	padding: 16px 22px 24px;
}

.wms-modal-loading-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 36px;
	color: #6d8194;
	font-size: 14px;
}

.wms-modal-client-row {
	margin-bottom: 18px;
	font-size: 14px;
	color: #17324d;
}

.wms-modal-client-row strong {
	color: #456178;
	margin-right: 6px;
}

.wms-modal-section-title {
	font-size: 14px;
	font-weight: 700;
	color: #17324d;
	margin-bottom: 10px;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
	.wms-bodega-layout {
		flex-direction: column;
	}

	.wms-piso-strip {
		flex-direction: row;
		flex: none;
		width: 100%;
		padding-top: 0;
		justify-content: flex-start;
	}

	.wms-piso-strip-label {
		align-self: center;
		margin-bottom: 0;
		margin-right: 4px;
	}
}

@media (min-width: 1440px) {
	.wms-cell {
		min-height: 86px;
	}
}

/* ===== Botones de configuración ===== */
.wms-cfg-btn {
	border: 1px solid #d4dfe8;
	border-radius: 8px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	background: #fff;
	color: #456178;
	cursor: pointer;
	transition: all 0.14s;
	white-space: nowrap;
}

.wms-cfg-btn:hover {
	background: #eff6ff;
	border-color: #3b82f6;
	color: #1e40af;
}

.wms-cfg-btn i {
	margin-right: 4px;
}

/* ===== Form elements para modales ===== */
.wms-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 14px;
}

.wms-form-label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #7a94b3;
	margin-bottom: 4px;
}

.wms-form-input {
	width: 100%;
	border: 1px solid #dbe5f0;
	border-radius: 8px;
	background: #f4f8fd;
	color: #273d5a;
	padding: 7px 10px;
	font-size: 13px;
	min-height: 36px;
	box-sizing: border-box;
	transition: border-color 0.14s;
	appearance: none;
	-webkit-appearance: none;
}

.wms-form-input:focus {
	outline: none;
	border-color: #3d7cf0;
	background: #f8fbff;
}

.wms-form-preview {
	background: #e8ecf1;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	color: #456178;
	margin-bottom: 14px;
}

.wms-form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding-top: 6px;
}

.wms-btn-secondary {
	border: 1px solid #d5e1ed;
	border-radius: 8px;
	padding: 7px 14px;
	font-size: 12px;
	font-weight: 600;
	background: #eef4fb;
	color: #1f4d87;
	cursor: pointer;
	transition: background 0.13s;
}

.wms-btn-secondary:hover {
	background: #e2ecf8;
}

.wms-btn-primary {
	border: none;
	border-radius: 8px;
	padding: 7px 16px;
	font-size: 12px;
	font-weight: 700;
	background: #e65100;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(230,81,0,.18);
	transition: opacity 0.15s;
}

.wms-btn-primary:hover:not([disabled]) {
	opacity: 0.9;
}

.wms-btn-primary[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.wms-btn-primary i {
	margin-right: 4px;
}

/* ===== Selection mode ===== */
.wms-selection-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: #eff6ff;
	border: 1px solid #93c5fd;
	border-radius: 10px;
	padding: 8px 14px;
	margin-bottom: 12px;
}

.wms-selection-info {
	font-size: 13px;
	color: #1e40af;
	display: flex;
	align-items: center;
	gap: 6px;
}

.wms-selection-actions {
	display: flex;
	gap: 6px;
}

.wms-cfg-btn-active {
	background: #1d3354 !important;
	color: #fff !important;
	border-color: #1d3354 !important;
}

.wms-cell-selected .wms-cell {
	outline: 3px solid #2563eb !important;
	outline-offset: -1px;
	background: rgba(37, 99, 235, 0.12) !important;
	box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.08);
}

.wms-cell-merged .wms-cell {
	border: 2px dashed #8b5cf6;
	background: rgba(139, 92, 246, 0.08);
}

.wms-cell-merge-badge {
	display: inline-block;
	margin-top: auto;
	padding: 2px 6px;
	border-radius: 4px;
	background: rgba(139, 92, 246, 0.15);
	color: #6d28d9;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.wms-cell-merge-badge i {
	margin-right: 2px;
	font-size: 9px;
}

/* ===== Precio en celda ===== */
.wms-cell-price {
	display: inline-block;
	margin-top: 2px;
	padding: 1px 5px;
	border-radius: 3px;
	background: rgba(16, 185, 129, 0.14);
	color: #047857;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.3;
}
.wms-cell-price.price-cliente {
	background: rgba(37, 99, 235, 0.12);
	color: #1e40af;
}
.wms-cell-price.price-producto {
	background: rgba(168, 85, 247, 0.12);
	color: #7c3aed;
}
.wms-cell-price.price-bodega {
	background: rgba(245, 158, 11, 0.15);
	color: #b45309;
}
.wms-cell-price.price-sin-tarifa {
	background: rgba(239, 68, 68, 0.12);
	color: #dc2626;
	font-weight: 600;
	font-size: 8px;
}

/* ====== Estado de cobro mensual (suscripción) ====== */
.wms-cell-billing {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	margin-top: 2px;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 8.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	line-height: 1.5;
}
.wms-cell-billing i { font-size: 9px; }
.wms-cell-billing.billing-pendiente { background: rgba(202, 138, 4, 0.16);  color: #b45309; }
.wms-cell-billing.billing-facturada { background: rgba(37, 99, 235, 0.14);  color: #1d4ed8; }
.wms-cell-billing.billing-pagada    { background: rgba(22, 163, 74, 0.16);  color: #15803d; }
.wms-cell-billing.billing-vencida   { background: rgba(220, 38, 38, 0.16);  color: #b91c1c; animation: wms-billing-pulse 1.4s infinite; }
@keyframes wms-billing-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Fondo de celda por tipo de posición (celdas LIBRES — sin inventario) */
.wms-cell.cell-tipo-rack {
	background: rgba(237, 246, 255, 0.96);
	border-color: rgba(59, 130, 246, 0.22);
	border-top: 2px solid rgba(59, 130, 246, 0.30);
}
.wms-cell.cell-tipo-rack:hover {
	background: rgba(219, 234, 254, 0.98);
	border-color: rgba(59, 130, 246, 0.50);
	border-top-color: rgba(59, 130, 246, 0.55);
}
.wms-cell.cell-tipo-piso {
	background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.94) 100%);
	border-color: rgba(202,138,4,0.22);
	border-radius: 4px;
	border-top: 2px solid rgba(202,138,4,0.30);
	border-bottom: 3px solid rgba(180,83,9,0.35);
}
.wms-cell.cell-tipo-piso:hover {
	background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,250,252,0.98) 100%);
	border-color: rgba(202,138,4,0.50);
	border-bottom-color: rgba(180,83,9,0.60);
}
.wms-cell.cell-tipo-estanteria {
	background: rgba(220, 252, 236, 0.90);
	border-color: rgba(16, 185, 129, 0.22);
	border-top: 2px solid rgba(16, 185, 129, 0.30);
}
.wms-cell.cell-tipo-bloque {
	background: rgba(243, 240, 255, 0.92);
	border-color: rgba(168, 85, 247, 0.22);
	border-top: 2px solid rgba(168, 85, 247, 0.30);
}

/* Tipo de posición en celda */
.wms-cell-type {
	display: inline-block;
	margin-top: 1px;
	padding: 0 4px;
	border-radius: 3px;
	font-size: 8px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1.5;
	background: rgba(107, 114, 128, 0.12);
	color: #6b7280;
}
.wms-cell-type.type-rack {
	background: rgba(59, 130, 246, 0.12);
	color: #2563eb;
}
.wms-cell-type.type-piso {
	background: rgba(180,83,9,0.12);
	color: #b45309;
	font-weight: 700;
	text-decoration: underline dotted rgba(180,83,9,0.4);
}
.wms-cell-type.type-estanteria {
	background: rgba(16, 185, 129, 0.12);
	color: #059669;
}
.wms-cell-type.type-bloque {
	background: rgba(168, 85, 247, 0.12);
	color: #7c3aed;
}

/* Precio en modal detalle */
.wms-detail-metric-price strong {
	color: #047857;
	font-size: 15px;
}

/* ===== Tarjetas de Rack (agrupación visual por borde izquierdo) ===== */
.wms-racks-container,
.wms-rack-band,
.wms-rack-card,
.wms-rack-header,
.wms-rack-badge,
.wms-rack-stats,
.wms-rack-grid-wrap { /* legacy — no se usan en el layout plano */ }

.wms-rack-badge {
	display: inline-flex;
	align-items: center;
	background: #2563eb;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 4px 14px;
	border-radius: 20px;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.wms-rack-stats {
	font-size: 12px;
	color: #64748b;
	font-weight: 500;
}

.wms-rack-grid-wrap {
	padding: 12px 16px 16px;
	overflow-x: auto;
}
.wms-price-size-info {
	display: block;
	font-size: 10px;
	color: #6b7280;
	margin-top: 1px;
}

/* Tarifa info en modal detalle */
.wms-tarifa-info-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	margin: 10px 0;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 12px;
	color: #64748b;
}

.wms-tarifa-info-row i {
	color: #94a3b8;
}

.wms-prioridad-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.wms-prioridad-badge.prioridad-1 {
	background: rgba(168, 85, 247, 0.12);
	color: #7c3aed;
}
.wms-prioridad-badge.prioridad-2 {
	background: rgba(37, 99, 235, 0.12);
	color: #1e40af;
}
.wms-prioridad-badge.prioridad-3 {
	background: rgba(16, 185, 129, 0.12);
	color: #047857;
}

.wms-btn-merge {
	border: none;
	border-radius: 8px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 700;
	background: #2563eb;
	color: #fff;
	cursor: pointer;
	transition: opacity 0.14s;
	white-space: nowrap;
}

.wms-btn-merge:hover:not([disabled]) {
	opacity: 0.88;
}

.wms-btn-merge[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

.wms-btn-merge i {
	margin-right: 4px;
}

/* ===== Modal actions row ===== */
.wms-modal-actions-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	padding-top: 14px;
	border-top: 1px solid #edf2f7;
	margin-top: 14px;
}

/* ===== Section toggle (collapsible) ===== */
.wms-section-toggle {
	display: flex;
	align-items: center;
	padding: 10px 12px;
	border: 1px solid #d4dfe8;
	border-radius: 8px;
	background: #f8fafc;
	color: #1d3354;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.14s, border-color 0.14s;
	user-select: none;
}

.wms-section-toggle:hover {
	background: #eff6ff;
	border-color: #93c5fd;
}

/* ===== Celda OCUPADA — mayor contraste ===== */
/* El ng-style ya aplica background+border-color más fuertes.
   Esta clase añade el ancho del borde izquierdo (se suma al inline style). */
.wms-cell.wms-cell-ocupada-vis {
	border-left-width: 3px;
	font-weight: 600;
}
.wms-cell.wms-cell-ocupada-vis .wms-cell-code {
	font-weight: 800;
}

/* ===== Celda dimmed — filtro activo, no coincide ===== */
.wms-cell.wms-cell-dimmed {
	opacity: 0.13 !important;
	transform: none !important;
	box-shadow: none !important;
	pointer-events: none;
	filter: saturate(0.15);
	transition: opacity 0.22s ease, filter 0.22s ease;
}

/* ===== Barra de filtros ===== */
.wms-filter-bar {
	display: flex;
	align-items: flex-end;
	gap: 14px;
	flex-wrap: wrap;
	background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
	border: 1px solid #dbe8f4;
	border-radius: 12px;
	padding: 11px 16px;
	margin-bottom: 14px;
}

.wms-filter-group {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.wms-filter-label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: #7a94b3;
}

.wms-filter-label i {
	margin-right: 4px;
}

.wms-filter-select,
.wms-filter-input {
	min-width: 190px;
	max-width: 260px;
}

.wms-filter-status {
	display: flex;
	align-items: center;
	gap: 8px;
	align-self: flex-end;
}

.wms-filter-active-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #eff6ff;
	border: 1px solid #93c5fd;
	border-radius: 6px;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	color: #1e40af;
}

.wms-filter-active-badge i {
	font-size: 10px;
}

.wms-filter-clear {
	color: #dc2626 !important;
	border-color: #fca5a5 !important;
}

.wms-filter-clear:hover {
	background: #fff5f5 !important;
	border-color: #f87171 !important;
}

/* ===== Separador vertical entre selector y filtros ===== */
.wms-selector-sep {
	width: 1px;
	height: 32px;
	background: #d4dfe8;
	flex-shrink: 0;
	align-self: center;
	margin: 0 4px;
}

/* ===== Filtros inline (dentro del selector) ===== */
.wms-filter-inline {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

.wms-filter-inline .wms-filter-group {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.wms-filter-inline .wms-filter-label {
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: #7a94b3;
}

.wms-filter-inline .wms-filter-select,
.wms-filter-inline .wms-filter-input {
	min-width: 160px;
	max-width: 220px;
	padding: 5px 10px;
	min-height: 32px;
	font-size: 12px;
}

.wms-filter-inline .wms-filter-status {
	display: flex;
	align-items: center;
	gap: 6px;
	align-self: flex-end;
}

.wms-filter-inline .wms-badge-loading {
	align-self: flex-end;
	padding-bottom: 6px;
}

/* ================================================================
   BARRA DE HERRAMIENTAS COMPACTA (una sola línea)
   ================================================================ */

.wms-toolbar {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: nowrap;
	overflow-x: auto;
	margin-bottom: 12px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 7px 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
	min-height: 50px;
}

.wms-tbar-icon-lead {
	color: #94a3b8;
	font-size: 14px;
	flex-shrink: 0;
	margin-right: 2px;
}

/* Bodega select dentro del toolbar */
.wms-tbar-bodega-sel {
	height: 34px;
	padding-top: 0;
	padding-bottom: 0;
	min-width: 200px;
	max-width: 320px;
	font-size: 13px;
}

/* Botones compactos icon-only */
.wms-tbar-btn {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: 1px solid #d4dfe8;
	background: #ffffff;
	color: #5d7185;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.14s;
	flex-shrink: 0;
	padding: 0;
}
.wms-tbar-btn:hover {
	background: #f0f6ff;
	border-color: #93c5fd;
	color: #1d4ed8;
}

.wms-tbar-btn-new {
	border-style: dashed;
	color: #2563eb;
	border-color: #93c5fd;
}
.wms-tbar-btn-new:hover {
	background: #eff6ff;
	border-style: solid;
}

.wms-tbar-btn-del {
	color: #dc2626;
	border-color: #fca5a5;
}
.wms-tbar-btn-del:hover {
	background: #fff5f5;
	border-color: #f87171;
}

.wms-tbar-btn-clear {
	color: #b45309;
	border-color: #fde68a;
	background: #fffbeb;
}
.wms-tbar-btn-clear:hover {
	background: #fef3c7;
	border-color: #fbbf24;
	color: #92400e;
}

/* Botón con texto (para "Crear primera bodega") */
.wms-tbar-btn-text {
	width: auto;
	padding: 0 14px;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
}
.wms-tbar-btn-text i {
	margin-right: 4px;
}

/* Separador vertical */
.wms-tbar-sep {
	width: 1px;
	height: 22px;
	background: #e2e8f0;
	flex-shrink: 0;
	margin: 0 3px;
}

/* Campo de filtro con ícono prefijo */
.wms-tbar-field {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.wms-tbar-field-icon {
	position: absolute;
	left: 9px;
	color: #94a3b8;
	font-size: 11px;
	pointer-events: none;
	z-index: 1;
}

.wms-tbar-field-ctrl {
	height: 34px;
	padding: 0 10px 0 28px;
	border: 1px solid #d4dfe8;
	border-radius: 8px;
	background: #f8fafc;
	color: #273d5a;
	font-size: 12px;
	width: 160px;
	box-sizing: border-box;
	transition: border-color 0.14s, width 0.2s, box-shadow 0.14s;
	-webkit-appearance: none;
	appearance: none;
}
.wms-tbar-field-ctrl:focus {
	outline: none;
	border-color: #3b82f6;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(59,130,246,0.10);
	width: 200px;
}
.wms-tbar-field-ctrl::placeholder {
	color: #b0bec5;
}

/* Select: chevron custom */
select.wms-tbar-field-ctrl {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='%23456178' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 8px center;
	background-size: 9px;
	background-color: #f8fafc;
	padding-right: 24px;
	cursor: pointer;
}
select.wms-tbar-field-ctrl:focus {
	background-color: #ffffff;
}

/* Spinner loading */
.wms-tbar-spinner {
	color: #94a3b8;
	font-size: 13px;
	flex-shrink: 0;
	margin-left: 2px;
}

/* ===== Chips de estado en toolbar ===== */
.wms-tbar-estado-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 30px;
	padding: 0 10px;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	background: #f8fafc;
	color: #456178;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.14s;
	flex-shrink: 0;
	white-space: nowrap;
}
.wms-tbar-estado-chip:hover {
	border-color: #94a3b8;
	background: #f1f5f9;
	color: #1d3354;
}
.wms-tbar-estado-chip.active {
	border-color: transparent;
	background: #1d3354;
	color: #ffffff;
	box-shadow: 0 2px 6px rgba(29,51,84,0.20);
}
.wms-tbar-estado-chip.active .wms-tbar-chip-dot {
	box-shadow: 0 0 0 2px rgba(255,255,255,0.45);
}

.wms-tbar-chip-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}
.wms-tbar-chip-label {
	flex-shrink: 0;
}
.wms-tbar-chip-count {
	font-size: 10px;
	font-weight: 700;
	opacity: 0.65;
	flex-shrink: 0;
}
