:root {
	--navy: #0f1e32;
	--navy-mid: #162840;
	--navy-light: #1e3354;
	--ink: #1a2332;
	--ink-muted: #5c6b7a;
	--ink-faint: #8a96a3;
	--line: #dfe3ea;
	--line-strong: #c8cfd8;
	--paper: #ffffff;
	--paper-raised: #f8f9fb;
	--paper-hover: #f3f5f8;
	--wash: #eef1f5;
	--wash-dark: #e4e8ee;
	--brand: #1a4a8a;
	--brand-hover: #0f1e32;
	--on-brand: #ffffff;
	--ok: #2e7d52;
	--warn: #9a6b1a;
	--bad: #c0392b;
	--sky-soft: #e8eef5;
	--amber: #e8a317;
	--teal: #1a8f7a;
	--green: #1f7a4d;
	--red: #c0392b;
	--radius: 3px;
	--radius-sm: 2px;
	--radius-lg: 4px;
	--shadow-sm: 0 1px 2px rgba(15, 30, 50, 0.06);
	--shadow-md: 0 4px 16px rgba(15, 30, 50, 0.08);
	--font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
	--safe-top: env(safe-area-inset-top, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
	--sidebar-w: 220px;
	color-scheme: light;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font);
	color: var(--ink);
	background: var(--wash);
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--brand);
}

/* ─── Shell ─── */

.app-shell {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}

.app-sidebar {
	flex-shrink: 0;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
	position: relative;
}

.app-sidebar::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: linear-gradient(
		to right,
		#d32f2f 0,
		#d32f2f 33.33%,
		#388e3c 33.33%,
		#388e3c 66.66%,
		#1976d2 66.66%,
		#1976d2 100%
	);
}

.sidebar-head {
	padding: calc(0.75rem + var(--safe-top)) 1rem 0.75rem;
}

.brand-logo {
	width: 130px;
	height: auto;
}

.sidebar-user {
	padding: 0 1rem 0.65rem;
	font-size: 0.82rem;
	color: var(--ink-muted);
}

.sidebar-user strong {
	color: var(--ink);
	font-weight: 600;
}

.sidebar-nav {
	display: flex;
	border-top: 1px solid var(--line);
	background: var(--paper-raised);
	overflow-x: auto;
}

.sidebar-link {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.8rem 0.55rem;
	min-height: 48px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--ink-muted);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

.sidebar-link.is-active {
	color: var(--navy);
	background: var(--paper);
	border-bottom-color: var(--navy);
}

.sidebar-count {
	font-size: 0.7rem;
	font-weight: 700;
	padding: 0.05rem 0.35rem;
	background: var(--wash-dark);
	color: var(--ink-muted);
	min-width: 1.15rem;
	text-align: center;
	border-radius: var(--radius-sm);
}

.sidebar-link.is-active .sidebar-count {
	background: var(--navy);
	color: #fff;
}

.app-main {
	flex: 1;
	padding: 1rem;
	padding-bottom: calc(1rem + var(--safe-bottom));
	max-width: 920px;
	width: 100%;
	margin: 0 auto;
}

.app-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem 1.25rem;
	padding: 0.85rem 1rem;
	padding-bottom: calc(0.85rem + var(--safe-bottom));
	background: var(--paper);
	border-top: 1px solid var(--line);
}

.footer-link {
	color: var(--ink-muted);
	font-size: 0.88rem;
	text-decoration: none;
}

.footer-link:hover {
	color: var(--navy);
}

