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

.mobile-topbar,
.sidebar-backdrop {
	display: none;
}

.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;
}

.sidebar-notification-center {
	margin-bottom: 1rem;
}

.mobile-topbar-actions {
	align-items: center;
	display: flex;
	gap: .5rem;
}

.notification-button {
	align-items: center;
	background: #eef2ff;
	border: 1px solid #d8dee9;
	border-radius: 999px;
	color: #18212f;
	display: inline-flex;
	font-weight: 700;
	gap: .5rem;
	height: 42px;
	justify-content: center;
	min-width: 42px;
	padding: 0 .75rem;
	position: relative;
}

.notification-button:hover,
.notification-button.has-unread {
	background: #fff;
	border-color: #4e73df;
	color: #224abe;
}

.notification-button-sidebar {
	background: rgba(255, 255, 255, .12);
	border-color: rgba(255, 255, 255, .25);
	color: #fff;
	justify-content: flex-start;
	width: 100%;
}

.notification-button-sidebar:hover,
.notification-button-sidebar.has-unread {
	background: rgba(255, 255, 255, .2);
	border-color: rgba(255, 255, 255, .45);
	color: #fff;
}

.notification-icon {
	font-size: 1rem;
	line-height: 1;
}

.notification-badge {
	align-items: center;
	background: #dc3545;
	border: 2px solid #fff;
	border-radius: 999px;
	color: #fff;
	display: inline-flex;
	font-size: .7rem;
	font-weight: 800;
	height: 1.25rem;
	justify-content: center;
	line-height: 1;
	min-width: 1.25rem;
	padding: 0 .25rem;
	position: absolute;
	right: -.35rem;
	top: -.35rem;
}

.notification-badge.d-none,
.notification-panel.d-none {
	display: none;
}

.notification-panel {
	background: #fff;
	border: 1px solid #d8dee9;
	border-radius: .5rem;
	box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, .22);
	max-height: min(520px, calc(100vh - 2rem));
	overflow: hidden;
	position: fixed;
	right: 1rem;
	top: 1rem;
	width: min(380px, calc(100vw - 2rem));
	z-index: 1200;
}

.notification-panel-header {
	align-items: center;
	border-bottom: 1px solid #e5e7eb;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	padding: 1rem;
}

.notification-panel-title {
	color: #18212f;
	font-weight: 800;
}

.notification-panel-subtitle {
	color: #6b7280;
	font-size: .85rem;
}

.notification-clear-button {
	background: transparent;
	border: 0;
	color: #4e73df;
	font-weight: 700;
	padding: .25rem;
}

.notification-list {
	display: grid;
	max-height: 420px;
	overflow-y: auto;
}

.notification-panel-item {
	background: #fff;
	border: 0;
	border-bottom: 1px solid #edf0f5;
	display: grid;
	gap: .2rem;
	padding: .85rem 1rem;
	text-align: left;
	width: 100%;
}

.notification-panel-item:hover {
	background: #f8f9fc;
}

.notification-panel-item-title {
	color: #18212f;
	font-weight: 700;
}

.notification-panel-item-message,
.notification-panel-item-time,
.notification-empty {
	color: #6b7280;
	font-size: .9rem;
}

.notification-panel-item-time {
	font-size: .8rem;
}

.notification-empty {
	padding: 1.25rem;
	text-align: center;
}

.notification-stack {
	bottom: 1rem;
	display: grid;
	gap: .75rem;
	position: fixed;
	right: 1rem;
	width: min(360px, calc(100vw - 2rem));
	z-index: 1100;
}

.notification-item {
	background: #fff;
	border: 1px solid #d8dee9;
	border-left: 4px solid #198754;
	border-radius: .5rem;
	box-shadow: 0 .75rem 1.75rem rgba(15, 23, 42, .18);
	cursor: pointer;
	padding: .9rem 1rem;
	transition: opacity .25s ease, transform .25s ease;
}

.notification-item-hide {
	opacity: 0;
	transform: translateY(.5rem);
}

.notification-title {
	color: #18212f;
	font-weight: 700;
	margin-bottom: .2rem;
}

.notification-message {
	color: #4b5563;
	font-size: .9rem;
}

.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;
}

.table-toolbar > .search-box:only-child {
	grid-column: 1 / -1;
}

.column-filter-row th {
	background: #fff !important;
	padding: .5rem;
	text-transform: none !important;
}

