: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;
	--accent: #0f1e32;
	--accent-muted: #5c6b7a;
	--ok: #2e7d52;
	--warn: #9a6b1a;
	--bad: #c0392b;
	--active: #e8eef5;
	--status-warn-bg: #fef6e8;
	--status-ok-bg: #e8f5ee;
	--status-bad-bg: #fceeed;
	--alert-error-bg: #fceeed;
	--alert-error-border: #f0c4c0;
	--alert-ok-bg: #e8f5ee;
	--alert-ok-border: #b8dcc8;
	--logo-bg: #ffffff;
	--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: 248px;
	--content-max: 1040px;
	--shadow-lg: 0 12px 40px rgba(15, 30, 50, 0.12);
	color-scheme: light;
}

[data-theme="dark"] {
	color-scheme: dark;
	--navy: #dbe7f5;
	--navy-mid: #c5d4e8;
	--navy-light: #aebfd6;
	--ink: #e8edf4;
	--ink-muted: #9aa8b8;
	--ink-faint: #6b7785;
	--line: #2d3640;
	--line-strong: #3d4854;
	--paper: #161b22;
	--paper-raised: #1c2129;
	--paper-hover: #222831;
	--wash: #0d1117;
	--wash-dark: #070b10;
	--brand: #6ba3e8;
	--brand-hover: #8bb8f0;
	--on-brand: #0d1117;
	--accent: #e8edf4;
	--accent-muted: #9aa8b8;
	--ok: #3ecf8e;
	--warn: #f0b429;
	--bad: #f07178;
	--active: #1f2937;
	--status-warn-bg: #2a2210;
	--status-ok-bg: #12261a;
	--status-bad-bg: #2a1414;
	--alert-error-bg: #2a1414;
	--alert-error-border: #5c2a2a;
	--alert-ok-bg: #12261a;
	--alert-ok-border: #2a5c3a;
	--logo-bg: #ffffff;
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}

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

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

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	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);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.app-shell {
	min-height: 100dvh;
	width: 100%;
	max-width: var(--shell-max);
	margin: 0 auto;
	background: transparent;
	display: flex;
	flex-direction: column;
}

.app-header {
	position: sticky;
	top: 0;
	z-index: 100;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		"brand meta"
		"nav nav";
	align-items: center;
	gap: 0.65rem 1rem;
	padding: calc(0.75rem + var(--safe-top)) 1rem 0.85rem;
	background: rgba(15, 30, 50, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: none;
	box-shadow: var(--shadow-sm);
}

.app-header::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%
	);
}

.brand-link {
	display: inline-flex;
	text-decoration: none;
	flex-shrink: 0;
	grid-area: brand;
}

.brand-badge {
	display: inline-flex;
	align-items: center;
	background: var(--logo-bg);
	padding: 0.4rem 0.7rem;
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-sm);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (hover: hover) {
	.brand-link:hover .brand-badge {
		transform: translateY(-1px);
		box-shadow: var(--shadow-md);
	}
}

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

.header-meta {
	text-align: right;
	line-height: 1.25;
	min-width: 0;
	grid-area: meta;
}

.header-app {
	display: block;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--accent-muted);
}

.header-name {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ink);
}

.header-role {
	display: block;
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.55);
}

.app-nav {
	display: flex;
	border-bottom: none;
	background: transparent;
	grid-area: nav;
}

.app-nav-admin {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	gap: 0.35rem;
	padding: 0.2rem;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-link {
	flex: 1;
	padding: 0.65rem 0.85rem;
	min-height: 44px;
	text-align: center;
	font-size: 0.875rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	border-bottom: none;
	border-radius: 999px;
	margin-bottom: 0;
	transition: background 0.15s ease, color 0.15s ease;
}

.nav-link.is-active {
	background: var(--accent);
	color: var(--on-brand);
	font-weight: 700;
	box-shadow: var(--shadow-sm);
}

.nav-link .nav-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.2rem;
	height: 1.2rem;
	margin-left: 0.35rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.15);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
}

.nav-link.is-active .nav-count {
	background: rgba(15, 30, 50, 0.12);
}