@media (min-width: 960px) {
	.app-shell {
		flex-direction: row;
		align-items: stretch;
	}

	.app-sidebar {
		width: var(--sidebar-w);
		border-bottom: none;
		border-right: 1px solid var(--line);
		display: flex;
		flex-direction: column;
		position: sticky;
		top: 0;
		height: 100dvh;
	}

	.app-sidebar::after {
		left: auto;
		right: 0;
		top: 0;
		bottom: 0;
		width: 3px;
		height: auto;
		background: linear-gradient(
			to bottom,
			#d32f2f 0,
			#d32f2f 33.33%,
			#388e3c 33.33%,
			#388e3c 66.66%,
			#1976d2 66.66%,
			#1976d2 100%
		);
	}

	.sidebar-nav {
		flex-direction: column;
		border-top: none;
		background: transparent;
		overflow: visible;
	}

	.sidebar-link {
		justify-content: flex-start;
		padding: 0.7rem 1rem;
		border-bottom: none;
		border-left: 3px solid transparent;
	}

	.sidebar-link.is-active {
		border-left-color: var(--navy);
		background: var(--sky-soft);
	}

	.app-main {
		padding: 1.35rem 1.5rem 2rem;
	}

	.app-footer {
		display: none;
	}

	.sidebar-foot {
		margin-top: auto;
		padding: 1rem;
		border-top: 1px solid var(--line);
	}

	.sidebar-foot .footer-link {
		display: block;
		font-size: 0.84rem;
	}
}

.sidebar-foot {
	display: none;
}

@media (min-width: 960px) {
	.sidebar-foot {
		display: block;
	}
}

/* ─── Page chrome ─── */

.page-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.page-title {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--navy);
}

.page-sub {
	margin: 0.25rem 0 0;
	color: var(--ink-muted);
	font-size: 0.9rem;
}

.date-filter input,
.field input,
.field select,
.field textarea {
	width: 100%;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 0.65rem 0.75rem;
	font: inherit;
	font-size: 0.95rem;
	background: var(--paper);
	color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.date-filter input:focus {
	outline: 2px solid var(--brand);
	outline-offset: 0;
	border-color: var(--brand);
}

.stat-row {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.65rem;
	margin-bottom: 1rem;
}

.stat-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0.85rem;
	box-shadow: var(--shadow-sm);
}

.stat-value {
	display: block;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--navy);
	line-height: 1;
}

.stat-label {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.75rem;
	color: var(--ink-muted);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.job-list,
.client-list {
	display: grid;
	gap: 0.75rem;
}

.job-card,
.client-card,
.detail-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0.95rem 1rem;
	box-shadow: var(--shadow-sm);
}

.job-card {
	border-left: 4px solid var(--brand);
}

.job-card[data-colour] {
	border-left-color: attr(data-colour); /* fallback ignored in most browsers */
}

.job-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.4rem;
}

.job-time {
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--navy);
}

.job-title {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 700;
	color: var(--ink);
}

.job-client {
	margin: 0.3rem 0 0;
	font-weight: 600;
	font-size: 0.92rem;
}

.job-address,
.job-meta,
.job-engineer,
.job-notes,
.client-address,
.client-city,
.client-notes {
	margin: 0.2rem 0 0;
	color: var(--ink-muted);
	font-size: 0.9rem;
}

.job-phone,
.client-phone,
.detail-link {
	display: inline-block;
	margin-top: 0.3rem;
	font-weight: 600;
	text-decoration: none;
}

