.location-layout {
	display: grid;
	grid-template-columns: repeat(4, minmax(16rem, 1fr));
	height: 100vh;
	overflow: hidden;
}

.list {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.45rem;
	overflow-y: auto;
	padding: 0.75rem;
}

.list-empty {
	color: #6b7280;
	font-weight: 700;
	padding: 0.75rem;
}

.list-row {
	align-items: center;
	background: white;
	border: 1px solid #c7d2fe;
	border-radius: 0.375rem;
	cursor: pointer;
	display: grid;
	gap: 0.5rem;
	grid-template-columns: minmax(0, 1fr) auto;
	padding: 0.65rem;
}

.list-row:hover,
.list-row.active {
	background: #eef2ff;
	border-color: #0d6efd;
}

.list-row.dragging {
	opacity: 0.55;
}

.tile-more-button {
	align-items: center;
	background: transparent;
	border: 0;
	color: #475569;
	display: inline-flex;
	font-size: 1.1rem;
	height: 2rem;
	justify-content: center;
	line-height: 1;
	padding: 0;
	width: 2rem;
}

.tile-more-button:hover,
.tile-more-button:focus {
	background: #e0e7ff;
	color: #0d6efd;
	outline: none;
}

.list-row.drop-target {
	background: #dcfce7;
	border-color: #198754;
	box-shadow: inset 0 0 0 2px rgba(25, 135, 84, 0.25);
}

.list.drop-target {
	background: #f0fdf4;
	box-shadow: inset 0 0 0 2px rgba(25, 135, 84, 0.25);
}

.row-main {
	min-width: 0;
}

.row-title {
	color: #1f2937;
	font-size: 1.05rem;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.row-meta {
	color: #4b5563;
	font-size: 0.9rem;
	margin-top: 0.15rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.action-spacer {
	flex: 1;
}

.status {
	color: #b00020;
	font-weight: 700;
	min-height: 1.2rem;
	padding: 0 0.75rem 0.75rem;
	white-space: pre-wrap;
}

.context-menu {
	background: white;
	border: 1px solid #c7d2fe;
	border-radius: 0.375rem;
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 8.5rem;
	padding: 0.35rem;
	position: fixed;
	z-index: 80;
}

.context-menu button {
	background: white;
	border: 0;
	border-radius: 0.25rem;
	color: #1f2937;
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 700;
	padding: 0.45rem 0.65rem;
	text-align: left;
}

.context-menu button:hover,
.context-menu button:focus {
	background: #eef2ff;
	outline: none;
}

.modal-backdrop {
	align-items: center;
	background: rgba(15, 23, 42, 0.42);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 1rem;
	position: fixed;
	z-index: 50;
}

@media only screen and (max-width: 960px) {
.location-layout {
		grid-template-columns: 82vw 82vw 82vw 82vw;
		overflow-x: auto;
	}
}

.mobile-modal {
	display: none;
}

.modal-header {
	align-items: center;
	background: #f8fafc;
	border-bottom: 1px solid #dbe4ff;
	display: flex;
	gap: 0.5rem;
	justify-content: space-between;
	padding: 0.75rem;
}

.modal-header h2 {
	color: #1f2937;
	font-size: 1.18rem;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mobile-add-item-tile {
	display: none;
}

@media only screen and (max-width: 960px) {
	.location-layout {
		box-sizing: border-box;
		display: block;
		height: 100%;
		overflow: hidden;
		width: 100%;
	}

	.zone-list {
		box-sizing: border-box;
		gap: 0.6rem;
		padding: 0.25rem 0.75rem;
		width: 100%;
	}

	.list-row {
		box-sizing: border-box;
		border-radius: 0.45rem;
		min-height: 4.25rem;
		padding: 0.75rem;
		touch-action: manipulation;
		user-select: none;
	}

	.row-title,
	.row-meta {
		white-space: normal;
	}

.mobile-modal {
		background: white;
		border-radius: 0;
		box-shadow: none;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		height: 100%;
		max-width: none;
		min-height: 0;
		overflow: hidden;
		position: relative;
		width: 100%;
	}

.mobile-backdrop {
		align-items: stretch;
		justify-content: stretch;
		padding: 0;
	}

.mobile-modal .modal-header h2 {
		white-space: normal;
	}

.mobile-modal .list {
		flex: 1;
		min-height: 0;
	}

.mobile-add-item-tile {
		align-items: center;
		background: #f8fafc;
		box-sizing: border-box;
		display: grid;
		gap: 0.5rem;
		grid-template-columns: minmax(0, 1fr) auto;
		padding: 0.75rem;
	}

.mobile-add-item-tile datalist {
		display: none;
	}

.mobile-add-item-tile button {
		font-size: 1rem;
		padding: 0.65rem 0.75rem;
	}

	.context-menu {
		z-index: 90;
	}
}