@media (hover: hover) {
	.nav-link:not(.is-active):hover {
		color: rgba(255, 255, 255, 0.85);
		background: rgba(255, 255, 255, 0.06);
	}
}

.nav-link-action {
	color: var(--brand);
}

.app-main {
	flex: 1;
	padding: 1rem;
	padding-bottom: calc(1rem + var(--safe-bottom));
	width: 100%;
}

.app-footer {
	padding: 1rem 1.25rem;
	padding-bottom: calc(1rem + var(--safe-bottom));
	text-align: center;
	border-top: 1px solid var(--line);
	background: rgba(23, 29, 38, 0.6);
	backdrop-filter: blur(8px);
}

.footer-link {
	color: var(--ink-muted);
	font-size: 0.875rem;
	text-decoration: none;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

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

.page-title {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 650;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

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

.date-filter input {
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 0.45rem 0.55rem;
	min-height: 44px;
	font: inherit;
	font-size: 0.875rem;
	background: var(--paper);
	color: var(--ink);
}

.summary-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.5rem;
	margin: 0 0 1.15rem;
	padding: 0;
	background: none;
	border: none;
	border-radius: 0;
	overflow: visible;
}

.summary-item {
	padding: 0.65rem 0.35rem;
	text-align: center;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--paper);
}

.summary-item:last-child {
	border-right: 1px solid var(--line);
}

.summary-item dt {
	margin: 0;
	font-size: 0.7rem;
	color: var(--ink-muted);
	font-weight: 500;
}

.summary-item dd {
	margin: 0.15rem 0 0;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1;
}

.record-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.65rem;
	border: none;
	border-radius: 0;
	overflow: visible;
}

.record-item {
	padding: 0.95rem 1rem;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.record-item:last-child {
	border-bottom: 1px solid var(--line);
}

.record-item--work {
	background: var(--paper);
}

.record-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
}

.record-time {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ink);
}

.record-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.record-meta,
.record-sub {
	margin: 0.2rem 0 0;
	font-size: 0.875rem;
	color: var(--ink-muted);
}

.record-address,
.record-note {
	margin: 0.35rem 0 0;
	font-size: 0.875rem;
	color: var(--ink-muted);
	line-height: 1.4;
}

.record-phone {
	display: inline-block;
	margin-top: 0.35rem;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--brand);
}

.record-actions {
	display: flex;
	gap: 1rem;
	margin-top: 0.65rem;
}

.record-actions--stack {
	flex-direction: column;
	gap: 0.5rem;
}

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

.status-label {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 700;
	padding: 0.2rem 0.45rem;
	border-radius: var(--radius-sm);
	background: var(--wash-dark);
	color: var(--ink-muted);
	letter-spacing: 0.03em;
	text-transform: uppercase;
	border: 1px solid var(--line);
}

.status-label--unassigned {
	background: var(--wash-dark);
	color: var(--ink-muted);
}

.status-label--assigned,
.status-label--en_route {
	background: var(--status-warn-bg);
	color: var(--warn);
}

.status-label--on_site {
	background: var(--status-ok-bg);
	color: var(--ok);
}

.status-label--needs_parts {
	background: var(--status-bad-bg);
	color: var(--bad);
}

.status-label--complete {
	background: var(--wash-dark);
	color: var(--ink-muted);
}

.status-label--open {
	background: var(--status-warn-bg);
	color: var(--warn);
}

.status-label--waiting_parts {
	background: var(--status-bad-bg);
	color: var(--bad);
}

.status-label--fixed {
	background: var(--status-ok-bg);
	color: var(--ok);
}

.status-label--shipped {
	background: var(--wash-dark);
	color: var(--ink-muted);
}

.check-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
	margin: 0.25rem 0 0.75rem;
}

.check-field {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--paper-raised);
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
}

.check-field input {
	width: 1.1rem;
	height: 1.1rem;
	accent-color: var(--accent);
}

.flag-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0.45rem 0 0.65rem;
}

.flag-chip {
	font-size: 0.72rem;
	font-weight: 600;
	padding: 0.15rem 0.45rem;
	border-radius: 3px;
	background: var(--wash-dark);
	color: var(--ink-muted);
}

.flag-chip.is-on {
	background: var(--status-ok-bg);
	color: var(--ok);
}