.job-actions {
	display: flex;
	gap: 0.45rem;
	margin-top: 0.75rem;
	flex-wrap: wrap;
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.18rem 0.45rem;
	border-radius: var(--radius-sm);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.badge-muted { background: var(--wash-dark); color: var(--ink-muted); }
.badge-blue { background: var(--sky-soft); color: #1d5f8f; }
.badge-amber { background: #fef6e8; color: #8a5d00; }
.badge-teal { background: #e8f5f1; color: #0d6b58; }
.badge-red { background: #fceeed; color: #9b2c2c; }
.badge-green { background: #e8f5ee; color: #1f6b45; }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	padding: 0.6rem 0.95rem;
	font: inherit;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	cursor: pointer;
	min-height: 36px;
}

.btn-block { width: 100%; }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.82rem; min-height: 30px; }

.btn-primary {
	background: var(--brand);
	border-color: var(--brand);
	color: var(--on-brand);
}

.btn-primary:hover {
	background: var(--brand-hover);
	border-color: var(--brand-hover);
}

.btn-secondary {
	background: var(--sky-soft);
	border-color: var(--line);
	color: var(--navy);
}

.btn-ghost {
	background: var(--paper);
	color: var(--ink-muted);
	border-color: var(--line-strong);
}

.btn-danger {
	background: #fff;
	color: var(--bad);
	border-color: var(--line-strong);
}

.status-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.45rem;
	margin-top: 0.75rem;
}

.status-form { margin: 0; }

.status-btn {
	width: 100%;
	border: 1px solid var(--line);
	background: var(--wash);
	border-radius: var(--radius);
	padding: 0.65rem 0.45rem;
	font: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
	color: var(--ink);
}

.status-btn.is-current {
	border-color: var(--navy);
	background: var(--sky-soft);
	color: var(--navy);
}

.status-en_route.is-current { background: #fef6e8; border-color: var(--amber); }
.status-on_site.is-current { background: #e8f5f1; border-color: var(--teal); }
.status-needs_parts.is-current { background: #fceeed; border-color: var(--red); }
.status-complete.is-current { background: #e8f5ee; border-color: var(--green); }
.status-cancelled.is-current { background: var(--wash-dark); border-color: var(--ink-faint); }

.empty-state {
	text-align: center;
	padding: 2rem 1rem;
	background: var(--paper);
	border-radius: var(--radius);
	border: 1px dashed var(--line-strong);
}

.empty-state p {
	color: var(--ink-muted);
	margin: 0 0 1rem;
}

.stack-form {
	display: grid;
	gap: 0.85rem;
}

.field {
	display: grid;
	gap: 0.3rem;
}

.field-label {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
}

.detail-heading {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ink-muted);
}

.alert {
	border-radius: var(--radius);
	padding: 0.7rem 0.85rem;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.alert-error {
	background: #fceeed;
	color: #8f2d2d;
	border: 1px solid #f0c4c0;
}

.alert-success {
	background: #e8f5ee;
	color: #1f6b45;
	border: 1px solid #b8dcc8;
}

.section-block {
	margin-top: 1.25rem;
}

.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.section-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--navy);
}

.section-head .section-title {
	margin: 0;
}

.text-link {
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--brand);
}

.filter-row {
	margin: -0.35rem 0 1rem;
}

.filter-card {
	margin-bottom: 1rem;
}

.check-field {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-weight: 600;
	color: var(--ink);
}

.check-field input {
	width: 1.1rem;
	height: 1.1rem;
}

.client-name {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 700;
}

.distance-panel {
	background: var(--sky-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0.85rem 1rem;
}

.distance-label {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ink-muted);
}

.distance-value {
	margin: 0.2rem 0 0;
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--navy);
	line-height: 1.2;
}

.distance-meta {
	margin: 0.25rem 0 0;
	color: var(--ink-muted);
	font-size: 0.86rem;
}

.distance-error {
	margin: 0;
	color: #9b2c2c;
	font-size: 0.88rem;
	font-weight: 600;
}

.inline-form {
	margin-top: 0.75rem;
}

.day-tabs {
	display: flex;
	gap: 0.35rem;
	overflow-x: auto;
	margin-bottom: 1rem;
	padding-bottom: 0.15rem;
}

.day-tab {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 3.4rem;
	padding: 0.45rem 0.55rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
	text-decoration: none;
	color: var(--ink-muted);
	font-size: 0.72rem;
	font-weight: 600;
}

.day-tab strong {
	display: block;
	font-size: 1.05rem;
	color: var(--ink);
	line-height: 1.1;
}

.day-tab.is-active {
	border-color: var(--brand);
	background: var(--sky-soft);
	color: var(--brand);
}

.day-tab.is-active strong {
	color: var(--navy);
}

.day-tab.is-today:not(.is-active) {
	border-color: var(--line-strong);
}

.colour-swatch {
	display: inline-block;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 2px;
	vertical-align: middle;
	margin-right: 0.25rem;
}

.colour-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.colour-picker label {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: var(--radius);
	border: 2px solid transparent;
	cursor: pointer;
}

.colour-picker input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.colour-picker input:checked + span,
.colour-picker label:has(input:checked) {
	box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--brand);
}

.colour-picker span {
	display: block;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 2px;
}

/* ─── Login (workshop style) ─── */

.login-body {
	position: relative;
	isolation: isolate;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: #eef1f5;
}

.login-body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -2;
	pointer-events: none;
	background:
		radial-gradient(ellipse 80% 55% at 12% 18%, rgba(25, 118, 210, 0.16), transparent 58%),
		radial-gradient(ellipse 60% 50% at 88% 78%, rgba(56, 142, 60, 0.11), transparent 55%),
		radial-gradient(ellipse 45% 40% at 72% 8%, rgba(211, 47, 47, 0.08), transparent 50%),
		linear-gradient(165deg, #e7edf5 0%, #eef1f5 42%, #e8ece8 100%);
}

.login-body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	opacity: 0.9;
	background-image:
		repeating-linear-gradient(
			-18deg,
			transparent 0,
			transparent 13px,
			rgba(15, 23, 42, 0.028) 13px,
			rgba(15, 23, 42, 0.028) 14px
		);
	mask-image: radial-gradient(ellipse 80% 70% at 50% 42%, #000 15%, transparent 78%);
}

.login-stage {
	width: 100%;
	max-width: 380px;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	position: relative;
	z-index: 1;
}

.login-wrap {
	width: 100%;
	padding: 2rem 1.75rem;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-md);
	position: relative;
	overflow: hidden;
}

.login-wrap::before {
	content: "";
	display: block;
	height: 3px;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background: linear-gradient(
		to right,
		#d32f2f 0,
		#d32f2f 33.33%,
		#388e3c 33.33%,
		#388e3c 66.66%,
		#1976d2 66.66%,
		#1976d2 100%
	);
}

.login-brand {
	margin-bottom: 1.25rem;
	text-align: center;
}

.login-logo {
	width: 180px;
	margin: 0 auto;
}

.login-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	text-align: center;
	color: var(--ink);
}