.column-filter-row .form-control,
.column-filter-row .form-select {
	font-size: .75rem;
	min-width: 92px;
}

.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;
}

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

.admin-kpi-card {
	background: #fff;
	border: 1px solid #d8dee9;
	border-radius: .5rem;
	padding: 1rem;
}

.admin-kpi-label {
	color: #6b7280;
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .04rem;
	text-transform: uppercase;
}

.admin-kpi-value {
	color: #18212f;
	font-size: 1.55rem;
	font-weight: 800;
	line-height: 1.2;
	margin-top: .45rem;
}

.admin-kpi-note {
	color: #6b7280;
	font-size: .88rem;
	margin-top: .3rem;
}

.sale-workspace {
	display: grid;
	gap: 1rem;
}

.sale-summary-pill {
	align-items: center;
	background: #fff;
	border: 1px solid #d8dee9;
	border-radius: .5rem;
	display: inline-flex;
	gap: .75rem;
	padding: .75rem 1rem;
}

.sale-summary-pill span,
.sale-totals span {
	color: #6b7280;
	font-size: .85rem;
	font-weight: 700;
}

.sale-summary-pill strong {
	color: #18212f;
	font-size: 1.25rem;
}

.sale-lines-table .form-control,
.sale-lines-table .form-select {
	min-width: 0;
}

.sale-line-number {
	width: 92px;
}

.sale-line-money {
	width: 132px;
}