.status-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	margin-top: 0.85rem;
}

.status-actions--full {
	grid-template-columns: 1fr;
}

.status-form {
	margin: 0;
}

.status-action {
	width: 100%;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 0.7rem 0.5rem;
	min-height: 44px;
	background: var(--paper);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--ink);
	cursor: pointer;
	text-align: center;
}

.status-action.is-active {
	background: var(--active);
	border-color: var(--line-strong);
	color: var(--accent);
	font-weight: 600;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	padding: 0.65rem 1rem;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	background: none;
	min-height: 44px;
}

.btn-block {
	width: 100%;
}

.btn-sm {
	padding: 0.5rem 0.85rem;
	font-size: 0.875rem;
	min-height: 40px;
}

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

.btn-primary:active {
	background: var(--navy-mid);
	border-color: var(--navy-mid);
}

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

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

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

.panel {
	margin-bottom: 0.85rem;
	padding: 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
}

.form-section {
	margin: 0;
	padding: 0;
	border: none;
}

fieldset.form-section {
	min-width: 0;
}

.form-section + .form-section {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
}

.form-section-title {
	margin: 0 0 0.75rem;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.07em;
}

.panel-title {
	margin: 0 0 0.65rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--ink-muted);
	text-transform: none;
	letter-spacing: 0;
}

.panel-lead {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
}

.panel-text {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	color: var(--ink-muted);
}

.panel-text--note {
	margin-top: 0.5rem;
	line-height: 1.5;
}

.panel-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 0.35rem 0 0;
	font-size: 0.875rem;
}

.panel-row span:first-child {
	color: var(--ink-muted);
}

.panel-actions {
	margin-top: 0.75rem;
}

.history-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.history-item {
	padding: 0.65rem 0;
	border-bottom: 1px solid var(--line);
}

.history-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.history-meta {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 0.8rem;
	color: var(--ink-faint);
}

.history-status {
	margin: 0.2rem 0 0;
	font-size: 0.875rem;
	font-weight: 600;
}

.history-note {
	margin: 0.15rem 0 0;
	font-size: 0.875rem;
	color: var(--ink-muted);
}

.back-link {
	display: inline-block;
	margin-top: 0.75rem;
	font-size: 0.875rem;
	color: var(--ink-muted);
	text-decoration: none;
}

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

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

.field-label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--ink);
}

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

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

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

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

.alert-error {
	background: var(--alert-error-bg);
	color: var(--bad);
	border: 1px solid var(--alert-error-border);
}

.alert-ok {
	background: var(--alert-ok-bg);
	color: var(--ok);
	border: 1px solid var(--alert-ok-border);
}

.search-form input[type="search"] {
	flex: 1;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 0.55rem 0.7rem;
	font: inherit;
	font-size: 0.875rem;
	background: var(--wash);
	color: var(--ink);
}

.search-form {
	display: flex;
	gap: 0.5rem;
	flex: 1;
}

.search-form--page {
	margin-bottom: 1rem;
}

.record-meta--ok {
	color: var(--ok);
	font-weight: 600;
}

.record-title-link {
	color: inherit;
	text-decoration: none;
}

.status-actions--detail {
	margin: 0 0 1rem;
	padding: 0.65rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
}

.hint-text {
	font-size: 0.875rem;
	color: var(--ink-muted);
	margin: 0 0 1rem;
}

.section-title {
	font-size: 0.9rem;
	font-weight: 600;
	margin: 1.25rem 0 0.5rem;
}

.week-grid {
	display: grid;
	gap: 0.75rem;
}

.week-day {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
	padding: 0.75rem;
}

.week-day-title {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.week-empty {
	margin: 0;
	color: var(--ink-faint);
	font-size: 0.875rem;
}

.week-jobs {
	list-style: none;
	margin: 0;
	padding: 0;
}

.week-jobs li {
	border-top: 1px solid var(--line);
}

.week-job-link {
	display: block;
	padding: 0.55rem 0;
	text-decoration: none;
	color: inherit;
}

.week-job-time {
	display: inline-block;
	min-width: 3rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ink-muted);
}

.week-job-title {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
}

.week-job-meta {
	display: block;
	font-size: 0.8rem;
	color: var(--ink-muted);
}

