body {
	background: #f4f6f8;
	color: #18212f;
}

.app-sidebar {
	background: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
	bottom: 0;
	color: #fff;
	display: flex;
	flex-direction: column;
	left: 0;
	padding: 1rem;
	position: fixed;
	top: 0;
	width: 224px;
	z-index: 1000;
}

.sidebar-brand {
	align-items: center;
	color: #fff;
	display: flex;
	font-weight: 700;
	gap: .75rem;
	letter-spacing: .02rem;
	margin-bottom: 1.25rem;
	text-decoration: none;
	text-transform: uppercase;
}

.sidebar-brand:hover,
.sidebar-nav a:hover,
.sidebar-logout button:hover {
	color: #fff;
}

.brand-mark {
	align-items: center;
	background: rgba(255, 255, 255, .18);
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: .5rem;
	display: inline-flex;
	height: 2.25rem;
	justify-content: center;
	width: 2.25rem;
}

.sidebar-user {
	border-bottom: 1px solid rgba(255, 255, 255, .18);
	border-top: 1px solid rgba(255, 255, 255, .18);
	margin-bottom: 1rem;
	padding: .9rem 0;
}

.sidebar-nav {
	display: grid;
	gap: .25rem;
}

.sidebar-nav a,
.sidebar-logout button {
	background: transparent;
	border: 0;
	border-radius: .35rem;
	color: rgba(255, 255, 255, .82);
	display: block;
	font-weight: 600;
	padding: .75rem;
	text-align: left;
	text-decoration: none;
	width: 100%;
}

.sidebar-nav a:hover,
.sidebar-logout button:hover {
	background: rgba(255, 255, 255, .12);
}

.sidebar-logout {
	margin-top: auto;
}

.app-main {
	margin-left: 224px;
	max-width: calc(100% - 224px);
}

.login-page {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 1rem;
}

.login-box {
	width: min(100%, 420px);
}

.narrow {
	max-width: 760px;
}

.queue-strip {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.dashboard-actions {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	justify-content: flex-end;
}

.queue-badge {
	border: 1px solid transparent;
	border-radius: .375rem;
	color: #fff;
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	font-size: .8125rem;
	font-weight: 600;
	line-height: 1;
	padding: .35rem .55rem;
	white-space: nowrap;
}

.queue-badge-done {
	background: #198754;
	border-color: #198754;
}

.color-swatch,
.history-color {
	border-radius: 999px;
	display: inline-block;
	height: 1rem;
	width: 1rem;
}

.color-swatch {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16);
}

.priority-cell {
	min-width: 180px;
}

.priority-input {
	width: 88px;
}

.clean-table thead th {
	background: #f8f9fc;
	color: #6b7280;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
}

.clean-table tbody tr {
	height: 64px;
}

.table-toolbar {
	align-items: end;
	display: grid;
	gap: 1rem;
	grid-template-columns: minmax(240px, 1fr) 140px;
	padding: 1rem;
}

.queue-sort-row {
	cursor: grab;
}

.queue-sort-row.dragging,
.order-row.dragging {
	opacity: .45;
}

.order-row[draggable="true"] {
	cursor: grab;
}

.drag-handle {
	color: #6b7280;
	cursor: grab;
	font-weight: 700;
	text-align: center;
	width: 36px;
}

.action-stack,
.move-form {
	display: flex;
	justify-content: flex-end;
	gap: .5rem;
}

.move-form .form-select {
	width: 150px;
}

.detail-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-detail-grid {
	grid-template-columns: 1fr;
}

.detail-label {
	color: #6b7280;
	font-size: .75rem;
	font-weight: 700;
	margin-bottom: .25rem;
	text-transform: uppercase;
}

.notes-box,
.action-panel {
	background: #f8f9fc;
	border: 1px solid #e3e6f0;
	border-radius: .5rem;
	padding: 1rem;
}

.notes-box {
	min-height: 72px;
	white-space: pre-wrap;
}

.history-list {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.history-item {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	background: #fff;
	border: 1px solid #e1e6ef;
	border-radius: .375rem;
	padding: .25rem .5rem;
}

.table td,
.table th {
	vertical-align: middle;
}

@media (max-width: 768px) {
	.app-sidebar {
		bottom: auto;
		display: block;
		position: static;
		width: 100%;
	}

	.sidebar-nav {
		display: flex;
		flex-wrap: wrap;
	}

	.sidebar-nav a,
	.sidebar-logout button {
		width: auto;
	}

	.sidebar-logout {
		margin-top: .5rem;
	}

	.app-main {
		margin-left: 0;
		max-width: 100%;
	}

	.detail-grid {
		grid-template-columns: 1fr;
	}

	.table-toolbar {
		grid-template-columns: 1fr;
	}
}