.sale-totals {
	display: grid;
	gap: .75rem;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sale-totals div {
	background: #f8f9fc;
	border: 1px solid #edf0f5;
	border-radius: .5rem;
	padding: .85rem;
}

.sale-totals strong {
	display: block;
	font-size: 1.1rem;
	margin-top: .2rem;
}

.payment-mode-toggle {
	display: inline-flex;
	gap: .5rem;
}

.payment-builder {
	border-top: 1px solid #edf0f5;
	padding-top: 1rem;
}

.payment-recurring {
	background: #f8f9fc;
	border: 1px solid #d8dee9;
	border-radius: .5rem;
	padding: 1rem;
}

.payment-list {
	display: grid;
	gap: .5rem;
}

.payment-card {
	align-items: center;
	background: #f8f9fc;
	border: 1px solid #edf0f5;
	border-radius: .5rem;
	display: grid;
	gap: .75rem;
	grid-template-columns: 1fr 1fr auto;
	padding: .75rem;
}

.payment-card span {
	color: #6b7280;
	display: block;
	font-size: .85rem;
}

.payment-card-editable {
	align-items: end;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	padding: 1rem;
}

.payment-card-heading {
	align-self: center;
	grid-column: 1 / -1;
}

.payment-card-field label {
	color: #4b5563;
	display: block;
	font-size: .76rem;
	font-weight: 700;
	margin-bottom: .3rem;
}

.payment-card-actions {
	display: flex;
	justify-content: flex-end;
}

.payment-balance-alert {
	align-items: center;
	background: #fff8e1;
	border: 1px solid #f4cd65;
	border-radius: .5rem;
	color: #6b4f00;
	display: flex;
	justify-content: space-between;
	padding: 1rem;
}

.payment-balance-alert.is-paid {
	background: #eaf8ef;
	border-color: #8ad2a3;
	color: #185b32;
}

.payment-balance-alert strong {
	font-size: 1.25rem;
}

.sale-products-list {
	display: grid;
	gap: .15rem;
}

.customer-summary-page {
	margin: 0 auto;
	max-width: 1100px;
}

.customer-summary-card {
	box-shadow: 0 .25rem 1rem rgba(24, 33, 47, .05);
}

.summary-info-grid,
.summary-financial-grid {
	display: grid;
	gap: .75rem;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-financial-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-info-grid div,
.summary-financial-grid div {
	background: #f8f9fc;
	border: 1px solid #edf0f5;
	border-radius: .5rem;
	padding: .85rem;
}

.summary-info-grid span,
.summary-financial-grid span,
.summary-notes span {
	color: #6b7280;
	display: block;
	font-size: .8rem;
	font-weight: 700;
	margin-bottom: .2rem;
}

.summary-info-grid strong,
.summary-financial-grid strong {
	display: block;
	font-size: 1.05rem;
}

.summary-payment-list {
	display: grid;
	gap: .5rem;
}

.summary-payment-list > div {
	align-items: center;
	background: #f8f9fc;
	border: 1px solid #edf0f5;
	border-radius: .5rem;
	display: flex;
	justify-content: space-between;
	padding: .75rem;
}

.summary-payment-list span {
	color: #6b7280;
	display: block;
	font-size: .82rem;
}

.summary-notes {
	background: #fff8e1;
	border: 1px solid #f4cd65;
	border-radius: .5rem;
	padding: 1rem;
}

.summary-message {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: .9rem;
}

@media (max-width: 1100px) {
	.admin-kpi-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.payment-card-editable {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	body {
		padding-top: 64px;
	}

	body.menu-open {
		overflow: hidden;
	}

	.mobile-topbar {
		align-items: center;
		background: #fff;
		border-bottom: 1px solid #d8dee9;
		display: flex;
		height: 64px;
		justify-content: space-between;
		left: 0;
		padding: .75rem 1rem;
		position: fixed;
		right: 0;
		top: 0;
		z-index: 1050;
	}

	.mobile-brand {
		align-items: center;
		color: #18212f;
		display: inline-flex;
		font-weight: 700;
		gap: .65rem;
		text-decoration: none;
		text-transform: uppercase;
	}

	.mobile-brand .brand-mark {
		background: #4e73df;
		border-color: #4e73df;
		color: #fff;
	}

	.mobile-menu-button {
		background: #4e73df;
		border: 0;
		border-radius: .375rem;
		color: #fff;
		font-weight: 700;
		min-height: 40px;
		padding: .45rem .8rem;
	}

	.sidebar-backdrop {
		background: rgba(15, 23, 42, .48);
		bottom: 0;
		display: block;
		left: 0;
		opacity: 0;
		pointer-events: none;
		position: fixed;
		right: 0;
		top: 0;
		transition: opacity .2s ease;
		z-index: 1060;
	}

	body.menu-open .sidebar-backdrop {
		opacity: 1;
		pointer-events: auto;
	}

	.app-sidebar {
		box-shadow: .75rem 0 2rem rgba(15, 23, 42, .2);
		transform: translateX(-100%);
		transition: transform .2s ease;
		width: min(82vw, 300px);
		z-index: 1070;
	}

	body.menu-open .app-sidebar {
		transform: translateX(0);
	}

	.app-main {
		margin-left: 0;
		max-width: 100%;
		padding-left: .9rem;
		padding-right: .9rem;
	}

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

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

	.admin-kpi-grid {
		grid-template-columns: 1fr;
	}

	.sale-totals {
		grid-template-columns: 1fr;
	}

	.payment-mode-toggle {
		display: grid;
		grid-template-columns: 1fr 1fr;
		width: 100%;
	}

	.payment-card {
		grid-template-columns: 1fr;
	}

	.payment-card-heading {
		grid-column: auto;
	}

	.payment-balance-alert {
		align-items: flex-start;
		flex-direction: column;
	}

	.payment-balance-alert .text-end {
		text-align: left !important;
	}

	.summary-info-grid,
	.summary-financial-grid {
		grid-template-columns: 1fr;
	}

	.summary-payment-list > div {
		align-items: flex-start;
		flex-direction: column;
	}

	.summary-payment-list .text-end {
		margin-top: .5rem;
		text-align: left !important;
	}

	.sale-lines-table thead {
		display: none;
	}

	.sale-lines-table,
	.sale-lines-table tbody,
	.sale-lines-table tr,
	.sale-lines-table td {
		display: block;
		width: 100%;
	}

	.sale-lines-table tr {
		border-bottom: 1px solid #edf0f5;
		padding: .75rem 0;
	}

	.sale-lines-table td {
		border: 0;
		padding: .35rem 0;
	}

	.notification-stack {
		bottom: .75rem;
		left: .75rem;
		right: .75rem;
		width: auto;
	}

	.notification-panel {
		left: .75rem;
		right: .75rem;
		top: 72px;
		width: auto;
	}
}

@media print {
	.app-sidebar,
	.mobile-topbar,
	.sidebar-backdrop,
	.summary-no-print {
		display: none !important;
	}

	body {
		background: #fff;
		padding: 0;
	}

	.app-main {
		margin: 0;
		max-width: none;
		padding: 0 !important;
	}

	.customer-summary-card {
		border: 0 !important;
		box-shadow: none;
	}
}