.plain-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.plain-list-item {
	padding: 0.55rem 0;
	border-bottom: 1px solid var(--line);
	font-size: 0.875rem;
}

.plain-list-item:last-child {
	border-bottom: none;
}

.panel-nested {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--line);
}

.report-actions {
	margin: 1rem 0;
}

.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.8rem;
}

.data-table th,
.data-table td {
	padding: 0.55rem 0.65rem;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.data-table th {
	background: var(--wash);
	font-weight: 600;
}

.install-steps {
	margin: 0;
	padding-left: 1.2rem;
	font-size: 0.875rem;
	line-height: 1.6;
}

.app-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem 1.25rem;
}

.logout-form {
	margin: 0;
}

.footer-button {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
}

.login-body {
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	padding-top: calc(1.5rem + var(--safe-top));
	padding-bottom: calc(1.5rem + var(--safe-bottom));
	background: var(--navy);
}

.login-wrap {
	width: 100%;
	max-width: 380px;
	padding: 1.75rem 1.5rem 1.5rem;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.login-brand {
	display: flex;
	justify-content: center;
	margin-bottom: 1.25rem;
}

.login-brand-badge {
	display: inline-flex;
	background: var(--logo-bg);
	padding: 0.65rem 1rem;
	border-radius: var(--radius-sm);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

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

.login-title {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
	font-weight: 650;
	text-align: center;
	letter-spacing: -0.02em;
}

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

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

.record-button {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
}

.record-button--danger {
	color: var(--bad);
}

.inline-form {
	display: inline;
}

.record-list--flat {
	border: none;
}

.record-list--flat .record-item {
	border: none;
	border-bottom: 1px solid var(--line);
	padding-left: 0;
	padding-right: 0;
}

.login-divider {
	text-align: center;
	margin: 1rem 0 0.75rem;
}

.staff-role-form {
	margin-bottom: 0.5rem;
}

.field-inline {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
}

.field-inline .field-label {
	margin: 0;
	white-space: nowrap;
}

.field-inline select {
	min-width: 10rem;
}

@media (min-width: 600px) {
	.app-shell {
		margin-top: 1rem;
		margin-bottom: 1rem;
		min-height: calc(100dvh - 2rem);
		border: 1px solid var(--line);
		border-radius: var(--radius);
		overflow: hidden;
	}

	.summary-item dt {
		font-size: 0.72rem;
	}
}

.record-type {
	margin: 0 0 0.15rem;
	font-size: 0.8rem;
	color: var(--ink-faint);
	font-weight: 500;
}

.record-item--done {
	opacity: 0.75;
}

.panel--compact {
	padding: 0.75rem 1rem;
}

.flash-hide {
	opacity: 0;
}

.onboard-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	padding: 0.75rem 1rem;
	background: var(--active);
	border-bottom: 1px solid var(--line);
}

.onboard-text {
	margin: 0;
	flex: 1;
	font-size: 0.875rem;
}

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

.onboard-dismiss {
	background: none;
	border: none;
	color: var(--ink-muted);
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
	padding: 0.25rem;
}

.modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 1rem;
	padding-bottom: calc(1rem + var(--safe-bottom));
}

.modal[hidden] {
	display: none;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.modal-panel {
	position: relative;
	width: 100%;
	max-width: 400px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1rem;
}

.modal-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
}

.modal-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.modal-actions .btn {
	flex: 1;
}

.week-job-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.15rem;
}

.week-job-status {
	font-size: 0.65rem;
}

.data-table tbody tr:hover {
	background: var(--wash-dark);
}

.data-table a {
	color: var(--brand);
}

.btn.is-loading {
	opacity: 0.7;
}

/* Workshop board */
.filter-bar {
	display: flex;
	gap: 0.45rem;
	margin-bottom: 1rem;
	overflow-x: auto;
	padding-bottom: 0.15rem;
	-webkit-overflow-scrolling: touch;
}

.filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	color: var(--ink-muted);
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.filter-pill.is-active {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--on-brand);
}

.filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.35rem;
	border-radius: var(--radius-sm);
	background: rgba(0, 0, 0, 0.08);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
}