.login-tagline {
	margin: 0.3rem 0 1.25rem;
	font-size: 0.88rem;
	color: var(--ink-muted);
	text-align: center;
}

.login-form {
	display: grid;
	gap: 0.85rem;
}

.login-footer {
	text-align: center;
	font-size: 0.78rem;
	color: var(--ink-faint);
	margin: 0;
}

.login-footer a {
	color: var(--ink-muted);
	text-decoration: none;
}

.login-footer-sep {
	margin: 0 0.35rem;
}

@media (min-width: 600px) {
	.stat-row {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ─── Polish layer ─── */

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.btn,
.sidebar-link,
.day-tab,
.stat-card,
.job-card,
.quick-action,
.preset-chip,
.status-btn,
.quick-status-btn {
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:active,
.quick-status-btn:active,
.status-btn:active {
	transform: translateY(1px);
}

.btn.is-busy,
.quick-status-btn.is-busy,
.status-btn.is-busy {
	opacity: 0.7;
	pointer-events: none;
}

.btn.is-static {
	pointer-events: none;
	opacity: 0.85;
}

.alert-toast {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	animation: flash-in 0.22s ease;
}

.alert-toast.is-leaving {
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.alert-dismiss {
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	padding: 0 0.15rem;
	opacity: 0.7;
}

.alert-dismiss:hover {
	opacity: 1;
}

@keyframes flash-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.quick-actions {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.55rem;
	margin-bottom: 1rem;
}

.quick-action {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.75rem 0.7rem;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-decoration: none;
	box-shadow: var(--shadow-sm);
	min-height: 64px;
}

.quick-action:hover {
	border-color: var(--line-strong);
	background: var(--paper-hover);
}

.quick-action-label {
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--navy);
}

.quick-action-meta {
	font-size: 0.72rem;
	color: var(--ink-muted);
}

.stat-card-link {
	text-decoration: none;
	color: inherit;
}

.stat-card-link:hover {
	border-color: var(--line-strong);
	background: var(--paper-hover);
}

.job-card-interactive {
	padding: 0;
	overflow: hidden;
}

.job-card-link {
	display: block;
	padding: 0.95rem 1rem 0.55rem;
	text-decoration: none;
	color: inherit;
}

.job-card-interactive:hover {
	border-color: var(--line-strong);
	box-shadow: var(--shadow-md);
}

.job-card-interactive .job-actions {
	padding: 0 1rem 0.95rem;
	margin-top: 0;
}

.job-quick-status {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.3rem;
	padding: 0 0.75rem 0.75rem;
}

.quick-status-btn {
	border: 1px solid var(--line);
	background: var(--wash);
	border-radius: var(--radius-sm);
	padding: 0.45rem 0.2rem;
	font: inherit;
	font-size: 0.68rem;
	font-weight: 700;
	color: var(--ink-muted);
	cursor: pointer;
}

.quick-status-btn.is-current {
	color: var(--navy);
	border-color: var(--navy);
	background: var(--sky-soft);
}

.quick-status-btn.status-en_route.is-current {
	background: #fef6e8;
	border-color: var(--amber);
	color: #8a5d00;
}

.quick-status-btn.status-on_site.is-current {
	background: #e8f5f1;
	border-color: var(--teal);
	color: #0d6b58;
}

.quick-status-btn.status-complete.is-current {
	background: #e8f5ee;
	border-color: var(--green);
	color: #1f6b45;
}

.day-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	margin-bottom: 0.75rem;
}

.day-jump input {
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 0.4rem 0.55rem;
	font: inherit;
	font-size: 0.84rem;
	background: var(--paper);
	min-height: 30px;
}

.day-tabs {
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 0.25rem;
}

.day-tab {
	scroll-snap-align: start;
	position: relative;
	min-width: 3.6rem;
	padding: 0.5rem 0.45rem 0.55rem;
}

.day-tab-label {
	display: block;
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.day-tab-month {
	display: block;
	font-size: 0.62rem;
	color: var(--ink-faint);
	margin-top: 0.1rem;
}

.day-tab-count {
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
	min-width: 1rem;
	height: 1rem;
	padding: 0 0.2rem;
	border-radius: 999px;
	background: var(--navy);
	color: #fff;
	font-size: 0.62rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.filter-compact {
	padding: 0.75rem 0.9rem;
}

.crumb {
	margin: 0 0 0.65rem;
}

.action-row {
	display: grid;
	gap: 0.5rem;
	margin-top: 1rem;
}

.info-banner {
	background: var(--sky-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0.7rem 0.85rem;
	font-size: 0.88rem;
	color: var(--ink-muted);
}

.postcode-row {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 0.55rem;
	align-items: end;
}

.swap-postcodes {
	margin-bottom: 0.1rem;
	min-width: 2.4rem;
}

.distance-loading {
	margin: 0;
	color: var(--ink-muted);
	font-size: 0.88rem;
	font-weight: 600;
}

.preset-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.85rem;
}

.preset-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
	color: var(--ink-muted);
	text-decoration: none;
	font-size: 0.82rem;
	font-weight: 600;
}

.preset-chip:hover {
	border-color: var(--line-strong);
	color: var(--navy);
}

.preset-chip.is-active {
	background: var(--sky-soft);
	border-color: var(--brand);
	color: var(--brand);
}

.empty-state-lg {
	padding: 3rem 1.25rem;
}

.detail-strong {
	margin: 0;
	font-weight: 700;
}

.detail-notes {
	margin: 0;
	white-space: pre-wrap;
}

.status-grid-detail {
	grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
	.status-grid-detail {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 520px) {
	.quick-actions {
		grid-template-columns: 1fr;
	}

	.postcode-row {
		grid-template-columns: 1fr;
	}

	.swap-postcodes {
		justify-self: center;
		width: 100%;
	}

	.field-row {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