.filter-pill.is-active .filter-count {
	background: rgba(255, 255, 255, 0.2);
}

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

.job-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.05rem 1.15rem 1rem;
	box-shadow: var(--shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	border-left-width: 3px;
	border-left-style: solid;
}

.job-card--open {
	border-left-color: var(--warn);
}

.job-card--waiting_parts {
	border-left-color: var(--bad);
}

.job-card--fixed {
	border-left-color: var(--ok);
}

.job-card--shipped,
.job-card--done {
	border-left-color: var(--ink-faint);
}

@media (hover: hover) {
	.job-card:hover {
		transform: translateY(-2px);
		box-shadow: var(--shadow-md);
		border-color: var(--line-strong);
	}
}

.job-card--done {
	opacity: 0.92;
}

.job-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.job-card-head {
	margin-bottom: 0.65rem;
}

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

.job-location-form {
	margin: 0.35rem 0 0.5rem;
}

.job-location-form .field--inline {
	margin: 0;
}

.job-location-form select {
	width: 100%;
	font-size: 0.88rem;
}

.job-card-location {
	margin: 0.25rem 0 0;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--ink-muted);
}

.job-card-admin {
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--line);
}

.job-card-title {
	margin: 0;
	font-size: 1.08rem;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.job-card-serial {
	margin: 0.15rem 0 0;
	font-size: 0.84rem;
	color: var(--ink-muted);
}

.job-card-problem {
	margin: 0.45rem 0 0;
	font-size: 0.875rem;
	color: var(--ink-muted);
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.job-card-next {
	margin: 0.55rem 0 0;
	padding: 0.45rem 0.6rem;
	border-radius: var(--radius-sm);
	background: var(--wash-dark);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--brand);
}

.job-card-next--detail {
	margin-top: 0.85rem;
}

.job-card-tracking {
	margin: 0.55rem 0 0;
	font-size: 0.84rem;
	color: var(--ink-muted);
}

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

.job-card-actions--detail {
	margin-top: 0;
}

.job-chip {
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	padding: 0.35rem 0.65rem;
	min-height: 34px;
	background: var(--wash);
	font: inherit;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--ink-muted);
	cursor: pointer;
}

.job-chip--wide {
	flex: 1 1 calc(50% - 0.4rem);
	border-radius: var(--radius-sm);
	min-height: 40px;
}

.job-chip.is-on {
	background: var(--active);
	border-color: var(--line-strong);
	color: var(--accent);
}

.job-card-foot {
	display: flex;
	gap: 1rem;
	margin-top: 0.7rem;
	padding-top: 0.65rem;
	border-top: 1px solid var(--line);
}

/* Repair pipeline */
.pipeline {
	display: flex;
	align-items: flex-start;
	gap: 0;
	margin: 0.15rem 0 0;
	overflow-x: auto;
	padding-bottom: 0.15rem;
}

.pipeline-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	min-width: 3.1rem;
	flex-shrink: 0;
}

.pipeline-dot {
	width: 0.65rem;
	height: 0.65rem;
	border-radius: 50%;
	background: var(--line-strong);
	border: 2px solid var(--paper);
	box-shadow: 0 0 0 1px var(--line-strong);
}

.pipeline-step.is-done .pipeline-dot {
	background: var(--ok);
	box-shadow: 0 0 0 1px var(--ok);
}

.pipeline-step.is-current .pipeline-dot {
	background: var(--warn);
	box-shadow: 0 0 0 1px var(--warn);
}

.pipeline-label {
	font-size: 0.62rem;
	font-weight: 600;
	color: var(--ink-faint);
	text-align: center;
	line-height: 1.2;
	max-width: 3.5rem;
}

.pipeline-step.is-done .pipeline-label,
.pipeline-step.is-current .pipeline-label {
	color: var(--ink-muted);
}

.pipeline-line {
	flex: 1;
	height: 2px;
	min-width: 0.5rem;
	margin-top: 0.32rem;
	background: var(--line-strong);
}

.pipeline-line.is-done {
	background: var(--ok);
}

/* Job detail */
.panel--ticket {
	padding-top: 0.85rem;
}

.detail-grid {
	margin: 0;
}

.detail-row {
	display: grid;
	grid-template-columns: 6.5rem 1fr;
	gap: 0.65rem;
	padding: 0.55rem 0;
	border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.detail-row dt {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--ink-muted);
}

.detail-row dd {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.45;
}

.action-stack {
	display: grid;
	gap: 0.55rem;
	margin-top: 1rem;
}

.btn-danger {
	background: transparent;
	border-color: var(--bad);
	color: var(--bad);
	font-weight: 600;
}

.btn-danger:active {
	background: var(--status-bad-bg);
}

/* Guided process */
.process-kicker {
	margin: 0 0 0.25rem;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink-muted);
}

.process-flow {
	display: flex;
	gap: 0.35rem;
	margin-bottom: 1.15rem;
	overflow-x: auto;
	padding-bottom: 0.1rem;
}

.process-flow--compact {
	opacity: 0.85;
}

.process-flow-step {
	flex: 1;
	min-width: 4rem;
	padding: 0.45rem 0.35rem;
	border-radius: var(--radius-sm);
	background: var(--paper);
	border: 1px solid var(--line);
	text-align: center;
	font-size: 0.68rem;
	font-weight: 700;
	color: var(--ink-faint);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.process-flow-step.is-done {
	background: var(--status-ok-bg);
	border-color: transparent;
	color: var(--ok);
}

.process-flow-step.is-current {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--on-brand);
}

.process-screen {
	padding: 1.15rem 1rem 1rem;
}

.process-screen--done {
	text-align: left;
}

.process-lead {
	margin: 0 0 1rem;
	font-size: 1rem;
	line-height: 1.45;
	color: var(--ink);
}

.process-context {
	margin: 0 0 1rem;
	padding: 0.65rem 0.75rem;
	border-radius: var(--radius-sm);
	background: var(--wash-dark);
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--ink-muted);
}

.process-choices {
	display: grid;
	gap: 0.65rem;
}

.btn-process {
	min-height: 52px;
	font-size: 1rem;
	font-weight: 650;
}

.btn-process-choice {
	min-height: 56px;
	font-size: 1rem;
	font-weight: 600;
}

.job-card--waiting {
	border-color: var(--line-strong);
}

.job-card-hint {
	margin: 0.5rem 0 0;
	font-size: 0.84rem;
	color: var(--ink-muted);
	line-height: 1.4;
}

.process-waiting {
	margin: 0 0 1rem;
	padding: 0.55rem 0.7rem;
	border-left: 3px solid var(--warn);
	font-size: 0.84rem;
	color: var(--ink-muted);
	background: var(--status-warn-bg);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.btn-continue {
	margin-top: 0.75rem;
	min-height: 48px;
	font-weight: 650;
}

.btn-continue.btn-secondary {
	font-weight: 600;
}

.process-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1rem;
}

/* ─── Visual polish & responsive ─── */

.toolbar-row {
	display: flex;
	gap: 0.65rem;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--line);
	background: rgba(23, 29, 38, 0.5);
	align-items: center;
}

.search-form input[type="search"] {
	flex: 1;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 0.6rem 0.85rem;
	font: inherit;
	font-size: 0.9rem;
	background: var(--paper);
	color: var(--ink);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-form input[type="search"]:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px rgba(184, 200, 220, 0.15);
}

.btn-new-job {
	white-space: nowrap;
	flex-shrink: 0;
	box-shadow: var(--shadow-sm);
}

.btn {
	transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (hover: hover) {
	.btn-primary:hover {
		background: var(--brand-hover);
		border-color: var(--brand-hover);
		box-shadow: var(--shadow-md);
		transform: translateY(-1px);
	}

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

	.btn-danger:hover {
		background: var(--status-bad-bg);
	}
}

.btn-primary {
	box-shadow: var(--shadow-sm);
}

.page-title {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.03em;
}

.filter-pill {
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

@media (hover: hover) {
	.filter-pill:not(.is-active):hover {
		background: var(--paper-hover);
		border-color: var(--line-strong);
		transform: translateY(-1px);
	}
}

.filter-pill.is-active {
	box-shadow: var(--shadow-sm);
}

.job-card--waiting {
	box-shadow: 0 0 0 1px rgba(201, 151, 58, 0.12), var(--shadow-sm);
}

.job-location-form select {
	background: var(--paper-raised);
	border-color: var(--line);
	border-radius: var(--radius-sm);
	padding: 0.5rem 0.65rem;
	transition: border-color 0.15s ease;
}

.job-location-form select:focus {
	border-color: var(--brand);
	outline: none;
	box-shadow: 0 0 0 3px rgba(184, 200, 220, 0.12);
}

.panel {
	box-shadow: var(--shadow-sm);
	border-color: var(--line);
}

.empty-state {
	padding: 3rem 1.5rem;
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius-lg);
	background: rgba(23, 29, 38, 0.4);
}

.field input,
.field select,
.field textarea {
	background: var(--paper-raised);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(184, 200, 220, 0.15);
}

.flash {
	margin: 0.75rem 1rem 0;
	padding: 0.75rem 1rem;
	border-radius: var(--radius-sm);
	font-size: 0.875rem;
	font-weight: 600;
	animation: flash-in 0.3s ease;
	box-shadow: var(--shadow-md);
	transition: opacity 0.3s ease;
}

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

.flash-ok {
	background: var(--alert-ok-bg);
	border: 1px solid var(--alert-ok-border);
	color: var(--ok);
}

.flash-error {
	background: var(--alert-error-bg);
	border: 1px solid var(--alert-error-border);
	color: var(--bad);
}

.login-body {
	background:
		radial-gradient(ellipse 100% 80% at 50% -30%, rgba(25, 118, 210, 0.2), transparent 55%),
		var(--navy);
}

.login-wrap {
	max-width: 420px;
	padding: 2rem 1.75rem 1.75rem;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
}

.login-wrap::before {
	content: "";
	display: block;
	height: 3px;
	margin: -2rem -1.75rem 1.5rem;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	background: linear-gradient(
		to right,
		#d32f2f 0,
		#d32f2f 33.33%,
		#388e3c 33.33%,
		#388e3c 66.66%,
		#1976d2 66.66%,
		#1976d2 100%
	);
}

.process-flow-step.is-current {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.process-screen {
	border-radius: var(--radius);
}

.status-label {
	font-size: 0.7rem;
	padding: 0.25rem 0.55rem;
	letter-spacing: 0.04em;
}

/* Tablet */
@media (min-width: 640px) {
	.app-main {
		padding: 1.25rem 1.5rem 1.5rem;
	}

	.toolbar-row {
		padding: 0.85rem 1.5rem;
	}

	.flash {
		margin-left: 1.5rem;
		margin-right: 1.5rem;
	}

	.job-list {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}

	.page-title {
		font-size: 1.65rem;
	}
}

/* Laptop / desktop */
@media (min-width: 900px) {
	:root {
		--shell-max: 1120px;
	}

	.app-header {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "brand nav meta";
		gap: 1.25rem 2rem;
		padding: calc(0.85rem + var(--safe-top)) 2rem 0.95rem;
	}

	.app-nav-admin {
		max-width: 340px;
		justify-self: center;
	}

	.header-meta {
		justify-self: end;
	}

	.brand-logo {
		width: 140px;
	}

	.toolbar-row {
		padding: 1rem 2rem;
		max-width: var(--shell-max);
		margin: 0 auto;
		width: 100%;
		box-sizing: border-box;
	}

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

	.app-footer {
		padding: 1.15rem 2rem;
	}

	.flash {
		max-width: var(--shell-max);
		margin-left: auto;
		margin-right: auto;
		width: calc(100% - 4rem);
	}

	.job-list {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.1rem;
	}

	.process-screen {
		max-width: 560px;
		margin-left: auto;
		margin-right: auto;
	}

	.page-toolbar {
		margin-bottom: 1.25rem;
	}

	.filter-bar {
		flex-wrap: wrap;
		overflow: visible;
	}
}

/* Large desktop — three columns for job board */
@media (min-width: 1200px) {
	.job-list {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Process / form pages — comfortable reading width on all screens */
@media (min-width: 640px) {
	.process-flow {
		max-width: 520px;
	}

	.stack-form.panel.process-screen {
		max-width: 560px;
	}
}
